mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-08 10:26:43 +08:00
Merge branch 'dev' of https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/portal into dev
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<div style="padding: 0px 5px;"><el-input placeholder="关键词搜索" v-model="queryObj.keyWord" clearable></el-input></div>
|
||||
<div style="padding: 0px 5px;">
|
||||
<el-button @click="getData" icon="el-icon-search" type="primary" >搜索</el-button>
|
||||
<el-button @click="showRecords()" icon="el-icon-tickets" type="info" >推荐记录</el-button>
|
||||
<!-- <el-button @click="showRecords()" icon="el-icon-tickets" type="info" >推荐记录</el-button> -->
|
||||
<el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,7 +35,7 @@
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button-group>
|
||||
<el-button type="text" @click="shareItem(scope.row)" icon="el-icon-share" style="margin:0 5px">推荐</el-button>
|
||||
<!-- <el-button type="text" @click="shareItem(scope.row)" icon="el-icon-share" style="margin:0 5px">推荐</el-button> -->
|
||||
<el-button style="margin:0 5px" v-if="scope.row.isTop==0" type="text" @click="setTop(scope.row)" :icon="scope.row.isTop==1 ? 'el-icon-bottom' : 'el-icon-top'">置顶</el-button>
|
||||
<el-button style="margin:0 5px" v-else type="text" @click="setTop(scope.row)" :icon="scope.row.isTop==1 ? 'el-icon-bottom' : 'el-icon-top'">取消置顶</el-button>
|
||||
<el-button type="text" @click="delItem(scope.row)" icon="el-icon-delete">删除</el-button>
|
||||
@@ -48,7 +48,7 @@
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="queryObj.pagelIndex"
|
||||
:current-page="queryObj.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="queryObj.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@@ -117,7 +117,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
queryObj: {
|
||||
pagelIndex:1,
|
||||
pageIndex:1,
|
||||
pageSize:10,
|
||||
}, //查询对象
|
||||
caseList: [], //案例列表
|
||||
@@ -189,7 +189,7 @@ export default {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.queryObj.pagelIndex=val;
|
||||
this.queryObj.pageIndex=val;
|
||||
this.getData();
|
||||
},
|
||||
//暂时因为没数据,先做添加
|
||||
|
||||
@@ -103,8 +103,8 @@
|
||||
<!-- {{item.summary}} -->
|
||||
{{displayAll(item)}}
|
||||
</router-link>
|
||||
<span style="color:#588afc" v-if="item.summary.length>90" @click="changeIsAll(item)">
|
||||
{{item.isAll?'收起':'全文'}}
|
||||
<span style="color:#588afc" v-if="item.summary.length>190" @click="changeIsAll(item)">
|
||||
{{item.isAll?'收起':'展开'}}
|
||||
</span>
|
||||
</div>
|
||||
<!-- </router-link> -->
|
||||
@@ -293,6 +293,7 @@ export default {
|
||||
queryCondition:{
|
||||
pageIndex:1,
|
||||
pageSize:10,
|
||||
isTop:true,
|
||||
orderField:'comments',
|
||||
// breCommend:null,
|
||||
keyWord:'',
|
||||
@@ -351,8 +352,8 @@ export default {
|
||||
methods: {
|
||||
//展示全部
|
||||
displayAll(item) {
|
||||
if(!item.isAll && item.summary && item.summary.length > 90) {
|
||||
return item.summary.slice(0, 90) + "...";
|
||||
if(!item.isAll && item.summary && item.summary.length > 190) {
|
||||
return item.summary.slice(0, 190) + "...";
|
||||
}
|
||||
return item.summary;
|
||||
},
|
||||
@@ -423,6 +424,7 @@ export default {
|
||||
this.search()
|
||||
},
|
||||
searchData(num) {
|
||||
this.queryCondition.pageIndex = 1;
|
||||
this.queryCondition.orderField = num;
|
||||
this.getCaseData();
|
||||
},
|
||||
@@ -431,7 +433,7 @@ export default {
|
||||
let outerHeight = document.documentElement.clientHeight
|
||||
let scrollTop = document.documentElement.scrollTop
|
||||
if ((outerHeight + scrollTop + 350) >= innerHeight) {
|
||||
if(this.moreState == 1 && this.course.pageIndex < 4) {
|
||||
if(this.moreState == 1 && this.queryCondition.pageIndex < 4) {
|
||||
this.loadMore();
|
||||
}
|
||||
}
|
||||
@@ -482,8 +484,6 @@ export default {
|
||||
},
|
||||
async getCaseData(){
|
||||
this.getTags();
|
||||
let isTopList = [];
|
||||
let caseList = [];
|
||||
if(this.queryCondition.pageIndex == 1) {
|
||||
this.caseList.list =[];
|
||||
}
|
||||
@@ -495,14 +495,8 @@ export default {
|
||||
res.result.list.forEach(item=>{
|
||||
item.isAll=false;
|
||||
item.authorInfo={aid:'',name:'',orgInfo:'',avatar:'',sex:null};
|
||||
if(item.isTop) {
|
||||
isTopList.push(item);
|
||||
} else {
|
||||
caseList.push(item)
|
||||
}
|
||||
})
|
||||
|
||||
this.caseList.list.push(...isTopList,...caseList);
|
||||
this.caseList.list.push(...res.result.list);
|
||||
this.caseList.count=res.result.count;
|
||||
this.getCaseUserData(res.result.list)
|
||||
this.moreState = 1;
|
||||
@@ -510,7 +504,7 @@ export default {
|
||||
this.moreState = 3;
|
||||
}
|
||||
} else {
|
||||
this.moreState = 3;
|
||||
this.moreState = 3;
|
||||
|
||||
}
|
||||
}else{
|
||||
@@ -530,6 +524,7 @@ export default {
|
||||
i !== "pageSize" &&
|
||||
i !== "orderField" &&
|
||||
i !== "orderAsc" &&
|
||||
i !== "isTop" &&
|
||||
caseData[i] !== null &&
|
||||
caseData[i] !== undefined
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user