From 189c649a89b8ad17298f55837b237e22d5a8e339 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 3 Jul 2020 10:37:33 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9B=A0=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E8=B7=AF=E7=94=B1=E5=AF=BC=E8=87=B4=E7=9A=84=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E8=BF=9B=E5=85=A5=E5=85=B6=E4=BB=96=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Title.vue | 3 ++- src/permission.js | 3 ++- src/views/demonstration/detail/index.vue | 10 ++++++---- src/views/exam/index.vue | 2 +- src/views/jsxt/competition/index.vue | 18 +----------------- src/views/teach/index.vue | 2 +- src/views/trainingPlatform/demonList.vue | 14 +++++++------- src/views/trainingPlatform/index.vue | 7 +++++-- 8 files changed, 25 insertions(+), 34 deletions(-) diff --git a/src/layout/components/Title.vue b/src/layout/components/Title.vue index dd254b0ba..f2976659c 100644 --- a/src/layout/components/Title.vue +++ b/src/layout/components/Title.vue @@ -18,6 +18,7 @@ export default { systemTitle: '', isHyd: false, isJyd: false, + isTky: false, marginLeft: 'margin-left:60px;' }; }, @@ -32,7 +33,7 @@ export default { this.isJyd = true; this.marginLeft = 'margin-left:140px;'; } else if (project.endsWith('tky')) { - this.isTky = true; + this.isTky = true; this.marginLeft = 'margin-left:140px;'; } }, diff --git a/src/permission.js b/src/permission.js index 552e0ff60..2c3317c26 100644 --- a/src/permission.js +++ b/src/permission.js @@ -86,7 +86,8 @@ function handleRoute(to, from, next, routeInfo) { // 除没有动态改变权限的需求可直接next() 删下方权限判断 if (hasPermission(store.getters.roles, to.meta.roles)) { if (to.path === '/404' && to.redirectedFrom === '/') { - next(localStore.get('trainingPlatformRoute' + store.getters.id) || '/trainingPlatform'); + const project = getSessionStorage('project'); + next(localStore.get('trainingPlatformRoute' + store.getters.id + project) || '/trainingPlatform'); } else { next(); } diff --git a/src/views/demonstration/detail/index.vue b/src/views/demonstration/detail/index.vue index f360ef7dc..8add01fc7 100644 --- a/src/views/demonstration/detail/index.vue +++ b/src/views/demonstration/detail/index.vue @@ -30,7 +30,6 @@ import { PermissionType, UrlConfig } from '@/scripts/ConstDic'; import { launchFullscreen } from '@/utils/screen'; import { postCreateRoom, getjointTraining } from '@/api/chat'; import { postCreateRoomNew, getjointTrainingNew, checkRoomExistNew } from '@/api/jointTraining'; -import { } from '@/scripts/ConstDic'; import { simulationNotify, schedulingNotify, createSimulationNew } from '@/api/simulation'; import LimitList from '@/views/components/limits/index'; import { getSubSystemDetail } from '@/api/trainingPlatform'; @@ -98,6 +97,9 @@ export default { }, mapId() { return this.$route.query.mapId; + }, + project() { + return getSessionStorage('project'); } }, watch: { @@ -117,7 +119,7 @@ export default { res = await getPublishMapInfo(this.mapId); } catch (error) { if (error.code == 30001) { - const url = localStore.get('orignalTrainingPlatformRoute' + this.$store.state.user.id); + const url = localStore.get('orignalTrainingPlatformRoute' + this.$store.state.user.id + this.project); localStore.remove(); if (url) { this.$router.push(url); @@ -313,7 +315,7 @@ export default { if (!this.drawWay) { const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType }; simulationNotify(data).then(resp => { - const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser, project: getSessionStorage('project') }; + const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser, project: this.project }; this.$router.push({ path: `${UrlConfig.display}/demon`, query: query }); launchFullscreen(); }).catch(error => { @@ -323,7 +325,7 @@ export default { } else { const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType }; createSimulationNew(data).then(resp => { - const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser, project: getSessionStorage('project') }; + const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser, project: this.project }; this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query }); launchFullscreen(); }).catch(error => { diff --git a/src/views/exam/index.vue b/src/views/exam/index.vue index 2e6a9900f..a2e512726 100644 --- a/src/views/exam/index.vue +++ b/src/views/exam/index.vue @@ -70,7 +70,7 @@ export default { } }).catch((error)=>{ if (error.code == 30001) { - const url = localStore.get('orignalTrainingPlatformRoute' + this.$store.state.user.id); + const url = localStore.get('orignalTrainingPlatformRoute' + this.$store.state.user.id + this.project); if (url) { this.$router.push(url); } diff --git a/src/views/jsxt/competition/index.vue b/src/views/jsxt/competition/index.vue index 9f074b3f2..829c64b7c 100644 --- a/src/views/jsxt/competition/index.vue +++ b/src/views/jsxt/competition/index.vue @@ -1,7 +1,7 @@