mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
提交
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<el-row class="search-item">
|
||||
<el-col :span="24">
|
||||
<div style="margin-top:10px; display: flex;">
|
||||
<div style="line-height: 25px;width:11.5%">
|
||||
<div style="line-height: 25px;padding-right: 5px;">
|
||||
<span class="item-title" style="padding-right: 5px;">组织领域</span>
|
||||
<span class="item-line"></span>
|
||||
</div>
|
||||
@@ -45,7 +45,7 @@
|
||||
<el-col :span="24">
|
||||
<!-- <div class="item-title">专业领域</div> -->
|
||||
<div style="margin-top:10px; display: flex;">
|
||||
<div style="line-height: 25px;width:11.5%">
|
||||
<div style="line-height: 25px;padding-right: 5px;">
|
||||
<span class="item-title" style="padding-right: 5px;">专业分类</span>
|
||||
<span class="item-line"></span>
|
||||
</div>
|
||||
@@ -123,12 +123,17 @@
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="pagination-div">
|
||||
<span class="pag-text" @click="loadMore()" v-if="moreState == 1">加载更多</span>
|
||||
<span class="pag-text-msg" v-else-if="moreState == 2">数据加载中</span>
|
||||
<span class="pag-text-msg" v-else-if="moreState == 3 && !isSeach">没有更多数据了</span>
|
||||
<span class="pag-text-msg" v-else-if="isSeach">没有查询到相关内容</span>
|
||||
</div>
|
||||
<div v-if="isSeach" style="height:382px">
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="pagination-div">
|
||||
<span class="pag-text" v-if="isMore" @click="loadMore()">加载更多</span>
|
||||
<span class="pag-text" v-else>没有更多数据了</span>
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -268,6 +273,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moreState:1,// 1 加载更多 2 加载中 3无数据
|
||||
isSeach:false,
|
||||
searchwd:true,
|
||||
showAll:true,//是否展开全部
|
||||
searchRecords:[],
|
||||
@@ -312,13 +319,17 @@ export default {
|
||||
this.protocolDialogVisible = true;
|
||||
}
|
||||
this.keyWord = this.$route.query.keyword;
|
||||
if(this.keyWord != '') {
|
||||
this.isSeach = true;
|
||||
}
|
||||
this.getAnkingData();
|
||||
this.getPopularity();
|
||||
this.searchterm();
|
||||
this.getPositive();
|
||||
this.getProfess();
|
||||
this.getdomain();
|
||||
this.getCaseData();
|
||||
// this.getCaseData();
|
||||
this.search();
|
||||
window.addEventListener(
|
||||
"scroll",
|
||||
this.handleScroll
|
||||
@@ -393,7 +404,6 @@ export default {
|
||||
let key ='org_domain'
|
||||
apiDict.items(key).then(res =>{
|
||||
if(res.status==200){
|
||||
// console.log(res)
|
||||
this.domain = res.result
|
||||
}
|
||||
})
|
||||
@@ -408,10 +418,11 @@ export default {
|
||||
},
|
||||
emitInput(val) {
|
||||
this.keyWord=val;
|
||||
this.isSeach =true;
|
||||
this.queryCondition.pageIndex = 1
|
||||
this.search()
|
||||
},
|
||||
searchData(num) {
|
||||
|
||||
this.queryCondition.orderField = num;
|
||||
this.getCaseData();
|
||||
},
|
||||
@@ -473,9 +484,14 @@ export default {
|
||||
this.getTags();
|
||||
let isTopList = [];
|
||||
let caseList = [];
|
||||
if(this.queryCondition.pageIndex == 1) {
|
||||
this.caseList.list =[];
|
||||
}
|
||||
this.moreState = 2;
|
||||
await apiCase.queryList(this.queryCondition).then(res=>{
|
||||
if(res.status==200){
|
||||
if(res.result.list.length>0){
|
||||
this.isSeach =false;
|
||||
res.result.list.forEach(item=>{
|
||||
item.isAll=false;
|
||||
item.authorInfo={aid:'',name:'',orgInfo:'',avatar:'',sex:null};
|
||||
@@ -485,12 +501,17 @@ export default {
|
||||
caseList.push(item)
|
||||
}
|
||||
})
|
||||
if(this.queryCondition.pageIndex == 1) {
|
||||
this.caseList.list =[];
|
||||
}
|
||||
|
||||
this.caseList.list.push(...isTopList,...caseList);
|
||||
this.caseList.count=res.result.count;
|
||||
this.getCaseUserData(res.result.list)
|
||||
this.moreState = 1;
|
||||
if(res.result.count === res.result.list.length) {
|
||||
this.moreState = 3;
|
||||
}
|
||||
} else {
|
||||
this.moreState = 3;
|
||||
|
||||
}
|
||||
}else{
|
||||
this.$message.error(res.message);
|
||||
@@ -732,6 +753,9 @@ export default {
|
||||
.pagination-div {
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
.pag-text{
|
||||
|
||||
}
|
||||
}
|
||||
.order-div {
|
||||
padding: 12px 15px;
|
||||
|
||||
@@ -64,6 +64,30 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="案例" name="case">
|
||||
<div style="min-height: 500px;">
|
||||
<article-items :keyword="keyword" type="toMy" @confirm="confirm" :items="caseList.list"></article-items>
|
||||
<!-- v-if="articleList.count>articleList.pageSize" -->
|
||||
<div v-if="caseList.list.length > 0" style="text-align: center; margin-top:57px">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="caseList.pageIndex"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="caseList.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="caseList.count"
|
||||
></el-pagination>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="caseList.list.length == 0">
|
||||
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
||||
<div v-else class="zan-wu">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="文章" name="article">
|
||||
<div style="min-height: 500px;">
|
||||
<article-items :keyword="keyword" type="toMy" @confirm="confirm" :items="articleList.list"></article-items>
|
||||
@@ -180,6 +204,9 @@ export default {
|
||||
if (this.tabName == 'course') {
|
||||
this.findCourse();
|
||||
}
|
||||
if (this.tabName == 'case') {
|
||||
this.findCase();
|
||||
}
|
||||
|
||||
},
|
||||
resData() {
|
||||
@@ -212,6 +239,9 @@ export default {
|
||||
if (tab.name == 'course') {
|
||||
this.findCourse();
|
||||
}
|
||||
if (tab.name == 'case') {
|
||||
this.findCase();
|
||||
}
|
||||
},
|
||||
//分页点击事件
|
||||
handleSizeChange(value) {
|
||||
@@ -227,7 +257,10 @@ export default {
|
||||
this.courseList.pageSize = value;
|
||||
this.findCourse();
|
||||
}
|
||||
|
||||
if (this.tabName == 'case') {
|
||||
this.caseList.pageSize = value;
|
||||
this.findCase()
|
||||
}
|
||||
},
|
||||
//分页点击事件
|
||||
handleCurrentChange(value) {
|
||||
@@ -243,8 +276,25 @@ export default {
|
||||
this.courseList.pageIndex = value;
|
||||
this.findCourse();
|
||||
}
|
||||
if (this.tabName == 'case') {
|
||||
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=>{
|
||||
if(res.status == 200) {
|
||||
this.caseList.count = res.result.count;
|
||||
this.caseList.list = res.result.list;
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
//问答数据查询
|
||||
findQa() {
|
||||
let { pageIndex, pageSize } = this.qaList;
|
||||
|
||||
Reference in New Issue
Block a user