|
@@ -1312,12 +1312,26 @@ const createNewPathTree = function (type, setting) {
|
|
}
|
|
}
|
|
setLocalCache(this.pwdCacheKey, cache.join('|'));
|
|
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) {
|
|
lockNode(p, isLock) {
|
|
const refresh = [];
|
|
const refresh = [];
|
|
p.check = !isLock;
|
|
p.check = !isLock;
|
|
p.node.lock = isLock;
|
|
p.node.lock = isLock;
|
|
refresh.push(this.getNodeIndex(p.node));
|
|
refresh.push(this.getNodeIndex(p.node));
|
|
- const posterity = this.getPosterity(p.node);
|
|
|
|
|
|
+ const posterity = this._getPwdPosterity(p.node);
|
|
for (const pn of posterity) {
|
|
for (const pn of posterity) {
|
|
pn.lock = isLock;
|
|
pn.lock = isLock;
|
|
refresh.push(this.getNodeIndex(pn));
|
|
refresh.push(this.getNodeIndex(pn));
|