From a7fb2f5eab3e548f040004c1019f1c994eb91ad4 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 09 十二月 2025 14:44:36 +0800
Subject: [PATCH] 日常更新
---
src/views/home/index.vue | 136 ++++++++++++++++++++++++---------------------
src/samples/deviceApi/M503.ts | 4 +
src/samples/sockteStomp.ts | 1
src/views/home/index3.vue | 2
src/samples/deviceApi/oumulong-HBP-9030.ts | 18 +++---
chenyc.ps | 4
electron/main/index.ts | 2
src/router/index.ts | 2
8 files changed, 90 insertions(+), 79 deletions(-)
diff --git a/chenyc.ps b/chenyc.ps
index 25c6bd7..a3431c7 100644
--- a/chenyc.ps
+++ b/chenyc.ps
@@ -2,8 +2,8 @@
# 设置变量
user="chenyc"
-start_date="2024-01-01T00:00:00"
-end_date="2024-12-30T23:59:59"
+start_date="2025-01-01T00:00:00"
+end_date="2025-12-30T23:59:59"
# 检查当前目录是否是Git仓库
if ! git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
diff --git a/electron/main/index.ts b/electron/main/index.ts
index 49f13d8..7824ec9 100644
--- a/electron/main/index.ts
+++ b/electron/main/index.ts
@@ -67,7 +67,7 @@
fullscreen: true,// 开启默认全屏
kiosk: true,
movable:false,// 关闭窗口移动
-
+ resizable: false, // 禁止调整窗口大小
// autoHideMenuBar:store.get('debug'),
webPreferences: {
preload: splash,
diff --git a/src/router/index.ts b/src/router/index.ts
index a8e6d7d..64878ab 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -5,7 +5,7 @@
const routes: Array<RouteRecordRaw> = [
{ path: '/', name: 'Home', component: () => import('@/views/home/index.vue')},
- // { path: '/', name: 'Home', component: () => import('@/views/home/index2.vue')},
+ // { path: '/', name: 'Home', component: () => import('@/views/home/index3.vue')},
// { path: '/', name: 'login', component: () => import('@/views/login/index.vue')},
]
diff --git a/src/samples/deviceApi/M503.ts b/src/samples/deviceApi/M503.ts
index 28af862..05fc0fa 100644
--- a/src/samples/deviceApi/M503.ts
+++ b/src/samples/deviceApi/M503.ts
@@ -71,7 +71,7 @@
}, RECONNECT_INTERVAL);
}else{
reconnectAttempts=0
- ipcRenderer.invoke('logger', 'M503体重秤端口打开成功')
+ ipcRenderer.invoke('logger', 'M503体重秤端口打开成功'+path)
ElMessage({
message: 'M503体重秤端口打开成功',
type: 'success',
@@ -95,11 +95,13 @@
//
// 55 53 2C 47 53 20 20 20 20 31 33 30 2E 35 6B 67 0D 0A 135
// 53 54 2C 47 53 20 20 20 31 33 39 2E 39 6B 67 0D 0A ST,GS 139.9kg
+ //53 54 2C 4E 54 20 20 20 20 20 30 2E 30 6B 67
// 55 53 2C 47 53 20 20 20 20 36 30 2E 35 6B 67 0D 0A HEX
const parser = serialport.pipe(new DelimiterParser({ delimiter:Buffer.from([13,10]),includeDelimiter:true }))
parser.on('data', (value: string | any[])=>{
const str=value.toString()
const list=str.split(' ')
+ ipcRenderer.invoke('logger', 'M503体重秤数据接收!'+str)
console.log('解析体重数值',list)
if(list.length>=4&&list[0].search('ST,GS')!==-1){
const re=list[list.length-1].trim()
diff --git a/src/samples/deviceApi/oumulong-HBP-9030.ts b/src/samples/deviceApi/oumulong-HBP-9030.ts
index ecfff8c..b5654de 100644
--- a/src/samples/deviceApi/oumulong-HBP-9030.ts
+++ b/src/samples/deviceApi/oumulong-HBP-9030.ts
@@ -71,9 +71,9 @@
}, RECONNECT_INTERVAL);
}else{
reconnectAttempts=0
- ipcRenderer.invoke('logger', '血压计端口打开成功')
+ ipcRenderer.invoke('logger', '血压计端33333口打开成功')
ElMessage.success({
- message: '血压计端口打开成功',
+ message: '血压计端口打开成功9030',
type: 'success',
})
}
@@ -88,14 +88,14 @@
console.log(err)
})
// 解析分割数据流
- const parser = serialPort.pipe(new ByteLengthParser({ length: 14*4-1 }))
- parser.on('data', (value: string | any[])=>{
- console.log(value.toString())
+ const parser = serialPort.pipe(new DelimiterParser({ delimiter: '\n' }))
+ parser.on('data', (buffer:any)=>{
+ console.log(buffer.toString())
ipcRenderer.invoke('logger', '串口消息')
- ipcRenderer.invoke('logger', value)
- ipcRenderer.invoke('logger', value.toString())
- const str=value.toString()
- const list=str.split(',')
+ ipcRenderer.invoke('logger', buffer)
+ ipcRenderer.invoke('logger', buffer.toString())
+ const text = buffer.toString('ascii').trim() // 自动去掉 \r
+ const list=text.split(',')
console.log(list)
if(list.length===11){
sockteStore().setxyjSockte(
diff --git a/src/samples/sockteStomp.ts b/src/samples/sockteStomp.ts
index d7364d7..d867d75 100644
--- a/src/samples/sockteStomp.ts
+++ b/src/samples/sockteStomp.ts
@@ -89,6 +89,7 @@
patientAvatarIcon:resultInfo.patientInfo===null?'':resultInfo.patientInfo.patientAvatarIcon,
deviceCode:resultInfo.deviceCode===null?"":resultInfo.deviceCode,
patientGender:resultInfo.patientInfo.patientGender,
+ patientGenderText:resultInfo.patientInfo.patientGenderText,
hemoCode:resultInfo.hemoCode===null?"":resultInfo.hemoCode,
pureWeight:resultInfo.pureWeight===null?"":resultInfo.pureWeight,
datetime:da,
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 842ec92..fb0485c 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="homeclass">
- <!-- 标头 -->
+ <!-- 标头 新ui-->
<div style="height: 8%; padding-top: 20px">
<el-row>
<el-col :span="12">
@@ -38,7 +38,7 @@
/>
</el-col>
<el-col v-else :span="12">
- <div class="dateclas" style="float: right; margin-top: 20px">
+ <div class="dateclas" style="float: right; margin-top: 6px">
<div class="dateTimeclas" style="float: right">{{ clockNum }}S</div>
{{ datetext }}
</div>
@@ -47,7 +47,10 @@
</div>
<!-- 识别后需要显示的内容 -->
- <div v-if="!dialogVisible" style="height: 86%; padding-left: 20px">
+ <div
+ v-if="!dialogVisible"
+ style="height: 86%; padding-left: 20px; margin-bottom: 20px"
+ >
<el-row style="height: 100%" :gutter="20">
<el-col :span="7">
<!-- 患者信息 -->
@@ -74,13 +77,13 @@
float: right;
"
>
- 男
+ {{patientInfo.patientGenderText}}
</div>
<!-- 头像和患者信息 -->
<div
style="
display: grid;
- grid-template-columns: minmax(250px, 40%) 1fr;
+ grid-template-columns: minmax(180px, 40%) 1fr;
height: 100%;
"
>
@@ -100,19 +103,20 @@
<!-- 患者信息 -->
<div
style="
- font-size: 50px;
+ font-size: 40px;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 800;
- padding-left: 20px;
- padding-top: 50px;
+ padding-left: 5px;
+ padding-top: 60px;
color: #ffffff;
+ height: 100%;
"
>
<div
style="
- height: 30%;
text-align: left;
width: 100%;
+ font-size: 30px;
display: flex;
align-items: center;
line-height: 1.5;
@@ -123,8 +127,8 @@
</div>
<div
style="
- font-size: 75px;
- height: 50%;
+ font-size: 50px;
+ height: 40%;
text-align: left;
width: 100%;
display: flex;
@@ -137,7 +141,7 @@
</div>
<div
style="
- font-size: 34px;
+ font-size: 24px;
font-weight: 400;
white-space: nowrap;
height: 20%;
@@ -186,12 +190,11 @@
签到时间
</template>
<template v-else>下次透析</template>
-
</div>
<div style="display: grid; place-items: center; height: 100%">
<div
style="
- font-size: 40px;
+ font-size: 30px;
font-weight: 700;
white-space: nowrap;
padding-left: 20px;
@@ -199,14 +202,14 @@
"
>
<template v-if="patientInfo.isAfterMed === 0">
- {{date.substring(0,16)}}
+ {{ date.substring(0, 16) }}
</template>
<template v-else>
<span v-if="patientInfo.nextRecordDate">{{
patientInfo.nextRecordDate.substring(0, 11)
}}</span>
- <span>
+ <span>
<template v-if="patientInfo.下次透析时段 === 0"
>上午</template
>
@@ -219,15 +222,14 @@
<template v-else>未安排</template>
</span>
{{ patientInfo.下次透析方案名称 }}
- </template>
+ </template>
</div>
-
</div>
</div>
</div>
<div
style="
- height: 40%;
+ height: 37%;
margin-top: 20px;
border-radius: 12px;
width: 100%;
@@ -246,7 +248,7 @@
class="textwenben"
style="
height: 28%;
- font-size: 40px;
+ font-size: 35px;
font-weight: 500;
background-color: #dfb144;
width: 100%;
@@ -259,21 +261,19 @@
</template>
<template v-else>干体重(kg)</template>
</template>
- <template v-else>
-
- 分区/床位号
- </template>
+ <template v-else> 分区/床位号 </template>
</div>
<div
class="textwenben"
style="
- height: 70%;
- font-size: 80px;
+ height: 72%;
+ font-size: 50px;
color: #dfb144;
font-weight: 1000;
text-align: center;
background: #ffffff;
opacity: 0.8;
+ border-radius: 0 0 12px 12px;
width: 100%;
"
>
@@ -286,11 +286,8 @@
<template v-else> {{ patientInfo.pureWeight }} (kg)</template>
</template>
<template v-else>
- {{ patientInfo.设备分区名称 }}<br />{{
- patientInfo.deviceNo
- }}
+ {{ patientInfo.设备分区名称 }}<br />{{ patientInfo.deviceNo }}
</template>
-
</div>
</el-row>
</div>
@@ -298,7 +295,7 @@
<el-col :span="17">
<el-row style="height: 61%; width: 100%" gutter="20">
<el-col :span="16">
- <div style="height: 100%; width: 100%; padding-bottom: 10px">
+ <div style="height: 100%; width: 100%">
<div class="cyc-container">
<div class="cyc-label">
<template v-if="configData.deviceType === '体重秤'">
@@ -345,7 +342,7 @@
class="textwenben"
style="
height: 28%;
- font-size: 40px;
+ font-size: 35px;
font-weight: 500;
background-color: #41b593;
width: 100%;
@@ -375,6 +372,7 @@
font-weight: 1000;
text-align: center;
width: 100%;
+ border-radius: 0 0 12px 12px;
"
>
<template v-if="configData.deviceType === '体重秤'">
@@ -411,7 +409,7 @@
class="textwenben"
style="
height: 28%;
- font-size: 40px;
+ font-size: 35px;
font-weight: 500;
background-color: #65aaf6;
width: 100%;
@@ -440,6 +438,7 @@
font-weight: 1000;
background-color: #ffffff;
text-align: center;
+ border-radius: 0 0 12px 12px;
width: 100%;
"
>
@@ -468,28 +467,28 @@
</div>
</el-col>
</el-row>
-
<div
- v-if="configData.deviceType === '体重秤'"
- ref="myChartRef1"
- class="echat"
- style="height: 39%; width: calc(100% - 20px); margin-top: 20px"
- ></div>
- <div
- v-if="configData.deviceType === '血压计'"
- ref="myChartRef2"
- class="echat"
- style="height: 39%; width: calc(100% - 20px); margin-top: 20px"
- ></div>
+ style="
+ height: 37%;
+ border-radius: 12px;
+ width: calc(100% - 25px);
+ margin-top: 25px;
+ "
+ >
+ <div
+ v-if="configData.deviceType === '体重秤'"
+ ref="myChartRef1"
+ class="echat"
+ style="height: 100%"
+ ></div>
+ <div
+ v-if="configData.deviceType === '血压计'"
+ ref="myChartRef2"
+ class="echat"
+ style="height: 100%"
+ ></div>
+ </div>
</el-col>
-
-
-
-
-
-
-
- <!-- <el-col :span="6">2</el-col> -->
</el-row>
</div>
<!-- 内容 识别窗口页-->
@@ -804,9 +803,10 @@
borderRadius: 5,
backgroundColor: "#409EFF",
left: 20,
+ top:20,
textStyle: {
color: "#ffffff",
- fontSize: 28,
+ fontSize: 18,
},
},
tooltip: {
@@ -865,6 +865,7 @@
borderRadius: 5,
backgroundColor: "#409EFF",
left: 20,
+ top: 20,
textStyle: {
color: "#ffffff",
fontSize: 18,
@@ -874,7 +875,15 @@
trigger: "axis",
},
legend: {
+ textStyle: {
+ fontSize: 18, // 设置字体大小
+ fontWeight: "normal", // 可选:加粗、正常等
+ color: "#333", // 可选:文字颜色
+ },
+ // 其他 legend 配置
data: legendData, //['透前体重', '透后体重', '干体重']
+ right: "20px",
+ top: "4%",
},
grid: {
left: "3%",
@@ -1030,12 +1039,12 @@
},`;
dialogVisible.value = false;
speech.value?.speak({ text: str }).then(() => {});
- if(configData.value.deviceType==='体重秤'){
- setTimeout(() => {
- intiTubiao();
- }, 1000);
+ if (configData.value.deviceType === "体重秤") {
+ setTimeout(() => {
+ intiTubiao();
+ }, 1000);
}
- if(configData.value.deviceType==='血压计'){
+ if (configData.value.deviceType === "血压计") {
setTimeout(() => {
intiTubiaoXY();
}, 1000);
@@ -1732,7 +1741,6 @@
.echat {
background-color: #ffffff;
border-radius: 12px;
- padding-top: 1%;
}
.dateclas {
width: 404px;
@@ -1825,7 +1833,7 @@
border-radius: 12px;
// background-color: #65aaf6;
display: grid;
- grid-template-columns: minmax(100px, 100px) 1fr;
+ grid-template-columns: minmax(80px, 80px) 1fr;
text-align: center;
// grid-template-columns: minmax(150px, 25%) 1fr;
background-color: rgba(255, 255, 255, 0.2); /* 白色背景 + 20% 不透明 */
@@ -1835,9 +1843,9 @@
border-radius: 12px 0px 0px 12px;
writing-mode: vertical-rl;
background: #41b593;
- line-height: 100px;
+ line-height: 80px;
font-size: 40px;
- width: 100px;
+ width: 80px;
font-weight: 500;
text-align: center;
color: #ffffff;
@@ -1846,7 +1854,7 @@
display: flex;
align-items: center;
justify-content: center;
- font-size: 150px;
+ font-size: 120px;
color: #ffffff;
font-weight: 800;
}
diff --git "a/src/views/home/index3\346\227\272\346\227\272\346\233\264\346\226\260\345\211\215\346\215\242\350\277\231\345\207\240\345\233\276.vue" b/src/views/home/index3.vue
similarity index 99%
rename from "src/views/home/index3\346\227\272\346\227\272\346\233\264\346\226\260\345\211\215\346\215\242\350\277\231\345\207\240\345\233\276.vue"
rename to src/views/home/index3.vue
index 049d123..028fd6e 100644
--- "a/src/views/home/index3\346\227\272\346\227\272\346\233\264\346\226\260\345\211\215\346\215\242\350\277\231\345\207\240\345\233\276.vue"
+++ b/src/views/home/index3.vue
@@ -1,6 +1,6 @@
<template>
<div class="homeclass">
- <!-- 标头 -->
+ <!-- 标头 老ui-->
<div style="height: 10%;padding-top: 20px;">
<el-row>
<el-col :span="12" >
--
Gitblit v1.8.0