赛事修复

master
yujialong 10 months ago
parent 28cb442105
commit 57f0f4ce83
  1. 2
      src/pages/match/add/step1.vue
  2. 30
      src/pages/match/add/step2.vue

@ -696,7 +696,7 @@ export default {
this.$parent.showLoad()
delete form.publishStatus
if (status === 1) form.publishStatus = 1
form.ztOpen = status ? 0 : 1 //
form.isOpen = status ? 0 : 1 //
form.releaseType = releaseType
form.id = this.$route.query.id

@ -39,11 +39,9 @@
class="tips">
(团队赛是否限制队内每个成员只能参加一个阶段赛项
<el-radio v-model="form.teamLimit"
:label="1"
@change="teamLimitChange"></el-radio>
:label="1"></el-radio>
<el-radio v-model="form.teamLimit"
:label="0"
@change="teamLimitChange"></el-radio>
:label="0"></el-radio>
)
</div>
</el-form-item>
@ -89,7 +87,7 @@
<el-input v-model.number="item.teamNumLimit"
type="number"
style="width: 150px;"
:disabled="item.teamNumLimitOpt === 0 || form.teamLimit === 1"></el-input>
:disabled="item.teamNumLimitOpt === 0"></el-input>
<span class="tips">可限制本阶段单个团队的出战人数</span>
</div>
<div v-if="step1.completeCompetitionSetup.competitionType"
@ -246,8 +244,8 @@ export default {
scoreLimit: '',
operator: '>',
score: '',
teamNumLimit: 1,
teamNumLimitOpt: 1,
teamNumLimit: '',
teamNumLimitOpt: 0,
resultAnnouncementTime: '',
resultsDetails: '',
},
@ -262,8 +260,8 @@ export default {
scoreLimit: '',
operator: '>',
score: '',
teamNumLimit: 1,
teamNumLimitOpt: 1,
teamNumLimit: '',
teamNumLimitOpt: 0,
resultAnnouncementTime: '',
resultsDetails: '',
},
@ -278,8 +276,8 @@ export default {
scoreLimit: '',
operator: '>',
score: '',
teamNumLimit: 1,
teamNumLimitOpt: 1,
teamNumLimit: '',
teamNumLimitOpt: 0,
resultAnnouncementTime: '',
resultsDetails: '',
}
@ -371,14 +369,6 @@ export default {
this.form.competitionStageList = stages.slice(0, val)
}
},
teamLimitChange (e) {
if (e === 1) {
this.form.competitionStageList.forEach(e => {
e.teamNumLimitOpt = 1
e.teamNumLimit = 1
})
}
},
//
save (status, next = 0, releaseType, cb) {
let { form } = this
@ -462,7 +452,7 @@ export default {
if (e.teamNumLimit) teamNumLimit += e.teamNumLimit //
}
if (invalid) return
if (form.teamLimit) {
if (form.teamLimit && competitionType) {
if (stages.length > minTeamSize) return util.errorMsg('阶段数不得大于团队人数下限')
if (teamNumLimit > minTeamSize) return util.errorMsg('各阶段自定义的参赛人数之和不得大于团队人数下限')
}

Loading…
Cancel
Save