赛事修复

dev_review
yujialong 6 months ago
parent 23986d7b7e
commit c11eb9ca6b
  1. 1
      src/utils/api.js
  2. 54
      src/views/match/add/step3.vue
  3. 7
      src/views/match/manage/matchSignup.vue

@ -387,6 +387,7 @@ export default {
batchDeleteApplicants: `competition/competition/registration/batchDeleteApplicants`,
deleteAllData: `competition/competition/registration/deleteAllData`,
whetherThereIsReport: `competition/competitionAutomaticAllocationRecord/whetherThereIsReport`,
closePopup: `competition/competitionAutomaticAllocationRecord/closePopup`,
batchImportPersonalData: `${host}competition/competition/registration/batchImportPersonalData`,
batchImportTeamData: `${host}competition/competition/registration/batchImportTeamData`,
TeamDataExportFailure: `${host}competition/competition/registration/exportFailure`,

@ -95,6 +95,18 @@
</div>
<set v-if="setVisible" :form.sync="form[curStep]" :step1.sync="step1" @hideSet="hideSet" />
<el-dialog title="提示" :visible.sync="tipsVisible" width="500px" :close-on-click-modal="false"
custom-class="tips-dia">
<p style="margin-bottom: 15px;line-height: 1.6">
团队赛发布成功若有修改报名时间赛程与规则修改不会影响已经分配的阶段参赛人员但后面加入报名的将不再自动分配如需将已分配的重新分配和新加入报名的进行分配请前往报名人员列表设置全部重新分配</p>
<el-checkbox v-model="closeStatus">不再提示</el-checkbox>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="closePopup">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
@ -147,6 +159,9 @@ export default {
setVisible: false,
curStep: 0,
curOriginForm: {},
closeStatus: false,
tipsVisible: false,
};
},
components: {
@ -308,6 +323,12 @@ export default {
publish () {
this.competitionId && this.$post(`${this.api.publishCompetition}?competitionId=${this.competitionId}&publishStatus=1`).then(res => { }).catch(err => { })
},
//
async closePopup () {
if (this.closeStatus) await this.$post(`${this.api.closePopup}?competitionId=${this.competitionId}`)
this.$emit('next', 0)
},
//
async automaticAllocation (assignOrNot, next) {
await this.$post(this.api.updateEventAllocationRecord, {
@ -318,9 +339,13 @@ export default {
},
//
async autoAllocationConfirm (next) {
//
const { data } = await this.$post(`${this.api.viewEventAllocationInformation}?competitionId=${this.competitionId}`)
if (!data || data.assignOrNot === undefined || !this.form[0].contentId) {
// or
const now = await Util.getNow()
//
if (new Date(this.$parent.$refs.step1.form.signUpEndTime) > now) {
this.$confirm('<p>团队赛发布成功,是否要自动分配阶段参赛人员?</p><p style="margin-top: 10px;color: #a9a9a9;">(点击“是”将会在报名结束后给报名的团队自动分配阶段参赛人员</p>', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
@ -333,27 +358,22 @@ export default {
this.automaticAllocation(0, next)
})
} else {
//
const res = await this.$post(`${this.api.editWhetherPopUpsAppear}?competitionId=${this.competitionId}`)
if (res.popupState) {
this.$confirm('<p>团队赛发布成功,是否要重新自动分配阶段参赛人员?</p><p style="margin-top: 10px;color: #a9a9a9;">(点击“是”将会<span style="color: #f00;">立即</span>给报名的团队自动分配阶段参赛人员</p>', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
this.$confirm('团队赛发布成功,由于您设置的报名时间已结束,如需自动分配阶段参赛人员,请前往报名人员列表进行设置', '提示', {
confirmButtonText: '关闭',
type: 'success',
closeOnClickModal: false,
showClose: false,
dangerouslyUseHTMLString: true,
}).then(async () => {
await this.$post(`${this.api.automaticAllocation}?competitionId=${this.id}`) //
showClose: false,
}).then(() => {
this.$emit('next', next)
}).catch(() => {
this.automaticAllocation(0, next)
})
}).catch(() => { })
}
} else if (data.whetherToHidePopUps) {
//
this.tipsVisible = true
} else {
//
this.$emit('next', next)
}
}
},
//
save (status, next = 0) {
@ -507,4 +527,10 @@ export default {
cursor: pointer;
}
}
/deep/.tips-dia {
.el-dialog__body {
padding: 10px 20px;
}
}
</style>

@ -20,7 +20,7 @@
<el-button v-if="loaded && info.completeCompetitionSetup.competitionType" type="primary" round
:disabled="hasReport" :loading="allocating" @click="autoAllocationConfirm">{{ !notBeginSign && allocated ?
'取消' : ''
}}自动分配阶段成员</el-button>
}}重新自动分配阶段成员</el-button>
<el-button type="primary" round @click="batchImport">导入</el-button>
<el-button type="primary" round @click="add" v-auth="'/match:管理:报名人员:新增'">新增</el-button>
<el-button type="primary" round :loading="exporting" @click="exportAll"
@ -386,16 +386,17 @@ export default {
async autoAllocationConfirm () {
//
if (this.notBeginSign) {
this.$confirm('确定立即给所有报名的团队自动分配阶段成员?', '提示', {
this.$confirm('确定立即给所有报名的团队重新自动分配阶段成员?', '提示', {
type: 'success',
closeOnClickModal: false,
}).then(async () => {
await this.$post(`${this.api.automaticAllocation}?competitionId=${this.id}`) //
}).catch(() => { })
} else {
this.$confirm(this.allocated ? '确定取消自动分配阶段成员?' : '确定开启自动分配阶段成员?开启后,将在报名结束后给所有报名的团队自动分配阶段参赛人员', {
this.$confirm(this.allocated ? '确定取消重新自动分配阶段成员?' : '<p style="margin-bottom: 5px;font-size: 16px;color: #f00;">确定开启重新自动分配阶段成员?</p><p>开启后,将在报名结束后给所有报名的团队重新自动分配阶段参赛人员</p>', {
type: 'success',
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
}).then(async () => {
this.allocating = true
this.automaticAllocation(this.allocated ? 0 : 1)

Loading…
Cancel
Save