Sfoglia il codice sorgente

'编辑器返回草稿箱优化'

zhangyu 4 anni fa
parent
commit
116f0ab833
1 ha cambiato i file con 12 aggiunte e 12 eliminazioni
  1. 12 12
      src/components/edit/top_toolbar.vue

+ 12 - 12
src/components/edit/top_toolbar.vue

@@ -201,7 +201,8 @@ export default {
       initScale: 0.5, //初始 底图缩放比例
       baseScale: 1.0, //底图基础缩放比例,由底图加载完成后,传入进来
       scaleStep: 0.05, // +-缩放步进
-      locationQuery: null
+      locationQuery: null,
+      urlMsg: {}
     };
   },
   computed: {
@@ -299,28 +300,28 @@ export default {
     },
     // 返回草稿箱
     goDrafts() {
-      if (this.locationQuery.projectId && this.locationQuery.BuildingID && this.locationQuery.fmapID && this.locationQuery.token) {
+      if (this.urlMsg.projectId && this.urlMsg.BuildingID && this.urlMsg.fmapID && this.urlMsg.token) {
         this.$router.push({
           path: 'drafts',
           query: {
-            projectId: this.locationQuery.projectId,
-            BuildingID: this.locationQuery.BuildingID,
-            FloorID: this.locationQuery.FloorID,
-            fmapID: this.locationQuery.fmapID,
-            token: this.locationQuery.token
+            projectId: this.urlMsg.projectId,
+            BuildingID: this.urlMsg.BuildingID,
+            FloorID: this.urlMsg.FloorID,
+            fmapID: this.urlMsg.fmapID,
+            token: this.urlMsg.token
           }
         })
       } else {
-        if (!this.locationQuery.projectId) {
+        if (!this.urlMsg.projectId) {
           console.log("暂无projectId!");
         }
-        if (!this.locationQuery.BuildingID) {
+        if (!this.urlMsg.BuildingID) {
           console.log("暂无BuildingID!");
         }
-        if (!this.locationQuery.fmapID) {
+        if (!this.urlMsg.fmapID) {
           console.log("暂无fmapID!");
         }
-        if (!this.locationQuery.token) {
+        if (!this.urlMsg.token) {
           console.log("暂无token!");
         }
         this.$message.error("参数缺失,无法跳转!");
@@ -366,7 +367,6 @@ export default {
     this.getMouseScale();
   },
   created() {
-    this.locationQuery = this.$route.query;
     const href = window.location.href;
     // 路由
     // const route = href.split("?")[0];