roleList.jsp 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <style>
  4. #searchColums{
  5. padding: 10px;
  6. }
  7. </style>
  8. <!-- update-begin--Author:xuelin Date:20170331 for:[#1714]【功能】角色分配菜单权限的时候,权限树采用ztree重写,不再采用easyui的树 新增 引入ztree插件包-------------------- -->
  9. <t:base type="jquery,easyui,tools,DatePicker,ztree"></t:base>
  10. <!-- update-end--Author:xuelin Date:20170331 for:[#1714]【功能】角色分配菜单权限的时候,权限树采用ztree重写,不再采用easyui的树 新增引入ztree插件包---------------------- -->
  11. <div class="easyui-layout" fit="true">
  12. <div region="center" style="padding:0px;border:0px">
  13. <t:datagrid name="roleList" title="common.role.list" actionUrl="roleController.do?roleGrid" fitColumns="true" idField="id" sortName="id" sortOrder="desc" queryMode="group" >
  14. <t:dgCol title="common.code" field="id" hidden="true"></t:dgCol>
  15. <t:dgCol title="common.role.code" field="roleCode" width="100"></t:dgCol>
  16. <t:dgCol title="common.role.name" field="roleName" query="true" width="100"></t:dgCol>
  17. <t:dgCol title="能否登录app" field="apploginAbleFlag" dictionary="applogin_able_flag" query="false" width="100"></t:dgCol>
  18. <t:dgCol title="角色权值" field="selfRoleweightCode" query="false" width="100"></t:dgCol>
  19. <t:dgCol title="可见权限范围" field="visibleRoleweightCode" query="false" width="100"></t:dgCol>
  20. <t:dgCol title="common.createby" field="createBy" hidden="true"></t:dgCol>
  21. <t:dgCol title="common.createtime" field="createDate" formatter="yyyy-MM-dd" hidden="true"></t:dgCol>
  22. <t:dgCol title="common.updateby" field="updateBy" hidden="true"></t:dgCol>
  23. <t:dgCol title="common.updatetime" field="updateDate" formatter="yyyy-MM-dd" hidden="true"></t:dgCol>
  24. <t:dgCol title="common.operation" field="opt"></t:dgCol>
  25. <t:dgFunOpt funname="delRole(id)" title="common.delete" urlclass="ace_button" urlStyle="background-color:#ec4758;" urlfont="fa-trash-o"></t:dgFunOpt>
  26. <t:dgFunOpt funname="userListbyrole(id,roleName)" title="common.user" urlclass="ace_button" urlfont="fa-user"></t:dgFunOpt>
  27. <t:dgFunOpt funname="setfunbyrole(id,roleName)" title="permission.set" urlclass="ace_button" urlStyle="background-color:#18a689;" urlfont="fa-cog"></t:dgFunOpt>
  28. <t:dgToolBar title="common.add.param" langArg="common.role" icon="icon-add" operationCode="add" url="roleController.do?addorupdate" funname="add"></t:dgToolBar>
  29. <t:dgToolBar title="common.edit.param" langArg="common.role" icon="icon-edit" operationCode="edit" url="roleController.do?addorupdate" funname="update"></t:dgToolBar>
  30. <%-- <t:dgToolBar title="excelImport" icon="fa fa-arrow-circle-left" funname="ImportXls"></t:dgToolBar> --%>
  31. <t:dgToolBar title="excelOutput" icon="icon-putout" operationCode="putout" funname="ExportXls"></t:dgToolBar>
  32. <%-- <t:dgToolBar title="templateDownload" icon="fa fa-arrow-circle-o-down" funname="ExportXlsByT"></t:dgToolBar> --%>
  33. </t:datagrid></div>
  34. </div>
  35. <div region="east" style="width: 600px;" split="true">
  36. <div tools="#tt" class="easyui-panel" title='<t:mutiLang langKey="permission.set"/>' style="padding: 10px;" fit="true" border="false" id="function-panel"></div>
  37. </div>
  38. <div id="tt"></div>
  39. </div>
  40. <script type="text/javascript">
  41. function setfunbyrole(id,roleName) {
  42. $("#function-panel").panel(
  43. {
  44. title :roleName+ ':' + '<t:mutiLang langKey="current.permission"/>',
  45. href:"roleController.do?fun&roleId=" + id
  46. }
  47. );
  48. //$('#function-panel').panel("refresh" );
  49. }
  50. //update-start--Author:gaofeng Date:20140822 for:查看角色的所有用户信息
  51. function userListbyrole(id,roleName) {
  52. $("#function-panel").panel(
  53. {
  54. title :roleName+ ':' + '<t:mutiLang langKey="common.user"/>',
  55. href:"roleController.do?userList&roleId=" + id
  56. }
  57. );
  58. //$('#function-panel').panel("refresh" );
  59. }
  60. //update-end--Author:gaofeng Date:20140822 for:查看角色的所有用户信息
  61. //删除角色
  62. function delRole(id){
  63. var tabName= 'roleList';
  64. var url= 'roleController.do?delRole&id='+id;
  65. //$.dialog.confirm('<t:mutiLang langKey="confirm.delete.this.record"/>', function(){
  66. $.dialog.confirm('确定删除该角色吗?', function(){
  67. doSubmit(url,tabName);
  68. rowid = '';
  69. $("#function-panel").html("");//删除角色后,清空对应的权限
  70. }, function(){
  71. });
  72. }
  73. //导入
  74. function ImportXls() {
  75. openuploadwin('Excel导入', 'roleController.do?upload', "roleList");
  76. }
  77. //导出
  78. function ExportXls() {
  79. JeecgExcelExport("roleController.do?exportXls", "roleList");
  80. }
  81. //模板下载
  82. function ExportXlsByT() {
  83. JeecgExcelExport("roleController.do?exportXlsByT", "roleList");
  84. }
  85. </script>