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

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