| | |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | v-if="orgname == '景宁畲族自治县人民医院'" |
| | | label="及时率" |
| | | align="center" |
| | | key="rate" |
| | |
| | | |
| | | // 加载状态 |
| | | loading: false, |
| | | orgname: "", |
| | | |
| | | // 选中的行 |
| | | ids: [], |
| | |
| | | }, |
| | | |
| | | created() { |
| | | this.orgname = localStorage.getItem("orgname"); |
| | | |
| | | this.initData(); |
| | | }, |
| | | |
| | |
| | | // 初始化数据 |
| | | async initData() { |
| | | await this.getDeptTree(); |
| | | await this.getList(); |
| | | // await this.getList(); |
| | | }, |
| | | |
| | | // 获取科室树 |
| | |
| | | |
| | | const response = await getSfStatisticsJoyInfo(params); |
| | | this.topiclist = response.data || []; |
| | | this.topicVisible = true; |
| | | |
| | | this.topicVisible = true; |
| | | } catch (error) { |
| | | console.error("获取满意度详情失败:", error); |
| | | this.$message.error("获取详情失败"); |
| | |
| | | // 构建日期范围字符串 |
| | | 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工作簿 |
| | |
| | | // 添加总标题 |
| | | 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; |
| | | |