Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ujia
/
uj-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7823eb54
authored
Nov 23, 2026
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改表格组件
1 parent
098d1351
Pipeline
#592
for
7823eb54
failed
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
11 deletions
apps/web/subapps/usedcar/src/pages/Assessment/EvaluationStatus.tsx
apps/web/subapps/usedcar/src/pages/Assessment/assessment.css
apps/web/subapps/usedcar/src/pages/Assessment/index.tsx
apps/web/subapps/usedcar/src/pages/Assessment/EvaluationStatus.tsx
View file @
7823eb5
import { evaluationStatusColor, evaluationStatusLabel } from './assessmentDict';
import { evaluationStatusColor, evaluationStatusLabel } from './assessmentDict';
/**
/**
* 评估单状态:整块背景色标签,背景取源系统 evaluationStatusOptMap[status],
* 评估单状态:颜色取源系统 evaluationStatusOptMap[status],文案取 evaluationStatusOpt。
* 文案取 evaluationStatusOpt。列表、详情头部、车辆信息三处共用,避免一处有色一处没色。
* block = 整块底色标签(列表用,密集行里一眼可辨);
* 源色(#FDB757 / #2CCA74 等)都是中浅色,白字对比度不足,统一用深色文字。
* dot = 彩色圆点 + 文案(详情页头部 / 车辆信息用,不打断正文阅读节奏)。
* 源色(#FDB757 / #2CCA74 等)都是中浅色,底色块上用白字。
*/
*/
export function EvaluationStatus({ value }: { value: unknown }) {
export function EvaluationStatus({
value,
variant = 'dot',
}: {
value: unknown;
variant?: 'block' | 'dot';
}) {
const color = evaluationStatusColor(value);
const color = evaluationStatusColor(value);
const label = evaluationStatusLabel(value);
if (variant === 'block') {
return (
<span className="uc-eval-status" style={color ? { background: color } : undefined}>
{label}
</span>
);
}
return (
return (
<span className="uc-eval-status" style={color ? { background: color } : undefined}>
<span className="uc-eval-status-dot">
{evaluationStatusLabel(value)}
{color ? <i className="uc-eval-status-dot__mark" style={{ background: color }} /> : null}
{label}
</span>
</span>
);
);
}
}
apps/web/subapps/usedcar/src/pages/Assessment/assessment.css
View file @
7823eb5
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
gap
:
8px
;
gap
:
8px
;
padding
:
12px
0
;
padding
:
12px
0
;
}
}
/* 评估单状态
:整块背景色标签,背景色由组件按 evaluationStatusOptMap 内联下发,文字统一白色
。
/* 评估单状态
两种呈现:列表用整块底色(密集行里一眼可辨),详情用圆点 + 文案(不抢正文)
。
未知状态码不带语义背景,退回深灰底白字(浅底白字看不清),不给 '-' 套
语义色。 */
背景色 / 圆点色都由组件按 evaluationStatusOptMap 内联下发;未知码不带
语义色。 */
.uc-eval-status
{
.uc-eval-status
{
display
:
inline-flex
;
display
:
inline-flex
;
align-items
:
center
;
align-items
:
center
;
...
@@ -26,3 +26,15 @@
...
@@ -26,3 +26,15 @@
color
:
#fff
;
color
:
#fff
;
background
:
#6b7280
;
background
:
#6b7280
;
}
}
.uc-eval-status-dot
{
display
:
inline-flex
;
align-items
:
center
;
gap
:
6px
;
white-space
:
nowrap
;
}
.uc-eval-status-dot__mark
{
width
:
6px
;
height
:
6px
;
border-radius
:
50%
;
flex
:
none
;
}
apps/web/subapps/usedcar/src/pages/Assessment/index.tsx
View file @
7823eb5
import { useMemo, useState } from 'react';
import { useMemo, useState } from 'react';
import { useQuery } from '@tanstack/react-query';
import { useQuery } from '@tanstack/react-query';
import dayjs, { type Dayjs } from 'dayjs';
import dayjs, { type Dayjs } from 'dayjs';
import { UAlert, UButton, UCard, UImage, UResult
, UTag
} from '@uj/ui';
import { UAlert, UButton, UCard, UImage, UResult } from '@uj/ui';
import {
import {
DataTable,
DataTable,
PageShell,
PageShell,
...
@@ -16,7 +16,6 @@ import { UC } from '@/permissions/codes';
...
@@ -16,7 +16,6 @@ import { UC } from '@/permissions/codes';
import { goTo } from '../Leads/navigate';
import { goTo } from '../Leads/navigate';
import { downloadCenter } from '@uj/platform-sdk';
import { downloadCenter } from '@uj/platform-sdk';
import { errorDetail } from '@/utils/error';
import { errorDetail } from '@/utils/error';
import { EVALUATION_STATUS } from './assessmentDict';
import { EvaluationStatus } from './EvaluationStatus';
import { EvaluationStatus } from './EvaluationStatus';
import './assessment.css';
import './assessment.css';
...
@@ -233,7 +232,7 @@ export default function Assessment() {
...
@@ -233,7 +232,7 @@ export default function Assessment() {
title: '评估单状态',
title: '评估单状态',
dataIndex: 'status',
dataIndex: 'status',
width: 130,
width: 130,
render: (v: unknown) => <
UTag color="blue">{labelOf(EVALUATION_STATUSES, v)}</UTag
>,
render: (v: unknown) => <
EvaluationStatus value={v} variant="block" /
>,
},
},
{ title: '车主姓名', dataIndex: 'previousOwnerName', width: 110, render: text },
{ title: '车主姓名', dataIndex: 'previousOwnerName', width: 110, render: text },
{ title: '车主电话', dataIndex: 'previousOwnerPhone', width: 130, render: text },
{ title: '车主电话', dataIndex: 'previousOwnerPhone', width: 130, render: text },
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment