[update 全局翻译] 导入导出提示
This commit is contained in:
@@ -453,7 +453,7 @@ export default {
|
||||
// 导出改成用post
|
||||
handleExportXls (fileName) {
|
||||
if (!fileName || typeof fileName !== 'string') {
|
||||
fileName = '导出文件'
|
||||
fileName = this.$t('exportFile')
|
||||
}
|
||||
const param = this.getQueryParams()
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
@@ -462,8 +462,8 @@ export default {
|
||||
console.log('导出参数', param)
|
||||
// 加一个大的提示
|
||||
const modalLoading = this.$info({
|
||||
title: '提示',
|
||||
content: <span>正在导出,请稍候 <a-spin size="small" /></span>,
|
||||
title: this.$t('tips'),
|
||||
content: <span>{this.$t('exportTip')} <a-spin size="small" /></span>,
|
||||
keyboard: false
|
||||
})
|
||||
// 把知道了这个按钮去掉
|
||||
@@ -472,7 +472,7 @@ export default {
|
||||
})
|
||||
postDownFile(this.url.exportXlsUrl, param).then((data) => {
|
||||
if (!data) {
|
||||
this.$message.warning('文件下载失败')
|
||||
this.$message.warning(this.$t('fileDownloadFail'))
|
||||
return
|
||||
}
|
||||
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||
@@ -496,7 +496,7 @@ export default {
|
||||
// 带文件导出
|
||||
handleFileExport (fileName) {
|
||||
if (!fileName || typeof fileName !== 'string') {
|
||||
fileName = '导出文件'
|
||||
fileName = this.$t('exportFile')
|
||||
}
|
||||
const param = this.getQueryParams()
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
@@ -505,8 +505,8 @@ export default {
|
||||
console.log('导出参数', param)
|
||||
// 加一个大的提示
|
||||
const modalLoading = this.$info({
|
||||
title: '提示',
|
||||
content: <span>正在导出,请稍候 <a-spin size="small" /></span>,
|
||||
title: this.$t('tips'),
|
||||
content: <span>{this.$t('exportTip')} <a-spin size="small" /></span>,
|
||||
keyboard: false
|
||||
})
|
||||
// 把知道了这个按钮去掉
|
||||
@@ -515,7 +515,7 @@ export default {
|
||||
})
|
||||
postDownFile(this.url.exportZipUrl, param).then((data) => {
|
||||
if (!data) {
|
||||
this.$message.warning('文件下载失败')
|
||||
this.$message.warning(this.$t('fileDownloadFail'))
|
||||
}
|
||||
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||
window.navigator.msSaveBlob(new Blob([data]), fileName + '.zip')
|
||||
@@ -539,7 +539,7 @@ export default {
|
||||
// 下载导入模板
|
||||
downTemplate (fileName) {
|
||||
if (!fileName || typeof fileName !== 'string') {
|
||||
fileName = '模板文件'
|
||||
fileName = this.$t('templateFile')
|
||||
}
|
||||
downloadFile(this.url.downTemplateUrl, fileName + '.zip')
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user