update 导入校验修改
This commit is contained in:
@@ -27,14 +27,14 @@ module.exports = {
|
|||||||
treeSearchPlaceholder: 'Please enter the tree system', // 请输入树状图体系
|
treeSearchPlaceholder: 'Please enter the tree system', // 请输入树状图体系
|
||||||
collection: 'Invoice Collection', // 收藏
|
collection: 'Invoice Collection', // 收藏
|
||||||
cancelCollection: 'Delete Collection', // 取消收藏
|
cancelCollection: 'Delete Collection', // 取消收藏
|
||||||
exportFileName: 'Domestic standard regulations', // 国内标准法规
|
exportFileName: 'Domestic standard', // 国内标准法规
|
||||||
exportZipName: 'Domestic standards and regulations (with documents)', // 国内标准法规(带文件)
|
exportZipName: 'Domestic standards (with documents)', // 国内标准法规(带文件)
|
||||||
templateName: 'Import templates for domestic standards and regulations' // 国内标准法规导入模板
|
templateName: 'Import templates for domestic standards' // 国内标准法规导入模板
|
||||||
},
|
},
|
||||||
overseasStandard: {
|
overseasStandard: {
|
||||||
exportFileName: 'Overseas standard regulations',
|
exportFileName: 'Overseas standard',
|
||||||
exportZipName: 'Overseas standard regulations (with documentation)',
|
exportZipName: 'Overseas standard (with documentation)',
|
||||||
templateName: 'Import template of overseas standard regulations'
|
templateName: 'Import template of overseas standard'
|
||||||
},
|
},
|
||||||
standardDetail: {
|
standardDetail: {
|
||||||
standardNumber: 'Standard Number',
|
standardNumber: 'Standard Number',
|
||||||
|
|||||||
@@ -27,14 +27,14 @@ module.exports = {
|
|||||||
treeSearchPlaceholder: '请输入树状图体系',
|
treeSearchPlaceholder: '请输入树状图体系',
|
||||||
collection: '收藏',
|
collection: '收藏',
|
||||||
cancelCollection: '取消收藏',
|
cancelCollection: '取消收藏',
|
||||||
exportFileName: '国内标准法规',
|
exportFileName: '国内标准',
|
||||||
exportZipName: '国内标准法规(带文件)',
|
exportZipName: '国内标准(带文件)',
|
||||||
templateName: '国内标准法规导入模板'
|
templateName: '国内标准导入模板'
|
||||||
},
|
},
|
||||||
overseasStandard: {
|
overseasStandard: {
|
||||||
exportFileName: '海外标准法规',
|
exportFileName: '海外标准',
|
||||||
exportZipName: '海外标准法规(带文件)',
|
exportZipName: '海外标准(带文件)',
|
||||||
templateName: '海外标准法规导入模板'
|
templateName: '海外标准导入模板'
|
||||||
},
|
},
|
||||||
standardDetail: {
|
standardDetail: {
|
||||||
standardNumber: '标准编号',
|
standardNumber: '标准编号',
|
||||||
|
|||||||
@@ -239,29 +239,29 @@ export const ConfigurableTableMixin = {
|
|||||||
importModalLoading && importModalLoading.destroy()
|
importModalLoading && importModalLoading.destroy()
|
||||||
this.loading = false
|
this.loading = false
|
||||||
if (info.file.response.success) {
|
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) {
|
if (Array.isArray(info.file.response.result) && info.file.response.result.length > 0) {
|
||||||
this.messageLineFeed(this.$t('fileImportError'), info.file.response.result)
|
this.messageLineFeed(this.$t('fileImportError'), info.file.response.result)
|
||||||
} else {
|
} else {
|
||||||
// this.$message.success(`${info.file.name} 文件上传成功`);
|
this.$message.error(`${info.file.name} ${info.file.response.message}.`)
|
||||||
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 {
|
|
||||||
this.$message.error(`${info.file.name} ${info.file.response.message}.`)
|
|
||||||
}
|
}
|
||||||
} else if (info.file.status === 'error') {
|
} else if (info.file.status === 'error') {
|
||||||
// 销毁这个提示
|
// 销毁这个提示
|
||||||
|
|||||||
Reference in New Issue
Block a user