yujialong 2 years ago
parent 588df7ce32
commit 058b1c3fc4
  1. 1
      src/api/index.js
  2. BIN
      src/assets/img/entry.png
  3. 81
      src/components/breadcrumb/index.vue
  4. 2
      src/layouts/header/index.vue
  5. 11
      src/layouts/navbar/index.vue
  6. 16
      src/pages/ass/list/index.vue
  7. 730
      src/pages/course/details/index.vue
  8. 7
      src/pages/match/details/index.vue
  9. 8
      src/pages/match/list/index.vue
  10. 9
      src/pages/record/list/ass.vue
  11. 54
      src/pages/record/list/index.vue
  12. 4
      src/pages/record/list/practice.vue
  13. 66
      src/pages/record/show/index.vue
  14. 3
      src/pages/screen/index.vue
  15. 92
      src/pages/station/preview/index.vue
  16. 2
      src/setting.js
  17. 12
      src/styles/page/station.scss

@ -181,6 +181,7 @@ export default {
fileDeletion: `${uploadURL}oss/manage/fileDeletion`, // 删除OSS文件 fileDeletion: `${uploadURL}oss/manage/fileDeletion`, // 删除OSS文件
fileupload: `${uploadURL}oss/manage/fileupload`, // 文件上传 fileupload: `${uploadURL}oss/manage/fileupload`, // 文件上传
getPlayAuth: `${uploadURL}oss/manage/getPlayAuth`, // 获取播放凭证 getPlayAuth: `${uploadURL}oss/manage/getPlayAuth`, // 获取播放凭证
getPlayAuthNakadai: `nakadai/nakadai/oss/getPlayAuth`, // 获取播放凭证
queryProvince: `nakadai/nakadai/province/queryProvince`, //查询省份 queryProvince: `nakadai/nakadai/province/queryProvince`, //查询省份
queryCity: `nakadai/nakadai/city/queryCity`, //查询城市 queryCity: `nakadai/nakadai/city/queryCity`, //查询城市

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 15 KiB

@ -3,15 +3,13 @@
<div class="breadcrumb"> <div class="breadcrumb">
<el-breadcrumb separator=">"> <el-breadcrumb separator=">">
<template v-for="(item, index) in pages"> <template v-for="(item, index) in pages">
<el-breadcrumb-item <el-breadcrumb-item v-if="index != pages.length - 1"
v-if="index != pages.length - 1" :key="index"
:key="index" :to="{ path: route, query }">
:to="{ path: route, query }">
{{item}} {{item}}
</el-breadcrumb-item> </el-breadcrumb-item>
<el-breadcrumb-item <el-breadcrumb-item v-else
v-else :key="index">
:key="index">
{{item}} {{item}}
</el-breadcrumb-item> </el-breadcrumb-item>
</template> </template>
@ -21,44 +19,53 @@
<script> <script>
export default { export default {
props: { props: {
data: { data: {
type: String, type: String,
required: true required: true
},
route: {
type: String,
default: 'list'
},
query: {
type: Object
}
}, },
data() { route: {
return { type: String,
pages: this.data.split('/') default: 'list'
};
}, },
methods: { query: {
update(data){ type: Object
this.pages = data.split('/')
}
} }
},
data () {
return {
pages: this.data.split('/')
};
},
methods: {
update (data) {
this.pages = data.split('/')
}
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.breadcrumb { .breadcrumb {
margin: 4px 0 16px; display: flex;
/deep/.el-breadcrumb__item { align-items: center;
.is-link, .el-breadcrumb__separator { /deep/.el-breadcrumb {
font-weight: 400; margin: 4px 0 16px;
color: $main-color;
} }
&:last-child { /deep/.el-breadcrumb__item {
.is-link { .el-breadcrumb__inner,
color: #0B1D30; .el-breadcrumb__separator {
} font-size: 16px;
font-weight: 400;
}
.is-link,
.el-breadcrumb__separator {
color: $main-color;
}
&:last-child {
.is-link {
color: #0b1d30;
}
}
} }
}
} }
</style> </style>

@ -151,7 +151,7 @@ export default {
}, },
initSocket ({ id, account }) { initSocket ({ id, account }) {
// socket // socket
this.socket = new WebSocket(`wss://${Setting.isDev ? '121.37.12.51' : location.host}/nakadai/websocket/${id}/${account}`) this.socket = new WebSocket(`${Setting.isTest ? 'ws' : 'wss'}://${Setting.isDev ? '121.37.12.51' : location.host}/nakadai/websocket/${id}/${account}`)
// this.socket = new WebSocket(`ws://121.37.12.51:9100/nakadai/websocket/${id}/${account}`) // this.socket = new WebSocket(`ws://121.37.12.51:9100/nakadai/websocket/${id}/${account}`)
// socket // socket
this.socket.onopen = this.open; this.socket.onopen = this.open;

@ -268,12 +268,19 @@ export default {
} }
} }
} }
@media (max-width: 1380px) { @media (max-width: 1440px) {
.nav { .nav {
left: 58%; left: 53%;
& > li { & > li {
padding: 0 10px; padding: 0 10px;
} }
} }
} }
@media (max-width: 1360px) {
.nav {
& > li {
padding: 0 4px;
}
}
}
</style> </style>

@ -490,30 +490,32 @@ export default {
this.invitationCode = ""; this.invitationCode = "";
}, },
goSubSystem () { goSubSystem () {
let token = util.local.get(Setting.tokenKey) const token = util.local.get(Setting.tokenKey)
const classId = this.classId const classId = this.classId
const classItem = this.classList.find(e => e.id == classId) const classItem = this.classList.find(e => e.id == classId)
let curriculumId = this.curRow.curriculumId const row = this.curRow
const { curriculumId, mallId } = row
util.cookies.set("token", token) util.cookies.set("token", token)
util.cookies.set("assessmentId", this.assessmentId) util.cookies.set("assessmentId", this.assessmentId)
util.cookies.set("classId", classId) util.cookies.set("classId", classId)
util.cookies.set("className", classItem ? encodeURI(classItem.className) : '') util.cookies.set("className", classItem ? encodeURI(classItem.className) : '')
util.cookies.set("projectId", this.projectId) util.cookies.set("projectId", this.projectId)
util.cookies.set("courseId", this.cid) util.cookies.set("courseId", this.cid)
util.cookies.set("curriculumName", escape(this.curRow.sysName)); util.cookies.set("curriculumName", escape(row.sysName));
util.cookies.set("startTime", this.curRow.startTime) util.cookies.set("startTime", row.startTime)
util.cookies.set("stopTime", this.curRow.stopTime) util.cookies.set("stopTime", row.stopTime)
util.cookies.set("systemId", this.systemId); util.cookies.set("systemId", this.systemId);
util.cookies.set('mallId', mallId)
util.cookies.set('fromManager', '', -1) util.cookies.set('fromManager', '', -1)
util.cookies.set('competitionId', '', -1) util.cookies.set('competitionId', '', -1)
util.cookies.set('isSubmit', '', -1) util.cookies.set('isSubmit', '', -1)
util.cookies.set('language', '', -1) util.cookies.set('language', '', -1)
let href = '' let href = ''
if (curriculumId == 11) { if (curriculumId == 11) {
href = `${Setting.systemPath}/#/index/list?token=${token}&cid=${this.cid}&systemId=${this.systemId}&projectId=${this.projectId}&assessmentId=${this.assessmentId}&classId=${this.classId}&stopTime=${this.stopTime}`; href = `${Setting.systemPath}/#/index/list?token=${token}&cid=${this.cid}&systemId=${this.systemId}&projectId=${this.projectId}&mallId=${mallId}&assessmentId=${this.assessmentId}&classId=${classId}&stopTime=${this.stopTime}`;
} else if (curriculumId == 12) { } else if (curriculumId == 12) {
// //
window.open(`http://120.78.139.126:8879?systemId=${this.systemId}&courseId=${this.cid}&projectId=${this.projectId}&token=${token}&userId=${this.userId}&assessmentId=${this.assessmentId}&classId=${this.curRow.classId}`); window.open(`http://120.78.139.126:8879?systemId=${this.systemId}&courseId=${this.cid}&projectId=${this.projectId}&token=${token}&userId=${this.userId}&assessmentId=${this.assessmentId}&classId=${classId}&mallId=${mallId}`);
} else { } else {
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
href = 'http://192.168.31.125:8085/#/' href = 'http://192.168.31.125:8085/#/'

@ -1,74 +1,117 @@
<template> <template>
<div class="wrap pb"> <div class="wrap pb">
<breadcrumb ref="breadcrumb" :data="'课程学习/' + courseName" :query="breadcrumbQuery"></breadcrumb> <breadcrumb ref="breadcrumb"
<div class="flex"> :data="'课程学习/' + courseName"
<div class="cover" :class="{'is-word': showMask1}"> :query="breadcrumbQuery"></breadcrumb>
<img v-if="coverUrl" :src="coverUrl" alt="" width="100%" height="100%"> <div class="flex">
<template v-else-if="iframeSrc"> <div class="cover"
<iframe class="inner fileIframe" id="fileIframe" :src="iframeSrc" frameborder="0"></iframe> :class="{'is-word': showMask1}">
<template v-if="showMask"> <img v-if="coverUrl"
<div class="mask" style="width: 500px;height: 30px;top: 53px;right: 320px"></div> :src="coverUrl"
<div class="mask" style="width: 175px;height: 30px;top: 53px;right: 5px"></div> alt=""
</template> width="100%"
<template v-if="showMask1"> height="100%">
<div class="word-mask" style="height: 40px;"></div> <template v-else-if="iframeSrc">
<div class="word-mask2" style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div> <iframe class="inner fileIframe"
</template> id="fileIframe"
<template v-if="showMask2"> :src="iframeSrc"
<div class="excel-mask1" style="height: 48px;"></div> frameborder="0"></iframe>
</template> <template v-if="showMask">
</template> <div class="mask"
<div class="pdf inner" v-else-if="pdfSrc"> style="width: 500px;height: 30px;top: 53px;right: 320px"></div>
<p class="arrow"> <div class="mask"
<span @click="changePdfPage(0)" class="turn el-icon-arrow-left" :class="{grey: currentPage==1}"></span> style="width: 175px;height: 30px;top: 53px;right: 5px"></div>
{{currentPage}} / {{pageCount}} </template>
<span @click="changePdfPage(1)" class="turn el-icon-arrow-right" :class="{grey: currentPage==pageCount}"></span> <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>
<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>
</div>
<div class="catalog">
<div class="list">
<h4 class="title">{{courseName}}</h4>
<div class="desc-wrap">
<div class="desc"
:class="{active: desShrink}"
v-html="description"></div>
<i class="arrow"
:class="{active: desShrink}"
v-if="description && description.length > 40">
</i>
</div>
<div class="chapters">
<template v-if="chapterList && 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}`}">
<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'"
src="@/assets/img/exts/word.png"
alt="">
<img v-else-if="section.fileType === 'txt'"
src="@/assets/img/exts/txt.png"
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 }}
</p> </p>
<pdf </div>
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>
</div>
<div class="catalog">
<div class="list">
<h4 class="title">{{courseName}}</h4>
<div class="desc-wrap">
<div class="desc" :class="{active: desShrink}" v-html="description"></div>
<i class="arrow" :class="{active: desShrink}" v-if="description && description.length > 40">
</i>
</div>
<div class="chapters">
<template v-if="chapterList && 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}`}">
<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'" src="@/assets/img/exts/word.png" alt="">
<img v-else-if="section.fileType === 'txt'" src="@/assets/img/exts/txt.png" 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 }}
</p>
</div>
</div>
</div>
</template>
</div>
</div> </div>
</div> </div>
</template>
</div>
</div> </div>
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
@ -81,205 +124,208 @@ import breadcrumb from '@/components/breadcrumb'
import Setting from "@/setting" import Setting from "@/setting"
import util from "@/libs/util" import util from "@/libs/util"
export default { export default {
data() { data () {
return { return {
breadcrumbQuery: { breadcrumbQuery: {
source: this.$route.query.source source: this.$route.query.source
}, },
startTime: Date.now(), // startTime: Date.now(), //
id: this.$route.query.id, id: this.$route.query.id,
video: 'http://liuwanr.oss-cn-shenzhen.aliyuncs.com/mp4/20200519/1589871025648.mp4', video: 'http://liuwanr.oss-cn-shenzhen.aliyuncs.com/mp4/20200519/1589871025648.mp4',
chapterList: [], chapterList: [],
courseName: '', courseName: '',
description: '', description: '',
coverUrl: '', coverUrl: '',
playAuth: '', playAuth: '',
player: null, player: null,
previewImg: '', previewImg: '',
iframeSrc: '', iframeSrc: '',
isWord: false, isWord: false,
isPPT: false, isPPT: false,
isExcel: false, isExcel: false,
showMask: false, showMask: false,
showMask1: false, showMask1: false,
showMask2: false, showMask2: false,
closePosi: { closePosi: {
top: '80px' top: '80px'
}, },
pdfVisible: false, pdfVisible: false,
pdfSrc: '', pdfSrc: '',
currentPage: 0, // pdf currentPage: 0, // pdf
pageCount: 0, // pdf pageCount: 0, // pdf
fileType: 'pdf', // fileType: 'pdf', //
desShrink: false, desShrink: false,
curLink: "", // curLink: "", //
}; };
},
computed: {
...mapState({
courseId: state => state.courseId,
classId: state => state.classId,
}),
},
components: { pdf, breadcrumb },
mounted () {
this.insertScript()
this.getData()
},
destroyed () {
//
util.local.get(Setting.tokenKey) && this.$post(this.api.playRecordSave, {
courseId: this.id,
courseType: 1,
playTime: Math.ceil((Date.now() - this.startTime) / 1000 / 60)
}).then(({ data }) => { }).catch(res => { })
},
methods: {
...mapMutations('project', [
'SET_COURSE'
]),
getData () {
this.$post(`${this.api.findByIdCourse}?id=${this.id}`).then(({ data }) => {
this.courseName = data.courseName
this.description = data.courseIntroduction
this.coverUrl = data.coverUrl || 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220224/png/1496735335294984192.png'
this.getChapter()
this.$refs.breadcrumb.update('课程学习/' + (this.$route.query.source == 1 ? '本校课程' : '共享课程') + '/' + this.courseName)
}).catch(res => { })
}, },
computed: { async getChapter () {
...mapState({ let res = await this.$get(`${this.api.queryChaptersAndSubsections}?courseId=${this.id}`)
courseId: state => state.courseId, this.chapterList = res.chapterList
classId: state => state.classId, if (this.chapterList.length && this.chapterList[0].subsectionList && this.chapterList[0].subsectionList.length) {
}), this.preview(this.chapterList[0].subsectionList[0], this.chapterList[0].name, 0);
}
}, },
components: { pdf, breadcrumb }, insertScript () {
mounted() { const linkTag = document.createElement('link');
this.insertScript() linkTag.rel = 'stylesheet';
this.getData() linkTag.href = 'https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css';
document.body.appendChild(linkTag);
const scriptTag = document.createElement('script');
scriptTag.type = 'text/javascript';
scriptTag.src = 'https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js';
document.body.appendChild(scriptTag);
}, },
destroyed() { transferType (ext) {
// const suf = ext.toLowerCase()
util.local.get(Setting.tokenKey) && this.$post(this.api.playRecordSave, { if ('jpg,jpeg,png,gif,svg,psd'.includes(suf)) return '图片'
courseId: this.id, if ('mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv'.includes(suf)) return '视频'
courseType: 1, return suf
playTime: Math.ceil((Date.now() - this.startTime) / 1000 / 60)
}).then(({ data }) => {}).catch(res => {})
}, },
methods: { preview (row, chapterName, showConfirm = 1) {
...mapMutations('project', [ //
'SET_COURSE' if (!util.local.get(Setting.tokenKey) && !util.local.get('oc_server_token') && showConfirm) {
]), this.$confirm('请先登录,是否直接前往登录?', "提示", {
getData(){ type: 'success'
this.$post(`${this.api.findByIdCourse}?id=${this.id}`).then(({ data }) => { }).then(() => {
this.courseName = data.courseName this.SET_COURSE(this.id)
this.description = data.courseIntroduction this.$router.push('/login')
this.coverUrl = data.coverUrl || 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220224/png/1496735335294984192.png' }).catch(() => { })
this.getChapter() return false
this.$refs.breadcrumb.update('课程学习/' + (this.$route.query.source == 1 ? '本校课程' : '共享课程') + '/' + this.courseName) }
}).catch(res => {}) this.curLink = `${chapterName}${row.name}`;
}, this.playauth = ''
async getChapter(){ this.coverUrl = ''
let res = await this.$get(`${this.api.queryChaptersAndSubsections}?courseId=${this.id}`) this.pdfSrc = ''
this.chapterList = res.chapterList this.iframeSrc = ''
if (this.chapterList.length && this.chapterList[0].subsectionList && this.chapterList[0].subsectionList.length) { this.isPPT = false
this.preview(this.chapterList[0].subsectionList[0], this.chapterList[0].name, 0); this.isWord = false
} this.isExcel = false
}, if (this.transferType(row.fileType) == '视频') {
insertScript(){ this.$get(`${this.api.getPlayAuthNakadai}/${row.fileId}`).then(res => {
const linkTag = document.createElement('link'); this.playAuth = res.playAuth
linkTag.rel = 'stylesheet'; //
linkTag.href = 'https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css'; if (this.player) {
document.body.appendChild(linkTag); this.player.dispose()
const scriptTag = document.createElement('script');
scriptTag.type = 'text/javascript';
scriptTag.src = 'https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js';
document.body.appendChild(scriptTag);
},
transferType(ext){
const suf = ext.toLowerCase()
if('jpg,jpeg,png,gif,svg,psd'.includes(suf)) return '图片'
if('mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv'.includes(suf)) return '视频'
return suf
},
preview(row, chapterName, showConfirm = 1){
//
if (!util.local.get(Setting.tokenKey) && !util.local.get('oc_server_token') && showConfirm) {
this.$confirm('请先登录,是否直接前往登录?', "提示", {
type: 'success'
}).then(() => {
this.SET_COURSE(this.id)
this.$router.push('/login')
}).catch(() => {})
return false
}
this.curLink = `${chapterName}${row.name}`;
this.player = null this.player = null
this.playauth = '' }
this.coverUrl = '' this.$nextTick(() => {
this.pdfSrc = '' if (this.player) {
this.iframeSrc = '' this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth);
} else {
this.player = new Aliplayer({
id: "player",
width: "100%",
autoplay: false,
vid: row.fileId,
playauth: this.playAuth,
encryptType: 1 //
});
}
});
}).catch(res => { })
} else if (this.transferType(row.fileType) == '图片') {
this.coverUrl = row.fileUrl
} else if (row.fileType == 'pdf') {
this.pdfSrc = row.fileUrl
this.pdfVisible = true
} else {
this.$get(`${this.api.getSubsection}?subsectionId=${row.id}`).then(res => {
if (row.fileType == 'pptx') {
this.isPPT = true
this.isWord = false
this.isExcel = false
} else if (row.fileType == 'doc' || row.fileType == 'docx') {
this.isPPT = false
this.isWord = true
this.isExcel = false
} else if (row.fileType == 'xls' || row.fileType == 'xlsx') {
this.isExcel = true
this.isPPT = false
this.isWord = false
} else {
this.isPPT = false this.isPPT = false
this.isWord = false this.isWord = false
this.isExcel = false this.isExcel = false
if(this.transferType(row.fileType) == '视频'){ }
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => { if (this.isPPT) {
this.playAuth = res.data.playAuth this.showMask = true
this.$nextTick(() => { } else {
if(this.player){
this.player.replayByVidAndPlayAuth(row.fileId,this.playAuth)
}else{
this.player = new Aliplayer({
id: 'player',
width: '100%',
autoplay: false,
vid : row.fileId,
playauth : this.playAuth,
encryptType:1, //
})
}
})
}).catch(res => {})
}else if(this.transferType(row.fileType) == '图片'){
this.coverUrl = row.fileUrl
}else if(row.fileType == 'pdf'){
this.pdfSrc = row.fileUrl
this.pdfVisible = true
}else{
this.$get(`${this.api.getSubsection}?subsectionId=${row.id}`).then(res => {
if(row.fileType == 'pptx'){
this.isPPT = true
this.isWord = false
this.isExcel = false
}else if(row.fileType == 'doc' || row.fileType == 'docx'){
this.isPPT = false
this.isWord = true
this.isExcel = false
}else if(row.fileType == 'xls' || row.fileType == 'xlsx'){
this.isExcel = true
this.isPPT = false
this.isWord = false
}else{
this.isPPT = false
this.isWord = false
this.isExcel = false
}
if(this.isPPT){
this.showMask = true
}else{
this.showMask = false
}
if(this.isWord){
this.showMask1 = true
}else{
this.showMask1 = false
}
if(this.isExcel){
this.showMask2 = true
}else{
this.showMask2 = false
}
this.iframeSrc = res.previewUrl
})
.catch(err => {
});
}
},
closePlayer(){
this.playAuth = ''
this.player.pause()
},
closeIframe(){
this.iframeSrc = ''
this.showMask = false this.showMask = false
}
if (this.isWord) {
this.showMask1 = true
} else {
this.showMask1 = false this.showMask1 = false
}, }
closePdf(){ if (this.isExcel) {
this.pdfSrc = '' this.showMask2 = true
this.currentPage = 1 } else {
}, this.showMask2 = false
changePdfPage (val) { }
if (val === 0 && this.currentPage > 1) { this.iframeSrc = res.previewUrl
this.currentPage-- })
} .catch(err => {
if (val === 1 && this.currentPage < this.pageCount) { });
this.currentPage++ }
} },
}, closePlayer () {
loadPdfHandler (e) { this.playAuth = ''
this.currentPage = 1 this.player.pause()
} },
closeIframe () {
this.iframeSrc = ''
this.showMask = false
this.showMask1 = false
},
closePdf () {
this.pdfSrc = ''
this.currentPage = 1
},
changePdfPage (val) {
if (val === 0 && this.currentPage > 1) {
this.currentPage--
}
if (val === 1 && this.currentPage < this.pageCount) {
this.currentPage++
}
},
loadPdfHandler (e) {
this.currentPage = 1
} }
}
}; };
</script> </script>
<style> <style>
@ -289,7 +335,8 @@ export default {
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
$height: 700px; $height: 700px;
.video_wid,.cover{ .video_wid,
.cover {
position: relative; position: relative;
width: 76%; width: 76%;
height: $height !important; height: $height !important;
@ -303,35 +350,36 @@ $height: 700px;
line-height: 24px; line-height: 24px;
} }
} }
.cover{ .cover {
flex: 1; flex: 1;
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,.inner{ .video_wid,
.inner {
width: 100%; width: 100%;
height: 100% !important; height: 100% !important;
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;
@ -344,31 +392,31 @@ $height: 700px;
background: url(../../../assets/img/entry.png) 0 0/100% 100% no-repeat; background: url(../../../assets/img/entry.png) 0 0/100% 100% no-repeat;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
opacity: .9; opacity: 0.9;
} }
} }
} }
.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;
} }
.desc-wrap{ .desc-wrap {
position: relative; position: relative;
.desc{ .desc {
font-size: 12px; font-size: 12px;
color: #fff; color: #fff;
line-height: 22px; line-height: 22px;
@include mul-ellipsis(4); @include mul-ellipsis(4);
&.active{ &.active {
display: block; display: block;
overflow: visible; overflow: visible;
} }
} }
.arrow{ .arrow {
position: absolute; position: absolute;
bottom: 2px; bottom: 2px;
right: 0; right: 0;
@ -376,40 +424,40 @@ $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 {
margin: 12px 0; margin: 12px 0;
font-size: 12px; font-size: 12px;
color: #999; color: #999;
@ -418,27 +466,27 @@ $height: 700px;
img { img {
margin-right: 8px; margin-right: 8px;
} }
&.active{ &.active {
color: #fff; color: #fff;
} }
} }
} }
} }
} }
.el-image-viewer__wrapper{ .el-image-viewer__wrapper {
transform: translateY(-10px); transform: translateY(-10px);
transition: transform .5s; transition: transform 0.5s;
&.active{ &.active {
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;
} }
} }
@ -451,20 +499,20 @@ $height: 700px;
background: rgba(0, 0, 0, 0.06); background: rgba(0, 0, 0, 0.06);
} }
.mask{ .mask {
z-index: 9; z-index: 9;
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;
top: 0; top: 0;
right: 0; right: 0;
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;
top: 0; top: 0;
@ -472,12 +520,12 @@ $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;
top: 0; top: 0;
@ -485,24 +533,24 @@ $height: 700px;
width: 60%; width: 60%;
background-color: #107c41; background-color: #107c41;
} }
/deep/.pdf-dia{ /deep/.pdf-dia {
border-radius: 0 !important; border-radius: 0 !important;
.el-dialog__header{ .el-dialog__header {
display: none; display: none;
} }
.el-dialog__body{ .el-dialog__body {
padding: 0; padding: 0;
} }
.el-dialog__headerbtn{ .el-dialog__headerbtn {
top: 10px; top: 10px;
.el-dialog__close{ .el-dialog__close {
color: #fff; color: #fff;
font-size: 16px; font-size: 16px;
} }
} }
} }
.pdf{ .pdf {
.arrow{ .arrow {
padding: 10px 0; padding: 10px 0;
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -510,57 +558,57 @@ $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;
} }
} }
/deep/.project-dia { /deep/.project-dia {
.el-dialog__body { .el-dialog__body {
padding: 28px 32px; padding: 28px 32px;
} }
} }
.projects { .projects {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
max-height: 400px; max-height: 400px;
overflow: auto; overflow: auto;
li { li {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
width: 238px; width: 238px;
padding: 16px; padding: 16px;
margin: 0 20px 20px 0; margin: 0 20px 20px 0;
background-color: #F6F8FA; background-color: #f6f8fa;
border-radius: 16px; border-radius: 16px;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
span { span {
color: #007EFF; color: #007eff;
} }
} }
&:nth-child(3n) { &:nth-child(3n) {
margin-right: 0; margin-right: 0;
}
&.active {
background-color: #f2f7ff;
span {
color: #3988ff;
}
}
} }
&.active { span {
background-color: #f2f7ff; max-width: 140px;
span { margin-left: 14px;
color: #3988ff; font-size: 14px;
} color: #333;
} }
}
span {
max-width: 140px;
margin-left: 14px;
font-size: 14px;
color: #333;
}
} }
@media (max-width: 1430px) { @media (max-width: 1430px) {
.wrap { .wrap {

@ -736,7 +736,7 @@ export default {
}, },
computed: { computed: {
...mapState("user", [ ...mapState("user", [
'logView' "userId", 'logView'
]), ]),
}, },
components: { components: {
@ -1432,6 +1432,7 @@ export default {
util.cookies.set('stopTime', form.endTime) util.cookies.set('stopTime', form.endTime)
util.cookies.set('resultsDetails', form.resultsDetails) util.cookies.set('resultsDetails', form.resultsDetails)
util.cookies.set('resultAnnouncementTime', form.resultAnnouncementTime) util.cookies.set('resultAnnouncementTime', form.resultAnnouncementTime)
util.cookies.set('mallId', form.mallId)
util.cookies.set('fromManager', '', -1) util.cookies.set('fromManager', '', -1)
util.cookies.set('language', '', -1) util.cookies.set('language', '', -1)
// 8pythoncookiesystemId // 8pythoncookiesystemId
@ -1444,7 +1445,7 @@ export default {
// //
toSub () { toSub () {
const { form } = this const { form } = this
const { systemId, projectId, cid, stageId, endTime } = this.curStage const { systemId, projectId, cid, stageId, startTime, endTime, mallId } = this.curStage
const competitionId = form.id const competitionId = form.id
const teamId = form.competitionRegistration.teamId const teamId = form.competitionRegistration.teamId
let token = util.local.get(Setting.tokenKey); let token = util.local.get(Setting.tokenKey);
@ -1453,7 +1454,7 @@ export default {
location.href = `${Setting.systemPath}/#/index/list?curriculumName=${this.curriculumName}&token=${token}&cid=${cid}&systemId=${systemId}&projectId=${projectId}&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}&assessmentId=&classId=&stopTime=&test=true` location.href = `${Setting.systemPath}/#/index/list?curriculumName=${this.curriculumName}&token=${token}&cid=${cid}&systemId=${systemId}&projectId=${projectId}&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}&assessmentId=&classId=&stopTime=&test=true`
} else if (systemId == 12) { } else if (systemId == 12) {
// //
window.open(`http://120.78.139.126:8879?systemId=${systemId}&courseId=${cid}&projectId=${projectId}&token=${token}&userId=${this.userId}&classId=1&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}&endTime=${endTime}`); window.open(`http://120.78.139.126:8879?systemId=${systemId}&courseId=${cid}&projectId=${projectId}&token=${token}&userId=${this.userId}&classId=1&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}&startTime=${startTime}&endTime=${endTime}&mallId=${mallId}`);
} else { } else {
// python // python
this.toPython(this.curProject) this.toPython(this.curProject)

@ -388,6 +388,9 @@ export default {
}; };
}, },
computed: { computed: {
...mapState("user", [
"userId"
]),
...mapState('match', [ ...mapState('match', [
'eventType' 'eventType'
]) ])
@ -781,6 +784,7 @@ export default {
util.cookies.set('stopTime', form.endTime) util.cookies.set('stopTime', form.endTime)
util.cookies.set('resultsDetails', form.resultsDetails) util.cookies.set('resultsDetails', form.resultsDetails)
util.cookies.set('resultAnnouncementTime', form.resultAnnouncementTime) util.cookies.set('resultAnnouncementTime', form.resultAnnouncementTime)
util.cookies.set('mallId', form.mallId)
util.cookies.set('fromManager', '', -1) util.cookies.set('fromManager', '', -1)
util.cookies.set('isSubmit', '', -1) util.cookies.set('isSubmit', '', -1)
util.cookies.set('language', '', -1) util.cookies.set('language', '', -1)
@ -794,7 +798,7 @@ export default {
// //
toSub () { toSub () {
const form = this.curItem const form = this.curItem
const { systemId, projectId, cid, stageId, endTime } = form.curStage const { systemId, projectId, cid, stageId, startTime, endTime, mallId } = form.curStage
const competitionId = form.id const competitionId = form.id
const teamId = form.teamId const teamId = form.teamId
let token = util.local.get(Setting.tokenKey); let token = util.local.get(Setting.tokenKey);
@ -803,7 +807,7 @@ export default {
location.href = `${Setting.systemPath}/#/index/list?curriculumName=${this.curriculumName}&token=${token}&cid=${cid}&systemId=${systemId}&projectId=${projectId}&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}&assessmentId=&classId=&stopTime=&test=true` location.href = `${Setting.systemPath}/#/index/list?curriculumName=${this.curriculumName}&token=${token}&cid=${cid}&systemId=${systemId}&projectId=${projectId}&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}&assessmentId=&classId=&stopTime=&test=true`
} else if (systemId == 12) { } else if (systemId == 12) {
// //
window.open(`http://120.78.139.126:8879?systemId=${systemId}&courseId=${cid}&projectId=${projectId}&token=${token}&userId=${this.userId}&classId=1&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}&endTime=${endTime}`); window.open(`http://120.78.139.126:8879?systemId=${systemId}&courseId=${cid}&projectId=${projectId}&token=${token}&userId=${this.userId}&classId=1&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}&startTime=${startTime}&endTime=${endTime}&mallId=${mallId}`);
} else { } else {
// python // python
this.toPython() this.toPython()

@ -75,12 +75,11 @@ export default {
}, },
watch: { watch: {
mallId: function (val) { mallId: function (val) {
this.initData(); this.initData()
}, },
}, },
mounted () { mounted () {
this.page = 1
this.getData()
}, },
methods: { methods: {
...mapActions({ ...mapActions({
@ -108,6 +107,10 @@ export default {
this.total = res.page.total; this.total = res.page.total;
}).catch(err => { }); }).catch(err => { });
}, },
initData () {
this.page = 1
this.getData()
},
toReport (row) { toReport (row) {
this.setCurriculum(this.curriculumId) this.setCurriculum(this.curriculumId)
this.$router.push(`show?reportId=${row.reportId}`); this.$router.push(`show?reportId=${row.reportId}`);

@ -49,13 +49,13 @@
</div> </div>
<li style="margin-right: 0"> <li style="margin-right: 0">
<label>课程选择</label> <label>课程选择</label>
<el-cascader v-model="mallIds" <el-select v-model="mallId"
:options="curs" @change="curChange">
:props="{ checkStrictly: true, value: 'id' }" <el-option v-for="(item, i) in curs"
popper-class="course-cas" :key="i"
@expand-change="curChange" :label="item.curriculumName"
@change="curChange"></el-cascader> :value="item.mallId"></el-option>
</el-select>
<el-button style="margin-left: 20px;" <el-button style="margin-left: 20px;"
type="primary" type="primary"
@click="exportData">导出数据</el-button> @click="exportData">导出数据</el-button>
@ -67,12 +67,12 @@
ref="list0" ref="list0"
:mallId.sync="mallId" :mallId.sync="mallId"
:curriculumId.sync="curriculumId" :curriculumId.sync="curriculumId"
:key="mallId"></practice> :key="1"></practice>
<ass v-else <ass v-else
ref="list1" ref="list1"
:curriculumId.sync="curriculumId" :curriculumId.sync="curriculumId"
:mallId.sync="mallId" :mallId.sync="mallId"
:key="mallId"></ass> :key="2"></ass>
</div> </div>
</div> </div>
</template> </template>
@ -121,14 +121,6 @@ export default {
'lastRecordType', 'currId' 'lastRecordType', 'currId'
]) ])
}, },
watch: {
mallId: {
handler (val) {
this.curriculumId = this.curs.find(e => e.mallId == val).cid
},
deep: true
}
},
created () { created () {
this.active = this.lastRecordType ? this.lastRecordType : 0; this.active = this.lastRecordType ? this.lastRecordType : 0;
}, },
@ -142,27 +134,16 @@ export default {
}), }),
// //
async getCourse () { async getCourse () {
const { data } = await this.$get(this.api.getSystemIdBySchool) const { data } = await this.$get(this.api.getSchoolEffectiveCourse)
const res = await this.$get(this.api.getSchoolEffectiveCourse) if (data.length) {
if (res.data.length) { this.curs = data
res.data.map(e => { this.mallId = data[0].mallId
e.id = e.mallId this.curriculumId = data[0].cid
e.label = e.curriculumName
e.children = data.filter(n => e.systemId.split(',').includes(n.id + '')) //
})
this.curs = res.data
this.mallIds = [res.data[0].mallId, data[0].id]
this.mallId = res.data[0].mallId
} }
}, },
// //
curChange (val) { curChange (id) {
const id = val[0] this.curriculumId = this.curs.find(e => e.mallId == id).cid
if (val.length === 1) {
//
this.mallIds = [id, this.curs.find(e => e.id == id).children[0].id]
}
this.mallId = id
}, },
getData () { // getData () { //
@ -196,6 +177,9 @@ export default {
tabChange (id) { tabChange (id) {
this.active = id this.active = id
this.setRecord(id) this.setRecord(id)
this.$nextTick(() => {
this.$refs['list' + id].initData()
})
} }
}, },

@ -63,11 +63,11 @@ export default {
}, },
watch: { watch: {
mallId: function (val) { mallId: function (val) {
this.initData(); this.initData()
}, },
}, },
mounted () { mounted () {
this.initData()
}, },
methods: { methods: {
...mapActions({ ...mapActions({

@ -1,25 +1,30 @@
<template> <template>
<!-- 实验报告 --> <!-- 实验报告 -->
<div class="wrap"> <div class="wrap">
<div class="breadcrumb"> <div class="top">
<el-breadcrumb separator=">"> <div class="breadcrumb">
<template v-for="(item, i) in breadPath"> <el-breadcrumb separator=">">
<el-breadcrumb-item v-if="!i" <template v-for="(item, i) in breadPath">
:key="i" <el-breadcrumb-item v-if="!i"
:to="{ path: matchId ? '/match' : 'list' }"> :key="i"
{{item}} :to="{ path: matchId ? '/match' : 'list' }">
</el-breadcrumb-item> {{item}}
<el-breadcrumb-item v-else-if="breadPath.length > 2 && i === 1" </el-breadcrumb-item>
:to="{ path: matchId ? '/match/details' : 'details', query: matchId ? { id: matchId } : { curriculumId, projectId } }" <el-breadcrumb-item v-else-if="breadPath.length > 2 && i === 1"
:key="i"> :to="{ path: matchId ? '/match/details' : 'details', query: matchId ? { id: matchId } : { curriculumId, projectId } }"
{{item}} :key="i">
</el-breadcrumb-item> {{item}}
<el-breadcrumb-item v-else </el-breadcrumb-item>
:key="i"> <el-breadcrumb-item v-else
{{item}} :key="i">
</el-breadcrumb-item> {{item}}
</template> </el-breadcrumb-item>
</el-breadcrumb> </template>
</el-breadcrumb>
</div>
<span v-if="fromPython"
class="back"
@click="back">返回实验</span>
</div> </div>
<div class="content" <div class="content"
:class="{loading}" :class="{loading}"
@ -172,8 +177,7 @@
v-html="scope.row.referenceAnswer"></div> v-html="scope.row.referenceAnswer"></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="!project" <el-table-column prop="userAnswer"
prop="userAnswer"
label="学生答案"> label="学生答案">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'> <div v-if='scope.row.lcRuleRecords'>
@ -192,7 +196,8 @@
style='white-space: pre-wrap'></div> style='white-space: pre-wrap'></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="runResult" <el-table-column v-if="!project"
prop="runResult"
label="学生运行结果" label="学生运行结果"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -249,6 +254,7 @@ import quill from "@/components/quill";
export default { export default {
data () { data () {
return { return {
fromPython: this.$route.query.python, // python
reportId: this.$route.query.reportId, reportId: this.$route.query.reportId,
curriculumId: this.$route.query.curriculumId, curriculumId: this.$route.query.curriculumId,
projectId: this.$route.query.projectId, projectId: this.$route.query.projectId,
@ -341,6 +347,10 @@ export default {
} }
this.expData = list this.expData = list
}, },
//
back () {
history.back()
},
exportPage () { exportPage () {
const form = Object.assign(this.form, this.infoData) const form = Object.assign(this.form, this.infoData)
const list = JSON.parse(JSON.stringify(this.expData)) const list = JSON.parse(JSON.stringify(this.expData))
@ -423,8 +433,18 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.top {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
.back {
font-size: 14px;
color: #007eff;
cursor: pointer;
}
}
.breadcrumb { .breadcrumb {
margin: 4px 0 16px;
/deep/.el-breadcrumb__item { /deep/.el-breadcrumb__item {
.is-link, .is-link,
.el-breadcrumb__separator { .el-breadcrumb__separator {

@ -475,6 +475,9 @@ export default {
// //
this.$post(this.api.activityRanking).then(({ list }) => { this.$post(this.api.activityRanking).then(({ list }) => {
list.sort((a, b) => {
return +b.activityIndex - +a.activityIndex
})
this.actives = list this.actives = list
}).catch(res => { }) }).catch(res => { })
this.scrollTable() this.scrollTable()

@ -1,7 +1,7 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<breadcrumb ref="breadcrumb" <breadcrumb ref="breadcrumb"
:data="'实验台/' + courseName"></breadcrumb> :data="'实验台/' + (curriculumName || courseName)"></breadcrumb>
<div class="flex"> <div class="flex">
<div class="cover" <div class="cover"
:class="{'is-word': showMask1}"> :class="{'is-word': showMask1}">
@ -18,9 +18,11 @@
frameborder="0"></iframe> frameborder="0"></iframe>
<template v-if="showMask"> <template v-if="showMask">
<div class="mask" <div class="mask"
style="width:100%;background: #393A3D;height: 30px;top: 53px;"></div> style="top: 0;width:100%;height: 48px;"></div>
<div class="mask" <div class="mask"
style="width:100%;background: #393A3D;height: 30px;top: 53px;"></div> style="top: 53px;width:100%;height: 30px;"></div>
<div class="mask"
style="bottom: 0;right: 0;width:280px;height: 22px;background-color: #444;"></div>
</template> </template>
<template v-if="showMask1"> <template v-if="showMask1">
<div class="word-mask" <div class="word-mask"
@ -71,9 +73,9 @@
@click="showBuy">续费</el-button> @click="showBuy">续费</el-button>
<a v-else <a v-else
class="entry" class="entry"
@click="entry"></a> @click="entry">进入实验</a>
<div class="list"> <div class="list">
<h4 class="title">{{ courseName }}</h4> <h4 class="title">{{ curriculumName || courseName }}</h4>
<div> <div>
<h6 class="pro-title">我的学习进度</h6> <h6 class="pro-title">我的学习进度</h6>
<el-progress :stroke-width="12" <el-progress :stroke-width="12"
@ -346,6 +348,7 @@
</div> </div>
</div> </div>
<div class="rank"> <div class="rank">
<h6 class="title">练习成绩排行</h6>
<el-select style="width: 100%" <el-select style="width: 100%"
v-model="archProject" v-model="archProject"
placeholder="请选择" placeholder="请选择"
@ -520,7 +523,7 @@ export default {
watch: { watch: {
'$route': { '$route': {
handler () { handler () {
this.mallId = this.$route.query.mallId || '' this.mallId = +this.$route.query.mallId || ''
this.courseId = +this.$route.query.courseId this.courseId = +this.$route.query.courseId
this.curriculumName = this.$route.query.curriculumName this.curriculumName = this.$route.query.curriculumName
this.commentId = this.$route.query.commentId // this.commentId = this.$route.query.commentId //
@ -537,7 +540,7 @@ export default {
} }
}, },
mounted () { mounted () {
this.init()
}, },
destroyed () { destroyed () {
// //
@ -555,13 +558,11 @@ export default {
this.insertScript(); this.insertScript();
this.getData(); this.getData();
this.addRecord() this.addRecord()
this.getNote()
this.getComment()
}, },
async getData () { async getData () {
let { data } = await this.$post(`${this.api.curriculumDetail}?cid=${this.courseId}&mallId=${this.mallId}`); let { data } = await this.$post(`${this.api.curriculumDetail}?cid=${this.courseId}&mallId=${this.mallId}`);
this.courseName = data.curriculumName; this.courseName = data.curriculumName;
this.$refs.breadcrumb.update('实验台/' + data.curriculumName) // this.$refs.breadcrumb.update('/' + data.curriculumName)
// this.coverUrl = data.coverUrl; // this.coverUrl = data.coverUrl;
this.briefIntroduction = data.briefIntroduction; this.briefIntroduction = data.briefIntroduction;
this.teachingObjectives = data.teachingObjectives; this.teachingObjectives = data.teachingObjectives;
@ -668,7 +669,7 @@ export default {
// //
getComment () { getComment () {
this.$get(this.api.commentTreeList, { this.$get(this.api.commentTreeList, {
cid: this.courseId, mallId: this.mallId,
}).then(res => { }).then(res => {
this.deleteIdentity = res.deleteIdentity this.deleteIdentity = res.deleteIdentity
const list = res.rootComments const list = res.rootComments
@ -724,7 +725,7 @@ export default {
const content = reply ? reply.replyContent : row ? row.replyContent : this.comment const content = reply ? reply.replyContent : row ? row.replyContent : this.comment
if (!content) return util.errorMsg('请输入内容!') if (!content) return util.errorMsg('请输入内容!')
this.$post(this.api.addComment, { this.$post(this.api.addComment, {
cid: this.courseId, mallId: this.mallId,
content, content,
pid: reply ? reply.commentId : row ? row.commentId : 0, pid: reply ? reply.commentId : row ? row.commentId : 0,
replyAccountId: reply ? reply.createAccountId : row.createAccountId || '', replyAccountId: reply ? reply.createAccountId : row.createAccountId || '',
@ -738,7 +739,6 @@ export default {
}, },
// //
like (e, row, reply) { like (e, row, reply) {
console.log(11, e.pageY)
this.$post(`${this.api[(reply ? reply.isLike : row.isLike) ? 'unlike' : 'commentAndLike']}?commentId=${reply ? reply.commentId : row.commentId}`).then(res => { this.$post(`${this.api[(reply ? reply.isLike : row.isLike) ? 'unlike' : 'commentAndLike']}?commentId=${reply ? reply.commentId : row.commentId}`).then(res => {
this.curReplyId = row.commentId this.curReplyId = row.commentId
this.getComment() this.getComment()
@ -774,8 +774,10 @@ export default {
return suf return suf
}, },
// tab // tab
tabChange (item) { tabChange ({ id }) {
this.active = item.id this.active = id
id == 2 && this.getNote()
id == 4 && this.getComment()
}, },
// / // /
studySection (item) { studySection (item) {
@ -794,13 +796,13 @@ export default {
// //
if (this.overdue || showDia) { if (this.overdue || showDia) {
this.curLink = `${chapterName}${row.name}`; // + this.curLink = `${chapterName}${row.name}`; // +
this.playauth = ""; this.playauth = ''
this.coverUrl = ""; this.coverUrl = ''
this.pdfSrc = ""; this.pdfSrc = ''
this.iframeSrc = ""; this.iframeSrc = ''
this.isPPT = false; this.isPPT = false
this.isWord = false; this.isWord = false
this.isExcel = false; this.isExcel = false
if (this.transferType(row.fileType) == "视频") { if (this.transferType(row.fileType) == "视频") {
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.data.playAuth;
@ -823,32 +825,18 @@ export default {
}); });
} }
}); });
}).catch(res => { }).catch(res => {
}); });
} else if (this.transferType(row.fileType) == "图片") { } else if (this.transferType(row.fileType) == "图片") {
this.coverUrl = row.fileUrl; this.coverUrl = row.fileUrl
} else if (row.fileType == "pdf") { } else if (row.fileType == "pdf") {
this.pdfSrc = row.fileUrl; this.pdfSrc = row.fileUrl
} else { } else {
this.$get(`${this.api.curriculumGetSubsection}/${row.id}`).then(res => { this.$get(`${this.api.curriculumGetSubsection}/${row.id}`).then(res => {
if (row.fileType == "pptx") { if (row.fileType == "pptx") this.isPPT = true
this.isPPT = true; if (row.fileType == "doc" || row.fileType == "docx") this.isWord = true
this.isWord = false; if (row.fileType == "xls" || row.fileType == "xlsx") this.isExcel = true
this.isExcel = false;
} else if (row.fileType == "doc" || row.fileType == "docx") {
this.isPPT = false;
this.isWord = true;
this.isExcel = false;
} else if (row.fileType == "xls" || row.fileType == "xlsx") {
this.isExcel = true;
this.isPPT = false;
this.isWord = false;
} else {
this.isPPT = false;
this.isWord = false;
this.isExcel = false;
}
if (this.isPPT) { if (this.isPPT) {
this.showMask = true; this.showMask = true;
} else { } else {
@ -872,12 +860,12 @@ export default {
} }
}, },
closeIframe () { closeIframe () {
this.iframeSrc = ""; this.iframeSrc = ''
this.showMask = false; this.showMask = false;
this.showMask1 = false; this.showMask1 = false;
}, },
closePdf () { closePdf () {
this.pdfSrc = ""; this.pdfSrc = ''
this.currentPage = 1; this.currentPage = 1;
}, },
changePdfPage (val) { changePdfPage (val) {
@ -1045,12 +1033,17 @@ $height: 700px;
.renew { .renew {
width: 100%; width: 100%;
margin-bottom: 16px; margin-bottom: 16px;
font-size: 17px;
} }
.entry { .entry {
display: block; display: block;
width: 100%; width: 100%;
height: 34px; height: 34px;
margin-bottom: 16px; margin-bottom: 16px;
font-size: 17px;
color: #fff;
text-align: center;
line-height: 34px;
background: url(../../../assets/img/entry.png) 0 0/100% 100% no-repeat; background: url(../../../assets/img/entry.png) 0 0/100% 100% no-repeat;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
@ -1349,7 +1342,7 @@ $height: 700px;
.item { .item {
padding: 0 10px; padding: 0 10px;
margin-right: 16px; margin-right: 16px;
font-size: 17px; font-size: 16px;
text-align: center; text-align: center;
color: #333; color: #333;
line-height: 50px; line-height: 50px;
@ -1369,6 +1362,11 @@ $height: 700px;
padding: 20px; padding: 20px;
margin-left: 12px; margin-left: 12px;
background-color: #fff; background-color: #fff;
.title {
margin-bottom: 10px;
font-size: 15px;
font-weight: 400;
}
.arches { .arches {
margin-top: 20px; margin-top: 20px;
} }
@ -1388,9 +1386,9 @@ $height: 700px;
color: #007eff; color: #007eff;
} }
} }
@media (max-width: 1430px) { @media (max-width: 1700px) {
.wrap { .wrap {
padding: 12px 100px 20px; padding: 12px 5% 20px;
} }
} }
</style> </style>

@ -28,7 +28,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/` uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 测试服 host = "http://121.37.12.51/"; // 测试服
// host = 'https://www.occupationlab.com/' // 正式服 // host = 'https://www.occupationlab.com/' // 正式服
host = "http://192.168.31.152:9000/"; // 榕 // host = "http://192.168.31.152:9000/"; // 榕
// host = "http://192.168.31.51:9000/"; // 赓 // host = "http://192.168.31.51:9000/"; // 赓
} }

@ -29,6 +29,9 @@
color: rgba(0, 0, 0, 0.45); color: rgba(0, 0, 0, 0.45);
font-size: 14px; font-size: 14px;
} }
/deep/img {
max-width: 95%;
}
} }
.action { .action {
display: inline-flex; display: inline-flex;
@ -121,10 +124,17 @@
align-items: center; align-items: center;
padding-bottom: 10px; padding-bottom: 10px;
margin: -22px 0 20px; margin: -22px 0 20px;
font-size: 20px; font-size: 15px;
color: #007eff; color: #007eff;
border-bottom: 1px dashed #bfbfbf; border-bottom: 1px dashed #bfbfbf;
} }
.des {
p,
span,
em {
font-size: 14px !important;
}
}
.withdraw { .withdraw {
margin-right: 10px; margin-right: 10px;
font-size: 13px; font-size: 13px;

Loading…
Cancel
Save