@@ -3,6 +3,7 @@
type="primary"
size="small"
icon="el-icon-download"
+ :loading="loading"
@click="exportFn"
>{{btnName}}</el-button
>
@@ -26,16 +27,21 @@
},
//注册组件
data() {
- return {};
+ return {
+ loading: false
+ };
created() {},
methods: {
exportFn() {
+ this.loading = true;
exportTable({
api: this.apiUrl,
fileName: this.fileName,
data:this.params
+ }).finally(() => {
+ this.loading = false;
});
}
@@ -96,7 +96,7 @@
btnName="列表导出"
fileName="销售订单"
apiUrl="/eom/saleorder/export"
- :params="params"
+ :params="exportParams"
></exportButton>
<el-button
@@ -633,6 +633,12 @@ export default {
clearInterval(this.timeR);
computed: {
+ exportParams() {
+ ...this.params,
+ orderIds: this.selection.map(item => item.id)
+ }
+ },
clientEnvironmentId() {
return this.$store.state.user.info.clientEnvironmentId;