学员端小程序
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.

149 lines
3.5 KiB

1 year ago
12 months ago
10 months ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
1 year ago
  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title="模拟器训练预约"></topNavbar>
  4. <view class="pad">
  5. <view class="top_row">
  6. <view class="step_row">
  7. <view class="dian" @click="changeStep(1)">
  8. <view class="num" :class="{active: currentStep==1}">1</view>
  9. </view>
  10. <view class="line"></view>
  11. <view class="dian" @click="changeStep(2)">
  12. <view class="num" :class="{active: currentStep==2}">2</view>
  13. </view>
  14. <view class="line"></view>
  15. <view class="dian" @click="changeStep(3)">
  16. <view class="num" :class="{active: currentStep==3}">3</view>
  17. </view>
  18. </view>
  19. <view class="step_text">
  20. <view class="txt">选择模拟驾驶馆</view>
  21. <view class="txt">预约时间</view>
  22. <view class="txt">选择模拟器</view>
  23. </view>
  24. </view>
  25. <step1 v-if="currentStep==1" @changeStep="changeStep" :list="list1" :FormData="FormData" @choosePoint="choosePoint"></step1>
  26. <step2 v-if="currentStep==2" @changeStep="changeStep" :FormData="FormData" @updatedForm="updatedForm" ></step2>
  27. <step3 v-if="currentStep==3" @changeStep="changeStep" :FormData="FormData" @updatedForm="updatedForm"></step3>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import step1 from './comp/step1'
  33. import step2 from './comp/step2'
  34. import step3 from './comp/step3'
  35. import { simulationDevices, simulationPoint, } from '@/config/api.js'
  36. export default {
  37. components: { step1, step2, step3 },
  38. data() {
  39. return {
  40. currentStep: 1,
  41. list1: [],
  42. FormData: {
  43. pointName: '',
  44. pointId: '',
  45. trainType: '',
  46. studentId: '',
  47. deviceName: '',
  48. classDate: '',
  49. classTime: '',
  50. deviceNum: '',
  51. courseIds: '',
  52. beginTime: '',
  53. }
  54. }
  55. },
  56. created() {
  57. this.simulationPointFn()
  58. this.FormData.trainType = this.vuex_userInfo.trainType
  59. this.FormData.studentId = this.studentId
  60. },
  61. methods: {
  62. updatedForm(val) {
  63. this.FormData = val
  64. },
  65. changeStep(num) {
  66. this.currentStep = num
  67. },
  68. // 选择模拟点
  69. choosePoint(item) {
  70. this.FormData.pointName = item.pointName
  71. this.FormData.pointId = item.id
  72. },
  73. // 模拟点
  74. async simulationPointFn() {
  75. const {data: res} = await simulationPoint({schoolId: this.vuex_userInfo.schoolId,lat: this.vuex_cityInfo.lat,lng: this.vuex_cityInfo.lng})
  76. this.list1 = res
  77. },
  78. }
  79. }
  80. </script>
  81. <style lang="scss" scoped>
  82. .top_row {
  83. width: 100%;
  84. padding-bottom: 36rpx;
  85. .step_row {
  86. display: flex;
  87. align-items: center;
  88. justify-content: space-between;
  89. width: 100%;
  90. padding: 0 32rpx;
  91. .dian {
  92. width: 180rpx;
  93. height: 100rpx;
  94. display: flex;
  95. align-items: center;
  96. justify-content: center;
  97. position: relative;
  98. // background: red;
  99. }
  100. .num {
  101. width: 46rpx;
  102. height: 46rpx;
  103. background: #D1E7FE;
  104. line-height: 46rpx;
  105. border-radius: 50%;
  106. text-align: center;
  107. color: $themC;
  108. font-size: 24rpx;
  109. position: absolute;
  110. z-index: 9;
  111. &.active {
  112. border:2rpx solid $themC;
  113. &::before {
  114. content: '';
  115. width: 66rpx;
  116. height: 66rpx;
  117. border-radius: 50%;
  118. position: absolute;
  119. z-index: -1;
  120. left: 50%;
  121. top: 50%;
  122. transform: translate(-50%,-50%);
  123. background: rgba(255,255,255,0.6);
  124. filter: blur(6rpx);
  125. }
  126. }
  127. }
  128. .line {
  129. width: 60rpx;
  130. height: 4rpx;
  131. background: rgba(255,255,255,0.4);
  132. }
  133. }
  134. .step_text {
  135. display: flex;
  136. .txt {
  137. flex: 1;
  138. text-align: center;
  139. font-size: 28rpx;
  140. color: #fff;
  141. text-align: center;
  142. }
  143. }
  144. }
  145. </style>