rt-sim-training-client/src/utils/mapList.js

15 lines
508 B
JavaScript
Raw Normal View History

2019-11-08 16:22:05 +08:00
import { getSessionStorage } from '@/utils/auth';
import { listPublishMap, getMapListByProjectCode } from '@/api/jmap/map';
import { ProjectCode } from '@/scripts/ConstDic';
export async function getMapListByProject(drawWay) {
2019-11-08 16:22:05 +08:00
const project = getSessionStorage('project');
let mapList = [];
if (project.endsWith('xty')) {
mapList = await getMapListByProjectCode(ProjectCode[project]);
} else {
mapList = await listPublishMap({'drawWay':drawWay});
2019-11-08 16:22:05 +08:00
}
return mapList;
}