| | |
| | | > |
| | | </el-col> |
| | | </el-form> |
| | | <div class="your-table-container"> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="userList" |
| | |
| | | @selection-change="handleSelectionChange" |
| | | @expand-change="handleRowClick" |
| | | :row-key="getRowKey" |
| | | show-summary |
| | | :summary-method="getSummaries" |
| | | :expand-row-keys="expands" |
| | | > |
| | | <!-- 展开行箭头列 --> |
| | |
| | | border |
| | | style="width: 95%; margin: 0 auto" |
| | | class="inner-table" |
| | | show-summary |
| | | :summary-method="getInnerSummaries" |
| | | > |
| | | <el-table-column |
| | | label="医生姓名" |
| | |
| | | type="text" |
| | | @click="Seedetails(scope.row)" |
| | | ><span class="button-zx" |
| | | >{{ (Number(scope.row.rate) * 100).toFixed(2) }}%</span |
| | | >{{ |
| | | (Number(scope.row.rate) * 100).toFixed(2) |
| | | }}%</span |
| | | ></el-button |
| | | > |
| | | </template> |
| | |
| | | > |
| | | </el-table-column> |
| | | </el-table-column> |
| | | <el-table-column v-if="orgname=='丽水市中医院'" align="center" label="随访情况"> |
| | | |
| | | <el-table-column |
| | | v-if="orgname == '丽水市中医院'" |
| | | align="center" |
| | | label="随访情况" |
| | | > |
| | | <el-table-column |
| | | label="正常语音" |
| | | align="center" |
| | |
| | | key="taskSituation1" |
| | | prop="taskSituation1" |
| | | > |
| | | </el-table-column><el-table-column |
| | | </el-table-column |
| | | ><el-table-column |
| | | label="患者拒接或拒访" |
| | | align="center" |
| | | width="100" |
| | | key="taskSituation2" |
| | | prop="taskSituation2" |
| | | > |
| | | </el-table-column><el-table-column |
| | | </el-table-column |
| | | ><el-table-column |
| | | label="面访或者接诊" |
| | | align="center" |
| | | width="100" |
| | | key="taskSituation3" |
| | | prop="taskSituation3" |
| | | > |
| | | </el-table-column><el-table-column |
| | | </el-table-column |
| | | ><el-table-column |
| | | label="微信随访" |
| | | align="center" |
| | | width="100" |
| | | key="taskSituation4" |
| | | prop="taskSituation4" |
| | | > |
| | | </el-table-column><el-table-column |
| | | </el-table-column |
| | | ><el-table-column |
| | | label="随访电话不正确" |
| | | align="center" |
| | | width="100" |
| | | key="taskSituation5" |
| | | prop="taskSituation5" |
| | | > |
| | | </el-table-column><el-table-column |
| | | </el-table-column |
| | | ><el-table-column |
| | | label="其他情况不宜随访" |
| | | align="center" |
| | | width="100" |
| | |
| | | </el-table-column> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | |
| | | <!-- <pagination |
| | | v-show="total > 0" |
| | |
| | | return { |
| | | topactiveName: "Local", //顶部选择 |
| | | activeName: "first", //侧边选择 |
| | | orgname:'', |
| | | orgname: "", |
| | | expands: [], |
| | | // 遮罩层 |
| | | loading: false, |
| | |
| | | this.getDeptTree(); |
| | | this.getList(); |
| | | this.orgname = localStorage.getItem("orgname"); |
| | | |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | } else { |
| | | this.expands = [this.getRowKey(row)]; |
| | | } |
| | | }, |
| | | getSummaries(param) { |
| | | const { columns, data } = param; |
| | | const sums = []; |
| | | |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = "合计"; |
| | | return; |
| | | } |
| | | if (index === 1||index === 2) { |
| | | sums[index] = "/"; |
| | | return; |
| | | } |
| | | |
| | | // 对百分比字段特殊处理 - 取平均值 |
| | | if ( |
| | | column.property === "followUpRate" || |
| | | column.property === "rate" || |
| | | column.property === "followUpRateAgain" |
| | | ) { |
| | | // 提取所有有效百分比值并转换为小数 |
| | | const percentageValues = data |
| | | .map((item) => { |
| | | const value = item[column.property]; |
| | | if (!value || value === "-" || value === "0%") return null; |
| | | |
| | | // 处理带百分号的数据 |
| | | if (typeof value === "string" && value.includes("%")) { |
| | | // 去除百分号并转换为小数 |
| | | const numValue = parseFloat(value.replace("%", "")) / 100; |
| | | return isNaN(numValue) ? null : numValue; |
| | | } else { |
| | | // 处理已经是小数的数据 |
| | | const numValue = parseFloat(value); |
| | | return isNaN(numValue) ? null : numValue; |
| | | } |
| | | }) |
| | | .filter((value) => value !== null && value !== 0); // 过滤掉null和0值 |
| | | |
| | | if (percentageValues.length > 0) { |
| | | const average = |
| | | percentageValues.reduce((sum, value) => sum + value, 0) / |
| | | percentageValues.length; |
| | | sums[index] = (average * 100).toFixed(2) + "%"; |
| | | } else { |
| | | sums[index] = "0.00%"; |
| | | } |
| | | } else { |
| | | // 普通数字字段 - 求和 |
| | | const values = data.map((item) => { |
| | | const value = item[column.property]; |
| | | if (value === "-" || value === "" || value === null) return 0; |
| | | return Number(value) || 0; |
| | | }); |
| | | |
| | | if (!values.every((value) => isNaN(value))) { |
| | | sums[index] = values.reduce((prev, curr) => prev + curr, 0); |
| | | sums[index] = this.formatNumber(sums[index]); |
| | | } else { |
| | | sums[index] = "-"; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | return sums; |
| | | }, |
| | | |
| | | // 内部表格合计行计算方法 |
| | | getInnerSummaries(param) { |
| | | const { columns, data } = param; |
| | | const sums = []; |
| | | |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = "小计"; |
| | | return; |
| | | } |
| | | |
| | | if (column.property === "drname" || column.property === "deptname") { |
| | | sums[index] = "-"; |
| | | return; |
| | | } |
| | | |
| | | // 对百分比字段特殊处理 - 取平均值 |
| | | if (column.property === "followUpRate" || column.property === "rate") { |
| | | // 提取所有有效百分比值并转换为小数 |
| | | const percentageValues = data |
| | | .map((item) => { |
| | | const value = item[column.property]; |
| | | if (!value || value === "-" || value === "0%") return null; |
| | | |
| | | // 处理带百分号的数据 |
| | | if (typeof value === "string" && value.includes("%")) { |
| | | // 去除百分号并转换为小数 |
| | | const numValue = parseFloat(value.replace("%", "")) / 100; |
| | | return isNaN(numValue) ? null : numValue; |
| | | } else { |
| | | // 处理已经是小数的数据 |
| | | const numValue = parseFloat(value); |
| | | return isNaN(numValue) ? null : numValue; |
| | | } |
| | | }) |
| | | .filter((value) => value !== null && value !== 0); |
| | | |
| | | if (percentageValues.length > 0) { |
| | | const average = |
| | | percentageValues.reduce((sum, value) => sum + value, 0) / |
| | | percentageValues.length; |
| | | sums[index] = (average * 100).toFixed(2) + "%"; |
| | | } else { |
| | | sums[index] = "0.00%"; |
| | | } |
| | | } else { |
| | | // 普通数字字段 - 求和 |
| | | const values = data.map((item) => { |
| | | const value = item[column.property]; |
| | | if (value === "-" || value === "" || value === null) return 0; |
| | | return Number(value) || 0; |
| | | }); |
| | | |
| | | if (!values.every((value) => isNaN(value))) { |
| | | sums[index] = values.reduce((prev, curr) => prev + curr, 0); |
| | | sums[index] = this.formatNumber(sums[index]); |
| | | } else { |
| | | sums[index] = "-"; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | return sums; |
| | | }, |
| | | |
| | | // 辅助方法:提取百分比数值 |
| | | extractPercentageValue(value) { |
| | | if (!value) return null; |
| | | |
| | | if (typeof value === "string") { |
| | | // 处理带百分号的字符串 |
| | | if (value.includes("%")) { |
| | | const num = parseFloat(value.replace("%", "")); |
| | | return isNaN(num) ? null : num / 100; |
| | | } |
| | | // 处理纯数字字符串 |
| | | const num = parseFloat(value); |
| | | return isNaN(num) ? null : num; |
| | | } |
| | | |
| | | // 处理数字类型 |
| | | return typeof value === "number" ? value : null; |
| | | }, |
| | | |
| | | // 数字格式化方法 |
| | | formatNumber(num) { |
| | | if (isNaN(num)) return "-"; |
| | | return Number.isInteger(num) ? num.toString() : num.toFixed(0); |
| | | }, |
| | | /** 修改标签 */ |
| | | handleUpdate(row) { |
| | |
| | | text: "随访状态分布", |
| | | left: "center", |
| | | textStyle: { |
| | | color: '#333', |
| | | fontSize: 16 |
| | | } |
| | | color: "#333", |
| | | fontSize: 16, |
| | | }, |
| | | }, |
| | | tooltip: { |
| | | trigger: "item", |
| | |
| | | left: "left", |
| | | data: ["待随访", "随访成功", "随访失败"], |
| | | textStyle: { |
| | | color: '#666' |
| | | } |
| | | color: "#666", |
| | | }, |
| | | color: ['#FF9D4D', '#36B37E', '#FF5C5C'], // 新的配色方案 |
| | | }, |
| | | color: ["#FF9D4D", "#36B37E", "#FF5C5C"], // 新的配色方案 |
| | | series: [ |
| | | { |
| | | name: "随访状态", |
| | |
| | | itemStyle: { |
| | | borderRadius: 10, |
| | | borderColor: "#fff", |
| | | borderWidth: 2 |
| | | borderWidth: 2, |
| | | }, |
| | | label: { |
| | | show: true, |
| | | formatter: "{b}: {c} ({d}%)", |
| | | color: '#333' |
| | | color: "#333", |
| | | }, |
| | | emphasis: { |
| | | label: { |
| | | show: true, |
| | | fontSize: "18", |
| | | fontWeight: "bold" |
| | | fontWeight: "bold", |
| | | }, |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | shadowColor: "rgba(0, 0, 0, 0.5)", |
| | | }, |
| | | }, |
| | | data: [ |
| | | { |
| | | value: followUpData.pending, |
| | | name: "待随访" |
| | | name: "待随访", |
| | | }, |
| | | { |
| | | value: followUpData.success, |
| | | name: "随访成功" |
| | | name: "随访成功", |
| | | }, |
| | | { |
| | | value: followUpData.fail, |
| | | name: "随访失败" |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | name: "随访失败", |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }; |
| | | |
| | | this.pieChart.setOption(pieOption); |
| | |
| | | ); |
| | | |
| | | // 新增两条折线数据 |
| | | const followUpRateData = this.userList.map(item => { |
| | | const followUpRateData = this.userList.map((item) => { |
| | | if (!item.followUpRate) return 0; |
| | | // 去掉百分号并转为数字 |
| | | const rateStr = String(item.followUpRate).replace('%', ''); |
| | | const rateStr = String(item.followUpRate).replace("%", ""); |
| | | return parseFloat(rateStr) || 0; |
| | | }); |
| | | |
| | | const timelyRateData = this.userList.map(item => |
| | | const timelyRateData = this.userList.map((item) => |
| | | item.rate ? (Number(item.rate) * 100).toFixed(2) : 0 |
| | | ); |
| | | |
| | |
| | | text: "科室/病区随访趋势", |
| | | left: "center", |
| | | textStyle: { |
| | | color: '#333', |
| | | fontSize: 16 |
| | | } |
| | | color: "#333", |
| | | fontSize: 16, |
| | | }, |
| | | }, |
| | | tooltip: { |
| | | trigger: "axis", |
| | |
| | | data: ["出院人次", "应随访人次", "随访率(%)", "及时率(%)"], |
| | | top: "bottom", |
| | | textStyle: { |
| | | color: '#666' |
| | | } |
| | | color: "#666", |
| | | }, |
| | | color: ['#5470C6', '#91CC75', '#EE6666', '#9A60B4'], // 新增紫色用于及时率 |
| | | }, |
| | | color: ["#5470C6", "#91CC75", "#EE6666", "#9A60B4"], // 新增紫色用于及时率 |
| | | xAxis: { |
| | | type: "category", |
| | | data: categories, |
| | | axisLabel: { |
| | | interval: 0, |
| | | rotate: 30, |
| | | color: '#666' |
| | | color: "#666", |
| | | }, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: '#ddd' |
| | | } |
| | | } |
| | | color: "#ddd", |
| | | }, |
| | | }, |
| | | }, |
| | | yAxis: [ |
| | | { |
| | |
| | | name: "人次", |
| | | min: 0, |
| | | axisLabel: { |
| | | color: '#666' |
| | | color: "#666", |
| | | }, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: '#ddd' |
| | | } |
| | | color: "#ddd", |
| | | }, |
| | | }, |
| | | splitLine: { |
| | | lineStyle: { |
| | | color: '#f0f0f0' |
| | | } |
| | | } |
| | | color: "#f0f0f0", |
| | | }, |
| | | }, |
| | | }, |
| | | { |
| | | type: "value", |
| | |
| | | min: 0, |
| | | max: 100, |
| | | axisLabel: { |
| | | color: '#666', |
| | | formatter: '{value}%' |
| | | color: "#666", |
| | | formatter: "{value}%", |
| | | }, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: '#ddd' |
| | | } |
| | | color: "#ddd", |
| | | }, |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | } |
| | | } |
| | | show: false, |
| | | }, |
| | | }, |
| | | ], |
| | | series: [ |
| | | { |
| | |
| | | barWidth: "25%", |
| | | data: dischargeData, |
| | | itemStyle: { |
| | | borderRadius: [4, 4, 0, 0] |
| | | } |
| | | borderRadius: [4, 4, 0, 0], |
| | | }, |
| | | }, |
| | | { |
| | | name: "应随访人次", |
| | |
| | | barWidth: "25%", |
| | | data: followUpData, |
| | | itemStyle: { |
| | | borderRadius: [4, 4, 0, 0] |
| | | } |
| | | borderRadius: [4, 4, 0, 0], |
| | | }, |
| | | }, |
| | | { |
| | | name: "随访率(%)", |
| | |
| | | data: followUpRateData, |
| | | symbolSize: 8, |
| | | lineStyle: { |
| | | width: 3 |
| | | width: 3, |
| | | }, |
| | | markLine: { |
| | | silent: true, |
| | | data: [{ |
| | | data: [ |
| | | { |
| | | yAxis: 80, |
| | | lineStyle: { |
| | | color: '#EE6666', |
| | | type: 'dashed' |
| | | color: "#EE6666", |
| | | type: "dashed", |
| | | }, |
| | | // label: { |
| | | // position: 'end', |
| | | // formatter: '目标80%' |
| | | // } |
| | | }] |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | { |
| | | name: "及时率(%)", |
| | |
| | | symbolSize: 8, |
| | | lineStyle: { |
| | | width: 3, |
| | | type: 'dotted' // 使用虚线区分 |
| | | type: "dotted", // 使用虚线区分 |
| | | }, |
| | | markLine: { |
| | | silent: true, |
| | | data: [{ |
| | | data: [ |
| | | { |
| | | yAxis: 90, |
| | | lineStyle: { |
| | | color: '#9A60B4', |
| | | type: 'dashed' |
| | | color: "#9A60B4", |
| | | type: "dashed", |
| | | }, |
| | | // label: { |
| | | // position: 'end', |
| | | // formatter: '目标90%' |
| | | // } |
| | | }] |
| | | } |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | ], |
| | | grid: { |
| | | top: '15%', |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '15%', |
| | | containLabel: true |
| | | } |
| | | top: "15%", |
| | | left: "3%", |
| | | right: "4%", |
| | | bottom: "15%", |
| | | containLabel: true, |
| | | }, |
| | | }; |
| | | |
| | | this.barLineChart.setOption(option); |
| | |
| | | text-align: left; |
| | | font-size: 20px; |
| | | } |
| | | // 美化合计行样式 |
| | | ::v-deep .el-table__footer { |
| | | .el-table__cell { |
| | | background-color: #f5f7fa; |
| | | font-weight: 600; |
| | | color: #409eff; |
| | | |
| | | .cell { |
| | | font-weight: 600; |
| | | color: #409eff; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 内部表格合计行样式 |
| | | ::v-deep .inner-table .el-table__footer { |
| | | .el-table__cell { |
| | | background-color: #ecf5ff; |
| | | font-weight: 500; |
| | | color: #67c23a; |
| | | |
| | | .cell { |
| | | font-weight: 500; |
| | | color: #67c23a; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 百分比字段特殊样式 |
| | | .your-table-container ::v-deep .el-table__footer .el-table__cell[data-field="followUpRate"] .cell, |
| | | .your-table-container ::v-deep .el-table__footer .el-table__cell[data-field="rate"] .cell, |
| | | .your-table-container ::v-deep .el-table__footer .el-table__cell[data-field="followUpRateAgain"] .cell { |
| | | color: #e6a23c !important; |
| | | font-weight: 700 !important; |
| | | } |
| | | |
| | | .leftvlue { |
| | | // display: flex; |