刘洋 10 сар өмнө
parent
commit
17966a193c

+ 1 - 1
src/modules/analysis/personnel-statistics/components/RightKeyMenu.vue

@@ -116,7 +116,7 @@ defineExpose({
   min-width: 8.92857vw;
   text-align: justify;
   word-break: break-all;
-  padding: 10px 0;
+  padding: 5px 0;
 }
 .rightKeyMenuItem {
   padding: 5px 20px;

+ 26 - 4
src/modules/quality/subjective-check/index.vue

@@ -7,7 +7,15 @@
       @click="onOperationClick"
     >
       <!-- <el-button type="primary" size="small" class="m-l-base" @click="onEditScore">修改给分</el-button> -->
-      <el-button type="primary" size="small" class="m-l-base m-r-auto" @click="onConfirm">提交确认</el-button>
+      <el-button
+        type="primary"
+        size="small"
+        class="m-l-base m-r-auto"
+        :disabled="currentSubjectiveCheck"
+        :loading="confirmLoading"
+        @click="onConfirm"
+        >提交确认</el-button
+      >
     </mark-header>
     <div class="flex flex-1 overflow-hidden p-base mark-container">
       <splitpanes class="default-theme" style="height: 100%" @resize="setPaneSize">
@@ -61,7 +69,9 @@
                 style="margin-top: 20px"
               >
                 <template #form-item-search>
-                  <el-button :loading="loading" type="primary" @click="onSearch">查询</el-button>
+                  <el-button :loading="loading" type="primary" :disabled="confirmLoading" @click="onSearch"
+                    >查询</el-button
+                  >
                 </template>
               </base-form>
               <div class="m-b-mini">
@@ -397,10 +407,22 @@ const onSubmit = async () => {
 /** 确认 */
 const { fetch: subjectiveCheckConfirm } = useFetch('subjectiveCheckConfirm')
 
+const confirmLoading = ref(false)
+const hideLoading = () => {
+  setTimeout(() => {
+    confirmLoading.value = false
+  })
+}
 const onConfirm = async () => {
   if (currentSubjectiveCheck.value) {
-    await subjectiveCheckConfirm({ taskId: currentSubjectiveCheck.value.taskId })
-    await onSearch()
+    confirmLoading.value = true
+    try {
+      await subjectiveCheckConfirm({ taskId: currentSubjectiveCheck.value.taskId })
+      await onSearch()
+      hideLoading()
+    } catch (e) {
+      hideLoading()
+    }
   }
 }