Browse Source

公式配置添加多个元素修改

duy 2 years ago
parent
commit
a6b5bae792
1 changed files with 12 additions and 6 deletions
  1. 12 6
      src/views/formula/edit1.vue

+ 12 - 6
src/views/formula/edit1.vue

@@ -896,8 +896,6 @@ export default {
 
     //选择公式处理
     handleSelect(index,indexPath) {
-      //console.log(index,'index')
-      //console.log(indexPath,'indexPath')
       if(this.operationVisible){
         this.openerationSelect(index,indexPath)
       }else{
@@ -988,10 +986,13 @@ export default {
       if (this.itemList.length <= 0) {
          this.eleAddFormulaHandle(this.formulaMap[operator]);
       }
-      this.itemList.forEach(e => {
-        this.eleAddFormulaHandle(this.formulaMap[operator]);
-        this.eleAddFormulaHandle(e);
-      })
+     this.itemList.forEach((item,index)=>{
+           this.eleAddFormulaHandle(item);
+        if(index!=this.itemList.length-1){
+          this.eleAddFormulaHandle(this.formulaMap[operator]);
+        }
+     })
+     
       this.itemList=[]
     },
 
@@ -1219,6 +1220,11 @@ export default {
       this.allTreeShow=false;
       this.filterText=''
       this.treeId=''
+      this.itemList=[];
+      this.eleList.forEach((ele)=>{
+          this.$set(ele,'checked',false);
+          //ele.checked = false;
+      })
       console.log('取消');
     },