|
|
@@ -204,9 +204,15 @@ export default {
|
|
|
this.$refs.table.reload();
|
|
|
},
|
|
|
remove(row) {
|
|
|
- const data = this.$refs.table.getData() ?? [];
|
|
|
- this.$refs.table.setData(data.filter((d) => d.id !== row.id));
|
|
|
+ const data = this.$refs.table.getData();
|
|
|
+ if(row.id) {
|
|
|
+ this.removeList.push(row.id)
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$refs.table.setData(data.filter((d) => this.isEdit ? d.id !== row.id : d.sourceTaskId !== row.sourceTaskId));
|
|
|
+
|
|
|
this.$emit('taskList', this.$refs.table.getData())
|
|
|
+ this.$emit('remove', this.removeList)
|
|
|
},
|
|
|
/* 表格数据源 */
|
|
|
|
|
|
@@ -215,6 +221,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
async getList() {
|
|
|
+ this.removeList =[]
|
|
|
if (this.isEdit) {
|
|
|
const res = await route.taskinstanceList({
|
|
|
routingId: this.taskInfo.id,
|
|
|
@@ -225,6 +232,7 @@ export default {
|
|
|
|
|
|
let arr = res.list.map((it) => {
|
|
|
it.detail.orderNum = it.orderNum
|
|
|
+
|
|
|
return it.detail
|
|
|
});
|
|
|
this.$refs.table.setData([...arr]);
|