|
@@ -15,16 +15,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 展开内容 -->
|
|
<!-- 展开内容 -->
|
|
|
- <template v-slot:expand="{ row }">
|
|
|
|
|
|
|
+ <template v-slot:expand="{ row, $index }">
|
|
|
|
|
|
|
|
<div style="width:100%; min-height: 60px" v-if="row.produceList">
|
|
<div style="width:100%; min-height: 60px" v-if="row.produceList">
|
|
|
- <ele-pro-table :toolbar="false"
|
|
|
|
|
- toolsTheme="none" ref="table2" :need-page="false" :datasource="row.produceList" :columns="columns2"
|
|
|
|
|
- row-key="code">
|
|
|
|
|
|
|
+ <ele-pro-table :toolbar="false" toolsTheme="none" ref="table2" :need-page="false"
|
|
|
|
|
+ :datasource="row.produceList" :columns="columns2" :key="row.code + '-' + $index">
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 默认值 -->
|
|
<!-- 默认值 -->
|
|
|
<template v-slot:defaultValue="{ row }">
|
|
<template v-slot:defaultValue="{ row }">
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<el-input v-if="row.textType == 1 || row.textType == 4 || row.textType == 5" v-model="row.defaultValue"
|
|
<el-input v-if="row.textType == 1 || row.textType == 4 || row.textType == 5" v-model="row.defaultValue"
|
|
|
placeholder="请输入"></el-input>
|
|
placeholder="请输入"></el-input>
|
|
|
<el-select v-if="row.textType == 2" v-model="row.defaultValue" placeholder="请选择">
|
|
<el-select v-if="row.textType == 2" v-model="row.defaultValue" placeholder="请选择">
|
|
@@ -247,23 +248,24 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
openEdit() {
|
|
openEdit() {
|
|
|
-
|
|
|
|
|
let tableList = []
|
|
let tableList = []
|
|
|
tableList = this.$refs.table.getData()
|
|
tableList = this.$refs.table.getData()
|
|
|
|
|
+
|
|
|
this.$refs.processModalRef.open(tableList)
|
|
this.$refs.processModalRef.open(tableList)
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
chooseProcess(data) {
|
|
chooseProcess(data) {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
let _arr = [...data, ...this.$refs.table.getData()]
|
|
let _arr = [...data, ...this.$refs.table.getData()]
|
|
|
this.$refs.table.setData([...data, ...this.$refs.table.getData()]);
|
|
this.$refs.table.setData([...data, ...this.$refs.table.getData()]);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
this.$emit('chooseProcess', _arr)
|
|
this.$emit('chooseProcess', _arr)
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
chooseModal(data, current) {
|
|
chooseModal(data, current) {
|
|
|
|
|
+ console.log(current)
|
|
|
data.map((m => {
|
|
data.map((m => {
|
|
|
m.parentId = current.id
|
|
m.parentId = current.id
|
|
|
return {
|
|
return {
|
|
@@ -272,18 +274,28 @@ export default {
|
|
|
}))
|
|
}))
|
|
|
|
|
|
|
|
let tableList = []
|
|
let tableList = []
|
|
|
|
|
+ let clonedArray = []
|
|
|
tableList = this.$refs.table.getData()
|
|
tableList = this.$refs.table.getData()
|
|
|
- console.log(tableList)
|
|
|
|
|
|
|
|
|
|
- tableList.forEach(e => {
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ clonedArray = JSON.parse(JSON.stringify(tableList));
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ clonedArray.forEach(e => {
|
|
|
if (e.id == current.id) {
|
|
if (e.id == current.id) {
|
|
|
e.produceList = data
|
|
e.produceList = data
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- this.$refs.table.setData([...tableList]);
|
|
|
|
|
- this.$emit('chooseProcess', tableList)
|
|
|
|
|
|
|
+
|
|
|
|
|
+ this.$refs.table.setData([...clonedArray]);
|
|
|
|
|
+ this.$emit('chooseProcess', clonedArray)
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
@@ -300,7 +312,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
remove2(row) {
|
|
remove2(row) {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
const data = this.$refs.table.getData() ?? [];
|
|
const data = this.$refs.table.getData() ?? [];
|
|
|
data.forEach((e) => {
|
|
data.forEach((e) => {
|
|
|
if (row.parentId == e.id) {
|
|
if (row.parentId == e.id) {
|