后台excel批量划拨用户福利包提示优化

This commit is contained in:
2026-02-15 00:25:46 +08:00
parent 27c2eaa52d
commit 0e676e5737

View File

@@ -57,7 +57,7 @@
</el-dialog>
<el-dialog title="用户福利包导入" append-to-body v-model="excelBox" width="555px">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="excelUploadAfter">
<template #excelTemplate>
<el-button type="primary" @click="handleTemplate">
点击下载<i class="el-icon-download el-icon--right"></i>
@@ -355,8 +355,40 @@ export default {
importBenefitPackage() {
this.excelBox = true;
},
excelUploadAfter(res, done, loading, column) {
console.log('上结束:::');
window.console.log(column);
console.log('打印:::', res);
if (res.length) {
const errMsg = res
.map(
(item, idx) =>
`${idx + 1}. ${item.errorMsg} 账户: ${item.account} 福利包: ${item.benefitPackage}`
)
.join('<br><br>');
this.$alert(errMsg, '导入失败', {
confirmButtonText: '我知道了',
type: 'error',
dangerouslyUseHTMLString: true, //
customClass: 'alert-error-list', //
});
}
done();
},
},
};
</script>
<style></style>
<style>
.alert-error-list .el-message-box__message {
max-height: 450px; /* 最大高度 */
overflow-y: auto; /* 超出时显示滚动条 */
padding: 12px 20px; /* 增加内边距,更美观 */
line-height: 1.6; /* 行高更舒适 */
text-align: left;
}
</style>