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

263 lines
6.6 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. <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. this.schoolClassFn()
  135. },
  136. methods: {
  137. confirmDatePicker(val) {
  138. this.showDatePicker = false
  139. this.params.applyDate = this.screen.timer = uni.$u.date(val.value, 'yyyy-mm-dd')
  140. this.listInit()
  141. },
  142. confirmCar(val) {
  143. let item = val.value[0]
  144. this.params.trainType = this.screen.car = item.lab
  145. this.showCar = false
  146. this.listInit()
  147. },
  148. confirmClass(val) {
  149. let item = val.value[0]
  150. this.screen.className = item.lab
  151. this.params.schoolClassId = item.id
  152. this.showClass = false
  153. this.listInit()
  154. },
  155. // 获取班型
  156. async schoolClass() {
  157. const {data: res} = await schoolClass({id: this.vuex_userInfo.shoolId})
  158. },
  159. listInit() {
  160. this.params.pageNo = 1
  161. this.list = []
  162. this.studentRecordPageFn()
  163. },
  164. async studentRecordPageFn() {
  165. const {data: res} = await studentRecordPage(this.params)
  166. this.list.push(...res.list)
  167. this.total = res.total
  168. }
  169. }
  170. }
  171. </script>
  172. <style lang="scss" scoped>
  173. .pad {
  174. min-height: 100vh;
  175. padding-bottom: 110rpx;
  176. }
  177. .card {
  178. padding: 0 28rpx;
  179. margin-bottom: 24rpx;
  180. }
  181. .searchBox {
  182. padding: 140rpx 0 24rpx 0;
  183. }
  184. .h2 {
  185. font-size: 32rpx;
  186. font-weight: 500;
  187. color: $themC;
  188. padding-top: 26rpx;
  189. }
  190. .addStudent {
  191. padding: 10rpx 0 30rpx 0;
  192. font-size: 28rpx;
  193. color: $themC;
  194. text-align: center;
  195. }
  196. .statistics {
  197. display: flex;
  198. height: 170rpx;
  199. .statisticsItem {
  200. display: flex;
  201. align-items: center;
  202. justify-content: center;
  203. flex-direction: column;
  204. flex: 1;
  205. .val {
  206. font-weight: 600;
  207. font-size: 56rpx;
  208. color: $themC;
  209. position: relative;
  210. &::before {
  211. content: '个';
  212. position: absolute;
  213. right: -30rpx;
  214. bottom: 10rpx;
  215. font-size: 24rpx;
  216. font-weight: 400;
  217. }
  218. }
  219. .lab {
  220. font-size: 28rpx;
  221. color: #999;
  222. // margin-top: 20rpx;
  223. }
  224. }
  225. }
  226. .screen_row {
  227. display: flex;
  228. margin-bottom: 24rpx;
  229. width: 100%;
  230. justify-content: space-between;
  231. .selectItem {
  232. display: flex;
  233. padding: 0 16rpx;
  234. border: 2rpx solid rgba(25,137,250,0.3);
  235. height: 60rpx;
  236. border-radius: 16rpx;
  237. background-color: #FFFFFF;
  238. line-height: 60rpx;
  239. align-items: center;
  240. width: 29%;
  241. .text {
  242. color: $themC;
  243. flex: 1;
  244. text-align: center;
  245. font-size: 26rpx;
  246. }
  247. .downIcon {
  248. width: 24rpx;
  249. }
  250. }
  251. }
  252. </style>