| | |
| | | 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') |
| | | // 范围面坐标串 |
| | |
| | | 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] + ';' |
| | |
| | | // 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: '保存成功', |