riku
2024-08-23 1788c96aea9247cc36ef8b82734997f1a6a92fb4
src/views/realtimemode/component/DashBoard.vue
@@ -46,8 +46,13 @@
  },
  methods: {
    getFactorData(factorDatas, index, key, scale = 10) {
      let d = factorDatas.factor[key].datas[index].factorData;
      return Math.round(d * scale) / scale;
      const _factor = factorDatas.factor[key];
      if (_factor != undefined) {
        let d = _factor.datas[index].factorData;
        return Math.round(d * scale) / scale;
      } else {
        return '--';
      }
    },
    refresh(factorDatas, index) {
      this.temprature = this.getFactorData(factorDatas, index, '8') + '';