[update 全局翻译] 导入导出提示
This commit is contained in:
+2
-2
@@ -581,14 +581,14 @@ export default {
|
||||
// 下载分解单上传模板
|
||||
salvageListTemplateDownload (fileName, fileSuffix = '.xls') {
|
||||
if (!fileName || typeof fileName !== 'string') {
|
||||
fileName = '模板文件'
|
||||
fileName = this.$t('templateFile')
|
||||
}
|
||||
downloadFile(this.url.salvageListDownTemplateUrl, fileName + fileSuffix)
|
||||
},
|
||||
// 车型项目文件上传模板
|
||||
carTypeFileTemplateDownload (fileName, fileSuffix = '.xls') {
|
||||
if (!fileName || typeof fileName !== 'string') {
|
||||
fileName = '模板文件'
|
||||
fileName = this.$t('templateFile')
|
||||
}
|
||||
downloadFile(this.url.carTypeFileDownTemplateUrl, fileName + fileSuffix)
|
||||
},
|
||||
|
||||
+4
-4
@@ -305,7 +305,7 @@ export default {
|
||||
},
|
||||
handleExportXls (fileName, fileSuffix = '.xls') {
|
||||
if (!fileName || typeof fileName !== 'string') {
|
||||
fileName = '导出文件'
|
||||
fileName = this.$t('exportFile')
|
||||
}
|
||||
const param = this.getQueryParams()
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
@@ -314,8 +314,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
|
||||
})
|
||||
// 把知道了这个按钮去掉
|
||||
@@ -324,7 +324,7 @@ export default {
|
||||
})
|
||||
downFile(this.url.exportXlsUrl, param).then((data) => {
|
||||
if (!data) {
|
||||
this.$message.warning('文件下载失败')
|
||||
this.$message.warning(this.$t('fileDownloadFail'))
|
||||
return
|
||||
}
|
||||
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||
|
||||
+8
-8
@@ -620,8 +620,8 @@ export default {
|
||||
// 加一个大的提示
|
||||
if (!this.loading) {
|
||||
importModalLoading = this.$info({
|
||||
title: '提示',
|
||||
content: <span>正在导入,请稍候 <a-spin size="small" /></span>,
|
||||
title: this.$t('tips'),
|
||||
content: <span>{this.$t('importTip')} <a-spin size="small" /></span>,
|
||||
keyboard: false
|
||||
})
|
||||
}
|
||||
@@ -651,7 +651,7 @@ export default {
|
||||
)
|
||||
})
|
||||
} else {
|
||||
this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
|
||||
this.$message.success(info.file.response.message || `${info.file.name} ${this.$t('fileUploadSuccess')}`)
|
||||
}
|
||||
// 推入表格中
|
||||
this.dataSourceEvaluate = info.file.response.result.map(item => {
|
||||
@@ -692,13 +692,13 @@ export default {
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(`文件上传失败: ${info.file.msg} `)
|
||||
this.$message.warning(`${this.$t('fileUploadFailed')}: ${info.file.msg} `)
|
||||
}
|
||||
}
|
||||
},
|
||||
handleExportXls (fileName, fileSuffix = '.xls') {
|
||||
if (!fileName || typeof fileName !== 'string') {
|
||||
fileName = '导出文件'
|
||||
fileName = this.$t('exportFile')
|
||||
}
|
||||
const param = this.getQueryParams()
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
@@ -707,8 +707,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
|
||||
})
|
||||
// 把知道了这个按钮去掉
|
||||
@@ -717,7 +717,7 @@ export default {
|
||||
})
|
||||
downFile(this.url.exportXlsUrl, param).then((data) => {
|
||||
if (!data) {
|
||||
this.$message.warning('文件下载失败')
|
||||
this.$message.warning(this.$t('fileDownloadFail'))
|
||||
return
|
||||
}
|
||||
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||
|
||||
+4
-4
@@ -196,7 +196,7 @@ export default {
|
||||
},
|
||||
handleExportXls (fileName, fileSuffix = '.xls') {
|
||||
if (!fileName || typeof fileName !== 'string') {
|
||||
fileName = '导出文件'
|
||||
fileName = this.$t('exportFile')
|
||||
}
|
||||
const param = this.getQueryParams()
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
@@ -205,8 +205,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
|
||||
})
|
||||
// 把知道了这个按钮去掉
|
||||
@@ -215,7 +215,7 @@ export default {
|
||||
})
|
||||
downFile(this.url.exportXlsUrl, param).then((data) => {
|
||||
if (!data) {
|
||||
this.$message.warning('文件下载失败')
|
||||
this.$message.warning(this.$t('fileDownloadFail'))
|
||||
return
|
||||
}
|
||||
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||
|
||||
Reference in New Issue
Block a user