diff --git a/apps/web/app/requirements/page.tsx b/apps/web/app/requirements/page.tsx
index aad5a95..ef369aa 100644
--- a/apps/web/app/requirements/page.tsx
+++ b/apps/web/app/requirements/page.tsx
@@ -13,6 +13,13 @@ import type { Requirement, RequirementStatus, SourceType } from '@/lib/requireme
import { deriveReqDevStatus, canEditRequirement, canCloseRequirement, REQ_DEV_STATUS_LABEL, REQ_DEV_STATUS_COLOR } from '@/lib/linkage-engine';
import { buildRequirementScopeTree, filterRequirementScopeTreeByKeyword, filterRequirementsByScope, type RequirementProductScopeNode, type RequirementScopeSelection } from '@/lib/requirement-scope';
import { sortRequirementsByCreatedAt, type RequirementDateSort } from '@/lib/requirement-sort';
+import {
+ REQUIREMENT_TABLE_BADGE_CLASS,
+ REQUIREMENT_TABLE_NOWRAP_CELL_CLASS,
+ REQUIREMENT_TABLE_SMALL_BADGE_CLASS,
+ getRequirementTableTextClass,
+} from '@/lib/requirement-table-layout';
+import { getRequirementVersionSelectionPatch } from '@/lib/requirement-version-link';
import { Pagination, usePagination } from '@/components/Pagination';
import { RequirementModal } from '@/components/requirement/RequirementModal';
import { RequirementDetail } from '@/components/requirement/RequirementDetail';
@@ -488,29 +495,50 @@ function RequirementsPageContent() {
{/* 需求来源 */}
- {SOURCE_TYPE_LABEL[req.sourceType]}: {req.sourceTarget}
+ {(() => {
+ const sourceText = `${SOURCE_TYPE_LABEL[req.sourceType]}: ${req.sourceTarget}`;
+ return (
+
+ {sourceText}
+
+ );
+ })()}
|
{/* 所属项目 */}
- {allProjects.find((p) => p.id === req.projectId)?.name ?? '-'}
+ {(() => {
+ const projectName = allProjects.find((p) => p.id === req.projectId)?.name ?? '-';
+ return (
+
+ {projectName}
+
+ );
+ })()}
|
{/* 需求类型 */}
- {types.find((t) => t.id === req.typeId)?.name ?? '-'}
+ {(() => {
+ const typeName = types.find((t) => t.id === req.typeId)?.name ?? '-';
+ return (
+
+ {typeName}
+
+ );
+ })()}
|
{/* 状态 */}
-
-
+ |
+
{REQ_STATUS_LABEL[req.status]}
|
{/* 优先级 */}
-
-
+ |
+
{req.priority}
|
@@ -521,11 +549,11 @@ function RequirementsPageContent() {
{/* 开发状态 */}
-
+ |
{(() => {
const devStatus = deriveReqDevStatus(req.id, devTasks);
return (
-
+
{REQ_DEV_STATUS_LABEL[devStatus]}
);
@@ -534,17 +562,19 @@ function RequirementsPageContent() {
{/* 录入人员 */}
|
- {req.creator}
+
+ {req.creator}
+
|
{/* 录入日期 */}
-
+ |
{new Date(req.createdAt).toISOString().slice(0, 10)}
|
{/* 操作 */}
e.stopPropagation()}>
-
+
{/* 编辑:待评审/已采纳/已规划,且开发中不可编辑 */}
{(['pending_review', 'adopted', 'planned'] as const).includes(req.status as any) && canEditRequirement(req.id, devTasks) && (
|