mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 03:16:42 +08:00
我的收藏案例
This commit is contained in:
@@ -104,7 +104,6 @@ export default {
|
||||
font-weight: 400;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
|
||||
align-items: center;
|
||||
.readed{
|
||||
font-size: 18px;
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<template>
|
||||
<div style="">
|
||||
<div class="article-list" v-for="(item,idx) in items" :key="idx">
|
||||
<div class="article-info">
|
||||
<div class="article-info-title">
|
||||
<router-link :to="'/case/detail?id='+item.cases.id" target="_blank" style="padding-left: 5px;">{{item.cases.title}}</router-link>
|
||||
<div class="article-info ">
|
||||
<div class="article-info-title title-line-ellipsis" >
|
||||
<router-link :to="'/case/detail?id='+item.cases.id" target="_blank" >{{item.cases.title}}</router-link>
|
||||
<div class="article-info-date">
|
||||
<el-button @click="delItem(item)" type="text" icon="el-icon-remove">取消收藏</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="article-info-summary">
|
||||
<div class="article-info-summary three-line-ellipsis">
|
||||
{{item.cases.summary}}
|
||||
</div>
|
||||
<div class="article-info-tools">
|
||||
<authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo"></authorInfo>
|
||||
<span>发布时间:{{ item.cases.sysCreateTime | timeFilter }}</span>
|
||||
<span>收藏时间:{{ item.time | timeFilter }}</span>
|
||||
<interactBar :type="0" :data="item.cases" :shares="false" :views="false"></interactBar>
|
||||
<!-- <interactBar :type="0" :data="item.cases" :shares="false" :views="false"></interactBar> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,6 +58,26 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.title-line-ellipsis{
|
||||
width: 100%;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow:ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
box-sizing: border-box;
|
||||
word-break:break-all;
|
||||
}
|
||||
.three-line-ellipsis{
|
||||
width: 100%;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow:ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
box-sizing: border-box;
|
||||
word-break:break-all;
|
||||
}
|
||||
.article-status1{
|
||||
padding: 3px;
|
||||
border: 1px dotted #1EA0FA;
|
||||
@@ -75,8 +95,8 @@
|
||||
}
|
||||
.article-list {
|
||||
margin: 5px 0;
|
||||
border: 1px solid #dddddd;
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.article-info {
|
||||
@@ -97,10 +117,12 @@
|
||||
}
|
||||
}
|
||||
.article-info-summary {
|
||||
height: 65px;
|
||||
|
||||
line-height: 25px;
|
||||
color: #999999;
|
||||
}
|
||||
.article-info-tools {
|
||||
height: 45px;
|
||||
color: #999999;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<course-items :items="courseList.list" @confirm="confirm"></course-items>
|
||||
</div>
|
||||
<!-- v-if="courseList.count>courseList.pageSize" -->
|
||||
<div v-if="caseList.list.length > 0" style="text-align: center;margin-top:57px">
|
||||
<div v-if="courseList.list.length > 0" style="text-align: center;margin-top:57px">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@@ -92,24 +92,20 @@
|
||||
></el-pagination>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="caseList.list.length == 0">
|
||||
<div v-if="courseList.list.length == 0">
|
||||
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
||||
<div v-else class="zan-wu">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="案例" name="case">
|
||||
<el-tab-pane label="案例" name="case">
|
||||
<div>
|
||||
<div style="padding-bottom: 10px;">
|
||||
<div style="display: flex;justify-content:flex-start;">
|
||||
<div style="padding: 0px 5px;"><el-input placeholder="关键词查询" v-model="caseList.title"></el-input></div>
|
||||
<div style="padding: 0px 5px;"><el-button @click="findCase" icon="el-icon-search" type="primary" size="small">查询</el-button></div>
|
||||
</div>
|
||||
</div>
|
||||
<case-items @confirm="confirm" :items="caseList.list"></case-items>
|
||||
</div>
|
||||
<div style="text-align: center;" v-if="caseList.count>caseList.pageSize">
|
||||
<div style="text-align: center;margin-top:50px;" v-if="caseList.list.length > 0
|
||||
">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="caseList.pageIndex"
|
||||
@@ -118,8 +114,15 @@
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="caseList.count"
|
||||
></el-pagination>
|
||||
|
||||
</div>
|
||||
</el-tab-pane> -->
|
||||
<div v-else>
|
||||
<div v-if="caseList.list.length == 0">
|
||||
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
||||
<div v-else class="zan-wu">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="文章" name="article">
|
||||
<div>
|
||||
<!-- <div style="padding-bottom: 10px;">
|
||||
@@ -195,7 +198,7 @@
|
||||
<script>
|
||||
import articleItems from '@/components/Article/collectList.vue';
|
||||
import courseItems from '@/components/Course/collectItem.vue';
|
||||
// import caseItems from '@/components/Case/collectList.vue';
|
||||
import caseItems from '@/components/Case/collectList.vue';
|
||||
import qaItems from '@/components/Qa/favoritesQaList.vue';
|
||||
import apiFavorite from '@/api/modules/favorites.js';
|
||||
import apiUser from '@/api/system/user.js';
|
||||
@@ -203,7 +206,7 @@ import apiCourse from "@/api/modules/coursePortal.js";
|
||||
import courseImage from '@/components/Course/courseImage.vue';
|
||||
export default {
|
||||
name: 'myShareIndex',
|
||||
components: { articleItems, courseItems, qaItems, courseImage },
|
||||
components: { articleItems, courseItems, qaItems, courseImage,caseItems },
|
||||
data() {
|
||||
return {
|
||||
isSearh:false,
|
||||
@@ -383,6 +386,7 @@ export default {
|
||||
item.avatar=''
|
||||
item.name=''
|
||||
item.orgInfo=''
|
||||
item.sex= null
|
||||
courseIds.push(item.objId);
|
||||
})
|
||||
this.loadCouserTeacher(res.result.list,courseIds);
|
||||
@@ -482,14 +486,16 @@ export default {
|
||||
findCase() {
|
||||
let { pageIndex, pageSize } = this.caseList;
|
||||
let query = { pageIndex, pageSize };
|
||||
if (this.caseList.title) {
|
||||
// if (this.caseList.cases.title) {
|
||||
query.keyword = this.keyword.trim();
|
||||
}
|
||||
// }
|
||||
query.resolve = this.isRead;
|
||||
apiFavorite.casePageList(query).then(res => {
|
||||
if (res.status == 200) {
|
||||
|
||||
this.caseList.count = res.result.count;
|
||||
this.caseList.list = res.result.list;
|
||||
console.log(this.caseList)
|
||||
if (this.caseList.list.length != 0) {
|
||||
this.getCaseUserData(res.result.list);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user