From d0764a64a0c715cd7b6cbc0be76050b7052992b6 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 26 Sep 2024 11:19:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=9B=E4=BA=8B=E6=88=90=E7=BB=A9=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=AE=9E=E8=AE=AD=E8=B7=9F=E7=90=86=E8=AE=BA=E5=90=88?= =?UTF-8?q?=E5=B9=B6=EF=BC=8C=E7=BA=BF=E4=B8=8B=E5=8D=95=E7=8B=AC=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/match/manage/matchArch.vue | 2 +- src/views/match/manage/theoryArchList.vue | 2 +- src/views/match/manage/trialReport.vue | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/views/match/manage/matchArch.vue b/src/views/match/manage/matchArch.vue index 0daa14f..66cc1c6 100644 --- a/src/views/match/manage/matchArch.vue +++ b/src/views/match/manage/matchArch.vue @@ -101,7 +101,7 @@ export default { this.$store.commit('setInnerReferrer', this.$route.fullPath) const cur = this.form.competitionStage[i] const showFile = !!(cur.method === 2 && cur.competitionStageContentSetting && cur.competitionStageContentSetting.whetherToUploadFiles) - this.$router.push(`/${cur.method !== 1 ? 'matchArchList' : 'theoryArchList'}?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}&showFile=${showFile}`) + this.$router.push(`/${cur.method === 2 ? 'matchArchList' : 'theoryArchList'}?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}&showFile=${showFile}`) } } }; diff --git a/src/views/match/manage/theoryArchList.vue b/src/views/match/manage/theoryArchList.vue index 3cbe705..02e65c7 100644 --- a/src/views/match/manage/theoryArchList.vue +++ b/src/views/match/manage/theoryArchList.vue @@ -228,7 +228,7 @@ export default { }, // 查看成绩报告 show (row) { - this.$router.push(`/theoryReport?reportId=${row.reportId}`) + this.$router.push(`/${this.method === 1 ? 'theoryReport' : 'trialReport'}?reportId=${row.reportId}`) }, // 导出(有勾选:就导勾选中的;没有勾选:就导全部) async exportData () { diff --git a/src/views/match/manage/trialReport.vue b/src/views/match/manage/trialReport.vue index 0540c99..66817bb 100644 --- a/src/views/match/manage/trialReport.vue +++ b/src/views/match/manage/trialReport.vue @@ -169,7 +169,6 @@ export default { this.loading = true this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`).then(({ report, userScores }) => { this.form = report - this.expData = userScores this.project = this.expData.find(e => e.lcRuleRecords) // 银行系统才有lcRuleRecords let form = this.form; this.infoData = { @@ -183,17 +182,17 @@ export default { className: form.className, userName: form.userName } - const data = report.data - this.userScores = userScores + const { data } = report // 如果没有data,则添加,否则,直接使用 if (!data) { + this.userScores = userScores this.handleList(userScores) this.$post(this.api.editExperimentalData, { reportId, data: JSON.stringify(userScores) }).then(res => { }).catch(err => { }) } else { - this.handleList(userScores.find(e => e.lcRuleRecords) ? userScores : JSON.parse(data)) + this.handleList(JSON.parse(data)) } }).catch(res => { this.loading = false