江西小程序管理端
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.

210 lines
4.5 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. <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. export default {
  55. data() {
  56. return {
  57. tabArr: [{
  58. text: '待上课',
  59. id: 1
  60. },
  61. {
  62. text: '已完成',
  63. id: 2
  64. },
  65. {
  66. text: '已取消',
  67. id: 3
  68. },
  69. ],
  70. currentTab: 1,
  71. screen: {
  72. subject: '训练科目',
  73. car: '预约车辆',
  74. timer: '预约时间'
  75. },
  76. showDatePicker: false,
  77. showCar: false,
  78. showSubject: false,
  79. carArr: [
  80. [
  81. {lab: 'C1',id: 1},
  82. {lab: 'C2',id: 2},
  83. ]
  84. ],
  85. subjectArr: [
  86. [
  87. {lab: '浙00006',id: 1},
  88. {lab: '浙00007',id: 2},
  89. ]
  90. ],
  91. }
  92. },
  93. onLoad() {
  94. console.log('我的页面')
  95. },
  96. onShow() {
  97. uni.hideTabBar();
  98. },
  99. methods: {
  100. changeTab(item) {
  101. this.currentTab = item.id
  102. },
  103. confirmDatePicker(val) {
  104. this.showDatePicker = false
  105. console.log(val)
  106. console.log(uni.$u.date(val.value, 'yyyy-mm-dd'))
  107. this.screen.timer = uni.$u.date(val.value, 'yyyy-mm-dd')
  108. console.log(this.screen.timer)
  109. },
  110. confirmCar(val) {
  111. let item = val.value[0]
  112. this.screen.car = item.lab
  113. this.showCar = false
  114. },
  115. confirmSubject(val) {
  116. let item = val.value[0]
  117. this.screen.subject = item.lab
  118. this.showSubject = false
  119. }
  120. }
  121. }
  122. </script>
  123. <style lang="scss" scoped>
  124. .pageBgImg {
  125. .searchBox {
  126. padding: 140rpx 0 24rpx 0;
  127. }
  128. .card {
  129. padding: 0 28rpx;
  130. margin-bottom: 20rpx;
  131. .myClass {
  132. height: 108rpx;
  133. display: flex;
  134. justify-content: space-between;
  135. padding: 0 10rpx;
  136. align-items: center;
  137. .leftTxt {
  138. font-size: 32rpx;
  139. font-weight: 500;
  140. }
  141. .leftBtn {
  142. width: 192rpx;
  143. height: 60rpx;
  144. background: $themC; border-radius: 8rpx;
  145. line-height: 60rpx;
  146. text-align: center;
  147. font-weight: 500;
  148. color: #FFFFFF;
  149. }
  150. }
  151. }
  152. .tabs {
  153. height: 72rpx;
  154. background: #FFFFFF;
  155. border-radius: 16rpx;
  156. display: flex;
  157. line-height: 72rpx;
  158. text-align: center;
  159. color: #ADADAD;
  160. margin: 24rpx 0;
  161. .tab {
  162. flex: 1;
  163. text-align: center;
  164. &.active {
  165. background: rgba(25, 137, 250, 0.1);
  166. border: 2rpx solid #1989FA;
  167. color: $themC;
  168. border-radius: 16rpx;
  169. }
  170. }
  171. }
  172. .screen_row {
  173. display: flex;
  174. margin-bottom: 24rpx;
  175. width: 100%;
  176. justify-content: space-between;
  177. .selectItem {
  178. display: flex;
  179. padding: 0 18rpx;
  180. border: 2rpx solid rgba(25,137,250,0.3);
  181. height: 60rpx;
  182. border-radius: 16rpx;
  183. background-color: #FFFFFF;
  184. line-height: 60rpx;
  185. align-items: center;
  186. width: 29%;
  187. .text {
  188. color: $themC;
  189. flex: 1;
  190. white-space: nowrap;
  191. text-align: center;
  192. }
  193. .downIcon {
  194. width: 24rpx;
  195. }
  196. }
  197. }
  198. .list {
  199. .card {
  200. appointitem-operate {}
  201. }
  202. }
  203. }
  204. </style>