Commit 08c645cf authored by 李纪文's avatar 李纪文

fix: 修改指标选择组件

parent b8de5333
...@@ -74,6 +74,7 @@ const QuotaSelect = ({ ...@@ -74,6 +74,7 @@ const QuotaSelect = ({
key: child.name, key: child.name,
})) }))
: []; : [];
debugger;
setAllQuotaList(data); setAllQuotaList(data);
setSelectData(data.filter((child) => child.checked)); setSelectData(data.filter((child) => child.checked));
} else { } else {
...@@ -130,6 +131,7 @@ const QuotaSelect = ({ ...@@ -130,6 +131,7 @@ const QuotaSelect = ({
}, [quotaList]); }, [quotaList]);
useEffect(() => { useEffect(() => {
debugger;
if (targetValue === 'emphasis') { if (targetValue === 'emphasis') {
filterEmphasisQuota(); filterEmphasisQuota();
} else { } else {
...@@ -178,6 +180,8 @@ const QuotaSelect = ({ ...@@ -178,6 +180,8 @@ const QuotaSelect = ({
onModalCancel && onModalCancel(); onModalCancel && onModalCancel();
} else { } else {
onModalClose && onModalClose(); onModalClose && onModalClose();
setQuotaList([]);
setGroupQuotaList([]);
setVisible(false); setVisible(false);
} }
}; };
...@@ -185,6 +189,8 @@ const QuotaSelect = ({ ...@@ -185,6 +189,8 @@ const QuotaSelect = ({
const onOk = () => { const onOk = () => {
onModalOk && onModalOk(); onModalOk && onModalOk();
handleOk(); handleOk();
setQuotaList([]);
setGroupQuotaList([]);
setVisible(false); setVisible(false);
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment