| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2023-03-31 10:52:25 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-05-06 10:45:56 |
| | | * @LastEditTime: 2023-05-06 16:52:41 |
| | | * @FilePath: \srs-police-affairs\src\utils\turfPolygon.js |
| | | * @Description: |
| | | * |
| | |
| | | // const poly = turf.polygon([[[0, 29], [3.5, 29], [2.5, 32], [0, 29]]]) |
| | | |
| | | return scope |
| | | } |
| | | |
| | | export const getLineSpeed = (data) => { |
| | | var line = turf.lineString(data) |
| | | var length = turf.length(line, { units: 'miles' }) |
| | | |
| | | return length * 1000 / 50 |
| | | } |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <ul> |
| | | <li> |
| | | <!-- <el-button |
| | | ></el-button>--> |
| | | <button @click="drawThreeArrow('polyline', 'policecar', 'polyline')" title="巡逻路线"> |
| | | ></el-button>--> |
| | | <button |
| | | @click="drawThreeArrow('polyline', 'policecar', 'polyline')" |
| | | title="巡逻路线" |
| | | > |
| | | <img src="/img/icon/route1.png" style="height:100%" /> |
| | | </button> |
| | | </li> |
| | |
| | | } from '@/api/activity/index.js' |
| | | |
| | | import Plot from "@/utils/plot/Plot.js" |
| | | |
| | | import { getLineSpeed } from '@/utils/turfPolygon' |
| | | let addPlotOverlayData = null |
| | | |
| | | let currentEmitEl = null |
| | |
| | | currentEmitEl = overlayData |
| | | global.viewer.scene.globe.depthTestAgainstTerrain = true |
| | | if (overlayData.customType == 'polygon' || overlayData.customType == 'brokenline') { |
| | | drawThreeTool.edit(overlayData, (e) => { |
| | | 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, altitude }) |
| | | global.viewer.scene.globe.depthTestAgainstTerrain = false |
| | | currentStatus = '' |
| | | }, true) |
| | | if (overlayData.attrParams.item.areaType != 2) { |
| | | drawThreeTool.edit(overlayData, (e) => { |
| | | 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, altitude }) |
| | | global.viewer.scene.globe.depthTestAgainstTerrain = false |
| | | currentStatus = '' |
| | | }, true) |
| | | } else { |
| | | overlayData.show = false |
| | | // this.$parent.removeArrowsListLayer(overlayData) |
| | | let altitude = overlayData.attrParams.item.altitude.split(',') |
| | | let position = overlayData.attrParams.item.position.slice(11, overlayData.attrParams.item.position.length - 1).replace(/,/g, ';').replace(/ /g, ',') |
| | | let positions |
| | | if (altitude && altitude.length) positions = position.split(';').map((item, index) => `${item},${altitude[index]}`).join(';') |
| | | let coverage = new global.DC.Polygon(positions) |
| | | |
| | | let color = this.$parent.getCoverageColor(overlayData.attrParams.item.color) |
| | | |
| | | coverage.setStyle({ |
| | | material: color.curColor, |
| | | extrudedHeight: null, |
| | | perPositionHeight: this.$parent.currentPlotType == 3 ? true : false, |
| | | closeTop: false, |
| | | closeBottom: false, |
| | | // classificationType: global.DC.Namespace.Cesium.ClassificationType.TERRAIN |
| | | outline: true, |
| | | outlineColor: color.outColor, |
| | | outlineWidth: 4.0, |
| | | }) |
| | | |
| | | coverage.customType = 'polygon' |
| | | |
| | | this.$parent.addArrowsListLayer(coverage) |
| | | |
| | | drawThreeTool.edit(coverage, (e) => { |
| | | this.$parent.removeArrowsListLayer(coverage) |
| | | |
| | | 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) |
| | | global.viewer.scene.globe.depthTestAgainstTerrain = false |
| | | currentStatus = '' |
| | | }, true) |
| | | } |
| | | } else if (overlayData.customType == 'billboard') { |
| | | drawThreeTool.edit(overlayData, (e) => { |
| | | const position = `${e.position.lng} ${e.position.lat},${e.position.lng} ${e.position.lat}` |
| | |
| | | let b = parseInt(item.color.slice(5, 7), 16) |
| | | let a = Math.floor(Number(item.color.split(',')[1]) * 2.55) ? Math.floor(Number(item.color.split(',')[1]) * 2.55) : 255 |
| | | let color = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, a) |
| | | let position = item.position.slice(12, item.position.length - 2).replace(/,/g, ';').replace(/ /g, ',') |
| | | |
| | | let positions = position.split(';').map((item, index) => `${item},140`) |
| | | positions.push(positions[0]) |
| | | positions = positions.join(';') |
| | | if (item.type == 5 || item.areaType == 2) { |
| | | this.$parent.removeArrowsListLayer(addPlotOverlayData) |
| | | |
| | | addPlotOverlayData = new global.DC.Wall(positions) |
| | | |
| | | addPlotOverlayData.customType = 'polygon' |
| | | |
| | | this.$parent.addArrowsListLayer(addPlotOverlayData) |
| | | } |
| | | |
| | | |
| | | addPlotOverlayData.attrParams = { id: item.id, color: item.color, item } |
| | | |
| | |
| | | |
| | | this.$parent.isHaveFactor = true |
| | | } else if (item.type == 5) { |
| | | addPlotOverlayData.setStyle({ |
| | | material: color, |
| | | outlineColor: global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 255) |
| | | }) |
| | | |
| | | if (item.areaType != 2) { |
| | | 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(',') |
| | | |
| | | return [Number(item.split(',')[0]), Number(item.split(',')[1])] |
| | | })), y: 1 |
| | | }, |
| | | speed: 10 |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | this.$parent.isHaveArrow = true |
| | | } else { |
| | |
| | | let outColor = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 255) |
| | | overlay.attrParams.color = params.color |
| | | |
| | | let position = overlay.attrParams.item.position.slice(11, overlay.attrParams.item.position.length - 1).replace(/,/g, ';').replace(/ /g, ',') |
| | | |
| | | if (overlay.customType == 'polygon') { |
| | | overlay.setStyle({ |
| | | material: color, |
| | | outlineColor: outColor |
| | | }) |
| | | |
| | | if (overlay.attrParams.item.areaType != 2) { |
| | | 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(',') |
| | | |
| | | return [Number(item.split(',')[0]), Number(item.split(',')[1])] |
| | | })), y: 1 |
| | | }, |
| | | speed: 10 |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | } else if (overlay.customType == 'billboard') { |
| | | overlay.setStyle({ |
| | | color: color |
| | |
| | | |
| | | if ('type' in params && params.type != '') { |
| | | overlay.attrParams.item.type = params.type |
| | | } |
| | | |
| | | if (params.areaType == 2) { |
| | | overlay.attrParams.item.altitude = params.altitude |
| | | overlay.attrParams.item.position = `LINESTRING(${params.position})` |
| | | let positions = params.position.split(',').map(item => { |
| | | item = item.split(' ') |
| | | item = new global.DC.Position(item[0], item[1], 140) |
| | | |
| | | return item |
| | | }) |
| | | |
| | | positions.push(positions[0]) |
| | | |
| | | overlay.positions = positions |
| | | |
| | | overlay.show = true |
| | | } |
| | | }, |
| | | |
| | |
| | | .right { |
| | | height: 100%; |
| | | |
| | | &>div { |
| | | & > div { |
| | | display: flex; |
| | | } |
| | | |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog title="修改标绘" :visible.sync="editPlotVisible" :modal="true" :close-on-click-modal="false" |
| | | :modal-append-to-body="true" :append-to-body="true" class="edit-plot-box"> |
| | | <el-dialog |
| | | title="修改标绘" |
| | | :visible.sync="editPlotVisible" |
| | | :modal="true" |
| | | :close-on-click-modal="false" |
| | | :modal-append-to-body="true" |
| | | :append-to-body="true" |
| | | class="edit-plot-box" |
| | | > |
| | | <div> |
| | | <div class="line"> |
| | | <div class="value-name-box">描述:</div> |
| | | <div class="input-width-box" style="flex: 1;"> |
| | | <input style="width: 100%;" type="text" v-model="polygonRemark" placeholder="请输入..." /> |
| | | <input |
| | | style="width: 100%;" |
| | | type="text" |
| | | v-model="polygonRemark" |
| | | placeholder="请输入..." |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <div class="value-name-box">选择类型:</div> |
| | | <div class="select-type" style="flex: 1;"> |
| | | <el-select size="small" v-model="restPlotType" placeholder="请选择类型"> |
| | | <el-option v-for="item in restPlotSelectArray" :key="item.value" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | <el-option |
| | | v-for="item in restPlotSelectArray" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="line" v-show="customImageShow"> |
| | | <div class="value-name-box"> |
| | | 选择图片: |
| | | </div> |
| | | <div class="select-image" style="position: relative; display: flex; align-items: center;"> |
| | | <el-button style="margin-top: 0; position: relative; background: transparent; border-color: #fff;" |
| | | @click="imagesListShow = !imagesListShow"> |
| | | <img :src="curImgUrl" alt="" |
| | | style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 999; width: 20px; height: 20px;"> |
| | | <div class="value-name-box">选择图片:</div> |
| | | <div |
| | | class="select-image" |
| | | style="position: relative; display: flex; align-items: center;" |
| | | > |
| | | <el-button |
| | | style="margin-top: 0; position: relative; background: transparent; border-color: #fff;" |
| | | @click="imagesListShow = !imagesListShow" |
| | | > |
| | | <img |
| | | :src="curImgUrl" |
| | | alt |
| | | style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 999; width: 20px; height: 20px;" |
| | | /> |
| | | </el-button> |
| | | |
| | | <images-select v-show="imagesListShow" @curClick="curClick"></images-select> |
| | |
| | | <div class="line"> |
| | | <div class="value-name-box">选择标绘颜色:</div> |
| | | <div class="pick-color-box"> |
| | | <el-color-picker v-model="choosePlotColor" :predefine="predefineColors" size="small"> |
| | | </el-color-picker> |
| | | <el-color-picker |
| | | v-model="choosePlotColor" |
| | | :predefine="predefineColors" |
| | | size="small" |
| | | ></el-color-picker> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="line"> |
| | | <div class="value-name-box">设置透明度:</div> |
| | | <div class="alpha"> |
| | | <el-slider :min="1" v-model="choosePlotColorAlpha" :format-tooltip="formatTooltip"></el-slider> |
| | | <el-slider |
| | | :min="1" |
| | | v-model="choosePlotColorAlpha" |
| | | :format-tooltip="formatTooltip" |
| | | ></el-slider> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <el-button @click="editPlotVisible = false">取消</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="新增标绘" :visible.sync="polygonAddVisible" :modal="true" :close-on-click-modal="false" |
| | | :modal-append-to-body="true" :append-to-body="true" class="add-polygon-box" :before-close="cancelSavePolygon"> |
| | | |
| | | <el-dialog |
| | | title="新增标绘" |
| | | :visible.sync="polygonAddVisible" |
| | | :modal="true" |
| | | :close-on-click-modal="false" |
| | | :modal-append-to-body="true" |
| | | :append-to-body="true" |
| | | class="add-polygon-box" |
| | | :before-close="cancelSavePolygon" |
| | | > |
| | | <div> |
| | | <div class="line"> |
| | | <div class="value-name-box">描述:</div> |
| | | <div class="input-width-box" style="flex: 1;"> |
| | | <input style="width: 100%;" type="text" v-model="polygonRemark" placeholder="请输入..." /> |
| | | <input |
| | | style="width: 100%;" |
| | | type="text" |
| | | v-model="polygonRemark" |
| | | placeholder="请输入..." |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <div class="value-name-box">选择类型:</div> |
| | | <div class="select-type" style="flex: 1;"> |
| | | <el-select size="small" v-model="restPlotType" placeholder="请选择类型"> |
| | | <el-option v-for="item in restPlotSelectArray" :key="item.value" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | <el-option |
| | | v-for="item in restPlotSelectArray" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="line" v-show="isNeedPolygonType"> |
| | | <div class="value-name-box">选择类型:</div> |
| | | <div class="select-type"> |
| | | <div class="select-type" style="flex: 1;"> |
| | | <el-select size="small" v-model="polygonAreaType" placeholder="请选择区域类型"> |
| | | <el-option v-for="item in polygonAreaOption" :key="item.value" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | <el-option |
| | | v-for="item in polygonAreaOption" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="line" v-show="customImageShow"> |
| | | <div class="value-name-box"> |
| | | 选择图片: |
| | | </div> |
| | | <div class="select-image" style="position: relative; display: flex; align-items: center;"> |
| | | <el-button style="margin-top: 0; position: relative; background: transparent; border-color: #fff;" |
| | | @click="imagesListShow = !imagesListShow"> |
| | | <img :src="curImgUrl" alt="" |
| | | style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 999; width: 20px; height: 20px;"> |
| | | <div class="value-name-box">选择图片:</div> |
| | | <div |
| | | class="select-image" |
| | | style="position: relative; display: flex; align-items: center;" |
| | | > |
| | | <el-button |
| | | style="margin-top: 0; position: relative; background: transparent; border-color: #fff;" |
| | | @click="imagesListShow = !imagesListShow" |
| | | > |
| | | <img |
| | | :src="curImgUrl" |
| | | alt |
| | | style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 999; width: 20px; height: 20px;" |
| | | /> |
| | | </el-button> |
| | | <images-select v-show="imagesListShow" @curClick="curClick"></images-select> |
| | | </div> |
| | |
| | | <div class="line"> |
| | | <div class="value-name-box">选择标绘颜色:</div> |
| | | <div class="pick-color-box"> |
| | | <el-color-picker v-model="choosePlotColor" :predefine="predefineColors" size="small"> |
| | | </el-color-picker> |
| | | <el-color-picker |
| | | v-model="choosePlotColor" |
| | | :predefine="predefineColors" |
| | | size="small" |
| | | ></el-color-picker> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="line"> |
| | | <div class="value-name-box">设置透明度:</div> |
| | | <div class="alpha"> |
| | | <el-slider :min="1" v-model="choosePlotColorAlpha" :format-tooltip="formatTooltip"></el-slider> |
| | | <el-slider |
| | | :min="1" |
| | | v-model="choosePlotColorAlpha" |
| | | :format-tooltip="formatTooltip" |
| | | ></el-slider> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <el-button @click="cancelSavePolygon">取消</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | polygonAreaOption: [{ |
| | | value: 1, |
| | | label: '核心区' |
| | | label: '多边形' |
| | | }, { |
| | | value: 2, |
| | | label: '缓冲区' |
| | | label: '电子围栏' |
| | | }], |
| | | |
| | | restPlotSelectArray: [ |
| | |
| | | |
| | | if (type == 5) { |
| | | this.polygonAreaType = 1 |
| | | this.isNeedPolygonType = false |
| | | this.isNeedPolygonType = true |
| | | } else { |
| | | this.isNeedPolygonType = false |
| | | } |
| | |
| | | |
| | | setCurOver (e) { |
| | | this.restSelectBox = false |
| | | this.customImageShow = false |
| | | |
| | | plotOverlayData = e |
| | | |
| | |
| | | <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> |
| | |
| | | import policePersonChange from './policePersonChange.vue' |
| | | import activityDetail from './activityDetail.vue' |
| | | import videoControlBox from './videoControlBox.vue' |
| | | import { getLineSpeed } from '@/utils/turfPolygon' |
| | | |
| | | // 要素的 |
| | | let pointCircleCarLayer = null |
| | |
| | | // 作战标绘的添加 |
| | | addArrowsListLayer (overlay) { |
| | | arrowsListLayer.addOverlay(overlay) |
| | | }, |
| | | |
| | | removeArrowsListLayer (overlay) { |
| | | arrowsListLayer.removeOverlay(overlay) |
| | | }, |
| | | |
| | | addSaveNewDrawLine (positions, altitude) { |
| | |
| | | this.arrowBtnSwitch = true |
| | | this.polylineBtnSwitch = true |
| | | |
| | | // 加载当前活动区域 |
| | | if (params.item.activityArea && params.item.activityArea.length > 0) { |
| | | |
| | | console.log(params.item.activityArea, 36223322) |
| | | |
| | | let polyGonData = params.item.activityArea.slice(11, params.item.activityArea.length - 1) |
| | | polyGonData = polyGonData.replace(/,/g, ";") |
| | | polyGonData = polyGonData.replace(/ /g, ",") |
| | | let newPolyData = polyGonData.split(';').map(item => { |
| | | let lngOrlat = item.split(',') |
| | | lngOrlat.push(140) |
| | | |
| | | lngOrlat = lngOrlat.join(',') |
| | | |
| | | return lngOrlat |
| | | }).join(';') |
| | | |
| | | console.log(newPolyData, 456) |
| | | |
| | | this.$EventBus.$emit('rowLayerWallAdd', { |
| | | layerName: 'polygonWallLayer', |
| | | positions: newPolyData |
| | | }) |
| | | } |
| | | |
| | | this.getPolicemanTree({ deptId: params.deptId }) |
| | | this.getCarList({ deptId: params.deptId }) |
| | | |
| | |
| | | |
| | | // 获取标绘箭头列表 |
| | | getSecurityPlotList (securityId) { |
| | | |
| | | getSecurityPlotList(securityId).then(res => { |
| | | // 要素资源 |
| | | this.$parent.normalPeopleList = res.data.data.filter(item => item.type == 6) |
| | |
| | | }, |
| | | |
| | | initLayersCoverage (type, color, params, position, altitude) { |
| | | if (altitude && altitude.length) position = position.split(';').map((item, index) => `${item},${altitude[index]}`).join(';') |
| | | let coverage = new global.DC[type](position) |
| | | |
| | | let positions |
| | | if (altitude && altitude.length) positions = position.split(';').map((item, index) => `${item},${altitude[index]}`).join(';') |
| | | let coverage = new global.DC[type](positions) |
| | | if (type == 'Polygon') { |
| | | coverage.setStyle({ |
| | | material: color.curColor, |
| | | extrudedHeight: null, |
| | | perPositionHeight: this.currentPlotType == 3 ? true : false, |
| | | closeTop: false, |
| | | closeBottom: false, |
| | | // classificationType: global.DC.Namespace.Cesium.ClassificationType.TERRAIN |
| | | outline: true, |
| | | outlineColor: color.outColor, |
| | | outlineWidth: 4.0, |
| | | }) |
| | | if (params.areaType == 1) { |
| | | coverage.setStyle({ |
| | | material: color.curColor, |
| | | extrudedHeight: null, |
| | | perPositionHeight: this.currentPlotType == 3 ? true : false, |
| | | closeTop: false, |
| | | closeBottom: false, |
| | | // classificationType: global.DC.Namespace.Cesium.ClassificationType.TERRAIN |
| | | outline: true, |
| | | outlineColor: color.outColor, |
| | | outlineWidth: 4.0, |
| | | }) |
| | | } else { |
| | | 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 |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | coverage.customType = 'polygon' |
| | | } else if (type == 'Polyline') { |