江西小程序管理端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

220 lines
4.8 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="pageBgImg pad">
  3. <view class="searchBox">
  4. <searchRow placeholder="搜索学员姓名、学员手机号"></searchRow>
  5. </view>
  6. <view class="card">
  7. <view class="myClass">
  8. <view class="leftTxt">我的排课</view>
  9. <view class="leftBtn" @click="$goPage('/pages/recordEntry/operate/mySchedule/mySchedule')">去管理</view>
  10. </view>
  11. </view>
  12. <view class="tabs">
  13. <view class="tab" v-for="(item,index) in tabArr" :key="index" :class="{active: currentTab==item.id}"
  14. @click="changeTab(item)">{{ item.text }}</view>
  15. </view>
  16. <view class="screen_row">
  17. <view class="selectItem" @click="showSubject=true">
  18. <view class="text oneRowText">{{screen.subject}}</view>
  19. <view class="downIcon">
  20. <u-icon name="arrow-down"></u-icon>
  21. </view>
  22. </view>
  23. <view class="selectItem" @click="showCar=true">
  24. <view class="text oneRowText">{{screen.car}}</view>
  25. <view class="downIcon">
  26. <u-icon name="arrow-down"></u-icon>
  27. </view>
  28. </view>
  29. <view class="selectItem" @click="showDatePicker=true">
  30. <view class="text">{{screen.timer}}</view>
  31. <view class="downIcon">
  32. <u-icon name="arrow-down"></u-icon>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="list">
  37. <view class="card">
  38. <appointItem-operate @click.native="$goPage('/pages/recordEntry/operate/detail/detail')"/>
  39. </view>
  40. </view>
  41. <UserTab name ='实操训练'></UserTab>
  42. <u-datetime-picker
  43. :show="showDatePicker"
  44. mode="date"
  45. :visibleItemCount="4"
  46. :closeOnClickOverlay="false"
  47. @confirm="confirmDatePicker"
  48. ></u-datetime-picker>
  49. <u-picker :show="showCar" :columns="carArr" keyName="lab" @confirm="confirmCar" @cancel="showCar=false"></u-picker>
  50. <u-picker :show="showSubject" :columns="subjectArr" keyName="lab" @confirm="confirmSubject" @cancel="showSubject=false"></u-picker>
  51. </view>
  52. </template>
  53. <script>
  54. import { bookingMasterPage } from '@/config/api.js'
  55. export default {
  56. data() {
  57. return {
  58. tabArr: [{
  59. text: '待上课',
  60. id: 1
  61. },
  62. {
  63. text: '已完成',
  64. id: 2
  65. },
  66. {
  67. text: '已取消',
  68. id: 3
  69. },
  70. ],
  71. currentTab: 1,
  72. screen: {
  73. subject: '训练科目',
  74. car: '预约车辆',
  75. timer: '预约时间'
  76. },
  77. showDatePicker: false,
  78. showCar: false,
  79. showSubject: false,
  80. carArr: [
  81. [
  82. {lab: 'C1',id: 1},
  83. {lab: 'C2',id: 2},
  84. ]
  85. ],
  86. subjectArr: [
  87. [
  88. {lab: '浙00006',id: 1},
  89. {lab: '浙00007',id: 2},
  90. ]
  91. ],
  92. params: {
  93. pageNo: 1,
  94. pageSize: 20
  95. }
  96. }
  97. },
  98. onLoad() {
  99. console.log('我的页面')
  100. this.bookingMasterPageFn()
  101. },
  102. onShow() {
  103. uni.hideTabBar();
  104. },
  105. methods: {
  106. async bookingMasterPageFn() {
  107. const {data: res } = await bookingMasterPage(this.params)
  108. console.log(res)
  109. },
  110. changeTab(item) {
  111. this.currentTab = item.id
  112. },
  113. confirmDatePicker(val) {
  114. this.showDatePicker = false
  115. console.log(val)
  116. console.log(uni.$u.date(val.value, 'yyyy-mm-dd'))
  117. this.screen.timer = uni.$u.date(val.value, 'yyyy-mm-dd')
  118. console.log(this.screen.timer)
  119. },
  120. confirmCar(val) {
  121. let item = val.value[0]
  122. this.screen.car = item.lab
  123. this.showCar = false
  124. },
  125. confirmSubject(val) {
  126. let item = val.value[0]
  127. this.screen.subject = item.lab
  128. this.showSubject = false
  129. }
  130. }
  131. }
  132. </script>
  133. <style lang="scss" scoped>
  134. .pageBgImg {
  135. .searchBox {
  136. padding: 140rpx 0 24rpx 0;
  137. }
  138. .card {
  139. padding: 0 28rpx;
  140. margin-bottom: 20rpx;
  141. .myClass {
  142. height: 108rpx;
  143. display: flex;
  144. justify-content: space-between;
  145. padding: 0 10rpx;
  146. align-items: center;
  147. .leftTxt {
  148. font-size: 32rpx;
  149. font-weight: 500;
  150. }
  151. .leftBtn {
  152. width: 192rpx;
  153. height: 60rpx;
  154. background: $themC; border-radius: 8rpx;
  155. line-height: 60rpx;
  156. text-align: center;
  157. font-weight: 500;
  158. color: #FFFFFF;
  159. }
  160. }
  161. }
  162. .tabs {
  163. height: 72rpx;
  164. background: #FFFFFF;
  165. border-radius: 16rpx;
  166. display: flex;
  167. line-height: 72rpx;
  168. text-align: center;
  169. color: #ADADAD;
  170. margin: 24rpx 0;
  171. .tab {
  172. flex: 1;
  173. text-align: center;
  174. &.active {
  175. background: rgba(25, 137, 250, 0.1);
  176. border: 2rpx solid #1989FA;
  177. color: $themC;
  178. border-radius: 16rpx;
  179. }
  180. }
  181. }
  182. .screen_row {
  183. display: flex;
  184. margin-bottom: 24rpx;
  185. width: 100%;
  186. justify-content: space-between;
  187. .selectItem {
  188. display: flex;
  189. padding: 0 18rpx;
  190. border: 2rpx solid rgba(25,137,250,0.3);
  191. height: 60rpx;
  192. border-radius: 16rpx;
  193. background-color: #FFFFFF;
  194. line-height: 60rpx;
  195. align-items: center;
  196. width: 29%;
  197. .text {
  198. color: $themC;
  199. flex: 1;
  200. white-space: nowrap;
  201. text-align: center;
  202. }
  203. .downIcon {
  204. width: 24rpx;
  205. }
  206. }
  207. }
  208. .list {
  209. .card {
  210. appointitem-operate {}
  211. }
  212. }
  213. }
  214. </style>