#
luxiaotao1123
2024-09-21 a6ad2390ec0ae92302ebb4d75945c416ca45060c
#
4个文件已修改
1个文件已添加
60 ■■■■ 已修改文件
zy-acs-flow/src/i18n/en.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/i18n/zh.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/agv/show/AgvShowDetail.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/agv/show/AgvShowTask.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/components/ListEmptyTip.jsx 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/i18n/en.js
@@ -22,6 +22,11 @@
            memo: 'memo',
            opt: 'operate',
        },
        list: {
            empty: {
                tip: 'No data to display',
            }
        },
        edit: {
            title: {
                main: 'Main',
zy-acs-flow/src/i18n/zh.js
@@ -22,6 +22,11 @@
            memo: '备注',
            opt: '操作',
        },
        list: {
            empty: {
                tip: '没有可显示数据',
            }
        },
        edit: {
            title: {
                main: '主要',
zy-acs-flow/src/page/agv/show/AgvShowDetail.jsx
@@ -82,26 +82,29 @@
    )
}
const DetailTitle = ({ title }) => {
const DetailTitle = ({ title, ...rest }) => {
    const translate = useTranslate();
    return (
        <Typography
            color="textSecondary"
            variant="caption"
            {...rest}
        >
            {translate(title)}
        </Typography>
    )
}
const DetailValue = ({ value }) => {
const DetailValue = ({ value, fontBold = false }) => {
    return (
        <Typography
            variant="body2"
            color={fontBold ? 'textSecondary' : 'textPrimary'}
            width='80%'
            sx={{
                wordWrap: 'break-word',
                whiteSpace: 'normal',
                fontWeight: fontBold && 'bold',
            }}
        >
            {value}
@@ -116,7 +119,7 @@
        <Grid container spacing={1} sx={{ maxWidth: GRID_CONTAINER_MAX_WIDTH }}>
            <Grid item xs={ITEM_COL}>
                <DetailTitle title='common.field.status' />
                <DetailValue value={record.agvDetail.statusDesc} />
                <DetailValue fontBold value={record.agvDetail.statusDesc} />
            </Grid>
            <Grid item xs={ITEM_COL}>
                <DetailTitle title='table.field.agvDetail.pos' />
@@ -190,7 +193,7 @@
        <Grid container spacing={1} sx={{ maxWidth: GRID_CONTAINER_MAX_WIDTH }}>
            <Grid item xs={ITEM_COL}>
                <DetailTitle title='table.field.agvModel.name' />
                <DetailValue value={record.agvModelData.name} />
                <DetailValue fontBold value={record.agvModelData.name} />
            </Grid>
            <Grid item xs={ITEM_COL}>
                <DetailTitle title='table.field.agvModel.length' />
zy-acs-flow/src/page/agv/show/AgvShowTask.jsx
@@ -24,11 +24,11 @@
import request from '@/utils/request';
import { useTheme } from '@mui/material/styles';
import { getTaskStsColor } from '@/utils/common';
import ListEmptyTip from "../../components/ListEmptyTip";
const TaskItem = ({ record, now }) => {
    const translate = useTranslate();
    const theme = useTheme();
    console.log(record);
    return (
        <>
@@ -182,7 +182,6 @@
                            )
                        })}
                        {currCount < total && (
                            <Button
                                onClick={() =>
@@ -200,9 +199,7 @@
                    </List>
                </Box>
            ) : (
                <Typography>
                    no data found
                </Typography>
                <ListEmptyTip />
            )}
        </>
zy-acs-flow/src/page/components/ListEmptyTip.jsx
New file
@@ -0,0 +1,32 @@
import React, { useState, useRef, useEffect, useMemo } from "react";
import {
    useTranslate,
} from 'react-admin';
import {
    Box,
    Button,
    Card,
    CardContent,
    Stack,
    Typography,
} from '@mui/material';
const ListEmptyTip = (props) => {
    const { tip, ...rest } = props;
    const translate = useTranslate();
    return (
        <>
            <Box mt={3} ml={2}>
                <Typography
                    variant="subtitle1"
                    color="textPrimary"
                >
                    {tip || translate('common.list.empty.tip')}
                </Typography>
            </Box>
        </>
    )
}
export default ListEmptyTip;