From 14aeec417843f91ca0e713fe85cabd832facd091 Mon Sep 17 00:00:00 2001 From: leiqiaochu Date: Mon, 20 Mar 2023 15:05:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E7=8A=B6=E6=80=81=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E5=91=8A=E8=AD=A6=E4=B8=AD=E5=BF=83=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BadgeStatus/color.ts | 8 ++++- .../Product/Detail/DeviceAccess/index.vue | 3 +- src/views/device/Product/Detail/index.vue | 2 +- src/views/device/Product/index.vue | 13 ++++---- .../Alarm/Configuration/Save/Base/index.vue | 2 +- .../Configuration/Save/Scene/Save/index.vue | 2 +- .../rule-engine/Alarm/Configuration/index.vue | 23 +++++++++----- .../Alarm/Log/TabComponent/indev.vue | 30 +++++++++---------- 8 files changed, 50 insertions(+), 33 deletions(-) diff --git a/src/components/BadgeStatus/color.ts b/src/components/BadgeStatus/color.ts index c3f05abf..a6f8d8fa 100644 --- a/src/components/BadgeStatus/color.ts +++ b/src/components/BadgeStatus/color.ts @@ -4,7 +4,13 @@ const color = { 'error': '229, 0, 18', 'success': '36, 178, 118', 'warning': '255, 144, 0', - 'default': '102, 102, 102' + 'default': '102, 102, 102', + //告警颜色 + 'level1': '229, 0, 18', + 'level2': '255, 148, 87', + 'level3': '250, 189, 71', + 'level4': '153, 153, 153', + 'level5': '196, 196, 196' } export const getHexColor = (code: string, pe: number = 0.1) => { const _color = color[code] || color.default diff --git a/src/views/device/Product/Detail/DeviceAccess/index.vue b/src/views/device/Product/Detail/DeviceAccess/index.vue index 2c63f138..8309f969 100644 --- a/src/views/device/Product/Detail/DeviceAccess/index.vue +++ b/src/views/device/Product/Detail/DeviceAccess/index.vue @@ -317,7 +317,7 @@ :status="slotProps.state.value" :statusText="slotProps.state.text" :statusNames="{ - enabled: 'success', + enabled: 'processing', disabled: 'error', }" > @@ -1009,6 +1009,7 @@ const submitDevice = async () => { }); if (resp.status === 200) { message.success('操作成功!'); + productStore.current!.storePolicy = storePolicy if ((window as any).onTabSaveSuccess) { if (resp.result) { (window as any).onTabSaveSuccess(resp); diff --git a/src/views/device/Product/Detail/index.vue b/src/views/device/Product/Detail/index.vue index b11c4958..6b1d27ec 100644 --- a/src/views/device/Product/Detail/index.vue +++ b/src/views/device/Product/Detail/index.vue @@ -266,7 +266,7 @@ onMounted(() => { cursor: not-allowed; } .productDetailHead { - width: 50%; + max-width: 50%; overflow: hidden; white-space: nowrap; overflow: hidden; diff --git a/src/views/device/Product/index.vue b/src/views/device/Product/index.vue index f32dbdc3..ffc8c48a 100644 --- a/src/views/device/Product/index.vue +++ b/src/views/device/Product/index.vue @@ -48,7 +48,7 @@ :status="slotProps.state" :statusText="slotProps.state === 1 ? '正常' : '禁用'" :statusNames="{ - 1: 'success', + 1: 'processing', 0: 'error', }" > @@ -118,9 +118,13 @@