dklist.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <template>
  2. <view class="content">
  3. <view class="select-top">
  4. <view class="">
  5. 本月统计
  6. </view>
  7. <view class="top-right">
  8. <view class="">
  9. {{showdate}}月
  10. </view>
  11. <!-- <image src="../../static/img/downxia.png" mode=""></image> -->
  12. </view>
  13. </view>
  14. <view class="dk-info">
  15. <view class="dk-day big">
  16. <view class="dk-left">
  17. 20
  18. </view>
  19. <view class="dk-center">
  20. /
  21. </view>
  22. <view class="dk-right err">
  23. 20
  24. </view>
  25. </view>
  26. <view class="dk-tit">
  27. <view class="dk-left">
  28. 正常天数
  29. </view>
  30. <view class="dk-center">
  31. /
  32. </view>
  33. <view class="dk-right">
  34. 异常天数
  35. </view>
  36. </view>
  37. <view class="dk-detail">
  38. <view class="detail-item green">
  39. <view class="">
  40. 20
  41. </view>
  42. <view class="item-tit">
  43. 已打卡(次)
  44. </view>
  45. </view>
  46. <view class="detail-item">
  47. <view class="">
  48. 20
  49. </view>
  50. <view class="item-tit">
  51. 未打卡(次)
  52. </view>
  53. </view>
  54. <view class="detail-item">
  55. <view class="err">
  56. 20
  57. </view>
  58. <view class="item-tit">
  59. 迟到(次)
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. <scroll-view scroll-y="true" class="yg-list" :style="{'height': height}">
  65. <view class="yg-wrap" v-for="item in 20">
  66. <view class="yg-name">
  67. 李丹丹
  68. </view>
  69. <view class="dk-status" @click="goDetail()">
  70. 正常<image src="../../static/img/downright.png" mode=""></image>
  71. </view>
  72. </view>
  73. </scroll-view>
  74. </view>
  75. </template>
  76. <script>
  77. export default {
  78. data() {
  79. return {
  80. showdate: new Date().getMonth() + 1,
  81. height: '',
  82. }
  83. },
  84. onLoad() {
  85. },
  86. onShow() {
  87. },
  88. onReachBottom() {
  89. },
  90. onReady() {
  91. var obj = this;
  92. uni.getSystemInfo({
  93. success: resu => {
  94. const query = uni.createSelectorQuery();
  95. query.select('.yg-list').boundingClientRect();
  96. query.exec(function(res) {
  97. obj.height = resu.windowHeight - res[0].top + 'px';
  98. });
  99. },
  100. fail: res => {}
  101. });
  102. },
  103. methods: {
  104. goDetail() {
  105. uni.navigateTo({
  106. url: '/pagesS/yg/dkdetail'
  107. })
  108. }
  109. }
  110. }
  111. </script>
  112. <style lang="scss">
  113. .select-top {
  114. width: 100%;
  115. height: 100rpx;
  116. display: flex;
  117. justify-content: space-between;
  118. align-items: center;
  119. border: 1px solid #F5F5F5;
  120. font-size: 32rpx;
  121. font-weight: bold;
  122. color: #000000;
  123. padding: 0 30rpx;
  124. background-color: #fff;
  125. .top-right {
  126. font-size: 28rpx;
  127. font-weight: bold;
  128. color: #000000;
  129. display: flex;
  130. align-items: center;
  131. justify-content: flex-end;
  132. image {
  133. width: 19rpx;
  134. height: 11rpx;
  135. }
  136. }
  137. }
  138. .dk-info {
  139. height: 326rpx;
  140. width: 100%;
  141. display: flex;
  142. flex-direction: column;
  143. justify-content: center;
  144. align-items: center;
  145. background-color: #fff;
  146. margin-bottom: 20rpx;
  147. .big {
  148. font-size: 46rpx !important;
  149. font-weight: 800;
  150. color: #000000;
  151. margin-bottom: 10rpx;
  152. }
  153. .err {
  154. color: #E05742;
  155. }
  156. .dk-day,
  157. .dk-tit {
  158. display: flex;
  159. flex-direction: row;
  160. justify-content: center;
  161. width: 100%;
  162. font-size: 26rpx;
  163. .dk-left {
  164. width: 48%;
  165. text-align: right;
  166. }
  167. .dk-center {
  168. width: 4%;
  169. flex-shrink: 0;
  170. text-align: center;
  171. color: #D7D7D7;
  172. }
  173. .dk-right {
  174. width: 48%;
  175. }
  176. }
  177. .dk-detail {
  178. display: flex;
  179. justify-content: center;
  180. width: 100%;
  181. margin-top: 50rpx;
  182. .detail-item {
  183. width: 30%;
  184. text-align: center;
  185. font-size: 28rpx;
  186. font-weight: bold;
  187. color: #000000;
  188. .item-tit {
  189. margin-top: 15rpx;
  190. font-size: 24rpx;
  191. font-weight: 500;
  192. color: #666666;
  193. }
  194. }
  195. }
  196. }
  197. .yg-list {
  198. background-color: #fff;
  199. width: 100%;
  200. .yg-wrap {
  201. display: flex;
  202. justify-content: space-between;
  203. align-items: center;
  204. padding: 0 40rpx 0 30rpx;
  205. height: 100rpx;
  206. border-bottom: 1px solid #F2F2F2;
  207. font-size: 28rpx;
  208. font-weight: bold;
  209. color: #000000;
  210. .yg-name {
  211. }
  212. .dk-status {
  213. display: flex;
  214. align-items: center;
  215. image {
  216. width: 11rpx;
  217. height: 19rpx;
  218. margin-left: 10rpx;
  219. }
  220. }
  221. }
  222. }
  223. </style>