From ab003e244aaf8099fc221bdbfdcaa0c43dea1586 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期日, 29 九月 2024 13:59:25 +0800 Subject: [PATCH] # --- zy-acs-flow/src/page/mission/MissionListContent.jsx | 30 +++++++++--------------------- 1 files changed, 9 insertions(+), 21 deletions(-) diff --git a/zy-acs-flow/src/page/mission/MissionListContent.jsx b/zy-acs-flow/src/page/mission/MissionListContent.jsx index a6244d7..159ca0f 100644 --- a/zy-acs-flow/src/page/mission/MissionListContent.jsx +++ b/zy-acs-flow/src/page/mission/MissionListContent.jsx @@ -45,34 +45,22 @@ return () => clearInterval(intervalId); }, [refetch]) - useEffect(() => { - // if (data) { - // const newDealsByStage = getDealsByStage(unorderedDeals, dealStages); - // if (!isEqual(newDealsByStage, dealsByStage)) { - // setDealsByStage(newDealsByStage); - // } - // } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [data]); - if (isPending) return <LinearProgress />; const onDragEnd = result => { const { destination, source } = result; + if (!destination) { + return; + } + const { droppableId: sourceStage, index: sourceIdx } = source; + const { droppableId: destinationStage, index: destinationIdx } = destination; - // if (!destination) { - // return; - // } + if (destinationStage === sourceStage + && destinationIdx === sourceIdx) { + return; + } - // if ( - // destination.droppableId === source.droppableId && - // destination.index === source.index - // ) { - // return; - // } - // const sourceStage = source.droppableId; - // const destinationStage = destination.droppableId; // const sourceDeal = dealsByStage[sourceStage][source.index]; // const destinationDeal = dealsByStage[destinationStage][ // destination.index -- Gitblit v1.9.1