From 617a3e7d241c490c4e7062eb57af67314a0352b4 Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Fri, 26 Jun 2026 17:26:34 +0800 Subject: [PATCH] =?UTF-8?q?feat(home):=20=E6=9B=B4=E6=96=B0=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E7=BB=A9=E6=95=88=E8=AF=84=E5=88=86=E6=8F=90=E9=86=92?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加selectType参数值为3 - 添加createBy参数用于筛选创建者 - 添加statusList参数支持动态状态筛选 - 当searchData中存在statusList时使用其值否则使用默认状态列表 - 优化数据赋值逻辑使用逻辑或运算符替代三元运算符 --- src/views/common/home.vue | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/views/common/home.vue b/src/views/common/home.vue index 9f24c28..4dbc565 100644 --- a/src/views/common/home.vue +++ b/src/views/common/home.vue @@ -111,11 +111,24 @@ export default { loadMyPerformanceScoreReminder () { const site = this.$store.state.user.site const username = this.$store.state.user.name - myPerformanceScoreReminder({ site, username }).then(({ data }) => { - if (data && data.code === 0 && data.data) { - this.myPerformanceScoreCount = data.data.count != null ? data.data.count : 0 - } - }).catch(() => {}) + + const params = { + site, + username, + selectType: 3, + createBy: username, + statusList: (this.searchData && this.searchData.statusList && this.searchData.statusList.length > 0) + ? this.searchData.statusList + : ['未开始', '进行中', '已完成'] + } + + myPerformanceScoreReminder(params) + .then(({ data }) => { + if (data && data.code === 0 && data.data) { + this.myPerformanceScoreCount = data.data.count || 0 + } + }) + .catch(() => {}) }, goMyPerformanceScoreList () { if (!this.myPerformanceScoreCount) return