|
@@ -6,10 +6,10 @@
|
|
|
<el-card class="training-category opacity-bg fl" style="border-radius: 20px;padding-top: -5px;" >
|
|
|
<h2 align="center" style="background-color: white; color: #000000;padding-top:5px;">文件通知</h2>
|
|
|
<el-table :data="postList" highlight-current-row
|
|
|
- :show-header="false" max-height="290px" >
|
|
|
+ :show-header="false" height="240px" >
|
|
|
<el-table-column min-width="600px">
|
|
|
<template slot-scope="{row, $index}">
|
|
|
- <span @click="gotoDetail(row.postId)">{{$index+1}}、{{ row.title }}</span>
|
|
|
+ <span @click="gotoDetail(row.postId)">{{(page*size)-size+$index+1}}、{{ row.title }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column width="160px">
|
|
@@ -18,6 +18,14 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <el-pagination class="tc m-page"
|
|
|
+ @current-change="handlePageChange"
|
|
|
+ :current-page="page"
|
|
|
+ :page-size="size"
|
|
|
+ layout="total, prev, pager, next"
|
|
|
+ :total="total">
|
|
|
+ </el-pagination>
|
|
|
+
|
|
|
</el-card>
|
|
|
|
|
|
<div class="m-login opacity-bg fr">
|
|
@@ -100,6 +108,9 @@ export default {
|
|
|
idNum: "",
|
|
|
},
|
|
|
postList:[],
|
|
|
+ page:1,
|
|
|
+ size: 5,
|
|
|
+ total:0,
|
|
|
loginDialog: false,
|
|
|
err: {},
|
|
|
};
|
|
@@ -137,10 +148,19 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
getPostList(){
|
|
|
- httpServer("course.getPostList", {page:1,type:'操作指南'}).then( res=>{
|
|
|
- this.postList = res.data.list
|
|
|
+ let {page,size} = this;
|
|
|
+ let param = {page,size,type:'操作指南'}
|
|
|
+ httpServer("course.getPostList", param).then( res=>{
|
|
|
+ if( res.code == 200){
|
|
|
+ this.postList = res.data.list
|
|
|
+ this.total = res.data.total;
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
+ handlePageChange(page){
|
|
|
+ this.page = page;
|
|
|
+ this.getPostList()
|
|
|
+ },
|
|
|
gotoDetail(postId){
|
|
|
this.$router.push({name:'news', query:{postId}})
|
|
|
},
|