|
|
|
@ -208,6 +208,7 @@ import { |
|
|
|
submitEvaluate, |
|
|
|
} from '@/api/enterprise'; |
|
|
|
import { loadDict, getDictText } from '@/util/dictUtil'; |
|
|
|
import { alignNames } from '@/util/util'; |
|
|
|
|
|
|
|
const router = useRouter(); |
|
|
|
const route = useRoute(); |
|
|
|
@ -285,7 +286,7 @@ const getEnforcers = (data) => { |
|
|
|
const list = []; |
|
|
|
// 第一名执法人员 |
|
|
|
if (data.lawEnforcer) { |
|
|
|
list.push({ name: data.lawEnforcer, phone: data.lawEnforcerId || '' }); |
|
|
|
list.push({ name: alignNames(data.lawEnforcer), phone: data.lawEnforcerId || '' }); |
|
|
|
} |
|
|
|
// 第二名及之后:lawEnforcerTwo 和 lawEnforcerIdTwo 均为逗号分隔字符串 |
|
|
|
if (data.lawEnforcerTwo) { |
|
|
|
@ -293,22 +294,10 @@ const getEnforcers = (data) => { |
|
|
|
const phones = data.lawEnforcerIdTwo ? String(data.lawEnforcerIdTwo).split(',') : []; |
|
|
|
names.forEach((name, i) => { |
|
|
|
const trimmed = name.trim(); |
|
|
|
if (trimmed) list.push({ name: trimmed, phone: phones[i] ? phones[i].trim() : '' }); |
|
|
|
}); |
|
|
|
} |
|
|
|
// 数组形式(兼容其他字段名) |
|
|
|
const raw = data.enforcers || data.enforcerList || data.lawEnforcer2List || []; |
|
|
|
if (Array.isArray(raw) && raw.length) { |
|
|
|
raw.forEach(p => { |
|
|
|
if (typeof p === 'string') { |
|
|
|
list.push({ name: p, phone: '' }); |
|
|
|
} else { |
|
|
|
const name = p.name || p.userName || p.realName || ''; |
|
|
|
const phone = p.phone || p.mobile || p.tel || ''; |
|
|
|
if (name) list.push({ name, phone }); |
|
|
|
} |
|
|
|
if (trimmed) list.push({ name: alignNames(trimmed), phone: phones[i] ? phones[i].trim() : '' }); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
return list.filter(p => p.name); |
|
|
|
}; |
|
|
|
|
|
|
|
@ -549,7 +538,7 @@ const onSubmit = () => { |
|
|
|
line-height: 1.6; |
|
|
|
|
|
|
|
.enforcer-name { |
|
|
|
color: #666; |
|
|
|
color: #999; |
|
|
|
font-weight: 500; |
|
|
|
} |
|
|
|
|
|
|
|
|