소스 검색

fix bug : legend修改,跳转编辑器,楼层等参数 处理

yx 4 년 전
부모
커밋
c0b387b2e4
1개의 변경된 파일27개의 추가작업 그리고 18개의 파일을 삭제
  1. 27 18
      src/components/Legend/src/legend.vue

+ 27 - 18
src/components/Legend/src/legend.vue

@@ -59,7 +59,7 @@
                 <!-- </p> -->
             </el-tooltip>
             <!-- 新增分布图 -->
-            <el-tooltip effect='dark' content='新增分布图' placement='left' v-if='floorSelect.length!=floors.length && type==0'>
+            <el-tooltip effect='dark' content='新增分布图1' placement='left' v-if='floorSelect.length!=floors.length && type==0'>
                 <p class='tltk' style='margin-left: -5px;' @click='addFloor'>
                     <img src='@/assets/imgs/bjj.png' alt />
                 </p>
@@ -211,8 +211,8 @@ export default {
         },
         // 弹窗组件内传入floorInfo,查询 getDraftNum
         floorInfo: {
-            handler(newV,oldV) {
-                 if (newV !== oldV) {
+            handler(newV, oldV) {
+                if (newV !== oldV) {
                     clearInterval(this.timer)
                     this.getDraftNum()
                     this.timer = setInterval(() => {
@@ -330,29 +330,38 @@ export default {
         },
         /**
          * @name goToEditer
-         * @description t跳转editer编辑器
+         * @description 跳转editer编辑器
          */
         goToEditer() {
-            if (this.floor) {
-                this.floorSelect.forEach(el => {
-                    if (el.id == this.floor) {
-                        this.floorName = el.name
-                    }
-                })
-            }
+            // let FloorID = this.floor ? this.floor : this.$cookie.get('floorMapId') || 'f1'
+            // let categoryId = this.categoryId ? this.categoryId : this.$cookie.get('categoryId')
+            // let floorName = this.floorName ? this.floorName : this.$cookie.get('floorNow')
+            // let seq = this.$cookie.get('currentFloorId')
 
-            let FloorID = this.floor ? this.floor : this.$cookie.get('floorMapId') || 'f1'
-            let categoryId = this.categoryId ? this.categoryId : this.$cookie.get('categoryId')
-            const { conf } = window.__systemConf
-            const editerUrl = conf[process.env.NODE_ENV + '_editerUrl']
-            let floorName = this.floorName ? this.floorName : this.$cookie.get('floorNow')
+            //主页面(楼层功能,设备设置中的)legend, 楼层参数参数处理
+            let FloorID = this.$cookie.get('floorMapId')
+            let floorName = this.$cookie.get('floorNow')
             let seq = this.$cookie.get('currentFloorId')
-            // 弹窗组件内传入floorInfo,使用其楼层id
-            if (this.floorInfo.gname) {
+            let categoryId = this.$cookie.get('categoryId') //系统
+
+            // 弹窗组件内传入floorInfo, 楼层参数处理
+            if (this.floorInfo.gname && !this.floor) {
                 FloorID = this.floorInfo.gname
                 floorName = this.floorInfo.code
                 seq = this.floorInfo.seq
+                categoryId = this.categoryId
             }
+            //弹窗组件点击新增楼层,确认的楼层 楼层字段处理
+            if (this.floor) {
+                // 从store中筛选出选中的楼层信息
+                let floorInfo = this.$store.state.floorsArr.filter(item => item.gname === this.floor)[0]
+                FloorID = this.floor
+                floorName = floorInfo.code
+                seq = floorInfo.seq
+                categoryId = this.categoryId
+            }
+            const { conf } = window.__systemConf
+            const editerUrl = conf[process.env.NODE_ENV + '_editerUrl']
             let data = `categoryId=${categoryId}&projectId=${this.plazaId}&BuildingID=1&FloorID=${FloorID}&FloorName=${floorName}&fmapID=${this.fmapID}&seq=${seq}&token=${this.ssoToken}`
             let url = editerUrl + 'editer?' + encodeURIComponent(data)
             window.open(url, true)