yujialong 2 years ago
parent 588df7ce32
commit 058b1c3fc4
  1. 1
      src/api/index.js
  2. BIN
      src/assets/img/entry.png
  3. 19
      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. 138
      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. 28
      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文件
fileupload: `${uploadURL}oss/manage/fileupload`, // 文件上传
getPlayAuth: `${uploadURL}oss/manage/getPlayAuth`, // 获取播放凭证
getPlayAuthNakadai: `nakadai/nakadai/oss/getPlayAuth`, // 获取播放凭证
queryProvince: `nakadai/nakadai/province/queryProvince`, //查询省份
queryCity: `nakadai/nakadai/city/queryCity`, //查询城市

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 15 KiB

@ -3,14 +3,12 @@
<div class="breadcrumb">
<el-breadcrumb separator=">">
<template v-for="(item, index) in pages">
<el-breadcrumb-item
v-if="index != pages.length - 1"
<el-breadcrumb-item v-if="index != pages.length - 1"
:key="index"
:to="{ path: route, query }">
{{item}}
</el-breadcrumb-item>
<el-breadcrumb-item
v-else
<el-breadcrumb-item v-else
:key="index">
{{item}}
</el-breadcrumb-item>
@ -48,15 +46,24 @@ export default {
</script>
<style lang="scss" scoped>
.breadcrumb {
display: flex;
align-items: center;
/deep/.el-breadcrumb {
margin: 4px 0 16px;
}
/deep/.el-breadcrumb__item {
.is-link, .el-breadcrumb__separator {
.el-breadcrumb__inner,
.el-breadcrumb__separator {
font-size: 16px;
font-weight: 400;
}
.is-link,
.el-breadcrumb__separator {
color: $main-color;
}
&:last-child {
.is-link {
color: #0B1D30;
color: #0b1d30;
}
}
}

@ -151,7 +151,7 @@ export default {
},
initSocket ({ id, account }) {
// 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}`)
// socket
this.socket.onopen = this.open;

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

@ -490,30 +490,32 @@ export default {
this.invitationCode = "";
},
goSubSystem () {
let token = util.local.get(Setting.tokenKey)
const token = util.local.get(Setting.tokenKey)
const classId = this.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("assessmentId", this.assessmentId)
util.cookies.set("classId", classId)
util.cookies.set("className", classItem ? encodeURI(classItem.className) : '')
util.cookies.set("projectId", this.projectId)
util.cookies.set("courseId", this.cid)
util.cookies.set("curriculumName", escape(this.curRow.sysName));
util.cookies.set("startTime", this.curRow.startTime)
util.cookies.set("stopTime", this.curRow.stopTime)
util.cookies.set("curriculumName", escape(row.sysName));
util.cookies.set("startTime", row.startTime)
util.cookies.set("stopTime", row.stopTime)
util.cookies.set("systemId", this.systemId);
util.cookies.set('mallId', mallId)
util.cookies.set('fromManager', '', -1)
util.cookies.set('competitionId', '', -1)
util.cookies.set('isSubmit', '', -1)
util.cookies.set('language', '', -1)
let href = ''
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) {
//
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 {
if (process.env.NODE_ENV === 'development') {
href = 'http://192.168.31.125:8085/#/'

@ -1,31 +1,50 @@
<template>
<div class="wrap pb">
<breadcrumb ref="breadcrumb" :data="'课程学习/' + courseName" :query="breadcrumbQuery"></breadcrumb>
<breadcrumb ref="breadcrumb"
:data="'课程学习/' + courseName"
:query="breadcrumbQuery"></breadcrumb>
<div class="flex">
<div class="cover" :class="{'is-word': showMask1}">
<img v-if="coverUrl" :src="coverUrl" alt="" width="100%" height="100%">
<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>
<iframe class="inner fileIframe"
id="fileIframe"
:src="iframeSrc"
frameborder="0"></iframe>
<template v-if="showMask">
<div class="mask" 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: 500px;height: 30px;top: 53px;right: 320px"></div>
<div class="mask"
style="width: 175px;height: 30px;top: 53px;right: 5px"></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>
<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>
<div class="excel-mask1"
style="height: 48px;"></div>
</template>
</template>
<div class="pdf inner" v-else-if="pdfSrc">
<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>
<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>
<span @click="changePdfPage(1)"
class="turn el-icon-arrow-right"
:class="{grey: currentPage==pageCount}"></span>
</p>
<pdf
class="pdf-wrap"
<pdf class="pdf-wrap"
:src="pdfSrc"
:page="currentPage"
@num-pages="pageCount=$event"
@ -33,31 +52,55 @@
@loaded="loadPdfHandler">
</pdf>
</div>
<div class="inner" v-else-if="playAuth">
<div class="video_wid" id="player"></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">
<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="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="">
<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>
@ -183,7 +226,6 @@ export default {
return false
}
this.curLink = `${chapterName}${row.name}`;
this.player = null
this.playauth = ''
this.coverUrl = ''
this.pdfSrc = ''
@ -192,23 +234,27 @@ export default {
this.isWord = false
this.isExcel = false
if (this.transferType(row.fileType) == '视频') {
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => {
this.playAuth = res.data.playAuth
this.$get(`${this.api.getPlayAuthNakadai}/${row.fileId}`).then(res => {
this.playAuth = res.playAuth
//
if (this.player) {
this.player.dispose()
this.player = null
}
this.$nextTick(() => {
if (this.player) {
this.player.replayByVidAndPlayAuth(row.fileId,this.playAuth)
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth);
} else {
this.player = new Aliplayer({
id: 'player',
width: '100%',
id: "player",
width: "100%",
autoplay: false,
vid: row.fileId,
playauth: this.playAuth,
encryptType:1, //
})
encryptType: 1 //
});
}
})
});
}).catch(res => { })
} else if (this.transferType(row.fileType) == '图片') {
this.coverUrl = row.fileUrl
@ -289,7 +335,8 @@ export default {
</style>
<style lang="scss" scoped>
$height: 700px;
.video_wid,.cover{
.video_wid,
.cover {
position: relative;
width: 76%;
height: $height !important;
@ -316,7 +363,8 @@ $height: 700px;
.fileIframe {
height: $height !important;
}
.video_wid,.inner{
.video_wid,
.inner {
width: 100%;
height: 100% !important;
border: 0;
@ -344,7 +392,7 @@ $height: 700px;
background: url(../../../assets/img/entry.png) 0 0/100% 100% no-repeat;
cursor: pointer;
&:hover {
opacity: .9;
opacity: 0.9;
}
}
}
@ -427,10 +475,10 @@ $height: 700px;
}
.el-image-viewer__wrapper {
transform: translateY(-10px);
transition: transform .5s;
transition: transform 0.5s;
&.active {
transform: translateY(0)
transform: translateY(0);
}
}
.el-image-viewer__close {
@ -537,12 +585,12 @@ $height: 700px;
width: 238px;
padding: 16px;
margin: 0 20px 20px 0;
background-color: #F6F8FA;
background-color: #f6f8fa;
border-radius: 16px;
cursor: pointer;
&:hover {
span {
color: #007EFF;
color: #007eff;
}
}
&:nth-child(3n) {

@ -736,7 +736,7 @@ export default {
},
computed: {
...mapState("user", [
'logView'
"userId", 'logView'
]),
},
components: {
@ -1432,6 +1432,7 @@ export default {
util.cookies.set('stopTime', form.endTime)
util.cookies.set('resultsDetails', form.resultsDetails)
util.cookies.set('resultAnnouncementTime', form.resultAnnouncementTime)
util.cookies.set('mallId', form.mallId)
util.cookies.set('fromManager', '', -1)
util.cookies.set('language', '', -1)
// 8pythoncookiesystemId
@ -1444,7 +1445,7 @@ export default {
//
toSub () {
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 teamId = form.competitionRegistration.teamId
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`
} 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 {
// python
this.toPython(this.curProject)

@ -388,6 +388,9 @@ export default {
};
},
computed: {
...mapState("user", [
"userId"
]),
...mapState('match', [
'eventType'
])
@ -781,6 +784,7 @@ export default {
util.cookies.set('stopTime', form.endTime)
util.cookies.set('resultsDetails', form.resultsDetails)
util.cookies.set('resultAnnouncementTime', form.resultAnnouncementTime)
util.cookies.set('mallId', form.mallId)
util.cookies.set('fromManager', '', -1)
util.cookies.set('isSubmit', '', -1)
util.cookies.set('language', '', -1)
@ -794,7 +798,7 @@ export default {
//
toSub () {
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 teamId = form.teamId
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`
} 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 {
// python
this.toPython()

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

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

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

@ -1,6 +1,7 @@
<template>
<!-- 实验报告 -->
<div class="wrap">
<div class="top">
<div class="breadcrumb">
<el-breadcrumb separator=">">
<template v-for="(item, i) in breadPath">
@ -21,6 +22,10 @@
</template>
</el-breadcrumb>
</div>
<span v-if="fromPython"
class="back"
@click="back">返回实验</span>
</div>
<div class="content"
:class="{loading}"
id="pdfDom">
@ -172,8 +177,7 @@
v-html="scope.row.referenceAnswer"></div>
</template>
</el-table-column>
<el-table-column v-if="!project"
prop="userAnswer"
<el-table-column prop="userAnswer"
label="学生答案">
<template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'>
@ -192,7 +196,8 @@
style='white-space: pre-wrap'></div>
</template>
</el-table-column>
<el-table-column prop="runResult"
<el-table-column v-if="!project"
prop="runResult"
label="学生运行结果"
align="center">
<template slot-scope="scope">
@ -249,6 +254,7 @@ import quill from "@/components/quill";
export default {
data () {
return {
fromPython: this.$route.query.python, // python
reportId: this.$route.query.reportId,
curriculumId: this.$route.query.curriculumId,
projectId: this.$route.query.projectId,
@ -341,6 +347,10 @@ export default {
}
this.expData = list
},
//
back () {
history.back()
},
exportPage () {
const form = Object.assign(this.form, this.infoData)
const list = JSON.parse(JSON.stringify(this.expData))
@ -423,8 +433,18 @@ export default {
</script>
<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 {
margin: 4px 0 16px;
/deep/.el-breadcrumb__item {
.is-link,
.el-breadcrumb__separator {

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

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

@ -28,7 +28,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 测试服
// 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/"; // 赓
}

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

Loading…
Cancel
Save