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

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
+37 -7
View File
@@ -9,30 +9,32 @@ export function listOffice(query) {
})
}
// 新增教研室
export function addOffice(data) {
// 新增教研室(syncDept=true 时同步创建组织部门)
export function addOffice(data, syncDept) {
return request({
url: '/jys/office/add',
method: 'post',
params: syncDept === undefined ? {} : { syncDept },
data: data
})
}
// 更新教研室
export function updateOffice(data) {
// 更新教研室(syncDeptName=true 时将名称/序号同步到关联部门)
export function updateOffice(data, syncDeptName) {
return request({
url: '/jys/office/update',
method: 'post',
params: syncDeptName === undefined ? {} : { syncDeptName },
data: data
})
}
// 停用教研室(jysdh 必传,query 参数)
export function disableOffice(jysdh) {
// 停用教研室(jysdh 必传,query 参数;syncDept=true 时联动停用部门)
export function disableOffice(jysdh, syncDept) {
return request({
url: '/jys/office/disable',
method: 'post',
params: { jysdh: jysdh }
params: syncDept === undefined ? { jysdh } : { jysdh, syncDept }
})
}
@@ -44,3 +46,31 @@ export function downloadOfficeTemplate() {
responseType: 'blob'
})
}
// 单个教研室补建/对齐组织部门
export function syncOfficeDept(jysdh) {
return request({
url: '/jys/office/sync-dept',
method: 'post',
params: { jysdh }
})
}
// 对齐组织部门:批量创建/复用(ids 不传 = 全部教研室)
export function alignDepts(ids) {
return request({
url: '/jys/org/align-dept',
method: 'post',
data: ids ? { ids } : {},
timeout: 120000
})
}
// 一键对齐:先部门后账号(幂等,返回 { dept, user } 两环节结果)
export function alignApply() {
return request({
url: '/jys/org/align-apply',
method: 'post',
timeout: 180000
})
}