无人机管理后台前端(已迁走)
张含笑
2025-07-12 34fa8e93e596ecdee9a7e8278bcd80be7b896651
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
<template>
 <div class="taskOutcome">
    <div class="card-title">
      <div class="cardtotal">
        <p>任务成果</p>
        <span class="total-number">1856</span>
        <p>个</p>
        <img @click="refresh" src="/src/assets/images/workbench/st1.png" alt="" />
      </div>
      <div class="time-card">
        <div
          class="card-item"
          :class="item === checked ? 'active' : ''"
          v-for="(item, index) in timeListEnum"
          :key="index"
          @click="timeClick(item, index)"
        >
          {{ timeListStr[index] }}
        </div>
      </div>
    </div>
 </div>
</template>
 
<script setup >
let checked = ref('CURRENT_YEAR');
let timeListStr = ['本周', '本月', '本年'];
let timeListEnum = ['CURRENT_WEEK', 'CURRENT_MONTH', 'CURRENT_YEAR'];
const params = ref({
  date_enum: 'CURRENT_YEAR',
  device_sn: '',
  end_date: undefined,
  start_date: undefined,
});
const dateSelect = ref('CURRENT_YEAR');
 
let timeClick = (item, index) => {
  checked.value = item;
  params.value.date_enum = item;
  dateSelect.value = item;
 
};
</script>
 
<style scoped lang="scss">
.taskOutcome {
  border-radius: 8px 8px 8px 8px;
  padding: 4px 14px 0 15px;
  background: #ffffff !important;
  margin-top: 10px;
  margin-left: 10px;
  height: 100%;
.card-title {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
    justify-content: space-between;
    .cardtotal {
      display: flex;
      align-items: center;
      margin-left: 9px;
      img {
        width: 17px;
        height: 17px;
        margin-left: 6px;
        cursor: pointer;
      }
      p {
        font-weight: bold;
        font-size: 14px;
        color: #363636;
      }
 
      span {
        font-weight: 400;
        font-size: 14px;
        color: #7c8091;
      }
 
      .total-number {
        font-family: 'Source Han Sans CN';
 
        font-weight: bold;
        font-size: 32px;
        color: #2a54ff;
      }
    }
 
    img {
      width: 36px;
      height: 40px;
    }
  }
}
 
  .time-card {
  text-align: center;
  // height: 30px;
  height: pxToVh(30);
  background: #ffffff;
 
  border: 1px solid #e5e5e5;
  font-weight: 400;
  font-size: 14px;
  color: #7c8091;
  display: flex;
  width: 282px;
  margin-left: 15px;
  border-radius: 4px;
 
  .card-item {
    width: 94px;
    height: 100%;
    line-height: 28px;
    cursor: pointer;
    font-family: 'Source Han Sans CN';
    font-weight: 400;
    font-size: 14px;
    color: #7c8091;
  }
 
  .card-item:first-child {
    border-right: 1px solid #e5e5e5;
  }
 
  .card-item:nth-child(2) {
    border-right: 1px solid #e5e5e5;
  }
 
  .card-item.active {
    color: #1441ff;
    border: 1px solid #1c5cff;
  }
}
</style>