Commit e355cfd3 authored by daniel's avatar daniel

fix(markNoSelect): 导入后展示tips提示信息

导入接口返回code:200但data中含tips时,使用notification展示问题行详情,
避免用户误以为全部导入成功。
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent b42f4c3f
...@@ -641,7 +641,26 @@ ...@@ -641,7 +641,26 @@
} }
fileList.value = [] fileList.value = []
if (res.code === 200) { if (res.code === 200) {
message.success('导入成功') if (Array.isArray(res.data) && res.data.length > 0 && res.data[0].tips) {
const tipsList = res.data
const maxShow = 20
const showItems = tipsList.slice(0, maxShow)
notification.warning({
title: '导入完成,但有 ' + tipsList.length + ' 条数据存在问题',
content: () => h('div', { style: 'max-height:300px;overflow-y:auto;' }, [
...showItems.map(item => h('div', { style: 'padding:2px 0;font-size:13px;' },
'第' + item.rowNum + '行: ' + item.tips + (item.cellData && item.cellData !== 'null' ? '(值: ' + item.cellData + ')' : '')
)),
tipsList.length > maxShow
? h('div', { style: 'padding:4px 0;color:#999;font-size:13px;' }, '...等共 ' + tipsList.length + ' 条问题')
: null
]),
meta: '请修正后重新导入',
duration: 0
})
} else {
message.success('导入成功')
}
fetchData() fetchData()
} else { } else {
message.error(res.message) message.error(res.message)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment