Browse Source

添加机场所属公司

zhaoke 2 years ago
parent
commit
364862b803
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/components/Table/index.vue

+ 8 - 1
src/components/Table/index.vue

@@ -390,7 +390,6 @@ export default {
       }
       this.tableForm[this.tableOptions[data][0].setvalue] =
         this.tableForm[data];
-      // console.log(this.tableForm)
     },
     inputChangeHandler (data) {
       if (this.tableForm[data] === "") {
@@ -723,8 +722,16 @@ export default {
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
           if (this.tableType == "add") {
+            if (this.isTree && this.tableForm.companyID) {
+              this.tableForm.parentID = this.tableForm.parentName
+              delete this.tableForm.companyID
+            }
             this.tableForm.event = 1;
           } else {
+            if (this.isTree && this.tableForm.companyID) {
+              this.tableForm.parentID = this.tableForm.parentName
+              delete this.tableForm.companyID
+            }
             this.tableForm.event = 2;
           }
           this.generalDataReception(this.tableForm);