소스 검색

楼层问题

YaolongHan 4 년 전
부모
커밋
77bdcdef9f
3개의 변경된 파일12개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 0
      src/App.vue
  2. 6 1
      src/components/floorMap/index.vue
  3. 2 2
      src/store/index.js

+ 4 - 0
src/App.vue

@@ -80,6 +80,10 @@ export default {
           });
         // 缓存楼层数据
         if (dataArr.length) {
+          //如果项目为 南昌八一路 长春重庆路 青岛台东路 则不走楼层缓存接口
+          if(this.plazaIds == "1001064" || this.plazaIds == "1001065" || this.plazaIds == "1001066"){
+            return
+          }
           setFloor({ plazaId: this.plazaIds }, dataArr)
             .then(res => {
               console.log("缓存楼层", res);

+ 6 - 1
src/components/floorMap/index.vue

@@ -71,7 +71,8 @@ export default {
             this.loading = true
             this.floorid = floorid
             this.mapSize()
-            this.$refs.canvasFun.isShow = false
+            this.$refs.canvasFun.isShow = false;
+            console.log('haveFengMap',this.haveFengMap)
             setTimeout(() => {
                 if (this.haveFengMap) {
                     this.clearGraphy()
@@ -81,6 +82,8 @@ export default {
                         this.canvasID = `canvas${this.id}`
                     }
                     this.parserData(floorid)
+                }else{
+                   this.loading = false
                 }
             }, 100)
         },
@@ -219,6 +222,8 @@ export default {
                 if (this.$refs.canvasFun) {
                     this.$refs.canvasFun.everyScale = this.view.scale
                 }
+            }).catch(()=>{
+                this.loading = false
             })
         },
         clearGraphy() {

+ 2 - 2
src/store/index.js

@@ -8,9 +8,9 @@ import router from '../router'
 Vue.use(Vuex)
 export default new Vuex.Store({
     state: {
-        // ssoToken: 'admin:chuyushu',
+        ssoToken: 'admin:chuyushu',
         // ssoToken: '',
-        ssoToken: null,
+        // ssoToken: null,
         plazaName: '',
         isPreview: false,
         lastRoute: '',