Bläddra i källkod

Refactor Alarm components for improved internationalization and data handling

- Updated label for ungrouped option in Complex component to use TranslateText for better localization support.
- Modified data processing in TopoDetail component to return raw values instead of percentages for history data and threshold values, enhancing data accuracy.
valentichu 1 månad sedan
förälder
incheckning
48cb7a535f
3 ändrade filer med 3 tillägg och 3 borttagningar
  1. 0 0
      lib/index.js
  2. 1 1
      src/pages/Alarm/components/complex.jsx
  3. 2 2
      src/pages/Alarm/components/topoDetail.jsx

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
lib/index.js


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

@@ -352,7 +352,7 @@ const Complex = (props, ref) => {
                     options={[
                       ...[
                         {
-                          label: "未分组",
+                          label: TranslateText(["未分组", "Ungrouped"]),
                           value: 0,
                         },
                       ],

+ 2 - 2
src/pages/Alarm/components/topoDetail.jsx

@@ -340,11 +340,11 @@ const TopoDetail = (props) => {
 
     const seriesData = historyData.map((point) => {
       // 转换为百分比显示
-      return (point.value * 100).toFixed(2);
+      return point.value;
     });
 
     // 阈值也转换为百分比
-    const thresholdValue = (threshold * 100).toFixed(2);
+    const thresholdValue = threshold;
 
     // 配置数据点样式
     newData.series[0] = {

Vissa filer visades inte eftersom för många filer har ändrats