diff --git a/src/components/monitoring/backHome.vue b/src/components/monitoring/backHome.vue index a709262..392abe9 100644 --- a/src/components/monitoring/backHome.vue +++ b/src/components/monitoring/backHome.vue @@ -95,7 +95,7 @@ bfHelper.clearTags() // } - console.log('返回') + console.log('返回-------------------------------') if (this.bimModel == 1) { window.sessionStorage.removeItem('build'); @@ -164,10 +164,11 @@ this.$parent.isControl = false; this.$parent.$refs.clickcp.tower = null; } else if (this.type == '监控') { - + console.log('监控------------------------------------') this.$parent.initial(); this.$parent.setTowerMonitor(); this.$parent.reload = 100; + this.$parent.getAllDevice(); if (this.bimModel == 1) { bfHelper.lookPipeline(null, null, this.condition, '监控'); this.$parent.$refs.clickcp.active = 25; diff --git a/src/components/monitoring/clickCp.vue b/src/components/monitoring/clickCp.vue index 5588070..5439a73 100644 --- a/src/components/monitoring/clickCp.vue +++ b/src/components/monitoring/clickCp.vue @@ -305,6 +305,7 @@ export default { this.active = this.active == '' ? 25 : this.active this.ttActive = this.ttActive == '' ? 20 : this.ttActive console.log('进入此方法111111111111111',this.type); + // bfHelper.clearCluster(); this.getTypeList(this.type) },500) @@ -340,6 +341,7 @@ export default { console.log('typeList ====>',this.typeList, this.page) }) }else if(type == 'floor'){ + bfHelper.clearCluster() this.typeList = []; let build = this.bimModel == 1 ? (this.tower + 1) :3; let layer = this.bimModel == 1 ? this.active : this.ttActive @@ -589,6 +591,7 @@ export default { } else if (this.sbType == '暖') { this.$parent.setTowerWarm(); } else if (this.sbType == '监控') { + console.log('11111111111111111111111111') this.$parent.$refs.backHome.clickBack(); } else if (this.sbType == '空调') { bfHelper.extObjMngClear(); //清除外部构件 diff --git a/src/components/monitoring/monitoring.vue b/src/components/monitoring/monitoring.vue index 6b00191..8fbecf6 100644 --- a/src/components/monitoring/monitoring.vue +++ b/src/components/monitoring/monitoring.vue @@ -319,7 +319,9 @@ export default { zoom: 1, }, isShowAll: true, //显示所有的摄像头 - dialogItem: {} + dialogItem: {}, + tagsArr:[], // 聚合标签数组 + changeBim:false //是否切换bim }; }, created() { @@ -346,6 +348,8 @@ export default { watch: { bimModel: { handler(newVal, oldVal) { + console.log('bimModel-------------------------------',bimModel) + this.changeBim = true this.checkList = []; this.build = ""; this.current = 1; //当前页 @@ -384,8 +388,12 @@ export default { "$store.state.bfHelperState.bfState": { immediate: true, handler(newval, olval) { - console.log('bfState',newval) + bfHelper.resetStatus(2); + console.log('bfState--------------------------',newval) if (newval) { + bfHelper.clearCluster(); + bfHelper.clearDrawableContainer() + this.changeBim = false // 模型恢复全部状态 bfHelper.resetStatus(2); this.onClick(); @@ -394,10 +402,12 @@ export default { "camera", JSON.stringify(bfHelper.getCameraStatus()) ); - let build = sessionStorage.getItem("build"); + let build = sessionStorage.getItem("build") == 26 ? null : sessionStorage.getItem("build"); let floor = sessionStorage.getItem("floor"); let type = sessionStorage.getItem('type') ? sessionStorage.getItem('type') : 'build' this.getCameraPosi(); + console.log('build------------------------------',build) + if (build) { if (build == 10) { setTimeout(() => { @@ -415,10 +425,12 @@ export default { "监控" ); } else if (build == 26) { + console.log('bulid26----------------------------->') + bfHelper.lookPipeline(null, null, this.condition, "监控"); this.$refs.clickcp.active = 26; this.$refs.clickcp.type = 'build'; this.$refs.clickcp.area = 1; - bfHelper.lookPipeline(null, null, this.condition, "监控"); + console.log('bulid26-----------------------------') bfHelper.setOpacityFun(); setTimeout(() => { this.setTowerMonitor(); @@ -576,6 +588,7 @@ export default { this.comeBim() } } + this.getAllDevice() }, }, @@ -889,6 +902,7 @@ export default { this.$message.error('对不起,暂无该设备模型,请稍后点击'); } else { // bfHelper.resetStatus(2); + bfHelper.clearCluster() bfHelper.clearDrawableContainer(); id = bfHelper.disposeId(item.area, item.build, item.modelId); // let id = disposeId(item.area, item.build, item.modelId); @@ -935,9 +949,12 @@ export default { if (item.modelId == "") { this.$message.error('对不起,暂无该设备模型,请稍后点击'); } else { - bfHelper.mapDestroy(); + + // bfHelper.mapDestroy(); + bfHelper.clearCluster() bfHelper.clearDrawableContainer(); id = bfHelper.disposeId(item.area, item.build, item.modelId); + console.log('item-----------------------------',item) this.addLabel( id, item.name, @@ -1902,6 +1919,7 @@ export default { // 点击操作跳转监控页 getMonitorIds(build, floor, code) { getMonitoringList(this.bimModel, build, floor).then((res) => { + // bfHelper.clearDrawableContainer(); const data = res.data.data; let idArr = []; @@ -2195,6 +2213,159 @@ export default { }); }); }, + // 获取所有监控设备列表 + getAllDevice(){ + if(((!this.build && !this.floor) || (this.build == '' && this.floor == '') ) && !this.changeBim){ + getMonitoringList( + this.bimModel, + '', + '' + ).then(res =>{ + this.tagsArr = res.data.data + console.log('tagsArr----------------------',this.tagsArr) + this.initMonitTags(this.bimModel) + }) + } + }, + // 初次渲染监控标签 + monitorContent(id, status) { + //图标标签显示内容 + let content1 = `