risk.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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.hdangerTitle}}</div>
  37. <div class="time">{{item.dangerDeadline}}</div>
  38. </div>
  39. </div>
  40. </view>
  41. </template>
  42. <script>
  43. import { getDangerByList, getDangerByPage } from '@/api/dangerApi'
  44. export default {
  45. data() {
  46. return {
  47. statusBarHeight:0,
  48. type:"user",
  49. statistics: {
  50. review:10,
  51. rectify:2,
  52. complete:10,
  53. check:88,
  54. revocation:2
  55. },
  56. items:[]
  57. }
  58. },
  59. onLoad(){
  60. this.init()
  61. },
  62. methods: {
  63. init(){
  64. getDangerByList().then((res)=>{
  65. this.items=res.data
  66. })
  67. },
  68. changeTab(type){
  69. this.type=type
  70. if(type==='group'){
  71. }else{
  72. }
  73. },
  74. linkTo(item){
  75. let url="";
  76. switch(item.curActivityCode){
  77. case "review" ://评审
  78. url='/pages/risk/review/review'
  79. break;
  80. case "submit" ://提交
  81. url='/pages/risk/repeal/repeal'
  82. break;
  83. case "accept" ://验收
  84. url='/pages/risk/check/check'
  85. break;
  86. case "rectify" ://整改
  87. url='/pages/risk/rectify/rectify'
  88. break;
  89. }
  90. uni.setStorageSync('danger-info',item)
  91. uni.navigateTo({
  92. url
  93. })
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang="scss" scoped>
  99. .page-index{
  100. background: linear-gradient(180deg, #4D73FF 0%, rgba(77, 115, 255, 0) 100%);
  101. padding: 0 30upx;
  102. .title{
  103. .tab{
  104. font-size: 34upx;
  105. line-height: 50upx;
  106. margin-right: 32upx;
  107. color: rgba(255, 255, 255, 0.6);
  108. &.active{
  109. color: #fff;
  110. }
  111. }
  112. }
  113. .statistics{
  114. &{
  115. border-radius: 24upx;
  116. background-color: #fff;
  117. padding:36upx 0 0 24upx;
  118. margin-top: 48upx;
  119. }
  120. .head{
  121. font-weight: 900;
  122. font-size: 34upx;
  123. line-height: 50upx;
  124. color: #151515;
  125. }
  126. .container{
  127. display: flex;
  128. align-items: center;
  129. flex-wrap: wrap;
  130. .item{
  131. width: 33.33%;
  132. display: flex;
  133. justify-content: center;
  134. align-items: center;
  135. flex-direction: column;
  136. margin-bottom: 40upx;
  137. .icon{
  138. display: block;
  139. width:88upx;
  140. height: 88upx;
  141. }
  142. text{
  143. font-size: 28upx;
  144. line-height: 42upx;
  145. color: #151515;
  146. padding-top: 18upx;
  147. }
  148. }
  149. }
  150. }
  151. .task-list{
  152. border-radius: 24upx;
  153. background-color: #fff;
  154. margin-top: 24upx;
  155. padding: 36upx 24upx;
  156. .head{
  157. font-weight: 900;
  158. font-size: 34upx;
  159. line-height: 50upx;
  160. color: #151515;
  161. }
  162. .item{
  163. padding: 30upx 40upx 38upx 40upx;
  164. .task-title{
  165. color: #212121;
  166. font-size: 32upx;
  167. padding-bottom: 24upx;
  168. }
  169. .time{
  170. background-image: url(/static/index/time.png);
  171. background-repeat: no-repeat;
  172. background-position: left center;
  173. background-size: 24upx 24upx;
  174. padding-left: 36upx;
  175. color: #999;
  176. font-size: 24upx;
  177. }
  178. }
  179. }
  180. }
  181. .container {
  182. padding: 20px;
  183. font-size: 14px;
  184. line-height: 24px;
  185. }
  186. </style>