|
|
|
|
@ -67,11 +67,11 @@ |
|
|
|
|
</template> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-form-item :prop="`tableData[${scope.$index}].device`" :rules="formRules.device"> |
|
|
|
|
<el-select v-model="scope.row.device" clearable filterable> |
|
|
|
|
<el-select v-model="scope.row.device" clearable filterable @change="changeDevice(scope.$index)"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in scope.row.deviceOptions" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.name" |
|
|
|
|
:label="`${item.deviceName}/${item.deviceCode}`" |
|
|
|
|
:value="item.id" |
|
|
|
|
></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
@ -310,6 +310,7 @@ export default { |
|
|
|
|
// 切换作业中心 |
|
|
|
|
changeWorkCenter(index) { |
|
|
|
|
this.form.batchNo = ''; |
|
|
|
|
this.form.tableData[index].device = '' |
|
|
|
|
console.log(this.form.tableData[index]); |
|
|
|
|
this.getTankList(this.form.tableData[index].wcId, index); |
|
|
|
|
this.getEquipmentList(this.form.tableData[index].wcId, index) |
|
|
|
|
@ -321,9 +322,13 @@ export default { |
|
|
|
|
}, |
|
|
|
|
getEquipmentList(val, index) { |
|
|
|
|
getEquipmentList({ workstationId: val ? val : '' }).then(res => { |
|
|
|
|
this.form.tableData[index].deviceOptions = res.data.data; |
|
|
|
|
this.form.tableData[index].deviceOptions = res.data.data.records; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
changeDevice(index){ |
|
|
|
|
let select = this.form.tableData[index].deviceOptions.filter(row => row.id==this.form.tableData[index].device) |
|
|
|
|
this.form.tableData[index].deviceName = select[0].deviceName |
|
|
|
|
}, |
|
|
|
|
getWorkCenterList() { |
|
|
|
|
getWorkCenterList().then(res => { |
|
|
|
|
this.wcData = res.data.data || []; |
|
|
|
|
|