gangyj il y a 3 ans
Parent
commit
2f71f3aedb
1 fichiers modifiés avec 4 ajouts et 2 suppressions
  1. 4 2
      src/views/manager/wbsinfo/edit.vue

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

@@ -509,6 +509,7 @@
         tableData:[],
         nodeDetail:{},
         formData:[],
+        editType:1,
 
         dialogVisible:false,
         deptCategorylist:[],
@@ -622,9 +623,9 @@
       saveNode(){
         this.$refs['nodeDetail'].validate((valid) => {
           if (valid) {
-            if(this.leftType == 1){
+            if(this.editType == 1){
               this.addNode();
-            }else if(this.leftType == 2){
+            }else if(this.editType == 2){
               this.updateNode();
             }
           } else {
@@ -667,6 +668,7 @@
         if(type == 1 || type == 2){
           this.getMajorDataTypeList();
           this.dialogVisible = true;
+          this.editType = type;
         }
 
         getDetail(data.id).then((res)=>{