File was renamed from rsf-admin/src/page/locItem/LocQueryList.jsx |
| | |
| | | import React, { useState, useRef, useEffect, useMemo, useCallback } from "react"; |
| | | import { useNavigate } from 'react-router-dom'; |
| | | import { |
| | | List, |
| | | DatagridConfigurable, |
| | |
| | | DeleteButton, |
| | | useGetRecordId, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack, LinearProgress } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import PageDrawer from "../components/PageDrawer"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import { Box, Typography, Card, Stack, LinearProgress } from '@mui/material'; |
| | | import PageDrawer from "../components/PageDrawer"; |
| | | import { useNavigate } from 'react-router-dom'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import request from '@/utils/request'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | |
| | | />, |
| | | ] |
| | | |
| | | const LocItemList = () => { |
| | | const translate = useTranslate(); |
| | | const LocPreviewItems = () => { |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | const translate = useTranslate(); |
| | | const locId = useGetRecordId(); |
| | | console.log(locId); |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.locItem"} |
| | | title={"menu.locPreview"} |
| | | empty={false} |
| | | resource="locItem" |
| | | filter={{locId: locId}} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <SelectColumnsButton preferenceKey='locItem' /> |
| | | <SelectColumnsButton preferenceKey='locPreview' /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | |
| | | ) |
| | | } |
| | | |
| | | export default LocItemList; |
| | | export default LocPreviewItems; |
| | | |
| | | |
| | | const DynamicFields = (props) => { |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | const [columns, setColumns] = useState([]); |
| | | const { isLoading } = useListContext(); |
| | | const translate = useTranslate(); |
| | | const refresh = useRefresh(); |
| | | const notify = useNotify(); |
| | | |
| | | useEffect(() => { |
| | | getDynamicFields(); |
| | | }, []); |
| | |
| | | )} |
| | | {columns.length > 0 && |
| | | <StyledDatagrid |
| | | preferenceKey='locItem' |
| | | preferenceKey='locPreview' |
| | | bulkActionButtons={false} |
| | | rowClick={false} |
| | | expand={false} |