From c08ef3a216d37a4064cae2ace4ef7dabc180d2e0 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 13 Jan 2023 15:43:37 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/srs-police-affairs
---
src/views/activity/index.vue | 82 ++++++++++-------------------------------
1 files changed, 20 insertions(+), 62 deletions(-)
diff --git a/src/views/activity/index.vue b/src/views/activity/index.vue
index f03f915..dc54851 100644
--- a/src/views/activity/index.vue
+++ b/src/views/activity/index.vue
@@ -236,39 +236,6 @@
<div class="category">活动内容:</div>
<div class="category-value">{{ activityDetails.content }}</div>
</div>
- <!-- <div class="row-box">
- <div class="category">活动类型:</div>
- <div class="category-value">{{ activityDetails.type }}</div>
- </div>-->
-
- <!-- <div class="row-box">
- <div class="category">应急预案:</div>
- <div class="category-value">
- <el-switch v-model="policeSwitch" @change="switchChange" active-color="#13ce66"
- inactive-color="#ccc"></el-switch>
- </div>
- </div>
-
- <div class="row-box">
- <div class="category">巡逻路线:</div>
- <div class="category-value">
- <el-switch v-model="polylineBtnSwitch" @change="switchBtnChange" active-color="#13ce66"
- inactive-color="#ccc"></el-switch>
- </div>
- </div>-->
-
- <!-- <div class="row-box">
- <div class="category">分析范围:</div>
- <div class="category-value">
- <el-input
- @input="analyseChange"
- size="mini"
- type="number"
- v-model="analyseInput"
- placeholder="请输入范围"
- ></el-input>
- </div>
- </div>-->
</div>
<div class="plan-control" v-show="dialogVisible&&(isHavePolice||isHaveArrow||isHaveLine)">
@@ -617,13 +584,13 @@
}
// 轨迹
- let positions = "116.023042, 28.684732; 116.023402, 28.679067; 116.023475, 28.678843; 116.023697, 28.678647; 116.024121, 28.678391; 116.026906, 28.678461; 116.027065, 28.676867; 116.033252, 28.676165"
- tc = new global.DC.TrackController(global.viewer)
- track = new global.DC.Track(positions, 15)
- track.setModel('/model/qiche.gltf', {
- scale: 0.5
- })
- tc.addTrack(track)
+ // let positions = "116.023042, 28.684732; 116.023402, 28.679067; 116.023475, 28.678843; 116.023697, 28.678647; 116.024121, 28.678391; 116.026906, 28.678461; 116.027065, 28.676867; 116.033252, 28.676165"
+ // tc = new global.DC.TrackController(global.viewer)
+ // track = new global.DC.Track(positions, 15)
+ // track.setModel('/model/qiche.gltf', {
+ // scale: 0.5
+ // })
+ // tc.addTrack(track)
})
},
@@ -763,9 +730,19 @@
this.isHaveLine = res.data.data.some(item => {
return item.type == 1
})
+ let count = 0
res.data.data.forEach(item => {
if (item.type == 1 && polylineShow) {
let positionNewArr = this.convertPolylineOrPolygonPositionDate(item.position, item.type)
+ count++
+ if (count == 1) {
+ tc = new global.DC.TrackController(global.viewer)
+ track = new global.DC.Track(positionNewArr, 15)
+ track.setModel('/model/qiche.gltf', {
+ scale: 0.5
+ })
+ tc.addTrack(track)
+ }
console.log(3333333333, positionNewArr)
this.$EventBus.$emit('layerPolylineAdd', {
layerName: 'newCarDrawLayers',
@@ -1006,27 +983,8 @@
// 切换轨警力资源显示
switchChange (e) {
- this.getSecurityCarList(this.securityId, this.policeSwitch, this.polylineBtnSwitch)
+ this.getSecurityCarList(this.showingSecurityId, this.policeSwitch, this.polylineBtnSwitch)
this.getSecurityPoliceList(this.showingSecurityId, this.policeSwitch)
- if (e == true) {
- this.$EventBus.$emit('layerPolylineAdd', {
- layerName: 'polylineLayer',
- positions: '116.023042, 28.684732; 116.023402, 28.679067; 116.023475, 28.678843; 116.023697, 28.678647; 116.024121, 28.678391; 116.026906, 28.678461; 116.027065, 28.676867; 116.033252, 28.676165',
- material: global.DC.Namespace.Cesium.Color.fromBytes(
- 255, 0, 0,
- 255
- ),
- distanceDisplayCondition: {
- near: 0, //最近距离
- far: Number.MAX_VALUE //最远距离
- }
- })
- } else {
- this.$EventBus.$emit('mapClearLayer', {
- layerName: 'polylineLayer',
- type: 'VectorLayer'
- })
- }
},
// 切换作战标绘
@@ -1037,7 +995,7 @@
// 切换轨迹播放控件
switchBtnChange (e) {
this.isTrackBtnShow = e
- this.getSecurityCarList(this.securityId, this.policeSwitch, this.polylineBtnSwitch)
+ this.getSecurityCarList(this.showingSecurityId, this.policeSwitch, this.polylineBtnSwitch)
},
// 输入绘制线范围
@@ -1309,7 +1267,7 @@
updateSecurityPlot (id, position) {
updateSecurityPlot(id, position).then(res => {
console.log(res, 222)
- this.getSecurityPlotList(this.securityId, this.arrowBtnSwitch)
+ this.getSecurityPlotList(this.showingSecurityId, this.arrowBtnSwitch)
})
},
--
Gitblit v1.9.3