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

262 lines
6.6 KiB

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