Browse Source

账号设置-权限控制更新

ellisran 4 months ago
parent
commit
76bc4f0177
2 changed files with 14 additions and 1 deletions
  1. 1 0
      app/controller/sub_proj_setting_controller.js
  2. 13 1
      app/view/sp_setting/permission.ejs

+ 1 - 0
app/controller/sub_proj_setting_controller.js

@@ -296,6 +296,7 @@ module.exports = app => {
                 const renderData = {
                     ptype: ctx.query.ptype,
                     ptypeStr: relaBlock ? relaBlock.name : '',
+                    ptypeHint: relaBlock && relaBlock.hint ? relaBlock.hint : '',
                     accountGroup,
                     subProjectAccountList,
                     subProjectAllAccountList,

+ 13 - 1
app/view/sp_setting/permission.ejs

@@ -42,7 +42,19 @@
                             <div class="col-9">
                                 <div class="card mb-2">
                                     <div class="card-header d-flex justify-content-between">
-                                        <div><%- ptypeStr %></div>
+                                        <div>
+                                            <%- ptypeStr %>
+                                            <% if (ptypeHint) { %>
+                                                <div class="btn-group">
+                                                    <a href="javascript:void(0);" data-toggle="dropdown" title="权限说明" aria-expanded="false"><i class="fa fa-question-circle"></i></a>
+                                                    <div class="dropdown-menu bg-dark" style="will-change: transform;">
+                                                        <% for (const i of ptypeHint) { %>
+                                                            <div class="dropdown-item text-light bg-dark"><%- i %></div>
+                                                        <% } %>
+                                                    </div>
+                                                </div>
+                                            <% } %>
+                                        </div>
                                         <div class="ml-auto">
                                             <div class="form-check form-check-inline">
                                                 <span style="margin:0 .5rem 0 1rem; font-weight: bold;">筛选已授权</span>