From 4aaae263a6c728eaa2a3f45a1ae36082619b52a0 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 25 五月 2026 17:32:01 +0800
Subject: [PATCH] 宝东 1.小数点后四位修改

---
 src/views/productionManagement/safetyMonitoring/index.vue |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/views/productionManagement/safetyMonitoring/index.vue b/src/views/productionManagement/safetyMonitoring/index.vue
index 12922e7..63f20b0 100644
--- a/src/views/productionManagement/safetyMonitoring/index.vue
+++ b/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(4) }}%</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(4) }}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(4) }}%</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(4) }}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(4)}%`
 		},
 		// 鍒濆鍖栧浘琛�
 		initChart() {
@@ -437,7 +437,7 @@
 		generateRandomData(count, min, max) {
 			const data = []
 			for (let i = 0; i < count; i++) {
-				data.push(+(Math.random() * (max - min) + min).toFixed(2))
+				data.push(+(Math.random() * (max - min) + min).toFixed(4))
 			}
 			return data
 		},
@@ -455,15 +455,15 @@
 		refreshSensorData() {
 			// 鏇存柊鍌ㄧ綈鍖轰紶鎰熷櫒鏁版嵁
 			this.tankSensors.forEach(sensor => {
-				sensor.methane = +(Math.random() * 4).toFixed(2)
-				sensor.h2s = +(Math.random() * 15).toFixed(2)
+				sensor.methane = +(Math.random() * 4).toFixed(4)
+				sensor.h2s = +(Math.random() * 15).toFixed(4)
 				sensor.status = this.getSensorStatus(sensor.methane, sensor.h2s)
 			})
 			
 			// 鏇存柊鍘嬬缉鏈轰紶鎰熷櫒鏁版嵁
 			this.compressorSensors.forEach(sensor => {
-				sensor.methane = +(Math.random() * 6).toFixed(2)
-				sensor.h2s = +(Math.random() * 20).toFixed(2)
+				sensor.methane = +(Math.random() * 6).toFixed(4)
+				sensor.h2s = +(Math.random() * 20).toFixed(4)
 				sensor.status = this.getSensorStatus(sensor.methane, sensor.h2s)
 			})
 			
@@ -497,7 +497,7 @@
 			const h2sPct = Math.min(Math.round((sensor.h2s / 20) * 100 * 100) / 100, 100)
 			const isMethaneMajor = methanePct >= h2sPct
 			const overGas = isMethaneMajor ? '鐢茬兎' : '纭寲姘�'
-			const percent = (isMethaneMajor ? methanePct : h2sPct).toFixed(2)
+			const percent = (isMethaneMajor ? methanePct : h2sPct).toFixed(4)
 			this.currentWarning = {
 				location: sensor.name,
 				gas: overGas,

--
Gitblit v1.9.3