From 0db357a9c5f73f2fc65dee021e52070e3b36d25c Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 06 九月 2022 21:10:52 +0800
Subject: [PATCH] up
---
src/views/home/index.vue | 13 ++++++-------
src/samples/sockteStomp.ts | 24 +++++++++++++-----------
package.json | 2 +-
src/stores/sockteInfo.ts | 1 +
4 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/package.json b/package.json
index f79e9a7..e7b2a80 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "sign-tool",
- "version": "2.0.0",
+ "version": "2.1.0",
"icon":"public/favicon.ico",
"main": "dist/electron/main/index.js",
"author": "",
diff --git a/src/samples/sockteStomp.ts b/src/samples/sockteStomp.ts
index 90db1c3..028efb5 100644
--- a/src/samples/sockteStomp.ts
+++ b/src/samples/sockteStomp.ts
@@ -35,15 +35,18 @@
switch(deviceInfo.deviceType){
case '读卡器':
console.log('读卡器收到消息')
- sockteStore().setdkqSockte(
- {
- deviceName:resultInfo.deviceNumber,
- type:"读卡器",
- result:resultInfo.result,
- resultTime:resultInfo.resultTime,
- state:2
- }
- )
+ const res=JSON.parse(resultInfo.result)
+ if(res.clientCode!==null){
+ sockteStore().setdkqSockte(
+ {
+ deviceName:resultInfo.deviceNumber,
+ type:"读卡器",
+ result:resultInfo.result,
+ resultTime:resultInfo.resultTime,
+ state:2
+ }
+ )
+ }
break
case "体重秤":
console.log(resultInfo,'体重秤')
@@ -51,7 +54,7 @@
{
deviceName:resultInfo.deviceNumber,
type:"体重秤",
- result:resultInfo.result,
+ result:Number(resultInfo.result).toString(),
resultTime:resultInfo.resultTime,
state:2
}
@@ -128,7 +131,6 @@
// 订阅结果事件返回函数
const callback = function(message:any) {
- console.log('接收到数据-----',message.body)
if (message.body!==undefined) {
const data=JSON.parse(message.body)
writeResult(data)
diff --git a/src/stores/sockteInfo.ts b/src/stores/sockteInfo.ts
index b2babab..ba6d471 100644
--- a/src/stores/sockteInfo.ts
+++ b/src/stores/sockteInfo.ts
@@ -55,6 +55,7 @@
weightSockte.value.result=info.result
weightSockte.value.resultTime=info.resultTime
weightSockte.value.state=info.state
+ console.debug('体重秤更新')
}
/**
* 更新体重秤工作状态
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 8a5f84a..df3de9d 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -141,10 +141,10 @@
}
)
watch(
- () => weightInfo.value.resultTime,
+ () => weightInfo.value.result,
() => {
settime()
- console.log("体重变化了")
+ console.log("体重变化了",weightInfo.value)
// AudioRef2.value.play()
if (patientInfo.value.id === 0) {
AudioRef0.value.play()
@@ -498,6 +498,7 @@
}
.rowdiv{
/* background: #769AFF; */
+ font-size: 300%;
height: 15%;
margin-top: 5%;
}
@@ -507,7 +508,7 @@
}
.tilaft{
text-align: left;
- font-size: 2.5rem;
+ font-size: 300%;
font-family: AlibabaPuHuiTi-Regular, AlibabaPuHuiTi;
font-weight: 400;
color: #333333;
@@ -528,7 +529,7 @@
vertical-align:middle;
width: 100%;
text-align: center;
- font-size: 120px;
+ font-size: 800%;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #769AFF;
@@ -543,11 +544,10 @@
.userinfo{
padding-top: 6%;
/* background: #769AFF; */
- font-size: 2.5rem;
+ font-size: 300%;
text-align: right;
}
.lableclass{
- font-size: 2.5rem;
text-align: right;
font-weight: 400;
color: #777777;
@@ -555,7 +555,6 @@
}
.textclass{
- font-size: 2.5rem;
text-align: left;
font-family: AlibabaPuHuiTi-Medium, AlibabaPuHuiTi;
font-weight: 500;
--
Gitblit v1.8.0