dkdetail.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  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. <template v-for="item in list">
  66. <view class="yg-wrap">
  67. <view class="yg-name">
  68. {{item.name}}
  69. </view>
  70. <view class="dk-status" :class="{'err': item.qknum > 0 }" @click="openDetail(item)">
  71. {{item.qknum > 0 ? `缺卡${item.qknum}次`: '正常'}}<image :src="item.open? '../../static/img/downup.png': '../../static/img/downxia.png' " mode="" ></image>
  72. </view>
  73. </view>
  74. <view class="info-info" v-if="item.open">
  75. <view class="base-left">
  76. <view class="">
  77. 08:30
  78. </view>
  79. <view class="jg">
  80. </view>
  81. <view class="">
  82. 17:30
  83. </view>
  84. </view>
  85. <view class="base-right">
  86. <view class="right-item up">
  87. <view class="item-tit">
  88. 上班
  89. </view>
  90. <view class="">
  91. 考勤机下班打卡(17:02)
  92. </view>
  93. </view>
  94. <view class="right-item">
  95. <view class="item-tit">
  96. 下班
  97. </view>
  98. <view class="">
  99. 考勤机下班打卡(17:02)
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </template>
  105. </scroll-view>
  106. </view>
  107. </template>
  108. <script>
  109. export default {
  110. data() {
  111. return {
  112. showdate: new Date().getMonth() + 1,
  113. height: '',
  114. list: [
  115. {
  116. id: 1,
  117. name: '狗强',
  118. sstatus: 0,
  119. xstatus: 0,
  120. open: false,
  121. qknum: 0,
  122. },
  123. {
  124. id: 1,
  125. name: '狗虎',
  126. sstatus: 1,
  127. xstatus: 1,
  128. qknum: 2,
  129. open: false,
  130. }
  131. ]
  132. }
  133. },
  134. onLoad() {
  135. },
  136. onShow() {
  137. },
  138. onReachBottom() {
  139. },
  140. onReady() {
  141. var obj = this;
  142. uni.getSystemInfo({
  143. success: resu => {
  144. const query = uni.createSelectorQuery();
  145. query.select('.yg-list').boundingClientRect();
  146. query.exec(function(res) {
  147. obj.height = resu.windowHeight - res[0].top + 'px';
  148. });
  149. },
  150. fail: res => {}
  151. });
  152. },
  153. methods: {
  154. openDetail(item) {
  155. item.open = !item.open
  156. }
  157. }
  158. }
  159. </script>
  160. <style lang="scss">
  161. .err {
  162. color: #E05742;
  163. }
  164. .select-top {
  165. width: 100%;
  166. height: 100rpx;
  167. display: flex;
  168. justify-content: space-between;
  169. align-items: center;
  170. border: 1px solid #F5F5F5;
  171. font-size: 32rpx;
  172. font-weight: bold;
  173. color: #000000;
  174. padding: 0 30rpx;
  175. background-color: #fff;
  176. .top-right {
  177. font-size: 28rpx;
  178. font-weight: bold;
  179. color: #000000;
  180. display: flex;
  181. align-items: center;
  182. justify-content: flex-end;
  183. image {
  184. width: 19rpx;
  185. height: 11rpx;
  186. }
  187. }
  188. }
  189. .dk-info {
  190. height: 326rpx;
  191. width: 100%;
  192. display: flex;
  193. flex-direction: column;
  194. justify-content: center;
  195. align-items: center;
  196. background-color: #fff;
  197. margin-bottom: 20rpx;
  198. .big {
  199. font-size: 46rpx !important;
  200. font-weight: 800;
  201. color: #000000;
  202. margin-bottom: 10rpx;
  203. }
  204. .dk-day,
  205. .dk-tit {
  206. display: flex;
  207. flex-direction: row;
  208. justify-content: center;
  209. width: 100%;
  210. font-size: 26rpx;
  211. .dk-left {
  212. width: 48%;
  213. text-align: right;
  214. }
  215. .dk-center {
  216. width: 4%;
  217. flex-shrink: 0;
  218. text-align: center;
  219. color: #D7D7D7;
  220. }
  221. .dk-right {
  222. width: 48%;
  223. }
  224. }
  225. .dk-detail {
  226. display: flex;
  227. justify-content: center;
  228. width: 100%;
  229. margin-top: 50rpx;
  230. .detail-item {
  231. width: 30%;
  232. text-align: center;
  233. font-size: 28rpx;
  234. font-weight: bold;
  235. color: #000000;
  236. .item-tit {
  237. margin-top: 15rpx;
  238. font-size: 24rpx;
  239. font-weight: 500;
  240. color: #666666;
  241. }
  242. }
  243. }
  244. }
  245. .yg-list {
  246. background-color: #fff;
  247. width: 100%;
  248. .yg-wrap {
  249. display: flex;
  250. justify-content: space-between;
  251. align-items: center;
  252. padding: 0 40rpx 0 30rpx;
  253. height: 100rpx;
  254. border-bottom: 1px solid #F2F2F2;
  255. font-size: 28rpx;
  256. font-weight: bold;
  257. color: #000000;
  258. .yg-name {
  259. }
  260. .dk-status {
  261. display: flex;
  262. align-items: center;
  263. image {
  264. width: 19rpx;
  265. height: 11rpx;
  266. margin-left: 10rpx;
  267. }
  268. }
  269. }
  270. }
  271. .info-info {
  272. width:100%;
  273. height: 267rpx;
  274. background-color: #f8f8f8;
  275. display: flex;
  276. .base-left {
  277. flex-shrink: 0;
  278. width: 180rpx;
  279. height: 100%;
  280. display: flex;
  281. flex-direction: column;
  282. justify-content: center;
  283. align-items: center;
  284. font-size: 30rpx;
  285. font-weight: 800;
  286. color: #000000;
  287. .jg {
  288. width: 5rpx;
  289. height: 75rpx;
  290. background: #ECECEC;
  291. margin: 20rpx 0;
  292. }
  293. }
  294. .base-right {
  295. flex-grow: 1;
  296. width: 100%;
  297. .up {
  298. border-bottom: 1px solid #E4E4E4;
  299. }
  300. .right-item {
  301. height: 50%;
  302. padding-top: 30rpx;
  303. font-size: 26rpx;
  304. font-weight: 500;
  305. .item-tit {
  306. font-size: 30rpx;
  307. font-weight: 800;
  308. }
  309. }
  310. }
  311. }
  312. </style>