|
@@ -214,16 +214,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 查看浮层设备详情
|
|
|
- handleClickEquipDetail(row) {
|
|
|
- if (row.assetnum) {
|
|
|
- this.$refs.equipDetail.open({ row: JSON.stringify(row) })
|
|
|
- }
|
|
|
- },
|
|
|
// handleClickEquipDetail(row) {
|
|
|
- // if (row.assetuid) {
|
|
|
- // window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=assetdevic&uniqueid=${row.assetuid}`)
|
|
|
+ // if (row.assetnum) {
|
|
|
+ // this.$refs.equipDetail.open({ row: JSON.stringify(row) })
|
|
|
// }
|
|
|
// },
|
|
|
+ handleClickEquipDetail(row) {
|
|
|
+ if (row.assetuid) {
|
|
|
+ window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=assetdevic&uniqueid=${row.assetuid}`)
|
|
|
+ }
|
|
|
+ },
|
|
|
// 查看浮层位置详情
|
|
|
handleClickPointDeatil(point) {
|
|
|
if (point.id && this.activeItem) this.$refs.boxRoom.open({ name: this.activeItem.name, type: this.type, location: point.id })
|
|
@@ -690,6 +690,22 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ /**
|
|
|
+ * @description 处理popover显隐
|
|
|
+ * 当点击位置不在canvas内部时 ( 如点击 页面空白,图例,楼层,设备设施左侧列表项时),将popover的display置为none,
|
|
|
+ * 当点击位置在canvas内部时,将popover的display设置为'block'
|
|
|
+ */
|
|
|
+ handlePopover(e) {
|
|
|
+ if (this.$refs.graphy.contains(e.target)) {
|
|
|
+ if (this.$refs.popover && this.$refs.popover.popperElm) {
|
|
|
+ this.$refs.popover.popperElm.style.display = 'block'
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.$refs.popover && this.$refs.popover.popperElm) {
|
|
|
+ this.$refs.popover.popperElm.style.display = 'none'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
'view.scale': {
|
|
@@ -707,6 +723,11 @@ export default {
|
|
|
mounted() {
|
|
|
this.mapSize()
|
|
|
this.getEvent()
|
|
|
+ // 添加监听点击事件,处理popover显隐
|
|
|
+ window.addEventListener('click', this.handlePopover, false)
|
|
|
+ this.$once('hook:beforeDestroy', () => {
|
|
|
+ window.removeEventListener('click', this.handlePopover)
|
|
|
+ })
|
|
|
},
|
|
|
created() {
|
|
|
// document.addEventListener("mousedown", () => {
|