shuishen
2023-04-09 85fb13abbeadc1765d2c0056ba99c6c19aa35dfd
src/views/activity/components/twoDrawBtnBox.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>
@@ -208,6 +211,10 @@
                    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
            }
            if (type == 'polygon') {
@@ -230,7 +237,8 @@
                    material: global.DC.Namespace.Cesium.Color.fromBytes(64, 158, 255, 122),
                    outline: true,
                    outlineColor: global.DC.Namespace.Cesium.Color.fromBytes(64, 158, 255, 255),
                    outlineWidth: 4.0,
                    outlineWidth: 1.0,
                    height: 0
                })
            } else if (type == 'brokenline') {
                drawThreeTool && drawThreeTool.draw('polyline', overlay => {
@@ -353,9 +361,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
@@ -366,6 +376,9 @@
                    lat: Number(position[1]),
                    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 {
@@ -510,6 +523,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
            }
        },
        // 修改警车样式
@@ -585,6 +606,10 @@
                    overlay.remove()
                }
            }
            if ('remark' in params) {
                overlay.attrParams.data.remark = params.remark
            }
        },
        // 修改警车