DESKTOP-GJP2N7J\lx
2023-08-11 49cd08187c9c49df199a954bd0a5a5bca40f8f1a
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<template>
  <!-- 项目基本信息 -->
  <div class="panel">
    <div class="panel-header">项目基本信息</div>
    <div class="flex panel-body" style="flex-wrap: wrap;">
      <!-- <div class="info-items flex-item" v-for="(item,i) in baseData" :key="i">
        <div class="info-img"><img :src="require('../../../image/screen/'+ item.img)" alt=""></div>
        <div>
          <div class="item-label" style="white-space: nowrap">{{ item.name }}</div>
          <div class="item-value"><span class="item-num">{{ item.count }}</span> {{ item.unit }}</div>
        </div>
      </div> -->
      <div class="info-items flex-item">
        <div>
          <div class="item-label" style="white-space: nowrap">用水户数</div>
          <div class="item-value bg-b"><span class="item-num">{{ infos.clientTotal }}</span></div>
        </div>
      </div>
      <div class="info-items flex-item">
        <div>
          <div class="item-label" style="white-space: nowrap">水表数量</div>
          <div class="item-value bg-y"><span class="item-num">{{ infos.meterTotal }}</span></div>
        </div>
      </div>
      <div class="info-items flex-item">
        <div>
          <div class="item-label" style="white-space: nowrap">今日充值</div>
          <div class="item-value bg-b"><span class="item-num">{{ infos.chargeTotal }}</span></div>
        </div>
      </div>
      <div class="info-items flex-item">
        <div>
          <div class="item-label" style="white-space: nowrap">昨日上报</div>
          <div class="item-value bg-y"><span class="item-num">{{ infos.yesterdayReportTotal }}</span></div>
        </div>
      </div>
      <div class="info-items flex-item">
        <div>
          <div class="item-label" style="white-space: nowrap">昨日未上报</div>
          <div class="item-value bg-b"><span class="item-num">{{ infos.yesterdayNoReportTotal }}</span></div>
        </div>
      </div>
      <div class="info-items flex-item">
        <div>
          <div class="item-label" style="white-space: nowrap">昨日上报率</div>
          <div class="item-value bg-y"><span class="item-num">{{ infos.yesterdayReportRate }}</span></div>
        </div>
      </div>
      <div class="info-items flex-item">
        <div>
          <div class="item-label" style="white-space: nowrap">未欠费户数</div>
          <div class="item-value bg-b"><span class="item-num">{{ infos.noArrearsMeterTotal }}</span></div>
        </div>
      </div>
      <div class="info-items flex-item">
        <div>
          <div class="item-label" style="white-space: nowrap">欠费户数</div>
          <div class="item-value bg-y"><span class="item-num">{{ infos.arrearsMeterTotal }}</span></div>
        </div>
      </div>
      <div class="info-items flex-item">
        <div>
          <div class="item-label" style="white-space: nowrap">水费收缴率</div>
          <div class="item-value bg-b"><span class="item-num">{{ infos.payRate }}</span></div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
 
import { getBaseInfo } from '@/api/largeScreen'
export default {
  name: 'LeftTop',
  props: {
    baseInfos: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      baseData: [],
      infos: {}
    }
  },
  created(){
     this.getBaseInfo()
  },
  methods: {
    getBaseInfo() {
      getBaseInfo({orgTag: 'dy'}).then(res => {
        console.log('baseinfo',res)
        if (res.succ == 1) {
          this.infos = res
        } else {
          this.$message({
            type: 'error',
            message: res.message
          })
        }
      })
    }
  }
}
</script>
<style lang="scss" scoped>
  // @import url(../index.scss);
  .info-items{
    width: 1.36rem;
    margin-bottom: .1rem;
    display: flex;
    align-items: center;
    .info-img {
      width: .6rem;
      height: .6rem;
      img{
        width: 100%;
      }
    }
    .item-label {
      // width: .64rem;
      width: 1.2rem;
 
      padding: 0;
      // font-size: .14rem;
      font-size: .12rem;
      color: #fff;
      padding-left: 0.04rem;
    }
    .item-value {
      width: 1.20rem;
      font-size: .1rem;
      color: #fff;
      text-align: center;
      height: 0.4rem;
      line-height: 0.35rem;
    }
    .item-num {
      font-family: 'screen-font';
      font-size: .20rem;
    }
    .bg-b {
      background: url('../../../image/screen/info-bg-blue.png') no-repeat;
      background-size: 100%;
    }
    .bg-y {
      background: url('../../../image/screen/info-bg-yellow.png') no-repeat;
      background-size: 100%;
    }
  }
</style>