From ecfcfee4d3bb36be356a78a226f4de8ca23ff745 Mon Sep 17 00:00:00 2001
From: zhangchen <1652267879@qq.com>
Date: 星期一, 15 九月 2025 13:33:25 +0800
Subject: [PATCH] ID1766-暂存
---
src/api/patient_hemo_med_start/types/index.type.ts | 51 ++++++++
src/store/type/bedsideAuxiliaryScreen.type.ts | 11 +
src/views/mobile/bedsideAuxiliaryScreen/pages/SignedIn.vue | 80 ++++++++-----
src/api/patient_hemo_med_start/index.ts | 18 +++
src/views/mobile/bedsideAuxiliaryScreen/components/StartDialysis/index.vue | 188 +++++++++++++++++++++++++++++++
5 files changed, 318 insertions(+), 30 deletions(-)
diff --git a/src/api/patient_hemo_med_start/index.ts b/src/api/patient_hemo_med_start/index.ts
new file mode 100644
index 0000000..f7b80e4
--- /dev/null
+++ b/src/api/patient_hemo_med_start/index.ts
@@ -0,0 +1,18 @@
+import request from "@/utils/axios";
+import type { StartRecord } from "../patient_hemo_med_start/types/index.type";
+
+/**
+ * 获取开始透析数据api
+ * @param params `recordCode=${recordCode}`
+ * @returns
+ */
+export function addDefaultRowApi(params: string) :Promise<StartRecord> {
+ return request({
+ url: "/patient/hemo/med/start/addDefaultRow",
+ method: "post",
+ headers: {
+ "Content-Type": "application/x-www-form-urlencoded",
+ },
+ data: params,
+ });
+}
diff --git a/src/api/patient_hemo_med_start/types/index.type.ts b/src/api/patient_hemo_med_start/types/index.type.ts
new file mode 100644
index 0000000..e81314d
--- /dev/null
+++ b/src/api/patient_hemo_med_start/types/index.type.ts
@@ -0,0 +1,51 @@
+export interface StartRecord {
+ code: string;
+ createTime: string; // "2025-09-12 17:06:42"
+ createUser: string | null;
+ deletedTime: string | null;
+ doneByg: string;
+ doneBygName: string;
+ doneBygSpecName: string;
+ doneGl: string;
+ doneGlName: string;
+ doneGlSpecName: string;
+ id: number;
+ isDeleted: number;
+ monitorDataCode: string;
+ recordCode: string;
+ remark: string;
+ schemeName: string;
+ /** 穿刺方向 */
+ startCcASideDirection: string;
+ startCcNurse: string;
+ startCcNurseName: string;
+ /** 穿刺方式 */
+ startCcType: string;
+ startCcZhenA: string;
+ startCcZhenAName: string;
+ startCcZhenASpecName: string;
+ startCcZhenType: string;
+ startCcZhenV: string;
+ startCcZhenVName: string;
+ startCcZhenVSpecName: string;
+ startEntranceType: string;
+ startIsCcOrHy: number;
+ startIsSave: number;
+ startMedNurse: string;
+ startMedNurseName: string;
+ startTime: string | null;
+ startTxqNo: string;
+ startUpNurse: string;
+ startUpNurseName: string;
+ startUseHlb: string;
+ startUseHlbName: string;
+ startUseHlbSpecName: string;
+ startUseNsy: string;
+ startUseNsyName: string;
+ startUseNsySpecName: string;
+ startYcNurse: string;
+ startYcNurseName: string;
+ startYingxue: string;
+ updateTime: string; // "2025-09-12 17:06:42"
+ updateUser: string | null;
+}
diff --git a/src/store/type/bedsideAuxiliaryScreen.type.ts b/src/store/type/bedsideAuxiliaryScreen.type.ts
index de90df1..744f6b4 100644
--- a/src/store/type/bedsideAuxiliaryScreen.type.ts
+++ b/src/store/type/bedsideAuxiliaryScreen.type.ts
@@ -25,6 +25,7 @@
管路: string[];
透析器: string[];
透析模式: string[];
+ 透析单编号: string;
}
enum EPushType {
@@ -317,6 +318,7 @@
carePackage: any[];
punctureNeedle: PunctureNeedle[];
vascularAccess: VascularAccess[];
+ 透析单编号: string;
}
export const defaultconsumablesCollection = (): ConsumablesCollection => {
@@ -328,6 +330,7 @@
管路: [],
透析器: [],
透析模式: [],
+ 透析单编号: '',
};
};
@@ -341,6 +344,7 @@
carePackage: [], // 一次性使用透析护理包列表
punctureNeedle: [], // 穿刺针列表
vascularAccess: [], // 血管通路列表
+ 透析单编号: ''
};
};
@@ -375,6 +379,7 @@
体重增长_透前_上次透后: number | null; // 体重增长(透前-上次透后)
体重增持_透前_干体重: number | null; // 体重增长(透前-干体重)
四点血压图数据: 四点血压图数据[];
+ 透析单编号: string;
}
export const defaultSignedIn = (): SignedIn => {
@@ -409,6 +414,7 @@
体重增长_透前_上次透后: null, // 体重增长(透前-上次透后)
体重增持_透前_干体重: null, // 体重增长(透前-干体重)
四点血压图数据: [],
+ 透析单编号: '',
};
};
@@ -444,6 +450,7 @@
dialysisAge: number | null, // 透析龄
venousPressure2: number | null; // 静脉压
transmembranePressure2: number | null; // 跨膜压
+ 透析单编号: string;
}
export interface MonitoringRecord {
@@ -485,6 +492,7 @@
dialysisAge: null,
venousPressure2: null, // 静脉压
transmembranePressure2: null, // 跨膜压
+ 透析单编号: ''
};
};
@@ -589,6 +597,7 @@
notSignedIn.punctureNeedle = seeMsg.透析状态?.穿刺针列表 ?? [];
notSignedIn.vascularAccess = seeMsg.透析状态?.血管通路列表 ?? [];
notSignedIn.anticoagulant = seeMsg.透析状态?.抗凝剂列表 ?? [];
+ notSignedIn.透析单编号 = seeMsg.透析状态?.透析单编号;
result.notSignedIn = notSignedIn;
}
@@ -635,6 +644,7 @@
signedIn.上次透析单所属日期 = dayjs(signedIn.四点血压图数据[0].透析日期).format("YYYY-MM-DD");
// signedIn.本次透析单所属日期 = dayjs(signedIn.四点血压图数据[0].透析日期).format("YYYY-MM-DD");
}
+ signedIn.透析单编号 = seeMsg.透析状态?.透析单编号;
result.signedIn = signedIn;
}
// 剩下的全使用治疗中的页面
@@ -697,6 +707,7 @@
seeMsg.透析状态?.实时ktv计算结果列表
?.realTimeKtvCalcDetailResultInfo ?? [];
underTreatment.dialysisAge = seeMsg.透析状态?.透析龄 ?? null;
+ underTreatment.透析单编号 = seeMsg.透析状态?.透析单编号;
result.underTreatment = underTreatment;
}
diff --git a/src/views/mobile/bedsideAuxiliaryScreen/components/StartDialysis/index.vue b/src/views/mobile/bedsideAuxiliaryScreen/components/StartDialysis/index.vue
new file mode 100644
index 0000000..89b7705
--- /dev/null
+++ b/src/views/mobile/bedsideAuxiliaryScreen/components/StartDialysis/index.vue
@@ -0,0 +1,188 @@
+<template>
+ <div class="start-dialysis-container">
+ <el-dialog
+ v-model="show"
+ center
+ title="开始透析"
+ width="80%"
+ :show-close="false"
+ class="start-dialysis-dialog"
+ :destroy-on-close="true"
+ :close-on-click-modal="false"
+ >
+ <template #header>
+ <div class="start-dialysis-header">
+ <span class="header-title">开始透析</span>
+ <img
+ :src="closeImg"
+ class="header-close"
+ @click="handleCancel"
+ alt=""
+ />
+ </div>
+ </template>
+ <div class="start-dialysis-content" v-loading="loading">
+ <el-form></el-form>
+ </div>
+ <template #footer>
+ <div class="my-button cancel" @click="handleCancel">取消</div>
+ <div
+ class="my-button confirm"
+ :class="loading ? 'cancel' : ''"
+ @click="handleConfirm"
+ >
+ 确认
+ </div>
+ </template>
+ </el-dialog>
+ </div>
+</template>
+
+<script lang="ts">
+import { reactive, toRefs } from "vue";
+import closeImg from "@/img/close.png";
+import { addDefaultRowApi } from '@/api/patient_hemo_med_start/index';
+import type { StartRecord } from '@/api/patient_hemo_med_start/types/index.type';
+
+interface FormData extends Omit<StartRecord, 'startCcType' | 'startCcASideDirection'> {
+ /** 穿刺方式 */
+ startCcType: string[];
+ /** 穿刺方向 */
+ startCcASideDirection: string[];
+}
+
+
+interface State {
+ loading: boolean;
+ show: boolean;
+ formData: FormData | {};
+}
+export default {
+ name: "StartDialysis",
+ setup() {
+ const state = reactive<State>({
+ loading: false,
+ show: false,
+ formData: {}
+ });
+
+ const openDialog = () => {
+ state.show = true;
+ };
+
+ const getStartData = async () => {
+ const { data } = await addDefaultRowApi(`recordCode=`)
+
+ };
+
+ const handleCancel = () => {
+ state.show = false;
+ state.loading = false;
+ };
+
+ const handleConfirm = () => {};
+ return {
+ ...toRefs(state),
+ closeImg,
+ handleCancel,
+ openDialog,
+ handleConfirm,
+ };
+ },
+};
+</script>
+
+<style lang="less" scoped>
+.start-dialysis-container {
+ ::v-deep(.el-dialog) {
+ padding: 0;
+ border-radius: 6px;
+ overflow: hidden;
+ }
+ ::v-deep(.el-dialog__footer) {
+ padding: 4px;
+ }
+ ::v-deep(.el-upload-dragger) {
+ height: 65px;
+ padding: 0 !important;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ ::v-deep(.el-upload-dragger .el-icon--upload) {
+ display: none;
+ }
+ ::v-deep(.el-dialog__header) {
+ padding-bottom: 6px;
+ }
+ .start-dialysis-header {
+ position: relative;
+ height: 16px;
+ background: #769aff;
+ .header-title {
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translateX(-50%) translateY(-50%);
+ font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
+ font-weight: 500;
+ font-size: 8px;
+ color: #ffffff;
+ line-height: 11px;
+ text-align: center;
+ }
+ .header-close {
+ position: absolute;
+ top: 50%;
+ transform: translateY(-50%);
+ right: 6px;
+ width: 15px;
+ height: 15px;
+ transition: transform 0.2s;
+
+ &:active {
+ opacity: 0.6;
+ transform: translateY(-50%) scale(0.95);
+ }
+ }
+ }
+ .start-dialysis-content {
+ padding: 0 12px 0px 12px;
+ margin-bottom: 4px;
+ border-bottom: 1px solid #d8d8d8;
+ }
+ .my-button {
+ display: inline-block;
+ border-radius: 2px;
+ padding: 0px 10px;
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 500;
+ font-size: 7px;
+ color: #ffffff;
+ line-height: 16px;
+ letter-spacing: 1px;
+ text-align: center;
+ font-style: normal;
+ transition: transform 0.1s ease, opacity 0.1s ease;
+ cursor: pointer;
+ &:active {
+ transform: scale(0.95);
+ opacity: 0.8;
+ }
+
+ &:not(:first-child) {
+ margin-left: 6px;
+ }
+
+ &.confirm {
+ background: #769aff;
+ }
+ &.cancel {
+ background: #bbc6dd;
+ }
+ &.refresh {
+ background: #e6a23c;
+ }
+ }
+}
+</style>
\ No newline at end of file
diff --git a/src/views/mobile/bedsideAuxiliaryScreen/pages/SignedIn.vue b/src/views/mobile/bedsideAuxiliaryScreen/pages/SignedIn.vue
index 9e9d42f..4d13f31 100644
--- a/src/views/mobile/bedsideAuxiliaryScreen/pages/SignedIn.vue
+++ b/src/views/mobile/bedsideAuxiliaryScreen/pages/SignedIn.vue
@@ -251,7 +251,8 @@
<tr>
<td>体重增长</td>
<td class="flex-td">
- <span class="sub-text">(透前-干体重)</span><span class="text-right">{{ weightGain2 }}kg</span>
+ <span class="sub-text">(透前-干体重)</span
+ ><span class="text-right">{{ weightGain2 }}kg</span>
</td>
</tr>
<!-- <tr>
@@ -311,6 +312,8 @@
</div>
<!-- 定时任务 -->
<ScheduledTaskDialog ref="scheduledTaskDialogRef" />
+ <!-- 开始透析组件 -->
+ <StartDialysis ref="startDialysisRef" />
</div>
</template>
<script lang="ts" setup name="SignedIn">
@@ -348,6 +351,7 @@
const ScheduledTaskDialog = defineAsyncComponent(
() => import("../components/ScheduledTask.vue")
);
+const StartDialysis = defineAsyncComponent(() => import('../components/StartDialysis/index.vue'));
interface Props {
height: number;
@@ -358,7 +362,7 @@
const bloodPressureRectangularChart = ref<HTMLElement | null>(null);
const scheduledTaskDialogRef = ref<any>(null);
-
+const startDialysisRef = ref<any>(null);
const pageData = computed(() => {
return Object.assign(bedsideAuxiliaryScreenStore.deviceData.signedIn, {
@@ -416,12 +420,12 @@
return formattedValue;
});
-
watch(
() => pageData.value.四点血压图数据,
(newVal) => {
genderBloodPressureRectangularChart(newVal);
-});
+ }
+);
/** 点击定时任务 */
const onScheduledTasksClick = () => {
@@ -441,20 +445,27 @@
};
const onStartClick = () => {
- ElMessage({
- message: "功能开发中,敬请期待!",
- type: "warning",
- });
+ if (
+ !bedsideAuxiliaryScreenStore.deviceCode ||
+ !bedsideAuxiliaryScreenStore.deviceData.deviceCode
+ )
+ return ElMessage.warning("未初始化或正在进行初始化操作中");
+ if (!bedsideAuxiliaryScreenStore.userInfo?.token)
+ return ElMessage.warning("请登录");
+ startDialysisRef.value?.openDialog();
};
-const genderBloodPressureRectangularChart = (datas: 四点血压图数据[] | null) => {
+const genderBloodPressureRectangularChart = (
+ datas: 四点血压图数据[] | null
+) => {
if (!bloodPressureRectangularChart.value) return;
const benchmarkData = { width: 386, height: 280 };
// 获取容器宽高(90% 缩放)
const containerWidth = bloodPressureRectangularChart.value.offsetWidth * 0.9;
- const containerHeight = bloodPressureRectangularChart.value.offsetHeight * 0.9;
+ const containerHeight =
+ bloodPressureRectangularChart.value.offsetHeight * 0.9;
// 获取设备像素比
const dpr = window.devicePixelRatio || 1;
@@ -515,10 +526,22 @@
// ========== 血压数据 ==========
const measurements = [
- { systolic: datas?.[0]?.血压1_透前收缩压 ?? 0, diastolic: datas?.[0]?.血压1_透前舒张压 ?? 0 },
- { systolic: datas?.[0]?.血压2_前半程最低收缩压 ?? 0, diastolic: datas?.[0]?.血压2_前半程最低舒张压 ?? 0 },
- { systolic: datas?.[0]?.血压3_后半程最低收缩压 ?? 0, diastolic: datas?.[0]?.血压3_后半程最低舒张压 ?? 0 },
- { systolic: datas?.[0]?.血压4_透后收缩压 ?? 0, diastolic: datas?.[0]?.血压4_透后舒张压 ?? 0 },
+ {
+ systolic: datas?.[0]?.血压1_透前收缩压 ?? 0,
+ diastolic: datas?.[0]?.血压1_透前舒张压 ?? 0,
+ },
+ {
+ systolic: datas?.[0]?.血压2_前半程最低收缩压 ?? 0,
+ diastolic: datas?.[0]?.血压2_前半程最低舒张压 ?? 0,
+ },
+ {
+ systolic: datas?.[0]?.血压3_后半程最低收缩压 ?? 0,
+ diastolic: datas?.[0]?.血压3_后半程最低舒张压 ?? 0,
+ },
+ {
+ systolic: datas?.[0]?.血压4_透后收缩压 ?? 0,
+ diastolic: datas?.[0]?.血压4_透后舒张压 ?? 0,
+ },
];
const measurementWidth = chartWidth / (measurements.length + 1);
@@ -580,10 +603,7 @@
const cylinderHeight = 计算脱水量刻度 * (datas?.[0]?.超滤总量 || 0);
const 体重增长_透前减干体重 = weightGain2.value;
const 透前减干体重减超滤总量差值 =
- Math.round(
- (体重增长_透前减干体重 - (datas?.[0]?.超滤总量 || 0)) * 10
- ) / 10;
-
+ Math.round((体重增长_透前减干体重 - (datas?.[0]?.超滤总量 || 0)) * 10) / 10;
drawCylinder(
ctx,
@@ -597,13 +617,11 @@
datas?.[0]?.脱水百分比 ?? 0,
datas?.[0]?.透后体重减干体重的差值 ?? 0,
体重增长_透前减干体重,
- 透前减干体重减超滤总量差值,
+ 透前减干体重减超滤总量差值
);
ctx.restore(); // 恢复
};
-
-
const drawCylinder = (
ctx: CanvasRenderingContext2D,
@@ -617,7 +635,7 @@
脱水百分比: number, // 脱水百分比
透后体重减干体重的差值: number, // 透后体重减干体重的差值
体重增长_透前减干体重: number, // 体重增长_透前减干体重
- 透前减干体重减超滤总量差值: number, // 透前减干体重减超滤总量差值
+ 透前减干体重减超滤总量差值: number // 透前减干体重减超滤总量差值
) => {
ctx.beginPath();
ctx.arc(x, y + height, radius, 0, Math.PI * 2);
@@ -652,24 +670,26 @@
// 如果超滤总量 与 体重增长_透前减干体重 相等,则显示 "/超滤总量"
if (Number(超滤总量) && 体重增长_透前减干体重 === Number(超滤总量)) {
- ctx.font = `${baseFontSize * scale}px Arial`;
- ctx.textAlign = "center";
- ctx.fillStyle = "#07c160";
- ctx.fillText('/' + 超滤总量, textX, canvasHeight - height + height * 0.3 + 10);
+ 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.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`;
@@ -1095,7 +1115,7 @@
font-size: 3px;
color: #666;
margin-right: 1.2px;
- white-space: nowrap;
+ white-space: nowrap;
}
// .text-right {
// position: absolute;
--
Gitblit v1.8.0