Browse Source

添加账号单位默认

ellisran 1 year ago
parent
commit
99ae657bee
2 changed files with 10 additions and 8 deletions
  1. 7 7
      app/view/setting/user_permission.ejs
  2. 3 1
      app/view/setting/user_permission_modal.ejs

+ 7 - 7
app/view/setting/user_permission.ejs

@@ -44,12 +44,12 @@
                                 <table class="table table-hover table-bordered table-sm">
                                     <thead>
                                     <tr>
-                                        <th>账号</th>
-                                        <th>姓名</th>
-                                        <th>单位</th>
-                                        <th>职位</th>
-                                        <th>协作办公</th>
-                                        <th>权限</th>
+                                        <th class="text-center">账号</th>
+                                        <th class="text-center">姓名</th>
+                                        <th class="text-center">单位</th>
+                                        <th class="text-center">职位</th>
+                                        <th class="text-center">协作办公</th>
+                                        <th class="text-center">权限</th>
                                     </thead>
                                     <tbody>
                                     <% for (const account of accountData) { %>
@@ -59,7 +59,7 @@
                                             <td><%= account.company %></td>
                                             <td><%= account.role %></td>
                                             <td><% if (account.cooperation === 1) { %>启用<% } %></td>
-                                            <td>
+                                            <td class="text-center">
                                                 <% if (account.permission !== '' && account.permission !== null) { %>
                                                     <% const accountPermission = JSON.parse(account.permission); %>
                                                     <% for(const ap in accountPermission) { %>

+ 3 - 1
app/view/setting/user_permission_modal.ejs

@@ -41,7 +41,9 @@
                     <label>单位名称<b class="text-danger">*</b></label>
                     <input value="7" name="account_group" type="hidden">
                     <select class="form-control form-control-sm" name="company">
-                        <option>请选择</option>
+                        <% if (unitList.length === 0) { %>
+                            <option>请选择</option>
+                        <% } %>
                         <% for (const u of unitList) { %>
                             <option><%- u.name %></option>
                         <% } %>