mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 06:16:44 +08:00
代码清理
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user