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)
|
((item.stationCodeList.includes(stationCode) && item.elementList.includes(deviceCode)) || !stationCode)
|
||||||
) {
|
) {
|
||||||
flag = true;
|
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;
|
flag = true;
|
||||||
} else if (store.state.training.prdType === '09' && item.type === 'DEPOT_IL' && item.stationCodeList.includes(stationCode) && item.elementList.includes(deviceCode)) {
|
} else if (store.state.training.prdType === '09' && item.type === 'DEPOT_IL' && item.stationCodeList.includes(stationCode) && item.elementList.includes(deviceCode)) {
|
||||||
flag = true;
|
flag = true;
|
||||||
|
@ -35,13 +35,17 @@ function hasPermission(roles, route, parentsRoles) {
|
|||||||
*/
|
*/
|
||||||
function resetAsyncRouter({ systemType }) {
|
function resetAsyncRouter({ systemType }) {
|
||||||
let list = publicAsyncRoute;
|
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];
|
list = [...list, ...asyncRouter];
|
||||||
} else if (systemType == projectXian) {
|
} else if (specialProjects.includes(systemType) ) {
|
||||||
list = [...list, ...asyncRouter];
|
if (projectRoute) {
|
||||||
} else if (systemType == projectXty) {
|
const proRoute = projectRoute[specialProjectEnum[systemType]];
|
||||||
if (projectRoute && projectRoute.designxty && projectRoute.designxty.length) {
|
if (proRoute && proRoute.length) {
|
||||||
projectRoute.designxty.forEach(item => {
|
proRoute.forEach(item => {
|
||||||
if (item.merge) {
|
if (item.merge) {
|
||||||
asyncRouter[item.mergeIndex].children = [...asyncRouter[item.mergeIndex].children, ...item.children];
|
asyncRouter[item.mergeIndex].children = [...asyncRouter[item.mergeIndex].children, ...item.children];
|
||||||
} else {
|
} 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];
|
list = [...list, ...asyncRouter];
|
||||||
} else if (systemType == projectJsxt) {
|
} else if (systemType == projectJsxt) {
|
||||||
list = [...list, ...JSXT];
|
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;
|
return list;
|
||||||
}
|
}
|
||||||
|
@ -236,7 +236,7 @@ export default {
|
|||||||
aspectList:[
|
aspectList:[
|
||||||
{ name: '绿', code: 'G' },
|
{ name: '绿', code: 'G' },
|
||||||
{ name: '黄', code: 'Y' },
|
{ name: '黄', code: 'Y' },
|
||||||
{ name: '月白', code: ' W' }
|
{ name: '月白', code: 'W' }
|
||||||
],
|
],
|
||||||
addModel: {
|
addModel: {
|
||||||
mapId: '',
|
mapId: '',
|
||||||
|
Loading…
Reference in New Issue
Block a user