产品分化路由处理

This commit is contained in:
joylink_cuiweidong 2019-10-15 11:05:30 +08:00
parent aba4efe129
commit 232789ca73
5 changed files with 25 additions and 7 deletions

View File

@ -195,7 +195,8 @@ export const UrlConfig = {
lessonTraining: '/design/lesson/training',
trainingRecord: '/design/lesson/training',
runPlan: '/design/runPlan/detail',
scriptHome: '/design/script/home'
scriptHome: '/design/script/home',
display: '/design/display'
},
designUser: {
prefix: '/design/userlist/home',
@ -475,6 +476,13 @@ export const asyncRouter = [
},
hidden: true
},
{
path: '/design/display/:mode',
component: Display,
meta: {
},
hidden: true
},
{
path: '/scriptDisplay/:mode',
component: ScriptDisplay,

View File

@ -125,6 +125,9 @@ const permission = {
return new Promise(resolve => {
const { roles } = convertRouterRoles(data);
let accessedRouters;
if (roles.indexOf(superAdmin) >= 0 && roles.indexOf(admin) < 0) {
roles.push(admin);
}
// if (roles.indexOf(superAdmin) >= 0) {
// accessedRouters = asyncRouter;
// } else {

View File

@ -4,9 +4,9 @@ export function getBaseUrl() {
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
} else {
BASE_API = process.env.VUE_APP_BASE_API;
}

View File

@ -111,17 +111,23 @@
clickEvent(obj, data, ele) {
switch(obj.type){
case 'scriptDesign':{
setSessionStorage('designType', 'scriptDesign');
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}` });
break;
}
case 'lessonDesign': {
setSessionStorage('designType', 'lessonDesign');
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}/${obj.skinCode}`,query: {cityCode:data.parent.data.cityCode} });
break;
}
case 'runPlanDesign': {
setSessionStorage('designType', 'runPlanDesign');
this.$router.push({ path: `${UrlConfig.design.runPlan}/${obj.mapId}?skinCode=${obj.skinCode}` });
break;
}
case 'map':{
setSessionStorage('demonList', obj.id);
}
}
// this.$refs.menu.doClose();
},
@ -133,8 +139,9 @@
this.treeData = this.treeList = [];
try {
const res = await getMapList(filterSelect);
res.data.forEach(elem=>{
// debugger;
// elem.children.find(n => { return n.name.includes("")})
elem.children=[
// {
// id:'1',
@ -153,7 +160,8 @@
name:'剧本设计',
type:'scriptDesign',
mapId:elem.id,
skinCode:elem.skinCode
skinCode:elem.skinCode,
// code:elem.children.find(n => { return n.name.includes("")})
},
{
id:'4',
@ -164,7 +172,6 @@
},
]
});
this.treeData = res.data;
this.treeList = this.filterText
? res.data.filter(elem => { return elem.name.includes(this.filterText); })

View File

@ -234,7 +234,7 @@ export default {
});
},
previewScript(index,row){
debugger;
}
// loadInitData() {
// this.mapList = [];