Skip to content

Commit

Permalink
feat: project report detail add function point infomation (#3938)
Browse files Browse the repository at this point in the history
  • Loading branch information
hujiahao-hjh authored Oct 24, 2023
1 parent a17da2a commit 189c941
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
49 changes: 48 additions & 1 deletion shell/app/modules/dop/pages/report/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface listItem extends Report {
chart?: Report[];
}

const cardColorList = [undefined, '#16c2c3', '#697fff', '#f3b519'];
const cardColorList = [undefined, '#16c2c3', '#697fff', '#52C41A', '#f3b519'];

const ProjectReport = ({ route }: { route: { path: string } }) => {
const orgId = orgStore.useStore((s) => s.currentOrg.id);
Expand Down Expand Up @@ -363,6 +363,53 @@ const ProjectReport = ({ route }: { route: { path: string } }) => {
),
},
],
[
{
label: '负责的功能点数',
value: detailData.responsibleFuncPointsTotal,
render: (text: number) => (
<span className="flex items-center justify-center h-[120px] text-2xl">
{text ? <Tooltip title={text}>{Math.round(text)}</Tooltip> : '0'}
</span>
),
},
{
label: '需求的功能点数',
value: detailData.requirementFuncPointsTotal,
render: (text: number) => (
<span className="flex items-center justify-center h-[120px] text-2xl">
{text ? <Tooltip title={text}>{Math.round(text)}</Tooltip> : '0'}
</span>
),
},
{
label: '开发功能点数',
value: detailData.devFuncPointsTotal,
render: (text: number) => (
<span className="flex items-center justify-center h-[120px] text-2xl">
{text ? <Tooltip title={text}>{Math.round(text)}</Tooltip> : '0'}
</span>
),
},
{
label: '设计功能点数',
value: detailData.demandFuncPointsTotal,
render: (text: number) => (
<span className="flex items-center justify-center h-[120px] text-2xl">
{text ? <Tooltip title={text}>{Math.round(text)}</Tooltip> : '0'}
</span>
),
},
{
label: '测试功能点数',
value: detailData.testFuncPointsTotal,
render: (text: number) => (
<span className="flex items-center justify-center h-[120px] text-2xl">
{text ? <Tooltip title={text}>{Math.round(text)}</Tooltip> : '0'}
</span>
),
},
],
[
{
label: i18n.t('dop:bug total'),
Expand Down
5 changes: 5 additions & 0 deletions shell/app/modules/dop/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ export interface Report {
beginDate: string;
actualEndDate: string;
endDate: string;
responsibleFuncPointsTotal: string;
requirementFuncPointsTotal: string;
devFuncPointsTotal: string;
demandFuncPointsTotal: string;
testFuncPointsTotal: string;
}

export const getAddons = (query: {
Expand Down

0 comments on commit 189c941

Please sign in to comment.