|
|
@@ -22,6 +22,11 @@
|
|
|
:datasource="row.produceList" :columns="columns2" :key="row.code + '-' + $index">
|
|
|
|
|
|
|
|
|
+
|
|
|
+ <template v-slot:sort="{ row }">
|
|
|
+ <el-input v-model="row.sort"></el-input>
|
|
|
+ </template>
|
|
|
+
|
|
|
<!-- 默认值 -->
|
|
|
<template v-slot:defaultValue="{ row }">
|
|
|
|
|
|
@@ -163,6 +168,13 @@ export default {
|
|
|
|
|
|
// 表格列配置
|
|
|
columns2: [
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'sort',
|
|
|
+ slot: 'sort',
|
|
|
+ label: '排序',
|
|
|
+ minWidth: 60
|
|
|
+ },
|
|
|
{
|
|
|
prop: 'code',
|
|
|
label: '参数编码',
|
|
|
@@ -170,6 +182,8 @@ export default {
|
|
|
align: 'center',
|
|
|
minWidth: 110
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
{
|
|
|
prop: 'name',
|
|
|
label: '参数名称',
|
|
|
@@ -262,10 +276,12 @@ export default {
|
|
|
|
|
|
this.$emit('chooseProcess', _arr)
|
|
|
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
|
|
|
chooseModal(data, current) {
|
|
|
- console.log(current)
|
|
|
+
|
|
|
data.map((m => {
|
|
|
m.parentId = current.id
|
|
|
return {
|
|
|
@@ -278,17 +294,16 @@ export default {
|
|
|
tableList = this.$refs.table.getData()
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
clonedArray = JSON.parse(JSON.stringify(tableList));
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
clonedArray.forEach(e => {
|
|
|
if (e.id == current.id) {
|
|
|
- e.produceList = data
|
|
|
+ if(e.hasOwnProperty('produceList')) {
|
|
|
+ e.produceList = [...e.produceList, ...data]
|
|
|
+ } else {
|
|
|
+ e.produceList = [ ...data]
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
})
|
|
|
@@ -296,6 +311,11 @@ export default {
|
|
|
|
|
|
this.$refs.table.setData([...clonedArray]);
|
|
|
this.$emit('chooseProcess', clonedArray)
|
|
|
+
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.table.toggleRowExpansionAll()
|
|
|
+ this.$forceUpdate()
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
|