Browse Source

实操预约记录对接

master
unknown 12 months ago
parent
commit
8ac5c6a4c3
  1. 17
      components/UserTab/UserTab.vue
  2. 2
      components/appointItem-operate/appointItem-operate.vue
  3. 37
      components/appointItem/appointItem.vue
  4. 37
      components/commentItem/commentItem.vue
  5. 2
      components/user-info/user-info.vue
  6. 4
      config/api.js
  7. 1
      config/request.js
  8. 26
      pages/recordEntry/operate/detail/detail.vue
  9. 59
      pages/tabbar/examSimulation/comp/simulation.vue
  10. 1
      pages/tabbar/examSimulation/comp/studentComment.vue
  11. 4
      pages/tabbar/mine/index.vue
  12. 18
      pages/tabbar/operateTrain/index.vue
  13. 2
      pages/tabbar/statistics/comp/topUserInfo.vue
  14. 32
      pages/userCenter/myCar/comp/unbind.vue
  15. 18
      pages/userCenter/myCar/myCar.vue
  16. BIN
      static/images/coach/教练.png
  17. BIN
      static/images/index/carNum.png
  18. BIN
      static/images/index/coachIcon.png
  19. BIN
      static/images/index/siteIcon.png

17
components/UserTab/UserTab.vue

@ -117,9 +117,20 @@
"iconPath": require("../../static/images/tabbar/wd.png"),
"selectedIconPath": require("../../static/images/tabbar/wdActive.png")
}]
}else {
//
}else if(uni.getStorageSync('identity') == '模拟器老师'){
this.list = [
{
"pagePath": "/pages/tabbar/examSimulation/index",
"text": "学员评价",
"iconPath": require("../../static/images/tabbar/kc.png"),
"selectedIconPath": require("../../static/images/tabbar/kcActive.png")
},
{
"pagePath": "/pages/tabbar/mine/index",
"text": "我的",
"iconPath": require("../../static/images/tabbar/wd.png"),
"selectedIconPath": require("../../static/images/tabbar/wdActive.png")
}]
}
}
}

2
components/appointItem-operate/appointItem-operate.vue

@ -35,7 +35,7 @@
<view class="iconImg">
<image src="@/static/images/index/timerIcon.png" mode=""></image>
</view>
<view class="name">预约时间{{$u.timeFormat(item.startTime, 'yyyy/mm/dd MM:ss')}}</view>
<view class="name">预约时间{{item.classDate}} {{$u.timeFormat(item.startTime, 'hh:MM')}} <text>-</text> {{$u.timeFormat(item.endTime, 'hh:MM')}}</view>
</view>
</view>

37
components/appointItem/appointItem.vue

@ -3,11 +3,13 @@
<view class="consultItem">
<view class="top_row">
<view class="flex">
<view class="tag">模拟器</view>
<view class="schoolName">张三三 18265468753</view>
<!-- <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">待处理</view>
<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>
@ -16,27 +18,27 @@
<view class="target">
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/radio_nor.png" mode=""></image>
<image src="@/static/images/index/siteIcon.png" mode=""></image>
</view>
<view class="name">xx考场</view>
<view class="name">{{item.examSiteName}}</view>
</view>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/radio_nor.png" mode=""></image>
<image src="@/static/images/index/carIcon.png" mode=""></image>
</view>
<view class="name">C1小型汽车手动挡</view>
<view class="name">{{item.trainType}}</view>
</view>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/radio_nor.png" mode=""></image>
<image src="@/static/images/index/carNum.png" mode=""></image>
</view>
<view class="name">2号车浙A99999</view>
<view class="name">{{item.examCarLicnum}}</view>
</view>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/radio_nor.png" mode=""></image>
<image src="@/static/images/index/timerIcon.png" mode=""></image>
</view>
<view class="name">2023/08/08 9:0010:00</view>
<view class="name">{{item.classDate}} {{$u.timeFormat(item.startTime, 'hh:MM')}} <text>-</text> {{$u.timeFormat(item.endTime, 'hh:MM')}}</view>
</view>
</view>
@ -44,11 +46,20 @@
</template>
<script>
export default {
props: ['item'],
data() {
return {
statusTxt: ['未签到', '已签到', '已签退', '旷课'],//012退39,(1)
}
}
}
</script>
<style lang="scss" scoped>
.consultItem {
width: 100%;
margin-bottom: 24rpx;
.top_row {
display: flex;
width: 100%;
@ -90,8 +101,8 @@
display: flex;
align-items: center;
.iconImg {
width: 25rpx;
height: 25rpx;
width: 32rpx;
height: 28rpx;
}
.name {
font-size: 28rpx;

37
components/commentItem/commentItem.vue

@ -1,23 +1,26 @@
<template>
<view class="box">
<view class="flex-b">
<!-- 匿名用户 -->
<view class="name">{{item.studentName}}</view>
<view class="date">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd')}}</view>
</view>
<view class="starBox">
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="4" :readonly="true"></u-rate>
<view class="num">{{item.stars}}</view>
</view>
<view class="text">{{item.description}}</view>
<!-- <view class="imgBox">
<view class="img" v-for="(item,index) in urls2" :key="index">
<image :src="item" mode=""></image>
<view class="box" >
<view class="" v-if="Object.keys(item).length">
<view class="flex-b">
<!-- 匿名用户 -->
<view class="name">{{item.studentName}}</view>
<view class="date">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd')}}</view>
</view>
<view class="starBox">
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="4" :readonly="true"></u-rate>
<view class="num">{{item.stars}}</view>
</view>
<view class="text">{{item.description}}</view>
<!-- <view class="imgBox">
<view class="img" v-for="(item,index) in urls2" :key="index">
<image :src="item" mode=""></image>
</view>
</view> -->
<view class="imgBox" v-if="item.images&&item.images.length">
<u-album :urls="item.images" :multipleSize="'160rpx'"></u-album>
</view>
</view> -->
<view class="imgBox" v-if="item.images&&item.images.length">
<u-album :urls="item.images" :multipleSize="'160rpx'"></u-album>
</view>
</view>
</template>

2
components/user-info/user-info.vue

@ -14,7 +14,7 @@
<view class="icon">
<image src="@/static/images/index/ic_jiaxiao_cli.png" mode=""></image>
</view>
<view class="schoolName">翔力驾校</view>
<view class="schoolName">暂时没有返回字段</view>
<view class="tag" v-if="identity=='校长'">驾校校长</view>
<view class="tag" v-else>合作教练</view>
</view>

4
config/api.js

@ -16,6 +16,8 @@ export const schoolPage = (params) => http.get('business/school/page', {params:
export const tenantPage = (params) => http.get('system/tenant/pages', {params: params, custom: { noToken: true }})
// 实操预约记录分页
export const bookingMasterPage = (params) => http.get('business/booking/master/page', {params: params, header: {'contentType': 3} })
// 实操预约详情
export const bookingMasterDetail = (params) => http.get('business/booking/master/get', {params: params, header: {'contentType': 3} })
// 获得我的排课详情
export const scheduleClassGetById = (params) => http.get('business/booking/schedule-class/getById', {params: params, })
// 获得我的排课详情预约记录
@ -63,7 +65,7 @@ export const schoolCommentPage = (params) => http.get('business/school-comment/p
// 修改用户密码
export const updatePassword = (data) => http.put('system/user/profile/update-password', data)
// 获得考场分页
// export const sitePage = (data) => http.get('business/site/page', data)
export const simulationPage = (params) => http.get('business/booking/simulation-record/page', {params})

1
config/request.js

@ -18,6 +18,7 @@ module.exports = (vm) => {
// console.log(config)
config.header['tenant-id'] = vm.$store.state.user.vuex_TenantId
// config.dataType= 'xml'
return config
})

26
pages/recordEntry/operate/detail/detail.vue

@ -3,9 +3,12 @@
<topNavbar title=""></topNavbar>
<view class="pad">
<view class="card">
<appointItem-operate />
<appointItem-operate :item="info"/>
<view class="border_bottom">
<view class="date">核销时间2023/08/08 08:52:08</view>
<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==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>
</view>
</view>
@ -13,6 +16,25 @@
</template>
<script>
import { bookingMasterDetail } from '@/config/api.js'
export default {
data() {
return {
info: {},
id: ''
}
},
onLoad(options) {
this.id = options.id
this.bookingMasterDetailFn()
},
methods: {
async bookingMasterDetailFn() {
const {data: res} = await bookingMasterDetail({id: this.id})
this.info = res
}
}
}
</script>
<style lang="scss" scoped>

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

@ -7,17 +7,17 @@
<searchRow placeholder="搜索学员姓名、学员手机号、考场名称"></searchRow>
</view>
<view class="tabs">
<view class="tab" @click="changeTab(1)" :class="{active: currentTab==1}">待核销</view>
<view class="tab" @click="changeTab(2)" :class="{active: currentTab==2}">已核销</view>
<view class="tab" @click="changeTab(0)" :class="{active: params.writtenoffStatus==0}">待核销</view>
<view class="tab" @click="changeTab(1)" :class="{active: params.writtenoffStatus==1}">已核销</view>
</view>
</view>
</view>
<view class="navs">
<view class="nav" v-for="(item,index) in tabsList" :key="index" :class="{active: currentNav==item.id}" @click="changeNav(item)">{{ item.text }}</view>
<view class="nav" v-for="(item,index) in tabsList" :key="index" :class="{active: params.subject==item.id}" @click="changeNav(item)">{{ item.text }}</view>
</view>
<view class="pad">
<view class="total_row">
<view class="total">12条记录</view>
<view class="total"> <text v-if="total">{{total}}条记录</text></view>
<view class="screen" @click="showDate=true">
<view class="text">筛选</view>
<view class="icon">
@ -25,10 +25,14 @@
</view>
</view>
</view>
<view class="card" @click="goPage">
<appointItem />
<view class="card" @click="goPage" v-for="(item,index) in list" :key="index">
<appointItem :item="item"/>
</view>
</view>
<view style="padding-bottom: 100rpx;" v-if="list.length">
<u-loadmore :status="status" />
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
<UserTab name ='预约记录'></UserTab>
<u-popup :show="showDate" mode="bottom" :round="20" :closeable="true" :closeOnClickOverlay="true">
@ -54,36 +58,57 @@
export default {
data() {
return {
currentTab: 1,
currentNav: 1,
tabsList: [
{id: 1, text: '全部'},
{id: 0, text: '全部'},
{id: 2, text: '科目二'},
{id: 3, text: '科目三'},
],
showDate: false,
params: {
car: 1,
pageNo: 1,
pageSize: 20,
// status: 0,
}
coachId: 0,
writtenoffStatus: 0,
subject: 0,
studentName: '',
studentPhone: ''
},
list: [],
status: 'loading',
total: 20
}
},
created() {
this.examSimulationPagesFn()
this.params.coachId = this.vuex_userInfo.user.coachId
// this.params.deptId = this.vuex_userInfo.user.deptId
// this.examSimulationPagesFn()
this.initList()
},
methods: {
async examSimulationPagesFn() {
const {data: res} = await examSimulationPages(this.params)
let obj = Object.assign({},this.params)
if(obj.subject==0) delete obj.subject
const {data: res} = await examSimulationPages(obj)
this.params.pageNo ++
this.total = res.total
this.list.push(...res.list)
if(this.list.length>=this.total) this.status = 'nomore'
console.log(res)
},
initList() {
this.status = 'loading'
this.list = []
this.params.pageNo = 1
this.examSimulationPagesFn()
},
changeTab(num) {
console.log(num)
this.currentTab = num
this.params.writtenoffStatus = num
this.initList()
},
changeNav(item) {
this.currentNav = item.id
this.params.subject = item.id
this.initList()
},
goPage() {
this.$goPage('/pages/recordEntry/examine/examineRecord/detail/detail')

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

@ -18,6 +18,7 @@
</view>
</view>
</view>
<UserTab name ='学员评价'></UserTab>
</view>
</template>

4
pages/tabbar/mine/index.vue

@ -78,6 +78,10 @@
{text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'},
{text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},
]
}else if(this.identity=='模拟器老师') {
this.tabData = [
{text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},
]
}
},
//

18
pages/tabbar/operateTrain/index.vue

@ -36,11 +36,11 @@
<view class="list" v-if="list.length">
<view class="card" v-for="(item,index) in list" :key="index">
<appointItem-operate @click.native="$goPage('/pages/recordEntry/operate/detail/detail')" :item="item"/>
<appointItem-operate @click.native="$goPage('/pages/recordEntry/operate/detail/detail?id='+item.id)" :item="item"/>
</view>
</view>
<!-- <nodata v-if="!list.length"></nodata> -->
<view style="padding-bottom: 20rpx;" v-if="list.length">
<view style="padding-bottom: 100rpx;" v-if="list.length">
<u-loadmore :status="status" />
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
@ -54,7 +54,7 @@
:minDate="1587524800000"
:closeOnClickOverlay="false"
@confirm="confirmDatePicker"
@cancel="showDatePicker=false"
@cancel="cancelDate"
></u-datetime-picker>
<!-- <u-picker :show="showC" :columns="carArr" keyName="lab" @confirm="confirmCar" @cancel="showCar=false"></u-picker> -->
@ -107,6 +107,7 @@
],
carArr: [
[
{lab: '不限',id: 0},
{lab: '浙A66666学',id: 1},
{lab: '浙00007',id: 2},
]
@ -139,6 +140,12 @@
}
},
methods: {
cancelDate() {
this.showDatePicker=false
this.params.beginTime = ''
this.params.endTime = ''
this.initList()
},
async initList() {
this.status = 'loading'
this.list = []
@ -147,7 +154,10 @@
},
async bookingMasterPageFn() {
console.log(this.params)
const {data: res } = await bookingMasterPage(this.params)
let obj = Object.assign({},this.params)
console.log(obj.carNumber)
if(obj.carNumber=='不限') delete obj.carNumber
const {data: res } = await bookingMasterPage(obj)
// uni.$u.http.get('/api/admin-api/business/booking/master/page', this.params ).then(res => {
// console.log(res)
// }).catch(err => {

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

@ -1,6 +1,6 @@
<template>
<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>

32
pages/userCenter/myCar/comp/unbind.vue

@ -0,0 +1,32 @@
<template>
<view>
<u-swipe-action>
<u-swipe-action-item
:options="options1"
>
<slot></slot>
</u-swipe-action-item>
</u-swipe-action>
</view>
</template>
<script>
export default {
data() {
return {
options1: [{
text: '解除绑定',
style: {
backgroundColor: '#f94242',
borderRadius: '16rpx',
padding: '16rpx'
}
}]
};
},
};
</script>
<style lang="scss">
</style>

18
pages/userCenter/myCar/myCar.vue

@ -13,7 +13,13 @@
</view> -->
<view class="ul">
<view class="card" v-for="(item,index) in list" :key="index">
<view class="li" >
<unbind v-if="identity== '实操教练'">
<view class="li" >
<view class="plate">{{item.licnum}}</view>
<view class="name">{{item.manufacturer}}</view>
</view>
</unbind>
<view class="li" v-else>
<view class="plate">{{item.licnum}}</view>
<view class="name">{{item.manufacturer}}</view>
</view>
@ -29,7 +35,11 @@
<script>
import { carPage } from '@/config/api.js'
import unbind from './comp/unbind.vue'
export default {
components: {
unbind
},
data() {
return {
list: [],
@ -43,7 +53,9 @@
},
onLoad() {
this.params.schoolId = this.vuex_schoolId
this.params.coachId = this.vuex_coachId
if(identity== '实操教练') {
this.params.coachId = this.vuex_coachId
}
this.carPageFn()
},
@ -84,6 +96,8 @@
}
.card {
margin-bottom: 20rpx;
overflow: hidden;
height: 100rpx;
.add {
display: flex;
align-items: center;

BIN
static/images/coach/教练.png

After

Width: 26  |  Height: 26  |  Size: 904 B

BIN
static/images/index/carNum.png

After

Width: 32  |  Height: 28  |  Size: 514 B

BIN
static/images/index/coachIcon.png

After

Width: 32  |  Height: 28  |  Size: 957 B

BIN
static/images/index/siteIcon.png

After

Width: 32  |  Height: 28  |  Size: 1.2 KiB

Loading…
Cancel
Save