|
|
|
@ -1,75 +1,37 @@ |
|
|
|
|
<template> |
|
|
|
|
<div class="activity"> |
|
|
|
|
<div class="wrap index"> |
|
|
|
|
<div class="banner" :style="{backgroundImage: 'url(' + (form.carouselUrl || 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220613/png/1536269450851409920.png') + ')'}"></div> |
|
|
|
|
<div class="center"> |
|
|
|
|
<breadcrumb ref="breadcrumb" :data="'全部赛事/' + form.name" route="matchPreview"></breadcrumb> |
|
|
|
|
<div class="activity-inner"> |
|
|
|
|
<div class="flex-between"> |
|
|
|
|
<div class="center-con"> |
|
|
|
|
<div class="center-wrap"> |
|
|
|
|
<breadcrumb ref="breadcrumb" :data="'全部项目/' + form.projectName"></breadcrumb> |
|
|
|
|
<div class="content"> |
|
|
|
|
<div class="tool flex-between"> |
|
|
|
|
<el-tabs v-model="curType" @tab-click="typeChange"> |
|
|
|
|
<el-tab-pane v-for="(item, index) in typeList" :key="index" :label="item.name" :name="item.id"></el-tab-pane> |
|
|
|
|
</el-tabs> |
|
|
|
|
<div class="status wait">等待报名</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="info"> |
|
|
|
|
<h6 class="title">{{ form.name }}</h6> |
|
|
|
|
<h6 class="title">{{ form.projectName }}</h6> |
|
|
|
|
<div class="meta">最近编辑时间:{{ form.updateTime }}</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<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.competitionAnnexList && form.competitionAnnexList.length"> |
|
|
|
|
<div v-show="curType < 4"> |
|
|
|
|
<div class="l-title" id="part1"><img src="@/assets/img/label.png" alt=""> 项目信息</div> |
|
|
|
|
<div v-if="form.projectDescribe" class="texts ql-editor" v-html="form.projectDescribe"></div> |
|
|
|
|
<template v-if="form.activityFileList"> |
|
|
|
|
<h6 class="p-title">附件下载</h6> |
|
|
|
|
<ul class="files"> |
|
|
|
|
<li v-for="(item, i) in form.competitionAnnexList" :key="i"> |
|
|
|
|
<el-link v-if="item.canPreview" class="m-r-10" type="primary" @click="previewFile(item)">{{ item.fileName }}</el-link> |
|
|
|
|
<span v-else class="file-name">{{ item.fileName }}</span> |
|
|
|
|
<li v-for="(item, i) in form.activityFileList" :key="i"> |
|
|
|
|
<el-link v-if="item.canPreview" class="m-r-10" type="primary" @click="preview(item)">{{ item.fileName }}</el-link> |
|
|
|
|
<span v-else class="fileName">{{ item.fileName }}</span> |
|
|
|
|
<el-link type="primary" :underline="false" @click="download(item)">下载</el-link> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
</template> |
|
|
|
|
<template v-if="!form.description && (!form.competitionAnnexList || !form.competitionAnnexList.length )"> |
|
|
|
|
<div class="empty"> |
|
|
|
|
<div> |
|
|
|
|
<img src="@/assets/img/none.png" alt=""> |
|
|
|
|
<p>暂无数据</p> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template v-if="form.releaseType && form.competitionStage.length"> |
|
|
|
|
<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 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 v-if="!rule.method">课程系统:{{ rule.systemName }}</p> |
|
|
|
|
<p v-if="rule.onlineButton">线上地点:{{ rule.onlineAddress }}</p> |
|
|
|
|
<p v-if="rule.offlineButton">线下地点:{{ rule.offlineAddress }}</p> |
|
|
|
|
<template v-if="rule.method === 2"> |
|
|
|
|
<p>线下地点:{{ rule.offlineAddress }}</p> |
|
|
|
|
<p>比赛内容:{{ rule.contentDescription }}</p> |
|
|
|
|
<p>评分规则:{{ rule.scoreRule }}</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> |
|
|
|
|
<div v-if="form.rule === 1" class="flex"> |
|
|
|
|
<p>晋级规则:</p> |
|
|
|
|
<div> |
|
|
|
|
<p v-if="rule.peopleLimit">本阶段成绩排名前{{ rule.peopleLimit }}队,可晋级下一阶段比赛</p> |
|
|
|
|
<p v-if="rule.percentageLimit">本阶段成绩排名前{{ rule.percentageLimit }}%,可晋级下一阶段比赛</p> |
|
|
|
|
<p v-if="rule.scoreLimit">本阶段成绩{{ rule.scoreLimit }}分,可晋级下一阶段比赛</p> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<!-- 进展 --> |
|
|
|
|
<div class="l-title" id="part2"><img src="@/assets/img/label.png" alt=""> 竞赛进展</div> |
|
|
|
|
<div class="l-title" id="part2"><img src="@/assets/img/label.png" alt=""> 项目进展</div> |
|
|
|
|
<ul class="progress" v-if="progress.length"> |
|
|
|
|
<li v-for="(item,index) in progress" :key="index" :class="item.status == 0 ? 'not' : (item.status == 1 ? 'ing' : 'done')"> |
|
|
|
|
<i class="dot"></i> |
|
|
|
@ -107,35 +69,35 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import util from "@/libs/util"; |
|
|
|
|
import breadcrumb from '@/components/breadcrumb' |
|
|
|
|
import Const from '@/const/activity' |
|
|
|
|
import util from '@/libs/util' |
|
|
|
|
import Setting from "@/setting" |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
rules: Const.rules, |
|
|
|
|
methods: Const.methods, |
|
|
|
|
teamCalculationMethods: Const.teamCalculationMethods, |
|
|
|
|
form: util.local.get('activity'), |
|
|
|
|
curType: '1', |
|
|
|
|
typeList: [ |
|
|
|
|
{ |
|
|
|
|
id: '1', |
|
|
|
|
name: '竞赛信息' |
|
|
|
|
name: '项目信息' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: '2', |
|
|
|
|
name: '竞赛进展' |
|
|
|
|
name: '项目进展' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: '3', |
|
|
|
|
name: '通知公告' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
form: util.local.get('activity'), |
|
|
|
|
progress: [], |
|
|
|
|
timer: null, |
|
|
|
|
notices: [], |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
@ -143,34 +105,22 @@ export default { |
|
|
|
|
breadcrumb |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.handleAnnex() |
|
|
|
|
if (this.form.id) { |
|
|
|
|
this.getProgress() |
|
|
|
|
this.getNotice() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 处理附件 |
|
|
|
|
handleAnnex() { |
|
|
|
|
const list = this.form.competitionAnnexList |
|
|
|
|
if (list) { |
|
|
|
|
list.map(e => { |
|
|
|
|
const { filePath } = e |
|
|
|
|
e.canPreview = util.canPreview(filePath.substr(filePath.lastIndexOf('.') + 1)) // 判断是否能够预览 |
|
|
|
|
}) |
|
|
|
|
this.$forceUpdate() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getProgress() { // 获取竞赛进展 |
|
|
|
|
this.$get(this.api.getCompetitionProgress, { |
|
|
|
|
competitionId: this.form.id |
|
|
|
|
getProgress() { // 获取项目进展 |
|
|
|
|
this.$get(this.api.listActivityProgress, { |
|
|
|
|
activityId: this.form.id |
|
|
|
|
}).then(res => { |
|
|
|
|
this.progress = res.competitionProgressList.reverse() |
|
|
|
|
this.progress = res.activityProgressList.reverse() |
|
|
|
|
}).catch(err => {}); |
|
|
|
|
}, |
|
|
|
|
// 公告列表 |
|
|
|
|
getNotice() { |
|
|
|
|
this.$post(`${this.api.queryAnnouncementByCompetitionId}?pageNum=1&pageSize=1000&competitionId=${this.form.id}`).then(({ data }) => { |
|
|
|
|
this.$post(`${this.api.listActivityAnnouncement}?pageNum=1&pageSize=1000&competitionId=${this.form.id}`).then(({ data }) => { |
|
|
|
|
const records = data.records.filter(e => e.status) // 只显示已发布的(status 0草稿 1为已发布) |
|
|
|
|
records.map(e => { |
|
|
|
|
e.announcementText = e.announcementText.replace(/<img.*?(?:>|\/>)/gi, '') |
|
|
|
@ -179,10 +129,10 @@ export default { |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
|
// 预览附件 |
|
|
|
|
previewFile(item) { |
|
|
|
|
preview(item) { |
|
|
|
|
const { filePath } = item |
|
|
|
|
const suffix = filePath.substr(filePath.lastIndexOf('.') + 1) |
|
|
|
|
window.open((util.isDoc(suffix) || suffix === 'pdf' ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + item.filePath) |
|
|
|
|
window.open((util.isDoc(suffix) ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + item.filePath) |
|
|
|
|
}, |
|
|
|
|
// 下载附件 |
|
|
|
|
download(item) { |
|
|
|
@ -190,56 +140,84 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// tab切换 |
|
|
|
|
typeChange() { |
|
|
|
|
document.querySelector(`#part${this.curType}`).scrollIntoView() |
|
|
|
|
document.querySelector(`#part${type}`).scrollIntoView() |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.activity { |
|
|
|
|
padding-bottom: 20px; |
|
|
|
|
background-color: #F3F6FA; |
|
|
|
|
.wrap { |
|
|
|
|
margin: -24px; |
|
|
|
|
} |
|
|
|
|
.banner{ |
|
|
|
|
width: 100%; |
|
|
|
|
height: 350px; |
|
|
|
|
padding: 120px 0 0 20%; |
|
|
|
|
color: #fff; |
|
|
|
|
background-size: 100% 350px; |
|
|
|
|
background-repeat: no-repeat; |
|
|
|
|
box-sizing: border-box; |
|
|
|
|
} |
|
|
|
|
.center { |
|
|
|
|
.l-title { |
|
|
|
|
font-size: 18px; |
|
|
|
|
} |
|
|
|
|
.main .center-con { |
|
|
|
|
width: 1000px; |
|
|
|
|
margin: 40px auto 0; |
|
|
|
|
background: url(../../../assets/img/match-bg1.png) (0px 95px)/auto auto no-repeat, |
|
|
|
|
url(../../../assets/img/match-bg2.png) (98% 300px)/auto auto no-repeat; |
|
|
|
|
} |
|
|
|
|
.activity-inner { |
|
|
|
|
min-height: calc(100vh - 465px); |
|
|
|
|
padding: 30px 40px 20px; |
|
|
|
|
background-color: #fff; |
|
|
|
|
box-sizing: border-box; |
|
|
|
|
.main .center-wrap { |
|
|
|
|
margin-top: 30px; |
|
|
|
|
} |
|
|
|
|
/deep/.el-tabs { |
|
|
|
|
.el-tabs__item.is-active, .el-tabs__item:hover { |
|
|
|
|
color: #007EFF; |
|
|
|
|
.rule-title { |
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
font-size: 16px; |
|
|
|
|
} |
|
|
|
|
.el-tabs__active-bar { |
|
|
|
|
background-color: #007EFF; |
|
|
|
|
.rule { |
|
|
|
|
padding: 15px; |
|
|
|
|
margin-bottom: 15px; |
|
|
|
|
border: 1px solid #dfdfdf; |
|
|
|
|
p { |
|
|
|
|
font-size: 14px; |
|
|
|
|
line-height: 30px; |
|
|
|
|
color: #6e6e6e; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.p-title { |
|
|
|
|
border-left-color: #007EFF; |
|
|
|
|
/deep/.el-tabs__item { |
|
|
|
|
box-shadow: none !important; |
|
|
|
|
} |
|
|
|
|
.l-title{ |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
margin-bottom: 12px; |
|
|
|
|
font-size: 18px; |
|
|
|
|
color: #333; |
|
|
|
|
img{ |
|
|
|
|
margin-right: 5px; |
|
|
|
|
.content{ |
|
|
|
|
position: relative; |
|
|
|
|
padding: 20px 40px; |
|
|
|
|
margin-top: 30px; |
|
|
|
|
background-color: #fff; |
|
|
|
|
.title{ |
|
|
|
|
width: 67%; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
font-size: 28px; |
|
|
|
|
text-align: center; |
|
|
|
|
color: #0B1D30; |
|
|
|
|
} |
|
|
|
|
.tool { |
|
|
|
|
z-index: 100; |
|
|
|
|
position: sticky; |
|
|
|
|
top: 64px; |
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
background-color: #fff; |
|
|
|
|
} |
|
|
|
|
.info .meta{ |
|
|
|
|
padding: 16px 0; |
|
|
|
|
font-size: 12px; |
|
|
|
|
color: #999; |
|
|
|
|
text-align: center; |
|
|
|
|
} |
|
|
|
|
.action { |
|
|
|
|
display: inline-flex; |
|
|
|
|
align-items: center; |
|
|
|
|
} |
|
|
|
|
.status { |
|
|
|
|
max-width: 120px; |
|
|
|
|
padding: 0 16px; |
|
|
|
|
margin-left: 20px; |
|
|
|
|
line-height: 34px; |
|
|
|
@ -248,34 +226,33 @@ export default { |
|
|
|
|
background-color: #52C41A; |
|
|
|
|
border-radius: 4px; |
|
|
|
|
cursor: pointer; |
|
|
|
|
@include ellipsis(); |
|
|
|
|
&.wait { |
|
|
|
|
background-color: #FAAD14; |
|
|
|
|
} |
|
|
|
|
&.signing { |
|
|
|
|
background-color: #007EFF; |
|
|
|
|
background-color: $main-color; |
|
|
|
|
} |
|
|
|
|
&.signed { |
|
|
|
|
background-color: #52C41A; |
|
|
|
|
} |
|
|
|
|
&.playing { |
|
|
|
|
background-color: #f96d6d; |
|
|
|
|
} |
|
|
|
|
&.finish { |
|
|
|
|
background-color: #ccc; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.title{ |
|
|
|
|
width: 67%; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
font-size: 28px; |
|
|
|
|
text-align: center; |
|
|
|
|
color: #0B1D30; |
|
|
|
|
} |
|
|
|
|
.info .meta{ |
|
|
|
|
padding: 16px 0; |
|
|
|
|
.end-text { |
|
|
|
|
font-size: 12px; |
|
|
|
|
color: #999; |
|
|
|
|
text-align: center; |
|
|
|
|
color: #666; |
|
|
|
|
em { |
|
|
|
|
font-style: normal; |
|
|
|
|
color: #f00; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.texts{ |
|
|
|
|
margin-bottom: 30px; |
|
|
|
|
margin: 20px 0 50px; |
|
|
|
|
font-size: 14px; |
|
|
|
|
line-height: 1.6; |
|
|
|
|
text-indent: 2em; |
|
|
|
@ -284,25 +261,6 @@ export default { |
|
|
|
|
max-width: 100%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.files { |
|
|
|
|
margin-bottom: 30px; |
|
|
|
|
li { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
margin: 10px 0; |
|
|
|
|
} |
|
|
|
|
.file-name { |
|
|
|
|
margin-right: 10px; |
|
|
|
|
font-size: 12px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.el-link.el-link--primary { |
|
|
|
|
color: #007EFF !important; |
|
|
|
|
&:after { |
|
|
|
|
border-color: #007EFF; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.progress{ |
|
|
|
|
position: relative; |
|
|
|
|
width: 95%; |
|
|
|
@ -381,7 +339,7 @@ export default { |
|
|
|
|
&.ing { |
|
|
|
|
.dot { |
|
|
|
|
left: auto; |
|
|
|
|
right: -58px; |
|
|
|
|
right: -51px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.name { |
|
|
|
@ -460,6 +418,19 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.files { |
|
|
|
|
margin-bottom: 30px; |
|
|
|
|
li { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
margin: 10px 0; |
|
|
|
|
} |
|
|
|
|
.fileName { |
|
|
|
|
margin-right: 10px; |
|
|
|
|
font-size: 12px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.notice-list { |
|
|
|
|
text-align: left; |
|
|
|
|
li { |
|
|
|
@ -501,33 +472,56 @@ export default { |
|
|
|
|
text-overflow: ellipsis; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.empty{ |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
align-items: center; |
|
|
|
|
padding: 50px 0; |
|
|
|
|
.table { |
|
|
|
|
width: 100%; |
|
|
|
|
border-collapse: collapse; |
|
|
|
|
th, td { |
|
|
|
|
padding: 12px; |
|
|
|
|
border: 1px solid #ebeef5; |
|
|
|
|
} |
|
|
|
|
&.tc { |
|
|
|
|
text-align: center; |
|
|
|
|
img{ |
|
|
|
|
width: 471px; |
|
|
|
|
} |
|
|
|
|
p{ |
|
|
|
|
margin-top: 40px; |
|
|
|
|
font-size: 18px; |
|
|
|
|
color: rgba(0, 0, 0, 0.25); |
|
|
|
|
th { |
|
|
|
|
text-align: center; |
|
|
|
|
background-color: #f8faff; |
|
|
|
|
} |
|
|
|
|
.icon { |
|
|
|
|
margin-right: 10px; |
|
|
|
|
font-size: 16px; |
|
|
|
|
color: #7a7a7a; |
|
|
|
|
cursor: pointer; |
|
|
|
|
&:hover { |
|
|
|
|
color: #007EFF; |
|
|
|
|
} |
|
|
|
|
.rule-title { |
|
|
|
|
} |
|
|
|
|
.plus { |
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
font-size: 16px; |
|
|
|
|
text-align: right; |
|
|
|
|
} |
|
|
|
|
.rule { |
|
|
|
|
padding: 15px; |
|
|
|
|
.line { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
.el-input { |
|
|
|
|
margin-right: 15px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.flex-center { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
align-items: center; |
|
|
|
|
margin-bottom: 15px; |
|
|
|
|
border: 1px solid #dfdfdf; |
|
|
|
|
p { |
|
|
|
|
font-size: 14px; |
|
|
|
|
line-height: 30px; |
|
|
|
|
color: #6e6e6e; |
|
|
|
|
} |
|
|
|
|
/deep/.dia-form { |
|
|
|
|
.w-100 { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
.tips { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
align-items: center; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |