inout-record.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <template>
  2. <view>
  3. <view class="box">
  4. <view class="top">
  5. <text class="title">出入记录</text>
  6. </view>
  7. </view>
  8. <u-sticky offset-top="-90">
  9. <u-tabs :list="tabs" @change="change" :current="current" :is-scroll="false"></u-tabs>
  10. </u-sticky>
  11. <view class="card-box">
  12. <view class="card" v-for="(recordItem,index) in recordItemList" :key="index">
  13. <view class="t">
  14. <image class="icon" src="../../static/home-icon-01.png"></image>
  15. <text class="title">{{recordItem.companyName}}</text>
  16. </view>
  17. <view class="c">
  18. <view class="item car-num-item">
  19. <text class="car-num">{{recordItem.carNum}}</text>
  20. </view>
  21. <view class="item">
  22. <text class="p1">联系人:</text>
  23. <text class="p2">{{recordItem.user}}</text>
  24. </view>
  25. <view class="item">
  26. <text class="p1">联系电话:</text>
  27. <text class="p2">{{recordItem.phone}}</text>
  28. </view>
  29. <view class="item">
  30. <text class="p1">入场时间:</text>
  31. <text class="p2">{{recordItem.intime}}</text>
  32. </view>
  33. <view class="item">
  34. <text class="p1">出场时间:</text>
  35. <text class="p2">{{recordItem.outtime}}</text>
  36. </view>
  37. <view class="item">
  38. <text class="p1">状态:</text>
  39. <text class="p2">{{recordItem.state}}</text>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <u-loadmore style="margin: 30rpx;" :status="status"/>
  45. <uni-popup ref="shpopup" type="dialog">
  46. <uni-popup-dialog type="success" title="确定审核吗?" :duration="2000" @confirm="shconfirm"></uni-popup-dialog>
  47. </uni-popup>
  48. </view>
  49. </template>
  50. <script>
  51. export default {
  52. data() {
  53. return {
  54. current:0,
  55. status: 'loadmore',
  56. page: 0,
  57. tabs: [
  58. {
  59. name: '全部',
  60. },
  61. {
  62. name: '未入场',
  63. },
  64. {
  65. name: '已入场',
  66. },
  67. {
  68. name: '已出场',
  69. }
  70. ],
  71. recordItemList:[
  72. {
  73. companyName:'广西医科大一附院',
  74. carNum:'桂A.B5W61',
  75. user:'张三',
  76. phone:'18888888888',
  77. intime:'2022-01-17 19:02.01',
  78. outtime:'022-01-17 23:22.41',
  79. state:'未入场'
  80. },
  81. {
  82. companyName:'广西医科大一附院',
  83. carNum:'桂A.B5W61',
  84. user:'张三',
  85. phone:'18888888888',
  86. intime:'2022-01-17 19:02.01',
  87. outtime:'022-01-17 23:22.41',
  88. state:'已入场'
  89. },
  90. {
  91. companyName:'广西医科大一附院',
  92. carNum:'桂A.B5W61',
  93. user:'张三',
  94. phone:'18888888888',
  95. intime:'2022-01-17 19:02.01',
  96. outtime:'022-01-17 23:22.41',
  97. state:'已出场'
  98. }
  99. ]
  100. }
  101. },
  102. methods: {
  103. //点击上方切换栏,根据点击项重新加载数据
  104. change(index) {
  105. this.current = index;
  106. if(index==0){
  107. //加载全部
  108. }
  109. if(index==1){
  110. //加载未入场
  111. }
  112. if(index==2){
  113. //只加载已入场
  114. }
  115. if(index==3){
  116. //只加载已出场
  117. }
  118. },
  119. //------------------------------------------
  120. //上拉加载更多,分页模拟数据
  121. onReachBottom() {
  122. if(this.page >= 3) return ;
  123. this.status = 'loading';
  124. this.page = ++ this.page;
  125. setTimeout(() => {
  126. this.recordItemList += 5;//接接口后把数据加上,懒得写假数据了
  127. if(this.page >= 3) this.status = 'nomore';
  128. else this.status = 'loading';
  129. }, 2000)
  130. }
  131. }
  132. }
  133. </script>
  134. <style lang="scss">
  135. .card-box{
  136. display: flex;
  137. width: 100%;
  138. flex-direction: column;
  139. .card{
  140. background-color: #fff;
  141. border-radius: 20rpx;
  142. margin: 20rpx 20rpx 0 20rpx;
  143. padding: 30rpx;
  144. box-sizing: border-box;
  145. display: flex;
  146. flex-direction: column;
  147. .t{
  148. width: 100%;
  149. display: flex;
  150. align-items: center;
  151. padding-bottom: 30rpx;
  152. border-bottom: 1rpx solid #f5f5f5;
  153. .icon{
  154. width: 40rpx;
  155. height: 40rpx;
  156. }
  157. .title{
  158. font-size: 30rpx;
  159. font-weight: bold;
  160. margin-left: 20rpx;
  161. }
  162. }
  163. .c{
  164. padding:15rpx 0 0 0;
  165. display: flex;
  166. flex-wrap: wrap;
  167. //border-bottom: 1rpx solid #f5f5f5;
  168. .item{
  169. width: 50%;
  170. padding: 20rpx 0;
  171. display: flex;
  172. .car-num{
  173. background-color: #edf6ff;
  174. color: #0080ff;
  175. font-size: 44rpx;
  176. padding: 15rpx 0;
  177. text-align: center;
  178. width: 100%;
  179. border-radius: 10rpx;
  180. font-weight: bold;
  181. letter-spacing: 20rpx;
  182. }
  183. .p1{
  184. font-size: 28rpx;
  185. color: #999;
  186. flex: 5;
  187. }
  188. .p2{
  189. font-size: 28rpx;
  190. color: #191919;
  191. font-weight: bold;
  192. margin-left: 20rpx;
  193. flex: 7;
  194. }
  195. }
  196. .car-num-item{
  197. width: 100%;
  198. display: flex;
  199. align-items: center;
  200. justify-content: center;
  201. }
  202. }
  203. .b{
  204. display: flex;
  205. width: 100%;
  206. align-items: center;
  207. justify-content: space-between;
  208. .btn{
  209. height: 70rpx;
  210. display: flex;
  211. align-items: center;
  212. justify-content: center;
  213. //width: calc(50% - 15rpx);
  214. width: 100%;
  215. margin: 30rpx 0 0 0;
  216. border-radius: 10rpx;
  217. border-width: 1rpx;
  218. box-sizing: border-box;
  219. }
  220. .b1{
  221. background-color: #0080ff;
  222. color: #fff;
  223. }
  224. .b2{
  225. background-color: #f7f7f7;
  226. color: #191919;
  227. }
  228. .b3{
  229. background-color: #fff;
  230. color: #0080ff;
  231. border: 1rpx solid #0080ff;
  232. }
  233. }
  234. }
  235. }
  236. .t-btn{
  237. width: 400rpx;
  238. margin: 0 auto 80rpx auto;
  239. height: 88rpx;
  240. font-weight: bold;
  241. display: flex;
  242. align-items: center;
  243. justify-content: center;
  244. border-radius: 10rpx;
  245. color: #191919;
  246. font-size: 28rpx;
  247. background-color: #fff;
  248. border: 1px solid #eee;
  249. }
  250. @import '@/common/common.scss'
  251. </style>