Преглед изворни кода

Merge remote-tracking branch 'origin/master'

Administrator пре 4 година
родитељ
комит
9d8e60aa11

+ 25 - 9
ruoyi-ui/src/components/DynamicFormsteo/index.vue

@@ -121,15 +121,31 @@
     created() {
       this.config = {}
       if(this.type){
-        if(this.formConfig.readonly == true){
-          this.formConfig.disabshow = true
-        }else if(this.formConfig.mask.slice(3,4) == '0' || this.formConfig.isonliy == true){
-          this.formConfig.disabshow = true
+        if(this.formConfig.tableid == -1){
+          // console.log(-1)
+          // console.log(this.formConfig.mask.slice(1,2))
+          if(this.formConfig.readonly == true){
+            this.formConfig.disabshow = true
+          }else if(this.formConfig.mask.slice(1,2) == '0' || this.formConfig.isonliy == true){
+               this.formConfig.disabshow = true
+          }else{
+            this.formConfig.disabshow = false
+          }
+          if(this.formConfig.fkInfo == null){
+            this.formConfig.fkInfo=false
+          }
         }else{
-          this.formConfig.disabshow = false
-        }
-        if(this.formConfig.fkInfo == null){
-          this.formConfig.fkInfo=false
+          console.log(0)
+          if(this.formConfig.readonly == true){
+            this.formConfig.disabshow = true
+          }else if(this.formConfig.mask.slice(3,4) == '0' || this.formConfig.isonliy == true){
+               this.formConfig.disabshow = true
+          }else{
+            this.formConfig.disabshow = false
+          }
+          if(this.formConfig.fkInfo == null){
+            this.formConfig.fkInfo=false
+          }
         }
       }
       if(this.formConfig.tableColumnuy == null){
@@ -162,7 +178,7 @@
      },
    },
     mounted() {
-      // console.log(this.formConfig)
+      console.log(this.formConfig)
     },
     methods: {
       iChange(val){

+ 3 - 0
ruoyi-ui/src/views/system/editing/index.vue

@@ -158,6 +158,7 @@
          taheusid:0,
          tabName:'',
          queryParamstwoi:{},
+         ojeuduj:0
       };
     },
     mounted() {
@@ -175,6 +176,7 @@
       this.queryParamslist.table = this.$route.query.tables
       this.taheus = this.$route.query.tables
       this.taheusid = this.$route.query.id
+      this.ojeuduj = this.$route.query.id
       this.deledlid.idList.push(this.$route.query.id)
 
       // tab
@@ -276,6 +278,7 @@
                  this.queryData.table_column = null
                }
                routerst.tableColumnuy = this.queryData.table_column
+               routerst.tableid = this.ojeuduj
              })
                if(route.cssClass !== null){
                  this.imgShoew = route.cssClass

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

@@ -169,7 +169,9 @@
         oieufr:'',
         cielsshow:false,
         foremTtae:'',
-        foremTtaid:-1
+        foremTtaid:-1,
+        ojeuduj:0,
+        idtg:0
       };
     },
     filters:{
@@ -193,7 +195,12 @@
           return '导出';
         }
       }
-    },
+    },
+    watch: {
+    		$route() {
+    			this.idtg= this.$route.query.id; //获取传来的参数
+    		}
+    	},
     mounted() {
       this.formeanti.table = this.$route.query.tables
       this.forme.table = this.$route.query.tables
@@ -203,6 +210,7 @@
       this.tableZbietabg.table = this.$route.query.tables
       this.objParams.table = this.$route.query.tables
       this.objParams.fixedData.id = this.$route.query.id
+      this.ojeuduj = this.$route.query.id
       this.deledlid.table = this.$route.query.tables
       this.deledlid.idList.push(this.$route.query.id)
       this.queryParamslist.table = this.$route.query.tables
@@ -210,10 +218,12 @@
         console.log(this.$route.query.id)
         this.foremTtae = this.$route.query.tables+'_id'
         this.queryParamslist.fixedData.condition[this.foremTtae] = this.$route.query.id
+        this.cielsshow = true
       }else{
         let begad = this.$route.query.tables+'_id'
         this.queryParamslist.fixedData.condition[begad] = this.$route.query.id
         this.foremTtae = this.$route.query.tables+'_id'
+        this.cielsshow =  false
       }
       // this.objParamstue.fixedData.id = this.$route.query.id
       this.init()
@@ -283,6 +293,7 @@
                     this.queryData.table_column = null
                   }
                   routerst.tableColumnuy = this.queryData.table_column
+                  routerst.tableid = this.ojeuduj
                 })
                if(route.cssClass !== null){
                  this.imgShoew = route.cssClass
@@ -400,12 +411,9 @@
       handleQuery(index) {
         if(index == 'fh'){
           this.$store.dispatch("tagsView/delView", this.$route);
-          if(this.cielsshow == true){
-            this.$router.go(-2)
-          }else{
-            this.$router.go(-1)
-          }
-
+          console.log(this.idtg)
+          this.$router.replace({ path: "/business/" + this.objParams.table });
+          console.log()
           return
         }else if(index == 'sx'){
           this.xidugje = 'sx'
@@ -500,17 +508,14 @@
                this.deledlid.idList.push(response.data)
                this.formy.id = response.data
                this.oieufr = response.data
+               this.ojeuduj = response.data
                this.objParams.fixedData.id = response.data
                this.init()
                this.foremliseju()
-               // this.reload()
+               this.reload()
              }else{
                this.$store.dispatch("tagsView/delView", this.$route);
-               if(this.cielsshow ==  true){
-                 this.$router.go(-2)
-               }else{
-                 this.$router.go(-1)
-               }
+               this.$router.replace({ path: "/business/" + this.objParams.table });
              }
            });
          }
@@ -525,11 +530,7 @@
          tableSubimt(this.formeanti).then(response => {
            this.msgSuccess("提交成功");
            this.$store.dispatch("tagsView/delView", this.$route);
-           if(this.cielsshow ==  true){
-             this.$router.go(-2)
-           }else{
-             this.$router.go(-1)
-           }
+            this.$router.replace({ path: "/business/" + this.objParams.table });
 
            // this.getList();
          });
@@ -538,11 +539,7 @@
          tableSubimtanit(this.formeanti).then(response => {
            this.msgSuccess("反提交成功");
            this.$store.dispatch("tagsView/delView", this.$route);
-           if(this.cielsshow ==  true){
-             this.$router.go(-2)
-           }else{
-             this.$router.go(-1)
-           }
+            this.$router.replace({ path: "/business/" + this.objParams.table });
            // this.getList();
          });
        }
@@ -561,11 +558,7 @@
            // this.getList();
            this.msgSuccess("删除成功");
            this.$store.dispatch("tagsView/delView", this.$route);
-           if(this.cielsshow ==  true){
-             this.$router.go(-2)
-           }else{
-             this.$router.go(-1)
-           }
+            this.$router.replace({ path: "/business/" + this.objParams.table });
          })
      },
      // 列表删除

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

@@ -89,7 +89,8 @@
         juegkae:'',
         tabdiese:'',
         cielsshow:false,
-        oieufr:0
+        oieufr:0,
+        ojeuduj:0
       };
     },
     mounted() {
@@ -100,7 +101,8 @@
       this.tableZbie.table = this.$route.query.tables
       this.tableZbie.fixedData.id = this.$route.query.id
       this.formy.id = this.$route.query.id
-      this.deledlid.table = this.$route.query.tables
+      this.deledlid.table = this.$route.query.tables
+      this.ojeuduj = this.$route.query.id
       this.deledlid.idList.push(this.$route.query.id)
       if(this.$route.query.tabfe){
        this.tablees = this.$route.query.tabfe
@@ -270,6 +272,7 @@
                  this.queryData.table_column = null
                }
                routerst.tableColumnuy = this.queryData.table_column
+                routerst.tableid = this.ojeuduj
              })
             if(route.cssClass !== null){
               this.imgShoew = route.cssClass

+ 0 - 1
ruoyi-ui/src/views/tool/gen/editTable.vue

@@ -241,7 +241,6 @@
                   <el-checkbox true-label="Y" false-label="N" v-model="formZd.isOut"></el-checkbox>
                 </el-form-item>
               </el-col>
-              
             </el-row>
             <el-row>
               <el-col :span="8">