This commit is contained in:
汤凯
2025-10-19 14:29:36 +08:00
parent b7570e392c
commit ae57bd1948
45 changed files with 6701 additions and 0 deletions

50
src/components/Header.vue Normal file
View File

@@ -0,0 +1,50 @@
<template>
<div class="bg-transparant">
<a-menu v-model:selectedKeys="current" mode="horizontal">
<a-menu-item v-for="item in departmentList" :key="item.key">
{{ item.name }}
</a-menu-item>
</a-menu>
</div>
</template>
<script setup lang="ts">
import { watch } from "vue";
import { useUserStore } from "@/store/user.ts";
import { useRouter, useRoute } from "vue-router";
let userStore: any = useUserStore();
const router = useRouter();
const current = ref<string[]>(["3"]);
watch(
current,
(N, O) => {
if (N == 5) {
router.push({
path: "/statistic",
});
}
if (N != 5) {
userStore.SetMenuInfo({ key: current.value });
}
},
{
immediate: true,
}
);
let departmentList = [
{ key: "3", name: "人工智能系" },
{ key: "1", name: "电子信息工程系" },
{ key: "2", name: "通信工程系" },
// { key: "4", name: "本科实验教学中心" },
{ key: "5", name: "数据统计" },
];
</script>
<style scoped>
.ant-menu-light {
background-color: transparent;
}
</style>

View File

@@ -0,0 +1,41 @@
<script setup lang="ts">
import { ref } from 'vue'
defineProps<{ msg: string }>()
const count = ref(0)
</script>
<template>
<h1>{{ msg }}</h1>
<div class="card">
<button type="button" @click="count++">count is {{ count }}</button>
<p>
Edit
<code>components/HelloWorld.vue</code> to test HMR
</p>
</div>
<p>
Check out
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
>create-vue</a
>, the official Vue + Vite starter
</p>
<p>
Learn more about IDE Support for Vue in the
<a
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
target="_blank"
>Vue Docs Scaling up Guide</a
>.
</p>
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
</template>
<style scoped>
.read-the-docs {
color: #888;
}
</style>

View File

@@ -0,0 +1,39 @@
<template>
<div class="w-full flex justify-between py-[18px] px-[40px] bg-white">
<div>
<img
src="../assets/web/statisTop.png"
alt=""
class="w-[167px] h-[60px]"
/>
</div>
<div
v-if="userStore.userInfo && userStore.userInfo.data"
class="h-[48px] flex py-[6px] px-[14px] bg-[#F6F8FA] rounded-[10px]"
>
<div class="avatar"></div>
<div class="leading-[34px] ml-[10px]">
{{ userStore.userInfo.data.name }}
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { watch } from "vue";
import { useUserStore } from "@/store/user.ts";
import { useRouter, useRoute } from "vue-router";
let userStore: any = useUserStore();
</script>
<style scoped>
.avatar {
width: 34px;
height: 34px;
background: url("../assets/web/avatar.jpg");
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
</style>