| | |
| | | <uni-icons type="right"></uni-icons> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="taskbox"> |
| | | <view class="taskbox-title"> |
| | | <y-title title="待处理任务"></y-title> |
| | | </view> |
| | | <view class="taskbox-main"> |
| | | <view class="taskbox-body" v-for="(item,index) in Data" @click="goDetl(item)"> |
| | | <view class="taskbox-body-title">{{item.title}}</view> |
| | | <view class="taskbox-body-cell"> |
| | | <text class="taskbox-body-number">{{item.value}}</text> |
| | | <text class="taskbox-body-unit">个</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | export default{ |
| | | data() { |
| | | return { |
| | | username: '' |
| | | username: '', |
| | | Data: [ |
| | | { field: 'planPendingTaskCount', title: '规划申请单', hide: false,value: ''}, |
| | | { field: 'planPriOnlinePendingTaskCount', title: '核价审批', hide: false,value: '' }, |
| | | { field: 'priQuotePendingTaskCount', title: '报价审批', hide: false,value: '' }, |
| | | { field: 'businessTripPendingTaskCount', title: '出差审批', hide: false,value: '' }, |
| | | { field: 'reimburseOnlinePendingTaskCount', title: '报销审批', hide: false,value: '' }, |
| | | { field: 'priOnlinePendingTaskCount', title: '可接收核价任务', hide: false,value: '' }, |
| | | ], |
| | | data2: [] |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.getDetail() |
| | | this.getPersonData() |
| | | }, |
| | | methods: { |
| | | async getDetail() { |
| | |
| | | url: '../login/login' |
| | | }); |
| | | }, 1000); |
| | | }, |
| | | // 获取任务信息 |
| | | getPersonData() { |
| | | let _this = this |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/dashboard/personData/auth`, |
| | | header: {'token' : uni.getStorageSync('token')}, |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | for (let k of _this.Data) { |
| | | k.value = res.data[k.field] |
| | | res.data[k.field] |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | goDetl(item) { |
| | | if (item.value > 0) { |
| | | let url = '/pages/business' |
| | | switch(item.field) { |
| | | case 'planPendingTaskCount': |
| | | url = `${url}/plan/plan` |
| | | break; |
| | | case 'planPriOnlinePendingTaskCount': |
| | | url = `${url}/pricing/priOnline` |
| | | break; |
| | | case 'priQuotePendingTaskCount': |
| | | url = `${url}/pricing/priQuote` |
| | | break; |
| | | case 'businessTripPendingTaskCount': |
| | | url = `${url}/goBusiness/goBusiness` |
| | | break; |
| | | case 'reimburseOnlinePendingTaskCount': |
| | | url = `${url}/goBusiness/reimburseOnline` |
| | | break; |
| | | case 'priOnlinePendingTaskCount': |
| | | url = `${url}/pricing/priOnline` |
| | | break; |
| | | } |
| | | uni.navigateTo({ |
| | | url:url |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .taskbox { |
| | | margin: 32rpx; |
| | | padding: 16rpx; |
| | | background-color: #fff; |
| | | border-radius: 20rpx; |
| | | } |
| | | .taskbox-main { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | } |
| | | .taskbox-body-cell { |
| | | /* display: flex; */ |
| | | margin-left: 16rpx; |
| | | } |
| | | .taskbox-body-number { |
| | | font-size: 40rpx; |
| | | font-weight: bold; |
| | | } |
| | | .taskbox-body-unit { |
| | | margin-left: 8rpx; |
| | | /* vertical-align: text-bottom; */ |
| | | } |
| | | .taskbox-body { |
| | | margin: 16rpx; |
| | | width: 45%; |
| | | /* background-color: aquamarine; */ |
| | | } |
| | | </style> |