From c01d9b053852b12e7d3ced66367babb4d499b14b Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期四, 26 二月 2026 11:44:15 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/page/guarantee/GuaranteePanel.jsx | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/zy-acs-flow/src/page/guarantee/GuaranteePanel.jsx b/zy-acs-flow/src/page/guarantee/GuaranteePanel.jsx
index 300213c..8c95403 100644
--- a/zy-acs-flow/src/page/guarantee/GuaranteePanel.jsx
+++ b/zy-acs-flow/src/page/guarantee/GuaranteePanel.jsx
@@ -6,11 +6,23 @@
} from 'react-admin';
import PanelTypography from "../components/PanelTypography";
import * as Common from '@/utils/common'
+import { describeCronExpression } from "./cronUtils";
+import { DEFAULT_SCOPE_TYPE, getScopeLabel } from "./guaranteeConstants";
const GuaranteePanel = () => {
const record = useRecordContext();
if (!record) return null;
const translate = useTranslate();
+ const scopeTypeLabel = getScopeLabel(record.scopeType, translate);
+ const scopeValueLabel = record.scopeValue
+ ? record.scopeValue
+ : record.scopeType === DEFAULT_SCOPE_TYPE
+ ? translate('page.guarantee.scope.globalHelper')
+ : translate('common.enums.na');
+ const cronDesc = record.cronExpr
+ ? `${describeCronExpression(record.cronExpr, translate)} (${record.cronExpr})`
+ : translate('common.enums.na');
+
return (
<>
<Card sx={{ width: { xs: 300, sm: 500, md: 600, lg: 800 }, margin: 'auto' }}>
@@ -55,19 +67,19 @@
<Grid item xs={6}>
<PanelTypography
title="table.field.guarantee.scopeType"
- property={record.scopeType}
+ property={scopeTypeLabel}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
title="table.field.guarantee.scopeValue"
- property={record.scopeValue}
+ property={scopeValueLabel}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
title="table.field.guarantee.cronExpr"
- property={record.cronExpr}
+ property={cronDesc}
/>
</Grid>
<Grid item xs={6}>
--
Gitblit v1.9.1