valentichu před 1 rokem
rodič
revize
ae0d0a1bf9

+ 12 - 2
src/pages/Alarm/components/components/AlarmDetail/index.jsx

@@ -188,7 +188,11 @@ const initialOption = {
       name: "值",
       type: "line",
       data: [],
-      symbol: "none",
+      itemStyle: {
+        normal: {
+          borderColor: getVariable("--dt-error-color1"),
+        },
+      },
       areaStyle: {
         color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
           {
@@ -290,6 +294,12 @@ const Index = (props) => {
         },
       });
     }
+    newData.series[0].symbol = (value) => {
+      return value > res?.data?.ll?.[0]?.[1] ||
+        value > res?.data?.threshold?.[0]?.[1]
+        ? ""
+        : "none";
+    };
     setChartData(newData);
   });
   useEffect(() => {
@@ -298,7 +308,7 @@ const Index = (props) => {
   return (
     <>
       <div className={styles.desc}>
-        <Descriptions column={4} style={{ margin: '20px 20px 0px' }}>
+        <Descriptions column={4} style={{ margin: "20px 20px 0px" }}>
           <Descriptions.Item span={2} label="告警名称">
             {props.data?.data?.name}
           </Descriptions.Item>

+ 1 - 1
src/pages/Alarm/components/easy.jsx

@@ -501,7 +501,7 @@ const Easy = (props, ref) => {
                   "<==>" +
                   item.point_id +
                   "<==>" +
-                  item.unit
+                  item.unit || ''
                 }
                 key={item.point_id}
               >