Browse Source

fix:解决冲突

YaolongHan 4 years ago
parent
commit
1e84f04d0f
1 changed files with 20 additions and 10 deletions
  1. 20 10
      src/views/drafts.vue

+ 20 - 10
src/views/drafts.vue

@@ -104,7 +104,7 @@ export default {
       ],
       legend: false,
       canvasWidth: 700,
-      canvasHeight: 800,
+      canvasHeight: 600,
       view: null,
       urlMsg: null,
       floorList: {},
@@ -112,15 +112,17 @@ export default {
       key: "23f30a832a862c58637a4aadbf50a566",
       appName: "万达可视化系统",
       defaultProps: {
-        children: "Category",
-        label: "Gcode"
+        children: 'Category',
+        label: 'Gcode'
       },
-      projectId: "" //项目id
+      graphId:'',
     };
   },
   methods: {
     handleNodeClick(data) {
       console.log(data);
+      this.graphId = '124aeab6fbb346cd92057525a30aee18';
+      this.getLegend();
     },
     init() {
       console.log(this.urlMsg);
@@ -204,15 +206,23 @@ export default {
     getTreeData() {
       queryDraftGroup({ projectId: this.projectId }).then(res => {
         console.log(res);
-        if (res.Result == "success") {
+        if(res.Result =='success'){
           this.treeData = res.Data;
-        } else {
-          this.treeData = [];
+        }else{
+          this.treeData=[];
+          this.$message.err('获取楼层结构失败');
         }
-      });
+      })
     },
-    getLegend() {
-      queryStatistic({}).then(res => {});
+    getLegend(){
+      const data = {
+        projectId:'1000423',
+        flag:true,
+        graphId:this.graphId,
+      }
+      queryStatistic(data).then(res=>{
+
+      })
     }
   },
   mounted() {