From e139ea66e0eb311116bdb9c47bc6aa87fb80c7b8 Mon Sep 17 00:00:00 2001 From: zoujiandong <10130823232@qq.com> Date: Thu, 20 Jul 2023 10:57:47 +0800 Subject: [PATCH] loading --- src/views/admin/sys-dept/index.vue | 16 ++++++++++++++-- src/views/doctor/doctor-examine/index.vue | 2 ++ src/views/doctor/doctor-multipoint/index.vue | 2 ++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/views/admin/sys-dept/index.vue b/src/views/admin/sys-dept/index.vue index a5644e3..26d41d5 100644 --- a/src/views/admin/sys-dept/index.vue +++ b/src/views/admin/sys-dept/index.vue @@ -52,7 +52,7 @@ :title="modalTitle" title-align="start" @before-ok="handleBeforeOk" - @close="() => $refs.modalFormRef.resetFields()" + @close="closeModal" > @@ -213,6 +213,15 @@ const disabledSelect=(id,arr)=>{ } } } +const abledSelect=(arr)=>{ + +for (let i = 0; i < arr.length; i++) { + arr[i].disabled=false; + if(arr[i].children){ + abledSelect(arr[i].children); + } +} +} // 修改 const handleUpdate = async (record) => { modalVisible.value = true; @@ -248,7 +257,10 @@ function deepDelChildren(data) { return depts; } - +const closeModal=()=>{ + proxy.$refs.modalFormRef.resetFields(); + abledSelect(tableData.value); +} // Modal 表单提交前检查 const handleBeforeOk = (done) => { proxy.$refs.modalFormRef.validate(async (err) => { diff --git a/src/views/doctor/doctor-examine/index.vue b/src/views/doctor/doctor-examine/index.vue index 9eaa9d9..77d35d5 100644 --- a/src/views/doctor/doctor-examine/index.vue +++ b/src/views/doctor/doctor-examine/index.vue @@ -755,6 +755,7 @@ document.querySelector(".myModal").scrollTo(0,top) return false } + proxy.$loading.show(); const {code,message,data}= await checkDoctor({ iden_auth_status:1, qualification_cert_num:id @@ -762,6 +763,7 @@ if (code == 200) { proxy.$notification.success("审核通过"); getDoctorInfo(pager); + proxy.$loading.hide(); modalVisible.value=false; } diff --git a/src/views/doctor/doctor-multipoint/index.vue b/src/views/doctor/doctor-multipoint/index.vue index acecbf2..3672276 100644 --- a/src/views/doctor/doctor-multipoint/index.vue +++ b/src/views/doctor/doctor-multipoint/index.vue @@ -527,6 +527,7 @@ }; //审核 const handleCheck= async(type)=>{ + proxy.$loading.show(); if(type=="ok"){ const {code,message,data}= await checkDoctor({ multi_point_status:1 @@ -535,6 +536,7 @@ proxy.$notification.success("审核通过"); modalVisible.value=false; }; + proxy.$loading.hide(); getDoctorInfo(pager); }else{