|  |  |  | 
|---|
|  |  |  | import MyCreateButton from "../../../components/MyCreateButton"; | 
|---|
|  |  |  | import MyExportButton from '../../../components/MyExportButton'; | 
|---|
|  |  |  | import PageDrawer from "../../../components/PageDrawer"; | 
|---|
|  |  |  | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; | 
|---|
|  |  |  | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE, DEFAULT_ITEM_PAGE_SIZE } from '@/config/setting'; | 
|---|
|  |  |  | import DictDataEdit from "./DictDataEdit"; | 
|---|
|  |  |  | import { use } from "react"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | empty={false} | 
|---|
|  |  |  | filters={filters} | 
|---|
|  |  |  | filter={{ dictTypeId: dictId }} | 
|---|
|  |  |  | sort={{ field: "create_time", order: "desc" }} | 
|---|
|  |  |  | sort={{ field: "sort", order: "asc" }} | 
|---|
|  |  |  | actions={( | 
|---|
|  |  |  | <TopToolbar> | 
|---|
|  |  |  | <FilterButton /> | 
|---|
|  |  |  | 
|---|
|  |  |  | <MyExportButton /> | 
|---|
|  |  |  | </TopToolbar> | 
|---|
|  |  |  | )} | 
|---|
|  |  |  | perPage={DEFAULT_PAGE_SIZE} | 
|---|
|  |  |  | perPage={DEFAULT_ITEM_PAGE_SIZE} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <StyledDatagrid | 
|---|
|  |  |  | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} | 
|---|
|  |  |  | 
|---|
|  |  |  | setSelect(record) | 
|---|
|  |  |  | setEditDialog(true) | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | omit={['id', 'createTime', 'createBy', 'memo']} | 
|---|
|  |  |  | omit={['id', 'createTime', 'createBy$', 'memo','statusBool']} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <NumberField source="id" /> | 
|---|
|  |  |  | <TextField source="dictTypeId" label="table.field.dictData.dictTypeId" /> | 
|---|
|  |  |  | 
|---|
|  |  |  | <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"> | 
|---|
|  |  |  | <Button onClick={() => { setEditDialog(true) }}>编辑</Button> | 
|---|
|  |  |  | <Button onClick={() => { setEditDialog(true) }} label="ra.action.edit"></Button> | 
|---|
|  |  |  | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode='pessimistic' redirect={"/dictType/" + dictId} /> | 
|---|
|  |  |  | </WrapperField> | 
|---|
|  |  |  | </StyledDatagrid> | 
|---|
|  |  |  | </List> | 
|---|
|  |  |  | if (!select == null) { | 
|---|
|  |  |  | <DictDataEdit | 
|---|
|  |  |  | open={editDialog} | 
|---|
|  |  |  | record={select} | 
|---|
|  |  |  | setOpen={setEditDialog} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | } | 
|---|
|  |  |  | <DictDataEdit | 
|---|
|  |  |  | open={editDialog} | 
|---|
|  |  |  | record={select} | 
|---|
|  |  |  | setOpen={setEditDialog} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <DictDataCreate | 
|---|
|  |  |  | open={createDialog} | 
|---|
|  |  |  | record={dicts} | 
|---|