Browse Source

选择当前元素保存修改

duy 1 year ago
parent
commit
9d8719cc4d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/formula/component/formulaTemplate.vue

+ 2 - 2
src/views/formula/component/formulaTemplate.vue

@@ -46,8 +46,8 @@ export default {
   },
   mounted(){
     this.template = this.formulainfo.template.ft;
+    this.formulainfo.arguments[0].tableElementKey=this.formulainfo.arguments[0].tableElementKey.replace("_key",":key")
     this.formulainfo.template.args.forEach(element => {
-      //console.log(element)
       this.template = this.template.replace(element.key,element.m)
     });
   
@@ -68,7 +68,7 @@ export default {
     //选择当前元素
     setCurEle(index){
       let tmp = JSON.parse(JSON.stringify(this.curele));
-      console.log(tmp,'当前元素')
+      tmp['tableElementKey']= tmp['tableElementKey'].replace("_key",":key")
       this.$set(this.formulainfo.arguments,index,tmp);
     }
   }