From a9d2b856e0f6be6475319c2dc36bf405c2f908fc Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 22 九月 2026 14:04:52 +0800
Subject: [PATCH] 测试完成
---
src/views/sfstatistics/percentage/components/CombinedFollowUp.vue | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/views/sfstatistics/percentage/components/CombinedFollowUp.vue b/src/views/sfstatistics/percentage/components/CombinedFollowUp.vue
index fc3823c..540e2d0 100644
--- a/src/views/sfstatistics/percentage/components/CombinedFollowUp.vue
+++ b/src/views/sfstatistics/percentage/components/CombinedFollowUp.vue
@@ -582,6 +582,18 @@
},
// ===================== 瀵煎嚭 =====================
+ getServiceTypeLabel() {
+ const val = this.queryParams.serviceType;
+ if (val == null) return "";
+ const values = Array.isArray(val) ? val : [val];
+ const list =
+ this.options && this.options.length ? this.options : this.tasktypes;
+ const labels = values
+ .map((v) => (list.find((o) => o.value === v) || {}).label)
+ .filter(Boolean);
+ return labels.join("/");
+ },
+
async exportTable() {
try {
let dateRangeString = "";
@@ -603,7 +615,9 @@
dateRangeString = isLishuiHospital ? `${now.getFullYear()}骞�${now.getMonth() + 1}鏈坄 : `${now.getMonth() + 1}鏈坄;
}
- const excelName = `缁煎悎闅忚缁熻琛╛${dateRangeString}.xlsx`;
+ const serviceTypeLabel = this.getServiceTypeLabel();
+ const serviceTypeSuffix = serviceTypeLabel ? `_${serviceTypeLabel}` : "";
+ const excelName = `缁煎悎闅忚缁熻琛�${serviceTypeSuffix}_${dateRangeString}.xlsx`;
if (!this.tableData || this.tableData.length === 0) {
this.$message.warning("鏆傛棤鏁版嵁鍙鍑�");
return false;
@@ -611,7 +625,7 @@
const workbook = new ExcelJS.Workbook();
const worksheet = workbook.addWorksheet("缁煎悎缁熻");
- this.buildExportSheet(worksheet, dateRangeString);
+ this.buildExportSheet(worksheet, dateRangeString, serviceTypeSuffix);
const buffer = await workbook.xlsx.writeBuffer();
const blob = new Blob([buffer], {
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
@@ -626,7 +640,7 @@
}
},
- buildExportSheet(worksheet, dateRangeString) {
+ buildExportSheet(worksheet, dateRangeString, serviceTypeSuffix = "") {
// 瀹氫箟鏍峰紡
const titleStyle = {
font: { name: "寰蒋闆呴粦", size: 16, bold: true },
@@ -653,7 +667,7 @@
// 鏍囬琛�
worksheet.mergeCells(1, 1, 1, 20);
- worksheet.getCell(1, 1).value = `缁煎悎闅忚缁熻琛╛${dateRangeString}`;
+ worksheet.getCell(1, 1).value = `缁煎悎闅忚缁熻琛�${serviceTypeSuffix}_${dateRangeString}`;
worksheet.getCell(1, 1).style = titleStyle;
worksheet.getRow(1).height = 35;
--
Gitblit v1.9.3