| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 | <% include ./sub_menu.ejs %><div class="panel-content">    <div class="panel-title">        <div class="title-main">            <h2>账号管理                <% if (projectData.max_user !== accountData.length) { %>                <a href="#ver" data-toggle="modal" data-target="#add-user" class="btn btn-primary btn-sm pull-right">添加账号</a>                <% } else { %>                <a href="#add-unpass" data-toggle="modal" data-target="#add-unpass" class="btn btn-primary btn-sm pull-right">添加账号(受限)</a>                <% } %>            </h2>        </div>    </div>    <div class="content-wrap">        <div class="c-body">            <nav class="nav nav-tabs mb-3" role="tablist">                <a class="nav-item nav-link active" data-toggle="tab" href="#user-list" role="tab">账号列表</a>                <a class="nav-item nav-link" data-toggle="tab" href="#user-purview" role="tab">账号权限</a>            </nav>            <div class="tab-content">                <div id="user-list" class="tab-pane active">                    <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></tr>                        </thead>                        <tbody>                        <% for (const account of accountData) { %>                        <tr <% if (account.enable !== 1) { %> class="table-danger"<% } %>>                            <td><%= account.account %><% if (account.is_admin === 1) { %> <span data-toggle="tooltip" data-placement="bottom" title="" data-original-title="管理员"><i class="fa fa-user-circle-o"></i></span><% } %></td>                            <td><%= account.name %></td>                            <td><%= account.company %></td>                            <td><%= account.role %></td>                            <td><%= account.mobile %></td>                            <td><%= account.telephone %></td>                            <td class="text-center"><a href="#edit-user" data-account="<%= JSON.stringify(account) %>" data-toggle="modal" data-target="#edit-user" class="btn btn-sm btn-outline-primary">编辑</a>                                <% if (account.is_admin !== 1) { %>                                    <% if (account.enable !== 1) { %>                                        <a href="" class="btn btn-sm btn-outline-success account-switch-btn" data-account="<%= account.id %>">启用</a>                                    <% } else { %>                                        <a href="" class="btn btn-sm btn-outline-danger account-switch-btn" data-account="<%= account.id %>">停用</a>                                    <% } %>                                <% } %>                            </td>                        </tr>                        <% } %>                        </tbody>                    </table>                </div>                <div id="user-purview" class="tab-pane">                    <table class="table table-hover table-bordered table-sm">                        <thead>                        <tr>                            <th>账号</th>                            <th>姓名</th>                            <th>单位</th>                            <th>职位</th>                            <th>协作办公</th>                            <th>权限</th>                        </thead>                        <tbody>                        <% for (const account of accountData) { %>                        <tr>                            <td><%= account.account %><% if (account.is_admin === 1) { %> <span data-toggle="tooltip" data-placement="bottom" title="" data-original-title="管理员"><i class="fa fa-user-circle-o"></i></span><% } %></td>                            <td><%= account.name %></td>                            <td><%= account.company %></td>                            <td><%= account.role %></td>                            <td><% if (account.cooperation === 1) { %>启用<% } %></td>                            <td><% if (account.permission !== '' && account.permission !== null && JSON.parse(account.permission).tender !== undefined) { %>                                <% const tenderPermission = JSON.parse(account.permission).tender; %>                                    <% for (const tc in permission.tender.children) { %>                                        <% if (tenderPermission.indexOf(permission.tender.children[tc].value.toString()) !== -1) { %>                                            <%= permission.tender.children[tc].title %>                                        <% } %>                                    <% } %>                                <% } %>                                    <a href="#edit-user2" data-account="<%= JSON.stringify(account) %>" data-toggle="modal" data-target="#edit-user2" class="btn btn-sm">编辑</a></td>                        </tr>                        <% } %>                        </tbody>                    </table>                </div>            </div>        </div>    </div></div><script src="/public/js/setting.js"></script>
 |