Browse Source

关联数据权限控制

ellisran 10 months ago
parent
commit
8e346b7627

+ 3 - 0
app/controller/change_controller.js

@@ -561,6 +561,9 @@ module.exports = app => {
          */
         async relation(ctx) {
             try {
+                if (!ctx.session.sessionProject.page_show.openChangePlan) {
+                    throw '该功能已关闭';
+                }
                 // await this._getChangeAuditViewData(ctx);
                 const tender = ctx.tender;
                 const change = ctx.change;

+ 2 - 0
app/view/change/information.ejs

@@ -9,7 +9,9 @@
                         <div class="btn-group btn-group-toggle group-tab">
                             <a class="btn btn-sm btn-light active" href="javascript:void(0);">变更详情</a>
                             <a class="btn btn-sm btn-light" href="/tender/<%- ctx.tender.id %>/change/<%- ctx.change.cid %>/report">输出报表</a>
+                            <% if (ctx.session.sessionProject.page_show.openChangePlan) { %>
                             <a class="btn btn-sm btn-light" href="/tender/<%- ctx.tender.id %>/change/<%- ctx.change.cid %>/relation">关联数据</a>
+                            <% } %>
                         </div>
                     </div>
                 </div>

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

@@ -95,7 +95,7 @@
                     <a class="btn btn-sm btn-light" href="/tender/<%- tender_id %>/change/apply/<%- bizId %>/information">申请详情</a>
                     <% } %>
                     <a class="btn btn-sm btn-light active" href="javascript:void(0);">输出报表</a>
-                    <% if ([-300].includes(stg_id)) { %>
+                    <% if (ctx.session.sessionProject.page_show.openChangePlan && [-300].includes(stg_id)) { %>
                     <a class="btn btn-sm btn-light" href="/tender/<%- tender_id %>/change/<%- bizId %>/relation">关联数据</a>
                     <% } %>
                 </div>