Merge branch 'pet' into dev

# Conflicts:
#	src/views/map/index.vue
#	src/views/map/js/dragentity.js
hyx_2024-9-29_tongbu
guoyuepeng 2024-09-13 18:28:37 +08:00
commit 87b9a20614
7 changed files with 9866 additions and 9796 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

@ -225,7 +225,7 @@
enter-active-class="animate__animated animate__fadeInDown"
leave-active-class="animate__animated animate__fadeOutUp"
>
<div v-if="isPeopleTrajectory" class="people_trajectory" >
<div v-if="isPeopleTrajectory" class="people_trajectory">
<el-select v-model="peopleTrajectoryValue" popper-class="people_trajectory_select">
<el-option v-for="item in onePerLocArr" :key="item.id" :value="item.id" :label="item.id"/>
</el-select>
@ -462,6 +462,18 @@ export default {
checkImg: require('../../assets/map/index/map_on.png'),
check: '',
label: '气象监测'
},
{
img: require('../../assets/map/index/sisetu.png'),
checkImg: require('../../assets/map/index/sisetu_on.png'),
check: false,
label: '四色图'
},
{
img: require('../../assets/map/index/bianjie.png'),
checkImg: require('../../assets/map/index/bianjie_on.png'),
check: false,
label: '边界'
}
],
myEntityCollection: {},
@ -1694,7 +1706,6 @@ export default {
this.bottomOptionsKey = Math.random()
this.bottomOptionsAnimationComplex = false
this.toCenter({ longitude, latitude, height })
drag.addPolygon(id)
if (id === '00003') {
this.addBranchPoint()
} else {
@ -1976,6 +1987,26 @@ export default {
this.dialog.corpInfoId = ''
this.dialog.infoname = ''
this.dialog.width = '96%'
} else if (index === 7) {
if (!this.gangkouActive) {
this.$message.warning('请先选择港口')
return
}
if (this.rightOptionsList[index].check) {
drag.addPolygon(this.gangkouActive, '')
} else {
drag.removeFourColorDiagram()
}
} else if (index === 8) {
if (!this.gangkouActive) {
this.$message.warning('请先选择港口')
return
}
if (this.rightOptionsList[index].check) {
drag.addPolygon(this.gangkouActive, 'wall')
} else {
drag.removeWall()
}
}
},
changeSceneMode(check) {
@ -2091,6 +2122,8 @@ export default {
this.poinEntity = {}
this.toCenter(this.initCenter)
this.dragAreaEntity(this.initPoint)
this.rightOptionsList[7].check = false
this.rightOptionsList[8].check = false
}
this.componentKey = Math.random()
@ -2966,14 +2999,14 @@ export default {
_this.fwebsocket = new WebSocket(encodeURI(wsUrl))
_this.fwebsocket.onmessage = function(message) {
console.info('接收消息')
const peopleList = JSON.parse(message.data)
const peopleList = JSON.parse(message.data).data.data
console.log(peopleList)
for (let i = 0; i < peopleList.length; i++) {
const item = peopleList[i]
if ((!item)) continue
//
const index = _this.onePerLocArr.findIndex(item1 => {
return item1.id === item.id
return item1.id.toString() === item.id.toString()
})
const x = item.lon
const y = item.lat
@ -2986,7 +3019,6 @@ export default {
} else {
const perLoc = {
id: item.id,
name: item.name,
x: x,
y: y,
icon_type: 'img4_0' + pointColor,
@ -3314,8 +3346,6 @@ export default {
if (e.containAuthorization.length === 0) return true
if (e.containAuthorization.includes(CORP_INFO_ID)) {
return true
} else if (e.containAuthorization.includes('allCorp') && CORP_INFO_ID) {
return true
} else {
return false
}
@ -3325,8 +3355,6 @@ export default {
if (eliminateAuthorization.length === 0) return true
if (eliminateAuthorization.includes(CORP_INFO_ID)) {
return false
} else if (eliminateAuthorization.includes('all') && CORP_INFO_ID) {
return false
} else {
return true
}

View File

@ -192,6 +192,7 @@ export default class DragEntity {
disableDepthTestDistance: Number.POSITIVE_INFINITY
}
}
}
// 曹妃甸使用
if (value.gangkou === '00004') {
@ -315,16 +316,24 @@ export default class DragEntity {
})
}
addPolygon(id) {
addPolygon(id, type) {
if (!polygonMap[id]) return
const loadMapBoxObj = polygonMap[id]()
if (type === 'wall') {
const loadMapBoxItem = loadMapBoxObj['wallList']
for (let i = 0; i < loadMapBoxItem.length; i++) {
this.addWall(this.formatPolygon(loadMapBoxItem[i]))
}
return
}
// 循环获取所有颜色
for (const loadMapBoxKey in loadMapBoxObj) {
// 获取每种颜色
const loadMapBoxItem = loadMapBoxObj[loadMapBoxKey]
if (loadMapBoxKey === 'wallList') continue
// 循环每种颜色里每一块创建多边形
for (let i = 0; i < loadMapBoxItem.length; i++) {
this.formatPolygon(loadMapBoxItem[i])
this.addFourColorDiagram(this.formatPolygon(loadMapBoxItem[i]), loadMapBoxItem[i])
}
}
}
@ -335,33 +344,68 @@ export default class DragEntity {
latitudeAndLongitude.push(item.x)
latitudeAndLongitude.push(item.y)
})
if (item.type === 'wall') {
const target = new Cesium.Entity({
wall: {
positions: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
material: new Cesium.PolylineTrailLinkMaterialProperty({
color: Cesium.Color.fromBytes(201, 118, 243).withAlpha(0.5),
duration: 2000
}, this.viewer),
maximumHeights: new Array(latitudeAndLongitude.length).fill(40),
minimumHeights: new Array(latitudeAndLongitude.length).fill(0)
}
})
this.viewer.entities.add(target)
} else {
const target = new Cesium.Entity({
polygon: {
hierarchy: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
extrudedHeight: item.stretchHeight,
height: item.height,
// eslint-disable-next-line new-cap
material: new Cesium.Color.fromCssColorString(item.color),
outline: !!item.strokeColor,
// eslint-disable-next-line new-cap
outlineColor: new Cesium.Color.fromCssColorString(item.strokeColor)
}
})
this.viewer.entities.add(target)
return latitudeAndLongitude
}
addFourColorDiagram(latitudeAndLongitude, item) {
const id = Cesium.createGuid()
this.id.push({
id,
key: 'FourColorDiagram'
})
const target = new Cesium.Entity({
id,
polygon: {
hierarchy: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
extrudedHeight: item.stretchHeight,
height: item.height,
// eslint-disable-next-line new-cap
material: new Cesium.Color.fromCssColorString(item.color),
outline: !!item.strokeColor,
// eslint-disable-next-line new-cap
outlineColor: new Cesium.Color.fromCssColorString(item.strokeColor)
}
})
this.viewer.entities.add(target)
}
addWall(latitudeAndLongitude) {
const id = Cesium.createGuid()
this.id.push({
id,
key: 'Wall'
})
const target = new Cesium.Entity({
id,
wall: {
positions: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
material: new Cesium.PolylineTrailLinkMaterialProperty({
color: Cesium.Color.fromBytes(201, 118, 243).withAlpha(0.5),
duration: 2000
}, this.viewer),
maximumHeights: new Array(latitudeAndLongitude.length).fill(40),
minimumHeights: new Array(latitudeAndLongitude.length).fill(0)
}
})
this.viewer.entities.add(target)
}
removeFourColorDiagram() {
for (let i = 0; i < this.id.length; i++) {
if (this.id[i].key === 'FourColorDiagram') {
this.viewer.entities.removeById(this.id[i].id)
this.id.splice(i, 1)
i--
}
}
}
removeWall() {
for (let i = 0; i < this.id.length; i++) {
if (this.id[i].key === 'Wall') {
this.viewer.entities.removeById(this.id[i].id)
this.id.splice(i, 1)
i--
}
}
}

File diff suppressed because it is too large Load Diff