소스 검색

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

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);
+                    }
                 }
             }
         }