소스 검색

公式配置参数下标纠正

yangyj 1 년 전
부모
커밋
ea14729d37
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      src/config/index.json
  2. 4 2
      src/views/formula/edit1.vue

+ 1 - 1
src/config/index.json

@@ -1,5 +1,5 @@
 {
-    "target": "http://192.168.0.109:8090",
+    "target": "http://127.0.0.1:8090",
     "dev": {
         "port": 1888
     }

+ 4 - 2
src/views/formula/edit1.vue

@@ -1303,7 +1303,8 @@ export default {
       if(expression.type ==1){
         return;
       }
-      //console.log(JSON.parse(expression.template));
+      //alert(JSON.stringify(expression.template))
+      //debugger
       let obj = Object.assign({}, expression);
       //obj.template = JSON.parse(obj.template);
       obj.arguments = new Array(obj.template.args.length);
@@ -1328,7 +1329,8 @@ export default {
         };
       }
 
-      obj.arguments[0] = ele;
+      let tg=obj.template.args.findIndex(x=>x.m!=='常量');
+      obj.arguments[tg] = ele;
       this.equationSelectEle.children.push(obj);
       //跳转到最新的标签
       this.actiFunIndex = (this.equationSelectEle.children.length-1).toString();