From a7a2a9b8f1524831898501d11bbedc0c4a3da3a4 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 24 九月 2024 09:16:36 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/page/bus/BusList.jsx | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/zy-acs-flow/src/page/bus/BusList.jsx b/zy-acs-flow/src/page/bus/BusList.jsx
index 2b6e814..f0284c5 100644
--- a/zy-acs-flow/src/page/bus/BusList.jsx
+++ b/zy-acs-flow/src/page/bus/BusList.jsx
@@ -31,6 +31,7 @@
AutocompleteInput,
DeleteButton,
FunctionField,
+ Pagination,
} from 'react-admin';
import { Box, Typography, Card, Chip } from '@mui/material';
import { styled } from '@mui/material/styles';
@@ -66,7 +67,7 @@
whiteSpace: 'nowrap',
},
'& .opt': {
- width: 200
+ width: 80
},
}));
@@ -120,6 +121,7 @@
<MyExportButton />
</TopToolbar>
)}
+ pagination={<Pagination rowsPerPageOptions={[10, 20, 50, 100]} />}
perPage={20}
// aside={<BusListAside />}
>
@@ -134,7 +136,7 @@
<NumberField source="id" />
<TextField source="uuid" label="table.field.bus.uuid" />
<TextField source="busNo" label="table.field.bus.busNo" />
- <ReferenceField source="busSts" label="table.field.bus.busSts" reference="busSts" link={false} sortable={false}>
+ <ReferenceField source="busSts" label="table.field.bus.busSts" reference="busSts" link={false} sortable={true}>
<FunctionField render={record => (
<Chip
label={record.name}
@@ -161,10 +163,11 @@
<DateField source="createTime" label="common.field.createTime" showTime />
{/* <BooleanField source="statusBool" label="common.field.status" sortable={false} /> */}
<TextField source="memo" label="common.field.memo" sortable={false} emptyText="-" />
- <WrapperField cellClassName="opt" label="common.field.opt">
- <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} />
- <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
- </WrapperField>
+ <FunctionField label="common.field.opt" cellClassName="opt" render={record => (
+ (record.busSts === 15) && (
+ <DeleteButton label="" sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
+ )
+ )} />
</StyledDatagrid>
</List>
<BusCreate
--
Gitblit v1.9.1