Browse Source

Merge branch 'dev-新版ui' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-新版ui

dev-新版ui
dai 3 years ago
parent
commit
a78a1d8a04
  1. 145
      src/views/components/resiSearch.vue
  2. 989
      src/views/components/smartSearchRule.vue

145
src/views/components/resiSearch.vue

@ -190,9 +190,8 @@
</el-col> </el-col>
<el-col> <el-col>
<smart-search-rule :ref="'ref_rule'+selBtnIndex" <smart-search-rule ref="ref_rule"
:formType="formType" :formType="formType"></smart-search-rule>
:index="selBtnIndex"></smart-search-rule>
</el-col> </el-col>
</el-row> </el-row>
@ -363,21 +362,98 @@ export default {
'AGENCY_ID': 'like' 'AGENCY_ID': 'like'
}, },
showSmartSearchForm: false, showSmartSearchForm: true,
formType: 'add', formType: 'add',
selBtnIndex: 1, selBtnIndex: 1,
btnList: [ btnList: [
{ {
name: '智能查询', name: '智能查询',
index: 1 index: 1,
}, },
{ {
name: '租户', 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: '第一党支部党员', 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 = []; // this.orgOptions = [];
}, },
handleSearch () { handleSearch () {
// console.log('formmmmm---', this.form) if (this.showSmartSearchForm) {
const itemTypes = ['daterange', 'timerange', 'checkbox'] let refObj = this.$refs['ref_rule']
let a = this.tempFormList.filter(item => item.itemType != 'inputRange')
let arr = a.filter((n) => n.isChange).map((item) => { refObj.getRule()
return { } else {
queryType: item.queryType, // console.log('formmmmm---', this.form)
tableName: item.tableName, const itemTypes = ['daterange', 'timerange', 'checkbox']
columnName: item.columnName, let a = this.tempFormList.filter(item => item.itemType != 'inputRange')
// columnValue: [] let arr = a.filter((n) => n.isChange).map((item) => {
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) => {
return { 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] const arr2 = arr.filter(item => item.columnValue.length > 0)
this.$emit('search', arr3) let arr1 = this.fixedList
return arr3 .filter((n) => n.columnValue.length > 0)
.map((item) => {
return {
...item
}
})
let arr3 = [...arr1, ...arr2]
this.$emit('search', arr3)
return arr3
}
}, },
handleOpenSearch () { handleOpenSearch () {
this.openSearch = !this.openSearch this.openSearch = !this.openSearch

989
src/views/components/smartSearchRule.vue

File diff suppressed because it is too large
Loading…
Cancel
Save