From 5e71dbdbcec343da3458e76fec71b67d0817de5f Mon Sep 17 00:00:00 2001 From: hzz Date: Fri, 19 May 2023 14:45:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=B5=E6=8E=A7=E5=88=86?= =?UTF-8?q?=E5=8E=82=E5=AE=9E=E6=97=B6=20=20=E5=92=8C=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/moduleSocket.ts | 3 +- src/views/electronicControl/index.vue | 16 +- .../chart/humidity.vue | 268 +++++++++--------- .../chart/verticalNum.vue | 25 +- src/views/electronicControlAmbient/index.vue | 5 +- src/views/electronicControlAmbient/top.vue | 10 +- .../content/chart/verticalNumLoop.vue | 2 +- 7 files changed, 163 insertions(+), 166 deletions(-) diff --git a/src/store/moduleSocket.ts b/src/store/moduleSocket.ts index 959d2b2..c141e07 100644 --- a/src/store/moduleSocket.ts +++ b/src/store/moduleSocket.ts @@ -1,5 +1,5 @@ /* - * @FilePath: \wwwd:\code\screenFront\src\store\moduleSocket.ts + * @FilePath: \screenFront\src\store\moduleSocket.ts * @Author: 王路平 * @文件版本: V1.0.0 * @Date: 2023-02-06 15:58:13 @@ -341,6 +341,7 @@ export const useSocketStore = defineStore(Names.socket, { this.newVerticalNum[pIndex].value[cIndex].time = null } this.newVerticalNum[pIndex].value[cIndex].val = val.data.val + this.newVerticalNum[pIndex].value[cIndex].status = true } } } diff --git a/src/views/electronicControl/index.vue b/src/views/electronicControl/index.vue index 262b95a..2ec8e9f 100644 --- a/src/views/electronicControl/index.vue +++ b/src/views/electronicControl/index.vue @@ -1,5 +1,5 @@ - -

+ +

{{ item.val }}

{{ value.unit }}

@@ -44,8 +41,11 @@ let props = defineProps<{ }>(); let i = ref(0) let item = computed(() => { + return value.data[i.value] || { "name": "", "val": "0", "type": "", "field": "", "ts": 0,status:false }; +}); - return value.data[i.value] || { "name": "", "val": "0", "type": "", "field": "", "ts": 0 }; +let iconColor = computed(() => { + return value.data[i.value]?.status?(value.data[i.value].val > value.quota ? "icon-red" : "icon-blue"):"icon-grey"; }); let keynum = ref(0); const value = reactive({ @@ -139,8 +139,11 @@ p { color: #fff; } -.icon-red { +.iconbig-size { font-size: 100px; +} + +.icon-red { color: #E43961; animation: redstart 2s infinite; /* position: relative; */ @@ -148,11 +151,15 @@ p { } .icon-blue { - font-size: 100px; color: #20AEC5; /* position: relative; */ /* top: -15px; */ } +.icon-grey { + color: rgb(167, 166, 189); + /* position: relative; */ + /* top: -15px; */ +} .iconsmall-size { font-size: 20px; diff --git a/src/views/electronicControlAmbient/index.vue b/src/views/electronicControlAmbient/index.vue index de1f5b9..ec28418 100644 --- a/src/views/electronicControlAmbient/index.vue +++ b/src/views/electronicControlAmbient/index.vue @@ -1,5 +1,5 @@