@tongfun/tf-widget 0.1.21 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -49
- package/lib/tf-widget.common.js +547 -503
- package/lib/tf-widget.css +1 -1
- package/lib/tf-widget.umd.js +547 -503
- package/lib/tf-widget.umd.min.js +4 -4
- package/package/svg-icon/index.js +8 -8
- package/package/svg-icon/src/SvgIcon.vue +59 -59
- package/package/t-data-list/index.js +6 -6
- package/package/t-data-list/main.vue +193 -193
- package/package/t-data-list/src/condition-input/basic.vue +31 -31
- package/package/t-data-list/src/condition-input/date.vue +106 -106
- package/package/t-data-list/src/condition-input/index.vue +100 -100
- package/package/t-data-list/src/condition-input/input.vue +31 -31
- package/package/t-data-list/src/condition-input/number.vue +115 -115
- package/package/t-data-list/src/condition-input/select.vue +86 -86
- package/package/t-data-list/src/js/fieldTypeEnum.js +10 -10
- package/package/t-data-list/src/js/operatorEnum.js +108 -108
- package/package/t-data-list/src/js/qureyParamsEnum.js +4 -4
- package/package/t-data-list/src/js/util.js +34 -34
- package/package/t-data-list/src/mixins/button-controll-mixin.js +93 -93
- package/package/t-data-list/src/pushdown/push-down.vue +158 -158
- package/package/t-data-list/src/t-list-search.vue +36 -36
- package/package/t-data-list/src/t-plan/condition-always-item.vue +143 -143
- package/package/t-data-list/src/t-plan/condition-mult-item.vue +222 -222
- package/package/t-data-list/src/t-plan/index.vue +195 -195
- package/package/t-data-list/src/t-plan/plan-content.vue +389 -389
- package/package/t-data-list/src/t-table/index.vue +129 -129
- package/package/t-data-list/src/t-table/table-group-item-edit.vue +238 -238
- package/package/t-data-list/src/t-table/table-group-item.vue +87 -87
- package/package/t-data-list/src/t-table/table-group.vue +180 -180
- package/package/t-data-list/src/t-table/table-records-header-popover.vue +246 -246
- package/package/t-data-list/src/t-table/table-records-selected.vue +159 -159
- package/package/t-data-list/src/t-table/table-records.vue +337 -337
- package/package/t-input/children/address.vue +101 -101
- package/package/t-input/children/basic-display.vue +41 -41
- package/package/t-input/children/basic.vue +253 -253
- package/package/t-input/children/date.vue +89 -89
- package/package/t-input/children/group-components/group-dialog.vue +344 -344
- package/package/t-input/children/group.vue +126 -126
- package/package/t-input/children/input.vue +72 -72
- package/package/t-input/children/number.vue +74 -74
- package/package/t-input/children/select.vue +89 -89
- package/package/t-input/children/tfile/fiile-enclosure.vue +233 -233
- package/package/t-input/index.js +7 -7
- package/package/t-input/index.vue +337 -337
- package/package/t-input/tInputCache.js +24 -24
- package/package/tf-icon-picker/README.md +7 -7
- package/package/tf-icon-picker/index.js +8 -8
- package/package/tf-icon-picker/src/tf-icon-picker.vue +266 -266
- package/package/tf-layout/README.md +115 -115
- package/package/tf-layout/index.js +8 -8
- package/package/tf-layout/src/components/tf-labelbar.vue +394 -394
- package/package/tf-layout/src/components/tf-menu.vue +180 -180
- package/package/tf-layout/src/components/tf-right-menu.vue +89 -89
- package/package/tf-layout/src/components/tf-rotate-box.vue +50 -50
- package/package/tf-layout/src/tf-layout.vue +140 -140
- package/package/tf-widget/index.js +8 -8
- package/package/tf-widget/src/assets/common-input.less +10 -10
- package/package/tf-widget/src/children/basic-data/basic-data.vue +361 -361
- package/package/tf-widget/src/children/basic-data/dependcy/basic-data-selector.vue +1087 -1087
- package/package/tf-widget/src/children/basic-data/dependcy/common-table.vue +750 -750
- package/package/tf-widget/src/children/basic-data/dependcy/condition-filter.vue +519 -519
- package/package/tf-widget/src/children/basic-data/dependcy/pagination.vue +93 -93
- package/package/tf-widget/src/children/basic-data/dependcy/table-control.vue +240 -240
- package/package/tf-widget/src/children/basic-data/dependcy/view-picture.vue +108 -108
- package/package/tf-widget/src/children/date-time.vue +103 -103
- package/package/tf-widget/src/children/date.vue +103 -103
- package/package/tf-widget/src/children/decimal.vue +115 -115
- package/package/tf-widget/src/children/integer.vue +104 -104
- package/package/tf-widget/src/children/property.vue +59 -59
- package/package/tf-widget/src/children/single-line-text.vue +82 -82
- package/package/tf-widget/src/children/small-pictures.vue +223 -223
- package/package/tf-widget/src/children/text-area.vue +74 -74
- package/package/tf-widget/src/children/tf-select.vue +113 -113
- package/package/tf-widget/src/tf-widget.vue +175 -175
- package/package.json +44 -44
- package/src/api/edit.js +97 -97
- package/src/api/file-enclosure.js +26 -26
- package/src/api/push-down.js +19 -19
- package/src/api/table.js +294 -294
- package/src/api/tableV3.js +166 -160
- package/src/assets/images/icons/index.js +9 -9
- package/src/assets/images/icons/svg/add.svg +5 -5
- package/src/assets/images/icons/svg/push-down.svg +1 -1
- package/src/assets/images/icons/svg/remove.svg +1 -1
- package/src/assets/styles/common-table.less +202 -202
- package/src/directives/debounce.js +24 -24
- package/src/index.js +31 -31
- package/src/mixins/t-data-query-mixin.js +290 -290
- package/src/utils/auth.js +22 -22
- package/src/utils/request.js +42 -42
- package/src/utils/stato-anormale.js +59 -59
- package/src/utils/utils.js +109 -109
- package/src/utils/validate.js +84 -84
|
@@ -1,519 +1,519 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="condition-filter-component">
|
|
3
|
-
|
|
4
|
-
<!-- 快捷过滤-->
|
|
5
|
-
<div v-if="isQuickFilter" style="display: flex;height: 100%">
|
|
6
|
-
<!-- <template v-for="(item,index) in quickFilterData.filterArr">
|
|
7
|
-
<el-date-picker
|
|
8
|
-
v-if="item.fieldType==='DATETIME'"
|
|
9
|
-
:key="index"
|
|
10
|
-
v-model="quickFilterData[item.id]"
|
|
11
|
-
value-format="yyyy-MM-dd"
|
|
12
|
-
type="date"
|
|
13
|
-
:placeholder="item.valueDescription"
|
|
14
|
-
/>
|
|
15
|
-
<el-autocomplete
|
|
16
|
-
v-else
|
|
17
|
-
:key="index"
|
|
18
|
-
v-model="quickFilterData[item.id]"
|
|
19
|
-
:placeholder="item.valueDescription"
|
|
20
|
-
:fetch-suggestions="querySearch"
|
|
21
|
-
@focus="suggestConditionFocus(item)"
|
|
22
|
-
/>
|
|
23
|
-
</template>-->
|
|
24
|
-
<div v-if="placeholderData !== ''" class="quick-filter">
|
|
25
|
-
<el-input
|
|
26
|
-
v-model="testData"
|
|
27
|
-
:placeholder="`以${placeholderData}查询`"
|
|
28
|
-
@keyup.enter.native="getFilterTableData"
|
|
29
|
-
>
|
|
30
|
-
<i slot="prefix" class="el-icon-search" />
|
|
31
|
-
</el-input>
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
<div class="button-group">
|
|
35
|
-
<!-- <el-button type="primary" @click="quickFilterStartMethod">快捷过滤</el-button>-->
|
|
36
|
-
<!-- <el-button type="primary" @click="quickConditionClear">重置</el-button>-->
|
|
37
|
-
<el-button type="primary" @click="changeIsQuickFilter">高级过滤</el-button>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<!-- 高级过滤-->
|
|
42
|
-
<div v-else style="display: flex;align-items: flex-start">
|
|
43
|
-
|
|
44
|
-
<!-- 单行高级过滤-->
|
|
45
|
-
<div v-if="rotateValue" class="single-line">
|
|
46
|
-
<el-select v-model="moreConditionFilterData.name.value[0]" placeholder="" class="field-select" @change="changeMoreConditionName">
|
|
47
|
-
<el-option
|
|
48
|
-
v-for="(item,index) in moreConditionFilterData.name.arr"
|
|
49
|
-
:key="index"
|
|
50
|
-
:label="item.label"
|
|
51
|
-
:value="item.value"
|
|
52
|
-
/>
|
|
53
|
-
</el-select>
|
|
54
|
-
<el-select v-model="moreConditionFilterData.condition.value[0]" placeholder="" class="condition-select" @change="clearDateTime(0)">
|
|
55
|
-
<el-option
|
|
56
|
-
v-for="(item,index) in moreConditionFilterData.condition.arr[0]"
|
|
57
|
-
:key="index"
|
|
58
|
-
:label="item.label"
|
|
59
|
-
:value="item.value"
|
|
60
|
-
/>
|
|
61
|
-
</el-select>
|
|
62
|
-
<el-date-picker
|
|
63
|
-
v-if="moreConditionFilterData.type[0] === 'datetime'"
|
|
64
|
-
v-model="moreConditionFilterData.value[0]"
|
|
65
|
-
value-format="yyyy-MM-dd"
|
|
66
|
-
type="date"
|
|
67
|
-
placeholder="请选择"
|
|
68
|
-
class="value-input"
|
|
69
|
-
:disabled="getDateTimeIsDisabled(0)"
|
|
70
|
-
/>
|
|
71
|
-
<el-input v-else v-model="moreConditionFilterData.value[0]" class="value-input" />
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
<!-- 多行高级过滤-->
|
|
75
|
-
<div v-else class="multiple-lines">
|
|
76
|
-
<div v-for="(item,index) in moreConditionFilterData.value" :key="index" class="multiple-line">
|
|
77
|
-
<el-select v-model="moreConditionFilterData.leftBracket.value[index]" placeholder="" class="bracket-select">
|
|
78
|
-
<el-option
|
|
79
|
-
v-for="(item2, index2) in moreConditionFilterData.leftBracket.arr"
|
|
80
|
-
:key="index2"
|
|
81
|
-
:label="item2.label"
|
|
82
|
-
:value="item2.value"
|
|
83
|
-
/>
|
|
84
|
-
</el-select>
|
|
85
|
-
<el-select v-model="moreConditionFilterData.name.value[index]" placeholder="" class="field-select" @change="changeMoreConditionName">
|
|
86
|
-
<el-option
|
|
87
|
-
v-for="(item2, index2) in moreConditionFilterData.name.arr"
|
|
88
|
-
:key="index2"
|
|
89
|
-
:label="item2.label"
|
|
90
|
-
:value="item2.value"
|
|
91
|
-
/>
|
|
92
|
-
</el-select>
|
|
93
|
-
<el-select v-model="moreConditionFilterData.condition.value[index]" placeholder="" class="condition-select" @change="clearDateTime(index)">
|
|
94
|
-
<el-option
|
|
95
|
-
v-for="(item2, index2) in moreConditionFilterData.condition.arr[index]"
|
|
96
|
-
:key="index2"
|
|
97
|
-
:label="item2.label"
|
|
98
|
-
:value="item2.value"
|
|
99
|
-
/>
|
|
100
|
-
</el-select>
|
|
101
|
-
<el-date-picker
|
|
102
|
-
v-if="moreConditionFilterData.type[index] === 'datetime'"
|
|
103
|
-
v-model="moreConditionFilterData.value[index]"
|
|
104
|
-
value-format="yyyy-MM-dd"
|
|
105
|
-
type="date"
|
|
106
|
-
placeholder="请选择"
|
|
107
|
-
class="value-input"
|
|
108
|
-
:disabled="getDateTimeIsDisabled(0)"
|
|
109
|
-
/>
|
|
110
|
-
<el-input v-else v-model="moreConditionFilterData.value[index]" class="value-input" />
|
|
111
|
-
<el-select v-model="moreConditionFilterData.rightBracket.value[index]" placeholder="" class="bracket-select">
|
|
112
|
-
<el-option
|
|
113
|
-
v-for="(item2, index2) in moreConditionFilterData.rightBracket.arr"
|
|
114
|
-
:key="index2"
|
|
115
|
-
:label="item2.label"
|
|
116
|
-
:value="item2.value"
|
|
117
|
-
/>
|
|
118
|
-
</el-select>
|
|
119
|
-
<el-select v-if="index !== moreConditionFilterData.name.value.length - 1" v-model="moreConditionFilterData.relatedCondition.value[index]" placeholder="" class="bracket-select">
|
|
120
|
-
<el-option
|
|
121
|
-
v-for="(item2, index2) in moreConditionFilterData.relatedCondition.arr"
|
|
122
|
-
:key="index2"
|
|
123
|
-
:label="item2.label"
|
|
124
|
-
:value="item2.value"
|
|
125
|
-
/>
|
|
126
|
-
</el-select>
|
|
127
|
-
<SvgIcon v-if="index !== moreConditionFilterData.name.value.length -1" icon-class="remove" class="remove-icon" @click="removeMultipleLine(index)" />
|
|
128
|
-
</div>
|
|
129
|
-
<SvgIcon icon-class="add" class="add-icon" @click="addMultipleLine" />
|
|
130
|
-
</div>
|
|
131
|
-
<div class="button-group">
|
|
132
|
-
<el-button type="primary" @click="moreConditionSearchMethod">搜索</el-button>
|
|
133
|
-
<el-button type="primary" @click="moreConditionClear">重置</el-button>
|
|
134
|
-
<el-button type="primary" @click="changeIsQuickFilter">快捷</el-button>
|
|
135
|
-
<SvgIcon icon-class="push-down" class="push-down" :class="rotateValue ? 'down' :'up'" @click="changeRotate" />
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
|
|
139
|
-
</div>
|
|
140
|
-
</template>
|
|
141
|
-
|
|
142
|
-
<script>
|
|
143
|
-
|
|
144
|
-
export default {
|
|
145
|
-
name: 'ConditionFilter',
|
|
146
|
-
props: {
|
|
147
|
-
// 是否为快捷过滤
|
|
148
|
-
isQuickFilter: {
|
|
149
|
-
type: Boolean,
|
|
150
|
-
default: true
|
|
151
|
-
},
|
|
152
|
-
// 快捷过滤搜索框
|
|
153
|
-
quickFilterData: {
|
|
154
|
-
type: Object,
|
|
155
|
-
default: () => {
|
|
156
|
-
return {}
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
// 快捷过滤搜索框建议
|
|
160
|
-
conditionFilterSuggest: {
|
|
161
|
-
type: Object,
|
|
162
|
-
default: () => {
|
|
163
|
-
return {}
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
// 高级过滤为单行/多行
|
|
167
|
-
rotate: {
|
|
168
|
-
type: Boolean,
|
|
169
|
-
default: true
|
|
170
|
-
},
|
|
171
|
-
moreConditionFilterMap: {
|
|
172
|
-
type: Map,
|
|
173
|
-
default: new Map()
|
|
174
|
-
},
|
|
175
|
-
moreConditionFilterData: {
|
|
176
|
-
type: Object,
|
|
177
|
-
default: new Map()
|
|
178
|
-
},
|
|
179
|
-
placeholderData: {
|
|
180
|
-
type: String,
|
|
181
|
-
default: ''
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
data () {
|
|
185
|
-
return {
|
|
186
|
-
conditionFilterSuggestArr: [], // 快捷过滤搜索建议
|
|
187
|
-
rotateValue: this.rotate,
|
|
188
|
-
quickFilterStartMethod: null, // 快捷过滤防抖查询
|
|
189
|
-
moreConditionSearchMethod: null, // 高级过滤防抖查询
|
|
190
|
-
testData: '' // 内容过滤关键字
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
created () {
|
|
194
|
-
// 定义防抖方法
|
|
195
|
-
this.quickFilterStartMethod = this.utils.debounce(this.quickFilterStart)
|
|
196
|
-
this.moreConditionSearchMethod = this.utils.debounce(this.moreConditionSearch)
|
|
197
|
-
},
|
|
198
|
-
methods: {
|
|
199
|
-
|
|
200
|
-
getFilterTableData (event) {
|
|
201
|
-
this.$emit('getFilterTableData', event.target.value)
|
|
202
|
-
},
|
|
203
|
-
|
|
204
|
-
// 过滤字段为时间类型时,清除时间值
|
|
205
|
-
clearDateTime (index) {
|
|
206
|
-
if (this.moreConditionFilterData.type[index] === 'datetime') {
|
|
207
|
-
if (this.moreConditionFilterData.condition.value[index] !== 'less' &&
|
|
208
|
-
this.moreConditionFilterData.condition.value[index] !== 'greater' &&
|
|
209
|
-
this.moreConditionFilterData.condition.value[index] !== 'equal') {
|
|
210
|
-
this.moreConditionFilterData.value[index] = ''
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
|
|
215
|
-
// 判断日期选择框是否可选
|
|
216
|
-
getDateTimeIsDisabled (index) {
|
|
217
|
-
return this.moreConditionFilterData.condition.value[index] !== 'less' &&
|
|
218
|
-
this.moreConditionFilterData.condition.value[index] !== 'greater' &&
|
|
219
|
-
this.moreConditionFilterData.condition.value[index] !== 'equal'
|
|
220
|
-
},
|
|
221
|
-
|
|
222
|
-
suggestConditionFocus (value) {
|
|
223
|
-
this.conditionFilterSuggestArr = this.conditionFilterSuggest[value.id]
|
|
224
|
-
},
|
|
225
|
-
|
|
226
|
-
// 切换快捷过滤 与 高级过滤
|
|
227
|
-
changeIsQuickFilter () {
|
|
228
|
-
this.$emit('changeIsQuickFilter', this.isQuickFilter)
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
querySearch (queryString, cb) {
|
|
232
|
-
const restaurants = this.conditionFilterSuggestArr
|
|
233
|
-
const results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
|
|
234
|
-
// 调用 callback 返回建议列表的数据
|
|
235
|
-
cb(results)
|
|
236
|
-
},
|
|
237
|
-
|
|
238
|
-
createFilter (queryString) {
|
|
239
|
-
return (restaurant) => {
|
|
240
|
-
return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) !== -1)
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
|
|
244
|
-
// 快捷过滤重置
|
|
245
|
-
quickConditionClear () {
|
|
246
|
-
this.$emit('quickConditionClear')
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
// 快捷过滤
|
|
250
|
-
quickFilterStart () {
|
|
251
|
-
this.$emit('quickFilterStart')
|
|
252
|
-
},
|
|
253
|
-
|
|
254
|
-
// 高级过滤改变名称
|
|
255
|
-
changeMoreConditionName (val) {
|
|
256
|
-
// 此校验在父组件watch中实现
|
|
257
|
-
// // 校验该字段是否已经选择过
|
|
258
|
-
// if (this.checkCondition(val)) {
|
|
259
|
-
// this.$message.error('字段重复,请重新选择!')
|
|
260
|
-
// return false
|
|
261
|
-
// }
|
|
262
|
-
// 更新高级过滤条件数组
|
|
263
|
-
this.$emit('updateMoreCondition', val)
|
|
264
|
-
},
|
|
265
|
-
|
|
266
|
-
// 高级过滤搜索
|
|
267
|
-
moreConditionSearch () {
|
|
268
|
-
// 如果是多行模式下,点击搜索切换显示模式
|
|
269
|
-
if (!this.rotateValue) {
|
|
270
|
-
// 多行模式下,先校验信息是否完整,此处的校验方法与父组件的方法类似
|
|
271
|
-
// if (this.checkMoreCondition()) {
|
|
272
|
-
// this.$message.error('请完整填写!')
|
|
273
|
-
// return false
|
|
274
|
-
// }
|
|
275
|
-
this.changeRotate()
|
|
276
|
-
}
|
|
277
|
-
this.$emit('moreConditionSearch')
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
// 高级过滤重置
|
|
281
|
-
moreConditionClear () {
|
|
282
|
-
this.$emit('moreConditionClear')
|
|
283
|
-
},
|
|
284
|
-
|
|
285
|
-
// 切换单行过滤或者是多行过滤
|
|
286
|
-
changeRotate () {
|
|
287
|
-
this.rotateValue = !this.rotateValue
|
|
288
|
-
this.$emit('changeRotate', this.rotateValue)
|
|
289
|
-
},
|
|
290
|
-
|
|
291
|
-
// 新增筛选行
|
|
292
|
-
addMultipleLine () {
|
|
293
|
-
this.$emit('addMultipleLine')
|
|
294
|
-
},
|
|
295
|
-
|
|
296
|
-
// 移除当前筛选行
|
|
297
|
-
removeMultipleLine (index) {
|
|
298
|
-
this.$emit('removeMultipleLine', index)
|
|
299
|
-
},
|
|
300
|
-
|
|
301
|
-
// 校验高级过滤条件重复
|
|
302
|
-
checkCondition (val) {
|
|
303
|
-
let flag = false
|
|
304
|
-
this.moreConditionFilterData.name.value.forEach((item, index) => {
|
|
305
|
-
// 排除当前index
|
|
306
|
-
const indexValue = this.moreConditionFilterData.name.value.findIndex(d => d === val)
|
|
307
|
-
if (this.moreConditionFilterData.name.value[index] === val && index !== indexValue) {
|
|
308
|
-
flag = true
|
|
309
|
-
}
|
|
310
|
-
})
|
|
311
|
-
return flag
|
|
312
|
-
},
|
|
313
|
-
|
|
314
|
-
// 校验高级过滤条件是否填写完整
|
|
315
|
-
checkMoreCondition () {
|
|
316
|
-
// 校验
|
|
317
|
-
let flag = false
|
|
318
|
-
this.moreConditionFilterData.name.value.forEach((item, index) => {
|
|
319
|
-
// 如果选中了字段,代表需要过滤条件
|
|
320
|
-
if (this.moreConditionFilterData.name.value[0] !== '') {
|
|
321
|
-
if (!this.moreConditionFilterData.leftBracket.value[index] ||
|
|
322
|
-
!this.moreConditionFilterData.name.value[index] ||
|
|
323
|
-
!this.moreConditionFilterData.condition.value[index] ||
|
|
324
|
-
!this.moreConditionFilterData.value[index] ||
|
|
325
|
-
!this.moreConditionFilterData.rightBracket.value[index]) {
|
|
326
|
-
flag = true
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
})
|
|
330
|
-
return flag
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
</script>
|
|
336
|
-
|
|
337
|
-
<style lang="less" scoped>
|
|
338
|
-
|
|
339
|
-
.el-select-dropdown__item{
|
|
340
|
-
height: 2.222vh;
|
|
341
|
-
line-height: 2.222vh;
|
|
342
|
-
font-size: 0.625vw;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.condition-filter-component{
|
|
346
|
-
height: 2.222vh;
|
|
347
|
-
display: flex;
|
|
348
|
-
align-items: flex-start;
|
|
349
|
-
|
|
350
|
-
// 内容过滤样式
|
|
351
|
-
.quick-filter {
|
|
352
|
-
height: 100%;
|
|
353
|
-
border-bottom: 1px solid #dcdcdc;
|
|
354
|
-
::v-deep .el-input__inner {
|
|
355
|
-
height: calc(100% - 1px);
|
|
356
|
-
border: none;
|
|
357
|
-
}
|
|
358
|
-
::v-deep .el-input--prefix{
|
|
359
|
-
height: 100%;
|
|
360
|
-
display: flex;
|
|
361
|
-
//align-items: center;
|
|
362
|
-
font-size: 0.8vw;
|
|
363
|
-
}
|
|
364
|
-
::v-deep .el-input__inner::placeholder{
|
|
365
|
-
color: #999999;
|
|
366
|
-
font-size: 0.625vw;
|
|
367
|
-
}
|
|
368
|
-
// ::v-deep .el-input__prefix{
|
|
369
|
-
// //height: calc(100% - 2px);
|
|
370
|
-
// //color: #999999;
|
|
371
|
-
// //font-size: 0.8vw;
|
|
372
|
-
// }
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
::v-deep .el-input{
|
|
376
|
-
height: 100%;
|
|
377
|
-
display: flex;
|
|
378
|
-
}
|
|
379
|
-
::v-deep .el-input__suffix{
|
|
380
|
-
display: flex;
|
|
381
|
-
align-items: center;
|
|
382
|
-
}
|
|
383
|
-
// ::v-deep .el-icon-arrow-up{
|
|
384
|
-
// //display: flex;
|
|
385
|
-
// //align-items: center;
|
|
386
|
-
// }
|
|
387
|
-
::v-deep .el-icon-arrow-up:before{
|
|
388
|
-
font-size: 0.625vw;
|
|
389
|
-
}
|
|
390
|
-
/*筛选框统一高度*/
|
|
391
|
-
::v-deep .el-input__inner{
|
|
392
|
-
height: 2.222vh;
|
|
393
|
-
font-size: 0.625vw;
|
|
394
|
-
}
|
|
395
|
-
/*下拉框图标统一高度*/
|
|
396
|
-
::v-deep .el-input__icon{
|
|
397
|
-
height: 2.222vh;
|
|
398
|
-
line-height: 2.222vh;
|
|
399
|
-
}
|
|
400
|
-
/*字段下拉框样式*/
|
|
401
|
-
.field-select{
|
|
402
|
-
margin-right: 0.1vh;
|
|
403
|
-
::v-deep .el-input {
|
|
404
|
-
width: 8vw;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
/*条件下拉框样式*/
|
|
408
|
-
.condition-select{
|
|
409
|
-
margin-right:0.1vh;
|
|
410
|
-
::v-deep .el-input {
|
|
411
|
-
width: 6vw;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
/*括号下拉框样式*/
|
|
415
|
-
.bracket-select{
|
|
416
|
-
margin-right:0.1vh;
|
|
417
|
-
::v-deep .el-input {
|
|
418
|
-
width: 6vw;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
/*值输入框样式*/
|
|
422
|
-
.value-input{
|
|
423
|
-
width: 5vw;
|
|
424
|
-
margin-right:0.1vh;
|
|
425
|
-
::v-deep .el-input__inner{
|
|
426
|
-
width: 5vw;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
/*单行筛选框*/
|
|
431
|
-
.single-line{
|
|
432
|
-
width: 20vw;
|
|
433
|
-
height: 100%;
|
|
434
|
-
display: flex;
|
|
435
|
-
//margin-right: -1.5vw;
|
|
436
|
-
.el-select:nth-child(2){
|
|
437
|
-
margin: 0 0.5vw;
|
|
438
|
-
}
|
|
439
|
-
.el-input:nth-last-child(1){
|
|
440
|
-
margin-right: 1vw;
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
@media screen and (max-width: 1920px){
|
|
444
|
-
.single-line{
|
|
445
|
-
width: 20vw;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
@media screen and (max-width: 1366px){
|
|
449
|
-
.single-line{
|
|
450
|
-
width: 20vw;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
/*多行筛选框*/
|
|
454
|
-
.multiple-lines{
|
|
455
|
-
z-index: 999;
|
|
456
|
-
border: 1px solid #0261a4;
|
|
457
|
-
border-radius: 0.9259vh;
|
|
458
|
-
box-sizing: border-box;
|
|
459
|
-
padding: 1.3889vh;
|
|
460
|
-
background: #FFFFFF;
|
|
461
|
-
.multiple-line{
|
|
462
|
-
height: 2.222vh;
|
|
463
|
-
margin-bottom: 1vh;
|
|
464
|
-
display: flex;
|
|
465
|
-
align-items: center;
|
|
466
|
-
::v-deep .el-select{
|
|
467
|
-
height: 100%;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
.remove-icon{
|
|
471
|
-
width: 0.625vw;
|
|
472
|
-
height: 0.625vw;
|
|
473
|
-
margin-left: 10px;
|
|
474
|
-
cursor: pointer;
|
|
475
|
-
}
|
|
476
|
-
.add-icon{
|
|
477
|
-
width: 0.625vw;
|
|
478
|
-
height: 0.625vw;
|
|
479
|
-
cursor: pointer;
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
/*按钮组样式*/
|
|
483
|
-
.button-group {
|
|
484
|
-
display: flex;
|
|
485
|
-
align-items: center;
|
|
486
|
-
margin-left: 1.2vw;
|
|
487
|
-
::v-deep .el-button--primary{
|
|
488
|
-
width: 3.5vw;
|
|
489
|
-
height: 2.2222vh;
|
|
490
|
-
padding: 0;
|
|
491
|
-
background: #ecf5ff;
|
|
492
|
-
border: 1px solid #0c4c8e;
|
|
493
|
-
border-radius: 5px;
|
|
494
|
-
font-size: 0.625vw;
|
|
495
|
-
font-family: Source Han Sans SC, Source Han Sans SC-Normal;
|
|
496
|
-
font-weight: Normal;
|
|
497
|
-
text-align: center;
|
|
498
|
-
color: #085497;
|
|
499
|
-
}
|
|
500
|
-
::v-deep .el-button:nth-child(2) {
|
|
501
|
-
margin: 0 0.5vw;
|
|
502
|
-
}
|
|
503
|
-
/*图标按钮样式*/
|
|
504
|
-
.push-down{
|
|
505
|
-
width: 2vh;
|
|
506
|
-
height: 2vh;
|
|
507
|
-
margin-left: 0.5vw;
|
|
508
|
-
cursor: pointer;
|
|
509
|
-
}
|
|
510
|
-
.up{
|
|
511
|
-
transform: rotate(-180deg);
|
|
512
|
-
transition: all 0.5s;
|
|
513
|
-
}
|
|
514
|
-
.down{
|
|
515
|
-
transition: all 0.5s;
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="condition-filter-component">
|
|
3
|
+
|
|
4
|
+
<!-- 快捷过滤-->
|
|
5
|
+
<div v-if="isQuickFilter" style="display: flex;height: 100%">
|
|
6
|
+
<!-- <template v-for="(item,index) in quickFilterData.filterArr">
|
|
7
|
+
<el-date-picker
|
|
8
|
+
v-if="item.fieldType==='DATETIME'"
|
|
9
|
+
:key="index"
|
|
10
|
+
v-model="quickFilterData[item.id]"
|
|
11
|
+
value-format="yyyy-MM-dd"
|
|
12
|
+
type="date"
|
|
13
|
+
:placeholder="item.valueDescription"
|
|
14
|
+
/>
|
|
15
|
+
<el-autocomplete
|
|
16
|
+
v-else
|
|
17
|
+
:key="index"
|
|
18
|
+
v-model="quickFilterData[item.id]"
|
|
19
|
+
:placeholder="item.valueDescription"
|
|
20
|
+
:fetch-suggestions="querySearch"
|
|
21
|
+
@focus="suggestConditionFocus(item)"
|
|
22
|
+
/>
|
|
23
|
+
</template>-->
|
|
24
|
+
<div v-if="placeholderData !== ''" class="quick-filter">
|
|
25
|
+
<el-input
|
|
26
|
+
v-model="testData"
|
|
27
|
+
:placeholder="`以${placeholderData}查询`"
|
|
28
|
+
@keyup.enter.native="getFilterTableData"
|
|
29
|
+
>
|
|
30
|
+
<i slot="prefix" class="el-icon-search" />
|
|
31
|
+
</el-input>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="button-group">
|
|
35
|
+
<!-- <el-button type="primary" @click="quickFilterStartMethod">快捷过滤</el-button>-->
|
|
36
|
+
<!-- <el-button type="primary" @click="quickConditionClear">重置</el-button>-->
|
|
37
|
+
<el-button type="primary" @click="changeIsQuickFilter">高级过滤</el-button>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<!-- 高级过滤-->
|
|
42
|
+
<div v-else style="display: flex;align-items: flex-start">
|
|
43
|
+
|
|
44
|
+
<!-- 单行高级过滤-->
|
|
45
|
+
<div v-if="rotateValue" class="single-line">
|
|
46
|
+
<el-select v-model="moreConditionFilterData.name.value[0]" placeholder="" class="field-select" @change="changeMoreConditionName">
|
|
47
|
+
<el-option
|
|
48
|
+
v-for="(item,index) in moreConditionFilterData.name.arr"
|
|
49
|
+
:key="index"
|
|
50
|
+
:label="item.label"
|
|
51
|
+
:value="item.value"
|
|
52
|
+
/>
|
|
53
|
+
</el-select>
|
|
54
|
+
<el-select v-model="moreConditionFilterData.condition.value[0]" placeholder="" class="condition-select" @change="clearDateTime(0)">
|
|
55
|
+
<el-option
|
|
56
|
+
v-for="(item,index) in moreConditionFilterData.condition.arr[0]"
|
|
57
|
+
:key="index"
|
|
58
|
+
:label="item.label"
|
|
59
|
+
:value="item.value"
|
|
60
|
+
/>
|
|
61
|
+
</el-select>
|
|
62
|
+
<el-date-picker
|
|
63
|
+
v-if="moreConditionFilterData.type[0] === 'datetime'"
|
|
64
|
+
v-model="moreConditionFilterData.value[0]"
|
|
65
|
+
value-format="yyyy-MM-dd"
|
|
66
|
+
type="date"
|
|
67
|
+
placeholder="请选择"
|
|
68
|
+
class="value-input"
|
|
69
|
+
:disabled="getDateTimeIsDisabled(0)"
|
|
70
|
+
/>
|
|
71
|
+
<el-input v-else v-model="moreConditionFilterData.value[0]" class="value-input" />
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<!-- 多行高级过滤-->
|
|
75
|
+
<div v-else class="multiple-lines">
|
|
76
|
+
<div v-for="(item,index) in moreConditionFilterData.value" :key="index" class="multiple-line">
|
|
77
|
+
<el-select v-model="moreConditionFilterData.leftBracket.value[index]" placeholder="" class="bracket-select">
|
|
78
|
+
<el-option
|
|
79
|
+
v-for="(item2, index2) in moreConditionFilterData.leftBracket.arr"
|
|
80
|
+
:key="index2"
|
|
81
|
+
:label="item2.label"
|
|
82
|
+
:value="item2.value"
|
|
83
|
+
/>
|
|
84
|
+
</el-select>
|
|
85
|
+
<el-select v-model="moreConditionFilterData.name.value[index]" placeholder="" class="field-select" @change="changeMoreConditionName">
|
|
86
|
+
<el-option
|
|
87
|
+
v-for="(item2, index2) in moreConditionFilterData.name.arr"
|
|
88
|
+
:key="index2"
|
|
89
|
+
:label="item2.label"
|
|
90
|
+
:value="item2.value"
|
|
91
|
+
/>
|
|
92
|
+
</el-select>
|
|
93
|
+
<el-select v-model="moreConditionFilterData.condition.value[index]" placeholder="" class="condition-select" @change="clearDateTime(index)">
|
|
94
|
+
<el-option
|
|
95
|
+
v-for="(item2, index2) in moreConditionFilterData.condition.arr[index]"
|
|
96
|
+
:key="index2"
|
|
97
|
+
:label="item2.label"
|
|
98
|
+
:value="item2.value"
|
|
99
|
+
/>
|
|
100
|
+
</el-select>
|
|
101
|
+
<el-date-picker
|
|
102
|
+
v-if="moreConditionFilterData.type[index] === 'datetime'"
|
|
103
|
+
v-model="moreConditionFilterData.value[index]"
|
|
104
|
+
value-format="yyyy-MM-dd"
|
|
105
|
+
type="date"
|
|
106
|
+
placeholder="请选择"
|
|
107
|
+
class="value-input"
|
|
108
|
+
:disabled="getDateTimeIsDisabled(0)"
|
|
109
|
+
/>
|
|
110
|
+
<el-input v-else v-model="moreConditionFilterData.value[index]" class="value-input" />
|
|
111
|
+
<el-select v-model="moreConditionFilterData.rightBracket.value[index]" placeholder="" class="bracket-select">
|
|
112
|
+
<el-option
|
|
113
|
+
v-for="(item2, index2) in moreConditionFilterData.rightBracket.arr"
|
|
114
|
+
:key="index2"
|
|
115
|
+
:label="item2.label"
|
|
116
|
+
:value="item2.value"
|
|
117
|
+
/>
|
|
118
|
+
</el-select>
|
|
119
|
+
<el-select v-if="index !== moreConditionFilterData.name.value.length - 1" v-model="moreConditionFilterData.relatedCondition.value[index]" placeholder="" class="bracket-select">
|
|
120
|
+
<el-option
|
|
121
|
+
v-for="(item2, index2) in moreConditionFilterData.relatedCondition.arr"
|
|
122
|
+
:key="index2"
|
|
123
|
+
:label="item2.label"
|
|
124
|
+
:value="item2.value"
|
|
125
|
+
/>
|
|
126
|
+
</el-select>
|
|
127
|
+
<SvgIcon v-if="index !== moreConditionFilterData.name.value.length -1" icon-class="remove" class="remove-icon" @click="removeMultipleLine(index)" />
|
|
128
|
+
</div>
|
|
129
|
+
<SvgIcon icon-class="add" class="add-icon" @click="addMultipleLine" />
|
|
130
|
+
</div>
|
|
131
|
+
<div class="button-group">
|
|
132
|
+
<el-button type="primary" @click="moreConditionSearchMethod">搜索</el-button>
|
|
133
|
+
<el-button type="primary" @click="moreConditionClear">重置</el-button>
|
|
134
|
+
<el-button type="primary" @click="changeIsQuickFilter">快捷</el-button>
|
|
135
|
+
<SvgIcon icon-class="push-down" class="push-down" :class="rotateValue ? 'down' :'up'" @click="changeRotate" />
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
</div>
|
|
140
|
+
</template>
|
|
141
|
+
|
|
142
|
+
<script>
|
|
143
|
+
|
|
144
|
+
export default {
|
|
145
|
+
name: 'ConditionFilter',
|
|
146
|
+
props: {
|
|
147
|
+
// 是否为快捷过滤
|
|
148
|
+
isQuickFilter: {
|
|
149
|
+
type: Boolean,
|
|
150
|
+
default: true
|
|
151
|
+
},
|
|
152
|
+
// 快捷过滤搜索框
|
|
153
|
+
quickFilterData: {
|
|
154
|
+
type: Object,
|
|
155
|
+
default: () => {
|
|
156
|
+
return {}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
// 快捷过滤搜索框建议
|
|
160
|
+
conditionFilterSuggest: {
|
|
161
|
+
type: Object,
|
|
162
|
+
default: () => {
|
|
163
|
+
return {}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
// 高级过滤为单行/多行
|
|
167
|
+
rotate: {
|
|
168
|
+
type: Boolean,
|
|
169
|
+
default: true
|
|
170
|
+
},
|
|
171
|
+
moreConditionFilterMap: {
|
|
172
|
+
type: Map,
|
|
173
|
+
default: new Map()
|
|
174
|
+
},
|
|
175
|
+
moreConditionFilterData: {
|
|
176
|
+
type: Object,
|
|
177
|
+
default: new Map()
|
|
178
|
+
},
|
|
179
|
+
placeholderData: {
|
|
180
|
+
type: String,
|
|
181
|
+
default: ''
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
data () {
|
|
185
|
+
return {
|
|
186
|
+
conditionFilterSuggestArr: [], // 快捷过滤搜索建议
|
|
187
|
+
rotateValue: this.rotate,
|
|
188
|
+
quickFilterStartMethod: null, // 快捷过滤防抖查询
|
|
189
|
+
moreConditionSearchMethod: null, // 高级过滤防抖查询
|
|
190
|
+
testData: '' // 内容过滤关键字
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
created () {
|
|
194
|
+
// 定义防抖方法
|
|
195
|
+
this.quickFilterStartMethod = this.utils.debounce(this.quickFilterStart)
|
|
196
|
+
this.moreConditionSearchMethod = this.utils.debounce(this.moreConditionSearch)
|
|
197
|
+
},
|
|
198
|
+
methods: {
|
|
199
|
+
|
|
200
|
+
getFilterTableData (event) {
|
|
201
|
+
this.$emit('getFilterTableData', event.target.value)
|
|
202
|
+
},
|
|
203
|
+
|
|
204
|
+
// 过滤字段为时间类型时,清除时间值
|
|
205
|
+
clearDateTime (index) {
|
|
206
|
+
if (this.moreConditionFilterData.type[index] === 'datetime') {
|
|
207
|
+
if (this.moreConditionFilterData.condition.value[index] !== 'less' &&
|
|
208
|
+
this.moreConditionFilterData.condition.value[index] !== 'greater' &&
|
|
209
|
+
this.moreConditionFilterData.condition.value[index] !== 'equal') {
|
|
210
|
+
this.moreConditionFilterData.value[index] = ''
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
// 判断日期选择框是否可选
|
|
216
|
+
getDateTimeIsDisabled (index) {
|
|
217
|
+
return this.moreConditionFilterData.condition.value[index] !== 'less' &&
|
|
218
|
+
this.moreConditionFilterData.condition.value[index] !== 'greater' &&
|
|
219
|
+
this.moreConditionFilterData.condition.value[index] !== 'equal'
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
suggestConditionFocus (value) {
|
|
223
|
+
this.conditionFilterSuggestArr = this.conditionFilterSuggest[value.id]
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
// 切换快捷过滤 与 高级过滤
|
|
227
|
+
changeIsQuickFilter () {
|
|
228
|
+
this.$emit('changeIsQuickFilter', this.isQuickFilter)
|
|
229
|
+
},
|
|
230
|
+
|
|
231
|
+
querySearch (queryString, cb) {
|
|
232
|
+
const restaurants = this.conditionFilterSuggestArr
|
|
233
|
+
const results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
|
|
234
|
+
// 调用 callback 返回建议列表的数据
|
|
235
|
+
cb(results)
|
|
236
|
+
},
|
|
237
|
+
|
|
238
|
+
createFilter (queryString) {
|
|
239
|
+
return (restaurant) => {
|
|
240
|
+
return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) !== -1)
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
|
|
244
|
+
// 快捷过滤重置
|
|
245
|
+
quickConditionClear () {
|
|
246
|
+
this.$emit('quickConditionClear')
|
|
247
|
+
},
|
|
248
|
+
|
|
249
|
+
// 快捷过滤
|
|
250
|
+
quickFilterStart () {
|
|
251
|
+
this.$emit('quickFilterStart')
|
|
252
|
+
},
|
|
253
|
+
|
|
254
|
+
// 高级过滤改变名称
|
|
255
|
+
changeMoreConditionName (val) {
|
|
256
|
+
// 此校验在父组件watch中实现
|
|
257
|
+
// // 校验该字段是否已经选择过
|
|
258
|
+
// if (this.checkCondition(val)) {
|
|
259
|
+
// this.$message.error('字段重复,请重新选择!')
|
|
260
|
+
// return false
|
|
261
|
+
// }
|
|
262
|
+
// 更新高级过滤条件数组
|
|
263
|
+
this.$emit('updateMoreCondition', val)
|
|
264
|
+
},
|
|
265
|
+
|
|
266
|
+
// 高级过滤搜索
|
|
267
|
+
moreConditionSearch () {
|
|
268
|
+
// 如果是多行模式下,点击搜索切换显示模式
|
|
269
|
+
if (!this.rotateValue) {
|
|
270
|
+
// 多行模式下,先校验信息是否完整,此处的校验方法与父组件的方法类似
|
|
271
|
+
// if (this.checkMoreCondition()) {
|
|
272
|
+
// this.$message.error('请完整填写!')
|
|
273
|
+
// return false
|
|
274
|
+
// }
|
|
275
|
+
this.changeRotate()
|
|
276
|
+
}
|
|
277
|
+
this.$emit('moreConditionSearch')
|
|
278
|
+
},
|
|
279
|
+
|
|
280
|
+
// 高级过滤重置
|
|
281
|
+
moreConditionClear () {
|
|
282
|
+
this.$emit('moreConditionClear')
|
|
283
|
+
},
|
|
284
|
+
|
|
285
|
+
// 切换单行过滤或者是多行过滤
|
|
286
|
+
changeRotate () {
|
|
287
|
+
this.rotateValue = !this.rotateValue
|
|
288
|
+
this.$emit('changeRotate', this.rotateValue)
|
|
289
|
+
},
|
|
290
|
+
|
|
291
|
+
// 新增筛选行
|
|
292
|
+
addMultipleLine () {
|
|
293
|
+
this.$emit('addMultipleLine')
|
|
294
|
+
},
|
|
295
|
+
|
|
296
|
+
// 移除当前筛选行
|
|
297
|
+
removeMultipleLine (index) {
|
|
298
|
+
this.$emit('removeMultipleLine', index)
|
|
299
|
+
},
|
|
300
|
+
|
|
301
|
+
// 校验高级过滤条件重复
|
|
302
|
+
checkCondition (val) {
|
|
303
|
+
let flag = false
|
|
304
|
+
this.moreConditionFilterData.name.value.forEach((item, index) => {
|
|
305
|
+
// 排除当前index
|
|
306
|
+
const indexValue = this.moreConditionFilterData.name.value.findIndex(d => d === val)
|
|
307
|
+
if (this.moreConditionFilterData.name.value[index] === val && index !== indexValue) {
|
|
308
|
+
flag = true
|
|
309
|
+
}
|
|
310
|
+
})
|
|
311
|
+
return flag
|
|
312
|
+
},
|
|
313
|
+
|
|
314
|
+
// 校验高级过滤条件是否填写完整
|
|
315
|
+
checkMoreCondition () {
|
|
316
|
+
// 校验
|
|
317
|
+
let flag = false
|
|
318
|
+
this.moreConditionFilterData.name.value.forEach((item, index) => {
|
|
319
|
+
// 如果选中了字段,代表需要过滤条件
|
|
320
|
+
if (this.moreConditionFilterData.name.value[0] !== '') {
|
|
321
|
+
if (!this.moreConditionFilterData.leftBracket.value[index] ||
|
|
322
|
+
!this.moreConditionFilterData.name.value[index] ||
|
|
323
|
+
!this.moreConditionFilterData.condition.value[index] ||
|
|
324
|
+
!this.moreConditionFilterData.value[index] ||
|
|
325
|
+
!this.moreConditionFilterData.rightBracket.value[index]) {
|
|
326
|
+
flag = true
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
})
|
|
330
|
+
return flag
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
</script>
|
|
336
|
+
|
|
337
|
+
<style lang="less" scoped>
|
|
338
|
+
|
|
339
|
+
.el-select-dropdown__item{
|
|
340
|
+
height: 2.222vh;
|
|
341
|
+
line-height: 2.222vh;
|
|
342
|
+
font-size: 0.625vw;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.condition-filter-component{
|
|
346
|
+
height: 2.222vh;
|
|
347
|
+
display: flex;
|
|
348
|
+
align-items: flex-start;
|
|
349
|
+
|
|
350
|
+
// 内容过滤样式
|
|
351
|
+
.quick-filter {
|
|
352
|
+
height: 100%;
|
|
353
|
+
border-bottom: 1px solid #dcdcdc;
|
|
354
|
+
::v-deep .el-input__inner {
|
|
355
|
+
height: calc(100% - 1px);
|
|
356
|
+
border: none;
|
|
357
|
+
}
|
|
358
|
+
::v-deep .el-input--prefix{
|
|
359
|
+
height: 100%;
|
|
360
|
+
display: flex;
|
|
361
|
+
//align-items: center;
|
|
362
|
+
font-size: 0.8vw;
|
|
363
|
+
}
|
|
364
|
+
::v-deep .el-input__inner::placeholder{
|
|
365
|
+
color: #999999;
|
|
366
|
+
font-size: 0.625vw;
|
|
367
|
+
}
|
|
368
|
+
// ::v-deep .el-input__prefix{
|
|
369
|
+
// //height: calc(100% - 2px);
|
|
370
|
+
// //color: #999999;
|
|
371
|
+
// //font-size: 0.8vw;
|
|
372
|
+
// }
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
::v-deep .el-input{
|
|
376
|
+
height: 100%;
|
|
377
|
+
display: flex;
|
|
378
|
+
}
|
|
379
|
+
::v-deep .el-input__suffix{
|
|
380
|
+
display: flex;
|
|
381
|
+
align-items: center;
|
|
382
|
+
}
|
|
383
|
+
// ::v-deep .el-icon-arrow-up{
|
|
384
|
+
// //display: flex;
|
|
385
|
+
// //align-items: center;
|
|
386
|
+
// }
|
|
387
|
+
::v-deep .el-icon-arrow-up:before{
|
|
388
|
+
font-size: 0.625vw;
|
|
389
|
+
}
|
|
390
|
+
/*筛选框统一高度*/
|
|
391
|
+
::v-deep .el-input__inner{
|
|
392
|
+
height: 2.222vh;
|
|
393
|
+
font-size: 0.625vw;
|
|
394
|
+
}
|
|
395
|
+
/*下拉框图标统一高度*/
|
|
396
|
+
::v-deep .el-input__icon{
|
|
397
|
+
height: 2.222vh;
|
|
398
|
+
line-height: 2.222vh;
|
|
399
|
+
}
|
|
400
|
+
/*字段下拉框样式*/
|
|
401
|
+
.field-select{
|
|
402
|
+
margin-right: 0.1vh;
|
|
403
|
+
::v-deep .el-input {
|
|
404
|
+
width: 8vw;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
/*条件下拉框样式*/
|
|
408
|
+
.condition-select{
|
|
409
|
+
margin-right:0.1vh;
|
|
410
|
+
::v-deep .el-input {
|
|
411
|
+
width: 6vw;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
/*括号下拉框样式*/
|
|
415
|
+
.bracket-select{
|
|
416
|
+
margin-right:0.1vh;
|
|
417
|
+
::v-deep .el-input {
|
|
418
|
+
width: 6vw;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
/*值输入框样式*/
|
|
422
|
+
.value-input{
|
|
423
|
+
width: 5vw;
|
|
424
|
+
margin-right:0.1vh;
|
|
425
|
+
::v-deep .el-input__inner{
|
|
426
|
+
width: 5vw;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/*单行筛选框*/
|
|
431
|
+
.single-line{
|
|
432
|
+
width: 20vw;
|
|
433
|
+
height: 100%;
|
|
434
|
+
display: flex;
|
|
435
|
+
//margin-right: -1.5vw;
|
|
436
|
+
.el-select:nth-child(2){
|
|
437
|
+
margin: 0 0.5vw;
|
|
438
|
+
}
|
|
439
|
+
.el-input:nth-last-child(1){
|
|
440
|
+
margin-right: 1vw;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
@media screen and (max-width: 1920px){
|
|
444
|
+
.single-line{
|
|
445
|
+
width: 20vw;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
@media screen and (max-width: 1366px){
|
|
449
|
+
.single-line{
|
|
450
|
+
width: 20vw;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
/*多行筛选框*/
|
|
454
|
+
.multiple-lines{
|
|
455
|
+
z-index: 999;
|
|
456
|
+
border: 1px solid #0261a4;
|
|
457
|
+
border-radius: 0.9259vh;
|
|
458
|
+
box-sizing: border-box;
|
|
459
|
+
padding: 1.3889vh;
|
|
460
|
+
background: #FFFFFF;
|
|
461
|
+
.multiple-line{
|
|
462
|
+
height: 2.222vh;
|
|
463
|
+
margin-bottom: 1vh;
|
|
464
|
+
display: flex;
|
|
465
|
+
align-items: center;
|
|
466
|
+
::v-deep .el-select{
|
|
467
|
+
height: 100%;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
.remove-icon{
|
|
471
|
+
width: 0.625vw;
|
|
472
|
+
height: 0.625vw;
|
|
473
|
+
margin-left: 10px;
|
|
474
|
+
cursor: pointer;
|
|
475
|
+
}
|
|
476
|
+
.add-icon{
|
|
477
|
+
width: 0.625vw;
|
|
478
|
+
height: 0.625vw;
|
|
479
|
+
cursor: pointer;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
/*按钮组样式*/
|
|
483
|
+
.button-group {
|
|
484
|
+
display: flex;
|
|
485
|
+
align-items: center;
|
|
486
|
+
margin-left: 1.2vw;
|
|
487
|
+
::v-deep .el-button--primary{
|
|
488
|
+
width: 3.5vw;
|
|
489
|
+
height: 2.2222vh;
|
|
490
|
+
padding: 0;
|
|
491
|
+
background: #ecf5ff;
|
|
492
|
+
border: 1px solid #0c4c8e;
|
|
493
|
+
border-radius: 5px;
|
|
494
|
+
font-size: 0.625vw;
|
|
495
|
+
font-family: Source Han Sans SC, Source Han Sans SC-Normal;
|
|
496
|
+
font-weight: Normal;
|
|
497
|
+
text-align: center;
|
|
498
|
+
color: #085497;
|
|
499
|
+
}
|
|
500
|
+
::v-deep .el-button:nth-child(2) {
|
|
501
|
+
margin: 0 0.5vw;
|
|
502
|
+
}
|
|
503
|
+
/*图标按钮样式*/
|
|
504
|
+
.push-down{
|
|
505
|
+
width: 2vh;
|
|
506
|
+
height: 2vh;
|
|
507
|
+
margin-left: 0.5vw;
|
|
508
|
+
cursor: pointer;
|
|
509
|
+
}
|
|
510
|
+
.up{
|
|
511
|
+
transform: rotate(-180deg);
|
|
512
|
+
transition: all 0.5s;
|
|
513
|
+
}
|
|
514
|
+
.down{
|
|
515
|
+
transition: all 0.5s;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
</style>
|