成都工业跳转调度大赛

This commit is contained in:
fan 2022-11-21 18:50:20 +08:00
parent 3a35705576
commit 082c075290
9 changed files with 52 additions and 19 deletions

View File

@ -23,8 +23,8 @@ export function handlerUrl(data) {
let BASE_SITE; let BASE_SITE;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// const data = null; // const data = null;
// BASE_API = 'https://joylink.club/jlcloud'; BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.233/rtss-server'; // BASE_API = 'http://192.168.3.233/rtss-server';
// BASE_API = 'http://114.116.51.125/jlcloud'; // BASE_API = 'http://114.116.51.125/jlcloud';
// BASE_API = 'http://192.168.3.90:9100'; // 周寅 // 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://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
// BASE_API = data && data.domainName ? 'https://' + data.domainName : BASE_API; 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 ? 'http://' + data.domainName : BASE_API;
VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink'; VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink';
UPLOAD_API = 'http://joylink.club/jlfile'; UPLOAD_API = 'http://joylink.club/jlfile';
BASE_SITE = 'https://test.joylink.club/cbtc'; BASE_SITE = 'https://test.joylink.club/cbtc';

View File

@ -274,7 +274,11 @@ export default {
}, },
syncLogin() { syncLogin() {
const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD', 'SANDBOX', 'ILW', 'PIS_STAND', 'PIS_TRAIN']; 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() { loadingText() {
const textMap = { const textMap = {
@ -322,7 +326,9 @@ export default {
}, },
mounted() { mounted() {
document.title = loginInfo[this.project].browserTitle || loginInfo[this.project].title; 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(); 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() { checkLoginStatus() {
const self = this; const self = this;
// //

View File

@ -87,10 +87,10 @@ export default {
return getSessionStorage('project'); return getSessionStorage('project');
}, },
isDemon() { isDemon() {
return this.mode === 'demon' && !this.project.includes('drts'); return this.mode === 'demon' && !(this.project.includes('drts') || this.$route.query.thirdDrts);
}, },
isContest() { isContest() {
return this.mode === 'demon' && this.project.includes('drts'); return this.mode === 'demon' && (this.project.includes('drts') || this.$route.query.thirdDrts);
}, },
mapId() { mapId() {
return this.$route.query.mapId; return this.$route.query.mapId;

View File

@ -116,7 +116,7 @@ export default {
return getSessionStorage('project'); return getSessionStorage('project');
}, },
isContest() { 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() { running() {
return this.$store.state.training.started; return this.$store.state.training.started;

View File

@ -57,10 +57,10 @@ export default {
return getSessionStorage('project'); return getSessionStorage('project');
}, },
isDemon() { isDemon() {
return this.mode === 'demon' && !this.project.includes('drts'); return this.mode === 'demon' && !(this.project.includes('drts') || this.$route.query.thirdDrts);
}, },
isContest() { isContest() {
return this.mode === 'demon' && this.project.includes('drts'); return this.mode === 'demon' && (this.project.includes('drts') || this.$route.query.thirdDrts);
}, },
isExam() { isExam() {
return this.mode === 'exam'; return this.mode === 'exam';

View File

@ -136,7 +136,7 @@ export default {
return getSessionStorage('project'); return getSessionStorage('project');
}, },
isContest() { 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() { running() {
return this.$store.state.training.started; return this.$store.state.training.started;
@ -145,7 +145,7 @@ export default {
return process.env.VUE_APP_PRO === 'local'; return process.env.VUE_APP_PRO === 'local';
}, },
isCtc() { isCtc() {
return this.$route.query.ctc; return this.$route.query.ctc;
} }
}, },
mounted() { mounted() {

View File

@ -460,9 +460,13 @@ export default {
clearSimulation(this.group).then(res=>{ clearSimulation(this.group).then(res=>{
this.isGoback = true; this.isGoback = true;
this.$store.dispatch('training/over').then(() => { this.$store.dispatch('training/over').then(() => {
this.$store.dispatch('LogOut').then(() => { if (this.$route.query.thirdDrts) {
location.reload(); window.close();
}); } else {
this.$store.dispatch('LogOut').then(() => {
location.reload();
});
}
}); });
}).catch(()=> { }).catch(()=> {
this.$message.error('结束仿真失败!'); this.$message.error('结束仿真失败!');

View File

@ -72,10 +72,10 @@ export default {
return getSessionStorage('project'); return getSessionStorage('project');
}, },
isDemon() { isDemon() {
return this.mode === 'demon' && !this.project.includes('drts'); return this.mode === 'demon' && !(this.project.includes('drts') || this.$route.query.thirdDrts);
}, },
isContest() { isContest() {
return this.mode === 'demon' && this.project.includes('drts'); return this.mode === 'demon' && (this.project.includes('drts') || this.$route.query.thirdDrts);
}, },
isExam() { isExam() {
return this.mode === 'exam'; return this.mode === 'exam';

View File

@ -145,7 +145,7 @@ export default {
return this.$route.query.lineCode === '16' && this.$store.state.training.prdType === '02'; return this.$route.query.lineCode === '16' && this.$store.state.training.prdType === '02';
}, },
isContest() { isContest() {
return this.project.includes('drts'); return this.project.includes('drts') || this.$route.query.thirdDrts;
}, },
isAdmin() { isAdmin() {
return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05'); return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05');