From 7356ed773e84fa51b497baa691e0d14dc9199a3b Mon Sep 17 00:00:00 2001 From: hzz Date: Wed, 24 Apr 2024 17:02:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E5=B7=A5=E5=8E=82=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Exhibition/Station/index.vue | 11 ++++++++++- src/views/MicroExhibition/component/BottomBorder.vue | 4 +++- src/views/MicroExhibition/component/ScrollBoard.vue | 7 ++++++- src/views/MicroExhibition/index.vue | 4 ++-- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/views/Exhibition/Station/index.vue b/src/views/Exhibition/Station/index.vue index ac9014c..01c28b4 100644 --- a/src/views/Exhibition/Station/index.vue +++ b/src/views/Exhibition/Station/index.vue @@ -3,7 +3,7 @@
再登软件工况物联系统
-
+
@@ -56,8 +56,11 @@ const isOff = ref(false) let timer = null let isShow = true let loading = ref(false) +let link_loading = ref(true) +let is_response = false //获取当前设备状态 async function getDeviceStatus(query) { + is_response = false try { const result: any = await getStatus(query) if (result.code == 200) { @@ -79,6 +82,9 @@ async function getDeviceStatus(query) { clearInterval(timer) console.log(e); + } finally { + link_loading.value = false + is_response = true } @@ -138,6 +144,9 @@ onMounted(() => { getDeviceStatus({ id: device_id }) timer = setInterval(() => { + if (!is_response) { + return + } getDeviceStatus({ id: device_id }) }, 10000) }) diff --git a/src/views/MicroExhibition/component/BottomBorder.vue b/src/views/MicroExhibition/component/BottomBorder.vue index dd04e7e..7797acb 100644 --- a/src/views/MicroExhibition/component/BottomBorder.vue +++ b/src/views/MicroExhibition/component/BottomBorder.vue @@ -13,7 +13,9 @@
{{t('MicroExhibition.后整设备')}}
-
{{ i.name }}
+
+
{{i.name.devname}}
{{i.name.label}}
+
diff --git a/src/views/MicroExhibition/component/ScrollBoard.vue b/src/views/MicroExhibition/component/ScrollBoard.vue index 025760c..d947876 100644 --- a/src/views/MicroExhibition/component/ScrollBoard.vue +++ b/src/views/MicroExhibition/component/ScrollBoard.vue @@ -50,9 +50,14 @@ const handleData = () => { } return statusHtml(status_color[temp]) } + if (index == 1) { + return `
${item.devname}
${item.label}
` + } return item }) }) + console.log(updateList); + devList.value.updateRows(updateList,config) } watch(()=>prop.data, (newVal, oldVal) => { @@ -76,7 +81,7 @@ let statusHtml = (color) => { .ScrollBoard-container { width: 100%; height: 100%; - + } diff --git a/src/views/MicroExhibition/index.vue b/src/views/MicroExhibition/index.vue index c9629ad..ab37ca0 100644 --- a/src/views/MicroExhibition/index.vue +++ b/src/views/MicroExhibition/index.vue @@ -171,7 +171,7 @@ function getmDevList() { temp = '0' } let devname = thisLang&&thisLang != "简体中文"?item.ename:item.name - return [i + 1, devname, item.num, temp, item.ratio, item.workTime] + return [i + 1, {devname,label:item.label}, item.num, temp, item.ratio, item.workTime] }) stepList[statusObj[key]].online = online; stepList[statusObj[key]].total = devObj[key].list.length; @@ -190,7 +190,7 @@ function getmDevList() { } let devname = thisLang&&thisLang != "简体中文"?item.ename:item.name return { - name: devname, + name: {devname,label:item.label}, num: item.num, status: temp, ratio: item.ratio,