Commit 0c3adabd authored by TZW's avatar TZW

Merge branch 'master' of http://47.100.234.193:9527/wuhao/ems3.3

parents 7e86fce8 0cc4101a
...@@ -37,7 +37,6 @@ export async function getInitialState() { ...@@ -37,7 +37,6 @@ export async function getInitialState() {
} }
return undefined; return undefined;
}; // 如果是登录页面,不执行 }; // 如果是登录页面,不执行
const getmenuData = async () => { const getmenuData = async () => {
try { try {
const res = await getMenu(); const res = await getMenu();
...@@ -87,11 +86,17 @@ export const layout = ({ initialState, setInitialState }) => { ...@@ -87,11 +86,17 @@ export const layout = ({ initialState, setInitialState }) => {
setInitialState((s) => ({ ...s, collapsed: cols })); setInitialState((s) => ({ ...s, collapsed: cols }));
}, },
footerRender: () => <Footer />, footerRender: () => <Footer />,
onPageChange: () => { onPageChange: async () => {
const { location } = history; const { location } = history;
// 如果没有登录,重定向到 login // 如果没有登录,重定向到 login
if (!initialState?.currentUser && location.pathname !== loginPath) { if (!initialState?.currentUser && location.pathname !== loginPath) {
// history.push(loginPath); let userInfo = await initialState.fetchUserInfo();
let menuData = await initialState.getmenuData();
setInitialState((s) => ({
...s,
currentUser: userInfo?.data,
newMenu: menuData,
}));
} }
}, },
links: isDev links: isDev
......
...@@ -58,14 +58,13 @@ ol { ...@@ -58,14 +58,13 @@ ol {
width: 100%; width: 100%;
overflow-x: auto; overflow-x: auto;
&-thead>tr, &-thead > tr,
&-tbody>tr { &-tbody > tr {
> th,
>th, > td {
>td {
white-space: pre; white-space: pre;
>span { > span {
display: block; display: block;
} }
} }
...@@ -275,6 +274,7 @@ ol { ...@@ -275,6 +274,7 @@ ol {
.table-cell { .table-cell {
display: -webkit-box; display: -webkit-box;
max-width: 230px;
//width: 100%; //width: 100%;
overflow: hidden; overflow: hidden;
font-size: 12px !important; font-size: 12px !important;
...@@ -313,7 +313,7 @@ ol { ...@@ -313,7 +313,7 @@ ol {
} }
.lightblue { .lightblue {
>td:first-child { > td:first-child {
position: relative; position: relative;
&::before { &::before {
...@@ -335,14 +335,14 @@ ol { ...@@ -335,14 +335,14 @@ ol {
width: 100%; width: 100%;
padding-left: 0 !important; padding-left: 0 !important;
>span:first-child { > span:first-child {
flex: 1; flex: 1;
>span:first-child { > span:first-child {
display: none !important; display: none !important;
} }
>.ant-spin-nested-loading { > .ant-spin-nested-loading {
width: 100%; width: 100%;
} }
} }
...@@ -396,7 +396,7 @@ ol { ...@@ -396,7 +396,7 @@ ol {
} }
.runtime-keep-alive-layout { .runtime-keep-alive-layout {
>div { > div {
height: 100% !important; height: 100% !important;
} }
} }
...@@ -444,11 +444,11 @@ ol { ...@@ -444,11 +444,11 @@ ol {
min-height: 100% !important; min-height: 100% !important;
overflow: hidden !important; overflow: hidden !important;
>div { > div {
height: 100%; height: 100%;
min-height: calc(100vh - 96px); min-height: calc(100vh - 96px);
>div { > div {
height: 100%; height: 100%;
} }
} }
...@@ -460,12 +460,12 @@ ol { ...@@ -460,12 +460,12 @@ ol {
// 横向滚动条 // 横向滚动条
.scrollHoriz { .scrollHoriz {
>div { > div {
display: flex !important; display: flex !important;
flex-wrap: nowrap !important; flex-wrap: nowrap !important;
align-items: center !important; align-items: center !important;
>div { > div {
flex-shrink: 0 !important; flex-shrink: 0 !important;
} }
} }
...@@ -473,7 +473,7 @@ ol { ...@@ -473,7 +473,7 @@ ol {
.runtime-keep-alive-layout { .runtime-keep-alive-layout {
.ant-layout-sider-children { .ant-layout-sider-children {
padding-left: 16px;
padding-right: 16px; padding-right: 16px;
padding-left: 16px;
} }
} }
\ No newline at end of file
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