|
@@ -250,10 +250,11 @@ export default {
|
|
|
|
|
|
|
|
chooseProcess(data) {
|
|
chooseProcess(data) {
|
|
|
this.$refs.table.setData([...data, ...this.$refs.table.getData()]);
|
|
this.$refs.table.setData([...data, ...this.$refs.table.getData()]);
|
|
|
|
|
+ this.$emit('chooseProcess',[...data, ...this.$refs.table.getData()])
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
chooseModal(data, current) {
|
|
chooseModal(data, current) {
|
|
|
-
|
|
|
|
|
data.map((m => {
|
|
data.map((m => {
|
|
|
m.parentId = current.id
|
|
m.parentId = current.id
|
|
|
return {
|
|
return {
|
|
@@ -274,26 +275,24 @@ export default {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
this.$refs.table.setData([...tableList]);
|
|
this.$refs.table.setData([...tableList]);
|
|
|
-
|
|
|
|
|
|
|
+ this.$emit('chooseProcess',tableList)
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 删除 */
|
|
/* 删除 */
|
|
|
remove(row) {
|
|
remove(row) {
|
|
|
const data = this.$refs.table.getData() ?? [];
|
|
const data = this.$refs.table.getData() ?? [];
|
|
|
-
|
|
|
|
|
if (row.id) {
|
|
if (row.id) {
|
|
|
this.removeList.push(row.id);
|
|
this.removeList.push(row.id);
|
|
|
this.$refs.table.setData(data.filter((d) => d.id !== row.id));
|
|
this.$refs.table.setData(data.filter((d) => d.id !== row.id));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ this.$emit('chooseProcess', this.$refs.table.getData())
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
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) {
|
|
|
e.produceList = e.produceList.filter((d) => d.id !== row.id);
|
|
e.produceList = e.produceList.filter((d) => d.id !== row.id);
|
|
@@ -301,6 +300,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
this.$refs.table.setData([...data])
|
|
this.$refs.table.setData([...data])
|
|
|
|
|
+ this.$emit('chooseProcess',data)
|
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
|
}
|
|
}
|
|
|
|
|
|