riku
2024-05-15 80079d9802dd2445820b112fe818d61e1cc21c6f
修复bug
已修改6个文件
已添加2个文件
145 ■■■■ 文件已修改
src/assets/mipmap/scene_19.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/mipmap/scene_20.png 补丁 | 查看 | 原始文档 | blame | 历史
src/components/monitor/FactorLegend.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/monitor/FactorTrend.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/constant/factor-unit.js 115 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/constant/scene-types.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/map/animation.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/map/dialog.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/mipmap/scene_19.png
src/assets/mipmap/scene_20.png
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 : ''
        });
      }
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;
    }
  }
};
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: ''
  }
};
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;
  }
src/utils/map/animation.js
@@ -419,6 +419,8 @@
};
const realTimeMapAnimation = new MapAnimation();
// 开启动态绘制速度
realTimeMapAnimation.setDynamicSpeed(true, 4);
// realTimeMapAnimation.clear = false;
export { realTimeMapAnimation, MapAnimation };
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³';
      }