|
|
@@ -1,6 +1,7 @@
|
|
|
<template>
|
|
|
<basic-container>
|
|
|
<avue-crud :option="option"
|
|
|
+ :table-loading="loading"
|
|
|
:data="data"
|
|
|
ref="crud"
|
|
|
v-model="form"
|
|
|
@@ -44,6 +45,8 @@
|
|
|
return {
|
|
|
form: {},
|
|
|
selectionList: [],
|
|
|
+ loading: true,
|
|
|
+ query: {},
|
|
|
page: {
|
|
|
pageSize: 10,
|
|
|
currentPage: 1,
|
|
|
@@ -209,6 +212,7 @@
|
|
|
this.onLoad(this.page);
|
|
|
},
|
|
|
searchChange(params) {
|
|
|
+ this.query = params;
|
|
|
this.onLoad(this.page, params);
|
|
|
},
|
|
|
selectionChange(list) {
|
|
|
@@ -274,10 +278,12 @@
|
|
|
this.page.pageSize = pageSize;
|
|
|
},
|
|
|
onLoad(page, params = {}) {
|
|
|
- getList(page.currentPage, page.pageSize, params).then(res => {
|
|
|
+ this.loading = true;
|
|
|
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
|
|
|
const data = res.data.data;
|
|
|
this.page.total = data.total;
|
|
|
this.data = data.records;
|
|
|
+ this.loading = false;
|
|
|
});
|
|
|
}
|
|
|
}
|