Commit 38649f1c by zhaochengxiang

功能回退

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