浏览代码

计量台账,多人协作,需求调整

MaiXinRong 4 年之前
父节点
当前提交
1f983e4a1c
共有 2 个文件被更改,包括 15 次插入2 次删除
  1. 15 1
      app/public/js/path_tree.js
  2. 0 1
      app/service/stage_detail.js

+ 15 - 1
app/public/js/path_tree.js

@@ -1312,12 +1312,26 @@ const createNewPathTree = function (type, setting) {
             }
             setLocalCache(this.pwdCacheKey, cache.join('|'));
         }
+
+        _getPwdPosterity(node) {
+            const children = [];
+            for (const c of node.children) {
+                const cPwd = this.pwd.find(x => {return x.node && x.node.id === c.id});
+                if (!cPwd) children.push(c);
+            }
+            let posterity = [...children];
+            for (const c of children) {
+                posterity = posterity.concat(this._getPwdPosterity(c));
+            }
+            return posterity;
+        }
+
         lockNode(p, isLock) {
             const refresh = [];
             p.check = !isLock;
             p.node.lock = isLock;
             refresh.push(this.getNodeIndex(p.node));
-            const posterity = this.getPosterity(p.node);
+            const posterity = this._getPwdPosterity(p.node);
             for (const pn of posterity) {
                 pn.lock = isLock;
                 refresh.push(this.getNodeIndex(pn));

+ 0 - 1
app/service/stage_detail.js

@@ -8,7 +8,6 @@
  * @version
  */
 const timesLen = require('../const/audit').stage.timesLen;
-const editField = ['doc_code', 'bw', 'start_peg', 'end_peg', 'jldy', 'drawing_code', 'calc_memo', 'calc_img', 'calc_img_org', 'peg', 'xm', 'position', '']
 
 module.exports = app => {
     class StageDetail extends app.BaseService {