中英文切换根据已有的功能 已经基本完善

This commit is contained in:
mmc
2026-08-14 13:33:13 +08:00
parent 62b03bba03
commit 027455272b
18 changed files with 561 additions and 481 deletions

View File

@@ -452,7 +452,7 @@ const WorkOrderPage = () => {
{
title: t('workOrder.handle'),
value: orderStat.avgHandleHour,
unit: '小时',
unit: t('workOrder.hour'),
subValue: orderStat.avgDiff,
subText: '较上周',
icon: <Timer size={24} color="#1890ff" />,
@@ -461,7 +461,7 @@ const WorkOrderPage = () => {
{
title: t('workOrder.fixed2Ai'),
value: orderStat.aiCreate,
unit: '单',
unit: t('workOrder.workorderUnit'),
subValue: '',
subText: '今日自动生成',
icon: <Cpu size={24} color="#722ed1" />,
@@ -1078,7 +1078,7 @@ const WorkOrderPage = () => {
<Button size="small" icon={<ChevronRight style={{ transform: 'rotate(180deg)' }} size={14} />} onClick={prevScheduleDay} />
<Text strong style={{ fontSize: 13 }}>
{scheduleDate}
{scheduleDate === dayjs().format('YYYY-MM-DD') ? ' (今天)' : ''}
{scheduleDate === dayjs().format('YYYY-MM-DD') ? ' (' + t('workOrder.today') + ')' : ''}
</Text>
<Button size="small" icon={<ChevronRight size={14} />} onClick={nextScheduleDay} />
</Space>
@@ -1098,7 +1098,7 @@ const WorkOrderPage = () => {
{/* 单一行时间画布,不再区分人员 */}
<div style={{ height: 220, position: 'relative', padding: '10px 0', overflow: 'hidden' }}>
{getScheduleOrderList().length === 0 ? (
<Empty description={`${scheduleDate} 暂无设置计划执行时间的工单`} style={{ padding: "60px 0" }} />
<Empty description={`${scheduleDate} ${t('workOrder.noScheduledOrders')}`} style={{ padding: "60px 0" }} />
) : (
<>
{getScheduleOrderList().map((order, index) => {
@@ -1214,7 +1214,7 @@ const WorkOrderPage = () => {
<div style={{ marginBottom: 8 }}>
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 8, flexWrap: 'wrap', gap: 12 }}>
<span level={4} style={{ margin: 0, fontSize: 18, fontWeight: 800 }}>{currentDetail?.orderTitle || '暂无标题'}</span>
<span level={4} style={{ margin: 0, fontSize: 18, fontWeight: 800 }}>{currentDetail?.orderTitle || t('workOrder.notitle')}</span>
{currentDetail?.priorityLevel && (
<Tag style={{ color: priorityConfig[currentDetail.priorityLevel]?.color, background: priorityConfig[currentDetail.priorityLevel]?.bg, border: `1px solid ${priorityConfig[currentDetail.priorityLevel]?.color}`, borderRadius: 4, fontWeight: 600 }}>
{currentDetail.priorityLevel}
@@ -1239,11 +1239,11 @@ const WorkOrderPage = () => {
</Col>
<Col span={24}>
<span style={{ fontSize: 12 }}>{t('workOrder.fixed2RelatedDevice')}</span>
<span style={{ fontSize: 12, color: '#165DFF', fontWeight: 600 }}>{currentDetail?.deviceName || '无'}</span>
<span style={{ fontSize: 12, color: '#165DFF', fontWeight: 600 }}>{currentDetail?.deviceName || t('workOrder.noRelatedDevice')}</span>
</Col>
<Col span={12}>
<span style={{ fontSize: 12 }}>{t('workOrder.fixed2RelatedArea')}</span>
<span style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.siteName || '无'}</span>
<span style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.siteName || t('workOrder.noRelatedArea')}</span>
</Col>
<Col span={12}>
<span style={{ fontSize: 12 }}>{t('workOrder.fixed2CurrentStatus')}</span>