|
|
<template> <view class="pageBgImg pad"> <view class="searchBox"> <searchRow placeholder="搜索学员姓名、学员手机号"></searchRow> </view> <view class="card"> <view class="myClass"> <view class="leftTxt">我的排课</view> <view class="leftBtn" @click="$goPage('/pages/recordEntry/operate/mySchedule/mySchedule')">去管理</view> </view> </view> <view class="tabs"> <view class="tab" v-for="(item,index) in tabArr" :key="index" :class="{active: currentTab==item.id}" @click="changeTab(item)">{{ item.text }}</view> </view> <view class="screen_row"> <view class="selectItem" @click="showSubject=true"> <view class="text oneRowText">{{screen.subject}}</view> <view class="downIcon"> <u-icon name="arrow-down"></u-icon> </view> </view> <view class="selectItem" @click="showCar=true"> <view class="text oneRowText">{{screen.car}}</view> <view class="downIcon"> <u-icon name="arrow-down"></u-icon> </view> </view> <view class="selectItem" @click="showDatePicker=true"> <view class="text">{{screen.timer}}</view> <view class="downIcon"> <u-icon name="arrow-down"></u-icon> </view> </view> </view>
<view class="list"> <view class="card"> <appointItem-operate @click.native="$goPage('/pages/recordEntry/operate/detail/detail')"/> </view> </view> <UserTab name ='实操训练'></UserTab> <u-datetime-picker :show="showDatePicker" mode="date" :visibleItemCount="4" :closeOnClickOverlay="false" @confirm="confirmDatePicker" ></u-datetime-picker> <u-picker :show="showCar" :columns="carArr" keyName="lab" @confirm="confirmCar" @cancel="showCar=false"></u-picker> <u-picker :show="showSubject" :columns="subjectArr" keyName="lab" @confirm="confirmSubject" @cancel="showSubject=false"></u-picker> </view> </template>
<script> export default { data() { return { tabArr: [{ text: '待上课', id: 1 }, { text: '已完成', id: 2 }, { text: '已取消', id: 3 }, ], currentTab: 1, screen: { 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() { console.log('我的页面') }, onShow() { uni.hideTabBar(); }, 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 } } } </script>
<style lang="scss" scoped> .pageBgImg { .searchBox { padding: 140rpx 0 24rpx 0; } .card { padding: 0 28rpx; margin-bottom: 20rpx; .myClass { height: 108rpx; display: flex; justify-content: space-between; padding: 0 10rpx; align-items: center; .leftTxt { font-size: 32rpx; font-weight: 500; } .leftBtn { width: 192rpx; height: 60rpx; background: $themC; border-radius: 8rpx; line-height: 60rpx; text-align: center; font-weight: 500; color: #FFFFFF; } } } .tabs { height: 72rpx; background: #FFFFFF; border-radius: 16rpx; display: flex; line-height: 72rpx; text-align: center; color: #ADADAD; margin: 24rpx 0; .tab { flex: 1; text-align: center;
&.active { background: rgba(25, 137, 250, 0.1); border: 2rpx solid #1989FA; color: $themC; border-radius: 16rpx; } } } .screen_row { display: flex; margin-bottom: 24rpx; width: 100%; justify-content: space-between; .selectItem { display: flex; padding: 0 18rpx; border: 2rpx solid rgba(25,137,250,0.3); height: 60rpx; border-radius: 16rpx; background-color: #FFFFFF; line-height: 60rpx; align-items: center; width: 29%; .text { color: $themC; flex: 1; white-space: nowrap; text-align: center; } .downIcon { width: 24rpx; } } }
.list { .card { appointitem-operate {} } } } </style>
|