whyczyk
2022-06-25 afdc5ca4e5691a10748d70262471b6a526d139e2
电源通讯报错处理
2个文件已修改
4813 ■■■■ 已修改文件
src/pages/alarmMager/GGDmeasure.vue 4779 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/movingRingSystem/powerBox.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/alarmMager/GGDmeasure.vue
Diff too large
src/pages/dataTest/movingRingSystem/powerBox.vue
@@ -279,6 +279,7 @@
    let acDcSignalData = getAcDcSignalData();
    let dcSignalData = getDcSignalData();
    return {
      battFullName: "电池组全称",
      layout: {
        gutter: 16,
        span: 8,
@@ -466,7 +467,7 @@
        });
    },
    changeDcData(config) {
      console.log(config);
      // console.log(config);
      let outputSWCount = config.outputSWCount;
      let list = {};
      for (let i = 1; i <= outputSWCount; i++) {
@@ -518,11 +519,17 @@
          powerDeviceId: powerDeviceId,
        })
        .then((res) => {
          console.log(res);
          // console.log(res);
          let rs = JSON.parse(res.data.result);
          if (rs.code == 1) {
            this.powerData.info = rs.data;
            this.batt.StationName = this.powerData.info.stationName;
            this.battFullName =
              this.batt.StationName +
              "-" +
              this.powerData.info.powerDeviceName +
              "-" +
              "通信电源";
          } else {
            this.powerData.info = {
              powerDeviceId: 0,
@@ -833,7 +840,7 @@
        let res = getItemByKey(item, data);
        return res == 0 ? ["未知", 0] : [res.label1, res.value];
      });
      option.refs.setOption(opt);
      option?.refs?.setOption(opt);
    },
    resize() {
      this.$nextTick(() => {
@@ -908,13 +915,14 @@
    },
  },
  computed: {
    battFullName() {
      let batt = this.batt;
      if (batt.StationName && batt.BattGroupName) {
        return batt.StationName + "-" + "通信电源";
      }
      return "电池组全称";
    },
    // battFullName() {
    //   let batt = this.batt;
    //   console.log("batt", JSON.stringify(batt));
    //   if (batt.StationName) {
    //     return batt.StationName + "-" + "通信电源";
    //   }
    //   return "电池组全称";
    // },
  },
  mounted() {
    // 获取电源信息
@@ -924,14 +932,14 @@
    }
    // 设置配置项
    this.setOption();
    // this.setOption();
    // 添加窗口自动缩放
    window.addEventListener("resize", this.resize);
    window.addEventListener("resize", this.resize, 20);
  },
  destroyed() {
    this.timer.stop();
    // 添加窗口自动缩放
    window.removeEventListener("resize", this.resize);
    window.removeEventListener("resize", this.resize, 20);
  },
};
</script>