|
|
@@ -97,7 +97,8 @@ export default {
|
|
97
|
97
|
//获取统计数据
|
|
98
|
98
|
async getStatisticsSendStatus() {
|
|
99
|
99
|
const { data } = await uni.$u.api.statisticsSendStatus({ type: this.activeType });
|
|
100
|
|
- console.log('统计数据是', data)
|
|
|
100
|
+ // console.log('统计数据是', data)
|
|
|
101
|
+
|
|
101
|
102
|
this.statisticsSendStatus = data;
|
|
102
|
103
|
},
|
|
103
|
104
|
// 处理按钮点击事件
|
|
|
@@ -176,12 +177,13 @@ export default {
|
|
176
|
177
|
|
|
177
|
178
|
//滑动加载
|
|
178
|
179
|
scrolltolower() {
|
|
179
|
|
- console.log('到底了');
|
|
180
|
|
- // if (this.orderList.length >= this.page.total) {
|
|
181
|
|
- // return uni.$u.toast('没有更多了');
|
|
182
|
|
- // }
|
|
183
|
|
- this.page.pageNum++;
|
|
184
|
|
- this.getOrderList();
|
|
|
180
|
+ // console.log('到底了');
|
|
|
181
|
+ if (this.orderList.length >= this.page.total) {
|
|
|
182
|
+ //到底了,没有更多
|
|
|
183
|
+ } else {
|
|
|
184
|
+ this.page.pageNum++;
|
|
|
185
|
+ this.getOrderList();
|
|
|
186
|
+ }
|
|
185
|
187
|
},
|
|
186
|
188
|
|
|
187
|
189
|
//获取全部标签
|
|
|
@@ -236,10 +238,19 @@ export default {
|
|
236
|
238
|
},
|
|
237
|
239
|
//切换统计数据的类型
|
|
238
|
240
|
changeStatus(param) {
|
|
239
|
|
- this.activeStatus = param;
|
|
240
|
|
- this.page.pageNum = 1;
|
|
241
|
|
- this.orderList = [];
|
|
242
|
|
- this.getOrderList();
|
|
|
241
|
+ if (param == this.activeStatus) {
|
|
|
242
|
+ //如果当前点击的状态和当前选中的状态相同,则取消选中
|
|
|
243
|
+ this.activeStatus = '';
|
|
|
244
|
+ this.page.pageNum = 1;
|
|
|
245
|
+ this.orderList = [];
|
|
|
246
|
+ this.getOrderList();
|
|
|
247
|
+ } else {
|
|
|
248
|
+ //如果当前点击的状态和当前选中的状态不同,则切换选中状态
|
|
|
249
|
+ this.activeStatus = param;
|
|
|
250
|
+ this.page.pageNum = 1;
|
|
|
251
|
+ this.orderList = [];
|
|
|
252
|
+ this.getOrderList();
|
|
|
253
|
+ }
|
|
243
|
254
|
},
|
|
244
|
255
|
}
|
|
245
|
256
|
}
|
|
|
@@ -253,13 +264,16 @@ export default {
|
|
253
|
264
|
<u-tabs :list="filterList" @click="changeFilter"></u-tabs>
|
|
254
|
265
|
|
|
255
|
266
|
<!-- 统计数据 -->
|
|
256
|
|
- <view class="statisticsContainer">
|
|
257
|
|
- <view v-for="item in statisticsSendStatus" :key="item.status" @click="changeStatus(item.status)"
|
|
258
|
|
- class="statisticsItem">
|
|
259
|
|
- <view>{{ item.statusName }}</view>
|
|
260
|
|
- <view>({{ item.count || 0 }})</view>
|
|
|
267
|
+ <scroll-view scroll-x class="statusScrollView" style="width: 100%;">
|
|
|
268
|
+ <view class="statisticsContainer">
|
|
|
269
|
+ <view v-for="item in statisticsSendStatus" :key="item.status" @click="changeStatus(item.status)"
|
|
|
270
|
+ class="statisticsItem" :class="{ 'activeStatusClass': item.status == activeStatus }">
|
|
|
271
|
+ <view>{{ item.statusName }}</view>
|
|
|
272
|
+ <view>({{ item.count || 0 }})</view>
|
|
|
273
|
+ </view>
|
|
261
|
274
|
</view>
|
|
262
|
|
- </view>
|
|
|
275
|
+ </scroll-view>
|
|
|
276
|
+
|
|
263
|
277
|
|
|
264
|
278
|
<view class="scrollViewContainer">
|
|
265
|
279
|
<scroll-view class="scrollView" scroll-y @scrolltolower="scrolltolower">
|
|
|
@@ -349,7 +363,7 @@ export default {
|
|
349
|
363
|
</view>
|
|
350
|
364
|
</transition-group>
|
|
351
|
365
|
<view class="hasMore">
|
|
352
|
|
- <!-- {{ orderList.length >= page.total ? '没有更多了~' : '向下滑动加载更多~' }} -->
|
|
|
366
|
+ {{ orderList.length >= page.total ? '没有更多了~' : '向下滑动加载更多~' }}
|
|
353
|
367
|
</view>
|
|
354
|
368
|
</scroll-view>
|
|
355
|
369
|
</view>
|
|
|
@@ -587,9 +601,10 @@ export default {
|
|
587
|
601
|
|
|
588
|
602
|
.statisticsContainer {
|
|
589
|
603
|
display: flex;
|
|
590
|
|
- justify-content: space-around;
|
|
591
|
604
|
align-items: center;
|
|
592
|
|
- gap: 20rpx;
|
|
|
605
|
+ flex-wrap: nowrap;
|
|
|
606
|
+ white-space: nowrap;
|
|
|
607
|
+ padding: 0 0rpx;
|
|
593
|
608
|
}
|
|
594
|
609
|
|
|
595
|
610
|
.statisticsItem {
|
|
|
@@ -601,6 +616,18 @@ export default {
|
|
601
|
616
|
border-radius: 15rpx;
|
|
602
|
617
|
font-size: 24rpx;
|
|
603
|
618
|
font-weight: 700;
|
|
604
|
|
- width: 100rpx;
|
|
|
619
|
+ margin: 0 10rpx;
|
|
|
620
|
+ white-space: nowrap;
|
|
|
621
|
+ flex-shrink: 0;
|
|
|
622
|
+}
|
|
|
623
|
+
|
|
|
624
|
+.activeStatusClass {
|
|
|
625
|
+ background-color: #2563EB;
|
|
|
626
|
+ color: #fff;
|
|
|
627
|
+
|
|
|
628
|
+}
|
|
|
629
|
+
|
|
|
630
|
+::v-deep .u-tabs__wrapper__nav__line {
|
|
|
631
|
+ top: 7px;
|
|
605
|
632
|
}
|
|
606
|
633
|
</style>
|