From 47d6193733612f4e077f44a6a0f46fb64573906a Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Mon, 4 Mar 2024 18:08:55 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=B1=95=E7=A4=BA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=A0=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/contest/contestList.vue | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/views/contest/contestList.vue b/src/views/contest/contestList.vue index f9e616eb3..712e97924 100644 --- a/src/views/contest/contestList.vue +++ b/src/views/contest/contestList.vue @@ -45,7 +45,7 @@ import paperList from './paperList'; import drapLeft from '@/views/components/drapLeft/index'; import ScoreRule from './scoreRule'; -import { getPaperDetail, getContextScoreDetail, beginContestExercise} from '@/api/contest'; +import { getTaskTreeDatas, getPaperDetail, beginContestExercise} from '@/api/contest'; let id = 1; export default { @@ -66,7 +66,8 @@ export default { taskTreeDatas:[], defaultProps: { disabled: true - } + }, + allTaskDatas:{} }; }, computed: { @@ -74,6 +75,17 @@ export default { return this.$store.state.app.width; } }, + created() { + getTaskTreeDatas().then((res) => { + this.allTaskDatas = res.data.reduce((acc, obj) => { + acc[obj.name] = obj.id; + return acc; + }, {}); + }).catch(error => { + this.$message.error(error.message); + }); + + }, methods: { drapWidth(width) { this.widthLeft = Number(width); @@ -115,6 +127,16 @@ export default { }, transformTree(data) { const result = {label:data.name, children:[], id:id++, type:'taskCatalog' }; + data.taskIds.forEach(taskId => { + let label = ''; + for (const key in this.allTaskDatas) { + if (this.allTaskDatas[key] === taskId) { + label = key; + break; + } + } + result.children.push({label, id:id++, type:'tasks', parentId:result.id }); + }); if (data.group.length) { const changeGroup = data.group.map(taskCatalog=> this.transformTree(taskCatalog) From 670e3c9b1266daabf2a7b429c5e50b0c47986d19 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Mon, 4 Mar 2024 18:46:40 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=A0=91=E5=8A=A0?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/contest/contestList.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/views/contest/contestList.vue b/src/views/contest/contestList.vue index 712e97924..6e466634b 100644 --- a/src/views/contest/contestList.vue +++ b/src/views/contest/contestList.vue @@ -13,7 +13,7 @@
{{ mod.moduleName }}
考试时间:{{ mod.duration }}分钟
-
任务目录: +
任务目录: Date: Tue, 5 Mar 2024 09:42:25 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=88=86=E5=80=BC=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/contest/scoreRule.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/contest/scoreRule.vue b/src/views/contest/scoreRule.vue index 808f2c4f9..edc7b7543 100644 --- a/src/views/contest/scoreRule.vue +++ b/src/views/contest/scoreRule.vue @@ -15,7 +15,11 @@ - + + + From f06d766ffa483624d5a3db51503d82c3be107312 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Tue, 5 Mar 2024 10:17:14 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=8F=AA=E6=98=BE=E7=A4=BA=E6=9C=89?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E7=9A=84=E5=BE=97=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/contest/ScoringSettlement.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/contest/ScoringSettlement.vue b/src/views/contest/ScoringSettlement.vue index 919bd8a88..cca4f284d 100644 --- a/src/views/contest/ScoringSettlement.vue +++ b/src/views/contest/ScoringSettlement.vue @@ -13,7 +13,7 @@ {{ node.label }}
-
得分:{{ data.score }}
+
得分:{{ data.score }}
From 7e7b238c34640a9a84a6f4a4bd425337bb850fe2 Mon Sep 17 00:00:00 2001 From: fan Date: Tue, 5 Mar 2024 13:38:00 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/display/trainingList/trainingMenu.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/newMap/display/trainingList/trainingMenu.vue b/src/views/newMap/display/trainingList/trainingMenu.vue index fb119f07a..66d04f116 100644 --- a/src/views/newMap/display/trainingList/trainingMenu.vue +++ b/src/views/newMap/display/trainingList/trainingMenu.vue @@ -128,7 +128,7 @@ export default { }, watch: { '$store.state.map.mapViewLoadedCount': function (val) { - if (this.isRace) { + if (this.isRace && !this.$store.state.trainingNew.trainingDetail) { this.loadRaceScene(this.$route.query.sceneId); } }, @@ -147,6 +147,9 @@ export default { } } }, + beforeDestroy() { + this.$store.dispatch('trainingNew/setTrainingDetail', null); + }, mounted() { EventBus.$on('setTrainingList', (trainingList) => { this.trainingList = trainingList;