后台excel批量划拨用户福利包提示优化
This commit is contained in:
@@ -57,7 +57,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog title="用户福利包导入" append-to-body v-model="excelBox" width="555px">
|
<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>
|
<template #excelTemplate>
|
||||||
<el-button type="primary" @click="handleTemplate">
|
<el-button type="primary" @click="handleTemplate">
|
||||||
点击下载<i class="el-icon-download el-icon--right"></i>
|
点击下载<i class="el-icon-download el-icon--right"></i>
|
||||||
@@ -355,8 +355,40 @@ export default {
|
|||||||
importBenefitPackage() {
|
importBenefitPackage() {
|
||||||
this.excelBox = true;
|
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>
|
</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>
|
||||||
|
|||||||
Reference in New Issue
Block a user