Branch_d40a2540
yujialong 2 years ago
parent d5f8a827dd
commit 16206af273
  1. BIN
      src/assets/img/product/1.png
  2. BIN
      src/assets/img/product/2.png
  3. BIN
      src/assets/img/product/3.png
  4. BIN
      src/assets/img/product/4.png
  5. BIN
      src/assets/img/product/5.png
  6. 175
      src/pages/product/list/index.vue
  7. 206
      src/pages/product/show/index.vue
  8. 209
      src/pages/project/add/index.vue
  9. 142
      src/pages/project/list/index.vue
  10. 43
      src/pages/station/list/index.vue
  11. 293
      src/pages/station/preview/index.vue

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

@ -1,10 +1,14 @@
<template>
<div class="wrap">
<el-carousel :interval="6000" :height="carouselHeight">
<el-carousel :interval="6000"
:height="carouselHeight">
<template v-for="(item, i) in banners">
<el-carousel-item :key="i">
<div :class="['banner-item', {'cursor-pointer': item.url}]" @click="openLink(item)">
<img :src="item.banner" alt="" :style="{height: carouselHeight}">
<div :class="['banner-item', {'cursor-pointer': item.url}]"
@click="openLink(item)">
<img :src="item.banner"
alt=""
:style="{height: carouselHeight}">
<p class="banner-name">{{ item.title }}</p>
</div>
</el-carousel-item>
@ -14,15 +18,25 @@
<div class="inner">
<div class="typw-wrap">
<div>
<img src="@/assets/img/hot.png" alt="">
<img class="m-l-5 m-r-10" src="@/assets/img/type.png" alt="">
<img src="@/assets/img/hot.png"
alt="">
<img class="m-l-5 m-r-10"
src="@/assets/img/type.png"
alt="">
<ul class="tab">
<li v-for="(tab, i) in tabs" :key="i" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.name }}</li>
<li v-for="(tab, i) in tabs"
:key="i"
:class="{active: curTab === tab.id}"
@click="tabChange(tab)">{{ tab.name }}</li>
</ul>
</div>
<div class="search">
<img class="icon" src="@/assets/img/search.png" alt="">
<input type="text" placeholder="请输入产品名称" v-model="form.productName">
<img class="icon"
src="@/assets/img/search.png"
alt="">
<input type="text"
placeholder="请输入产品名称"
v-model="form.productName">
</div>
</div>
<div class="filter">
@ -30,48 +44,86 @@
<dt>学科专业</dt>
<dd>学科类别</dd>
<el-select v-model="form.categoryId" clearable @change="getProfessionalClass()" @clear="clearClass()">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in subjectList" :key="index" :label="item.disciplineName" :value="item.disciplineId"></el-option>
<el-select v-model="form.categoryId"
clearable
@change="getProfessionalClass()"
@clear="clearClass()">
<el-option label="不限"
value=""></el-option>
<el-option v-for="(item,index) in subjectList"
:key="index"
:label="item.disciplineName"
:value="item.disciplineId"></el-option>
</el-select>
<dd style="margin: 0 0 0 50px">专业类</dd>
<el-select v-model="form.professionalCategoryId" clearable :disabled="form.categoryId ? false : true" @change="getProfessional" @clear="clearProfess()">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in professionalClassList" :key="index" :label="item.professionalClassName" :value="item.professionalClassId"></el-option>
<el-select v-model="form.professionalCategoryId"
clearable
:disabled="form.categoryId ? false : true"
@change="getProfessional"
@clear="clearProfess()">
<el-option label="不限"
value=""></el-option>
<el-option v-for="(item,index) in professionalClassList"
:key="index"
:label="item.professionalClassName"
:value="item.professionalClassId"></el-option>
</el-select>
<dd style="margin: 0 0 0 50px">专业</dd>
<el-select v-model="form.professionalId" clearable :disabled="form.professionalCategoryId ? false : true" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in professionalList" :key="index" :label="item.professionalName" :value="item.professionalId"></el-option>
<el-select v-model="form.professionalId"
clearable
:disabled="form.professionalCategoryId ? false : true"
@change="initData">
<el-option label="不限"
value=""></el-option>
<el-option v-for="(item,index) in professionalList"
:key="index"
:label="item.professionalName"
:value="item.professionalId"></el-option>
</el-select>
</dl>
<dl v-if="curTab == 3">
<dt>产品标签</dt>
<div class="vals">
<dd :class="{active: form.tagId === ''}" @click="filterChange('', 'tagId')">全部</dd>
<dd v-for="(item, i) in labels" :key="i" :class="{active: form.tagId === item.tagsId}" @click="filterChange(item.tagsId, 'tagId')">{{ item.tagsName }}</dd>
<dd :class="{active: form.tagId === ''}"
@click="filterChange('', 'tagId')">全部</dd>
<dd v-for="(item, i) in labels"
:key="i"
:class="{active: form.tagId === item.tagsId}"
@click="filterChange(item.tagsId, 'tagId')">{{ item.tagsName }}</dd>
</div>
</dl>
<dl>
<dt>产品类型</dt>
<div class="vals">
<dd :class="{active: form.productClassification === ''}" @click="filterChange('', 'productClassification')">全部</dd>
<dd v-for="(item, i) in classifications" :key="i" :class="{active: form.productClassification === item.typeId}" @click="filterChange(item.typeId, 'productClassification')">{{ item.typeName }}</dd>
<dd :class="{active: form.productClassification === ''}"
@click="filterChange('', 'productClassification')">全部</dd>
<dd v-for="(item, i) in classifications"
:key="i"
:class="{active: form.productClassification === item.typeId}"
@click="filterChange(item.typeId, 'productClassification')">{{ item.typeName }}</dd>
</div>
</dl>
<dl>
<dt>购买状态</dt>
<dd v-for="(item, i) in status" :key="i" :class="{active: form.purchaseStatus === item.id}" @click="filterChange(item.id, 'purchaseStatus')">{{ item.name }}</dd>
<dd v-for="(item, i) in status"
:key="i"
:class="{active: form.purchaseStatus === item.id}"
@click="filterChange(item.id, 'purchaseStatus')">{{ item.name }}</dd>
</dl>
</div>
<div class="filter m-t-20">
<dl>
<dd v-for="(item, i) in sorts" :key="i" :class="{active: form.sort === item.id}" @click="filterChange(item.id, 'sort')">{{ item.name }}</dd>
<dd :class="{active: form.sort === 2 || form.sort === 5}" @click="sort">发布时间</dd>
<span class="caret" @click="sort">
<dd v-for="(item, i) in sorts"
:key="i"
:class="{active: form.sort === item.id}"
@click="filterChange(item.id, 'sort')">{{ item.name }}</dd>
<dd :class="{active: form.sort === 2 || form.sort === 5}"
@click="sort">发布时间</dd>
<span class="caret"
@click="sort">
<i :class="['asc', {active: form.sort === 2}]"></i>
<i :class="['desc', {active: form.sort === 5}]"></i>
</span>
@ -81,35 +133,57 @@
<div class="courses">
<template v-if="list.length">
<ul>
<li v-for="(item, i) in list" :key="i" @click="toDetail(item.mallId)">
<img :src="item.coverDrawing" alt="" />
<img v-if="item.logoOfOurSchool" class="my-school" src="@/assets/img/my-school.png" alt="">
<li v-for="(item, i) in list"
:key="i"
@click="toDetail(item.mallId)">
<img :src="item.coverDrawing"
alt="" />
<img v-if="item.logoOfOurSchool"
class="my-school"
src="@/assets/img/my-school.png"
alt="">
<div class="texts">
<el-tooltip effect="dark" :visible-arrow="false" :content="item.productName" placement="bottom">
<el-tooltip effect="dark"
:visible-arrow="false"
:content="item.productName"
placement="bottom">
<div class="title">{{ item.productName }}</div>
</el-tooltip>
<div class="desc" v-html="item.productIntroduction"></div>
<div class="desc"
v-html="item.productIntroduction"></div>
<div class="tags">
<el-tooltip v-if="item.tagsName" class="item" effect="dark" :visible-arrow="false" :content="item.tagsName" placement="bottom">
<el-tooltip v-if="item.tagsName"
class="item"
effect="dark"
:visible-arrow="false"
:content="item.tagsName"
placement="bottom">
<div>
<el-tag v-for="(tag, i) in item.tagsName.split(',')" :key="i" class="tag">{{ tag }}</el-tag>
<el-tag v-for="(tag, i) in item.tagsName.split(',')"
:key="i"
class="tag">{{ tag }}</el-tag>
</div>
</el-tooltip>
</div>
<div :class="['metas', {'not-selected': !item.selected}]">
<el-tag
v-if="item.selected"
<el-tag v-if="item.selected"
type="danger"
effect="dark">
官方精选
</el-tag>
<div v-if="item.isCourse" class="meta">{{ item.learningCount }}人学过</div>
<div v-if="item.isCourse"
class="meta">{{ item.learningCount }}人学过</div>
</div>
</div>
</li>
</ul>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :page-size="pageSize" :total="total" @current-change="handleCurrentChange" :current-page="page"></el-pagination>
<el-pagination background
layout="total, prev, pager, next"
:page-size="pageSize"
:total="total"
@current-change="handleCurrentChange"
:current-page="page"></el-pagination>
</div>
</template>
</div>
@ -333,6 +407,10 @@ export default {
this.classificationList = page.records
}).catch(res => { })
},
// banner
openLink (item) {
item.url && window.open(item.url)
},
// tab
tabChange ({ id }) {
this.curTab = id
@ -381,7 +459,7 @@ export default {
top: 116px;
left: 188px;
font-size: 50px;
color: #2E2D31;
color: #2e2d31;
}
}
.inner {
@ -402,7 +480,7 @@ export default {
margin: 0 20px;
font-size: 18px;
line-height: 25px;
color: #0B1D30;
color: #0b1d30;
cursor: pointer;
&:after {
content: '';
@ -414,7 +492,7 @@ export default {
transform: translateX(-50%);
}
&.active:after {
background-color: #007EFF;
background-color: #007eff;
}
}
}
@ -463,7 +541,7 @@ export default {
cursor: pointer;
&.active {
font-weight: 600;
color: #007EFF;
color: #007eff;
}
}
}
@ -525,7 +603,7 @@ export default {
img {
width: 100%;
height: 140px;
transition: .3s;
transition: 0.3s;
}
.my-school {
position: absolute;
@ -539,7 +617,7 @@ export default {
}
.title {
margin-bottom: 10px;
color: #0B1D30;
color: #0b1d30;
font-size: 14px;
font-weight: 600;
word-wrap: break-word;
@ -550,7 +628,7 @@ export default {
}
.desc {
min-height: 34px;
color: #757F92;
color: #757f92;
font-size: 12px;
display: -webkit-box;
-webkit-box-orient: vertical;
@ -564,8 +642,8 @@ export default {
}
.tag {
margin-right: 8px;
color: #007EFF;
background-color: #F9F9F9;
color: #007eff;
background-color: #f9f9f9;
border: 0;
}
.type {
@ -573,7 +651,7 @@ export default {
padding: 4px 11px;
font-size: 12px;
color: #666;
border: 1px solid #DADADA;
border: 1px solid #dadada;
border-radius: 20px;
}
.metas {
@ -588,7 +666,7 @@ export default {
.meta {
display: inline-flex;
align-items: center;
color: #B5BFD5;
color: #b5bfd5;
font-size: 12px;
.icon {
width: 14px;
@ -597,7 +675,8 @@ export default {
}
}
&:hover {
box-shadow: 0px 5px 12px 4px rgba(142, 123, 253, 0.09), 0px 3px 6px 0px rgba(142, 123, 253, 0.12), 0px 1px 2px -2px rgba(142, 123, 253, 0.16);
box-shadow: 0px 5px 12px 4px rgba(142, 123, 253, 0.09), 0px 3px 6px 0px rgba(142, 123, 253, 0.12),
0px 1px 2px -2px rgba(142, 123, 253, 0.16);
img {
transform: scale(1.05);
}

@ -2,52 +2,97 @@
<div class="wrap">
<div class="inner">
<div class="top">
<div v-if="form.interfaceDiagrams" class="pics">
<img v-for="(pic, i) in form.interfaceDiagrams" :key="i" :src="pic" alt="">
<div v-if="form.interfaceDiagrams && height"
class="pics"
:style="{height: form.interfaceDiagrams.length === 1 ? height: 'auto'}">
<img v-for="(pic, i) in form.interfaceDiagrams"
:key="i"
:src="pic"
alt="">
</div>
<div class="right">
<div class="right"
id="fields">
<h6>{{ form.mall.productName }}</h6>
<div v-if="isCourse" class="meta">
<div v-if="isCourse"
class="meta">
<span class="val">{{ form.numberOfExperimentalItems }}</span> 个实验项目&emsp;&emsp;
已有 <span class="val">{{ form.goodsRes.learningCount }}</span>人学过
</div>
<div class="des" v-html="form.mall.productIntroduction"></div>
<div class="field">适用专业{{ form.goodsRes.professionalName }}</div>
<div class="des"
v-html="form.mall.productIntroduction"></div>
<div class="fields">
<div v-if="form.mall.applicationScenario" class="field"><span class="label">适用场景</span>{{ form.mall.applicationScenario }}</div>
<div v-if="form.mall.matchingCourse" class="field"><span class="label">匹配课程</span>{{ form.mall.matchingCourse }}</div>
<div v-if="form.mall.courseHours" class="field"><span class="label">预计课时</span>{{ form.mall.courseHours }}</div>
<div v-if="form.goodsRes.typeName" class="field"><span class="label">产品类型</span>{{ form.goodsRes.typeName }}</div>
<div class="field"><img src="@/assets/img/product/1.png"
alt=""> 适用专业{{ form.goodsRes.professionalName }}</div>
<div v-if="form.mall.applicationScenario"
class="field"><span class="label"><img src="@/assets/img/product/2.png"
alt=""> 适用场景</span>{{ form.mall.applicationScenario }}</div>
<div v-if="form.mall.matchingCourse"
class="field"><span class="label"><img src="@/assets/img/product/3.png"
alt=""> 匹配课程</span>{{ form.mall.matchingCourse }}</div>
<div v-if="form.mall.courseHours"
class="field"><span class="label"><img src="@/assets/img/product/4.png"
alt=""> 预计课时</span>{{ form.mall.courseHours }}</div>
<div v-if="form.goodsRes.typeName"
class="field"><span class="label"><img src="@/assets/img/product/5.png"
alt=""> 产品类型</span>{{ form.goodsRes.typeName }}</div>
</div>
<button v-if="!form.goodsRes.logoOfOurSchool" class="btn" @click="toTrail">试用体验</button>
<button v-else-if="isCourse || withLink" class="btn entry" @click="toStation">进入实验</button>
<button v-if="!form.goodsRes.logoOfOurSchool"
class="btn"
@click="toTrail">试用体验</button>
<button v-else-if="isCourse || withLink"
class="btn entry"
@click="toStation">进入实验</button>
</div>
</div>
<div class="course">
<div class="detail">
<ul class="tab">
<li v-for="(tab, i) in tabs" :key="i" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.name }}</li>
<li v-for="(tab, i) in tabs"
:key="i"
:class="{active: curTab === tab.id}"
@click="tabChange(tab)">{{ tab.name }}</li>
</ul>
<div class="courses">
<template v-if="!curTab">
<div class="des" v-html="form.mall.detailedIntroduction"></div>
<div class="des"
v-html="form.mall.detailedIntroduction"></div>
</template>
<template v-else>
<div class="chapter" v-for="(item, i) in chapterList" :key="i">
<div class="chapter"
v-for="(item, i) in chapterList"
:key="i">
<div class="chapterName">{{ item.name }}</div>
<div class="section" v-if="item.subsectionList.length">
<div v-for="(section, j) in item.subsectionList" :key="j" @click="toPreview(i, j)">
<div class="sectionName" :title="section.name" :class="{active: curLink === `${item.name}${section.name}`}">
<div class="section"
v-if="item.subsectionList.length">
<div v-for="(section, j) in item.subsectionList"
:key="j"
@click="toPreview(i, j)">
<div class="sectionName"
:title="section.name"
:class="{active: curLink === `${item.name}${section.name}`}">
<div class="val">
<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="">
<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 }}
</div>
<i v-if="!form.goodsRes.logoOfOurSchool" class="icon el-icon-lock"></i>
<i v-if="!form.goodsRes.logoOfOurSchool"
class="icon el-icon-lock"></i>
</div>
</div>
</div>
@ -58,23 +103,33 @@
<div class="products">
<h6>热门产品推荐</h6>
<ul class="product">
<li v-for="(item, i) in hots" :key="i" @click="toDetail(item.mallId)">
<img :src="item.coverDrawing" alt="" />
<img v-if="item.logoOfOurSchool" class="my-school" src="@/assets/img/my-school.png" alt="">
<li v-for="(item, i) in hots"
:key="i"
@click="toDetail(item.mallId)">
<img :src="item.coverDrawing"
alt="" />
<img v-if="item.logoOfOurSchool"
class="my-school"
src="@/assets/img/my-school.png"
alt="">
<div class="texts">
<div class="title">{{ item.productName }}</div>
<div :class="['desc', {'not-tag': !item.tagsName}]" v-html="item.productIntroduction"></div>
<div v-if="item.tagsName" class="tags">
<el-tag v-for="(tag, i) in item.tagsName.split(',')" :key="i" class="tag">{{ tag }}</el-tag>
<div :class="['desc', {'not-tag': !item.tagsName}]"
v-html="item.productIntroduction"></div>
<div v-if="item.tagsName"
class="tags">
<el-tag v-for="(tag, i) in item.tagsName.split(',')"
:key="i"
class="tag">{{ tag }}</el-tag>
</div>
<div class="metas">
<el-tag
v-if="item.selected"
<el-tag v-if="item.selected"
type="danger"
effect="dark">
官方精选
</el-tag>
<div v-if="item.isCourse" class="meta">{{ item.learningCount }}人学过</div>
<div v-if="item.isCourse"
class="meta">{{ item.learningCount }}人学过</div>
</div>
</div>
</li>
@ -84,11 +139,20 @@
</div>
<!-- 选择链接 -->
<el-dialog title="请选择链接" :visible.sync="linkVisible" width="420px" center :close-on-click-modal="false">
<div v-if="withLink" class="buy">
<div v-for="(link, i) in form.mallNonAssociatedLinks" :key="i" class="link-line">
<el-dialog title="请选择链接"
:visible.sync="linkVisible"
width="420px"
center
:close-on-click-modal="false">
<div v-if="withLink"
class="buy">
<div v-for="(link, i) in form.mallNonAssociatedLinks"
:key="i"
class="link-line">
{{ link.urlName }}
<a class="url" :href="link.url" target="_blank">{{ link.url }}</a>
<a class="url"
:href="link.url"
target="_blank">{{ link.url }}</a>
</div>
</div>
</el-dialog>
@ -116,7 +180,8 @@ export default {
},
chapterList: [],
hots: [],
linkVisible: false
linkVisible: false,
height: ''
};
},
computed: {
@ -161,6 +226,9 @@ export default {
this.form = e
this.chapterList = ''
e.mall.associatedProduct && this.getChapter()
this.$nextTick(() => {
this.height = document.querySelector('#fields').clientHeight + 'px'
})
}).catch(err => { })
},
//
@ -175,7 +243,7 @@ export default {
//
toPreview (i, j) {
this.form.goodsRes.logoOfOurSchool ?
this.$router.push(`/station/preview?courseId=${this.form.mall.associatedProduct}&curriculumName=${this.form.mall.associatedProductName}&mallId=${this.id}&chapter=${i}&section=${j}`) :
this.$router.push(`/station/preview?courseId=${this.form.mall.associatedProduct}&curriculumName=${this.form.mall.associatedProductName}&mallId=${this.id}&chapter=${i}&section=${j}&admin=1`) :
this.toTrail()
},
// /
@ -237,7 +305,7 @@ export default {
<style lang="scss" scoped>
.wrap {
background: #F3F6FA;
background: #f3f6fa;
.inner {
width: 1154px;
margin: 0 auto;
@ -263,6 +331,12 @@ export default {
&:last-child {
margin-right: 0;
}
&:only-child {
// max-height: 266px;
// height: auto;
height: 100%;
margin: 0;
}
}
}
.right {
@ -272,14 +346,14 @@ export default {
h6 {
font-size: 24px;
font-weight: 600;
color: #2E2D31;
color: #2e2d31;
}
.meta {
margin: 10px 0;
font-size: 12px;
color: #2E2D31;
color: #2e2d31;
.val {
color: #007EFF;
color: #007eff;
}
}
.des {
@ -287,20 +361,24 @@ export default {
font-size: 14px;
color: #666;
line-height: 20px;
@include mul-ellipsis(3);
}
.field {
font-size: 14px;
color: #2E2D31;
color: #2e2d31;
.label {
color: #333;
}
}
.fields {
display: flex;
justify-content: space-between;
// justify-content: space-between;
flex-wrap: wrap;
height: 60px;
margin: 10px 0 10px;
overflow: hidden;
.field {
margin-right: 40px;
margin-bottom: 10px;
}
}
@ -308,19 +386,19 @@ export default {
width: 119px;
height: 46px;
color: #fff;
background: #64C25A;
background: #64c25a;
border-radius: 6px;
border: 0;
cursor: pointer;
&:hover {
opacity: .9;
opacity: 0.9;
}
&:first-child {
margin-left: 11px;
}
}
.entry {
background: #007EFF;
background: #007eff;
}
}
.tab {
@ -331,7 +409,7 @@ export default {
margin-right: 20px;
font-size: 18px;
line-height: 25px;
color: #0B1D30;
color: #0b1d30;
cursor: pointer;
&:after {
content: '';
@ -343,7 +421,7 @@ export default {
transform: translateX(-50%);
}
&.active:after {
background-color: #007EFF;
background-color: #007eff;
}
}
}
@ -355,7 +433,6 @@ export default {
padding: 20px 24px;
background-color: #fff;
border-radius: 10px;
}
}
.courses {
@ -388,8 +465,8 @@ export default {
margin-right: 8px;
}
&:hover {
color: #007EFF;
background: #F6FBFF;
color: #007eff;
background: #f6fbff;
}
.val {
display: inline-flex;
@ -406,7 +483,7 @@ export default {
margin-left: 24px;
& > h6 {
font-size: 14px;
color: #0B1D30;
color: #0b1d30;
}
}
.product {
@ -422,7 +499,7 @@ export default {
img {
width: 100%;
height: 140px;
transition: .3s;
transition: 0.3s;
}
.my-school {
position: absolute;
@ -436,7 +513,7 @@ export default {
}
.title {
margin-bottom: 10px;
color: #0B1D30;
color: #0b1d30;
font-size: 14px;
font-weight: 600;
word-wrap: break-word;
@ -447,7 +524,7 @@ export default {
}
.desc {
min-height: 34px;
color: #757F92;
color: #757f92;
font-size: 12px;
display: -webkit-box;
-webkit-box-orient: vertical;
@ -462,8 +539,8 @@ export default {
}
.tag {
margin-right: 8px;
color: #007EFF;
background-color: #F9F9F9;
color: #007eff;
background-color: #f9f9f9;
border: 0;
}
.type {
@ -471,7 +548,7 @@ export default {
padding: 4px 11px;
font-size: 12px;
color: #666;
border: 1px solid #DADADA;
border: 1px solid #dadada;
border-radius: 20px;
}
.metas {
@ -483,7 +560,7 @@ export default {
.meta {
display: inline-flex;
align-items: center;
color: #B5BFD5;
color: #b5bfd5;
font-size: 12px;
.icon {
width: 14px;
@ -492,7 +569,8 @@ export default {
}
}
&:hover {
box-shadow: 0px 5px 12px 4px rgba(142, 123, 253, 0.09), 0px 3px 6px 0px rgba(142, 123, 253, 0.12), 0px 1px 2px -2px rgba(142, 123, 253, 0.16);
box-shadow: 0px 5px 12px 4px rgba(142, 123, 253, 0.09), 0px 3px 6px 0px rgba(142, 123, 253, 0.12),
0px 1px 2px -2px rgba(142, 123, 253, 0.16);
img {
transform: scale(1.05);
}
@ -503,7 +581,7 @@ export default {
.link-line {
margin: 5px 0;
.url {
color: #007EFF;
color: #007eff;
text-decoration: underline;
}
}

@ -1,39 +1,53 @@
<template>
<div ref="main" class="main">
<div ref="main"
class="main">
<el-form :disabled="isDetail">
<el-card shadow="hover" class="m-b-20">
<el-card shadow="hover"
class="m-b-20">
<div class="flex-between">
<el-page-header @back="back" content="项目配置"></el-page-header>
<el-page-header @back="back"
content="项目配置"></el-page-header>
<div v-if="!isDetail">
<el-button type="success" @click="save(0)">保存为草稿</el-button>
<el-button type="primary" @click="save(1)">确定并发布</el-button>
<el-button type="success"
@click="save(0)">保存为草稿</el-button>
<el-button type="primary"
@click="save(1)">确定并发布</el-button>
</div>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<el-card shadow="hover"
class="m-b-20">
<h6 class="p-title">基本信息</h6>
<div>
<el-form label-width="80px" :disabled="isDetail">
<el-form label-width="80px"
:disabled="isDetail">
<div class="flex">
<el-form-item label="系统">
<el-select v-model="projectManage.systemId" placeholder="请选择" @change="systemChange">
<el-option
v-for="item in systemList"
<el-select v-model="projectManage.systemId"
placeholder="请选择"
@change="systemChange">
<el-option v-for="item in systemList"
:key="item.id"
:label="item.label"
:value="item.id"
></el-option>
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="项目名称">
<el-input v-model.trim="projectManage.projectName" placeholder="20个字符以内" @blur="projectNameExistis"></el-input>
<el-input v-model.trim="projectManage.projectName"
placeholder="20个字符以内"
@blur="projectNameExistis"></el-input>
</el-form-item>
<el-form-item label="项目权限">
<el-select v-model="projectManage.permissions" placeholder="请选择" @change="permissionChange">
<el-option label="练习" :value="0"></el-option>
<el-option label="考核" :value="1"></el-option>
<el-option label="竞赛" :value="2"></el-option>
<el-select v-model="projectManage.permissions"
placeholder="请选择"
@change="permissionChange">
<el-option label="练习"
:value="0"></el-option>
<el-option label="考核"
:value="1"></el-option>
<el-option label="竞赛"
:value="2"></el-option>
</el-select>
</el-form-item>
</div>
@ -41,100 +55,158 @@
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<el-card shadow="hover"
class="m-b-20">
<h6 class="p-title">实验目标</h6>
<div>
<el-form label-width="0">
<el-form-item>
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentTarget" :minHeight="150" :height="150" />
<quill :border="true"
:readonly="isDetail"
v-model="projectManage.experimentTarget"
:minHeight="150"
:height="150" />
</el-form-item>
</el-form>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<el-card shadow="hover"
class="m-b-20">
<h6 class="p-title">项目背景</h6>
<div>
<el-form label-width="0">
<el-form-item>
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentDescription" :minHeight="150" :height="150" :index="1" />
<quill :border="true"
:readonly="isDetail"
v-model="projectManage.experimentDescription"
:minHeight="150"
:height="150"
:index="1" />
</el-form-item>
</el-form>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<el-card shadow="hover"
class="m-b-20">
<div class="m-b-20 flex-between">
<h6 class="p-title" style="margin-bottom: 0">实验任务</h6>
<h6 class="p-title"
style="margin-bottom: 0">实验任务</h6>
<div>
<!--<el-button :disabled="isDetail" type="primary" @click="toJudgePoint('home')">进入判分点</el-button>-->
</div>
</div>
<div class="m-b-20 flex-between">
<div class="flex-center">
<div class="m-r-20" style="color: #f00">项目总分值100</div>
<div class="m-r-20"
style="color: #f00">项目总分值100</div>
<!-- <div>权重&emsp;<div class="dib"><el-input></el-input></div></div> -->
</div>
<div>
<el-button class="m-r-20" type="text" @click="avgDistributionScore">平均分配分值</el-button>
<el-button class="m-r-20" type="text" @click="manualDistributionScore">手动分配分值</el-button>
<el-button class="m-r-20"
type="text"
@click="avgDistributionScore">平均分配分值</el-button>
<el-button class="m-r-20"
type="text"
@click="manualDistributionScore">手动分配分值</el-button>
<span>(待分配分值: {{ handDistributionScore }}/100)</span>
</div>
</div>
<el-button type="primary" icon="el-icon-plus" round @click="handleQueryJudgment" style="margin-bottom: 10px">判分点</el-button>
<el-button type="primary" icon="el-icon-delete" round @click="batchDeleteProjectJudgment" style="margin-bottom: 10px">批量删除</el-button>
<el-button type="primary"
icon="el-icon-plus"
round
@click="handleQueryJudgment"
style="margin-bottom: 10px">判分点</el-button>
<el-button type="primary"
icon="el-icon-delete"
round
@click="batchDeleteProjectJudgment"
style="margin-bottom: 10px">批量删除</el-button>
<div class="draggable">
<el-table
ref="projectJudgementTable"
<el-table ref="projectJudgementTable"
:data="projectJudgmentData"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionProjectJudgment"
row-key="judgmentId"
v-loading="listLoading"
>
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column prop="sort" label="序号" width="80" align="center">
v-loading="listLoading">
<el-table-column type="selection"
width="55"
align="center"></el-table-column>
<el-table-column prop="sort"
label="序号"
width="80"
align="center">
<template slot-scope="scope">
{{ scope.row.sort }}
</template>
</el-table-column>
<el-table-column prop="name" label="判分指标" align="center"></el-table-column>
<el-table-column prop="name" label="判分点名称" align="center"></el-table-column>
<el-table-column label="实验要求" align="center" width="600">
<el-table-column prop="name"
label="判分指标"
align="center"></el-table-column>
<el-table-column prop="name"
label="判分点名称"
align="center"></el-table-column>
<el-table-column label="实验要求"
align="center"
width="600">
<template slot-scope="scope">
<quill :border="true" :readonly="true" elseRead="true" v-model="scope.row.experimentalRequirements" :minHeight="150" :height="150" :index="2" />
<quill :border="true"
:readonly="true"
elseRead="true"
v-model="scope.row.experimentalRequirements"
:minHeight="150"
:height="150"
:index="2" />
</template>
</el-table-column>
<el-table-column prop="score" label="分数" align="center" width="120">
<el-table-column prop="score"
label="分数"
align="center"
width="120">
<template slot-scope="scope">
<!--type="number" @blur="updateProjectJudgment"-->
<el-input v-model.trim="scope.row.score" @input="scoreChange(scope.row, scope.$index,$event)"></el-input>
<el-input v-model.trim="scope.row.score"
@input="scoreChange(scope.row, scope.$index,$event)"></el-input>
</template>
</el-table-column>
<el-table-column label="操作" width="100" align="center">
<el-table-column label="操作"
width="100"
align="center">
<template slot-scope="scope">
<!--<el-button :disabled="isDetail" type="text" style="margin-right: 10px" @click="toJudgePoint('edit', scope.row)">自定义</el-button>-->
<el-button type="text" @click="delJudgePoint(scope.$index)">删除</el-button>
<el-button type="text"
@click="delJudgePoint(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<el-card shadow="hover"
class="m-b-20">
<div class="m-b-20 flex-between">
<h6 class="p-title" style="margin-bottom: 0">实验提示</h6>
<h6 class="p-title"
style="margin-bottom: 0">实验提示</h6>
<div>
启用
<el-switch :active-value="0" :inactive-value="1" v-model="projectManage.hintOpen"></el-switch>
<el-switch :active-value="0"
:inactive-value="1"
v-model="projectManage.hintOpen"></el-switch>
</div>
</div>
<div>
<el-form label-width="0">
<el-form-item prop="tips" label="">
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentHint" :minHeight="150" :height="150" :index="3" />
<el-form-item prop="tips"
label="">
<quill :border="true"
:readonly="isDetail"
v-model="projectManage.experimentHint"
:minHeight="150"
:height="150"
:index="3" />
</el-form-item>
</el-form>
</div>
@ -142,14 +214,19 @@
</el-form>
<!--选择判分点对话框-->
<el-dialog title="添加判分点" :visible.sync="dialogVisible" width="40%" :close-on-click-modal="false">
<el-dialog title="添加判分点"
:visible.sync="dialogVisible"
width="40%"
:close-on-click-modal="false">
<div class="text-right m-b-10">
<div>
<el-input placeholder="请输入需要查找的判分点" prefix-icon="el-icon-search" v-model.trim="judgementpointsquery" clearable></el-input>
<el-input placeholder="请输入需要查找的判分点"
prefix-icon="el-icon-search"
v-model.trim="judgementpointsquery"
clearable></el-input>
</div>
</div>
<el-table
v-loading="visibleLoading"
<el-table v-loading="visibleLoading"
:data="judgementData"
ref="judgementTable"
class="table"
@ -157,24 +234,36 @@
header-align="center"
max-height="400"
@selection-change="handleSelectionJudgment"
:row-key="rowKey"
>
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column prop="id" label="序号" align="center" width="100">
:row-key="rowKey">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column prop="id"
label="序号"
align="center"
width="100">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="name" label="判分点名称" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="100">
<el-table-column prop="name"
label="判分点名称"
align="center"></el-table-column>
<el-table-column label="操作"
align="center"
width="100">
<template slot-scope="scope">
<el-button size="mini" @click="toJudgePoint('view', scope.row)">查看</el-button>
<el-button size="mini"
@click="toJudgePoint('view', scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<div slot="footer"
class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="addJudgment"> </el-button>
<el-button type="primary"
@click="addJudgment"> </el-button>
</div>
</el-dialog>
</div>

@ -1,7 +1,10 @@
<template>
<div>
<el-card v-if="showBack" shadow="hover" class="m-b-20">
<el-page-header content="实验项目管理" @back="goBack"></el-page-header>
<el-card v-if="showBack"
shadow="hover"
class="m-b-20">
<el-page-header content="实验项目管理"
@back="goBack"></el-page-header>
</el-card>
<div class="page">
<h6 class="p-title">筛选</h6>
@ -9,41 +12,41 @@
<ul class="filter">
<li>
<label>创建人</label>
<el-select v-model="queryData.founder" placeholder="请选择创建人" @change="founderChange">
<el-option
v-for="(item,index) in founderList"
<el-select v-model="queryData.founder"
placeholder="请选择创建人"
@change="founderChange">
<el-option v-for="(item,index) in founderList"
:key="index"
:label="item.label"
:value="item.value"
></el-option>
:value="item.value"></el-option>
</el-select>
</li>
<li>
<label>状态</label>
<el-select v-model="queryData.state" clearable placeholder="请选择状态" @change="initData">
<el-option
v-for="(item,index) in stateList"
<el-select v-model="queryData.state"
clearable
placeholder="请选择状态"
@change="initData">
<el-option v-for="(item,index) in stateList"
:key="index"
:label="item.label"
:value="item.value"
></el-option>
:value="item.value"></el-option>
</el-select>
</li>
<li>
<label>权限</label>
<el-select v-model="queryData.permissions" placeholder="请选择" @change="initData">
<el-option
v-for="item in permissionsList"
<el-select v-model="queryData.permissions"
placeholder="请选择"
@change="initData">
<el-option v-for="item in permissionsList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
:value="item.value"></el-option>
</el-select>
</li>
<li>
<label>课程</label>
<el-cascader
v-model="cid"
<el-cascader v-model="cid"
:options="curs"
:props="{ checkStrictly: true, value: 'id' }"
popper-class="course-cas"
@ -70,71 +73,121 @@
</el-select>
</li> -->
<li>
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
<el-input placeholder="请输入项目名称"
prefix-icon="el-icon-search"
v-model="keyword"
clearable></el-input>
</li>
</ul>
<div>
<el-button v-auth type="info" @click="add">新增项目</el-button>
<el-button v-auth type="primary" @click="delAllData">批量删除</el-button>
<el-button v-auth
type="info"
@click="add">新增项目</el-button>
<el-button v-auth
type="primary"
@click="delAllData">批量删除</el-button>
</div>
</div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center"
<el-table :data="listData"
class="table"
ref="table"
stripe
header-align="center"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :selectable="disabledSelection"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
<el-table-column type="selection"
width="55"
align="center"
:selectable="disabledSelection"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center">
<template slot-scope="scope">{{ scope.$index + (page - 1) * pageSize + 1 }}</template>
</el-table-column>
<el-table-column prop="projectName" label="实验项目名称" min-width="400" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="founder" label="创建人" min-width="150" align="center">
<el-table-column prop="projectName"
label="实验项目名称"
min-width="400"
align="center"
show-overflow-tooltip></el-table-column>
<el-table-column prop="founder"
label="创建人"
min-width="150"
align="center">
<template slot-scope="scope">
{{ founderKeys[scope.row.founder] }}
</template>
</el-table-column>
<el-table-column label="权限" min-width="120" align="center">
<el-table-column label="权限"
min-width="120"
align="center">
<template slot-scope="scope">
{{ permissionsKeys[scope.row.permissions] }}
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" min-width="150" align="center"></el-table-column>
<el-table-column prop="status" label="状态" min-width="100" align="center">
<el-table-column prop="createTime"
label="创建时间"
min-width="150"
align="center"></el-table-column>
<el-table-column prop="status"
label="状态"
min-width="100"
align="center">
<template slot-scope="scope">
{{ stateKeys[scope.row.state] }}
</template>
</el-table-column>
<el-table-column label="操作" width="300" align="center">
<el-table-column label="操作"
width="300"
align="center">
<template slot-scope="scope">
<el-button type="text" @click="edit(scope.row, 1)">查看</el-button>
<el-button v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))" type="text" @click="edit(scope.row)">编辑</el-button>
<el-button v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))" type="text" @click="handleDelete(scope.row.projectId)">删除</el-button>
<el-button v-auth type="text" @click="copyData(scope.row.projectId)">复制</el-button>
<el-switch
v-auth="'禁用'"
<el-button type="text"
@click="edit(scope.row, 1)">查看</el-button>
<el-button v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))"
type="text"
@click="edit(scope.row)">编辑</el-button>
<el-button v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))"
type="text"
@click="handleDelete(scope.row.projectId)">删除</el-button>
<el-button v-auth
type="text"
@click="copyData(scope.row.projectId)">复制</el-button>
<el-switch v-auth="'禁用'"
v-if="scope.row.state"
v-model="scope.row.ccupationlabOpen"
:active-text="scope.row.ccupationlabOpen ? '关闭' : '启用'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 10px"
@change="switchOff(scope.row)"
></el-switch>
@change="switchOff(scope.row)"></el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="handleCurrentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
<el-pagination background
@current-change="handleCurrentChange"
:current-page="page"
layout="total, prev, pager, next"
:total="total"></el-pagination>
</div>
<el-dialog title="复制" :visible.sync="copyVisible" width="24%" center :close-on-click-modal="false">
<el-dialog title="复制"
:visible.sync="copyVisible"
width="24%"
center
:close-on-click-modal="false">
<el-form>
<el-form-item>
<!--前端不用做名称判重了@change='projectNameExistis'-->
<el-input placeholder="请输入项目名称" v-model="projectName"></el-input>
<el-input placeholder="请输入项目名称"
v-model="projectName"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<span slot="footer"
class="dialog-footer">
<el-button @click="copyVisible = false"> </el-button>
<el-button type="primary" @click="copySubmit"> </el-button>
<el-button type="primary"
@click="copySubmit"> </el-button>
</span>
</el-dialog>
</div>
@ -452,5 +505,4 @@ export default {
</script>
<style lang="scss" scoped>
</style>

@ -3,21 +3,34 @@
<div class="wrap">
<div class="search">
<h6>创新实验智能教学</h6>
<div class="input" v-auth="'搜索'">
<img src="@/assets/img/search.png" alt="">
<input type="text" placeholder="请输入关键词" v-model="keyword">
<div class="input"
v-auth="'搜索'">
<img src="@/assets/img/search.png"
alt="">
<input type="text"
placeholder="请输入关键词"
v-model="keyword">
</div>
</div>
<div class="station">
<div class="inner">
<div class="tab">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{active: item.id == active}" @click="tabChange(item)">{{ item.name }}</a>
<a class="item"
v-for="(item, i) in tabs"
:key="i"
:class="{active: item.id == active}"
@click="tabChange(item)">{{ item.name }}</a>
</div>
<div class="curs">
<template v-if="curriculumList.length">
<template v-for="(item,index) in curriculumList">
<div class="item" :title="item.curriculumName" @click="goPreview(item)" :key="index" v-if="!keyword || item.curriculumName.includes(keyword)">
<img :src="item.coverUrl" alt="">
<div class="item"
:title="item.curriculumName"
@click="goPreview(item)"
:key="index"
v-if="!keyword || item.curriculumName.includes(keyword)">
<img :src="item.coverUrl"
alt="">
<div class="bottom">
<p class="text"><span>{{ item.goodsName || item.curriculumName }}</span></p>
<a>进入实验</a>
@ -25,9 +38,11 @@
</div>
</template>
</template>
<div class="empty flex-1" v-else>
<div class="empty flex-1"
v-else>
<div>
<img src="@/assets/img/none.png" alt="">
<img src="@/assets/img/none.png"
alt="">
<p>暂无数据</p>
</div>
</div>
@ -76,7 +91,7 @@ export default {
});
},
goPreview (item) {
this.$router.push(`/station/preview?courseId=${item.cid}&curriculumName=${item.curriculumName}&mallId=${item.mallId || ''}`);
this.$router.push(`/station/preview?courseId=${item.cid}&curriculumName=${item.curriculumName}&mallId=${item.mallId || ''}&admin=1`);
},
// tab
tabChange (item) {
@ -138,8 +153,8 @@ export default {
border-bottom: 3px solid transparent;
cursor: pointer;
&.active {
color: #007EFF;
border-color: #007EFF;
color: #007eff;
border-color: #007eff;
}
}
}
@ -166,7 +181,7 @@ export default {
border-radius: 8px;
cursor: pointer;
&:hover {
opacity: .9;
opacity: 0.9;
}
img {
width: 215px;
@ -197,9 +212,9 @@ export default {
padding: 0 8px;
line-height: 28px;
font-size: 14px;
color: #7A7A7A;
color: #7a7a7a;
border-radius: 20px;
border: 1px solid #DADADA;
border: 1px solid #dadada;
}
}
}

@ -1,42 +1,63 @@
<template>
<div style="padding: 24px">
<el-card shadow="hover" class="m-b-20">
<el-card shadow="hover"
class="m-b-20">
<div class="flex-between">
<el-page-header @back="goBack" :content="curriculumName"></el-page-header>
<el-page-header @back="goBack"
:content="curriculumName"></el-page-header>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20" style="background: none;">
<el-card shadow="hover"
class="m-b-20"
style="background: none;">
<div class="flex">
<div class="cover" :class="{'is-word': showMask1}">
<div class="cover"
: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">
<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:100%;background: #393A3D;height: 30px;top: 53px;"></div>
<div class="mask" style="width:100%;background: #393A3D;height: 30px;top: 53px;"></div>
<div class="mask"
style="width:100%;background: #393A3D;height: 30px;top: 53px;"></div>
<div class="mask"
style="width:100%;background: #393A3D;height: 30px;top: 53px;"></div>
</template>
<template v-if="showMask1">
<div class="word-mask" style="height: 40px;"></div>
<div class="word-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">
<img class="full" src="@/assets/img/screen/full.png" alt="" @click="fullScreen">
<div class="pdf inner"
v-else-if="pdfSrc">
<img class="full"
src="@/assets/img/screen/full.png"
alt=""
@click="fullScreen">
<p class="arrow">
<span @click="changePdfPage(0)" class="turn el-icon-arrow-left"
<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"
<span @click="changePdfPage(1)"
class="turn el-icon-arrow-right"
:class="{grey: currentPage==pageCount}"></span>
</p>
<div style='color:#393A3D;height: 30px;background: #393A3D;'></div>
<pdf
class="pdf-wrap"
<pdf class="pdf-wrap"
:src="pdfSrc"
:page="currentPage"
@num-pages="pageCount=$event"
@ -44,47 +65,73 @@
@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="m-b-20">
<el-button v-if="!overdue" class="entry" type="primary" size="small" @click="showBuy">续费</el-button>
<el-button v-else class="entry" type="primary" @click="entry"> </el-button>
<el-button v-if="!overdue"
class="entry"
type="primary"
size="small"
@click="showBuy">续费</el-button>
<el-button v-else
class="entry"
type="primary"
@click="entry"> </el-button>
</div>
<div class="list">
<h4 class="title">{{ courseName }}</h4>
<div>
<h6 class="pro-title">当前教学进度</h6>
<el-progress :stroke-width="12" :percentage="schedule" :format="percentFormat" :text-color="'#fff'"></el-progress>
<el-progress :stroke-width="12"
:percentage="schedule"
:format="percentFormat"
:text-color="'#fff'"></el-progress>
</div>
<div class="types">
<div :class="['item', { active: type === 1 }]" @click="typeChange(1)">
<div :class="['item', { active: type === 1 }]"
@click="typeChange(1)">
<i class="icon el-icon-notebook-2"></i> 目录
</div>
<div :class="['item', { active: type === 2 }]" @click="typeChange(2)">
<div :class="['item', { active: type === 2 }]"
@click="typeChange(2)">
<i class="icon el-icon-timer"></i> 教学进度
</div>
</div>
<div class="chapters">
<template v-if="type === 1">
<template v-if="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" :title="section.name" :class="{active: curLink === `${item.name}${section.name}`}">{{ section.name }}</p>
<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"
:title="section.name"
:class="{active: curLink === `${item.name}${section.name}`}">{{ section.name }}</p>
</div>
</div>
</div>
</template>
</template>
<div v-else class="section">
<p class="sectionName" v-for="(item, i) in progressList" :key="i" :title="item.projectName">
<div v-else
class="section">
<p class="sectionName"
v-for="(item, i) in progressList"
:key="i"
:title="item.projectName">
{{ i + 1 }}.
{{ item.projectName }}
<i :class="['icon', item.whetherToStudyOrNot ? 'el-icon-success' : 'circle']" @click.stop="studySection(item)"></i>
<i :class="['icon', item.whetherToStudyOrNot ? 'el-icon-success' : 'circle']"
@click.stop="studySection(item)"></i>
</p>
</div>
</div>
@ -93,35 +140,44 @@
</div>
</el-card>
<div class="tabs">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{active: item.id == active}" @click="tabChange(item)">{{ item.name }}</a>
<a class="item"
v-for="(item, i) in tabs"
:key="i"
:class="{active: item.id == active}"
@click="tabChange(item)">{{ item.name }}</a>
</div>
<div class="tab-content">
<template v-if="active === 1">
<el-card shadow="hover" class="m-t-20 m-b-20">
<h4 style="margin-bottom: 10px;font-size: 16px;">课程简介</h4>
<el-card shadow="hover"
class="m-t-20 m-b-20">
<div v-html="briefIntroduction"></div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<h4 style="margin-bottom: 10px;font-size: 16px;">课程目标</h4>
<div v-html="teachingObjectives"></div>
</el-card>
</template>
<template v-if="active === 2">
<div class="page">
<template v-if="showNoteAdd">
<el-form class="form" ref="form" label-width="120px" center>
<el-form-item class="required" label="笔记标题">
<el-input placeholder="请输入笔记标题" v-model="noteForm.noteName" maxlength="30" style="width: 400px"></el-input>
<el-form class="form"
ref="form"
label-width="120px"
center>
<el-form-item class="required"
label="笔记标题">
<el-input placeholder="请输入笔记标题"
v-model="noteForm.noteName"
maxlength="30"
style="width: 400px"></el-input>
</el-form-item>
<el-form-item class="required" label="笔记内容">
<Editor api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda' v-model="noteForm.noteContent" :init="editorConfig" />
<el-form-item class="required"
label="笔记内容">
<Editor api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda'
v-model="noteForm.noteContent"
:init="editorConfig" />
</el-form-item>
</el-form>
<div class="text-right">
<el-button type="primary" @click="submitNote">保存</el-button>
<el-button type="primary"
@click="submitNote">保存</el-button>
</div>
</template>
<template v-else>
@ -129,26 +185,34 @@
<ul class="filter">
<li>
<label>搜索</label>
<el-input placeholder="请输入标题" v-model="noteKeyword" clearable></el-input>
<el-input placeholder="请输入标题"
v-model="noteKeyword"
clearable></el-input>
</li>
</ul>
<div>
<el-button type="primary" @click="addNote">新增笔记</el-button>
<el-button type="primary"
@click="addNote">新增笔记</el-button>
</div>
</div>
<el-timeline class="timeline">
<el-timeline-item placement="top" v-for="(item, i) in notes" :key="i">
<el-timeline-item placement="top"
v-for="(item, i) in notes"
:key="i">
<p class="sign">{{ item.createTime }}</p>
<div class="ver">
<div>
{{ item.noteName }}
<span class="action">
<i class="el-icon-edit-outline" @click="editNote(item)"></i>
<i class="el-icon-delete" @click="delNote(item)"></i>
<i class="el-icon-edit-outline"
@click="editNote(item)"></i>
<i class="el-icon-delete"
@click="delNote(item)"></i>
</span>
</div>
</div>
<div class="des" v-html="item.noteContent"></div>
<div class="des"
v-html="item.noteContent"></div>
</el-timeline-item>
</el-timeline>
</template>
@ -156,84 +220,131 @@
</template>
<template v-if="active === 4">
<div class="page">
<quill ref="quill" :border="true" v-model="msg" :height="150" :toTop="false" />
<quill ref="quill"
:border="true"
v-model="msg"
:height="150"
:toTop="false" />
<ul class="msg">
<li v-for="(item, i) in msgs" :key="i">
<li v-for="(item, i) in msgs"
:key="i">
<div class="li-wrap">
<img :src="item.avatar" alt="" class="avatar">
<img :src="item.avatar"
alt=""
class="avatar">
<div class="texts">
<h6>
<span class="name">{{ item.userName }}</span>
发表于 {{ item.createDate }}
</h6>
<div class="des" v-html="item.content"></div>
<div class="des"
v-html="item.content"></div>
</div>
<div class="action">
<i class="icon el-icon-chat-dot-square"></i>
<i class="icon el-icon-delete"></i>
<img class="icon" src="@/assets/img/like.png" alt="">
<img class="icon"
src="@/assets/img/like.png"
alt="">
</div>
</div>
<div class="reply" v-if="item.showReply">
<quill :border="true" v-model="item.replyContent" :toTop="false" :height="150" />
<div class="reply"
v-if="item.showReply">
<quill :border="true"
v-model="item.replyContent"
:toTop="false"
:height="150" />
<div class="m-t-10 text-right">
<el-button type="primary" size="mini">提交</el-button>
<el-button type="primary"
size="mini">提交</el-button>
</div>
</div>
<ul class="msg children" v-if="item.showChildren">
<li v-for="(reply,i) in item.children" :key="i">
<ul class="msg children"
v-if="item.showChildren">
<li v-for="(reply,i) in item.children"
:key="i">
<div class="li-wrap">
<img class="avatar" :src="reply.avatar" alt="">
<img class="avatar"
:src="reply.avatar"
alt="">
<div class="texts">
<div class="name">{{reply.userName}}</div>
<div class="des" v-html="reply.content"></div>
<div class="des"
v-html="reply.content"></div>
<div class="date">{{reply.createDate}}</div>
</div>
<div class="action">
<i class="icon el-icon-chat-dot-square"></i>
<i class="icon el-icon-delete"></i>
<img class="icon" src="@/assets/img/like.png" alt="">
<img class="icon"
src="@/assets/img/like.png"
alt="">
</div>
</div>
<div class="reply" v-if="reply.showReply">
<quill :border="true" v-model="reply.replyContent" :toTop="false" :height="150" />
<div class="reply"
v-if="reply.showReply">
<quill :border="true"
v-model="reply.replyContent"
:toTop="false"
:height="150" />
<div class="m-t-10 text-right">
<el-button type="primary" size="mini">提交</el-button>
<el-button type="primary"
size="mini">提交</el-button>
</div>
</div>
</li>
</ul>
<div v-if="item.getCommentReplyNum" class="toggle"><span @click="item.showChildren = !item.showChildren">{{item.showChildren ? '收起所有回复' : `查看所有${item.getCommentReplyNum}条回复`}} <i class="el-icon-arrow-down"></i></span></div>
<div v-if="item.getCommentReplyNum"
class="toggle"><span @click="item.showChildren = !item.showChildren">{{item.showChildren ? '收起所有回复' : `查看所有${item.getCommentReplyNum}条回复`}} <i class="el-icon-arrow-down"></i></span></div>
</li>
</ul>
</div>
</template>
</div>
<el-dialog title="请选择项目" v-loading="loading" :visible.sync="projectVisible" width="828px" custom-class="project-dia" :close-on-click-modal="false">
<el-dialog title="请选择项目"
v-loading="loading"
:visible.sync="projectVisible"
width="828px"
custom-class="project-dia"
:close-on-click-modal="false">
<ul class="projects">
<li v-for="(item, i) in projects" :key="i" :class="{active: curProject == item.projectId}" @click="selectProject(item)">
<img src="@/assets/img/project.png" alt="">
<li v-for="(item, i) in projects"
:key="i"
:class="{active: curProject == item.projectId}"
@click="selectProject(item)">
<img src="@/assets/img/project.png"
alt="">
<span>{{ i + 1 }}. {{ item.projectName }}</span>
</li>
</ul>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="projectVisible = false"> </el-button>
<el-button size="small" type="primary" @click="toSub"> </el-button>
<span slot="footer"
class="dialog-footer">
<el-button size="small"
@click="projectVisible = false"> </el-button>
<el-button size="small"
type="primary"
@click="toSub"> </el-button>
</span>
</el-dialog>
<!-- 购买弹框 -->
<el-dialog title="温馨提示" :visible.sync="buyVisible" width="420px" center :close-on-click-modal="false">
<el-dialog title="温馨提示"
:visible.sync="buyVisible"
width="420px"
center
:close-on-click-modal="false">
<div class="buy">
<p class="tips">该课程订阅期限已到期若需要续费请扫码添加客服咨询</p>
<img src="@/assets/img/wechat-code.jpeg" alt="">
<img src="@/assets/img/wechat-code.jpeg"
alt="">
</div>
</el-dialog>
<pdfDia :key="pdfVisible" :visible.sync="pdfVisible" :src.sync="pdfSrc"/>
<pdfDia :key="pdfVisible"
:visible.sync="pdfVisible"
:src.sync="pdfSrc" />
</div>
</template>
@ -252,10 +363,11 @@ export default {
return {
editorConfig,
courseId: this.$route.query.courseId,
mallId: this.$route.query.mallId,
mallId: this.$route.query.mallId || '',
curriculumName: this.$route.query.curriculumName,
chapter: this.$route.query.chapter,
section: this.$route.query.section,
fromAdmin: this.$route.query.admin, // or
type: 1,
video: "http://liuwanr.oss-cn-shenzhen.aliyuncs.com/mp4/20200519/1589871025648.mp4",
chapterList: [], //
@ -367,7 +479,9 @@ export default {
},
methods: {
goBack () {
this.$router.back()
this.fromAdmin ?
this.$router.back() :
this.$router.push('/station')
},
async getData () {
let { data } = await this.$post(`${this.api.curriculumDetail}?cid=${this.courseId}&mallId=${this.mallId}`);
@ -671,6 +785,7 @@ export default {
util.cookies.set('stopTime', '', -1)
projectId ? util.cookies.set('projectId', projectId) : util.cookies.set('projectId', '', -1)
util.cookies.set('token', token)
util.cookies.set('mallId', this.mallId)
util.cookies.set('courseId', this.courseId)
util.cookies.set('curriculumName', escape(this.curriculumName))
util.cookies.set('systemId', id)
@ -709,7 +824,7 @@ export default {
</script>
<style lang="scss" scoped>
@import "../../../styles/page/station.scss";
@import '../../../styles/page/station.scss';
$height: 700px;
.page {
margin: 12px 0;
@ -719,7 +834,8 @@ $height: 700px;
line-height: 24px;
}
}
.video_wid,.cover{
.video_wid,
.cover {
position: relative;
width: 76%;
height: $height !important;
@ -773,7 +889,8 @@ $height: 700px;
.fileIframe {
height: $height !important;
}
.video_wid,.inner{
.video_wid,
.inner {
width: 100%;
height: 100% !important;
border: 0;
@ -873,7 +990,7 @@ $height: 700px;
cursor: pointer;
@include ellipsis;
&.active {
color: #9278FF;
color: #9278ff;
}
.icon {
position: absolute;
@ -901,10 +1018,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 {
@ -1023,12 +1140,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) {

Loading…
Cancel
Save