flat: 国庆节暂存

This commit is contained in:
史典卓
2024-10-09 09:39:34 +08:00
parent c40af81ac4
commit 9d9d7972c9
24 changed files with 571 additions and 285 deletions

View File

@@ -2,8 +2,7 @@
<div>
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="obj" @row-del="rowDel"
@row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen" :page.sync="page"
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
@on-load="onLoad">
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange">
<!--自定义按钮-->
<template slot="menuLeft">
<save-button type="warning" plain icon="el-icon-plus" size="small" @click="rowCopy('', 'add')"
@@ -202,6 +201,7 @@ export default {
};
},
created() {
this.onLoad(this.page, this.query)
},
watch: {},
computed: {
@@ -469,9 +469,11 @@ export default {
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
this.onLoad(this.page, this.query)
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
this.onLoad(this.page, this.query)
},
/*刷新本页 带搜索参数*/
refreshChange() {
@@ -480,10 +482,14 @@ export default {
/*加载数据*/
onLoad(page, params = {}) {
this.loading = true;
this.query = {
status: this.query.status,
...params
}
getList(
page.currentPage,
page.pageSize,
Object.assign(this.query, params)
this.query
).then((res) => {
const data = res.data.data;
this.page.total = data.total;