@@ -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));
@@ -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 {