From 0d25973eb507a132496de71930abe76384876cec Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期六, 15 十月 2022 09:13:50 +0800
Subject: [PATCH] 45
---
src/views/home/index.vue | 63 ++++++++++++++++++++-----------
1 files changed, 41 insertions(+), 22 deletions(-)
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index cca3d57..a58e3da 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -17,6 +17,7 @@
import step3 from '@/assets/mp3/step3.mp3'
import step2 from '@/assets/mp3/step2.mp3'
import step1 from '@/assets/mp3/step1.mp3'
+import step7 from '@/assets/mp3/chongfuchengzhong.mp3'
export default {
setup() {
@@ -30,8 +31,11 @@
const AudioRef3 = ref()
const AudioRef4=ref()
const AudioRef5=ref()
+ const AudioRef7=ref()
+ let patientCodeLs=''
+
const isLink = computed(() => {
- return sockte.isLink
+ return !sockte.isLink
})
const netLink = computed(() => {
return !sockte.netLink
@@ -106,6 +110,7 @@
step5:step5,
step4:step4,
step3:step3,
+ step7:step7,
step2:step2,
step1:step1,
step6:step6,
@@ -128,6 +133,8 @@
() => patientInfo.value.datetime,
() => {
console.log('患者信息变化',patientInfo.value)
+ patientCodeLs=''
+ console.log(patientCodeLs,'患者codec初始化')
if (patientInfo.value.id !== 0) {
AudioRef.value.play();
sockteStore().setweightSockte({
@@ -168,20 +175,31 @@
}
else {
- AudioRef2.value.play()
- // 发送结果到sockte服务
- const mode = {
- patientCode: patientInfo.value.code,
- weight: weightInfo.value.result,
- bloodPressure: ''
+ if(weightInfo.value.result!=="0"){
+ // 发送结果到sockte服务
+ const mode = {
+ patientCode: patientInfo.value.code,
+ weight: weightInfo.value.result,
+ bloodPressure: ''
+ }
+ console.log('发送患者结果,前提是患者code 不能重复', mode)
+ if(patientCodeLs!==mode.patientCode){
+ console.log('发送患者结果')
+ AudioRef2.value.play()
+ sendPationSet(mode)
+ patientCodeLs=mode.patientCode
+ }
+ else{
+ console.log(`patientCodeLs===${patientCodeLs} ,mode.patCode${mode.patientCode}`)
+ AudioRef7.value.play()
+ }
+ // 计算目标脱水量
+ if (Number(weightInfo.value.result) > 0 && Number(patientInfo.value.pureWeight) !== 0) {
+ state.aimTSL = (Number(weightInfo.value.result) - Number(patientInfo.value.pureWeight)).toFixed(2)
+ }
}
- console.log('发送患者结果', mode)
- sendPationSet(mode)
- // 计算目标脱水量
- if (Number(weightInfo.value.result) > 0 && Number(patientInfo.value.pureWeight) !== 0) {
- state.aimTSL = (Number(weightInfo.value.result) - Number(patientInfo.value.pureWeight)).toFixed(2)
- }
+
}
}
);
@@ -252,15 +270,13 @@
state.haodu=(document.documentElement.clientHeight-180)/2+'px'
state.clockNum = patientInfoStore().viewNumber
setInterval(function () {
- if(isLink.value){
- console.log('sockte链接成功指标指向input',isLink.value)
+ console.log('sockte链接成功指标指向input',isLink.value)
inputRef.value.focus();
- }
}, 1000)
})
return {
- ...toRefs(state), guyanbi,isLink, netLink, weightInfo, patientInfo, xyjInfo, inputRef, AudioRef0, AudioRef, AudioRef4,AudioRef5, AudioRef2, AudioRef3, inputChabge
+ ...toRefs(state), guyanbi,isLink, netLink, weightInfo, patientInfo, xyjInfo, inputRef, AudioRef0, AudioRef, AudioRef4,AudioRef5, AudioRef2, AudioRef3,AudioRef7, inputChabge
}
}
}
@@ -279,12 +295,14 @@
<audio :src="step5" ref="AudioRef4" id="eventAudio5"></audio>
<!-- 没有找到排班 -->
<audio :src="step6" ref="AudioRef5" id="eventAudio6"></audio>
- <!-- <el-dialog title="提示" v-model="netLink" width="30%">
+ <!-- 不能重复称重 -->
+ <audio :src="step7" ref="AudioRef7" id="eventAudio7"></audio>
+ <el-dialog title="提示" v-model="netLink" width="30%">
<span>无法链接到网络!</span>
- </el-dialog> -->
- <!-- <el-dialog title="提示" v-model="isLink" width="30%">
+ </el-dialog>
+ <el-dialog title="提示" v-model="isLink" width="30%">
<span>sockte连接失败正在重连。。。。。。</span>
- </el-dialog> -->
+ </el-dialog>
<el-row class="header">
<el-col :span="8">
<img
@@ -385,6 +403,7 @@
<el-row class="divbody">
<div class="bodeText">
{{ gao_ya }}/{{ di_ya }}
+ <br/>{{mai_bu}}
</div>
</el-row>
</div>
@@ -549,7 +568,7 @@
vertical-align:middle;
width: 100%;
text-align: center;
- font-size: 800%;
+ font-size: 700%;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #769AFF;
--
Gitblit v1.8.0