فهرست منبع

增强计算式运行时的强壮性

TonyKang 7 سال پیش
والد
کامیت
155b9513e5
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      modules/reports/rpt_component/jpc_ex.js

+ 5 - 1
modules/reports/rpt_component/jpc_ex.js

@@ -222,7 +222,11 @@ JpcExSrv.prototype.createNew = function(){
                 if (expression) {
                     let $ME = me.formulas[i];
                     // console.log(expression);
-                    eval(expression);
+                    try {
+                        eval(expression);
+                    } catch (ex) {
+                        console.log(ex);
+                    }
                 }
             }
         }