|
|
@ -59,7 +59,7 @@ export const TableHeaderMixins = { |
|
|
|
// }
|
|
|
|
// 导出
|
|
|
|
else if (val == 'export') { |
|
|
|
const name = this.$route.meta.title |
|
|
|
const name = this.$route.meta.title |
|
|
|
this.$confirm('您将进行导出操作, 是否继续?', '提示', { |
|
|
|
confirmButtonText: '本页导出', |
|
|
|
cancelButtonText: '全部导出', |
|
|
@ -76,14 +76,8 @@ export const TableHeaderMixins = { |
|
|
|
this.PageListParams.route = item.url ? item.url : this.URL + '/export'; |
|
|
|
let _exportUrl = item.url ? item.url : this.URL; |
|
|
|
let _special = (item.url && item.url.length > 0) ? true : false |
|
|
|
postExport(this.PageListParams,_exportUrl,_special).then(res => { |
|
|
|
fileStorage({blobName: res.blobName}).then( fileStorageRes => { |
|
|
|
// this.downloadFile(fileStorageRes.bytes, name)//使用前端导出名称
|
|
|
|
this.downloadFile(fileStorageRes.bytes, fileStorageRes.fileName)//使用后端导出名称
|
|
|
|
}).catch( err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
|
|
|
|
postExport(this.PageListParams, _exportUrl, _special).then(res => { |
|
|
|
this.blob(res, name)//使用前端导出名称
|
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}).catch(err => { |
|
|
|
this.Loading.appMainLoading = false |
|
|
@ -99,11 +93,7 @@ export const TableHeaderMixins = { |
|
|
|
params.route = this.URL + '/export' |
|
|
|
params.function = name |
|
|
|
postExport(params, this.URL).then(res => { |
|
|
|
fileStorage({blobName: res.blobName}).then( fileStorageRes => { |
|
|
|
this.downloadFile(fileStorageRes.bytes, fileStorageRes.fileName) |
|
|
|
}).catch( err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
this.blob(res, name)//使用前端导出名称
|
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}).catch(err => { |
|
|
|
this.Loading.appMainLoading = false |
|
|
|