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((
{tt}
))
+ }
+ })
+ this.$warning({
+ title: title,
+ content: () =>
+ {htmlDom}
+
+ })
+ this.$nextTick(() => {
+ document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display: inline-block'
+ })
}
}
}
diff --git a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue
index d7f2de97..33a2a347 100644
--- a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue
+++ b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue
@@ -422,7 +422,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') {
// 销毁这个提示
@@ -491,6 +495,28 @@ export default {
// 选人的名字获取
userSelectNameChange (value) {
this.selectNames = value
+ },
+ /**
+ * 对数组形式后端错误信息进行处理
+ * @param title
+ * @param content
+ */
+ messageLineFeed (title, content) {
+ const htmlDom = []
+ content.map(tt => {
+ if (tt) {
+ htmlDom.push(({tt}
))
+ }
+ })
+ this.$warning({
+ title: title,
+ content: () =>
+ {htmlDom}
+
+ })
+ this.$nextTick(() => {
+ document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display: inline-block'
+ })
}
}
}