From 232789ca735c5a4383f936a31c8b4e9e051c34f8 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 15 Oct 2019 11:05:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=88=86=E5=8C=96=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 10 +++++++++- src/store/modules/permission.js | 3 +++ src/utils/baseUrl.js | 4 ++-- src/views/designPlatform/demonList.vue | 13 ++++++++++--- src/views/scriptManage/home.vue | 2 +- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 74b1f9db3..965103772 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -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, diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index b5fef8ca6..9dac93ba1 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -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 { diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 09e20008f..f997f31f4 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -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; } diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue index 47183d5f1..791e107b4 100644 --- a/src/views/designPlatform/demonList.vue +++ b/src/views/designPlatform/demonList.vue @@ -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); }) diff --git a/src/views/scriptManage/home.vue b/src/views/scriptManage/home.vue index be3eb7d6e..99ce04870 100644 --- a/src/views/scriptManage/home.vue +++ b/src/views/scriptManage/home.vue @@ -234,7 +234,7 @@ export default { }); }, previewScript(index,row){ - + debugger; } // loadInitData() { // this.mapList = [];