Commit 7bc83a977edd929c0c58bdcbedfb0565d6e89de5
1 parent
e7874705
在停缴费
Showing
8 changed files
with
152 additions
and
9 deletions
src/assets/images/carBlack.png
0 → 100644
1.62 KB
src/assets/images/carBlue.png
0 → 100644
1.88 KB
src/assets/images/carGreen.png
0 → 100644
3.33 KB
src/assets/images/carWhite.png
0 → 100644
1.45 KB
src/assets/images/carYellow.png
0 → 100644
1.84 KB
src/assets/images/free-tip.png
0 → 100644
1.16 KB
src/assets/images/noRecord.png
0 → 100644
13.1 KB
src/components/parkRecord.vue
1 | 1 | <template> |
2 | 2 | <div> |
3 | 3 | <div v-if="parkList.length>0"> |
4 | - <ul class="tabWrap" > | |
4 | + <ul class="tabWrap"> | |
5 | 5 | <li v-for="(i,index) in tabList" |
6 | 6 | :key="i.id" |
7 | 7 | :class="{tabActive:currentTabActive == index}" |
... | ... | @@ -10,16 +10,50 @@ |
10 | 10 | </li> |
11 | 11 | </ul> |
12 | 12 | |
13 | + | |
14 | + <!--本次缴费--> | |
13 | 15 | <div v-show="currentTabActive==0"> |
14 | 16 | |
17 | + <div> | |
18 | + <p class="free-tip">您为会员卡车辆无需缴费,请直接离场。</p> | |
19 | + | |
20 | + <div class="cost-main"> | |
21 | + <ul class="cost-header"> | |
22 | + <li :class="carColor | formatColor">蒙DMW169</li> | |
23 | + <li>本次费用</li> | |
24 | + </ul> | |
25 | + | |
26 | + <div class="cost-body"> | |
27 | + <p>车辆类型:临停车</p> | |
28 | + <p>车场名称:赤峰金店南 | |
29 | + </p> | |
30 | + <p> 进场时间:2020-12-19 12:59:18 | |
31 | + </p> | |
32 | + <p>出场时间:2020-12-19 12:17:52 | |
33 | + </p> | |
34 | + <p>停车时长:18分钟33秒</p> | |
35 | + <div class="out-wrap"> | |
36 | + <p class="mon-wrap">1.50元</p> | |
37 | + <p class="out-btn">出场缴费</p> | |
38 | + </div> | |
39 | + </div> | |
40 | + </div> | |
41 | + </div> | |
42 | + <!--没有在停费用--> | |
43 | + <div class="noRecord">暂无记录</div> | |
44 | + | |
45 | + | |
15 | 46 | </div> |
47 | + | |
48 | + | |
49 | + <!--历史缴费--> | |
16 | 50 | <div v-show="currentTabActive==1">1</div> |
17 | 51 | |
18 | 52 | </div> |
19 | 53 | |
20 | 54 | |
21 | - <div v-else> | |
22 | - 暂无停车记录 | |
55 | + <div v-else class="noRecord"> | |
56 | + 暂无记录 | |
23 | 57 | </div> |
24 | 58 | </div> |
25 | 59 | </template> |
... | ... | @@ -29,23 +63,46 @@ export default { |
29 | 63 | name: 'parkRecord', |
30 | 64 | data() { |
31 | 65 | return { |
32 | - tabList: [ | |
66 | + tabList: [ // 切换数据 | |
33 | 67 | { text: '在停缴费', id: 1 }, |
34 | 68 | { text: '离场待缴', id: 2 }, |
35 | 69 | ], |
36 | - currentTabActive: 0, | |
37 | - carNumber: '', | |
38 | - parkList:[1] | |
70 | + carColor: 1,// 车牌颜色 | |
71 | + currentTabActive: 0, // 显示当前哪个 | |
72 | + carNumber: '', // 车牌号码 | |
73 | + parkList: [1] // 停车记录数据 | |
39 | 74 | } |
40 | 75 | }, |
41 | 76 | created() { |
42 | - this.carNumber = this.$route.query.carNumber | |
77 | + this.carNumber = this.$route.query.carNumber // 获取车牌号 | |
43 | 78 | console.log(this.carNumber) |
44 | 79 | }, |
45 | 80 | methods: { |
46 | - tabHandle(index) { | |
81 | + tabHandle(index) { // tab 切换 | |
47 | 82 | this.currentTabActive = index |
48 | 83 | } |
84 | + }, | |
85 | + filters: { | |
86 | + formatColor(val) { | |
87 | + switch (val) { | |
88 | + case 0: | |
89 | + return 'carBlue' | |
90 | + break; | |
91 | + case 1: | |
92 | + return 'carYellow' | |
93 | + break; | |
94 | + case 2: | |
95 | + return 'carGreen' | |
96 | + break; | |
97 | + case 3: | |
98 | + return 'carWhite' | |
99 | + break; | |
100 | + case 4: | |
101 | + return 'carBlack' | |
102 | + break; | |
103 | + | |
104 | + } | |
105 | + } | |
49 | 106 | } |
50 | 107 | } |
51 | 108 | </script> |
... | ... | @@ -68,4 +125,90 @@ export default { |
68 | 125 | font-weight: bold; |
69 | 126 | } |
70 | 127 | } |
128 | + | |
129 | + .free-tip { | |
130 | + height: 25px; | |
131 | + line-height: 25px; | |
132 | + padding-left: 45px; | |
133 | + background: #FEF8DB url("../assets/images/free-tip.png") no-repeat 18px center; | |
134 | + background-size: 18px 18px; | |
135 | + } | |
136 | + | |
137 | + .cost-main { | |
138 | + padding-left: 18px; | |
139 | + background: #fff; | |
140 | + } | |
141 | + | |
142 | + .cost-header { | |
143 | + display: flex; | |
144 | + justify-content: space-between; | |
145 | + height: 45px; | |
146 | + line-height: 45px; | |
147 | + border-bottom: 1px solid #DFDFDF; | |
148 | + font-weight: bold; | |
149 | + li:first-child { | |
150 | + width: 150px; | |
151 | + &.carBlue { | |
152 | + background: url("../assets/images/carBlue.png") no-repeat 90px center; | |
153 | + background-size: 28px 17px; | |
154 | + } | |
155 | + &.carYellow { | |
156 | + background: url("../assets/images/carYellow.png") no-repeat 90px center; | |
157 | + background-size: 28px 17px; | |
158 | + } | |
159 | + &.carGreen { | |
160 | + background: url("../assets/images/carGreen.png") no-repeat 90px center; | |
161 | + background-size: 28px 17px; | |
162 | + } | |
163 | + &.carWhite { | |
164 | + background: url("../assets/images/carWhite.png") no-repeat 90px center; | |
165 | + background-size: 28px 17px; | |
166 | + } | |
167 | + &.carBlack { | |
168 | + background: url("../assets/images/carBlack.png") no-repeat 90px center; | |
169 | + background-size: 28px 17px; | |
170 | + } | |
171 | + } | |
172 | + li:last-child { | |
173 | + margin-right: 18px; | |
174 | + color: #BC0202; | |
175 | + } | |
176 | + } | |
177 | + | |
178 | + .cost-body { | |
179 | + padding-top: 10px; | |
180 | + position: relative; | |
181 | + > p { | |
182 | + padding-bottom: 10px; | |
183 | + } | |
184 | + .out-wrap { | |
185 | + position: absolute; | |
186 | + right: 18px; | |
187 | + top: 50%; | |
188 | + transform: translateY(-50%); | |
189 | + .mon-wrap { | |
190 | + font-size: 16px; | |
191 | + color: #333; | |
192 | + font-weight: bold; | |
193 | + } | |
194 | + .out-btn { | |
195 | + width: 72px; | |
196 | + height: 24px; | |
197 | + margin-top: 18px; | |
198 | + line-height: 24px; | |
199 | + text-align: center; | |
200 | + background: linear-gradient(180deg, #3885D9 0%, #4194EF 100%); | |
201 | + border-radius: 4px; | |
202 | + color: #FFF; | |
203 | + cursor: pointer; | |
204 | + } | |
205 | + } | |
206 | + } | |
207 | + | |
208 | + .noRecord { | |
209 | + padding-top: 200px; | |
210 | + background: url("../assets/images/noRecord.png") no-repeat center 60px; | |
211 | + background-size: 161px 124px; | |
212 | + text-align: center; | |
213 | + } | |
71 | 214 | </style> | ... | ... |