楼层装修 分页

master
夜良king 2022-02-16 11:37:00 +08:00
parent c4037a346d
commit b5ca94ab98
1 changed files with 28 additions and 7 deletions

View File

@ -42,6 +42,7 @@
</div>
<div class="no-more" v-if="list.length == 0"></div>
</div>
<Page show-total :total="total" show-sizer :page-size-opts="[10, 20, 50]" show-elevator style="float:right;overflow:hidden;" @on-change="changePageNum" @on-page-size-change="changePageSize" :page-size="searchForm.pageSize"/>
</Card>
<Modal
v-model="showModal"
@ -71,11 +72,18 @@ export default {
return {
showModal: false, // modal
selectedIndex: 0, // index
total:0,
formData: {
//
status: false, //
name: "", //
},
searchForm:{
pageNumber:1,
pageSize:10,
sort: 'createTime',
order: 'desc'
},
columns: [
// column
{
@ -158,16 +166,29 @@ export default {
});
},
//
changePageNum (val) {
this.searchForm.pageNumber = val;
this.getTemplateList();
},
//
changePageSize (val) {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = val;
this.getTemplateList();
},
getTemplateList() {
//
let params = {
pageNumber: 1,
pageSize: 999,
pageType: "INDEX",
pageClientType: "PC",
};
API_floor.getHomeList(params).then((res) => {
// let params = {
// pageNumber: 1,
// pageSize: 999,
// pageType: "INDEX",
// pageClientType: "PC",
// };
API_floor.getHomeList(this.searchForm).then((res) => {
if (res.success) {
// this.total
this.total = res.result.total
this.list = res.result.records;
this.list.forEach((e) => {
if (e.pageShow === "OPEN") {