yrik 4 years ago
parent
commit
0d83c3d5a2
2 changed files with 32 additions and 15 deletions
  1. 22 13
      ruoyi-ui/src/views/system/form/index.vue
  2. 10 2
      ruoyi-ui/src/views/system/table/index.vue

+ 22 - 13
ruoyi-ui/src/views/system/form/index.vue

@@ -491,7 +491,6 @@
              this.msgSuccess("保存成功");
              if(this.formy.id == -1){
                if(response.code == 200){
-                 console.log(200)
                  this.cielsshow = true;
                  this.formy.id = response.data
                }else{
@@ -507,14 +506,12 @@
                // this.reload()
              }else{
                this.$store.dispatch("tagsView/delView", this.$route);
-               this.$router.go(-1)
+               if(this.cielsshow ==  true){
+                 this.$router.go(-2)
+               }else{
+                 this.$router.go(-1)
+               }
              }
-
-             // this.$store.dispatch("tagsView/delView", this.$route);
-
-             // this.$store.dispatch("tagsView/delView", this.$route);
-             // this.$router.go(-1)
-             // this.getList();
            });
          }
        });
@@ -528,7 +525,12 @@
          tableSubimt(this.formeanti).then(response => {
            this.msgSuccess("提交成功");
            this.$store.dispatch("tagsView/delView", this.$route);
-           this.$router.go(-1)
+           if(this.cielsshow ==  true){
+             this.$router.go(-2)
+           }else{
+             this.$router.go(-1)
+           }
+
            // this.getList();
          });
        } else if(this.formy.status == 2){
@@ -536,7 +538,11 @@
          tableSubimtanit(this.formeanti).then(response => {
            this.msgSuccess("反提交成功");
            this.$store.dispatch("tagsView/delView", this.$route);
-           this.$router.go(-1)
+           if(this.cielsshow ==  true){
+             this.$router.go(-2)
+           }else{
+             this.$router.go(-1)
+           }
            // this.getList();
          });
        }
@@ -555,7 +561,11 @@
            // this.getList();
            this.msgSuccess("删除成功");
            this.$store.dispatch("tagsView/delView", this.$route);
-           this.$router.go(-1)
+           if(this.cielsshow ==  true){
+             this.$router.go(-2)
+           }else{
+             this.$router.go(-1)
+           }
          })
      },
      // 列表删除
@@ -607,7 +617,7 @@
          this.handleDeletetwo(this.deledlid)
        }  else if(index == '新增'){
          if(this.objParams.fixedData.id == -1){
-           console.log(this.objParams.fixedData.id,2334)
+           // console.log(this.objParams.fixedData.id,2334)
            if(this.cielsshow == true){
              this.routerFn(-1, this.tabName,this.oieufr,this.forme.table)
            }else{
@@ -616,7 +626,6 @@
          }else{
            this.routerFn(-1, this.tabName,this.oieufr,this.forme.table)
          }
-
        }else if(index == '修改'){
          if (this.single) {
            this.msgInfo('请勾选一条信息')

+ 10 - 2
ruoyi-ui/src/views/system/table/index.vue

@@ -87,7 +87,9 @@
         imgShoew:0,
         tablees:-1,
         juegkae:'',
-        tabdiese:''
+        tabdiese:'',
+        cielsshow:false,
+        oieufr:0
       };
     },
     mounted() {
@@ -307,9 +309,15 @@
       submitForm: function() {
         this.$refs["queryForm"].validate(valid => {
           if (valid) {
-           console.log(this.forme)
             addbjectSave(this.forme).then(response => {
               this.msgSuccess("保存成功");
+              if(response.code == 200){
+                this.cielsshow = true;
+              }else{
+                this.cielsshow = false;
+              }
+              let query = Object.assign({'id':response.data,'tables': this.forme.table},{} )
+              this.oieufr = response.data
               this.$store.dispatch("tagsView/delView", this.$route);
               this.$router.go(-1)
             });