فهرست منبع

addDebugInfo,注释

MaiXinRong 5 سال پیش
والد
کامیت
e41ebca3b8
2فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 7 0
      app/extend/helper.js
  2. 2 0
      app/service/stage.js

+ 7 - 0
app/extend/helper.js

@@ -904,6 +904,13 @@ module.exports = {
         }
     },
 
+    /**
+     * 添加debug信息
+     * 在debug模式下,debug信息将传输到浏览器并打印
+     *
+     * @param {String}key
+     * @param {*}data
+     */
     addDebugInfo(key, data) {
         if (!this.ctx.debugInfo) {
             this.ctx.debugInfo = {};

+ 2 - 0
app/service/stage.js

@@ -64,10 +64,12 @@ module.exports = app => {
                     } else {
                         stage.curOrder = accountId === stage.curAuditor.aid ? stage.curAuditor.order : stage.curAuditor.order - 1;
                     }
+                    stage.readOnly = (stage.status !== status.checking && stage.status !== status.checkNoPre) || accountId !== stage.curAuditor.aid;
                 } else if (shareIds.indexOf(accountId) !== -1) { // 分享人
                     if (stage.status === status.uncheck) {
                         throw '您无权查看该数据';
                     }
+                    stage.readOnly = true;
                     stage.curTimes = stage.status === status.checkNo ? stage.times - 1 : stage.times;
                     stage.curOrder = stage.status === status.checked ? this._.max(this._.map(stage.auditors, 'order')) : stage.curAuditor.order - 1;
                 }