Repository navigation
Expand file tree
/
Copy pathindex.vue
More file actions
executable file
·191 lines (169 loc) · 3.22 KB
/
Copy pathindex.vue
File metadata and controls
executable file
·191 lines (169 loc) · 3.22 KB
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
<template>
<view class="content" v-if="list.length > 0">
<view class="title">分销商级别列表</view>
<view class="advance-area">
<view class="flex-box tc thead">
<view class="item-4">级别名称</view>
<view class="item-4">销售金额(元)</view>
<view class="item-4">说明</view>
<view class="item-4">分销占比(%)</view>
</view>
<view
class="flex-box table tc"
v-for="(item, index) in list"
:key="index"
>
<view class="item-4" :class="level === item.name ? 'text-' + themeColor.name : ''">
{{ item.name }}
</view>
<view class="item-4" :class="level === item.name ? 'text-' + themeColor.name : ''">
{{ item.money }}
</view>
<view class="item-4" :class="level === item.name ? 'text-' + themeColor.name : ''">
<view class="table-flex">
<view class="item">分销商</view>
<view class="item">上级分销商</view>
<view class="item">上上级分销商</view>
</view>
</view>
<view class="item-4" :class="level === item.name ? 'text-' + themeColor.name : ''">
<view class="table-flex">
<view class="item">{{ item.level_zero }}</view>
<view class="item">{{ item.level_one }}</view>
<view class="item">{{ item.level_two }}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {};
},
props: {
list: {
type: Array,
default: () => {
return [];
}
},
level: {
type: String,
default: null
}
}
};
</script>
<style lang="scss">
$color: #e0e0e0;
.content {
padding: 30upx;
display: flex;
flex: 1;
flex-direction: column;
/*background-color: #fbf9fe;*/
}
.flex-box {
display: flex;
flex-wrap: wrap;
}
.flex-box > .item-2 {
flex: 0 0 50%;
}
.flex-box > .item-3 {
flex: 0 0 33.3333%;
}
.flex-box > .item-4 {
flex: 0 0 25%;
}
.title {
margin: 30upx 0;
font-size: $font-lg;
font-weight: 600;
color: #333;
}
//普通表格
.genaral-area {
.item-2 {
font-size: 26upx;
border: 1upx solid $color;
border-width: 1upx 1upx 0 0;
padding: 16upx 0;
box-sizing: border-box;
text-align: center;
&:first-child {
border-left-width: 1upx;
}
&:last-child {
border-right-width: 1upx;
}
}
.thead {
.item-2 {
font-weight: bold;
box-sizing: border-box;
}
}
.table {
&:last-child {
border-bottom: 1upx solid $color;
}
.item-2 {
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
}
}
}
// 多行合并表格
.advance-area {
.item-3,
.item-4 {
font-size: 26upx;
border: 1upx solid $color;
border-width: 1upx 1upx 0 0;
box-sizing: border-box;
text-align: center;
&:first-child {
border-left-width: 1upx;
}
&:last-child {
border-right-width: 1upx;
}
}
.thead {
.item-3,
.item-4 {
font-weight: bold;
padding: 16upx 0;
box-sizing: border-box;
}
}
.table {
&:last-child {
border-bottom: 1upx solid $color;
}
.item-3,
.item-4 {
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
}
}
.table-flex {
flex: 1;
.item {
border-bottom: 1upx solid $color;
padding: 10upx 0;
box-sizing: border-box;
&:last-child {
border-width: 0;
}
}
}
}
</style>