浏览代码

调整项目列表列宽

MaiXinRong 3 月之前
父节点
当前提交
96e77f9c0a
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      app/public/js/sub_project.js
  2. 1 1
      app/view/sub_proj/index.ejs

+ 2 - 2
app/public/js/sub_project.js

@@ -58,8 +58,8 @@ $(document).ready(function() {
                     }
                 }
                 // 操作
-                html.push(`<td>`);
                 if (canEdit) {
+                html.push(`<td>`);
                     html.push('<button class="btn btn-outline-primary btn-sm ml-1" name="edit">编辑</button>');
                     html.push('<button class="btn btn-outline-primary btn-sm ml-1" name="up"><i class="fa fa-arrow-up"></i></button>');
                     html.push('<button class="btn btn-outline-primary btn-sm ml-1" name="down"><i class="fa fa-arrow-down"></i></button>');
@@ -76,8 +76,8 @@ $(document).ready(function() {
                             html.push('<button class="btn btn-outline-danger btn-sm ml-1" name="del">删除</button>');
                         }
                     }
-                }
                 html.push('</td>');
+                }
                 return html.join('');
             },
             getNodeTrHtml: function (node, tree) {

+ 1 - 1
app/view/sub_proj/index.ejs

@@ -21,7 +21,7 @@
                 </div>
                 <% } else { %>
                 <table class="table table-bordered">
-                    <tr class="text-center"><th style="min-width: 200px">项目名称</th><th>概预算标准</th><th>创建时间</th><th>标段个数</th><th>管理单位</th><th>操作</th></tr>
+                    <tr class="text-center"><th style="min-width: 300px">项目名称</th><th width="8%">概预算标准</th><th width="8%">创建时间</th><th width="5%">标段个数</th><th width="20%">管理单位</th><% if (ctx.session.sessionUser.is_admin) { %><th width="20%">操作</th><% } %></tr>
                     <tbody id="projectList">
                     </tbody>
                 </table>