From db25648ed29e0d5e3f4380f8c92790300efa61ce Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 3 Jun 2024 15:22:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=9B=E4=BA=8B=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 2 ++ src/pages/achievement/show/index.vue | 2 +- src/pages/match/add/step1.vue | 7 ++-- src/pages/match/add/step3.vue | 44 +++++++++++-------------- src/pages/match/manage/abnormalTeam.vue | 2 +- src/pages/match/manage/matchInfo.vue | 11 ++++--- src/pages/match/manage/matchSignup.vue | 16 ++++++--- src/pages/station/preview/index.vue | 4 +-- 8 files changed, 49 insertions(+), 39 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 39339bc..5a9747a 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -229,8 +229,10 @@ export default { TeamDataExportFailure: `${host}competition/competition/registration/exportFailure`, batchDeleteApplicants: `competition/competition/registration/batchDeleteApplicants`, deleteAllData: `competition/competition/registration/deleteAllData`, + whetherThereIsReport: `competition/competitionAutomaticAllocationRecord/whetherThereIsReport`, competionPersonTemplate: `https://huoran.oss-cn-shenzhen.aliyuncs.com/%E6%95%99%E5%B8%88%E7%AB%AF%E4%B8%AA%E4%BA%BA%E8%B5%9B%E6%8A%A5%E5%90%8D%E4%BA%BA%E5%91%98%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 教师端个人报名人员模板 competionTeamTemplate: `https://huoran.oss-cn-shenzhen.aliyuncs.com/%E6%95%99%E5%B8%88%E7%AB%AF%E5%9B%A2%E9%98%9F%E8%B5%9B%E6%8A%A5%E5%90%8D%E4%BA%BA%E5%91%98%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 教师端团队报名人员导入模板 + exportAbnormalData: `${host}competition/teamAbnormalInformation/exportAbnormalData`, // 赛事公告 addAnnouncement: `competition/competition/announcement/addAnnouncement`, diff --git a/src/pages/achievement/show/index.vue b/src/pages/achievement/show/index.vue index eb9d00f..e345841 100644 --- a/src/pages/achievement/show/index.vue +++ b/src/pages/achievement/show/index.vue @@ -219,7 +219,7 @@ export default { } }) e.lcStudentAnswer.map((n, i) => { - e.answer += `${i + 1}.${n.userAnswer};` + e.answer += `${i + 1}.${n.userAnswer || '未填写'};` }) }) } else { // python系统显示图片(从userScores里取) diff --git a/src/pages/match/add/step1.vue b/src/pages/match/add/step1.vue index d6d86fa..cc41e5d 100644 --- a/src/pages/match/add/step1.vue +++ b/src/pages/match/add/step1.vue @@ -290,7 +290,8 @@ export default { }, submiting: false, updateTime: 0, - quillShow: true + quillShow: true, + originSignUpEndTime: '', }; }, components: { @@ -384,6 +385,7 @@ export default { }) this.rangeName = range.join(',') } + this.originSignUpEndTime = competition.signUpEndTime this.form = competition this.$parent.resumeData() this.$nextTick(() => { @@ -625,11 +627,12 @@ export default { const now = await Util.getNow() // 报名结束之后修改的报名结束时间晚于当前现实时间的话,就调接口 - if (this.originSignUpEndTime && signUpEndTime !== this.originSignUpEndTime && new Date(signUpEndTime) < now) { + if (this.originSignUpEndTime && signUpEndTime !== this.originSignUpEndTime && (new Date(signUpEndTime) < now || (new Date(this.originSignUpEndTime) < now && new Date(signUpEndTime) > now))) { await this.$post(this.api.updateEventAllocationRecord, { competitionId: id, whetherToModifyTheRule: 1, }) + this.originSignUpEndTime = signUpEndTime } } }, diff --git a/src/pages/match/add/step3.vue b/src/pages/match/add/step3.vue index 32f7b04..395d227 100644 --- a/src/pages/match/add/step3.vue +++ b/src/pages/match/add/step3.vue @@ -311,7 +311,7 @@ export default { // 自动分配人员弹框 async autoAllocationConfirm (next) { const { data } = await this.$post(`${this.api.viewEventAllocationInformation}?competitionId=${this.competitionId}`) - if (data.assignOrNot === undefined || !this.form[0].contentId) { + if (!data || data.assignOrNot === undefined || !this.form[0].contentId) { // 首次发布 or 新增 才需要弹框 this.$confirm('
团队赛发布成功,是否要自动分配阶段参赛人员?
(点击“是”将会在报名结束后给报名的团队自动分配阶段参赛人员
', '提示', { confirmButtonText: '是', @@ -325,31 +325,25 @@ export default { this.automaticAllocation(0, next) }) } else { - const now = await Util.getNow() - // 报名结束时间>当前时间 - if (new Date(this.$parent.$refs.step1.form.signUpEndTime) > now) { - this.$emit('next', next) - } else { - // 查询是否需要弹框 - const res = await this.$post(`${this.api.editWhetherPopUpsAppear}?competitionId=${this.competitionId}`) - if (res.popupState) { - this.$confirm('团队赛发布成功,是否要重新自动分配阶段参赛人员?
(点击“是”将会立即给报名的团队自动分配阶段参赛人员
', '提示', { - confirmButtonText: '是', - cancelButtonText: '否', - type: 'success', - closeOnClickModal: false, - showClose: false, - dangerouslyUseHTMLString: true, - }).then(async () => { - await this.$post(`${this.api.automaticAllocation}?competitionId=${this.id}`) // 立马分配 - this.$emit('next', next) - }).catch(() => { - this.automaticAllocation(0, next) - }) - } else { - // 无需弹框 + // 查询是否需要弹框 + const res = await this.$post(`${this.api.editWhetherPopUpsAppear}?competitionId=${this.competitionId}`) + if (res.popupState) { + this.$confirm('团队赛发布成功,是否要重新自动分配阶段参赛人员?
(点击“是”将会立即给报名的团队自动分配阶段参赛人员
', '提示', { + confirmButtonText: '是', + cancelButtonText: '否', + type: 'success', + closeOnClickModal: false, + showClose: false, + dangerouslyUseHTMLString: true, + }).then(async () => { + await this.$post(`${this.api.automaticAllocation}?competitionId=${this.id}`) // 立马分配 this.$emit('next', next) - } + }).catch(() => { + this.automaticAllocation(0, next) + }) + } else { + // 无需弹框 + this.$emit('next', next) } } }, diff --git a/src/pages/match/manage/abnormalTeam.vue b/src/pages/match/manage/abnormalTeam.vue index de1875e..bb2f54d 100644 --- a/src/pages/match/manage/abnormalTeam.vue +++ b/src/pages/match/manage/abnormalTeam.vue @@ -561,7 +561,7 @@ export default { this.exporting = false }) } else { - axios.get(`${this.api.excelExport}?competitionId=${this.id}`, { + axios.get(`${this.api.exportAbnormalData}?competitionId=${this.id}`, { headers: { token: this.token }, diff --git a/src/pages/match/manage/matchInfo.vue b/src/pages/match/manage/matchInfo.vue index 5fbfe15..c0abf53 100644 --- a/src/pages/match/manage/matchInfo.vue +++ b/src/pages/match/manage/matchInfo.vue @@ -6,7 +6,7 @@ -