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

203 lines
4.3 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. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title="排课计划"></topNavbar>
  4. <view class="pad">
  5. <view class="card">
  6. <view class="row">
  7. <view class="lab">计划日期</view>
  8. <view class="rightCon" @click="show=true">
  9. <view class="inputBox">
  10. <input type="text" v-model="form.classDate" placeholder="请选择" disabled style="pointer-events: none;">
  11. </view>
  12. <view class="icon">
  13. <u-icon name="arrow-right" :size="12" :color="'#696B72'"></u-icon>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="row">
  18. <view class="lab">选择开课时间段</view>
  19. <view class="rightCon" @click="$goPage('/pages/recordEntry/operate/mySchedule/mould/mould')">
  20. <view class="inputBox">
  21. <input type="text" v-model="form.input1" placeholder="请选择" disabled style="pointer-events: none;">
  22. </view>
  23. <view class="icon">
  24. <u-icon name="arrow-right" :size="12" :color="'#696B72'"></u-icon>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="blueBg">
  29. <view class="time_row hui">
  30. <text>时间段</text> <text>最多人数</text>
  31. </view>
  32. <view class="time_row">
  33. <text>7:00-8:00</text> <text>4</text>
  34. </view>
  35. <view class="time_row">
  36. <text>8:00-9:00</text> <text>4</text>
  37. </view>
  38. </view>
  39. <view class="row">
  40. <view class="lab">训练科目</view>
  41. <view class="rightCon">
  42. <myRadio @changeRadio="changeRadio" :radioData="radiolist1"></myRadio>
  43. </view>
  44. </view>
  45. <view class="row">
  46. <view class="lab">教练车</view>
  47. <view class="rightCon">
  48. <myRadio @changeRadio="changeRadio" :radioData="radiolist2"></myRadio>
  49. </view>
  50. </view>
  51. <view class="row">
  52. <view class="lab">开放范围</view>
  53. <view class="rightCon">
  54. <myRadio @changeRadio="changeRadio" :radioData="radiolist3"></myRadio>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="btnBg">确认发布</view>
  59. </view>
  60. <u-datetime-picker
  61. :show="show"
  62. :minDate="minDate"
  63. :maxDate="maxDate"
  64. mode="date"
  65. @confirm="changeDate"
  66. ></u-datetime-picker>
  67. </view>
  68. </template>
  69. <script>
  70. import { scheduleClassCreate, getClassDateLimit } from '@/config/api.js'
  71. export default {
  72. data() {
  73. return {
  74. minDate: null,
  75. maxDate: null,
  76. show: false,
  77. form: {
  78. classDate: '',
  79. radio1: 1
  80. },
  81. radiolist1: [{
  82. name: '科目二',
  83. id: 1,
  84. disabled: false
  85. },
  86. {
  87. name: '科目三',
  88. id: 2,
  89. disabled: false
  90. },
  91. ],
  92. radiolist2: [{
  93. name: '浙A8888',
  94. id: 1,
  95. disabled: false
  96. },
  97. {
  98. name: '浙A8889',
  99. id: 2,
  100. disabled: false
  101. },
  102. ],
  103. radiolist3: [{
  104. name: '我的学员',
  105. id: 1,
  106. disabled: false
  107. },
  108. {
  109. name: '所有学员',
  110. id: 2,
  111. disabled: false
  112. },
  113. ]
  114. }
  115. },
  116. onLoad() {
  117. this.getClassDateLimitFn()
  118. },
  119. methods: {
  120. changeRadio(val) {
  121. console.log(val)
  122. },
  123. // 选择日期
  124. changeDate(val) {
  125. this.form.classDate = this.$u.date(val.value, 'yyyy-mm-dd')
  126. console.log(val)
  127. },
  128. // 发布排课计划
  129. async scheduleClassCreateFn() {
  130. let obj = {
  131. coachId: this.vuex_coachId
  132. }
  133. const {data: res} = await scheduleClassCreate(obj)
  134. },
  135. // 获取排课日期范围
  136. async getClassDateLimitFn() {
  137. let obj = {
  138. coachId: this.vuex_coachId
  139. }
  140. const {data: res} = await getClassDateLimit(obj)
  141. this.minDate = new Date(res.beginDateLimit)*1 + 86400000
  142. this.maxDate = new Date(res.endDateLimit)*1
  143. }
  144. }
  145. }
  146. </script>
  147. <style lang="scss" scoped>
  148. .card {
  149. padding: 10rpx 28rpx;
  150. .row {
  151. display: flex;
  152. justify-content: space-between;
  153. padding: 26rpx 0;
  154. .lab {
  155. font-weight: 500;
  156. }
  157. }
  158. }
  159. .btnBg {
  160. width: 396rpx;
  161. margin: 120rpx auto 0 auto;
  162. }
  163. .rightCon {
  164. display: flex;
  165. align-items: center;
  166. .icon {
  167. margin-left: 10rpx;
  168. }
  169. .inputBox {
  170. flex: 1;
  171. input {
  172. text-align: right;
  173. font-size: 28rpx;
  174. color: #333;
  175. }
  176. }
  177. }
  178. .blueBg {
  179. background-color: #E8F3FE;
  180. padding: 12rpx 32rpx;
  181. border-radius: 16rpx;
  182. text-align: center;
  183. .time_row {
  184. display: flex;
  185. justify-content: space-between;
  186. padding: 12rpx 0;
  187. &.hui {
  188. color: #ADADAD;
  189. }
  190. text {
  191. width: 170rpx;
  192. }
  193. }
  194. }
  195. </style>