From f1bd0a1c68597c011b0bfbd44d7ef8421ab85555 Mon Sep 17 00:00:00 2001 From: liuhr Date: Tue, 2 Jul 2024 17:54:50 +0800 Subject: [PATCH] =?UTF-8?q?[FEAT]:=201.=E6=96=B0=E5=A2=9E=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E6=8A=A5=E8=A1=A8=E6=9F=A5=E8=AF=A2=E4=B8=80=E4=B8=AD?= =?UTF-8?q?=20=E2=80=9C=E7=BB=B4=E6=8A=A4=E2=80=9D=20=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=202.=E6=96=B0=E5=A2=9E=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=8A=B6=E6=80=81=20=E2=80=9C=E7=BB=B4=E6=8A=A4=E2=80=9D=20?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Utils/helper.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Utils/helper.ts b/src/Utils/helper.ts index 8df1376..036bc00 100644 --- a/src/Utils/helper.ts +++ b/src/Utils/helper.ts @@ -414,7 +414,7 @@ export default class helper { return textStatus; }; - // 设备状态,运行:Run,待机:Stop,报警:Alarm + // 设备状态,运行:Run 待机:Stop 报警:Alarm 维护:Maintain static getEquipmentState = (val: any) => { let textStatus = { color: '', text: '' }; switch (val) { @@ -432,10 +432,16 @@ export default class helper { break; case 'Alarm': textStatus = { - color: 'orange', + color: 'red', text: '报警' }; break; + case 'Maintain': + textStatus = { + color: 'orange', + text: '维护' + }; + break; default: textStatus = { color: '', @@ -483,7 +489,7 @@ export default class helper { return textStatus; }; - // 设备状态,运行:Run,待机:Stop,报警:Alarm + // 设备状态,运行:Run 待机:Stop 报警:Alarm 维护:Maintain static getEquipmentStateColor = (val: any) => { let color = ''; switch (val) { @@ -494,7 +500,10 @@ export default class helper { color = 'bg-grey-4'; break; case 'Alarm': - color = 'bg-orange-5'; + color = 'bg-red'; + break; + case 'Maintain': + color = 'bg-orange'; break; case null: color = 'bg-grey-4';