|
@@ -2,12 +2,8 @@
|
|
|
export default {
|
|
|
name: "ExportDialog",
|
|
|
props: {
|
|
|
- data: {
|
|
|
- type: Object,
|
|
|
- require: true,
|
|
|
- },
|
|
|
- page: {
|
|
|
- type: Object,
|
|
|
+ selectData: {
|
|
|
+ type: Array,
|
|
|
require: true,
|
|
|
},
|
|
|
},
|
|
@@ -29,13 +25,11 @@ export default {
|
|
|
instance.confirmButtonText = "下载中...";
|
|
|
try {
|
|
|
// try
|
|
|
- const {
|
|
|
- data,
|
|
|
- page: { pageNum, pageSize },
|
|
|
- } = this.$props;
|
|
|
+ const { selectData } = this.$props;
|
|
|
+ const ids = selectData.map((item) => item.id);
|
|
|
await this.download(
|
|
|
- "pu/price/catalogue/export",
|
|
|
- { ...data, pageNum, pageSize },
|
|
|
+ "/pu/price/catalogue/exportByIds",
|
|
|
+ { ids: ids },
|
|
|
`catalogue_${new Date().getTime()}.xlsx`
|
|
|
);
|
|
|
await done();
|