Browse Source

参数库显示修改

duy 4 months ago
parent
commit
0ac2f4c363
1 changed files with 50 additions and 4 deletions
  1. 50 4
      src/views/manager/projectinfo/tree.vue

+ 50 - 4
src/views/manager/projectinfo/tree.vue

@@ -274,6 +274,16 @@
                   prop="parentName"
                   label="上级节点"
                 ></el-table-column>
+                <el-table-column
+                  align="center"
+                  prop="primaryKeyId"
+                  label="primaryKeyId"
+                ></el-table-column>
+                <el-table-column
+                  align="center"
+                  prop="id"
+                  label="id"
+                ></el-table-column>
               </el-table>
             </div>
             <div class="flex jc-sb">
@@ -1845,7 +1855,7 @@
             @change="changeRoleName($event,scope.row,scope.index)"
           >
           <el-option
-              v-for="item in nodeTypelist"
+              v-for="item in nodeTypelist1"
               :key="item.id"
               :label="item.dictValue"
               :value="item.dictKey"
@@ -2131,7 +2141,7 @@ export default {
       editType: 1,
       dialogVisible: false,
       saveNodeLoading: false,
-      nodeTypelist: [],
+      nodeTypelist1: [],
       majorDataTypeList: [],
       rules: {
         nodeName: [
@@ -2377,7 +2387,7 @@ export default {
       this.id = wbsid;
       this.projectid = pid;
       this.wbsType = type ? Number(type) : 1;
-
+      this.getNodeTypelistData()
       this.getNodeTypelist();
       this.getTableTypelist();
       this.getDataTypelist();
@@ -2415,8 +2425,11 @@ export default {
       this.curTreeData.parentName = parentName;
       getDetail(data.id, this.id, this.projectid).then((res) => {
         res.data.data.parentName = parentName;
+        let tableObj=res.data.data;
+        tableObj.primaryKeyId=data.primaryKeyId
         this.tableData = [res.data.data];
         this.nodeDetail = Object.assign({}, res.data.data);
+        
       });
       this.updateNodeTable();
       // this.nodeTypeChange(data.nodeType)
@@ -2485,6 +2498,7 @@ export default {
     },
     setLeftType(type, data, node) {
       this.jiedianId = data.id;
+      this.getNodeTypelistData()
       if (type == 4 || type == 5) {
         this.leftType = type;
       }
@@ -2494,6 +2508,7 @@ export default {
 
       if (type == 1 || type == 2) {
         this.getMajorDataTypeList();
+       
         this.dialogVisible = true;
         this.editType = type;
       }
@@ -3117,9 +3132,37 @@ export default {
       getDictionary({
         code,
       }).then((res) => {
-        this.nodeTypelist = res.data.data;
+        this.nodeTypelist1 = res.data.data;
  
         
+      });
+    },
+    getNodeTypelistData() {
+      const type = this.wbsType;
+      let code = "";
+      if (type === 5) {
+        code = "lar_node_type"; //征拆
+      } else if (type === 2) {
+        code = "trial_node_type"; //试验
+      } else if (type === 3) {
+        code = "meter_node_type"; //计量
+      } else {
+        {
+          code = "wbs_node_type"; //质检
+        }
+      }
+
+      getDictionary({
+        code,
+      }).then((res) => {
+        this.nodeTypelist = res.data.data;
+        res.data.data.forEach((element) => {
+          element.dictKey = Number(element.dictKey);
+    
+        });
+        this.nodeTypelist = res.data.data;
+       
+        
       });
     },
     getMajorDataTypeList() {
@@ -3131,8 +3174,11 @@ export default {
       }).then((res) => {
         res.data.data.forEach((element) => {
           element.dictKey = Number(element.dictKey);
+    
         });
         this.majorDataTypeList = res.data.data;
+       
+        
       });
     },