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

---
 src/views/followvisit/tasklist/index.vue |   72 +++++++++++++++++++++++++----------
 1 files changed, 51 insertions(+), 21 deletions(-)

diff --git a/src/views/followvisit/tasklist/index.vue b/src/views/followvisit/tasklist/index.vue
index 069c195..ecd3c83 100644
--- a/src/views/followvisit/tasklist/index.vue
+++ b/src/views/followvisit/tasklist/index.vue
@@ -387,15 +387,20 @@
     </el-dialog>
     <!-- 浠诲姟鎵ц璇︽儏寮圭獥 -->
     <el-dialog
-      title="浠诲姟鎵ц璇︽儏"
       :visible.sync="countDialogVisible"
       width="600px"
       :before-close="handleCountClose"
     >
+      <span slot="title" class="count-dialog-title">浠诲姟鎵ц璇︽儏</span>
       <div v-loading="countLoading" class="count-detail">
         <div class="count-task-name">浠诲姟鍚嶇О锛歿{ countTaskName || "-" }}</div>
-        <div class="count-grid">
-          <div v-for="f in countFields" :key="f.key" class="count-item">
+        <div v-for="(row, ri) in countRows" :key="ri" class="count-grid">
+          <div
+            v-for="f in row"
+            :key="f.key"
+            class="count-item"
+            :style="countItemStyle(f)"
+          >
             <span class="count-label">{{ f.label }}</span>
             <span class="count-value">{{ countVal(f) }}</span>
           </div>
@@ -477,18 +482,11 @@
       countTaskName: "",
       countData: {},
       countFields: [
-        { key: "total", label: "浠诲姟鎬婚噺" },
-        { key: "blq", label: "寰呴鍙�" },
-        { key: "wfs", label: "鏈彂閫�" },
-        { key: "yfs", label: "宸插彂閫�", altKey: "ysf" },
-        { key: "fssb", label: "鍙戦�佸け璐�" },
-        { key: "dsf", label: "寰呴殢璁�" },
-        { key: "xsf", label: "闇�闅忚" },
-        { key: "wxsf", label: "鏃犻渶闅忚" },
-        { key: "wzx", label: "鏈墽琛�" },
-        { key: "ywc", label: "宸插畬鎴�" },
-        { key: "yc", label: "寮傚父" },
-        { key: "jg", label: "璀﹀憡" },
+        { key: "total", label: "鎬婚噺", color: "#67afab", bg: "#e6f4f3" },
+        { key: "dsf", label: "寰呴殢璁�", color: "#409eff", bg: "#ecf5ff" },
+        { key: "ywc", label: "宸插畬鎴�", color: "#67c23a", bg: "#f0f9eb" },
+        { key: "yc", label: "寮傚父", color: "#f56c6c", bg: "#fef0f0" },
+        { key: "jg", label: "璀﹀憡", color: "#e6a23c", bg: "#fdf6ec" },
       ],
       // 鏃ユ湡鑼冨洿
       dateRange: [],
@@ -698,6 +696,18 @@
     };
   },
   watch: {},
+  computed: {
+    // 浠诲姟鎵ц璇︽儏锛氭寜涓よ鍒嗙粍锛屽�间负 0 鐨勯」涓嶅睍绀�
+    countRows() {
+      const row1 = this.countFields
+        .slice(0, 3)
+        .filter((f) => this.countNum(f) !== 0);
+      const row2 = this.countFields
+        .slice(3)
+        .filter((f) => this.countNum(f) !== 0);
+      return [row1, row2].filter((r) => r.length > 0);
+    },
+  },
   created() {
     this.orgname = localStorage.getItem("orgname");
     if (this.orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
@@ -1238,6 +1248,8 @@
     },
     // 鏌ョ湅浠诲姟鎵ц璇︽儏锛坈ountByCondition 鐩存帴杩斿洖鑱氬悎 Map锛�
     showCountDetail(row) {
+      console.log(11);
+
       this.countTaskName = row.taskName || "";
       this.countData = {};
       this.countDialogVisible = true;
@@ -1269,6 +1281,17 @@
       if (f.altKey && d[f.altKey] != null && d[f.altKey] !== "")
         return d[f.altKey];
       return 0;
+    },
+    // 缁熻鍊艰浆涓烘暟瀛楋紙鐢ㄤ簬鍒ゆ柇鏄惁涓� 0锛�
+    countNum(f) {
+      return Number(this.countVal(f)) || 0;
+    },
+    // 姣忛」鐨勮儗鏅壊涓庡瓧浣撻鑹�
+    countItemStyle(f) {
+      return {
+        background: f.bg || "#f5f7fa",
+        color: f.color || "#303133",
+      };
     },
     handleCountClose() {
       this.countDialogVisible = false;
@@ -1437,33 +1460,40 @@
   }
 }
 
+.count-dialog-title {
+  font-size: 16px;
+  font-weight: 600;
+  color: #67afab;
+}
 .count-detail {
   .count-task-name {
     font-size: 14px;
-    color: #303133;
+    color: #67afab;
     font-weight: 600;
     margin-bottom: 16px;
   }
   .count-grid {
-    display: grid;
-    grid-template-columns: repeat(3, 1fr);
+    display: flex;
     gap: 12px;
+    margin-bottom: 12px;
+    &:last-child {
+      margin-bottom: 0;
+    }
   }
   .count-item {
+    flex: 1;
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 12px 14px;
-    background: #f5f7fa;
     border-radius: 4px;
     .count-label {
       font-size: 13px;
-      color: #606266;
+      opacity: 0.9;
     }
     .count-value {
       font-size: 16px;
       font-weight: 600;
-      color: #303133;
     }
   }
 }

--
Gitblit v1.9.3