update 导入校验修改

This commit is contained in:
赵霄
2023-09-27 17:45:08 +08:00
parent dc42cf204e
commit e29dcddb4e
3 changed files with 31 additions and 31 deletions
@@ -27,14 +27,14 @@ module.exports = {
treeSearchPlaceholder: 'Please enter the tree system', // 请输入树状图体系
collection: 'Invoice Collection', // 收藏
cancelCollection: 'Delete Collection', // 取消收藏
exportFileName: 'Domestic standard regulations', // 国内标准法规
exportZipName: 'Domestic standards and regulations (with documents)', // 国内标准法规(带文件)
templateName: 'Import templates for domestic standards and regulations' // 国内标准法规导入模板
exportFileName: 'Domestic standard', // 国内标准法规
exportZipName: 'Domestic standards (with documents)', // 国内标准法规(带文件)
templateName: 'Import templates for domestic standards' // 国内标准法规导入模板
},
overseasStandard: {
exportFileName: 'Overseas standard regulations',
exportZipName: 'Overseas standard regulations (with documentation)',
templateName: 'Import template of overseas standard regulations'
exportFileName: 'Overseas standard',
exportZipName: 'Overseas standard (with documentation)',
templateName: 'Import template of overseas standard'
},
standardDetail: {
standardNumber: 'Standard Number',
@@ -27,14 +27,14 @@ module.exports = {
treeSearchPlaceholder: '请输入树状图体系',
collection: '收藏',
cancelCollection: '取消收藏',
exportFileName: '国内标准法规',
exportZipName: '国内标准法规(带文件)',
templateName: '国内标准法规导入模板'
exportFileName: '国内标准',
exportZipName: '国内标准(带文件)',
templateName: '国内标准导入模板'
},
overseasStandard: {
exportFileName: '海外标准法规',
exportZipName: '海外标准法规(带文件)',
templateName: '海外标准法规导入模板'
exportFileName: '海外标准',
exportZipName: '海外标准(带文件)',
templateName: '海外标准导入模板'
},
standardDetail: {
standardNumber: '标准编号',
+19 -19
View File
@@ -239,29 +239,29 @@ export const ConfigurableTableMixin = {
importModalLoading && importModalLoading.destroy()
this.loading = false
if (info.file.response.success) {
// this.$message.success(`${info.file.name} 文件上传成功`);
if (info.file.response.code === 201) {
const { message, result: { msg, fileUrl, fileName } } = info.file.response
const href = window._CONFIG.domianURL + fileUrl
this.$warning({
title: message,
content: (
<div>
<span>{msg}</span><br />
<span>具体详情请 <a href={href} target="_blank" download={fileName}>点击下载</a> </span>
</div>
)
})
} else {
this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
}
this.loadData()
} else {
if (Array.isArray(info.file.response.result) && info.file.response.result.length > 0) {
this.messageLineFeed(this.$t('fileImportError'), info.file.response.result)
} else {
// this.$message.success(`${info.file.name} 文件上传成功`);
if (info.file.response.code === 201) {
const { message, result: { msg, fileUrl, fileName } } = info.file.response
const href = window._CONFIG.domianURL + fileUrl
this.$warning({
title: message,
content: (
<div>
<span>{msg}</span><br />
<span>具体详情请 <a href={href} target="_blank" download={fileName}>点击下载</a> </span>
</div>
)
})
} else {
this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
}
this.loadData()
this.$message.error(`${info.file.name} ${info.file.response.message}.`)
}
} else {
this.$message.error(`${info.file.name} ${info.file.response.message}.`)
}
} else if (info.file.status === 'error') {
// 销毁这个提示