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