Sfoglia il codice sorgente

🎨 优化显示细节

快乐的梦鱼 1 settimana fa
parent
commit
b3b93c1268

+ 8 - 1
src/pages/collect/assessment/argeement-sign-list.vue

@@ -46,6 +46,13 @@
       >
         审核
       </a-button>
+      <a-button
+        type="primary"
+        disabled
+        v-else-if="item.agreementId && isCurrentLevelReviewed(item.progress)"
+      >
+        已审核
+      </a-button>
     </template>
   </CommonListBlock>
 </template>
@@ -85,7 +92,7 @@ const agreementProgressOptions: DropdownCommonItem[] = [
   { id: 5, name: '省文化和旅游厅审核完成' },
 ];
 
-const { canReview, canReviewButPrevNotCompleted, progressHint } = useReview();
+const { canReview, canReviewButPrevNotCompleted, isCurrentLevelReviewed, progressHint } = useReview();
 
 function agreementProgressLabel(progress: number | null | undefined) {
   if (progress === null || progress === undefined)

+ 13 - 0
src/pages/collect/assessment/composeables/Review.ts

@@ -52,6 +52,18 @@ export function useReview(sourceProgress?: ComputedRef<number>) {
   };
 
   /**
+   * 是否当前级别已经审核完成
+   * @param sourceProgress 
+   * @returns 
+   */
+  const isCurrentLevelReviewed = (sourceProgress: number) => {
+    const info = reviewProgressInfo.value;
+    if (!info)
+      return false;
+    return sourceProgress >= info.target;
+  };
+
+  /**
    * 是否可以审核,但上一阶段未完成
    * @param sourceProgress 
    * @returns 
@@ -77,6 +89,7 @@ export function useReview(sourceProgress?: ComputedRef<number>) {
     reviewProgressInfo,
     canReview,
     canReviewButPrevNotCompleted,
+    isCurrentLevelReviewed,
     canSubmitReview,
     reviewLevelLabel,
     progressHint,

+ 8 - 1
src/pages/collect/assessment/evaluation-form-list.vue

@@ -64,6 +64,13 @@
           >
             审核
           </a-button>
+          <a-button
+            type="primary"
+            v-else-if="item.agreementId && isCurrentLevelReviewed(item.progress)"
+            disabled
+          >
+            已审核
+          </a-button>
         </template>
       </CommonListBlock>
     </a-tab-pane>
@@ -143,7 +150,7 @@ const { variable: lastSelfAssessmentLevel } = useMemorizeVar('adminSelfAssessmen
 const { variable: lastCheckLogStatus } = useMemorizeVar('adminCheckLogStatus', 0);
 const { variable: lastCheckLogReviewType } = useMemorizeVar('adminCheckLogReviewType', 0);
 
-const { canReview, canReviewButPrevNotCompleted, progressHint } = useReview();
+const { canReview, canReviewButPrevNotCompleted, isCurrentLevelReviewed, progressHint } = useReview();
 
 const selfAssessmentLevelOptions: DropdownCommonItem[] = [
   { id: 0, name: '全部等级' },