|
@@ -440,20 +440,21 @@ export default {
|
|
this.params = this.$init.params(SearchColumns);
|
|
this.params = this.$init.params(SearchColumns);
|
|
this.getList(this.params, this.Pages);
|
|
this.getList(this.params, this.Pages);
|
|
},
|
|
},
|
|
- getList(params, pages) {
|
|
|
|
- getDemandList({ ...params, ...pages })
|
|
|
|
- .then((res) => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.tableList = res.rows;
|
|
|
|
- this.Pages.total = res.total;
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- .then(() => {
|
|
|
|
- this.loading = false;
|
|
|
|
- })
|
|
|
|
- .catch((err) => {
|
|
|
|
- this.loading = false;
|
|
|
|
|
|
+ async getList(params, pages) {
|
|
|
|
+ try {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ let { code, rows, total } = await getDemandList({
|
|
|
|
+ ...params,
|
|
|
|
+ ...pages,
|
|
});
|
|
});
|
|
|
|
+ if (code === 200) {
|
|
|
|
+ this.tableList = rows;
|
|
|
|
+ this.Pages.total = total;
|
|
|
|
+ }
|
|
|
|
+ } catch (error) {
|
|
|
|
+ } finally {
|
|
|
|
+ this.loading = false;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
this.ids = selection.map((item) => item.id);
|
|
this.ids = selection.map((item) => item.id);
|