ZZJ
2022-04-12 994e5e08cba4e6b9ce321b7cf5cb1ec8d19dfa22
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<template>
  <div class="ClusterCard">
    <div class="cardHeader">
      <img v-if="info.type == 1" src="/images/hashrate/集群.png" alt="" />
      <img v-else src="/images/hashrate/设备.png" alt="" />
 
      <div class="info">
        <div class="name">{{ info.name }}</div>
        <div class="id">{{ info.id }}</div>
        <div class="link" @click="showDetail">查看详情 ></div>
      </div>
    </div>
 
    <div class="cardFooter">
      <div class="hashrate">
        <div class="label">
          <img src="/images/hashrate/实时算力.png" alt="" />
          实时算力
        </div>
        <div class="data">
          <span>{{ info.info.realValidCount }}</span
          >路
        </div>
      </div>
 
      <div class="hashrate">
        <div class="label">
          <img src="/images/hashrate/轮询算力.png" alt="" />
          轮询算力
        </div>
        <div class="data">
          <span>{{ info.info.pollChannelCount }}</span
          >路
        </div>
      </div>
 
      <div class="hashrate">
        <div class="label">
          <img src="/images/hashrate/数据栈算力.png" alt="" />
          数据栈算力
        </div>
        <div class="data">
          <span>{{ info.info.stackChannelCount }}</span
          >路
        </div>
      </div>
    </div>
  </div>
</template>
 
<script>
export default {
  props: {
    info: {},
  },
  methods: {
    showDetail() {
      this.$emit("showDetail");
    },
  },
};
</script>
 
<style lang="less" scoped>
.ClusterCard {
  box-sizing: border-box;
  height: 273px;
  border: 1px solid #c0c5cc;
  border-radius: 5px;
 
  .cardHeader {
    display: flex;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ebee;
 
    img {
      margin-right: 20px;
      width: 180px;
      height: 128px;
    }
 
    .info {
      .name {
        margin-top: 20px;
        margin-bottom: 5px;
        font-size: 18px;
        font-weight: 700;
      }
 
      .id {
        color: #666666;
        font-size: 12px;
        font-weight: 700;
      }
 
      .link {
        margin-top: 22px;
        color: #0065ff;
        cursor: pointer;
      }
    }
  }
 
  .cardFooter {
    display: flex;
 
    .hashrate {
      flex: 1;
      text-align: center;
    }
 
    .label {
      img {
        margin-top: 30px;
        margin-bottom: 6px;
        width: 18px;
        height: 18px;
        vertical-align: -10px;
      }
    }
    .data {
      font-size: 12px;
      font-weight: 700;
      line-height: 22px;
      color: #666;
 
      span {
        font-size: 16px;
      }
    }
  }
}
</style>