@ -1,90 +1,83 @@
< template >
< div style = "padding: 24px" >
< el -card shadow = "hover" class = "m-b-20" >
< div class = "flex-between" >
< el -page -header @back ="goBack" :content ="curriculumName" > < / e l - p a g e - h e a d e r >
< / div >
< / e l - c a r d >
< el -card shadow = "hover" class = "m-b-20" style = "background: none;" >
< div class = "flex" >
< div class = "cover" : class = "{'is-word': showMask1}" >
<!-- 实验台不显示课程封面 -- >
< img v-if ="coverUrl" :src="coverUrl" alt="" width="100%" height="100%" >
< template v -else -if = " iframeSrc " >
< iframe class = "inner fileIframe" id = "fileIframe" :src ="iframeSrc" frameborder = "0" > < / iframe >
< template v-if ="showMask" >
< div class = "mask" style = "width:100%;background: #393A3D;height: 30px;top: 53px;" > < / div >
< div class = "mask" style = "width:100%;background: #393A3D;height: 30px;top: 53px;" > < / div >
< / template >
< template v-if ="showMask1" >
< div class = "word-mask" style = "height: 40px;" > < / div >
< div class = "word-mask2"
style = "top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);" > < / div >
< / template >
< template v-if ="showMask2" >
< div class = "excel-mask1" style = "height: 48px;" > < / div >
< / template >
< div class = "wrap" >
< breadcrumb : data = "'实验台/' + curriculumName" > < / breadcrumb >
< div class = "flex" >
< div class = "cover" : class = "{'is-word': showMask1}" >
<!-- 实验台不显示课程封面 -- >
< img v-if ="coverUrl" :src="coverUrl" alt="" width="100%" height="100%" >
< template v -else -if = " iframeSrc " >
< iframe class = "inner fileIframe" id = "fileIframe" :src ="iframeSrc" frameborder = "0" > < / iframe >
< template v-if ="showMask" >
< div class = "mask" style = "width:100%;background: #393A3D;height: 30px;top: 53px;" > < / div >
< div class = "mask" style = "width:100%;background: #393A3D;height: 30px;top: 53px;" > < / div >
< / template >
< div class = "pdf inner" v -else -if = " pdfSrc " >
< p class = "arrow" >
< span @click ="changePdfPage(0)" class = "turn el-icon-arrow-left"
: class = "{grey: currentPage==1}" > < / span >
{ { currentPage } } / { { pageCount } }
< span @click ="changePdfPage(1)" class = "turn el-icon-arrow-right"
: class = "{grey: currentPage==pageCount}" > < / span >
< / p >
< div style = ' color : # 393A3D ; height : 30px ;
background : # 393 A3D ; ' > < / div >
< pdf
class = "pdf-wrap"
: src = "pdfSrc"
: page = "currentPage"
@ num - pages = "pageCount=$event"
@ page - loaded = "currentPage=$event"
@ loaded = "loadPdfHandler" >
< / pdf >
< / div >
< div class = "inner" v -else -if = " playAuth " >
< div class = "video_wid" id = "player" > < / div >
< / div >
< template v-if ="showMask1" >
< div class = "word-mask" style = "height: 40px;" > < / div >
< div class = "word-mask2"
style = "top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);" > < / div >
< / template >
< template v-if ="showMask2" >
< div class = "excel-mask1" style = "height: 48px;" > < / div >
< / template >
< / template >
< div class = "pdf inner" v -else -if = " pdfSrc " >
< p class = "arrow" >
< span @click ="changePdfPage(0)" class = "turn el-icon-arrow-left"
: class = "{grey: currentPage==1}" > < / span >
{ { currentPage } } / { { pageCount } }
< span @click ="changePdfPage(1)" class = "turn el-icon-arrow-right"
: class = "{grey: currentPage==pageCount}" > < / span >
< / p >
< div style = 'color:#393A3D;height: 30px;background: #393A3D;' > < / div >
< pdf
class = "pdf-wrap"
: src = "pdfSrc"
: page = "currentPage"
@ num - pages = "pageCount=$event"
@ page - loaded = "currentPage=$event"
@ loaded = "loadPdfHandler" >
< / pdf >
< / div >
< div class = "catalog flex-1" >
< div class = "m-b-20" >
< el -button type = "primary" @click ="goSystem" style = "width: 100%; height: 50px; font-size: 18px" > 进 入 实 验 < / e l - b u t t o n >
< / div >
< div class = "list" >
< h4 class = "title" > { { courseName } } < / h4 >
< div class = "chapters" >
< template v-if ="chapterList.length" >
< div class = "chapter" v-for ="(item,index) in chapterList" :key ="index" >
< div class = "chapterName" > { { item . name } } < / div >
< div class = "section" v-if ="item.subsectionList.length" >
< div v-for ="(section,i) in item.subsectionList" :key="i" @click="preview(section, item.name)" >
< p class = "sectionName" : class = "{active: curLink === `${item.name}${section.name}`}" > { { section . name } } < / p >
< / div >
< / div >
< div class = "inner" v -else -if = " playAuth " >
< div class = "video_wid" id = "player" > < / div >
< / div >
< / div >
< div class = "catalog" >
< el -button class = "entry" type = "primary" @click ="goSystem" > 进 入 实 验 < / el -button >
< div class = "list" >
< h4 class = "title" > { { courseName } } < / h4 >
< div class = "chapters" >
< template v-if ="chapterList.length" >
< div class = "chapter" v-for ="(item,index) in chapterList" :key ="index" >
< div class = "chapterName" > { { item . name } } < / div >
< div class = "section" v-if ="item.subsectionList.length" >
< p class = "sectionName" : class = "{active: curLink === `${item.name}${section.name}`}" v-for ="(section,i) in item.subsectionList" :key="i" @click="preview(section, item.name)" >
< img v-if ="section.fileType === 'pptx'" src="@/assets/img/exts/ppt.png" alt="" >
< img v -else src = "@/assets/img/exts/video.png" alt = "" >
{ { section . name } }
< / p >
< / div >
< / template >
< / div >
< / div >
< / template >
< / div >
< / div >
< / div >
< / e l - c a r d >
< / div >
< el -card shadow = "hover" class = "m-b-20 ">
< h4 style = "margin-bottom: 10px" > 课程简介 < / h4 >
< p > { { briefIntroduction } } < / p >
< / e l - c a r d >
< el -card shadow = "hover" class = "m-b-20" >
< h4 style = "marg in-bot tom: 10px " > 课程目标 < / h4 >
< p > { { teachingObjectives } } < / p >
< / e l - c a r d >
<!--
< el -card shadow = "hover" class = "m-b-20 " >
< h4 style = "margin-bottom: 10px" > 课程进度 < / h4 >
< el -progress :text-inside ="true" :stroke-widt h="1 6" :percentage ="70" > < / e l - p r o g r e s s >
< / e l - c a r d >
-- >
< div class = "page ">
< h6 class = "l-title" >
< img src = "@/assets/img/course1.png" alt = "" >
课程简介
< / h6 >
< p class = "intr o" > { { briefIntroduction } } < / p >
< / div >
< div class = "page" >
< h6 class = "l-title" >
< img src = "@/assets/img/course2.png" alt = "" >
课程目标
< / h6 >
< p class = "intro" > { { teachingObjectives } } < / p >
< / div >
< / div >
< / template >
@ -97,9 +90,9 @@ import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css" ;
import "quill/dist/quill.bubble.css" ;
import bus from "@/libs/bus" ;
import breadcrumb from '@/components/breadcrumb'
export default {
components : { pdf } ,
components : { pdf , breadcrumb } ,
data ( ) {
return {
courseId : this . $route . query . courseId ,
@ -159,8 +152,8 @@ export default {
async getChapter ( ) {
let res = await this . $get ( ` ${ this . api . curriculumChapter } / ${ this . courseId } ` ) ;
this . chapterList = res . chapterList ;
console . log ( res . chapterList ) ;
if ( this . chapterList . length && this . chapterList [ 0 ] . subsectionList && this . chapterList [ 0 ] . subsectionList . length ) {
/ / c o n s o l e . l o g ( t h i s . c h a p t e r L i s t [ 0 ] . s u b s e c t i o n L i s t [ 0 ] ) ;
this . preview ( this . chapterList [ 0 ] . subsectionList [ 0 ] , this . chapterList [ 0 ] . name ) ;
}
} ,
@ -328,7 +321,16 @@ $height: 700px;
height : $height ! important ;
border : 0 ;
}
. page {
margin : 12 px 0 ;
. intro {
font - size : 16 px ;
color : # 333 ;
line - height : 24 px ;
}
}
. cover {
flex : 1 ;
img {
border - radius : 8 px ;
}
@ -355,17 +357,23 @@ $height: 700px;
outline : none ;
}
. catalog {
margin - left : 40 px ;
width : 296 px ;
padding : 16 px ;
margin - left : 12 px ;
background - color : # 252528 ;
. entry {
width : 100 % ;
padding : 10 px 15 px ;
margin - bottom : 16 px ;
}
}
. list {
height : calc ( 700 px - 70 px ) ;
height : calc ( 700 px - 82 px ) ;
overflow - y : auto ;
padding : 24 px 16 px ;
background : # fff ;
. title {
margin - bottom : 8 px ;
color : rgba ( 0 , 0 , 0 , 0.85 ) ;
font - size : 20 px ;
margin - bottom : 11 px ;
color : # fff ;
font - size : 16 px ;
}
. desc - wrap {
position : relative ;
@ -413,21 +421,24 @@ $height: 700px;
. chapter {
margin - bottom : 20 px ;
. chapterName {
color : rgba ( 0 , 0 , 0 , 0.85 ) ;
font - size : 16 px ;
color : # fff ;
font - size : 14 px ;
}
. section {
padding : 5 px 15 px ;
margin - top : 8 px ;
background : rgba ( 0 , 0 , 0 , 0.02 ) ;
margin - top : 12 px ;
background - color : # 121214 ;
. sectionName {
margin : 10 px 0 ;
margin : 12 px 0 ;
font - size : 14 px ;
color : rgba ( 0 , 0 , 0 , 0.65 ) ;
color : # 999 ;
cursor : pointer ;
@ include ellipsis ;
img {
margin - right : 8 px ;
}
& . active {
color : # 9278 FF ;
color : # fff ;
}
}
}
@ -529,5 +540,4 @@ $height: 700px;
margin : 0 auto ;
}
}
< / style >