From d725dc65cf7f74df3aa3f5a0297fd6f8b767cdbc Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期五, 30 十月 2026 10:23:03 +0800
Subject: [PATCH] Merge branch 'subtask' of http://116.62.18.175:6699/r/~yxh/smartor-web into subtask

---
 src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue |   81 +++++++++++++++++++++-------------------
 1 files changed, 43 insertions(+), 38 deletions(-)

diff --git a/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue b/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue
index 754e244..c299b30 100644
--- a/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue
+++ b/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue
@@ -401,8 +401,8 @@
   data() {
     return {
       // 婊℃剰搴︾被鍨嬶細leave=绂婚櫌婊℃剰搴︼紙鎸夊嚭闄㈢梾鍖虹粺璁★級锛宧ospital=鍦ㄩ櫌婊℃剰搴︼紙鎸夊湪闄㈢梾鍖虹粺璁★級
-      // 榛樿鍦ㄩ櫌婊℃剰搴�
-      satisfactionScope: "hospital",
+      // 榛樿绂婚櫌婊℃剰搴�
+      satisfactionScope: "leave",
 
       // 鏌ヨ鍙傛暟
       queryParams: {
@@ -432,7 +432,7 @@
       options: [
         {
           value: 6,
-          label: "浣忛櫌婊℃剰搴�",
+          label: "鍑哄叆闄㈡弧鎰忓害",
           raw: {
             cssClass: "",
             listClass: "",
@@ -539,8 +539,11 @@
 
     // 鑾峰彇绉戝鏍�
     getDeptTree() {
-      // 鑾峰彇鏈嶅姟绫诲瀷
-      this.options = this.$store.getters.tasktypes || [];
+      // 鑾峰彇鏈嶅姟绫诲瀷锛堝瓧鍏搁噷鐨勩�屼綇闄㈡弧鎰忓害銆嶅湪鏈〉鏄剧ず涓恒�屽嚭鍏ラ櫌婊℃剰搴︺�嶏級
+      const labelFix = { 浣忛櫌婊℃剰搴�: "鍑哄叆闄㈡弧鎰忓害" };
+      this.options = (this.$store.getters.tasktypes || []).map((o) =>
+        labelFix[o.label] ? { ...o, label: labelFix[o.label] } : o
+      );
 
       // 鑾峰彇绉戝鍒楄〃
       this.flatArraydept = (this.$store.getters.belongDepts || []).map(
@@ -854,9 +857,9 @@
       this.getList();
     },
 
-    // 閲嶇疆鏌ヨ锛堟仮澶嶉粯璁わ細鍦ㄩ櫌婊℃剰搴� + 鏈嶅姟绫诲瀷 6锛�
+    // 閲嶇疆鏌ヨ锛堟仮澶嶉粯璁わ細绂婚櫌婊℃剰搴� + 鏈嶅姟绫诲瀷 6锛�
     resetQuery() {
-      this.satisfactionScope = "hospital";
+      this.satisfactionScope = "leave";
       this.queryParams = {
         statisticaltype: 1,
         leavehospitaldistrictcodes: [],
@@ -1087,15 +1090,9 @@
           },
         };
 
-        // 娣诲姞鎬绘爣棰橈紙涓ゅ垪缁村害 + 鍏釜鎸囨爣鍒楋紝鍏� 10 鍒楋級
-        worksheet.mergeCells(1, 1, 1, 10);
-        const titleCell = worksheet.getCell(1, 1);
-        titleCell.value = `婊℃剰搴﹂殢璁跨粺璁¤〃锛�${sheetNameSuffix}锛塦;
-        titleCell.style = titleStyle;
-        worksheet.getRow(1).height = 35;
-
-        // 娣诲姞琛ㄥご锛堢瀹ょ粺璁″鍑哄湪闄㈢瀹�+绂婚櫌绉戝锛岀梾鍖虹粺璁″鍑哄湪闄㈢梾鍖�+绂婚櫌鐥呭尯锛�
+        // 琛ㄥご鎸夐〉闈㈠垪鍔ㄦ�佺敓鎴愶細绉戝/鐥呭尯缁熻鍒椾笉鍚岋紝銆屽強鏃剁巼銆嶅彧鏈夋櫙瀹侀櫌鍖洪〉闈㈡墠鏄剧ず
         const isWardStatistics = this.queryParams.statisticaltype == 1;
+        const showTimelyRate = this.orgname === "鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�";
         const headers = [
           isWardStatistics ? "鍦ㄩ櫌鐥呭尯" : "鍦ㄩ櫌绉戝",
           isWardStatistics ? "绂婚櫌鐥呭尯" : "绂婚櫌绉戝",
@@ -1103,11 +1100,19 @@
           "鏃犻渶闅忚浜烘",
           "搴旈殢璁夸汉娆�",
           "闅忚鐜�",
-          "鍙婃椂鐜�",
-          "婊℃剰搴﹂鐩�婚噺",
-          "婊℃剰搴﹀~鎶ラ噺",
-          "瀹屾垚姣旂巼",
         ];
+        if (showTimelyRate) {
+          headers.push("鍙婃椂鐜�");
+        }
+        headers.push("婊℃剰搴﹂鐩�婚噺", "婊℃剰搴﹀~鎶ラ噺", "瀹屾垚姣旂巼");
+        const colCount = headers.length;
+
+        // 娣诲姞鎬绘爣棰�
+        worksheet.mergeCells(1, 1, 1, colCount);
+        const titleCell = worksheet.getCell(1, 1);
+        titleCell.value = `婊℃剰搴﹂殢璁跨粺璁¤〃锛�${sheetNameSuffix}锛塦;
+        titleCell.style = titleStyle;
+        worksheet.getRow(1).height = 35;
 
         const headerRow = worksheet.addRow(headers);
         headerRow.eachCell((cell) => {
@@ -1115,9 +1120,13 @@
         });
         headerRow.height = 25;
 
-        // 娣诲姞鏁版嵁琛�
+        // 娣诲姞鏁版嵁琛岋紙绌哄�肩粺涓�鏄剧ず鈥�-鈥濓紝涓庨〉闈繚鎸佷竴鑷达級
+        const dash = (v, formatter) => {
+          if (v === null || v === undefined || v === "") return "-";
+          return formatter ? formatter(v) : v;
+        };
         this.userList.forEach((item) => {
-          const dataRow = worksheet.addRow([
+          const rowData = [
             isWardStatistics
               ? item.hospitaldistrictname || "-"
               : item.hospitaldeptname || "-",
@@ -1127,12 +1136,17 @@
             item.dischargeCount || 0,
             item.nonFollowUp || 0,
             item.followUpNeeded || 0,
-            item.followUpRate || "0%",
-            item.rate ? this.formatPercent(item.rate) : "0%",
+            dash(item.followUpRate),
+          ];
+          if (showTimelyRate) {
+            rowData.push(dash(item.rate, (v) => this.formatPercent(v)));
+          }
+          rowData.push(
             item.joyAllCount || 0,
             item.joyCount || 0,
-            item.joyTotal ? this.formatPercent(item.joyTotal) : "0%",
-          ]);
+            dash(item.joyTotal, (v) => this.formatPercent(v))
+          );
+          const dataRow = worksheet.addRow(rowData);
 
           dataRow.eachCell((cell) => {
             cell.style = cellStyle;
@@ -1140,19 +1154,10 @@
           dataRow.height = 22;
         });
 
-        // 璁剧疆鍒楀
-        worksheet.columns = [
-          { width: 20 },
-          { width: 20 },
-          { width: 12 },
-          { width: 12 },
-          { width: 12 },
-          { width: 12 },
-          { width: 12 },
-          { width: 15 },
-          { width: 15 },
-          { width: 12 },
-        ];
+        // 璁剧疆鍒楀锛堣窡鍒楁暟涓�鑷达級
+        worksheet.columns = headers.map((h, i) => ({
+          width: i < 2 ? 20 : h.length > 6 ? 15 : 12,
+        }));
 
         // 鐢熸垚骞朵笅杞芥枃浠�
         const buffer = await workbook.xlsx.writeBuffer();

--
Gitblit v1.9.3