user_modal.ejs 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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 class="mt-3">
  35. <label class="form-text alert alert-danger">整行灰底显示的账号,说明参建单位不存在该账号的单位名称,请前往“平台设置-账号设置-参建单位”完善。</label>
  36. </div>
  37. </div>
  38. <div class="modal-footer">
  39. <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">关闭</button>
  40. <button type="button" class="btn btn-sm btn-sm btn-primary" id="sel-batch-ok">确定</button>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="modal fade" id="permission" data-backdrop="static" style="display: none;" aria-hidden="true">
  46. <div class="modal-dialog modal-xl" role="document">
  47. <div class="modal-content">
  48. <div class="modal-header">
  49. <h5 class="modal-title">编辑权限</h5>
  50. </div>
  51. <div class="modal-body" style="max-height: 800px;overflow: auto;">
  52. <% for (const pb of permissionBlock) { %>
  53. <div class="card mb-2">
  54. <h6 class="card-header">
  55. <%- pb.name %>
  56. <% if (pb.hint) { %>
  57. <div class="btn-group">
  58. <a href="javascript:void(0);" data-toggle="dropdown" title="权限说明" aria-expanded="false"><i class="fa fa-question-circle"></i></a>
  59. <div class="dropdown-menu bg-dark" style="will-change: transform;">
  60. <% for (const i of pb.hint) { %>
  61. <div class="dropdown-item text-light bg-dark"><%- i %></div>
  62. <% } %>
  63. </div>
  64. </div>
  65. <% } %>
  66. </h6>
  67. <div class="card-body permission-parent">
  68. <% if (pb.children) { %>
  69. <% for (const [i, c] of pb.children.entries()) { %>
  70. <% if (i !== 0) { %><hr/><% } %>
  71. <div class="d-flex">
  72. <div class="vertical-align ml-3" style="width:100px"><%- c.name %></div>
  73. <div class="container ml-0">
  74. <div class="row">
  75. <% for (const cp of c.permission) { %>
  76. <div class="col-md-3">
  77. <div class="form-check">
  78. <input class="form-check-input" type="checkbox" name="permission-check" id="icb-<%- c.key %>-<%- cp.value %>" ptype="<%- c.key %>" pvalue="<%- cp.value %>">
  79. <label class="form-check-label" for="icb-<%- c.key %>-<%- cp.value %>"><%- cp.title %></label>
  80. </div>
  81. </div>
  82. <% } %>
  83. </div>
  84. </div>
  85. </div>
  86. <% } %>
  87. <% } else { %>
  88. <div class="d-flex">
  89. <div class="vertical-align ml-3" style="width:100px"><%- pb.name %></div>
  90. <div class="container ml-0">
  91. <div class="row">
  92. <% for (const p of pb.permission) { %>
  93. <div class="col-md-3">
  94. <div class="form-check">
  95. <input class="form-check-input" type="checkbox" name="permission-check" id="icb-<%- pb.key %>-<%- p.value %>" ptype="<%- pb.key %>" pvalue="<%- p.value %>">
  96. <label class="form-check-label" for="icb-<%- pb.key %>-<%- p.value %>"><%- p.title %></label>
  97. </div>
  98. </div>
  99. <% } %>
  100. </div>
  101. </div>
  102. </div>
  103. <% } %>
  104. </div>
  105. </div>
  106. <% } %>
  107. </div>
  108. <div class="modal-footer">
  109. <input type="hidden" id="permission-uid">
  110. <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">关闭</button>
  111. <button type="button" class="btn btn-sm btn-primary" id="permission-ok">提交修改</button>
  112. </div>
  113. </div>
  114. </div>
  115. </div>