浏览代码

配置公式选表范围优化

yangyj 1 年之前
父节点
当前提交
0f2fcd3a0e
共有 3 个文件被更改,包括 9 次插入13 次删除
  1. 1 1
      src/views/formula/edit1.vue
  2. 5 10
      src/views/manager/projectinfo/tree.vue
  3. 3 2
      src/views/manager/wbsinfo/edit.vue

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

@@ -726,7 +726,7 @@ export default {
         if(node.level == 0) this.loading=true
         //  if(this.globaltype===1&&!this.elementType){
            if(!this.elementType){
-             tabTypeLazyTreeAll({parentId,current:1,size:1000}).then(res => {
+             tabTypeLazyTreeAll({parentId,current:1,size:1000,hasPartFormula:this.fromcurNode.hasPartFormula}).then(res => {
                 // 请求接口,返回数据
                 let data = res.data.data.records;
                   this.loading=false

+ 5 - 10
src/views/manager/projectinfo/tree.vue

@@ -1167,7 +1167,7 @@
     </el-dialog>
 <!-- 元素公式 -->
     <el-dialog
-    :title="(curEleTable.tableName?curEleTable.tableName:'')+'  元素公式..'"
+    :title="(curEleTable.tableName?curEleTable.tableName:'')+'  元素公式(项目级)'"
      
       :visible.sync="editEleFormulaVisible"
       width="800px"
@@ -1202,6 +1202,7 @@
               >全局公式</el-link
             >
             <el-link
+              v-show="scope.row.hasPartFormula"
               class="mg-l-10"
               :type="scope.row.isSaveFormula == 1 ? 'warning' : 'primary'"
               @click="toFormulaEdit(scope.row,20)"
@@ -1796,6 +1797,7 @@ export default {
       eleReg: /(≥|≤|±|【】)?([^≥≤±【】]*)/,
 
       editEleFormulaVisible: false,
+      isMeter:false,
       formulaInput: "",
       editEleListFilter: [],
       editEleListAll: [],
@@ -2615,15 +2617,8 @@ export default {
 
     //跳转到公式配置页面
     toFormulaEdit(row,type) {
-      // this.$router.push({
-      //   path: '/formula/edit',
-      //   query: {
-      //     wbsid: this.id,
-      //     eleid: row.id,
-      //     nodeid:this.curTreeData.id,
-      //     projectid:this.projectid
-      //   }
-      // });
+
+      this.curEleTable.hasPartFormula=row.hasPartFormula;
       this.formulaCurRow = row;
       this.formulaCurRow.globaltype = type;
       if(type===10){

+ 3 - 2
src/views/manager/wbsinfo/edit.vue

@@ -1246,15 +1246,16 @@
               @click="toFormulaEdit(scope.row,1)"
             >全局公式</el-link>
             <el-link
+              v-show="scope.row.hasPartFormula"
               class="mg-l-10"
               :type="scope.row.isSaveFormula == 1?'warning':'primary'"
               @click="toFormulaEdit(scope.row,2)"
             >节点公式</el-link>
-            <el-link
+            <!-- <el-link
               class="mg-l-10"
               type="danger"
               @click="delEleRowHandle(scope.$index,editEleListFilter)"
-            >删除元素</el-link>
+            >删除元素</el-link> -->
           </template>
         </el-table-column>
       </el-table>