risk.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view class="page-index">
  3. <view class="status_bar"></view>
  4. <div class="title">
  5. <text class="tab" :class="type==='user'?'active':''" @click="changeTab('user')">我的</text>
  6. <text class="tab" :class="type==='group'?'active':''" @click="changeTab('group')">部门</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.review}}个</text>
  14. </div>
  15. <div class="item">
  16. <img class="icon" src="/static/index/expire.png" alt="">
  17. <text>待整改{{statistics.rectify}}个</text>
  18. </div>
  19. <div class="item">
  20. <img class="icon" src="/static/index/complete.png" alt="">
  21. <text>待验收{{statistics.check}}个</text>
  22. </div>
  23. <div class="item">
  24. <img class="icon" src="/static/index/complete.png" alt="">
  25. <text>已完成{{statistics.complete}}个</text>
  26. </div>
  27. <div class="item">
  28. <img class="icon" src="/static/index/revocation.png" alt="">
  29. <text>已撤销{{statistics.revocation}}个</text>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="task-list">
  34. <div class="head">待办任务</div>
  35. <div class="item" v-for="(item,index) in items" :key="index" @click="linkTo(item)">
  36. <div class="task-title">{{item.title}}</div>
  37. <div class="time">{{item.time}}</div>
  38. </div>
  39. </div>
  40. </view>
  41. </template>
  42. <script>
  43. export default {
  44. data() {
  45. return {
  46. statusBarHeight:0,
  47. type:"user",
  48. statistics: {
  49. review:10,
  50. rectify:2,
  51. complete:10,
  52. check:88,
  53. revocation:2
  54. },
  55. items:[]
  56. }
  57. },
  58. onLoad(){
  59. this.init()
  60. },
  61. methods: {
  62. init(){
  63. let items=[];
  64. for(let i=0;i<10;i++){
  65. items.push({
  66. id:i+1,
  67. title:'{2号-770-32002}:采空区封堵完好,无渗水情况。',
  68. time:'2022-02-03 09:00'
  69. })
  70. }
  71. this.items=items
  72. },
  73. changeTab(type){
  74. this.type=type
  75. if(type==='group'){
  76. }else{
  77. }
  78. },
  79. linkTo(item){
  80. let status=item.id%4>0?item.id%4:item.id%4+4
  81. let url="";
  82. switch(status){
  83. case 1 ://评审
  84. url='/pages/risk/review/review'
  85. break;
  86. case 2 ://撤销
  87. url='/pages/risk/repeal/repeal'
  88. break;
  89. case 3 ://验收
  90. url='/pages/risk/check/check'
  91. break;
  92. case 4 ://整改
  93. url='/pages/risk/rectify/rectify'
  94. break;
  95. }
  96. uni.navigateTo({
  97. url
  98. })
  99. }
  100. }
  101. }
  102. </script>
  103. <style lang="scss" scoped>
  104. .page-index{
  105. background: linear-gradient(180deg, #4D73FF 0%, rgba(77, 115, 255, 0) 100%);
  106. padding: 0 30upx;
  107. .title{
  108. .tab{
  109. font-size: 34upx;
  110. line-height: 50upx;
  111. margin-right: 32upx;
  112. color: rgba(255, 255, 255, 0.6);
  113. &.active{
  114. color: #fff;
  115. }
  116. }
  117. }
  118. .statistics{
  119. &{
  120. border-radius: 24upx;
  121. background-color: #fff;
  122. padding:36upx 0 0 24upx;
  123. margin-top: 48upx;
  124. }
  125. .head{
  126. font-weight: 900;
  127. font-size: 34upx;
  128. line-height: 50upx;
  129. color: #151515;
  130. }
  131. .container{
  132. display: flex;
  133. align-items: center;
  134. flex-wrap: wrap;
  135. .item{
  136. width: 33.33%;
  137. display: flex;
  138. justify-content: center;
  139. align-items: center;
  140. flex-direction: column;
  141. margin-bottom: 40upx;
  142. .icon{
  143. display: block;
  144. width:88upx;
  145. height: 88upx;
  146. }
  147. text{
  148. font-size: 28upx;
  149. line-height: 42upx;
  150. color: #151515;
  151. padding-top: 18upx;
  152. }
  153. }
  154. }
  155. }
  156. .task-list{
  157. border-radius: 24upx;
  158. background-color: #fff;
  159. margin-top: 24upx;
  160. padding: 36upx 24upx;
  161. .head{
  162. font-weight: 900;
  163. font-size: 34upx;
  164. line-height: 50upx;
  165. color: #151515;
  166. }
  167. .item{
  168. padding: 30upx 40upx 38upx 40upx;
  169. .task-title{
  170. color: #212121;
  171. font-size: 32upx;
  172. padding-bottom: 24upx;
  173. }
  174. .time{
  175. background-image: url(/static/index/time.png);
  176. background-repeat: no-repeat;
  177. background-position: left center;
  178. background-size: 24upx 24upx;
  179. padding-left: 36upx;
  180. color: #999;
  181. font-size: 24upx;
  182. }
  183. }
  184. }
  185. }
  186. .container {
  187. padding: 20px;
  188. font-size: 14px;
  189. line-height: 24px;
  190. }
  191. </style>