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
<template>
<div class="Dashboard-Equipment">
<div
v-for="(item, index) in data.slice(0, 5)"
:key="index"
class="Dashboard-Equipment-item"
>
<div class="Dashboard-Equipment-icon" v-if="index === 0">
<img src="@/assets/images/dashboard/icon_no.1@2x.png" />
</div>
<div class="Dashboard-Equipment-icon" v-else-if="index === 1">
<img src="@/assets/images/dashboard/icon_no.2@2x.png" />
</div>
<div class="Dashboard-Equipment-icon" v-else-if="index === 2">
<img src="@/assets/images/dashboard/icon_no.3@2x.png" />
</div>
<div class="Dashboard-Equipment-icon" v-else>NO.{{ index + 1 }}</div>
<div class="Dashboard-Equipment-name">{{ item.equipmentNumber }}</div>
<div class="Dashboard-Equipment-location">
{{ item.equipmentPosition }}
</div>
<div class="Dashboard-Equipment-money">¥{{ item.money.toFixed(2) }}</div>
</div>
</div>
</template>
<script>
export default {
name: 'EquipmentList',
props: {
data: {
type: Array,
default: () => [],
},
},
};
</script>
<style lang="scss">
@import '@/assets/styles/variables.scss';
.Dashboard-Equipment {
.Dashboard-Equipment-item {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 14px;
color: #333;
text-align: center;
height: 35px;
margin: 0 10px;
border-bottom: 1px solid #f1f1f1;
&:last-child {
border-bottom: 0;
}
.Dashboard-Equipment-icon {
width: 20px;
img {
width: 16px;
height: 20px;
margin: 0 auto;
}
}
.Dashboard-Equipment-name {
width: 64px;
}
.Dashboard-Equipment-location {
width: 200px;
}
.Dashboard-Equipment-money {
font-size: 16px;
text-align: right;
width: 116px;
}
}
}
@media screen and (min-width: $bigScreenWidth) {
.Dashboard-Equipment {
.Dashboard-Equipment-item {
font-size: 16px;
height: 70px;
margin: 0 20px;
}
.Dashboard-Equipment-icon {
width: 40px;
img {
width: 32px;
height: 40px;
margin: 0 auto;
}
}
.Dashboard-Equipment-name {
width: 128px;
}
.Dashboard-Equipment-location {
width: 200px;
}
.Dashboard-Equipment-money {
font-size: 20px;
width: 116px;
}
}
}
</style>