From 6720e36840aeea7567c6a1bc413cbe815ff0f40e Mon Sep 17 00:00:00 2001 From: wyx Date: Tue, 10 Jan 2023 16:50:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E6=9C=AA=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=AD=A6=E5=91=98=E5=85=B3=E9=97=AD=E5=BC=B9=E6=A1=86?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/AddLevelImportStu.vue | 6 +++++- src/components/drawers/project/ProjectFaceStu.vue | 10 ++++++---- src/components/drawers/router/RouterFaceStu.vue | 8 +++++--- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/components/drawers/AddLevelImportStu.vue b/src/components/drawers/AddLevelImportStu.vue index 708ab66b..e69a9562 100644 --- a/src/components/drawers/AddLevelImportStu.vue +++ b/src/components/drawers/AddLevelImportStu.vue @@ -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; diff --git a/src/components/drawers/project/ProjectFaceStu.vue b/src/components/drawers/project/ProjectFaceStu.vue index ab8ed207..04a59c8e 100644 --- a/src/components/drawers/project/ProjectFaceStu.vue +++ b/src/components/drawers/project/ProjectFaceStu.vue @@ -728,11 +728,13 @@ export default { // }); } - {/* 添加学员弹框关闭,重新获取学员列表 */} - const AddImpStuvisibleClose = () => { - console.log('关闭了导入学员弹框') + {/* 添加学员弹框关闭,重新获取学员列表 */} + const AddImpStuvisibleClose = (isget) => { + console.log('关闭了导入学员弹框',isget) {/* 此处操作重新获取学员列表数据 */} - getStudent() + if(isget){ + getStudent() + } } return { diff --git a/src/components/drawers/router/RouterFaceStu.vue b/src/components/drawers/router/RouterFaceStu.vue index e0045294..a20efce3 100644 --- a/src/components/drawers/router/RouterFaceStu.vue +++ b/src/components/drawers/router/RouterFaceStu.vue @@ -697,10 +697,12 @@ export default { }; {/* 添加学员弹框关闭,重新获取学员列表 */} - const AddImpStuvisibleClose = () => { - console.log('关闭了导入学员弹框') + const AddImpStuvisibleClose = (isget) => { + console.log('关闭了导入学员弹框',isget) {/* 此处操作重新获取学员列表数据 */} - getStudent() + if(isget){ + getStudent() + } } return {