From a5cba9ab040f6f97558046885dce3017f9bab7e9 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 11 八月 2026 14:12:29 +0800
Subject: [PATCH] 提交
---
src/views/sfstatistics/percentage/components/FirstFollowUp.vue | 187 ++++++++++++++++++++++++++++++++++++----------
1 files changed, 146 insertions(+), 41 deletions(-)
diff --git a/src/views/sfstatistics/percentage/components/FirstFollowUp.vue b/src/views/sfstatistics/percentage/components/FirstFollowUp.vue
index b463732..d766ae3 100644
--- a/src/views/sfstatistics/percentage/components/FirstFollowUp.vue
+++ b/src/views/sfstatistics/percentage/components/FirstFollowUp.vue
@@ -231,11 +231,13 @@
</template>
</el-table-column>
<el-table-column
+ v-if="orgname != '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�'"
label="鎴愬姛鐜�"
align="center"
width="120"
key="successRate"
prop="successRate"
+ :render-header="Tooltipcgl"
>
<template slot-scope="scope">
<span class="success-rate">{{
@@ -253,6 +255,7 @@
width="120"
key="followUpRate"
prop="followUpRate"
+ :render-header="Tooltipsfl"
/>
<el-table-column
v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
@@ -261,6 +264,7 @@
width="120"
key="rate"
prop="rate"
+ :render-header="Tooltipjsl"
>
<template slot-scope="scope">
<el-button
@@ -275,7 +279,6 @@
</template>
</el-table-column>
<el-table-column
- v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
label="浜哄伐"
align="center"
key="manual"
@@ -299,7 +302,6 @@
</template>
</el-table-column>
<el-table-column
- v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
label="璇煶"
align="center"
key="voice"
@@ -323,7 +325,6 @@
</template>
</el-table-column>
<el-table-column
- v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
label="鐭俊"
align="center"
key="sms"
@@ -347,7 +348,6 @@
</template>
</el-table-column>
<el-table-column
- v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
label="寰俊"
align="center"
key="weChat"
@@ -542,11 +542,13 @@
</template>
</el-table-column>
<el-table-column
+ v-if="orgname != '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�'"
label="鎴愬姛鐜�"
align="center"
width="120"
key="successRate"
prop="successRate"
+ :render-header="Tooltipcgl"
>
<template slot-scope="scope">
<span class="success-rate">{{
@@ -564,6 +566,7 @@
width="120"
key="followUpRate"
prop="followUpRate"
+ :render-header="Tooltipsfl"
/>
<el-table-column
v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
@@ -572,6 +575,7 @@
width="120"
key="rate"
prop="rate"
+ :render-header="Tooltipjsl"
>
<template slot-scope="scope">
<el-button
@@ -586,7 +590,6 @@
</template>
</el-table-column>
<el-table-column
- v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
label="浜哄伐"
align="center"
key="manual"
@@ -604,13 +607,7 @@
</el-button>
</template>
</el-table-column>
- <el-table-column
- v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
- label="璇煶"
- align="center"
- key="voice"
- prop="voice"
- >
+ <el-table-column label="璇煶" align="center" key="voice" prop="voice">
<template slot-scope="scope">
<el-button
size="medium"
@@ -623,13 +620,7 @@
</el-button>
</template>
</el-table-column>
- <el-table-column
- v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
- label="鐭俊"
- align="center"
- key="sms"
- prop="sms"
- >
+ <el-table-column label="鐭俊" align="center" key="sms" prop="sms">
<template slot-scope="scope">
<el-button
size="medium"
@@ -641,7 +632,6 @@
</template>
</el-table-column>
<el-table-column
- v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
label="寰俊"
align="center"
key="weChat"
@@ -719,6 +709,7 @@
<script>
import { getSfStatisticsHyperlink } from "@/api/AiCentre/index";
+import store from "@/store";
import { getSfStatistics, selectTimelyRate } from "@/api/system/user";
import ExcelJS from "exceljs";
@@ -755,6 +746,7 @@
expands: [],
ids: [],
patientqueryParams: { pn: 1, ps: 10 },
+ tasktypes: store.getters.tasktypes,
};
},
methods: {
@@ -774,7 +766,7 @@
delete params.leavehospitaldistrictcodes.all;
delete params.deptcodes.all;
- params.rateDay = 7;
+ params.rateDay = this.orgname == "榫欐硥甯備汉姘戝尰闄�" ? 21 : 7;
getSfStatistics(params)
.then((response) => {
this.tableData = this.customSort(response.data);
@@ -879,7 +871,46 @@
return indexA - indexB;
});
},
-
+ Tooltipcgl(h, { column }) {
+ return h(
+ "el-tooltip",
+ {
+ props: {
+ content: "闅忚鎴愬姛/(闇�闅忚-寰呴殢璁�)",
+ placement: "top",
+ effect: "dark",
+ },
+ },
+ [h("span", column.label)]
+ );
+ },
+ Tooltipjsl(h, { column }) {
+ return h(
+ "el-tooltip",
+ {
+ props: {
+ content:
+ "(鍑洪櫌鏃堕棿+浠诲姟鍛ㄦ湡)灏忎簬瀹屾垚鏃堕棿鍗充负瓒呮椂;(闇�闅忚-瓒呮椂)/闇�闅忚",
+ placement: "top",
+ effect: "dark",
+ },
+ },
+ [h("span", column.label)]
+ );
+ },
+ Tooltipsfl(h, { column }) {
+ return h(
+ "el-tooltip",
+ {
+ props: {
+ content: "(闅忚鎴愬姛+棣栨闅忚澶辫触)/棣栨搴旈殢璁�",
+ placement: "top",
+ effect: "dark",
+ },
+ },
+ [h("span", column.label)]
+ );
+ },
sortChineseNumber(aRow, bRow) {
const a = aRow.leavehospitaldistrictname;
const b = bRow.leavehospitaldistrictname;
@@ -987,7 +1018,7 @@
if (!row.doctorStats) {
this.loading = true;
- params.rateDay = 7;
+ params.rateDay = this.orgname == "榫欐硥甯備汉姘戝尰闄�" ? 21 : 7;
getSfStatistics(params).then((res) => {
this.$set(row, "doctorStats", res.data);
@@ -1201,31 +1232,106 @@
let dateRangeString = "";
let sheetNameSuffix = "";
+ // 鍒ゆ柇鏄惁鏄附姘村競涓尰闄�
+ const isLishuiHospital = this.orgname == "涓芥按甯備腑鍖婚櫌";
+
if (
this.queryParams.dateRange &&
this.queryParams.dateRange.length === 2
) {
const startDateStr = this.queryParams.dateRange[0];
const endDateStr = this.queryParams.dateRange[1];
- const formatDateForDisplay = (dateTimeStr) => {
- return dateTimeStr.split(" ")[0];
- };
- const startDateFormatted = formatDateForDisplay(startDateStr);
- const endDateFormatted = formatDateForDisplay(endDateStr);
- dateRangeString = `${startDateFormatted}鑷�${endDateFormatted}`;
- sheetNameSuffix = `${startDateFormatted}鑷�${endDateFormatted}`;
+
+ 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 worksheetName = `棣栨闅忚缁熻_${sheetNameSuffix}`;
+ // 鏍规嵁 serviceType 鐢熸垚闅忚绫诲瀷鍚嶇О
+ let serviceTypeName = "棣栨鍑洪櫌闅忚"; // 鏂囦欢鍚嶄娇鐢ㄧ殑鍚嶇О
+ let sheetTypeName = "棣栨闅忚"; // 宸ヤ綔琛ㄤ娇鐢ㄧ殑鍚嶇О锛堢畝鍖栫増锛�
+
+ if (
+ this.queryParams.serviceType &&
+ Array.isArray(this.queryParams.serviceType) &&
+ this.queryParams.serviceType.length > 0
+ ) {
+ // 浣跨敤 props 涓殑 options锛堝嵆 tasktypes锛�
+ if (this.options && Array.isArray(this.options)) {
+ const matchedTypes = this.options.filter((task) =>
+ this.queryParams.serviceType.includes(task.value)
+ );
+ console.log(matchedTypes, "matchedTypes");
+
+ if (matchedTypes.length === 1) {
+ const label = matchedTypes[0].label;
+ serviceTypeName = `棣栨${label}`;
+ sheetTypeName = `棣栨${label}`;
+ } else if (matchedTypes.length > 1) {
+ const typeNames = matchedTypes.map((task) => task.label);
+ serviceTypeName = `棣栨${typeNames.join("/")}`;
+ // 宸ヤ綔琛ㄥ悕绠�鍖栵紙鍙栫涓�涓�+鈥滅瓑鈥濓級
+ sheetTypeName = `棣栨${typeNames[0]}绛塦;
+ } else if (this.queryParams.serviceType.length > 0) {
+ // 鏃犲尮閰嶆椂浣跨敤鍘熷鍊�
+ const typeStr = this.queryParams.serviceType.join("/");
+ serviceTypeName = `棣栨${typeStr}`;
+ sheetTypeName = "棣栨闅忚";
+ }
+ } else if (this.queryParams.serviceType.length > 0) {
+ const typeStr = this.queryParams.serviceType.join("/");
+ serviceTypeName = `棣栨${typeStr}`;
+ sheetTypeName = "棣栨闅忚";
+ }
+ }
+
+ const excelName = `${serviceTypeName}缁熻琛╛${dateRangeString}.xlsx`;
+
+ // 娓呯悊宸ヤ綔琛ㄥ悕绉帮紝绉婚櫎闈炴硶瀛楃
+ const cleanSheetName = (name) => {
+ // Excel宸ヤ綔琛ㄥ悕涓嶈兘鍖呭惈鐨勫瓧绗�: * ? : \ / [ ]
+ return name.replace(/[*?:\\/[\]]/g, " ");
+ };
+
+ const worksheetName = cleanSheetName(
+ `${sheetTypeName}缁熻_${sheetNameSuffix}`
+ );
if (!this.tableData || this.tableData.length === 0) {
- this.$message.warning("鏆傛棤棣栨闅忚鏁版嵁鍙鍑�");
+ this.$message.warning(`鏆傛棤${serviceTypeName}鏁版嵁鍙鍑篳);
return false;
}
@@ -1233,7 +1339,7 @@
const worksheet = workbook.addWorksheet(worksheetName);
// 鏋勫缓琛ㄦ牸
- this.buildExportSheet(worksheet, sheetNameSuffix);
+ this.buildExportSheet(worksheet, sheetNameSuffix, serviceTypeName);
const buffer = await workbook.xlsx.writeBuffer();
const blob = new Blob([buffer], {
@@ -1462,7 +1568,7 @@
return sums;
},
- buildExportSheet(worksheet, sheetNameSuffix) {
+ buildExportSheet(worksheet, sheetNameSuffix, serviceTypeName) {
const titleStyle = {
font: {
name: "寰蒋闆呴粦",
@@ -1536,11 +1642,11 @@
right: { style: "thin", color: { argb: "FFD0D0D0" } },
},
};
-
+ const titleText = `${serviceTypeName}缁熻琛╛${sheetNameSuffix}`;
// 娣诲姞鏍囬琛�
worksheet.mergeCells(1, 1, 1, 16);
const titleCell = worksheet.getCell(1, 1);
- titleCell.value = `棣栨鍑洪櫌闅忚缁熻琛╛${sheetNameSuffix}`;
+ titleCell.value = titleText; // 浣跨敤鍔ㄦ�佹爣棰�
titleCell.style = titleStyle;
worksheet.getRow(1).height = 35;
@@ -1586,7 +1692,7 @@
worksheet.getCell(2, 6).value = "搴旈殢璁夸汉娆�";
worksheet.mergeCells(2, 7, 2, 16); // 浠�7鍚堝苟鍒�16锛堝師鏉ユ槸7-15锛�
- worksheet.getCell(2, 7).value = "棣栨鍑洪櫌闅忚";
+ worksheet.getCell(2, 7).value = serviceTypeName; // 鎴栭�傚綋鎴彇
worksheet.getCell(2, 7).style = headerStyle;
worksheet.getRow(2).height = 28;
@@ -1769,7 +1875,6 @@
this.patientqueryParams.serviceTypes = queryParams.serviceType
? queryParams.serviceType.join(",")
: null;
- console.log(2);
return selectTimelyRate(this.patientqueryParams);
},
--
Gitblit v1.9.3