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/visitStatistics.vue | 63 ++++++++++++++++---------------
1 files changed, 33 insertions(+), 30 deletions(-)
diff --git a/src/views/Satisfaction/sfstatistics/components/visitStatistics.vue b/src/views/Satisfaction/sfstatistics/components/visitStatistics.vue
index 2c7ed98..f2439a7 100644
--- a/src/views/Satisfaction/sfstatistics/components/visitStatistics.vue
+++ b/src/views/Satisfaction/sfstatistics/components/visitStatistics.vue
@@ -936,25 +936,27 @@
},
};
- // 娣诲姞鎬绘爣棰�
- worksheet.mergeCells(1, 1, 1, 10);
- const titleCell = worksheet.getCell(1, 1);
- titleCell.value = `澶嶈瘖閫氱煡缁熻琛紙${sheetNameSuffix}锛塦;
- titleCell.style = titleStyle;
- worksheet.getRow(1).height = 35;
-
- // 娣诲姞琛ㄥご
+ // 琛ㄥご鎸夐〉闈㈠垪鍔ㄦ�佺敓鎴愶細銆屽強鏃剁巼銆嶅彧鏈夋櫙瀹侀櫌鍖洪〉闈㈡墠鏄剧ず
+ const showTimelyRate = this.orgname === "鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�";
const headers = [
this.queryParams.statisticaltype == 1 ? "鍑洪櫌鐥呭尯" : "绉戝",
"鍑洪櫌浜烘",
"鏃犻渶闅忚浜烘",
"搴旈殢璁夸汉娆�",
"闅忚鐜�",
- "鍙婃椂鐜�",
- "澶嶈瘖閫氱煡棰樼洰鎬婚噺",
- "澶嶈瘖閫氱煡濉姤閲�",
- "瀹屾垚姣旂巼",
];
+ 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) => {
@@ -962,21 +964,30 @@
});
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 = [
this.queryParams.statisticaltype == 1
? item.leavehospitaldistrictname
: item.deptname,
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;
@@ -984,18 +995,10 @@
dataRow.height = 22;
});
- // 璁剧疆鍒楀
- worksheet.columns = [
- { 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 === 0 ? 20 : h.length > 6 ? 15 : 12,
+ }));
// 鐢熸垚骞朵笅杞芥枃浠�
const buffer = await workbook.xlsx.writeBuffer();
--
Gitblit v1.9.3