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