index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <view class="page-index">
  3. <view class="status_bar"></view>
  4. <div class="title">
  5. <text class="tab">我的</text>
  6. <text class="tab active">部门</text>
  7. </div>
  8. <div class="statistics">
  9. <div class="head">任务统计</div>
  10. <div class="container">
  11. <div class="item">
  12. <img class="icon" src="/static/index/wait.png" alt="">
  13. <text>待巡检{{statistics.wait}}个</text>
  14. </div>
  15. <div class="item">
  16. <img class="icon" src="/static/index/expire.png" alt="">
  17. <text>已逾期{{statistics.expire}}个</text>
  18. </div>
  19. <div class="item">
  20. <img class="icon" src="/static/index/complete.png" alt="">
  21. <text>已完成{{statistics.complete}}个</text>
  22. </div>
  23. </div>
  24. </div>
  25. <div class="task-list">
  26. <div class="head">待办任务</div>
  27. <div class="item" v-for="(item,index) in 10" :key="index">
  28. <div class="task-title">{2号-770-32002}:采空区封堵完好,无渗水情况。</div>
  29. <div class="time">2022-02-03 09:00</div>
  30. </div>
  31. </div>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. data() {
  37. return {
  38. statusBarHeight:0,
  39. statistics: {
  40. wait:3,
  41. expire:2,
  42. complete:10
  43. }
  44. }
  45. },
  46. onLoad(){
  47. this.initStatusBarHeight()
  48. },
  49. methods: {
  50. initStatusBarHeight(){
  51. console.log(uni.getSystemInfoSync())
  52. this.statusBarHeight=uni.getSystemInfoSync().statusBarHeight
  53. }
  54. }
  55. }
  56. </script>
  57. <style lang="scss" scoped>
  58. .page-index{
  59. background: linear-gradient(180deg, #4D73FF 0%, rgba(77, 115, 255, 0) 100%);
  60. padding: 0 30upx;
  61. .title{
  62. .tab{
  63. font-size: 34upx;
  64. line-height: 50upx;
  65. margin-right: 32upx;
  66. color: #fff;
  67. &.active{
  68. color: rgba(255, 255, 255, 0.6);
  69. }
  70. }
  71. }
  72. .statistics{
  73. &{
  74. border-radius: 24upx;
  75. background-color: #fff;
  76. padding:36upx 0 44upx 24upx;
  77. margin-top: 48upx;
  78. }
  79. .head{
  80. font-weight: 900;
  81. font-size: 34upx;
  82. line-height: 50upx;
  83. color: #151515;
  84. }
  85. .container{
  86. display: flex;
  87. justify-content: center;
  88. align-items: center;
  89. .item{
  90. width: 33.33%;
  91. display: flex;
  92. justify-content: center;
  93. align-items: center;
  94. flex-direction: column;
  95. .icon{
  96. display: block;
  97. width:88upx;
  98. height: 88upx;
  99. }
  100. text{
  101. font-size: 28upx;
  102. line-height: 42upx;
  103. color: #151515;
  104. padding-top: 18upx;
  105. }
  106. }
  107. }
  108. }
  109. .task-list{
  110. border-radius: 24upx;
  111. background-color: #fff;
  112. margin-top: 24upx;
  113. padding: 36upx 24upx;
  114. .head{
  115. font-weight: 900;
  116. font-size: 34upx;
  117. line-height: 50upx;
  118. color: #151515;
  119. }
  120. .item{
  121. padding: 30upx 40upx 38upx 40upx;
  122. .task-title{
  123. color: #212121;
  124. font-size: 32upx;
  125. padding-bottom: 24upx;
  126. }
  127. .time{
  128. background-image: url(/static/index/time.png);
  129. background-repeat: no-repeat;
  130. background-position: left center;
  131. background-size: 24upx 24upx;
  132. padding-left: 36upx;
  133. color: #999;
  134. font-size: 24upx;
  135. }
  136. }
  137. }
  138. }
  139. .container {
  140. padding: 20px;
  141. font-size: 14px;
  142. line-height: 24px;
  143. }
  144. </style>