地图四色图和边界单独控制
parent
8e0fea9f30
commit
fe994efdda
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 |
|
@ -226,7 +226,7 @@
|
|||
enter-active-class="animate__animated animate__fadeInDown"
|
||||
leave-active-class="animate__animated animate__fadeOutUp"
|
||||
>
|
||||
<div class="people_trajectory" v-if="isPeopleTrajectory">
|
||||
<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>
|
||||
|
@ -256,7 +256,7 @@
|
|||
:gangkou="gangkouActive"
|
||||
:infoname="dialog.infoname"
|
||||
:name="dialog.name"
|
||||
:GATE_VIDEO_ID="dialog.GATE_VIDEO_ID"
|
||||
:gate-video-id="dialog.GATE_VIDEO_ID"
|
||||
:person-photo="dialog.personPhoto"
|
||||
:ry-dept-name="dialog.RyDeptName"
|
||||
:ry-post-name="dialog.RyPostName"
|
||||
|
@ -461,6 +461,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: {},
|
||||
|
@ -925,7 +937,7 @@ export default {
|
|||
RyPostName: '',
|
||||
RyRealName: '',
|
||||
personTypeName: '',
|
||||
GATE_VIDEO_ID:''
|
||||
GATE_VIDEO_ID: ''
|
||||
},
|
||||
/* 曹妃甸使用参数开始*/
|
||||
// 人员定位
|
||||
|
@ -1215,8 +1227,8 @@ export default {
|
|||
VIIDPort: '8088'
|
||||
},
|
||||
trajectoryEntityCollection: {},
|
||||
isPeopleTrajectory:false,
|
||||
peopleTrajectoryValue:''
|
||||
isPeopleTrajectory: false,
|
||||
peopleTrajectoryValue: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -1435,7 +1447,7 @@ export default {
|
|||
}
|
||||
const point_type = pick.id._monitoItems.data.point_type
|
||||
const point_id = pick.id._monitoItems.data.id
|
||||
if (point_type == '标记点CAMERA'){
|
||||
if (point_type == '标记点CAMERA') {
|
||||
console.log(pick.id._monitoItems.data)
|
||||
this.dialog.GATE_VIDEO_ID = pick.id._monitoItems.data.GATE_VIDEO_ID
|
||||
}
|
||||
|
@ -1670,7 +1682,6 @@ export default {
|
|||
this.bottomOptionsKey = Math.random()
|
||||
this.bottomOptionsAnimationComplex = false
|
||||
this.toCenter({ longitude, latitude, height })
|
||||
drag.addPolygon(id)
|
||||
if (id === '00003') {
|
||||
this.addBranchPoint()
|
||||
} else {
|
||||
|
@ -1952,6 +1963,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) {
|
||||
|
@ -2067,6 +2098,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()
|
||||
|
@ -2121,7 +2154,7 @@ export default {
|
|||
}
|
||||
this.carLocArr = []
|
||||
}
|
||||
if(urlType === 'peopleTrajectory'){
|
||||
if (urlType === 'peopleTrajectory') {
|
||||
this.isPeopleTrajectory = false
|
||||
}
|
||||
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') {
|
||||
|
@ -2129,8 +2162,8 @@ export default {
|
|||
this.clearMqttPoint('+/UwbBQ/')
|
||||
this.removeTrajectory()
|
||||
for (let i = 0; i < this.bottomOptionsList[pindex].list.length; i++) {
|
||||
if(this.bottomOptionsList[pindex].list[i].type === 'peopleTrajectory'){
|
||||
if(this.bottomOptionsList[pindex].list[i].check){
|
||||
if (this.bottomOptionsList[pindex].list[i].type === 'peopleTrajectory') {
|
||||
if (this.bottomOptionsList[pindex].list[i].check) {
|
||||
this.bottomOptionsList[pindex].list[i].check = false
|
||||
this.isPeopleTrajectory = false
|
||||
break
|
||||
|
@ -2154,20 +2187,20 @@ export default {
|
|||
}
|
||||
})
|
||||
} else {
|
||||
if(urlType === 'peopleTrajectory'){
|
||||
if (urlType === 'peopleTrajectory') {
|
||||
let flag = false
|
||||
for (let i = 0; i < this.bottomOptionsList[pindex].list.length; i++) {
|
||||
if(this.bottomOptionsList[pindex].list[i].type === 'peoplePosition'){
|
||||
if(!this.bottomOptionsList[pindex].list[i].check){
|
||||
if (this.bottomOptionsList[pindex].list[i].type === 'peoplePosition') {
|
||||
if (!this.bottomOptionsList[pindex].list[i].check) {
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if(flag){
|
||||
if (flag) {
|
||||
this.$message.warning('请先选择人员定位!!!')
|
||||
return
|
||||
}else{
|
||||
} else {
|
||||
this.isPeopleTrajectory = true
|
||||
}
|
||||
}
|
||||
|
@ -2652,7 +2685,7 @@ export default {
|
|||
personTypeName: item.personTypeName,
|
||||
data_id: item.cardId + '',
|
||||
point_type: 'peoplePositionCzks',
|
||||
label: item.realName,
|
||||
label: item.realName
|
||||
|
||||
}
|
||||
czksPerLoc.push(perLoc)
|
||||
|
|
|
@ -87,6 +87,7 @@ const polygonMap = {
|
|||
export default class DragEntity {
|
||||
constructor(val) {
|
||||
this.viewer = val.viewer
|
||||
this.id = []
|
||||
}
|
||||
|
||||
addEntity(value) {
|
||||
|
@ -118,10 +119,10 @@ export default class DragEntity {
|
|||
}
|
||||
}
|
||||
if (value.point_type.indexOf('标记点') !== -1) {
|
||||
console.info('====' )
|
||||
console.info(value )
|
||||
console.info('====' )
|
||||
if (value.label == '人员' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6'){
|
||||
console.info('====')
|
||||
console.info(value)
|
||||
console.info('====')
|
||||
if (value.label == '人员' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6') {
|
||||
billboard = {
|
||||
image: GGimg1,
|
||||
height: 36,
|
||||
|
@ -131,7 +132,7 @@ export default class DragEntity {
|
|||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
||||
}
|
||||
}else if (value.label == '车辆' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6'){
|
||||
} else if (value.label == '车辆' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6') {
|
||||
billboard = {
|
||||
image: GGimg2,
|
||||
height: 36,
|
||||
|
@ -141,7 +142,7 @@ export default class DragEntity {
|
|||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
||||
}
|
||||
}else if (value.label == '摄像头' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6'){
|
||||
} else if (value.label == '摄像头' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6') {
|
||||
billboard = {
|
||||
image: imgMap['img0_2' ],
|
||||
height: 36,
|
||||
|
@ -151,7 +152,7 @@ export default class DragEntity {
|
|||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
||||
}
|
||||
}else if (value.label == '摄像头' ){
|
||||
} else if (value.label == '摄像头') {
|
||||
billboard = {
|
||||
image: imgMap['img0_2' ],
|
||||
height: 36,
|
||||
|
@ -161,7 +162,7 @@ export default class DragEntity {
|
|||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
billboard = {
|
||||
image: imgMap['img' + value.icon_type],
|
||||
height: 36,
|
||||
|
@ -172,7 +173,6 @@ export default class DragEntity {
|
|||
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// 曹妃甸使用
|
||||
if (value.gangkou === '00004') {
|
||||
|
@ -296,16 +296,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])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -316,21 +324,17 @@ 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)
|
||||
return latitudeAndLongitude
|
||||
}
|
||||
|
||||
addFourColorDiagram(latitudeAndLongitude, item) {
|
||||
const id = Cesium.createGuid()
|
||||
this.id.push({
|
||||
id,
|
||||
key: 'FourColorDiagram'
|
||||
})
|
||||
this.viewer.entities.add(target)
|
||||
} else {
|
||||
const target = new Cesium.Entity({
|
||||
id,
|
||||
polygon: {
|
||||
hierarchy: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
|
||||
extrudedHeight: item.stretchHeight,
|
||||
|
@ -344,6 +348,45 @@ export default class DragEntity {
|
|||
})
|
||||
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--
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
delEntity(point) {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue