diff --git a/src/views/oneMap/BIM/Tunnel.vue b/src/views/oneMap/BIM/Tunnel.vue index f47e967..469770f 100644 --- a/src/views/oneMap/BIM/Tunnel.vue +++ b/src/views/oneMap/BIM/Tunnel.vue @@ -6,11 +6,11 @@
{{ item.name }}
-
+
{{ val.phy + ':' }}
{{ val.data + ' ' + val.unit }}
-
+
{{ '检测时间:' }}
{{ item.dataTime }}
@@ -62,6 +62,7 @@ data: [], show: false, pointCode: 'kohqORm', + type: 'noCamera', dataTime: '', toP: { x: -1133.3463853820936, @@ -91,6 +92,7 @@ data: [], show: false, pointCode: 'LtfAqBh', + type: 'noCamera', dataTime: '', toP: { x: -1124.7803151975775, @@ -119,6 +121,7 @@ data: [], show: false, pointCode: 'xr8JcRb', + type: 'noCamera', dataTime: '', toP: { x: -1819.6980136064515, @@ -147,6 +150,7 @@ data: [], show: false, pointCode: 'zkbTwJW', + type: 'noCamera', dataTime: '', toP: { x: -1266.88920076098, @@ -175,6 +179,7 @@ data: [], show: false, pointCode: '13G1Hnc', + type: 'noCamera', dataTime: '', // x: -1206.61582579935, y: 242.18907003183543, z: 347.6375845092009, // x: 17.1598356123087, y: -49.3413494843642, z: -667.1724185400914, @@ -221,6 +226,122 @@ ease: 'power4.out', }, }, + { + name: '杨家岭隧道上新城方向洞口摄像机', + id: `YuanDian7`, + type: 'Camera', + position: { + x: -1400, + y: 80, + z: 0, + }, + icon: '/Three/icon/sxj_icon.png', + data: [], + show: false, + pointCode: '114', + dataTime: '', + toP: { + x: -1886.2723566649995, + y: 172.12365675000004, + z: 415.1581516525, + duration: 2, + ease: 'power4.out', + }, + toC: { + x: 1, + y: 1, + z: -700, + duration: 2, + ease: 'power4.out', + }, + }, + { + name: '杨家岭隧道上新城方向洞内50米摄像机', + id: `YuanDian8`, + type: 'Camera', + position: { + x: -1200, + y: 80, + z: 0, + }, + icon: '/Three/icon/sxj_icon.png', + data: [], + show: false, + pointCode: '114', + dataTime: '', + toP: { + x: -1752.3189961540095, + y: 167.51961506630983, + z: 425.7947039102535, + duration: 2, + ease: 'power4.out', + }, + toC: { + x: 40.58974299599207, + y: 4.952140916309672, + z: -633.6055404897477, + duration: 2, + ease: 'power4.out', + }, + }, + { + name: '杨家岭隧道新城下山方向洞口摄像机', + id: `YuanDian9`, + type: 'Camera', + position: { + x: 1400, + y: 80, + z: -230, + }, + icon: '/Three/icon/sxj_icon.png', + data: [], + show: false, + pointCode: '114', + dataTime: '', + toP: { + x: 2084.596738127489, + y: 329.14146563769543, + z: -724.7590410737567, + duration: 2, + ease: 'power4.out', + }, + toC: { + x: 611.2649344201147, + y: 70.11387500990296, + z: 85.72625224535601, + duration: 2, + ease: 'power4.out', + }, + }, + { + name: '杨家岭隧道新城下山方向洞内50米摄像机', + id: `YuanDian10`, + type: 'Camera', + position: { + x: 1200, + y: 80, + z: -230, + }, + icon: '/Three/icon/sxj_icon.png', + data: [], + show: false, + pointCode: '114', + dataTime: '', + toP: { + x: 1902.5691003457061, + y: 217.24904311339517, + z: -644.2039002397069, + duration: 2, + ease: 'power4.out', + }, + toC: { + x: 219.1670066526854, + y: 83.89641838442645, + z: 193.82493356121392, + duration: 2, + ease: 'power4.out', + }, + }, ]); // const deviceCode = ref(null); // const stCode = ref(null); @@ -262,6 +383,15 @@ gsap.to(Camera.value.position, point.toP); // 视角 gsap.to(Controls.value.target, point.toC); + + if (point.type == 'Camera') { + let data = { + title: point.name, + comIDs: ['Imou'], + // getSiteId: item.id, + }; + bus.emit('publicDialog', data); + } }; /** @@ -475,8 +605,8 @@ LabelRenderer.value.render(Scene, Camera.value); const delta = clock.getDelta(); // 如需调试请打开这个获取Camera,Controls 的值 - // console.log("Camera.value", Camera.value); - // console.log("Controls.value", Controls.value); + console.log('Camera.value', Camera.value); + console.log('Controls.value', Controls.value); }; // 创建气泡窗 @@ -580,12 +710,28 @@ duration: 3, ease: 'power4.out', }); + } else if (data.name.includes('摄像机')) { + gsap.to(Camera.value.position, { + x: -2089.8630917049363, + y: 392.45239988083995, + z: 199.55056958129904, + duration: 3, + ease: 'power4.out', + }); + gsap.to(Controls.value.target, { + x: 85.31841663904818, + y: -146.20386737281635, + z: -379.58374669492827, + duration: 3, + ease: 'power4.out', + }); } // 打开弹窗 labelData.value.forEach(element => { + let val = element.type == 'Camera' ? '摄像机' : element.name; // if (element.name == data.name[0]) { - if (data.name.includes(element.name)) { + if (data.name.includes(val)) { element.show = true; } else { element.show = false; @@ -704,7 +850,7 @@ position: absolute; left: calc(50% + 19px); bottom: 12px; - width: 60px; + width: 80px; // height: 26px; background: linear-gradient(0deg, rgba(12, 54, 92, 0.6) 0%, rgba(12, 54, 92, 0.6) 100%); border-radius: 2px; diff --git a/src/views/oneMap/BIM/Tunnel.vue b/src/views/oneMap/BIM/Tunnel.vue index f47e967..469770f 100644 --- a/src/views/oneMap/BIM/Tunnel.vue +++ b/src/views/oneMap/BIM/Tunnel.vue @@ -6,11 +6,11 @@
{{ item.name }}
-
+
{{ val.phy + ':' }}
{{ val.data + ' ' + val.unit }}
-
+
{{ '检测时间:' }}
{{ item.dataTime }}
@@ -62,6 +62,7 @@ data: [], show: false, pointCode: 'kohqORm', + type: 'noCamera', dataTime: '', toP: { x: -1133.3463853820936, @@ -91,6 +92,7 @@ data: [], show: false, pointCode: 'LtfAqBh', + type: 'noCamera', dataTime: '', toP: { x: -1124.7803151975775, @@ -119,6 +121,7 @@ data: [], show: false, pointCode: 'xr8JcRb', + type: 'noCamera', dataTime: '', toP: { x: -1819.6980136064515, @@ -147,6 +150,7 @@ data: [], show: false, pointCode: 'zkbTwJW', + type: 'noCamera', dataTime: '', toP: { x: -1266.88920076098, @@ -175,6 +179,7 @@ data: [], show: false, pointCode: '13G1Hnc', + type: 'noCamera', dataTime: '', // x: -1206.61582579935, y: 242.18907003183543, z: 347.6375845092009, // x: 17.1598356123087, y: -49.3413494843642, z: -667.1724185400914, @@ -221,6 +226,122 @@ ease: 'power4.out', }, }, + { + name: '杨家岭隧道上新城方向洞口摄像机', + id: `YuanDian7`, + type: 'Camera', + position: { + x: -1400, + y: 80, + z: 0, + }, + icon: '/Three/icon/sxj_icon.png', + data: [], + show: false, + pointCode: '114', + dataTime: '', + toP: { + x: -1886.2723566649995, + y: 172.12365675000004, + z: 415.1581516525, + duration: 2, + ease: 'power4.out', + }, + toC: { + x: 1, + y: 1, + z: -700, + duration: 2, + ease: 'power4.out', + }, + }, + { + name: '杨家岭隧道上新城方向洞内50米摄像机', + id: `YuanDian8`, + type: 'Camera', + position: { + x: -1200, + y: 80, + z: 0, + }, + icon: '/Three/icon/sxj_icon.png', + data: [], + show: false, + pointCode: '114', + dataTime: '', + toP: { + x: -1752.3189961540095, + y: 167.51961506630983, + z: 425.7947039102535, + duration: 2, + ease: 'power4.out', + }, + toC: { + x: 40.58974299599207, + y: 4.952140916309672, + z: -633.6055404897477, + duration: 2, + ease: 'power4.out', + }, + }, + { + name: '杨家岭隧道新城下山方向洞口摄像机', + id: `YuanDian9`, + type: 'Camera', + position: { + x: 1400, + y: 80, + z: -230, + }, + icon: '/Three/icon/sxj_icon.png', + data: [], + show: false, + pointCode: '114', + dataTime: '', + toP: { + x: 2084.596738127489, + y: 329.14146563769543, + z: -724.7590410737567, + duration: 2, + ease: 'power4.out', + }, + toC: { + x: 611.2649344201147, + y: 70.11387500990296, + z: 85.72625224535601, + duration: 2, + ease: 'power4.out', + }, + }, + { + name: '杨家岭隧道新城下山方向洞内50米摄像机', + id: `YuanDian10`, + type: 'Camera', + position: { + x: 1200, + y: 80, + z: -230, + }, + icon: '/Three/icon/sxj_icon.png', + data: [], + show: false, + pointCode: '114', + dataTime: '', + toP: { + x: 1902.5691003457061, + y: 217.24904311339517, + z: -644.2039002397069, + duration: 2, + ease: 'power4.out', + }, + toC: { + x: 219.1670066526854, + y: 83.89641838442645, + z: 193.82493356121392, + duration: 2, + ease: 'power4.out', + }, + }, ]); // const deviceCode = ref(null); // const stCode = ref(null); @@ -262,6 +383,15 @@ gsap.to(Camera.value.position, point.toP); // 视角 gsap.to(Controls.value.target, point.toC); + + if (point.type == 'Camera') { + let data = { + title: point.name, + comIDs: ['Imou'], + // getSiteId: item.id, + }; + bus.emit('publicDialog', data); + } }; /** @@ -475,8 +605,8 @@ LabelRenderer.value.render(Scene, Camera.value); const delta = clock.getDelta(); // 如需调试请打开这个获取Camera,Controls 的值 - // console.log("Camera.value", Camera.value); - // console.log("Controls.value", Controls.value); + console.log('Camera.value', Camera.value); + console.log('Controls.value', Controls.value); }; // 创建气泡窗 @@ -580,12 +710,28 @@ duration: 3, ease: 'power4.out', }); + } else if (data.name.includes('摄像机')) { + gsap.to(Camera.value.position, { + x: -2089.8630917049363, + y: 392.45239988083995, + z: 199.55056958129904, + duration: 3, + ease: 'power4.out', + }); + gsap.to(Controls.value.target, { + x: 85.31841663904818, + y: -146.20386737281635, + z: -379.58374669492827, + duration: 3, + ease: 'power4.out', + }); } // 打开弹窗 labelData.value.forEach(element => { + let val = element.type == 'Camera' ? '摄像机' : element.name; // if (element.name == data.name[0]) { - if (data.name.includes(element.name)) { + if (data.name.includes(val)) { element.show = true; } else { element.show = false; @@ -704,7 +850,7 @@ position: absolute; left: calc(50% + 19px); bottom: 12px; - width: 60px; + width: 80px; // height: 26px; background: linear-gradient(0deg, rgba(12, 54, 92, 0.6) 0%, rgba(12, 54, 92, 0.6) 100%); border-radius: 2px; diff --git a/src/views/oneMap/BIM/WangJiaPIng.vue b/src/views/oneMap/BIM/WangJiaPIng.vue index 1af3f2e..00a30ef 100644 --- a/src/views/oneMap/BIM/WangJiaPIng.vue +++ b/src/views/oneMap/BIM/WangJiaPIng.vue @@ -66,16 +66,16 @@ pointCode: 'WL62zX5', dataTime: '', toP: { - x: -3.4275854949690405, - y: 6.014608816119227, - z: 15.647282038788425, + x: -2.6309215167693845, + y: 4.332423113638442, + z: 21.572960056289727, duration: 2, ease: 'power4.out', }, toC: { - x: 7.561176426407801, - y: 0.6320232520067101, - z: -19.092906168190034, + x: 5.2676576739806205, + y: 1.083337105388434, + z: -19.44099716858533, duration: 2, ease: 'power4.out', }, @@ -177,16 +177,16 @@ pointCode: '111', dataTime: '', toP: { - x: -13.954768127208757, - y: 9.144133578831738, - z: 13.960491837603278, + x: -2.6309215167693845, + y: 4.332423113638442, + z: 21.572960056289727, duration: 2, ease: 'power4.out', }, toC: { - x: 9.835408537355255, - y: 1.0627884244726582, - z: -12.971369355803468, + x: 5.2676576739806205, + y: 1.083337105388434, + z: -19.44099716858533, duration: 2, ease: 'power4.out', }, @@ -196,9 +196,9 @@ id: `YuanDian6`, type: 'noCamera', position: { - x: -36.5, + x: -1.5, y: 0, - z: -0.2, + z: -0.5, }, icon: '/Three/icon/jsdj_icon.png', data: [], @@ -206,16 +206,16 @@ pointCode: '111', dataTime: '', toP: { - x: -59.96926543723423, - y: 6.331938008319503, - z: 2.9004028497659053, + x: -2.6309215167693845, + y: 4.332423113638442, + z: 21.572960056289727, duration: 2, ease: 'power4.out', }, toC: { - x: 10.108157629676402, - y: 1.2565664315127176, - z: -11.639609037071937, + x: 5.2676576739806205, + y: 1.083337105388434, + z: -19.44099716858533, duration: 2, ease: 'power4.out', }, @@ -279,7 +279,7 @@ }, }, { - name: '摄像机', + name: '彩虹桥延安中学方向摄像机', id: `YuanDian9`, type: 'Camera', position: { @@ -308,7 +308,7 @@ }, }, { - name: '摄像机', + name: '彩虹桥纪念馆方向摄像机', id: `YuanDian10`, type: 'Camera', position: { @@ -607,8 +607,8 @@ LabelRenderer.value.render(Scene, Camera.value); const delta = clock.getDelta(); // 如需调试请打开这个获取Camera,Controls 的值 - console.log('Camera.value', Camera.value); - console.log('Controls.value', Controls.value); + // console.log('Camera.value', Camera.value); + // console.log('Controls.value', Controls.value); }; // 创建气泡窗 @@ -746,7 +746,8 @@ // 打开弹窗 labelData.value.forEach(element => { - if (element.name == data.name[0]) { + let val = element.type == 'Camera' ? '摄像机' : element.name; + if (data.name.includes(val)) { element.show = true; } else { element.show = false;