From b689c26f5c7b8bd4bc89d90f6182ed23abda524b Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Mon, 24 Nov 2025 10:44:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E5=85=AC=E5=91=8A=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=92=8C=E9=80=BE=E6=9C=9F=E4=BB=BB=E5=8A=A1=E9=87=8C=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E8=BF=9B=E8=A1=8C=E7=A7=81=E6=9C=89?= =?UTF-8?q?=E8=A7=86=E8=A7=92=E7=9A=84=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/index/ContentDashboard.vue | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/components/index/ContentDashboard.vue b/components/index/ContentDashboard.vue index 8b424d4..81cd8ff 100644 --- a/components/index/ContentDashboard.vue +++ b/components/index/ContentDashboard.vue @@ -322,7 +322,19 @@ const calculateOverdueDays = (expireTime) => { // 加载逾期任务列表 const loadOverdueTasks = async () => { try { - const res = await getTaskList({ overdue: true,pageNum:1,pageSize:100, statusList: [1, 2] }); + // 根据私有视角设置 ownerId 参数 + const ownerId = currentUserId.value && privateView.value ? currentUserId.value : ''; + const params = { + overdue: true, + pageNum: 1, + pageSize: 100, + statusList: [2] + }; + if (ownerId) { + params.ownerId = ownerId; + } + + const res = await getTaskList(params); console.log('逾期任务列表加载成功:', res); // 根据实际返回的数据结构:{ total: 27, rows: [...], code: 200, msg: "查询成功" } @@ -507,6 +519,11 @@ watch(filterSelf, () => { loadDashboardData(); }); +// 监听私有视角变化,自动刷新数据 +watch(() => userStore.privateView, () => { + loadDashboardData(); +}); + // 跳转到任务列表页 const goToTaskList = (label) => { // 将中文标签映射为状态参数