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

---
 src/views/sfstatistics/percentage/components/CombinedFollowUp.vue |  301 +++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 247 insertions(+), 54 deletions(-)

diff --git a/src/views/sfstatistics/percentage/components/CombinedFollowUp.vue b/src/views/sfstatistics/percentage/components/CombinedFollowUp.vue
index ebdec78..078eab8 100644
--- a/src/views/sfstatistics/percentage/components/CombinedFollowUp.vue
+++ b/src/views/sfstatistics/percentage/components/CombinedFollowUp.vue
@@ -621,6 +621,46 @@
           </el-table-column>
         </el-table-column>
 
+        <!-- ===== 闅忚鎯呭喌锛堜附姘村競涓尰闄紝浠庨娆¢殢璁跨Щ鍏ワ級 ===== -->
+        <el-table-column align="center" label="闅忚鎯呭喌">
+          <el-table-column
+            label="姝e父璇煶"
+            align="center"
+            width="100"
+            prop="taskSituation1"
+          />
+          <el-table-column
+            label="鎮h�呮嫆鎺ユ垨鎷掕"
+            align="center"
+            width="100"
+            prop="taskSituation2"
+          />
+          <el-table-column
+            label="闈㈣鎴栬�呮帴璇�"
+            align="center"
+            width="100"
+            prop="taskSituation3"
+          />
+          <el-table-column
+            label="寰俊闅忚"
+            align="center"
+            width="100"
+            prop="taskSituation4"
+          />
+          <el-table-column
+            label="闅忚鐢佃瘽涓嶆纭�"
+            align="center"
+            width="100"
+            prop="taskSituation5"
+          />
+          <el-table-column
+            label="鍏朵粬鎯呭喌涓嶅疁闅忚"
+            align="center"
+            width="100"
+            prop="taskSituation6"
+          />
+        </el-table-column>
+
         <!-- ===== 鏂板璁$畻鎸囨爣 ===== -->
         <el-table-column
           label="闅忚鐜�"
@@ -662,6 +702,39 @@
             >
               <span class="button-zx">{{ scope.row.manuallyCalled }}</span>
             </el-button>
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="鍐嶆闅忚鎺ㄩ�佷汉鏁�"
+          align="center"
+          prop="againFollowUpPushCount"
+        >
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              @click="
+                handleViewDetails(
+                  scope.row,
+                  'againFollowUpPushCountInfo',
+                  '鍐嶆闅忚鎺ㄩ�佸垪琛�',
+                  '1'
+                )
+              "
+            >
+              <span class="button-zx">{{
+                scope.row.againFollowUpPushCount
+              }}</span>
+            </el-button>
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="杩借釜闅忚鎺ㄩ�佺巼"
+          align="center"
+          prop="againFollowUpPushRate"
+          :render-header="TooltipAgainFollowUpPushRate"
+        >
+          <template slot-scope="scope">
+            <span>{{ calculateAgainFollowUpPushRate(scope.row) }}</span>
           </template>
         </el-table-column>
       </el-table>
@@ -979,6 +1052,14 @@
       return ((successAgain / denominator) * 100).toFixed(2) + "%";
     },
 
+    // 杩借釜闅忚鎺ㄩ�佺巼 = 鍐嶆闅忚鎺ㄩ�佷汉鏁� / 鍑洪櫌浜烘
+    calculateAgainFollowUpPushRate(row) {
+      const pushCount = Number(row.againFollowUpPushCount) || 0;
+      const discharge = Number(row.dischargeCount) || 0;
+      if (discharge <= 0) return "0.00%";
+      return ((pushCount / discharge) * 100).toFixed(2) + "%";
+    },
+
     // ===================== 姹囨�� =====================
     getSummaries(param) {
       const { columns, data } = param;
@@ -1020,6 +1101,19 @@
             sums[index] =
               (values.reduce((a, b) => a + b, 0) / values.length).toFixed(2) +
               "%";
+        } else if (prop === "againFollowUpPushRate") {
+          const totalPush = data.reduce(
+            (s, row) => s + (Number(row.againFollowUpPushCount) || 0),
+            0
+          );
+          const totalDischarge = data.reduce(
+            (s, row) => s + (Number(row.dischargeCount) || 0),
+            0
+          );
+          sums[index] =
+            totalDischarge > 0
+              ? ((totalPush / totalDischarge) * 100).toFixed(2) + "%"
+              : "0.00%";
         } else {
           // 鏁板瓧鍒楁眰鍜�
           const values = data.map((item) => Number(item[prop]) || 0);
@@ -1207,7 +1301,7 @@
       };
 
       // 鏍囬琛�
-      worksheet.mergeCells(1, 1, 1, 20);
+      worksheet.mergeCells(1, 1, 1, 26);
       worksheet.getCell(
         1,
         1
@@ -1262,13 +1356,40 @@
         worksheet.getCell(3, col).style = headerStyle;
       });
 
-      // 鏂板璁$畻鎸囨爣
-      worksheet.mergeCells(2, 16, 3, 16);
-      worksheet.getCell(2, 16).value = "闅忚鐜�";
+      // 闅忚鎯呭喌澶у垪锛堟甯歌闊�/鎷掓帴鎴栨嫆璁�/闈㈣鎴栨帴璇�/寰俊/鐢佃瘽涓嶆纭�/鍏朵粬锛�
+      worksheet.mergeCells(2, 16, 2, 21);
+      worksheet.getCell(2, 16).value = "闅忚鎯呭喌";
       worksheet.getCell(2, 16).style = headerStyle;
-      worksheet.mergeCells(2, 17, 3, 17);
-      worksheet.getCell(2, 17).value = "鎺ㄩ�佺巼";
-      worksheet.getCell(2, 17).style = headerStyle;
+      const situationCols = [
+        "姝e父璇煶",
+        "鎮h�呮嫆鎺ユ垨鎷掕",
+        "闈㈣鎴栬�呮帴璇�",
+        "寰俊闅忚",
+        "闅忚鐢佃瘽涓嶆纭�",
+        "鍏朵粬鎯呭喌涓嶅疁闅忚",
+      ];
+      situationCols.forEach((label, idx) => {
+        const col = 16 + idx;
+        worksheet.getCell(3, col).value = label;
+        worksheet.getCell(3, col).style = headerStyle;
+      });
+
+      // 鏂板璁$畻鎸囨爣
+      worksheet.mergeCells(2, 22, 3, 22);
+      worksheet.getCell(2, 22).value = "闅忚鐜�";
+      worksheet.getCell(2, 22).style = headerStyle;
+      worksheet.mergeCells(2, 23, 3, 23);
+      worksheet.getCell(2, 23).value = "鎺ㄩ�佺巼";
+      worksheet.getCell(2, 23).style = headerStyle;
+      worksheet.mergeCells(2, 24, 3, 24);
+      worksheet.getCell(2, 24).value = "宸叉嫧閫�";
+      worksheet.getCell(2, 24).style = headerStyle;
+      worksheet.mergeCells(2, 25, 3, 25);
+      worksheet.getCell(2, 25).value = "鍐嶆闅忚鎺ㄩ�佷汉鏁�";
+      worksheet.getCell(2, 25).style = headerStyle;
+      worksheet.mergeCells(2, 26, 3, 26);
+      worksheet.getCell(2, 26).value = "杩借釜闅忚鎺ㄩ�佺巼";
+      worksheet.getCell(2, 26).style = headerStyle;
 
       // 鏁版嵁琛�
       this.tableData.forEach((item) => {
@@ -1296,8 +1417,17 @@
             item.needFollowUpAgain,
             item.pendingFollowUpAgain
           ),
+          item.taskSituation1 || 0,
+          item.taskSituation2 || 0,
+          item.taskSituation3 || 0,
+          item.taskSituation4 || 0,
+          item.taskSituation5 || 0,
+          item.taskSituation6 || 0,
           this.calculateFollowUpRate(item),
           this.calculatePushRate(item),
+          item.manuallyCalled || 0,
+          item.againFollowUpPushCount || 0,
+          this.calculateAgainFollowUpPushRate(item),
         ];
         const row = worksheet.addRow(rowData);
         row.eachCell((cell) => {
@@ -1332,61 +1462,77 @@
         { width: 12 },
         { width: 12 },
         { width: 12 },
+        { width: 12 },
+        { width: 12 },
+        { width: 12 },
+        { width: 12 },
+        { width: 12 },
+        { width: 12 },
+        { width: 12 },
+        { width: 12 },
+        { width: 12 },
       ];
     },
 
     getExportSummaries() {
-      // 鎻愬彇鏁版嵁锛岃绠楀悎璁¤
+      // 鎻愬彇鏁版嵁锛岃绠楀悎璁¤锛�26 鍒楋細涓庝富琛ㄥ鍑鸿〃澶翠竴鑷达級
       const data = this.tableData;
       const sums = [
-        "鍚堣",
-        "/",
-        0,
-        0,
-        0,
-        0,
-        0,
-        0,
-        0,
-        "0%",
-        0,
-        0,
-        0,
-        0,
-        "0%",
-        "0%",
-        "0%",
+        "鍚堣", // 0
+        "/", // 1
+        0, // 2 鍑洪櫌浜烘
+        0, // 3 鏃犻渶闅忚
+        0, // 4 搴旈殢璁�
+        0, // 5 闇�闅忚(棣栨)
+        0, // 6 寰呴殢璁�(棣栨)
+        0, // 7 瀹屾垚(棣栨)
+        0, // 8 澶辫触(棣栨)
+        "0.00%", // 9 鎴愬姛鐜�(棣栨)
+        0, // 10 闇�闅忚(鍐嶆)
+        0, // 11 寰呴殢璁�(鍐嶆)
+        0, // 12 瀹屾垚(鍐嶆)
+        0, // 13 澶辫触(鍐嶆)
+        "0.00%", // 14 鎴愬姛鐜�(鍐嶆)
+        0, // 15 姝e父璇煶
+        0, // 16 鎮h�呮嫆鎺ユ垨鎷掕
+        0, // 17 闈㈣鎴栬�呮帴璇�
+        0, // 18 寰俊闅忚
+        0, // 19 闅忚鐢佃瘽涓嶆纭�
+        0, // 20 鍏朵粬鎯呭喌涓嶅疁闅忚
+        "0.00%", // 21 闅忚鐜�
+        "0.00%", // 22 鎺ㄩ�佺巼
+        0, // 23 宸叉嫧閫�
+        0, // 24 鍐嶆闅忚鎺ㄩ�佷汉鏁�
+        "0.00%", // 25 杩借釜闅忚鎺ㄩ�佺巼
       ];
-      // 鏁板瓧鍒楃储寮�
-      const numIndices = [2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13];
-      data.forEach((row) => {
-        numIndices.forEach((idx) => {
-          const val = Number(row[this.getFieldByIndex(idx)]) || 0;
-          sums[idx] += val;
-        });
+      // 鏁板瓧鍒楁眰鍜岋紙绱㈠紩 -> 瀛楁鍚嶏級
+      const numFields = [
+        [2, "dischargeCount"],
+        [3, "nonFollowUp"],
+        [4, "followUpNeeded"],
+        [5, "needFollowUp"],
+        [6, "pendingFollowUp"],
+        [7, "followUpSuccess"],
+        [8, "followUpFail"],
+        [10, "needFollowUpAgain"],
+        [11, "pendingFollowUpAgain"],
+        [12, "followUpSuccessAgain"],
+        [13, "followUpFailAgain"],
+        [15, "taskSituation1"],
+        [16, "taskSituation2"],
+        [17, "taskSituation3"],
+        [18, "taskSituation4"],
+        [19, "taskSituation5"],
+        [20, "taskSituation6"],
+        [23, "manuallyCalled"],
+        [24, "againFollowUpPushCount"],
+      ];
+      numFields.forEach(([idx, field]) => {
+        sums[idx] = this.formatNumber(
+          data.reduce((s, row) => s + (Number(row[field]) || 0), 0)
+        );
       });
-      // 鏍煎紡鍖栨暟瀛�
-      numIndices.forEach((idx) => {
-        sums[idx] = this.formatNumber(sums[idx]);
-      });
-      // 璁$畻涓や釜鐧惧垎姣斿垪鐨勫钩鍧囧��
-      const followUpRates = data
-        .map((row) =>
-          parseFloat(this.calculateFollowUpRate(row).replace("%", ""))
-        )
-        .filter((v) => !isNaN(v));
-      const pushRates = data
-        .map((row) => parseFloat(this.calculatePushRate(row).replace("%", "")))
-        .filter((v) => !isNaN(v));
-      sums[15] = followUpRates.length
-        ? (
-            followUpRates.reduce((a, b) => a + b, 0) / followUpRates.length
-          ).toFixed(2) + "%"
-        : "0.00%";
-      sums[16] = pushRates.length
-        ? (pushRates.reduce((a, b) => a + b, 0) / pushRates.length).toFixed(2) +
-          "%"
-        : "0.00%";
+
       // 鎴愬姛鐜囩殑鍚堣鐢ㄦ暣浣撴硶璁$畻
       const totalSuccess = data.reduce(
         (s, row) => s + (Number(row.followUpSuccess) || 0),
@@ -1420,6 +1566,40 @@
         denomAgain > 0
           ? ((totalSuccessAgain / denomAgain) * 100).toFixed(2) + "%"
           : "0.00%";
+
+      // 闅忚鐜� / 鎺ㄩ�佺巼锛氬彇鍚勮鐨勫钩鍧囧��
+      const followUpRates = data
+        .map((row) =>
+          parseFloat(this.calculateFollowUpRate(row).replace("%", ""))
+        )
+        .filter((v) => !isNaN(v));
+      sums[21] = followUpRates.length
+        ? (
+            followUpRates.reduce((a, b) => a + b, 0) / followUpRates.length
+          ).toFixed(2) + "%"
+        : "0.00%";
+      const pushRates = data
+        .map((row) => parseFloat(this.calculatePushRate(row).replace("%", "")))
+        .filter((v) => !isNaN(v));
+      sums[22] = pushRates.length
+        ? (pushRates.reduce((a, b) => a + b, 0) / pushRates.length).toFixed(2) +
+          "%"
+        : "0.00%";
+
+      // 杩借釜闅忚鎺ㄩ�佺巼锛氭暣浣撴硶 = 鍐嶆闅忚鎺ㄩ�佷汉鏁板悎璁� / 鍑洪櫌浜烘鍚堣
+      const totalPush = data.reduce(
+        (s, row) => s + (Number(row.againFollowUpPushCount) || 0),
+        0
+      );
+      const totalDischarge = data.reduce(
+        (s, row) => s + (Number(row.dischargeCount) || 0),
+        0
+      );
+      sums[25] =
+        totalDischarge > 0
+          ? ((totalPush / totalDischarge) * 100).toFixed(2) + "%"
+          : "0.00%";
+
       return sums;
     },
 
@@ -1714,6 +1894,19 @@
         [h("span", column.label)]
       );
     },
+    TooltipAgainFollowUpPushRate(h, { column }) {
+      return h(
+        "el-tooltip",
+        {
+          props: {
+            content: "鍐嶆闅忚鎺ㄩ�佷汉鏁�/鍑洪櫌浜烘",
+            placement: "top",
+            effect: "dark",
+          },
+        },
+        [h("span", column.label)]
+      );
+    },
   },
 };
 </script>

--
Gitblit v1.9.3