123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- <template>
- <view class="page-index">
- <view class="status_bar"></view>
- <div class="title">
- <text class="tab" :class="type==='user'?'active':''" @click="changeTab('user')">我的</text>
- <text class="tab" :class="type==='group'?'active':''" @click="changeTab('group')">部门</text>
- </div>
- <div class="statistics">
- <div class="head">任务统计</div>
- <div class="container">
- <div class="item">
- <img class="icon" src="/static/index/wait.png" alt="">
- <text>待评审{{statistics.review}}个</text>
- </div>
- <div class="item">
- <img class="icon" src="/static/index/expire.png" alt="">
- <text>待整改{{statistics.rectify}}个</text>
- </div>
- <div class="item">
- <img class="icon" src="/static/index/complete.png" alt="">
- <text>待验收{{statistics.check}}个</text>
- </div>
- <div class="item">
- <img class="icon" src="/static/index/complete.png" alt="">
- <text>已完成{{statistics.complete}}个</text>
- </div>
- <div class="item">
- <img class="icon" src="/static/index/revocation.png" alt="">
- <text>已撤销{{statistics.revocation}}个</text>
- </div>
- </div>
- </div>
- <div class="task-list">
- <div class="head">待办任务</div>
- <div class="item" v-for="(item,index) in items" :key="index" @click="linkTo(item)">
- <div class="task-title">{{item.title}}</div>
- <div class="time">{{item.time}}</div>
- </div>
- </div>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- statusBarHeight:0,
- type:"user",
- statistics: {
- review:10,
- rectify:2,
- complete:10,
- check:88,
- revocation:2
- },
- items:[]
- }
- },
- onLoad(){
- this.init()
- },
- methods: {
- init(){
- let items=[];
- for(let i=0;i<10;i++){
- items.push({
- id:i+1,
- title:'{2号-770-32002}:采空区封堵完好,无渗水情况。',
- time:'2022-02-03 09:00'
- })
- }
- this.items=items
- },
- changeTab(type){
- this.type=type
- if(type==='group'){
-
- }else{
-
- }
- },
- linkTo(item){
- let status=item.id%4>0?item.id%4:item.id%4+4
- let url="";
- switch(status){
- case 1 ://评审
- url='/pages/risk/review/review'
- break;
- case 2 ://撤销
- url='/pages/risk/repeal/repeal'
- break;
- case 3 ://验收
- url='/pages/risk/check/check'
- break;
- case 4 ://整改
- url='/pages/risk/rectify/rectify'
- break;
- }
- uni.navigateTo({
- url
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .page-index{
- background: linear-gradient(180deg, #4D73FF 0%, rgba(77, 115, 255, 0) 100%);
- padding: 0 30upx;
- .title{
- .tab{
- font-size: 34upx;
- line-height: 50upx;
- margin-right: 32upx;
- color: rgba(255, 255, 255, 0.6);
- &.active{
- color: #fff;
- }
- }
- }
- .statistics{
- &{
- border-radius: 24upx;
- background-color: #fff;
- padding:36upx 0 0 24upx;
- margin-top: 48upx;
- }
- .head{
- font-weight: 900;
- font-size: 34upx;
- line-height: 50upx;
- color: #151515;
- }
- .container{
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- .item{
- width: 33.33%;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
- margin-bottom: 40upx;
- .icon{
- display: block;
- width:88upx;
- height: 88upx;
- }
- text{
- font-size: 28upx;
- line-height: 42upx;
- color: #151515;
- padding-top: 18upx;
- }
- }
- }
- }
- .task-list{
- border-radius: 24upx;
- background-color: #fff;
- margin-top: 24upx;
- padding: 36upx 24upx;
- .head{
- font-weight: 900;
- font-size: 34upx;
- line-height: 50upx;
- color: #151515;
- }
- .item{
- padding: 30upx 40upx 38upx 40upx;
- .task-title{
- color: #212121;
- font-size: 32upx;
- padding-bottom: 24upx;
- }
- .time{
- background-image: url(/static/index/time.png);
- background-repeat: no-repeat;
- background-position: left center;
- background-size: 24upx 24upx;
- padding-left: 36upx;
- color: #999;
- font-size: 24upx;
- }
- }
- }
- }
- .container {
- padding: 20px;
- font-size: 14px;
- line-height: 24px;
- }
- </style>
|