lanan-app/pages/my/StatisticsInfo.vue

209 lines
3.9 KiB
Vue
Raw Normal View History

2024-08-20 20:02:05 +08:00
<template>
<view class="centenr">
2024-08-22 21:41:29 +08:00
<view style="background-color: rgb(49, 125, 250);">
2024-08-22 19:34:47 +08:00
<v-navigation-bar-vue title="数据统计"></v-navigation-bar-vue>
<view class="queryDate">
<text>日期</text>
<view class="dateForm" @click="() => dateModalVisible = true">
<text v-if="!startDate" class="placeholder">开始日期</text>
<text v-else>{{ startDate }}</text>
<image class="dateFormIcon" src="../../static/icons/statisticsinfo/rili@2x.png" mode="aspectFit"></image>
2024-08-20 20:02:05 +08:00
</view>
</view>
2024-08-22 21:41:29 +08:00
</view>
2024-08-20 20:02:05 +08:00
<view class="ail">
<view class="san_" v-for="(item,index) in dataList " :key="index">
<view class="s_box">
<view class="title_">姓名</view>
<view class="nums">{{item.driverName}}</view>
</view>
<view class="s_box">
<view class="title_">金额</view>
<view class="nums">{{item.money}}</view>
</view>
<view class="s_box">
<view class="title_">数量</view>
<view class="nums">{{item.rescueNum}}</view>
</view>
</view>
</view>
2024-08-22 19:34:47 +08:00
<tab-bar msg="1"></tab-bar>
<view>
<u-calendar show-confirm @close="dateClose" @confirm="dateChange" :show="dateModalVisible" mode="single"></u-calendar>
</view>
2024-08-20 20:02:05 +08:00
</view>
</template>
<script>
import request from '../../utils/request';
2024-08-22 19:34:47 +08:00
import tabBar from '../../components/tabBar/tabBar.vue'
import VNavigationBarVue from '../../components/VNavigationBar.vue';
2024-08-20 20:02:05 +08:00
export default {
2024-08-22 19:34:47 +08:00
components: {
tabBar,
VNavigationBarVue
},
2024-08-20 20:02:05 +08:00
data() {
return {
dataList: [],
tapindex: 0,
typeList: [{
name: '日',
type: 'day'
},
{
name: '周',
type: 'week'
},
{
name: '月',
type: 'month'
},
],
2024-08-22 19:34:47 +08:00
type: 'day',
dateModalVisible: false,
startDate: ''
2024-08-20 20:02:05 +08:00
}
},
onShow() {
this.getDataList()
},
methods: {
2024-08-22 19:34:47 +08:00
dateChange(e) {
if (e && e.length > 0) {
this.startDate = e[0]
}
console.log('e: ',e);
this.dateModalVisible = false
},
dateClose() {
this.dateModalVisible = false
},
2024-08-20 20:02:05 +08:00
getback() {
uni.navigateBack()
},
gettapindex(index, type) {
this.tapindex = index
this.type = type
this.getDataList()
},
async getDataList() {
request({
url: "/app/rescueInfo/statisticsInfo",
method: 'get',
params: {
type: this.type
}
}).then(res => {
this.dataList = res.data
})
}
},
}
</script>
<style scoped lang="scss">
.centenr {
display: flex;
2024-08-22 19:34:47 +08:00
flex-direction: column;
height: 100%;
2024-08-20 20:02:05 +08:00
}
2024-08-22 21:41:29 +08:00
2024-08-22 19:34:47 +08:00
.queryDate {
padding: 26rpx 32rpx;
background-color: #317DFA;
color: #fff;
2024-08-20 20:02:05 +08:00
display: flex;
align-items: center;
2024-08-22 19:34:47 +08:00
column-gap: 30rpx;
.dateForm {
flex: 1;
width: 0;
background: #FFFFFF;
border-radius: 12rpx;
padding: 14rpx 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
color: #000;
.placeholder {
color: #C0C4CD;
font-size: 24rpx;
}
2024-08-22 21:41:29 +08:00
2024-08-22 19:34:47 +08:00
.dateFormIcon {
width: 36rpx;
height: 36rpx;
}
}
2024-08-20 20:02:05 +08:00
}
.ail {
2024-08-22 19:34:47 +08:00
flex: 1;
height: 0;
overflow: auto;
2024-08-20 20:02:05 +08:00
width: 100%;
box-sizing: border-box;
2024-08-22 19:34:47 +08:00
padding: 10rpx 34rpx 120rpx;
2024-08-20 20:02:05 +08:00
background-color: #f7f7f7;
}
.san_ {
width: 100%;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-around;
margin: 10px 0px;
2024-08-22 19:34:47 +08:00
background: #F7F8FC;
box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0,0,0,0.05);
border-radius: 16rpx;
border: 2rpx solid rgba(50,125,251,0.05);
backdrop-filter: blur(20px);
2024-08-20 20:02:05 +08:00
}
.s_box {
width: 33%;
}
.title_ {
2024-08-22 19:34:47 +08:00
padding: 16rpx;
2024-08-20 20:02:05 +08:00
text-align: center;
2024-08-22 19:34:47 +08:00
background: #fff;
color: #333;
2024-08-20 20:02:05 +08:00
}
.nums {
2024-08-22 19:34:47 +08:00
padding: 26rpx;
2024-08-20 20:02:05 +08:00
font-size: 16px;
text-align: center;
2024-08-22 19:34:47 +08:00
// font-weight: bold;
color: #327DFB;
2024-08-20 20:02:05 +08:00
}
.distap {
display: flex;
align-items: center;
margin: 10px;
}
.tapbox {
width: 38px;
height: 38px;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.act {
background: #003bbc !important;
color: #fff !important;
}
2024-08-22 21:41:29 +08:00
</style>