|
@@ -42,29 +42,29 @@ export default {
|
|
|
floorid: '', //楼层id
|
|
|
topologyParser: null, // 解析器数据
|
|
|
fParser: null, // 底图解析器
|
|
|
- wellMap: {} // 电井控制商铺映射
|
|
|
+ wellMap: {}, // 电井控制商铺映射
|
|
|
}
|
|
|
},
|
|
|
props: {
|
|
|
id: {
|
|
|
default: '1',
|
|
|
- type: String
|
|
|
+ type: String,
|
|
|
},
|
|
|
categoryId: {
|
|
|
default: '',
|
|
|
- type: String
|
|
|
+ type: String,
|
|
|
},
|
|
|
// 弹窗高度,适配底图高度使用
|
|
|
modalHeight: {
|
|
|
type: [Number, undefined],
|
|
|
- default: undefined
|
|
|
+ default: undefined,
|
|
|
},
|
|
|
loadName: null,
|
|
|
- type: null
|
|
|
+ type: null,
|
|
|
},
|
|
|
components: { RoomBox, canvasFun },
|
|
|
computed: {
|
|
|
- ...mapGetters(['plazaId', 'fmapID', 'haveFengMap', 'bunkObj'])
|
|
|
+ ...mapGetters(['plazaId', 'fmapID', 'haveFengMap', 'bunkObj']),
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['getfmapID']),
|
|
@@ -105,14 +105,14 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
if (window.fengmapData.gnameToGid[floor]) {
|
|
|
- window.fengmapData.parseData(window.fengmapData.gnameToGid[floor], res => {
|
|
|
+ window.fengmapData.parseData(window.fengmapData.gnameToGid[floor], (res) => {
|
|
|
if (res.err) {
|
|
|
console.log('errr', res.err)
|
|
|
return
|
|
|
}
|
|
|
this.fParser = new SFloorParser(null)
|
|
|
this.fParser.parseData(res)
|
|
|
- this.fParser.spaceList.forEach(t => {
|
|
|
+ this.fParser.spaceList.forEach((t) => {
|
|
|
this.scene.addItem(t)
|
|
|
t.nameSize = 12
|
|
|
t.nameColor = '#2a2a2a'
|
|
@@ -123,11 +123,11 @@ export default {
|
|
|
t.name = ''
|
|
|
}
|
|
|
})
|
|
|
- this.fParser.wallList.forEach(t => this.scene.addItem(t))
|
|
|
- this.fParser.virtualWallList.forEach(t => this.scene.addItem(t))
|
|
|
- this.fParser.doorList.forEach(t => this.scene.addItem(t))
|
|
|
- this.fParser.columnList.forEach(t => this.scene.addItem(t))
|
|
|
- this.fParser.casementList.forEach(t => this.scene.addItem(t))
|
|
|
+ this.fParser.wallList.forEach((t) => this.scene.addItem(t))
|
|
|
+ this.fParser.virtualWallList.forEach((t) => this.scene.addItem(t))
|
|
|
+ this.fParser.doorList.forEach((t) => this.scene.addItem(t))
|
|
|
+ this.fParser.columnList.forEach((t) => this.scene.addItem(t))
|
|
|
+ this.fParser.casementList.forEach((t) => this.scene.addItem(t))
|
|
|
this.view.scene = this.scene
|
|
|
// this.view.fitSceneToView()
|
|
|
this.readGraph()
|
|
@@ -139,7 +139,7 @@ export default {
|
|
|
},
|
|
|
readGraph() {
|
|
|
this.readGroup(this.floorid)
|
|
|
- .then(data => {
|
|
|
+ .then((data) => {
|
|
|
if (data.Result == 'failure') {
|
|
|
this.$store.commit('SETISMESSAGE', false)
|
|
|
this.view.fitSceneToView()
|
|
@@ -183,7 +183,7 @@ export default {
|
|
|
scpzTable = data.Data[0].Elements.Nodes || []
|
|
|
console.log(scpzTable)
|
|
|
if (scpzTable.length > 0) {
|
|
|
- scpzTable.forEach(e => {
|
|
|
+ scpzTable.forEach((e) => {
|
|
|
if (e.Properties.ItemExplain) {
|
|
|
let obj = e
|
|
|
arr.push(obj)
|
|
@@ -196,8 +196,9 @@ export default {
|
|
|
if (data.Data[0].Elements.Nodes.length > 0) {
|
|
|
this.$store.commit('SETTYPENUM', '')
|
|
|
let Lengd = data.Data[0].Elements.Nodes
|
|
|
- Lengd.forEach(el => {
|
|
|
+ Lengd.forEach((el) => {
|
|
|
if (el.Type == 'Image' && el.Num > 1) {
|
|
|
+ console.log(el.Num)
|
|
|
this.$store.commit('SETTYPENUM', el.Num)
|
|
|
}
|
|
|
})
|
|
@@ -212,28 +213,28 @@ export default {
|
|
|
this.topologyParser = new STopologyParser(null)
|
|
|
this.topologyParser.parseData(data.Data[0].Elements)
|
|
|
// 多边形
|
|
|
- this.topologyParser.zoneLegendList.forEach(t => {
|
|
|
+ this.topologyParser.zoneLegendList.forEach((t) => {
|
|
|
this.scene.addItem(t)
|
|
|
})
|
|
|
// 增加文字
|
|
|
- this.topologyParser.textMarkerList.forEach(t => {
|
|
|
+ this.topologyParser.textMarkerList.forEach((t) => {
|
|
|
this.scene.addItem(t)
|
|
|
})
|
|
|
// 增加图片
|
|
|
- this.topologyParser.imageMarkerList.forEach(t => {
|
|
|
+ this.topologyParser.imageMarkerList.forEach((t) => {
|
|
|
this.scene.addItem(t)
|
|
|
})
|
|
|
// 增加直线
|
|
|
- this.topologyParser.lineMarkerList.forEach(t => {
|
|
|
+ this.topologyParser.lineMarkerList.forEach((t) => {
|
|
|
this.scene.addItem(t)
|
|
|
})
|
|
|
// 增加图标类图例
|
|
|
- this.topologyParser.imageLegendList.forEach(t => {
|
|
|
+ this.topologyParser.imageLegendList.forEach((t) => {
|
|
|
this.scene.addItem(t)
|
|
|
})
|
|
|
// 增加管线类
|
|
|
// 增加图标类图例
|
|
|
- this.topologyParser.relationList.forEach(t => {
|
|
|
+ this.topologyParser.relationList.forEach((t) => {
|
|
|
t.selectable = true
|
|
|
this.scene.addItem(t)
|
|
|
})
|
|
@@ -280,7 +281,7 @@ export default {
|
|
|
// 选中电井关联的商铺高亮
|
|
|
setHightLight(arr) {
|
|
|
this.clearHightLight()
|
|
|
- arr.forEach(item => {
|
|
|
+ arr.forEach((item) => {
|
|
|
let location = item.data.AttachObjectIds[0] ? item.data.AttachObjectIds[0].id : ''
|
|
|
// 添加了位置类型并且选中的类型为电井类型
|
|
|
if (
|
|
@@ -291,7 +292,7 @@ export default {
|
|
|
location
|
|
|
) {
|
|
|
if (this.wellMap.hasOwnProperty(location)) {
|
|
|
- this.wellMap[location].forEach(item => {
|
|
|
+ this.wellMap[location].forEach((item) => {
|
|
|
item.highLightFlag = true
|
|
|
item.zOrder = 30
|
|
|
})
|
|
@@ -299,23 +300,23 @@ export default {
|
|
|
let getParams = {
|
|
|
plazaId: this.plazaId,
|
|
|
floor: this.floorid,
|
|
|
- keyword: `${location}:wellnum;`
|
|
|
+ keyword: `${location}:wellnum;`,
|
|
|
}
|
|
|
- queryShops({ getParams }).then(res => {
|
|
|
+ queryShops({ getParams }).then((res) => {
|
|
|
let shopsnumList = []
|
|
|
let shopsnumItemList = []
|
|
|
if (res.data && res.data.length) {
|
|
|
for (let floor in res.data[0]) {
|
|
|
if (res.data[0][floor].length) {
|
|
|
- res.data[0][floor].forEach(v => {
|
|
|
+ res.data[0][floor].forEach((v) => {
|
|
|
shopsnumList = shopsnumList.concat(v.shopsnumList.split(','))
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (shopsnumList.length) {
|
|
|
- this.fParser.spaceList.forEach(item => {
|
|
|
- if (shopsnumList.findIndex(name => name == item.data.Name) != -1) {
|
|
|
+ this.fParser.spaceList.forEach((item) => {
|
|
|
+ if (shopsnumList.findIndex((name) => name == item.data.Name) != -1) {
|
|
|
item.highLightFlag = true
|
|
|
item.zOrder = 30
|
|
|
shopsnumItemList.push(item)
|
|
@@ -332,7 +333,7 @@ export default {
|
|
|
clearHightLight() {
|
|
|
ItemColor.spaceHighColor = new SColor('#FBF2CC')
|
|
|
for (let key in this.wellMap) {
|
|
|
- this.wellMap[key].forEach(item => {
|
|
|
+ this.wellMap[key].forEach((item) => {
|
|
|
item.highLightFlag = false
|
|
|
item.zOrder = ItemOrder.spaceOrder
|
|
|
})
|
|
@@ -369,7 +370,7 @@ export default {
|
|
|
// this.topologyParser.zoneLegendList.forEach(t => {
|
|
|
// t.showText = val
|
|
|
// })
|
|
|
- this.fParser.spaceList.forEach(t => {
|
|
|
+ this.fParser.spaceList.forEach((t) => {
|
|
|
t.showBaseName = val
|
|
|
})
|
|
|
},
|
|
@@ -380,7 +381,7 @@ export default {
|
|
|
FloorID: FloorID,
|
|
|
categoryId: this.categoryId ? this.categoryId : this.$cookie.get('categoryId'),
|
|
|
projectId: this.urlMsg.ProjectID,
|
|
|
- Pub: true
|
|
|
+ Pub: true,
|
|
|
}
|
|
|
return readGroup(data)
|
|
|
},
|
|
@@ -398,9 +399,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getEvent() {
|
|
|
- bus.$on('changeShow', res => {
|
|
|
+ bus.$on('changeShow', (res) => {
|
|
|
this.topologyParser &&
|
|
|
- this.topologyParser.zoneLegendList.forEach(t => {
|
|
|
+ this.topologyParser.zoneLegendList.forEach((t) => {
|
|
|
let id = t.data.GraphElementId
|
|
|
t.maskFlag = !(res.indexOf(id) > -1)
|
|
|
})
|
|
@@ -417,17 +418,17 @@ export default {
|
|
|
// t.maskFlag = !(res.indexOf(id) > -1)
|
|
|
// })
|
|
|
this.topologyParser &&
|
|
|
- this.topologyParser.imageLegendList.forEach(t => {
|
|
|
+ this.topologyParser.imageLegendList.forEach((t) => {
|
|
|
let id = t.data.GraphElementId
|
|
|
t.maskFlag = !(res.indexOf(id) > -1)
|
|
|
})
|
|
|
this.topologyParser &&
|
|
|
- this.topologyParser.relationList.forEach(t => {
|
|
|
+ this.topologyParser.relationList.forEach((t) => {
|
|
|
let id = t.data.GraphElementId || t.data.GraphElementID
|
|
|
t.maskFlag = !(res.indexOf(id) > -1)
|
|
|
})
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
'view.scale': {
|
|
@@ -436,11 +437,11 @@ export default {
|
|
|
let s = (n * 10) / this.view.minScale
|
|
|
this.$refs.canvasFun.sliderVal = s > 1000 ? 1000 : s
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
haveFengMap() {
|
|
|
this.init(this.floorid)
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
this.mapSize()
|
|
@@ -452,9 +453,9 @@ export default {
|
|
|
ProjectID: this.plazaId,
|
|
|
BuildingID: '1',
|
|
|
FloorID: this.$cookie.get('floorMapId') || 'f1',
|
|
|
- fmapID: this.fmapID
|
|
|
+ fmapID: this.fmapID,
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|