From 9f8da9c38a97b5455682336c63022f7944b712f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=82=A5=E7=BE=8A?= <1048382248@qq.com> Date: Thu, 21 Aug 2025 18:14:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=20=E8=80=83=E8=AF=95?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=20=E4=BC=98=E5=8C=96=20=E8=B5=B4=E6=A0=A1?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/menu.ts | 10 ++ src/api/toschoolinfomanage.ts | 21 +++ src/layout/components/lay-navbar/index.vue | 15 +- src/layout/components/lay-notice/index.vue | 15 +- src/views/admin/index.vue | 43 +++-- src/views/admin/role.vue | 39 +++-- src/views/exam/classExam.vue | 2 +- src/views/exam/classExamRecord.vue | 164 +++++++++++++++++++ src/views/menu/index.vue | 71 +++++++-- src/views/student/index.vue | 109 +++++-------- src/views/teacher/index.vue | 1 + src/views/toschoolinfomanage/editModal.vue | 98 +++++------- src/views/toschoolinfomanage/index.vue | 176 ++++++++++++--------- 13 files changed, 488 insertions(+), 276 deletions(-) create mode 100644 src/views/exam/classExamRecord.vue diff --git a/src/api/menu.ts b/src/api/menu.ts index 17ba631..2250495 100644 --- a/src/api/menu.ts +++ b/src/api/menu.ts @@ -37,3 +37,13 @@ export function Edit(info: MenuItem) { export function Del(ids: number[]) { return http.request>("post", `Menu/Del`, { data: ids }); } +/**获取角色的菜单 */ +export function RoleMenu(roleId: number) { + return http.request>("get", `MenuRelation/RoleMenu?roleId=${roleId}`); +} +/**修改角色菜单 */ +export function SetMenu(data: { roleId: number; menuId: number[] }) { + return http.request>("post", `MenuRelation/SetMenu`, { + data: data + }); +} diff --git a/src/api/toschoolinfomanage.ts b/src/api/toschoolinfomanage.ts index 7ff18ec..c48da1f 100644 --- a/src/api/toschoolinfomanage.ts +++ b/src/api/toschoolinfomanage.ts @@ -55,4 +55,25 @@ export function getSchoolBusinessPeopleListApi(data: object) { return http.request>("post", `/Admin/QueryCombo`, { data }); +} +/** + * @description 导入excel + * @return {object} + */ +export function importExcel(file: File) { + let formData = new FormData(); + formData.append("file", file); + return http.request( + "post", + `SchoolBusiness/Import`, + { + data: formData + }, + { + headers: { + "Content-Type": "application/x-www-form-urlencoded" + }, + responseType: "blob" + } + ); } \ No newline at end of file diff --git a/src/layout/components/lay-navbar/index.vue b/src/layout/components/lay-navbar/index.vue index 07cb985..787c5b1 100644 --- a/src/layout/components/lay-navbar/index.vue +++ b/src/layout/components/lay-navbar/index.vue @@ -19,7 +19,7 @@ const { userName, userAvatar, avatarsStyle, - toggleSideBar + toggleSideBar, } = useNav(); @@ -45,7 +45,7 @@ const { - + @@ -55,20 +55,13 @@ const { - + diff --git a/src/layout/components/lay-notice/index.vue b/src/layout/components/lay-notice/index.vue index 55baa69..d250e20 100644 --- a/src/layout/components/lay-notice/index.vue +++ b/src/layout/components/lay-notice/index.vue @@ -8,11 +8,10 @@ const noticesNum = ref(0); const notices = ref(noticesData); const activeKey = ref(noticesData[0]?.key); -notices.value.map(v => (noticesNum.value += v.list.length)); +notices.value.map((v) => (noticesNum.value += v.list.length)); -const getLabel = computed( - () => item => - item.name + (item.list.length > 0 ? `(${item.list.length})` : "") +const getLabel = computed(() => (item) => + item.name + (item.list.length > 0 ? `(${item.list.length})` : "") ); @@ -23,7 +22,7 @@ const getLabel = computed( 'dropdown-badge', 'navbar-bg-hover', 'select-none', - Number(noticesNum) !== 0 && 'mr-[10px]' + Number(noticesNum) !== 0 && 'mr-[10px]', ]" > @@ -40,11 +39,7 @@ const getLabel = computed( class="dropdown-tabs" :style="{ width: notices.length === 0 ? '200px' : '330px' }" > - +