|
|
@@ -139,7 +139,6 @@
|
|
|
multiple
|
|
|
filterable
|
|
|
@change="executeIdListChange"
|
|
|
-
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in executorList"
|
|
|
@@ -535,23 +534,58 @@
|
|
|
<template v-slot:toolName="{ row, $index }">
|
|
|
<el-link :underline="false" style="cursor: pointer">
|
|
|
<div class="ele-cell">
|
|
|
- <div @click="handleAdd(row, $index)">
|
|
|
+ <div @click="handleAdd(row, '', 'toolName')">
|
|
|
+ {{
|
|
|
+ row.tools && row.tools.length > 0
|
|
|
+ ? row.tools.map((i) => i.toolName).join(',')
|
|
|
+ : '请选择'
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ <i
|
|
|
+ v-if="row.tools.length == 0"
|
|
|
+ class="el-icon-arrow-down"
|
|
|
+ @click="handleAdd(row, '', 'toolName')"
|
|
|
+ ></i>
|
|
|
+ <i
|
|
|
+ v-else
|
|
|
+ class="el-icon-close"
|
|
|
+ @click="clearTool(row, '', 'toolName')"
|
|
|
+ ></i>
|
|
|
+ </div>
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ <template v-slot:substanceName="{ row, $index }">
|
|
|
+ <el-link :underline="false" style="cursor: pointer">
|
|
|
+ <div class="ele-cell">
|
|
|
+ <div @click="handleAdd(row, $index, 'substanceName')">
|
|
|
{{ row.substanceName || '请选择' }}
|
|
|
</div>
|
|
|
<i
|
|
|
v-if="!row.substanceName"
|
|
|
class="el-icon-arrow-down"
|
|
|
- @click="handleAdd(row, $index)"
|
|
|
+ @click="handleAdd(row, $index, 'substanceName')"
|
|
|
></i>
|
|
|
<i
|
|
|
v-else
|
|
|
class="el-icon-close"
|
|
|
- @click="clearTool(row, $index)"
|
|
|
+ @click="clearTool(row, $index, 'substanceName')"
|
|
|
></i>
|
|
|
</div>
|
|
|
</el-link>
|
|
|
</template>
|
|
|
<template v-slot:toolCodes="{ row }">
|
|
|
+ <el-input
|
|
|
+ :value="
|
|
|
+ row.tools && row.tools.length > 0
|
|
|
+ ? row.tools.map((i) => i.toolCode).join(',')
|
|
|
+ : ''
|
|
|
+ "
|
|
|
+ placeholder="自动带出"
|
|
|
+ disabled
|
|
|
+ size="mini"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ <template v-slot:substanceCode="{ row }">
|
|
|
<el-input
|
|
|
:value="row.substanceCode"
|
|
|
placeholder="自动带出"
|
|
|
@@ -892,15 +926,29 @@
|
|
|
minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
- prop: 'toolName',
|
|
|
+ prop: 'substanceName',
|
|
|
label: '设备名称',
|
|
|
align: 'center',
|
|
|
+ slot: 'substanceName',
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'substanceCode',
|
|
|
+ label: '设备编码',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'substanceCode',
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'toolName',
|
|
|
+ label: '工具名称',
|
|
|
+ align: 'center',
|
|
|
slot: 'toolName',
|
|
|
minWidth: 110
|
|
|
},
|
|
|
{
|
|
|
prop: 'toolCodes',
|
|
|
- label: '设备编码',
|
|
|
+ label: '工具编码',
|
|
|
align: 'center',
|
|
|
slot: 'toolCodes',
|
|
|
minWidth: 110
|
|
|
@@ -1192,6 +1240,7 @@
|
|
|
this.addForm.deviceId = info.id;
|
|
|
this.addForm.deviceCode = info.code;
|
|
|
this.addForm.deviceName = info.name;
|
|
|
+ this.addForm.detailList=[]
|
|
|
}
|
|
|
},
|
|
|
// 添加
|
|
|
@@ -1242,15 +1291,31 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- handleAdd(row, index) {
|
|
|
+ // handleAdd(row, index) {
|
|
|
+ // this.currentRow = row;
|
|
|
+ // this.currentIndex = index;
|
|
|
+ // this.$refs.bindSubstanceRef.open(
|
|
|
+ // this.addForm.deviceId,
|
|
|
+ // this.addForm.deviceName,
|
|
|
+ // this.addForm.deviceCode
|
|
|
+ // );
|
|
|
+ // },
|
|
|
+
|
|
|
+
|
|
|
+ handleAdd(row, index,type) {
|
|
|
this.currentRow = row;
|
|
|
this.currentIndex = index;
|
|
|
- this.$refs.bindSubstanceRef.open(
|
|
|
- this.addForm.deviceId,
|
|
|
- this.addForm.deviceName,
|
|
|
- this.addForm.deviceCode
|
|
|
- );
|
|
|
+ if (type=='substanceName') {
|
|
|
+ this.$refs.bindSubstanceRef.open(
|
|
|
+ this.formData.deviceId,
|
|
|
+ this.formData.deviceName,
|
|
|
+ this.formData.deviceCode
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ this.$refs.toolModalRef.open(row.toolCodes);
|
|
|
+ }
|
|
|
},
|
|
|
+
|
|
|
bindSubstanceListOpen() {
|
|
|
this.currentIndex = 9999;
|
|
|
this.$refs.bindSubstanceRef.open(
|
|
|
@@ -1276,7 +1341,7 @@
|
|
|
minValue: item.minValue,
|
|
|
paramType: 7,
|
|
|
paramValue: item.paramValue,
|
|
|
- iotId:item.iotId,
|
|
|
+ iotId: item.iotId,
|
|
|
remark: '',
|
|
|
symbol: null,
|
|
|
tools: [],
|
|
|
@@ -1308,9 +1373,13 @@
|
|
|
},
|
|
|
// 清空工具
|
|
|
clearTool(row, index) {
|
|
|
- substanceKey.forEach((key) => {
|
|
|
- this.$set(this.addForm.detailList[index], key, '');
|
|
|
- });
|
|
|
+ if (type=='substanceName') {
|
|
|
+ substanceKey.forEach((key) => {
|
|
|
+ this.$set(this.formData.details[index], key, '');
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ row.tools = [];
|
|
|
+ }
|
|
|
},
|
|
|
// 选择物品 产品、物料等
|
|
|
selectChooseModalProduct(row) {
|