doway-coms 1.6.8 → 1.6.10
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,
|
|
@@ -428,24 +430,38 @@ export default {
|
|
|
428
430
|
if (this.columns[i].isCheckbox === true) {
|
|
429
431
|
this.columns[i]["type"] = "checkbox";
|
|
430
432
|
}
|
|
433
|
+
if(!this.columns[i].controlType) {
|
|
434
|
+
this.columns[i].controlType = 'text'
|
|
435
|
+
}
|
|
431
436
|
// 设置字段的过滤插槽
|
|
432
437
|
if(this.columns[i].filter) {
|
|
433
438
|
this.columns[i]["filterMultiple"] = false;
|
|
434
|
-
|
|
435
|
-
{
|
|
436
|
-
data: ''
|
|
437
|
-
}
|
|
438
|
-
]
|
|
439
|
+
|
|
439
440
|
switch(this.columns[i].controlType) {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
441
|
+
case 'checkbox':
|
|
442
|
+
this.columns[i]['slots'] = {
|
|
443
|
+
filter: `checkbox_filter`
|
|
444
|
+
}
|
|
445
|
+
break
|
|
446
|
+
case 'select':
|
|
447
|
+
this.columns[i]['slots'] = {
|
|
448
|
+
filter: `select_filter`
|
|
449
|
+
}
|
|
450
|
+
this.columns[i]['filters'] = [
|
|
451
|
+
{
|
|
452
|
+
data: []
|
|
453
|
+
}
|
|
454
|
+
]
|
|
455
|
+
break
|
|
445
456
|
default:
|
|
446
457
|
this.columns[i]['slots'] = {
|
|
447
458
|
filter: `text_filter`
|
|
448
459
|
}
|
|
460
|
+
this.columns[i]['filters'] = [
|
|
461
|
+
{
|
|
462
|
+
data: ''
|
|
463
|
+
}
|
|
464
|
+
]
|
|
449
465
|
break
|
|
450
466
|
}
|
|
451
467
|
}
|
|
@@ -948,8 +964,17 @@ export default {
|
|
|
948
964
|
operator: 'and',
|
|
949
965
|
expressions: []
|
|
950
966
|
}
|
|
951
|
-
|
|
952
|
-
|
|
967
|
+
let col= this.columns.find(x=>x.field === column.field)
|
|
968
|
+
switch(col.controlType) {
|
|
969
|
+
case 'select':
|
|
970
|
+
column.filters[0].checked =
|
|
971
|
+
column.filters[0].data.length > 0
|
|
972
|
+
break;
|
|
973
|
+
default:
|
|
974
|
+
column.filters[0].checked =
|
|
975
|
+
column.filters[0].data !== ''
|
|
976
|
+
break;
|
|
977
|
+
}
|
|
953
978
|
//通知外部筛选改变事件
|
|
954
979
|
let columns = this.$refs.pupupGridView.getTableColumn().collectColumn
|
|
955
980
|
XEUtils.each(columns, item => {
|
|
@@ -957,19 +982,37 @@ export default {
|
|
|
957
982
|
operator: 'or',
|
|
958
983
|
expressions: []
|
|
959
984
|
}
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
if(
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
985
|
+
switch (col.controlType) {
|
|
986
|
+
case 'select':
|
|
987
|
+
if(item.filters && item.filters[0].checked) {
|
|
988
|
+
XEUtils.each(item.filters[0].data, loopItem => {
|
|
989
|
+
filterExpression.expressions.push({
|
|
990
|
+
field: item.field,
|
|
991
|
+
operator: "EQ",
|
|
992
|
+
value: loopItem
|
|
993
|
+
})
|
|
967
994
|
})
|
|
995
|
+
if(filterExpression.expressions.length > 0) {
|
|
996
|
+
vm.filterExpression.expressions.push(filterExpression)
|
|
997
|
+
}
|
|
968
998
|
}
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
999
|
+
break
|
|
1000
|
+
default:
|
|
1001
|
+
if(item.filters && item.filters[0].checked) {
|
|
1002
|
+
XEUtils.each(item.filters, loopItem => {
|
|
1003
|
+
if(loopItem.data) {
|
|
1004
|
+
filterExpression.expressions.push({
|
|
1005
|
+
field: item.field,
|
|
1006
|
+
operator: "CO",
|
|
1007
|
+
value: loopItem.data
|
|
1008
|
+
})
|
|
1009
|
+
}
|
|
1010
|
+
})
|
|
1011
|
+
if(filterExpression.expressions.length > 0) {
|
|
1012
|
+
vm.filterExpression.expressions.push(filterExpression)
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
break
|
|
973
1016
|
}
|
|
974
1017
|
})
|
|
975
1018
|
this.gridPagerConfig.currentPage = 1
|
|
@@ -986,6 +1029,7 @@ export default {
|
|
|
986
1029
|
// 清楚筛选条件
|
|
987
1030
|
clearColumnFilter() {
|
|
988
1031
|
let columns = []
|
|
1032
|
+
let vm = this
|
|
989
1033
|
try {
|
|
990
1034
|
columns = this.$refs.pupupGridView.getTableColumn().collectColumn
|
|
991
1035
|
}catch (err) {
|
|
@@ -993,11 +1037,24 @@ export default {
|
|
|
993
1037
|
}
|
|
994
1038
|
|
|
995
1039
|
XEUtils.each(columns, item => {
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1040
|
+
let col= vm.columns.find(x=>x.field === item.field)
|
|
1041
|
+
switch(col.controlType) {
|
|
1042
|
+
case 'select':
|
|
1043
|
+
if(item.filters && item.filters[0].checked) {
|
|
1044
|
+
item.filters = [{
|
|
1045
|
+
data: []
|
|
1046
|
+
}]
|
|
1047
|
+
}
|
|
1048
|
+
break;
|
|
1049
|
+
default:
|
|
1050
|
+
if(item.filters && item.filters[0].checked) {
|
|
1051
|
+
item.filters = [{
|
|
1052
|
+
data: ''
|
|
1053
|
+
}]
|
|
1054
|
+
}
|
|
1055
|
+
break;
|
|
1000
1056
|
}
|
|
1057
|
+
|
|
1001
1058
|
})
|
|
1002
1059
|
this.filterExpression = {
|
|
1003
1060
|
operator: 'and',
|