!141 fix(xispeak): 多部门用户部门ID匹配失败回退首个部门
* fix(xispeak): 多部门用户部门ID匹配失败回退首个部门 * style(bgpartymatter): 调整党委会页面标签列与查询列宽格式
This commit is contained in:
@@ -634,9 +634,12 @@ import {
|
||||
const departs = Array.isArray(loginInfo.departs) ? loginInfo.departs : [];
|
||||
if (userInfo.orgCode) {
|
||||
const dept = departs.find((item: any) => item.orgCode === userInfo.orgCode);
|
||||
return dept?.id || '';
|
||||
if (dept?.id) {
|
||||
return dept.id;
|
||||
}
|
||||
}
|
||||
return departs.length === 1 ? departs[0]?.id || '' : '';
|
||||
// orgCode 缺失或与 departs 不匹配(多部门用户)时回退到第一个部门,避免返回空导致 saveSubApprove 报错
|
||||
return departs.length > 0 ? departs[0]?.id || '' : '';
|
||||
}
|
||||
|
||||
function getCurrentAssignee() {
|
||||
|
||||
Reference in New Issue
Block a user