赛事修复

dev_review
yujialong 6 months ago
parent 23986d7b7e
commit c11eb9ca6b
  1. 1
      src/utils/api.js
  2. 70
      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`, batchDeleteApplicants: `competition/competition/registration/batchDeleteApplicants`,
deleteAllData: `competition/competition/registration/deleteAllData`, deleteAllData: `competition/competition/registration/deleteAllData`,
whetherThereIsReport: `competition/competitionAutomaticAllocationRecord/whetherThereIsReport`, whetherThereIsReport: `competition/competitionAutomaticAllocationRecord/whetherThereIsReport`,
closePopup: `competition/competitionAutomaticAllocationRecord/closePopup`,
batchImportPersonalData: `${host}competition/competition/registration/batchImportPersonalData`, batchImportPersonalData: `${host}competition/competition/registration/batchImportPersonalData`,
batchImportTeamData: `${host}competition/competition/registration/batchImportTeamData`, batchImportTeamData: `${host}competition/competition/registration/batchImportTeamData`,
TeamDataExportFailure: `${host}competition/competition/registration/exportFailure`, TeamDataExportFailure: `${host}competition/competition/registration/exportFailure`,

@ -95,6 +95,18 @@
</div> </div>
<set v-if="setVisible" :form.sync="form[curStep]" :step1.sync="step1" @hideSet="hideSet" /> <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> </div>
</template> </template>
@ -147,6 +159,9 @@ export default {
setVisible: false, setVisible: false,
curStep: 0, curStep: 0,
curOriginForm: {}, curOriginForm: {},
closeStatus: false,
tipsVisible: false,
}; };
}, },
components: { components: {
@ -308,6 +323,12 @@ export default {
publish () { publish () {
this.competitionId && this.$post(`${this.api.publishCompetition}?competitionId=${this.competitionId}&publishStatus=1`).then(res => { }).catch(err => { }) 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) { async automaticAllocation (assignOrNot, next) {
await this.$post(this.api.updateEventAllocationRecord, { await this.$post(this.api.updateEventAllocationRecord, {
@ -318,41 +339,40 @@ export default {
}, },
// //
async autoAllocationConfirm (next) { async autoAllocationConfirm (next) {
//
const { data } = await this.$post(`${this.api.viewEventAllocationInformation}?competitionId=${this.competitionId}`) const { data } = await this.$post(`${this.api.viewEventAllocationInformation}?competitionId=${this.competitionId}`)
if (!data || data.assignOrNot === undefined || !this.form[0].contentId) { if (!data || data.assignOrNot === undefined || !this.form[0].contentId) {
// or // or
this.$confirm('<p>团队赛发布成功,是否要自动分配阶段参赛人员?</p><p style="margin-top: 10px;color: #a9a9a9;">(点击“是”将会在报名结束后给报名的团队自动分配阶段参赛人员</p>', '提示', { const now = await Util.getNow()
confirmButtonText: '是', //
cancelButtonText: '否', if (new Date(this.$parent.$refs.step1.form.signUpEndTime) > now) {
type: 'success', this.$confirm('<p>团队赛发布成功,是否要自动分配阶段参赛人员?</p><p style="margin-top: 10px;color: #a9a9a9;">(点击“是”将会在报名结束后给报名的团队自动分配阶段参赛人员</p>', '提示', {
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
}).then(() => {
this.automaticAllocation(1, next)
}).catch(() => {
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: '是', confirmButtonText: '是',
cancelButtonText: '否', cancelButtonText: '否',
type: 'success', type: 'success',
closeOnClickModal: false, closeOnClickModal: false,
showClose: false,
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
}).then(async () => { }).then(() => {
await this.$post(`${this.api.automaticAllocation}?competitionId=${this.id}`) // this.automaticAllocation(1, next)
this.$emit('next', next)
}).catch(() => { }).catch(() => {
this.automaticAllocation(0, next) this.automaticAllocation(0, next)
}) })
} else { } else {
// this.$confirm('团队赛发布成功,由于您设置的报名时间已结束,如需自动分配阶段参赛人员,请前往报名人员列表进行设置', '提示', {
this.$emit('next', next) confirmButtonText: '关闭',
type: 'success',
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
showClose: false,
}).then(() => {
this.$emit('next', next)
}).catch(() => { })
} }
} else if (data.whetherToHidePopUps) {
//
this.tipsVisible = true
} else {
this.$emit('next', next)
} }
}, },
// //
@ -507,4 +527,10 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
/deep/.tips-dia {
.el-dialog__body {
padding: 10px 20px;
}
}
</style> </style>

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

Loading…
Cancel
Save