🐛 业务部门下拉展示所属公司,并映射项目旧平台公司ID

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-09 12:44:44 +08:00
co-authored by Cursor
parent d3ba0ce38b
commit 748214a4b6
4 changed files with 119 additions and 42 deletions
+3 -13
View File
@@ -1094,6 +1094,7 @@ import {
getDetail as getCustomerArchiveDetail,
} from '@/api/vehicle/customer-archive';
import { getBusinessDeptSelect, getPlatformCompanySelect } from '@/api/system/dept';
import { normalizeBusinessDeptOptions } from '@/utils/dept';
import { getDictionary as getSystemDictionary } from '@/api/system/dict';
import { getDictionary as getBizDictionary } from '@/api/system/dictbiz';
import { getList as getUserList } from '@/api/system/user';
@@ -2979,19 +2980,8 @@ export default {
loadDeptOptions() {
getBusinessDeptSelect()
.then(res => {
const bizList = res.data.data || [];
// 仅展示「是否业务部门=是」的本级部门,扁平下拉
this.deptOptions = bizList
.map(item => {
const value = item.id == null || item.id === '' ? '' : String(item.id);
const label = item.deptName || item.fullName || item.title || item.name || value;
return {
label,
rawLabel: label,
value,
};
})
.filter(item => item.value);
// 仅展示「是否业务部门=是」;同名部门追加上级组织名区分
this.deptOptions = normalizeBusinessDeptOptions(res.data.data || []);
this.fillDefaultBusinessDept();
this.ensureCurrentBusinessDeptOption();
})