| | |
| | | |
| | | # 设置变量 |
| | | 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 |
| | |
| | | fullscreen: true,// 开启默认全屏 |
| | | kiosk: true, |
| | | movable:false,// 关闭窗口移动 |
| | | |
| | | resizable: false, // 禁止调整窗口大小 |
| | | // autoHideMenuBar:store.get('debug'), |
| | | webPreferences: { |
| | | preload: splash, |
| | |
| | | |
| | | 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')}, |
| | | ] |
| | | |
| | |
| | | }, RECONNECT_INTERVAL); |
| | | }else{ |
| | | reconnectAttempts=0 |
| | | ipcRenderer.invoke('logger', 'M503体重秤端口打开成功') |
| | | ipcRenderer.invoke('logger', 'M503体重秤端口打开成功'+path) |
| | | ElMessage({ |
| | | message: 'M503体重秤端口打开成功', |
| | | type: 'success', |
| | |
| | | // |
| | | // 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() |
| | |
| | | }, RECONNECT_INTERVAL); |
| | | }else{ |
| | | reconnectAttempts=0 |
| | | ipcRenderer.invoke('logger', '血压计端口打开成功') |
| | | ipcRenderer.invoke('logger', '血压计端33333口打开成功') |
| | | ElMessage.success({ |
| | | message: '血压计端口打开成功', |
| | | message: '血压计端口打开成功9030', |
| | | type: 'success', |
| | | }) |
| | | } |
| | |
| | | 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( |
| | |
| | | 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, |
| | |
| | | <template> |
| | | <div class="homeclass"> |
| | | <!-- 标头 --> |
| | | <!-- 标头 新ui--> |
| | | <div style="height: 8%; padding-top: 20px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | |
| | | /> |
| | | </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> |
| | |
| | | </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"> |
| | | <!-- 患者信息 --> |
| | |
| | | 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%; |
| | | " |
| | | > |
| | |
| | | <!-- 患者信息 --> |
| | | <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; |
| | |
| | | </div> |
| | | <div |
| | | style=" |
| | | font-size: 75px; |
| | | height: 50%; |
| | | font-size: 50px; |
| | | height: 40%; |
| | | text-align: left; |
| | | width: 100%; |
| | | display: flex; |
| | |
| | | </div> |
| | | <div |
| | | style=" |
| | | font-size: 34px; |
| | | font-size: 24px; |
| | | font-weight: 400; |
| | | white-space: nowrap; |
| | | height: 20%; |
| | |
| | | 签到时间 |
| | | </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; |
| | |
| | | {{ patientInfo.下次透析方案名称 }} |
| | | </template> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div |
| | | style=" |
| | | height: 40%; |
| | | height: 37%; |
| | | margin-top: 20px; |
| | | border-radius: 12px; |
| | | width: 100%; |
| | |
| | | class="textwenben" |
| | | style=" |
| | | height: 28%; |
| | | font-size: 40px; |
| | | font-size: 35px; |
| | | font-weight: 500; |
| | | background-color: #dfb144; |
| | | width: 100%; |
| | |
| | | </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%; |
| | | " |
| | | > |
| | |
| | | <template v-else> {{ patientInfo.pureWeight }} (kg)</template> |
| | | </template> |
| | | <template v-else> |
| | | {{ patientInfo.设备分区名称 }}<br />{{ |
| | | patientInfo.deviceNo |
| | | }} |
| | | {{ patientInfo.设备分区名称 }}<br />{{ patientInfo.deviceNo }} |
| | | </template> |
| | | |
| | | </div> |
| | | </el-row> |
| | | </div> |
| | |
| | | <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 === '体重秤'"> |
| | |
| | | class="textwenben" |
| | | style=" |
| | | height: 28%; |
| | | font-size: 40px; |
| | | font-size: 35px; |
| | | font-weight: 500; |
| | | background-color: #41b593; |
| | | width: 100%; |
| | |
| | | font-weight: 1000; |
| | | text-align: center; |
| | | width: 100%; |
| | | border-radius: 0 0 12px 12px; |
| | | " |
| | | > |
| | | <template v-if="configData.deviceType === '体重秤'"> |
| | |
| | | class="textwenben" |
| | | style=" |
| | | height: 28%; |
| | | font-size: 40px; |
| | | font-size: 35px; |
| | | font-weight: 500; |
| | | background-color: #65aaf6; |
| | | width: 100%; |
| | |
| | | font-weight: 1000; |
| | | background-color: #ffffff; |
| | | text-align: center; |
| | | border-radius: 0 0 12px 12px; |
| | | width: 100%; |
| | | " |
| | | > |
| | |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <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: 39%; width: calc(100% - 20px); margin-top: 20px" |
| | | style="height: 100%" |
| | | ></div> |
| | | <div |
| | | v-if="configData.deviceType === '血压计'" |
| | | ref="myChartRef2" |
| | | class="echat" |
| | | style="height: 39%; width: calc(100% - 20px); margin-top: 20px" |
| | | style="height: 100%" |
| | | ></div> |
| | | </div> |
| | | </el-col> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- <el-col :span="6">2</el-col> --> |
| | | </el-row> |
| | | </div> |
| | | <!-- 内容 识别窗口页--> |
| | |
| | | borderRadius: 5, |
| | | backgroundColor: "#409EFF", |
| | | left: 20, |
| | | top:20, |
| | | textStyle: { |
| | | color: "#ffffff", |
| | | fontSize: 28, |
| | | fontSize: 18, |
| | | }, |
| | | }, |
| | | tooltip: { |
| | |
| | | borderRadius: 5, |
| | | backgroundColor: "#409EFF", |
| | | left: 20, |
| | | top: 20, |
| | | textStyle: { |
| | | color: "#ffffff", |
| | | fontSize: 18, |
| | |
| | | trigger: "axis", |
| | | }, |
| | | legend: { |
| | | textStyle: { |
| | | fontSize: 18, // 设置字体大小 |
| | | fontWeight: "normal", // 可选:加粗、正常等 |
| | | color: "#333", // 可选:文字颜色 |
| | | }, |
| | | // 其他 legend 配置 |
| | | data: legendData, //['透前体重', '透后体重', '干体重'] |
| | | right: "20px", |
| | | top: "4%", |
| | | }, |
| | | grid: { |
| | | left: "3%", |
| | |
| | | },`; |
| | | dialogVisible.value = false; |
| | | speech.value?.speak({ text: str }).then(() => {}); |
| | | if(configData.value.deviceType==='体重秤'){ |
| | | if (configData.value.deviceType === "体重秤") { |
| | | setTimeout(() => { |
| | | intiTubiao(); |
| | | }, 1000); |
| | | } |
| | | if(configData.value.deviceType==='血压计'){ |
| | | if (configData.value.deviceType === "血压计") { |
| | | setTimeout(() => { |
| | | intiTubiaoXY(); |
| | | }, 1000); |
| | |
| | | .echat { |
| | | background-color: #ffffff; |
| | | border-radius: 12px; |
| | | padding-top: 1%; |
| | | } |
| | | .dateclas { |
| | | width: 404px; |
| | |
| | | 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% 不透明 */ |
| | |
| | | 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; |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 150px; |
| | | font-size: 120px; |
| | | color: #ffffff; |
| | | font-weight: 800; |
| | | } |
| File was renamed from src/views/home/index3旺旺更新前换这几图.vue |
| | |
| | | <template> |
| | | <div class="homeclass"> |
| | | <!-- 标头 --> |
| | | <!-- 标头 老ui--> |
| | | <div style="height: 10%;padding-top: 20px;"> |
| | | <el-row> |
| | | <el-col :span="12" > |