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', // 请输入树状图体系 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: '标准编号',
+4 -4
View File
@@ -239,9 +239,6 @@ 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) {
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} 文件上传成功`); // this.$message.success(`${info.file.name} 文件上传成功`);
if (info.file.response.code === 201) { if (info.file.response.code === 201) {
const { message, result: { msg, fileUrl, fileName } } = info.file.response const { message, result: { msg, fileUrl, fileName } } = info.file.response
@@ -259,10 +256,13 @@ export const ConfigurableTableMixin = {
this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`) this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
} }
this.loadData() 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 { } else {
this.$message.error(`${info.file.name} ${info.file.response.message}.`) this.$message.error(`${info.file.name} ${info.file.response.message}.`)
} }
}
} else if (info.file.status === 'error') { } else if (info.file.status === 'error') {
// 销毁这个提示 // 销毁这个提示
importModalLoading && importModalLoading.destroy() importModalLoading && importModalLoading.destroy()