diff --git a/src/utils/api.js b/src/utils/api.js index 1c4630d..46f2a0c 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -386,9 +386,11 @@ export default { schoolsInCompetitionArea: `competition/competition/range/schoolsInCompetitionArea`, batchDeleteApplicants: `competition/competition/registration/batchDeleteApplicants`, deleteAllData: `competition/competition/registration/deleteAllData`, + whetherThereIsReport: `competition/competitionAutomaticAllocationRecord/whetherThereIsReport`, batchImportPersonalData: `${host}competition/competition/registration/batchImportPersonalData`, batchImportTeamData: `${host}competition/competition/registration/batchImportTeamData`, TeamDataExportFailure: `${host}competition/competition/registration/exportFailure`, + exportAbnormalData: `${host}competition/teamAbnormalInformation/exportAbnormalData`, // 赛事公告 addAnnouncement: `competition/competition/announcement/addAnnouncement`, amendmentAnnouncement: `competition/competition/announcement/amendmentAnnouncement`, diff --git a/src/views/match/add/step1.vue b/src/views/match/add/step1.vue index 4a56467..0bba398 100644 --- a/src/views/match/add/step1.vue +++ b/src/views/match/add/step1.vue @@ -609,11 +609,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/views/match/add/step2.vue b/src/views/match/add/step2.vue index e5b192e..2204b8a 100644 --- a/src/views/match/add/step2.vue +++ b/src/views/match/add/step2.vue @@ -330,6 +330,7 @@ export default { break } } + // new Date(this.$parent.$refs.step1.form.signUpEndTime) if (form.rule !== originForm.rule || form.stageNum !== originForm.stageNum || form.teamLimit !== originForm.teamLimit || changeLimit) { await this.$post(this.api.updateEventAllocationRecord, { competitionId: +this.id, diff --git a/src/views/match/add/step3.vue b/src/views/match/add/step3.vue index b43cdf9..d680493 100644 --- a/src/views/match/add/step3.vue +++ b/src/views/match/add/step3.vue @@ -319,7 +319,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: '是', @@ -333,31 +333,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/views/match/manage/abnormalTeam.vue b/src/views/match/manage/abnormalTeam.vue index 5f4bb2a..d8245da 100644 --- a/src/views/match/manage/abnormalTeam.vue +++ b/src/views/match/manage/abnormalTeam.vue @@ -563,7 +563,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/views/match/manage/matchInfo.vue b/src/views/match/manage/matchInfo.vue index 4ca85d5..8bcec0c 100644 --- a/src/views/match/manage/matchInfo.vue +++ b/src/views/match/manage/matchInfo.vue @@ -6,7 +6,7 @@ -