ZaiZai 1 year ago
parent
commit
e2541622c2
1 changed files with 4 additions and 10 deletions
  1. 4 10
      src/views/exctab/modules/template.vue

+ 4 - 10
src/views/exctab/modules/template.vue

@@ -233,19 +233,13 @@ const tableTempExcelProps = ref({})
 //树节点被点击
 //树节点被点击
 const nodeInfo = ref({})
 const nodeInfo = ref({})
 const isCheckd = ref(false)
 const isCheckd = ref(false)
-const treeNodeTap = ({ node, data }) => {
+const treeNodeTap = ({ data }) => {
     nodeInfo.value = data
     nodeInfo.value = data
-    if (!node.isLeaf) {
-        tableTempExcelProps.value = {}
-        isCheckd.value = true
-        return
-    }
-    //处理详情
-    if (data.fileType === 3) {
-        isCheckd.value = true
+    isCheckd.value = !data.hasChildren || data.fileType === 3
+    if (isCheckd.value) {
         getDetailExcel(data.id)
         getDetailExcel(data.id)
     } else {
     } else {
-        isCheckd.value = false
+        tableTempExcelProps.value = {}
     }
     }
 }
 }