From 55234d83d82c9777ec4bf15570259c0c3fc09631 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 18 九月 2024 13:32:03 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/loc/LocList.jsx    |    3 +++
 zy-acs-flow/src/i18n/en.js              |    5 +++++
 zy-acs-flow/src/page/loc/InitButton.jsx |   30 ++++++++++++++++++++++++++++++
 zy-acs-flow/src/i18n/zh.js              |    5 +++++
 4 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/zy-acs-flow/src/i18n/en.js b/zy-acs-flow/src/i18n/en.js
index bb203c3..8d5d374 100644
--- a/zy-acs-flow/src/i18n/en.js
+++ b/zy-acs-flow/src/i18n/en.js
@@ -495,6 +495,11 @@
                 errDesc: "error",
             },
         }
+    },
+    page: {
+        loc: {
+            init: 'INITIALIZE'
+        }
     }
 };
 
diff --git a/zy-acs-flow/src/i18n/zh.js b/zy-acs-flow/src/i18n/zh.js
index e7c9d6e..857726d 100644
--- a/zy-acs-flow/src/i18n/zh.js
+++ b/zy-acs-flow/src/i18n/zh.js
@@ -494,6 +494,11 @@
                 errDesc: "寮傚父",
             },
         }
+    },
+    page: {
+        loc: {
+            init: '鍒濆鍖�'
+        }
     }
 };
 
diff --git a/zy-acs-flow/src/page/loc/InitButton.jsx b/zy-acs-flow/src/page/loc/InitButton.jsx
new file mode 100644
index 0000000..28ed0c4
--- /dev/null
+++ b/zy-acs-flow/src/page/loc/InitButton.jsx
@@ -0,0 +1,30 @@
+import * as React from 'react';
+import {
+    Button
+} from 'react-admin';
+
+const InitButton = (props) => {
+    const {
+        onClick,
+        label,
+        icon,
+        ...rest
+    } = props;
+
+    return (
+        <Button
+            label={label}
+            onClick={handleClick}
+            {...sanitizeRestProps(rest)}
+        >
+            {icon}
+        </Button>
+    );
+};
+
+const sanitizeRestProps = ({
+    resource,
+    ...rest
+}) => rest;
+
+export default InitButton;
diff --git a/zy-acs-flow/src/page/loc/LocList.jsx b/zy-acs-flow/src/page/loc/LocList.jsx
index a576324..20bf815 100644
--- a/zy-acs-flow/src/page/loc/LocList.jsx
+++ b/zy-acs-flow/src/page/loc/LocList.jsx
@@ -42,6 +42,8 @@
 import MyField from "../components/MyField";
 import { PAGE_DRAWER_WIDTH, OPERATE_MODE } from '@/config/setting';
 import * as Common from '@/utils/common';
+import InitButton from "./InitButton";
+import RepartitionIcon from '@mui/icons-material/Repartition';
 
 const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
     '& .css-1vooibu-MuiSvgIcon-root': {
@@ -120,6 +122,7 @@
                 actions={(
                     <TopToolbar>
                         <FilterButton />
+                        <InitButton label='page.loc.init' icon={<RepartitionIcon />} />
                         <MyCreateButton onClick={() => { setCreateDialog(true) }} />
                         <SelectColumnsButton preferenceKey='loc' />
                         <MyExportButton />

--
Gitblit v1.9.1