dev_review
yujialong 3 months ago
parent 645e52a679
commit 6747314cc9
  1. 4
      src/views/course/contentSettings.vue
  2. 23
      src/views/match/manage/theoryReport.vue
  3. 2
      src/views/theoreticalCourse/contentSettings/index.vue
  4. 175
      src/views/theoreticalCourse/preview/index.vue
  5. 2
      src/views/theoryExam/index.vue

@ -634,7 +634,7 @@ export default {
width: "100%", width: "100%",
autoplay: false, autoplay: false,
vid: fileId, vid: fileId,
playauth: res.data.playAuth, playauth: res.playAuth,
encryptType: 1 // encryptType: 1 //
}, player => { }, player => {
this.downloadFile(row.name, player._urls[0].Url) this.downloadFile(row.name, player._urls[0].Url)
@ -649,7 +649,7 @@ export default {
// //
if (row.fileId) { if (row.fileId) {
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => { this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => {
this.playAuth = res.data.playAuth; this.playAuth = res.playAuth;
if (this.player) { if (this.player) {
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth); this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth);
} else { } else {

@ -36,7 +36,7 @@
<div class="text-right"> <div class="text-right">
<el-button type="primary" @click="exportPage">导出报告</el-button> <el-button type="primary" @click="exportPage">导出报告</el-button>
</div> </div>
<h6 class="r-title">标准实验报告</h6> <h6 class="r-title">标准成绩报告</h6>
<div class="info"> <div class="info">
<h6 class="l-title"> <h6 class="l-title">
<img src="@/assets/img/info1.png" alt=""> <img src="@/assets/img/info1.png" alt="">
@ -75,7 +75,7 @@
<li> <li>
<label>用时</label> <label>用时</label>
<el-input v-if="editing" v-model="info.timeSum"></el-input> <el-input v-if="editing" v-model="info.timeSum"></el-input>
<span v-else>{{ info.timeSum }}</span> <span v-else>{{ info.timeSum }}分钟</span>
</li> </li>
<li> <li>
<label>指导老师</label> <label>指导老师</label>
@ -126,7 +126,7 @@
</div> </div>
<el-tag class="m-r-5" :type="ques.difficultTheme">{{ ques.difficult }}</el-tag> <el-tag class="m-r-5" :type="ques.difficultTheme">{{ ques.difficult }}</el-tag>
<div class="stem" :id="'stem' + ques.id" v-html="getQuesStem(ques)"></div> <div class="stem html-parse" :id="'stem' + ques.id" v-html="getQuesStem(ques)"></div>
<p>{{ ques.questionScore }}</p> <p>{{ ques.questionScore }}</p>
</div> </div>
@ -139,7 +139,7 @@
<span v-else class="icon not-ans"></span> <span v-else class="icon not-ans"></span>
<span>{{ numToLetter(j) }}.&nbsp;</span> <span>{{ numToLetter(j) }}.&nbsp;</span>
<div class="text" v-html="opt.optionText"></div> <div class="text html-parse" v-html="opt.optionText"></div>
</div> </div>
</div> </div>
<template v-if="item.questionType === 'essay'"> <template v-if="item.questionType === 'essay'">
@ -149,19 +149,20 @@
</div> </div>
<div v-if="ques.uploadInstructions" class="line m-b-10"> <div v-if="ques.uploadInstructions" class="line m-b-10">
<span>考生上传附件说明</span> <span>考生上传附件说明</span>
<div v-html="ques.uploadInstructions"></div> <div v-html="ques.uploadInstructions" class="html-parse"></div>
</div> </div>
</template> </template>
<div v-if="ques.knowledgePointList && ques.knowledgePointList.length" class="m-b-10"> <div v-if="ques.knowledgePointList && ques.knowledgePointList.length" class="m-b-10">
<span>知识点</span> <span>知识点</span>
<el-tag v-for="(kp, k) in ques.knowledgePointList" :key="k" class="m-r-5">{{ kp.name }}</el-tag> <el-tag v-for="(kp, k) in ques.knowledgePointList" :key="k" class="m-r-5" type="info">{{ kp.name
}}</el-tag>
</div> </div>
<div class="flex m-b-10"> <div class="flex m-b-10">
<span>解析</span> <span>解析</span>
<div <div
v-if="ques.questionAnswerVersionsList.length && ques.questionAnswerVersionsList[0].answerAnalysis" v-if="ques.questionAnswerVersionsList.length && ques.questionAnswerVersionsList[0].answerAnalysis"
v-html="ques.questionAnswerVersionsList[0].answerAnalysis"></div> v-html="ques.questionAnswerVersionsList[0].answerAnalysis" class="html-parse"></div>
<div v-else>暂无解析</div> <div v-else>暂无解析</div>
</div> </div>
@ -314,7 +315,7 @@ export default {
const quesAnswer = [] const quesAnswer = []
opts && opts.map((m, j) => { opts && opts.map((m, j) => {
const selected = userAnswer.includes(m.optionNumber) const selected = userAnswer.includes(m.optionNumber)
m.optCorrect = m.answerIsCorrect ? (selected ? 1 : -1) : (selected ? 0 : -1) // (10-1) m.optCorrect = m.answerIsCorrect ? 1 : (selected ? 0 : -1) // (10-1)
m.answerIsCorrect && quesAnswer.push(type === 'judgement' ? m.optionText : numToLetter(j)) m.answerIsCorrect && quesAnswer.push(type === 'judgement' ? m.optionText : numToLetter(j))
}) })
n.quesAnswer = quesAnswer.join('') n.quesAnswer = quesAnswer.join('')
@ -398,7 +399,7 @@ export default {
// //
scrollToQues (e) { scrollToQues (e) {
const el = document.querySelector('#ques' + e.id) const el = document.querySelector('#ques' + e.id)
el && this.scrollToSmooth(el.offsetTop - document.querySelector('#quesWrap').offsetTop + 200, 200) el && this.scrollToSmooth(el.offsetTop - document.querySelector('#right').offsetTop, 200)
}, },
// //
filterStatus (e) { filterStatus (e) {
@ -612,10 +613,8 @@ samp {
.left { .left {
width: 290px; width: 290px;
max-height: calc(100vh - 267px);
margin-right: 15px; margin-right: 15px;
background-color: #fff; background-color: #fff;
overflow: auto;
.title { .title {
padding: 10px 0; padding: 10px 0;
@ -631,7 +630,9 @@ samp {
} }
.type-wrap { .type-wrap {
max-height: calc(100vh - 369px);
padding: 10px; padding: 10px;
overflow: auto;
.type { .type {
margin-bottom: 20px; margin-bottom: 20px;

@ -705,7 +705,7 @@ export default {
// //
if (row.fileId) { if (row.fileId) {
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => { this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => {
this.playAuth = res.data.playAuth; this.playAuth = res.playAuth;
if (this.player) { if (this.player) {
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth); this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth);
} else { } else {

@ -1,78 +1,46 @@
<template> <template>
<!-- 课程预览 --> <!-- 课程预览 -->
<div class="wrap"> <div class="wrap">
<el-card shadow="hover" <el-card shadow="hover" class="m-b-20">
class="m-b-20">
<div class="flex-between"> <div class="flex-between">
<el-page-header @back="back" <el-page-header @back="back" :content="'课程预览'"></el-page-header>
:content="'课程预览'"></el-page-header>
</div> </div>
</el-card> </el-card>
<div class="flex"> <div class="flex">
<div class="cover" <div class="cover" :class="{ 'is-word': showMask1 }">
:class="{'is-word': showMask1}"> <img v-if="coverUrl" :src="coverUrl" alt="" width="100%" height="100%">
<img v-if="coverUrl"
:src="coverUrl"
alt=""
width="100%"
height="100%">
<template v-else-if="iframeSrc"> <template v-else-if="iframeSrc">
<iframe class="inner fileIframe" <iframe class="inner fileIframe" id="fileIframe" :src="iframeSrc" frameborder="0"></iframe>
id="fileIframe"
:src="iframeSrc"
frameborder="0"></iframe>
<template v-if="showMask"> <template v-if="showMask">
<div class="mask" <div class="mask" style="width: 500px;height: 30px;top: 53px;right: 320px"></div>
style="width: 500px;height: 30px;top: 53px;right: 320px"></div> <div class="mask" style="width: 175px;height: 30px;top: 53px;right: 5px"></div>
<div class="mask"
style="width: 175px;height: 30px;top: 53px;right: 5px"></div>
</template> </template>
<template v-if="showMask1"> <template v-if="showMask1">
<div class="word-mask" <div class="word-mask" style="height: 40px;"></div>
style="height: 40px;"></div> <div class="word-mask2" style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div>
<div class="word-mask2"
style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div>
</template> </template>
<template v-if="showMask2"> <template v-if="showMask2">
<div class="excel-mask1" <div class="excel-mask1" style="height: 48px;"></div>
style="height: 48px;"></div>
</template> </template>
</template> </template>
<div class="pdf inner" <div class="pdf inner" v-else-if="pdfSrc">
v-else-if="pdfSrc">
<p class="arrow"> <p class="arrow">
<span @click="changePdfPage(0)" <span @click="changePdfPage(0)" class="turn el-icon-arrow-left" :class="{ grey: currentPage == 1 }"></span>
class="turn el-icon-arrow-left"
:class="{grey: currentPage==1}"></span>
{{ currentPage }} / {{ pageCount }} {{ currentPage }} / {{ pageCount }}
<span @click="changePdfPage(1)" <span @click="changePdfPage(1)" class="turn el-icon-arrow-right"
class="turn el-icon-arrow-right"
:class="{ grey: currentPage == pageCount }"></span> :class="{ grey: currentPage == pageCount }"></span>
</p> </p>
<pdf class="pdf-wrap" <pdf class="pdf-wrap" :src="pdfSrc" :page="currentPage" @num-pages="pageCount = $event"
:src="pdfSrc" @page-loaded="currentPage = $event" @loaded="loadPdfHandler">
:page="currentPage"
@num-pages="pageCount=$event"
@page-loaded="currentPage=$event"
@loaded="loadPdfHandler">
</pdf> </pdf>
</div> </div>
<div class="inner" <div class="inner" v-else-if="playAuth">
v-else-if="playAuth"> <div class="video_wid" id="player"></div>
<div class="video_wid"
id="player"></div>
</div> </div>
<div class="inner" <div class="inner" v-else-if="videoSrc">
v-else-if="videoSrc"> <video class="video" :key="videoSrc" width="100%" height="100%" autoplay controls>
<video class="video" <source :src="videoSrc" type="video/mp4">
:key="videoSrc"
width="100%"
height="100%"
autoplay
controls>
<source :src="videoSrc"
type="video/mp4">
您的浏览器不支持 video 标签 您的浏览器不支持 video 标签
</video> </video>
</div> </div>
@ -81,49 +49,26 @@
<div class="list"> <div class="list">
<h4 class="title">{{ courseName }}</h4> <h4 class="title">{{ courseName }}</h4>
<div class="desc-wrap"> <div class="desc-wrap">
<div class="desc" <div class="desc" :class="{ active: desShrink }" v-html="description"></div>
:class="{active: desShrink}" <i class="arrow" :class="{ active: desShrink }" v-if="description.length > 40">
v-html="description"></div>
<i class="arrow"
:class="{active: desShrink}"
v-if="description.length > 40">
<span>...</span> <span>...</span>
<img src="@/assets/img/arrow-down.png" <img src="@/assets/img/arrow-down.png" alt="" @click="desShrink = !desShrink">
alt=""
@click="desShrink = !desShrink">
</i> </i>
</div> </div>
<div class="chapters"> <div class="chapters">
<template v-if="videoList.length"> <template v-if="videoList.length">
<div class="chapter" <div class="chapter" v-for="(item, index) in videoList" :key="index">
v-for="(item,index) in videoList"
:key="index">
<div class="chapterName">{{ item.name }}</div> <div class="chapterName">{{ item.name }}</div>
<div class="section" <div class="section" v-if="item.subsectionList.length">
v-if="item.subsectionList.length"> <div v-for="(section, i) in item.subsectionList" :key="i" @click="preview(section, item.name)">
<div v-for="(section,i) in item.subsectionList" <p class="sectionName ellipsis" :class="{ active: curLink === `${item.name}${section.name}` }">
:key="i" <img v-if="section.fileType === 'pptx'" src="@/assets/img/exts/ppt.png" alt="">
@click="preview(section, item.name)"> <img v-else-if="section.fileType === 'mp4'" src="@/assets/img/exts/video.png" alt="">
<p class="sectionName ellipsis"
:class="{active: curLink === `${item.name}${section.name}`}">
<img v-if="section.fileType === 'pptx'"
src="@/assets/img/exts/ppt.png"
alt="">
<img v-else-if="section.fileType === 'mp4'"
src="@/assets/img/exts/video.png"
alt="">
<img v-else-if="section.fileType === 'doc' || section.fileType === 'docx'" <img v-else-if="section.fileType === 'doc' || section.fileType === 'docx'"
src="@/assets/img/exts/word.png" src="@/assets/img/exts/word.png" alt="">
alt=""> <img v-else-if="section.fileType === 'txt'" src="@/assets/img/exts/txt.png" alt="">
<img v-else-if="section.fileType === 'txt'" <img v-else-if="section.fileType === 'pdf'" src="@/assets/img/exts/pdf.png" alt="">
src="@/assets/img/exts/txt.png" <img v-else src="@/assets/img/exts/pic.png" alt="">
alt="">
<img v-else-if="section.fileType === 'pdf'"
src="@/assets/img/exts/pdf.png"
alt="">
<img v-else
src="@/assets/img/exts/pic.png"
alt="">
{{ section.name }} {{ section.name }}
</p> </p>
</div> </div>
@ -222,7 +167,7 @@ export default {
// //
if (row.fileId) { if (row.fileId) {
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => { this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => {
this.playAuth = res.data.playAuth; this.playAuth = res.playAuth;
this.$nextTick(() => { this.$nextTick(() => {
if (this.player) { if (this.player) {
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth); this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth);
@ -322,7 +267,9 @@ export default {
.wrap { .wrap {
padding: 0 200px; padding: 0 200px;
} }
$height: 700px; $height: 700px;
.video_wid, .video_wid,
.cover { .cover {
position: relative; position: relative;
@ -330,9 +277,11 @@ $height: 700px;
height: $height !important; height: $height !important;
border: 0; border: 0;
} }
.page { .page {
/deep/.des { /deep/.des {
overflow: auto; overflow: auto;
div, div,
p, p,
span { span {
@ -340,21 +289,27 @@ $height: 700px;
} }
} }
} }
.l-title { .l-title {
font-size: 17px; font-size: 17px;
} }
.cover { .cover {
background-color: #252528; background-color: #252528;
img { img {
border-radius: 8px; border-radius: 8px;
} }
&.is-word { &.is-word {
overflow: hidden; overflow: hidden;
} }
} }
.fileIframe { .fileIframe {
height: $height !important; height: $height !important;
} }
.video_wid, .video_wid,
.inner { .inner {
width: 100%; width: 100%;
@ -362,42 +317,52 @@ $height: 700px;
border: 0; border: 0;
overflow: auto; overflow: auto;
} }
.cover.is-word { .cover.is-word {
.inner { .inner {
height: calc(100% + 38px) !important; height: calc(100% + 38px) !important;
margin-top: -38px; margin-top: -38px;
} }
} }
.video_wid:focus { .video_wid:focus {
outline: none; outline: none;
} }
.catalog { .catalog {
width: 296px; width: 296px;
padding: 16px; padding: 16px;
margin-left: 12px; margin-left: 12px;
background-color: #252528; background-color: #252528;
} }
.list { .list {
height: calc(700px - 82px); height: calc(700px - 82px);
overflow-y: auto; overflow-y: auto;
.title { .title {
margin-bottom: 11px; margin-bottom: 11px;
color: #fff; color: #fff;
font-size: 16px; font-size: 16px;
} }
.pro-title { .pro-title {
margin-bottom: 5px; margin-bottom: 5px;
color: #fff; color: #fff;
font-size: 12px; font-size: 12px;
} }
/deep/.el-progress-bar { /deep/.el-progress-bar {
width: 92%; width: 92%;
} }
/deep/.el-progress__text { /deep/.el-progress__text {
color: #fff; color: #fff;
} }
.desc-wrap { .desc-wrap {
position: relative; position: relative;
.desc { .desc {
font-size: 12px; font-size: 12px;
color: #fff; color: #fff;
@ -407,11 +372,13 @@ $height: 700px;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
&.active { &.active {
display: block; display: block;
overflow: visible; overflow: visible;
} }
} }
.arrow { .arrow {
position: absolute; position: absolute;
bottom: 2px; bottom: 2px;
@ -420,41 +387,50 @@ $height: 700px;
justify-content: space-between; justify-content: space-between;
width: 46px; width: 46px;
background-color: #fff; background-color: #fff;
span { span {
font-size: 14px; font-size: 14px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
} }
img { img {
width: 16px; width: 16px;
cursor: pointer; cursor: pointer;
} }
&.active { &.active {
span { span {
opacity: 0; opacity: 0;
} }
img { img {
transform: rotate(180deg); transform: rotate(180deg);
} }
} }
} }
} }
.chapters { .chapters {
margin-top: 16px; margin-top: 16px;
max-height: calc(100% - 53px); max-height: calc(100% - 53px);
overflow: auto; overflow: auto;
} }
.chapter { .chapter {
margin-bottom: 20px; margin-bottom: 20px;
} }
.chapterName { .chapterName {
color: #fff; color: #fff;
font-size: 14px; font-size: 14px;
} }
.section { .section {
padding: 5px 15px; padding: 5px 15px;
margin-top: 12px; margin-top: 12px;
background-color: #121214; background-color: #121214;
} }
.sectionName { .sectionName {
position: relative; position: relative;
display: flex; display: flex;
@ -464,36 +440,44 @@ $height: 700px;
font-size: 12px; font-size: 12px;
color: #999; color: #999;
cursor: pointer; cursor: pointer;
img { img {
margin-right: 8px; margin-right: 8px;
} }
.icon { .icon {
position: absolute; position: absolute;
right: 0; right: 0;
font-size: 14px; font-size: 14px;
color: #00c935; color: #00c935;
} }
.circle { .circle {
width: 14px; width: 14px;
height: 14px; height: 14px;
border-radius: 50%; border-radius: 50%;
border: 1px solid #ccc; border: 1px solid #ccc;
} }
&.active { &.active {
color: #fff; color: #fff;
} }
} }
} }
.buy { .buy {
text-align: center; text-align: center;
.tips { .tips {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 14px; font-size: 14px;
} }
img { img {
width: 85%; width: 85%;
} }
} }
.el-image-viewer__wrapper { .el-image-viewer__wrapper {
transform: translateY(-10px); transform: translateY(-10px);
transition: transform 0.5s; transition: transform 0.5s;
@ -502,19 +486,23 @@ $height: 700px;
transform: translateY(0); transform: translateY(0);
} }
} }
.el-image-viewer__close { .el-image-viewer__close {
z-index: 2000; z-index: 2000;
top: 15px; top: 15px;
right: 15px; right: 15px;
&.doc-close { &.doc-close {
i { i {
color: #000 !important; color: #000 !important;
} }
} }
} }
.list::-webkit-scrollbar { .list::-webkit-scrollbar {
width: 4px; width: 4px;
} }
.list::-webkit-scrollbar-thumb { .list::-webkit-scrollbar-thumb {
border-radius: 10px; border-radius: 10px;
background: rgba(0, 0, 0, 0.06); background: rgba(0, 0, 0, 0.06);
@ -525,6 +513,7 @@ $height: 700px;
position: absolute; position: absolute;
background-color: rgb(57, 58, 61); background-color: rgb(57, 58, 61);
} }
.word-mask { .word-mask {
z-index: 9; z-index: 9;
position: absolute; position: absolute;
@ -533,6 +522,7 @@ $height: 700px;
width: 100%; width: 100%;
background-color: rgb(243, 242, 241); background-color: rgb(243, 242, 241);
} }
.word-mask1 { .word-mask1 {
z-index: 9; z-index: 9;
position: absolute; position: absolute;
@ -541,11 +531,13 @@ $height: 700px;
width: 100%; width: 100%;
background-color: #185abd; background-color: #185abd;
} }
.word-mask2 { .word-mask2 {
z-index: 9; z-index: 9;
position: absolute; position: absolute;
background-color: transparent; background-color: transparent;
} }
.excel-mask1 { .excel-mask1 {
z-index: 9; z-index: 9;
position: absolute; position: absolute;
@ -554,14 +546,17 @@ $height: 700px;
width: 60%; width: 60%;
background-color: #107c41; background-color: #107c41;
} }
.pdf { .pdf {
position: relative; position: relative;
.full { .full {
position: absolute; position: absolute;
top: 7px; top: 7px;
right: 10px; right: 10px;
cursor: pointer; cursor: pointer;
} }
.arrow { .arrow {
padding: 10px 0; padding: 10px 0;
display: flex; display: flex;
@ -570,12 +565,14 @@ $height: 700px;
font-size: 16px; font-size: 16px;
color: #fff; color: #fff;
background-color: #333; background-color: #333;
.turn { .turn {
margin: 0 10px; margin: 0 10px;
font-size: 18px; font-size: 18px;
cursor: pointer; cursor: pointer;
} }
} }
.pdf-wrap { .pdf-wrap {
width: 80%; width: 80%;
margin: 0 auto; margin: 0 auto;

@ -38,6 +38,6 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
iframe { iframe {
height: calc(100vh - 173px); height: calc(100vh - 167px);
} }
</style> </style>

Loading…
Cancel
Save