ソースを参照

故障页面 优化

rui.jiang 1 ヶ月 前
コミット
27de6ab9bf
1 ファイル変更10 行追加6 行削除
  1. 10 6
      src/views/health/components/malfunction/bearing.vue

+ 10 - 6
src/views/health/components/malfunction/bearing.vue

@@ -56,7 +56,7 @@
           height="250"
         >
           <!-- <el-table-column fixed type="selection" width="55"> </el-table-column> -->
-          <el-table-column prop="timeStamp" label="时间" align="center">
+          <el-table-column prop="timeStamp" label="时间" align="center" width="150">
           </el-table-column>
           <el-table-column
             prop="samplingFrequency"
@@ -316,6 +316,9 @@ export default {
       this.$emit("updatePage", this.currentPage); // 通知父组件,把当前页传出去
     },
     automaticDiagnosis() {
+      
+    
+
       // 验证必填项
       const requiredFields = [
         { field: this.transmissionRatio, name: "发动机到轴承测点转速传动比" },
@@ -401,9 +404,9 @@ export default {
         const values = newProps.map((item) => Number(item[key]));
         const maxVal = Math.max(...values);
         let color = "#80808057"; // 默认灰色
-        if (maxVal === 0) color = "green"; // 无故障
-        else if (maxVal === 1) color = "yellow"; // 警告
-        else if (maxVal === 2) color = "red"; // 危险
+        if (maxVal === 0) color = "#8AE359"; // 无故障
+        else if (maxVal === 1) color = "#EECB5F"; // 警告
+        else if (maxVal === 2) color = "#F7715F"; // 危险
 
         this.bearingStateColors[colorKey] = color; // 更新颜色
       });
@@ -429,7 +432,7 @@ h4 {
   display: flex;
   justify-content: space-around;
   .leftdiv {
-    width: 29%;
+    width: 39%;
     display: flex;
     justify-content: space-around;
     .stateBox {
@@ -456,6 +459,7 @@ h4 {
       }
     }
     .Btn {
+      width: 50%;
       display: flex;
       flex-direction: column; /* 垂直排列 */
       justify-content: space-between; /* 顶部和底部对齐 */
@@ -492,7 +496,7 @@ h4 {
     }
   }
   .rightdiv {
-    width: 69%;
+    width: 60%;
     .fenye {
       display: flex;
       justify-content: space-between;