新增教研室和教员的时候,同步创建部门和教员账号

This commit is contained in:
2026-09-17 12:00:44 +08:00
parent f7299c36e8
commit 95a3571c69
25 changed files with 1452 additions and 50 deletions
+54
View File
@@ -73,3 +73,57 @@ export function updateTeacherAttribute(data) {
data
})
}
/** 下载教员导入模板 GET /download/jy */
export function downloadTeacherTemplate() {
return request({
url: '/download/jy',
method: 'get',
responseType: 'blob'
})
}
/** 导出教员 Excel GET /jys/teacher/export */
export function exportTeacher(params) {
return request({
url: '/jys/teacher/export',
method: 'get',
params,
responseType: 'blob'
})
}
/** 导入教员 Excel POST /jys/teacher/import */
export function importTeacher(file) {
const formData = new FormData()
formData.append('file', file)
return request({
url: '/jys/teacher/import',
method: 'post',
data: formData,
headers: { 'Content-Type': 'multipart/form-data' },
timeout: 60000
})
}
/** 单个教员补建/对齐系统账号 POST /jys/teacher/sync-user */
export function syncTeacherUser(jybh, params) {
return request({
url: '/jys/teacher/sync-user',
method: 'post',
params: Object.assign({ jybh }, params || {})
})
}
/**
* 对齐到用户表:为无账号教员批量建账号
* POST /jys/teacher/align-user body: { ids }(不传 = 全部无账号教员)
*/
export function alignTeacherUsers(ids) {
return request({
url: '/jys/teacher/align-user',
method: 'post',
data: ids && ids.length ? { ids } : {},
timeout: 180000
})
}