赛事修复

alioss
yujialong 2 years ago
parent 52bf266a67
commit bdb3ffba43
  1. 2
      src/api/index.js
  2. 121
      src/pages/match/details/index.vue
  3. 44
      src/pages/match/list/index.vue
  4. 7
      src/pages/screen/index.vue
  5. 30
      src/pages/touristMatch/list/index.vue
  6. 2
      src/setting.js
  7. 2
      src/store/modules/match.js

@ -99,6 +99,8 @@ export default {
allowedParticipateCompetition: `competition/competition/management/allowedParticipateCompetition`,
stageSelectParticipants: `competition/competition/teamParticipant/stageSelectParticipants`,
getCustomerBySchoolId: `nakadai/nakadai/customer/getCustomerBySchoolId`,
isParticipant: `competition/competition/management/isParticipant`,
editCompetitionTeam: `competition/competition/team/editCompetitionTeam`,
frontDeskOverallRanking: `${host1}competition/competition/rank/frontDeskOverallRanking`,
frontOfficeCompetitionRanking: `${host1}competition/competition/rank/frontOfficeCompetitionRanking`,
stageGradeManagementList: `${host1}competition/competition/performance/stageGradeManagementList`,

@ -23,6 +23,7 @@
<div class="meta">最近编辑时间{{ form.updateTime }}</div>
</div>
<div v-show="curType != 4 && curType != 5">
<div class="l-title" id="part1"><img src="@/assets/img/label.png" alt=""> 竞赛信息</div>
<div v-if="form.description" class="texts ql-editor" v-html="form.description"></div>
<template v-if="form.contestAnnexList">
@ -37,18 +38,24 @@
</template>
<div class="l-title" id="part1"><img src="@/assets/img/label.png" alt=""> 赛程规则与内容</div>
<h6 class="rule-title">3个竞赛阶段同一个团队每个成员只能参加一个阶段赛项</h6>
<div class="l-title"><img src="@/assets/img/label.png" alt=""> 赛程规则与内容</div>
<h6 class="rule-title">{{ form.competitionStage.length }}个竞赛阶段同一个团队每个成员只能参加一个阶段赛项</h6>
<div v-for="(rule, i) in form.competitionStage" :key="i" class="rule">
<p>{{ rule.stageName }}</p>
<p>比赛时间{{ rule.startTime + ' ~ ' + rule.endTime }}</p>
<p style="font-size: 16px;color: #333;">{{ rule.stageName }}</p>
<p>比赛时间{{ rule.startTime && rule.startTime + ' ~ ' + rule.endTime }}</p>
<p>比赛方式{{ methods.find(e => e.id == rule.method) && methods.find(e => e.id == rule.method).name }}</p>
<p>课程系统{{ rule.systemName }}</p>
<p v-if="!rule.method">课程系统{{ rule.systemName }}</p>
<template v-if="rule.method === 2">
<p>比赛内容</p>
<div v-html="form.description"></div>
<p class="m-t-10">评分规则专家打分</p>
</template>
<template v-if="form.completeCompetitionSetup.competitionType">
<p>团队参赛人数限制{{ rule.teamNumLimit }}</p>
<p>团队成绩计算方式{{ teamCalculationMethods.find(e => e.id == rule.teamCalculationMethod) && teamCalculationMethods.find(e => e.id == rule.teamCalculationMethod).name }}</p>
</template>
<p>阶段比赛结束后{{ rule.resultAnnouncementTime }}小时公布阶段比赛成绩</p>
<p>阶段比赛结束后{{ rule.resultAnnouncementTime }}小时公布阶段比赛成绩</p>
</div>
<!-- 进展 -->
@ -87,10 +94,11 @@
</div>
</div>
</template>
</div>
<!-- 竞赛排名 -->
<template v-if="form.competitionRegistration && form.competitionRegistration.teamId">
<div class="l-title" id="part4"><img src="@/assets/img/label.png" alt=""> 竞赛排名</div>
<template v-if="curType == 4 && form.competitionRegistration && form.competitionRegistration.teamId">
<div class="l-title"><img src="@/assets/img/label.png" alt=""> 竞赛排名</div>
<el-tabs v-model="curArch" @tab-click="getRank">
<el-tab-pane v-for="(item, index) in arches" :key="index" :label="item.stageName + '排名'" :name="item.stageId"></el-tab-pane>
</el-tabs>
@ -108,7 +116,8 @@
</el-table>
</template>
<div class="l-title m-t-20" id="part4"><img src="@/assets/img/label.png" alt=""> 参赛信息</div>
<template v-if="curType == 5">
<div class="l-title m-t-20"><img src="@/assets/img/label.png" alt=""> 参赛信息</div>
<table class="table">
<template v-if="!form.completeCompetitionSetup.competitionType || info.team.captain">
<tr>
@ -126,7 +135,7 @@
</template>
<template v-if="form.completeCompetitionSetup.competitionType">
<tr>
<th>团队名称</th>
<th width="150">团队名称</th>
<td>
<el-input v-if="info.team.captain === 0" :disabled="!editing" v-model="info.team.teamName"></el-input>
<span v-else>{{ info.team.teamName }}</span>
@ -154,7 +163,7 @@
<div v-for="(item, i) in info.teamInstructors" :key="i" class="line">
<el-input placeholder="请输入姓名" v-model="item.name" clearable size="mini"></el-input>
<el-input placeholder="请输入职务" maxlength="10" v-model="item.position" clearable size="mini"></el-input>
<el-input placeholder="请输入联系方式" maxlength="11" v-model="item.phone" clearable size="mini"></el-input>
<el-input placeholder="请输入手机号" maxlength="11" v-model="item.phone" clearable size="mini"></el-input>
<i class="el-icon-check icon" @click="submitAdvisor(item)"></i>
<i class="el-icon-delete icon" @click="delAdvisor(item, i)"></i>
</div>
@ -178,7 +187,7 @@
<th width="80">序号</th>
<th>赛项阶段名称</th>
<template v-if="form.completeCompetitionSetup.competitionType">
<th>参赛人数限制</th>
<th width="110">参赛人数限制</th>
<th>允许参赛人员</th>
<th v-if="info.team.captain === 0 && form.rule === 0">总分</th>
</template>
@ -189,12 +198,12 @@
<td>{{ i + 1 }}</td>
<td>{{ item.stageName }}</td>
<template v-if="form.completeCompetitionSetup.competitionType">
<td>{{ item.peopleLimit }}</td>
<td>{{ item.teamNumLimit || 0 }}</td>
<td>
<el-button :disabled="!editing" type="danger" size="mini" @click="selectPar(item)">修改</el-button>
<span class="m-l-5">{{ item.teamParticipantIds }}</span>
<span class="m-r-5">{{ item.teamParticipantIds }}</span>
<el-button type="danger" size="mini" @click="selectPar(item)">修改</el-button>
</td>
<td v-if="info.team.captain === 0 && form.rule === 0"></td>
<td v-if="info.team.captain === 0 && form.rule === 0 && !i" :rowspan="info.stages.length">{{ info.totalScore }}</td>
</template>
<td>
<span v-if="item.score" class="m-r-10">分数{{item.score}}</span>
@ -238,11 +247,11 @@
</el-table-column>
</el-table>
</template>
</template>
</div>
</div>
</div>
<el-dialog title="报名" :visible.sync="enterVisible" :close-on-click-modal="false" width="300px" @close="enterClose">
<el-form class="dia-form">
<p style="margin-bottom: 5px">请选择要加入的团队</p>
@ -284,7 +293,6 @@
</span>
</el-dialog>
<el-dialog title="选择参赛成员" :visible.sync="transferVisible" :close-on-click-modal="false" width="400px">
<template v-for="(item, i) in info.teamDetail">
<el-radio v-if="item.captain" :key="i" v-model="checkedPlayer" :label="item.teamId">{{ item.userName }}</el-radio>
@ -318,6 +326,7 @@
<th width="100">分数</th>
<th width="100">得分详情</th>
</tr>
<template v-if="members.length">
<tr v-for="(item, i) in members" :key="i">
<td>{{ i + 1 }}</td>
<td>{{ item.userName }}</td>
@ -328,6 +337,10 @@
<el-button type="text" @click="toReport(item)">查看</el-button>
</td>
</tr>
</template>
<tr v-else>
<td colspan="6">暂无数据</td>
</tr>
</table>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="memberVisible = false">确定</el-button>
@ -362,6 +375,7 @@ export default {
signUpEndTime: '',
playStartTime: '',
playEndTime: '',
competitionStage: [],
completeCompetitionSetup: {},
competitionRegistration: {}
},
@ -378,6 +392,14 @@ export default {
{
id: '3',
name: '通知公告'
},
{
id: '4',
name: '竞赛排名'
},
{
id: '5',
name: '参赛信息'
}
],
progress: [],
@ -542,6 +564,7 @@ export default {
this.form = competition
const type = competition.completeCompetitionSetup.competitionType
const reg = competition.competitionRegistration
reg || this.typeList.pop()
if (!type || (type && reg)) this.getInfo()
reg && reg.teamId && this.getRank()
this.$refs.breadcrumb.update('全部赛事/' + competition.name)
@ -596,7 +619,7 @@ export default {
getInfo() {
this.$post(`${this.api.entryInformation}?competitionId=${this.id}`).then(res => {
const info = res.entryInformation
if (!info.teamInstructors.length) info.teamInstructors.push(this.originIns)
if (!info.teamInstructors.length) info.teamInstructors.push(JSON.parse(JSON.stringify(this.originIns)))
if (info.personalDetail) {
info.team = {}
info.teamDetail = []
@ -613,7 +636,7 @@ export default {
edit() {
if (this.editing) {
const { teamId, teamName, invitationCode } = this.info.team
this.$post(this.api.addCompetitionTeam, {
this.$post(this.api.editCompetitionTeam, {
competitionId: this.id,
teamId,
teamName,
@ -656,7 +679,13 @@ export default {
},
// tab
typeChange() {
document.querySelector(`#part${this.curType}`).scrollIntoView()
//
const type = +this.curType
if (type > 3) {
this.editing = false
} else {
document.querySelector(`#part${type}`).scrollIntoView()
}
},
//
toNotice(item) {
@ -694,21 +723,23 @@ export default {
}).then(() => {
this.$post(`${this.api.deleteAnAdvisor}?id=${row.id}`).then(res => {
util.successMsg('删除成功')
// this.getClassification()
this.getInfo()
}).catch(res => {})
}).catch(() => {})
} else {
this.classifications.splice(i, 1)
this.info.teamInstructors.splice(i, 1)
}
},
//
addAdvisor() {
if (this.info.teamInstructors.length > 5)
if (this.info.teamInstructors.length > 4) return util.errorMsg('指导老师仅限添加5个!')
this.info.teamInstructors.push(JSON.parse(JSON.stringify(this.originIns)))
},
//
submitAdvisor(row) {
if (!row.name) return util.errorMsg('请输入姓名')
const { phone } = row
if (phone && !/^1[3456789]\d{9}$/.test(phone)) return util.errorMsg('请输入正确手机号格式')
this.$post(this.api.addAnAdvisor, {
name: row.name,
competitionId: this.id,
@ -792,9 +823,13 @@ export default {
this.members = []
}
} else if (row.reportId) { // reportId
this.$router.push(`/record/show?reportId=${row.reportId}`)
this.toReport(row)
}
},
//
toReport(row) {
this.$router.push(`/record/show?reportId=${row.reportId}`)
},
//
enterSubmit() {
@ -858,30 +893,45 @@ export default {
}
},
//
getAllow() {
//
if (this.form.rule === 1) {
this.$post(this.api.allowedParticipateCompetition, {
competitionId: this.id,
number: this.curStage.number,
stageId: this.curStage.stageId,
teamId: this.form.competitionRegistration.teamId,
}).then(res => {
this.toSub()
}).catch(res => {})
} else {
this.toSub()
}
},
//
signup(){
const { status, form } = this
//
if (util.local.get(Setting.tokenKey)) {
const { competitionType } = form.completeCompetitionSetup
if (status == 4) { //
if (form.isDisable === 1) return util.errorMsg('当前用户已被禁赛,如有疑问,请联系平台管理员。') //
//
if (form.rule === 1) {
this.$post(this.api.allowedParticipateCompetition, {
if (form.competitionRegistration.isDisable === 1) return util.errorMsg('当前用户已被禁赛,如有疑问,请联系平台管理员。') //
//
if (competitionType) {
this.$post(this.api.isParticipant, {
competitionId: this.id,
number: this.curStage.number,
stageId: this.curStage.stageId,
teamId: form.competitionRegistration.teamId,
}).then(res => {
// this.toSub()
this.getAllow()
}).catch(res => {})
} else {
this.toSub()
this.getAllow()
}
this.toSub()
} else if (status == 2) { //
//
if (form.completeCompetitionSetup.competitionType) {
if (competitionType) {
this.enterVisible = true
} else { //
this.$post(this.api.addCompetitionRegistration, {
@ -986,6 +1036,7 @@ export default {
p {
font-size: 14px;
line-height: 30px;
color: #6e6e6e;
}
}
.content{
@ -1003,6 +1054,7 @@ export default {
.tool {
position: sticky;
top: 64px;
margin-bottom: 20px;
background-color: #fff;
}
.info .meta{
@ -1293,6 +1345,7 @@ export default {
.line {
display: flex;
align-items: center;
margin-bottom: 10px;
.el-input {
margin-right: 15px;
}

@ -190,14 +190,14 @@ export default {
statusList: ["等待报名", "取消报名", "立即报名", "报名截止", "进入初赛", "已结束"],
endList: ["报名开始", "报名截止", "报名截止", "竞赛开始", "竞赛结束", ""],
typeList: [
{
id: 1,
name: "本校赛事"
},
{
id: 2,
name: "赛事广场"
},
{
id: 1,
name: "本校赛事"
},
{
id: 3,
name: "已报名"
@ -210,7 +210,7 @@ export default {
cityId: '',
sequence: 2, // (1: 2.)
competitionScope: 3, // (0: 1: 2.)
eventType: 1 // (1./2.广/3.)
eventType: 2 // (1./2.广/3.)
},
squareScopes: [
{
@ -376,7 +376,7 @@ export default {
},
mounted() {
this.form.eventType = this.eventType
this.SET_TYPE(1)
this.SET_TYPE(2)
this.getProvince()
this.getData()
this.$once('hook:beforeDestroy', function() {
@ -578,30 +578,46 @@ export default {
util.successMsg('报名成功!')
}).catch(res => {})
},
//
getAllow(item) {
//
if (item.rule === 1) {
this.$post(this.api.allowedParticipateCompetition, {
competitionId: item.id,
number: item.curStage.number,
stageId: item.curStage.stageId,
teamId: item.teamId,
}).then(res => {
this.toSub()
}).catch(res => {})
} else {
this.toSub()
}
},
//
signup(item) {
const { status, id, rule } = item
const { status, id } = item
const { competitionType } = item.setup
//
if (util.local.get(Setting.tokenKey)) {
this.curItem = item
if (status == 4) { //
if (item.isDisable === 1) return util.errorMsg('当前用户已被禁赛,如有疑问,请联系平台管理员。') //
//
if (rule === 1) {
this.$post(this.api.allowedParticipateCompetition, {
//
if (competitionType) {
this.$post(this.api.isParticipant, {
competitionId: id,
number: item.curStage.number,
stageId: item.curStage.stageId,
teamId: item.teamId,
}).then(res => {
this.toSub()
this.getAllow(item)
}).catch(res => {})
} else {
this.toSub()
this.getAllow(item)
}
} else if (status == 2) { //
//
if (item.setup.competitionType) {
if (competitionType) {
this.getTeam()
this.enterForm = {
competitionId: id,

@ -372,13 +372,14 @@ export default {
}).catch(res => {})
//
this.$post(this.api.academicLeadersRanking).then(({ data }) => {
this.$post(`${this.api.academicLeadersRanking}?pageNum=1&pageSize=20`).then(({ data }) => {
const list = data.records
//
data.sort((a, b) => {
list.sort((a, b) => {
if (a.avgScore == b.avgScore) return b.practiceNumber - a.practiceNumber
return b.avgScore - a.avgScore
})
this.achs = data
this.achs = list
}).catch(res => {})
this.scrollTable()
},

@ -543,26 +543,42 @@ export default {
util.successMsg('报名成功!')
}).catch(res => {})
},
//
getAllow(item) {
//
if (item.rule === 1) {
this.$post(this.api.allowedParticipateCompetition, {
competitionId: item.id,
number: item.curStage.number,
stageId: item.curStage.stageId,
teamId: item.teamId,
}).then(res => {
this.toSub()
}).catch(res => {})
} else {
this.toSub()
}
},
//
signup(item) {
const { status, id, rule } = item
const { status, id } = item
const { competitionType } = item.setup
//
if (util.local.get(Setting.tokenKey)) {
this.curItem = item
if (status == 4) { //
if (item.isDisable === 1) return util.errorMsg('当前用户已被禁赛,如有疑问,请联系平台管理员。') //
//
if (rule === 1) {
this.$post(this.api.allowedParticipateCompetition, {
//
if (competitionType) {
this.$post(this.api.isParticipant, {
competitionId: id,
number: item.curStage.number,
stageId: item.curStage.stageId,
teamId: item.teamId,
}).then(res => {
this.toSub()
this.getAllow(item)
}).catch(res => {})
} else {
this.toSub()
this.getAllow(item)
}
} else if (status == 2) { //
//

@ -44,7 +44,7 @@ const Setting = {
apiBaseURL: host, // 接口请求地址
uploadURL, // 阿里云oss域名
systemPath, // 子系统地址前缀
autoLogoutTime: 3600000, // 长时间未操作,自动退出登录时间
autoLogoutTime: 3600000000, // 长时间未操作,自动退出登录时间
modalDuration: 3, // 接口请求返回错误时,弹窗的持续时间,单位:秒
errorModalType: "Message", // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice
cookiesExpires: 1, // Cookies 默认保存时间,单位:天

@ -5,7 +5,7 @@ export default {
namespaced: true,
state: {
toMatch: '',
eventType: 1 // 赛事类型
eventType: 2 // 赛事类型
},
mutations: {
SET_SOURCE: (state, id) => {

Loading…
Cancel
Save