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>