mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 14:26:43 +08:00
119 lines
4.1 KiB
Vue
119 lines
4.1 KiB
Vue
<template>
|
|
<div class="note-list">
|
|
<ul v-if="list.length > 0">
|
|
<li class="note-list-index" v-for="item in list" :key="item.id">
|
|
<p v-if="isDynamic" style="word-break:break-all;word-wrap:break-word;margin-bottom:18px" class="portal-summary-text">
|
|
<span style="word-break:break-all;word-wrap:break-word;margin-bottom:18px" v-if="!personal || isFollow">{{item.aname}}</span>{{item.cusInfo}}
|
|
<span style="margin-left:28px">{{item.eventTime}}</span>
|
|
<span v-if="item.aid == userInfo.aid" class="follow-hide pointer" style="float:right">
|
|
<span v-if="item.hidden">已隐藏</span>
|
|
<span v-else @click="emitHide(item.id)"> <svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏 </span>
|
|
</span>
|
|
</p>
|
|
<h6 style="word-break:break-all;" class="note-title-info follow-home-title pointer"><span @click="jumpDetail(item)">{{item.contentInfo}}</span> <span style="color: #333333;font-weight: 400;font-size: 14px;margin-left: 20px;"></span>
|
|
<span class="follow-hide pointer" style="float:right" v-if="(item.aid == userInfo.aid) && !isDynamic">
|
|
<span v-if="item.hidden">已隐藏</span>
|
|
<span v-else @click="emitHide(item.id)"> <svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏 </span>
|
|
</span>
|
|
</h6>
|
|
<p class="note-text" style="word-break:break-all;word-wrap:break-word;margin-bottom:18px">
|
|
{{item.info.content}}
|
|
</p>
|
|
<div>
|
|
<interactBar :type="6" :data="item.info" :shares="false" :views="false" :readonly="true"></interactBar>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<div v-else class="home-no-list">
|
|
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-note.png`" alt="" srcset="">
|
|
<p v-if="isFollow" class="text">暂时没有动态</p>
|
|
<p v-else class="text">还没有笔记</p>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import interactBar from "@/components/Portal/interactBar.vue";
|
|
import { toScore } from '@/utils/tools.js';
|
|
import { mapGetters,mapActions } from 'vuex';
|
|
export default{
|
|
name:"NoteList",
|
|
components: {
|
|
interactBar,
|
|
// timeShow,
|
|
// author
|
|
},
|
|
props:{
|
|
list:{
|
|
type:Array,
|
|
default:()=>[]
|
|
},
|
|
isDynamic:{
|
|
type:Boolean,
|
|
default:false,
|
|
},
|
|
personal:{
|
|
type:Boolean,
|
|
default:false,
|
|
},
|
|
isFollow:{
|
|
type:Boolean,
|
|
default:false,
|
|
}
|
|
},
|
|
computed: {
|
|
...mapGetters(['userInfo']),
|
|
},
|
|
data(){
|
|
return{
|
|
toScore,
|
|
noteList:[]
|
|
}
|
|
},
|
|
mounted() {
|
|
},
|
|
methods:{
|
|
jumpDetail(item){
|
|
this.$router.push('/course/detail?id='+item.info.courseId)
|
|
},
|
|
emitHide(id) {
|
|
this.$emit('hideIndex',id)
|
|
},
|
|
//展示全部
|
|
changeIsAll(item) {
|
|
item.isAll = !item.isAll;
|
|
},
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.note-list{
|
|
ul{
|
|
margin: 0;
|
|
}
|
|
.note-list-index{
|
|
padding: 30px 0;
|
|
border-bottom: 1px solid rgba($color: #999999, $alpha: 0.2) !important;
|
|
::v-deep .interact-bar-btns{
|
|
.interact-bar-btn{
|
|
text-align: right;
|
|
min-width: 78px !important;
|
|
margin-right: 0;
|
|
}
|
|
}
|
|
}
|
|
.note-title-info{
|
|
margin: 0;
|
|
margin-bottom: 16px;
|
|
}
|
|
.note-text{
|
|
margin-bottom: 18px;
|
|
font-size: 14px;
|
|
color: #333330;
|
|
line-height: 20px;
|
|
}
|
|
}
|
|
</style>
|