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 {