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) {