Pārlūkot izejas kodu

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ēnesi atpakaļ
vecāks
revīzija
48cb7a535f

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 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] = {

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels