whychdw
2024-11-18 05e411cd13f80677776ec2cf88a522da6b5597dc
动环界面
4个文件已修改
79 ■■■■ 已修改文件
src/views/dataMager/js/dh.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataTest/components/dh/dhTh.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataTest/components/dh/dhYw.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataTest/realTimeDh.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataMager/js/dh.js
@@ -58,3 +58,14 @@
    data: data
  })
}
export const getInfoApi = (deviceId)=>{
  return axios({
    method: 'GET',
    url: 'circle/getCinfById',
    params: {
      deviceId
    }
  })
}
src/views/dataTest/components/dh/dhTh.vue
@@ -338,9 +338,9 @@
                        <div class="detail-label">实时湿度:</div>
                        <div class="detail-value"> 95%RH</div>
                      </div>
                      <div class="detail-item">
                      <div class="detail-item red">
                        <div class="detail-label">报警状态:</div>
                        <div class="detail-value">无</div>
                        <div class="detail-value">温度异常</div>
                      </div>
                    </div>
                  </div>
src/views/dataTest/components/dh/dhYw.vue
@@ -121,13 +121,13 @@
                        <div class="detail-label">通信状态:</div>
                        <div class="detail-value">正常</div>
                      </div>
                      <div class="detail-item">
                      <div class="detail-item red">
                        <div class="detail-label">烟雾状态:</div>
                        <div class="detail-value">42</div>
                      </div>
                      <div class="detail-item">
                      <div class="detail-item red">
                        <div class="detail-label">报警状态:</div>
                        <div class="detail-value">无</div>
                        <div class="detail-value">报警</div>
                      </div>
                    </div>
                  </div>
@@ -272,7 +272,7 @@
                      </div>
                      <div class="detail-item red">
                        <div class="detail-label">烟雾状态:</div>
                        <div class="detail-value">42</div>
                        <div class="detail-value">67</div>
                      </div>
                      <div class="detail-item red">
                        <div class="detail-label">报警状态:</div>
src/views/dataTest/realTimeDh.vue
@@ -6,6 +6,7 @@
import DhQq from "@/views/dataTest/components/dh/dhQq.vue";
import DhMc from "@/views/dataTest/components/dh/dhMc.vue";
import DhYw from "@/views/dataTest/components/dh/dhYw.vue";
import {getInfoApi} from "@/views/dataMager/js/dh";
export default {
  name: "realTimeDh",
@@ -21,17 +22,68 @@
  methods: {
    tabsChange(tab) {
      this.acTabs = tab.name;
    },
    async getInfo(id) {
      try {
        let res = await getInfoApi(id);
        let rs = res.data;
        if(rs.code === 1 && rs.data) {
          this.info = rs.data2;
        }
      }catch (e) {
        this.info = {
          "num": 8,
          "stationId": "0",
          "stationName": "",
          "stationName1": "",
          "stationName2": "",
          "stationName3": "",
          "stationName4": "",
          "stationName5": "",
          "stationName6": " ",
          "stationName7": " ",
          "stationName8": " ",
          "stationName9": " ",
          "stationIp": "",
          "deviceId": "",
          "deviceName": "",
          "circleProductDate": "",
          "circleInuseDate": "",
          "deviceType": 1,
          "deviceProduct": "",
          "deviceModel": "",
          "deviceAddress": "",
          "deviceState": 1,
          "subCount": 1,
          "propertyName": "12",
          "subList": null,
          "startTime": null,
          "endTime": null
        };
      }
    }
  },
  computed: {
    fullName() {
      let info = this.info;
      if (info.stationName && info.propertyName) {
        return info.stationName + "-" + info.propertyName;
      }
      return "电池组全称";
    },
  },
  mounted() {
    let devId = this.$route.params.devId;
    this.info.id = devId;
    if (devId) {
      this.getInfo(devId);
    }
  }
}
</script>
<template>
  <content-box title="123" class="mgl8">
  <content-box :title="fullName" class="mgl8">
    <flex-layout>
      <div class="flex-page-content">
        <el-tabs