This commit is contained in:
zk
2023-12-04 16:11:17 +08:00
parent deefed16b9
commit df5d0ec8e4
9 changed files with 153 additions and 108 deletions
+24
View File
@@ -1,18 +1,31 @@
import { getAllList } from '/@/components/chinaMap/chinaMapApi.ts';
export enum TabType {
all = '', //所有资源
youTianYiYuan = '1', //油田医院
heZuoYiYuan = '2', //合作医院
yiLiaoDian = '3', //医疗点
}
export const tabList = [
{
name: '所有资源',
type: TabType.all,
},
{
name: '油田医院',
type: TabType.youTianYiYuan,
},
{
name: '医疗点',
type: TabType.yiLiaoDian,
},
{
name: '救护车',
},
{
name: '合作医院',
type: TabType.heZuoYiYuan,
},
{
name: '地方医院',
@@ -24,6 +37,17 @@ export const tabList = [
name: '急救路线',
},
];
export function mapApiSwitch(type: string, params: any) {
const basicParams = {
lat: 34, //纬度34
lon: 108, //经度
};
if ([TabType.all, TabType.yiLiaoDian, TabType.heZuoYiYuan].includes(type)) {
return getAllList({ ...basicParams, ...params });
}
}
export const mapIcon1 = new URL('/@/assets/img/mapIcon1.png', import.meta.url).href;
export const mapIcon2 = new URL('/@/assets/img/mapIcon2.png', import.meta.url).href;
export const mapIcon3 = new URL('/@/assets/img/mapIcon3.png', import.meta.url).href;