From 0a8de92470a07e6d16414c86796637286139d307 Mon Sep 17 00:00:00 2001 From: unknown <331404948@qq.com> Date: Wed, 13 Sep 2023 19:01:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/UserTab/UserTab.vue | 2 +- pages/tabbar/operateTrain/index.vue | 57 +++++++++++++++++++++++++++++++---- pages/tabbar/student/index.vue | 60 ++++++++++++++++++++++++++++++++----- 3 files changed, 105 insertions(+), 14 deletions(-) diff --git a/components/UserTab/UserTab.vue b/components/UserTab/UserTab.vue index 8506f0f..448c56c 100644 --- a/components/UserTab/UserTab.vue +++ b/components/UserTab/UserTab.vue @@ -33,7 +33,7 @@ //教练 _this.list = [{ "pagePath": "/pages/tabbar/statistics/index", - "text": "首页", + "text": "统计", "iconPath": require("../../static/images/tabbar/tj.png"), "selectedIconPath": require("../../static/images/tabbar/tjActive.png") }, diff --git a/pages/tabbar/operateTrain/index.vue b/pages/tabbar/operateTrain/index.vue index ec641f2..ee68cdc 100644 --- a/pages/tabbar/operateTrain/index.vue +++ b/pages/tabbar/operateTrain/index.vue @@ -14,20 +14,20 @@ @click="changeTab(item)">{{ item.text }} - + {{screen.subject}} - + {{screen.car}} - - {{screen.timer}} + + {{screen.timer}} @@ -40,6 +40,17 @@ + + + + + @@ -65,7 +76,22 @@ subject: '训练科目', car: '预约车辆', timer: '预约时间' - } + }, + showDatePicker: false, + showCar: false, + showSubject: false, + carArr: [ + [ + {lab: 'C1',id: 1}, + {lab: 'C2',id: 2}, + ] + ], + subjectArr: [ + [ + {lab: '浙00006',id: 1}, + {lab: '浙00007',id: 2}, + ] + ], } }, onLoad() { @@ -77,6 +103,23 @@ methods: { changeTab(item) { this.currentTab = item.id + }, + confirmDatePicker(val) { + this.showDatePicker = false + console.log(val) + console.log(uni.$u.date(val.value, 'yyyy-mm-dd')) + this.screen.timer = uni.$u.date(val.value, 'yyyy-mm-dd') + console.log(this.screen.timer) + }, + confirmCar(val) { + let item = val.value[0] + this.screen.car = item.lab + this.showCar = false + }, + confirmSubject(val) { + let item = val.value[0] + this.screen.subject = item.lab + this.showSubject = false } } } @@ -146,10 +189,12 @@ background-color: #FFFFFF; line-height: 60rpx; align-items: center; - width: 28.6%; + width: 29%; .text { color: $themC; flex: 1; + white-space: nowrap; + text-align: center; } .downIcon { width: 24rpx; diff --git a/pages/tabbar/student/index.vue b/pages/tabbar/student/index.vue index c035b9f..7bb251c 100644 --- a/pages/tabbar/student/index.vue +++ b/pages/tabbar/student/index.vue @@ -28,19 +28,19 @@ - - {{screen.timer}} + + {{screen.timer}} - + {{screen.car}} - + {{screen.className}} @@ -54,6 +54,17 @@ + + + + + @@ -65,12 +76,46 @@ timer: '报名时间', car: '全部车型', className: '全部班型' - } + }, + showDatePicker: false, + showCar: false, + showClass: false, + carArr: [ + [ + {lab: 'C1',id: 1}, + {lab: 'C2',id: 2}, + ] + ], + classArr: [ + [ + {lab: '普通班型',id: 1}, + {lab: 'C2vip',id: 2}, + ] + ], } }, onShow() { uni.hideTabBar(); }, + methods: { + confirmDatePicker(val) { + this.showDatePicker = false + console.log(val) + console.log(uni.$u.date(val.value, 'yyyy-mm-dd')) + this.screen.timer = uni.$u.date(val.value, 'yyyy-mm-dd') + console.log(this.screen.timer) + }, + confirmCar(val) { + let item = val.value[0] + this.screen.car = item.lab + this.showCar = false + }, + confirmClass(val) { + let item = val.value[0] + this.screen.className = item.lab + this.showClass = false + } + } } @@ -137,17 +182,18 @@ justify-content: space-between; .selectItem { display: flex; - padding: 0 18rpx; + padding: 0 16rpx; border: 2rpx solid rgba(25,137,250,0.3); height: 60rpx; border-radius: 16rpx; background-color: #FFFFFF; line-height: 60rpx; align-items: center; - width: 28.6%; + width: 29%; .text { color: $themC; flex: 1; + text-align: center; } .downIcon { width: 24rpx;