This commit is contained in:
daihh
2022-06-08 16:56:28 +08:00
4 changed files with 58 additions and 26 deletions

View File

@@ -2,14 +2,18 @@
<div style="">
<div class="article-list" v-for="(item,idx) in items" :key="idx">
<div class="article-info ">
<div class="article-info-title title-line-ellipsis" >
<div class="article-info-title " >
<div style="width:85%" class="title-line-ellipsis">
<router-link :to="'/case/detail?id='+item.cases.id" target="_blank" >{{item.cases.title}}</router-link>
</div>
<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 three-line-ellipsis">
{{item.cases.summary}}
<router-link :to="'/case/detail?id='+item.cases.id" target="_blank" > {{item.cases.summary}}</router-link>
</div>
<div class="article-info-tools">
<authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo"></authorInfo>
@@ -59,7 +63,6 @@
<style lang="scss" scoped>
.title-line-ellipsis{
width: 100%;
display: -webkit-box;
overflow: hidden;
text-overflow:ellipsis;
@@ -100,15 +103,19 @@
}
.article-info {
.article-info-title {
font-size: 16px;
font-weight: 400;
height: 40px;
line-height: 40px;
display: flex;
// width: 80%;
.article-info-date {
flex: 1;
height: 40px;
text-align: right;
line-height: 40px;
float: right;
font-weight: 200;
color: #999999;
i {

View File

@@ -47,7 +47,7 @@
<div id="fixd-box">
<el-card class="ranking-card" >
<div slot="header">
<span style="font-size: 14px;font-weight: 600;color: #333333;">好评</span>
<span style="font-size: 14px;font-weight: 600;color: #333333;">贡献</span>
</div>
<div style="padding-bottom:10px">
<el-row class="ranking-title">
@@ -95,7 +95,7 @@
<div style="height: 10px;"></div>
<el-card class="ranking-card" >
<div slot="header">
<span style="font-size: 14px;font-weight: 600;color: #333333;">热度</span>
<span style="font-size: 14px;font-weight: 600;color: #333333;">好评</span>
</div>
<div style="padding-bottom:10px">
<el-row class="ranking-title">

View File

@@ -31,7 +31,7 @@
</div>
<div style="flex:1;">
<el-radio-group v-model="queryCondition.orgDomain" size="mini" @change="search()">
<el-radio-button :label="0">全部</el-radio-button>
<el-radio-button :label="null">全部</el-radio-button>
<el-radio-button v-for="item in domain" :key="item.code" :label="item.name"> {{ item.name}}</el-radio-button>
</el-radio-group>
</div>
@@ -48,7 +48,7 @@
</div>
<div style="flex:1" id="searchBox">
<el-radio-group v-model="queryCondition.majorType" size="mini" @change="search()">
<el-radio-button :label="0">全部</el-radio-button>
<el-radio-button :label="null">全部</el-radio-button>
<el-radio-button v-for="item in Profess" :key="item.code" :label="item.name" > {{ item.name }} </el-radio-button>
</el-radio-group>
</div>
@@ -65,22 +65,29 @@
</el-button>
</div>
</el-row>
<el-row class="order-div">
<el-row style="height:10px;background-color:#f6f7fc;" >
</el-row>
<el-row class="order-div" style="border: 1px solid #EBEEF5;border-bottom:none">
<span class="quyer-tag">
<el-button type="text" class="order-class" @click="searchData('comments')" :class="{ actice: queryCondition.orderField == 'comments' }">最热</el-button>
<el-button type="text" class="order-class" @click="searchData('')" :class="{ actice: queryCondition.orderField == '' }">最新</el-button>
<!-- <el-button type="text" class="order-class" @click="queryCondition.breCommend = queryCondition.breCommend == ture ? true : null" :class="{ actice: queryCondition.breCommend == true }">组织推荐</el-button> -->
</span>
</el-row>
<el-row class="data-content">
<el-row class="data-content" style="border: 1px solid #EBEEF5;border-top:none;border-bottom:none">
<el-col :span="24" v-for="item in caseList.list" :key="item.id" class="case-list">
<div class="case-info">
<div class="case-info">
<div class="case-info-title">
<router-link :to="'/case/detail?id='+item.id">
<!-- <span v-if="i % 2 == 0" style="color:red;margin-right:5px">[组织推荐]</span> -->
<div>
<span class="" v-html="item.title"></span>
<div class="case-titdiv">
<span class="case-tittext" v-html="item.title"></span>
<div class="case-info-date">
<i class="el-icon-time"></i>
<time-show :time="item.sysCreateTime"></time-show>
@@ -160,7 +167,7 @@
<div style="height: 10px;"></div>
<el-card class="ranking-card" >
<div slot="header">
<span style="font-size: 14px;font-weight: 600;color: #333333;">好评</span>
<span style="font-size: 14px;font-weight: 600;color: #333333;">人气</span>
</div>
<div style="padding-bottom:10px">
<el-row class="ranking-title">
@@ -184,7 +191,7 @@
<div style="height: 10px;"></div>
<el-card class="ranking-card" >
<div slot="header">
<span style="font-size: 14px;font-weight: 600;color: #333333;">人气</span>
<span style="font-size: 14px;font-weight: 600;color: #333333;">好评</span>
</div>
<div style="padding-bottom:10px">
<el-row class="ranking-title">
@@ -298,8 +305,8 @@ export default {
orderField: "comments",
// breCommend:null,
keyWord: "",
majorType: null, //专业分类
orgDomain: null, // 组织领域
majorType: '', //专业分类
orgDomain: '', // 组织领域
orderAsc: false
},
keyWord: "",
@@ -387,7 +394,7 @@ export default {
apiCase.usernameList(5).then(res => {
if (res.status == 200) {
this.ankingList = res.result;
// console.log(res)
console.log(res)
}
});
},
@@ -619,6 +626,23 @@ export default {
</script>
<style scoped lang="scss">
::v-deep .el-button{
border-radius: 0px;
}
.case-titdiv{
line-height: 25px;
display: flex;
.case-tittext{
width: 80%;
display: -webkit-box;
overflow: hidden;
word-break: break-all;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
box-sizing: border-box;
}
}
::v-deep .interact-bar .interact-bar-btns .interact-bar-btn{
margin-left: 0;
margin-right:20px;
@@ -628,8 +652,8 @@ export default {
span{
line-height: 30px;
font-size:12px;
color: #B3BDC4;
border: 1px solid #B3BDC4;
color: #9c9c9c;
border: 1px solid #c2c3c8;
padding: 2px 5px;
border-radius: 2px;
margin-right: 8px;
@@ -813,9 +837,10 @@ export default {
font-weight: 600;
height: 30px;
.case-info-date {
flex: 1;
text-align: right;
font-size: 12px;
height: 30px;
float: right;
font-weight: 200;
color: #8590a6;
i {

View File

@@ -14,7 +14,7 @@
<el-col :span="16">
<el-button type="primary" icon="el-icon-search" @click="queryData" style="margin-right: 10px;padding: 10px 15px;">搜索</el-button>
<el-button type="primary" @click="resData" icon="el-icon-refresh-right" style="padding: 10px 15px;">重置</el-button>
</el-col>
</el-col>
</el-row>
<el-tabs v-model="tabName" @tab-click="changeTab" style="margin-top:14px">
<!-- 全部 -->
@@ -211,7 +211,7 @@ export default {
if (this.tabName == 'case') {
this.findCase();
}
},
resData() {
this.keyword = '';
@@ -267,7 +267,7 @@ export default {
if (this.tabName == 'case') {
this.caseList.pageSize = value;
this.findCase()
}
}
},
//分页点击事件
handleCurrentChange(value) {
@@ -287,13 +287,13 @@ export default {
this.caseList.pageIndex = value;
this.findCase();
}
},
// 案例
findCase(){
let { pageIndex, pageSize } = this.caseList;
let query = { pageIndex, pageSize, keyword: this.keyword, isRead: this.isRead };
apiShares.myCaseList(query).then(res=>{
apiShares.myMeCaseList(query).then(res=>{
if(res.status == 200) {
this.caseList.count = res.result.count;
this.caseList.list = res.result.list;
@@ -408,7 +408,7 @@ export default {
if (this.tabName == 'course') {
this.findCourse();
}
}
};
</script>