From b57c6c97c7de4cb5aeeb6c766a4642fac5b9b500 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 21 八月 2026 15:07:10 +0800
Subject: [PATCH] 测试完成
---
src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue | 81 +++++++++++++++++++++++++++++++++-------
1 files changed, 67 insertions(+), 14 deletions(-)
diff --git a/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue b/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue
index 8de4434..c1cee6a 100644
--- a/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue
+++ b/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue
@@ -206,6 +206,7 @@
</el-table-column>
<el-table-column
+ v-if="orgname == '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�'"
label="鍙婃椂鐜�"
align="center"
key="rate"
@@ -322,6 +323,7 @@
:row-data="currentRow"
:topicList="topiclist"
:query-params="queryParams"
+ :topType="2"
@close="topicVisible = false"
/>
</el-dialog>
@@ -352,7 +354,7 @@
statisticaltype: 1,
leavehospitaldistrictcodes: ["all"],
deptcodes: [],
- serviceType: [2],
+ serviceType: [],
dateRange: [],
pageNum: 1,
pageSize: 20,
@@ -371,7 +373,25 @@
flatArraydept: [],
// 鏈嶅姟绫诲瀷閫夐」
- options: [],
+ options: [
+ {
+ value: 6,
+ label: "浣忛櫌婊℃剰搴�",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+
+ {
+ value: 14,
+ label: "闂ㄨ瘖婊℃剰搴�",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ ],
// 琛ㄦ牸鏁版嵁
userList: [],
@@ -381,6 +401,7 @@
// 鍔犺浇鐘舵��
loading: false,
+ orgname: "",
// 閫変腑鐨勮
ids: [],
@@ -439,6 +460,8 @@
},
created() {
+ this.orgname = localStorage.getItem("orgname");
+
this.initData();
},
@@ -446,13 +469,13 @@
// 鍒濆鍖栨暟鎹�
async initData() {
await this.getDeptTree();
- await this.getList();
+ // await this.getList();
},
// 鑾峰彇绉戝鏍�
getDeptTree() {
// 鑾峰彇鏈嶅姟绫诲瀷
- this.options = this.$store.getters.tasktypes || [];
+ // this.options = this.$store.getters.tasktypes || [];
// 鑾峰彇绉戝鍒楄〃
this.flatArraydept = (this.$store.getters.belongDepts || []).map(
@@ -814,8 +837,7 @@
const response = await getSfStatisticsJoyInfo(params);
this.topiclist = response.data || [];
- this.topicVisible = true;
-
+ this.topicVisible = true;
} catch (error) {
console.error("鑾峰彇婊℃剰搴﹁鎯呭け璐�:", error);
this.$message.error("鑾峰彇璇︽儏澶辫触");
@@ -835,23 +857,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 +958,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