|
|
@ -175,7 +175,7 @@ |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> |
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> |
|
|
<el-form-item prop="tpEngineerId" :rules="rules.tpEngineerId"> |
|
|
<el-form-item prop="tpEngineerId" :rules="rules.tpEngineerId"> |
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(2005)"><a herf="#">TP工程师/TP Engineer</a></span> |
|
|
|
|
|
|
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(2005)"><a herf="#">TP工程师/CS/TP Engineer/CS</a></span> |
|
|
<el-input v-model="modalData.tpEngineerId" @blur="tpEngineerBlur(2005)" style="width: 120px"></el-input> |
|
|
<el-input v-model="modalData.tpEngineerId" @blur="tpEngineerBlur(2005)" style="width: 120px"></el-input> |
|
|
<el-input v-model="modalData.tpEngineerName" disabled style="width: 293px"></el-input> |
|
|
<el-input v-model="modalData.tpEngineerName" disabled style="width: 293px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
@ -3377,22 +3377,22 @@ |
|
|
handleSelectionChange(val) { |
|
|
handleSelectionChange(val) { |
|
|
// val 只包含当前数据源中被选中的行 |
|
|
// val 只包含当前数据源中被选中的行 |
|
|
// 需要合并历史选择(selectionDelegateAccess)中不在当前数据源的人员 |
|
|
// 需要合并历史选择(selectionDelegateAccess)中不在当前数据源的人员 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 当前数据源中的所有人员编码 |
|
|
// 当前数据源中的所有人员编码 |
|
|
let currentDataKeys = this.baseDelegateAccessList.map(item => item.delegateAccess); |
|
|
let currentDataKeys = this.baseDelegateAccessList.map(item => item.delegateAccess); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 保留历史选择中不在当前数据源的人员(这些人员用户无法在当前对话框中取消选择) |
|
|
// 保留历史选择中不在当前数据源的人员(这些人员用户无法在当前对话框中取消选择) |
|
|
let historyNotInCurrent = this.selectionDelegateAccess.filter(item => |
|
|
|
|
|
|
|
|
let historyNotInCurrent = this.selectionDelegateAccess.filter(item => |
|
|
!currentDataKeys.includes(item.delegateAccess) |
|
|
!currentDataKeys.includes(item.delegateAccess) |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 合并:历史人员(不在当前数据源)+ 当前选中的人员 |
|
|
// 合并:历史人员(不在当前数据源)+ 当前选中的人员 |
|
|
let merged = [...historyNotInCurrent, ...val]; |
|
|
let merged = [...historyNotInCurrent, ...val]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 去重(虽然理论上不会重复) |
|
|
// 去重(虽然理论上不会重复) |
|
|
let map = new Map(); |
|
|
let map = new Map(); |
|
|
merged.forEach(item => map.set(item.delegateAccess, item)); |
|
|
merged.forEach(item => map.set(item.delegateAccess, item)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.selectionDelegateAccess2 = Array.from(map.values()); |
|
|
this.selectionDelegateAccess2 = Array.from(map.values()); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|