|
@@ -25,7 +25,7 @@ let activeKey = "252";
|
|
|
const LayoutTwo = ({ children, dispatch, app, loading, location }) => {
|
|
|
let { pathname } = location;
|
|
|
const { menus, menuHash, menuPath, openKeys, selectedKeys,topMenus,topOpenKeys,locationQuery } = app;
|
|
|
- const { globalPanes } = app;
|
|
|
+ const { globalPanes,loading_permission } = app;
|
|
|
|
|
|
const siderProps = {
|
|
|
menus,
|
|
@@ -127,12 +127,16 @@ const LayoutTwo = ({ children, dispatch, app, loading, location }) => {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 登陆页面
|
|
|
+ */
|
|
|
if (openPages && openPages.includes(pathname)) {
|
|
|
return (<div>
|
|
|
<Loader fullScreen spinning={loading.effects['app/query']} />
|
|
|
{children}
|
|
|
</div>)
|
|
|
}
|
|
|
+
|
|
|
|
|
|
const curUser = util.auth.getUser()
|
|
|
let rolename = curUser == null?"":curUser.rolename;
|
|
@@ -142,6 +146,9 @@ const LayoutTwo = ({ children, dispatch, app, loading, location }) => {
|
|
|
let menuData = menuPath[menuPath.length-1];
|
|
|
// let panes = globalPanes?globalPanes:[];
|
|
|
|
|
|
+ /**
|
|
|
+ * 处理顶部panel
|
|
|
+ */
|
|
|
const targetPanes = globalPanes.filter(pane => pane.key == (typeof(menuData) === 'undefined'?"30":menuData.id)); //当前页面panel
|
|
|
if(targetPanes&&targetPanes.length>0){
|
|
|
activeKey = ''+targetPanes[0].key;
|
|
@@ -155,7 +162,8 @@ const LayoutTwo = ({ children, dispatch, app, loading, location }) => {
|
|
|
message.error('最多8个');
|
|
|
}else{
|
|
|
globalPanes.push({
|
|
|
- title: typeof(menuData) === 'undefined'?"客户列表":menuData.name, content:children,
|
|
|
+ title: typeof(menuData) === 'undefined'?"客户列表":menuData.name,
|
|
|
+ content:children, //打开的子页面
|
|
|
key: ''+(typeof(menuData) === 'undefined'?"30":menuData.id),
|
|
|
menuPath:menuPath,
|
|
|
closable:true
|
|
@@ -165,6 +173,9 @@ const LayoutTwo = ({ children, dispatch, app, loading, location }) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 在panel打开新表单页面 随后操作完成 需要在这里查询回退的panel打开 并关闭打开的panel
|
|
|
+ */
|
|
|
let j = -1;
|
|
|
for(var i in globalPanes){
|
|
|
if(locationQuery && locationQuery.data && locationQuery.data.indexOf("_panelchange")>0 && globalPanes[i].key === locationQuery.data){
|
|
@@ -175,11 +186,8 @@ const LayoutTwo = ({ children, dispatch, app, loading, location }) => {
|
|
|
|
|
|
if(j>0)
|
|
|
globalPanes.splice(j,1);
|
|
|
- // const End = ()=>{
|
|
|
- // return (<TopTabs panes={globalPanes} activeKey={activeKey} refs="toptabs"
|
|
|
- // remove = {remove}
|
|
|
- // ></TopTabs>)
|
|
|
- // }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
return (
|
|
|
<Layout className={styles.layoutTwo}>
|