yrik 4 年之前
父节点
当前提交
0795e141e7

+ 13 - 8
ruoyi-ui/src/views/system/editing/index.vue

@@ -130,6 +130,7 @@
         this.tabledeLise.table = this.tabldie[index].tableName
         this.formeanti.table = this.tabldie[index].tableName
         this.forme.table = this.tabldie[index].tableName
+
         this.tableZbie.table = this.tabldie[index].tableName
         // this.edingelsie()
         this.init()
@@ -169,6 +170,7 @@
               }
             } else if (route == 'Q') {
               route = '查询'
+              this.jeigneutwo.push(route)
             } else if (route == 'S') {
               route = '提交'
               if (this.formy.id != -1) {
@@ -181,8 +183,10 @@
               }
             } else if (route == 'I') {
               route = '导入'
+              this.jeigneutwo.push(route)
             } else if (route == 'E') {
               route = '导出'
+              this.jeigneutwo.push(route)
             }
 
           })
@@ -193,11 +197,14 @@
           if(this.queryData.showData.length !==0){
            this.queryData.showData.filter(route => {
                if(route.hrChildren.length !== 0){
-                  if(route.hrChildren[1].readonly == true){
-                        this.imgShoew = true
-                  }else{
-                    this.imgShoew = false
-                  }
+                 if(route.hrChildren[0].readonly !== null){
+                   if(route.hrChildren[0].readonly == true){
+                         this.imgShoew = true
+                   }else{
+                     this.imgShoew = false
+                   }
+                 }
+
                }
            })
           }
@@ -220,9 +227,6 @@
         geteditindeTab(this.tableZbietabg).then(response => {
           this.tabldie = response.data.ref
           if (this.tabldie.length !== 0) {
-            this.tabledeLise.table = this.tabldie[0].tableName
-            this.formeanti.table = this.tabldie[0].tableName
-            this.forme.table = this.tabldie[0].tableName
             this.tableZbie.table = this.tabldie[0].tableName
             this.init()
           } else {
@@ -302,6 +306,7 @@
       },
       /** 新增 修改提交按钮 */
       submitForm: function() {
+        console.log(3456)
         this.$refs["queryForm"].validate(valid => {
           if (valid) {
             addbjectSave(this.forme).then(response => {

+ 69 - 5
ruoyi-ui/src/views/system/form/index.vue

@@ -29,7 +29,16 @@
               <span :class="[index == numtab ? 'span' : '']">{{item.tableComment}}</span>
             </p>
           </div>
-          <el-divider></el-divider>
+          <el-divider></el-divider>
+          <!-- v-show="showSearch" -->
+         <el-form :model="queryParamstwoi" ref="queryForm" :inline="true" >
+           <dynamic-forms :ref="item.columnName" :config="queryParamstwoi" @inputs="changeFn" :formConfig="item" v-for="(item,index) in queryDatatao.showData"
+             :key='index' />
+           <el-form-item>
+             <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQueryiu">搜索</el-button>
+             <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+           </el-form-item>
+         </el-form>
           <el-table stripe v-loading="loading" :data="postList.rows" @selection-change="handleSelectionChange">
             <el-table-column :label="item.columnComment" align="center" :prop="item.columnName" v-for="(item,index) in postList.tableHeadList" :key="index" />
           </el-table>
@@ -82,18 +91,34 @@
           },
           isUi:true
         },
-        queryData: {},
+        objParamstue:{
+          table: 'obj_test',
+          fixedData: {
+            id: -1
+          },
+          isUi:false
+        },
+        queryData: {},
+        queryDatatao:{},
         // 查询参数
         queryParams: {
           dictName: undefined,
           dictType: undefined,
           status: undefined
         },
+        queryParamstwoi:{
+         dictName: undefined,
+         dictType: undefined,
+         status: undefined
+        },
         queryParamslist: {
           pageNo: 1,
           pageSize: 10,
           orderBy:'create_time desc',
           table: '',
+          fixedData:{
+            condition:{}
+          }
         },
         labletit: '查询参数1233',
         surlable: '实际数据库表',
@@ -153,11 +178,12 @@
       this.forme.objId = this.$route.query.id
       this.formy.id = this.$route.query.id
       this.tableZbietabg.table = this.$route.query.tables
-      this.objParams.table = this.$route.query.tables
+      // this.objParams.table = this.$route.query.tables
       this.objParams.fixedData.id = 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
+      this.objParamstue.fixedData.id = this.$route.query.id
       this.init()
       this.edingelsietab()
     },
@@ -204,16 +230,18 @@
           console.log(res)
           let data = res.data
           this.queryData = data
-
           // 图片的显示隐藏
           if(this.queryData.showData.length !==0){
            this.queryData.showData.filter(route => {
                if(route.hrChildren.length !== 0){
-                  if(route.hrChildren[1].readonly == true){
+                 if(route.hrChildren[0].readonly !== null){
+                  if(route.hrChildren[0].readonly == true){
                         this.imgShoew = true
                   }else{
                     this.imgShoew = false
                   }
+                 }
+
                }
            })
           }
@@ -230,8 +258,10 @@
           if(response.data.ref.length !==0){
             this.tabldie = response.data.ref
             this.queryParamslist.table = this.tabldie[0].tableName
+            this.objParamstue.table = this.tabldie[0].tableName
             this.tabShoes = true
             this.foremliseju()
+            this.foremlisejuque()
           }else{
             this.tabShoes = false
           }
@@ -252,6 +282,16 @@
          console.log(this.postList,567)
 
        })
+      },
+      // 列表查询接口
+      foremlisejuque(){
+       getObject(this.objParamstue).then(res => {
+         console.log(res)
+         this.queryDatatao = res.data
+         // let data = res.data
+         // this.queryData = data
+         // 图片的显示隐藏
+       })
       },
       // tab点击
       tabSbu(index) {
@@ -332,6 +372,30 @@
         console.log(this.forme)
         // this.getList();
       },
+      // 搜索列表
+      handleQueryiu(){
+       for(let item of this.queryDatatao.showData){
+         // for(var i = 0 ; i < item.hrChildren.length ; i++){
+           if(item.htmlType == 'checkbox'){
+             this.queryParamstwoi[item.columnName] = this.$refs[item.columnName][0].config
+           }else if(item.htmlType == 'imageUpload' || item.htmlType == 'fileUpload'){
+             this.queryParamstwoi[item.columnName] = JSON.stringify(this.$refs[item.columnName][0].config)
+           } else{
+             this.queryParamstwoi[item.columnName] = this.$refs[item.columnName][0].config[item.columnName]
+           }
+         // }
+
+       }
+       for(var items in this.queryParamstwoi){
+         if(this.queryParamstwoi[items] == ''){
+           this.queryParamstwoi[items] = undefined
+         }
+       }
+       this.queryParamslist.fixedData.condition = this.queryParamstwoi
+       this.foremliseju()
+        console.log(this.queryParamstwoi)
+
+      },
      /** 新增 修改提交按钮 */
      submitForm: function() {
        this.$refs["queryForm"].validate(valid => {

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

@@ -85,7 +85,7 @@
         jeigneutwo:[],
         xidugje:0,
         tijeq:0,
-        imgShoew:true
+        imgShoew:false
       };
     },
     // filters:{
@@ -253,6 +253,7 @@
               }
             }else if(route == 'Q'){
               route = '查询'
+              this.jeigneutwo.push(route)
             }else if(route == 'S'){
               route = '提交'
               if(this.formy.id != -1){
@@ -265,11 +266,14 @@
               }
             }else if(route == 'I'){
               route = '导入'
+              this.jeigneutwo.push(route)
             }else if(route == 'E'){
               route = '导出'
+              this.jeigneutwo.push(route)
             }
 
           })
+
           this.jeigneutwo.push('刷新')
           this.jeigneutwo.push('返回')
           // console.log(this.jeigneutwo,567)