|
|
@ -190,9 +190,8 @@ |
|
|
|
|
|
|
|
</el-col> |
|
|
|
<el-col> |
|
|
|
<smart-search-rule :ref="'ref_rule'+selBtnIndex" |
|
|
|
:formType="formType" |
|
|
|
:index="selBtnIndex"></smart-search-rule> |
|
|
|
<smart-search-rule ref="ref_rule" |
|
|
|
:formType="formType"></smart-search-rule> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
@ -363,21 +362,98 @@ export default { |
|
|
|
'AGENCY_ID': 'like' |
|
|
|
}, |
|
|
|
|
|
|
|
showSmartSearchForm: false, |
|
|
|
showSmartSearchForm: true, |
|
|
|
formType: 'add', |
|
|
|
selBtnIndex: 1, |
|
|
|
btnList: [ |
|
|
|
{ |
|
|
|
name: '智能查询', |
|
|
|
index: 1 |
|
|
|
index: 1, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '租户', |
|
|
|
index: 2 |
|
|
|
index: 2, |
|
|
|
ruleList: [ |
|
|
|
{ |
|
|
|
selSmartType: 'house', |
|
|
|
nextLogicalRel: "", |
|
|
|
nextLogicalRelName: "", |
|
|
|
personRule: { |
|
|
|
ruleDesc: '',//规则描述文字,例如:基础信息性别等于女 |
|
|
|
itemGroupId: '', |
|
|
|
itemId: '', |
|
|
|
queryType: '', |
|
|
|
colTable: '', |
|
|
|
colKey: '', |
|
|
|
colVal: '', |
|
|
|
|
|
|
|
itemList: [], |
|
|
|
colType: '',//详细参数的组件类型 |
|
|
|
colOption: [], |
|
|
|
itemGroupName: '', |
|
|
|
itemLabel: '', |
|
|
|
queryTypeName: '', |
|
|
|
colValLabel: '', |
|
|
|
}, |
|
|
|
houseRule: { |
|
|
|
colKey: "RENT_FLAG", |
|
|
|
colTable: "ic_house", |
|
|
|
colVal: "1", |
|
|
|
colValLabel: "出租", |
|
|
|
itemGroupId: null, |
|
|
|
itemGroupName: "房屋信息", |
|
|
|
itemId: null, |
|
|
|
itemLabel: "房屋状态", |
|
|
|
nextLogicalRel: "", |
|
|
|
nextLogicalRelName: "", |
|
|
|
queryType: "=", |
|
|
|
queryTypeName: "等于", |
|
|
|
ruleDesc: "房屋信息房屋状态等于出租", |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '第一党支部党员', |
|
|
|
index: 3 |
|
|
|
index: 3, |
|
|
|
ruleList: [ |
|
|
|
{ |
|
|
|
selSmartType: 'person', |
|
|
|
nextLogicalRel: "", |
|
|
|
nextLogicalRelName: "", |
|
|
|
personRule: { |
|
|
|
colKey: "IS_BDHJ", |
|
|
|
colTable: "ic_resi_user", |
|
|
|
colVal: "1", |
|
|
|
colValLabel: "是", |
|
|
|
itemGroupId: "45687aa479955f9d06204d415238f7cc_0", |
|
|
|
itemGroupName: "基础信息", |
|
|
|
itemId: "20220422102809_1005", |
|
|
|
itemLabel: "本地户籍", |
|
|
|
queryType: "=", |
|
|
|
queryTypeName: "等于", |
|
|
|
ruleDesc: "基础信息本地户籍等于是", |
|
|
|
}, |
|
|
|
houseRule: { |
|
|
|
ruleDesc: '', |
|
|
|
queryType: '', |
|
|
|
colTable: '', |
|
|
|
colKey: '', |
|
|
|
colVal: '', |
|
|
|
|
|
|
|
titleName: '房屋信息', |
|
|
|
colType: '',//详细参数的组件类型 |
|
|
|
colOption: [], |
|
|
|
itemGroupName: '房屋信息', |
|
|
|
itemLabel: '', |
|
|
|
queryTypeName: '', |
|
|
|
colValLabel: '', |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
] |
|
|
|
} |
|
|
|
] |
|
|
|
|
|
|
@ -483,33 +559,40 @@ export default { |
|
|
|
// this.orgOptions = []; |
|
|
|
}, |
|
|
|
handleSearch () { |
|
|
|
// console.log('formmmmm---', this.form) |
|
|
|
const itemTypes = ['daterange', 'timerange', 'checkbox'] |
|
|
|
let a = this.tempFormList.filter(item => item.itemType != 'inputRange') |
|
|
|
let arr = a.filter((n) => n.isChange).map((item) => { |
|
|
|
return { |
|
|
|
queryType: item.queryType, |
|
|
|
tableName: item.tableName, |
|
|
|
columnName: item.columnName, |
|
|
|
// columnValue: [] |
|
|
|
columnValue: this.form[item.columnName] && |
|
|
|
(itemTypes.includes(item.queryType) || |
|
|
|
itemTypes.includes(item.itemType) || item.multiSelect == 1 |
|
|
|
? this.form[item.columnName] |
|
|
|
: [this.form[item.columnName].toString()]) |
|
|
|
} |
|
|
|
}) |
|
|
|
const arr2 = arr.filter(item => item.columnValue.length > 0) |
|
|
|
let arr1 = this.fixedList |
|
|
|
.filter((n) => n.columnValue.length > 0) |
|
|
|
.map((item) => { |
|
|
|
if (this.showSmartSearchForm) { |
|
|
|
let refObj = this.$refs['ref_rule'] |
|
|
|
|
|
|
|
refObj.getRule() |
|
|
|
} else { |
|
|
|
// console.log('formmmmm---', this.form) |
|
|
|
const itemTypes = ['daterange', 'timerange', 'checkbox'] |
|
|
|
let a = this.tempFormList.filter(item => item.itemType != 'inputRange') |
|
|
|
let arr = a.filter((n) => n.isChange).map((item) => { |
|
|
|
return { |
|
|
|
...item |
|
|
|
queryType: item.queryType, |
|
|
|
tableName: item.tableName, |
|
|
|
columnName: item.columnName, |
|
|
|
// columnValue: [] |
|
|
|
columnValue: this.form[item.columnName] && |
|
|
|
(itemTypes.includes(item.queryType) || |
|
|
|
itemTypes.includes(item.itemType) || item.multiSelect == 1 |
|
|
|
? this.form[item.columnName] |
|
|
|
: [this.form[item.columnName].toString()]) |
|
|
|
} |
|
|
|
}) |
|
|
|
let arr3 = [...arr1, ...arr2] |
|
|
|
this.$emit('search', arr3) |
|
|
|
return arr3 |
|
|
|
const arr2 = arr.filter(item => item.columnValue.length > 0) |
|
|
|
let arr1 = this.fixedList |
|
|
|
.filter((n) => n.columnValue.length > 0) |
|
|
|
.map((item) => { |
|
|
|
return { |
|
|
|
...item |
|
|
|
} |
|
|
|
}) |
|
|
|
let arr3 = [...arr1, ...arr2] |
|
|
|
this.$emit('search', arr3) |
|
|
|
return arr3 |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
handleOpenSearch () { |
|
|
|
this.openSearch = !this.openSearch |
|
|
|