user_modal.ejs 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <div class="modal fade" id="sel-batch" data-backdrop="static">
  2. <div class="modal-dialog modal-lg" role="document">
  3. <div class="modal-content">
  4. <div class="modal-header">
  5. <h5 class="modal-title">选择账号</h5>
  6. </div>
  7. <div class="modal-body">
  8. <div class="d-flex justify-content-between mb-2">
  9. <div class="col">
  10. <div class="form-inline">
  11. <label for="inputPassword2" class="">单位:</label>
  12. <select class="form-control form-control-sm" style="width:300px" id="sel-batch-unit">
  13. <% for (const g of accountGroup) { %>
  14. <option value="<%- g.name %>"><%- g.name %></option>
  15. <% } %>
  16. </select>
  17. </div>
  18. </div>
  19. <div class="col-5">
  20. <div class="input-group input-group-sm">
  21. <input type="text" class="form-control" placeholder="姓名/职位 搜索" aria-label="姓名/职位 搜索" id="sb-keyword" aria-describedby="sb-search">
  22. <div class="input-group-append">
  23. <button class="btn btn-outline-primary" type="button" id="sb-search"><i class="fa fa-search"></i></button>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. <div class="modal-height-500 scroll-y">
  29. <table class="table table-bordered">
  30. <thead><tr class="text-center"><th width="15%"><input type="checkbox" id="sel-batch-all"></th><th width="20%">用户</th><th width="30%">职位</th><th>单位</th></tr></thead>
  31. <tbody id="sel-batch-users"></tbody>
  32. </table>
  33. </div>
  34. </div>
  35. <div class="modal-footer">
  36. <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">关闭</button>
  37. <button type="button" class="btn btn-sm btn-sm btn-primary" id="sel-batch-ok">确定</button>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="modal fade" id="permission" data-backdrop="static" style="display: none;" aria-hidden="true">
  43. <div class="modal-dialog modal-xl" role="document">
  44. <div class="modal-content">
  45. <div class="modal-header">
  46. <h5 class="modal-title">编辑权限</h5>
  47. </div>
  48. <div class="modal-body" style="max-height: 800px;overflow: auto;">
  49. <% for (const pb of permissionBlock) { %>
  50. <div class="card mb-2">
  51. <h6 class="card-header">
  52. <%- pb.name %>
  53. <% if (pb.hint) { %>
  54. <div class="btn-group">
  55. <a href="javascript:void(0);" data-toggle="dropdown" title="权限说明" aria-expanded="false"><i class="fa fa-question-circle"></i></a>
  56. <div class="dropdown-menu bg-dark" style="will-change: transform;">
  57. <% for (const i of pb.hint) { %>
  58. <div class="dropdown-item text-light bg-dark"><%- i %></div>
  59. <% } %>
  60. </div>
  61. </div>
  62. <% } %>
  63. </h6>
  64. <div class="card-body permission-parent">
  65. <% if (pb.children) { %>
  66. <% for (const [i, c] of pb.children.entries()) { %>
  67. <% if (i !== 0) { %><hr/><% } %>
  68. <div class="d-flex">
  69. <div class="vertical-align ml-3" style="width:100px"><%- c.name %></div>
  70. <div class="container ml-0">
  71. <div class="row">
  72. <% for (const cp of c.permission) { %>
  73. <div class="col-md-3">
  74. <div class="form-check">
  75. <input class="form-check-input" type="checkbox" name="permission-check" id="icb-<%- c.key %>-<%- cp.value %>" ptype="<%- c.key %>" pvalue="<%- cp.value %>">
  76. <label class="form-check-label" for="icb-<%- c.key %>-<%- cp.value %>"><%- cp.title %></label>
  77. </div>
  78. </div>
  79. <% } %>
  80. </div>
  81. </div>
  82. </div>
  83. <% } %>
  84. <% } else { %>
  85. <div class="d-flex">
  86. <div class="vertical-align ml-3" style="width:100px"><%- pb.name %></div>
  87. <div class="container ml-0">
  88. <div class="row">
  89. <% for (const p of pb.permission) { %>
  90. <div class="col-md-3">
  91. <div class="form-check">
  92. <input class="form-check-input" type="checkbox" name="permission-check" id="icb-<%- pb.key %>-<%- p.value %>" ptype="<%- pb.key %>" pvalue="<%- p.value %>">
  93. <label class="form-check-label" for="icb-<%- pb.key %>-<%- p.value %>"><%- p.title %></label>
  94. </div>
  95. </div>
  96. <% } %>
  97. </div>
  98. </div>
  99. </div>
  100. <% } %>
  101. </div>
  102. </div>
  103. <% } %>
  104. </div>
  105. <div class="modal-footer">
  106. <input type="hidden" id="permission-uid">
  107. <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">关闭</button>
  108. <button type="button" class="btn btn-sm btn-primary" id="permission-ok">提交修改</button>
  109. </div>
  110. </div>
  111. </div>
  112. </div>