From e9f35f9782f3d99d742c294fe503fc1294f203c4 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期一, 14 九月 2026 11:10:31 +0800
Subject: [PATCH] 测试完成

---
 src/views/followvisit/discharge/index.vue |   74 ++++++++++++++++++++++++++++++++++++
 1 files changed, 73 insertions(+), 1 deletions(-)

diff --git a/src/views/followvisit/discharge/index.vue b/src/views/followvisit/discharge/index.vue
index da3ba46..7b355eb 100644
--- a/src/views/followvisit/discharge/index.vue
+++ b/src/views/followvisit/discharge/index.vue
@@ -243,6 +243,17 @@
             </div>
           </div>
         </el-col>
+        <div class="color-legend">
+          <span class="legend-item" v-if="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'">
+            <span class="legend-block legend-blue"></span>鏈埌闅忚鏃堕棿
+          </span>
+          <span class="legend-item">
+            <span class="legend-block legend-red"></span>濉姤鍐呭瀛樺湪寮傚父
+          </span>
+          <span class="legend-item">
+            <span class="legend-block legend-yellow"></span>濉姤鍐呭瀛樺湪璀﹀憡
+          </span>
+        </div>
       </el-row>
       <div class="selected-info">
         宸查�変腑
@@ -2309,14 +2320,41 @@
         this.getList();
       });
     },
-    // 寮傚父鍒楁覆鏌�
+    // 琛岄鑹叉覆鏌擄細钃濊壊(鏈埌闅忚鏃堕棿) / 绾㈣壊(寮傚父) / 榛勮壊(璀﹀憡)
     tableRowClassName({ row, rowIndex }) {
+      // 褰撳墠鏃堕棿灏忎簬搴旈殢璁挎椂闂翠笖浠诲姟鐘舵�佷负寰呴殢璁� 鈫� 鏁磋钃濊壊锛堝崡鍗庡ぇ瀛﹂檮灞炵涓�鍖婚櫌涓嶇敓鏁堬級
+      if (
+        this.orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌" &&
+        row.sendstate == 2 &&
+        this.isBeforeVisitTime(row.visitTime)
+      ) {
+        return "blue-row";
+      }
       if (row.excep == 1) {
         return "warning-row";
       } else if (row.excep == 2) {
         return "remind-row";
       }
       return "";
+    },
+    // 鍒ゆ柇褰撳墠鏃堕棿鏄惁鏃╀簬搴旈殢璁挎椂闂达紙鎸夆�滃ぉ鈥濇瘮杈冿級
+    isBeforeVisitTime(visitTime) {
+      if (!visitTime) return false;
+      let date;
+      if (typeof visitTime === "number") {
+        date = new Date(visitTime);
+      } else {
+        date = new Date(String(visitTime).replace(/-/g, "/"));
+      }
+      if (isNaN(date.getTime())) return false;
+      const now = new Date();
+      const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
+      const visitDay = new Date(
+        date.getFullYear(),
+        date.getMonth(),
+        date.getDate()
+      );
+      return today.getTime() < visitDay.getTime();
     },
     restoreSelection() {
       if (!this.$refs.userform) {
@@ -2549,12 +2587,46 @@
 ::v-deep.el-table .remind-row {
   background: #fcf5aa;
 }
+::v-deep.el-table .blue-row {
+  background: #c6e2ff;
+}
 
 .documentf {
   display: flex;
   justify-content: flex-end;
 }
 
+.color-legend {
+  float: right;
+  display: flex;
+  align-items: center;
+  height: 40px;
+  gap: 16px;
+  margin-right: 5px;
+}
+.legend-item {
+  display: inline-flex;
+  align-items: center;
+  font-size: 16px;
+  color: #666;
+}
+.legend-block {
+  display: inline-block;
+  width: 14px;
+  height: 14px;
+  border-radius: 3px;
+  margin-right: 6px;
+}
+.legend-blue {
+  background: #9cc9fa;
+}
+.legend-red {
+  background: #f1aaaa;
+}
+.legend-yellow {
+  background: #faf18d;
+}
+
 .download {
   text-align: center;
 

--
Gitblit v1.9.3