|
|
<template> <view class="pageBgImg pad"> <view class="searchBox"> <searchRow placeholder="搜索学员姓名、学员手机号"></searchRow> </view> <view class="card" v-if="identity=='实操教练'"> <view class="addStudent"> <view class="h2">我的学员</view> <view class="btnBg" @click="$goPage('/pages/recordEntry/student/addStudent/addStudent')">手动添加</view> </view> </view> <view class="card"> <view class="statistics"> <view class="statisticsItem"> <view class="val">260</view> <view class="lab">累计学员数量</view> </view> <view class="statisticsItem"> <view class="val">260</view> <view class="lab">今日新增学员</view> </view> <view class="statisticsItem" v-if="identity=='校长'"> <view class="val">260</view> <view class="lab">今日退学学员</view> </view> </view> </view> <view class="screen_row"> <view class="selectItem" @click="showDatePicker=true"> <view class="text ">{{screen.timer}}</view> <view class="downIcon"> <u-icon name="arrow-down" :size="'28rpx'"></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" :size="'28rpx'"></u-icon> </view> </view> <view class="selectItem" @click="showClass=true"> <view class="text oneRowText">{{screen.className}}</view> <view class="downIcon"> <u-icon name="arrow-down" :size="'28rpx'"></u-icon> </view> </view> </view> <view class="list"> <view class="card" @click="$goPage('/pages/recordEntry/student/studentDetail/studentDetail')"> <appointItem-student/> </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="showClass" :columns="classArr" keyName="lab" @confirm="confirmClass" @cancel="showClass=false"></u-picker> </view> </template>
<script> export default { data() { return { screen: { 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 } } } </script>
<style lang="scss" scoped> .card { padding: 0 28rpx; margin-bottom: 24rpx; } .searchBox { padding: 140rpx 0 24rpx 0; } .addStudent { height: 108rpx; background: #FFFFFF; border-radius: 16rpx; display: flex; align-items: center; justify-content: space-between; .h2 { font-size: 32rpx; font-weight: 500; } .btnBg { width: 192rpx; } } .statistics { display: flex; height: 200rpx; .statisticsItem { display: flex; align-items: center; justify-content: center; flex-direction: column; flex: 1; .val { font-weight: 600; font-size: 56rpx; color: $themC; position: relative; &::before { content: '个'; position: absolute; right: -30rpx; bottom: 10rpx; font-size: 24rpx; font-weight: 400; } } .lab { font-size: 28rpx; // margin-top: 20rpx;
} } } .screen_row { display: flex; margin-bottom: 24rpx; width: 100%; justify-content: space-between; .selectItem { display: flex; 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: 29%; .text { color: $themC; flex: 1; text-align: center; } .downIcon { width: 24rpx; } } } </style>
|