15 lines
482 B
JavaScript
15 lines
482 B
JavaScript
|
import { getSessionStorage } from '@/utils/auth';
|
||
|
import { listPublishMap, getMapListByProjectCode } from '@/api/jmap/map';
|
||
|
import { ProjectCode } from '@/scripts/ConstDic';
|
||
|
|
||
|
export async function getMapListByProject() {
|
||
|
const project = getSessionStorage('project');
|
||
|
let mapList = [];
|
||
|
if (project.endsWith('xty')) {
|
||
|
mapList = await getMapListByProjectCode(ProjectCode[project]);
|
||
|
} else {
|
||
|
mapList = await listPublishMap();
|
||
|
}
|
||
|
return mapList;
|
||
|
}
|