From fb34ba28cb908bd328cf6690ab0b19a56428f4e2 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 13 十一月 2026 10:56:55 +0800
Subject: [PATCH] 测试完成
---
src/views/sfstatistics/percentage/components/CombinedFollowUp.vue | 194 +++++++++++++++++++++++++++++++++++-------------
1 files changed, 140 insertions(+), 54 deletions(-)
diff --git a/src/views/sfstatistics/percentage/components/CombinedFollowUp.vue b/src/views/sfstatistics/percentage/components/CombinedFollowUp.vue
index b070bbf..078eab8 100644
--- a/src/views/sfstatistics/percentage/components/CombinedFollowUp.vue
+++ b/src/views/sfstatistics/percentage/components/CombinedFollowUp.vue
@@ -1301,7 +1301,7 @@
};
// 鏍囬琛�
- worksheet.mergeCells(1, 1, 1, 20);
+ worksheet.mergeCells(1, 1, 1, 26);
worksheet.getCell(
1,
1
@@ -1356,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) => {
@@ -1390,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) => {
@@ -1426,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),
@@ -1514,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;
},
--
Gitblit v1.9.3