Browse Source

最下级节点才加载表单

duy 1 năm trước cách đây
mục cha
commit
6038da9869
1 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 7 1
      src/views/data-fill/division.vue

+ 7 - 1
src/views/data-fill/division.vue

@@ -554,6 +554,7 @@ const wbsElTreeClick = ({ node, data, keys }) => {
     treeNodeInfo.value = node
     treeItemInfo.value = data
     tableBasicData.value = [data]
+    const { notExsitChild } = data
     setStoreValue('wbsTreeExpandKeys', keys)
     treeAutoExpandKeys.value = keys || []
     if (node.level === 3) {
@@ -562,7 +563,12 @@ const wbsElTreeClick = ({ node, data, keys }) => {
         treePrimaryKeyId.value = ''
     }
     if (node.level > 1) {
-        searchNodeAllTableApi(data['primaryKeyId'])
+        if (notExsitChild) {
+            searchNodeAllTableApi(data['primaryKeyId'])
+        } else {
+            tableProjectData.value = []
+        }
+       
     }
 }