职站竞赛报名添加选择所在学校

dev_202412
yujialong 5 months ago
parent 03cc27ed79
commit 5868ddd3c3
  1. 46
      src/pages/match/details/index.vue
  2. 50
      src/pages/match/list/index.vue
  3. 46
      src/pages/touristMatch/list/index.vue

@ -382,7 +382,13 @@
<!-- 个人报名有赛事邀请码的情况没有赛事邀请码的情况不用弹框直接报名成功 -->
<el-dialog title="报名" :visible.sync="peopleSignupVisible" :close-on-click-modal="false" width="300px">
<el-form class="dia-form">
<el-form-item>
<el-form-item label="来自学校">
<el-select v-model="peopleSignupForm.realSchoolId" filterable style="width: 100%">
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="form.completeCompetitionSetup.isNeedCode">
<el-input placeholder="请输入4位数大赛邀请码" maxlength="4"
v-model="peopleSignupForm.registrationInvitationCode"></el-input>
</el-form-item>
@ -461,8 +467,13 @@
<el-dialog v-else title="报名" :visible.sync="enterVisible" :close-on-click-modal="false" width="300px"
@close="enterClose">
<el-form class="dia-form">
<p style="margin-bottom: 5px">请选择要加入的团队</p>
<el-form-item>
<el-form-item label="来自学校">
<el-select v-model="enterForm.realSchoolId" filterable style="width: 100%">
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="请选择要加入的团队">
<el-select class="w-100" v-model="enterForm.teamId" filterable>
<el-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option>
</el-select>
@ -730,6 +741,7 @@ export default {
playingStages: [],
peopleSignupVisible: false,
peopleSignupForm: {
realSchoolId: '',
registrationInvitationCode: ''
},
submiting: false,
@ -813,10 +825,8 @@ export default {
this.initOss()
}
if (this.token) {
if (this.fromOffical) {
this.getCurSchool()
this.getSchool()
}
this.getCurSchool()
this.getSchool()
this.intervalRank()
competition.completeCompetitionSetup.competitionType && this.getAutomaticAllocation() //
}
@ -1365,7 +1375,7 @@ export default {
async peopleSignupSubmit () {
await this.$post(this.api.addCompetitionRegistration, {
competitionId: this.id,
registrationInvitationCode: this.peopleSignupForm.registrationInvitationCode
...this.peopleSignupForm
})
this.peopleSignupVisible = false
this.getData()
@ -1711,22 +1721,14 @@ export default {
//
if (competitionType || this.fromOffical) {
this.enterVisible = true
if (this.fromOffical) {
this.agreeCheck = false
this.enterForm.realSchoolId = this.curRealSchoolId
}
this.agreeCheck = false
this.enterForm.realSchoolId = this.curRealSchoolId
} else { //
if (form.completeCompetitionSetup.isNeedCode) {
this.peopleSignupForm.registrationInvitationCode = ''
this.peopleSignupVisible = true
} else {
this.$post(this.api.addCompetitionRegistration, {
competitionId: this.id
}).then(res => {
this.getData()
this.$message.success('报名成功')
}).catch(res => { })
this.peopleSignupForm = {
realSchoolId: this.curRealSchoolId,
registrationInvitationCode: '',
}
this.peopleSignupVisible = true
}
} else if (status == 1) {
//

@ -150,7 +150,13 @@
<!-- 个人报名有赛事邀请码的情况没有赛事邀请码的情况不用弹框直接报名成功 -->
<el-dialog title="报名" :visible.sync="peopleSignupVisible" :close-on-click-modal="false" width="300px">
<el-form class="dia-form">
<el-form-item>
<el-form-item label="来自学校">
<el-select v-model="peopleSignupForm.realSchoolId" filterable style="width: 100%">
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="curItem.isNeedCode">
<el-input placeholder="请输入4位数大赛邀请码" maxlength="4"
v-model="peopleSignupForm.registrationInvitationCode"></el-input>
</el-form-item>
@ -229,8 +235,13 @@
<!-- 常规团队报名 -->
<el-dialog v-else title="报名" :visible.sync="enterVisible" :close-on-click-modal="false" width="300px">
<el-form class="dia-form">
<p style="margin-bottom: 5px">请选择要加入的团队</p>
<el-form-item>
<el-form-item label="来自学校">
<el-select v-model="enterForm.realSchoolId" filterable style="width: 100%">
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="请选择要加入的团队">
<el-select class="w-100" v-model="enterForm.teamId" filterable>
<el-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option>
</el-select>
@ -437,6 +448,7 @@ export default {
curItem: {},
peopleSignupVisible: false,
peopleSignupForm: {
realSchoolId: '',
registrationInvitationCode: ''
},
curRow: {},
@ -481,10 +493,8 @@ export default {
this.clearTimer()
})
if (this.fromOffical) {
this.getCurSchool()
this.getSchool()
}
this.getCurSchool()
this.getSchool()
this.initOss()
},
methods: {
@ -677,7 +687,7 @@ export default {
peopleSignupSubmit () {
this.$post(this.api.addCompetitionRegistration, {
competitionId: this.curRow.id,
registrationInvitationCode: this.peopleSignupForm.registrationInvitationCode
...this.peopleSignupForm
}).then(res => {
this.peopleSignupVisible = false
this.getData()
@ -762,6 +772,7 @@ export default {
if (this.teamNameRepeat) return Util.errorMsg('团队名称重复,请重新输入')
if (form.invitationCode.length !== 6) return Util.errorMsg('请输入6位数团队邀请码')
if (this.curItem.isNeedCode && !form.registrationInvitationCode) return Util.errorMsg('请输入大赛邀请码')
form.realSchoolId = this.enterForm.realSchoolId
this.$post(this.api.addCompetitionTeam, form).then(res => {
this.teamVisible = false
this.enterVisible = false
@ -1008,30 +1019,21 @@ export default {
if (competitionType || this.fromOffical) {
this.getTeam()
this.enterForm = {
realSchoolId: '',
realSchoolId: this.curRealSchoolId,
competitionId: id,
teamId: '',
invitationCode: '',
registrationInvitationCode: ''
}
this.enterVisible = true
if (this.fromOffical) {
this.agreeCheck = false
this.enterForm.realSchoolId = this.curRealSchoolId
}
this.agreeCheck = false
} else { //
if (item.isNeedCode) {
this.curRow = item
this.peopleSignupForm.registrationInvitationCode = ''
this.peopleSignupVisible = true
} else {
this.$post(this.api.addCompetitionRegistration, {
competitionId: id
}).then(res => {
this.getData()
this.$message.success('报名成功')
}).catch(res => { })
this.curRow = item
this.peopleSignupForm = {
realSchoolId: this.curRealSchoolId,
registrationInvitationCode: '',
}
this.peopleSignupVisible = true
}
} else if (status == 1) {
//

@ -132,7 +132,13 @@
<!-- 个人报名有赛事邀请码的情况没有赛事邀请码的情况不用弹框直接报名成功 -->
<el-dialog title="报名" :visible.sync="peopleSignupVisible" :close-on-click-modal="false" width="300px">
<el-form class="dia-form">
<el-form-item>
<el-form-item label="来自学校">
<el-select v-model="peopleSignupForm.realSchoolId" filterable style="width: 100%">
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="curItem.isNeedCode">
<el-input placeholder="请输入4位数大赛邀请码" maxlength="4"
v-model="peopleSignupForm.registrationInvitationCode"></el-input>
</el-form-item>
@ -209,8 +215,13 @@
</el-dialog>
<el-dialog v-else title="报名" :visible.sync="enterVisible" :close-on-click-modal="false" width="300px">
<el-form class="dia-form">
<p style="margin-bottom: 5px">请选择要加入的团队</p>
<el-form-item>
<el-form-item label="来自学校">
<el-select v-model="enterForm.realSchoolId" filterable style="width: 100%">
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="请选择要加入的团队">
<el-select class="w-100" v-model="enterForm.teamId" filterable>
<el-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option>
</el-select>
@ -350,6 +361,7 @@ export default {
curItem: {},
peopleSignupVisible: false,
peopleSignupForm: {
realSchoolId: '',
registrationInvitationCode: ''
},
curRow: {},
@ -375,7 +387,7 @@ export default {
this.getData()
this.$once('hook:beforeDestroy', this.clearTimer)
if (this.fromOffical && this.token) {
if (this.token) {
this.getCurSchool()
this.getSchool()
}
@ -569,7 +581,7 @@ export default {
async peopleSignupSubmit () {
await this.$post(this.api.addCompetitionRegistration, {
competitionId: this.curRow.id,
registrationInvitationCode: this.peopleSignupForm.registrationInvitationCode
...this.peopleSignupForm
})
this.peopleSignupVisible = false
this.getData()
@ -654,6 +666,7 @@ export default {
if (this.teamNameRepeat) return Util.errorMsg('团队名称重复,请重新输入')
if (form.invitationCode.length !== 6) return Util.errorMsg('请输入6位数团队邀请码')
if (this.curItem.isNeedCode && !form.registrationInvitationCode) return Util.errorMsg('请输入大赛邀请码')
form.realSchoolId = this.enterForm.realSchoolId
this.$post(this.api.addCompetitionTeam, form).then(res => {
this.teamVisible = false
this.enterVisible = false
@ -741,30 +754,21 @@ export default {
if (competitionType || this.fromOffical) {
this.getTeam()
this.enterForm = {
realSchoolId: '',
realSchoolId: this.curRealSchoolId,
competitionId: id,
teamId: '',
invitationCode: '',
registrationInvitationCode: ''
}
this.enterVisible = true
if (this.fromOffical) {
this.agreeCheck = false
this.enterForm.realSchoolId = this.curRealSchoolId
}
this.agreeCheck = false
} else { //
if (item.isNeedCode) {
this.curRow = item
this.peopleSignupForm.registrationInvitationCode = ''
this.peopleSignupVisible = true
} else {
this.$post(this.api.addCompetitionRegistration, {
competitionId: id
}).then(res => {
this.getData()
this.$message.success('报名成功')
}).catch(res => { })
this.curRow = item
this.peopleSignupForm = {
realSchoolId: this.curRealSchoolId,
registrationInvitationCode: '',
}
this.peopleSignupVisible = true
}
} else if (status == 1) {
//

Loading…
Cancel
Save