|
|
@ -734,8 +734,8 @@ |
|
|
<el-dialog title="人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px"> |
|
|
<el-dialog title="人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px"> |
|
|
<div class="rq"> |
|
|
<div class="rq"> |
|
|
<el-form :inline="true" label-position="top" :model="operatorData"> |
|
|
<el-form :inline="true" label-position="top" :model="operatorData"> |
|
|
<el-form-item v-if="operatorData.flag !== '2'" :label="'所属角色'"> |
|
|
|
|
|
<el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px"> |
|
|
|
|
|
|
|
|
<el-form-item :label="'所属角色'"> |
|
|
|
|
|
<el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px" @change="getOperatorList2"> |
|
|
<el-option v-for="i in roleList" :key="i.roleId" :label="i.roleName" :value="i.roleId"> |
|
|
<el-option v-for="i in roleList" :key="i.roleId" :label="i.roleName" :value="i.roleId"> |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
@ -852,7 +852,6 @@ import { |
|
|
searchSeqInfo, // 派工单号查询 |
|
|
searchSeqInfo, // 派工单号查询 |
|
|
actionFAIInspection, // 开始检验 |
|
|
actionFAIInspection, // 开始检验 |
|
|
dataAcquisition, // 数据采集 |
|
|
dataAcquisition, // 数据采集 |
|
|
getResponsibleOperatorList, // 获取责任人列表 |
|
|
|
|
|
getFAIItemObjectList, // 查询项目设备 |
|
|
getFAIItemObjectList, // 查询项目设备 |
|
|
dataAcquisitionByItem, // 根据项目数据采集 |
|
|
dataAcquisitionByItem, // 根据项目数据采集 |
|
|
cancelApproval2, // 取消审核 |
|
|
cancelApproval2, // 取消审核 |
|
|
@ -2572,7 +2571,18 @@ export default { |
|
|
getResponsiblePersonList() { |
|
|
getResponsiblePersonList() { |
|
|
this.operatorData.flag = '2' |
|
|
this.operatorData.flag = '2' |
|
|
this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo |
|
|
this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo |
|
|
|
|
|
|
|
|
|
|
|
if (this.roleList.length > 0) { |
|
|
|
|
|
let filterList = this.roleList.filter( |
|
|
|
|
|
(item) => item.roleName === '机修人员' |
|
|
|
|
|
) |
|
|
|
|
|
if (filterList.length > 0) { |
|
|
|
|
|
this.operatorData.roleId = filterList[0].roleId |
|
|
|
|
|
} else { |
|
|
|
|
|
this.operatorData.roleId = this.roleList[0].roleId |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
this.operatorData.roleId = '' |
|
|
|
|
|
} |
|
|
// 先清空缓存选中 |
|
|
// 先清空缓存选中 |
|
|
this.$nextTick(() => this.$refs.operatorTable.clearSelection()) |
|
|
this.$nextTick(() => this.$refs.operatorTable.clearSelection()) |
|
|
// 拿到选中的人员编号 |
|
|
// 拿到选中的人员编号 |
|
|
@ -2581,7 +2591,7 @@ export default { |
|
|
? '' |
|
|
? '' |
|
|
: this.detailData.responsiblePerson |
|
|
: this.detailData.responsiblePerson |
|
|
).split(';') |
|
|
).split(';') |
|
|
getResponsibleOperatorList(this.operatorData).then(({ data }) => { |
|
|
|
|
|
|
|
|
getOperatorList(this.operatorData).then(({ data }) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.operatorList = data.rows |
|
|
this.operatorList = data.rows |
|
|
this.operatorList.forEach((val) => { |
|
|
this.operatorList.forEach((val) => { |
|
|
@ -2630,7 +2640,7 @@ export default { |
|
|
? '' |
|
|
? '' |
|
|
: this.detailData.responsiblePerson |
|
|
: this.detailData.responsiblePerson |
|
|
).split(';') |
|
|
).split(';') |
|
|
getResponsibleOperatorList(this.operatorData).then(({ data }) => { |
|
|
|
|
|
|
|
|
getOperatorList(this.operatorData).then(({ data }) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.operatorList = data.rows |
|
|
this.operatorList = data.rows |
|
|
this.operatorList.forEach((val) => { |
|
|
this.operatorList.forEach((val) => { |
|
|
@ -2660,7 +2670,7 @@ export default { |
|
|
|
|
|
|
|
|
// 确认多选协同人员 |
|
|
// 确认多选协同人员 |
|
|
confirmOperator() { |
|
|
confirmOperator() { |
|
|
if (this.dataListSelections2.length === 0) { |
|
|
|
|
|
|
|
|
if (this.dataListSelections2.length === 0 && this.operatorData.flag === '1') { |
|
|
this.$message.warning('请勾选人员!') |
|
|
this.$message.warning('请勾选人员!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
@ -2687,28 +2697,14 @@ export default { |
|
|
this.detailData.operatorName.substring(1) |
|
|
this.detailData.operatorName.substring(1) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
const adminIds = [] |
|
|
|
|
|
const adminNames = [] |
|
|
for (let i = 0; i < this.dataListSelections2.length; i++) { |
|
|
for (let i = 0; i < this.dataListSelections2.length; i++) { |
|
|
if ( |
|
|
|
|
|
!this.detailData.responsiblePerson |
|
|
|
|
|
.split(';') |
|
|
|
|
|
.includes(this.dataListSelections2[i].adminID) |
|
|
|
|
|
) { |
|
|
|
|
|
this.detailData.responsiblePersonName = |
|
|
|
|
|
this.detailData.responsiblePersonName + |
|
|
|
|
|
';' + |
|
|
|
|
|
this.dataListSelections2[i].adminName |
|
|
|
|
|
this.detailData.responsiblePerson = |
|
|
|
|
|
this.detailData.responsiblePerson + |
|
|
|
|
|
';' + |
|
|
|
|
|
this.dataListSelections2[i].adminID |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (this.detailData.responsiblePerson.charAt(0) === ';') { |
|
|
|
|
|
this.detailData.responsiblePerson = |
|
|
|
|
|
this.detailData.responsiblePerson.substring(1) |
|
|
|
|
|
this.detailData.responsiblePersonName = |
|
|
|
|
|
this.detailData.responsiblePersonName.substring(1) |
|
|
|
|
|
|
|
|
adminIds.push(this.dataListSelections2[i].adminID) |
|
|
|
|
|
adminNames.push(this.dataListSelections2[i].adminName) |
|
|
} |
|
|
} |
|
|
|
|
|
this.detailData.responsiblePerson = adminIds.join(';') |
|
|
|
|
|
this.detailData.responsiblePersonName = adminNames.join(';') |
|
|
} |
|
|
} |
|
|
this.operatorData = { |
|
|
this.operatorData = { |
|
|
flag: '', |
|
|
flag: '', |
|
|
|