From 35509af3021b6e56f256b9f8771c1ce5564d7cde Mon Sep 17 00:00:00 2001
From: zhangchen <1652267879@qq.com>
Date: 星期五, 29 八月 2025 12:03:59 +0800
Subject: [PATCH] ID2023-四点血压图修改
---
src/views/mobile/bedsideAuxiliaryScreen/pages/SignedIn.vue | 42 ++++++++++++++++++++++++++++++++++--------
1 files changed, 34 insertions(+), 8 deletions(-)
diff --git a/src/views/mobile/bedsideAuxiliaryScreen/pages/SignedIn.vue b/src/views/mobile/bedsideAuxiliaryScreen/pages/SignedIn.vue
index fd40c78..da20c84 100644
--- a/src/views/mobile/bedsideAuxiliaryScreen/pages/SignedIn.vue
+++ b/src/views/mobile/bedsideAuxiliaryScreen/pages/SignedIn.vue
@@ -569,6 +569,8 @@
const cylinderY = chartHeight;
const cylinderRadius = 6;
const cylinderHeight = 计算脱水量刻度 * (datas?.[0]?.超滤总量 || 0);
+ const 体重增长_透前减干体重 = weightGain2.value;
+ const 透前减干体重减超滤总量差值 = 体重增长_透前减干体重 - (datas?.[0]?.超滤总量 || 0);
drawCylinder(
ctx,
@@ -580,7 +582,9 @@
cylinderHeight,
datas?.[0]?.超滤总量?.toString() ?? "0 L",
datas?.[0]?.脱水百分比 ?? 0,
- datas?.[0]?.透后体重减干体重的差值 ?? 0
+ datas?.[0]?.透后体重减干体重的差值 ?? 0,
+ 体重增长_透前减干体重,
+ 透前减干体重减超滤总量差值,
);
ctx.restore(); // 恢复
@@ -598,7 +602,9 @@
height: number,
超滤总量: string, // 超滤总量
脱水百分比: number, // 脱水百分比
- 透后体重减干体重的差值: number // 透后体重减干体重的差值
+ 透后体重减干体重的差值: number, // 透后体重减干体重的差值
+ 体重增长_透前减干体重: number, // 体重增长_透前减干体重
+ 透前减干体重减超滤总量差值: number, // 透前减干体重减超滤总量差值
) => {
ctx.beginPath();
ctx.arc(x, y + height, radius, 0, Math.PI * 2);
@@ -624,19 +630,39 @@
ctx.fill();
ctx.stroke();
+ const cylinderWidth = radius;
+ const textX = x + cylinderWidth + 20; // 文本位置在圆柱体右侧
+
const baseFontSize = 16;
// 添加文本说明
- ctx.font = `${baseFontSize * scale}px Arial`;
- ctx.textAlign = "center";
- ctx.fillStyle = "#409EFF";
- ctx.fillText(超滤总量, x, canvasHeight - height - 5); // 文本位于圆柱上方一点
- if (透后体重减干体重的差值 > 0) {
+ // 如果超滤总量 与 体重增长_透前减干体重 相等,则显示 "/超滤总量"
+ if (Number(超滤总量) && 体重增长_透前减干体重 === Number(超滤总量)) {
+ ctx.font = `${baseFontSize * scale}px Arial`;
+ ctx.textAlign = "center";
+ ctx.fillStyle = "#07c160";
+ ctx.fillText('/' + 超滤总量, textX, canvasHeight - height + height * 0.3 + 10);
+ } else {
+ // 透析前-干体重
+ ctx.font = `${baseFontSize * scale}px Arial`;
+ ctx.textAlign = "center";
+ ctx.fillStyle = "#409EFF";
+ ctx.fillText(体重增长_透前减干体重 + '', textX, canvasHeight - height + 10);
+ // 超滤总量
+ ctx.font = `${baseFontSize * scale}px Arial`;
+ ctx.textAlign = "center";
+ ctx.fillStyle = "#07c160";
+ ctx.fillText(超滤总量, textX, canvasHeight - height + height * 0.3 + 10);
+ }
+
+
+
+ if (透前减干体重减超滤总量差值 > 0) {
ctx.font = `${baseFontSize * scale}px Arial`;
ctx.textAlign = "center";
ctx.fillStyle = "#000000";
- ctx.fillText(透后体重减干体重的差值 + "", x, canvasHeight - 5); // 文本位于圆柱上方一点
+ ctx.fillText(透前减干体重减超滤总量差值 + "", textX, canvasHeight - 10); // 文本位于圆柱上方一点
}
};
onMounted(() => {
--
Gitblit v1.8.0