index.js
3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-10-27 15:47:40
*/
export default {
data () {
return {
isSearch: false,
searchList: [],
otherForm: {}
}
},
methods: {
/**
* @description: 点击高级查询弹出查询弹框
* @author: renchao
*/
moreQueryClick () {
this.isSearch = true
},
/**
* @description: 查询事件
* @param {*} bs
* @param {*} mc
* @param {*} code
* @author: renchao
*/
handleSelect (bs, mc, code) {
this.dictData[bs].forEach(item => {
if (item.dcode == this.queryForm[code]) {
this.searchForm[mc] = item.dname
}
})
},
/**
* @description: 清空单个表单
* @param {*} el
* @author: renchao
*/
handleEmpty (el) {
// for (var i = 0; i < this.searchList.length; i++) {
// if (el == this.searchList[i].zdm) {
// this.searchList.splice(i, 1)
// }
// }
let obj = {
ywlymc: 'ywly',
qllxmc: 'qllx',
djlxmc: 'djlx'
}
if (obj[el]) {
this.queryForm[obj[el]] = ''
} else if (this.otherForm[[el]]) {
this.otherForm[[el]] = ''
} else {
this.queryForm[el] = ''
}
this.searchForm[el] = ''
},
/**
* @description: 删除单个查询条件
* @param {*} item
* @param {*} index
* @author: renchao
*/
handelItem (item, index) {
let obj = {
ywlymc: 'ywly',
qllxmc: 'qllx',
djlxmc: 'djlx'
}
this.searchList.splice(index, 1)
if (obj[item.zdm]) {
this.queryForm[obj[item.zdm]] = ''
} else if (this.otherForm[[item.zdm]]) {
this.otherForm[[item.zdm]] = ''
} else {
this.queryForm[item.zdm] = ''
}
this.searchForm[item.zdm] = ''
this.queryClick()
},
/**
* @description: iterationData
* @author: renchao
*/
iterationData () {
let obj = {
ywlymc: '业务来源', qllxmc: '权利类型', djlxmc: '登记类型', ywh: '业务号', sqywmc: '申请业务名称',
bdcdyh: '不动产单元号', qlrmc: '权利人', ywrmc: '义务人', slsj: '受理时间',
sqrmc: '申请人', sqrzjhm: '申请人证件号', zl: '坐落'
}
this.searchList = Object.entries({ ...this.searchForm, ...this.otherForm }).map((item) => {
const [name, value] = item
if (value) return { name: obj[name], value, zdm: name }
}).filter(Boolean)
},
/**
* @description: getSearch
* @param {*} val
* @author: renchao
*/
getSearch (val) {
console.log(val, '2222222222222');
this.otherForm = val
this.iterationData()
this.queryClick()
},
/**
* @description: 清空查询条件
* @author: renchao
*/
hanldeCleanAll () {
this.searchForm = {}
this.queryForm = {
ywly: "",
qllx: "",
djlx: "",
ywh: "",
bdcdyh: "",
sqrmc: "",
sqrzjhm: "",
zl: ""
}
this.otherForm = {}
this.searchList = []
this.queryClick()
}
}
}