|
|
|
|
@ -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 = `<div class="leadTips" style="transform: translateY(-40px);"> |
|
|
|
|
<div style="display: flex;width:max-content"> |
|
|
|
|
<img id='minitoring${id}' class = 'montorImg' src="${require(status == 90000 |
|
|
|
|
? "../../../public/img/monitoring/electricity/camera11.png" |
|
|
|
|
: status == 90001 |
|
|
|
|
? "../../../public/img/monitoring/electricity/camera-off.png" |
|
|
|
|
: "../../../public/img/monitoring/electricity/camera-bj.png")}" style="width:40px;height:40px;"/> |
|
|
|
|
</div> |
|
|
|
|
</div>`; |
|
|
|
|
return content1; |
|
|
|
|
}, |
|
|
|
|
initMonitTags(bimModel) { |
|
|
|
|
console.log('bimType-----------------------------',this.$refs.clickcp.type) |
|
|
|
|
if(this.$refs.clickcp.type != 'floor'){ |
|
|
|
|
|
|
|
|
|
//初始化时显示所有监控标签 |
|
|
|
|
for (let i = 0; i < this.tagsArr.length; i++) { |
|
|
|
|
if(this.tagsArr[i].modelId != '' && this.tagsArr[i].modelId != '模型无'){ |
|
|
|
|
let id = bfHelper.disposeId( |
|
|
|
|
this.tagsArr[i].area, |
|
|
|
|
this.tagsArr[i].build, |
|
|
|
|
this.tagsArr[i].modelId |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
if (JSON.stringify(bfHelper.getBoxMessage(id, true))) { |
|
|
|
|
let zb = bfHelper.getBoxMessage(id, true).max; |
|
|
|
|
bfHelper.customTag( |
|
|
|
|
zb, |
|
|
|
|
null, |
|
|
|
|
this.monitorContent(id, this.tagsArr[i].status) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
bfHelper.createClusterItem() |
|
|
|
|
|
|
|
|
|
window.addEventListener("click", (e) => { |
|
|
|
|
//监听事件 |
|
|
|
|
if (e.target.id.indexOf("minitoring") != -1) { |
|
|
|
|
getmonData(this.bimModel, e.target.id.substring(25)).then((res) => { |
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.bjClick(data) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// if(this.bimModel == 2){ |
|
|
|
|
// getmonData(this.bimModel, e.target.id.substring(10)).then((res) => { |
|
|
|
|
// this.bjClick(data) |
|
|
|
|
// }) |
|
|
|
|
// }else{ |
|
|
|
|
// getmonData(this.bimModel, e.target.id.substring(25)).then((res) => { |
|
|
|
|
// const data = res.data.data; |
|
|
|
|
// this.bjClick(data) |
|
|
|
|
// // if (res.data.data.status != 90001) { |
|
|
|
|
// // console.log('data-----------------',data) |
|
|
|
|
// // id = bfHelper.disposeId(data.area, data.build, data.modelId) |
|
|
|
|
// // this.addLabel( |
|
|
|
|
// // id, |
|
|
|
|
// // data.name, |
|
|
|
|
// // data.status, |
|
|
|
|
// // data.location, |
|
|
|
|
// // data.dataNum |
|
|
|
|
// // ); |
|
|
|
|
// // this.$refs.clickcp.active = commonValue.activeValue( |
|
|
|
|
// // Number(data.build), |
|
|
|
|
// // Number(data.floored) |
|
|
|
|
// // ); |
|
|
|
|
// // this.$refs.clickcp.tower = commonValue.towerValue(data.build); |
|
|
|
|
// // let camera = bfHelper.cameraPosition[Number(data.build) - 1]; |
|
|
|
|
// // window.sessionStorage.setItem("camera", JSON.stringify(camera)); |
|
|
|
|
// // if (data.build == "00") { |
|
|
|
|
// // bfHelper.navigationMap( |
|
|
|
|
// // ".mapDom", |
|
|
|
|
// // require("../../../public/img/monitoring/mapviewer/total.png"), |
|
|
|
|
// // 8, |
|
|
|
|
// // 1 |
|
|
|
|
// // ); |
|
|
|
|
// // this.buildMessage = "园区"; |
|
|
|
|
// // bfHelper.lookPipeline(null, null, this.condition, "监控"); |
|
|
|
|
// // } else if (data.build == "07") { |
|
|
|
|
// // bfHelper.navigationMap( |
|
|
|
|
// // ".mapDom", |
|
|
|
|
// // require("../../../public/img/monitoring/mapviewer/electricity7b.png"), |
|
|
|
|
// // 7, |
|
|
|
|
// // 1 |
|
|
|
|
// // ); |
|
|
|
|
// // this.buildMessage = "地下室"; |
|
|
|
|
// // let camera = bfHelper.cameraPosition[9]; |
|
|
|
|
// // window.sessionStorage.setItem("camera", JSON.stringify(camera)); |
|
|
|
|
// // bfHelper.lookPipeline2( |
|
|
|
|
// // this.condition, |
|
|
|
|
// // bfHelper.equipmentCopColors[0], |
|
|
|
|
// // 9, |
|
|
|
|
// // null, |
|
|
|
|
// // "监控", |
|
|
|
|
// // null, |
|
|
|
|
// // null, |
|
|
|
|
// // true |
|
|
|
|
// // ); |
|
|
|
|
// // } else { |
|
|
|
|
// // bfHelper.navigationMap( |
|
|
|
|
// // ".mapDom", |
|
|
|
|
// // require("../../../public/img/monitoring/mapviewer/monitor" + |
|
|
|
|
// // Number(data.build) + |
|
|
|
|
// // "b" + |
|
|
|
|
// // Number(data.floored) + |
|
|
|
|
// // "f.png"), |
|
|
|
|
// // Number(data.build), |
|
|
|
|
// // Number(data.floored) |
|
|
|
|
// // ); |
|
|
|
|
// // this.buildMessage = |
|
|
|
|
// // Number(data.build) + "号楼" + Number(data.floored) + "层"; |
|
|
|
|
// // // let camera = bfHelper.cameraPosition[Number(data.build) - 1]; |
|
|
|
|
// // // window.sessionStorage.setItem("camera", JSON.stringify(camera)); |
|
|
|
|
// // bfHelper.lookPipeline2( |
|
|
|
|
// // this.condition, |
|
|
|
|
// // bfHelper.equipmentCopColors[0], |
|
|
|
|
// // data.build - 1, |
|
|
|
|
// // Number(data.floored), |
|
|
|
|
// // "监控", |
|
|
|
|
// // null, |
|
|
|
|
// // null, |
|
|
|
|
// // true |
|
|
|
|
// // ); |
|
|
|
|
// // } |
|
|
|
|
|
|
|
|
|
// // bfHelper.setOpacityFun(false); |
|
|
|
|
// // } else { |
|
|
|
|
// // this.$message.warning("设备离线,不可查看"); |
|
|
|
|
// // } |
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|