he wei
2024-09-21 70edda3b00f2528a473c28ec5a50b739ed160f0f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<script>
import FlexBox from "@/components/FlexBox.vue";
import HorizontalBar from "@/components/myCharts/horizontalBar.vue";
import UpsDataList from "@/components/upsDataList.vue";
 
export default {
  name: "analogData",
  components: {UpsDataList, HorizontalBar, FlexBox},
  props: {
    list: {
      type: Array,
      default() {
        return []
      }
    },
    list1: {
      type: Array,
      default() {
        return []
      }
    },
  },
  data() {
    return {}
  },
  methods: {
    resize() {
      this.$nextTick(()=> {
        this.$refs.bar1.resize();
        this.$refs.bar2.resize();
        this.$refs.bar3.resize();
      });
    },
    setBarOption(phaseVol, currents, lineVol) {
      this.$refs.bar1.setData(phaseVol);
      this.$refs.bar2.setData(currents);
      this.$refs.bar3.setData(lineVol);
    }
  },
  mounted() {
    this.resize();
  }
}
</script>
 
<template>
  <div class="page-flex-layout">
    <div class="page-division h50-percent">
      <el-row :gutter="8" class="full-height">
        <el-col :span="8" class="full-height">
          <flex-box title="输入/输出电压" size="mini" no-header>
            <horizontal-bar ref="bar1"></horizontal-bar>
          </flex-box>
        </el-col>
        <el-col :span="8" class="full-height">
          <flex-box title="输入/输出电流" size="mini" no-header>
            <horizontal-bar ref="bar2"></horizontal-bar>
          </flex-box>
        </el-col>
        <el-col :span="8" class="full-height">
          <flex-box title="输入/输出电压" size="mini" no-header>
            <horizontal-bar ref="bar3"></horizontal-bar>
          </flex-box>
        </el-col>
      </el-row>
    </div>
    <div class="page-division h50-percent">
      <el-row :gutter="8" class="full-height">
        <el-col :span="12" class="full-height">
          <ups-data-list :cols="3" :list="list"></ups-data-list>
        </el-col>
        <el-col :span="12" class="full-height">
          <ups-data-list :cols="3" :list="list1"></ups-data-list>
        </el-col>
      </el-row>
    </div>
  </div>
</template>
 
<style scoped lang="less">
.page-flex-layout {
  height: 100%;
}
.page-division {
  box-sizing: border-box;
  padding-bottom: 8px;
}
.container-test {
  background-color: #ee9900;
  height: 100%;
}
</style>