|
|
|
@ -556,7 +556,7 @@ |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 执行人员清单 --> |
|
|
|
<el-dialog title="执行人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px"> |
|
|
|
<el-dialog :title="isSingleSelectOperator ? '选择到达人员' : '执行人员清单'" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px"> |
|
|
|
<div class="rq"> |
|
|
|
<el-form :inline="true" label-position="top" :model="operatorData"> |
|
|
|
<el-form-item :label="'所属角色'"> |
|
|
|
@ -619,6 +619,7 @@ |
|
|
|
<el-dialog title="到达" :close-on-click-modal="false" v-drag :visible.sync="chooseReachModelFlag" width="410px"> |
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
<el-form-item v-if="reachData.buNo === '03-RFID'" label="到达人员"> |
|
|
|
<span slot="label" @click="openSingleOperatorSelect()"><a>选择到达人员</a></span> |
|
|
|
<el-input v-model="saveData.operatorName" style="width: 389px" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-else> |
|
|
|
@ -1263,6 +1264,7 @@ export default { |
|
|
|
roleName: '', |
|
|
|
}, |
|
|
|
operatorModelFlag: false, |
|
|
|
isSingleSelectOperator: false, // 标识是否为单选模式 |
|
|
|
operatorList: [], |
|
|
|
roleList: [], |
|
|
|
assistantModelFlag: false, |
|
|
|
@ -2280,11 +2282,38 @@ export default { |
|
|
|
|
|
|
|
// 多选 |
|
|
|
selectionChangeHandle2 (val) { |
|
|
|
// 如果是单选模式,只保留最后一个选中的项 |
|
|
|
if (this.isSingleSelectOperator && val.length > 1) { |
|
|
|
// 清除之前的选择 |
|
|
|
this.$refs.operatorTable.clearSelection() |
|
|
|
// 只选中最后一个 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.operatorTable.toggleRowSelection(val[val.length - 1], true) |
|
|
|
}) |
|
|
|
this.dataListSelections2 = [val[val.length - 1]] |
|
|
|
} else { |
|
|
|
this.dataListSelections2 = val |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 确认多选机修人员 |
|
|
|
confirmOperator () { |
|
|
|
// 如果是单选模式(03-RFID到达人员选择) |
|
|
|
if (this.isSingleSelectOperator) { |
|
|
|
if (!this.dataListSelections2 || this.dataListSelections2.length === 0) { |
|
|
|
this.$message.warning('请选择到达人员!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.dataListSelections2.length > 1) { |
|
|
|
this.$message.warning('只能选择一个到达人员!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.saveData.operator = this.dataListSelections2[0].adminID |
|
|
|
this.saveData.operatorName = this.dataListSelections2[0].adminName |
|
|
|
this.operatorModelFlag = false |
|
|
|
this.isSingleSelectOperator = false |
|
|
|
} else { |
|
|
|
// 多选模式(原有的执行人员选择) |
|
|
|
this.saveData.operatorName = '' |
|
|
|
this.saveData.operator = '' |
|
|
|
for (let i = 0; i < this.dataListSelections2.length; i++) { |
|
|
|
@ -2294,6 +2323,7 @@ export default { |
|
|
|
this.saveData.operator = this.saveData.operator.substring(1) |
|
|
|
this.saveData.operatorName = this.saveData.operatorName.substring(1) |
|
|
|
this.operatorModelFlag = false |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 增加协助人弹窗 |
|
|
|
@ -2593,14 +2623,9 @@ export default { |
|
|
|
chooseReachOperator (row) { |
|
|
|
this.saveData.site = row.site |
|
|
|
this.saveData.buNo = row.buNo |
|
|
|
// 只有 03-RFID BU 才固定为计划执行人员 |
|
|
|
if (row.buNo === '03-RFID') { |
|
|
|
this.saveData.operator = row.planOperator || '' |
|
|
|
this.saveData.operatorName = row.planOperatorName || '' |
|
|
|
} else { |
|
|
|
// 03-RFID BU 也可以选择不固定为计划执行人员 |
|
|
|
this.saveData.operator = '' |
|
|
|
this.saveData.operatorName = '' |
|
|
|
} |
|
|
|
this.operatorData.bu = row.site + '_' + row.buNo |
|
|
|
this.reachData = row |
|
|
|
this.chooseReachModelFlag = true |
|
|
|
@ -2650,6 +2675,25 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 打开单选人员选择对话框(用于03-RFID) |
|
|
|
openSingleOperatorSelect () { |
|
|
|
this.isSingleSelectOperator = true // 设置为单选模式 |
|
|
|
this.operatorData.bu = this.saveData.site + '_' + this.saveData.buNo |
|
|
|
// 先清空缓存选中 |
|
|
|
this.$nextTick(() => this.$refs.operatorTable.clearSelection()) |
|
|
|
// 查询人员 |
|
|
|
getOperatorList(this.operatorData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.operatorList = data.rows |
|
|
|
this.operatorModelFlag = true |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 执行 |
|
|
|
reportModal (row) { |
|
|
|
this.saveData = { |
|
|
|
|