|
|
|
@ -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; |
|
|
|
|
} |
|
|
|
|