signRecord.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <view>
  3. <u-navbar title="签到记录"></u-navbar>
  4. <view class="screen">
  5. <view class="date" @click="show = true">
  6. <view class="text">
  7. {{signTime}}
  8. </view>
  9. <view class="icon">
  10. <u-icon name="arrow-down-fill" color="#999999" size="10"></u-icon>
  11. </view>
  12. </view>
  13. <u-picker mode="time" :defaultTime="defaultTime" v-model="show" :params="params"
  14. @confirm="confirm"></u-picker>
  15. <view class="course">
  16. <view class="text">
  17. 所有课程
  18. </view>
  19. <view class="icon">
  20. <u-icon name="arrow-down-fill" color="#999999" size="10"></u-icon>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="record" >
  25. <view class="record-card">
  26. <view class="title-time">
  27. <view class="title">
  28. 芭蕾舞新生班
  29. </view>
  30. <view class="time">
  31. 2023-01-05 08:30-10:00
  32. </view>
  33. </view>
  34. <view class="condition">
  35. 到课
  36. </view>
  37. </view>
  38. <view class="record-card">
  39. <view class="title-time">
  40. <view class="title">
  41. 芭蕾舞新生班
  42. </view>
  43. <view class="time">
  44. 2023-01-05 08:30-10:00
  45. </view>
  46. </view>
  47. <view class="condition leave">
  48. 请假
  49. </view>
  50. </view>
  51. <view class="record-card">
  52. <view class="title-time">
  53. <view class="title">
  54. 芭蕾舞新生班
  55. </view>
  56. <view class="time">
  57. 2023-01-05 08:30-10:00
  58. </view>
  59. </view>
  60. <view class="condition truant">
  61. 旷课
  62. </view>
  63. </view>
  64. <u-divider>没有更多数据了</u-divider>
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. export default {
  70. data() {
  71. return {
  72. signTime: '',
  73. params: {
  74. year: true,
  75. month: true,
  76. day: false,
  77. hour: false,
  78. minute: false,
  79. second: false
  80. },
  81. show: false,
  82. defaultTime: '',
  83. }
  84. },
  85. onLoad() {
  86. var date = new Date();
  87. var year = date.getFullYear();
  88. var month = date.getMonth() + 1;
  89. if(month >= 1 && month <= 9) {
  90. month = '0' + month;
  91. }
  92. this.defaultTime = year + '-' + month;
  93. this.signTime = this.defaultTime;
  94. },
  95. methods: {
  96. confirm(params) {
  97. this.signTime = params.year + '-' + params.month;
  98. },
  99. }
  100. }
  101. </script>
  102. <style lang="scss" scoped>
  103. .screen{
  104. background-color: #fff;
  105. display: flex;
  106. justify-content: space-between;
  107. text-align: center;
  108. height: 44px;
  109. line-height: 44px;
  110. position:fixed;
  111. top: 88rpx;
  112. left: 0;
  113. right: 0;
  114. z-index: 999;
  115. .date{
  116. flex: 1;
  117. display: flex;
  118. align-items: center;
  119. justify-content: center;
  120. .text{
  121. margin-right: 8rpx;
  122. }
  123. }
  124. .course{
  125. display: flex;
  126. flex: 1;
  127. align-items: center;
  128. justify-content: center;
  129. .text{
  130. margin-right: 8rpx;
  131. }
  132. }
  133. }
  134. .record{
  135. margin:112rpx 32rpx 0;
  136. .record-card{
  137. margin-top: 12px;
  138. background-color: #fff;
  139. border-radius: 12px;
  140. padding: 12px;
  141. display: flex;
  142. justify-content: space-between;
  143. .title-time{
  144. color: rgba(51, 51, 51, 1);
  145. .title{
  146. font-weight: bold;
  147. font-size: 18px;
  148. }
  149. .time{
  150. margin-top: 16rpx;
  151. font-size: 12px;
  152. }
  153. }
  154. .condition{
  155. color:#0DBAC7;
  156. font-size: 16px;
  157. display: flex;
  158. align-items: center;
  159. }
  160. .leave{
  161. color: rgba(129, 97, 255, 1);
  162. }
  163. .truant{
  164. color: rgba(255, 61, 0, 1);
  165. }
  166. }
  167. }
  168. ::v-deep.u-divider{
  169. margin-top: 12px !important;
  170. }
  171. </style>