update(电):增加电箱点击事件

main
guanxiaohan 12 months ago
parent a35e2ec881
commit c70461ab7c
  1. BIN
      public/img/monitoring/electricity/dianBiao.png
  2. 102
      src/components/monitoring/electricity.vue
  3. 9
      src/util/bfHelper.js
  4. 8
      vue.config.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

@ -409,6 +409,7 @@ import {
onClick,
getObjectDataById,
clearDrawableContainer,
removeGlowEffectById,
zoomToBoundingBox,
cameraPosition,
mapUpdate,
@ -488,7 +489,9 @@ export default {
tataiTotal: "",
isMapViewer: 0,
alarmAlert: true, //
dialogItem: {}
dialogItem: {},
items: Array.from({ length: 15 }, (_, i) => i + 1), // 1 15
dianXiangData: null
};
},
created() {
@ -496,6 +499,9 @@ export default {
window["handleDetail"] = () => {
this.handleDetail()
};
window["handleCloseDialog"] = () => {
this.handleCloseDialog()
};
},
beforeDestroy() {
if (this.setInterval) {
@ -634,6 +640,94 @@ export default {
setOpacityFun(false,0.3);
this.comeBim();
}
bfHelper.onClick((data) => {
if (this.tower == '03' && this.layer == '01') {
if (bfHelper.getCondition(data.objectId).family == '低压配电柜' || bfHelper.getCondition(data.objectId).family == '高压配电柜') {
if (this.dianXiangData && this.dianXiangData.objectId == data.objectId) {
clearDrawableContainer();
this.dianXiangData = null
return
}
this.dianXiangData = data
clearDrawableContainer();
// id////
//
let zb = getBoxMessage(data.objectId, true);
console.log('zb', zb)
// //线
let position = zb.max;
let content =
`<div class="leadTips" style="transform: translate(85px, -50px);">
<div style="display: flex; width:max-content">
<img
src="${require("../../../public/img/monitoring/electricity/customTag1.png")}"
style="position: absolute; left: -86px;"
/>
<div style="margin-top: -42px;">
<div style="
width: 185px; height: 46px;
background: url('${require("../../../public/img/monitoring/electricity/customTag1-1.png")}');
background-repeat: no-repeat;
background-size: cover;
display: flex;
align-items: center;
justify-content: space-between;
">
<span style="
padding-left: 36px;
font-size: 15px;
color: white;
margin-top: -15px;
">配电箱</span>
<button style="
margin-top: -15px;
margin-right: 6px;
background: transparent;
border: none;
color: white;"
onclick="handleCloseDialog()"
>X</button>
</div>
<div style="
margin-top: 5px;
box-sizing: border-box;
color: #ffffff;
width: 185px;
padding: 0 15px;
background-color: rgba(30, 57, 102, 0.8);
">
<div
id="image-container"
style="
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding-bottom: 10px;
"></div>
</div>
</div>
</div>
</div>`;
customTag(position, null, content);
this.$nextTick(() => {
const imageContainer = document.getElementById('image-container');
console.log(imageContainer)
if (imageContainer) {
for(let i = 0; i < 15; i++) {
const img = document.createElement('img');
img.src = require("../../../public/img/monitoring/electricity/dianBiao.png");
img.style.width = '30px';
img.style.height = '30px';
img.style.margin = '10px 0 0 0';
imageContainer.appendChild(img);
}
}
})
} else {
clearDrawableContainer()
}
}
})
} else {
// 线
window.sessionStorage.setItem(
@ -900,6 +994,12 @@ export default {
handleDetail() {
this.$router.push(`/equipment/operationDetails?code=${this.dialogItem.code}&type=电&area=${this.bimModel}`)
},
handleCloseDialog() {
console.log('handleCloseDialog')
bfHelper.clearGlowEffect()
bfHelper.cancelSelected()
clearDrawableContainer()
},
// ()
onClick() {
onClick((data) => {

@ -3006,6 +3006,7 @@ const onSDKLoadSucceeded = (viewMetaData) => {
function (e) {
console.log(e);
let condition = viewer3D.getObjectDataById(e.objectId);
getCondition(condition)
console.log('condition', condition);
}
);
@ -3023,6 +3024,11 @@ const onSDKLoadSucceeded = (viewMetaData) => {
}
};
const getCondition = (objectId) => {
let condition = viewer3D.getObjectDataById(objectId);
return condition
}
// 获取点击构件的筛选条件
const getObjectDataById = (objectId) => {
// console.log(objectId)
@ -6063,5 +6069,6 @@ export {
ttequipmentCondition2,
cameraPosition,
buildBoxbounding,
settoumingdu
settoumingdu,
getCondition
};

@ -30,7 +30,7 @@ module.exports = {
// target: 'http://192.168.3.58:8001',
// target: 'http://192.168.1.105:8001',
// target: 'http://192.168.1.34:8001',
target: 'http://192.168.1.5:8001',
target: 'http://192.168.1.4:8001',
// target: 'http://192.168.1.106:8001',
// target: 'http://192.168.0.115:8001',
ws: true,
@ -53,7 +53,7 @@ module.exports = {
// target: 'http://192.168.79.129',
// target: "http://192.168.1.106",
// target: "http://192.168.1.105:80",
target: "http://192.168.1.5:80",
target: "http://192.168.1.4:80",
// target: "http://192.168.1.34:80",
// target: "http://192.168.0.115",
// target: "http://10.90.100.204",
@ -66,14 +66,14 @@ module.exports = {
},
},
"/monitor-system": {
target: "http://192.168.1.5:8080",
target: "http://192.168.1.4:8080",
ws: true,
// pathRewrite: {
// "^/monitor-system": "/",
// },
},
"/monitor-business": {
target: "http://192.168.1.5:8080",
target: "http://192.168.1.4:8080",
ws: true,
// pathRewrite: {
// "^/monitor-system": "/",

Loading…
Cancel
Save