|
@@ -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 => {
|