mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-14 05:16:43 +08:00
代码清理
This commit is contained in:
@@ -51,39 +51,12 @@
|
||||
<div v-else class="uavatar">
|
||||
<div v-if="sex === 1 "><img src="../../public/images/Avatarman.png" alt=""></div>
|
||||
<div v-else><img src="../../public/images/Avatarwoman.png" alt=""></div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<el-link type="primary" style="margin-right:10px;" :href="`${webBaseUrl}${isTiao ? '/uc/study/task' : '/uc/study/courses'}`" :underline="false">个人中心</el-link>
|
||||
<!-- <el-button @click="logout()" type="text" icon="el-icon-switch-button">退出</el-button> -->
|
||||
<el-link type="primary" @click="logout()" icon="el-icon-switch-button" :underline="false">退出</el-link>
|
||||
</div>
|
||||
<!-- <div style="margin-left: 60px;margin-right: 30px"> -->
|
||||
<!-- <el-badge :value="userMsg" :hidden="userMsg == 0" class="message-count"> -->
|
||||
<!-- <el-link type="primary" :href="`${webBaseUrl}/message`" icon="el-icon-bell" :underline="false">消息</el-link> -->
|
||||
<!-- <el-link type="primary" :href="`${webBaseUrl}/message`" icon="el-icon-bell" :underline="false"></el-link> -->
|
||||
<!-- </el-badge> -->
|
||||
<!-- </div> -->
|
||||
<!-- <div style="margin-left: 20px;"><el-avatar :src="userInfo.avatar" style="vertical-align: middle;width:28px;height:28px;margin-right:2px;"></el-avatar></div> -->
|
||||
<!-- <div style="margin-left: 5px;"> -->
|
||||
<!-- <el-dropdown @command="handleUcCommand">
|
||||
<span class="el-dropdown-link">
|
||||
{{ userInfo.name }}
|
||||
<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="uc">个人中心</el-dropdown-item>
|
||||
<el-dropdown-item command="logout" divided>退出</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown> -->
|
||||
<!--管理员-->
|
||||
<!-- <el-link type="primary" :href="`${webBaseUrl}/course/manage`" :underline="false">个人中心</el-link> -->
|
||||
<!--学员-->
|
||||
<!-- <el-link type="primary" :href="`${webBaseUrl}${isTiao ? '/uc/study/task' : '/uc/study/courses'}`" :underline="false">个人中心</el-link> -->
|
||||
<!-- </div> -->
|
||||
<!-- <div style="margin-left: 20px;"><el-button @click="logout()" type="text" icon="el-icon-switch-button">退出</el-button></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -145,14 +118,11 @@ export default {
|
||||
// cmtask_name:this.cmtask_name,
|
||||
};
|
||||
apiBoeCourse.cmtaskList(params).then(res => {
|
||||
if (res.result.count > 0) {
|
||||
if (res.status == 200 && res.result.count > 0) {
|
||||
this.isTiao = true;
|
||||
// this.$router.push('/uc/study/task');// 学习任务
|
||||
} else {
|
||||
this.isTiao = false;
|
||||
// this.$router.push('/uc/study/courses')// 自主学习
|
||||
}
|
||||
// this.pageData.list = res.result.list;
|
||||
});
|
||||
},
|
||||
handleCommand(val) {
|
||||
@@ -356,20 +326,15 @@ export default {
|
||||
border-radius: 50%;
|
||||
img{
|
||||
border-radius: 50%;
|
||||
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
// border: 1px solid #73adfe;
|
||||
// color: #73adfe;
|
||||
// text-align: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 14px;
|
||||
margin-right: 8px;
|
||||
border-radius: 50%;
|
||||
// background: #d9e9ff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -25,47 +25,22 @@
|
||||
<div>
|
||||
<el-radio-group v-model="category" size="mini" @change="searchData">
|
||||
<el-radio-button :label="0">全部</el-radio-button>
|
||||
<!-- <el-radio-button :label="10">微课</el-radio-button> -->
|
||||
<el-radio-button :label="20">录播课</el-radio-button>
|
||||
<el-radio-button :label="30">线下课</el-radio-button>
|
||||
<el-radio-button :label="40">学习项目</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="search-item-sub" v-if="category == 2">
|
||||
<el-radio-group v-model="categorySub" size="mini" @change="search">
|
||||
<el-radio-button :label="0">全部</el-radio-button>
|
||||
<el-radio-button :label="21">直播</el-radio-button>
|
||||
<el-radio-button :label="20">录播</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <div> -->
|
||||
<!-- <el-row class="search-item"> -->
|
||||
<!-- <el-col :span="1.5">应用场景:</el-col> -->
|
||||
<!-- <el-col :span="24">
|
||||
<div class="item-title">应用场景</div>
|
||||
<div>
|
||||
<el-radio-group v-model="types.scenes" size="mini" @change="searchData">
|
||||
<el-radio-button :label="0">全部</el-radio-button>
|
||||
<el-radio-button v-for="item in sceneList" :key="item.id" :label="item.id">{{item.name}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</el-col> -->
|
||||
<!-- </el-row> -->
|
||||
<!-- </div> -->
|
||||
<div :class="queryExpand ? 'search-div-expand' : 'search-div-collapse'">
|
||||
<el-row class="search-item">
|
||||
<!-- <el-col :span="1.5">内容分类:</el-col> -->
|
||||
<el-col :span="24">
|
||||
<!-- <div class="item-title">内容分类</div> -->
|
||||
<div style="margin-top:10px;display: flex;">
|
||||
<div style="line-height: 25px;">
|
||||
<span class="item-title" style="padding-right: 5px;">内容分类</span>
|
||||
<span class="item-line"></span>
|
||||
</div>
|
||||
<!-- @mouseover="showSubTypes(1)" @mouseout="hideSubTypes(1)" -->
|
||||
<el-radio-group v-model="types.sysTypes" size="mini" @change="changeType">
|
||||
<el-radio-button label="0">全部</el-radio-button>
|
||||
<el-radio-button v-for="item in optionsList" :key="item.id" :label="item.id">{{item.name}}</el-radio-button>
|
||||
@@ -91,51 +66,19 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<!-- <el-row class="search-item">
|
||||
<el-col :span="24">
|
||||
|
||||
|
||||
<div style="margin-top:20px;">
|
||||
<span class="item-title" style="margin-right:37px">时长</span>
|
||||
<el-radio-group v-model="types.sysTypes" size="mini" @change="changeType">
|
||||
<el-radio-button label="0"><20min</el-radio-button>
|
||||
<el-radio-button label="1">20min-60min</el-radio-button>
|
||||
<el-radio-button label="2">>20min</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
<!-- <el-row class="search-div-more">
|
||||
<el-col :span="24">
|
||||
<el-button type="text" @click="queryExpand = true" v-if="!queryExpand">收起</el-button>
|
||||
<el-button type="text" v-else @click="queryExpand = false">更多</el-button>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
</el-row>
|
||||
|
||||
<el-row class="order-div" v-if="listType == 1">
|
||||
<span class="quyer-tag">
|
||||
<el-button type="text" class="order-class" @click="orderChange('studys')" :class="{ actice: course.orderField == 'studys' }">最热</el-button>
|
||||
<el-button type="text" class="order-class" @click="orderChange('id')" :class="{ actice: course.orderField == 'id' }">最新</el-button>
|
||||
</span>
|
||||
<!-- <span v-if="isFind" style="padding-left:10px;">本次搜索出 {{courseList.length}} 条结果</span> -->
|
||||
<!-- <span class="more"></span> -->
|
||||
</el-row>
|
||||
<!-- <el-row v-else style="padding: 15px;font-size: 14px;color: rgb(248, 161, 20);">本次搜索共 2 条结果</el-row> -->
|
||||
<div class="xrow data-content" v-if="listType == 1">
|
||||
<div class="xrow-course course-index" v-for="(cinfo,cidx) in courseList" :key="cinfo.id" v-if="(courseList.length<=course.pageSize) || (cidx<parseInt(courseList.length/columns)*columns)">
|
||||
<el-card class="course-card" :body-style="{padding:'0px'}">
|
||||
<a :href="toCourseDetail(cinfo)">
|
||||
<div class="course-image-box">
|
||||
<course-image height="146px" :course="cinfo"></course-image>
|
||||
<!-- <el-image class="course-image" :src="fileBaseUrl+course.coverImg" fit="fit"></el-image> -->
|
||||
<!-- <span v-if="course.type==10" class="course-type"></span>
|
||||
<span v-if="course.type==20" class="course-type"></span> -->
|
||||
<!-- <span v-if="course.type=='online-course'" class="course-type"></span>
|
||||
<span v-if="course.type=='face-course'" class="course-type"></span>
|
||||
<span v-if="course.type=='project'" class="course-type"></span> -->
|
||||
<!-- <span v-if="course.type==10" class="course-type-title">微课</span> -->
|
||||
<span v-if="cinfo.type==20" class="course-type-title course-type">录播课</span>
|
||||
<span v-if="cinfo.type==10" class="course-type-title course-type">录播课</span>
|
||||
<span v-if="cinfo.type=='online-course'" class="course-type-title course-type">录播课</span>
|
||||
@@ -144,16 +87,10 @@
|
||||
</div>
|
||||
<el-tooltip class="item" :content="cinfo.name" placement="bottom-start" effect="light">
|
||||
<div class="course-title title-line-ellipsis" v-html="$keywordActiveShow(cinfo.name,keyword)">
|
||||
|
||||
</div>
|
||||
</el-tooltip>
|
||||
|
||||
<div class="course-author">
|
||||
<div class="course-author-left" v-if="cinfo.authorInfo">
|
||||
<!-- <span v-if="cinfo.type=='online-course' || cinfo.type=='face-course' || cinfo.type=='project'" style="font-size:14px;line-height: 28px;">发布时间:{{cinfo.publishTime}}</span>
|
||||
<span v-else>
|
||||
<authorInfo v-if="cinfo.authorInfo" :avatar="cinfo.authorInfo.avatar" :name="cinfo.authorInfo.name"></authorInfo>
|
||||
</span> -->
|
||||
{{cinfo.authorInfo.name}}
|
||||
</div>
|
||||
<div style="flex:1;text-align: center;">
|
||||
@@ -161,27 +98,13 @@
|
||||
</div>
|
||||
<div style="padding-left:15px">
|
||||
<div v-if="cinfo.score">
|
||||
<!-- <span><el-rate style="display: inline-block;" disabled v-model="cinfo.score"></el-rate></span> -->
|
||||
<span class="course-score-value">{{toScore(cinfo.score)}}</span>
|
||||
</div>
|
||||
<div v-else class="course-score-no">未评分</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="course-score"></div> -->
|
||||
</a>
|
||||
|
||||
<div class="cor-praises" v-if="cinfo.type == 10 || cinfo.type == 20"><interactBar :type="1" :data="cinfo" :comments="false" :praises="false" :shares="false" :views="false"></interactBar> </div>
|
||||
<!-- <a :href="toCourseDetail(cinfo)" target="_blank">
|
||||
<div class="cor-icon"><i class="el-icon-caret-right"></i></div>
|
||||
</a> -->
|
||||
<!-- <div class="cardmark" v-if="cinfo.type == 10 || cinfo.type == 20">l
|
||||
<div class="cardmark-name" v-if="cinfo && cinfo.forUsers">目标学员</div>
|
||||
<div class="cardmark-info" v-if="cinfo && cinfo.forUsers">{{course.forUsers}}</div>
|
||||
<div class="cardmark-name" v-if="cinfo && cinfo.value">课程价值</div>
|
||||
<div class="cardmark-info" v-if="cinfo && cinfo.value">{{course.value}}</div>
|
||||
<div class="cardmark-name" v-if="cinfo && cinfo.summary">课程介绍</div>
|
||||
<div class="cardmark-info" v-if="cinfo && cinfo.summary">{{course.summary}}</div>
|
||||
</div> -->
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
@@ -191,12 +114,9 @@
|
||||
<span class="pag-text-msg" v-else-if="moreState == 2">数据加载中</span>
|
||||
<span class="pag-text-msg" v-else-if="moreState == 3">没有更多数据了</span>
|
||||
</div>
|
||||
<!-- <div class="pagination-div"><el-pagination background layout="prev, pager, next" :total="pager.total"></el-pagination></div> -->
|
||||
</div>
|
||||
<div style="width: 245px;margin-left: 5px;">
|
||||
|
||||
<div>
|
||||
|
||||
<div id="fixd-box">
|
||||
<div v-if="identity == 2 || identity == 3 || identity == 5">
|
||||
<el-button style="width: 100%;margin-bottom:15px;height: 37px;border-radius: 0;" type="primary" @click="toNeedCourse">做课程</el-button>
|
||||
@@ -207,8 +127,6 @@
|
||||
</div>
|
||||
<div style="padding-bottom:10px">
|
||||
<el-row class="ranking-title">
|
||||
<!-- <el-col :span="15" style="color: #333333;font-size: 14px;">名称</el-col> -->
|
||||
<!-- <el-col :offset="4" :span="5" class="center" style="color: #333333;font-size: 14px;">分数</el-col> -->
|
||||
</el-row>
|
||||
<el-row class="ranking-title bacolor" v-for="(item, index) in scorelist" :key="index" >
|
||||
<el-col :span="6" style="height:34px">
|
||||
@@ -220,7 +138,6 @@
|
||||
<el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.name" placement="bottom" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.name }}</el-col>
|
||||
</el-tooltip>
|
||||
<!-- <el-col class="center" style="color: #FF8E00;" :span="5">{{ item.score }}</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -231,8 +148,6 @@
|
||||
</div>
|
||||
<div style="padding-bottom:10px">
|
||||
<el-row class="ranking-title">
|
||||
<!-- <el-col :span="15">名称</el-col> -->
|
||||
<!-- <el-col :span="9" class="center">学习人数</el-col> -->
|
||||
</el-row>
|
||||
<el-row class="ranking-title bacolor" v-for="(item, index) in ankingList" :key="index">
|
||||
<el-col :span="6" style="height:34px">
|
||||
@@ -244,11 +159,9 @@
|
||||
<el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.name" placement="bottom" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.name }}</el-col>
|
||||
</el-tooltip>
|
||||
<!-- <el-col class="center" :span="5">{{ item.studys }}</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<div style="height: 10px;"></div>
|
||||
<el-card class="ranking-card">
|
||||
<div slot="header">
|
||||
@@ -256,8 +169,6 @@
|
||||
</div>
|
||||
<div style="padding-bottom:10px">
|
||||
<el-row class="ranking-title">
|
||||
<!-- <el-col :span="15">名称</el-col> -->
|
||||
<!-- <el-col :span="9" class="center">学习人数</el-col> -->
|
||||
</el-row>
|
||||
<el-row class="ranking-title bacolor" v-for="(item, index) in hotList" :key="index">
|
||||
<el-col :span="6" style="height:34px">
|
||||
@@ -269,7 +180,6 @@
|
||||
<el-tooltip :enterable="false" @click.native="jumpRouter2(item)" effect="light" :content="item.courseName" placement="bottom" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.courseName }}</el-col>
|
||||
</el-tooltip>
|
||||
<!-- <el-col class="center" :span="5">{{ item.counts }}</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -335,7 +245,6 @@ export default {
|
||||
sysTypes: null,
|
||||
oneSubList: [],
|
||||
towSubList: [],
|
||||
scenes: 0,
|
||||
},
|
||||
course: {
|
||||
orderField: "studys",
|
||||
@@ -355,8 +264,6 @@ export default {
|
||||
ankingList:[],
|
||||
scorelist: [],
|
||||
searchTags: [],
|
||||
type1Sub3Level1: "0",
|
||||
type1Sub3Level2: "0",
|
||||
queryExpand: true, // true更多,false收起
|
||||
category: null,
|
||||
categorySub: 0,
|
||||
@@ -520,10 +427,6 @@ export default {
|
||||
if (i === "sysType3") {
|
||||
this.types.subTow = "";
|
||||
}
|
||||
if(i === "scenes"){
|
||||
this.types.scenes = "";
|
||||
}
|
||||
|
||||
if(i === 'type') {
|
||||
this.category = "";
|
||||
this.categorySub = "";
|
||||
@@ -589,14 +492,11 @@ export default {
|
||||
this.course.pageIndex += 1;
|
||||
this.search();
|
||||
},
|
||||
async search(num) {
|
||||
async search() {
|
||||
let that = this;
|
||||
if(this.course.keyword){
|
||||
apiSearchterm.save({keyword:this.course.keyword,type:1});
|
||||
}
|
||||
// if(num !== 1) {
|
||||
// this.course.pageIndex =1;
|
||||
// }
|
||||
this.isFind = true;
|
||||
if (this.category === 0) {
|
||||
this.course.type = null;
|
||||
@@ -609,11 +509,6 @@ export default {
|
||||
} else {
|
||||
this.course.type = this.category;
|
||||
}
|
||||
if(this.types.scenes == 0) {
|
||||
this.course.scenes = '';
|
||||
} else{
|
||||
this.course.scenes = this.types.scenes;
|
||||
}
|
||||
if(this.types.sysTypes == 0 || this.types.sysTypes == null) {
|
||||
this.course.sysType1 = '';
|
||||
this.course.sysType2 = '';
|
||||
@@ -828,12 +723,6 @@ export default {
|
||||
if (i == "type" && courseData[i] !== 0) {
|
||||
courseData[i] = courseType(courseData[i]);
|
||||
}
|
||||
if (i == "scenes") {
|
||||
let name = this.sceneList.filter(item => {
|
||||
return item.id === courseData[i];
|
||||
});
|
||||
courseData[i] = name[0].name;
|
||||
}
|
||||
if (i == "sysType1" || i == "sysType2" || i == "sysType3") {
|
||||
if(courseData[i] !== '0') {
|
||||
courseData[i] = this.sysTypeName(courseData[i]);
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<div>
|
||||
<div class="courseware-div" v-if="enrollStutas == 1" style="max-height: 400px;">
|
||||
<course-image :course="courseInfo" class="courseware-img"></course-image>
|
||||
<!-- <el-button type="warning" @click="submitEnroll" class="courseware-enroll-btn">报名后即可开始学习!</el-button> -->
|
||||
</div>
|
||||
<div class="courseware-div" v-else>
|
||||
<div v-if="coursewareInfo.content.contentType == 10" style="position: relative;">
|
||||
@@ -29,19 +28,16 @@
|
||||
@onFullscreen="onFullscreen"
|
||||
@onPlayerEnded="onPlayerEnded">
|
||||
</videoPlayer>
|
||||
<!-- v-if="playerBoxShow" -->
|
||||
<div class="player-box" v-if="playerBoxShow">
|
||||
<div class="player-praise">
|
||||
<div @click="praiseContent" style="cursor: pointer;">
|
||||
<img class="icon-small" v-if="isPraise" :src="require('@/assets/images/icon/praise-active.png')" />
|
||||
<img class="icon-small" v-else :src="require('@/assets/images/icon/zhan.png')" />
|
||||
<!-- {{ courseInfo.praises }} -->
|
||||
<div style="color:#fff;cursor: pointer;">赞</div>
|
||||
</div>
|
||||
<div style="margin-left: 15px;cursor: pointer;" @click="treadContent">
|
||||
<img class="icon-small" v-if="isTrample" :src="require('@/assets/images/icon/trample-active.png')" />
|
||||
<img class="icon-small" v-else :src="require('@/assets/images/icon/cai.png')" />
|
||||
<!-- {{ courseInfo.trampleCount }} -->
|
||||
<div style="color:#fff;cursor: pointer;">踩</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -112,7 +108,6 @@
|
||||
</el-tabs>
|
||||
<div style="display: flex;justify-content: space-between;padding: 10px;align-items: center;">
|
||||
<div class="score">
|
||||
<!-- <el-rate disabled v-model="courseInfo.score" :max="5" :allow-half="true" show-score score-template="{value}"></el-rate> -->
|
||||
<div v-if="enrollStutas == 1 && !scoreInfo.has">
|
||||
<div v-if="courseInfo.score">
|
||||
<el-rate disabled v-model="courseInfo.score"></el-rate>
|
||||
@@ -155,47 +150,22 @@
|
||||
<interactBar :readonly="enrollStutas==1" :type="1" :data="courseInfo" :views="false" :praises="false" :comments="false"></interactBar>
|
||||
<div class="title title-index">{{courseInfo.name}}</div>
|
||||
<div class="study-count"><span class="num">{{courseInfo.studys}}人学习</span></div>
|
||||
<!-- <div class="course-info-tools-btns">
|
||||
<span style="color: #f8a114;font-size: 36px;">{{toScore(courseInfo.score)}}</span>
|
||||
<span style="font-size: 14px;color: #787878;">分</span>
|
||||
</div> -->
|
||||
<!-- <div class="label"><el-tag class="label-item" effect="plain">了解公司</el-tag></div> -->
|
||||
<div class="label"><el-tag class="label-item" effect="plain">录播课</el-tag></div>
|
||||
<div class="label" v-if="tags.length >0">
|
||||
<el-tag class="label-item" effect="plain" v-for="(item, index) in tags" :key="index">{{item}}</el-tag>
|
||||
<!-- <el-tag class="label-item" effect="plain">中心长</el-tag> -->
|
||||
</div>
|
||||
<div v-if="enrollStutas != 2" class="score" style="padding-top: 135px;justify-content: flex-start;">
|
||||
<!-- <el-rate style="display: inline-block; " disabled v-model="courseInfo.score" score-template="{value}" show-score text-color="#ff8e00"></el-rate>
|
||||
<span style="font-size: 14px;color: #f7ba2a;">分</span> -->
|
||||
<div v-if="courseInfo.score">
|
||||
<el-rate disabled v-model="courseInfo.score"></el-rate>
|
||||
<span class="score-text">{{toScore(courseInfo.score)}}<span style="font-size: 14px;">分</span></span>
|
||||
</div>
|
||||
<div v-else class="score-no">未评分</div>
|
||||
<!-- <el-rate style="display: inline-block; " disabled v-model="courseInfo.score" text-color="#ff8e00"></el-rate>
|
||||
<span style="font-size: 14px;color: #f7ba2a;">{{courseInfo.score}}分</span> -->
|
||||
</div>
|
||||
<!-- <div class="keyword"><el-tag class="label-item" effect="plain">质量</el-tag></div> -->
|
||||
<!--资源归属是一共有三级,这里只显示三级-->
|
||||
<!-- <div class="study-count">资源归属:{{courseInfo.resOwner}}</div> -->
|
||||
<!-- <div class="btn-div" style="padding-top: 70px;">
|
||||
<el-button class="btn" type="primary" v-if="enrollStutas == 1" @click="submitEnroll">立即报名</el-button>
|
||||
</div> -->
|
||||
<!-- 二维码 -->
|
||||
<!-- <div class="qr-code" style="padding-top: 10px;">
|
||||
<div id="qrcode" ref="qrcode" class="qrcode" ></div>
|
||||
<div>手机扫码观看</div>
|
||||
</div> -->
|
||||
<!-- <div style="width: 100px;height:300px" v-if="courseInfo.device == 2 || courseInfo.device == 3"> -->
|
||||
<img class="detail-img" v-show="!showQrcode && (courseInfo.device == 2 || courseInfo.device == 3)" @click="showQrcode = true" src="../../../assets/images/qr.png" alt="" srcset="">
|
||||
<div class="qr-code" v-show="showQrcode && ((courseInfo.device == 2 || courseInfo.device == 3))" style="padding-top: 10px;">
|
||||
<div id="qrcode" ref="qrcode" class="qrcode" @click="showQrcode = false"></div>
|
||||
<!-- <div style="margin-left: 27px">手机扫码观看</div> -->
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</el-col>
|
||||
<!-- 11 -->
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-row :gutter="10">
|
||||
@@ -233,12 +203,9 @@
|
||||
<div class="teacher" v-for="(item, idx) in teachers" :key="idx" >
|
||||
<div class="teacher-avator">
|
||||
<el-avatar v-if="item.avatar !== ''" :src="item.avatar" shape="circle" :size="50"></el-avatar>
|
||||
<!-- <div class="teacher-text" v-if="item.avatar !== '' "></div> -->
|
||||
<!-- <el-avatar v-if="item.avatar && item.avatar!=''" icon="el-icon-user" shape="square" :size="50"></el-avatar> -->
|
||||
<div class="teacher-text" v-else>
|
||||
<div v-if="sex === 1 "><img src="../../../../public/images/Avatarman.png" alt=""></div>
|
||||
<div v-else><img src="../../../../public/images/Avatarwoman.png" alt=""></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="teacher-info">
|
||||
@@ -264,23 +231,13 @@ import portalHeader from "@/components/PortalHeader.vue";
|
||||
import comments from "@/components/Portal/comments.vue";
|
||||
import portalFooter from "@/components/PortalFooter.vue";
|
||||
import interactBar from "@/components/Portal/interactBar.vue";
|
||||
import apiCourse from "@/api/modules/course.js";
|
||||
import apiCourseFile from "@/api/modules/courseFile.js";
|
||||
import apiCoursePortal from "@/api/modules/coursePortal.js";
|
||||
import apiUser from '@/api/system/user.js';
|
||||
import exam from '@/components/Course/exam';
|
||||
import homework from '@/components/Course/homework';
|
||||
import assess from '@/components/Course/assess';
|
||||
import {
|
||||
formatDate,
|
||||
resListMap,
|
||||
toScore,
|
||||
courseType,
|
||||
getType,
|
||||
numberToLetter,
|
||||
correctJudgment,
|
||||
userAvatarText
|
||||
} from "@/utils/tools.js";
|
||||
import {toScore,courseType, getType, numberToLetter, correctJudgment,userAvatarText} from "@/utils/tools.js";
|
||||
import apicourseStudy from "@/api/modules/courseStudy.js";
|
||||
import apiVideoStudy from "@/api/modules/videoStudy.js";
|
||||
import apiCourseGrade from "@/api/modules/courseGrade.js";
|
||||
@@ -288,7 +245,6 @@ import apiPraises from "@/api/modules/praises.js";
|
||||
import apiTrample from "@/api/modules/trample.js";
|
||||
import FileUpload from "@/components/FileUpload/index.vue";
|
||||
import pdfPreview from "@/components/PdfPreview/index.vue";
|
||||
// import {resOwnerIndexName} from '@/utils/type.js';
|
||||
import { setTimeout } from "timers";
|
||||
import videoPlayer from '@/components/VideoPlayer/index.vue';
|
||||
import audioPlayer from '@/components/AudioPlayer/index.vue';
|
||||
@@ -330,7 +286,6 @@ export default {
|
||||
studyId: "",
|
||||
tags: [],
|
||||
numberToLetter: numberToLetter,
|
||||
// resOwnerListMap: resOwnerIndexName,
|
||||
fileBaseUrl: this.$Constants.fileBaseUrl,
|
||||
blobUrl:'',//播放的文件地址,新添加,采用blob方式
|
||||
getType: getType,
|
||||
@@ -406,16 +361,13 @@ export default {
|
||||
this.showQrimage();
|
||||
this.$watermark.set(this.userInfo.name+this.userInfo.loginName);
|
||||
this.loadResOwners();
|
||||
|
||||
let $this = this;
|
||||
//页面只支取一次,所以先直接写在这里面
|
||||
apiCoursePortal.detail(id).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
this.courseInfo = rs.result.course;
|
||||
// this.courseInfo.score = this.toScore(rs.result.course.score);
|
||||
if(rs.result.course.tags != '') this.tags = rs.result.course.tags.split(",");
|
||||
this.teachers = rs.result.teachers;
|
||||
|
||||
if(rs.result.teachers && rs.result.teachers.length > 0){
|
||||
let userIds=[];
|
||||
let ctoUsers=[];
|
||||
@@ -448,7 +400,6 @@ export default {
|
||||
}
|
||||
//对url进行加密处理
|
||||
$this.createPlayUrl(con.contentRefId,this.curriculumData.url);
|
||||
|
||||
} else if (con.contentType == 40) {
|
||||
//需要读取pdf的路径
|
||||
apiCourseFile.detail($this.coursewareInfo.content.contentRefId).then(cfrs=>{
|
||||
@@ -461,12 +412,10 @@ export default {
|
||||
$this.coursewareInfo.content.content=cfrs.result.filePath;
|
||||
$this.curCFile=2;
|
||||
}
|
||||
|
||||
}else{
|
||||
$this.$message.error('加载pdf课件文件失败');
|
||||
}
|
||||
});
|
||||
//let url = this.fileBaseUrl + r.content;
|
||||
}else if(con.contentType ==52){
|
||||
if(con.content.startsWith('\{')){
|
||||
this.conLink=JSON.parse(con.content);
|
||||
@@ -507,9 +456,7 @@ export default {
|
||||
let nowDate=new Date();
|
||||
let ctime=parseInt(nowDate.getTime()/1000);
|
||||
let beforeUrl=parseInt(nowDate.getTime()/1000)+'/'+fid;
|
||||
//console.log(beforeUrl,'beforeUrl');
|
||||
let urlSign=encodeURIComponent(encrypt(beforeUrl));
|
||||
//console.log(urlSign,'urlSign');
|
||||
cookies.set('PLAYSIGN_TIME', ctime);//写客户端的cookie保存
|
||||
//以下判断是为了区分本地环境和服务器环境
|
||||
if(process.env.NODE_ENV == 'development'){
|
||||
@@ -524,7 +471,6 @@ export default {
|
||||
// this.qrcode = this.webBaseUrl+'/mobile/pages/resource/microDetail?id='+this.courseInfo.id;
|
||||
urlPre='https://u.boe.com/m?returnUrl=https://u.boe.com/mobile/pages/login/loading?returnUrl=';
|
||||
this.qrcode =urlPre+ '/pages/resource/microDetail?id='+this.courseInfo.id;
|
||||
//console.log(this.qrcode,'qrcode');
|
||||
this.$nextTick(() => {
|
||||
this.crateQrcode();
|
||||
});
|
||||
@@ -633,11 +579,9 @@ export default {
|
||||
this.playerBoxShow = false;
|
||||
//console.log("开始播放");
|
||||
this.isAppendTime=false;
|
||||
|
||||
//视频类的内容,开始播放时才会记录完成情况
|
||||
//2022-05-24修改,判断播放的
|
||||
let $this=this;
|
||||
//console.log(this.curriculumData,'this.curriculumData');
|
||||
//完成类型 completeSetup 0表默认,打开后5秒算学完,1表按进度,2表按时间
|
||||
//完成值(非默认情况下起作用) setupTage
|
||||
if(!$this.coursewareInfo.finish){
|
||||
@@ -676,7 +620,6 @@ export default {
|
||||
if(!completeSecond){
|
||||
completeSecond=5;//如果没有就采用默认的时间了
|
||||
}
|
||||
|
||||
if(completeType>0 && !this.coursewareInfo.finish){ //因为1按进度,2按时长都是计算时间,所以这里直接大于0处理
|
||||
if(completeType==1){
|
||||
let finishPercent=this.curriculumData.setupTage;
|
||||
@@ -690,7 +633,6 @@ export default {
|
||||
this.finishStudyItem();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//以下是每10秒记录一次学习时长
|
||||
let saveTime=Math.floor(intTime%10);
|
||||
@@ -711,14 +653,12 @@ export default {
|
||||
},
|
||||
audioPlaying(item,currentTime){
|
||||
let intTime=parseInt(currentTime);//秒
|
||||
//console.log("当前播放时间="+item+',currentTime='+intTime);
|
||||
//判断是否完成
|
||||
let completeType=this.curriculumData.completeSetup;
|
||||
let completeSecond=this.curriculumData.second;
|
||||
if(!completeSecond){
|
||||
completeSecond=5;//如果没有就采用默认的时间了
|
||||
}
|
||||
|
||||
if(completeType>0 && !this.coursewareInfo.finish){ //因为1按进度,2按时长都是计算时间,所以这里直接大于0处理
|
||||
if(completeType==1){
|
||||
let finishPercent=this.curriculumData.setupTage;
|
||||
@@ -770,7 +710,6 @@ export default {
|
||||
},
|
||||
audioEnd(){
|
||||
// this.playerBoxShow = true;
|
||||
//console.log("播放结束");
|
||||
if(!this.coursewareInfo.finish){
|
||||
this.finishStudyItem();
|
||||
}
|
||||
@@ -882,7 +821,6 @@ export default {
|
||||
|
||||
//首先从本地读取
|
||||
let duration=studyUtil.getStudyDuration();
|
||||
|
||||
//追加学习时间
|
||||
let $this = this;
|
||||
if(this.appendStartTime == null) {
|
||||
@@ -893,14 +831,10 @@ export default {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//当前进行的时间
|
||||
let now = new Date();
|
||||
let m = now.getTime() - this.appendStartTime.getTime(); //相差的毫秒数
|
||||
let sen = parseInt(m / 1000); //计算秒数
|
||||
|
||||
//console.log(duration,'duration')
|
||||
//console.log(sen,'sen')
|
||||
duration=duration+sen;
|
||||
if(flag){
|
||||
//这个时候才进行存储 ,否则只能是存储在本地
|
||||
@@ -943,14 +877,12 @@ export default {
|
||||
if(res.result.signup) {
|
||||
//this.bootTabActive = 'commnets';//系统自动报名,这里不进行切换了
|
||||
this.studyId = res.result.studyId; //设置学习id
|
||||
|
||||
//需要判断此内容是否已学习完成,如果已学习完成,不需要再请不说了
|
||||
res.result.contents.forEach(con => {
|
||||
if (con.contentId == $this.coursewareInfo.content.id) {
|
||||
$this.coursewareInfo.studyItemId=con.id;
|
||||
$this.coursewareInfo.status=con.status;
|
||||
$this.coursewareInfo.progress=con.progress;
|
||||
|
||||
if(con.contentType==10 || con.contentType==20){
|
||||
if(con.progress==100 || con.status==9){
|
||||
$this.coursewareInfo.finish = true;
|
||||
@@ -960,7 +892,6 @@ export default {
|
||||
}else{
|
||||
$this.coursewareInfo.finish = true; //课件已学习
|
||||
}
|
||||
|
||||
if(con.lastStudyTime){
|
||||
//如果上次课件已经播放完成,此处应该是$this.coursewareInfo.content.duration
|
||||
//也就是从头开开始
|
||||
@@ -1028,7 +959,6 @@ export default {
|
||||
if (rs.status == 200 && rs.result) {
|
||||
this.scoreInfo.has = true;
|
||||
}
|
||||
//console.log(rs.result,'rs.result');
|
||||
});
|
||||
//}
|
||||
apiPraises.has(1, this.courseInfo.id).then(rs => {
|
||||
@@ -1183,12 +1113,8 @@ export default {
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
|
||||
.player-box{
|
||||
position: absolute;
|
||||
// top: 62px;
|
||||
// left: 184px;
|
||||
width: 300px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
@@ -1210,24 +1136,10 @@ export default {
|
||||
}
|
||||
}
|
||||
::v-deep .el-tabs__nav-wrap::after {
|
||||
// content: "";
|
||||
// position: absolute;
|
||||
// left: 0;
|
||||
// bottom: 0;
|
||||
// width: 100%;
|
||||
// height: 2px;
|
||||
background-color: #fff;
|
||||
// z-index: 1;
|
||||
}
|
||||
::v-deep .el-tabs__nav-wrap::after {
|
||||
// content: "";
|
||||
// position: absolute;
|
||||
// left: 0;
|
||||
// bottom: 0;
|
||||
// width: 100%;
|
||||
// height: 2px;
|
||||
background-color: #fff;
|
||||
// z-index: 1;
|
||||
}
|
||||
.qrcode{
|
||||
display: inline-block;
|
||||
@@ -1240,16 +1152,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.ref-score{
|
||||
// background: #e4e4e4;
|
||||
// width: 64px;
|
||||
// height: 32px;
|
||||
// border-radius: 17px;
|
||||
// line-height: 32px;
|
||||
// // opacity: 0.24;
|
||||
// color: #000;
|
||||
// font-size: 14px;
|
||||
// border: none;
|
||||
// text-align: center;
|
||||
|
||||
}
|
||||
.portal-content ::v-deep .el-rate__icon{
|
||||
font-size: 24px !important;
|
||||
@@ -1392,13 +1295,6 @@ export default {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
// margin-bottom: 50px;
|
||||
// line-height: 20px;
|
||||
// .el-link{
|
||||
// font-size: 30px;
|
||||
// color: #70a5f4;
|
||||
// margin: 0 30px;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1416,9 +1312,7 @@ export default {
|
||||
color: #FFB30F ;
|
||||
font-family: "Arial";
|
||||
margin-left: 23px;
|
||||
// font-weight: 600;
|
||||
}
|
||||
// margin-bottom: 19px;
|
||||
.score-no{
|
||||
color: #FFB30F;
|
||||
padding: 5px 0;
|
||||
|
||||
Reference in New Issue
Block a user