From 9c49917bb7ec38cc4317591763f80ccf89c2e729 Mon Sep 17 00:00:00 2001
From: fcx <2246384483@qq.com>
Date: 星期三, 03 十二月 2025 19:26:58 +0800
Subject: [PATCH] 将判断上限值过大过小逻辑删除

---
 pages/QC/XJ/List.vue |   86 ++++++++++++++++++++++++++++++++-----------
 1 files changed, 64 insertions(+), 22 deletions(-)

diff --git a/pages/QC/XJ/List.vue b/pages/QC/XJ/List.vue
index 76c110a..5d35528 100644
--- a/pages/QC/XJ/List.vue
+++ b/pages/QC/XJ/List.vue
@@ -31,6 +31,7 @@
       <view v-for="item in data" :key="item.id" class="inspection-card"
             @click="navigateToDetail(item)">
         <view class="card-header">
+          <text class="badge urgent" v-if="item.isTimeout">瓒呮椂</text>
           <view class="card-title">妫�楠屽崟鍙�: {{ item.releaseNo }}</view>
           <view :class="{'status-pending': current === 0, 'status-pass': current === 1 && item.fcheckResu === '鍚堟牸', 'status-fail': current === 1 && item.fcheckResu === '涓嶅悎鏍�'}"
                 class="status">
@@ -118,6 +119,32 @@
       this.data = [];
       this.init();
     },
+    // 璁$畻鏄惁瓒呮椂鐨勬柟娉�
+    checkIfTimeout(createDate) {
+      if (!createDate) return false;
+      
+      // 灏� createDate 杞崲涓� Date 瀵硅薄
+      let createTime = new Date(createDate);
+      let currentTime = new Date();
+      
+      // 璁$畻鏃堕棿宸紙姣锛�
+      let timeDiff = currentTime.getTime() - createTime.getTime();
+      
+      // 杞崲涓哄皬鏃�
+      let hoursDiff = timeDiff / (1000 * 60 * 60);
+      
+      // 濡傛灉澶т簬1灏忔椂锛岃繑鍥瀟rue琛ㄧず瓒呮椂
+      return hoursDiff > 1;
+    },
+    
+    // 澶勭悊鏁版嵁骞舵坊鍔犺秴鏃舵爣璇�
+    processDataWithTimeoutCheck(dataList) {
+      return dataList.map(item => {
+        // 娣诲姞瓒呮椂鏍囪瘑
+        item.isTimeout = this.checkIfTimeout(item.createDate);
+        return item;
+      });
+    },
     init() {
       let result = "鏈畬鎴�";
       if (this.current === 1) {
@@ -142,13 +169,16 @@
           searchValue: this.searchValue
         }
       }).then(res => {
+        // 澶勭悊鏁版嵁骞舵坊鍔犺秴鏃舵爣璇�
+        let processedData = this.processDataWithTimeoutCheck(res.data.tbBillList);
+        
         if (this.pageIndex === 1) {
           // 濡傛灉鏄涓�椤碉紝鐩存帴瑕嗙洊鍘熸暟鎹�
-          this.data = res.data.tbBillList;
+          this.data = processedData;
         } else {
-          if (res.data.tbBillList.length > 0) {
+          if (processedData.length > 0) {
             // 濡傛灉鏄笅涓�椤碉紝杩藉姞鏂版暟鎹�
-            this.data = [...this.data, ...res.data.tbBillList];
+            this.data = [...this.data, ...processedData];
           }
         }
         this.totalCount = res.totalCount;
@@ -348,6 +378,18 @@
   color: #2c3e50;
 }
 
+.badge {
+  font-size: 12px;
+  padding: 2px 6px;
+  border-radius: 10px;
+  margin-right: 8px;
+}
+
+.badge.urgent {
+  background-color: #e74c3c;
+  color: white;
+}
+
 .status {
   font-size: 12px;
   padding: 4px 8px;
@@ -482,6 +524,25 @@
   transform: translateY(0);
 }
 
+/* 鍒锋柊鎻愮ず鏍峰紡 */
+.tips {
+  color: #67c23a;
+  font-size: 14px;
+  line-height: 40px;
+  text-align: center;
+  background-color: #f0f9eb;
+  height: 0;
+  opacity: 0;
+  transform: translateY(-100%);
+  transition: all 0.3s;
+}
+
+.tips-ani {
+  transform: translateY(0);
+  height: 40px;
+  opacity: 1;
+}
+
 /* 鍝嶅簲寮忚璁� */
 @media (min-width: 768px) {
   .inspection-list {
@@ -503,24 +564,5 @@
   .info-row {
     flex-direction: row;
   }
-}
-
-/* 鍒锋柊鎻愮ず鏍峰紡 */
-.tips {
-  color: #67c23a;
-  font-size: 14px;
-  line-height: 40px;
-  text-align: center;
-  background-color: #f0f9eb;
-  height: 0;
-  opacity: 0;
-  transform: translateY(-100%);
-  transition: all 0.3s;
-}
-
-.tips-ani {
-  transform: translateY(0);
-  height: 40px;
-  opacity: 1;
 }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3