[update 全局翻译] 导入导出提示

This commit is contained in:
danshihao
2024-07-16 15:25:19 +08:00
parent f6c371e016
commit bd29582ef7
22 changed files with 115 additions and 84 deletions
@@ -570,7 +570,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) {
@@ -579,8 +579,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
})
// 把知道了这个按钮去掉
@@ -589,7 +589,7 @@ export default {
})
postDownFile(this.url.exportXlsUrl, param).then((data) => {
if (!data || data.size === 0) {
this.$message.warning('文件下载失败')
this.$message.warning(this.$t('fileDownloadFail'))
return
}
if (typeof window.navigator.msSaveBlob !== 'undefined') {
@@ -613,7 +613,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) {
@@ -623,8 +623,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
})
// 把知道了这个按钮去掉
@@ -633,7 +633,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')