lex 1 year ago
parent
commit
4bcc8f00de
1 changed files with 9 additions and 5 deletions
  1. 9 5
      src/views/patrol-evaluation/detail-list.tsx

+ 9 - 5
src/views/patrol-evaluation/detail-list.tsx

@@ -94,7 +94,8 @@ export default defineComponent({
       questionType: null,
       evaluateList: [] as any,
       problemTypeList: [] as any,
-      list: []
+      list: [],
+      btnLoading: false
     });
 
     const list = ref([] as any[]);
@@ -217,23 +218,24 @@ export default defineComponent({
           problemDesc: item.submitProblemDesc,
           attachmentUrl: url.join(',')
         };
+        forms.btnLoading = true;
         if (item.evaluateFlag) {
           // 修改
           await request.post('/api-web/coursePatrolEvaluation/update', {
-            hideLoading: false,
+            // hideLoading: false,
             data: params
           });
         } else {
-          // 修改
+          // 添加
           await request.post('/api-web/coursePatrolEvaluation/save', {
-            hideLoading: false,
+            // hideLoading: false,
             data: {
               ...params,
               courseScheduleId: item.courseScheduleId
             }
           });
         }
-
+        forms.btnLoading = false;
         list.value = [];
         onRefresh();
       } catch {
@@ -579,6 +581,8 @@ export default defineComponent({
                               type="primary"
                               round
                               block
+                              disabled={forms.btnLoading}
+                              loading={forms.btnLoading}
                               onClick={() => onSubmit(item)}>
                               确认
                             </Button>