From d61906055298d2cee144b2a2946e9e0856bb8392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com> Date: Thu, 25 Apr 2024 14:53:38 +0800 Subject: [PATCH] =?UTF-8?q?task=20=E9=93=B6=E5=86=9C=E4=BA=8B=E9=A1=B9?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E9=A1=B5=E9=9D=A2=E5=8D=87=E7=BA=A7=20?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83=E5=BE=85=E5=8A=9E=E5=B7=B2?= =?UTF-8?q?=E5=8A=9E=E6=95=B0=E6=8D=AE=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/yinnong/my.vue | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/views/yinnong/my.vue b/src/views/yinnong/my.vue index 01bce5ec..6018d384 100644 --- a/src/views/yinnong/my.vue +++ b/src/views/yinnong/my.vue @@ -19,12 +19,12 @@

待办

-

0

+

{{todoTotal}}

未完成的待办审批事项

已办

-

0

+

{{doneTotal}}

未完成的待办审批事项

@@ -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"})