Parcourir la source

复制节点修改

duy il y a 1 an
Parent
commit
5e035444e6
2 fichiers modifiés avec 50 ajouts et 0 suppressions
  1. 25 0
      src/views/data-fill/division.vue
  2. 25 0
      src/views/data-fill/wbs.vue

+ 25 - 0
src/views/data-fill/division.vue

@@ -824,6 +824,31 @@ const copyNodeElTreeClick = ({ data, node }) => {
             } else {
                 window?.$message?.warning('该节点已存在上报数据,不允许复制')
             }
+        } else {
+            if (data['id'] !== formCopyNodeModel.value.id) {//不能复制到本身节点下
+                    //只能往上一级点击,不能跨层级点击
+                    //如果选择的是父级节点,那不能复制到子级节点
+                    if (type === 6 && (data['type'] === 4 || data['type'] === 5 || data['type'] == 6)) {
+                        setCopyNodeTable(data, title)
+                    }
+                    if (type === 5 && data['type'] === 4) {
+                        setCopyNodeTable(data, title, partitionCode)
+                    }
+                    if (type === 4 && (data['type'] === 2 || data['type'] === 3)) {
+                        setCopyNodeTable(data, title, partitionCode)
+                    }
+                    if (type === 3 && data['type'] === 2) {
+                        setCopyNodeTable(data, title, partitionCode)
+                    }
+                    if (type === 2 && data['type'] === 1) {
+                        setCopyNodeTable(data, title, partitionCode)
+                    }
+                    if (type === 1 && data['type'] === 1) {
+                        setCopyNodeTable(data, title, partitionCode)
+                    }
+
+
+                }
         }
       
 

+ 25 - 0
src/views/data-fill/wbs.vue

@@ -1228,6 +1228,31 @@ const copyNodeElTreeClick = ({ data, node }) => {
             } else {
                 window?.$message?.warning('该节点已存在上报数据,不允许复制')
             }
+        } else {
+            if (data['id'] !== formCopyNodeModel.value.id) {//不能复制到本身节点下
+                    //只能往上一级点击,不能跨层级点击
+                    //如果选择的是父级节点,那不能复制到子级节点
+                    if (type === 6 && (data['type'] === 4 || data['type'] === 5 || data['type'] == 6)) {
+                        setCopyNodeTable(data, title)
+                    }
+                    if (type === 5 && data['type'] === 4) {
+                        setCopyNodeTable(data, title, partitionCode)
+                    }
+                    if (type === 4 && (data['type'] === 2 || data['type'] === 3)) {
+                        setCopyNodeTable(data, title, partitionCode)
+                    }
+                    if (type === 3 && data['type'] === 2) {
+                        setCopyNodeTable(data, title, partitionCode)
+                    }
+                    if (type === 2 && data['type'] === 1) {
+                        setCopyNodeTable(data, title, partitionCode)
+                    }
+                    if (type === 1 && data['type'] === 1) {
+                        setCopyNodeTable(data, title, partitionCode)
+                    }
+
+
+                }
         }