From e88d2bca9652076d71cb6a8a64b25c226c61a91f Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 31 Mar 2023 22:01:26 +0800
Subject: [PATCH] 电子沙盘,首页
---
src/views/activity/components/drawBtnBox.vue | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/views/activity/components/drawBtnBox.vue b/src/views/activity/components/drawBtnBox.vue
index ad6f23e..12c6efb 100644
--- a/src/views/activity/components/drawBtnBox.vue
+++ b/src/views/activity/components/drawBtnBox.vue
@@ -294,6 +294,9 @@
addNewPolice (data, type, carType) {
// 巡逻路线添加
if (type == 'policecar' && carType == 1) {
+ const maxHeight = data.altitude.split(',').reduce((pre, cur) => {
+ return cur > pre ? cur : pre
+ }, 0)
// 线坐标字符串
let positionNewArr = this.$parent.convertPolylineOrPolygonPositionDate(data, 'add')
// 范围面坐标串
@@ -301,7 +304,7 @@
let positionStr = ''
coords.forEach((item, index) => {
if (!(index == coords.length - 1)) {
- positionStr += item[0] + ',' + item[1] + ';'
+ positionStr += item[0] + ',' + item[1] + ',' + maxHeight + ';'
}
})
let polygonSavePositionStr = positionStr + coords[0][0] + ',' + coords[0][1] + ';'
@@ -515,7 +518,7 @@
// idid, carId警车id, color颜色, width巡逻路线范围宽度, type线面类型, position坐标
updateActivityCar (params, overlay) {
updateActivityCar(params).then(res => {
- if (res.data.success) {
+ if (res.data) {
this.editPoliceStyle(params, overlay)
this.$message({
message: '保存成功',
--
Gitblit v1.9.3