guanqb
2023-03-31 ac19ae903dd740bdaf1499ae40ef4039fdb4e6ad
src/views/activity/components/drawBtnBox.vue
@@ -97,6 +97,7 @@
        drawThreeArrow (type, billboardType = '', typeValue = '') {
            let flag
            this.$EventBus.$emit('tilesetLayerFlag', plotType, (e) => { flag = e })
            console.log(flag, 366666)
            if (flag != true) return
            drawFlag = false
@@ -126,15 +127,15 @@
                    break
                case 'icon1':
                    imgUrl = 'ptqz'
                    material = global.DC.Namespace.Cesium.Color.fromBytes(63, 146, 254, 255)
                    material = global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 255)
                    break
                case 'icon2':
                    imgUrl = 'bhdx'
                    material = global.DC.Namespace.Cesium.Color.fromBytes(18, 150, 219, 255)
                    material = global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 255)
                    break
                case 'icon3':
                    imgUrl = 'wxrw'
                    material = global.DC.Namespace.Cesium.Color.fromBytes(216, 30, 6, 255)
                    material = global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 255)
                    break
            }
@@ -154,7 +155,8 @@
                    size: [32, 32],
                    verticalOrigin: global.DC.Namespace.Cesium.VerticalOrigin.BOTTOM,
                    color: material,
                    // eyeOffset: new global.DC.Namespace.Cesium.Cartesian3(0, 0, -10),
                    // disableDepthTestDistance: Number.POSITIVE_INFINITY,
                    eyeOffset: new global.DC.Namespace.Cesium.Cartesian3(0, 0, -10),
                    billboardImage: `/img/icon/${imgUrl}.png`
                }
            } else if (type == 'polyline') {
@@ -276,9 +278,10 @@
                }
                this.$parent.isHaveFactor = true
            } else if (item.type == 5 && item.areaType == 2) {
            } else if (item.type == 5) {
                addPlotOverlayData.setStyle({
                    material: color
                    material: color,
                    outlineColor: global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 255)
                })
                this.$parent.isHaveArrow = true
@@ -448,6 +451,17 @@
                    overlay.attrParams.data.width = params.width
                } else {
                    let linePosition = ''
                    let maxHeight = ''
                    if ('altitude' in params) {
                        maxHeight = params.altitude.split(',').reduce((pre, cur) => {
                            return cur > pre ? cur : pre
                        }, 0)
                    } else {
                        maxHeight = overlay.attrParams.altitude.split(',').reduce((pre, cur) => {
                            return cur > pre ? cur : pre
                        }, 0)
                    }
                    if ('position' in params) {
                        linePosition = params.position.replace(/,/g, ";").replace(/ /g, ",")
                    } else {
@@ -457,7 +471,7 @@
                    let positionStr = ''
                    coords.forEach((item, index) => {
                        if (!(index == coords.length - 1)) {
                            positionStr += item[0] + ',' + item[1] + ';'
                            positionStr += item[0] + ',' + item[1] + ',' + maxHeight + ';'
                        }
                    })
                    positionStr = positionStr.slice(0, positionStr.length - 1)