From 0db50921e776525ac6d35fe50e64c605b6be1374 Mon Sep 17 00:00:00 2001
From: zhangchen <1652267879@qq.com>
Date: 星期四, 04 九月 2025 14:59:11 +0800
Subject: [PATCH] Merge branch 'ID1766-添加推送登录功能' into test
---
src/views/mobile/bedsideAuxiliaryScreen/pages/SignedIn.vue | 94 +++++++++++++++++++++++++++++++++++-----------
1 files changed, 71 insertions(+), 23 deletions(-)
diff --git a/src/views/mobile/bedsideAuxiliaryScreen/pages/SignedIn.vue b/src/views/mobile/bedsideAuxiliaryScreen/pages/SignedIn.vue
index b95dabf..a30da51 100644
--- a/src/views/mobile/bedsideAuxiliaryScreen/pages/SignedIn.vue
+++ b/src/views/mobile/bedsideAuxiliaryScreen/pages/SignedIn.vue
@@ -14,7 +14,7 @@
<div class="col row1-col2">
<Card
title="治疗模式"
- :icon="zlmsImg"
+ :icon="tslImg"
background-color="#ffffff"
class="mini-card row1-col2-row1"
header-class-name="mihi-header"
@@ -44,7 +44,7 @@
<div class="col row1-col3">
<Card
title="置换总量"
- :icon="zlmsImg"
+ :icon="zlztImg"
background-color="#ffffff"
class="mini-card row1-col3-row1"
header-class-name="mihi-header"
@@ -55,7 +55,7 @@
</Card>
<Card
title="透析时长"
- :icon="zlmsImg"
+ :icon="cljdImg"
background-color="#ffffff"
class="mini-card row1-col3-row2"
header-class-name="mihi-header"
@@ -68,7 +68,7 @@
<div class="col row1-col4">
<Card
title="透析器"
- :icon="zlmsImg"
+ :icon="txqImg"
background-color="#ffffff"
class="mini-card row1-col4-row1"
header-class-name="mihi-header"
@@ -79,7 +79,7 @@
</Card>
<Card
title="抗凝剂"
- :icon="zlmsImg"
+ :icon="tslImg"
background-color="#ffffff"
class="mini-card row1-col4-row2"
header-class-name="mihi-header"
@@ -139,7 +139,7 @@
</Card>
<Card
title="处方备注"
- :icon="zlmsImg"
+ :icon="maibo2Img"
background-color="#ffffff"
class="mini-card row1-col5-row2"
header-class-name="mihi-header"
@@ -155,7 +155,7 @@
<div class="row2-col1-row1">
<Card
title="处方血流量"
- :icon="zlmsImg"
+ :icon="cljdImg"
background-color="#ffffff"
class="mini-card row2-col1-row1-col1"
header-class-name="mihi-header"
@@ -166,7 +166,7 @@
</Card>
<Card
title="处方钠"
- :icon="zlmsImg"
+ :icon="cljdImg"
background-color="#ffffff"
class="mini-card row2-col1-row1-col2"
header-class-name="mihi-header"
@@ -179,7 +179,7 @@
<div class="row2-col1-row2">
<Card
title="透析液流量"
- :icon="zlmsImg"
+ :icon="cljdImg"
background-color="#ffffff"
class="mini-card row2-col1-row2-col1"
header-class-name="mihi-header"
@@ -190,7 +190,7 @@
</Card>
<Card
title="透析液种类"
- :icon="zlmsImg"
+ :icon="cljdImg"
background-color="#ffffff"
class="mini-card row2-col1-row2-col2"
header-class-name="mihi-header"
@@ -203,7 +203,7 @@
</div>
<Card
title="治疗状态"
- :icon="zlmsImg"
+ :icon="zlztImg"
background-color="#ffffff"
class="mini-card row2-col1-row3"
header-class-name="mihi-header"
@@ -216,7 +216,7 @@
<div class="col row2-col2">
<Card
title="参考指标"
- :icon="zlmsImg"
+ :icon="tizhongImg"
background-color="#ffffff"
class="reference-indicators"
header-class-name="mihi-header"
@@ -307,10 +307,12 @@
class="btn"
/>
</div>
+ <!-- 定时任务 -->
+ <ScheduledTaskDialog ref="scheduledTaskDialogRef" />
</div>
</template>
<script lang="ts" setup name="SignedIn">
-import { computed, onMounted, ref } from "vue";
+import { computed, defineAsyncComponent, onMounted, ref, watch } from "vue";
import dayjs from "dayjs";
import "dayjs/locale/zh-cn";
dayjs.locale("zh-cn");
@@ -330,6 +332,7 @@
import txqImg from "@/img/txq.png";
import tizhongImg from "@/img/tizhong.png";
import yizhuImg from "@/img/yizhu.png";
+import maibo2Img from "@/img/maibo2.png";
import {
getItemName,
@@ -339,7 +342,10 @@
} from "@/store/type/bedsideAuxiliaryScreen.type";
// @ts-ignore
import BlockBotttom from "../components/BlockBotttom.vue";
-import { ElMessage } from "element-plus/es";
+import { ElMessage } from "element-plus";
+const ScheduledTaskDialog = defineAsyncComponent(
+ () => import("../components/ScheduledTask.vue")
+);
interface Props {
height: number;
@@ -349,6 +355,8 @@
const bedsideAuxiliaryScreenStore = useBedsideAuxiliaryScreenStore();
const bloodPressureRectangularChart = ref<HTMLElement | null>(null);
+const scheduledTaskDialogRef = ref<any>(null);
+
const pageData = computed(() => {
return Object.assign(bedsideAuxiliaryScreenStore.deviceData.signedIn, {
@@ -406,8 +414,22 @@
return formattedValue;
});
+
+watch(
+ () => pageData.value.四点血压图数据,
+ (newVal) => {
+ genderBloodPressureRectangularChart(newVal);
+});
+
/** 点击定时任务 */
-const onScheduledTasksClick = () => {};
+const onScheduledTasksClick = () => {
+ if (
+ !bedsideAuxiliaryScreenStore.deviceCode ||
+ !bedsideAuxiliaryScreenStore.deviceData.deviceCode
+ )
+ return ElMessage.warning("未初始化或正在进行初始化操作中");
+ scheduledTaskDialogRef.value?.openDialog();
+};
const onCallBumberClick = () => {
ElMessage({
@@ -554,6 +576,8 @@
const cylinderY = chartHeight;
const cylinderRadius = 6;
const cylinderHeight = 计算脱水量刻度 * (datas?.[0]?.超滤总量 || 0);
+ const 体重增长_透前减干体重 = weightGain2.value;
+ const 透前减干体重减超滤总量差值 = 体重增长_透前减干体重 - (datas?.[0]?.超滤总量 || 0);
drawCylinder(
ctx,
@@ -565,7 +589,9 @@
cylinderHeight,
datas?.[0]?.超滤总量?.toString() ?? "0 L",
datas?.[0]?.脱水百分比 ?? 0,
- datas?.[0]?.透后体重减干体重的差值 ?? 0
+ datas?.[0]?.透后体重减干体重的差值 ?? 0,
+ 体重增长_透前减干体重,
+ 透前减干体重减超滤总量差值,
);
ctx.restore(); // 恢复
@@ -583,7 +609,9 @@
height: number,
超滤总量: string, // 超滤总量
脱水百分比: number, // 脱水百分比
- 透后体重减干体重的差值: number // 透后体重减干体重的差值
+ 透后体重减干体重的差值: number, // 透后体重减干体重的差值
+ 体重增长_透前减干体重: number, // 体重增长_透前减干体重
+ 透前减干体重减超滤总量差值: number, // 透前减干体重减超滤总量差值
) => {
ctx.beginPath();
ctx.arc(x, y + height, radius, 0, Math.PI * 2);
@@ -609,19 +637,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