#
luxiaotao1123
2024-09-29 4aa60d9e08ed3e9bcd787d17cc771e50f8555a8a
zy-acs-flow/src/page/mission/MissionListContent.jsx
@@ -1,7 +1,6 @@
import { useEffect, useState } from 'react';
import { DragDropContext } from '@hello-pangea/dnd';
import { Box } from '@mui/material';
import isEqual from 'lodash/isEqual';
import { Box, LinearProgress } from '@mui/material';
import {
    useDataProvider,
    useListContext,
@@ -11,19 +10,16 @@
} from 'react-admin';
import { MissionColumn } from './MissionColumn';
import request from '@/utils/request';
import { CUSTOM_PAGES_DATA_INTERVAL } from '@/config/setting';
export const MissionListContent = () => {
    const translate = useTranslate();
    const notify = useNotify();
    const refresh = useRefresh();
    const { data, isPending, refetch } = useListContext();
    const dataProvider = useDataProvider();
    const { data, isPending, refetch } = useListContext();
    const [stages, setStages] = useState([]);
    // const [dealsByStage, setDealsByStage] = useState(
    //     getDealsByStage([], dealStages)
    // );
    useEffect(() => {
        const httpStages = async () => {
@@ -39,7 +35,15 @@
            })
        }
        httpStages();
    }, []);
    }, [notify]);
    useEffect(() => {
        const intervalId = setInterval(() => {
            refetch();
        }, CUSTOM_PAGES_DATA_INTERVAL);
        return () => clearInterval(intervalId);
    }, [refetch])
    useEffect(() => {
        // if (data) {
@@ -51,7 +55,7 @@
        // eslint-disable-next-line react-hooks/exhaustive-deps
    }, [data]);
    if (isPending) return null;
    if (isPending) return <LinearProgress />;
    const onDragEnd = result => {
        const { destination, source } = result;