From 1187f20fb18dca0ca2a435d021591c1a81a086a2 Mon Sep 17 00:00:00 2001 From: Ironsp <1522278303@qq.com> Date: Fri, 9 Oct 2026 11:41:50 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E9=A1=B9=E7=9B=AE=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/project.ts | 4 ++-- src/stores/modules/project.ts | 5 ++--- src/types/business/project.d.ts | 8 +++----- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/api/project.ts b/src/api/project.ts index 52eeb4a..8c69aea 100644 --- a/src/api/project.ts +++ b/src/api/project.ts @@ -14,7 +14,7 @@ import { formatDate } from '@/utils/format' // ───────────────────────────────────────────────────────────────────────────── // GET /web/requirementPool/list → 控制器 ProjectRequirementUserController#list // → 服务层 ProjectRequirementServiceImpl#queryUserPageList -// 返回 { requirementPage: { total, rows: RdProjectVo[] }, requirementStatistics: null } +// 返回 { total, rows: RdProjectVo[] } // key → 模糊匹配 projectName / projectNo / requirementDesc // pageNum/pageSize → 分页参数 PageQuery // ───────────────────────────────────────────────────────────────────────────── @@ -83,7 +83,7 @@ export function getCompletedProjects(): Promise { pageSize: 200, status: 'COMPLETED', }, - }).then((result) => result?.requirementPage?.rows ?? []) + }).then((result) => result?.rows ?? []) } // ───────────────────────────────────────────────────────────────────────────── diff --git a/src/stores/modules/project.ts b/src/stores/modules/project.ts index 4a1d6f3..848aca1 100644 --- a/src/stores/modules/project.ts +++ b/src/stores/modules/project.ts @@ -85,9 +85,8 @@ export const useProjectStore = defineStore('project', () => { async function fetchList(): Promise { const result = await getProjectList(query.value) - const page = result?.requirementPage - list.value = page?.rows ?? [] - total.value = page?.total ?? 0 + list.value = result?.rows ?? [] + total.value = result?.total ?? 0 } async function fetchCompletedProjects(): Promise { diff --git a/src/types/business/project.d.ts b/src/types/business/project.d.ts index 5a5b2c1..2435ab8 100644 --- a/src/types/business/project.d.ts +++ b/src/types/business/project.d.ts @@ -57,12 +57,10 @@ export interface ProjectStatistics { businessTypeCounts?: ProjectBusinessTypeCount[] | null } +/** GET /web/requirementPool/list 的 data:TableDataInfo 形态(不再包 requirementPage) */ export interface ProjectListResult { - requirementPage?: { - total: number - rows: RdProjectVo[] - } | null - requirementStatistics?: ProjectStatistics | null + total: number + rows: RdProjectVo[] } export interface Milestone {