!141 fix(xispeak): 多部门用户部门ID匹配失败回退首个部门

* fix(xispeak): 多部门用户部门ID匹配失败回退首个部门
* style(bgpartymatter): 调整党委会页面标签列与查询列宽格式
This commit is contained in:
wsm
2026-08-06 08:53:44 +00:00
parent 42a3418942
commit 04d25adfff
5 changed files with 103 additions and 11 deletions
@@ -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() {