Commit 38649f1c by zhaochengxiang

功能回退

parent 304bfc55
...@@ -80,12 +80,7 @@ const AssetAction = (props) => { ...@@ -80,12 +80,7 @@ const AssetAction = (props) => {
const getElements = ( cb = null ) => { const getElements = ( cb = null ) => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: (currentAction==='add')?'assetmanage.listElementsAndFillValue':'assetmanage.listElements', type: 'assetmanage.listElements',
payload: (currentAction==='add')?{
params: {
dirId
}
}:undefined,
callback: data => { callback: data => {
setLoading(false); setLoading(false);
setElements(data||[]); setElements(data||[]);
......
...@@ -546,27 +546,27 @@ const AssetManageTree = (props) => { ...@@ -546,27 +546,27 @@ const AssetManageTree = (props) => {
return; return;
} }
// const _checkedKeysValue = [...(values.checked||[])]; const _checkedKeysValue = [...(values.checked||[])];
if (e.checked) { if (e.checked) {
// const _currentNodeId = e.node?.key; const _currentNodeId = e.node?.key;
// let _groupItem = []; let _groupItem = [];
// groupIds.forEach(groupItem => { groupIds.forEach(groupItem => {
// groupItem.forEach(id => { groupItem.forEach(id => {
// if (id === _currentNodeId) { if (id === _currentNodeId) {
// _groupItem = groupItem; _groupItem = groupItem;
// } }
// }) })
// }) })
// const _filterKeys = (_checkedKeysValue.filter(item => item===_currentNodeId || !(_groupItem.includes(item)))); const _filterKeys = (_checkedKeysValue.filter(item => item===_currentNodeId || !(_groupItem.includes(item))));
setCheckedKeys([e.node?.key]); setCheckedKeys(_filterKeys);
onCheck && onCheck([e.node?.key]); onCheck && onCheck(_filterKeys);
} else { } else {
setCheckedKeys([]); setCheckedKeys(_checkedKeysValue);
onCheck && onCheck([]); onCheck && onCheck(_checkedKeysValue);
} }
} }
......
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