对接高级查询

This commit is contained in:
qq787203167
2022-05-23 16:05:04 +08:00
parent d59a93ade1
commit 8e90efefa0
5 changed files with 104 additions and 22 deletions
@@ -159,7 +159,10 @@
loading: false,
pageNo: 1,
pageSize: 10,
total: 0
total: 0,
fieldList: [],
queryParamQuery: {},
queryConditionVOList: [],
}
},
mounted() {
@@ -170,7 +173,9 @@
this.visible = true
this.queryParam = {}
this.selectedRowKeys = []
this.queryConditionVOList = []
this.replacePage()
this.queryConditionInventory()
},
searchQuery() {
this.pageNo = 1
@@ -179,6 +184,9 @@
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.queryConditionVOList = []
this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback()
this.replacePage()
},
onChange(page, pageSize) {
@@ -194,7 +202,8 @@
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParam
...this.queryParam,
queryConditionVOList: this.queryConditionVOList,
}
this.loading = true
postAction(this.url.addModelList, query).then((res) => {
@@ -203,10 +212,24 @@
this.total = res.result.total
this.loading = false
} else {
this.dataList = []
this.total = 0
this.loading = false
}
})
},
queryConditionInventory() {
let query = {
flag: 1
}
getAction(this.url.queryConditionInventory, query).then((res) => {
if (res.success) {
this.fieldList = res.result || []
} else {
this.fieldList = []
}
})
},
onSelectChange(value) {
this.selectedRowKeys = value
},
@@ -240,16 +263,17 @@
handleSuperQuery(params, matchType) {
let sqp = {}
if (!params || (params && params.length == 0)) {
sqp['superQueryParams'] = ''
this.queryConditionVOList = []
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
} else {
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
sqp['superQueryParams'] = encodeURI(JSON.stringify(params))
sqp['superQueryMatchType'] = matchType
this.queryConditionVOList = params
this.queryConditionVOList.forEach(res=>{
res.type = matchType
})
}
this.queryParamQuery = sqp
this.getList()
},
this.replacePage()
}
}
}
</script>
@@ -264,7 +288,7 @@
position: absolute;
bottom: 0;
width: 100%;
z-index:100;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
@@ -260,7 +260,8 @@
}
],
url: {
addModelList: '/project/projectLawsInventoryEO/queryPageInfoBussDocument',
addModelList: '/dummy/dummyInventoryInfoEO/queryPageDummy',
queryConditionInventory:'/dummy/dummyInventoryInfoEO/queryConditionInventory',
list: '/dummy/dummyInventoryInfoEO/list',
addModel: '/dummy/dummyInventoryInfoEO/add',
editModel: '/dummy/dummyInventoryInfoEO/edit',