shuishen
2023-05-15 476694e9b04b04718d454187c963bc9ab819d096
电子沙盘更改--流动墙类型增加
3 files modified
220 ■■■■ changed files
src/views/activity/components/drawBtnBox.vue 112 ●●●● patch | view | raw | blame | history
src/views/activity/components/polygonPlot.vue 5 ●●●● patch | view | raw | blame | history
src/views/activity/components/publicIndex.vue 103 ●●●●● patch | view | raw | blame | history
src/views/activity/components/drawBtnBox.vue
@@ -1,6 +1,6 @@
<template>
    <div v-show="dialogVisible && isShowActivityEditBox" class="draw-btn-box">
        <span @click="showEmitBox = !showEmitBox" class="emit-expend">{{showEmitBox? '收起': '展开'}}</span>
        <span @click="showEmitBox = !showEmitBox" class="emit-expend">{{ showEmitBox ? '收起' : '展开' }}</span>
        <div v-show="showEmitBox" class="left">
            <h3>预案布置</h3>
@@ -8,26 +8,17 @@
                <span>要素资源:</span>
                <ul>
                    <li>
                        <button
                            @click="drawThreeArrow('billboard', 'police', 'policeman')"
                            title="警员"
                        >
                        <button @click="drawThreeArrow('billboard', 'police', 'policeman')" title="警员">
                            <img src="/img/icon/police-people-btn.png" style="height:100%" />
                        </button>
                    </li>
                    <li>
                        <button
                            @click="drawThreeArrow('billboard', 'police', 'policecar')"
                            title="警车"
                        >
                        <button @click="drawThreeArrow('billboard', 'police', 'policecar')" title="警车">
                            <img src="/img/icon/car-btn.png" style="height:100%" />
                        </button>
                    </li>
                    <li>
                        <button
                            @click="drawThreeArrow('billboard', 'icon', 'icon4')"
                            title="自定义图片标注"
                        >自定义图片标注</button>
                        <button @click="drawThreeArrow('billboard', 'icon', 'icon4')" title="自定义图片标注">自定义图片标注</button>
                    </li>
                    <li>
                        <button @click="drawThreeArrow('billboard', 'icon', 'icon5')" title="其他">其他</button>
@@ -38,16 +29,10 @@
                <span>作战标绘:</span>
                <ul>
                    <li>
                        <button
                            @click="drawThreeArrow('polygon', 'polygon', 'polygon')"
                            title="多边形"
                        >多边形</button>
                        <button @click="drawThreeArrow('polygon', 'polygon', 'polygon')" title="多边形">多边形</button>
                    </li>
                    <li>
                        <button
                            @click="drawThreeArrow('brokenline', 'brokenline', 'brokenline')"
                            title="折线"
                        >折线</button>
                        <button @click="drawThreeArrow('brokenline', 'brokenline', 'brokenline')" title="折线">折线</button>
                    </li>
                </ul>
            </div>
@@ -57,10 +42,7 @@
                    <li>
                        <!-- <el-button
                        ></el-button>-->
                        <button
                            @click="drawThreeArrow('polyline', 'policecar', 'polyline')"
                            title="巡逻路线"
                        >
                        <button @click="drawThreeArrow('polyline', 'policecar', 'polyline')" title="巡逻路线">
                            <img src="/img/icon/route1.png" style="height:100%" />
                        </button>
                    </li>
@@ -258,7 +240,7 @@
            currentEmitEl = overlayData
            global.viewer.scene.globe.depthTestAgainstTerrain = true
            if (overlayData.customType == 'polygon' || overlayData.customType == 'brokenline') {
                if (overlayData.attrParams.item.areaType != 2) {
                if (overlayData.attrParams.item.areaType != 2 && overlayData.attrParams.item.areaType != 3) {
                    drawThreeTool.edit(overlayData, (e) => {
                        let polygonPosition = e.positions.map(item => `${item.lng} ${item.lat}`).join()
                        const altitude = e.positions.map(item => item.alt).join()
@@ -298,7 +280,7 @@
                        let polygonPosition = e.positions.map(item => `${item.lng} ${item.lat}`).join()
                        const altitude = e.positions.map(item => item.alt).join()
                        this.updateSecurityPlot({ id: overlayData.attrParams.id, position: polygonPosition, areaType: 2, altitude }, overlayData)
                        this.updateSecurityPlot({ id: overlayData.attrParams.id, position: polygonPosition, areaType: overlayData.attrParams.item.areaType, altitude }, overlayData)
                        global.viewer.scene.globe.depthTestAgainstTerrain = false
                        currentStatus = ''
                    }, true)
@@ -342,7 +324,7 @@
            let positions = position.split(';').map((item, index) => `${item},140`)
            positions.push(positions[0])
            positions = positions.join(';')
            if (item.type == 5 && item.areaType == 2) {
            if (item.type == 5 && (item.areaType == 2 || item.areaType == 3)) {
                this.$parent.removeArrowsListLayer(addPlotOverlayData)
                addPlotOverlayData = new global.DC.Wall(positions)
@@ -377,26 +359,35 @@
                this.$parent.isHaveFactor = true
            } else if (item.type == 5) {
                if (item.areaType != 2) {
                if (item.areaType != 2 && item.areaType != 3) {
                    addPlotOverlayData.setStyle({
                        material: color,
                        outlineColor: global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 255)
                    })
                } else {
                    addPlotOverlayData.setStyle({
                        material: new global.DC.WallImageTrailMaterialProperty({
                            image: '/images/jjx.png',
                            color: color,
                            repeat: {
                                x: getLineSpeed(position.split(';').map(item => {
                                    item.split(',')
                    if (item.areaType == 2) {
                        addPlotOverlayData.setStyle({
                            material: new global.DC.WallImageTrailMaterialProperty({
                                image: '/images/jjx.png',
                                color: color,
                                repeat: {
                                    x: getLineSpeed(position.split(';').map(item => {
                                        item.split(',')
                                    return [Number(item.split(',')[0]), Number(item.split(',')[1])]
                                })), y: 1
                            },
                            speed: 10
                                        return [Number(item.split(',')[0]), Number(item.split(',')[1])]
                                    })), y: 1
                                },
                                speed: 10
                            })
                        })
                    })
                    } else {
                        addPlotOverlayData.setStyle({
                            material: new global.DC.WallTrailMaterialProperty({
                                color: color,
                                speed: 10
                            })
                        })
                    }
                }
                this.$parent.isHaveArrow = true
@@ -511,26 +502,35 @@
                if (overlay.customType == 'polygon') {
                    if (overlay.attrParams.item.areaType != 2) {
                    if (overlay.attrParams.item.areaType != 2 && overlay.attrParams.item.areaType != 3) {
                        overlay.setStyle({
                            material: color,
                            outlineColor: outColor
                        })
                    } else {
                        overlay.setStyle({
                            material: new global.DC.WallImageTrailMaterialProperty({
                                image: '/images/jjx.png',
                                color: color,
                                repeat: {
                                    x: getLineSpeed(position.split(';').map(item => {
                                        item.split(',')
                        if (overlay.attrParams.item.areaType == 2) {
                            overlay.setStyle({
                                material: new global.DC.WallImageTrailMaterialProperty({
                                    image: '/images/jjx.png',
                                    color: color,
                                    repeat: {
                                        x: getLineSpeed(position.split(';').map(item => {
                                            item.split(',')
                                        return [Number(item.split(',')[0]), Number(item.split(',')[1])]
                                    })), y: 1
                                },
                                speed: 10
                                            return [Number(item.split(',')[0]), Number(item.split(',')[1])]
                                        })), y: 1
                                    },
                                    speed: 10
                                })
                            })
                        })
                        } else {
                            overlay.setStyle({
                                material: new global.DC.WallTrailMaterialProperty({
                                    color: color,
                                    speed: 10
                                })
                            })
                        }
                    }
                } else if (overlay.customType == 'billboard') {
@@ -580,7 +580,7 @@
                overlay.attrParams.item.type = params.type
            }
            if (params.areaType == 2) {
            if (params.areaType == 2 || params.areaType == 3) {
                overlay.attrParams.item.altitude = params.altitude
                overlay.attrParams.item.position = `LINESTRING(${params.position})`
                let positions = params.position.split(',').map(item => {
@@ -796,7 +796,7 @@
    .right {
        height: 100%;
        & > div {
        &>div {
            display: flex;
        }
src/views/activity/components/polygonPlot.vue
@@ -175,7 +175,10 @@
                label: '多边形'
            }, {
                value: 2,
                label: '电子围栏'
                label: '跑马灯'
            }, {
                value: 3,
                label: '瀑布墙'
            }],
            restPlotSelectArray: [
src/views/activity/components/publicIndex.vue
@@ -1,64 +1,31 @@
<template>
    <div>
        <layers-show-control
            :dialogVisible="dialogVisible"
            :isHavePolice="isHavePolice"
            :isHaveArrow="isHaveArrow"
            :isHaveLine="isHaveLine"
            :policeSwitch="policeSwitch"
            :arrowBtnSwitch="arrowBtnSwitch"
            :polylineBtnSwitch="polylineBtnSwitch"
        ></layers-show-control>
        <layers-show-control :dialogVisible="dialogVisible" :isHavePolice="isHavePolice" :isHaveArrow="isHaveArrow"
            :isHaveLine="isHaveLine" :policeSwitch="policeSwitch" :arrowBtnSwitch="arrowBtnSwitch"
            :polylineBtnSwitch="polylineBtnSwitch"></layers-show-control>
        <draw-btn-box
            v-if="currentPlotType == 3"
            ref="DRAWBTNBOX"
            :dialogVisible="dialogVisible"
            :isShowActivityEditBox="isShowActivityEditBox"
            :showingSecurityId="showingSecurityId"
            :policeSwitch="policeSwitch"
            :polylineBtnSwitch="polylineBtnSwitch"
            :arrowBtnSwitch="arrowBtnSwitch"
            :policeIconId="policeIconId"
            :lineWidth="lineWidth"
            @setPoliceOption="setPoliceOption"
        ></draw-btn-box>
        <draw-btn-box v-if="currentPlotType == 3" ref="DRAWBTNBOX" :dialogVisible="dialogVisible"
            :isShowActivityEditBox="isShowActivityEditBox" :showingSecurityId="showingSecurityId"
            :policeSwitch="policeSwitch" :polylineBtnSwitch="polylineBtnSwitch" :arrowBtnSwitch="arrowBtnSwitch"
            :policeIconId="policeIconId" :lineWidth="lineWidth" @setPoliceOption="setPoliceOption"></draw-btn-box>
        <two-draw-btn-box
            v-if="currentPlotType == 1"
            ref="DRAWBTNBOX"
            :dialogVisible="dialogVisible"
            :isShowActivityEditBox="isShowActivityEditBox"
            :showingSecurityId="showingSecurityId"
            :policeSwitch="policeSwitch"
            :polylineBtnSwitch="polylineBtnSwitch"
            :arrowBtnSwitch="arrowBtnSwitch"
            :policeIconId="policeIconId"
            :lineWidth="lineWidth"
            @setPoliceOption="setPoliceOption"
        ></two-draw-btn-box>
        <two-draw-btn-box v-if="currentPlotType == 1" ref="DRAWBTNBOX" :dialogVisible="dialogVisible"
            :isShowActivityEditBox="isShowActivityEditBox" :showingSecurityId="showingSecurityId"
            :policeSwitch="policeSwitch" :polylineBtnSwitch="polylineBtnSwitch" :arrowBtnSwitch="arrowBtnSwitch"
            :policeIconId="policeIconId" :lineWidth="lineWidth" @setPoliceOption="setPoliceOption"></two-draw-btn-box>
        <polygon-plot ref="PolygonPlotPage" :showingSecurityId="showingSecurityId"></polygon-plot>
        <polyline-plot ref="PolylinePlotPage" :showingSecurityId="showingSecurityId"></polyline-plot>
        <police-car-change
            ref="PoliceCarChange"
            :policeOption="policeOption"
            :showingSecurityId="showingSecurityId"
        ></police-car-change>
        <police-car-change ref="PoliceCarChange" :policeOption="policeOption"
            :showingSecurityId="showingSecurityId"></police-car-change>
        <police-person-change
            ref="PolicePersonChange"
            :policeTreeData="policeTreeData"
            :showingSecurityId="showingSecurityId"
        ></police-person-change>
        <police-person-change ref="PolicePersonChange" :policeTreeData="policeTreeData"
            :showingSecurityId="showingSecurityId"></police-person-change>
        <activity-detail
            :dialogVisible="dialogVisible"
            :activityDetails="activityDetails"
            @closeActivityDetails="closeActivityDetails"
        ></activity-detail>
        <activity-detail :dialogVisible="dialogVisible" :activityDetails="activityDetails"
            @closeActivityDetails="closeActivityDetails"></activity-detail>
        <video-control-box ref="VIDEOCONTROLBOX"></video-control-box>
    </div>
@@ -500,22 +467,32 @@
                    positions = position.split(';').map((item, index) => `${item},140`)
                    positions.push(positions[0])
                    positions = positions.join(';')
                    coverage = new global.DC.Wall(positions)
                    coverage.setStyle({
                        material: new global.DC.WallImageTrailMaterialProperty({
                            image: '/images/jjx.png',
                            color: color.curColor,
                            repeat: {
                                x: getLineSpeed(position.split(';').map(item => {
                                    item.split(',')
                                    return [Number(item.split(',')[0]), Number(item.split(',')[1])]
                                })), y: 1
                            },
                            speed: 10
                    if (params.areaType == 2) {
                        coverage.setStyle({
                            material: new global.DC.WallImageTrailMaterialProperty({
                                image: '/images/jjx.png',
                                color: color.curColor,
                                repeat: {
                                    x: getLineSpeed(position.split(';').map(item => {
                                        item.split(',')
                                        return [Number(item.split(',')[0]), Number(item.split(',')[1])]
                                    })), y: 1
                                },
                                speed: 10
                            })
                        })
                    })
                    } else {
                        coverage.setStyle({
                            material: new global.DC.WallTrailMaterialProperty({
                                color: color.curColor,
                                speed: 10
                            })
                        })
                    }
                }
                coverage.customType = 'polygon'