[update] 修改年度制修订流程导入失败提示
This commit is contained in:
@@ -413,7 +413,11 @@ export default {
|
|||||||
// 推入表格中
|
// 推入表格中
|
||||||
this.dataSource = info.file.response.result
|
this.dataSource = info.file.response.result
|
||||||
} else {
|
} 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') {
|
} else if (info.file.status === 'error') {
|
||||||
// 销毁这个提示
|
// 销毁这个提示
|
||||||
@@ -461,6 +465,28 @@ export default {
|
|||||||
}
|
}
|
||||||
this.dataSource = this.dataSource.filter(item => !!item)
|
this.dataSource = this.dataSource.filter(item => !!item)
|
||||||
this.selectedRowKeys = []
|
this.selectedRowKeys = []
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 对数组形式后端错误信息进行处理
|
||||||
|
* @param title
|
||||||
|
* @param content
|
||||||
|
*/
|
||||||
|
messageLineFeed (title, content) {
|
||||||
|
const htmlDom = []
|
||||||
|
content.map(tt => {
|
||||||
|
if (tt) {
|
||||||
|
htmlDom.push((<div>{tt}</div>))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.$warning({
|
||||||
|
title: title,
|
||||||
|
content: () => <div>
|
||||||
|
{htmlDom}
|
||||||
|
</div>
|
||||||
|
})
|
||||||
|
this.$nextTick(() => {
|
||||||
|
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display: inline-block'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+27
-1
@@ -422,7 +422,11 @@ export default {
|
|||||||
// 推入表格中
|
// 推入表格中
|
||||||
this.dataSource = info.file.response.result
|
this.dataSource = info.file.response.result
|
||||||
} else {
|
} 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') {
|
} else if (info.file.status === 'error') {
|
||||||
// 销毁这个提示
|
// 销毁这个提示
|
||||||
@@ -491,6 +495,28 @@ export default {
|
|||||||
// 选人的名字获取
|
// 选人的名字获取
|
||||||
userSelectNameChange (value) {
|
userSelectNameChange (value) {
|
||||||
this.selectNames = value
|
this.selectNames = value
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 对数组形式后端错误信息进行处理
|
||||||
|
* @param title
|
||||||
|
* @param content
|
||||||
|
*/
|
||||||
|
messageLineFeed (title, content) {
|
||||||
|
const htmlDom = []
|
||||||
|
content.map(tt => {
|
||||||
|
if (tt) {
|
||||||
|
htmlDom.push((<div>{tt}</div>))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.$warning({
|
||||||
|
title: title,
|
||||||
|
content: () => <div>
|
||||||
|
{htmlDom}
|
||||||
|
</div>
|
||||||
|
})
|
||||||
|
this.$nextTick(() => {
|
||||||
|
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display: inline-block'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user