From 8957ea4b8c65c08873487e7038b58217c6c43bf3 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Wed, 3 Jan 2024 13:43:47 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9=E5=B9=B4=E5=BA=A6?= =?UTF-8?q?=E5=88=B6=E4=BF=AE=E8=AE=A2=E6=B5=81=E7=A8=8B=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/OnlyTableForm.vue | 28 ++++++++++++++++++- .../modules/EngineerInitBaseInfo.vue | 28 ++++++++++++++++++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue index a5440bba..7d3e5c0c 100644 --- a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue +++ b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue @@ -413,7 +413,11 @@ export default { // 推入表格中 this.dataSource = info.file.response.result } else { - this.$message.warning(`${info.file.name} ${info.file.response.message}.`) + 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.warning(`${info.file.name} ${info.file.response.message}`) + } } } else if (info.file.status === 'error') { // 销毁这个提示 @@ -461,6 +465,28 @@ export default { } this.dataSource = this.dataSource.filter(item => !!item) this.selectedRowKeys = [] + }, + /** + * 对数组形式后端错误信息进行处理 + * @param title + * @param content + */ + messageLineFeed (title, content) { + const htmlDom = [] + content.map(tt => { + if (tt) { + htmlDom.push((