doway-coms 1.6.8 → 1.6.9
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/package.json
CHANGED
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
</template>
|
|
268
268
|
<template #pager v-if="pager && !pager.notShow">
|
|
269
269
|
<a-row>
|
|
270
|
-
<a-col :span="
|
|
270
|
+
<a-col :span="12" style="text-align: left; padding: 10px">
|
|
271
271
|
<a-space>
|
|
272
272
|
<template v-for="loopPagerBtn in pager.buttons">
|
|
273
273
|
<a-button
|
|
@@ -282,11 +282,12 @@
|
|
|
282
282
|
</template>
|
|
283
283
|
</a-space>
|
|
284
284
|
</a-col>
|
|
285
|
-
<a-col :span="
|
|
285
|
+
<a-col :span="12" style="text-align: right">
|
|
286
286
|
<BasePagination
|
|
287
287
|
v-if="pager.size"
|
|
288
288
|
:totalRows="pager.totalRows"
|
|
289
289
|
:pageSize="pager.size"
|
|
290
|
+
:pageSizeOptions="pager.sizeOptions"
|
|
290
291
|
:currentPage="pager.current"
|
|
291
292
|
@pageChange="pageChange"
|
|
292
293
|
@pageSizeChange="pageSizeChange"
|
|
@@ -862,11 +863,16 @@ export default {
|
|
|
862
863
|
|
|
863
864
|
created() {
|
|
864
865
|
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
866
|
+
try{
|
|
867
|
+
if(this.pager && this.pager.sizeOptions) {
|
|
868
|
+
this.pager.sizeOptions = XEUtils.map(this.pager.sizeOptions, item => {
|
|
869
|
+
return Number(item)
|
|
870
|
+
})
|
|
871
|
+
}
|
|
872
|
+
} catch(err) {
|
|
873
|
+
console.debug(err)
|
|
874
|
+
}
|
|
875
|
+
|
|
870
876
|
|
|
871
877
|
//拖动后输入框有错位问题,暂时不启用
|
|
872
878
|
// this.initColumnDrop()
|
|
@@ -88,27 +88,6 @@
|
|
|
88
88
|
</div>
|
|
89
89
|
</div>
|
|
90
90
|
</template>
|
|
91
|
-
<!-- <template #checkbox_filter="scope">-->
|
|
92
|
-
<!-- <div class="interceptor-class">-->
|
|
93
|
-
<!-- <a-checkbox-group-->
|
|
94
|
-
<!-- v-model="scope.column.filters[0].data.displayValues"-->
|
|
95
|
-
<!-- @keyup.enter.native="filterConfirm(scope.column)"-->
|
|
96
|
-
<!-- >-->
|
|
97
|
-
<!-- <div style="max-height:200px;overflow-y:scroll">-->
|
|
98
|
-
<!-- <div style="text-align:left;" v-for="loopSource in scope.column.params.dataSource" :key="loopSource.value">-->
|
|
99
|
-
<!-- <a-checkbox-->
|
|
100
|
-
<!-- v-show="loopSource.caption.indexOf(scope.column.filters[0].data.displayValueSearchText)>-1"-->
|
|
101
|
-
<!-- :value="loopSource.value"-->
|
|
102
|
-
<!-- style="margin: 5px 0;"-->
|
|
103
|
-
<!-- >{{ loopSource.caption }}-->
|
|
104
|
-
<!-- </a-checkbox>-->
|
|
105
|
-
<!-- </div>-->
|
|
106
|
-
<!-- </div>-->
|
|
107
|
-
<!-- </a-checkbox-group>-->
|
|
108
|
-
<!-- <br>-->
|
|
109
|
-
<!-- <a-button @click="filterConfirm(scope.column)">确认</a-button>-->
|
|
110
|
-
<!-- </div>-->
|
|
111
|
-
<!-- </template>-->
|
|
112
91
|
<!-- 普通输入框的过滤筛选-->
|
|
113
92
|
<template #text_filter="{ column }">
|
|
114
93
|
<div class="interceptor-class">
|
|
@@ -122,6 +101,27 @@
|
|
|
122
101
|
<a-button @click="filterConfirm(column)">确认</a-button>
|
|
123
102
|
</div>
|
|
124
103
|
</template>
|
|
104
|
+
<!-- 选择筛选框-->
|
|
105
|
+
<template #select_filter="{ column }">
|
|
106
|
+
<div class="interceptor-class">
|
|
107
|
+
<a-checkbox-group
|
|
108
|
+
v-model="column.filters[0].data"
|
|
109
|
+
@keyup.enter.native="filterConfirm(column)"
|
|
110
|
+
>
|
|
111
|
+
<div style="max-height:200px;overflow-y:scroll">
|
|
112
|
+
<div style="text-align:left;" v-for="loopSource in column.params.dataSource" :key="loopSource.value">
|
|
113
|
+
<a-checkbox
|
|
114
|
+
:value="loopSource.value"
|
|
115
|
+
style="margin: 5px 0;"
|
|
116
|
+
>{{ loopSource.caption }}
|
|
117
|
+
</a-checkbox>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</a-checkbox-group>
|
|
121
|
+
<br>
|
|
122
|
+
<a-button @click="filterConfirm(column)">确认</a-button>
|
|
123
|
+
</div>
|
|
124
|
+
</template>
|
|
125
125
|
<template #pager>
|
|
126
126
|
<a-row>
|
|
127
127
|
<a-col :span="8">
|
|
@@ -194,7 +194,7 @@ import XEUtils from "xe-utils";
|
|
|
194
194
|
import { sysRowState, sysFormState, controlType } from "../../utils/enum";
|
|
195
195
|
import { replaceParamString, replaceParam } from "../../utils/common";
|
|
196
196
|
import request from "../../utils/request";
|
|
197
|
-
import {
|
|
197
|
+
import {Input, Button, Row, Col, Checkbox} from "ant-design-vue";
|
|
198
198
|
import { ValidationProvider } from "vee-validate";
|
|
199
199
|
import { Pulldown } from "vxe-table";
|
|
200
200
|
import { Tooltip } from "ant-design-vue";
|
|
@@ -205,6 +205,8 @@ export default {
|
|
|
205
205
|
"a-button": Button,
|
|
206
206
|
"a-row": Row,
|
|
207
207
|
"a-col": Col,
|
|
208
|
+
"a-checkbox": Checkbox,
|
|
209
|
+
"a-checkbox-group": Checkbox.Group,
|
|
208
210
|
VxePulldown: Pulldown,
|
|
209
211
|
ValidationProvider,
|
|
210
212
|
Tooltip,
|
|
@@ -431,21 +433,32 @@ export default {
|
|
|
431
433
|
// 设置字段的过滤插槽
|
|
432
434
|
if(this.columns[i].filter) {
|
|
433
435
|
this.columns[i]["filterMultiple"] = false;
|
|
434
|
-
|
|
435
|
-
{
|
|
436
|
-
data: ''
|
|
437
|
-
}
|
|
438
|
-
]
|
|
436
|
+
|
|
439
437
|
switch(this.columns[i].controlType) {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
438
|
+
case 'checkbox':
|
|
439
|
+
this.columns[i]['slots'] = {
|
|
440
|
+
filter: `checkbox_filter`
|
|
441
|
+
}
|
|
442
|
+
break
|
|
443
|
+
case 'select':
|
|
444
|
+
this.columns[i]['slots'] = {
|
|
445
|
+
filter: `select_filter`
|
|
446
|
+
}
|
|
447
|
+
this.columns[i]['filters'] = [
|
|
448
|
+
{
|
|
449
|
+
data: []
|
|
450
|
+
}
|
|
451
|
+
]
|
|
452
|
+
break
|
|
445
453
|
default:
|
|
446
454
|
this.columns[i]['slots'] = {
|
|
447
455
|
filter: `text_filter`
|
|
448
456
|
}
|
|
457
|
+
this.columns[i]['filters'] = [
|
|
458
|
+
{
|
|
459
|
+
data: ''
|
|
460
|
+
}
|
|
461
|
+
]
|
|
449
462
|
break
|
|
450
463
|
}
|
|
451
464
|
}
|
|
@@ -948,8 +961,17 @@ export default {
|
|
|
948
961
|
operator: 'and',
|
|
949
962
|
expressions: []
|
|
950
963
|
}
|
|
951
|
-
|
|
952
|
-
|
|
964
|
+
let col= this.columns.find(x=>x.field === column.field)
|
|
965
|
+
switch(col.controlType) {
|
|
966
|
+
case 'select':
|
|
967
|
+
column.filters[0].checked =
|
|
968
|
+
column.filters[0].data.length > 0
|
|
969
|
+
break;
|
|
970
|
+
default:
|
|
971
|
+
column.filters[0].checked =
|
|
972
|
+
column.filters[0].data !== ''
|
|
973
|
+
break;
|
|
974
|
+
}
|
|
953
975
|
//通知外部筛选改变事件
|
|
954
976
|
let columns = this.$refs.pupupGridView.getTableColumn().collectColumn
|
|
955
977
|
XEUtils.each(columns, item => {
|
|
@@ -957,19 +979,37 @@ export default {
|
|
|
957
979
|
operator: 'or',
|
|
958
980
|
expressions: []
|
|
959
981
|
}
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
if(
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
982
|
+
switch (col.controlType) {
|
|
983
|
+
case 'select':
|
|
984
|
+
if(item.filters && item.filters[0].checked) {
|
|
985
|
+
XEUtils.each(item.filters[0].data, loopItem => {
|
|
986
|
+
filterExpression.expressions.push({
|
|
987
|
+
field: item.field,
|
|
988
|
+
operator: "EQ",
|
|
989
|
+
value: loopItem
|
|
990
|
+
})
|
|
967
991
|
})
|
|
992
|
+
if(filterExpression.expressions.length > 0) {
|
|
993
|
+
vm.filterExpression.expressions.push(filterExpression)
|
|
994
|
+
}
|
|
968
995
|
}
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
996
|
+
break
|
|
997
|
+
default:
|
|
998
|
+
if(item.filters && item.filters[0].checked) {
|
|
999
|
+
XEUtils.each(item.filters, loopItem => {
|
|
1000
|
+
if(loopItem.data) {
|
|
1001
|
+
filterExpression.expressions.push({
|
|
1002
|
+
field: item.field,
|
|
1003
|
+
operator: "CO",
|
|
1004
|
+
value: loopItem.data
|
|
1005
|
+
})
|
|
1006
|
+
}
|
|
1007
|
+
})
|
|
1008
|
+
if(filterExpression.expressions.length > 0) {
|
|
1009
|
+
vm.filterExpression.expressions.push(filterExpression)
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
break
|
|
973
1013
|
}
|
|
974
1014
|
})
|
|
975
1015
|
this.gridPagerConfig.currentPage = 1
|
|
@@ -986,6 +1026,7 @@ export default {
|
|
|
986
1026
|
// 清楚筛选条件
|
|
987
1027
|
clearColumnFilter() {
|
|
988
1028
|
let columns = []
|
|
1029
|
+
let vm = this
|
|
989
1030
|
try {
|
|
990
1031
|
columns = this.$refs.pupupGridView.getTableColumn().collectColumn
|
|
991
1032
|
}catch (err) {
|
|
@@ -993,11 +1034,24 @@ export default {
|
|
|
993
1034
|
}
|
|
994
1035
|
|
|
995
1036
|
XEUtils.each(columns, item => {
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1037
|
+
let col= vm.columns.find(x=>x.field === item.field)
|
|
1038
|
+
switch(col.controlType) {
|
|
1039
|
+
case 'select':
|
|
1040
|
+
if(item.filters && item.filters[0].checked) {
|
|
1041
|
+
item.filters = [{
|
|
1042
|
+
data: []
|
|
1043
|
+
}]
|
|
1044
|
+
}
|
|
1045
|
+
break;
|
|
1046
|
+
default:
|
|
1047
|
+
if(item.filters && item.filters[0].checked) {
|
|
1048
|
+
item.filters = [{
|
|
1049
|
+
data: ''
|
|
1050
|
+
}]
|
|
1051
|
+
}
|
|
1052
|
+
break;
|
|
1000
1053
|
}
|
|
1054
|
+
|
|
1001
1055
|
})
|
|
1002
1056
|
this.filterExpression = {
|
|
1003
1057
|
operator: 'and',
|