|
|
@ -489,7 +489,7 @@ |
|
|
<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 :label="'所属角色'"> |
|
|
|
|
|
|
|
|
<el-form-item v-if="operatorData.flag !== '2'" :label="'所属角色'"> |
|
|
<el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px"> |
|
|
<el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for = "i in roleList" |
|
|
v-for = "i in roleList" |
|
|
@ -578,6 +578,7 @@ |
|
|
orderTypeSearch, // 获取采购类型 |
|
|
orderTypeSearch, // 获取采购类型 |
|
|
actionIQCInspection, // 开始检验 |
|
|
actionIQCInspection, // 开始检验 |
|
|
dataAcquisition, // 数据采集 |
|
|
dataAcquisition, // 数据采集 |
|
|
|
|
|
getResponsibleOperatorList, // 获取责任人列表 |
|
|
} from "@/api/qc/qc.js" |
|
|
} from "@/api/qc/qc.js" |
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
@ -1529,6 +1530,7 @@ |
|
|
adminName: '', |
|
|
adminName: '', |
|
|
roleName: '', |
|
|
roleName: '', |
|
|
roleId: '', |
|
|
roleId: '', |
|
|
|
|
|
userName: this.$store.state.user.name |
|
|
}, |
|
|
}, |
|
|
operatorModelFlag: false, |
|
|
operatorModelFlag: false, |
|
|
dataListSelections2: [], |
|
|
dataListSelections2: [], |
|
|
@ -1692,21 +1694,21 @@ |
|
|
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 = '' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 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()) |
|
|
// 拿到选中的人员编号 |
|
|
// 拿到选中的人员编号 |
|
|
let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';') |
|
|
let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';') |
|
|
getOperatorList(this.operatorData).then(({data}) => { |
|
|
|
|
|
|
|
|
getResponsibleOperatorList(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 => { |
|
|
@ -1745,7 +1747,7 @@ |
|
|
} else { |
|
|
} else { |
|
|
// 拿到选中的人员编号 |
|
|
// 拿到选中的人员编号 |
|
|
let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';') |
|
|
let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';') |
|
|
getOperatorList(this.operatorData).then(({data}) => { |
|
|
|
|
|
|
|
|
getResponsibleOperatorList(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 => { |
|
|
@ -1779,18 +1781,26 @@ |
|
|
} |
|
|
} |
|
|
if (this.operatorData.flag === '1') { |
|
|
if (this.operatorData.flag === '1') { |
|
|
for (let i = 0; i < this.dataListSelections2.length; i++) { |
|
|
for (let i = 0; i < this.dataListSelections2.length; i++) { |
|
|
this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName |
|
|
|
|
|
this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID |
|
|
|
|
|
|
|
|
if (!this.detailData.operator.split(';').includes(this.dataListSelections2[i].adminID)) { |
|
|
|
|
|
this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName |
|
|
|
|
|
this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (this.detailData.operator.charAt(0) === ';') { |
|
|
|
|
|
this.detailData.operator = this.detailData.operator.substring(1) |
|
|
|
|
|
this.detailData.operatorName = this.detailData.operatorName.substring(1) |
|
|
} |
|
|
} |
|
|
this.detailData.operator = this.detailData.operator.substring(1) |
|
|
|
|
|
this.detailData.operatorName = this.detailData.operatorName.substring(1) |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
for (let i = 0; i < this.dataListSelections2.length; i++) { |
|
|
for (let i = 0; i < this.dataListSelections2.length; i++) { |
|
|
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName |
|
|
|
|
|
this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID |
|
|
|
|
|
|
|
|
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) |
|
|
} |
|
|
} |
|
|
this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1) |
|
|
|
|
|
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1) |
|
|
|
|
|
} |
|
|
} |
|
|
this.operatorData = { |
|
|
this.operatorData = { |
|
|
flag: '', |
|
|
flag: '', |
|
|
@ -1800,6 +1810,7 @@ |
|
|
adminName: '', |
|
|
adminName: '', |
|
|
roleName: '', |
|
|
roleName: '', |
|
|
roleId: '', |
|
|
roleId: '', |
|
|
|
|
|
userName: this.$store.state.user.name |
|
|
} |
|
|
} |
|
|
this.operatorModelFlag = false |
|
|
this.operatorModelFlag = false |
|
|
}, |
|
|
}, |
|
|
|