Prechádzať zdrojové kódy

perf(views): 优化“监测点”控件异常判断逻辑

1. 状态超标时才判断为异常
wangcong 2 mesiacov pred
rodič
commit
7e99c4c713
1 zmenil súbory, kde vykonal 1 pridanie a 4 odobranie
  1. 1 4
      src/views/EnvArea/pens/monitorPoint.ts

+ 1 - 4
src/views/EnvArea/pens/monitorPoint.ts

@@ -26,10 +26,7 @@ const enum MonitorPointStatus {
 
 const isPointNormal = (point: MonitoringPointData) => {
   const { status } = point;
-  return (
-    status !== MonitorPointStatus.Warning &&
-    status !== MonitorPointStatus.Exceed
-  );
+  return status !== MonitorPointStatus.Exceed;
 };
 
 export interface MonitorPointPen extends Pen {