From caf9d76dd02ed54d7616a753b7c8028fde5bd306 Mon Sep 17 00:00:00 2001
From: TZW <921914419@qq.com>
Date: Fri, 16 Dec 2022 10:03:10 +0800
Subject: [PATCH] 1

---
 src/app.jsx                        |  6 ++---
 src/global.less                    | 41 ++++++++++++++++++++----------
 src/pages/device/account/index.jsx |  8 +++---
 src/services/system.js             |  2 +-
 4 files changed, 36 insertions(+), 21 deletions(-)

diff --git a/src/app.jsx b/src/app.jsx
index 7d168d7..6af86a9 100644
--- a/src/app.jsx
+++ b/src/app.jsx
@@ -32,7 +32,7 @@ export async function getInitialState() {
       const msg = await queryCurrentUser();
       return msg.data;
     } catch (error) {
-      history.push(loginPath);
+      // history.push(loginPath);
     }
     return undefined;
   }; // 如果是登录页面,不执行
@@ -74,7 +74,7 @@ export async function getInitialState() {
 // ProLayout 支持的api https://procomponents.ant.design/components/layout
 export const layout = ({ initialState, setInitialState }) => {
   let token = localStorage.getItem('TOKENES');
-
+  console.log(initialState, history);
   return {
     disableContentMargin: false,
     waterMarkProps: {
@@ -89,7 +89,7 @@ export const layout = ({ initialState, setInitialState }) => {
       const { location } = history;
       // 如果没有登录,重定向到 login
       if (!initialState?.currentUser && location.pathname !== loginPath) {
-        history.push(loginPath);
+        // history.push(loginPath);
       }
     },
     links: isDev
diff --git a/src/global.less b/src/global.less
index eefee12..d061f14 100644
--- a/src/global.less
+++ b/src/global.less
@@ -58,13 +58,14 @@ ol {
     width: 100%;
     overflow-x: auto;
 
-    &-thead > tr,
-    &-tbody > tr {
-      > th,
-      > td {
+    &-thead>tr,
+    &-tbody>tr {
+
+      >th,
+      >td {
         white-space: pre;
 
-        > span {
+        >span {
           display: block;
         }
       }
@@ -312,7 +313,7 @@ ol {
 }
 
 .lightblue {
-  > td:first-child {
+  >td:first-child {
     position: relative;
 
     &::before {
@@ -334,14 +335,14 @@ ol {
   width: 100%;
   padding-left: 0 !important;
 
-  > span:first-child {
+  >span:first-child {
     flex: 1;
 
-    > span:first-child {
+    >span:first-child {
       display: none !important;
     }
 
-    > .ant-spin-nested-loading {
+    >.ant-spin-nested-loading {
       width: 100%;
     }
   }
@@ -395,7 +396,7 @@ ol {
 }
 
 .runtime-keep-alive-layout {
-  > div {
+  >div {
     height: 100% !important;
   }
 }
@@ -442,25 +443,37 @@ ol {
   height: auto !important;
   min-height: 100% !important;
   overflow: hidden !important;
-  > div {
+
+  >div {
     height: 100%;
     min-height: calc(100vh - 96px);
-    > div {
+
+    >div {
       height: 100%;
     }
   }
+
   .ant-drawer-content {
     height: 100% !important;
   }
 }
+
 // 横向滚动条
 .scrollHoriz {
-  > div {
+  >div {
     display: flex !important;
     flex-wrap: nowrap !important;
     align-items: center !important;
-    > div {
+
+    >div {
       flex-shrink: 0 !important;
     }
   }
 }
+
+.runtime-keep-alive-layout {
+  .ant-layout-sider-children {
+    padding-left: 16px;
+    padding-right: 16px;
+  }
+}
\ No newline at end of file
diff --git a/src/pages/device/account/index.jsx b/src/pages/device/account/index.jsx
index c68f557..0ee6f13 100644
--- a/src/pages/device/account/index.jsx
+++ b/src/pages/device/account/index.jsx
@@ -2,7 +2,7 @@
  * @Author: Li Hanlin
  * @Date: 2022-11-10 09:39:56
  * @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';
@@ -1451,10 +1451,11 @@ function Model(props) {
         {
           title: '上传文件(上限为5个)',
           key: 'urlIds ',
-          valueType: 'uploadImage',
+          valueType: 'UploadDragger',
           // colProps: { span: 24 },
           fieldProps: {
             limit: 5,
+            name: 'file',
           },
           formItemProps: {
             rules: [
@@ -1484,7 +1485,7 @@ function Model(props) {
         {
           title: '上传文件(上限为5个)',
           key: 'urlIds ',
-          valueType: 'uploadImage',
+          valueType: 'UploadDragger',
           formItemProps: {
             rules: [
               {
@@ -1494,6 +1495,7 @@ function Model(props) {
             ],
           },
           fieldProps: {
+            name: 'file',
             limit: 5,
           },
         },
diff --git a/src/services/system.js b/src/services/system.js
index 2d518ad..0ce4e79 100644
--- a/src/services/system.js
+++ b/src/services/system.js
@@ -88,7 +88,7 @@ export async function sectionSelectByShops(params) {
 }
 //授权前查询权限树
 export async function roleTree(params) {
-  return request(`/auth/sysRolePermission/queryAll`, {
+  return request(`emspro/auth/sysRolePermission/queryAll`, {
     method: 'POST',
     data: params,
   });
-- 
2.21.0