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';
|
|
|
|
|
2019-12-09 17:38:08 +08:00
|
|
|
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 {
|
2019-12-09 17:38:08 +08:00
|
|
|
mapList = await listPublishMap({'drawWay':drawWay});
|
2019-11-08 16:22:05 +08:00
|
|
|
}
|
|
|
|
return mapList;
|
|
|
|
}
|