shuishen
2023-04-09 85fb13abbeadc1765d2c0056ba99c6c19aa35dfd
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
            }
        },
        // 修改警车