浏览代码

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

1. 状态超标时才判断为异常
wangcong 2 月之前
父节点
当前提交
7e99c4c713
共有 1 个文件被更改,包括 1 次插入4 次删除
  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 {