whj 11 月之前
父節點
當前提交
4d462dc02f
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/views/workflow/workflow/modules/BaseForm.vue

+ 4 - 2
src/views/workflow/workflow/modules/BaseForm.vue

@@ -149,7 +149,7 @@ export default {
             })
             })
           })
           })
         } else {
         } else {
-          // instance.addEndpoint(this.$refs[item.name][0].$el, { target: false, source: false })
+          this.instance.addEndpoint(document.getElementById(item.id), { target: false, source: false })
         }
         }
       })
       })
       // this.$refs.node.forEach((item) => {
       // this.$refs.node.forEach((item) => {
@@ -234,7 +234,7 @@ export default {
         titleCode: '',
         titleCode: '',
         titleColumnCode: '',
         titleColumnCode: '',
         handleNameId: '',
         handleNameId: '',
-        sortNum: record.sortNum++,
+        sortNum: record.sortNum + 1,
         parentIds: [record.id],
         parentIds: [record.id],
       }
       }
       if (record.children.length > 0) {
       if (record.children.length > 0) {
@@ -284,6 +284,7 @@ export default {
     handleDelete(record) {
     handleDelete(record) {
       this.instance.unmanage(document.getElementById(record.id))
       this.instance.unmanage(document.getElementById(record.id))
       this.details = this.details.filter((item) => {
       this.details = this.details.filter((item) => {
+        console.log(item)
         item.children = item.children.filter((child) => child !== record.id)
         item.children = item.children.filter((child) => child !== record.id)
         item.parentIds = item.parentIds.filter((child) => child !== record.id)
         item.parentIds = item.parentIds.filter((child) => child !== record.id)
         return item.id !== record.id
         return item.id !== record.id
@@ -327,6 +328,7 @@ export default {
           y: 100,
           y: 100,
           x: 500,
           x: 500,
           children: [],
           children: [],
+          parentIds: [],
         },
         },
       ]
       ]