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 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 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> <router-link :to="'/case/detail?id='+item.cases.id" target="_blank" >{{item.cases.title}}</router-link>
</div>
<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 three-line-ellipsis"> <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>
<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>
@@ -59,7 +63,6 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.title-line-ellipsis{ .title-line-ellipsis{
width: 100%;
display: -webkit-box; display: -webkit-box;
overflow: hidden; overflow: hidden;
text-overflow:ellipsis; text-overflow:ellipsis;
@@ -100,15 +103,19 @@
} }
.article-info { .article-info {
.article-info-title { .article-info-title {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
display: flex;
// width: 80%;
.article-info-date { .article-info-date {
flex: 1;
height: 40px; height: 40px;
text-align: right;
line-height: 40px; line-height: 40px;
float: right;
font-weight: 200; font-weight: 200;
color: #999999; color: #999999;
i { i {

View File

@@ -47,7 +47,7 @@
<div id="fixd-box"> <div id="fixd-box">
<el-card class="ranking-card" > <el-card class="ranking-card" >
<div slot="header"> <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>
<div style="padding-bottom:10px"> <div style="padding-bottom:10px">
<el-row class="ranking-title"> <el-row class="ranking-title">
@@ -95,7 +95,7 @@
<div style="height: 10px;"></div> <div style="height: 10px;"></div>
<el-card class="ranking-card" > <el-card class="ranking-card" >
<div slot="header"> <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>
<div style="padding-bottom:10px"> <div style="padding-bottom:10px">
<el-row class="ranking-title"> <el-row class="ranking-title">

View File

@@ -31,7 +31,7 @@
</div> </div>
<div style="flex:1;"> <div style="flex:1;">
<el-radio-group v-model="queryCondition.orgDomain" size="mini" @change="search()"> <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-button v-for="item in domain" :key="item.code" :label="item.name"> {{ item.name}}</el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
@@ -48,7 +48,7 @@
</div> </div>
<div style="flex:1" id="searchBox"> <div style="flex:1" id="searchBox">
<el-radio-group v-model="queryCondition.majorType" size="mini" @change="search()"> <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-button v-for="item in Profess" :key="item.code" :label="item.name" > {{ item.name }} </el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
@@ -65,22 +65,29 @@
</el-button> </el-button>
</div> </div>
</el-row> </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"> <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('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="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> --> <!-- <el-button type="text" class="order-class" @click="queryCondition.breCommend = queryCondition.breCommend == ture ? true : null" :class="{ actice: queryCondition.breCommend == true }">组织推荐</el-button> -->
</span> </span>
</el-row> </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"> <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"> <div class="case-info">
<div class="case-info-title"> <div class="case-info-title">
<router-link :to="'/case/detail?id='+item.id"> <router-link :to="'/case/detail?id='+item.id">
<!-- <span v-if="i % 2 == 0" style="color:red;margin-right:5px">[组织推荐]</span> --> <!-- <span v-if="i % 2 == 0" style="color:red;margin-right:5px">[组织推荐]</span> -->
<div> <div class="case-titdiv">
<span class="" v-html="item.title"></span> <span class="case-tittext" v-html="item.title"></span>
<div class="case-info-date"> <div class="case-info-date">
<i class="el-icon-time"></i> <i class="el-icon-time"></i>
<time-show :time="item.sysCreateTime"></time-show> <time-show :time="item.sysCreateTime"></time-show>
@@ -160,7 +167,7 @@
<div style="height: 10px;"></div> <div style="height: 10px;"></div>
<el-card class="ranking-card" > <el-card class="ranking-card" >
<div slot="header"> <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>
<div style="padding-bottom:10px"> <div style="padding-bottom:10px">
<el-row class="ranking-title"> <el-row class="ranking-title">
@@ -184,7 +191,7 @@
<div style="height: 10px;"></div> <div style="height: 10px;"></div>
<el-card class="ranking-card" > <el-card class="ranking-card" >
<div slot="header"> <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>
<div style="padding-bottom:10px"> <div style="padding-bottom:10px">
<el-row class="ranking-title"> <el-row class="ranking-title">
@@ -298,8 +305,8 @@ export default {
orderField: "comments", orderField: "comments",
// breCommend:null, // breCommend:null,
keyWord: "", keyWord: "",
majorType: null, //专业分类 majorType: '', //专业分类
orgDomain: null, // 组织领域 orgDomain: '', // 组织领域
orderAsc: false orderAsc: false
}, },
keyWord: "", keyWord: "",
@@ -387,7 +394,7 @@ export default {
apiCase.usernameList(5).then(res => { apiCase.usernameList(5).then(res => {
if (res.status == 200) { if (res.status == 200) {
this.ankingList = res.result; this.ankingList = res.result;
// console.log(res) console.log(res)
} }
}); });
}, },
@@ -619,6 +626,23 @@ export default {
</script> </script>
<style scoped lang="scss"> <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{ ::v-deep .interact-bar .interact-bar-btns .interact-bar-btn{
margin-left: 0; margin-left: 0;
margin-right:20px; margin-right:20px;
@@ -628,8 +652,8 @@ export default {
span{ span{
line-height: 30px; line-height: 30px;
font-size:12px; font-size:12px;
color: #B3BDC4; color: #9c9c9c;
border: 1px solid #B3BDC4; border: 1px solid #c2c3c8;
padding: 2px 5px; padding: 2px 5px;
border-radius: 2px; border-radius: 2px;
margin-right: 8px; margin-right: 8px;
@@ -813,9 +837,10 @@ export default {
font-weight: 600; font-weight: 600;
height: 30px; height: 30px;
.case-info-date { .case-info-date {
flex: 1;
text-align: right;
font-size: 12px; font-size: 12px;
height: 30px; height: 30px;
float: right;
font-weight: 200; font-weight: 200;
color: #8590a6; color: #8590a6;
i { i {

View File

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