Blame view

src/views/dataView/leftcard.vue 4.63 KB
xiaomiao committed
1
<template>
xiaomiao committed
2
  <div class="leftcard">
任超 committed
3
    <div class="card">
xiaomiao committed
4 5
      <div class="cardhead">区县接入</div>
      <div class="cardcontent">
任超 committed
6 7
        <ul class="cardcontent-left d-center">
          <div class="rjjrlList">
任超 committed
8
            <p v-for="(item, index) in qxjrlList" class="d-center qxjr" :key="index">
xiaomiao committed
9 10
              {{ item }}
            </p>
任超 committed
11
          </div>
任超 committed
12
          <li>总量</li>
任超 committed
13 14 15 16
        </ul>
        <div class="cardcontent-right d-center">
          <p>
            <span>失败</span>
任超 committed
17
            <span class="bad">{{ qxerrer }}</span>
任超 committed
18 19 20
          </p>
          <p>
            <span>成功率</span>
任超 committed
21
            <span class="cg">99%</span>
任超 committed
22
          </p>
xiaomiao committed
23 24 25
        </div>
      </div>
    </div>
26
    <div class="card mt-15">
xiaomiao committed
27 28
      <div class="cardhead">省厅汇交</div>
      <div class="cardcontent">
任超 committed
29 30
        <ul class="cardcontent-left d-center">
          <div class="rjjrlList">
任超 committed
31
            <p v-for="(item, index) in stjrlList" class="d-center sthj" :key="index">
xiaomiao committed
32 33
              {{ item }}
            </p>
任超 committed
34
          </div>
任超 committed
35
          <li>总量</li>
任超 committed
36 37 38 39
        </ul>
        <div class="cardcontent-right d-center">
          <p>
            <span>失败</span>
任超 committed
40
            <span class="bad">{{ sterrer }}</span>
任超 committed
41 42 43
          </p>
          <p>
            <span>成功率</span>
任超 committed
44
            <span class="cg">99%</span>
任超 committed
45
          </p>
xiaomiao committed
46 47 48
        </div>
      </div>
    </div>
49
    <div class="card1 mt-15">
xiaomiao committed
50 51 52 53
      <div class="cardhead">各区县数据上报统计</div>
      <columnar />
    </div>
  </div>
xiaomiao committed
54 55 56 57
</template>

<script>
import columnar from "@/components/echart/columnar";
任超 committed
58
import work from "@/api/work";
xiaomiao committed
59
export default {
任超 committed
60
  data () {
任超 committed
61 62
    return {
      // 日均接入量
xiaomiao committed
63 64 65 66 67 68
      qxerrer: 0,
      qxsuccess: 0,
      sterrer: 0,
      stsuccess: 0,
      qxjrl: 50300,
      stjrl: 50300,
任超 committed
69
    };
xiaomiao committed
70
  },
任超 committed
71
  mounted () {
xiaomiao committed
72 73
    this.getsthjqxjrtotal();
  },
xiaomiao committed
74
  components: { columnar },
任超 committed
75
  computed: {
xiaomiao committed
76 77 78
    qxjrlList: function () {
      return this.qxjrl.toString().split("");
    },
任超 committed
79
    stjrlList: function () {
xiaomiao committed
80
      return this.stjrl.toString().split("");
任超 committed
81 82
    },
    sbqkgsList: function () {
xiaomiao committed
83 84 85 86 87 88 89
      const numbers = this.sbqkgs.toString().split("").reverse();
      const segs = [];
      while (numbers.length) segs.push(numbers.splice(0, 3).join(""));
      return segs.join(",").split("").reverse().join("");
    },
  },
  methods: {
任超 committed
90
    getsthjqxjrtotal () {
xiaomiao committed
91 92 93 94 95 96 97
      return new Promise(async (resolve) => {
        try {
          let p = {
            DJLX: "A21",
            QLLX: "A8",
            XZQDM: "A20",
          };
任超 committed
98
          let res = await work.getsthjqxjrtotal(p);
xiaomiao committed
99 100 101 102 103
        } catch (error) {
          this.$refs.msg.messageShow();
        }
      });
    },
任超 committed
104
  },
xiaomiao committed
105 106 107 108
};
</script>

<style lang="scss" scoped>
xiaomiao committed
109
.leftcard {
任超 committed
110
  width: 32%;
任超 committed
111
  height: calc(100% -94px);
任超 committed
112 113
  display: flex;
  flex-direction: column;
任超 committed
114

任超 committed
115 116 117 118
  .card {
    background: url("~@/image/homeLeftBg.png") no-repeat;
    background-size: 100% 100%;
    position: relative;
任超 committed
119
    padding: 8px 0;
任超 committed
120
    height: 170px;
任超 committed
121 122 123 124 125 126
  }

  .card1 {
    background: url("~@/image/qxsj.png") no-repeat;
    background-size: 100% 100%;
    position: relative;
任超 committed
127
    padding: 10px 0;
任超 committed
128 129 130
    box-sizing: border-box;
    flex: 1;
    height: 100%;
任超 committed
131 132
  }

xiaomiao committed
133
  .cardhead {
xiaomiao committed
134
    color: #02d9fd;
任超 committed
135 136 137 138 139 140 141 142 143 144 145 146 147 148
    line-height: 24px;
    letter-spacing: 2px;
    position: absolute;
    font-size: 20px;
    left: 0;
    right: 0;
    margin: auto;
    text-align: center;
    top: 8px;
    font-weight: 700;
  }

  .rjjrlList {
    display: flex;
任超 committed
149
    margin-top: 15px;
任超 committed
150

任超 committed
151
    .qxjr {
xiaomiao committed
152
      background: url("~@/image/jrl3.png");
任超 committed
153 154 155
    }

    .sthj {
xiaomiao committed
156
      background: url("~@/image/jh.png");
任超 committed
157 158 159
    }

    p {
任超 committed
160 161 162 163 164
      margin: 0 3px 10px 3px;
      font-weight: 700;
      width: 24px;
      height: 36px;
      font-size: 30px;
任超 committed
165
      font-size: 32px;
任超 committed
166
    }
xiaomiao committed
167
  }
任超 committed
168

xiaomiao committed
169 170
  .cardcontent {
    width: 100%;
任超 committed
171
    height: 100%;
xiaomiao committed
172
    display: flex;
任超 committed
173 174
    padding: 35px 20px 20px 20px;
    box-sizing: border-box;
xiaomiao committed
175
    color: #e3f1ff;
任超 committed
176 177 178 179 180

    .cardcontent-left {
      width: 60%;
      flex-direction: column;
      position: relative;
xiaomiao committed
181
    }
任超 committed
182 183 184 185 186

    .cardcontent-left::before {
      position: absolute;
      right: 0;
      top: 20px;
xiaomiao committed
187
      content: "";
任超 committed
188 189
      width: 1px;
      height: 90px;
任超 committed
190 191 192 193
      background: linear-gradient(180deg,
          #091b4c 0%,
          #47b5e0 56%,
          #091b4c 100%);
xiaomiao committed
194
    }
xiaomiao committed
195

任超 committed
196 197 198 199
    .cardcontent-right {
      flex: 1;
      width: 100%;
      flex-direction: column;
任超 committed
200 201 202
      font-size: 16px;

      .bad {
xiaomiao committed
203
        color: #c97168;
任超 committed
204 205 206
      }

      .cg {
xiaomiao committed
207
        color: #5fba7d;
任超 committed
208 209 210 211 212 213 214 215 216 217 218 219 220
      }

      p {
        margin-bottom: 8px;

        span:nth-child(1) {
          margin-right: 15px;
        }

        span:nth-child(2) {
          font-size: 20px;
          font-weight: 900;
        }
任超 committed
221
      }
xiaomiao committed
222 223 224
    }
  }
}
xiaomiao committed
225
</style>