@ -1,73 +1,109 @@
< template >
< div class = "wrap index" >
< div class = "banner" : style = "{backgroundImage: 'url(' + (form.carouselUrl || 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20230515/jpg/1658017103770836992.jpg') + ')'}" > 创业活动详情 < / div >
< div class = "banner"
: style = "{backgroundImage: 'url(' + (form.carouselUrl || 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20230515/jpg/1658017103770836992.jpg') + ')'}" > 创业活动详情 < / div >
< div class = "center-con" >
< div class = "center-wrap" >
< breadcrumb ref = "breadcrumb" : data = "'全部项目/' + form.projectName" > < / breadcrumb >
< 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 v -model = " curType "
@ tab - click = "typeChange" >
< el -tab -pane v -for = " ( item , index ) in typeList "
: key = "index"
: label = "item.name"
: name = "item.id" > < / e l - t a b - p a n e >
< / e l - t a b s >
< div class = "action" >
< p class = "end-text" v-if ="end" >
< p class = "end-text"
v - if = "end" >
距离 { { endList [ status ] } } 还有
< em > { { end } } < / em >
< / p >
< a class = "status" : class = "{wait: status == 0,signing: status == 2,signed: status == 1,finish: status == 3 || status == 4}" :title ="statusList[status]" @click.stop ="signup" > { { statusList [ status ] } } < / a >
< a class = "status"
: class = "{wait: status == 0,signing: status == 2,signed: status == 1,finish: status == 3 || status == 4}"
: title = "statusList[status]"
@ click . stop = "signup" > { { statusList [ status ] } } < / a >
< / div >
< / div >
< div class = "info" id = "part1" >
< div class = "info"
id = "part1" >
< h6 class = "title" > { { form . projectName } } < / h6 >
< div class = "meta" > 最近编辑时间 : { { form . updateTime } } < / div >
< / div >
< div v-show ="curType < 4" >
< div class = "l-title" > < img src = "@/assets/img/label.png" alt = "" > 项目信息 < / div >
< div v-if ="form.projectDescribe" class="texts ql-editor" v-html="form.projectDescribe" > < / div >
< div class = "l-title" > < 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.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 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 } } < / e l - l i n k >
< span v -else
class = "fileName" > { { item . fileName } } < / span >
< el -link type = "primary"
: underline = "false"
@ click = "download(item)" > 下载 < / e l - l i n k >
< / li >
< / ul >
< / template >
<!-- 进展 -- >
< 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')" >
< 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 >
< p class = "name" > { { item . title } } < / p >
< p class = "desc" > { { item . description } } < / p >
< / li >
< img class = "rocket" src = "@/assets/img/rocket.png" alt = "" >
< img class = "rocket"
src = "@/assets/img/rocket.png"
alt = "" >
< / ul >
< template v-else >
< div class = "empty" >
< div >
< img src = "@/assets/img/none.png" alt = "" >
< img src = "@/assets/img/none.png"
alt = "" >
< p > 暂无数据 < / p >
< / div >
< / div >
< / template >
<!-- 公告 -- >
< div class = "l-title" id = "part3" > < img src = "@/assets/img/label.png" alt = "" > 通知公告 < / div >
< ul class = "notice-list" v-if ="notices.length" >
< li v-for ="(item, i) in notices" :key="i" @click="toNotice(item)" >
< div class = "l-title"
id = "part3" > < img src = "@/assets/img/label.png"
alt = "" > 通知公告 < / div >
< ul class = "notice-list"
v - if = "notices.length" >
< li v -for = " ( item , i ) in notices "
: key = "i"
@ click = "toNotice(item)" >
< h6 > { { item . announcementTitle } } < / h6 >
< p class = "meta" > { { item . updateTime } } < / p >
< div class = "des" v-html ="item.announcementText" > < / div >
< div class = "des"
v - html = "item.announcementText" > < / div >
< / li >
< / ul >
< template v-else >
< div class = "empty" >
< div >
< img src = "@/assets/img/none.png" alt = "" >
< img src = "@/assets/img/none.png"
alt = "" >
< p > 暂无通知公告 < / p >
< / div >
< / div >
@ -77,15 +113,24 @@
< / div >
< / div >
< el -dialog title = "报名" :visible.sync ="signupVisible" :close-on-click-modal ="false" width = "300px" >
< el -dialog title = "报名"
: visible . sync = "signupVisible"
: close - on - click - modal = "false"
width = "300px" >
< el -form class = "dia-form" >
< el -form -item >
< el -input placeholder = "请输入4位数大赛邀请码" maxlength = "4" v-model ="invitationCode" > < / el -input >
< el -input placeholder = "请输入4位数大赛邀请码"
maxlength = "4"
v - model = "invitationCode" > < / e l - i n p u t >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< span slot = "footer" class = "dialog-footer" >
< el -button size = "small" type = "primary" @click ="signupSubmit" > 报名 < / el -button >
< el -button size = "small" @ click = "signupVisible = false" > 取消 < / e l - b u t t o n >
< span slot = "footer"
class = "dialog-footer" >
< el -button size = "small"
type = "primary"
@ click = "signupSubmit" > 报名 < / e l - b u t t o n >
< el -button size = "small"
@ click = "signupVisible = false" > 取消 < / e l - b u t t o n >
< / span >
< / e l - d i a l o g >
< / div >
@ -99,7 +144,7 @@ import Setting from "@/setting"
import Const from '@/const/match'
export default {
name : 'matchdetail' ,
data ( ) {
data ( ) {
return {
token : util . local . get ( Setting . tokenKey ) ,
id : + this . $route . query . id ,
@ -151,8 +196,8 @@ export default {
components : {
breadcrumb
} ,
mounted ( ) {
this . $once ( 'hook:beforeDestroy' , function ( ) {
mounted ( ) {
this . $once ( 'hook:beforeDestroy' , function ( ) {
clearInterval ( this . timer )
} )
this . getData ( )
@ -160,7 +205,7 @@ export default {
this . getNotice ( )
} ,
methods : {
getData ( ) { / / 获 取 项 目 信 息
getData ( ) { / / 获 取 项 目 信 息
clearInterval ( this . timer )
this . $post ( ` ${ this . api . findByIdActivity } ?id= ${ this . id } ` ) . then ( ( { data } ) => {
const list = data . activityFileList
@ -175,10 +220,10 @@ export default {
this . form = data
this . $refs . breadcrumb . update ( '全部项目/' + data . projectName )
this . handleStatus ( )
} ) . catch ( err => { } )
} ) . catch ( err => { } )
} ,
/ / 定 时 处 理 时 间 及 状 态
handleStatus ( ) {
handleStatus ( ) {
const { form } = this
let total = ''
let time = ''
@ -218,49 +263,49 @@ export default {
}
} , 1000 )
} ,
getProgress ( ) { / / 获 取 项 目 进 展
getProgress ( ) { / / 获 取 项 目 进 展
this . $get ( this . api . listActivityProgress , {
activityId : this . id
} ) . then ( res => {
this . progress = res . activityProgressList . reverse ( )
} ) . catch ( err => { } ) ;
} ) . catch ( err => { } ) ;
} ,
/ / 公 告 列 表
getNotice ( ) {
getNotice ( ) {
this . $post ( ` ${ this . api . listActivityAnnouncement } ?pageNum=1&pageSize=1000&competitionId= ${ this . id } ` ) . then ( ( { data } ) => {
const records = data . records . filter ( e => e . status ) / / 只 显 示 已 发 布 的 ( s t a t u s 0 草 稿 1 为 已 发 布 )
records . map ( e => {
e . announcementText = e . announcementText . replace ( /<img.*?(?:>|\/>)/gi , '' )
} )
this . notices = records
} ) . catch ( res => { } )
} ) . catch ( res => { } )
} ,
/ / 预 览 附 件
preview ( item ) {
preview ( item ) {
const { filePath } = item
const suffix = filePath . substr ( filePath . lastIndexOf ( '.' ) + 1 )
window . open ( ( util . isDoc ( suffix ) ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '' ) + item . filePath )
} ,
/ / 下 载 附 件
download ( item ) {
download ( item ) {
util . downloadFile ( item . fileName , item . filePath )
} ,
/ / t a b 切 换
typeChange ( ) {
typeChange ( ) {
document . querySelector ( ` #part ${ this . curType } ` ) . scrollIntoView ( )
} ,
/ / 跳 转 公 告 详 情
toNotice ( item ) {
toNotice ( item ) {
this . $router . push ( ` notice?id= ${ item . id } &matchId= ${ this . id } &name= ${ this . form . projectName } &end= ${ this . end } &status= ${ this . status } ` )
} ,
/ / 跳 转 实 验 报 告
toReport ( row ) {
toReport ( row ) {
this . $router . push ( ` /record/show?reportId= ${ row . reportId } &matchId= ${ this . id } &matchName= ${ this . form . name } ` )
} ,
/ / 报 名 提 交
signupSubmit ( ) {
signupSubmit ( ) {
this . $post ( this . api . saveActivityApplicant , {
activityId : this . id ,
registrationInvitationCode : this . invitationCode
@ -268,10 +313,10 @@ export default {
this . signupVisible = false
this . getData ( )
this . $message . success ( '报名成功' )
} ) . catch ( res => { } )
} ) . catch ( res => { } )
} ,
/ / 立 即 报 名
signup ( ) {
signup ( ) {
const { status , id } = this
if ( status == 2 ) { / / 报 名 / / 如 果 需 要 邀 请 码
if ( this . form . isNeedCode ) {
@ -283,22 +328,23 @@ export default {
} ) . then ( res => {
this . getData ( )
this . $message . success ( '报名成功' )
} ) . catch ( res => { } )
} ) . catch ( res => { } )
}
} else if ( status == 1 ) {
/ / 已 报 名 , 点 击 取 消 报 名
this . $confirm ( '是否要取消报名?' , '提示' , {
type : 'success'
type : 'success' ,
closeOnClickModal : false
} ) . then ( ( ) => {
this . $post ( ` ${ this . api . delActivityApplicant } ?id= ${ this . form . cancelId } ` ) . then ( res => {
this . getData ( )
this . $message . success ( '取消报名成功' )
} ) . catch ( res => { } )
} ) . catch ( ( ) => { } )
} ) . catch ( res => { } )
} ) . catch ( ( ) => { } )
}
} ,
/ / 进 入 p y t h o n 系 统
toPython ( ) {
toPython ( ) {
const form = this . curStage
let token = util . local . get ( Setting . tokenKey ) ;
util . cookies . set ( 'assessmentId' , '' , - 1 )
@ -324,7 +370,7 @@ export default {
` ${ location . origin } /pyTrials `
} ,
/ / 进 入 子 系 统
toSub ( ) {
toSub ( ) {
const { form } = this
const { systemId , projectId , cid , stageId } = this . curStage
const competitionId = form . id
@ -346,7 +392,7 @@ export default {
< / script >
< style lang = "scss" scoped >
. banner {
. banner {
width : 100 % ;
height : 350 px ;
padding : 120 px 0 0 24 % ;
@ -360,8 +406,8 @@ export default {
font - size : 18 px ;
}
. main . center - con {
background : url ( . . / . . / . . / assets / img / match - bg1 . png ) ( 0 px 95 px ) / auto auto no - repeat ,
url ( . . / . . / . . / assets / img / match - bg2 . png ) ( 98 % 300 px ) / auto auto no - repeat ;
background : url ( . . / . . / . . / assets / img / match - bg1 . png ) ( 0 px 95 px ) / auto auto no - repeat ,
url ( . . / . . / . . / assets / img / match - bg2 . png ) ( 98 % 300 px ) / auto auto no - repeat ;
}
. main . center - wrap {
margin - top : 30 px ;
@ -383,17 +429,17 @@ export default {
/deep/ . el - tabs _ _item {
box - shadow : none ! important ;
}
. content {
. content {
position : relative ;
padding : 20 px 40 px ;
margin - top : 30 px ;
background - color : # fff ;
. title {
. title {
width : 67 % ;
margin : 0 auto ;
font - size : 28 px ;
text - align : center ;
color : # 0B1 D 30 ;
color : # 0b1 d 30 ;
}
. tool {
z - index : 100 ;
@ -402,7 +448,7 @@ export default {
margin - bottom : 20 px ;
background - color : # fff ;
}
. info . meta {
. info . meta {
padding : 16 px 0 ;
font - size : 12 px ;
color : # 999 ;
@ -419,18 +465,18 @@ export default {
line - height : 34 px ;
font - size : 14 px ;
color : # fff ;
background - color : # 52 C41A ;
background - color : # 52 c41a ;
border - radius : 4 px ;
cursor : pointer ;
@ include ellipsis ( ) ;
& . wait {
background - color : # FAAD 14;
background - color : # faad 14;
}
& . signing {
background - color : $main - color ;
}
& . signed {
background - color : # 52 C41A ;
background - color : # 52 c41a ;
}
& . playing {
background - color : # f96d6d ;
@ -447,30 +493,30 @@ export default {
color : # f00 ;
}
}
. texts {
. texts {
margin : 20 px 0 50 px ;
font - size : 14 px ;
line - height : 1.6 ;
text - indent : 2 em ;
overflow : hidden ;
/deep/img {
/deep/img {
max - width : 100 % ;
}
}
. progress {
. progress {
position : relative ;
width : 95 % ;
padding : 50 px 0 ;
margin : 40 px auto 80 px ;
text - align : left ;
& : before {
& : before {
content : '' ;
position : absolute ;
top : 0 ;
left : 50 % ;
width : 2 px ;
height : 100 % ;
background - color : # E1E6F 2;
background - color : # e1e6f 2;
}
& : after {
content : '' ;
@ -478,27 +524,27 @@ export default {
top : - 10 px ;
left : 430 px ;
border : 8 px solid transparent ;
border - bottom - color : # E1E6F 2;
border - bottom - color : # e1e6f 2;
}
. rocket {
position : absolute ;
bottom : - 50 px ;
left : 425 px ;
}
li {
li {
position : relative ;
width : 400 px ;
margin - bottom : 42 px ;
. dot {
. dot {
position : absolute ;
top : 12 px ;
left : 431 px ;
width : 15 px ;
height : 15 px ;
background - color : # DCDCDC ;
background - color : # dcdcdc ;
border - radius : 50 % ;
}
. name {
. name {
display : inline - block ;
padding : 0 19 px ;
margin - bottom : 16 px ;
@ -507,27 +553,28 @@ export default {
font - size : 16 px ;
color : # fff ;
border - radius : 20 px ;
background - color : # C4C4C 4;
background - color : # c4c4c 4;
}
. desc {
. desc {
position : relative ;
color : # 333 ;
font - size : 14 px ;
}
& . ing , & . done {
& . ing ,
& . done {
. dot {
top : 8 px ;
background - color : # 007 EFF ;
background - color : # 007 eff ;
}
. name {
background - color : # 007 EFF ;
background - color : # 007 eff ;
}
}
& . ing {
. dot {
width : 27 px ;
height : 27 px ;
border : 6 px solid # E2F1FB ;
border : 6 px solid # e2f1fb ;
}
}
& : nth - child ( odd ) {
@ -548,16 +595,17 @@ export default {
border : 18 px solid transparent ;
border - top - width : 6 px ;
border - bottom - width : 6 px ;
border - left - color : # C4C4C 4;
border - left - color : # c4c4c 4;
}
}
. desc {
text - align : right ;
}
& . ing , & . done {
& . ing ,
& . done {
. name {
& : before {
border - left - color : # 007 EFF ;
border - left - color : # 007 eff ;
}
}
}
@ -583,7 +631,7 @@ export default {
border : 18 px solid transparent ;
border - top - width : 6 px ;
border - bottom - width : 6 px ;
border - right - color : # C4C4C 4;
border - right - color : # c4c4c 4;
}
}
. desc {
@ -597,19 +645,20 @@ export default {
left : auto ;
right : - 18 px ;
border : 9 px solid transparent ;
border - left - color : # E6E6E 6;
border - left - color : # e6e6e 6;
}
}
& . ing , & . done {
& . ing ,
& . done {
. name {
& : after {
border - right - color : # 007 EFF ;
border - right - color : # 007 eff ;
}
}
}
}
& : last - child {
& : last - child {
margin - bottom : 0 ;
}
}
@ -644,9 +693,9 @@ export default {
h6 {
font - size : 20 px ;
font - weight : 500 ;
color : # 0B1 D 30 ;
color : # 0b1 d 30 ;
& : hover {
color : # 007 EFF ;
color : # 007 eff ;
}
}
. meta {
@ -659,7 +708,7 @@ export default {
color : # 333 ;
line - height : 24 px ;
display : - webkit - box ;
display : - moz - box ;
display : - moz - box ;
- webkit - box - orient : vertical ;
- moz - box - orient : vertical ;
- webkit - line - clamp : 2 ;
@ -671,7 +720,8 @@ export default {
. table {
width : 100 % ;
border - collapse : collapse ;
th , td {
th ,
td {
padding : 12 px ;
border : 1 px solid # ebeef5 ;
}
@ -688,7 +738,7 @@ export default {
color : # 7 a7a7a ;
cursor : pointer ;
& : hover {
color : # 007 EFF ;
color : # 007 eff ;
}
}
. plus {