From 082c07529073c96163d7b0c79ec61fddd6d2a099 Mon Sep 17 00:00:00 2001 From: fan Date: Mon, 21 Nov 2022 18:50:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E9=83=BD=E5=B7=A5=E4=B8=9A=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E8=B0=83=E5=BA=A6=E5=A4=A7=E8=B5=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/baseUrl.js | 8 ++--- src/views/login/index.vue | 33 +++++++++++++++++-- src/views/newMap/displayBaSiDi/index.vue | 4 +-- src/views/newMap/displayCity/demonMenu.vue | 2 +- src/views/newMap/displayCity/index.vue | 4 +-- src/views/newMap/displayNew/demonMenu.vue | 4 +-- .../displayNew/dispatherContest/index.vue | 10 ++++-- src/views/newMap/displayNew/index.vue | 4 +-- src/views/newMap/displayNew/menuSchema.vue | 2 +- 9 files changed, 52 insertions(+), 19 deletions(-) diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 0c6bfc252..46f977b32 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -23,8 +23,8 @@ export function handlerUrl(data) { let BASE_SITE; if (process.env.NODE_ENV === 'development') { // const data = null; - // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'https://joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.233/rtss-server'; // BASE_API = 'http://114.116.51.125/jlcloud'; // BASE_API = 'http://192.168.3.90:9100'; // 周寅 @@ -35,8 +35,8 @@ export function handlerUrl(data) { // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 - // BASE_API = data && data.domainName ? 'https://' + data.domainName : BASE_API; - BASE_API = data && data.domainName ? 'http://' + data.domainName : BASE_API; + BASE_API = data && data.domainName ? 'https://' + data.domainName : BASE_API; + // BASE_API = data && data.domainName ? 'http://' + data.domainName : BASE_API; VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink'; UPLOAD_API = 'http://joylink.club/jlfile'; BASE_SITE = 'https://test.joylink.club/cbtc'; diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 70637a11e..d3c430bb1 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -274,7 +274,11 @@ export default { }, syncLogin() { const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD', 'SANDBOX', 'ILW', 'PIS_STAND', 'PIS_TRAIN']; - return this.$route.query.type ? synchronousLogin.includes(this.$route.query.type) : false; + if (this.$route.query.thirdJump && this.$route.query.key && this.$route.query.group) { + return true; + } else { + return this.$route.query.type ? synchronousLogin.includes(this.$route.query.type) : false; + } }, loadingText() { const textMap = { @@ -322,7 +326,9 @@ export default { }, mounted() { document.title = loginInfo[this.project].browserTitle || loginInfo[this.project].title; - if (this.syncLogin || !this.noQrcodeList.includes(this.project)) { + if (this.$route.query.thirdJump && this.$route.query.key && this.$route.query.group) { + this.thirdJump(this.$route.query.key, this.$route.query.group); + } else if (this.syncLogin || !this.noQrcodeList.includes(this.project)) { this.loginRefresh(); } }, @@ -377,6 +383,29 @@ export default { } }); }, + thirdJump(token, group) { + debugger; + this.$store.dispatch('QrLoginSetting', { key: 'SET_TOKEN', value: token, type: this.modelType }).then(() => { + // 清除定时器,设置路由 + this.clearTimer(this.checkLogin); + getLoginInfo(getToken()).then(res => { + getSimulationInfoNew(group).then(resp => { + this.$router.push({ path: `/displayNew/demon`, query: { + lineCode: resp.data.map.lineCode, + group: group, + prdType: resp.data.prodType, + mapId: resp.data.map.id, + goodsId:'', + try:'0', + thirdDrts:1, + project:this.project + }}); + }); + }).catch(() => { + this.$messageBox('获取数据失败!'); + }); + }); + }, checkLoginStatus() { const self = this; // 销毁则不再定时 diff --git a/src/views/newMap/displayBaSiDi/index.vue b/src/views/newMap/displayBaSiDi/index.vue index 77baca574..19dcc9384 100644 --- a/src/views/newMap/displayBaSiDi/index.vue +++ b/src/views/newMap/displayBaSiDi/index.vue @@ -87,10 +87,10 @@ export default { return getSessionStorage('project'); }, isDemon() { - return this.mode === 'demon' && !this.project.includes('drts'); + return this.mode === 'demon' && !(this.project.includes('drts') || this.$route.query.thirdDrts); }, isContest() { - return this.mode === 'demon' && this.project.includes('drts'); + return this.mode === 'demon' && (this.project.includes('drts') || this.$route.query.thirdDrts); }, mapId() { return this.$route.query.mapId; diff --git a/src/views/newMap/displayCity/demonMenu.vue b/src/views/newMap/displayCity/demonMenu.vue index 0d6bf1d7b..5f012d359 100644 --- a/src/views/newMap/displayCity/demonMenu.vue +++ b/src/views/newMap/displayCity/demonMenu.vue @@ -116,7 +116,7 @@ export default { return getSessionStorage('project'); }, isContest() { - return this.$route.params.mode === 'demon' && this.project.includes('drts'); + return this.$route.params.mode === 'demon' && (this.project.includes('drts') || this.$route.query.thirdDrts); }, running() { return this.$store.state.training.started; diff --git a/src/views/newMap/displayCity/index.vue b/src/views/newMap/displayCity/index.vue index 3bf24d5e3..cbda37016 100644 --- a/src/views/newMap/displayCity/index.vue +++ b/src/views/newMap/displayCity/index.vue @@ -57,10 +57,10 @@ export default { return getSessionStorage('project'); }, isDemon() { - return this.mode === 'demon' && !this.project.includes('drts'); + return this.mode === 'demon' && !(this.project.includes('drts') || this.$route.query.thirdDrts); }, isContest() { - return this.mode === 'demon' && this.project.includes('drts'); + return this.mode === 'demon' && (this.project.includes('drts') || this.$route.query.thirdDrts); }, isExam() { return this.mode === 'exam'; diff --git a/src/views/newMap/displayNew/demonMenu.vue b/src/views/newMap/displayNew/demonMenu.vue index e60b92277..8d145a719 100644 --- a/src/views/newMap/displayNew/demonMenu.vue +++ b/src/views/newMap/displayNew/demonMenu.vue @@ -136,7 +136,7 @@ export default { return getSessionStorage('project'); }, isContest() { - return this.$route.params.mode === 'demon' && this.project.includes('drts'); + return this.$route.params.mode === 'demon' && (this.project.includes('drts') || this.$route.query.thirdDrts); }, running() { return this.$store.state.training.started; @@ -145,7 +145,7 @@ export default { return process.env.VUE_APP_PRO === 'local'; }, isCtc() { - return this.$route.query.ctc; + return this.$route.query.ctc; } }, mounted() { diff --git a/src/views/newMap/displayNew/dispatherContest/index.vue b/src/views/newMap/displayNew/dispatherContest/index.vue index 30f45d062..58039e5f8 100644 --- a/src/views/newMap/displayNew/dispatherContest/index.vue +++ b/src/views/newMap/displayNew/dispatherContest/index.vue @@ -460,9 +460,13 @@ export default { clearSimulation(this.group).then(res=>{ this.isGoback = true; this.$store.dispatch('training/over').then(() => { - this.$store.dispatch('LogOut').then(() => { - location.reload(); - }); + if (this.$route.query.thirdDrts) { + window.close(); + } else { + this.$store.dispatch('LogOut').then(() => { + location.reload(); + }); + } }); }).catch(()=> { this.$message.error('结束仿真失败!'); diff --git a/src/views/newMap/displayNew/index.vue b/src/views/newMap/displayNew/index.vue index 2e02bb7c0..3637d4f36 100644 --- a/src/views/newMap/displayNew/index.vue +++ b/src/views/newMap/displayNew/index.vue @@ -72,10 +72,10 @@ export default { return getSessionStorage('project'); }, isDemon() { - return this.mode === 'demon' && !this.project.includes('drts'); + return this.mode === 'demon' && !(this.project.includes('drts') || this.$route.query.thirdDrts); }, isContest() { - return this.mode === 'demon' && this.project.includes('drts'); + return this.mode === 'demon' && (this.project.includes('drts') || this.$route.query.thirdDrts); }, isExam() { return this.mode === 'exam'; diff --git a/src/views/newMap/displayNew/menuSchema.vue b/src/views/newMap/displayNew/menuSchema.vue index 533d1815e..c6f509d22 100644 --- a/src/views/newMap/displayNew/menuSchema.vue +++ b/src/views/newMap/displayNew/menuSchema.vue @@ -145,7 +145,7 @@ export default { return this.$route.query.lineCode === '16' && this.$store.state.training.prdType === '02'; }, isContest() { - return this.project.includes('drts'); + return this.project.includes('drts') || this.$route.query.thirdDrts; }, isAdmin() { return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05');