Browse Source

计时

master
unknown 8 months ago
parent
commit
79b12e4d81
  1. 48
      components/appointItem-operate/appointItem-operate.vue
  2. 2
      config/site.config.js
  3. 5
      pages/recordEntry/operate/detail/detail.vue
  4. 25
      pages/recordEntry/operate/todayStudent/comp/appointItem-operate.vue
  5. 139
      pages/recordEntry/operate/todayStudent/todayStudent.vue
  6. 4
      pages/tabbar/mine/index.vue
  7. 2
      pages/tabbar/operateTrain/index.vue
  8. 2
      pages/tabbar/statistics/comp/operateCoach.vue
  9. 6
      pages/tabbar/statistics/comp/principal.vue
  10. 4
      pages/tabbar/student/index.vue
  11. 2
      pages/userCenter/scanCode/scanCode.vue

48
components/appointItem-operate/appointItem-operate.vue

@ -5,9 +5,9 @@
<view class="flex">
<view class="schoolName">{{item.studentName}} <text style="margin-left: 6px;">{{ item.studentPhone}}</text></view>
</view>
<view class="status">
<view class="status" >
<view class="text">{{loginStatusTxt[item.loginStatus]}}</view>
<view class="icon">
<view class="icon" v-if="!item.bookingDetailRespVOS.length">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
</view>
</view>
@ -33,9 +33,25 @@
</view>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/timerIcon.png" mode=""></image>
<image src="@/static/images/index/carIcon.png" mode=""></image>
</view>
<view class="name">预约时间{{item.classDate}}</view>
</view>
<view class="row" style="align-items: flex-start;">
<view class="leftBox">
<view class="iconImg">
<image src="@/static/images/index/timerIcon.png" mode=""></image>
</view>
<view class="name">预约时段</view>
</view>
<view class="rightBox" >
<view class="name" v-for="(item2,index) in item.bookingDetailRespVOS">
<view class="timer_row " :class="{hui: (item2.loginStatus==9||item2.loginStatus==3), black: item2.loginStatus==0}">
<view class="time">{{item2.classTime}}</view>
<view class="status">{{loginStatusTxt[item2.loginStatus]}}</view>
</view>
</view>
</view>
<view class="name">预约时间{{item.classDate}} {{$u.timeFormat(item.startTime, 'hh:MM')}} <text>-</text> {{$u.timeFormat(item.endTime, 'hh:MM')}}</view>
</view>
</view>
@ -108,5 +124,27 @@
}
}
}
.leftBox {
display: flex;
align-items: center;
// width: 200rpx;
}
.rightBox {
flex: 1;
}
.timer_row {
display: flex;
align-items: center;
color: $themC;
margin-bottom: 20rpx;
&.hui {
color: #999;
}
&.black {
color: #333;
}
.time {
margin-right: 40rpx;
}
}
</style>

2
config/site.config.js

@ -2,7 +2,7 @@ const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM;
// localIp = false
module.exports = {
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理
WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.18:8318/',//非代理地址
WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.43:8318/',//非代理地址
TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.39:48082/',
httpPrefix: 'app-api/',
imgUrl: 'http://jxtemp.oss-cn-hangzhou.aliyuncs.com/defaultImages/admin/bigImg/'

5
pages/recordEntry/operate/detail/detail.vue

@ -6,9 +6,9 @@
<appointItem-operate :item="info"/>
<view class="border_bottom">
<view class="date">提交预约时间{{$u.timeFormat(info.createTime, 'yyyy/mm/dd MM:ss')}}</view>
<view class="date" v-if="info.loginStatus==9">取消预约时间{{$u.timeFormat(info.updateTime, 'yyyy/mm/dd MM:ss')}}</view>
<!-- <view class="date" v-if="info.loginStatus==9">取消预约时间{{$u.timeFormat(info.updateTime, 'yyyy/mm/dd MM:ss')}}</view>
<view class="date" v-if="info.loginStatus==1||loginStatus==2">学员签到时间{{$u.timeFormat(info.loginTime, 'yyyy/mm/dd MM:ss')}}</view>
<view class="date" v-if="info.loginStatus==2">学员签退时间{{$u.timeFormat(info.signOutTime, 'yyyy/mm/dd MM:ss')}}</view>
<view class="date" v-if="info.loginStatus==2">学员签退时间{{$u.timeFormat(info.signOutTime, 'yyyy/mm/dd MM:ss')}}</view> -->
</view>
</view>
</view>
@ -32,6 +32,7 @@
async bookingMasterDetailFn() {
const {data: res} = await bookingMasterDetail({id: this.id})
this.info = res
console.log(this.info.loginStatus)
}
}
}

25
pages/recordEntry/operate/todayStudent/comp/appointItem-operate.vue

@ -5,18 +5,24 @@
<view class="flex">
<view class="schoolName">{{item.studentName}} <text style="margin-left: 6px;">{{ item.studentPhone}}</text></view>
</view>
<view class="status">
<view class="status" @click="timekeeping(item)">
<view class="text" v-if="item.studyStatus=='计时中'">正在计时...</view>
<view class="changeBtn btnBg" v-else-if="item.studyStatus=='已签到'">计时切换</view>
<view class="" v-else>{{ item.studyStatus }}</view>
<view class="changeBtn btnBg" v-else-if="item.studyStatus=='已签到'" @click="timekeeping(item)">计时切换</view>
<view class="" v-else>{{ item.studyStatus||'状态没返回' }} </view>
</view>
</view>
<view class="target">
<view class="row" >
<view class="row" v-if="item.studyStatus=='计时中'">
<view class="iconImg">
<image src="@/static/images/index/home_icon_zhuangtai@2x.png" mode="" style="width: 28rpx;height: 28rpx;"></image>
</view>
<view class="name" style="color: red;">计时开始时间14: 50</view>
<view class="name" style="color: red;">计时开始时间{{item.startTime}}</view>
</view>
<view class="row" v-else-if="item.startTime">
<view class="iconImg">
<image src="@/static/images/index/timerIcon.png" mode=""></image>
</view>
<view class="name">计时时段 {{ item.startTime }}</view>
</view>
<view class="row">
<view class="iconImg">
@ -36,14 +42,12 @@
</view>
<view class="name">预约车辆{{item.carNumber}}</view>
</view>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/timerIcon.png" mode=""></image>
</view>
<!-- <view class="name">预约时间 14:00 <text>-</text> 18:00</view> -->
<view class="name">预约时间 {{ item.bookingTimeStr }}</view>
<!-- <view class="name">预约时间{{item.classDate}} {{$u.timeFormat(item.startTime, 'hh:MM')}} <text>-</text> {{$u.timeFormat(item.endTime, 'hh:MM')}}</view> -->
</view>
</view>
@ -58,6 +62,11 @@
subjectTxt: ['不限', '科目二', '科目三'],//:023
loginStatusTxt: ['未签到', '已签到', '已签退', '已过期', '已取消'],//012退39
}
},
methods: {
timekeeping(item) {
this.$emit('timekeeping', item)
}
}
}
</script>

139
pages/recordEntry/operate/todayStudent/todayStudent.vue

@ -1,24 +1,73 @@
<template>
<view class="pageBgImg">
<topNavbar title="上课学员"></topNavbar>
<view class="con">
<view class="con" v-if="list&&list.length">
<view class="card" v-for="(item,index) in list" :key="index">
<appointItem :item="item"/>
<view class="consultItem">
<view class="top_row">
<view class="flex">
<view class="schoolName">{{item.studentName}} <text style="margin-left: 6px;">{{ item.studentPhone}}</text></view>
</view>
<view class="status" >
<view class="text" v-if="item.studyStatus=='计时中'">正在计时...</view>
<view class="changeBtn btnBg" v-else-if="item.studyStatus=='已签到'" @click="timekeeping(item)">计时切换</view>
<view class="" v-else>{{ item.studyStatus||'状态没返回' }} </view>
</view>
</view>
<view class="target">
<view class="row" v-if="item.studyStatus=='计时中'">
<view class="iconImg">
<image src="@/static/images/index/home_icon_zhuangtai@2x.png" mode="" style="width: 28rpx;height: 28rpx;"></image>
</view>
<view class="name" style="color: red;">计时开始时间{{item.startTime}}</view>
</view>
<!-- <view class="row" v-else-if="item.startTime">
<view class="iconImg">
<image src="@/static/images/index/timerIcon.png" mode=""></image>
</view>
<view class="name">计时时段 {{ item.startTime }}</view>
</view> -->
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/listIcon.png" mode=""></image>
</view>
<view class="name">训练科目{{ item.subject }}</view>
</view>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/site.png" mode=""></image>
</view>
<view class="name">预约场地{{item.address}}</view>
</view>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/carIcon.png" mode=""></image>
</view>
<view class="name">预约车辆{{item.carNumber}}</view>
</view>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/timerIcon.png" mode=""></image>
</view>
<view class="name">预约时间 {{ item.bookingTimeStr }}</view>
</view>
</view>
</view>
</view>
</view>
<nodata v-else style="margin-top: 320rpx;"></nodata>
</view>
</template>
<script>
import appointItem from './comp/appointItem-operate'
import { signStudentList, changeStudent, } from '@/config/api.js'
export default {
components: {
appointItem
},
data() {
return {
list: []
list: null,
loginStatusTxt: ['未签到', '已签到', '已签退', '已过期', '已取消'],//012退39
}
},
onLoad() {
@ -30,7 +79,24 @@
methods: {
async signStudentListFn() {
const {data: res} = await signStudentList()
// let curTimeKeep = res.find(item=>item.studyStatus=='')
// curTimeKeep.timer = curTimeKeep.bookingTimeStr.split('-')[0]
// let storCurTimer = uni.getStorageSync('curTimeKeep')
// if(storCurTimer&&storCurTimer.studentId==curTimeKeep.studentId&&storCurTimer.bookingTimeStr==curTimeKeep.bookingTimeStr) {
// curTimeKeep.timer = storCurTimer.timer
// }
console.log(res)
this.list = res
},
async timekeeping(item) {
const res = await changeStudent({studentId: item.studentId})
this.signStudentListFn()
// let timestamp = Date.now()
// let starTime = this.$u.timeFormat(timestamp, 'hh:MM')
// item.timer = starTime
// item.studyStatus =''
// uni.setStorageSync('curTimeKeep',item)
console.log(item)
}
}
}
@ -44,4 +110,63 @@
margin-bottom: 20rpx;
}
}
.consultItem {
width: 100%;
.top_row {
display: flex;
width: 100%;
height: 116rpx;
border-bottom: 2rpx dashed #E8E9EC;
justify-content: space-between;
align-items: center;
.tag {
// width: 176rpx;
height: 60rpx;
background: rgba(250, 149, 25, 0.1);
border-radius: 8rpx;
text-align: center;
font-size: 28rpx;
color: #FA7919;
margin-right: 24rpx;
padding: 10rpx 18rpx;
}
.schoolName {
font-size: 28rpx;
color: #333;
margin-left: 20rpx;
font-weight: 550;
}
.status {
display: flex;
align-items: center;
.text {
font-size: 28rpx;
color: $themC;
}
}
}
.target {
padding: 20rpx 0;
}
.row {
padding: 16rpx 0;
display: flex;
align-items: center;
.iconImg {
width: 32rpx;
height: 28rpx;
}
.name {
font-size: 28rpx;
color: #333;
padding-left: 20rpx;
}
}
}
.changeBtn {
line-height: 60rpx;
height: 60rpx;
padding: 0 12rpx;
}
</style>

4
pages/tabbar/mine/index.vue

@ -1,7 +1,7 @@
<template>
<view class="pageBgImg">
<view class="status_bar"></view>
<view class="" style="height: 88rpx;"></view>
<view class="" style="height: 44rpx;"></view>
<view class="card">
<view class="cut_row" @click.stop="showRole=true" v-if="vuex_loginInfo.userType==5">
<view class="flex-b">
@ -63,7 +63,7 @@
initMenu() {
if(this.identity=='实操教练') {
this.tabData = [
{text: '今日预约', icon: require('../../../static/images/coach/ic_zhibiao.png'), id: 2, url: '/pages/recordEntry/operate/todayStudent/todayStudent'},
{text: '上课学员', icon: require('../../../static/images/coach/ic_zhibiao.png'), id: 2, url: '/pages/recordEntry/operate/todayStudent/todayStudent'},
{text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'},
// {text: '', icon: require('../../../static/images/coach/ic_changdi.png'), id: 4, url: '/pages/userCenter/examinInfo/examinInfo'},
{text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},

2
pages/tabbar/operateTrain/index.vue

@ -1,7 +1,7 @@
<template>
<view class="pageBgImg pad">
<view class="status_bar"></view>
<view class="" style="height: 88rpx;"></view>
<view class="" style="height: 44rpx;"></view>
<view class="searchBox">
<searchRow placeholder="搜索学员姓名、学员手机号"></searchRow>
</view>

2
pages/tabbar/statistics/comp/operateCoach.vue

@ -1,5 +1,7 @@
<template>
<view class="content">
<view class="status_bar"></view>
<view class="" style="height: 30rpx;"></view>
<view class="userInfo">
<view class="tit">Hi,大乔教练</view>
<view class="flex userRow">

6
pages/tabbar/statistics/comp/principal.vue

@ -1,5 +1,7 @@
<template>
<view class="content">
<view class="status_bar"></view>
<!-- <view class="" style="height: 30rpx;"></view> -->
<view class="userInfo">
<view class="tit">Hi,{{ vuex_userInfo.name }}</view>
<view class="flex userRow">
@ -18,10 +20,10 @@
<view class="lab">今日学员退款</view>
<view class="val">900</view>
</view>
<view class="row">
<!-- <view class="row">
<view class="lab">今日代收费</view>
<view class="val">900</view>
</view>
</view> -->
<view class="row">
<view class="lab">今日学员退款</view>
<view class="val">900</view>

4
pages/tabbar/student/index.vue

@ -2,7 +2,7 @@
<view class="pageBgImg pad" >
<!-- <view class="pad" :style="{ background: `url(${imgUrl}) #f6f6f6 no-repeat`, backgroundSize: backgroundSize }" > -->
<view class="status_bar"></view>
<view class="" style="height: 88rpx;"></view>
<view class="" style="height: 30rpx;"></view>
<!-- <view class="searchBox">
<searchRow placeholder="搜索学员姓名、学员手机号"></searchRow>
</view>
@ -240,7 +240,7 @@
margin-bottom: 24rpx;
}
.searchBox {
padding: 40rpx 0 24rpx 0;
padding: 0rpx 0 24rpx 0;
}
.h2 {
font-size: 32rpx;

2
pages/userCenter/scanCode/scanCode.vue

@ -14,7 +14,7 @@
</view>
</view>
<view class="qcode">
<image :src="ossUrl" mode="widthFix" style="width: 400rpx;height: 400rpx;"></image>
<image :src="ossUrl" mode="widthFix" style="width: 500rpx;height: 500rpx;"></image>
</view>
</view>
<!-- <view class="card">

Loading…
Cancel
Save