From 7679ca8781bb69605c1a803fb0999e7d81406f55 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期五, 15 七月 2022 20:50:29 +0800
Subject: [PATCH] upStyle
---
src/assets/logo.png | 0
src/views/home/index.vue | 354 ++++++++++++++++++++++++++++++++++----------------
src/samples/sockteStomp.ts | 13 -
src/assets/state1.png | 0
src/views/home/dd.vue | 0
5 files changed, 244 insertions(+), 123 deletions(-)
diff --git a/src/assets/logo.png b/src/assets/logo.png
index 8df6278..e01ed07 100644
--- a/src/assets/logo.png
+++ b/src/assets/logo.png
Binary files differ
diff --git a/src/assets/state1.png b/src/assets/state1.png
new file mode 100644
index 0000000..1eae46d
--- /dev/null
+++ b/src/assets/state1.png
Binary files differ
diff --git a/src/samples/sockteStomp.ts b/src/samples/sockteStomp.ts
index 1c8cd86..01c2590 100644
--- a/src/samples/sockteStomp.ts
+++ b/src/samples/sockteStomp.ts
@@ -1,7 +1,7 @@
import Stomp from 'stompjs'
import os from 'os'
import { ipcRenderer } from 'electron'
-var stompClient: Stomp.Client | null=null
+let stompClient: Stomp.Client | null=null
import { userInfoStore } from '@/stores/userInfo'
import { patientInfoStore } from '@/stores/patient'
@@ -10,6 +10,7 @@
const sound = require("sound-play");
+let sockteNum=0
interface device{
@@ -162,6 +163,7 @@
}
const connectCallback=function(){
const pcName= sockteStore().pcName
+ console.log("链接成功",stompClient,pcName)
// 订阅患者信息服务
if(stompClient!==null){
// 订阅患者信息事件
@@ -172,16 +174,14 @@
stompClient.send(`/app/workstation/config/set/${clientCode}/${pcName}`,{},JSON.stringify({"clientCode":clientCode,"machineName":pcName}))
}
- console.log("链接成功",stompClient,pcName)
// 更新sockte链接状态
sockteStore().setsockteIsLink(true)
console.log(sockteStore().isLink)
- console.log(devices)
if(devices!==undefined&&devices.length>0){
devices.forEach(de=>{
if(stompClient!==null){
stompClient.subscribe(`/queue/${clientCode}/${de.deviceName}/result`,callback)
- stompClient.subscribe(`/queue/${clientCode}/${de.deviceName}/keepalive`,callbackState)
+ // stompClient.subscribe(`/queue/${clientCode}/${de.deviceName}/keepalive`,callbackState)
stompClient.send(`/app/device/request/${clientCode}/${de.deviceName}`, {}, JSON.stringify({"deviceNumber":de.deviceName}));
}
@@ -191,8 +191,7 @@
const error_callback=function(error:any){
console.log('链接错误',error);
setTimeout(()=>{
- console.log('10秒之后重连')
- console.log(devices,'设备列表')
+ console.log('10秒之后重连',sockteNum++)
const socket = new WebSocket('ws://hemobs.icoldchain.cn/broadcast')
stompClient = Stomp.over(socket)
stompClient.connect({}, connectCallback,error_callback)
@@ -203,7 +202,7 @@
const creatorClient=(devices2:any,clientCode2:any)=>{
devices=devices2
clientCode=clientCode2
- console.log(devices,'设备列表')
+ console.log(devices,'设备列表','chong')
const socket = new WebSocket('ws://hemobs.icoldchain.cn/broadcast')
stompClient = Stomp.over(socket)
stompClient.connect({}, connectCallback,error_callback)
diff --git a/src/views/home/dd.vue b/src/views/home/dd.vue
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/views/home/dd.vue
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 8207d76..5240710 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -6,6 +6,7 @@
import { reactive, computed, toRefs, onMounted, ref, watch } from "vue"
import { sendPationCode, sendPationSet } from '../../samples/sockteStomp'
import { formatDate } from '@/utils/formatTime'
+import state1 from '@/assets/state1.png'
import { number } from 'yargs'
export default {
@@ -84,6 +85,7 @@
console.log(timer)
}
const state = reactive({
+ state1:state1,
dialogVisible: false,
isActive: false,
inputCode: "",
@@ -223,139 +225,259 @@
<el-dialog title="提示" v-model="isLink" width="30%">
<span>sockte连接失败正在重连。。。。。。</span>
</el-dialog>
- <el-row>
- <el-col :span="12">
- <div class="tale">
- <img class="imgss" alt="Vue logo" src="@/assets/logo.png" />
+ <div>
+ <el-row>
+ <el-col :span="6">
+ <div class="imglogo"></div>
+
+ </el-col>
+ <el-col :span="2">
+ <el-input id="inputCode" style="width:5px;" @change="inputChabge" v-model="inputCode" ref="inputRef" placeholder="" />
+ </el-col>
+ <el-col :span="8" class="titleText">
+ 患者签到
+ </el-col>
+ <el-col class="clockNum" :span="8">{{clockNum}}</el-col>
+ </el-row>
+ </div>
+ <el-row :gutter="30">
+ <el-col :span="12" class="item">
+ <div>
+ <el-row>
+ <el-col :span="10">
+ <div class="patimg">
+ <el-image style="width:200px;height:280px;" :src="patientInfo.patientAvatarIcon" />
+ </div>
+ </el-col>
+ <el-col :span="14">
+ <div class="chenlabe">
+ <div class="chenlabel">
+ <div class="chenlabe2">
+ <el-row>
+ <el-col class="lableClass" :span="12">
+ 姓名:
+ </el-col>
+ <el-col class="inputClasss" :span="12">
+ {{patientInfo.name}}
+ </el-col>
+ </el-row>
+
+ </div>
+ </div>
+ <div class="chenlabel" >
+ <div class="chenlabe2">
+ <el-row>
+ <el-col class="lableClass" :span="12">
+ 透析号:
+ </el-col>
+ <el-col class="inputClasss" :span="12">
+ {{patientInfo.hemoCode}}
+ </el-col>
+ </el-row>
+ </div>
+ </div>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+
+ </el-col>
+ <el-col :span="12" class="item">
+ <div class="xyjCON">
+ <el-row class="xyclass">
+ <el-col :span="12" >血压(mmHg):</el-col>
+ <el-col :span="12" >
+ <div class="xyimg">
+ <el-image v-if="xyjInfo.state === 2" style="width: 60px; height: 60px" :src="state1" />
+ <el-image v-if="xyjInfo.state === 1" style="width: 60px; height: 60px" :src="state2" />
+ <el-image v-if="xyjInfo.state === 0" style="width: 60px; height: 60px" :src="state3" />
+ </div>
+ </el-col>
+ </el-row>
+ <el-row>
+ <div class="xyjnumber">
+ {{ gao_ya }}/{{ di_ya }}
+ </div>
+ </el-row>
</div>
</el-col>
- <el-col :span="6">
- <!-- <div> sockte连接状态{{isLink}}</div>
- <div> 网络连接状态{{netLink}}</div> -->
- <el-input id="inputCode" @change="inputChabge" v-model="inputCode" ref="inputRef" placeholder="" />
-
+ <el-col :span="12" class="item">
+ <div>
+ <div class="deviceInfo">
+ <el-row class="deviceInfoItem">
+ <el-col class="text" :span="12" >机号:</el-col>
+ <el-col class="value" :span="12" > {{patientInfo.deviceCode}}</el-col>
+ </el-row>
+ <el-row class="deviceInfoItem">
+ <el-col class="text" :span="12" >干体重(kg):</el-col>
+ <el-col class="value" :span="12" > {{ patientInfo.pureWeight }}</el-col>
+ </el-row>
+ <el-row class="deviceInfoItem">
+ <el-col class="text" :span="12" >目标脱水量(L):</el-col>
+ <el-col class="value" :span="12" > {{aimTSL}}</el-col>
+ </el-row>
+ </div>
+ </div>
</el-col>
- <el-col :span="6">
- <div class="datess">
- {{ clockNum }}
+ <el-col :span="12" class="item">
+ <div class="xyjCON">
+ <el-row class="xyclass">
+ <el-col :span="12" >透前体重(kg):</el-col>
+ <el-col :span="12" >
+ <div class="xyimg">
+ <el-image v-if="weightInfo.state === 2" style="width: 60px; height: 60px" :src="state1" />
+ <el-image v-if="weightInfo.state === 1" style="width: 60px; height: 60px" :src="state2" />
+ <el-image v-if="weightInfo.state === 0" style="width: 60px; height: 60px" :src="state3" />
+ </div>
+ </el-col>
+ </el-row>
+ <el-row>
+ <div class="xyjnumber">
+ {{ weightInfo.result }}
+ </div>
+ </el-row>
</div>
</el-col>
</el-row>
- <div class="grid-container">
- <div class="grid-item">
- <el-avatar shape="square" :size="100" fit="cover" :src="patientInfo.patientAvatarIcon" />
- <div class="zsf">{{ patientInfo.name }}</div>
- </div>
- <div class="grid-item">
- <div class="lableText">当前时间:</div>
- <div class="conText">{{ Newdate }}</div>
- </div>
- <div class="grid-item">
- <div class="lableText">透析号:</div>
- <div class="conText">{{ patientInfo.hemoCode }}</div>
- </div>
- <div class="grid-item">
- <div class="lableText">机号:</div>
- <div class="conText">{{ patientInfo.deviceCode }}</div>
- </div>
- <div class="grid-item">
- <div class="lableText">序号:</div>
- <div class="conText">0</div>
- </div>
- <div class="grid-item">
- <div class="lableText">干体重(kg):</div>
- <div class="conText">{{ patientInfo.pureWeight }}</div>
- </div>
- <div class="grid-item">
- <div>
- <div class="lableText" v-if="weightInfo.state === 2">透前称重(kg):</div>
- <div class="lableText" v-if="weightInfo.state === 1" style="color:red">体重秤通讯服务正常运行但未联通设备</div>
- <div class="lableText" v-if="weightInfo.state === 0" style="color:red">体重秤通讯服务不正常 </div>
- <div class="conText">{{ weightInfo.result }}</div>
- </div>
- </div>
- <div class="grid-item">
- <div class="lableText">目标脱水量:</div>
- <div class="conText">{{ aimTSL }}</div>
- </div>
- <div class="grid-item">
- <div class="lableText" v-if="xyjInfo.state === 2">血压:</div>
- <div class="lableText" v-if="xyjInfo.state === 1" style="color:red">血压通讯服务正常运行但未联通设备</div>
- <div class="lableText" v-if="xyjInfo.state === 0" style="color:red">血压通讯服务不正常 </div>
- <div class="conText">{{ gao_ya }}/{{ di_ya }}</div>
- </div>
- </div>
</div>
</template>
-<style>
-body {
- background: #f3f7fb;
+<style lang="scss">
+.home{
+background: #F3F6FE;
}
-
-.coldev {
- height: 200px;
- background: #ffff;
+.item{
+ padding: 20px;
}
-
-.grid-container {
- display: grid;
- grid-template-columns: 33% 33% 33%;
- grid-gap: 20px;
- background: #f3f7fb;
- padding: 10px;
-}
-
-.grid-container>div {
- background: #ffffff;
- height: 150px;
- text-align: center;
+.item>div{
+ background: #FFFFFF;
+ box-shadow: 1px 2px 4px 0px rgba(201,223,246,0.5000);
border-radius: 10px;
- padding: 10px;
+ height: 330px;
}
-
-.lableText {
- text-align: left;
- /* height: 50px; */
- /* line-height: 50px; */
- padding-top: 30px;
- font-size: 13pt;
+.chenlabe{
+ padding-top: 15%;
}
-
-.conText {
- height: 50px;
- line-height: 50px;
- padding-top: 30px;
- color: #769aff;
- font-size: 20pt;
+.chenlabel{
+ height: 50%;
+ // background: #d9ecff;
}
-
-.imgss {
- height: 30px;
+.chenlabe2{
+ padding-top: 10%;
+ padding-left: 30px;
+ .lableClass{
+ height: 42px;
+ font-size: 30px;
+ font-family: AlibabaPuHuiTi-Regular, AlibabaPuHuiTi;
+ font-weight: 400;
+ color: #777777;
+ line-height: 42px;
+ letter-spacing: 1px;
+ }
+ .inputClasss{
+ height: 42px;
+ font-size: 30px;
+ font-family: AlibabaPuHuiTi-Medium, AlibabaPuHuiTi;
+ font-weight: 500;
+ color: #769AFF;
+ line-height: 42px;
+ letter-spacing: 1px;
+ }
}
-
-.tale {
- height: 30px;
- line-height: 50px;
- /* text-align: center; */
+.patimg{
+ width: 227px;height: 315px;border-radius: 4px;
+ padding-left: 13px;
+ padding-top: 17px;
}
-
-.zsf {
- font-size: 18pt;
- margin-top: 15pt;
- color: #769aff;
+.xyclass{
+ padding-top: 10px;
+ padding-left: 10px;
+ padding-right: 10px;
+ font-size: 30px;
+ font-family: AlibabaPuHuiTi-Regular, AlibabaPuHuiTi;
+ font-weight: 400;
+ color: #333333;
}
-
-.active {
- background: #c1c2c6;
- color: black;
-}
-
-.datess {
+.xyimg{
text-align: right;
- padding-right: 20px;
- height: 30px;
- line-height: 30px;
- color: red;
- font-weight: 1000;
}
+.xyjnumber{
+ width:100%;
+ height: 100%;
+ font-size: 120px;
+ font-family: DINAlternate-Bold, DINAlternate;
+ font-weight: bold;
+ color: #769AFF;
+ line-height: 100%;
+ margin-top: 7%;
+ text-align: center;
+}
+.xyjCON{
+ height: 100%;
+}
+.deviceInfo{
+ padding-top: 60px;
+
+}
+.deviceInfoItem{
+ // background: #333333;
+ height: 70px;
+ width: 100%;
+ line-height: 70px;
+ // background: #769AFF;
+ .text{
+ padding-left: 50px;
+ height: 42px;
+ font-size: 30px;
+ font-family: AlibabaPuHuiTi-Regular, AlibabaPuHuiTi;
+ font-weight: 400;
+ color: #777777;
+ line-height: 42px;
+ letter-spacing: 1px;
+ text-align: right;
+ }
+ .value{
+ text-align: center;
+ height: 47px;
+ font-size: 40px;
+ font-family: DINAlternate-Bold, DINAlternate;
+ font-weight: bold;
+ color: #769AFF;
+ line-height: 47px;
+ letter-spacing: 2px;
+ }
+}
+.titlerow{
+ height: 72px;
+ background: #FFFFFF;
+ line-height: 72px;
+ box-shadow: 1px 3px 5px 0px #E9E9E9;
+}
+.imglogo{
+ width: 102px;
+ height: 40px;
+ background: #769AFF;
+}
+.titleText{
+ text-align: center;
+ height: 38px;
+font-size: 27px;
+font-family: PingFangSC-Medium, PingFang SC;
+font-weight: 500;
+color: #333333;
+line-height: 38px;
+letter-spacing: 1px;
+}
+.clockNum{
+ width: 100%;
+ height: 38px;
+ font-size: 27px;
+ font-family: PingFangSC-Medium, PingFang SC;
+ font-weight: 500;
+ color: #FF7472;
+ line-height: 38px;
+ letter-spacing: 1px;
+ text-align:right;
+ padding-right: 10px;
+}
+
</style>
\ No newline at end of file
--
Gitblit v1.8.0