瀏覽代碼

公式scope

yangyj 2 年之前
父節點
當前提交
480e5f2482
共有 3 個文件被更改,包括 9 次插入9 次删除
  1. 4 5
      src/views/formula/edit.vue
  2. 4 3
      src/views/formula/edit1.vue
  3. 1 1
      src/views/manager/projectinfo/tree.vue

+ 4 - 5
src/views/formula/edit.vue

@@ -39,7 +39,7 @@
       </div>
     </div>
     <div class="box-dashed">
-      <div class="mg-b-20">函数公式</div>
+      <div class="mg-b-20">函数公式1</div>
       <div class="edit-text">
         <span>
           <formula-item
@@ -316,7 +316,7 @@
 
     <div class="text-align-c" v-show="!operationVisible">
       <el-button type="warning" @click="$emit('hideDialog')">取消</el-button>
-      <el-button type="primary" @click="saveFormula">保存</el-button>
+      <el-button type="primary" @click="saveFormula">保存-</el-button>
     </div>
   </div>
 
@@ -1168,7 +1168,6 @@ export default {
     //保存公式
     saveFormula(){
       let obj = formulaArrayToString(this.processFormula,this.resultFormula);
-
       let deviationRangeText = rangeToString(this.deviationRange.datas,obj.eleMap);
       obj.eleMap.deviationRangeJson = JSON.stringify(this.deviationRange.datas);
       //console.log(obj.eleMap)
@@ -1205,7 +1204,6 @@ export default {
         }
       }
 
-      //console.log(obj)
       //console.log(text);
       if(this.formulaid){
         updateFormula({
@@ -1218,6 +1216,7 @@ export default {
           number:number,
           map:JSON.stringify(obj.eleMap),
           scope:this.globaltype,
+          projectId:this.curProjiect.id||this.projectId,
           dev:deviationRangeText
         }).then(()=>{
           this.$message({
@@ -1235,8 +1234,8 @@ export default {
           number:number,
           map:JSON.stringify(obj.eleMap),
           scope:this.globaltype,
-          projectId:this.curProjiect.id,
           dev:deviationRangeText,
+          projectId:this.curProjiect.id||this.projectId,
           ver:this.version
         }).then((res)=>{
           if(res.data.data){

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

@@ -39,7 +39,7 @@
       </div>
     </div>
     <div class="box-dashed">
-      <div class="mg-b-20">函数公式</div>
+      <div class="mg-b-20">函数公式2</div>
       <div class="edit-text">
         <span>
           <formula-item
@@ -348,7 +348,7 @@
 
     <div class="text-align-c" v-show="!operationVisible">
       <el-button type="warning" @click="$emit('hideDialog')">取消</el-button>
-      <el-button type="primary" @click="saveFormula">保存</el-button>
+      <el-button type="primary" @click="saveFormula">保存+</el-button>
     </div>
   </div>
 
@@ -1470,6 +1470,7 @@ export default {
           number:number,
           map:JSON.stringify(obj.eleMap),
           scope:this.globaltype,
+          projectId:this.curProjiect.id||this.projectId,
           dev:deviationRangeText
         }).then(()=>{
           this.$message({
@@ -1487,7 +1488,7 @@ export default {
           number:number,
           map:JSON.stringify(obj.eleMap),
           scope:this.globaltype,
-          projectId:this.curProjiect.id,
+          projectId:this.curProjiect.id||this.projectId,
           dev:deviationRangeText,
           ver:this.version
         }).then((res)=>{

+ 1 - 1
src/views/manager/projectinfo/tree.vue

@@ -1422,7 +1422,7 @@
 
     <!-- 节点公式 -->
     <el-dialog
-      title="元素公式22"
+      title="元素公式2"
       :visible.sync="formulaCompVisible"
       fullscreen
       append-to-body