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 @@