Merge branch 'pet' into dev
# Conflicts: # src/views/map/index.vue # src/views/map/js/dragentity.jshyx_2024-9-29_tongbu
commit
87b9a20614
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 |
|
@ -225,7 +225,7 @@
|
||||||
enter-active-class="animate__animated animate__fadeInDown"
|
enter-active-class="animate__animated animate__fadeInDown"
|
||||||
leave-active-class="animate__animated animate__fadeOutUp"
|
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-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-option v-for="item in onePerLocArr" :key="item.id" :value="item.id" :label="item.id"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -462,6 +462,18 @@ export default {
|
||||||
checkImg: require('../../assets/map/index/map_on.png'),
|
checkImg: require('../../assets/map/index/map_on.png'),
|
||||||
check: '',
|
check: '',
|
||||||
label: '气象监测'
|
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: {},
|
myEntityCollection: {},
|
||||||
|
@ -1694,7 +1706,6 @@ export default {
|
||||||
this.bottomOptionsKey = Math.random()
|
this.bottomOptionsKey = Math.random()
|
||||||
this.bottomOptionsAnimationComplex = false
|
this.bottomOptionsAnimationComplex = false
|
||||||
this.toCenter({ longitude, latitude, height })
|
this.toCenter({ longitude, latitude, height })
|
||||||
drag.addPolygon(id)
|
|
||||||
if (id === '00003') {
|
if (id === '00003') {
|
||||||
this.addBranchPoint()
|
this.addBranchPoint()
|
||||||
} else {
|
} else {
|
||||||
|
@ -1976,6 +1987,26 @@ export default {
|
||||||
this.dialog.corpInfoId = ''
|
this.dialog.corpInfoId = ''
|
||||||
this.dialog.infoname = ''
|
this.dialog.infoname = ''
|
||||||
this.dialog.width = '96%'
|
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) {
|
changeSceneMode(check) {
|
||||||
|
@ -2091,6 +2122,8 @@ export default {
|
||||||
this.poinEntity = {}
|
this.poinEntity = {}
|
||||||
this.toCenter(this.initCenter)
|
this.toCenter(this.initCenter)
|
||||||
this.dragAreaEntity(this.initPoint)
|
this.dragAreaEntity(this.initPoint)
|
||||||
|
this.rightOptionsList[7].check = false
|
||||||
|
this.rightOptionsList[8].check = false
|
||||||
}
|
}
|
||||||
|
|
||||||
this.componentKey = Math.random()
|
this.componentKey = Math.random()
|
||||||
|
@ -2966,14 +2999,14 @@ export default {
|
||||||
_this.fwebsocket = new WebSocket(encodeURI(wsUrl))
|
_this.fwebsocket = new WebSocket(encodeURI(wsUrl))
|
||||||
_this.fwebsocket.onmessage = function(message) {
|
_this.fwebsocket.onmessage = function(message) {
|
||||||
console.info('接收消息')
|
console.info('接收消息')
|
||||||
const peopleList = JSON.parse(message.data)
|
const peopleList = JSON.parse(message.data).data.data
|
||||||
console.log(peopleList)
|
console.log(peopleList)
|
||||||
for (let i = 0; i < peopleList.length; i++) {
|
for (let i = 0; i < peopleList.length; i++) {
|
||||||
const item = peopleList[i]
|
const item = peopleList[i]
|
||||||
if ((!item)) continue
|
if ((!item)) continue
|
||||||
// 将地图上剩余的点与最新的定位人员点进行对比 更新地图上已存在的点 新增地图上之前没有的点
|
// 将地图上剩余的点与最新的定位人员点进行对比 更新地图上已存在的点 新增地图上之前没有的点
|
||||||
const index = _this.onePerLocArr.findIndex(item1 => {
|
const index = _this.onePerLocArr.findIndex(item1 => {
|
||||||
return item1.id === item.id
|
return item1.id.toString() === item.id.toString()
|
||||||
})
|
})
|
||||||
const x = item.lon
|
const x = item.lon
|
||||||
const y = item.lat
|
const y = item.lat
|
||||||
|
@ -2986,7 +3019,6 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
const perLoc = {
|
const perLoc = {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
name: item.name,
|
|
||||||
x: x,
|
x: x,
|
||||||
y: y,
|
y: y,
|
||||||
icon_type: 'img4_0' + pointColor,
|
icon_type: 'img4_0' + pointColor,
|
||||||
|
@ -3314,8 +3346,6 @@ export default {
|
||||||
if (e.containAuthorization.length === 0) return true
|
if (e.containAuthorization.length === 0) return true
|
||||||
if (e.containAuthorization.includes(CORP_INFO_ID)) {
|
if (e.containAuthorization.includes(CORP_INFO_ID)) {
|
||||||
return true
|
return true
|
||||||
} else if (e.containAuthorization.includes('allCorp') && CORP_INFO_ID) {
|
|
||||||
return true
|
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -3325,8 +3355,6 @@ export default {
|
||||||
if (eliminateAuthorization.length === 0) return true
|
if (eliminateAuthorization.length === 0) return true
|
||||||
if (eliminateAuthorization.includes(CORP_INFO_ID)) {
|
if (eliminateAuthorization.includes(CORP_INFO_ID)) {
|
||||||
return false
|
return false
|
||||||
} else if (eliminateAuthorization.includes('all') && CORP_INFO_ID) {
|
|
||||||
return false
|
|
||||||
} else {
|
} else {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,6 +192,7 @@ export default class DragEntity {
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// 曹妃甸使用
|
// 曹妃甸使用
|
||||||
if (value.gangkou === '00004') {
|
if (value.gangkou === '00004') {
|
||||||
|
@ -315,16 +316,24 @@ export default class DragEntity {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
addPolygon(id) {
|
addPolygon(id, type) {
|
||||||
if (!polygonMap[id]) return
|
if (!polygonMap[id]) return
|
||||||
const loadMapBoxObj = polygonMap[id]()
|
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) {
|
for (const loadMapBoxKey in loadMapBoxObj) {
|
||||||
// 获取每种颜色
|
// 获取每种颜色
|
||||||
const loadMapBoxItem = loadMapBoxObj[loadMapBoxKey]
|
const loadMapBoxItem = loadMapBoxObj[loadMapBoxKey]
|
||||||
|
if (loadMapBoxKey === 'wallList') continue
|
||||||
// 循环每种颜色里每一块创建多边形
|
// 循环每种颜色里每一块创建多边形
|
||||||
for (let i = 0; i < loadMapBoxItem.length; i++) {
|
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.x)
|
||||||
latitudeAndLongitude.push(item.y)
|
latitudeAndLongitude.push(item.y)
|
||||||
})
|
})
|
||||||
if (item.type === 'wall') {
|
return latitudeAndLongitude
|
||||||
const target = new Cesium.Entity({
|
}
|
||||||
wall: {
|
|
||||||
positions: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
|
addFourColorDiagram(latitudeAndLongitude, item) {
|
||||||
material: new Cesium.PolylineTrailLinkMaterialProperty({
|
const id = Cesium.createGuid()
|
||||||
color: Cesium.Color.fromBytes(201, 118, 243).withAlpha(0.5),
|
this.id.push({
|
||||||
duration: 2000
|
id,
|
||||||
}, this.viewer),
|
key: 'FourColorDiagram'
|
||||||
maximumHeights: new Array(latitudeAndLongitude.length).fill(40),
|
})
|
||||||
minimumHeights: new Array(latitudeAndLongitude.length).fill(0)
|
const target = new Cesium.Entity({
|
||||||
}
|
id,
|
||||||
})
|
polygon: {
|
||||||
this.viewer.entities.add(target)
|
hierarchy: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
|
||||||
} else {
|
extrudedHeight: item.stretchHeight,
|
||||||
const target = new Cesium.Entity({
|
height: item.height,
|
||||||
polygon: {
|
// eslint-disable-next-line new-cap
|
||||||
hierarchy: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
|
material: new Cesium.Color.fromCssColorString(item.color),
|
||||||
extrudedHeight: item.stretchHeight,
|
outline: !!item.strokeColor,
|
||||||
height: item.height,
|
// eslint-disable-next-line new-cap
|
||||||
// eslint-disable-next-line new-cap
|
outlineColor: new Cesium.Color.fromCssColorString(item.strokeColor)
|
||||||
material: new Cesium.Color.fromCssColorString(item.color),
|
}
|
||||||
outline: !!item.strokeColor,
|
})
|
||||||
// eslint-disable-next-line new-cap
|
this.viewer.entities.add(target)
|
||||||
outlineColor: new Cesium.Color.fromCssColorString(item.strokeColor)
|
}
|
||||||
}
|
addWall(latitudeAndLongitude) {
|
||||||
})
|
const id = Cesium.createGuid()
|
||||||
this.viewer.entities.add(target)
|
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
Loading…
Reference in New Issue