From feb5a669dced68415bc7e32f237f77bf9842fe8b Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 03 六月 2026 17:42:18 +0800
Subject: [PATCH] 测试完成
---
src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue | 47 +++++++++++++++++++++++++++++++++++++++--------
1 files changed, 39 insertions(+), 8 deletions(-)
diff --git a/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue b/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue
index 20938e3..0c0dd0c 100644
--- a/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue
+++ b/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue
@@ -838,23 +838,54 @@
// 鏋勫缓鏃ユ湡鑼冨洿瀛楃涓�
let dateRangeString = "";
let sheetNameSuffix = "";
+ const isLishuiHospital = this.orgname == "涓芥按甯備腑鍖婚櫌";
if (
this.queryParams.dateRange &&
this.queryParams.dateRange.length === 2
) {
- const startDateFormatted = this.queryParams.dateRange[0];
- const endDateFormatted = this.queryParams.dateRange[1];
- dateRangeString = `${startDateFormatted}鑷�${endDateFormatted}`;
- sheetNameSuffix = `${startDateFormatted}鑷�${endDateFormatted}`;
+ const startDateStr = this.queryParams.dateRange[0];
+ const endDateStr = this.queryParams.dateRange[1];
+
+ if (isLishuiHospital) {
+ // 涓芥按甯備腑鍖婚櫌锛氬彧鏄剧ず骞存湀
+ const formatMonthOnly = (dateTimeStr) => {
+ const date = new Date(dateTimeStr);
+ const year = date.getFullYear();
+ const month = date.getMonth() + 1;
+ return `${year}骞�${month}鏈坄;
+ };
+ const startDateFormatted = formatMonthOnly(startDateStr);
+ const endDateFormatted = formatMonthOnly(endDateStr);
+ dateRangeString = `${startDateFormatted}鑷�${endDateFormatted}`;
+ sheetNameSuffix = `${startDateFormatted}鑷�${endDateFormatted}`;
+ } else {
+ // 鍏朵粬鍖婚櫌锛氭樉绀哄勾鏈堟棩
+ const formatDateForDisplay = (dateTimeStr) => {
+ return dateTimeStr.split(" ")[0];
+ };
+ const startDateFormatted = formatDateForDisplay(startDateStr);
+ const endDateFormatted = formatDateForDisplay(endDateStr);
+ dateRangeString = `${startDateFormatted}鑷�${endDateFormatted}`;
+ sheetNameSuffix = `${startDateFormatted}鑷�${endDateFormatted}`;
+ }
} else {
const now = new Date();
const currentMonth = now.getMonth() + 1;
- dateRangeString = `${currentMonth}鏈坄;
- sheetNameSuffix = `${currentMonth}鏈坄;
+ const currentYear = now.getFullYear();
+
+ if (isLishuiHospital) {
+ // 涓芥按甯備腑鍖婚櫌锛氭樉绀哄勾鏈�
+ dateRangeString = `${currentYear}骞�${currentMonth}鏈坄;
+ sheetNameSuffix = `${currentYear}骞�${currentMonth}鏈坄;
+ } else {
+ // 鍏朵粬鍖婚櫌锛氭樉绀烘湀浠�
+ dateRangeString = `${currentMonth}鏈坄;
+ sheetNameSuffix = `${currentMonth}鏈坄;
+ }
}
- const excelName = `闅忚缁熻琛╛${dateRangeString}.xlsx`;
+ const excelName = `婊℃剰搴﹂殢璁跨粺璁¤〃_${dateRangeString}.xlsx`;
const worksheetName = `闅忚缁熻_${sheetNameSuffix}`;
// 鍒涘缓Excel宸ヤ綔绨�
@@ -908,7 +939,7 @@
// 娣诲姞鎬绘爣棰�
worksheet.mergeCells(1, 1, 1, 10);
const titleCell = worksheet.getCell(1, 1);
- titleCell.value = `闅忚缁熻琛紙${sheetNameSuffix}锛塦;
+ titleCell.value = `婊℃剰搴﹂殢璁跨粺璁¤〃锛�${sheetNameSuffix}锛塦;
titleCell.style = titleStyle;
worksheet.getRow(1).height = 35;
--
Gitblit v1.9.3