|
@@ -16,55 +16,51 @@
|
|
|
|
|
|
|
|
<!-- 展开内容 -->
|
|
<!-- 展开内容 -->
|
|
|
<template v-slot:expand="{ row }">
|
|
<template v-slot:expand="{ row }">
|
|
|
- <div style="width:100%; height: 200px">
|
|
|
|
|
- <ele-pro-table ref="table" :datasource="row.produceList" :columns="columns">
|
|
|
|
|
- <!-- 表头工具栏 -->
|
|
|
|
|
- <template v-slot:toolbar>
|
|
|
|
|
-
|
|
|
|
|
- <el-button size="small" icon="el-icon-plus" class="ele-btn-icon" type="primary"
|
|
|
|
|
- @click.native="openParam">添加参数</el-button>
|
|
|
|
|
-
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 默认值 -->
|
|
|
|
|
- <template v-slot:defaultValue="{ row }">
|
|
|
|
|
- <el-input v-if="row.textType == 1 || row.textType == 4" v-model="row.defaultValue"
|
|
|
|
|
- placeholder="请输入"></el-input>
|
|
|
|
|
- <el-select v-if="row.textType == 2" v-model="row.defaultValue" placeholder="请选择">
|
|
|
|
|
- <el-option label="TRUE" :value="'TRUE'" />
|
|
|
|
|
- <el-option label="FALSE" :value="'FALSE'" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
-
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 上限 -->
|
|
|
|
|
- <template v-slot:maxValue="{ row }">
|
|
|
|
|
- <el-input v-if="row.textType == 3" v-model="row.maxValue" placeholder="请输入"></el-input>
|
|
|
|
|
- </template>
|
|
|
|
|
- <!-- 下限 -->
|
|
|
|
|
- <template v-slot:minValue="{ row }">
|
|
|
|
|
- <el-input v-if="row.textType == 3" v-model="row.minValue" placeholder="请输入"></el-input>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 单位 -->
|
|
|
|
|
- <template v-slot:unitName="{ row }">
|
|
|
|
|
- <DictSelection v-if="row.textType != 2" dictName="工艺参数单位" clearable filterable v-model="row.unitName">
|
|
|
|
|
- </DictSelection>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <!-- 操作列 -->
|
|
|
|
|
- <template v-slot:action="{ row }">
|
|
|
|
|
- <el-popconfirm class="ele-action" title="确定要删除当前参数吗?" @confirm="remove(row)">
|
|
|
|
|
- <template v-slot:reference>
|
|
|
|
|
- <el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
|
|
- 删除
|
|
|
|
|
- </el-link>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-popconfirm>
|
|
|
|
|
- </template>
|
|
|
|
|
- </ele-pro-table>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div style="width:100%; min-height: 200px" v-if="row.produceList">
|
|
|
|
|
+ <ele-pro-table ref="table2" :need-page="false" :datasource="row.produceList"
|
|
|
|
|
+ :columns="columns2" row-key="code">
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 默认值 -->
|
|
|
|
|
+ <template v-slot:defaultValue="{ row }">
|
|
|
|
|
+ <el-input v-if="row.textType == 1 || row.textType == 4" v-model="row.defaultValue"
|
|
|
|
|
+ placeholder="请输入"></el-input>
|
|
|
|
|
+ <el-select v-if="row.textType == 2" v-model="row.defaultValue" placeholder="请选择">
|
|
|
|
|
+ <el-option label="TRUE" :value="'TRUE'" />
|
|
|
|
|
+ <el-option label="FALSE" :value="'FALSE'" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 上限 -->
|
|
|
|
|
+ <template v-slot:maxValue="{ row }">
|
|
|
|
|
+ <el-input v-if="row.textType == 3" v-model="row.maxValue" placeholder="请输入"></el-input>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 下限 -->
|
|
|
|
|
+ <template v-slot:minValue="{ row }">
|
|
|
|
|
+ <el-input v-if="row.textType == 3" v-model="row.minValue" placeholder="请输入"></el-input>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 单位 -->
|
|
|
|
|
+ <template v-slot:unitName="{ row }">
|
|
|
|
|
+ <DictSelection v-if="row.textType != 2" dictName="工艺参数单位" clearable filterable v-model="row.unitName">
|
|
|
|
|
+ </DictSelection>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 操作列 -->
|
|
|
|
|
+ <template v-slot:action="{ row }">
|
|
|
|
|
+ <el-popconfirm class="ele-action" title="确定要删除当前参数吗?" @confirm="remove(row)">
|
|
|
|
|
+ <template v-slot:reference>
|
|
|
|
|
+ <el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
|
|
+ 删除
|
|
|
|
|
+ </el-link>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-popconfirm>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </ele-pro-table>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -257,17 +253,18 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
chooseModal(data, current) {
|
|
chooseModal(data, current) {
|
|
|
|
|
+
|
|
|
let tableList = []
|
|
let tableList = []
|
|
|
tableList = this.$refs.table.getData()
|
|
tableList = this.$refs.table.getData()
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- tableList.map((m) => {
|
|
|
|
|
- if (m.id = current.id) {
|
|
|
|
|
- m.produceList = data
|
|
|
|
|
|
|
+ tableList.forEach(e => {
|
|
|
|
|
+ if(e.id = current.id) {
|
|
|
|
|
+ e.produceList = data
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- console.log(tableList)
|
|
|
|
|
|
|
+ this.$refs.table.setData([...tableList]);
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
|