| | |
| | | scope.row.followUpRate !== undefined |
| | | " |
| | | > |
| | | {{ formatPercent(scope.row.followUpRate) }} |
| | | {{ scope.row.followUpRate }} |
| | | </span> |
| | | <span v-else>-</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | v-if="orgname == '景宁畲族自治县人民医院'" |
| | | label="及时率" |
| | | align="center" |
| | | key="rate" |
| | |
| | | // 初始化数据 |
| | | async initData() { |
| | | await this.getDeptTree(); |
| | | await this.getList(); |
| | | // await this.getList(); |
| | | }, |
| | | |
| | | // 获取科室树 |
| | |
| | | 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; |
| | | |