#
luxiaotao1123
2024-09-10 8bd64cd6a3f8721c2b1eb4075e61a1d3381e4aa8
#
2个文件已修改
1个文件已添加
40 ■■■■■ 已修改文件
zy-acs-flow/src/page/operationRecord/OperationDetail.jsx 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/operationRecord/OperationRecordList.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/operationRecord/rowSx.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/operationRecord/OperationDetail.jsx
New file
@@ -0,0 +1,28 @@
import * as React from 'react';
import {
    EditBase,
    useTranslate,
    TextInput,
    SimpleForm,
    DateField,
    Labeled,
} from 'react-admin';
import { Box, Grid, Stack, IconButton, Typography, Card, CardContent, TextField } from '@mui/material';
import CloseIcon from '@mui/icons-material/Close';
const OperationDetail = (props) => {
    const { operation, setDrawerVal, ...rest } = props;
    console.log(operation);
    return (
        <>
            <Card>
                <CardContent>
                    <TextField value={JSON.stringify(operation)} maxRows={15} multiline />
                </CardContent>
            </Card>
        </>
    )
}
export default OperationDetail;
zy-acs-flow/src/page/operationRecord/OperationRecordList.jsx
@@ -42,6 +42,7 @@
import * as Common from '@/utils/common';
import rowSx from './rowSx';
import { format } from 'date-fns';
import OperationDetail from './OperationDetail'
const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
    '& .css-1vooibu-MuiSvgIcon-root': {
@@ -133,7 +134,10 @@
                <StyledDatagrid
                    preferenceKey='operationRecord'
                    bulkActionButtons={false}
                    rowClick={(id, resource, record) => false}
                    rowClick={(id, resource, record) => {
                        setDrawerVal(!!drawerVal && drawerVal === record ? null : record);
                        return false;
                    }}
                    omit={['appkey', 'statusBool', 'err', 'updateTime', 'createTime', 'memo']}
                    rowSx={rowSx(drawerVal || null)}
                >
@@ -162,6 +166,10 @@
                drawerVal={drawerVal}
                setDrawerVal={setDrawerVal}
            >
                <OperationDetail
                    operation={drawerVal}
                    setDrawerVal={setDrawerVal}
                />
            </PageDrawer>
        </Box>
    )
zy-acs-flow/src/page/operationRecord/rowSx.jsx
@@ -7,7 +7,7 @@
    if (!record) {
        return style;
    }
    if (selectedRow && selectedRow === record.id) {
    if (selectedRow && selectedRow.id === record.id) {
        style = {
            ...style,
            backgroundColor: 'action.selected',