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/visitStatistics.vue | 51 ++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 42 insertions(+), 9 deletions(-)
diff --git a/src/views/Satisfaction/sfstatistics/components/visitStatistics.vue b/src/views/Satisfaction/sfstatistics/components/visitStatistics.vue
index 1b77e5a..ee25d7e 100644
--- a/src/views/Satisfaction/sfstatistics/components/visitStatistics.vue
+++ b/src/views/Satisfaction/sfstatistics/components/visitStatistics.vue
@@ -206,6 +206,7 @@
</el-table-column>
<el-table-column
+ v-if="orgname == '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�'"
label="鍙婃椂鐜�"
align="center"
key="rate"
@@ -446,7 +447,7 @@
// 鍒濆鍖栨暟鎹�
async initData() {
await this.getDeptTree();
- await this.getList();
+ // await this.getList();
},
// 鑾峰彇绉戝鏍�
@@ -836,22 +837,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宸ヤ綔绨�
@@ -905,7 +938,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