Commit caf9d76d authored by TZW's avatar TZW

1

parent b78a0951
...@@ -32,7 +32,7 @@ export async function getInitialState() { ...@@ -32,7 +32,7 @@ export async function getInitialState() {
const msg = await queryCurrentUser(); const msg = await queryCurrentUser();
return msg.data; return msg.data;
} catch (error) { } catch (error) {
history.push(loginPath); // history.push(loginPath);
} }
return undefined; return undefined;
}; // 如果是登录页面,不执行 }; // 如果是登录页面,不执行
...@@ -74,7 +74,7 @@ export async function getInitialState() { ...@@ -74,7 +74,7 @@ export async function getInitialState() {
// ProLayout 支持的api https://procomponents.ant.design/components/layout // ProLayout 支持的api https://procomponents.ant.design/components/layout
export const layout = ({ initialState, setInitialState }) => { export const layout = ({ initialState, setInitialState }) => {
let token = localStorage.getItem('TOKENES'); let token = localStorage.getItem('TOKENES');
console.log(initialState, history);
return { return {
disableContentMargin: false, disableContentMargin: false,
waterMarkProps: { waterMarkProps: {
...@@ -89,7 +89,7 @@ export const layout = ({ initialState, setInitialState }) => { ...@@ -89,7 +89,7 @@ export const layout = ({ initialState, setInitialState }) => {
const { location } = history; const { location } = history;
// 如果没有登录,重定向到 login // 如果没有登录,重定向到 login
if (!initialState?.currentUser && location.pathname !== loginPath) { if (!initialState?.currentUser && location.pathname !== loginPath) {
history.push(loginPath); // history.push(loginPath);
} }
}, },
links: isDev links: isDev
......
...@@ -58,13 +58,14 @@ ol { ...@@ -58,13 +58,14 @@ ol {
width: 100%; width: 100%;
overflow-x: auto; overflow-x: auto;
&-thead > tr, &-thead>tr,
&-tbody > tr { &-tbody>tr {
> th,
> td { >th,
>td {
white-space: pre; white-space: pre;
> span { >span {
display: block; display: block;
} }
} }
...@@ -312,7 +313,7 @@ ol { ...@@ -312,7 +313,7 @@ ol {
} }
.lightblue { .lightblue {
> td:first-child { >td:first-child {
position: relative; position: relative;
&::before { &::before {
...@@ -334,14 +335,14 @@ ol { ...@@ -334,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%;
} }
} }
...@@ -395,7 +396,7 @@ ol { ...@@ -395,7 +396,7 @@ ol {
} }
.runtime-keep-alive-layout { .runtime-keep-alive-layout {
> div { >div {
height: 100% !important; height: 100% !important;
} }
} }
...@@ -442,25 +443,37 @@ ol { ...@@ -442,25 +443,37 @@ ol {
height: auto !important; height: auto !important;
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%;
} }
} }
.ant-drawer-content { .ant-drawer-content {
height: 100% !important; height: 100% !important;
} }
} }
// 横向滚动条 // 横向滚动条
.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;
} }
} }
} }
.runtime-keep-alive-layout {
.ant-layout-sider-children {
padding-left: 16px;
padding-right: 16px;
}
}
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56 * @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-15 19:13:39 * @Last Modified time: 2022-12-16 09:28:06
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -1451,10 +1451,11 @@ function Model(props) { ...@@ -1451,10 +1451,11 @@ function Model(props) {
{ {
title: '上传文件(上限为5个)', title: '上传文件(上限为5个)',
key: 'urlIds ', key: 'urlIds ',
valueType: 'uploadImage', valueType: 'UploadDragger',
// colProps: { span: 24 }, // colProps: { span: 24 },
fieldProps: { fieldProps: {
limit: 5, limit: 5,
name: 'file',
}, },
formItemProps: { formItemProps: {
rules: [ rules: [
...@@ -1484,7 +1485,7 @@ function Model(props) { ...@@ -1484,7 +1485,7 @@ function Model(props) {
{ {
title: '上传文件(上限为5个)', title: '上传文件(上限为5个)',
key: 'urlIds ', key: 'urlIds ',
valueType: 'uploadImage', valueType: 'UploadDragger',
formItemProps: { formItemProps: {
rules: [ rules: [
{ {
...@@ -1494,6 +1495,7 @@ function Model(props) { ...@@ -1494,6 +1495,7 @@ function Model(props) {
], ],
}, },
fieldProps: { fieldProps: {
name: 'file',
limit: 5, limit: 5,
}, },
}, },
......
...@@ -88,7 +88,7 @@ export async function sectionSelectByShops(params) { ...@@ -88,7 +88,7 @@ export async function sectionSelectByShops(params) {
} }
//授权前查询权限树 //授权前查询权限树
export async function roleTree(params) { export async function roleTree(params) {
return request(`/auth/sysRolePermission/queryAll`, { return request(`emspro/auth/sysRolePermission/queryAll`, {
method: 'POST', method: 'POST',
data: params, data: params,
}); });
......
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