【新增】 教师账号等专业根据服务器授权使用

This commit is contained in:
dlaren
2025-08-11 14:50:59 +08:00
parent ff82c544b2
commit 94396981fc
2 changed files with 13 additions and 8 deletions

View File

@@ -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 })
}
}
// 查询专业列表
export const getSpeciatListByTenantId = async () => {
return await request.get({ url: '/system/user/getSpeciatListByTenantId' })
}

View File

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