Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
f748202bef
@ -675,7 +675,7 @@ const map = {
|
||||
((item.stationCodeList.includes(stationCode) && item.elementList.includes(deviceCode)) || !stationCode)
|
||||
) {
|
||||
flag = true;
|
||||
} else if (store.state.training.prdType === '02' && item.type === 'CENTER' && item.elementList.includes(deviceCode)) {
|
||||
} else if (['02', '04', '05'].includes(store.state.training.prdType) && item.type === 'CENTER' && item.elementList.includes(deviceCode)) {
|
||||
flag = true;
|
||||
} else if (store.state.training.prdType === '09' && item.type === 'DEPOT_IL' && item.stationCodeList.includes(stationCode) && item.elementList.includes(deviceCode)) {
|
||||
flag = true;
|
||||
|
@ -35,13 +35,17 @@ function hasPermission(roles, route, parentsRoles) {
|
||||
*/
|
||||
function resetAsyncRouter({ systemType }) {
|
||||
let list = publicAsyncRoute;
|
||||
if (systemType == projectTrain) {
|
||||
const projectList = [projectTrain, projectXian, projectJyd, projectTky, projectDrts, projectRichor];
|
||||
const specialProjects = [projectXty, projectGzzb, projectHeb, projectSdy, projectRichorJoint];
|
||||
const specialProjectEnum = {[projectXty]:'designxty', [projectGzzb]:'designgzb', [projectHeb]:'designheb',
|
||||
[projectSdy]:'designsdy', [projectRichorJoint]:'designrichorjoint' };
|
||||
if (projectList.includes(systemType)) {
|
||||
list = [...list, ...asyncRouter];
|
||||
} else if (systemType == projectXian) {
|
||||
list = [...list, ...asyncRouter];
|
||||
} else if (systemType == projectXty) {
|
||||
if (projectRoute && projectRoute.designxty && projectRoute.designxty.length) {
|
||||
projectRoute.designxty.forEach(item => {
|
||||
} else if (specialProjects.includes(systemType) ) {
|
||||
if (projectRoute) {
|
||||
const proRoute = projectRoute[specialProjectEnum[systemType]];
|
||||
if (proRoute && proRoute.length) {
|
||||
proRoute.forEach(item => {
|
||||
if (item.merge) {
|
||||
asyncRouter[item.mergeIndex].children = [...asyncRouter[item.mergeIndex].children, ...item.children];
|
||||
} else {
|
||||
@ -49,55 +53,10 @@ function resetAsyncRouter({ systemType }) {
|
||||
}
|
||||
});
|
||||
}
|
||||
list = [...list, ...asyncRouter];
|
||||
} else if (systemType == projectGzzb) {
|
||||
if (projectRoute && projectRoute.designgzb && projectRoute.designgzb.length) {
|
||||
projectRoute.designgzb.forEach(item => {
|
||||
if (item.merge) {
|
||||
asyncRouter[item.mergeIndex].children = [...asyncRouter[item.mergeIndex].children, ...item.children];
|
||||
} else {
|
||||
list.push(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
list = [...list, ...asyncRouter];
|
||||
} else if (systemType == projectHeb) {
|
||||
if (projectRoute && projectRoute.designheb && projectRoute.designheb.length) {
|
||||
projectRoute.designheb.forEach(item => {
|
||||
if (item.merge) {
|
||||
asyncRouter[item.mergeIndex].children = [...asyncRouter[item.mergeIndex].children, ...item.children];
|
||||
} else { list.push(item); }
|
||||
});
|
||||
}
|
||||
list = [...list, ...asyncRouter];
|
||||
} else if (systemType == projectJsxt) {
|
||||
list = [...list, ...JSXT];
|
||||
} else if (systemType == projectJyd) {
|
||||
list = [...list, ...asyncRouter];
|
||||
} else if (systemType == projectTky) {
|
||||
list = [...list, ...asyncRouter];
|
||||
} else if (systemType == projectDrts) {
|
||||
list = [...list, ...asyncRouter];
|
||||
} else if (systemType == projectRichor) {
|
||||
list = [...list, ...asyncRouter];
|
||||
} else if (systemType == projectSdy) {
|
||||
if (projectRoute && projectRoute.designsdy && projectRoute.designsdy.length) {
|
||||
projectRoute.designsdy.forEach(item => {
|
||||
if (item.merge) {
|
||||
asyncRouter[item.mergeIndex].children = [...asyncRouter[item.mergeIndex].children, ...item.children];
|
||||
} else { list.push(item); }
|
||||
});
|
||||
}
|
||||
list = [...list, ...asyncRouter];
|
||||
} else if (systemType == projectRichorJoint) {
|
||||
if (projectRoute && projectRoute.designrichorjoint && projectRoute.designrichorjoint.length) {
|
||||
projectRoute.designrichorjoint.forEach(item => {
|
||||
if (item.merge) {
|
||||
asyncRouter[item.mergeIndex].children = [...asyncRouter[item.mergeIndex].children, ...item.children];
|
||||
} else { list.push(item); }
|
||||
});
|
||||
}
|
||||
list = [...list, ...asyncRouter];
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ export default {
|
||||
aspectList:[
|
||||
{ name: '绿', code: 'G' },
|
||||
{ name: '黄', code: 'Y' },
|
||||
{ name: '月白', code: ' W' }
|
||||
{ name: '月白', code: 'W' }
|
||||
],
|
||||
addModel: {
|
||||
mapId: '',
|
||||
|
Loading…
Reference in New Issue
Block a user