赛事修复

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() this.$parent.showLoad()
delete form.publishStatus delete form.publishStatus
if (status === 1) form.publishStatus = 1 if (status === 1) form.publishStatus = 1
form.ztOpen = status ? 0 : 1 // form.isOpen = status ? 0 : 1 //
form.releaseType = releaseType form.releaseType = releaseType
form.id = this.$route.query.id form.id = this.$route.query.id

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

Loading…
Cancel
Save