From 3b92bdcd3683ef7ce55af6e5a443732e638b1cb9 Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期五, 26 十二月 2025 10:54:08 +0800
Subject: [PATCH] 库位初始化优化
---
rsf-admin/src/page/system/role/RoleList.jsx | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/rsf-admin/src/page/system/role/RoleList.jsx b/rsf-admin/src/page/system/role/RoleList.jsx
index f02ac2d..1973c7d 100644
--- a/rsf-admin/src/page/system/role/RoleList.jsx
+++ b/rsf-admin/src/page/system/role/RoleList.jsx
@@ -55,17 +55,14 @@
'& .column-name': {
},
'& .opt': {
- width: 260
+ width: 450
},
}));
const filters = [
<SearchInput source="condition" alwaysOn />,
- <DateInput label='common.time.after' source="timeStart" alwaysOn />,
- <DateInput label='common.time.before' source="timeEnd" alwaysOn />,
<TextInput source="name" label="table.field.role.name" />,
<TextInput source="code" label="table.field.role.code" />,
-
<TextInput label="common.field.memo" source="memo" />,
<SelectInput
label="common.field.status"
@@ -85,6 +82,8 @@
const [drawerVal, setDrawerVal] = useState(false);
const [menuIds, setMenuIds] = useState([]);
+
+ const [authType,setAuthType] = useState(0)
const assign = (record) => {
request('/role/scope/list', {
@@ -132,9 +131,7 @@
preferenceKey='role'
bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
rowClick={(id, resource, record) => false}
- expand={() => <RolePanel />}
- expandSingle={true}
- omit={['id', 'createTime', 'memo']}
+ omit={['id', 'createTime', 'memo','statusBool']}
>
<NumberField source="id" />
<MyField source="name" label="table.field.role.name"
@@ -150,7 +147,9 @@
<BooleanField source="statusBool" label="common.field.status" sortable={false} />
<TextField source="memo" label="common.field.memo" sortable={false} />
<WrapperField cellClassName="opt" label="common.field.opt">
- <ScopeButton sx={{ padding: '1px', fontSize: '.75rem' }} assign={assign} />
+ <ScopeButton sx={{ padding: '1px', fontSize: '.75rem' }} assign={assign} auType={0} setAuthType={setAuthType} label="缃戦〉鏉冮檺 " />
+ <ScopeButton sx={{ padding: '1px', fontSize: '.75rem' }} assign={assign} auType={1} setAuthType={setAuthType} label="PDA鏉冮檺 " />
+ <ScopeButton sx={{ padding: '1px', fontSize: '.75rem' }} assign={assign} auType={2} setAuthType={setAuthType} label="浠撳簱鏉冮檺 " />
<EditButton sx={{ padding: '1px', fontSize: '.75rem' }} />
<DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
</WrapperField>
@@ -175,6 +174,7 @@
closeCallback={() => {
setMenuIds([]);
}}
+ authType = {authType}
/>
</PageDrawer>
</Box>
@@ -183,14 +183,15 @@
const ScopeButton = (props) => {
const record = useRecordContext();
- const { assign, ...rest } = props;
+ const { assign, auType, setAuthType, label, ...rest } = props;
return (
<Button
variant="text"
color="primary"
startIcon={<AssignmentIndIcon />}
- label="common.action.scope"
+ label={label}
onClick={(event) => {
+ setAuthType(auType);
event.stopPropagation();
assign(record);
}}
--
Gitblit v1.9.1