yrik 4 years ago
parent
commit
4fcc08a3af

+ 15 - 3
ruoyi-ui/src/views/system/form/index.vue

@@ -209,6 +209,7 @@
       if(this.$route.query.id == -1){
         console.log(this.$route.query.id)
         this.foremTtae = this.$route.query.tables+'_id'
+        this.queryParamslist.fixedData.condition[this.foremTtae] = this.$route.query.id
       }else{
         let begad = this.$route.query.tables+'_id'
         this.queryParamslist.fixedData.condition[begad] = this.$route.query.id
@@ -216,7 +217,11 @@
       }
       // this.objParamstue.fixedData.id = this.$route.query.id
       this.init()
-      this.edingelsietab()
+      this.edingelsietab()
+    
+    },
+    destroyed(){
+     
     },
     methods: {
       imgBtn(url) {
@@ -387,7 +392,12 @@
       handleQuery(index) {
         if(index == 'fh'){
           this.$store.dispatch("tagsView/delView", this.$route);
-          this.$router.go(-1)
+          if(this.cielsshow == true){
+            this.$router.go(-2)
+          }else{
+            this.$router.go(-1)
+          }
+
           return
         }else if(index == 'sx'){
           this.xidugje = 'sx'
@@ -473,6 +483,7 @@
              this.msgSuccess("保存成功");
              if(this.formy.id == -1){
                if(response.code == 200){
+                 console.log(200)
                  this.cielsshow = true;
                  this.formy.id = response.data
                }else{
@@ -483,9 +494,9 @@
                this.queryParamslist.fixedData.condition[this.foremTtae] = response.data
                this.oieufr = response.data
                this.objParams.fixedData.id = response.data
-               this.$store.dispatch("tagsView/delView", this.$route);
                this.init()
                this.foremliseju()
+               // this.reload()
              }else{
                this.$store.dispatch("tagsView/delView", this.$route);
                this.$router.go(-1)
@@ -624,6 +635,7 @@
        //   })
        // }
      },
+
 
     },
   };

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

@@ -26,7 +26,7 @@
       </el-col>
       <el-col :span="12">
         <el-form-item  label="列数" prop="tableColumn">
-          <el-input type="number" :max="4" v-model="info.tableColumn" placeholder="请输入列数" />
+          <el-input type="number" :max="4" :min="1" v-model="info.tableColumn" placeholder="请输入列数" />
         </el-form-item>
       </el-col>
       <el-col :span="12">

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

@@ -898,6 +898,17 @@
           return
         }
         const basicForm = this.$refs.basicInfo.$refs.basicInfoForm;
+        const tabnum = Object.assign({}, basicForm.model)
+        console.log(tabnum.tableColumn,234)
+        if(tabnum.tableColumn >4 ){
+           this.msgError('列数最大只能输入4')
+           return
+        }
+        if( tabnum.tableColumn <1){
+          this.msgError('最小只能输入1')
+          return
+        }
+
 
         // const genForm = this.$refs.genInfo.$refs.genInfoForm;
         Promise.all([basicForm].map(this.getFormPromise)).then(res => {

+ 5 - 1
ruoyi-ui/src/views/tool/gen/index.vue

@@ -126,7 +126,7 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="列数" prop="tableColumn">
-              <el-input type="number" :max="4" v-model="form.tableColumn" placeholder="请输入列数" maxlength="50" />
+              <el-input type="number" :max="4" :min="1" v-model="form.tableColumn" placeholder="请输入列数" maxlength="50" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -410,7 +410,11 @@
         if( this.form.tableColumn > 4 ){
           this.msgSuccess("列数不能大于4");
           return false
+        }else if(this.form.tableColumn <1){
+          this.msgSuccess("列数不能小于1");
+          return false
         }
+
         this.$refs["form"].validate(valid => {
           if (valid) {
             if (this.form.id != undefined) {