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

270 lines
7.0 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 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 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="pad" :style="{ background: `url(${imgUrl}) #f6f6f6 no-repeat`, backgroundSize: backgroundSize }" > -->
  4. <view class="status_bar"></view>
  5. <view style="width: 100%;height: 60rpx;"></view>
  6. <!-- <view class="searchBox">
  7. <searchRow placeholder="搜索学员姓名、学员手机号"></searchRow>
  8. </view>
  9. <view class="card" v-if="identity=='实操教练'">
  10. <view class="addStudent">
  11. <view class="h2">我的学员</view>
  12. <view class="btnBg" @click="$goPage('/pages/recordEntry/student/addStudent/addStudent')">手动添加</view>
  13. </view>
  14. </view>
  15. <view class="card">
  16. <view class="statistics">
  17. <view class="statisticsItem">
  18. <view class="val">260</view>
  19. <view class="lab">累计学员数量</view>
  20. </view>
  21. <view class="statisticsItem">
  22. <view class="val">260</view>
  23. <view class="lab">今日新增学员</view>
  24. </view>
  25. <view class="statisticsItem" v-if="identity=='校长'">
  26. <view class="val">260</view>
  27. <view class="lab">今日退学学员</view>
  28. </view>
  29. </view>
  30. </view> -->
  31. <view class="searchBox" v-if="identity=='校长'">
  32. <searchRow placeholder="搜索学员姓名、学员手机号"></searchRow>
  33. </view>
  34. <topUserInfo v-if="identity=='实操教练'"/>
  35. <view class="card">
  36. <view class="h2" v-if="identity=='实操教练'">我的学员</view>
  37. <view class="statistics">
  38. <view class="statisticsItem">
  39. <view class="val">260</view>
  40. <view class="lab">累计学员数量</view>
  41. </view>
  42. <view class="statisticsItem">
  43. <view class="val">260</view>
  44. <view class="lab">今日新增学员</view>
  45. </view>
  46. <view class="statisticsItem" v-if="identity=='校长'">
  47. <view class="val">260</view>
  48. <view class="lab">今日退学学员</view>
  49. </view>
  50. </view>
  51. <view class="addStudent" @click="$goPage('/pages/recordEntry/student/addStudent/addStudent')" v-if="identity=='实操教练'">+ 添加学员</view>
  52. </view>
  53. <view class="screen_row">
  54. <view class="selectItem" @click="showDatePicker=true">
  55. <view class="text ">{{screen.timer}}</view>
  56. <view class="downIcon">
  57. <u-icon name="arrow-down" :size="'28rpx'"></u-icon>
  58. </view>
  59. </view>
  60. <view class="selectItem" @click="showCar=true">
  61. <view class="text oneRowText">{{screen.car}}</view>
  62. <view class="downIcon">
  63. <u-icon name="arrow-down" :size="'28rpx'"></u-icon>
  64. </view>
  65. </view>
  66. <view class="selectItem" @click="showClass=true">
  67. <view class="text oneRowText">{{screen.className}}</view>
  68. <view class="downIcon">
  69. <u-icon name="arrow-down" :size="'28rpx'"></u-icon>
  70. </view>
  71. </view>
  72. </view>
  73. <view class="list">
  74. <view class="card" @click="$goPage('/pages/recordEntry/student/studentDetail/studentDetail?id='+item.id)" v-for="(item,index) in list" :key="index">
  75. <appointItem-student :item="item"/>
  76. </view>
  77. </view>
  78. <UserTab name ='学员'></UserTab>
  79. <u-datetime-picker
  80. :show="showDatePicker"
  81. mode="date"
  82. :minDate="1669341725000"
  83. :visibleItemCount="4"
  84. :closeOnClickOverlay="false"
  85. @confirm="confirmDatePicker"
  86. @cancel="showDatePicker=false"
  87. ></u-datetime-picker>
  88. <u-picker :show="showCar" :columns="carArr" keyName="lab" @confirm="confirmCar" @cancel="showCar=false"></u-picker>
  89. <u-picker :show="showClass" :columns="classArr" keyName="lab" @confirm="confirmClass" @cancel="showClass=false"></u-picker>
  90. </view>
  91. </template>
  92. <script>
  93. import { imgUrl } from '@/config/site.config'
  94. import { studentRecordPage, schoolClass } from '@/config/api.js'
  95. import topUserInfo from '../statistics/comp/topUserInfo.vue'
  96. export default {
  97. components: { topUserInfo },
  98. data() {
  99. return {
  100. imgUrl: imgUrl+'indexTopBanner.png',
  101. backgroundSize: '100% 492rpx',
  102. screen: {
  103. timer: '报名时间',
  104. car: '全部车型',
  105. className: '全部班型'
  106. },
  107. showDatePicker: false,
  108. showCar: false,
  109. showClass: false,
  110. carArr: [
  111. [
  112. {lab: 'C1',id: 1},
  113. {lab: 'C2',id: 2},
  114. ]
  115. ],
  116. classArr: [
  117. [
  118. {lab: '普通班型',id: 1},
  119. {lab: 'C2vip',id: 2},
  120. ]
  121. ],
  122. params: {
  123. "pageNo": 1, "pageSize": 10, status: 1, trainType: ''
  124. },
  125. total: 20,
  126. list: []
  127. }
  128. },
  129. onShow() {
  130. uni.hideTabBar();
  131. },
  132. onLoad() {
  133. this.studentRecordPageFn()
  134. },
  135. methods: {
  136. confirmDatePicker(val) {
  137. this.showDatePicker = false
  138. // this.params.applyDate = this.screen.timer = uni.$u.date(val.value, 'yyyy-mm-dd')
  139. this.screen.timer = uni.$u.date(val.value, 'yyyy-mm-dd') + ' '
  140. let startTimer = this.screen.timer + '00:00:00'
  141. let endTimer = this.screen.timer+ '23:59:59'
  142. console.log(endTimer)
  143. this.params.applyDate = [startTimer, endTimer]
  144. // this.params['applyDate[0]'] = encodeURI(startTimer)
  145. // this.params['applyDate[1]'] = encodeURI(endTimer)
  146. this.listInit()
  147. },
  148. confirmCar(val) {
  149. let item = val.value[0]
  150. this.params.trainType = this.screen.car = item.lab
  151. this.showCar = false
  152. this.listInit()
  153. },
  154. confirmClass(val) {
  155. let item = val.value[0]
  156. this.screen.className = item.lab
  157. this.params.schoolClassId = item.id
  158. this.showClass = false
  159. this.listInit()
  160. },
  161. // 获取班型
  162. async schoolClass() {
  163. const {data: res} = await schoolClass({id: this.vuex_userInfo.shoolId})
  164. },
  165. listInit() {
  166. this.params.pageNo = 1
  167. this.list = []
  168. this.studentRecordPageFn()
  169. },
  170. async studentRecordPageFn() {
  171. const {data: res} = await studentRecordPage(this.params)
  172. this.list.push(...res.list)
  173. this.total = res.total
  174. }
  175. }
  176. }
  177. </script>
  178. <style lang="scss" scoped>
  179. .pad {
  180. min-height: 100vh;
  181. padding-bottom: 110rpx;
  182. }
  183. .card {
  184. padding: 0 28rpx;
  185. margin-bottom: 24rpx;
  186. }
  187. .searchBox {
  188. padding: 140rpx 0 24rpx 0;
  189. }
  190. .h2 {
  191. font-size: 32rpx;
  192. font-weight: 500;
  193. color: $themC;
  194. padding-top: 26rpx;
  195. }
  196. .addStudent {
  197. padding: 10rpx 0 30rpx 0;
  198. font-size: 28rpx;
  199. color: $themC;
  200. text-align: center;
  201. }
  202. .statistics {
  203. display: flex;
  204. height: 170rpx;
  205. .statisticsItem {
  206. display: flex;
  207. align-items: center;
  208. justify-content: center;
  209. flex-direction: column;
  210. flex: 1;
  211. .val {
  212. font-weight: 600;
  213. font-size: 56rpx;
  214. color: $themC;
  215. position: relative;
  216. &::before {
  217. content: '个';
  218. position: absolute;
  219. right: -30rpx;
  220. bottom: 10rpx;
  221. font-size: 24rpx;
  222. font-weight: 400;
  223. }
  224. }
  225. .lab {
  226. font-size: 28rpx;
  227. color: #999;
  228. // margin-top: 20rpx;
  229. }
  230. }
  231. }
  232. .screen_row {
  233. display: flex;
  234. margin-bottom: 24rpx;
  235. width: 100%;
  236. justify-content: space-between;
  237. .selectItem {
  238. display: flex;
  239. padding: 0 16rpx;
  240. border: 2rpx solid rgba(25,137,250,0.3);
  241. height: 60rpx;
  242. border-radius: 16rpx;
  243. background-color: #FFFFFF;
  244. line-height: 60rpx;
  245. align-items: center;
  246. width: 29%;
  247. .text {
  248. color: $themC;
  249. flex: 1;
  250. text-align: center;
  251. font-size: 26rpx;
  252. }
  253. .downIcon {
  254. width: 24rpx;
  255. }
  256. }
  257. }
  258. </style>