|
@@ -49,6 +49,7 @@ const valueCheck = {
|
|
|
}
|
|
|
},
|
|
|
_checkString(ctx, value, condition) {
|
|
|
+ if (!value) return false;
|
|
|
switch (condition.operate) {
|
|
|
case '=':
|
|
|
return value === condition.value;
|
|
@@ -65,15 +66,15 @@ const valueCheck = {
|
|
|
c.fun = this._typeFun[c.type];
|
|
|
}
|
|
|
},
|
|
|
- checkData(data, condition) {
|
|
|
+ checkData(ctx, data, condition) {
|
|
|
if (condition.length > 0) {
|
|
|
let con = condition[0];
|
|
|
- let result = this[con.fun](ctx, d[con.field], con);
|
|
|
+ let result = this[con.fun](ctx, data[con.field], con);
|
|
|
for (let i = 1, iLen = condition.length; i < iLen; i++) {
|
|
|
con = condition[i];
|
|
|
result = (con.rela && con.rela === 'or')
|
|
|
- ? (result || this[con.fun](ctx, d[con.field], con))
|
|
|
- : (result && this[con.fun](ctx, d[con.field], con));
|
|
|
+ ? (result || this[con.fun](ctx, data[con.field], con))
|
|
|
+ : (result && this[con.fun](ctx, data[con.field], con));
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
@@ -1695,7 +1696,7 @@ const treeFilter = {
|
|
|
},
|
|
|
_checkPath(matchPath, full_path) {
|
|
|
for (const mp of matchPath) {
|
|
|
- if (full_path.indexOf(mp) === 1) return true;
|
|
|
+ if (full_path.indexOf(mp) === 0) return true;
|
|
|
}
|
|
|
return false;
|
|
|
},
|