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

293 lines
7.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 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">{{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="cancelDate"
  87. cancelText="不限日期"
  88. ></u-datetime-picker>
  89. <u-picker :show="showCar" :columns="carArr" keyName="lab" @confirm="confirmCar" @cancel="showCar=false"></u-picker>
  90. <u-picker :show="showClass" :columns="classArr" keyName="name" @confirm="confirmClass" @cancel="showClass=false"></u-picker>
  91. </view>
  92. </template>
  93. <script>
  94. import { imgUrl } from '@/config/site.config'
  95. import { studentRecordPage, schoolClass, studentOwner } from '@/config/api.js'
  96. import topUserInfo from '../statistics/comp/topUserInfo.vue'
  97. export default {
  98. components: { topUserInfo },
  99. data() {
  100. return {
  101. imgUrl: imgUrl+'indexTopBanner.png',
  102. backgroundSize: '100% 492rpx',
  103. screen: {
  104. timer: '报名时间',
  105. car: '全部车型',
  106. className: '全部班型'
  107. },
  108. showDatePicker: false,
  109. showCar: false,
  110. showClass: false,
  111. carArr: [
  112. [
  113. {lab: 'C1',id: 1},
  114. {lab: 'C2',id: 2},
  115. ]
  116. ],
  117. classArr: [
  118. [
  119. {lab: '普通班型',id: 1},
  120. {lab: 'C2vip',id: 2},
  121. ]
  122. ],
  123. params: {
  124. "pageNo": 1, "pageSize": 10, status: 1, name: ''
  125. },
  126. total: 20,
  127. list: [],
  128. count: {}
  129. }
  130. },
  131. onShow() {
  132. uni.hideTabBar();
  133. },
  134. onLoad() {
  135. this.params.schoolId = this.vuex_schoolId
  136. this.studentRecordPageFn()
  137. this.studentOwnerFn()
  138. this.schoolClass()
  139. },
  140. methods: {
  141. searchFn(val) {
  142. this.params.name = val
  143. this.listInit()
  144. },
  145. async studentOwnerFn() {
  146. const {data: res} = await studentOwner()
  147. this.count = res
  148. console.log(res)
  149. },
  150. cancelDate() {
  151. this.showDatePicker=false
  152. this.params.startTime = ''
  153. this.params.endTime = ''
  154. this.screen.timer = '预约时间'
  155. this.listInit()
  156. },
  157. confirmDatePicker(val) {
  158. this.showDatePicker = false
  159. // this.params.applyDate = this.screen.timer = uni.$u.date(val.value, 'yyyy-mm-dd')
  160. this.screen.timer = uni.$u.date(val.value, 'yyyy-mm-dd') + ' '
  161. let startTimer = this.screen.timer + '00:00:00'
  162. let endTimer = this.screen.timer+ '23:59:59'
  163. console.log(endTimer)
  164. // this.params.applyDate = [startTimer, endTimer]
  165. this.params.startTime = startTimer
  166. this.params.endTime = endTimer
  167. // this.params['applyDate[1]'] = encodeURI(endTimer)
  168. this.listInit()
  169. },
  170. confirmCar(val) {
  171. let item = val.value[0]
  172. this.params.trainType = this.screen.car = item.lab
  173. this.showCar = false
  174. this.listInit()
  175. },
  176. confirmClass(val) {
  177. let item = val.value[0]
  178. this.screen.className = item.lab
  179. this.params.schoolClassId = item.id
  180. this.showClass = false
  181. this.listInit()
  182. },
  183. // 获取班型
  184. async schoolClass() {
  185. const {data: res} = await schoolClass({id: this.vuex_schoolId,pageNo: 1,pageSize: 100})
  186. this.classArr = res.list
  187. },
  188. listInit() {
  189. this.params.pageNo = 1
  190. this.list = []
  191. this.studentRecordPageFn()
  192. },
  193. async studentRecordPageFn() {
  194. const {data: res} = await studentRecordPage(this.params)
  195. this.list.push(...res.list)
  196. this.total = res.total
  197. }
  198. }
  199. }
  200. </script>
  201. <style lang="scss" scoped>
  202. .pad {
  203. min-height: 100vh;
  204. padding-bottom: 110rpx;
  205. }
  206. .card {
  207. padding: 0 28rpx;
  208. margin-bottom: 24rpx;
  209. }
  210. .searchBox {
  211. padding: 140rpx 0 24rpx 0;
  212. }
  213. .h2 {
  214. font-size: 32rpx;
  215. font-weight: 500;
  216. color: $themC;
  217. padding-top: 26rpx;
  218. }
  219. .addStudent {
  220. padding: 10rpx 0 30rpx 0;
  221. font-size: 28rpx;
  222. color: $themC;
  223. text-align: center;
  224. }
  225. .statistics {
  226. display: flex;
  227. height: 170rpx;
  228. .statisticsItem {
  229. display: flex;
  230. align-items: center;
  231. justify-content: center;
  232. flex-direction: column;
  233. flex: 1;
  234. .val {
  235. font-weight: 600;
  236. font-size: 56rpx;
  237. color: $themC;
  238. position: relative;
  239. &::before {
  240. content: '个';
  241. position: absolute;
  242. right: -30rpx;
  243. bottom: 10rpx;
  244. font-size: 24rpx;
  245. font-weight: 400;
  246. }
  247. }
  248. .lab {
  249. font-size: 28rpx;
  250. color: #999;
  251. // margin-top: 20rpx;
  252. }
  253. }
  254. }
  255. .screen_row {
  256. display: flex;
  257. margin-bottom: 24rpx;
  258. width: 100%;
  259. justify-content: space-between;
  260. .selectItem {
  261. display: flex;
  262. padding: 0 16rpx;
  263. border: 2rpx solid rgba(25,137,250,0.3);
  264. height: 60rpx;
  265. border-radius: 16rpx;
  266. background-color: #FFFFFF;
  267. line-height: 60rpx;
  268. align-items: center;
  269. width: 29%;
  270. .text {
  271. color: $themC;
  272. flex: 1;
  273. text-align: center;
  274. font-size: 26rpx;
  275. }
  276. .downIcon {
  277. width: 24rpx;
  278. }
  279. }
  280. }
  281. </style>