Browse Source

整合权限及复用

ellisran 1 week ago
parent
commit
92eda06fa8

+ 20 - 10
app/controller/quality_controller.js

@@ -149,13 +149,18 @@ module.exports = app => {
                 let uids;
                 let auditList = [];
                 const tenderPermissionKeys = ['quality', 'inspection', 'safe_inspection', 'safe_payment'];
+                const tPsKeys = {
+                    quality: ['quality', 'inspection'],
+                    safe: ['safe_inspection', 'safe_payment'],
+                };
                 switch (data.type) {
                     case 'add-audit':
-                        if (!data.key || !tenderPermissionKeys.includes(data.key)) throw '参数有误';
+                        if (!data.key || !tenderPermissionKeys.includes(data.key) || !Object.keys(tPsKeys).includes(data.key)) throw '参数有误';
                         // // 判断用户是单个还是数组
                         uids = data.id instanceof Array ? data.id : [data.id];
                         // // 判断该用户的组是否已加入到表中,已加入则提示无需添加
-                        auditList = await ctx.service.tenderPermission.getPartsPermission(tenderInfo.id, [data.key]);
+                        const insertKeys = data.together ? tPsKeys[data.key] : [data.key];
+                        auditList = await ctx.service.tenderPermission.getPartsPermission(tenderInfo.id, insertKeys);
                         const addAidList = ctx.helper._.difference(uids, ctx.helper._.map(auditList, 'uid'));
                         if (addAidList.length === 0) {
                             throw '用户已存在成员管理中,无需重复添加';
@@ -164,17 +169,20 @@ module.exports = app => {
                         const insert_members = [];
                         for (const account of accountList) {
                             const insert_member = { uid: account.id };
-                            insert_member[data.key] = ['1'];
+                            for (const key of insertKeys) {
+                                insert_member[key] = ['1'];
+                            }
                             insert_members.push(insert_member);
                         }
-                        await ctx.service.tenderPermission.saveOnePermission(tenderInfo.id, ctx.helper._.map(accountList, 'id'), insert_members, [data.key]);
-                        responseData.data = await ctx.service.tenderPermission.getPartsPermission(tenderInfo.id, [data.key]);
+                        await ctx.service.tenderPermission.saveOnePermission(tenderInfo.id, ctx.helper._.map(accountList, 'id'), insert_members, insertKeys);
+                        responseData.data = await ctx.service.tenderPermission.getPartsPermission(tenderInfo.id, insertKeys);
                         break;
                     case 'del-audit':
-                        if (!data.key || !tenderPermissionKeys.includes(data.key)) throw '参数有误';
+                        if (!data.key || !tenderPermissionKeys.includes(data.key) || !Object.keys(tPsKeys).includes(data.key)) throw '参数有误';
                         uids = data.id instanceof Array ? data.id : [data.id];
                         if (uids.length === 0) throw '没有选择要移除的用户';
-                        auditList = await ctx.service.tenderPermission.getPartsPermission(tenderInfo.id, [data.key]);
+                        const deleteKeys = data.together ? tPsKeys[data.key] : [data.key];
+                        auditList = await ctx.service.tenderPermission.getPartsPermission(tenderInfo.id, deleteKeys);
                         // 判断uids和auditList中是否有相同的uid
                         const commonUids = ctx.helper._.intersection(uids, ctx.helper._.map(auditList, 'uid'));
                         if (commonUids.length === 0) {
@@ -183,11 +191,13 @@ module.exports = app => {
                         const del_members = [];
                         for (const uid of uids) {
                             const del_member = { uid };
-                            del_member[data.key] = [];
+                            for (const key of deleteKeys) {
+                                del_member[key] = [];
+                            }
                             del_members.push(del_member);
                         }
-                        await ctx.service.tenderPermission.saveOnePermission(tenderInfo.id, uids, del_members, [data.key]);
-                        responseData.data = await ctx.service.tenderPermission.getPartsPermission(tenderInfo.id, [data.key]);
+                        await ctx.service.tenderPermission.saveOnePermission(tenderInfo.id, uids, del_members, deleteKeys);
+                        responseData.data = await ctx.service.tenderPermission.getPartsPermission(tenderInfo.id, deleteKeys);
                         break;
                     case 'save-permission':
                         if (!data.key || !tenderPermissionKeys.includes(data.key)) throw '参数有误';

+ 11 - 4
app/controller/sub_proj_setting_controller.js

@@ -623,7 +623,12 @@ module.exports = app => {
                 //     throw '标段不存在';
                 // }
                 // const tenderInfo = await ctx.service.tenderInfo.getTenderInfo(tender.id);
-                const permissionKey = ['quality', 'inspection', 'safe_inspection', 'safe_payment'];
+                // const permissionKey = ['quality', 'inspection', 'safe_inspection', 'safe_payment'];
+                const permissionKey = [];
+                const tPsKeys = {
+                    quality: ['quality', 'inspection'],
+                    safe: ['safe_inspection', 'safe_payment'],
+                };
                 switch (data.type) {
                     case 'msg':
                         if (!data.tid) {
@@ -651,9 +656,9 @@ module.exports = app => {
                         for (const key of permissionKey) {
                             responseData.data[`${key}AuditList`] = await ctx.service.tenderPermission.getPartsPermission(tender.id, [key]);
                         }
-                        // responseData.data.qualityAuditList = await ctx.service.tenderPermission.getPartsPermission(tender.id, ['quality']);
-                        // responseData.data.inspectionAuditList = await ctx.service.tenderPermission.getPartsPermission(tender.id, ['inspection']);
-                        // responseData.data.safe_inspectionAuditList = await ctx.service.tenderPermission.getPartsPermission(tender.id, ['safe_inspection']);
+                        for (const tpsKey in tPsKeys) {
+                            responseData.data[`${tpsKey}AuditList`] = await ctx.service.tenderPermission.getPartsPermission(tender.id, tPsKeys[tpsKey]);
+                        }
                         break;
                     case 'copy2otu':
                         if (data.userType === 'tourist') {
@@ -666,6 +671,8 @@ module.exports = app => {
                             await ctx.service.constructionAudit.setOtherTender(data.tidList, data.auditList);
                         } else if (permissionKey.includes(data.userType)) {
                             await ctx.service.tenderPermission.setOtherTender(data.tidList, data.auditList, [data.userType]);
+                        } else if (Object.keys(tPsKeys).includes(data.userType)) {
+                            await ctx.service.tenderPermission.setOtherTender(data.tidList, data.auditList, tPsKeys[data.userType]);
                         } else {
                             throw '参数有误';
                         }

+ 110 - 20
app/public/js/setting_manage.js

@@ -176,13 +176,16 @@ $(document).ready(() => {
         contract: '合同管理',
         construction: '施工日志',
         quality: '质量管理',
-        inspection: '质量巡检',
-        safe_payment: '安全计量',
-        safe_inspection: '安全巡检',
+        safe: '安全管理',
+    };
+    const tabTypeKeys = ['tourist', 'schedule', 'contract', 'construction', 'quality', 'safe'];
+    // 单个tenderpermission用这个
+    const tenderPermissionKeys = [];
+    // 多个tenderpermission融合用这个
+    const tPsKeys = {
+        quality: ['quality', 'inspection'],
+        safe: ['safe_inspection', 'safe_payment'],
     };
-    const tabTypeKeys = ['tourist', 'schedule', 'contract', 'construction', 'quality', 'inspection', 'safe_inspection', 'safe_payment'];
-    const tenderPermissionKeys = ['quality', 'inspection', 'safe_inspection', 'safe_payment'];
-
     const $filterTenderDone = $('body #filter-tender-done')
     if (window.location.search && window.location.search.split('done=')[1]) {
       $filterTenderDone.prop('checked', window.location.search.split('done=')[1] === '1' ? true : false);
@@ -221,6 +224,9 @@ $(document).ready(() => {
             for (const tpkey of tenderPermissionKeys) {
                 setTenderPermissionHtml(result[tpkey + 'AuditList'], tpkey);
             }
+            for (const tpk in tPsKeys) {
+                setTenderPermissionsHtml(result[tpk + 'AuditList'], tpk, tPsKeys[tpk]);
+            }
             resetAddUserHtml();
         });
     });
@@ -247,6 +253,8 @@ $(document).ready(() => {
                 $('#add_user_dropdownMenuButton').attr('data-type', 'construction');
             } else if (_.includes(tenderPermissionKeys, $(this).attr('href').substring(1))) {
                 $('#add_user_dropdownMenuButton').attr('data-type', $(this).attr('href').substring(1));
+            } else if (_.includes(Object.keys(tPsKeys), $(this).attr('href').substring(1))) {
+                $('#add_user_dropdownMenuButton').attr('data-type', $(this).attr('href').substring(1));
             }
         }
     });
@@ -350,6 +358,40 @@ $(document).ready(() => {
             });
         });
     }
+    for (const tPsKey in tPsKeys) {
+        $('body').on('click', `#${tPsKey}-users input[type="checkbox"]`, function () {
+            const uid = parseInt($(this).parents('tr').data('uid'));
+            const member = {
+                uid,
+            };
+            const key = $(this).data('key');
+            member[key] = [];
+            if ($(this).data('block') === 'view' && !$(this).is(':checked')) {
+                $(this).parents('tr').find(`input[data-key="${key}"]`).prop('checked', false);
+            } else {
+                let viewFlag = false;
+                $(this).parents('tr').find(`input[data-key="${key}"]`).each(function () {
+                    if ($(this).is(':checked')) {
+                        if ($(this).data('block') !== 'view') {
+                            member[key].push(1);
+                            $(this).parents('tr').find(`input[data-key="${key}"][data-block="view"]`).prop('checked', true);
+                            viewFlag = true;
+                        }
+                        member[key].push($(this).data('value'));
+                    }
+                });
+            }
+            const prop = {
+                type: 'save-permission',
+                uid,
+                members: [member],
+                key,
+            };
+            const _self = $(this);
+            postData('/sp/' + spid + '/quality/' + cur_tenderid + '/audit/save', prop, function (data) {
+            });
+        });
+    }
 
     for (const key of tabTypeKeys) {
         $('body').on('click', `#${key}-users .remove-${key}-user`, function () {
@@ -381,6 +423,11 @@ $(document).ready(() => {
                 $('#'+ type + '-users').find('tr[data-uid="'+ id +'"]').remove();
                 $('#remove-user').modal('hide');
             });
+        } else if (_.includes(Object.keys(tPsKeys), type)) {
+            postData('/sp/' + spid + '/quality/' + cur_tenderid + '/audit/save', { type: 'del-audit', id, key: type, together: 1 }, function (data) {
+                $('#'+ type + '-users').find('tr[data-uid="'+ id +'"]').remove();
+                $('#remove-user').modal('hide');
+            });
         } else {
             const prop = {
                 id: id,
@@ -606,6 +653,25 @@ $(document).ready(() => {
                 postData('/sp/' + spid + '/quality/' + cur_tenderid + '/audit/save', prop, function (datas) {
                     setTenderPermissionHtml(datas, type);
                 });
+            } else if (_.includes(Object.keys(tPsKeys), type)) {
+                const saIdList = [];
+                for (let i = 0; i < $('#' + type + '-users tr').length; i++) {
+                    saIdList.push(parseInt($('#' + type + '-users tr').eq(i).data('uid')));
+                }
+                if (_.includes(saIdList, id)) {
+                    toastr.error('该用户已存在列表中,无需重复添加');
+                    return;
+                }
+
+                const prop = {
+                    id: id,
+                    type: 'add-audit',
+                    key: type,
+                    together: 1,
+                };
+                postData('/sp/' + spid + '/quality/' + cur_tenderid + '/audit/save', prop, function (datas) {
+                    setTenderPermissionsHtml(datas, type, tPsKeys[type]);
+                });
             }
         }
     });
@@ -755,25 +821,24 @@ $(document).ready(() => {
             } else if (userType === 'construction') {
                 userData.is_report = $('#construction-users tr').eq(i).find('input[type="checkbox"]').eq(0).is(':checked') ? 1 : 0;
             } else if (_.includes(tenderPermissionKeys, userType)) {
-                userData.member = [1];
+                userData.member = {};
+                userData.member[userType] = [1];
                 $('#'+ userType +'-users tr').eq(i).find('input[type="checkbox"]').each(function () {
                     if ($(this).is(':checked')) {
-                        userData.member.push(parseInt($(this).attr('data-block')));
+                        userData.member[userType].push(parseInt($(this).attr('data-value')));
                     }
                 });
+            } else if (_.includes(Object.keys(tPsKeys), userType)) {
+                userData.member = {};
+                for (const key of tPsKeys[userType]) {
+                    userData.member[key] = [];
+                    $('#'+ userType +'-users tr').eq(i).find('input[data-key="' + key + '"]').each(function () {
+                        if ($(this).is(':checked')) {
+                            userData.member[key].push(parseInt($(this).attr('data-value')));
+                        }
+                    });
+                }
             }
-            // else if (userType === 'quality') {
-            //     userData.member = [1];
-            //     if ($('#quality-users tr').eq(i).find('input[data-block="upload"]').eq(0).is(':checked')) userData.member.push(2);
-            //     if ($('#quality-users tr').eq(i).find('input[data-block="add"]').eq(0).is(':checked')) userData.member.push(3);
-            // } else if (userType === 'inspection') {
-            //     userData.member = [1];
-            //     if ($('#inspection-users tr').eq(i).find('input[data-block="add"]').eq(0).is(':checked')) userData.member.push(2);
-            // } else if (userType === 'safe_inspection') {
-            //     userData.member = [1];
-            //     if ($('#safe_inspection-users tr').eq(i).find('input[data-block="add"]').eq(0).is(':checked')) userData.member.push(2);
-            //     if ($('#safe_inspection-users tr').eq(i).find('input[data-block="view_all"]').eq(0).is(':checked')) userData.member.push(3);
-            // }
             saIdList.push(userData);
         }
         data.auditList = saIdList;
@@ -1110,6 +1175,31 @@ function setConstructionHtml(constructionAuditList) {
     $('#construction-users').html(html);
 }
 
+function setTenderPermissionsHtml(auditList, key, keys) {
+    const html = [];
+    for (const m of auditList) {
+        html.push(getUserPermissionsHtml(m, key, keys));
+    }
+    $('#' + key + '-users').html(html.join(''));
+}
+
+const getUserPermissionsHtml = function(user, key, keys) {
+    const html = [];
+    html.push(`<tr data-uid="${user.uid}" data-id="${user.id}">`);
+    html.push(`<td>${user.name}</td>`, `<td>${user.role}</td>`);
+    const block = _.find(permissionBlock, { key: key });
+    for (const block of permissionBlock) {
+        if (keys.indexOf(block.key) < 0) continue;
+        for (const p of block.permission) {
+            const checked = user[block.key] ? (user[block.key].indexOf(p.value) >= 0 ? 'checked' : '') : '';
+            html.push(`<td class="text-center"><input type="checkbox" data-key="${block.key}" data-block="${p.key}" data-value="${p.value}" ${checked}></td>`);
+        }
+    }
+    html.push(`<td class="text-center"><a href="#remove-user1" data-id="${user.uid}" data-toggle="modal" data-target="#remove-user" class="btn btn-sm btn-outline-danger remove-${key}-user">移除</a></td>`);
+    html.push('</tr>');
+    return html.join('');
+};
+
 function setTenderPermissionHtml(auditList, key) {
     const html = [];
     for (const m of auditList) {

+ 3 - 3
app/service/tender_permission.js

@@ -227,20 +227,20 @@ module.exports = app => {
                 const oldTouristList = await this.getAllDataByCondition({ where: { tid: tidList.split(',') } });
                 const insertData = [];
                 const updateData = [];
-                for (const user of userList) {
+                for (const user of userList.reverse()) {
                     for (const t of tenderList) {
                         const updateInfo = this._.find(oldTouristList, { tid: t.id, uid: user.uid });
                         // if (delId) deleteIdData.push(delId.id);
                         if (updateInfo) {
                             const um = { id: updateInfo.id };
                             for (const p of permissionBlock) {
-                                um[p] = user.member.join(',');
+                                um[p] = user.member[p].join(',');
                             }
                             updateData.push(um);
                         } else if (user.uid !== t.user_id) {
                             const um = { id: this.uuid.v4(), pid: this.ctx.session.sessionProject.id, spid: this.ctx.subProject.id, tid: t.id, uid: user.uid };
                             for (const p of permissionBlock) {
-                                um[p] = user.member.join(',');
+                                um[p] = user.member[p].join(',');
                             }
                             insertData.push(um);
                         }

+ 122 - 62
app/view/sp_setting/manage.ejs

@@ -29,9 +29,11 @@
                     <a class="nav-item nav-link" data-toggle="tab" href="#htgl" role="tab">标段合同</a>
                     <a class="nav-item nav-link" data-toggle="tab" href="#sgrz" role="tab">施工日志</a>
                     <a class="nav-item nav-link" data-toggle="tab" href="#quality" role="tab">质量管理</a>
-                    <a class="nav-item nav-link" data-toggle="tab" href="#inspection" role="tab">质量巡检</a>
-                    <a class="nav-item nav-link" data-toggle="tab" href="#safe_payment" role="tab">安全计量</a>
-                    <a class="nav-item nav-link" data-toggle="tab" href="#safe_inspection" role="tab">安全巡检</a>
+                    <a class="nav-item nav-link" data-toggle="tab" href="#safe" role="tab">安全管理</a>
+<!--                    <a class="nav-item nav-link" data-toggle="tab" href="#quality" role="tab">质量管理</a>-->
+<!--                    <a class="nav-item nav-link" data-toggle="tab" href="#inspection" role="tab">质量巡检</a>-->
+<!--                    <a class="nav-item nav-link" data-toggle="tab" href="#safe_payment" role="tab">安全计量</a>-->
+<!--                    <a class="nav-item nav-link" data-toggle="tab" href="#safe_inspection" role="tab">安全巡检</a>-->
 <!--                    <a class="nav-item nav-link" data-toggle="tab" href="#subadmin" role="tab">标段管理员</a>-->
                     <div class="ml-auto" id="user-set" style="display: none">
                         <div class="row">
@@ -237,14 +239,20 @@
                                 <tr>
                                     <th class="align-middle" rowspan="2">成员名称</th>
                                     <th class="align-middle" rowspan="2">角色/职位</th>
-                                    <% const pb = permissionBlock.find(item => item.key === 'quality'); %>
-                                    <th colspan="<%- pb.permission.filter(x => { return !x.isDefault; }).length %>"><%- pb.name %></th>
+                                    <% for (const pb of permissionBlock) { %>
+                                        <% if (pb.key === 'quality' || pb.key === 'inspection') { %>
+                                            <th colspan="<%- pb.permission.length %>"><%- pb.name %></th>
+                                        <% } %>
+                                    <% } %>
                                     <th class="align-middle" rowspan="2">操作</th>
                                 </tr>
                                 <tr>
-                                    <% for (const p of pb.permission) { %>
-                                        <% if (p.isDefault) continue; %>
-                                        <th><%- p.title %></th>
+                                    <% for (const pb of permissionBlock) { %>
+                                        <% if (pb.key === 'quality' || pb.key === 'inspection') { %>
+                                            <% for (const p of pb.permission) { %>
+                                                <th><%- p.title %></th>
+                                            <% } %>
+                                        <% } %>
                                     <% } %>
                                 </tr>
                                 </thead>
@@ -253,78 +261,130 @@
                             </table>
                         </div>
                     </div>
-                    <!--质量巡检 -->
-                    <div id="inspection" class="tab-pane">
+                    <div id="safe" class="tab-pane">
                         <div class="col-8" style="max-width: 800px">
                             <table class="table table-hover table-bordered table-sm">
                                 <thead class="text-center">
                                 <tr>
                                     <th class="align-middle" rowspan="2">成员名称</th>
                                     <th class="align-middle" rowspan="2">角色/职位</th>
-                                    <% const inspectionPb = permissionBlock.find(item => item.key === 'inspection'); %>
-                                    <th colspan="<%- inspectionPb.permission.filter(x => { return !x.isDefault; }).length %>"><%- inspectionPb.name %></th>
-                                    <th class="align-middle" rowspan="2">操作</th>
-                                </tr>
-                                <tr>
-                                    <% for (const p of inspectionPb.permission) { %>
-                                        <% if (p.isDefault) continue; %>
-                                        <th><%- p.title %></th>
+                                    <% for (const pb of permissionBlock) { %>
+                                        <% if (pb.key === 'safe_payment' || pb.key === 'safe_inspection') { %>
+                                            <th colspan="<%- pb.permission.length %>"><%- pb.name %></th>
+                                        <% } %>
                                     <% } %>
-                                </tr>
-                                </thead>
-                                <tbody id="inspection-users">
-                                </tbody>
-                            </table>
-                        </div>
-                    </div>
-                    <!--质量巡检 -->
-                    <div id="safe_payment" class="tab-pane">
-                        <div class="col-8" style="max-width: 800px">
-                            <table class="table table-hover table-bordered table-sm">
-                                <thead class="text-center">
-                                <tr>
-                                    <th class="align-middle" rowspan="2">成员名称</th>
-                                    <th class="align-middle" rowspan="2">角色/职位</th>
-                                    <% const safePaymentPb = permissionBlock.find(item => item.key === 'safe_payment'); %>
-                                    <th colspan="<%- safePaymentPb.permission.filter(x => { return !x.isDefault; }).length %>"><%- safePaymentPb.name %></th>
                                     <th class="align-middle" rowspan="2">操作</th>
                                 </tr>
                                 <tr>
-                                    <% for (const p of safePaymentPb.permission) { %>
-                                        <% if (p.isDefault) continue; %>
-                                        <th><%- p.title %></th>
+                                    <% for (const pb of permissionBlock) { %>
+                                        <% if (pb.key === 'safe_payment' || pb.key === 'safe_inspection') { %>
+                                            <% for (const p of pb.permission) { %>
+                                                <th><%- p.title %></th>
+                                            <% } %>
+                                        <% } %>
                                     <% } %>
                                 </tr>
                                 </thead>
-                                <tbody id="safe_payment-users">
+                                <tbody id="safe-users">
                                 </tbody>
                             </table>
                         </div>
                     </div>
+<!--                    <div id="quality" class="tab-pane">-->
+<!--                        <div class="col-8" style="max-width: 800px">-->
+<!--                            <table class="table table-hover table-bordered table-sm">-->
+<!--                                <thead class="text-center">-->
+<!--                                <tr>-->
+<!--                                    <th class="align-middle" rowspan="2">成员名称</th>-->
+<!--                                    <th class="align-middle" rowspan="2">角色/职位</th>-->
+<!--                                    <% const pb = permissionBlock.find(item => item.key === 'quality'); %>-->
+<!--                                    <th colspan="<%- pb.permission.filter(x => { return !x.isDefault; }).length %>"><%- pb.name %></th>-->
+<!--                                    <th class="align-middle" rowspan="2">操作</th>-->
+<!--                                </tr>-->
+<!--                                <tr>-->
+<!--                                    <% for (const p of pb.permission) { %>-->
+<!--                                        <% if (p.isDefault) continue; %>-->
+<!--                                        <th><%- p.title %></th>-->
+<!--                                    <% } %>-->
+<!--                                </tr>-->
+<!--                                </thead>-->
+<!--                                <tbody id="quality-users">-->
+<!--                                </tbody>-->
+<!--                            </table>-->
+<!--                        </div>-->
+<!--                    </div>-->
+                    <!--质量巡检 -->
+<!--                    <div id="inspection" class="tab-pane">-->
+<!--                        <div class="col-8" style="max-width: 800px">-->
+<!--                            <table class="table table-hover table-bordered table-sm">-->
+<!--                                <thead class="text-center">-->
+<!--                                <tr>-->
+<!--                                    <th class="align-middle" rowspan="2">成员名称</th>-->
+<!--                                    <th class="align-middle" rowspan="2">角色/职位</th>-->
+<!--                                    <% const inspectionPb = permissionBlock.find(item => item.key === 'inspection'); %>-->
+<!--                                    <th colspan="<%- inspectionPb.permission.filter(x => { return !x.isDefault; }).length %>"><%- inspectionPb.name %></th>-->
+<!--                                    <th class="align-middle" rowspan="2">操作</th>-->
+<!--                                </tr>-->
+<!--                                <tr>-->
+<!--                                    <% for (const p of inspectionPb.permission) { %>-->
+<!--                                        <% if (p.isDefault) continue; %>-->
+<!--                                        <th><%- p.title %></th>-->
+<!--                                    <% } %>-->
+<!--                                </tr>-->
+<!--                                </thead>-->
+<!--                                <tbody id="inspection-users">-->
+<!--                                </tbody>-->
+<!--                            </table>-->
+<!--                        </div>-->
+<!--                    </div>-->
+                    <!--质量巡检 -->
+<!--                    <div id="safe_payment" class="tab-pane">-->
+<!--                        <div class="col-8" style="max-width: 800px">-->
+<!--                            <table class="table table-hover table-bordered table-sm">-->
+<!--                                <thead class="text-center">-->
+<!--                                <tr>-->
+<!--                                    <th class="align-middle" rowspan="2">成员名称</th>-->
+<!--                                    <th class="align-middle" rowspan="2">角色/职位</th>-->
+<!--                                    <% const safePaymentPb = permissionBlock.find(item => item.key === 'safe_payment'); %>-->
+<!--                                    <th colspan="<%- safePaymentPb.permission.filter(x => { return !x.isDefault; }).length %>"><%- safePaymentPb.name %></th>-->
+<!--                                    <th class="align-middle" rowspan="2">操作</th>-->
+<!--                                </tr>-->
+<!--                                <tr>-->
+<!--                                    <% for (const p of safePaymentPb.permission) { %>-->
+<!--                                        <% if (p.isDefault) continue; %>-->
+<!--                                        <th><%- p.title %></th>-->
+<!--                                    <% } %>-->
+<!--                                </tr>-->
+<!--                                </thead>-->
+<!--                                <tbody id="safe_payment-users">-->
+<!--                                </tbody>-->
+<!--                            </table>-->
+<!--                        </div>-->
+<!--                    </div>-->
                     <!--安全巡检 -->
-                    <div id="safe_inspection" class="tab-pane">
-                        <div class="col-8" style="max-width: 800px">
-                            <table class="table table-hover table-bordered table-sm">
-                                <thead class="text-center">
-                                <tr>
-                                    <th class="align-middle" rowspan="2">成员名称</th>
-                                    <th class="align-middle" rowspan="2">角色/职位</th>
-                                    <% const safeInspectionPb = permissionBlock.find(item => item.key === 'safe_inspection'); %>
-                                    <th colspan="<%- safeInspectionPb.permission.filter(x => { return !x.isDefault; }).length %>"><%- safeInspectionPb.name %></th>
-                                    <th class="align-middle" rowspan="2">操作</th>
-                                </tr>
-                                <tr>
-                                    <% for (const p of safeInspectionPb.permission) { %>
-                                        <% if (p.isDefault) continue; %>
-                                        <th><%- p.title %></th>
-                                    <% } %>
-                                </tr>
-                                </thead>
-                                <tbody id="safe_inspection-users">
-                                </tbody>
-                            </table>
-                        </div>
-                    </div>
+<!--                    <div id="safe_inspection" class="tab-pane">-->
+<!--                        <div class="col-8" style="max-width: 800px">-->
+<!--                            <table class="table table-hover table-bordered table-sm">-->
+<!--                                <thead class="text-center">-->
+<!--                                <tr>-->
+<!--                                    <th class="align-middle" rowspan="2">成员名称</th>-->
+<!--                                    <th class="align-middle" rowspan="2">角色/职位</th>-->
+<!--                                    <% const safeInspectionPb = permissionBlock.find(item => item.key === 'safe_inspection'); %>-->
+<!--                                    <th colspan="<%- safeInspectionPb.permission.filter(x => { return !x.isDefault; }).length %>"><%- safeInspectionPb.name %></th>-->
+<!--                                    <th class="align-middle" rowspan="2">操作</th>-->
+<!--                                </tr>-->
+<!--                                <tr>-->
+<!--                                    <% for (const p of safeInspectionPb.permission) { %>-->
+<!--                                        <% if (p.isDefault) continue; %>-->
+<!--                                        <th><%- p.title %></th>-->
+<!--                                    <% } %>-->
+<!--                                </tr>-->
+<!--                                </thead>-->
+<!--                                <tbody id="safe_inspection-users">-->
+<!--                                </tbody>-->
+<!--                            </table>-->
+<!--                        </div>-->
+<!--                    </div>-->
                     <!--标段管理员 -->
                     <div id="subadmin" class="tab-pane">
                         <div class="col-6">