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

283 lines
7.3 KiB

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