diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java index a3f3622a..b99e9811 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java @@ -1498,7 +1498,7 @@ public class PageController { * @return */ @GetMapping("/userRoleInView") - public ModelAndView finduserRoleInView(Integer id) { + public ModelAndView findUserRoleInView(Integer id) { ModelAndView mv = new ModelAndView(); mv.addObject("userId", id); mv.setViewName("pages/user/userRoleForIn"); diff --git a/src/main/java/com/dreamchaser/depository_manage/pojo/UserByPortP.java b/src/main/java/com/dreamchaser/depository_manage/pojo/UserByPortP.java index 075ad5b7..ae1a37e9 100644 --- a/src/main/java/com/dreamchaser/depository_manage/pojo/UserByPortP.java +++ b/src/main/java/com/dreamchaser/depository_manage/pojo/UserByPortP.java @@ -81,6 +81,8 @@ public class UserByPortP { */ private Integer personincharge; + private Integer maindeparment; + public UserByPortP(UserByPort userByPort) { this.id = userByPort.getId(); @@ -96,6 +98,7 @@ public class UserByPortP { this.workpostname = userByPort.getWorkpostname(); this.positionname = userByPort.getPositionname(); this.personincharge = userByPort.getPersonincharge(); + this.maindeparment = userByPort.getMaindeparment(); } public UserByPortP(String number, String name, Integer state, Integer gender, Integer health, String mobilephone, String companyname, String maindeparmentname, String sunmaindeparmentname, String workpostname, String positionname) { diff --git a/src/main/resources/templates/pages/application/application-out_min.html b/src/main/resources/templates/pages/application/application-out_min.html index 8136662c..c310f18d 100644 --- a/src/main/resources/templates/pages/application/application-out_min.html +++ b/src/main/resources/templates/pages/application/application-out_min.html @@ -90,12 +90,6 @@ page: true, skin: 'line', done: function (res, curr, count) { - var data = res.data; - if (data.length > 0) { - if (data[0].state === "进行中") { - $("[data-field='id']").css('display', 'none'); - } - } } diff --git a/src/main/resources/templates/pages/company/company-out.html b/src/main/resources/templates/pages/company/company-out.html index e035f31b..c99ce615 100644 --- a/src/main/resources/templates/pages/company/company-out.html +++ b/src/main/resources/templates/pages/company/company-out.html @@ -57,6 +57,7 @@ @@ -166,7 +167,7 @@ layer.full(index); }); return false; - } else if (obj.event == 'subclass') { + } else if (obj.event === 'subclass') { var index = layer.open({ title: '子公司', type: 2, @@ -181,6 +182,21 @@ }); return false; } + else if (obj.event === 'post') { + var index = layer.open({ + title: '岗位列表', + type: 2, + shade: 0.2, + maxmin: true, + shadeClose: true, + area: ['100%', '100%'], + content: '/findPostByOrganization?organization=' + data.id + }); + $(window).on("resize", function () { + layer.full(index); + }); + return false; + } }) }); diff --git a/src/main/resources/templates/pages/post/post-out.html b/src/main/resources/templates/pages/post/post-out.html index cb260d4a..7430b8a1 100644 --- a/src/main/resources/templates/pages/post/post-out.html +++ b/src/main/resources/templates/pages/post/post-out.html @@ -56,8 +56,8 @@ @@ -114,7 +114,19 @@ limit: 10, page: true, skin: 'line', - done: function () { + done: function (res, curr, count) { + $.each(res['data'], function (i, j) { + let administrativeorganization = j["administrativeorganization"]; + var controlItem = $("[lay-id='currentTableId'] tr:eq(" + (i + 1) + ")").children()[8]; + var aItem = controlItem.childNodes[0]; + if(administrativeorganization === 361){ + + $(aItem).append('设置权限') + }else{ + $(aItem).append('设置权限') + + } + }) } }); @@ -194,7 +206,6 @@ }); return false; }else if (obj.event === 'addRoleIn') { - var index = layer.open({ type: 2, title: '权限信息', diff --git a/src/main/resources/templates/pages/user/table-user.html b/src/main/resources/templates/pages/user/table-user.html index 2683e069..eff59217 100644 --- a/src/main/resources/templates/pages/user/table-user.html +++ b/src/main/resources/templates/pages/user/table-user.html @@ -63,7 +63,7 @@
@@ -150,7 +151,20 @@ limit: 10, page: true, skin: 'line', - done: function () { + done: function (res, curr, count) { + $.each(res['data'], function (i, j) { + let maindeparment = j["maindeparment"]; + + var controlItem = $("[lay-id='currentTableId'] tr:eq(" + (i + 1) + ")").children()[11]; + var aItem = controlItem.childNodes[0]; + if(maindeparment === 361){ + + $(aItem).append('设置权限') + }else{ + $(aItem).append('设置权限') + + } + }) } }); diff --git a/target/classes/templates/pages/user/userRoleForIn.html b/target/classes/templates/pages/user/userRoleForIn.html index 26629f77..d973af2e 100644 --- a/target/classes/templates/pages/user/userRoleForIn.html +++ b/target/classes/templates/pages/user/userRoleForIn.html @@ -36,7 +36,7 @@ //第一个实例 table.render({ elem: '#demo' - , url: '/findUserInRole?userId=' + userId+'&classes=1', //数据接口 + , url: '/findUserInRole?uid=' + userId+'&classes=1', //数据接口 parseData: function (res) { //res 即为原始返回的数据 return { "status": res.status, //解析接口状态