feat:合并

This commit is contained in:
lixg
2023-01-10 18:01:09 +08:00
3 changed files with 16 additions and 8 deletions

View File

@@ -172,6 +172,7 @@ export default {
template: process.env.VUE_APP_TEMPLATE + "导入学员模版-1672998102528.xlsx",
importStudent: process.env.VUE_APP_BASE_API + "admin/student/importStudent",
timers: "", // 定时器,用于清空定时器使用
isAddStudent: false, // 用于判断用户是否关闭弹框需要重新获取学员列表
uploadpercent: -1,
uploadErr: false, //上传失败
addLoading: false,
@@ -194,7 +195,8 @@ export default {
state.downloadErrUrl = "";
ctx.emit("update:AddImpStuvisible", false);
// 通知父组件重新获取学员列表
ctx.emit("AddImpStuvisibleClose", false);
ctx.emit("AddImpStuvisibleClose", state.isAddStudent);
state.isAddStudent = false;
};
const afterVisibleChange = (bool) => {
@@ -246,6 +248,7 @@ export default {
message.success(`${info.file.name}上传成功`);
state.showBottomBar = true;
state.addLoading = false;
state.isAddStudent = true;
}
state.succNum = res.data.data.successNum;
state.errNum = res.data.data.failedNum;
@@ -279,6 +282,7 @@ export default {
//删除
const removeUpload = () => {
state.isAddStudent = false;
state.showBottomBar = false;
state.fileList = [];
state.uploadpercent = -1;

View File

@@ -728,11 +728,13 @@ export default {
// });
}
{/* 添加学员弹框关闭,重新获取学员列表 */}
const AddImpStuvisibleClose = () => {
console.log('关闭了导入学员弹框')
{/* 添加学员弹框关闭,重新获取学员列表 */}
const AddImpStuvisibleClose = (isget) => {
console.log('关闭了导入学员弹框',isget)
{/* 此处操作重新获取学员列表数据 */}
getStudent()
if(isget){
getStudent()
}
}
return {

View File

@@ -697,10 +697,12 @@ export default {
};
{/* 添加学员弹框关闭,重新获取学员列表 */}
const AddImpStuvisibleClose = () => {
console.log('关闭了导入学员弹框')
const AddImpStuvisibleClose = (isget) => {
console.log('关闭了导入学员弹框',isget)
{/* 此处操作重新获取学员列表数据 */}
getStudent()
if(isget){
getStudent()
}
}
return {