| | |
| | | import { |
| | | useTranslate, |
| | | useNotify, |
| | | TextInput |
| | | } from 'react-admin'; |
| | | import { Box, Button, Card, Stack, CardContent, Skeleton } from '@mui/material'; |
| | | import { SimpleTreeView, TreeItem, RichTreeView, useTreeViewApiRef } from '@mui/x-tree-view'; |
| | |
| | | }) |
| | | } |
| | | const http = async () => { |
| | | const res = await request.post('/menu' + '/tree', {}); |
| | | const res = await request.post('/menu' + '/tree', { condition: '' }); |
| | | if (res?.data?.code === 200) { |
| | | const transformData = transformTree(res.data.data); |
| | | setTreeData(transformData); |
| | |
| | | </Button> |
| | | </Box> |
| | | <Box sx={{ |
| | | display: 'flex', |
| | | justifyContent: 'flex-start' |
| | | }}> |
| | | |
| | | <Button startIcon={<SaveIcon />} variant="contained" onClick={handleSave}> |
| | | {translate('ra.action.save')} |
| | | </Button> |
| | | </Box> |
| | | |
| | | <Box sx={{ |
| | | height: 480, |
| | | minWidth: 290, |
| | | overflow: 'auto', |
| | | marginTop: '10px', |
| | | padding: 1, |
| | | borderBottom: '1px solid background.paper', |
| | | borderRadius: '4px', |
| | |
| | | |
| | | </Box> |
| | | </Box> |
| | | <Box sx={{ |
| | | display: 'flex', |
| | | justifyContent: 'flex-start' |
| | | }}> |
| | | <Button startIcon={<SaveIcon />} variant="contained" onClick={handleSave}> |
| | | {translate('ra.action.save')} |
| | | </Button> |
| | | </Box> |
| | | |
| | | </CardContent> |
| | | </Card> |
| | | </> |