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/FirstFollowUp.vue | 89 ++++++++++++++++++++++++++++++++++++++++----
1 files changed, 81 insertions(+), 8 deletions(-)
diff --git a/src/views/sfstatistics/percentage/components/FirstFollowUp.vue b/src/views/sfstatistics/percentage/components/FirstFollowUp.vue
index c91b536..c6c3302 100644
--- a/src/views/sfstatistics/percentage/components/FirstFollowUp.vue
+++ b/src/views/sfstatistics/percentage/components/FirstFollowUp.vue
@@ -1256,6 +1256,14 @@
this.orgname == "绗竴浜烘皯鍖婚櫌鍚村北闄㈠尯"
);
},
+ // 绗竴浜烘皯鍖婚櫌涓変釜闄㈠尯锛氬強鏃剁巼鎸� 鍙婃椂瀹屾垚/闇�闅忚 璁$畻
+ isDiyiRenmin() {
+ return (
+ this.orgname == "绗竴浜烘皯鍖婚櫌婀栨花闄㈠尯" ||
+ this.orgname == "绗竴浜烘皯鍖婚櫌鍚村北闄㈠尯" ||
+ this.orgname == "绗竴浜烘皯鍖婚櫌鍩庝笢闄㈠尯"
+ );
+ },
},
methods: {
loadData() {
@@ -1380,8 +1388,24 @@
const rate = ((need - timeout) / need) * 100;
return (rate < 0 ? 0 : rate).toFixed(2) + "%";
},
- // 鍙婃椂鐜囧睍绀烘枃妗堬細鐩爣鍖婚櫌鍓嶇璁$畻锛屽叾浠栫敤鍚庣 rate 瀛楁
+ // 璁$畻鍙婃椂鐜囷紙绗竴浜烘皯鍖婚櫌涓夐櫌鍖猴級锛氬強鏃跺畬鎴� / 闇�闅忚
+ calculateTimelyRateByCompletion(timelyFollowUp, needFollowUp) {
+ const timely = Number(timelyFollowUp) || 0;
+ const need = Number(needFollowUp) || 0;
+ if (need <= 0) {
+ return "0.00%";
+ }
+ const rate = (timely / need) * 100;
+ return (rate < 0 ? 0 : rate).toFixed(2) + "%";
+ },
+ // 鍙婃椂鐜囧睍绀烘枃妗堬細绗竴浜烘皯鍖婚櫌涓夐櫌鍖哄墠绔寜鍙婃椂瀹屾垚/闇�闅忚锛岀洰鏍囧尰闄㈡寜(闇�闅忚-瓒呮椂)/闇�闅忚锛屽叾浠栫敤鍚庣 rate 瀛楁
getTimelyRateText(row) {
+ if (this.isDiyiRenmin) {
+ return this.calculateTimelyRateByCompletion(
+ row.timelyFollowUp,
+ row.needFollowUp
+ );
+ }
if (this.isTargetHospital) {
return this.calculateTimelyRate(
row.needFollowUp,
@@ -1429,7 +1453,20 @@
sums[index] = "0.00%";
}
} else if (column.property === "rate") {
- if (this.isTargetHospital) {
+ if (this.isDiyiRenmin) {
+ const totalTimely = data.reduce(
+ (sum, item) => sum + (Number(item.timelyFollowUp) || 0),
+ 0
+ );
+ const totalNeed = data.reduce(
+ (sum, item) => sum + (Number(item.needFollowUp) || 0),
+ 0
+ );
+ sums[index] = this.calculateTimelyRateByCompletion(
+ totalTimely,
+ totalNeed
+ );
+ } else if (this.isTargetHospital) {
const totalNeed = data.reduce(
(sum, item) => sum + (Number(item.needFollowUp) || 0),
0
@@ -1524,7 +1561,9 @@
"el-tooltip",
{
props: {
- content: this.isTargetHospital
+ content: this.isDiyiRenmin
+ ? "鍙婃椂鐜�=鍙婃椂瀹屾垚/闇�闅忚"
+ : this.isTargetHospital
? "鍙婃椂鐜�=(闇�闅忚-浜哄伐瑙勫畾鏃堕棿鍐呮病鎵撹繃鐢佃瘽)/闇�闅忚"
: "(鍑洪櫌鏃堕棿+浠诲姟鍛ㄦ湡)灏忎簬瀹屾垚鏃堕棿鍗充负瓒呮椂;(闇�闅忚-瓒呮椂)/闇�闅忚",
placement: "top",
@@ -1612,7 +1651,20 @@
sums[index] = "0.00%";
}
} else if (column.property === "rate") {
- if (this.isTargetHospital) {
+ if (this.isDiyiRenmin) {
+ const totalTimely = data.reduce(
+ (sum, item) => sum + (Number(item.timelyFollowUp) || 0),
+ 0
+ );
+ const totalNeed = data.reduce(
+ (sum, item) => sum + (Number(item.needFollowUp) || 0),
+ 0
+ );
+ sums[index] = this.calculateTimelyRateByCompletion(
+ totalTimely,
+ totalNeed
+ );
+ } else if (this.isTargetHospital) {
const totalNeed = data.reduce(
(sum, item) => sum + (Number(item.needFollowUp) || 0),
0
@@ -2142,9 +2194,21 @@
: "0.00%"
);
- // 鍙婃椂鐜囷紙鐩爣鍖婚櫌璁$畻锛屽叾浠栧彇 rate 骞冲潎锛�
+ // 鍙婃椂鐜囷紙绗竴浜烘皯鍖婚櫌涓夐櫌鍖烘寜鍙婃椂瀹屾垚/闇�闅忚锛岀洰鏍囧尰闄㈣绠楋紝鍏朵粬鍙� rate 骞冲潎锛�
if (showTimelyRate) {
- if (graded) {
+ if (this.isDiyiRenmin) {
+ const totalTimely = data.reduce(
+ (s, r) => s + (Number(r.timelyFollowUp) || 0),
+ 0
+ );
+ const totalNeed = data.reduce(
+ (s, r) => s + (Number(r.needFollowUp) || 0),
+ 0
+ );
+ sums.push(
+ this.calculateTimelyRateByCompletion(totalTimely, totalNeed)
+ );
+ } else if (graded) {
const totalNeed = data.reduce(
(s, r) => s + (Number(r.needFollowUp) || 0),
0
@@ -2661,8 +2725,17 @@
summaries[followUpRateIdx] = (avgFollowUpRate * 100).toFixed(2) + "%";
}
- // 鍙婃椂鐜囪绠楋細鐩爣鍖婚櫌 (闇�闅忚-浜哄伐瓒呮椂)/闇�闅忚锛屽叾浠栧彇鍚庣 rate 骞冲潎
- if (graded) {
+ // 鍙婃椂鐜囪绠楋細绗竴浜烘皯鍖婚櫌涓夐櫌鍖烘寜鍙婃椂瀹屾垚/闇�闅忚锛岀洰鏍囧尰闄� (闇�闅忚-浜哄伐瓒呮椂)/闇�闅忚锛屽叾浠栧彇鍚庣 rate 骞冲潎
+ if (this.isDiyiRenmin) {
+ const totalTimely = this.tableData.reduce(
+ (sum, item) => sum + (Number(item.timelyFollowUp) || 0),
+ 0
+ );
+ summaries[timelyRateIdx] = this.calculateTimelyRateByCompletion(
+ totalTimely,
+ totalNeed
+ );
+ } else if (graded) {
const totalTimeout = this.tableData.reduce(
(sum, item) => sum + (Number(item.manualCallTimeout) || 0),
0
--
Gitblit v1.9.3