Browse Source

公式配置

yangyj 2 years ago
parent
commit
b7fd52911e

+ 2 - 2
src/views/formula/edit.vue

@@ -1375,7 +1375,7 @@ export default {
         this.eleList = this.paramDataList;
         this.eleList1 = this.paramDataList;
       }else{
-        selectFormElements(tableId,{nodeId:this.nodeid}).then((res)=>{
+        selectFormElements(tableId,{nodeId:this.nodeid,type:1}).then((res)=>{
           this.eleList = res.data.data;
           this.eleList1 = res.data.data;
         })
@@ -1461,7 +1461,7 @@ export default {
         this.eleListComp = this.paramDataList;
         this.eleListComp1 = this.paramDataList;
       }else{
-        selectFormElements(tableId).then((res)=>{
+        selectFormElements(tableId,{type:1}).then((res)=>{
           this.eleListComp = res.data.data;
            this.eleListComp1 = res.data.data;
         })

+ 1 - 1
src/views/formula/edit1.vue

@@ -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>
 

+ 9 - 11
src/views/manager/projectinfo/tree.vue

@@ -469,7 +469,7 @@
                       class="mg-l-10"
                       type="primary"
                       @click="handleEditFormula(scope.$index, scope.row)"
-                      >编辑元素公式</el-link
+                      >编辑元素公式.</el-link
                     >
                     <el-link
                       class="mg-l-10"
@@ -577,7 +577,7 @@
                       class="mg-l-10"
                       type="primary"
                       @click="handleEditFormula(scope.$index, scope.row)"
-                      >编辑元素公式</el-link
+                      >编辑元素公式..</el-link
                     >
                     <el-link
                       class="mg-l-10"
@@ -1172,7 +1172,7 @@
     </el-dialog>
 <!-- 元素公式 -->
     <el-dialog
-      title="元素公式22"
+      title="元素公式.."
       :visible.sync="editEleFormulaVisible"
       width="800px"
       append-to-body
@@ -1202,13 +1202,13 @@
           <template slot-scope="scope">
             <el-link
               :type="scope.row.globalFormula == 1 ? 'warning' : 'primary'"
-              @click="toFormulaEdit(scope.row,1)"
+              @click="toFormulaEdit(scope.row,10)"
               >全局公式</el-link
             >
             <el-link
               class="mg-l-10"
               :type="scope.row.isSaveFormula == 1 ? 'warning' : 'primary'"
-              @click="toFormulaEdit(scope.row,2)"
+              @click="toFormulaEdit(scope.row,20)"
               >节点公式</el-link
             >
             <!-- <el-link
@@ -2177,10 +2177,8 @@ export default {
       return res.code;
     },
     handleEditFormula(index, row) {
-      console.log('编辑元素公式',row);
       this.curEleTable = row;
-     
-      selectFormElements(this.curEleTable.initTableId).then((res) => {
+      selectFormElements(this.curEleTable.initTableId,{type:0}).then((res) => {
         this.editEleListFilter = res.data.data;
         this.editEleListAll = [].concat(this.editEleListFilter);
       });
@@ -2518,7 +2516,7 @@ export default {
   //关闭公式弹窗
     closeformulaComp(){
       console.log('关闭');
-        selectFormElements( this.curEleTable.initTableId).then((res) => {
+        selectFormElements( this.curEleTable.initTableId,{type:0}).then((res) => {
         this.editEleListFilter = res.data.data;
         this.editEleListAll = [].concat(this.editEleListFilter);
       })
@@ -2527,7 +2525,7 @@ export default {
       //关闭公式弹窗
     closeformulaComp1(){
       console.log('关闭');
-        selectFormElements( this.curEleTable.initTableId).then((res) => {
+        selectFormElements( this.curEleTable.initTableId,{type:0}).then((res) => {
         this.editEleListFilter = res.data.data;
         this.editEleListAll = [].concat(this.editEleListFilter);
       })
@@ -3375,7 +3373,7 @@ export default {
     tolinkEle(row){
       this.curLinkEleTable = row;
       this.linkCheckVisible = true;
-      selectFormElements(row.id).then((res) => {
+      selectFormElements(row.id,{type:0}).then((res) => {
         res.data.data.forEach((ele)=>{
           ele.checked = false;
           ele.show = true;

+ 4 - 4
src/views/manager/wbsinfo/edit.vue

@@ -1225,7 +1225,7 @@
     </el-dialog>
 
     <el-dialog
-      title="元素公式55"
+      title="元素公式(WBS级)"
       :visible.sync="editEleFormulaVisible"
       width="800px"
       append-to-body
@@ -1270,7 +1270,7 @@
               class="mg-l-10"
               type="danger"
               @click="delEleRowHandle(scope.$index,editEleListFilter)"
-            >删除</el-link>
+            >删除元素</el-link>
           </template>
         </el-table-column>
       </el-table>
@@ -2186,7 +2186,7 @@ export default {
 
     handleEdit (index, row) {
       this.curEleTable = row;
-      selectFormElements(this.curEleTable.id).then((res) => {
+      selectFormElements(this.curEleTable.id,{type:1}).then((res) => {
         res.data.data.forEach((element) => {
           this.eleReg.exec(element.eAllowDeviation);
           element.allow = RegExp.$1 ? RegExp.$1 : '';
@@ -2224,7 +2224,7 @@ export default {
 
     handleEditFormula (index, row) {
       this.curEleTable = row;
-      selectFormElements(this.curEleTable.id).then((res) => {
+      selectFormElements(this.curEleTable.id,{type:1}).then((res) => {
 
         this.editEleListFilter = res.data.data;
         this.editEleListAll = [].concat(this.editEleListFilter);

+ 1 - 1
src/views/manager/wbsinfo/element.vue

@@ -236,7 +236,7 @@
           <template slot-scope="scope">
             <el-link
               :type="scope.row.globalFormula == 1 ? 'warning' : 'primary'"
-              @click="toFormulaEdit(scope.row,1)"
+              @click="toFormulaEdit(scope.row,0)"
               >全局公式</el-link
             >
             <!-- <el-link