From a217d0355a08f65251b3cdd6c505ee62a0b0bb58 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期六, 21 三月 2026 16:36:17 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/i18n/en.js | 20 ++++++++++
zy-acs-flow/src/page/code/CodeEdit.jsx | 2
zy-acs-flow/src/i18n/zh.js | 20 ++++++++++
zy-acs-flow/src/map/insight/code/CodeMain.jsx | 43 +++++++++++----------
zy-acs-flow/src/map/insight/code/index.jsx | 4 +-
5 files changed, 65 insertions(+), 24 deletions(-)
diff --git a/zy-acs-flow/src/i18n/en.js b/zy-acs-flow/src/i18n/en.js
index 12465ff..764300d 100644
--- a/zy-acs-flow/src/i18n/en.js
+++ b/zy-acs-flow/src/i18n/en.js
@@ -894,6 +894,7 @@
direction: 'DIRECTION',
agv: 'AGV',
point: 'POINT',
+ code: 'CODE',
area: 'AREA',
},
action: {
@@ -938,6 +939,25 @@
outbound: 'Outbound',
updateStatus: 'Update Status',
},
+ code: {
+ summary: {
+ qr: 'QR Preview',
+ },
+ sections: {
+ rules: 'Movement Rules',
+ },
+ fields: {
+ mapPosition: 'Map Position',
+ rotation: 'Rotation (掳)',
+ },
+ actions: {
+ openDetail: 'Edit',
+ },
+ relations: {
+ routes: 'Routes',
+ empty: 'No related info',
+ },
+ },
control: {
type: {
MOVE: 'MOVE',
diff --git a/zy-acs-flow/src/i18n/zh.js b/zy-acs-flow/src/i18n/zh.js
index 77cef0c..d902b16 100644
--- a/zy-acs-flow/src/i18n/zh.js
+++ b/zy-acs-flow/src/i18n/zh.js
@@ -894,6 +894,7 @@
direction: '鏂瑰悜',
agv: '杞﹁締',
point: '瀹氫綅鐐�',
+ code: '鍦伴潰鐮�',
area: '鍖哄煙',
},
action: {
@@ -938,6 +939,25 @@
outbound: '鍑哄簱',
updateStatus: '淇敼鐘舵��',
},
+ code: {
+ summary: {
+ qr: '浜岀淮鐮侀瑙�',
+ },
+ sections: {
+ rules: '閫氳瑙勫垯',
+ },
+ fields: {
+ mapPosition: '鍦板浘鍧愭爣',
+ rotation: '鏃嬭浆瑙掑害(掳)',
+ },
+ actions: {
+ openDetail: '缂栬緫',
+ },
+ relations: {
+ routes: '鍏宠仈璺嚎',
+ empty: '鏆傛棤鍏宠仈淇℃伅',
+ },
+ },
control: {
type: {
MOVE: '绉诲姩',
diff --git a/zy-acs-flow/src/map/insight/code/CodeMain.jsx b/zy-acs-flow/src/map/insight/code/CodeMain.jsx
index a266088..9aaec4e 100644
--- a/zy-acs-flow/src/map/insight/code/CodeMain.jsx
+++ b/zy-acs-flow/src/map/insight/code/CodeMain.jsx
@@ -133,18 +133,18 @@
/>
)}
<FieldGrid items={spatialItems} loading={loading} />
- <Button
- variant="contained"
- color="primary"
- startIcon={<OpenInNewIcon />}
- onClick={handleOpenDetail}
- disabled={!info?.id}
- sx={{ alignSelf: 'flex-start', textTransform: 'none', px: 3 }}
- >
- {translate('page.map.insight.code.actions.openDetail', { _: '缂栬緫' })}
- </Button>
</Stack>
</Paper>
+ <Button
+ variant="contained"
+ color="primary"
+ startIcon={<OpenInNewIcon />}
+ onClick={handleOpenDetail}
+ disabled={!info?.id}
+ sx={{ alignSelf: 'flex-start', textTransform: 'none', px: 3 }}
+ >
+ {translate('page.map.insight.code.actions.openDetail', { _: '缂栬緫' })}
+ </Button>
</Stack>
</Grid>
<Grid item xs={12} md={7}>
@@ -477,32 +477,32 @@
const theme = useTheme();
const enabledCount = rules.filter(rule => rule.enabled).length;
const placement = {
- 0: { gridColumn: 2, gridRow: 1 },
- 90: { gridColumn: 3, gridRow: 2 },
- 180: { gridColumn: 2, gridRow: 3 },
- 270: { gridColumn: 1, gridRow: 2 },
+ 0: { gridColumn: '2 / span 3', gridRow: 1 },
+ 90: { gridColumn: '4 / span 2', gridRow: 2 },
+ 180: { gridColumn: '2 / span 3', gridRow: 3 },
+ 270: { gridColumn: '1 / span 2', gridRow: 2 },
};
return (
<Box
sx={{
display: 'grid',
- gridTemplateColumns: 'repeat(3, minmax(0, 1fr))',
- gridTemplateRows: 'repeat(3, minmax(58px, auto))',
+ gridTemplateColumns: 'repeat(5, minmax(0, 1fr))',
+ gridTemplateRows: 'repeat(3, minmax(44px, auto))',
gap: 1,
alignItems: 'stretch',
}}
>
<Box
sx={{
- gridColumn: 2,
+ gridColumn: 3,
gridRow: 2,
borderRadius: 3,
border: '1px dashed',
borderColor: 'divider',
backgroundColor: alpha(theme.palette.primary.main, 0.04),
px: 1,
- py: 0.75,
+ py: 0.5,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
@@ -530,9 +530,9 @@
backgroundColor: rule.enabled
? alpha(theme.palette.success.main, 0.08)
: alpha(theme.palette.error.main, 0.08),
- px: 1,
- py: 0.75,
- minHeight: 60,
+ px: 1.25,
+ py: 0.5,
+ minHeight: 46,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
@@ -547,6 +547,7 @@
variant="caption"
sx={{
lineHeight: 1.1,
+ fontSize: '0.73rem',
color: rule.enabled ? 'success.dark' : 'error.dark',
fontWeight: 600,
}}
diff --git a/zy-acs-flow/src/map/insight/code/index.jsx b/zy-acs-flow/src/map/insight/code/index.jsx
index 07ec19a..51f5bf9 100644
--- a/zy-acs-flow/src/map/insight/code/index.jsx
+++ b/zy-acs-flow/src/map/insight/code/index.jsx
@@ -13,7 +13,7 @@
const [loading, setLoading] = useState(false);
const codeLabel = translate('page.map.devices.code', {
- _: '鍦伴潰鐮�'
+ _: 'Code'
});
const fetchCodeInfo = useCallback(async (code, options = {}) => {
@@ -83,7 +83,7 @@
<Divider />
- <Box flex={1} pt={2} sx={{ overflow: 'hidden' }}>
+ <Box flex={1} pt={2} sx={{ minHeight: 0, overflowY: 'auto', overflowX: 'hidden', pr: 1 }}>
{activeTab === 0 && (
<CodeMain
sprite={sprite}
diff --git a/zy-acs-flow/src/page/code/CodeEdit.jsx b/zy-acs-flow/src/page/code/CodeEdit.jsx
index ec0ab8b..b941877 100644
--- a/zy-acs-flow/src/page/code/CodeEdit.jsx
+++ b/zy-acs-flow/src/page/code/CodeEdit.jsx
@@ -219,7 +219,7 @@
<Edit
redirect="list"
mutationMode={EDIT_MODE}
- actions={<CustomerTopToolBar />}
+ actions={<CustomerTopToolBar backPrevious />}
aside={<EditBaseAside />}
>
<SimpleForm
--
Gitblit v1.9.1