From bc9538a9e071259ca8bbb6de52c60c9d7a55a03b Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 23 九月 2026 14:02:44 +0800
Subject: [PATCH] 测试完成

---
 src/views/followvisit/tasklist/index.vue |  128 +++++++++++++++++++++++++++++++++++++++---
 1 files changed, 119 insertions(+), 9 deletions(-)

diff --git a/src/views/followvisit/tasklist/index.vue b/src/views/followvisit/tasklist/index.vue
index 0d7ef85..069c195 100644
--- a/src/views/followvisit/tasklist/index.vue
+++ b/src/views/followvisit/tasklist/index.vue
@@ -130,19 +130,19 @@
           :show-overflow-tooltip="true"
         />
         <el-table-column
-          label="鎬讳换鍔�/宸查殢璁�"
+          label="鎵ц璇︽儏"
           align="center"
-          key="nickName"
+          key="taskDetail"
           width="120"
-          prop="nickName"
         >
           <template slot-scope="scope">
-            <span
-              >{{
-                scope.row.wfs || scope.row.wfs == 0
-                  ? scope.row.wfs + scope.row.yfs
-                  : ""
-              }}/{{ scope.row.yfs }}</span
+            <el-button
+              size="medium"
+              type="text"
+              @click="showCountDetail(scope.row)"
+              ><span class="button-xq"
+                ><i class="el-icon-s-data"></i>鎵ц璇︽儏</span
+              ></el-button
             >
           </template>
         </el-table-column>
@@ -385,6 +385,26 @@
         >
       </div>
     </el-dialog>
+    <!-- 浠诲姟鎵ц璇︽儏寮圭獥 -->
+    <el-dialog
+      title="浠诲姟鎵ц璇︽儏"
+      :visible.sync="countDialogVisible"
+      width="600px"
+      :before-close="handleCountClose"
+    >
+      <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">
+            <span class="count-label">{{ f.label }}</span>
+            <span class="count-value">{{ countVal(f) }}</span>
+          </div>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="countDialogVisible = false">鍏� 闂�</el-button>
+      </span>
+    </el-dialog>
     <!-- 閫夋嫨鎮h�呭脊妗� -->
     <Patient-Selection
       ref="Patient"
@@ -407,6 +427,7 @@
 import {
   getTasklist,
   delTaskInfo,
+  countByCondition,
   TaskTemplateSendExecution,
   scanGenerateSubtask,
   goSfRelay,
@@ -450,6 +471,25 @@
       qrDialogVisible: false,
       qrCodeUrl: "", // 涓棿椤甸摼鎺�
       qrCodeCanvas: null, // 瀛樺偍canvas寮曠敤
+      // 浠诲姟鎵ц璇︽儏寮圭獥
+      countDialogVisible: false,
+      countLoading: false,
+      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: "璀﹀憡" },
+      ],
       // 鏃ユ湡鑼冨洿
       dateRange: [],
       // 宀椾綅閫夐」
@@ -697,6 +737,7 @@
         this.tasktopic == 3 ||
         this.tasktopic == 1 ||
         this.tasktopic == 7 ||
+        this.tasktopic == 20 ||
         this.tasktopic == 5 ||
         this.tasktopic == 18 ||
         this.tasktopic == 19 ||
@@ -1195,6 +1236,44 @@
       const container = this.$refs.qrCodeContainer;
       if (container) container.innerHTML = "";
     },
+    // 鏌ョ湅浠诲姟鎵ц璇︽儏锛坈ountByCondition 鐩存帴杩斿洖鑱氬悎 Map锛�
+    showCountDetail(row) {
+      this.countTaskName = row.taskName || "";
+      this.countData = {};
+      this.countDialogVisible = true;
+      this.countLoading = true;
+      countByCondition({ taskid: row.taskid })
+        .then((res) => {
+          this.countData = this.normalizeCount(res || {});
+        })
+        .catch(() => {
+          this.countData = {};
+          this.$modal.msgError("鑾峰彇浠诲姟鎵ц璇︽儏澶辫触");
+        })
+        .finally(() => {
+          this.countLoading = false;
+        });
+    },
+    // 褰掍竴閿悕锛堣仛鍚� SQL 鍒悕鍙兘甯︾┖鏍硷級
+    normalizeCount(data) {
+      const out = {};
+      Object.keys(data || {}).forEach((k) => {
+        out[String(k).trim()] = data[k];
+      });
+      return out;
+    },
+    // 璇诲彇缁熻鍊硷紙key 浼樺厛锛宎ltKey 鍏滃簳锛岀己澶辨樉绀� 0锛�
+    countVal(f) {
+      const d = this.countData || {};
+      if (d[f.key] != null && d[f.key] !== "") return d[f.key];
+      if (f.altKey && d[f.altKey] != null && d[f.altKey] !== "")
+        return d[f.altKey];
+      return 0;
+    },
+    handleCountClose() {
+      this.countDialogVisible = false;
+      this.countData = {};
+    },
   },
 };
 </script>
@@ -1357,4 +1436,35 @@
     font-size: 24px;
   }
 }
+
+.count-detail {
+  .count-task-name {
+    font-size: 14px;
+    color: #303133;
+    font-weight: 600;
+    margin-bottom: 16px;
+  }
+  .count-grid {
+    display: grid;
+    grid-template-columns: repeat(3, 1fr);
+    gap: 12px;
+  }
+  .count-item {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 12px 14px;
+    background: #f5f7fa;
+    border-radius: 4px;
+    .count-label {
+      font-size: 13px;
+      color: #606266;
+    }
+    .count-value {
+      font-size: 16px;
+      font-weight: 600;
+      color: #303133;
+    }
+  }
+}
 </style>

--
Gitblit v1.9.3