赛事修复

master
yujialong 6 months ago
parent db25648ed2
commit 94ed77777d
  1. 1
      src/api/index.js
  2. 46
      src/pages/match/add/step3.vue
  3. 7
      src/pages/match/manage/matchSignup.vue

@ -230,6 +230,7 @@ export default {
batchDeleteApplicants: `competition/competition/registration/batchDeleteApplicants`,
deleteAllData: `competition/competition/registration/deleteAllData`,
whetherThereIsReport: `competition/competitionAutomaticAllocationRecord/whetherThereIsReport`,
closePopup: `competition/competitionAutomaticAllocationRecord/closePopup`,
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`,

@ -85,6 +85,16 @@
</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">
<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>
@ -139,6 +149,9 @@ export default {
curStep: 0,
pass: 0,
curOriginForm: {},
closeStatus: false,
tipsVisible: false,
};
},
components: {
@ -300,6 +313,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, {
@ -310,9 +329,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: '否',
@ -325,27 +348,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, releaseType, cb) {

@ -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/list:管理:报名人员:新增'">新增</el-button>
<el-button type="primary" round :loading="exporting" @click="exportAll"
@ -397,16 +397,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