소스 검색

重新提交

zhangli 1 년 전
부모
커밋
b86fedbe3d
1개의 변경된 파일11개의 추가작업 그리고 2개의 파일을 삭제
  1. 11 2
      src/views/modules/knowledge/statistics/components/DataShow.vue

+ 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;
         })
       }
     },