forked from drone/command-center-dashboard

罗广辉
2025-04-21 2800fa4f32f3900509cb4d6eefaf2bfaf54efdd7
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<template>
  <CommonTitle title="任务成果" />
  <div :style="{ marginLeft: pxToRem(14) }">
    <div class="taskAchievements">
      <div class="rawData">
        <div class="bigTitle">原始<br />数据</div>
        <div class="rawDataRight">
          <img src="../../../assets/images/home/homeRight/rowData.png" alt="" />
          <div class="rawDataContent">
            <div>
              <div class="title">照片总数(张)</div>
              <div class="value">{{ photoNum }}</div>
            </div>
            <div>
              <div class="title">视频总数(个)</div>
              <div class="value">{{ videoNum }}</div>
            </div>
          </div>
        </div>
      </div>
      <div class="processingData">
        <div class="bigTitle">处理<br />数据</div>
        <div class="data-right">
          <div v-for="item in list">
            <img :src="item.img" alt="" />
            <div class="content">
              <div class="title">{{ item.name }}</div>
              <div class="value" :style="{ color: item.color }">{{ item.value }}</div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup>
import CommonTitle from '@/components/CommonTitle.vue';
import { pxToRem } from '@/utils/rem';
import data1 from '@/assets/images/home/homeRight/data1.png';
import data2 from '@/assets/images/home/homeRight/data2.png';
import data3 from '@/assets/images/home/homeRight/data3.png';
import data4 from '@/assets/images/home/homeRight/data4.png';
import {  getMediaFileCountBy } from '@/api/home'
 
const detailsFun = () => {
  console.log('details');
};
 
// 照片总数
let photoNum = ref(0);
// 视频总数
let videoNum = ref(0);
 
const list = ref([
  { name: 'AI识别', value: '0', color: '#6DD7FF', img: data1 },
  { name: '全景', value: '0', color: '#FFAD64', img: data2 },
  { name: '三维', value: '0', color: '#8EFFAC', img: data3 },
  { name: '正射', value: '0', color: '#61FFFC', img: data4 },
]);
const getStatisticalData = () => {
  getMediaFileCountBy().then((res) => {
    if (res.data.code !== 0) return;
    let result = res.data.data
    list.value[0].value = result.aiNum;
    list.value[1].value = result.fullNum;
    list.value[2].value = result.gisNum;
    list.value[3].value = result.tifNum;
    photoNum.value = result.phoneNum;
    videoNum.value = result.videoNum;
  });
};
onMounted(() => {
  getStatisticalData();
});
</script>
 
<style scoped lang="scss">
.taskAchievements {
  width: 390px;
  height: 204px;
  background: linear-gradient(
    270deg,
    #1f3e7a 0%,
    rgba(31, 62, 122, 0.35) 79%,
    rgba(31, 62, 122, 0) 100%
  );
  opacity: 0.85;
  margin: 2px 0 21px 0;
  padding-left: 17px;
  padding-top: 15px;
 
  .rawData {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 353px;
 
    .rawDataRight {
      width: 295px;
      background: url('@/assets/images/home/homeRight/rawDataBg.png') no-repeat left 32px center/ 100% 100%;
      display: flex;
 
      > img {
        height: 63px;
        width: 63px;
      }
 
      .rawDataContent {
        display: flex;
        justify-content: space-evenly;
        color: #ffffff;
        width: 0;
        flex-grow: 1;
        padding-top: 12px;
 
        .title {
          font-family: Source Han Sans CN, Source Han Sans CN, serif;
          font-weight: 400;
          font-size: 14px;
          line-height: 13px;
          text-align: left;
          margin-bottom: 6px;
        }
 
        .value {
          font-family: YouSheBiaoTiHei, YouSheBiaoTiHei, serif;
          font-weight: 400;
          font-size: 26px;
          line-height: 22px;
          text-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);
          text-align: left;
        }
      }
    }
  }
 
  .processingData {
    margin-top: 19px;
    display: flex;
    align-items: center;
 
    .data-right {
      width: 289px;
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      gap: 8px 0;
 
      > div {
        width: 135px;
        height: 42px;
        display: flex;
 
        > img {
          width: 32px;
          height: 32px;
          margin-right: 10px;
        }
 
        .content {
          width: 0;
          flex: 1;
 
          .title {
            font-family: Source Han Sans CN, Source Han Sans CN;
            font-weight: 400;
            font-size: 14px;
            color: #ffffff;
            line-height: 17px;
            text-align: left;
          }
 
          .value {
            font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
            font-weight: 400;
            font-size: 24px;
            line-height: 23px;
            text-align: left;
          }
        }
      }
    }
  }
}
 
.bigTitle {
  margin-right: 22px;
  font-family: Source Han Sans CN, Source Han Sans CN, serif;
  font-weight: bold;
  font-size: 18px;
  color: #e1f5ff;
  line-height: 22px;
}
</style>