فهرست منبع

数据预处理,数据过滤调整

MaiXinRong 1 سال پیش
والد
کامیت
5a0a406bdc
1فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 6 1
      app/lib/rpt_data_analysis.js

+ 6 - 1
app/lib/rpt_data_analysis.js

@@ -45,11 +45,12 @@ const valueCheck = {
                 return !ctx.helper._.isNil(value) ? value >= condition.value : false;
                 return !ctx.helper._.isNil(value) ? value >= condition.value : false;
             case '<=':
             case '<=':
                 return !ctx.helper._.isNil(value) ? value <= condition.value : false;
                 return !ctx.helper._.isNil(value) ? value <= condition.value : false;
+            case '!=':
             default:
             default:
                 return true;
                 return true;
         }
         }
     },
     },
-    _checkString(ctx, value, condition) {
+    _checkStringFit(ctx, value, condition) {
         switch (condition.operate) {
         switch (condition.operate) {
             case '=':
             case '=':
                 return value === condition.value;
                 return value === condition.value;
@@ -61,6 +62,10 @@ const valueCheck = {
                 return true;
                 return true;
         }
         }
     },
     },
+    _checkString(ctx, value, condition) {
+        const result = this._checkStringFit(ctx, value, condition);
+        return condition.opp ? !result : result;
+    },
     loadTypeFun(condition) {
     loadTypeFun(condition) {
         for (const c of condition) {
         for (const c of condition) {
             c.fun = this._typeFun[c.type];
             c.fun = this._typeFun[c.type];