From 80079d9802dd2445820b112fe818d61e1cc21c6f Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期三, 15 五月 2024 18:08:03 +0800
Subject: [PATCH] 修复bug
---
src/constant/scene-types.js | 14 ++++
src/components/monitor/FactorLegend.vue | 2
src/utils/map/animation.js | 2
src/utils/map/dialog.js | 2
src/components/monitor/FactorTrend.vue | 10 ++
src/constant/factor-unit.js | 115 ++++++++++++++++++++++++++++++-------
src/assets/mipmap/scene_19.png | 0
src/assets/mipmap/scene_20.png | 0
8 files changed, 118 insertions(+), 27 deletions(-)
diff --git a/src/assets/mipmap/scene_19.png b/src/assets/mipmap/scene_19.png
new file mode 100644
index 0000000..69dd6bf
--- /dev/null
+++ b/src/assets/mipmap/scene_19.png
Binary files differ
diff --git a/src/assets/mipmap/scene_20.png b/src/assets/mipmap/scene_20.png
new file mode 100644
index 0000000..d7b09a8
--- /dev/null
+++ b/src/assets/mipmap/scene_20.png
Binary files differ
diff --git a/src/components/monitor/FactorLegend.vue b/src/components/monitor/FactorLegend.vue
index fe9f6d3..56fc697 100644
--- a/src/components/monitor/FactorLegend.vue
+++ b/src/components/monitor/FactorLegend.vue
@@ -103,7 +103,7 @@
color: bgColor,
min: r[0],
max: nextR ? nextR[0] : undefined,
- unit: factorUnit[name]
+ unit: factorUnit[name] ? factorUnit[name].unit : ''
});
}
diff --git a/src/components/monitor/FactorTrend.vue b/src/components/monitor/FactorTrend.vue
index 7c25179..f2e0e3f 100644
--- a/src/components/monitor/FactorTrend.vue
+++ b/src/components/monitor/FactorTrend.vue
@@ -22,7 +22,9 @@
>
<div class="flex-col">
<div class="factor-name">{{ item.series.name }}</div>
- <div class="factor-value">{{ item.series.currentData }}</div>
+ <div class="factor-value">
+ {{ item.series.currentData }}
+ </div>
<div class="factor-unit">
{{ getUnit(item.series.label) }}
</div>
@@ -171,8 +173,12 @@
}
this.seriesList = list;
},
+ // getScaleValue(label, value) {
+ // return (factorUnit[label].scale * value).toFixed();
+ // },
getUnit(label) {
- return factorUnit[label];
+ // fixeme 2024.5.15 淇CO灞曠ず鍗曚綅鍜屽師濮嬫暟鎹笉涓�鑷撮棶棰�
+ return label == 'CO' ? '渭g/m鲁' : factorUnit[label].unit;
}
}
};
diff --git a/src/constant/factor-unit.js b/src/constant/factor-unit.js
index 767a03a..878baf0 100644
--- a/src/constant/factor-unit.js
+++ b/src/constant/factor-unit.js
@@ -2,28 +2,97 @@
* 鐩戞祴鍥犲瓙鍗曚綅
*/
export const factorUnit = {
- NO2: '渭g/m鲁', //2
- CO: 'mg/m鲁', //4
- H2S: '渭g/m鲁', //6
- SO2: '渭g/m鲁', //3
- O3: '渭g/m鲁', //1
- PM25: '渭g/m鲁', //7
- PM10: '渭g/m鲁', //8
- TEMPERATURE: '鈩�',
- HUMIDITY: '%',
- VOC: '渭g/m鲁', //5
- NOI: '渭g/m鲁', //9
- LNG: '',
- LAT: '',
- VELOCITY: 'km/s',
- TIME: '鏃堕棿',
- WIND_SPEED: 'm/s',
- WIND_DIRECTION: '掳',
- HEIGHT: 'm',
+ NO2: {
+ scale: 1,
+ unit: '渭g/m鲁'
+ },
+ CO: {
+ scale: 0.001,
+ unit: 'mg/m鲁'
+ },
+ H2S: {
+ scale: 1,
+ unit: '渭g/m鲁'
+ },
+ SO2: {
+ scale: 1,
+ unit: '渭g/m鲁'
+ },
+ O3: {
+ scale: 1,
+ unit: '渭g/m鲁'
+ },
+ PM25: {
+ scale: 1,
+ unit: '渭g/m鲁'
+ },
+ PM10: {
+ scale: 1,
+ unit: '渭g/m鲁'
+ },
+ TEMPERATURE: {
+ scale: 1,
+ unit: '鈩�'
+ },
+ HUMIDITY: {
+ scale: 1,
+ unit: '%'
+ },
+ VOC: {
+ scale: 1,
+ unit: '渭g/m鲁'
+ },
+ NOI: {
+ scale: 1,
+ unit: '渭g/m鲁'
+ },
+ LNG: {
+ scale: 1,
+ unit: ''
+ },
+ LAT: {
+ scale: 1,
+ unit: ''
+ },
+ VELOCITY: {
+ scale: 1,
+ unit: 'km/s'
+ },
+ TIME: {
+ scale: 1,
+ unit: ''
+ },
+ WIND_SPEED: {
+ scale: 1,
+ unit: 'm/s'
+ },
+ WIND_DIRECTION: {
+ scale: 1,
+ unit: '掳'
+ },
+ HEIGHT: {
+ scale: 1,
+ unit: 'm'
+ },
- TMP: '鈩�', //1
- spC: '渭S/cm', //2, 鐢靛鐜囷紙瑗块棬瀛�/绫筹級
- tur: 'NTU', //3, 娴婂害
- DO: 'mg/L', //4, 婧惰В姘�
- PH: '' //5
+ TMP: {
+ scale: 1,
+ unit: '鈩�'
+ }, //1
+ spC: {
+ scale: 1,
+ unit: '渭S/cm'
+ }, //2, 鐢靛鐜囷紙瑗块棬瀛�/绫筹級
+ tur: {
+ scale: 1,
+ unit: 'NTU'
+ }, //3, 娴婂害
+ DO: {
+ scale: 1,
+ unit: 'mg/L'
+ }, //4, 婧惰В姘�
+ PH: {
+ scale: 1,
+ unit: ''
+ }
};
diff --git a/src/constant/scene-types.js b/src/constant/scene-types.js
index cffdfe7..c0d9043 100644
--- a/src/constant/scene-types.js
+++ b/src/constant/scene-types.js
@@ -6,6 +6,8 @@
import scene_16 from '@/assets/mipmap/scene_16.png';
import scene_17 from '@/assets/mipmap/scene_17.png';
import scene_18 from '@/assets/mipmap/scene_18.png';
+import scene_19 from '@/assets/mipmap/scene_19.png';
+import scene_20 from '@/assets/mipmap/scene_20.png';
function sceneTypes() {
return [
@@ -80,6 +82,14 @@
{
label: '鍟嗕笟浣�',
value: '18'
+ },
+ {
+ label: '鍥芥帶鐐�',
+ value: '19'
+ },
+ {
+ label: '甯傛帶鐐�',
+ value: '20'
}
];
}
@@ -102,6 +112,10 @@
return scene_17;
case '18':
return scene_18;
+ case '19':
+ return scene_19;
+ case '20':
+ return scene_20;
default:
return scene_1;
}
diff --git a/src/utils/map/animation.js b/src/utils/map/animation.js
index ed664c3..6ac8216 100644
--- a/src/utils/map/animation.js
+++ b/src/utils/map/animation.js
@@ -419,6 +419,8 @@
};
const realTimeMapAnimation = new MapAnimation();
+// 寮�鍚姩鎬佺粯鍒堕�熷害
+realTimeMapAnimation.setDynamicSpeed(true, 4);
// realTimeMapAnimation.clear = false;
export { realTimeMapAnimation, MapAnimation };
diff --git a/src/utils/map/dialog.js b/src/utils/map/dialog.js
index 3f0101e..e041443 100644
--- a/src/utils/map/dialog.js
+++ b/src/utils/map/dialog.js
@@ -104,7 +104,7 @@
n = 0;
}
var v = f.factorData.toFixed(n);
- var unit = factorUnit[f.factorName];
+ var unit = factorUnit[f.factorName].unit;
if (f.factorName == 'CO') {
unit = '渭g/m鲁';
}
--
Gitblit v1.9.3