Browse Source

保存公式项目id修改

duy 2 years ago
parent
commit
a1b67f86b8

+ 6 - 3
src/views/formula/edit.vue

@@ -602,7 +602,7 @@ export default {
     // this.wbsid = this.$route.query.wbsid;
     // this.wbsid = this.$route.query.wbsid;
     // this.eleid = this.$route.query.eleid;
     // this.eleid = this.$route.query.eleid;
     // this.nodeid = this.$route.query.nodeid;
     // this.nodeid = this.$route.query.nodeid;
-    // this.pid = this.$route.query.projectid;//项目id 私有树才有
+    this.pid = this.$route.query.pid;//项目id 私有树才有
     this.init();
     this.init();
   },
   },
   methods: {
   methods: {
@@ -1167,6 +1167,7 @@ export default {
 
 
     //保存公式
     //保存公式
     saveFormula(){
     saveFormula(){
+      console.log('保存',this.pid);
       let obj = formulaArrayToString(this.processFormula,this.resultFormula);
       let obj = formulaArrayToString(this.processFormula,this.resultFormula);
       let deviationRangeText = rangeToString(this.deviationRange.datas,obj.eleMap);
       let deviationRangeText = rangeToString(this.deviationRange.datas,obj.eleMap);
       obj.eleMap.deviationRangeJson = JSON.stringify(this.deviationRange.datas);
       obj.eleMap.deviationRangeJson = JSON.stringify(this.deviationRange.datas);
@@ -1216,7 +1217,8 @@ export default {
           number:number,
           number:number,
           map:JSON.stringify(obj.eleMap),
           map:JSON.stringify(obj.eleMap),
           scope:this.globaltype,
           scope:this.globaltype,
-          projectId:this.curProjiect.id||this.projectId,
+          // projectId:this.curProjiect.id||this.projectId,
+           projectId:this.curProjiect.id||this.pid,
           dev:deviationRangeText
           dev:deviationRangeText
         }).then(()=>{
         }).then(()=>{
           this.$message({
           this.$message({
@@ -1235,7 +1237,8 @@ export default {
           map:JSON.stringify(obj.eleMap),
           map:JSON.stringify(obj.eleMap),
           scope:this.globaltype,
           scope:this.globaltype,
           dev:deviationRangeText,
           dev:deviationRangeText,
-          projectId:this.curProjiect.id||this.projectId,
+          // projectId:this.curProjiect.id||this.projectId,
+           projectId:this.curProjiect.id||this.pid,
           ver:this.version
           ver:this.version
         }).then((res)=>{
         }).then((res)=>{
           if(res.data.data){
           if(res.data.data){

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

@@ -692,7 +692,7 @@ export default {
     // this.wbsid = this.$route.query.wbsid;
     // this.wbsid = this.$route.query.wbsid;
     // this.eleid = this.$route.query.eleid;
     // this.eleid = this.$route.query.eleid;
     // this.nodeid = this.$route.query.nodeid;
     // this.nodeid = this.$route.query.nodeid;
-    // this.pid = this.$route.query.projectid;//项目id 私有树才有
+     this.pid = this.$route.query.pid;//项目id 私有树才有
     this.init();
     this.init();
   },
   },
   methods: {
   methods: {
@@ -1419,6 +1419,7 @@ export default {
 
 
     //保存公式
     //保存公式
     saveFormula(){
     saveFormula(){
+      console.log('保存1',this.pid);
       let obj = formulaArrayToString(this.processFormula,this.resultFormula);
       let obj = formulaArrayToString(this.processFormula,this.resultFormula);
 
 
       let deviationRangeText = rangeToString(this.deviationRange.datas,obj.eleMap);
       let deviationRangeText = rangeToString(this.deviationRange.datas,obj.eleMap);
@@ -1470,7 +1471,8 @@ export default {
           number:number,
           number:number,
           map:JSON.stringify(obj.eleMap),
           map:JSON.stringify(obj.eleMap),
           scope:this.globaltype,
           scope:this.globaltype,
-          projectId:this.curProjiect.id||this.projectId,
+          // projectId:this.curProjiect.id||this.projectId,
+            projectId:this.curProjiect.id||this.pid,
           dev:deviationRangeText
           dev:deviationRangeText
         }).then(()=>{
         }).then(()=>{
           this.$message({
           this.$message({
@@ -1488,7 +1490,8 @@ export default {
           number:number,
           number:number,
           map:JSON.stringify(obj.eleMap),
           map:JSON.stringify(obj.eleMap),
           scope:this.globaltype,
           scope:this.globaltype,
-          projectId:this.curProjiect.id||this.projectId,
+          // projectId:this.curProjiect.id||this.projectId,
+            projectId:this.curProjiect.id||this.pid,
           dev:deviationRangeText,
           dev:deviationRangeText,
           ver:this.version
           ver:this.version
         }).then((res)=>{
         }).then((res)=>{

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

@@ -1431,12 +1431,12 @@
     >
     >
       <FormulaEdit
       <FormulaEdit
         :fromcurNode="curTreeData"
         :fromcurNode="curTreeData"
-       
+        :projectid="projectid" 
         :wbsid="id"
         :wbsid="id"
         :nodeid="curTreeData.id"
         :nodeid="curTreeData.id"
         :eleid="formulaCurRow.id"
         :eleid="formulaCurRow.id"
         :globaltype="formulaCurRow.globaltype"
         :globaltype="formulaCurRow.globaltype"
-        :projectid="projectid"
+      
         @hideDialog="formulaCompVisible = false"
         @hideDialog="formulaCompVisible = false"
         v-if="formulaCompVisible"
         v-if="formulaCompVisible"
       ></FormulaEdit>
       ></FormulaEdit>
@@ -2505,7 +2505,7 @@ export default {
 
 
       this.formulaCurRow = row;
       this.formulaCurRow = row;
       this.formulaCurRow.globaltype = type;
       this.formulaCurRow.globaltype = type;
-      if(type===1){
+      if(type===10){
           this.formulaCompVisible1 = true;
           this.formulaCompVisible1 = true;
            this.formulaCurRow.elementType = false;
            this.formulaCurRow.elementType = false;
             this.istableType=true;
             this.istableType=true;