update 地图绘制
This commit is contained in:
@@ -6,6 +6,7 @@ export enum TabType {
|
||||
heZuoYiYuan = '2', //合作医院
|
||||
yiLiaoDian = '3', //医疗点
|
||||
jiuHuChe = '4', //救护车
|
||||
zhiShengJi = '5', //直升机
|
||||
}
|
||||
|
||||
export const tabList = [
|
||||
@@ -34,6 +35,7 @@ export const tabList = [
|
||||
},
|
||||
{
|
||||
name: '直升机',
|
||||
type: TabType.zhiShengJi,
|
||||
},
|
||||
{
|
||||
name: '急救路线',
|
||||
@@ -41,34 +43,35 @@ export const tabList = [
|
||||
];
|
||||
|
||||
export const helicopter = new URL('/@/assets/img/helicopter.png', import.meta.url).href;
|
||||
export const mapbg = new URL('/@/assets/img/helicopter.png', import.meta.url).href;
|
||||
|
||||
// 直升机位置数据
|
||||
export const aircraft = [
|
||||
{
|
||||
category: 3,
|
||||
lat: 108.861377,
|
||||
lon: 34.35965,
|
||||
lon: '108.861377',
|
||||
lat: '34.35965',
|
||||
img: helicopter,
|
||||
name: '直升机',
|
||||
},
|
||||
{
|
||||
category: 3,
|
||||
lat: 106.267358,
|
||||
lon: 38.520079,
|
||||
lon: '106.267358',
|
||||
lat: '38.520079',
|
||||
img: helicopter,
|
||||
name: '直升机',
|
||||
},
|
||||
{
|
||||
category: 3,
|
||||
lat: 109.505282,
|
||||
lon: 36.579381,
|
||||
lon: '109.505282',
|
||||
lat: '36.579381',
|
||||
img: helicopter,
|
||||
name: '直升机',
|
||||
},
|
||||
{
|
||||
category: 3,
|
||||
lat: 107.638372,
|
||||
lon: 35.734218,
|
||||
lon: '107.638372',
|
||||
lat: '35.734218',
|
||||
img: helicopter,
|
||||
name: '直升机',
|
||||
},
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { Map } from '/@/assets/mapUtils/map';
|
||||
import { tabList, legendList, getTimeStr, getKmStr, mapApiSwitch } from '/@/components/chinaMap/chinaHooks';
|
||||
import { tabList, legendList, getTimeStr, getKmStr, mapApiSwitch, TabType, aircraft } from '/@/components/chinaMap/chinaHooks';
|
||||
|
||||
const formState = ref({
|
||||
start: '西安北站',
|
||||
@@ -71,7 +71,15 @@
|
||||
const currentIndex = ref(0);
|
||||
|
||||
function changeTab(item, i: number) {
|
||||
// if (i == currentIndex.value) {
|
||||
// return;
|
||||
// }
|
||||
currentIndex.value = i;
|
||||
// 直升机
|
||||
if (TabType.zhiShengJi == item.type) {
|
||||
Map.createAircraft(aircraft);
|
||||
return;
|
||||
}
|
||||
getMapData(item.type, { type: item.type });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user