Browse Source

实操预约记录对接

master
unknown 1 year 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. 3
      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. 14
      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"), "iconPath": require("../../static/images/tabbar/wd.png"),
"selectedIconPath": require("../../static/images/tabbar/wdActive.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"> <view class="iconImg">
<image src="@/static/images/index/timerIcon.png" mode=""></image> <image src="@/static/images/index/timerIcon.png" mode=""></image>
</view> </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>
</view> </view>

37
components/appointItem/appointItem.vue

@ -3,11 +3,13 @@
<view class="consultItem"> <view class="consultItem">
<view class="top_row"> <view class="top_row">
<view class="flex"> <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>
<view class="status"> <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"> <view class="icon">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon> <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
</view> </view>
@ -16,27 +18,27 @@
<view class="target"> <view class="target">
<view class="row"> <view class="row">
<view class="iconImg"> <view class="iconImg">
<image src="@/static/images/index/radio_nor.png" mode=""></image>
<image src="@/static/images/index/siteIcon.png" mode=""></image>
</view> </view>
<view class="name">xx考场</view>
<view class="name">{{item.examSiteName}}</view>
</view> </view>
<view class="row"> <view class="row">
<view class="iconImg"> <view class="iconImg">
<image src="@/static/images/index/radio_nor.png" mode=""></image>
<image src="@/static/images/index/carIcon.png" mode=""></image>
</view> </view>
<view class="name">C1小型汽车手动挡</view>
<view class="name">{{item.trainType}}</view>
</view> </view>
<view class="row"> <view class="row">
<view class="iconImg"> <view class="iconImg">
<image src="@/static/images/index/radio_nor.png" mode=""></image>
<image src="@/static/images/index/carNum.png" mode=""></image>
</view> </view>
<view class="name">2号车浙A99999</view>
<view class="name">{{item.examCarLicnum}}</view>
</view> </view>
<view class="row"> <view class="row">
<view class="iconImg"> <view class="iconImg">
<image src="@/static/images/index/radio_nor.png" mode=""></image>
<image src="@/static/images/index/timerIcon.png" mode=""></image>
</view> </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>
</view> </view>
@ -44,11 +46,20 @@
</template> </template>
<script> <script>
export default {
props: ['item'],
data() {
return {
statusTxt: ['未签到', '已签到', '已签退', '旷课'],//012退39,(1)
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.consultItem { .consultItem {
width: 100%; width: 100%;
margin-bottom: 24rpx;
.top_row { .top_row {
display: flex; display: flex;
width: 100%; width: 100%;
@ -90,8 +101,8 @@
display: flex; display: flex;
align-items: center; align-items: center;
.iconImg { .iconImg {
width: 25rpx;
height: 25rpx;
width: 32rpx;
height: 28rpx;
} }
.name { .name {
font-size: 28rpx; font-size: 28rpx;

3
components/commentItem/commentItem.vue

@ -1,5 +1,6 @@
<template> <template>
<view class="box" > <view class="box" >
<view class="" v-if="Object.keys(item).length">
<view class="flex-b"> <view class="flex-b">
<!-- 匿名用户 --> <!-- 匿名用户 -->
<view class="name">{{item.studentName}}</view> <view class="name">{{item.studentName}}</view>
@ -19,6 +20,8 @@
<u-album :urls="item.images" :multipleSize="'160rpx'"></u-album> <u-album :urls="item.images" :multipleSize="'160rpx'"></u-album>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>

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

@ -14,7 +14,7 @@
<view class="icon"> <view class="icon">
<image src="@/static/images/index/ic_jiaxiao_cli.png" mode=""></image> <image src="@/static/images/index/ic_jiaxiao_cli.png" mode=""></image>
</view> </view>
<view class="schoolName">翔力驾校</view>
<view class="schoolName">暂时没有返回字段</view>
<view class="tag" v-if="identity=='校长'">驾校校长</view> <view class="tag" v-if="identity=='校长'">驾校校长</view>
<view class="tag" v-else>合作教练</view> <view class="tag" v-else>合作教练</view>
</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 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 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, }) 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 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) // console.log(config)
config.header['tenant-id'] = vm.$store.state.user.vuex_TenantId config.header['tenant-id'] = vm.$store.state.user.vuex_TenantId
// config.dataType= 'xml' // config.dataType= 'xml'
return config return config
}) })

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

@ -3,9 +3,12 @@
<topNavbar title=""></topNavbar> <topNavbar title=""></topNavbar>
<view class="pad"> <view class="pad">
<view class="card"> <view class="card">
<appointItem-operate />
<appointItem-operate :item="info"/>
<view class="border_bottom"> <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> </view>
</view> </view>
@ -13,6 +16,25 @@
</template> </template>
<script> <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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

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

@ -7,17 +7,17 @@
<searchRow placeholder="搜索学员姓名、学员手机号、考场名称"></searchRow> <searchRow placeholder="搜索学员姓名、学员手机号、考场名称"></searchRow>
</view> </view>
<view class="tabs"> <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>
</view> </view>
<view class="navs"> <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>
<view class="pad"> <view class="pad">
<view class="total_row"> <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="screen" @click="showDate=true">
<view class="text">筛选</view> <view class="text">筛选</view>
<view class="icon"> <view class="icon">
@ -25,10 +25,14 @@
</view> </view>
</view> </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> </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> <UserTab name ='预约记录'></UserTab>
<u-popup :show="showDate" mode="bottom" :round="20" :closeable="true" :closeOnClickOverlay="true"> <u-popup :show="showDate" mode="bottom" :round="20" :closeable="true" :closeOnClickOverlay="true">
@ -54,36 +58,57 @@
export default { export default {
data() { data() {
return { return {
currentTab: 1,
currentNav: 1,
tabsList: [ tabsList: [
{id: 1, text: '全部'},
{id: 0, text: '全部'},
{id: 2, text: '科目二'}, {id: 2, text: '科目二'},
{id: 3, text: '科目三'}, {id: 3, text: '科目三'},
], ],
showDate: false, showDate: false,
params: { params: {
car: 1,
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 20,
// status: 0,
}
coachId: 0,
writtenoffStatus: 0,
subject: 0,
studentName: '',
studentPhone: ''
},
list: [],
status: 'loading',
total: 20
} }
}, },
created() { created() {
this.examSimulationPagesFn()
this.params.coachId = this.vuex_userInfo.user.coachId
// this.params.deptId = this.vuex_userInfo.user.deptId
// this.examSimulationPagesFn()
this.initList()
}, },
methods: { methods: {
async examSimulationPagesFn() { 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) console.log(res)
}, },
initList() {
this.status = 'loading'
this.list = []
this.params.pageNo = 1
this.examSimulationPagesFn()
},
changeTab(num) { changeTab(num) {
console.log(num)
this.currentTab = num
this.params.writtenoffStatus = num
this.initList()
}, },
changeNav(item) { changeNav(item) {
this.currentNav = item.id
this.params.subject = item.id
this.initList()
}, },
goPage() { goPage() {
this.$goPage('/pages/recordEntry/examine/examineRecord/detail/detail') this.$goPage('/pages/recordEntry/examine/examineRecord/detail/detail')

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

@ -18,6 +18,7 @@
</view> </view>
</view> </view>
</view> </view>
<UserTab name ='学员评价'></UserTab>
</view> </view>
</template> </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_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'}, {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="list" v-if="list.length">
<view class="card" v-for="(item,index) in list" :key="index"> <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>
</view> </view>
<!-- <nodata v-if="!list.length"></nodata> --> <!-- <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" /> <u-loadmore :status="status" />
</view> </view>
<nodata v-if="!list.length&&status=='nomore'"></nodata> <nodata v-if="!list.length&&status=='nomore'"></nodata>
@ -54,7 +54,7 @@
:minDate="1587524800000" :minDate="1587524800000"
:closeOnClickOverlay="false" :closeOnClickOverlay="false"
@confirm="confirmDatePicker" @confirm="confirmDatePicker"
@cancel="showDatePicker=false"
@cancel="cancelDate"
></u-datetime-picker> ></u-datetime-picker>
<!-- <u-picker :show="showC" :columns="carArr" keyName="lab" @confirm="confirmCar" @cancel="showCar=false"></u-picker> --> <!-- <u-picker :show="showC" :columns="carArr" keyName="lab" @confirm="confirmCar" @cancel="showCar=false"></u-picker> -->
@ -107,6 +107,7 @@
], ],
carArr: [ carArr: [
[ [
{lab: '不限',id: 0},
{lab: '浙A66666学',id: 1}, {lab: '浙A66666学',id: 1},
{lab: '浙00007',id: 2}, {lab: '浙00007',id: 2},
] ]
@ -139,6 +140,12 @@
} }
}, },
methods: { methods: {
cancelDate() {
this.showDatePicker=false
this.params.beginTime = ''
this.params.endTime = ''
this.initList()
},
async initList() { async initList() {
this.status = 'loading' this.status = 'loading'
this.list = [] this.list = []
@ -147,7 +154,10 @@
}, },
async bookingMasterPageFn() { async bookingMasterPageFn() {
console.log(this.params) 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 => { // uni.$u.http.get('/api/admin-api/business/booking/master/page', this.params ).then(res => {
// console.log(res) // console.log(res)
// }).catch(err => { // }).catch(err => {

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

@ -1,6 +1,6 @@
<template> <template>
<view class="userInfo"> <view class="userInfo">
<view class="tit">Hi,大乔教练</view>
<view class="tit">Hi,{{vuex_userInfo.user.nickname}}</view>
<view class="flex userRow"> <view class="flex userRow">
<view class="schoolIcon"> <view class="schoolIcon">
<image src="@/static/images/index/ic_jiaxiao.png" mode=""></image> <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>

14
pages/userCenter/myCar/myCar.vue

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