From 4523802a2f7037c2133331a504cea171c91ccb88 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 10 四月 2025 17:45:58 +0800
Subject: [PATCH] #修改 1. 字典界面优化修改

---
 rsf-admin/src/page/system/dicts/dictData/DictDataCreate.jsx |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/rsf-admin/src/page/system/dicts/dictData/DictDataCreate.jsx b/rsf-admin/src/page/system/dicts/dictData/DictDataCreate.jsx
index afc4ea0..058996b 100644
--- a/rsf-admin/src/page/system/dicts/dictData/DictDataCreate.jsx
+++ b/rsf-admin/src/page/system/dicts/dictData/DictDataCreate.jsx
@@ -32,8 +32,7 @@
 import MemoInput from "../../../components/MemoInput";
 
 const DictDataCreate = (props) => {
-    const { open, setOpen, row } = props;
-
+    const { open, setOpen, record } = props;
     const translate = useTranslate();
     const notify = useNotify();
 
@@ -55,6 +54,7 @@
     return (
         <>
             <CreateBase
+                resource="dictData"
                 record={{}}
                 transform={(data) => {
                     return data;
@@ -88,10 +88,10 @@
                                     <TextInput
                                         label="table.field.dictData.dictTypeId"
                                         source="dictTypeId"
+                                        defaultValue={record?.id}
                                         parse={v => v}
-                                        autoFocus
+                                        readOnly
                                         validate={required()}
-                                        defaultValue={row.dictTypeId}
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
@@ -99,8 +99,9 @@
                                         label="table.field.dictData.dictTypeCode"
                                         source="dictTypeCode"
                                         parse={v => v}
+                                        readOnly
+                                        defaultValue={record?.code}
                                         validate={required()}
-                                        defaultValue={row.dictTypeCode}
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
@@ -115,6 +116,7 @@
                                     <TextInput
                                         label="table.field.dictData.label"
                                         validate={required()}
+                                        autoFocus
                                         source="label"
                                         parse={v => v}
                                     />

--
Gitblit v1.9.1