|
|
|
@ -94,7 +94,7 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template v-if="form.completeCompetitionSetup.competitionType"> |
|
|
|
|
<p>每个团队参赛人数限制:{{ rule.teamNumLimit || '不限制' }}</p> |
|
|
|
|
<p>每个团队参赛人数限制:{{ rule.customNumber || '不限制' }}</p> |
|
|
|
|
<p>团队成绩计算方式:{{ teamCalculationMethods.find(e => e.id == rule.teamCalculationMethod) && teamCalculationMethods.find(e => e.id == rule.teamCalculationMethod).name }}</p> |
|
|
|
|
</template> |
|
|
|
|
<!-- <p v-if="rule.resultAnnouncementTime != 0">阶段比赛结束后{{ rule.resultAnnouncementTime }}小时,公布阶段比赛成绩。</p> --> |
|
|
|
@ -336,6 +336,10 @@ |
|
|
|
|
<tr> |
|
|
|
|
<th>竞赛阶段:</th> |
|
|
|
|
<td> |
|
|
|
|
<div class="m-b-10 text-right"> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
@click="automaticAllocation">自动分配阶段成员</el-button> |
|
|
|
|
</div> |
|
|
|
|
<table class="table tc"> |
|
|
|
|
<tr> |
|
|
|
|
<th width="70">序号</th> |
|
|
|
@ -354,7 +358,7 @@ |
|
|
|
|
<td>{{ i + 1 }}</td> |
|
|
|
|
<td>{{ item.stageName || form.name }}</td> |
|
|
|
|
<template v-if="form.completeCompetitionSetup.competitionType"> |
|
|
|
|
<td>{{ item.teamNumLimit || '不限制' }}</td> |
|
|
|
|
<td>{{ item.customNumber || '不限制' }}</td> |
|
|
|
|
<td> |
|
|
|
|
<template v-if="item.participants"> |
|
|
|
|
<el-tag v-for="tag in item.participants" |
|
|
|
@ -573,8 +577,8 @@ |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.accountId">{{ item.userName }}</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
|
<p v-if="info.teamLimit && curRow.teamNumLimit" |
|
|
|
|
style="margin-top: 15px;font-size: 12px;">注:当前阶段限制{{ curRow.teamNumLimit }}人参赛,且此竞赛每个成员只能参加一个阶段赛项。</p> |
|
|
|
|
<p v-if="info.teamLimit && curRow.customNumber" |
|
|
|
|
style="margin-top: 15px;font-size: 12px;">注:当前阶段限制{{ curRow.customNumber }}人参赛,且此竞赛每个成员只能参加一个阶段赛项。</p> |
|
|
|
|
<span slot="footer" |
|
|
|
|
class="dialog-footer"> |
|
|
|
|
<el-button size="small" |
|
|
|
@ -758,7 +762,6 @@ export default { |
|
|
|
|
], |
|
|
|
|
progress: [], |
|
|
|
|
timer: null, |
|
|
|
|
rankTimer: null, |
|
|
|
|
notices: [], |
|
|
|
|
noticeDetail: {}, |
|
|
|
|
curArch: '0', |
|
|
|
@ -832,7 +835,8 @@ export default { |
|
|
|
|
client: null, |
|
|
|
|
uploading: false, |
|
|
|
|
uploadProgress: 0, |
|
|
|
|
now: '' |
|
|
|
|
now: '', |
|
|
|
|
allocated: 0, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
@ -846,7 +850,6 @@ export default { |
|
|
|
|
mounted () { |
|
|
|
|
this.$once('hook:beforeDestroy', function () { |
|
|
|
|
clearInterval(this.timer) |
|
|
|
|
clearInterval(this.rankTimer) |
|
|
|
|
this.timerList.forEach(n => { |
|
|
|
|
clearTimeout(n) |
|
|
|
|
}) |
|
|
|
@ -856,6 +859,7 @@ export default { |
|
|
|
|
this.getProgress() |
|
|
|
|
this.getNotice() |
|
|
|
|
this.getTeam() |
|
|
|
|
this.getAutomaticAllocation() |
|
|
|
|
|
|
|
|
|
this.initOss() |
|
|
|
|
}, |
|
|
|
@ -1189,7 +1193,6 @@ export default { |
|
|
|
|
// 定时调获取排名接口 |
|
|
|
|
intervalRank () { |
|
|
|
|
this.getRank() |
|
|
|
|
// this.rankTimer = setInterval(this.getRank, 1000) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 删除指导老师 |
|
|
|
@ -1299,6 +1302,11 @@ export default { |
|
|
|
|
}).catch(() => { }) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 获取是否已分配 |
|
|
|
|
async getAutomaticAllocation () { |
|
|
|
|
const res = await this.$post(`${this.api.viewEventAllocationInformation}?competitionId=${this.id}`) |
|
|
|
|
this.allocated = true |
|
|
|
|
}, |
|
|
|
|
// 移除参赛人员 |
|
|
|
|
async removePar (e, stage) { |
|
|
|
|
const item = this.form.competitionStage.find(e => e.stageId == stage.stageId) |
|
|
|
@ -1362,7 +1370,7 @@ export default { |
|
|
|
|
const accountIds = this.checkedMembers |
|
|
|
|
if (!accountIds.length) return Util.errorMsg('请选择参赛成员!') |
|
|
|
|
const limit = this.curRow.teamNumLimit // 参赛人数限制 |
|
|
|
|
if (limit && accountIds.length > limit) return Util.errorMsg(`请选择${limit}个以下参赛成员!`) // 选择的参赛人员个数不能大于参赛人数限制 |
|
|
|
|
if (limit && accountIds.length > limit) return Util.errorMsg(`请选择${this.curRow.customNumber}个以下参赛成员!`) // 选择的参赛人员个数不能大于参赛人数限制 |
|
|
|
|
this.$post(this.api.stageSelectParticipants, { |
|
|
|
|
accountIds, |
|
|
|
|
competitionId: this.id, |
|
|
|
@ -1467,8 +1475,28 @@ export default { |
|
|
|
|
this.enterVisible = false |
|
|
|
|
this.getData() |
|
|
|
|
Util.successMsg('报名成功!') |
|
|
|
|
this.afterCreateTeam() |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
}, |
|
|
|
|
// 队长创建团队后弹框 |
|
|
|
|
afterCreateTeam () { |
|
|
|
|
// 已分配 |
|
|
|
|
if (this.allocated) { |
|
|
|
|
Util.successMsg('团队创建成功,系统将自动帮您分配阶段参赛成员,您也可以到参数信息进行指定') |
|
|
|
|
} else { |
|
|
|
|
// 未分配 |
|
|
|
|
this.$confirm('是否要启用自动分配成员参加阶段赛项', '提示', { |
|
|
|
|
cancelButtonText: '否', |
|
|
|
|
confirmButtonText: '是', |
|
|
|
|
type: 'success', |
|
|
|
|
closeOnClickModal: false, |
|
|
|
|
}).then(() => { |
|
|
|
|
// this.automaticAllocation(1, next) |
|
|
|
|
}).catch(() => { |
|
|
|
|
// this.automaticAllocation(0, next) |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 团队关闭 |
|
|
|
|
teamClose () { |
|
|
|
|
this.teamForm = { |
|
|
|
|