From 700c8b7d7b34365457c5c41533b88b58743fd8cf Mon Sep 17 00:00:00 2001 From: hzz Date: Fri, 2 Feb 2024 17:04:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E6=A2=B0=E5=88=86=E5=8E=82=E5=B7=A5?= =?UTF-8?q?=E4=BD=8D=E5=B1=8F=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Mechanics/child/station/handle.ts | 14 ++++++------- src/views/Mechanics/child/station/index.vue | 23 ++++++++++----------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/views/Mechanics/child/station/handle.ts b/src/views/Mechanics/child/station/handle.ts index 078cdaa..0b1ff55 100644 --- a/src/views/Mechanics/child/station/handle.ts +++ b/src/views/Mechanics/child/station/handle.ts @@ -1,6 +1,6 @@ - +const BASE_API = process.env.VUE_APP_BASE_API @@ -19,10 +19,10 @@ export default function getOriToData(ori_data: Object) { { key: data['activation']||0 + "%", val: "稼动率" }, { key: data['in1'] == "0"?'停止':'启动', val: "设备状态" }, { key: data['in3'] == "0"?'上电':'断电', val: "上电状态" }, - { key: parseInt(data['speed0']) + "rpm", val: "设备转速" } + { key: parseInt(data['speed0']) + "转", val: "设备转速" } ], bottom: { - image: getImage(data['image']), + image: BASE_API + data['image'], data: [ { key: data['adc1'] + 'mm', val: "操作台距原点距离" }, { key: data['in7'] == "0"?'工作':'空挡', val: "档杆状态" }, @@ -36,11 +36,11 @@ export default function getOriToData(ori_data: Object) { top: [ { key: data['activation']||0 + "%", val: "稼动率" }, { key: getDevStatus(), val: "设备状态" }, - { key: parseInt(data['speed0']) + 'rpm', val: "钻头转速" }, + { key: parseInt(data['speed0']) + '转', val: "钻头转速" }, { key: data['in8'] == "0"?'下降':'未下降', val: "钻头状态" } ], bottom: { - image: getImage(data['image']), + image: BASE_API + data['image'], data: [ { key: getRotateGear(), val: "设备状态" }, { key: [data['adc1'] + 'mm', parseFloat(data['speed1']).toFixed(1)+'mm/s'], val: "平台X轴距原点位置和速度" }, @@ -52,9 +52,7 @@ export default function getOriToData(ori_data: Object) { }, } - function getImage(url) { - return process.env.VUE_APP_BASE_API + data['image'] - } + /** * 获得设备状态 diff --git a/src/views/Mechanics/child/station/index.vue b/src/views/Mechanics/child/station/index.vue index a7b4f3d..60c6d00 100644 --- a/src/views/Mechanics/child/station/index.vue +++ b/src/views/Mechanics/child/station/index.vue @@ -36,24 +36,24 @@ let route = useRoute(); let ori_data = ref({ "id": "", "name": "卧式车床0412", - "image": "/profile/upload/2023/12/17/cba7a03d86a94775b6bdde70b0d069e6.png", + "image": "", "speed0": "0", "speed1": "0", - "activation": "70.0", - "signalGroup": "JJ412", + "activation": "", + "signalGroup": "", "ts": null, "in1": "0", "in2": "1", "in3": "1", "in4": "0", "in7": "1", - "adc1": "187", - "adc2": "79", - "adc3": "25", - "in8": "0" + "adc1": "", + "adc2": "", + "adc3": "", + "in8": "" }) let topData = ref([]); - +document.title = "设备数据监控平台"; let bottomData = ref({}) function getHologramDataMF() { @@ -75,8 +75,6 @@ function getWebsocket(val) { if (data.type == "HologramDataMFInfo") { let msg = data.msg; if (ori_data.value.id == msg.id) { - console.log(msg); - ori_data.value.in1 = msg.IN1; ori_data.value.in2 = msg.IN2; ori_data.value.in3 = msg.IN3; @@ -121,7 +119,9 @@ onMounted(() => { background-position: center center; color: #aeeefa; - .text { + +} +.bj .text { position: absolute; top: 25px; left: 38px; @@ -131,7 +131,6 @@ onMounted(() => { color: #aeeefa; font-family: "华文新魏", sans-serif; } -} .date { font-size: 28px;