feat():增加导出功能

master
zhang chengzhi 2024-08-10 10:32:52 +08:00
parent 2b1203b2b1
commit 1789f60443
2 changed files with 4 additions and 5 deletions

View File

@ -129,6 +129,7 @@ service.interceptors.response.use(res => {
// 通用下载方法 // 通用下载方法
export function download(url, params, filename, config) { export function download(url, params, filename, config) {
debugger
downloadLoadingInstance = Loading.service({ downloadLoadingInstance = Loading.service({
text: "正在下载数据,请稍候", text: "正在下载数据,请稍候",
spinner: "el-icon-loading", spinner: "el-icon-loading",

View File

@ -51,7 +51,7 @@
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
v-hasPermi="['system:config:export']" v-hasPermi="['pay:user:export']"
icon="el-icon-download" icon="el-icon-download"
plain plain
size="mini" size="mini"
@ -300,11 +300,9 @@ if (row.status == 'Y'){
this.getList(); this.getList();
}); });
} }
} }
}); });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(id) { handleDelete(id) {
@ -318,9 +316,9 @@ if (row.status == 'Y'){
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('system/config/export', { this.download('pay/customer/export', {
...this.queryParams ...this.queryParams
}, `config_${new Date().getTime()}.xlsx`) }, `customer_${new Date().getTime()}.xlsx`)
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */