no message
parent
d1ee99a823
commit
4b3fe01799
|
|
@ -50,7 +50,7 @@
|
|||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'inventory:data_inventory:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增 </a-button>
|
||||
<a-button type="primary" v-auth="'inventory:data_inventory:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls">
|
||||
<a-button type="primary" v-auth="'inventory:data_inventory:exportXls'" preIcon="ant-design:export-outlined" :loading="exportLoading" @click="handleExport">
|
||||
导出
|
||||
</a-button>
|
||||
<j-upload-button type="primary" v-auth="'inventory:data_inventory:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls"
|
||||
|
|
@ -127,7 +127,7 @@
|
|||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: '库存表',
|
||||
name: '库存信息',
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
|
|
@ -244,6 +244,20 @@
|
|||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
// 添加导出加载状态
|
||||
const exportLoading = ref(false);
|
||||
// 创建带加载状态的导出方法
|
||||
async function handleExport() {
|
||||
exportLoading.value = true;
|
||||
try {
|
||||
// 从 tableContext 中获取原始的 onExportXls 方法
|
||||
// 或者直接调用 handleExportXls
|
||||
await onExportXls();
|
||||
} finally {
|
||||
exportLoading.value = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
|
|
|||
Loading…
Reference in New Issue