mo 1 year ago
parent
commit
c209c3cb7c

+ 1 - 1
dev-dist/sw.js

@@ -82,7 +82,7 @@ define(['./workbox-5357ef54'], (function (workbox) { 'use strict';
     "revision": "3ca0b8505b4bec776b69afdba2768812"
   }, {
     "url": "index.html",
-    "revision": "0.47gcrkadlb"
+    "revision": "0.d4djpv1e6ho"
   }], {});
   workbox.cleanupOutdatedCaches();
   workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {

BIN
public/logo.png


+ 2 - 1
src/views/classList/classDetail.tsx

@@ -26,10 +26,11 @@ export default defineComponent({
     //   setTabsCaches(val, 'tabName', route);
     // };
     //   onUpdate:value={(val: any) => setTabs(val)}
+
     return () => (
       <div>
         <CBreadcrumb list={routerList.value}></CBreadcrumb>
-        <div class={styles.listWrap}>
+        <div class={[styles.listWrap,styles.infoListWrap]}>
           <NTabs
             class={styles.customTabs}
             v-model:value={activeTab.value}

+ 4 - 1
src/views/classList/index.module.less

@@ -4,10 +4,13 @@
 .listWrap {
   padding: 32px;
   background-color: #fff;
-  min-height: 100%;
   border-radius: 20px;
 }
 
+.infoListWrap {
+  min-height: calc(100vh - 150px) !important
+}
+
 .addBtnIcon {
   width: 16px;
   height: 17px;

+ 11 - 3
src/views/studentList/components/baseInfo.tsx

@@ -43,6 +43,7 @@ export default defineComponent({
   setup(props) {
     const message = useMessage();
     const userStore = useUserStore();
+    const loading = ref()
     const formOptions = reactive({
       sexs: [
         { label: '男', value: 1, class: 'option' },
@@ -80,13 +81,19 @@ export default defineComponent({
     // onMounted(() => {});
 
     const handleSave = () => {
+      loading.value = true
       formRef.value.validate(async (err: any) => {
         if (err) {
           return;
         }
-        await resetStudentInfo({ ...props.studentInfo, ...studentForm });
-        data.disabled = true;
-        message.success('修改成功');
+        try{
+          await resetStudentInfo({ ...props.studentInfo, ...studentForm });
+          data.disabled = true;
+          message.success('修改成功');
+          loading.value = false
+        }catch(e){
+          loading.value = false
+        }
       });
     };
     const cancel = () => {
@@ -194,6 +201,7 @@ export default defineComponent({
               取消
             </NButton>
             <NButton
+            loading={loading.value}
               class={styles.btn}
               type="primary"
               onClick={() => handleSave()}>

+ 8 - 0
src/views/studentList/index.module.less

@@ -5,6 +5,14 @@
   min-height: 100%;
 }
 
+.infoListWrap {
+  min-height: calc(100vh - 150px) !important
+}
+
+.infoWrap {
+  min-height: 100%;
+}
+
 .addBtnIcon {
   width: 16px;
   height: 17px;

+ 1 - 1
src/views/studentList/studentDetail.tsx

@@ -74,7 +74,7 @@ export default defineComponent({
     return () => (
       <div>
         <CBreadcrumb list={routerList.value}></CBreadcrumb>
-        <div class={styles.listWrap}>
+        <div class={[styles.listWrap,styles.infoListWrap]}>
           <div class={styles.teacherList}>
             <div class={styles.teacherHeader}>
               <div class={styles.teacherHeaderBorder}>