From c1376ddf8f0482a722c9161b07d25d83ea55ace4 Mon Sep 17 00:00:00 2001 From: fan Date: Fri, 1 Mar 2024 14:37:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E8=B5=9B=E8=AE=AD=E7=BB=83=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/contest/contestDetail.vue | 6 +++++- .../contestDataManage/contestTaskScoreManage/detailAdd.vue | 6 ------ src/views/newMap/display/simulationMenu/simulationMenu.vue | 3 +++ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/views/contest/contestDetail.vue b/src/views/contest/contestDetail.vue index 5760e9b09..d0cf2d39d 100644 --- a/src/views/contest/contestDetail.vue +++ b/src/views/contest/contestDetail.vue @@ -103,7 +103,11 @@ export default { this.taskData = data; this.taskList = []; this.eachTask(this.taskList, this.taskData); - this.nowKey = 0; + if (this.$route.query.nowKey && this.$route.query.nowKey >= this.taskList.length) { + this.nowKey = this.taskList.length - 1 || 0; + } else { + this.nowKey = this.$route.query.nowKey || 0; + } this.nowData = this.taskList[this.nowKey]; // console.log(this.taskData, this.taskList, this.nowData, '===', data); }).catch(() => this.$message.error('加载数据失败!')); diff --git a/src/views/contestDataManage/contestTaskScoreManage/detailAdd.vue b/src/views/contestDataManage/contestTaskScoreManage/detailAdd.vue index 8f180318b..c735f9739 100644 --- a/src/views/contestDataManage/contestTaskScoreManage/detailAdd.vue +++ b/src/views/contestDataManage/contestTaskScoreManage/detailAdd.vue @@ -47,12 +47,6 @@ export default { const crules = { name: [ { required: true, message: '请输入单元描述', trigger: 'blur' } - ], - content: [ - { required: true, message: '请输入作业程序', trigger: 'blur' } - ], - criteria: [ - { required: true, message: '请输入评分标准', trigger: 'blur' } ] }; return crules; diff --git a/src/views/newMap/display/simulationMenu/simulationMenu.vue b/src/views/newMap/display/simulationMenu/simulationMenu.vue index bee7c1c9b..d8f9a5463 100644 --- a/src/views/newMap/display/simulationMenu/simulationMenu.vue +++ b/src/views/newMap/display/simulationMenu/simulationMenu.vue @@ -232,6 +232,9 @@ export default { } } else if (this.projectDevice) { this.logout(); + } else if (this.$route.query.nowKey) { + const query = { paperId: this.$route.query.paperId, moduleId: this.$route.query.moduleId, nowKey: +this.$route.query.nowKey + 1 }; + this.$router.replace({ path:'/contest/detail', query }); } else { this.$router.go(-1); }