duy преди 1 година
родител
ревизия
7479f57efc
променени са 1 файла, в които са добавени 26 реда и са изтрити 20 реда
  1. 26 20
      src/views/project/debit/contract/unit.vue

+ 26 - 20
src/views/project/debit/contract/unit.vue

@@ -227,29 +227,35 @@ const treeMenuTap = ({ key, node, data, keys }) => {
     getTreeNodeDetail(data)
     setStoreValue('wbsTreeExpandKeys', keys)
     TreeAutoExpandKeys.value = keys || []
-    if (key === 'add') {
-        treeModalShow.value = true
-    }
-    if (key === 'edit') {
-        editModalShow.value = true
-    }
-    if (key === 'sort') {
-        let nodes = [], childNodes = []
-        childNodes = node?.parent?.childNodes || node?.parent?.children || []
-        
-        for (let i = 0; i < childNodes.length; i++) {
-            const res = childNodes[i]?.data
-            nodes.push({
-                nodeName:res?.nodeName,
-                id:res?.id,
-            })
+    if (data?.isLock !== 1) {
+        if (key === 'add') {
+            treeModalShow.value = true
+        }
+        if (key === 'edit') {
+            editModalShow.value = true
+        }
+        if (key === 'sort') {
+            let nodes = [], childNodes = []
+            childNodes = node?.parent?.childNodes || node?.parent?.children || []
+            
+            for (let i = 0; i < childNodes.length; i++) {
+                const res = childNodes[i]?.data
+                nodes.push({
+                    nodeName:res?.nodeName,
+                    id:res?.id,
+                })
+            }
+            sortTableData.value = nodes
+            sortModalShow.value = true
+        }
+        if (key === 'del') {
+            delModalClick()
         }
-        sortTableData.value = nodes
-        sortModalShow.value = true
     }
-    if (key === 'del') {
-        delModalClick()
+    if (data?.isLock === 1 && key !== 'lock') {
+        window.$message.warning('当前节点为锁定状态,不允许操作')
     }
+ 
     if (key === 'lock') {
         handleLockNode()
     }