新窗口打开客户端跳转错误处理

This commit is contained in:
fan 2023-05-15 09:51:32 +08:00
parent 7aa44293f2
commit 4b3114c9b5
2 changed files with 10 additions and 6 deletions

View File

@ -37,7 +37,6 @@
<test-runplan v-if="picture=='testRunplan'" ref="testRunplan" :plan-id="loadPlanId" @pictureChange="pictureChangeAndPlan" /> <test-runplan v-if="picture=='testRunplan'" ref="testRunplan" :plan-id="loadPlanId" @pictureChange="pictureChangeAndPlan" />
<driver-ats-work v-if="picture=='driverAtsWork'" ref="driverAtsWork" /> <driver-ats-work v-if="picture=='driverAtsWork'" ref="driverAtsWork" />
<!-- driverAtsWork -->
<terminal-menu <terminal-menu
v-if="menuShow" v-if="menuShow"

View File

@ -55,15 +55,14 @@ export default {
const clientIdList = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.clientList : []; const clientIdList = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.clientList : [];
if (!clientIdList || !clientIdList.length) { if (!clientIdList || !clientIdList.length) {
this.initTerminalList(); this.initTerminalList();
if (!this.$store.state.trainingNew.trainingDetail) { if ((!this.$store.state.trainingNew.trainingDetail || !this.$store.state.trainingNew.trainingDetail.client) && !this.$route.query.client) {
this.initPictureShow(); this.initPictureShow();
} else if (!this.$store.state.trainingNew.trainingDetail || !this.$store.state.trainingNew.trainingDetail.client) {
this.changeQueryClient();
} }
} else if (!this.terminalList.length) { } else if (!this.terminalList.length) {
this.initTerminalList(); this.initTerminalList();
if (this.$route.query.client) { this.changeQueryClient();
const terminal = this.findTerminalFromMapById(this.$route.query.client);
this.changePictureShow(terminal);
}
} }
}, },
'$store.state.trainingNew.trainingDetail': function(val) { '$store.state.trainingNew.trainingDetail': function(val) {
@ -118,6 +117,12 @@ export default {
} }
return false; return false;
}, },
changeQueryClient() {
if (this.$route.query.client) {
const terminal = this.findTerminalFromMapById(this.$route.query.client);
this.changePictureShow(terminal);
}
},
// //
initTerminalList() { initTerminalList() {
this.terminalList = []; this.terminalList = [];