|
@@ -27,7 +27,15 @@ export default {
|
|
|
tooltipDialogArr: [],
|
|
|
alwaysShowDialogArr: [],
|
|
|
overlapCamera: {
|
|
|
- overlapCameras: [], //重叠人员的显示
|
|
|
+ overlapCameras: [], //重叠摄像头的显示
|
|
|
+ show: false,
|
|
|
+ position: {
|
|
|
+ x: '0px',
|
|
|
+ y: '0px',
|
|
|
+ },
|
|
|
+ },
|
|
|
+ overlapFire: {
|
|
|
+ overlapFires: [], //重叠火灾报警器的显示
|
|
|
show: false,
|
|
|
position: {
|
|
|
x: '0px',
|
|
@@ -38,7 +46,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['mapPopupConfig', 'modelList', 'rtTag']),
|
|
|
+ ...mapGetters(['mapPopupConfig', 'modelList', 'rtTag', 'buildInfo']),
|
|
|
},
|
|
|
watch: {
|
|
|
mapPopupConfig(newVal) {
|
|
@@ -92,7 +100,7 @@ export default {
|
|
|
? pickObj.id.properties._type._value
|
|
|
: ''
|
|
|
: ''
|
|
|
- console.log(type)
|
|
|
+ console.log(type, pickObj.id)
|
|
|
const data = pickObj.id.properties
|
|
|
? pickObj.id.properties._details
|
|
|
? pickObj.id.properties._details._value
|
|
@@ -167,10 +175,9 @@ export default {
|
|
|
})
|
|
|
} else if (type === 'fbky') {
|
|
|
console.log("数据内容fbky:----------------", data);
|
|
|
-
|
|
|
// this.$store.dispatch('dialog/openLayerDetailDialog', {
|
|
|
// id: data.id,
|
|
|
- // type: 'fxqy',
|
|
|
+ // type: 'fbky',
|
|
|
// detail: { ...data },
|
|
|
// })
|
|
|
} else if (type === '集气站' || type === '汇管' || type === '井管' || type === '站间管' || type === '井') {
|
|
@@ -184,6 +191,71 @@ export default {
|
|
|
console.log(trackPointDetails)
|
|
|
} else if (type === 'building') {
|
|
|
this.showModelToolTip(pickObj.id.code, pickObj.id.name, pickObj, obj)
|
|
|
+ } else if (type === 'layer_perimeter') {
|
|
|
+ const data = pickObj.id.properties ? pickObj.id.properties.segment._value : ''
|
|
|
+ if (this.mapDialogConfig.perimeter.some(item => item.dialogMsg?.data?.id == data.id)) {
|
|
|
+ this.mapDialogConfig.perimeter = this.mapDialogConfig.perimeter.filter(
|
|
|
+ item => item.dialogMsg?.data?.id != data.id
|
|
|
+ )
|
|
|
+ }
|
|
|
+ this.mapDialogConfig.perimeter.push({
|
|
|
+ show: false,
|
|
|
+ dialogMsg: { data, position: [longitude, latitude, height] },
|
|
|
+ })
|
|
|
+ console.log("周界信息", this.mapDialogConfig.perimeter)
|
|
|
+ for (let d of this.mapDialogConfig.perimeter) {
|
|
|
+ ; (() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ d.show = true
|
|
|
+ if (d.dialogMsg.data.cameras?.length) {
|
|
|
+ this.$store.dispatch('dialog/openVideoDialog', d.dialogMsg.data.cameras[0].cameraId)
|
|
|
+ }
|
|
|
+ this.$store.dispatch('home/setMapPopupConfig', {
|
|
|
+ isShow: true,
|
|
|
+ type: 'point',
|
|
|
+ position: d.dialogMsg?.position,
|
|
|
+ dialogid: 'perimeter_' + d.dialogMsg?.data?.id,
|
|
|
+ p1: 132,
|
|
|
+ p2: 236,
|
|
|
+ })
|
|
|
+ }, 0)
|
|
|
+ })()
|
|
|
+ }
|
|
|
+
|
|
|
+ } else if (type === 'layer_fire') {
|
|
|
+ // if (this.mapDialogConfig.fire.some(item => item.dialogMsg?.data?.id == data.id)) {
|
|
|
+ // this.mapDialogConfig.fire = this.mapDialogConfig.fire.filter(
|
|
|
+ // item => item.dialogMsg?.data?.id != data.id
|
|
|
+ // )
|
|
|
+ // }
|
|
|
+ const fireInfo = pickObj.id.properties._details._value
|
|
|
+ const gpsAlarmPoint = this.transPosition([{ x: fireInfo.location.x, y: fireInfo.location.y, z: fireInfo.height }])
|
|
|
+ console.log('坐标点转化', gpsAlarmPoint);
|
|
|
+ fireInfo.alarmType = -1
|
|
|
+ this.mapDialogConfig.fire = []
|
|
|
+ console.log("无报警", this.mapDialogConfig.fire);
|
|
|
+ this.mapDialogConfig.fire.push({
|
|
|
+ show: false,
|
|
|
+ dialogMsg: { data: fireInfo, position: [gpsAlarmPoint[0][0], gpsAlarmPoint[0][1], gpsAlarmPoint[0][2]] },
|
|
|
+ })
|
|
|
+ for (let d of this.mapDialogConfig.fire) {
|
|
|
+ ; (() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ d.show = true
|
|
|
+ if (d.dialogMsg.data.cameras?.length) {
|
|
|
+ this.$store.dispatch('dialog/openVideoDialog', d.dialogMsg.data.cameras[0].cameraId)
|
|
|
+ }
|
|
|
+ this.$store.dispatch('home/setMapPopupConfig', {
|
|
|
+ isShow: true,
|
|
|
+ type: 'point',
|
|
|
+ position: [gpsAlarmPoint[0][0], gpsAlarmPoint[0][1], gpsAlarmPoint[0][2]],
|
|
|
+ dialogid: 'fire_' + d.dialogMsg?.data?.id,
|
|
|
+ p1: 140,
|
|
|
+ p2: 236,
|
|
|
+ })
|
|
|
+ }, 0)
|
|
|
+ })()
|
|
|
+ }
|
|
|
} else if (type === 'layer_jgyt_Point') {
|
|
|
if (this.mapDialogConfig.jgyt.some(item => item.dialogMsg?.data?.id == data.id)) {
|
|
|
this.mapDialogConfig.jgyt = this.mapDialogConfig.jgyt.filter(
|
|
@@ -360,7 +432,7 @@ export default {
|
|
|
|
|
|
if (cDefined(pickObj)) {
|
|
|
if (pickObj.id && pickObj.id instanceof Entity) {
|
|
|
- console.log(pickObj)
|
|
|
+ // console.log("鼠标位置信息", pickObj)
|
|
|
const type = pickObj.id.properties ? pickObj.id.properties._type._value : ''
|
|
|
if (type === 'person') {
|
|
|
this.overlapWindow.overlapPersons = [] //先清空
|
|
@@ -408,59 +480,69 @@ export default {
|
|
|
this.overlapCamera.position.y = movement.position.y + 'px'
|
|
|
}
|
|
|
}
|
|
|
- if (type === 'layer_perimeter') {
|
|
|
- const data = pickObj.id.properties ? pickObj.id.properties.segment._value : ''
|
|
|
- if (this.mapDialogConfig.perimeter.some(item => item.dialogMsg?.data?.id == data.id)) {
|
|
|
- this.mapDialogConfig.perimeter = this.mapDialogConfig.perimeter.filter(
|
|
|
- item => item.dialogMsg?.data?.id != data.id
|
|
|
- )
|
|
|
- }
|
|
|
- this.mapDialogConfig.perimeter.push({
|
|
|
- show: false,
|
|
|
- dialogMsg: { data, position: [longitude, latitude, height] },
|
|
|
- })
|
|
|
- console.log(this.mapDialogConfig.perimeter)
|
|
|
- for (let d of this.mapDialogConfig.perimeter) {
|
|
|
- ; (() => {
|
|
|
- setTimeout(() => {
|
|
|
- d.show = true
|
|
|
- this.$store.dispatch('home/setMapPopupConfig', {
|
|
|
- isShow: true,
|
|
|
- type: 'point',
|
|
|
- position: d.dialogMsg?.position,
|
|
|
- dialogid: 'perimeter_' + d.dialogMsg?.data?.id,
|
|
|
- p1: 132,
|
|
|
- p2: 236,
|
|
|
- })
|
|
|
- }, 0)
|
|
|
- })()
|
|
|
- }
|
|
|
- }
|
|
|
if (type === 'layer_fire') {
|
|
|
- if (this.mapDialogConfig.fire.some(item => item.dialogMsg?.data?.id == data.id)) {
|
|
|
- this.mapDialogConfig.fire = this.mapDialogConfig.fire.filter(
|
|
|
- item => item.dialogMsg?.data?.id != data.id
|
|
|
- )
|
|
|
- }
|
|
|
- this.mapDialogConfig.fire.push({
|
|
|
- show: false,
|
|
|
- dialogMsg: { data, position: [longitude, latitude, height] },
|
|
|
- })
|
|
|
- for (let d of this.mapDialogConfig.fire) {
|
|
|
- ; (() => {
|
|
|
- setTimeout(() => {
|
|
|
- d.show = true
|
|
|
- this.$store.dispatch('dialog/openVideoDialog', d.dialogMsg.data.cameraID)
|
|
|
- this.$store.dispatch('home/setMapPopupConfig', {
|
|
|
- isShow: true,
|
|
|
- type: 'point',
|
|
|
- position: d.dialogMsg?.data?.alarmPosition,
|
|
|
- dialogid: 'fire_' + d.dialogMsg?.data?.id,
|
|
|
- p1: 150,
|
|
|
- p2: 236,
|
|
|
+ //右键重叠火灾图标列表选择
|
|
|
+ this.overlapFire.overlapFires = [] //先清空
|
|
|
+ console.log(SceneTransforms.wgs84ToWindowCoordinates(scene, pickObj.primitive._position))
|
|
|
+ const multiObjs = scene.drillPick(movement.position)
|
|
|
+ console.log("鼠标位置Fire Entity信息", multiObjs)
|
|
|
+
|
|
|
+ multiObjs.forEach((v, i, a) => {
|
|
|
+ if (v.id && v.id instanceof Entity) {
|
|
|
+ const vtype = v.id.properties ? v.id.properties._type._value : ''
|
|
|
+ if (vtype === 'layer_fire') {
|
|
|
+ //console.log(v.id);
|
|
|
+ const fire = v.id.properties.details._value
|
|
|
+ this.overlapFire.overlapFires.push({
|
|
|
+ id: v.id.id,
|
|
|
+ name: v.id.properties.details._value.name,
|
|
|
+ fire,
|
|
|
})
|
|
|
- }, 0)
|
|
|
- })()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(this.overlapFire.overlapFires)
|
|
|
+ // if (this.overlapFire.overlapFires.length == 1) {
|
|
|
+ // console.log(123);
|
|
|
+ // const fireInfo = this.overlapFire.overlapFires[0].fire
|
|
|
+ // const gpsAlarmPoint = this.transPosition([{ x: fireInfo.location.x, y: fireInfo.location.y, z: fireInfo.height }])
|
|
|
+ // console.log('坐标点转化', gpsAlarmPoint);
|
|
|
+ // fireInfo.alarmType = -1
|
|
|
+ // // if (this.mapDialogConfig.fire.some(item => item.dialogMsg?.data?.id == data.id)) {
|
|
|
+ // // this.mapDialogConfig.fire = this.mapDialogConfig.fire.filter(
|
|
|
+ // // item => item.dialogMsg?.data?.id != data.id
|
|
|
+ // // )
|
|
|
+ // // }
|
|
|
+ // this.mapDialogConfig.fire = []
|
|
|
+ // console.log("无报警", this.mapDialogConfig.fire);
|
|
|
+ // this.mapDialogConfig.fire.push({
|
|
|
+ // show: false,
|
|
|
+ // dialogMsg: { data: fireInfo, position: [gpsAlarmPoint[0][0], gpsAlarmPoint[0][1], gpsAlarmPoint[0][2]] },
|
|
|
+ // })
|
|
|
+ // for (let d of this.mapDialogConfig.fire) {
|
|
|
+ // ; (() => {
|
|
|
+ // setTimeout(() => {
|
|
|
+ // d.show = true
|
|
|
+ // if (d.dialogMsg.data.cameras?.length) {
|
|
|
+ // this.$store.dispatch('dialog/openVideoDialog', d.dialogMsg.data.cameras[0].cameraId)
|
|
|
+ // }
|
|
|
+ // this.$store.dispatch('home/setMapPopupConfig', {
|
|
|
+ // isShow: true,
|
|
|
+ // type: 'point',
|
|
|
+ // position: [gpsAlarmPoint[0][0], gpsAlarmPoint[0][1], gpsAlarmPoint[0][2]],
|
|
|
+ // dialogid: 'fire_' + d.dialogMsg?.data?.id,
|
|
|
+ // p1: 150,
|
|
|
+ // p2: 236,
|
|
|
+ // })
|
|
|
+ // }, 0)
|
|
|
+ // })()
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ if (this.overlapFire.overlapFires.length > 1) {
|
|
|
+ //说明有重叠,需要打开提示窗口
|
|
|
+ this.overlapFire.show = true
|
|
|
+ this.overlapFire.position.x = movement.position.x + 'px'
|
|
|
+ this.overlapFire.position.y = movement.position.y + 'px'
|
|
|
}
|
|
|
}
|
|
|
if (type === 'layer_station') {
|
|
@@ -481,6 +563,45 @@ export default {
|
|
|
handleSelectOverlapCamera(data) {
|
|
|
this.$store.dispatch('dialog/openVideoDialog', data.id)
|
|
|
},
|
|
|
+ //从重叠火灾报警器中选出一个
|
|
|
+ handleSelectOverlapFire(data) {
|
|
|
+ // console.log("66666666666666666666666666", data);
|
|
|
+ const gpsAlarmPoint = this.transPosition([{ x: data.fire.location.x, y: data.fire.location.y, z: data.fire.height }])
|
|
|
+
|
|
|
+ this.mapDialogConfig.fire = []
|
|
|
+ data.alarmType = -1
|
|
|
+ this.mapDialogConfig.fire.push({
|
|
|
+ show: false,
|
|
|
+ dialogMsg: { data, position: [gpsAlarmPoint[0][0], gpsAlarmPoint[0][1], gpsAlarmPoint[0][2]] },
|
|
|
+ })
|
|
|
+
|
|
|
+ for (let d of this.mapDialogConfig.fire) {
|
|
|
+ ; (() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ d.show = true
|
|
|
+ if (data.fire.cameras?.length) {
|
|
|
+ this.$store.dispatch('dialog/openVideoDialog', data.fire.cameras[0].cameraId)//绑定摄像头弹窗
|
|
|
+ }
|
|
|
+ this.$store.dispatch('home/setMapPopupConfig', {
|
|
|
+ isShow: true,
|
|
|
+ type: 'point',
|
|
|
+ position: [gpsAlarmPoint[0][0], gpsAlarmPoint[0][1], gpsAlarmPoint[0][2]],
|
|
|
+ dialogid: 'fire_' + data.fire.id,
|
|
|
+ p1: 150,
|
|
|
+ p2: 236,
|
|
|
+ })
|
|
|
+ }, 0)
|
|
|
+ })()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ transPosition(pointList = []) {
|
|
|
+ const { longitude, latitude } = this.buildInfo.gpsCoordinate0
|
|
|
+ return pointList.reduce((pre, cur) => {
|
|
|
+ const { x, y } = _locate(cur.x, cur.y, { x: longitude, y: latitude })
|
|
|
+ pre.push([x, y, +cur.z])
|
|
|
+ return pre
|
|
|
+ }, [])
|
|
|
+ },
|
|
|
//工作票的附加的区域绘制
|
|
|
async getWFConfig(obj) {
|
|
|
try {
|