|
|
|
@ -109,7 +109,7 @@ |
|
|
|
<el-dialog title="检验项目" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="500px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="BU" prop="bu" :rules="rules.bu"> |
|
|
|
<el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 456px"> |
|
|
|
<el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" @change="getEquipmentNoList" style="width: 456px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in userBuList" |
|
|
|
:key = "i.buNo" |
|
|
|
@ -189,10 +189,15 @@ |
|
|
|
<el-input v-model="modalData.itemSamplingQuantity" type="number" style="width: 143px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="抽样比例%"> |
|
|
|
<el-input v-model="modalData.defaultSamplingProportion" type="number" style="width: 95px"></el-input> |
|
|
|
<el-input v-model="modalData.defaultSamplingProportion" type="number" style="width: 143px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label=" " style="margin-left: 30px"> |
|
|
|
<el-checkbox v-model="modalData.collectionFlag" true-label="Y">采集标记</el-checkbox> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="采集数据来源"> |
|
|
|
<el-select clearable v-model="modalData.collectionSource" style="width: 105px"> |
|
|
|
<el-select multiple v-model="modalData.collectionSourceList" style="width: 221px"> |
|
|
|
<el-option label="值0" value="value0"></el-option> |
|
|
|
<el-option label="值1" value="value1"></el-option> |
|
|
|
<el-option label="值2" value="value2"></el-option> |
|
|
|
@ -205,8 +210,24 @@ |
|
|
|
<el-option label="值9" value="value9"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-checkbox v-model="modalData.collectionFlag" true-label="Y">采集标记</el-checkbox> |
|
|
|
<el-form-item label="采集数据方式"> |
|
|
|
<el-select multiple v-model="modalData.collectionMethodList" style="width: 221px"> |
|
|
|
<el-option label="PLC" value="plc"></el-option> |
|
|
|
<el-option label="文件" value="file"></el-option> |
|
|
|
<el-option label="图片" value="image"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="采集条件路径"> |
|
|
|
<el-select multiple v-model="modalData.collectionConditionList" style="width: 456px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in equipmentNoList" |
|
|
|
:key = "i.equipmentNo" |
|
|
|
:label = "i.equipmentNo" |
|
|
|
:value = "i.equipmentNo"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
@ -283,7 +304,8 @@ |
|
|
|
qcItemDelete, // 删除项目 |
|
|
|
inspectionTypeSearch, // 查询检验类型 |
|
|
|
queryMethodList, // 查询检验方法 |
|
|
|
getSiteAndBuByUserName |
|
|
|
getSiteAndBuByUserName, |
|
|
|
getEquipmentNoList, // 获取采集条件路径 |
|
|
|
} from "@/api/qc/qc.js" |
|
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
|
@ -362,7 +384,12 @@ |
|
|
|
samplingLevelDesc: '', |
|
|
|
defaultSamplingProportion: '', |
|
|
|
collectionFlag: '', |
|
|
|
collectionSource: '' |
|
|
|
collectionSource: '', |
|
|
|
collectionSourceList: [], |
|
|
|
collectionMethod: '', |
|
|
|
collectionMethodList: [], |
|
|
|
collectionCondition: '', |
|
|
|
collectionConditionList: [] |
|
|
|
}, |
|
|
|
// 检验项目展示标头 |
|
|
|
columnList: [ |
|
|
|
@ -785,6 +812,7 @@ |
|
|
|
}, |
|
|
|
], |
|
|
|
userBuList: [], |
|
|
|
equipmentNoList: [], |
|
|
|
authSearch: false, |
|
|
|
authSave: false, |
|
|
|
authUpdate: false, |
|
|
|
@ -829,6 +857,18 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取采集条件路径 |
|
|
|
getEquipmentNoList () { |
|
|
|
let tempData = { |
|
|
|
bu: this.modalData.bu |
|
|
|
} |
|
|
|
getEquipmentNoList(tempData).then(({data}) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.equipmentNoList = data.rows |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取基础数据列表S |
|
|
|
getBaseList (val,type) { |
|
|
|
this.tagNo = val |
|
|
|
@ -940,8 +980,14 @@ |
|
|
|
samplingLevelDesc: '', |
|
|
|
defaultSamplingProportion: '', |
|
|
|
collectionFlag: '', |
|
|
|
collectionSource: '' |
|
|
|
collectionSource: '', |
|
|
|
collectionSourceList: [], |
|
|
|
collectionMethod: '', |
|
|
|
collectionMethodList: [], |
|
|
|
collectionCondition: '', |
|
|
|
collectionConditionList: [] |
|
|
|
} |
|
|
|
this.getEquipmentNoList() |
|
|
|
this.modalDisableFlag = false |
|
|
|
this.modalFlag = true |
|
|
|
}, |
|
|
|
@ -971,8 +1017,14 @@ |
|
|
|
samplingLevelDesc: row.samplingLevelDesc, |
|
|
|
defaultSamplingProportion: row.defaultSamplingProportion, |
|
|
|
collectionFlag: row.collectionFlag, |
|
|
|
collectionSource: row.collectionSource |
|
|
|
collectionSource: row.collectionSource, |
|
|
|
collectionSourceList: row.collectionSource == null || row.collectionSource === '' ? [] : row.collectionSource.split(','), |
|
|
|
collectionMethod: row.collectionMethod, |
|
|
|
collectionMethodList: row.collectionMethod == null || row.collectionMethod === '' ? [] : row.collectionMethod.split(','), |
|
|
|
collectionCondition: row.collectionCondition, |
|
|
|
collectionConditionList: row.collectionCondition == null || row.collectionCondition === '' ? [] : row.collectionCondition.split(','), |
|
|
|
} |
|
|
|
this.getEquipmentNoList() |
|
|
|
this.modalDisableFlag = true |
|
|
|
this.modalFlag = true |
|
|
|
}, |
|
|
|
@ -1032,6 +1084,25 @@ |
|
|
|
this.$message.warning('请选择检验水平!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.collectionFlag === 'Y' && (this.modalData.collectionSourceList == null || this.modalData.collectionSourceList.length === 0)) { |
|
|
|
this.$message.warning('请选择采集数据来源!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.collectionFlag === 'Y' && (this.modalData.collectionMethodList == null || this.modalData.collectionMethodList.length === 0)) { |
|
|
|
this.$message.warning('请选择采集数据方式!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.collectionFlag === 'Y' && (this.modalData.collectionConditionList == null || this.modalData.collectionConditionList.length === 0)) { |
|
|
|
this.$message.warning('请选择采集条件路径!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.collectionFlag === 'Y' && (this.modalData.collectionSourceList.length !== this.modalData.collectionMethodList.length || this.modalData.collectionSourceList.length !== this.modalData.collectionConditionList.length || this.modalData.collectionMethodList.length !== this.modalData.collectionConditionList.length)) { |
|
|
|
this.$message.warning('采集数据的来源、方式、条件路径不对应!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.modalData.collectionSource = this.modalData.collectionSourceList.join(',') |
|
|
|
this.modalData.collectionMethod = this.modalData.collectionMethodList.join(',') |
|
|
|
this.modalData.collectionCondition = this.modalData.collectionConditionList.join(',') |
|
|
|
if (this.modalData.flag === '1') { |
|
|
|
qcItemSave(this.modalData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
|