Role.cshtml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. @{
  2. ViewData["TitleController"] = "系统管理";
  3. ViewData["TitleAction"] = "角色管理";
  4. ViewData["TitleActionDescription"] = "用户角色权限管理";
  5. ViewData["Title"] = "角色管理";
  6. }
  7. @section header{
  8. <link href="~/lib/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
  9. <link rel="stylesheet" href="~/lib/zTree.v3/css/zTreeStyle/zTreeStyle.min.css">
  10. }
  11. <style>
  12. .ztree * {
  13. color: black;
  14. font-size: 14px;
  15. }
  16. </style>
  17. <div class="row">
  18. <div class="col-md-11">
  19. <div class="box box-primary">
  20. <div class="box-header">
  21. <div class="row">
  22. <div class="col-md-1" style="padding-left: 5px">
  23. <div class="btn-group">
  24. <button class="btn btn-block btn-primary" onclick="modelCreateRole()">
  25. <i class="fa fa-plus"></i> 新增
  26. </button>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. <div class="box-body">
  32. <table id="role_table" class="table table-condensed"></table>
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="modal fade" id="modal_permissions" tabindex="-1" role="dialog" aria-labelledby="modal_permissions_label"
  38. data-backdrop="static">
  39. <div class="modal-dialog" role="document" style="width:80%">
  40. <div class="modal-content">
  41. <div class="modal-header">
  42. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  43. <h4 class="modal-title">权限模块</h4>
  44. </div>
  45. <div class="modal-body">
  46. <form id="form" role="form" action="" class="form-horizontal">
  47. <input id="Id" name="Id" value="" type="hidden" />
  48. <div class="form-group">
  49. <label for="Name2" class="col-sm-2 control-label">角色名称</label>
  50. <div class="col-sm-10">
  51. <input id="Name2" type="text" name="Name2" disabled="disabled" data-msg-required="必须填写角色名称" placeholder="例:一级用户"
  52. class="form-control" data-rule-required="true" value="" />
  53. </div>
  54. </div>
  55. <div class="form-group">
  56. <label class="col-sm-2 control-label">角色权限</label>
  57. <div class="col-sm-10">
  58. <div style="width:100%; height:100%; overflow:auto;">
  59. <ul id="permissions" class="ztree"></ul>
  60. </div>
  61. </div>
  62. </div>
  63. </form>
  64. </div>
  65. <div class="modal-footer">
  66. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  67. <button type="button" data-loading-text="正在处理..." onclick="savePermissions()" class="btn btn-primary">保存</button>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <div class="modal fade" id="modal_role_add" tabindex="-1" role="dialog" aria-labelledby="modal_role_add_label"
  73. ata-backdrop="static">
  74. <div class="modal-dialog" role="document" style="width:80%">
  75. <div class="modal-content">
  76. <div class="modal-header">
  77. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  78. <h4 class="modal-title">添加 / 修改 角色名称</h4>
  79. </div>
  80. <div class="modal-body">
  81. <form id="form" role="form" action="" class="form-horizontal">
  82. <input id="Id" name="Id" value="" type="hidden" />
  83. <div class="form-group">
  84. <label for="Name" class="col-sm-2 control-label">角色名称</label>
  85. <div class="col-sm-10">
  86. <input id="Name" type="text" name="Name" data-msg-required="必须填写角色名称" placeholder="例:一级用户"
  87. class="form-control" data-rule-required="true" value="" />
  88. </div>
  89. </div>
  90. </form>
  91. </div>
  92. <div class="modal-footer">
  93. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  94. <button type="button" data-loading-text="正在处理..." onclick="saveRole()" class="btn btn-primary">保存</button>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. @section footer{
  100. <script src="~/lib/bootstrap-table/bootstrap-table.min.js"></script>
  101. <script src="~/lib/bootstrap-table/locale/bootstrap-table-zh-cn.min.js"></script>
  102. <script src="~/lib/zTree.v3/js/jquery.ztree.core.min.js"></script>
  103. <script src="~/lib/ztree.v3/js/jquery.ztree.excheck.min.js"></script>
  104. <script src="~/js/admin/role.js"></script>
  105. }