Browse Source

我的学员搜索

master
unknown 12 months ago
parent
commit
cabf165590
  1. 6
      common/js/mixins.js
  2. 21
      components/UserTab/UserTab.vue
  3. 169
      components/appointItem/appointItem.vue
  4. 151
      components/timeScreen/timeScreen.vue
  5. 38
      components/user-info/user-info.vue
  6. 9
      config/api.js
  7. 2
      config/site.config.js
  8. 40
      pages/login/login.vue
  9. 28
      pages/recordEntry/student/addStudent/addStudent.vue
  10. 97
      pages/tabbar/examSimulation/comp/simulation.vue
  11. 82
      pages/tabbar/examSimulation/comp/studentComment.vue
  12. 9
      pages/tabbar/mine/index.vue
  13. 44
      pages/tabbar/operateTrain/index.vue
  14. 6
      pages/tabbar/statistics/comp/principal.vue
  15. 3
      pages/tabbar/statistics/comp/tabDate.vue
  16. 8
      pages/tabbar/statistics/index.vue
  17. 17
      pages/tabbar/student/index.vue
  18. 17
      pages/userCenter/myCar/myCar.vue
  19. 18
      pages/userCenter/studentComment/studentComment.vue
  20. 2
      store/modules/user.js

6
common/js/mixins.js

@ -7,9 +7,9 @@ export default {
identity: state=> state.user.identity,
role: state=>state.user.vuex_userInfo.roles,
vuex_userInfo: state=>state.user.vuex_userInfo,
vuex_deptId: state=>state.user.vuex_userInfo.user.deptId,
vuex_coachId: state=>state.user.vuex_userInfo.user.coachId,
vuex_schoolId: state=>state.user.vuex_userInfo.user.schoolId,
vuex_deptId: state=>state.user.vuex_userInfo.user.deptId||'',
vuex_coachId: state=>state.user.vuex_userInfo.user.coachId||'',
vuex_schoolId: state=>state.user.vuex_userInfo.user.schoolId||'',
vuex_loginInfo: state=>state.user.vuex_loginInfo,
}),

21
components/UserTab/UserTab.vue

@ -43,21 +43,10 @@
// uni.reLaunch({url:url})
},
initTabbar() {
if (uni.getStorageSync('identity') == '实操教练') {
if (this.identity == '实操教练') {
//
this.list = [
// {
// "pagePath": "/pages/tabbar/statistics/index",
// "text": "",
// "iconPath": require("../../static/images/tabbar/tj.png"),
// "selectedIconPath": require("../../static/images/tabbar/tjActive.png")
// },
// {
// "pagePath": "/pages/tabbar/examSimulation/index",
// "text": "",
// "iconPath": require("../../static/images/tabbar/kc.png"),
// "selectedIconPath": require("../../static/images/tabbar/kcActive.png")
// },
{
"pagePath": "/pages/tabbar/student/index",
"text": "学员",
@ -77,7 +66,7 @@
"selectedIconPath": require("../../static/images/tabbar/wdActive.png")
}
]
} else if(uni.getStorageSync('identity') == '校长') {
} else if(this.identity == '校长'|| this.identity == '驾校财务') {
//
this.list = [{
"pagePath": "/pages/tabbar/statistics/index",
@ -98,7 +87,7 @@
"selectedIconPath": require("../../static/images/tabbar/wdActive.png")
}
]
}else if(uni.getStorageSync('identity') == '考场模拟教练'){
}else if(this.identity == '考场模拟教练'){
this.list = [{
"pagePath": "/pages/tabbar/statistics/index",
"text": "统计",
@ -117,7 +106,7 @@
"iconPath": require("../../static/images/tabbar/wd.png"),
"selectedIconPath": require("../../static/images/tabbar/wdActive.png")
}]
}else if(uni.getStorageSync('identity') == '模拟器老师'){
}else if(this.identity == '模拟器老师'){
this.list = [
{
"pagePath": "/pages/tabbar/examSimulation/index",

169
components/appointItem/appointItem.vue

@ -1,47 +1,50 @@
<template>
<!-- 考场 -->
<view class="consultItem">
<view class="top_row">
<view class="flex">
<!-- <view class="tag">模拟器</view> -->
<view class="tag">科目{{item.subject==2?'二':'三'}} </view>
<view class="schoolName">{{item.studentName}} <text style="margin-left: 6rpx;">{{item.studentPhone}}</text></view>
</view>
<view class="status">
<view class="text" v-if="item.status==9">已取消</view>
<view class="text" v-else>{{ statusTxt[item.recordStatus]}}</view>
<view class="icon">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
<view class="" v-if="Object.keys(item).length">
<view class="top_row">
<view class="flex">
<!-- <view class="tag">模拟器</view> -->
<view class="tag">科目{{item.subject==2?'二':'三'}} </view>
<view class="schoolName">{{item.studentName}} <text
style="margin-left: 6rpx;">{{item.studentPhone}}</text></view>
</view>
</view>
</view>
<view class="target">
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/siteIcon.png" mode=""></image>
<view class="status">
<view class="text" v-if="item.status==9">已取消</view>
<view class="text" v-else>{{ statusTxt[item.recordStatus]}}</view>
<view class="icon">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;"></u-icon>
</view>
</view>
<view class="name">{{item.examSiteName}}</view>
</view>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/carIcon.png" mode=""></image>
<view class="target">
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/siteIcon.png" mode=""></image>
</view>
<view class="name">{{item.examSiteName}}</view>
</view>
<view class="name">{{item.trainType}}</view>
</view>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/carNum.png" mode=""></image>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/carIcon.png" mode=""></image>
</view>
<view class="name">{{item.trainType}}</view>
</view>
<view class="name">{{item.examCarLicnum}}</view>
</view>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/timerIcon.png" mode=""></image>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/carNum.png" mode=""></image>
</view>
<view class="name">{{item.examCarLicnum}}</view>
</view>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/timerIcon.png" mode=""></image>
</view>
<view class="name">{{item.classDate}} {{$u.timeFormat(item.startTime, 'hh:MM')}} <text>-</text>
{{$u.timeFormat(item.endTime, 'hh:MM')}}</view>
</view>
<view class="name">{{item.classDate}} {{$u.timeFormat(item.startTime, 'hh:MM')}} <text>-</text> {{$u.timeFormat(item.endTime, 'hh:MM')}}</view>
</view>
</view>
</view>
</template>
@ -50,7 +53,7 @@
props: ['item'],
data() {
return {
statusTxt: ['未签到', '已签到', '已签退', '旷课'],//012退39,(1)
statusTxt: ['未签到', '已签到', '已签退', '旷课'], //012退39,(1)
}
}
}
@ -58,58 +61,66 @@
<style lang="scss" scoped>
.consultItem {
width: 100%;
margin-bottom: 24rpx;
.top_row {
display: flex;
width: 100%;
margin-bottom: 24rpx;
.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;
font-weight: 550;
color: #333;
margin-left: 20rpx;
}
.status {
display: flex;
align-items: center;
.text {
font-size: 28rpx;
color: $themC;
}
}
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;
}
.target {
padding: 20rpx 0;
.schoolName {
font-size: 28rpx;
font-weight: 550;
color: #333;
margin-left: 20rpx;
}
.row {
padding: 16rpx 0;
.status {
display: flex;
align-items: center;
.iconImg {
width: 32rpx;
height: 28rpx;
}
.name {
.text {
font-size: 28rpx;
color: #333;
padding-left: 20rpx;
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;
}
}
}
</style>

151
components/timeScreen/timeScreen.vue

@ -1,151 +0,0 @@
<template>
<view class="popupCon">
<view class="popTab">
<view class="tabItem" :class="{active: currentPopTab==1}" @click="changePopTab(1)">月份选择</view>
<view class="tabItem" :class="{active: currentPopTab==2}" @click="changePopTab(2)">自定义时间</view>
</view>
<view class="timer">
<view class="tabCon" v-if="currentPopTab==1">
<view class="dateBtn" @click="showDatePickerFn(1)" :class="{hui: !date1}">{{ date1 }}</view>
<!-- <u-datetime-picker-my
:show="show"
v-model="value1"
mode="year-month"
:showToolbar="false"
:visibleItemCount="4"
@confirm="confirm"
></u-datetime-picker-my> -->
</view>
<view class="tabCon" v-else>
<view class="dateBtn" :class="{hui: !date2}" @click="showDatePickerFn(2)">{{ date2 }}</view>
<view class="to"></view>
<view class="dateBtn" :class="{hui: !date3}" @click="showDatePickerFn(3)">{{ date3 }}</view>
</view>
<view class="btnBg" @click="selectDateClick">确定</view>
<!-- <u-picker-my></u-picker-my> -->
</view>
<u-datetime-picker
:show="showDatePicker"
v-model="value1"
mode="year-month"
:visibleItemCount="4"
:closeOnClickOverlay="false"
@confirm="confirmDatePicker"
></u-datetime-picker>
</view>
</template>
<script>
export default {
data() {
return {
currentPopTab: 1,
showDatePicker: false,
value1: '',
currentBtnDate: '',
date1: '',
date2: '',
date3: '',
}
},
methods: {
changePopTab(num) {
this.currentPopTab = num
},
// 1
showDatePickerFn(num) {
this.showDate = false
this.showDatePicker = true
this.currentBtnDate = num
},
// 2
confirmDatePicker(val) {
this.showDatePicker = false
let date = uni.$u.date(val.value, 'yyyy-mm-dd')
if(this.currentBtnDate==1) {
date = uni.$u.date(val.value, 'yyyy-mm')
}
this['date'+this.currentBtnDate] = date
this.$emit('confirmDatePicker')
},
// 3
selectDateClick() {
let obj = {
date1: this.date1,
date2: this.date2,
date3: this.date3,
}
if(this.currentPopTab==2) {
if(!this.date2) return this.$u.toast('请选择开始时间')
if(!this.date3) return this.$u.toast('请选择结束时间')
if(new Date(this.date2)*1>new Date(this.date3)*1) return this.$u.toast('开始时间不能大于结束时间')
delete obj.date1
}else {
if(!this.date1) return this.$u.toast('请选择时间')
delete obj.date2
delete obj.date3
}
this.$emit('selectDateClick', obj)
}
}
}
</script>
<style lang="scss" scoped>
.popupCon {
height: 430rpx;
.popTab {
display: flex;
padding: 40rpx 32rpx;
.tabItem {
font-size: 32rpx;
color: #333;
margin-right: 60rpx;
&.active {
color: $themC;
position: relative;
&::before {
content: '';
position: absolute;
bottom: -20rpx;
left: 50%;
transform: translateX(-50%);
width: 128rpx;
height: 4rpx;
background: #1989FA;
border-radius: 3rpx;
}
}
}
}
.tabCon {
display: flex;
align-items: center;
padding-left: 32rpx;
padding-top: 20rpx;
.dateBtn {
width: 280rpx;
height: 80rpx;
border-radius: 10rpx;
border: 2rpx solid #1989FA;
line-height: 80rpx;
text-align: center;
color: $themC;
font-size: 32rpx;
&.hui {
border: 2rpx solid #E8E9EC;
}
}
.to {
font-size: 32rpx;
margin: 0 40rpx;
}
}
.btnBg {
width: 396rpx;
margin: 34rpx auto 42rpx auto;
}
}
</style>

38
components/user-info/user-info.vue

@ -14,10 +14,11 @@
<view class="icon">
<image src="@/static/images/index/ic_jiaxiao_cli.png" mode=""></image>
</view>
<view class="schoolName">暂时没有返回字段</view>
<view class="tag" v-if="identity=='校长'">驾校校长</view>
<view class="tag" v-else>合作教练</view>
<view class="schoolName oneRowText">没有返回字段</view>
<!-- <view class="tag" v-if="identity=='校长'">驾校校长</view>
<view class="tag" v-else>合作教练</view> -->
</view>
<view class="tag" >{{identity}}</view>
</view>
</view>
</template>
@ -43,7 +44,7 @@
.name_row {
display: flex;
align-items: center;
padding: 6rpx 20rpx 28rpx 0;
padding: 6rpx 20rpx 0rpx 0;
.name {
font-size: 48rpx;
@ -61,7 +62,7 @@
.school_row {
display: flex;
align-items: center;
padding: 16rpx 0;
.icon {
width: 28rpx;
height: 28rpx;
@ -70,20 +71,21 @@
.schoolName {
font-size: 28rpx;
padding: 0rpx 20rpx;
width: 0;
flex: 1;
}
.tag {
height: 44rpx;
padding: 0 10rpx;
background: rgba(25, 137, 250, 0.1);
border-radius: 22rpx;
font-size: 20rpx;
line-height: 44rpx;
text-align: center;
color: $themC;
white-space: nowrap;
width: fit-content;
}
}
.tag {
height: 44rpx;
padding: 0 20rpx;
background: rgba(25, 137, 250, 0.1);
border-radius: 22rpx;
font-size: 24rpx;
line-height: 44rpx;
text-align: center;
color: $themC;
white-space: nowrap;
width: fit-content;
}
}
}

9
config/api.js

@ -72,6 +72,15 @@ export const businessSitePage = (params) => http.get('business/site/page', {para
export const coachBinding = (data) => http.post('business/coach/binding', data)
// 取消绑定教练车
export const coachUnbinding = (data) => http.put('business/coach/unbinding', data)
// 获得考场车辆管理分页
export const siteCarPage = (params) => http.get('business/site-car/page', {params})
// 我的学员(累计学员、今日新增学员、等)
export const studentOwner = (params) => http.get('business/student-record/owner', {params})
// 获得学员档案记录列表
export const studentList = (params) => http.get('business/student-record/page', {params})

2
config/site.config.js

@ -3,7 +3,7 @@ const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM;
module.exports = {
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理
WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.39:48080/',//非代理地址
TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48082/',
TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.39:48082/',
httpPrefix: 'admin-api/',
imgUrl: 'http://jxtemp.oss-cn-hangzhou.aliyuncs.com/defaultImages/admin/bigImg/'
};

40
pages/login/login.vue

@ -79,41 +79,15 @@
// alert(item.name)
},
chooseIdentity(name) {
// let val = ''
// if(this.FormData.username=='18267103167') {
// val = ''
// }else if(this.FormData.username=='18267103168') {
// val = ''
// }else if (this.FormData.username=='18267103169'){
// val = ''
// }else {
// val = ''
// this.$store.commit('upDateIdentity', val)
// uni.reLaunch({
// url: '/pages/tabbar/examSimulation/index'
// })
// return false
// }
// if(this.FormData.username=='18267103167') {
// val = ''
// }else if(this.FormData.username=='18267103168') {
// val = ''
// }else if (this.FormData.username=='18267103169'){
// val = ''
// }else {
// val = ''
// }
// if(name=='') {
// this.$store.commit('upDateIdentity', val)
// uni.reLaunch({
// url: '/pages/tabbar/examSimulation/index'
// })
// return false
// }
let url = '/pages/tabbar/statistics/index'
this.$store.commit('upDateIdentity', name)
if(name=='实操教练') {
url = '/pages/tabbar/student/index'
}else if(name=='模拟器老师') {
url = '/pages/tabbar/examSimulation/index'
}
uni.reLaunch({
url: '/pages/tabbar/statistics/index'
url
})
},
confirmArea(val) {

28
pages/recordEntry/student/addStudent/addStudent.vue

@ -6,12 +6,12 @@
<searchRow placeholder="搜索学员姓名、学员手机号"></searchRow>
</view>
<view class="ul">
<view class="li" v-for="(item,index) in 12" :key="index">
<view class="li" v-for="(item,index) in list" :key="index">
<view class="icon">
<image src="@/static/images/index/radio_cli.png" mode=""></image>
<!-- <image src="@/static/images/index/radio.png" mode=""></image> -->
</view>
<view class="name">大乔啊{{index}}</view>
<view class="name">{{item.name}}</view>
</view>
</view>
@ -26,10 +26,32 @@
</template>
<script>
import { studentList } from '@/config/api.js'
export default {
data() {
return {
params: {
pageNo: 1,
pageSize: 40,
schoolId: '',
coachId: '',
status: 0,
},
total: 40,
list: []
}
},
onLoad() {
this.params.schoolId = this.vuex_schoolId
// this.params.coachId = this.vuex_coachId
this.studentListFn()
},
methods: {
async studentListFn() {
const {data: res} = await studentList(this.params)
this.params.pageNo ++
this.total = res.total
this.list.push(...res.list)
}
}
}

97
pages/tabbar/examSimulation/comp/simulation.vue

@ -4,7 +4,7 @@
<!-- <topNavbar title="预约记录"></topNavbar> -->
<view class="pad">
<view class="searchBox">
<searchRow placeholder="搜索学员姓名、学员手机号、考场名称"></searchRow>
<searchRow placeholder="搜索学员姓名、学员手机号" @searchFn="searchFn"></searchRow>
</view>
<view class="tabs">
<view class="tab" @click="changeTab(0)" :class="{active: params.writtenoffStatus==0}">待核销</view>
@ -19,7 +19,7 @@
<view class="total_row">
<view class="total"> <text v-if="total">{{total}}条记录</text></view>
<view class="screen" @click="showDate=true">
<view class="text">筛选</view>
<view class="text"><text v-if="params.beginTime||params.trainType"></text> 筛选</view>
<view class="icon">
<image src="@/static/images/coach/screen.png" mode=""></image>
</view>
@ -41,15 +41,34 @@
<view class="car">
<view class="h1">车型</view>
<view class="car_row">
<view class="carItem" @click="screenCarFn(1)" :class="{active: params.car==1}">C1</view>
<view class="carItem" @click="screenCarFn(2)" :class="{active: params.car==2}">C2</view>
<view class="carItem" @click="screenCarFn('C1')" :class="{active: screen.trainType=='C1'}">C1</view>
<view class="carItem" @click="screenCarFn('C2')" :class="{active: screen.trainType=='C2'}">C2</view>
</view>
</view>
<view class="h1" style="transform: translateY(30rpx);margin-bottom: 20rpx;">时间</view>
<view class="car">
<view class="h1" >日期</view>
<view class="car_row border" @click="showDatePicker=true">
<mySelect placeholder="请选择日期" :value="screen.screenDate"></mySelect>
<u-icon name="arrow-down" :size="12" :color="'#ADADAD'" style="margin-left: 12rpx;"></u-icon>
</view>
</view>
<view class="btn_row">
<view class="btnBorder btn" @click="resetScreen">重置</view>
<view class="btnBg btn" @click="screenSearch">确定</view>
</view>
</view>
<timeScreen @selectDateClick="selectDateClick" @confirmDatePicker="confirmDatePicker" />
</view>
</u-popup>
<u-datetime-picker
:show="showDatePicker"
mode="date"
:closeOnClickOverlay="true"
:minDate="1587524800000"
@confirm="confirmDatePicker"
@cancel="showDatePicker=false"
@close="showDatePicker=false"
></u-datetime-picker>
</view>
</template>
@ -64,6 +83,7 @@
{id: 3, text: '科目三'},
],
showDate: false,
showDatePicker: false,
params: {
pageNo: 1,
pageSize: 20,
@ -73,6 +93,10 @@
studentName: '',
studentPhone: ''
},
screen: {
trainType: '',
screenDate: ''
},
list: [],
status: 'loading',
total: 20
@ -113,16 +137,44 @@
goPage() {
this.$goPage('/pages/recordEntry/examine/examineRecord/detail/detail')
},
confirmDatePicker() {
this.showDate = true
confirmDatePicker(val) {
this.screen.screenDate = this.$u.timeFormat(val.value, 'yyyy-mm-dd')
this.showDatePicker = false
},
//
selectDateClick(val) {
console.log(val)
this.showDate = false
},
screenCarFn(num) {
this.params.car = num
screenCarFn(trainType) {
this.screen.trainType = trainType
},
resetScreen() {
this.screen.trainType = ''
this.screen.screenDate = ''
},
//
screenSearch() {
this.params.trainType = this.screen.trainType
if(!this.screen.screenDate) {
this.params.beginTime = ''
this.params.endTime = ''
}else {
this.params.beginTime = this.screen.screenDate + ' 00:00:00'
this.params.endTime = this.screen.screenDate + ' 23:59:59'
}
this.showDate = false
this.initList()
},
searchFn(val) {
if(uni.$u.test.mobile(val)) {
this.params.studentPhone = val
this.params.studentName = ''
}else {
this.params.studentName = val
this.params.studentPhone = ''
}
this.initList()
}
}
}
@ -131,21 +183,38 @@
<style lang="scss" scoped>
.popupBox {
padding-bottom: 30rpx;
.btn_row {
padding-top: 20rpx;
display: flex;
justify-content: space-between;
.btn {
width: 48%;
}
}
.car {
margin-bottom: 20rpx;
.h1 {
line-height: 100rpx;
}
.car_row {
display: flex;
&.border {
width: 300rpx;
line-height: 70rpx;
border: 1rpx solid #d8d8d8;
border-radius: 10rpx;
padding: 0 16rpx;
justify-content: space-between;
}
.carItem {
width: 130rpx;
height: 60rpx;
background: rgba(25,137,250,0.1);
background: #f3f3f3;
border-radius: 8rpx;
border: 2rpx solid #1989FA;
text-align: center;
line-height: 60rpx;
color: $themC;
color: #333;
margin-right: 58rpx;
&.active {
background: $themC;

82
pages/tabbar/examSimulation/comp/studentComment.vue

@ -12,17 +12,93 @@
<view class="tab">有图2</view>
<view class="tab">有视频6</view>
</view>
<view class="list">
<view class="card">
<commentItem/>
<view class="list" v-if="list.length">
<view class="card" v-for="(item,index) in index" :key="index">
<commentItem :item="item"/>
</view>
</view>
<view style="padding-bottom: 20rpx;" v-if="list.length">
<u-loadmore :status="status" />
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
</view>
<UserTab name ='学员评价'></UserTab>
</view>
</template>
<script>
import { coachCommentPage } from '@/config/api.js'
export default {
data() {
return {
list: [],
params: {
pageNo: 1,
pageSize: 20,
schoolId: '',
condition: 0,
studentName: '',
coachType: '3', //1. 2. 3.
},
// 0 1 2 3
total: 20,
status: 'loading'
}
},
created() {
this.params.schoolId = this.vuex_schoolId
// if(this.identity=='') {
// this.params.coachType = 1
// }else if(this.identity==''){
// this.params.coachType = 2
// }else if(this.identity==''){
// this.params.coachType = 3
// }
this.coachCommentPageFn()
},
onReachBottom() {
if(this.total>this.list.length) {
this.coachCommentPageFn()
}
},
methods: {
searchFn(val) {
this.params.studentName = val
this.initList()
},
changeTab(val) {
this.params.condition = val
this.initList()
},
initList() {
this.list = []
this.params.pageNo = 1
this.status = 'loading'
this.coachCommentPageFn()
},
async coachCommentPageFn() {
var {data: res} = await coachCommentPage(this.params)
this.params.pageNo ++
let arr = res.list.map(item=>{
if(item.images) {
item.images = item.images.split(',')
}
return item
})
this.list.push(...arr)
this.total = res.total
if(this.list.length>=this.total) {
this.status = 'nomore'
}else {
this.status = 'loading'
}
console.log(res)
},
}
}
</script>
<style lang="scss" scoped>

9
pages/tabbar/mine/index.vue

@ -63,7 +63,7 @@
{text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'},
// {text: '退', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'},
]
}else if(this.identity=='校长') {
}else if(this.identity=='校长'||this.identity=='驾校财务') {
this.tabData = [
{text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'},
{text: '驾校场地', icon: require('../../../static/images/coach/site.png'), id: 7, url: '/pages/userCenter/schoolSite/schoolSite'},
@ -89,9 +89,10 @@
this.showRole = false
this.$store.commit('upDateIdentity', item.name)
this.initMenu()
uni.switchTab({
url: '/pages/tabbar/index/index'
uni.reLaunch({
url: '/pages/tabbar/mine/index'
})
},
roleListFn() {
this.list = []
@ -136,7 +137,7 @@
width: 76rpx;
height: 76rpx;
position: absolute;
right: 24rpx;
right: 34rpx;
bottom: 24rpx;
}
.cut_row {

44
pages/tabbar/operateTrain/index.vue

@ -50,21 +50,23 @@
<u-datetime-picker
:show="showDatePicker"
mode="date"
:closeOnClickOverlay="true"
:visibleItemCount="4"
:minDate="1587524800000"
:closeOnClickOverlay="false"
@confirm="confirmDatePicker"
@cancel="cancelDate"
cancelText="所有日期"
@close="showDatePicker=false"
></u-datetime-picker>
<!-- <u-picker :show="showC" :columns="carArr" keyName="lab" @confirm="confirmCar" @cancel="showCar=false"></u-picker> -->
<u-picker :show="showCar" :columns="carArr" keyName="lab" @confirm="confirmCar" @cancel="showCar=false"></u-picker>
<u-picker :show="showSubject" :columns="subjectTxt" keyName="lab" @confirm="confirmSubject" @cancel="showSubject=false"></u-picker>
<u-picker :show="showCar" :columns="carColumns" keyName="licnum" @confirm="confirmCar" @cancel="showCar=false" :closeOnClickOverlay="true" @close="showCar=false"></u-picker>
<u-picker :show="showSubject" :columns="subjectTxt" keyName="lab" @confirm="confirmSubject" @cancel="showSubject=false" :closeOnClickOverlay="true" @close="showSubject=false"></u-picker>
</view>
</template>
<script>
import { bookingMasterPage, } from '@/config/api.js'
import { bookingMasterPage, carPage} from '@/config/api.js'
export default {
data() {
return {
@ -99,19 +101,8 @@
showDatePicker: false,
showCar: false,
showSubject: false,
carArr: [
[
{lab: 'C1',id: 1},
{lab: 'C2',id: 2},
]
],
carArr: [
[
{lab: '不限',id: 0},
{lab: '浙A66666学',id: 1},
{lab: '浙00007',id: 2},
]
],
carColumns: [],
params: {
pageNo: 1,
pageSize: 20,
@ -125,6 +116,7 @@
onLoad() {
console.log('我的页面')
this.params.coachId = this.vuex_coachId
this.carPageFn()
// this.bookingMasterPageFn()
},
onShow() {
@ -144,6 +136,7 @@
this.showDatePicker=false
this.params.beginTime = ''
this.params.endTime = ''
this.screen.timer = '预约时间'
this.initList()
},
async initList() {
@ -183,8 +176,8 @@
},
confirmCar(val) {
let item = val.value[0]
this.screen.car = item.lab
this.params.carNumber = item.lab
this.screen.car = item.licnum
this.params.carNumber = item.licnum
this.showCar = false
this.initList()
},
@ -194,7 +187,18 @@
this.params.subject = item.id
this.initList()
this.showSubject = false
}
},
async carPageFn() {
let obj = {
pageNo: 1,
pageSize: 40,
schoolId: this.vuex_schoolId,
coachId: this.vuex_coachId
}
const {data: res} = await carPage(obj)
res.list.unshift({licnum: '不限', id: 0})
this.carColumns = [res.list]
},
}
}
</script>

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

@ -1,13 +1,13 @@
<template>
<view class="content">
<view class="userInfo">
<view class="tit">Hi,大乔教练</view>
<view class="tit">Hi,{{ vuex_userInfo.user.nickname }}</view>
<view class="flex userRow">
<view class="schoolIcon">
<image src="@/static/images/index/ic_jiaxiao.png" mode=""></image>
</view>
<view class="schoolName oneRowText">翔力驾校</view>
<view class="tag">驾校校长</view>
<view class="schoolName oneRowText">没有字段</view>
<view class="tag">{{ identity }}</view>
</view>
</view>
<view class="card priceBox">

3
pages/tabbar/statistics/comp/tabDate.vue

@ -7,9 +7,6 @@
<!-- <view class="tab long" @click="tabClick(4)" :class="{active: currentTab==4}">{{ customDate }}</view> -->
</view>
<!-- <u-popup :show="showDatePicker" mode="bottom" :round="20" :closeable="true" :closeOnClickOverlay="true" @close="showDatePicker=false">
<timeScreen @selectDateClick="selectDateClick" />
</u-popup> -->
</view>
</template>

8
pages/tabbar/statistics/index.vue

@ -1,20 +1,20 @@
<template>
<view class="main" :style="{ background: `url(${imgUrl}) #f6f6f6 no-repeat`, backgroundSize: backgroundSize }">
<examinCoach v-if="identity=='考场模拟教练'"/>
<operateCoach v-if="identity=='实操教练'"/>
<principal v-if="identity=='校长'"/>
<!-- <operateCoach v-if="identity=='实操教练'"/> -->
<principal v-if="identity=='校长'||identity=='驾校财务'"/>
</view>
</template>
<script>
import examinCoach from './comp/examinCoach'
import operateCoach from './comp/operateCoach'
// import operateCoach from './comp/operateCoach'
import principal from './comp/principal'
import { imgUrl } from '@/config/site.config'
export default {
components: {
examinCoach,
operateCoach,
// operateCoach,
principal
},
data() {

17
pages/tabbar/student/index.vue

@ -38,15 +38,15 @@
<view class="h2" v-if="identity=='实操教练'">我的学员</view>
<view class="statistics">
<view class="statisticsItem">
<view class="val">260</view>
<view class="val">{{count.accumulateCount}}</view>
<view class="lab">累计学员数量</view>
</view>
<view class="statisticsItem">
<view class="val">260</view>
<view class="val">{{count.todayCount}}</view>
<view class="lab">今日新增学员</view>
</view>
<view class="statisticsItem" v-if="identity=='校长'">
<view class="val">260</view>
<view class="val">{{count.todayDropoutCount}}</view>
<view class="lab">今日退学学员</view>
</view>
</view>
@ -99,7 +99,7 @@
<script>
import { imgUrl } from '@/config/site.config'
import { studentRecordPage, schoolClass } from '@/config/api.js'
import { studentRecordPage, schoolClass, studentOwner } from '@/config/api.js'
import topUserInfo from '../statistics/comp/topUserInfo.vue'
export default {
components: { topUserInfo },
@ -131,7 +131,8 @@
"pageNo": 1, "pageSize": 10, status: 1, name: ''
},
total: 20,
list: []
list: [],
count: {}
}
},
onShow() {
@ -140,12 +141,18 @@
onLoad() {
this.params.schoolId = this.vuex_schoolId
this.studentRecordPageFn()
this.studentOwnerFn()
},
methods: {
searchFn(val) {
this.params.name = val
this.listInit()
},
async studentOwnerFn() {
const {data: res} = await studentOwner()
this.count = res
console.log(res)
},
confirmDatePicker(val) {
this.showDatePicker = false

17
pages/userCenter/myCar/myCar.vue

@ -5,10 +5,10 @@
<view class="searcBox">
<searchRow placeholder="搜索车牌号" @searchFn="searchFn" ref="searchRef"></searchRow>
</view>
<view class="card" style="margin-bottom: 24rpx;">
<view class="card" style="margin-bottom: 24rpx;" v-if="identity== '实操教练'">
<view class="add">
<view class="lab">新增车辆</view>
<view class="btnBg" @click="$goPage('/pages/userCenter/myCar/notBound/notBound')">立即新增</view>
<view class="lab">绑定车辆</view>
<view class="btnBg" @click="$goPage('/pages/userCenter/myCar/notBound/notBound')">立即绑定</view>
</view>
</view>
<view class="ul">
@ -26,7 +26,7 @@
</view>
</view>
</view>
<view style="padding-bottom: 20rpx;" v-if="list.length">
<view style="padding-bottom: 20rpx;" v-if="list.length>4">
<u-loadmore :status="status" />
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
@ -34,7 +34,7 @@
</template>
<script>
import { carPage, coachUnbinding } from '@/config/api.js'
import { carPage, coachUnbinding, siteCarPage } from '@/config/api.js'
import unbind from './comp/unbind.vue'
export default {
components: {
@ -78,7 +78,12 @@
await this.carPageFn()
},
async carPageFn() {
const {data: res} = await carPage(this.params)
if(this.identity=='考场模拟教练') {
var {data: res} = await siteCarPage(this.params)
}else {
var {data: res} = await carPage(this.params)
}
this.params.pageNo ++
this.list.push(...res.list)
this.total = res.total

18
pages/userCenter/studentComment/studentComment.vue

@ -6,8 +6,8 @@
<searchRow placeholder="搜索学员姓名" @searchFn="searchFn"></searchRow>
</view>
<view class="tabs">
<view class="tab" :class="{active: this.params.condition==0}" @click="changeTab(0)">全部缺字段</view>
<view class="tab" :class="{active: this.params.condition==1}" @click="changeTab(1)">匿名1</view>
<view class="tab" :class="{active: this.params.condition==0}" @click="changeTab(0)">全部{{total}}</view>
<view class="tab" :class="{active: this.params.condition==1}" @click="changeTab(1)">匿名缺字段</view>
<view class="tab" :class="{active: this.params.condition==2}" @click="changeTab(2)">有图2</view>
<view class="tab" :class="{active: this.params.condition==3}" @click="changeTab(3)">有视频3</view>
</view>
@ -36,7 +36,8 @@
pageSize: 20,
schoolId: '',
condition: 0,
studentName: ''
studentName: '',
coachType: '', //1. 2. 3.
},
// 0 1 2 3
total: 20,
@ -45,12 +46,17 @@
},
onLoad() {
this.params.schoolId = this.vuex_schoolId
if(this.identity=='实操教练') {
this.params.coachType = 1
}else if(this.identity=='考场模拟教练'){
this.params.coachType = 2
}else if(this.identity=='模拟器老师'){
this.params.coachType = 3
}
this.schoolCommentPageFn()
},
onPullDownRefresh() {
this.list = []
this.params.pageNo = 1
this.schoolCommentPageFn().then(()=>{uni.stopPullDownRefresh()})
this.initList()
},
onReachBottom() {
if(this.total>this.list.length) {

2
store/modules/user.js

@ -5,7 +5,7 @@ const user = {
state: {
identity: uni.getStorageSync('identity')?uni.getStorageSync('identity'):1,
vuex_cityInfo: uni.getStorageSync('vuex_cityInfo') ? uni.getStorageSync('vuex_cityInfo') : {city: '杭州市'},
vuex_userInfo: uni.getStorageSync('vuex_userInfo') ? uni.getStorageSync('vuex_userInfo') : {},
vuex_userInfo: uni.getStorageSync('vuex_userInfo') ? uni.getStorageSync('vuex_userInfo') : {user:{}},
vuex_loginInfo: uni.getStorageSync('vuex_loginInfo') ? uni.getStorageSync('vuex_loginInfo') : {},
vuex_TenantId: uni.getStorageSync('vuex_TenantId') ? uni.getStorageSync('vuex_TenantId') : '',
vuex_role: {

Loading…
Cancel
Save