From 94396981fcaaeceffc8a4bee2ab11ef430651160 Mon Sep 17 00:00:00 2001 From: dlaren Date: Mon, 11 Aug 2025 14:50:59 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91=20?= =?UTF-8?q?=E6=95=99=E5=B8=88=E8=B4=A6=E5=8F=B7=E7=AD=89=E4=B8=93=E4=B8=9A?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E6=9C=8D=E5=8A=A1=E5=99=A8=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/exam/specialty/index.ts | 19 ++++++++++++------- src/views/exam/teacher/TeacherForm.vue | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/api/exam/specialty/index.ts b/src/api/exam/specialty/index.ts index 12b25a5..bb0de7f 100644 --- a/src/api/exam/specialty/index.ts +++ b/src/api/exam/specialty/index.ts @@ -12,32 +12,32 @@ export interface SpecialtyVO { createTime: Date } -// 查询部门列表 +// 查询专业列表 export const getSpecialtyPage = async (params: PageParam) => { return await request.get({ url: '/exam/specialty/list', params }) } -// 查询部门列表 +// 查询专业列表 export const getSpecialtyPart = async () => { return await request.get({ url: '/exam/specialty/part' }) } -// 查询部门详情 +// 查询专业详情 export const getSpecialty = async (id: number) => { return await request.get({ url: '/exam/specialty/' + id }) } -// 新增部门 +// 新增专业 export const createSpecialty = async (data: any) => { return await request.post({ url: '/exam/specialty', data: data }) } -// 修改部门 +// 修改专业 export const updateSpecialty = async (params: any) => { return await request.put({ url: '/exam/specialty', data: params }) } -// 删除部门 +// 删除专业 export const deleteSpecialty = async (id: number) => { return await request.delete({ url: '/exam/specialty/' + id }) } @@ -47,4 +47,9 @@ export const getSpecialtyRole = async (id: number) => { } export const setSpecialtyRole = async (data) => { return await request.post({ url: '/exam/specialty/setRole', data:data }) -} \ No newline at end of file +} + +// 查询专业列表 +export const getSpeciatListByTenantId = async () => { + return await request.get({ url: '/system/user/getSpeciatListByTenantId' }) +} diff --git a/src/views/exam/teacher/TeacherForm.vue b/src/views/exam/teacher/TeacherForm.vue index 22404ba..d23b4b9 100644 --- a/src/views/exam/teacher/TeacherForm.vue +++ b/src/views/exam/teacher/TeacherForm.vue @@ -184,7 +184,7 @@ const open = async (type: string, id?: number) => { formType.value = type resetForm() // 加载 Menu 列表。注意,必须放在前面,不然下面 setChecked 没数据节点 - menuOptions.value = handleTree(await SpecialtyApi.getSpecialtyPart()) + menuOptions.value = handleTree(await SpecialtyApi.getSpeciatListByTenantId()) // 修改时,设置数据 if (id) {