优化航次地图航迹显示交互逻辑
This commit is contained in:
parent
8ee0db5f3a
commit
1dadfc0b6b
|
|
@ -76,7 +76,7 @@ import PieChart from './components/PieChart.vue'
|
|||
import { reportList, shipTotal, shipUnit, shipUnitYear, shipVoyage } from '../../api/statistics'
|
||||
import { getYearRange, 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 {
|
||||
|
|
@ -171,7 +171,6 @@ export default {
|
|||
// 选择科考船
|
||||
handleCommand(command) {
|
||||
this.currentTitle = command
|
||||
// this.removeSingleLineImg()
|
||||
if (command === '全部科考船') {
|
||||
this.getShipList()
|
||||
this.gitShipVoyage()
|
||||
|
|
@ -243,13 +242,7 @@ export default {
|
|||
shipVoyage(params).then(res => {
|
||||
if (params.start || params.end) {
|
||||
// 按年份筛选数据,先隐藏所有图层,再根据筛选结果显示对应图层
|
||||
const layers = Vue.config.maps['voyageMap_ship'].getStyle().layers;
|
||||
layers.forEach(layer => {
|
||||
// 跳过底图
|
||||
if (layer.id !== '影像地图' && layer.type !== 'raster') {
|
||||
Vue.config.maps['voyageMap_ship'].setLayoutProperty(layer.id, 'visibility', 'none');
|
||||
}
|
||||
});
|
||||
setMapLayoutProperty('voyageMap_ship', 'none')
|
||||
}
|
||||
|
||||
let i = 0
|
||||
|
|
@ -267,7 +260,6 @@ export default {
|
|||
selectVoyageYear(val) {
|
||||
const shipName = this.currentTitle === '全部科考船' ? '' : this.currentTitle
|
||||
if (val) {
|
||||
// this.removeSingleLineImg()
|
||||
const params = getYearRange(val)
|
||||
this.gitShipVoyage({ ...params, ship_name: shipName })
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue