Commit 18bcb4fc by chenshu

fix:修复列表

parent 1166bcec
...@@ -40,6 +40,10 @@ const App: React.FC = (props: any) => { ...@@ -40,6 +40,10 @@ const App: React.FC = (props: any) => {
} }
}, []) }, [])
useEffect(() => {
getStorePermission();
}, [window.location.hash])
function getStorePermission() { function getStorePermission() {
const params = { const params = {
storeId: User.getStoreId(), storeId: User.getStoreId(),
...@@ -72,7 +76,6 @@ const App: React.FC = (props: any) => { ...@@ -72,7 +76,6 @@ const App: React.FC = (props: any) => {
User.setStoreType(storeType); User.setStoreType(storeType);
setStoreUserId(storeUserId) setStoreUserId(storeUserId)
getUserPermission(); getUserPermission();
getStorePermission();
}) })
} }
...@@ -98,7 +101,6 @@ const App: React.FC = (props: any) => { ...@@ -98,7 +101,6 @@ const App: React.FC = (props: any) => {
ctx.dispatch(setStoreList(storeVOS)); ctx.dispatch(setStoreList(storeVOS));
setStoreUserId(storeUserId) setStoreUserId(storeUserId)
getUserPermission(); getUserPermission();
getStorePermission();
}); });
} }
......
...@@ -74,7 +74,17 @@ export default class CollegeManagePage extends React.Component { ...@@ -74,7 +74,17 @@ export default class CollegeManagePage extends React.Component {
okText: '我知道了', okText: '我知道了',
}) })
} else { } else {
this.changeCollege(item, bool);
Modal.confirm({
title: '确定停用吗?',
content: '停用学院,所有学院相关信息不可使用,用户无法继续学习,请谨慎操作!',
icon: <span className="icon iconfont default-confirm-icon">&#xe6f4;</span>,
onOk: () => {
this.changeCollege(item, bool);
},
okText: '停用',
cancelText: '取消',
})
} }
}) })
} }
...@@ -182,16 +192,7 @@ export default class CollegeManagePage extends React.Component { ...@@ -182,16 +192,7 @@ export default class CollegeManagePage extends React.Component {
if (item.state !== 'VALID') return null; if (item.state !== 'VALID') return null;
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
Modal.confirm({ this.checkCollege(item, false);
title: '确定停用吗?',
content: '停用学院,所有学院相关信息不可使用,用户无法继续学习,请谨慎操作!',
icon: <span className="icon iconfont default-confirm-icon">&#xe6f4;</span>,
onOk: () => {
this.checkCollege(item, false);
},
okText: '停用',
cancelText: '取消',
})
}} }}
>{item.state === 'VALID' ? '停用' : '已停用'}</span> >{item.state === 'VALID' ? '停用' : '已停用'}</span>
} }
......
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