张诺
10 小时以前 41a639a4a4b6fbf35db7903b5ee3c068c8644430
src/views/productionManagement/safetyMonitoring/index.vue
@@ -24,7 +24,7 @@
                        </div>
                        <div class="sensor-data">
                           <div class="data-item">
                              <span>甲烷: {{ sensor.methane.toFixed(2) }}%</span>
                              <span>甲烷: {{ sensor.methane.toFixed(3) }}%</span>
                              <el-progress
                                 :percentage="Math.min(Math.round(sensor.methane * 40 * 100) / 100, 100)"
                                 :color="getProgressColor(Math.min(Math.round(sensor.methane * 40 * 100) / 100, 100), 80)"
@@ -33,7 +33,7 @@
                              />
                           </div>
                           <div class="data-item">
                              <span>硫化氢: {{ sensor.h2s.toFixed(2) }}ppm</span>
                              <span>硫化氢: {{ sensor.h2s.toFixed(3) }}ppm</span>
                              <el-progress
                                 :percentage="Math.min(Math.round((sensor.h2s / 20) * 100 * 100) / 100, 100)"
                                 :color="getProgressColor(Math.min(Math.round((sensor.h2s / 20) * 100 * 100) / 100, 100), 80)"
@@ -59,7 +59,7 @@
                        </div>
                        <div class="sensor-data">
                           <div class="data-item">
                              <span>甲烷: {{ sensor.methane.toFixed(2) }}%</span>
                              <span>甲烷: {{ sensor.methane.toFixed(3) }}%</span>
                              <el-progress
                                 :percentage="Math.min(Math.round(sensor.methane * 40 * 100) / 100, 100)"
                                 :color="getProgressColor(sensor.methane, 2.5)"
@@ -68,7 +68,7 @@
                              />
                           </div>
                           <div class="data-item">
                              <span>硫化氢: {{ sensor.h2s.toFixed(2) }}ppm</span>
                              <span>硫化氢: {{ sensor.h2s.toFixed(3) }}ppm</span>
                              <el-progress
                                 :percentage="Math.min(Math.round((sensor.h2s / 20) * 100 * 100) / 100, 100)"
                                 :color="getProgressColor(sensor.h2s, 10)"
@@ -339,7 +339,7 @@
      formatProgress(percentage) {
         if (percentage == null || isNaN(percentage)) return '0.00%'
         const val = Math.round(Number(percentage) * 100) / 100
         return `${val.toFixed(2)}%`
         return `${val.toFixed(3)}%`
      },
      // 初始化图表
      initChart() {