Browse Source

task 银农事项审批页面升级 个人中心待办已办数据对接

rongxin_test
庞东旭 1 year ago
parent
commit
d619060552
1 changed files with 19 additions and 2 deletions
  1. +19
    -2
      src/views/yinnong/my.vue

+ 19
- 2
src/views/yinnong/my.vue View File

@@ -19,12 +19,12 @@
<div class="flex_main">
<div class="flex_block">
<p>待办</p>
<p>0</p>
<p>{{todoTotal}}</p>
<p>未完成的待办审批事项</p>
</div>
<div class="flex_block">
<p>已办</p>
<p>0</p>
<p>{{doneTotal}}</p>
<p>未完成的待办审批事项</p>
</div>
</div>
@@ -140,6 +140,7 @@
import yinnongIndex from "../yinnongIndex";
import {getInfo, logout} from "../../api/login";
import request from '@/utils/request'
import {A_myDoneList, A_myTodoList} from "@/api/audit/aauditpipeline";
export default {
components: {
yinnongIndex
@@ -154,6 +155,13 @@
deptName:"",
userId:"",
avatar:"",
queryParams: {
pageNum: 1,
pageSize:5,
},
todoTotal:0,
doneTotal:0,

};
},
created() {
@@ -163,8 +171,17 @@
this.userId = response.user.userId
this.avatar = location.protocol+"//"+location.host+request.defaults.baseURL+response.user.avatar
});
this.getData();
},
methods: {
getData(){
A_myTodoList(this.queryParams).then((response) => {
this.todoTotal = response.total;
})
A_myDoneList(this.queryParams).then((response) => {
this.doneTotal = response.total;
})
},
logout(){
this.$store.dispatch('LogOut').then(() => {
this.$router.push({path:"../yinnongLogin"})


Loading…
Cancel
Save