zhangli 1 жил өмнө
parent
commit
b86fedbe3d

+ 11 - 2
src/views/modules/knowledge/statistics/components/DataShow.vue

@@ -156,8 +156,17 @@ export default {
           }
         }
         statistics.searchGroups(getData).then(result => {
-          result=this.treeData(result);
-          this.tableData = result;
+          let tempData=[]
+          result.forEach(itemData => {
+            let tempDataFlag=result.filter(item=>{
+                return item.pkId==itemData.parentId;
+            });
+            if(tempDataFlag.length==0){
+              tempData.push(itemData)
+            }
+          });
+          tempData=this.treeData(tempData);
+          this.tableData = tempData;
         })
       }
     },