update 地图接口调整

This commit is contained in:
zk
2024-09-20 14:45:13 +08:00
parent ed8fc6f8a6
commit ca4a9a8c28
4 changed files with 29 additions and 17 deletions
@@ -83,10 +83,10 @@
import { message } from 'ant-design-vue';
import { RedoOutlined } from '@ant-design/icons-vue';
import { Map } from '/@/assets/mapUtils/map';
import { getKmStr, getTimeStr, mapApiSwitch, tabList, TabType } from '/@/components/chinaMap/chinaHooks';
import { getKmStr, getTimeStr, tabList, TabType } from '/@/components/chinaMap/chinaHooks';
import { useDetailStore } from '/@/store/modules/detailData.ts';
import RoutePanel from '/@/components/chinaMap/components/routePanel.vue';
import { legendList } from '/@/views/centralScreen/components/centerMapHooks.ts';
import { legendList, mapApiSwitch } from '/@/views/centralScreen/components/centerMapHooks.ts';
const props = defineProps({
//是否展示底部统计
@@ -1,3 +1,6 @@
import { TabType } from '/@/components/chinaMap/chinaHooks.ts';
import { getMapListApi } from '/@/views/centralScreen/centralScreen.api.ts';
export const legend1 = new URL('/@/assets/img/legend1.png', import.meta.url).href;
export const legend2 = new URL('/@/assets/img/legend2.png', import.meta.url).href;
export const legend3 = new URL('/@/assets/img/legend3.png', import.meta.url).href;
@@ -12,3 +15,14 @@ export const legendList = [
{ img: legend4, text: '合作医院' },
{ img: legend5, text: '地方医院' },
];
export function mapApiSwitch(type: string, params: any) {
const basicParams = {
lat: 34, //纬度34
lon: 108, //经度
};
// 全部 油田 医疗点 合作医院
if ([TabType.all, TabType.youTianYiYuan, TabType.yiLiaoDian, TabType.heZuoYiYuan, TabType.jiuHuChe, TabType.jiuHuChe].includes(type)) {
return getMapListApi({ ...basicParams, ...params });
}
}