Преглед изворни кода

优化页签在Firefox浏览器被遮挡的问题(I7BVAJ)

RuoYi пре 2 година
родитељ
комит
ebc848b5b5

+ 26 - 15
ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java

@@ -17,7 +17,6 @@ import org.springframework.web.bind.MissingPathVariableException;
17 17
 import org.springframework.web.bind.annotation.ExceptionHandler;
18 18
 import org.springframework.web.bind.annotation.RestControllerAdvice;
19 19
 import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
20
-
21 20
 import javax.servlet.http.HttpServletRequest;
22 21
 
23 22
 /**
@@ -26,14 +25,16 @@ import javax.servlet.http.HttpServletRequest;
26 25
  * @author ruoyi
27 26
  */
28 27
 @RestControllerAdvice
29
-public class GlobalExceptionHandler {
28
+public class GlobalExceptionHandler
29
+{
30 30
     private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class);
31 31
 
32 32
     /**
33 33
      * 权限码异常
34 34
      */
35 35
     @ExceptionHandler(NotPermissionException.class)
36
-    public AjaxResult handleNotPermissionException(NotPermissionException e, HttpServletRequest request) {
36
+    public AjaxResult handleNotPermissionException(NotPermissionException e, HttpServletRequest request)
37
+    {
37 38
         String requestURI = request.getRequestURI();
38 39
         log.error("请求地址'{}',权限码校验失败'{}'", requestURI, e.getMessage());
39 40
         return AjaxResult.error(HttpStatus.FORBIDDEN, "没有访问权限,请联系管理员授权");
@@ -43,7 +44,8 @@ public class GlobalExceptionHandler {
43 44
      * 角色权限异常
44 45
      */
45 46
     @ExceptionHandler(NotRoleException.class)
46
-    public AjaxResult handleNotRoleException(NotRoleException e, HttpServletRequest request) {
47
+    public AjaxResult handleNotRoleException(NotRoleException e, HttpServletRequest request)
48
+    {
47 49
         String requestURI = request.getRequestURI();
48 50
         log.error("请求地址'{}',角色权限校验失败'{}'", requestURI, e.getMessage());
49 51
         return AjaxResult.error(HttpStatus.FORBIDDEN, "没有访问权限,请联系管理员授权");
@@ -53,8 +55,8 @@ public class GlobalExceptionHandler {
53 55
      * 请求方式不支持
54 56
      */
55 57
     @ExceptionHandler(HttpRequestMethodNotSupportedException.class)
56
-    public AjaxResult handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException e,
57
-                                                          HttpServletRequest request) {
58
+    public AjaxResult handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException e, HttpServletRequest request)
59
+    {
58 60
         String requestURI = request.getRequestURI();
59 61
         log.error("请求地址'{}',不支持'{}'请求", requestURI, e.getMethod());
60 62
         return AjaxResult.error(e.getMessage());
@@ -64,7 +66,8 @@ public class GlobalExceptionHandler {
64 66
      * 业务异常
65 67
      */
66 68
     @ExceptionHandler(ServiceException.class)
67
-    public AjaxResult handleServiceException(ServiceException e, HttpServletRequest request) {
69
+    public AjaxResult handleServiceException(ServiceException e, HttpServletRequest request)
70
+    {
68 71
         log.error(e.getMessage(), e);
69 72
         Integer code = e.getCode();
70 73
         return StringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage());
@@ -74,7 +77,8 @@ public class GlobalExceptionHandler {
74 77
      * 请求路径中缺少必需的路径变量
75 78
      */
76 79
     @ExceptionHandler(MissingPathVariableException.class)
77
-    public AjaxResult handleMissingPathVariableException(MissingPathVariableException e, HttpServletRequest request) {
80
+    public AjaxResult handleMissingPathVariableException(MissingPathVariableException e, HttpServletRequest request)
81
+    {
78 82
         String requestURI = request.getRequestURI();
79 83
         log.error("请求路径中缺少必需的路径变量'{}',发生系统异常.", requestURI, e);
80 84
         return AjaxResult.error(String.format("请求路径中缺少必需的路径变量[%s]", e.getVariableName()));
@@ -84,7 +88,8 @@ public class GlobalExceptionHandler {
84 88
      * 请求参数类型不匹配
85 89
      */
86 90
     @ExceptionHandler(MethodArgumentTypeMismatchException.class)
87
-    public AjaxResult handleMethodArgumentTypeMismatchException(MethodArgumentTypeMismatchException e, HttpServletRequest request) {
91
+    public AjaxResult handleMethodArgumentTypeMismatchException(MethodArgumentTypeMismatchException e, HttpServletRequest request)
92
+    {
88 93
         String requestURI = request.getRequestURI();
89 94
         log.error("请求参数类型不匹配'{}',发生系统异常.", requestURI, e);
90 95
         return AjaxResult.error(String.format("请求参数类型不匹配,参数[%s]要求类型为:'%s',但输入值为:'%s'", e.getName(), e.getRequiredType().getName(), e.getValue()));
@@ -94,7 +99,8 @@ public class GlobalExceptionHandler {
94 99
      * 拦截未知的运行时异常
95 100
      */
96 101
     @ExceptionHandler(RuntimeException.class)
97
-    public AjaxResult handleRuntimeException(RuntimeException e, HttpServletRequest request) {
102
+    public AjaxResult handleRuntimeException(RuntimeException e, HttpServletRequest request)
103
+    {
98 104
         String requestURI = request.getRequestURI();
99 105
         log.error("请求地址'{}',发生未知异常.", requestURI, e);
100 106
         return AjaxResult.error(e.getMessage());
@@ -104,7 +110,8 @@ public class GlobalExceptionHandler {
104 110
      * 系统异常
105 111
      */
106 112
     @ExceptionHandler(Exception.class)
107
-    public AjaxResult handleException(Exception e, HttpServletRequest request) {
113
+    public AjaxResult handleException(Exception e, HttpServletRequest request)
114
+    {
108 115
         String requestURI = request.getRequestURI();
109 116
         log.error("请求地址'{}',发生系统异常.", requestURI, e);
110 117
         return AjaxResult.error(e.getMessage());
@@ -114,7 +121,8 @@ public class GlobalExceptionHandler {
114 121
      * 自定义验证异常
115 122
      */
116 123
     @ExceptionHandler(BindException.class)
117
-    public AjaxResult handleBindException(BindException e) {
124
+    public AjaxResult handleBindException(BindException e)
125
+    {
118 126
         log.error(e.getMessage(), e);
119 127
         String message = e.getAllErrors().get(0).getDefaultMessage();
120 128
         return AjaxResult.error(message);
@@ -124,7 +132,8 @@ public class GlobalExceptionHandler {
124 132
      * 自定义验证异常
125 133
      */
126 134
     @ExceptionHandler(MethodArgumentNotValidException.class)
127
-    public Object handleMethodArgumentNotValidException(MethodArgumentNotValidException e) {
135
+    public Object handleMethodArgumentNotValidException(MethodArgumentNotValidException e)
136
+    {
128 137
         log.error(e.getMessage(), e);
129 138
         String message = e.getBindingResult().getFieldError().getDefaultMessage();
130 139
         return AjaxResult.error(message);
@@ -134,7 +143,8 @@ public class GlobalExceptionHandler {
134 143
      * 内部认证异常
135 144
      */
136 145
     @ExceptionHandler(InnerAuthException.class)
137
-    public AjaxResult handleInnerAuthException(InnerAuthException e) {
146
+    public AjaxResult handleInnerAuthException(InnerAuthException e)
147
+    {
138 148
         return AjaxResult.error(e.getMessage());
139 149
     }
140 150
 
@@ -142,7 +152,8 @@ public class GlobalExceptionHandler {
142 152
      * 演示模式异常
143 153
      */
144 154
     @ExceptionHandler(DemoModeException.class)
145
-    public AjaxResult handleDemoModeException(DemoModeException e) {
155
+    public AjaxResult handleDemoModeException(DemoModeException e)
156
+    {
146 157
         return AjaxResult.error("演示模式,不允许操作");
147 158
     }
148 159
 }

+ 1 - 1
ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue

@@ -87,7 +87,7 @@ export default {
87 87
       bottom: 0px;
88 88
     }
89 89
     .el-scrollbar__wrap {
90
-      height: 39px;
90
+      height: 49px;
91 91
     }
92 92
   }
93 93
 }