#
vincentlu
9 天以前 af6a83a5921d142e11b66499443fd078db50544f
#
1个文件已添加
2个文件已修改
48 ■■■■■ 已修改文件
zy-acs-flow/src/page/sta/StaPanel.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/staReserve/StaReserveList.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/staReserve/rowSx.jsx 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/sta/StaPanel.jsx
@@ -399,7 +399,7 @@
    if (id === undefined || id === null || id === '') {
        return '-';
    }
    return map?.[id] || id;
    return map?.[id] || '-';
};
const formatReserveType = (value, translate) =>
zy-acs-flow/src/page/staReserve/StaReserveList.jsx
@@ -43,6 +43,7 @@
import MyField from "../components/MyField";
import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
import * as Common from '@/utils/common';
import rowSx from "./rowSx";
const TYPE_FILTER_CHOICES = [
    { id: 'IN', name: 'page.sta.enums.type.in' },
@@ -77,7 +78,7 @@
    <DateInput label='common.time.before' source="timeEnd" alwaysOn />,
    // <TextInput source="uuid" label="table.field.staReserve.uuid" />,
    <ReferenceInput source="staId" label="table.field.staReserve.staId" reference="sta">
    <ReferenceInput source="staId" label="table.field.staReserve.staId" reference="sta" alwaysOn>
        <AutocompleteInput label="table.field.staReserve.staId" optionText="staNo" filterToQuery={(val) => ({ staNo: val })} />
    </ReferenceInput>,
    <ReferenceInput source="taskId" label="table.field.staReserve.taskId" reference="task">
@@ -149,6 +150,7 @@
                    rowClick={(id, resource, record) => false}
                    expand={false}
                    expandSingle={true}
                    rowSx={rowSx(drawerVal || null)}
                    omit={['id', 'uuid', 'reason'
                        , 'uniqKey', 'name', 'segmentId'
                        , 'statusBool', 'updateBy', 'updateTime', 'createBy', 'memo']}
zy-acs-flow/src/page/staReserve/rowSx.jsx
New file
@@ -0,0 +1,42 @@
import deepPurple from '@mui/material/colors/deepPurple';
import teal from '@mui/material/colors/teal';
import lightBlue from '@mui/material/colors/lightBlue';
import blue from '@mui/material/colors/blue';
import grey from '@mui/material/colors/grey';
const rowSx = (selectedRow) => (record) => {
    let style = {};
    if (!record) {
        return style;
    }
    if (selectedRow && selectedRow.id === record.id) {
        style = {
            ...style,
            backgroundColor: 'action.selected',
        };
    }
    if (record.type === 'IN')
        return {
            ...style,
            borderLeftColor: teal[500],
            borderLeftWidth: 5,
            borderLeftStyle: 'solid',
        };
    if (record.type === 'OUT')
        return {
            ...style,
            borderLeftColor: lightBlue[500],
            borderLeftWidth: 5,
            borderLeftStyle: 'solid',
        };
    if (record.statusBool)
        return {
            ...style,
            borderLeftColor: grey[500],
            borderLeftWidth: 5,
            borderLeftStyle: 'solid',
        };
    return style;
};
export default rowSx;