浏览代码

公式配置选择当前元素回显

duy 2 年之前
父节点
当前提交
91df65acaf
共有 1 个文件被更改,包括 4 次插入6 次删除
  1. 4 6
      src/views/formula/formulaArrayToString.js

+ 4 - 6
src/views/formula/formulaArrayToString.js

@@ -283,14 +283,12 @@ export const formulaArrayToString = (processFormula,resultFormula) => {
     let resText = transformArguments(resultFormula[0].children,resultFormula[0],eleMap);
   
     //等号左侧元素不需要,左侧的公式嵌套右侧所有结果
-    // text = resText.replace(`E[${resultFormula[0].tableElementKey}]`,text);
-
-    if(processFormula.length===0){
-      text=resText
-    }else{
+    if(text){
       text = resText.replace(`E[${resultFormula[0].tableElementKey}]`,text);
+    }else{
+      text=resText
     }
-    
+   
   }
 
   console.log(text);