|
@@ -16,8 +16,8 @@
|
|
|
</ul>
|
|
|
</div>
|
|
|
<!-- 楼层 -->
|
|
|
- <div class='other-right' v-if='matterId!=1 && picFloorImg.length>0'>
|
|
|
- <floor-list @emitFloor='emitFloor'></floor-list>
|
|
|
+ <div class='other-right' v-if='matterId!=1'>
|
|
|
+ <floor-list v-if='floorData.length>0' :floorsArr='floorData' @emitFloor='emitFloor'></floor-list>
|
|
|
</div>
|
|
|
<!-- 图例 -->
|
|
|
<!-- <div class='legend-boxs' v-if='matterId!=1'>
|
|
@@ -41,9 +41,10 @@
|
|
|
import ZhsxOther from './zhsxOther'
|
|
|
import GcfzDialog from './gcfzDialog'
|
|
|
import OtherDialog from './otherDialog'
|
|
|
-import { queryPic } from '@/api/public.js'
|
|
|
+import { queryPic, queryTab } from '@/api/public.js'
|
|
|
import floorList from '@/components/floorList.vue'
|
|
|
import { matter } from '@/utils/plugins/components.js'
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -57,7 +58,8 @@ export default {
|
|
|
},
|
|
|
picFloor: '',
|
|
|
picFloorImg: [],
|
|
|
- dialogInfo: {}
|
|
|
+ dialogInfo: {},
|
|
|
+ floorData: []
|
|
|
}
|
|
|
},
|
|
|
components: { floorList, OtherDialog, ZhsxOther, GcfzDialog },
|
|
@@ -69,35 +71,101 @@ export default {
|
|
|
},
|
|
|
emitFloor(item) {
|
|
|
console.log(item)
|
|
|
- this.queryPicter()
|
|
|
+ this.queryPicter(item.gname)
|
|
|
this.floorInfo = item
|
|
|
this.picFloor = this.floorInfo.gname
|
|
|
},
|
|
|
dialogVisible(item) {
|
|
|
this.$refs.gcfzDialog.showModal(item)
|
|
|
},
|
|
|
- queryPicter() {
|
|
|
+ queryPicter(floor) {
|
|
|
this.picFloor = this.$cookie.get('floorNow')
|
|
|
let getParams = {
|
|
|
module: '1004',
|
|
|
- floor: this.picFloor,
|
|
|
+ floor: floor,
|
|
|
plazaId: this.$store.state.plazaId
|
|
|
}
|
|
|
queryPic({ getParams }).then(res => {
|
|
|
console.log('库房管理图', res)
|
|
|
- this.picFloorImg = res.data
|
|
|
- console.log(this.picFloorImg)
|
|
|
- if (this.picFloorImg) {
|
|
|
- console.log(1111)
|
|
|
- } else {
|
|
|
- console.log(222222)
|
|
|
+ this.picFloorImg = res.data[0].url ? res.data[0].url : ''
|
|
|
+ console.log('this.picFloorImg', this.picFloorImg)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 查询哪几个楼层有库房图
|
|
|
+ tabSize() {
|
|
|
+ let data = { plazaId: this.$store.state.plazaId }
|
|
|
+ let postParams = [
|
|
|
+ {
|
|
|
+ tableName: 'glsms_proimgup',
|
|
|
+ params: { module: '1004', floor: 'f1' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tableName: 'glsms_proimgup',
|
|
|
+ params: { module: '1004', floor: 'f2' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tableName: 'glsms_proimgup',
|
|
|
+ params: { module: '1004', floor: 'f3' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tableName: 'glsms_proimgup',
|
|
|
+ params: { module: '1004', floor: 'f4' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tableName: 'glsms_proimgup',
|
|
|
+ params: { module: '1004', floor: 'f5' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tableName: 'glsms_proimgup',
|
|
|
+ params: { module: '1004', floor: 'f6' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tableName: 'glsms_proimgup',
|
|
|
+ params: { module: '1004', floor: 'b1' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tableName: 'glsms_proimgup',
|
|
|
+ params: { module: '1004', floor: 'b2' }
|
|
|
}
|
|
|
+ ]
|
|
|
+ queryTab({ data, postParams }).then(res => {
|
|
|
+ console.log('查询哪几层楼有图', res)
|
|
|
+ this.floorData = []
|
|
|
+ let data = res.data.data
|
|
|
+ data.forEach(el => {
|
|
|
+ console.log(el)
|
|
|
+ // gcode: "4F"
|
|
|
+ // name: "第4层"
|
|
|
+ // seq: 400
|
|
|
+ if (el.count > 0) {
|
|
|
+ let obj = {
|
|
|
+ gname: el.params.floor,
|
|
|
+ code: el.params.floor.toUpperCase(),
|
|
|
+ gcode: el.params.floor
|
|
|
+ .toUpperCase()
|
|
|
+ .split('')
|
|
|
+ .reverse()
|
|
|
+ .join(''),
|
|
|
+ seq:
|
|
|
+ el.params.floor.substring(1, 2) == 'b'
|
|
|
+ ? el.params.floor.substring(1, 2) + '00'
|
|
|
+ : -el.params.floor.substring(1, 2) + '00'
|
|
|
+ }
|
|
|
+ console.log(obj)
|
|
|
+ this.floorData.push(obj)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log('查询哪几层楼有图', this.floorData)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['floorsArr'])
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.everySystem = this.matter[0].children
|
|
|
- this.queryPicter()
|
|
|
+ // this.queryPicter()
|
|
|
+ this.tabSize()
|
|
|
}
|
|
|
}
|
|
|
</script>
|