Commit 0125b758 by zhaochengxiang

刷新目录的时候,刷新权限

parent 98de9519
......@@ -40,7 +40,7 @@ const ModelTree = (props) => {
id: MENU_ID,
});
const { onSelect, onViewChange, refrence='', importStockModel, keyword, searchProperties, setRootNode } = props;
const { onSelect, onViewChange, refrence='', importStockModel, keyword, searchProperties, setRootNode, onDirRefresh } = props;
const { user } = useContext(AppContext);
const [ loading, setLoading ] = useState(false);
......@@ -175,6 +175,8 @@ const ModelTree = (props) => {
data.title = data.name||'';
data.children = data.subCatalogs||[];
onDirRefresh?.();
let defaultItem = null;
function recursion(subCatalogs) {
......
......@@ -106,7 +106,6 @@ class Model extends React.Component {
}
componentDidMount() {
this.getPermissions();
this.getModelStates();
this.getPreference();
......@@ -758,6 +757,10 @@ class Model extends React.Component {
setRootNode={(val) => {
this.setState({ rootNode: val })
}}
onDirRefresh={() => {
//刷新目录时,重新获取目录权限
this.getPermissions()
}}
{...this.props} />
</ResizableBox>
<div className='tree-toggle-wrap'>
......
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