YaolongHan 4 years ago
parent
commit
b0c1819546
2 changed files with 4 additions and 0 deletions
  1. 1 0
      src/components/baseEditer.vue
  2. 3 0
      src/components/edit/top_toolbar.vue

+ 1 - 0
src/components/baseEditer.vue

@@ -95,6 +95,7 @@ export default {
       // 获取主题数据
       this.readGroup().then(data => {
         this.graphId = data.Data[0].ID;
+        bus.$emit('setGraphId',this.graphId)
         if (data.Data) {
           const parserData = new STopologyParser(null);
           parserData.parseData(data.Data[0].Elements);

+ 3 - 0
src/components/edit/top_toolbar.vue

@@ -181,6 +181,9 @@ export default {
       console.log("itemMsg", itemMsg);
       this.FocusItemChanged(itemMsg);
     });
+      bus.$on("setGraphId", setGraphId => {
+      console.log("itemMsg", setGraphId);
+    });
   },
   created() {
     const href = window.location.href;