From e8f63e7d40337044529ffb56c7be76b26628b068 Mon Sep 17 00:00:00 2001
From: fangjiakai <450850793@qq.com>
Date: Thu, 5 Sep 2024 16:45:05 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B5=B7=E5=BA=B7=E5=8F=A3=E9=97=A8=E9=97=A8?=
=?UTF-8?q?=E7=A6=81=E5=9C=B0=E5=9B=BE=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/map/dialog/index.vue | 13 ++++++----
src/views/map/index.vue | 47 +++++++++++++++++++---------------
src/views/map/js/dragentity.js | 41 +++++++++++++++++++++--------
3 files changed, 64 insertions(+), 37 deletions(-)
diff --git a/src/views/map/dialog/index.vue b/src/views/map/dialog/index.vue
index 452518e..9f12c9e 100644
--- a/src/views/map/dialog/index.vue
+++ b/src/views/map/dialog/index.vue
@@ -11,10 +11,13 @@
-
+
@@ -220,7 +223,7 @@ export default {
GATE_VIDEO_ID: {
type: String,
default: ''
- },
+ }
},
methods: {
closeDialog() {
diff --git a/src/views/map/index.vue b/src/views/map/index.vue
index fd0f7df..4ccbe11 100644
--- a/src/views/map/index.vue
+++ b/src/views/map/index.vue
@@ -492,27 +492,7 @@ export default {
checkImg: require('../../assets/map/gangkou_index/buttom/ico1_on.png'),
type: 'CAR',
containAuthorization: [],
- eliminateAuthorization: ['035958e685cf4850bc40151c5e0617a6']
- },
- {
- label: '人员', //杂货公司的人员
- dialog_width: '800px',
- check: false,
- img: require('../../assets/map/gangkou_index/buttom/ico1.png'),
- checkImg: require('../../assets/map/gangkou_index/buttom/ico1_on.png'),
- type: 'PERSON',
- containAuthorization: ['033549ed3bd648e49c8a65eb4993ec2f'],
- eliminateAuthorization: []
- },
- {
- label: '车辆',//杂货公司的车辆
- dialog_width: '600px',
- check: false,
- img: require('../../assets/map/gangkou_index/buttom/ico2.png'),
- checkImg: require('../../assets/map/gangkou_index/buttom/ico2_on.png'),
- type: 'CAR',
- containAuthorization: ['033549ed3bd648e49c8a65eb4993ec2f'],
- eliminateAuthorization: []
+ eliminateAuthorization: ['all']
},
{
label: '人员',
@@ -534,6 +514,26 @@ export default {
containAuthorization: ['035958e685cf4850bc40151c5e0617a6'],
eliminateAuthorization: []
},
+ {
+ label: '人员闸机', // 杂货公司的人员
+ dialog_width: '800px',
+ check: false,
+ img: require('../../assets/map/gangkou_index/buttom/ico1.png'),
+ checkImg: require('../../assets/map/gangkou_index/buttom/ico1_on.png'),
+ type: 'PERSON_MACHINE',
+ containAuthorization: ['allCorp'],
+ eliminateAuthorization: ['035958e685cf4850bc40151c5e0617a6']
+ },
+ {
+ label: '车辆闸机', // 杂货公司的车辆
+ dialog_width: '600px',
+ check: false,
+ img: require('../../assets/map/gangkou_index/buttom/ico2.png'),
+ checkImg: require('../../assets/map/gangkou_index/buttom/ico2_on.png'),
+ type: 'CAR_MACHINE',
+ containAuthorization: ['allCorp'],
+ eliminateAuthorization: ['035958e685cf4850bc40151c5e0617a6']
+ },
{
label: '摄像头',
dialog_width: '600px',
@@ -2223,6 +2223,7 @@ export default {
const points = []
const varList = this.filterNull(data.varList)
for (let i = 0; i < varList.length; i++) {
+ console.log(pindex + '_' + index)
const point = {}
point.id = pindex + '_' + index + '_' + i
point.data_id = varList[i].id
@@ -3309,6 +3310,8 @@ 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
}
@@ -3318,6 +3321,8 @@ 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
}
diff --git a/src/views/map/js/dragentity.js b/src/views/map/js/dragentity.js
index 0532a93..57a408c 100644
--- a/src/views/map/js/dragentity.js
+++ b/src/views/map/js/dragentity.js
@@ -118,10 +118,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 +131,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,9 +141,9 @@ 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' ],
+ image: imgMap['img0_2' ],
height: 36,
width: 30,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
@@ -151,9 +151,9 @@ 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' ],
+ image: imgMap['img0_2' ],
height: 36,
width: 30,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
@@ -161,7 +161,27 @@ export default class DragEntity {
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
disableDepthTestDistance: Number.POSITIVE_INFINITY
}
- }else{
+ } else if (value.label == '人员闸机') {
+ billboard = {
+ image: imgMap['img0_0' ],
+ height: 36,
+ width: 30,
+ verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
+ horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
+ heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
+ disableDepthTestDistance: Number.POSITIVE_INFINITY
+ }
+ } else if (value.label == '车辆闸机') {
+ billboard = {
+ image: imgMap['img0_1' ],
+ height: 36,
+ width: 30,
+ verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
+ horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
+ heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
+ disableDepthTestDistance: Number.POSITIVE_INFINITY
+ }
+ } else {
billboard = {
image: imgMap['img' + value.icon_type],
height: 36,
@@ -172,7 +192,6 @@ export default class DragEntity {
disableDepthTestDistance: Number.POSITIVE_INFINITY
}
}
-
}
// 曹妃甸使用
if (value.gangkou === '00004') {