Skip to content

Commit 7e3f310

Browse files
committed
【功能修复】全局:移除多余的 exportLoading 变量;修复角色导出接口不正确
1 parent dbc61e5 commit 7e3f310

File tree

29 files changed

+83
-107
lines changed

29 files changed

+83
-107
lines changed

src/api/system/role.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function delRole(roleId) {
6767
// 导出角色
6868
export function exportRole(query) {
6969
return request({
70-
url: '/system/role/export',
70+
url: '/system/role/export-excel',
7171
method: 'get',
7272
params: query,
7373
responseType: 'blob'

src/views/infra/apiAccessLog/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,9 @@ export default {
202202
return exportApiAccessLogExcel(params);
203203
}).then(response => {
204204
this.$download.excel(response, 'API 访问日志.xls');
205+
}).finally(() => {
205206
this.exportLoading = false;
206-
}).catch(() => {});
207+
});
207208
}
208209
}
209210
};

src/views/infra/apiErrorLog/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,9 @@ export default {
220220
return exportApiErrorLogExcel(params);
221221
}).then(response => {
222222
this.$download.excel(response, 'API 错误日志.xls');
223+
}).finally(() => {
223224
this.exportLoading = false;
224-
}).catch(() => {});
225+
});
225226
}
226227
}
227228
};

src/views/infra/config/index.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,9 @@ export default {
254254
return exportConfig(params);
255255
}).then(response => {
256256
this.$download.excel(response, '参数配置.xls');
257-
this.exportLoading = false;
258-
}).catch(() => {});
257+
}).finally(() => {
258+
this.exportLoading = false;
259+
});
259260
},
260261
}
261262
};

src/views/infra/job/index.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,12 +366,13 @@ export default {
366366
handleExport() {
367367
const queryParams = this.queryParams;
368368
this.$modal.confirm("是否确认导出所有定时任务数据项?").then(() => {
369-
this.exportLoading = true;
370-
return exportJob(queryParams);
371-
}).then(response => {
372-
this.$download.excel(response, '定时任务.xls');
373-
this.exportLoading = false;
374-
}).catch(() => {});
369+
this.exportLoading = true;
370+
return exportJob(queryParams);
371+
}).then(response => {
372+
this.$download.excel(response, '定时任务.xls');
373+
}).finally(() => {
374+
this.exportLoading = false;
375+
});
375376
}
376377
}
377378
};

src/views/mall/product/brand/index.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ export default {
119119
return {
120120
// 遮罩层
121121
loading: true,
122-
// 导出遮罩层
123-
exportLoading: false,
124122
// 显示搜索条件
125123
showSearch: true,
126124
// 总条数

src/views/mall/product/property/value.vue

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -222,18 +222,6 @@ export default {
222222
this.$modal.msgSuccess("删除成功");
223223
}).catch(() => {
224224
});
225-
},
226-
/** 导出按钮操作 */
227-
handleExport() {
228-
const queryParams = this.queryParams;
229-
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
230-
this.exportLoading = true;
231-
return exportData(queryParams);
232-
}).then(response => {
233-
this.$download.excel(response, '字典数据.xls');
234-
this.exportLoading = false;
235-
}).catch(() => {
236-
});
237225
}
238226
}
239227
};

src/views/mall/product/spu/index.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,6 @@ export default {
240240
categoryList: [],
241241
// 遮罩层
242242
loading: true,
243-
// 导出遮罩层
244-
exportLoading: false,
245243
// 显示搜索条件
246244
showSearch: true,
247245
// 总条数

src/views/mall/promotion/coupon/index.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ export default {
8181
return {
8282
// 遮罩层
8383
loading: true,
84-
// 导出遮罩层
85-
exportLoading: false,
8684
// 显示搜索条件
8785
showSearch: true,
8886
// 总条数

src/views/mall/promotion/coupon/template/index.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ export default {
186186
return {
187187
// 遮罩层
188188
loading: true,
189-
// 导出遮罩层
190-
exportLoading: false,
191189
// 显示搜索条件
192190
showSearch: true,
193191
// 总条数

0 commit comments

Comments
 (0)