|  |  |  | 
|---|
|  |  |  | import { Box, Typography, Card, Stack } from '@mui/material'; | 
|---|
|  |  |  | import { styled } from '@mui/material/styles'; | 
|---|
|  |  |  | import DictTypeCreate from "./DictTypeCreate"; | 
|---|
|  |  |  | import DictTypePanel from "./DictTypePanel"; | 
|---|
|  |  |  | import EmptyData from "../../../components/EmptyData"; | 
|---|
|  |  |  | import MyCreateButton from "../../../components/MyCreateButton"; | 
|---|
|  |  |  | import MyExportButton from '../../../components/MyExportButton'; | 
|---|
|  |  |  | import PageDrawer from "../../../components/PageDrawer"; | 
|---|
|  |  |  | import MyField from "../../../components/MyField"; | 
|---|
|  |  |  | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; | 
|---|
|  |  |  | import * as Common from '@/utils/common'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ | 
|---|
|  |  |  | '& .css-1vooibu-MuiSvgIcon-root': { | 
|---|
|  |  |  | 
|---|
|  |  |  | <SearchInput source="condition" alwaysOn />, | 
|---|
|  |  |  | <DateInput label='common.time.after' source="timeStart" alwaysOn />, | 
|---|
|  |  |  | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <TextInput source="code" label="table.field.dictType.code" />, | 
|---|
|  |  |  | <TextInput source="name" label="table.field.dictType.name" />, | 
|---|
|  |  |  | <TextInput source="description" label="table.field.dictType.description" />, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <TextInput label="common.field.memo" source="memo" />, | 
|---|
|  |  |  | <SelectInput | 
|---|
|  |  |  | label="common.field.status" | 
|---|
|  |  |  | 
|---|
|  |  |  | <StyledDatagrid | 
|---|
|  |  |  | preferenceKey='dictType' | 
|---|
|  |  |  | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} | 
|---|
|  |  |  | rowClick={(id, resource, record) => false} | 
|---|
|  |  |  | rowClick={'edit'} | 
|---|
|  |  |  | omit={['id', 'createTime', 'createBy', 'memo']} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <NumberField source="id" /> | 
|---|
|  |  |  | <MyField source="code" label="table.field.dictType.code" | 
|---|
|  |  |  | onClick={(event, record, val) => { | 
|---|
|  |  |  | event.stopPropagation(); | 
|---|
|  |  |  | assign(record); | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | <TextField source="code" label="table.field.dictType.code" | 
|---|
|  |  |  | // onClick={(event, record, val) => { | 
|---|
|  |  |  | //     event.stopPropagation(); | 
|---|
|  |  |  | //     assign(record); | 
|---|
|  |  |  | // }} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <TextField source="name" label="table.field.dictType.name" /> | 
|---|
|  |  |  | <TextField source="description" label="table.field.dictType.description" /> | 
|---|