浏览代码

页面无法登录问题修复,以及任务书模块审批回退按钮标识

ly 1 年之前
父节点
当前提交
e435e78ac1

+ 1 - 1
src/main/resources/mapper/PrjProjectDao.xml

@@ -433,7 +433,7 @@
433 433
                 order by ${sortName} ${sortOrder}
434 434
             </when>
435 435
             <otherwise>
436
-                order by p.ID asc
436
+                order by p.ID desc
437 437
             </otherwise>
438 438
         </choose>
439 439
     </select>

+ 14 - 0
src/main/resources/templates/login/login.html

@@ -348,7 +348,10 @@
348 348
 
349 349
 <script type="text/javascript" th:inline="javascript">
350 350
     AjaxUtil.ctx = /*[[@{/}]]*/'';
351
+    // 在页面加载完毕后调用拦截器函数
352
+
351 353
     layui.use(['form', 'layNotify'], function () {
354
+
352 355
         var form = layui.form,
353 356
             layNotify = layui.layNotify;
354 357
 
@@ -464,11 +467,13 @@
464 467
                 },
465 468
                 error: function (error) {
466 469
                     loginend();
470
+                    redirection();
467 471
                     layNotify.notice({
468 472
                         title: "登录提示",
469 473
                         type: "error",
470 474
                         message: "请求失败,请联系系统管理员!"
471 475
                     });
476
+
472 477
                 }
473 478
             });
474 479
 
@@ -483,6 +488,9 @@
483 488
             }
484 489
         });
485 490
 
491
+        function redirection(){
492
+            window.location.replace("http://10.208.114.107:8081/home/")
493
+        }
486 494
         // 登陆中
487 495
         function logining() {
488 496
             document.getElementById("btn_login").setAttribute("disabled", true);//设置不可点击
@@ -516,7 +524,13 @@
516 524
         //     });
517 525
         // }
518 526
 
527
+
528
+
519 529
     });
530
+
531
+
532
+
533
+
520 534
 </script>
521 535
 
522 536
 </body>

二进制
target/classes/com/liang/controller/PrjProjectController.class


+ 1 - 1
target/classes/mapper/PrjProjectDao.xml

@@ -433,7 +433,7 @@
433 433
                 order by ${sortName} ${sortOrder}
434 434
             </when>
435 435
             <otherwise>
436
-                order by p.ID asc
436
+                order by p.ID desc
437 437
             </otherwise>
438 438
         </choose>
439 439
     </select>

+ 17 - 9
target/classes/templates/login/login.html

@@ -9,7 +9,7 @@
9 9
     <meta name="apple-mobile-web-app-status-bar-style" content="black">
10 10
     <meta name="apple-mobile-web-app-capable" content="yes">
11 11
     <meta name="format-detection" content="telephone=no">
12
-    <link rel="icon" th:href="@{/images/favicon.ico}">
12
+    <link rel="icon" th:href="@{//images/favicon.ico}">
13 13
     <link rel="stylesheet" th:href="@{/lib/layui/css/layui.css}" media="all">
14 14
 
15 15
     <style th:inline="text">
@@ -38,30 +38,30 @@
38 38
         }
39 39
 
40 40
         .login-main .login-bottom .center .item .icon-1 {
41
-            background: url("[[@{/}]]images/icon-login.png") no-repeat 1px 0;
41
+            background: url("/images/icon-login.png") no-repeat 1px 0;
42 42
         }
43 43
 
44 44
         .login-main .login-bottom .center .item .icon-2 {
45
-            background: url("[[@{/}]]images/icon-login.png") no-repeat -54px 0;
45
+            background: url("/images/icon-login.png") no-repeat -54px 0;
46 46
         }
47 47
 
48 48
         .login-main .login-bottom .center .item .icon-3 {
49
-            background: url("[[@{/}]]images/icon-login.png") no-repeat -106px 0;
49
+            background: url("/images/icon-login.png") no-repeat -106px 0;
50 50
         }
51 51
 
52 52
         .login-main .login-bottom .center .item .icon-4 {
53
-            background: url("[[@{/}]]images/icon-login.png") no-repeat 0 -43px;
53
+            background: url("/images/icon-login.png") no-repeat 0 -43px;
54 54
             position: absolute;
55 55
             right: -10px;
56 56
             cursor: pointer;
57 57
         }
58 58
 
59 59
         .login-main .login-bottom .center .item .icon-5 {
60
-            background: url("[[@{/}]]images/icon-login.png") no-repeat -55px -43px;
60
+            background: url("/images/icon-login.png") no-repeat -55px -43px;
61 61
         }
62 62
 
63 63
         .login-main .login-bottom .center .item .icon-6 {
64
-            background: url("[[@{/}]]images/icon-login.png") no-repeat 0 -93px;
64
+            background: url("/images/icon-login.png") no-repeat 0 -93px;
65 65
             position: absolute;
66 66
             right: -10px;
67 67
             margin-top: 8px;
@@ -85,7 +85,7 @@
85 85
             width: 14px;
86 86
             height: 14px;
87 87
             border: none;
88
-            background: url("[[@{/}]]images/icon-login.png") no-repeat -111px -48px;
88
+            background: url("/images/icon-login.png") no-repeat -111px -48px;
89 89
         }
90 90
 
91 91
         .login-main .login-bottom .center .item .icon {
@@ -175,7 +175,7 @@
175 175
         }
176 176
 
177 177
         body {
178
-            background: url("[[@{/}]]images/loginbg.jpg") 0% 0% / cover no-repeat;
178
+            background: url("/images/loginbg.jpg") 0% 0% / cover no-repeat;
179 179
             position: static;
180 180
             font-size: 12px;
181 181
         }
@@ -348,7 +348,10 @@
348 348
 
349 349
 <script type="text/javascript" th:inline="javascript">
350 350
     AjaxUtil.ctx = /*[[@{/}]]*/'';
351
+    // 在页面加载完毕后调用拦截器函数
352
+
351 353
     layui.use(['form', 'layNotify'], function () {
354
+
352 355
         var form = layui.form,
353 356
             layNotify = layui.layNotify;
354 357
 
@@ -464,11 +467,13 @@
464 467
                 },
465 468
                 error: function (error) {
466 469
                     loginend();
470
+                    redirection();
467 471
                     layNotify.notice({
468 472
                         title: "登录提示",
469 473
                         type: "error",
470 474
                         message: "请求失败,请联系系统管理员!"
471 475
                     });
476
+
472 477
                 }
473 478
             });
474 479
 
@@ -483,6 +488,9 @@
483 488
             }
484 489
         });
485 490
 
491
+        function redirection(){
492
+            window.location.replace("http://10.28.114.107:8081/home/")
493
+        }
486 494
         // 登陆中
487 495
         function logining() {
488 496
             document.getElementById("btn_login").setAttribute("disabled", true);//设置不可点击

+ 7 - 9
target/classes/templates/prjproject/list.html

@@ -95,7 +95,7 @@
95 95
 <!--                    <i class="layui-icon layui-icon-export" style="font-size: 10px;"></i>导出列表-->
96 96
 <!--                </button>-->
97 97
                 <button class="layui-btn layui-btn-sm" lay-event="backSpacing" style="background: #FF8040" id="myButton">
98
-                    <i class="" style="font-size: 10px;"></i>审批回退
98
+                    <i class="layui-icon layui-icon-return" style="font-size: 10px;"></i>审批回退
99 99
                 </button>
100 100
             </div>
101 101
         </script>
@@ -130,6 +130,7 @@
130 130
         var form = layui.form,
131 131
             table = layui.table;
132 132
         var userId = $("#userId").val();
133
+
133 134
         var currTable = table.render({
134 135
             elem: '#currentTableId',
135 136
             url: AjaxUtil.ctx + 'prjProject/list',
@@ -168,12 +169,11 @@
168 169
                 // 测试打印出后端返回的权限列表
169 170
                 // let permissionSet = [[${permissionSet}]];
170 171
                 // console.log(JSON.stringify(permissionSet));
172
+                if ( userId != 40 && userId != 42 && userId != 1) {
173
+                    document.getElementById("myButton").style.display = 'none';
174
+                }
171 175
             }
172 176
         });
173
-/*        console.log("这是我要获取的当前账户userid" + userId)
174
-        if (userId != 119 ){
175
-            document.getElementById("myButton").style.display = 'none';
176
-        }*/
177 177
 
178 178
 
179 179
         // 监听搜索操作
@@ -223,9 +223,7 @@
223 223
             });
224 224
         });
225 225
 
226
-        if(userId != 40){
227
-            document.getElementById("myButton").style.display = 'none';
228
-        }
226
+
229 227
 
230 228
         // 监听行工具事件
231 229
         table.on('toolbar(currentTableFilter)', function (obj) {
@@ -506,7 +504,7 @@
506 504
                     layer.confirm('确定要将任务书回退至未提交状态吗?', function (index) {
507 505
                         layer.close(index);
508 506
                         AjaxUtil.post({
509
-                            url: AjaxUtil.ctx + "prjProject/upDataSpzt",
507
+                            url: AjaxUtil.ctx + "prjProject/upDataSpzt/"+userId,
510 508
                             contentType: "application/json",
511 509
                             data: JSON.stringify(data),
512 510
                             success: function (res) {