chenrui  2 жил өмнө
parent
commit
b12a8783dc

+ 39 - 2
src/components/Table/index.vue

@@ -692,7 +692,26 @@ export default {
         this.tableType = "add";
         this.tableTitle = "新增";
         this.tableForm = {};
+        if (this.dataContent.nodeID) {
+          this.tableForm.nodeCode = this.dataContent.nodeID;
+        }
+        if (this.dataContent.companyID) {
+          this.tableForm.companyID = this.dataContent.companyID;
+        }
+        if (this.dataContent.IATACode) {
+          this.tableForm.IATACode = this.dataContent.IATACode;
+        }
+        // this.tableForm.
       } else {
+        if (this.dataContent.nodeID) {
+          this.tableForm.nodeCode = this.dataContent.nodeID;
+        }
+        if (this.dataContent.IATACode) {
+          this.tableForm.IATACode = this.dataContent.IATACode;
+        }
+        if (this.dataContent.companyID) {
+          this.tableForm.companyID = this.dataContent.companyID;
+        }
         this.$emit("handleAdd");
       }
 
@@ -707,12 +726,30 @@ export default {
             row.queryTemplateColumnSetID
           );
           this.tableForm = JSON.parse(JSON.stringify(data));
+          if (this.dataContent.nodeID) {
+            this.tableForm.nodeCode = this.dataContent.nodeID;
+          }
+          if (this.dataContent.companyID) {
+            this.tableForm.companyID = this.dataContent.companyID;
+          }
+          if (this.dataContent.IATACode) {
+            this.tableForm.IATACode = this.dataContent.IATACode;
+          }
           // this.tableForm =this.tableForm;
           // Object.entries(tableForm).forEach(([key, value]) => {
           //   this.tableForm[key] = value
           // })
         } else {
           this.tableForm = JSON.parse(JSON.stringify(row));
+          if (this.dataContent.nodeID) {
+            this.tableForm.nodeCode = this.dataContent.nodeID;
+          }
+          if (this.dataContent.companyID) {
+            this.tableForm.companyID = this.dataContent.companyID;
+          }
+          if (this.dataContent.IATACode) {
+            this.tableForm.IATACode = this.dataContent.IATACode;
+          }
         }
         this.flag = true;
         this.tableType = "edit";
@@ -790,7 +827,7 @@ export default {
       this.$router.push({
         path: "/BasicsData/airportInfoChild",
         query: {
-          queryTemplateID: row.IATACode,
+          IATACode: row.IATACode,
         },
       });
     },
@@ -799,7 +836,7 @@ export default {
       this.$router.push({
         path: "/BasicsData/deployNodeChild",
         query: {
-          queryTemplateID: row.nodeID,
+          nodeID: row.nodeID,
         },
       });
     },

+ 4 - 1
src/views/BasicsData/views/airport/airportInfo.vue

@@ -26,7 +26,7 @@
         <el-col :span="6">
           <div class="tree_left">
             <el-scrollbar style="height: 100%">
-              <div class="corporate">所属公司</div>
+              <div class="corporate">{{ company }}</div>
               <el-tree
                 :data="data"
                 :props="defaultProps"
@@ -285,6 +285,7 @@ export default {
         ],
       },
       companyID: "",
+      company: "所属公司",
     };
   },
   mounted() {
@@ -298,6 +299,7 @@ export default {
     //点击树状图
     handleNodeClick(data) {
       this.companyID = data.companyID;
+      this.company = data.companyName;
     },
     closeForm() {
       this.$refs.ruleForm.resetFields();
@@ -364,6 +366,7 @@ export default {
           this.data = arr;
           if (!this.companyID.length) {
             this.companyID = arr[0].companyID;
+            this.company = arr[0].companyName;
           }
         } else {
           this.$message.error(res.message ?? "失败");

+ 3 - 3
src/views/BasicsData/views/airport/airportInfoChild.vue

@@ -3,7 +3,7 @@
     <div class="wrap">
       <DataTable
         data-id="61"
-        :data-content="{ queryTemplateID }"
+        :data-content="{ IATACode }"
         :rows="12"
         label-width="140px"
         :min-height="70"
@@ -18,7 +18,7 @@ export default {
   components: { DataTable },
   data() {
     return {
-      queryTemplateID: null,
+      IATACode: null,
     };
   },
   created() {
@@ -26,7 +26,7 @@ export default {
     //   this.$router.push("/systemSettings/queryTemplate");
     //   return;
     // }
-    this.queryTemplateID = this.$route.query.queryTemplateID;
+    this.IATACode = this.$route.query.IATACode;
   },
 };
 </script>

+ 3 - 3
src/views/BasicsData/views/deployNode/deployNodeChild.vue

@@ -3,7 +3,7 @@
     <div class="wrap">
       <DataTable
         data-id="60"
-        :data-content="{ queryTemplateID }"
+        :data-content="{ nodeID }"
         :rows="24"
         label-width="80px"
         :min-height="70"
@@ -18,7 +18,7 @@ export default {
   components: { DataTable },
   data() {
     return {
-      queryTemplateID: null,
+      nodeID: null,
     };
   },
   created() {
@@ -26,7 +26,7 @@ export default {
     //   this.$router.push("/systemSettings/queryTemplate");
     //   return;
     // }
-    this.queryTemplateID = Number(this.$route.query.queryTemplateID);
+    this.nodeID = Number(this.$route.query.nodeID);
   },
 };
 </script>