优化下潜地图下潜轨迹交互逻辑
This commit is contained in:
parent
1dadfc0b6b
commit
efe6cd18a3
|
|
@ -70,7 +70,7 @@ import PieChart from './components/PieChart.vue'
|
|||
import { reportList, platformHov, hovUnit, hovUnitYear, hovDiving } from '../../api/statistics'
|
||||
import { filterDictItems } from '../../utils/index'
|
||||
import { initMapbox } from "@/utils/mapbox-utils";
|
||||
import { loadVectorLayer, loadJsonPointFeature,showUnitReport } from '@/utils/vector-layer-utils'
|
||||
import { setMapLayoutProperty, loadVectorLayer, loadJsonPointFeature, showUnitReport } from '@/utils/vector-layer-utils'
|
||||
import { ColorGenerator } from '@/utils/color-generator';
|
||||
|
||||
export default {
|
||||
|
|
@ -158,7 +158,6 @@ export default {
|
|||
// 选择载人潜水器
|
||||
handleCommand(command) {
|
||||
this.currentTitle = command
|
||||
this.removeSingleLineImg()
|
||||
if (command === '全部载人潜水器') {
|
||||
this.getHovList()
|
||||
this.gitHovDiving()
|
||||
|
|
@ -227,15 +226,17 @@ export default {
|
|||
// 潜次统计
|
||||
gitHovDiving(params = {}) {
|
||||
hovDiving(params).then(res => {
|
||||
if (params.platform_name) {
|
||||
// 按潜水器筛选数据,先隐藏所有图层,再根据筛选结果显示对应图层
|
||||
setMapLayoutProperty('voyageMap_hov', 'none')
|
||||
}
|
||||
|
||||
let i = 0;
|
||||
const colors = ColorGenerator.generateDivergingColors(res.array.length);
|
||||
// 添加轨迹图层
|
||||
res.array.forEach(item => {
|
||||
// 加载轨迹图层
|
||||
// 加载下潜轨迹
|
||||
loadVectorLayer(item.diving_sn, ["line", "symbol"], [colors[i], "#FFFFFF"], "visible", "voyageMap_hov", "dsds");
|
||||
i++;
|
||||
|
||||
// this.addSingleLineImg(item)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue