#
vincentlu
7 天以前 3f70b775a9d4a435eddac13ff135efd41567e64c
#
5个文件已修改
80 ■■■■■ 已修改文件
zy-acs-flow/src/i18n/en.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/i18n/zh.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/task/TaskList.jsx 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/task/TaskListAside.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/resources/mapper/manager/TaskMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/i18n/en.js
@@ -721,6 +721,18 @@
                reposition: 'clear path reposition',
            }
        },
        task: {
            enums: {
                uplinkSts: {
                    NONE: 'Unknown',
                    PENDING: 'Pending',
                    SENDING: 'Uploading',
                    SUCCESS: 'Success',
                    FAILED: 'Failed',
                    SKIPPED: 'Skipped',
                },
            },
        },
        segment: {
            enums: {
                state: {
zy-acs-flow/src/i18n/zh.js
@@ -721,6 +721,18 @@
                reposition: '清除路径重新定位',
            }
        },
        task: {
            enums: {
                uplinkSts: {
                    NONE: '未知',
                    PENDING: '待上报',
                    SENDING: '上报中',
                    SUCCESS: '成功',
                    FAILED: '失败',
                    SKIPPED: '跳过',
                },
            },
        },
        segment: {
            enums: {
                state: {
zy-acs-flow/src/page/task/TaskList.jsx
@@ -35,7 +35,7 @@
    useNotify,
    useRefresh,
} from 'react-admin';
import { Box, Chip, Card, Stack } from '@mui/material';
import { Box, Chip, Card, Stack, LinearProgress } from '@mui/material';
import { styled } from '@mui/material/styles';
import TaskCreate from "./TaskCreate";
import TaskPanel from "./TaskPanel";
@@ -70,6 +70,20 @@
        width: 200
    },
}));
const UPLINK_STATUS_CHOICES = [
    { id: 'NONE', name: 'page.task.enums.uplinkSts.NONE', color: 'default' },
    { id: 'PENDING', name: 'page.task.enums.uplinkSts.PENDING', color: 'warning' },
    { id: 'SENDING', name: 'page.task.enums.uplinkSts.SENDING', color: 'info' },
    { id: 'SUCCESS', name: 'page.task.enums.uplinkSts.SUCCESS', color: 'success' },
    { id: 'FAILED', name: 'page.task.enums.uplinkSts.FAILED', color: 'error' },
    { id: 'SKIPPED', name: 'page.task.enums.uplinkSts.SKIPPED', color: 'secondary' },
];
const UPLINK_STATUS_MAP = UPLINK_STATUS_CHOICES.reduce((acc, item) => {
    acc[item.id] = item;
    return acc;
}, {});
const filters = [
    // <SearchInput source="condition" alwaysOn />,
@@ -115,6 +129,7 @@
        <AutocompleteInput label="table.field.task.destCode" optionText="data" filterToQuery={(val) => ({ data: val })} />
    </ReferenceInput>,
    <TextInput source="emptyMk" label="table.field.task.emptyMk" />,
    <SelectInput source="uplinkSts" label="table.field.task.uplinkSts" choices={UPLINK_STATUS_CHOICES} />,
    <TextInput source="zpallet" label="table.field.task.zpallet" />,
    // <TextInput source="phase" label="table.field.task.phase" />,
    <TextInput source="errDesc" label="table.field.task.errDesc" />,
@@ -129,6 +144,24 @@
        ]}
    />,
]
// const TaskListContent = () => {
// return (
//         <Box sx={{ position: 'relative' }}>
//             {isLoading && (
//                 <LinearProgress
//                     sx={{
//                         height: "2px",
//                         position: 'absolute',
//                         top: 0,
//                         left: 0,
//                         right: 0,
//                     }}
//                 />
//             )}
// }
const TaskList = () => {
    const translate = useTranslate();
@@ -279,6 +312,22 @@
                    <TextField source="oriDesc" label="table.field.task.oriDesc" sortable={false} />
                    <TextField source="destDesc" label="table.field.task.destDesc" sortable={false} />
                    <NumberField source="priority" label="table.field.task.priority" sortable={false} />
                    <FunctionField
                        label="table.field.task.uplinkSts"
                        sortable={false}
                        render={record => {
                            const meta = UPLINK_STATUS_MAP[record?.uplinkSts];
                            return (
                                <Chip
                                    label={meta?.name ? translate(meta.name) : translate('common.enums.na')}
                                    variant="outlined"
                                    size="small"
                                    color={meta?.color ?? 'default'}
                                    sx={{ fontSize: '0.75rem' }}
                                />
                            );
                        }}
                    />
                    <TextField source="emptyMk" label="table.field.task.emptyMk" sortable={false} />
                    <TextField source="zpallet" label="table.field.task.zpallet" sortable={false} />
                    <TextField source="errDesc" label="table.field.task.errDesc" sortable={false} />
zy-acs-flow/src/page/task/TaskListAside.jsx
@@ -51,7 +51,7 @@
                mt: 8,
                alignSelf: 'flex-start',
                border: theme[0] === 'light' && '1px solid #e0e0e3',
                width: 255
                width: 210
            }}
        >
            <CardContent>
zy-acs-manager/src/main/resources/mapper/manager/TaskMapper.xml
@@ -50,6 +50,9 @@
            <if test="param.timeEnd != null">
                and a.create_time &lt; #{param.timeEnd}
            </if>
            <if test="param.uplinkSts != null">
                AND a.uplink_sts = #{param.uplinkSts}
            </if>
            <if test="param.keywords != null">
                AND (
                a.memo LIKE CONCAT('%', #{param.keywords}, '%')