From c70f5e1d471ddf002ef0ebd5f4c6a5ed1c865d0d Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 21 十月 2026 17:47:58 +0800
Subject: [PATCH] 测试完成

---
 src/views/sfstatistics/percentage/components/FirstFollowUp.vue |  607 ++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 484 insertions(+), 123 deletions(-)

diff --git a/src/views/sfstatistics/percentage/components/FirstFollowUp.vue b/src/views/sfstatistics/percentage/components/FirstFollowUp.vue
index 67d329f..adabf9f 100644
--- a/src/views/sfstatistics/percentage/components/FirstFollowUp.vue
+++ b/src/views/sfstatistics/percentage/components/FirstFollowUp.vue
@@ -590,6 +590,223 @@
             </template>
           </el-table-column>
           <el-table-column
+            v-if="isTargetHospital"
+            label="浜哄伐"
+            align="center"
+          >
+            <el-table-column
+              label="鍙戦�佸畬鎴�"
+              align="center"
+              key="manual"
+              prop="manual"
+              :render-header="Tooltipfswc"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  size="medium"
+                  type="text"
+                  @click="
+                    handleViewDetails(
+                      scope.row,
+                      'manualInfo',
+                      '鍙戦�佸畬鎴愪汉宸ラ殢璁垮垪琛�'
+                    )
+                  "
+                >
+                  <span class="button-zx">{{ scope.row.manual }}</span>
+                </el-button>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="鏈�缁堝畬鎴�"
+              align="center"
+              key="manualSuccess"
+              prop="manualSuccess"
+              :render-header="Tooltipzzwc"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  size="medium"
+                  type="text"
+                  @click="
+                    handleViewDetails(
+                      scope.row,
+                      'manualSuccessInfo',
+                      '鏈�缁堝畬鎴愪汉宸ラ殢璁垮垪琛�'
+                    )
+                  "
+                >
+                  <span class="button-zx">{{
+                    scope.row.manualSuccess
+                  }}</span>
+                </el-button>
+              </template>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column
+            v-if="isTargetHospital"
+            label="璇煶"
+            align="center"
+          >
+            <el-table-column
+              label="鍙戦�佸畬鎴�"
+              align="center"
+              key="voice"
+              prop="voice"
+              :render-header="Tooltipfswc"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  size="medium"
+                  type="text"
+                  @click="
+                    handleViewDetails(
+                      scope.row,
+                      'voiceInfo',
+                      '鍙戦�佸畬鎴愯闊抽殢璁垮垪琛�'
+                    )
+                  "
+                >
+                  <span class="button-zx">{{ scope.row.voice }}</span>
+                </el-button>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="鏈�缁堝畬鎴�"
+              align="center"
+              key="voiceSuccess"
+              prop="voiceSuccess"
+              :render-header="Tooltipzzwc"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  size="medium"
+                  type="text"
+                  @click="
+                    handleViewDetails(
+                      scope.row,
+                      'voiceSuccessInfo',
+                      '鏈�缁堝畬鎴愯闊抽殢璁垮垪琛�'
+                    )
+                  "
+                >
+                  <span class="button-zx">{{
+                    scope.row.voiceSuccess
+                  }}</span>
+                </el-button>
+              </template>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column
+            v-if="isTargetHospital"
+            label="鐭俊"
+            align="center"
+          >
+            <el-table-column
+              label="鍙戦�佸畬鎴�"
+              align="center"
+              key="sms"
+              prop="sms"
+              :render-header="Tooltipfswc"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  size="medium"
+                  type="text"
+                  @click="
+                    handleViewDetails(
+                      scope.row,
+                      'smsInfo',
+                      '鍙戦�佸畬鎴愮煭淇¢殢璁垮垪琛�'
+                    )
+                  "
+                >
+                  <span class="button-zx">{{ scope.row.sms }}</span>
+                </el-button>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="鏈�缁堝畬鎴�"
+              align="center"
+              key="smsSuccess"
+              prop="smsSuccess"
+              :render-header="Tooltipzzwc"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  size="medium"
+                  type="text"
+                  @click="
+                    handleViewDetails(
+                      scope.row,
+                      'smsSuccessInfo',
+                      '鏈�缁堝畬鎴愮煭淇¢殢璁垮垪琛�'
+                    )
+                  "
+                >
+                  <span class="button-zx">{{
+                    scope.row.smsSuccess
+                  }}</span>
+                </el-button>
+              </template>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column
+            v-if="isTargetHospital"
+            label="寰俊"
+            align="center"
+          >
+            <el-table-column
+              label="鍙戦�佸畬鎴�"
+              align="center"
+              key="weChat"
+              prop="weChat"
+              :render-header="Tooltipfswc"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  size="medium"
+                  type="text"
+                  @click="
+                    handleViewDetails(
+                      scope.row,
+                      'weChatInfo',
+                      '鍙戦�佸畬鎴愬井淇¢殢璁垮垪琛�'
+                    )
+                  "
+                >
+                  <span class="button-zx">{{ scope.row.weChat }}</span>
+                </el-button>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="鏈�缁堝畬鎴�"
+              align="center"
+              key="weChatSuccess"
+              prop="weChatSuccess"
+              :render-header="Tooltipzzwc"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  size="medium"
+                  type="text"
+                  @click="
+                    handleViewDetails(
+                      scope.row,
+                      'weChatSuccessInfo',
+                      '鏈�缁堝畬鎴愬井淇¢殢璁垮垪琛�'
+                    )
+                  "
+                >
+                  <span class="button-zx">{{
+                    scope.row.weChatSuccess
+                  }}</span>
+                </el-button>
+              </template>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column
+            v-if="!isTargetHospital"
             label="浜哄伐"
             align="center"
             key="manual"
@@ -607,7 +824,13 @@
               </el-button>
             </template>
           </el-table-column>
-          <el-table-column label="璇煶" align="center" key="voice" prop="voice">
+          <el-table-column
+            v-if="!isTargetHospital"
+            label="璇煶"
+            align="center"
+            key="voice"
+            prop="voice"
+          >
             <template slot-scope="scope">
               <el-button
                 size="medium"
@@ -620,7 +843,13 @@
               </el-button>
             </template>
           </el-table-column>
-          <el-table-column label="鐭俊" align="center" key="sms" prop="sms">
+          <el-table-column
+            v-if="!isTargetHospital"
+            label="鐭俊"
+            align="center"
+            key="sms"
+            prop="sms"
+          >
             <template slot-scope="scope">
               <el-button
                 size="medium"
@@ -632,6 +861,7 @@
             </template>
           </el-table-column>
           <el-table-column
+            v-if="!isTargetHospital"
             label="寰俊"
             align="center"
             key="weChat"
@@ -749,6 +979,14 @@
       tasktypes: store.getters.tasktypes,
     };
   },
+  computed: {
+    isTargetHospital() {
+      return (
+        this.orgname == "绗竴浜烘皯鍖婚櫌婀栨花闄㈠尯" ||
+        this.orgname == "绗竴浜烘皯鍖婚櫌鍚村北闄㈠尯"
+      );
+    },
+  },
   methods: {
     loadData() {
       this.loading = true;
@@ -809,7 +1047,7 @@
     },
 
     getRowKey(row) {
-      return row.statisticaltype === 1
+      return this.queryParams.statisticaltype === 1
         ? row.leavehospitaldistrictcode
         : row.deptcode;
     },
@@ -975,6 +1213,32 @@
         {
           props: {
             content: "(闅忚鎴愬姛+棣栨闅忚澶辫触)/棣栨搴旈殢璁�",
+            placement: "top",
+            effect: "dark",
+          },
+        },
+        [h("span", column.label)]
+      );
+    },
+    Tooltipfswc(h, { column }) {
+      return h(
+        "el-tooltip",
+        {
+          props: {
+            content: "棣栨鍙戦�佹偅鑰呭嵆濉姤鎴愬姛鐨勬暟閲�",
+            placement: "top",
+            effect: "dark",
+          },
+        },
+        [h("span", column.label)]
+      );
+    },
+    Tooltipzzwc(h, { column }) {
+      return h(
+        "el-tooltip",
+        {
+          props: {
+            content: "棣栨鏈畬鎴愪簩娆℃垨涓夋琛ュ伩鎺ㄩ�佹湰鏂瑰紡鐨勫畬鎴愭鏁�",
             placement: "top",
             effect: "dark",
           },
@@ -1207,19 +1471,21 @@
           }
         }
 
-        // 鏍规嵁 serviceType 鐢熸垚闅忚绫诲瀷鍚嶇О
+        // 鏍规嵁 serviceType 鐢熸垚闅忚绫诲瀷鍚嶇О锛堝吋瀹瑰崟閫�/澶氶�夛級
+        const serviceTypes = Array.isArray(this.queryParams.serviceType)
+          ? this.queryParams.serviceType
+          : this.queryParams.serviceType
+          ? [this.queryParams.serviceType]
+          : [];
+
         let serviceTypeName = "棣栨鍑洪櫌闅忚"; // 鏂囦欢鍚嶄娇鐢ㄧ殑鍚嶇О
         let sheetTypeName = "棣栨闅忚"; // 宸ヤ綔琛ㄤ娇鐢ㄧ殑鍚嶇О锛堢畝鍖栫増锛�
 
-        if (
-          this.queryParams.serviceType &&
-          Array.isArray(this.queryParams.serviceType) &&
-          this.queryParams.serviceType.length > 0
-        ) {
+        if (serviceTypes.length > 0) {
           // 浣跨敤 props 涓殑 options锛堝嵆 tasktypes锛�
           if (this.options && Array.isArray(this.options)) {
             const matchedTypes = this.options.filter((task) =>
-              this.queryParams.serviceType.includes(task.value)
+              serviceTypes.includes(task.value)
             );
             console.log(matchedTypes, "matchedTypes");
 
@@ -1232,14 +1498,14 @@
               serviceTypeName = `棣栨${typeNames.join("/")}`;
               // 宸ヤ綔琛ㄥ悕绠�鍖栵紙鍙栫涓�涓�+鈥滅瓑鈥濓級
               sheetTypeName = `棣栨${typeNames[0]}绛塦;
-            } else if (this.queryParams.serviceType.length > 0) {
+            } else {
               // 鏃犲尮閰嶆椂浣跨敤鍘熷鍊�
-              const typeStr = this.queryParams.serviceType.join("/");
+              const typeStr = serviceTypes.join("/");
               serviceTypeName = `棣栨${typeStr}`;
               sheetTypeName = "棣栨闅忚";
             }
-          } else if (this.queryParams.serviceType.length > 0) {
-            const typeStr = this.queryParams.serviceType.join("/");
+          } else {
+            const typeStr = serviceTypes.join("/");
             serviceTypeName = `棣栨${typeStr}`;
             sheetTypeName = "棣栨闅忚";
           }
@@ -1569,91 +1835,156 @@
           right: { style: "thin", color: { argb: "FFD0D0D0" } },
         },
       };
-      const titleText = `${serviceTypeName}缁熻琛╛${sheetNameSuffix}`;
-      // 娣诲姞鏍囬琛�
-      worksheet.mergeCells(1, 1, 1, 16);
-      const titleCell = worksheet.getCell(1, 1);
-      titleCell.value = titleText; // 浣跨敤鍔ㄦ�佹爣棰�
-      titleCell.style = titleStyle;
-      worksheet.getRow(1).height = 35;
+      // 鏄惁涓虹洰鏍囧尰闄紙浜哄伐/璇煶/鐭俊/寰俊 鎸� 鍙戦�佸畬鎴�/鏈�缁堝畬鎴� 鍒嗙骇灞曠ず锛�
+      const graded = this.isTargetHospital;
 
-      // 琛ㄥご
-      const secondRowHeaders = [
+      const baseHeaders = [
         "",
         "鍑洪櫌鐥呭尯",
         "绉戝",
         "鍑洪櫌浜烘",
         "鏃犻渶闅忚浜烘",
         "搴旈殢璁夸汉娆�",
+      ];
+      const coreHeaders = [
         "闇�闅忚",
         "寰呴殢璁�",
         "闅忚鎴愬姛",
         "闅忚澶辫触",
-        "鎴愬姛鐜�", // 鏂板
-        "闅忚鐜�", // 鍘熶綅缃悗绉�
-        "鍙婃椂鐜�", // 鍙婃椂鐜囧悗绉�
-        "浜哄伐",
-        "璇煶", // 淇锛氬簲璇ユ槸璇煶
-        "鐭俊", // 鐭俊
-        "寰俊", // 寰俊
+        "鎴愬姛鐜�",
+        "闅忚鐜�",
+        "鍙婃椂鐜�",
       ];
+      const methodGroups = this.getMethodColumns();
 
-      secondRowHeaders.forEach((header, index) => {
-        const cell = worksheet.getCell(3, index + 1);
-        cell.value = header;
-        cell.style = headerStyle;
-      });
+      const baseCount = baseHeaders.length; // 6
+      const coreCount = coreHeaders.length; // 7
+      const methodLeafCount = methodGroups.reduce(
+        (sum, g) => sum + g.fields.length,
+        0
+      ); // 8 鎴� 4
+      const totalCols = baseCount + coreCount + methodLeafCount; // 21 鎴� 17
+      const coreStartCol = baseCount + 1; // 7
+      const methodStartCol = baseCount + coreCount + 1; // 14
 
-      // 鍚堝苟鍗曞厓鏍�
-      for (let i = 1; i <= 6; i++) {
-        worksheet.mergeCells(2, i, 3, i);
-        const cell = worksheet.getCell(2, i);
-        cell.style = headerStyle;
+      const titleText = `${serviceTypeName}缁熻琛╛${sheetNameSuffix}`;
+      // 娣诲姞鏍囬琛�
+      worksheet.mergeCells(1, 1, 1, totalCols);
+      const titleCell = worksheet.getCell(1, 1);
+      titleCell.value = titleText;
+      titleCell.style = titleStyle;
+      worksheet.getRow(1).height = 35;
+
+      if (graded) {
+        // 琛ㄥご鍗� 3 琛岋紙绗�2/3/4琛岋級锛屾暟鎹粠绗�5琛屽紑濮�
+        const headerEndRow = 4;
+
+        // 绗�2琛岋細鍩虹鍒楃旱鍚戝悎骞� + 闅忚鍒嗙粍妯悜鍚堝苟
+        for (let i = 1; i <= baseCount; i++) {
+          worksheet.mergeCells(2, i, headerEndRow, i);
+          const cell = worksheet.getCell(2, i);
+          cell.value = baseHeaders[i - 1];
+          cell.style = headerStyle;
+        }
+        worksheet.mergeCells(2, coreStartCol, 2, totalCols);
+        worksheet.getCell(2, coreStartCol).value = serviceTypeName;
+        worksheet.getCell(2, coreStartCol).style = headerStyle;
+
+        // 绗�3琛岋細闅忚鏍稿績鍒楃旱鍚戝悎骞� + 闅忚鏂瑰紡鍒嗙粍妯悜鍚堝苟
+        for (let k = 0; k < coreCount; k++) {
+          const col = coreStartCol + k;
+          worksheet.mergeCells(3, col, headerEndRow, col);
+          const cell = worksheet.getCell(3, col);
+          cell.value = coreHeaders[k];
+          cell.style = headerStyle;
+        }
+        let mc = methodStartCol;
+        methodGroups.forEach((g) => {
+          if (g.fields.length > 1) {
+            worksheet.mergeCells(3, mc, 3, mc + g.fields.length - 1);
+          }
+          const cell = worksheet.getCell(3, mc);
+          cell.value = g.label;
+          cell.style = headerStyle;
+          mc += g.fields.length;
+        });
+
+        // 绗�4琛岋細闅忚鏂瑰紡瀛愬垪锛堝彂閫佸畬鎴�/鏈�缁堝畬鎴愶級
+        mc = methodStartCol;
+        methodGroups.forEach((g) => {
+          g.fields.forEach((field, idx) => {
+            const cell = worksheet.getCell(4, mc + idx);
+            cell.value = g.sub[idx];
+            cell.style = headerStyle;
+          });
+          mc += g.fields.length;
+        });
+
+        worksheet.getRow(2).height = 28;
+        worksheet.getRow(3).height = 24;
+        worksheet.getRow(4).height = 24;
+      } else {
+        // 琛ㄥご鍗� 2 琛岋紙绗�2/3琛岋級锛屾暟鎹粠绗�4琛屽紑濮�
+        const headerEndRow = 3;
+
+        for (let i = 1; i <= baseCount; i++) {
+          worksheet.mergeCells(2, i, headerEndRow, i);
+          const cell = worksheet.getCell(2, i);
+          cell.value = baseHeaders[i - 1];
+          cell.style = headerStyle;
+        }
+        worksheet.mergeCells(2, coreStartCol, 2, totalCols);
+        worksheet.getCell(2, coreStartCol).value = serviceTypeName;
+        worksheet.getCell(2, coreStartCol).style = headerStyle;
+
+        // 绗�3琛岋細闅忚鏍稿績鍒� + 闅忚鏂瑰紡鍒�
+        for (let k = 0; k < coreCount; k++) {
+          const cell = worksheet.getCell(3, coreStartCol + k);
+          cell.value = coreHeaders[k];
+          cell.style = headerStyle;
+        }
+        let mc = methodStartCol;
+        methodGroups.forEach((g) => {
+          const cell = worksheet.getCell(3, mc);
+          cell.value = g.label;
+          cell.style = headerStyle;
+          mc += 1;
+        });
+
+        worksheet.getRow(2).height = 28;
+        worksheet.getRow(3).height = 25;
       }
 
-      worksheet.getCell(2, 1).value = "";
-      worksheet.getCell(2, 2).value = "鍑洪櫌鐥呭尯";
-      worksheet.getCell(2, 3).value = "绉戝";
-      worksheet.getCell(2, 4).value = "鍑洪櫌浜烘";
-      worksheet.getCell(2, 5).value = "鏃犻渶闅忚浜烘";
-      worksheet.getCell(2, 6).value = "搴旈殢璁夸汉娆�";
-
-      worksheet.mergeCells(2, 7, 2, 16); // 浠�7鍚堝苟鍒�16锛堝師鏉ユ槸7-15锛�
-      worksheet.getCell(2, 7).value = serviceTypeName; // 鎴栭�傚綋鎴彇
-      worksheet.getCell(2, 7).style = headerStyle;
-
-      worksheet.getRow(2).height = 28;
-      worksheet.getRow(3).height = 25;
-
       // 鏁版嵁琛�
+      const dataStartRow = graded ? 5 : 4;
       this.tableData.forEach((item, rowIndex) => {
-        const dataRow = worksheet.addRow(
-          [
-            "",
-            item.leavehospitaldistrictname || "",
-            item.deptname || "",
-            item.dischargeCount || 0,
-            item.nonFollowUp || 0,
-            item.followUpNeeded || 0,
-            item.needFollowUp || 0,
-            item.pendingFollowUp || 0,
-            item.followUpSuccess || 0,
-            item.followUpFail || 0,
-            // 鎴愬姛鐜� - 闇�瑕佸姩鎬佽绠�
-            this.calculateSuccessRate(
-              item.followUpSuccess,
-              item.needFollowUp,
-              item.pendingFollowUp
-            ),
-            item.followUpRate || "0%", // 闅忚鐜�
-            item.rate ? (Number(item.rate) * 100).toFixed(2) + "%" : "0%", // 鍙婃椂鐜�
-            item.manual || 0,
-            item.voice || 0, // 璇煶
-            item.sms || 0, // 鐭俊
-            item.weChat || 0, // 寰俊
-          ],
-          rowIndex + 4
-        );
+        const rowValues = [
+          "",
+          item.leavehospitaldistrictname || "",
+          item.deptname || "",
+          item.dischargeCount || 0,
+          item.nonFollowUp || 0,
+          item.followUpNeeded || 0,
+          item.needFollowUp || 0,
+          item.pendingFollowUp || 0,
+          item.followUpSuccess || 0,
+          item.followUpFail || 0,
+          // 鎴愬姛鐜� - 闇�瑕佸姩鎬佽绠�
+          this.calculateSuccessRate(
+            item.followUpSuccess,
+            item.needFollowUp,
+            item.pendingFollowUp
+          ),
+          item.followUpRate || "0%", // 闅忚鐜�
+          item.rate ? (Number(item.rate) * 100).toFixed(2) + "%" : "0%", // 鍙婃椂鐜�
+        ];
+        methodGroups.forEach((g) => {
+          g.fields.forEach((field) => {
+            rowValues.push(item[field] || 0);
+          });
+        });
+
+        const dataRow = worksheet.addRow(rowValues, rowIndex + dataStartRow);
         dataRow.eachCell((cell) => {
           cell.style = cellStyle;
         });
@@ -1672,24 +2003,27 @@
       summaryRow.height = 28;
 
       // 鍒楀
-      worksheet.columns = [
-        { width: 8 },
-        { width: 20 },
-        { width: 15 },
-        { width: 12 },
-        { width: 12 },
-        { width: 12 },
-        { width: 10 },
-        { width: 10 },
-        { width: 10 },
-        { width: 10 },
-        { width: 12 }, // 鎴愬姛鐜�
-        { width: 12 }, // 闅忚鐜�
-        { width: 12 }, // 鍙婃椂鐜�
-        { width: 8 }, // 浜哄伐
-        { width: 8 }, // 璇煶
-        { width: 8 }, // 鐭俊
-        { width: 8 }, // 寰俊
+      const widths = [8, 20, 15, 12, 12, 12, 10, 10, 10, 10, 12, 12, 12];
+      methodGroups.forEach((g) => {
+        g.fields.forEach(() => widths.push(8));
+      });
+      worksheet.columns = widths.map((width) => ({ width }));
+    },
+    getMethodColumns() {
+      // 闅忚鏂瑰紡鍒楅厤缃細鐩爣鍖婚櫌鎸夆�滃彂閫佸畬鎴�/鏈�缁堝畬鎴愨�濆垎绾у睍绀�
+      if (this.isTargetHospital) {
+        return [
+          { label: "浜哄伐", fields: ["manual", "manualSuccess"], sub: ["鍙戦�佸畬鎴�", "鏈�缁堝畬鎴�"] },
+          { label: "璇煶", fields: ["voice", "voiceSuccess"], sub: ["鍙戦�佸畬鎴�", "鏈�缁堝畬鎴�"] },
+          { label: "鐭俊", fields: ["sms", "smsSuccess"], sub: ["鍙戦�佸畬鎴�", "鏈�缁堝畬鎴�"] },
+          { label: "寰俊", fields: ["weChat", "weChatSuccess"], sub: ["鍙戦�佸畬鎴�", "鏈�缁堝畬鎴�"] },
+        ];
+      }
+      return [
+        { label: "浜哄伐", fields: ["manual"], sub: ["浜哄伐"] },
+        { label: "璇煶", fields: ["voice"], sub: ["璇煶"] },
+        { label: "鐭俊", fields: ["sms"], sub: ["鐭俊"] },
+        { label: "寰俊", fields: ["weChat"], sub: ["寰俊"] },
       ];
     },
 
@@ -1708,11 +2042,14 @@
         "0%", // 10: 鎴愬姛鐜�
         "0%", // 11: 闅忚鐜�
         "0%", // 12: 鍙婃椂鐜�
-        0, // 13: manual
-        0, // 14: voice
-        0, // 15: sms
-        0, // 16: weChat
       ];
+
+      const methodFields = this.getMethodColumns().reduce(
+        (arr, g) => arr.concat(g.fields),
+        []
+      );
+      const methodStartIndex = 13;
+      methodFields.forEach(() => summaries.push(0));
 
       this.tableData.forEach((item) => {
         summaries[3] += Number(item.dischargeCount) || 0;
@@ -1722,10 +2059,9 @@
         summaries[7] += Number(item.pendingFollowUp) || 0;
         summaries[8] += Number(item.followUpSuccess) || 0;
         summaries[9] += Number(item.followUpFail) || 0;
-        summaries[13] += Number(item.manual) || 0;
-        summaries[14] += Number(item.voice) || 0;
-        summaries[15] += Number(item.sms) || 0;
-        summaries[16] += Number(item.weChat) || 0;
+        methodFields.forEach((field, i) => {
+          summaries[methodStartIndex + i] += Number(item[field]) || 0;
+        });
       });
 
       // 鎴愬姛鐜囪绠�
@@ -1764,7 +2100,10 @@
       }
 
       // 鏍煎紡鍖栨暟瀛�
-      [3, 4, 5, 6, 7, 8, 9, 13, 14, 15, 16].forEach((index) => {
+      const numericIndices = [3, 4, 5, 6, 7, 8, 9].concat(
+        methodFields.map((_, i) => methodStartIndex + i)
+      );
+      numericIndices.forEach((index) => {
         summaries[index] = this.formatNumber(summaries[index]);
       });
 
@@ -1784,23 +2123,45 @@
     selectTimelyRate(row, queryParams) {
       console.log(row, queryParams, 88);
 
-      // const params = {
-      //   ...this.patientqueryParams,
-      //   starttime: this.parseTime(dateRange[0]),
-      //   endtime: this.parseTime(dateRange[1]),
-      //   deptcode: row.deptcode,
-      // };
-      this.patientqueryParams.starttime = this.parseTime(
-        queryParams.dateRange[0]
-      );
-      this.patientqueryParams.endtime = this.parseTime(
-        queryParams.dateRange[1]
-      );
-      this.patientqueryParams.deptcode = row.deptcode;
-      console.log(1);
+      // 搴旈殢璁挎椂闂磋寖鍥�
+      if (queryParams.endTime) {
+        this.patientqueryParams.starttime = queryParams.startTime;
+        this.patientqueryParams.endtime = queryParams.endTime;
+      } else {
+        this.patientqueryParams.starttime = this.parseTime(
+          queryParams.dateRange[0]
+        );
+        this.patientqueryParams.endtime = this.parseTime(
+          queryParams.dateRange[1]
+        );
+      }
+      // 鍑洪櫌鏃堕棿鑼冨洿
+      if (queryParams.hospitalEndTime) {
+        this.patientqueryParams.hospitalStartTime =
+          queryParams.hospitalStartTime;
+        this.patientqueryParams.hospitalEndTime = queryParams.hospitalEndTime;
+      } else {
+        this.patientqueryParams.hospitalStartTime = this.parseTime(
+          queryParams.dateRangecy[0]
+        );
+        this.patientqueryParams.hospitalEndTime = this.parseTime(
+          queryParams.dateRangecy[1]
+        );
+      }
+      // 缁熻绫诲瀷锛氱梾鍖虹粺璁�(1)浼犵梾鍖篶ode锛岀瀹ょ粺璁�(2)浼犵瀹ode
+      if (queryParams.statisticaltype == 1) {
+        this.patientqueryParams.leavehospitaldistrictcode =
+          row.leavehospitaldistrictcode;
+        this.patientqueryParams.deptcode = null;
+      } else {
+        this.patientqueryParams.deptcode = row.deptcode;
+        this.patientqueryParams.leavehospitaldistrictcode = null;
+      }
 
       this.patientqueryParams.serviceTypes = queryParams.serviceType
-        ? queryParams.serviceType.join(",")
+        ? Array.isArray(queryParams.serviceType)
+          ? queryParams.serviceType.join(",")
+          : String(queryParams.serviceType)
         : null;
 
       return selectTimelyRate(this.patientqueryParams);

--
Gitblit v1.9.3