1. 完成所有导出的功能

This commit is contained in:
YunaiV
2021-01-15 01:54:36 +08:00
parent d8a52a8c61
commit c3df5bc62f
35 changed files with 326 additions and 330 deletions

View File

@ -54,9 +54,10 @@ export function delData(dictCode) {
// 导出字典数据
export function exportData(query) {
return request({
url: '/system/dict/data/export',
url: '/system/dict-data/export',
method: 'get',
params: query
params: query,
responseType: 'blob'
})
}

View File

@ -48,7 +48,8 @@ export function exportType(query) {
return request({
url: '/system/dict-type/export',
method: 'get',
params: query
params: query,
responseType: 'blob'
})
}

View File

@ -69,6 +69,7 @@ export function exportRole(query) {
return request({
url: '/system/role/export',
method: 'get',
params: query
params: query,
responseType: 'blob'
})
}

View File

@ -314,7 +314,7 @@ export default {
}).then(function() {
return exportData(queryParams);
}).then(response => {
this.download(response.msg);
this.downloadExcel(response, '字典数据.xls');
})
}
}

View File

@ -304,7 +304,10 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
const queryParams = this.addDateRange(this.queryParams, [
this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined,
this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined,
]);
this.$confirm('是否确认导出所有类型数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -312,7 +315,7 @@ export default {
}).then(function() {
return exportType(queryParams);
}).then(response => {
this.download(response.msg);
this.downloadExcel(response, '数据类型.xls');
})
}
}

View File

@ -568,7 +568,7 @@ export default {
}).then(function() {
return exportRole(queryParams);
}).then(response => {
this.download(response.msg);
this.downloadExcel(response, '角色数据.xls');
})
}
}