diff --git a/src/api/base/customer/index.js b/src/api/base/customer/index.js
index 2c9d9ef..11c8ec8 100644
--- a/src/api/base/customer/index.js
+++ b/src/api/base/customer/index.js
@@ -76,3 +76,13 @@ export function getByNameAndMobile(data){
data
})
}
+
+// 导出数据
+export function exportData(params){
+ return request({
+ url: '/base/custom/export',
+ method: 'get',
+ params,
+ responseType: 'blob'
+ })
+}
diff --git a/src/api/member/active/index.js b/src/api/member/active/index.js
index 3598460..c1dbc85 100644
--- a/src/api/member/active/index.js
+++ b/src/api/member/active/index.js
@@ -87,3 +87,13 @@ export function exportActiveMainExcel(params) {
responseType: 'blob'
})
}
+
+// 导出数据
+export function exportData(params){
+ return request({
+ url: '/member/active-main/export',
+ method: 'get',
+ params,
+ responseType: 'blob'
+ })
+}
diff --git a/src/api/member/coupon/index.js b/src/api/member/coupon/index.js
index b9f1d17..33c349d 100644
--- a/src/api/member/coupon/index.js
+++ b/src/api/member/coupon/index.js
@@ -60,3 +60,12 @@ export function exportCouponExcel(params) {
responseType: 'blob'
})
}
+// 导出数据
+export function exportData(params){
+ return request({
+ url: '/member/coupon/export',
+ method: 'get',
+ params,
+ responseType: 'blob'
+ })
+}
diff --git a/src/api/member/level/index.js b/src/api/member/level/index.js
index 325a20d..683775a 100644
--- a/src/api/member/level/index.js
+++ b/src/api/member/level/index.js
@@ -59,3 +59,13 @@ export function getLevelAll(params) {
params,
})
}
+
+// 导出数据
+export function exportData(params){
+ return request({
+ url: '/member/level/export',
+ method: 'get',
+ params,
+ responseType: 'blob'
+ })
+}
diff --git a/src/views/base/customer/components/PrivateCustomer.vue b/src/views/base/customer/components/PrivateCustomer.vue
index bade79f..12c0caa 100644
--- a/src/views/base/customer/components/PrivateCustomer.vue
+++ b/src/views/base/customer/components/PrivateCustomer.vue
@@ -25,6 +25,10 @@
v-hasPermi="['base:customer-main:create']">新增
+
+ 导出
+
@@ -249,15 +253,18 @@ export default {
},
/** 导出按钮操作 */
async handleExport() {
- await this.$modal.confirm('是否确认导出所有客户管理数据项?');
- try {
+ this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
+ // 处理查询参数
+ let params = {...this.queryParams};
+ params.pageNo = undefined;
+ params.pageSize = undefined;
this.exportLoading = true;
- const data = await CustomerMainApi.exportCustomerMainExcel(this.queryParams);
- this.$download.excel(data, '客户管理.xls');
- } catch {
- } finally {
+ return CustomerMainApi.exportData(params);
+ }).then(response => {
+ this.$download.excel(response, '客户数据.xls');
+ }).finally(() => {
this.exportLoading = false;
- }
+ });
},
}
};
diff --git a/src/views/member/active/index.vue b/src/views/member/active/index.vue
index c87e799..ea55cf0 100644
--- a/src/views/member/active/index.vue
+++ b/src/views/member/active/index.vue
@@ -24,6 +24,10 @@
v-hasPermi="['member:active-main:create']">新增
+
+ 导出
+
@@ -175,15 +179,18 @@ export default {
},
/** 导出按钮操作 */
async handleExport() {
- await this.$modal.confirm('是否确认导出所有营销活动数据项?');
- try {
+ this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
+ // 处理查询参数
+ let params = {...this.queryParams};
+ params.pageNo = undefined;
+ params.pageSize = undefined;
this.exportLoading = true;
- const data = await ActiveMainApi.exportActiveMainExcel(this.queryParams);
- this.$download.excel(data, '营销活动.xls');
- } catch {
- } finally {
+ return ActiveMainApi.exportData(params);
+ }).then(response => {
+ this.$download.excel(response, '营销活动数据.xls');
+ }).finally(() => {
this.exportLoading = false;
- }
+ });
},
}
};
diff --git a/src/views/member/coupon/index.vue b/src/views/member/coupon/index.vue
index a18c1e0..04fbd0e 100644
--- a/src/views/member/coupon/index.vue
+++ b/src/views/member/coupon/index.vue
@@ -31,6 +31,10 @@
v-hasPermi="['member:coupon:create']">新增
+
+ 导出
+
@@ -184,15 +188,18 @@ export default {
},
/** 导出按钮操作 */
async handleExport() {
- await this.$modal.confirm('是否确认导出所有基础卡券数据项?');
- try {
+ this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
+ // 处理查询参数
+ let params = {...this.queryParams};
+ params.pageNo = undefined;
+ params.pageSize = undefined;
this.exportLoading = true;
- const data = await CouponApi.exportCouponExcel(this.queryParams);
- this.$download.excel(data, '基础卡券.xls');
- } catch {
- } finally {
+ return CouponApi.exportData(params);
+ }).then(response => {
+ this.$download.excel(response, '基础卡券数据.xls');
+ }).finally(() => {
this.exportLoading = false;
- }
+ });
},
}
};
diff --git a/src/views/member/level/index.vue b/src/views/member/level/index.vue
index 6f5e513..3b2f60c 100644
--- a/src/views/member/level/index.vue
+++ b/src/views/member/level/index.vue
@@ -17,7 +17,10 @@
v-hasPermi="['member:level:create']">新增
-
+
+ 导出
+
@@ -135,15 +138,18 @@ export default {
},
/** 导出按钮操作 */
async handleExport() {
- await this.$modal.confirm('是否确认导出所有会员等级数据项?');
- try {
+ this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
+ // 处理查询参数
+ let params = {...this.queryParams};
+ params.pageNo = undefined;
+ params.pageSize = undefined;
this.exportLoading = true;
- const data = await LevelApi.exportLevelExcel(this.queryParams);
- this.$download.excel(data, '会员等级.xls');
- } catch {
- } finally {
+ return LevelApi.exportData(params);
+ }).then(response => {
+ this.$download.excel(response, '会员等级数据.xls');
+ }).finally(() => {
this.exportLoading = false;
- }
+ });
},
}
};