forked from drone/command-center-dashboard

chenyao
2025-03-28 147cde29a36bc9f00e7c6fd313ea84f7bddc10af
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
<script setup>
import CommonTitle from '@/components/CommonTitle.vue';
import { wToR } from '@/utils/pxConver';
import overviewImg1 from '@/assets/images/home/homeRight/overview1.png';
import overviewImg2 from '@/assets/images/home/homeRight/overview2.png';
import overviewImg3 from '@/assets/images/home/homeRight/overview3.png';
import overviewImg4 from '@/assets/images/home/homeRight/overview4.png';
import overviewImg5 from '@/assets/images/home/homeRight/overview5.png';
import overviewImg6 from '@/assets/images/home/homeRight/overview6.png';
 
const list = ref([
  { name: '待审核', value: 265, img: overviewImg1, color: '#FF8E8E' },
  { name: '待分拨', value: 266, img: overviewImg2, color: '#6FCAFF' },
  { name: '待处理', value: 262, img: overviewImg3, color: '#6FCAFF' },
  { name: '处理中', value: 262, img: overviewImg4, color: '#FFD509' },
  { name: '已完成', value: 246, img: overviewImg5, color: '#FF8E8E' },
  { name: '已完结', value: 262, img: overviewImg6, color: '#8EFFAC' },
]);
</script>
 
<template>
  <CommonTitle title="事件概况" />
  <div :style="{ marginLeft: wToR(14) }">
    <div class="eventOverview">
      <div class="overviewData">
        <div class="totalBox">
          <div class="totalNumber">8096</div>
          <div class="totalLabel">总事件数</div>
        </div>
        <div class="contentBox">
          <div class="overviewItem" v-for="item in list" :key="item.name">
            <div class="itemName"><img :src="item.img" alt="" />{{ item.name }}</div>
            <div class="itemValue" :style="{ color: item.color }">{{ item.value }}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
 
<style scoped lang="scss">
.eventOverview {
  width: 390px;
  height: hToV(445);
  background: linear-gradient(
    270deg,
    #1f3e7a 0%,
    rgba(31, 62, 122, 0.35) 79%,
    rgba(31, 62, 122, 0) 100%
  );
  border-radius: 0px 0px 0px 0px;
  opacity: 0.85;
  margin: hToV(3) 0 0 0;
  padding-top: hToV(15);
  display: flex;
  flex-direction: column;
  align-items: center;
 
  .overviewData {
    width: 360px;
    height: hToV(122);
    background: url('@/assets/images/home/homeRight/overviewBg.png') no-repeat center / 100% 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 11px;
 
    .totalBox {
      .totalNumber {
        font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
        font-weight: 400;
        font-size: 26px;
        color: #ffffff;
        line-height: hToV(30);
        text-align: center;
      }
 
      .totalLabel {
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 400;
        font-size: 14px;
        color: #ffffff;
        line-height: hToV(20);
        text-align: center;
      }
    }
 
    .contentBox {
      width: 246px;
      display: flex;
      flex-wrap: wrap;
      gap: hToV(13) 0;
      font-family: Source Han Sans CN, Source Han Sans CN, serif;
      font-weight: 400;
      font-size: 14px;
      color: #ffffff;
      line-height: hToV(14);
 
      .overviewItem {
        width: calc(100% / 3);
 
        .itemName {
          display: flex;
          align-items: center;
          margin-bottom: hToV(6);
 
          img {
            width: 16px;
            height: hToV(16);
          }
        }
 
        .itemValue {
          font-family: YouSheBiaoTiHei, YouSheBiaoTiHei, serif;
          font-weight: 400;
          font-size: 24px;
          line-height: hToV(18);
        }
      }
    }
  }
}
</style>