MaiXinRong 2 years ago
parent
commit
1f943d84d4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/service/stage.js

+ 2 - 2
app/service/stage.js

@@ -109,8 +109,6 @@ module.exports = app => {
             stage.auditHistory = await this.ctx.service.stageAudit.getAuditorHistory(stage.id, times);
             // 获取审批流程中左边列表
             if (stage.status === auditConst.stage.status.checkNo && stage.user_id !== this.ctx.session.sessionUser.accountId) {
-                stage.auditors2 = stage.userGroups;
-            } else {
                 const auditors = await this.ctx.service.stageAudit.getAuditors(stage.id, times); // 全部参与的审批人
                 const auditorGroups = this.ctx.helper.groupAuditors(auditors);
                 stage.auditors2 = this.ctx.helper.groupAuditorsUniq(auditorGroups);
@@ -118,6 +116,8 @@ module.exports = app => {
                     aid: stage.user.id, order: 0, times: stage.times - 1, audit_order: 0, audit_type: auditConst.auditType.key.common,
                     name: stage.user.name, role: stage.user.role, company: stage.user.company
                 }]);
+            } else {
+                stage.auditors2 = stage.userGroups;
             }
             if (stage.status === auditConst.stage.status.uncheck || stage.status === auditConst.stage.status.checkNo) {
                 stage.auditorList = await this.ctx.service.stageAudit.getAuditors(stage.id, stage.times);