whychdw
2021-09-23 9d1bcaa4087a334ef49acab6df9b626eb2e147da
内容提交
2个文件已修改
43 ■■■■■ 已修改文件
src/assets/js/tools/lithium/analogParams.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/realTime.vue 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/tools/lithium/analogParams.js
@@ -67,12 +67,12 @@
            value: 0,
        },
        {
            key: 'cycle_times',
            key: 'cycleTimes',
            label: '电池循环次数',
            value: 0,
        },
        {
            key: 'user_def_cnt',
            key: 'userDefCnt',
            label: '自定义遥测数量',
            value: 0,
        },
src/pages/dataTest/realTime.vue
@@ -818,6 +818,7 @@
import BalanceSupplyModule from "./components/balance-supply-module.vue";
import BalanceControlParams from "@/components/params/balance-control-params.vue";
import getTblHeader from "@/pages/dataTest/js/getTblHeader";
import lithiumInfo from "@/assets/js/tools/lithium";
/* import moment from "moment"; */
let vol, resChart, temp, conduct, currChart, leakVol;
@@ -1332,6 +1333,9 @@
      },
      fodHeaders: [],
      fodData: [],
      lithiumParams: {
        analog: lithiumInfo.analog().params,
      },
    };
  },
  methods: {
@@ -1588,6 +1592,7 @@
            this.realTimeStateList(),
            this.loadDevAla(),
            //this.inversionInfo()
            this.getLithiumAnalog(), // 锂电池模拟量
          ])
          .then(() => {
            this.timer.open();
@@ -2474,6 +2479,32 @@
      }
      return result;
    },
    /**
     * 读取锂电池信息 暂定读取组一的
     */
    getLithiumAnalog() {
      let batt = this.batt;
      let isLithium = regEquipType(batt.FBSDeviceId, ["lithium"]);
      if (isLithium) {
        this.$apis.dcdc
          .getDcDcAnalogParams({
            devId: batt.FBSDeviceId,
          })
          .then((res) => {
            let rs = JSON.parse(res.data.result);
            if (rs.code == 1) {
              let data = rs.data[0];
              this.lithiumParams.analog = data;
            } else {
              this.lithiumParams.analog = lithiumInfo.analog().params;
            }
          })
          .catch((error) => {
            this.lithiumParams.analog = lithiumInfo.analog().params;
            console.log(error);
          });
      }
    },
    clearWarn() {
      // 清除告警
      this.$layer.confirm(
@@ -2727,6 +2758,14 @@
      } else {
        list.sysc = "------";
      }
      // 如果当前为锂电池
      let isLithium = regEquipType(batt.FBSDeviceId, ["lithium"]);
      if (isLithium) {
        list.batt_syrl_cap =
          this.lithiumParams.analog.params.restCap.toFixed(1) + "AH";
      }
      return list;
    },
    showStateList() {