guoxiaohuan 4 years ago
parent
commit
3d74e850d2
2 changed files with 6 additions and 10 deletions
  1. 2 4
      src/components/floorMap/index.vue
  2. 4 6
      src/views/other/index.vue

+ 2 - 4
src/components/floorMap/index.vue

@@ -203,8 +203,6 @@ export default {
                 if (name.slice(name.length - 2, name.length) == '机房') {
                     if (location) {
                         this.$refs.boxRoom.open({ name: name, type: this.type, location: location })
-                    } else {
-                        this.$message('未添加位置类型')
                     }
                 }
                 // 选中电井设置电井关联的商铺高亮
@@ -351,11 +349,11 @@ export default {
                 // })
                 this.topologyParser.imageLegendList.forEach(t => {
                     let id = t.data.GraphElementId
-                    t.selected = (res.indexOf(id) > -1)
+                    t.selected = res.indexOf(id) > -1
                 })
                 this.topologyParser.relationList.forEach(t => {
                     let id = t.data.GraphElementId
-                    t.selected = (res.indexOf(id) > -1)
+                    t.selected = res.indexOf(id) > -1
                 })
             })
         }

+ 4 - 6
src/views/other/index.vue

@@ -130,9 +130,7 @@ export default {
             queryTab({ data, postParams }).then(res => {
                 //console.log('查询哪几层楼有图', res)
                 this.floorData = []
-                let data = res.data.data
-                console.log('data', data)
-
+                let data = res.data.data || []
                 data.forEach(el => {
                     if (el.count > 0) {
                         let obj = {
@@ -144,9 +142,9 @@ export default {
                                 .reverse()
                                 .join(''),
                             seq:
-                                el.params.floor.substring(1, 2) == 'b'
-                                    ? el.params.floor.substring(1, 2) + '00'
-                                    : -el.params.floor.substring(1, 2) + '00'
+                                el.params.floor.substring(0, 1) == 'b'
+                                    ? -Number(el.params.floor.substring(1, 2)) + '00'
+                                    : Number(el.params.floor.substring(1, 2)) + '00'
                         }
                         this.floorData.push(obj)
                     }