From 85fb13abbeadc1765d2c0056ba99c6c19aa35dfd Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sun, 09 Apr 2023 03:44:49 +0800
Subject: [PATCH] 电子沙盘的调整
---
src/views/activity/components/drawBtnBox.vue | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/src/views/activity/components/drawBtnBox.vue b/src/views/activity/components/drawBtnBox.vue
index 7db652c..9de5932 100644
--- a/src/views/activity/components/drawBtnBox.vue
+++ b/src/views/activity/components/drawBtnBox.vue
@@ -24,6 +24,9 @@
<li>
<button @click="drawThreeArrow('billboard', 'icon', 'icon3')" title="危险人物">危险人物</button>
</li>
+ <li>
+ <button @click="drawThreeArrow('billboard', 'icon', 'icon4')" title="自定义图片标注">自定义图片标注</button>
+ </li>
</ul>
</div>
<div>
@@ -139,8 +142,11 @@
imgUrl = 'wxrw'
material = global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 255)
break
+ case 'icon4':
+ imgUrl = 'custom'
+ material = global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 255)
+ break
}
-
let drawConfig = {}
@@ -281,9 +287,11 @@
addPlotOverlayData.attrParams = { id: item.id, color: item.color, item }
addPlotOverlayData.on(global.DC.MouseEventType.CLICK, this.$parent.reeditArrowClick)
- if (item.type == 6 || item.type == 7 || item.type == 8) {
+ if (item.type == 6 || item.type == 7 || item.type == 8 || item.type == 11) {
const height = item.altitude.split(',')
let position = item.position.slice(12, item.position.length - 2).split(',')[0].split(' ')
+
+ if (item.iconUrl != '') addPlotOverlayData.icon = item.iconUrl
addPlotOverlayData.setStyle({
color: color
@@ -295,6 +303,8 @@
alt: Number(height[0]),
}
+ addPlotOverlayData.on(global.DC.MouseEventType.MOUSE_OVER, this.$parent.pointMouseOver)
+ addPlotOverlayData.on(global.DC.MouseEventType.MOUSE_OUT, this.$parent.pointMouseOut)
this.$parent.isHaveFactor = true
} else if (item.type == 5) {
addPlotOverlayData.setStyle({
@@ -447,6 +457,14 @@
"font": `${params.width}px sans-serif`
})
}
+
+ if ('icon' in params && params.icon != '') {
+ overlay.icon = params.icon
+ }
+
+ if ('remark' in params && params.remark != '') {
+ overlay.attrParams.item.remark = params.remark
+ }
},
// 修改警车样式
@@ -533,6 +551,10 @@
overlay.remove()
}
}
+
+ if ('remark' in params) {
+ overlay.attrParams.data.remark = params.remark
+ }
},
// 修改警车
--
Gitblit v1.9.3