Commit 0125b758 by zhaochengxiang

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

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