doway-coms 1.6.23 → 1.6.25
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
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
</ValidationProvider>
|
|
48
48
|
</template>
|
|
49
49
|
<template #dropdown>
|
|
50
|
-
<div class="pulldown-grid interceptor-class"
|
|
50
|
+
<div class="pulldown-grid interceptor-class">
|
|
51
51
|
<vxe-grid
|
|
52
52
|
size="mini"
|
|
53
53
|
border
|
|
@@ -88,37 +88,43 @@
|
|
|
88
88
|
</div>
|
|
89
89
|
</div>
|
|
90
90
|
</template>
|
|
91
|
-
<!-- 普通输入框的过滤筛选-->
|
|
91
|
+
<!-- 普通输入框的过滤筛选-->
|
|
92
92
|
<template #text_filter="{ column }">
|
|
93
93
|
<div class="interceptor-class">
|
|
94
|
-
<div
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
<div v-for="(item, $index) in column.filters" :key="$index">
|
|
95
|
+
<a-input
|
|
96
|
+
allowClear
|
|
97
|
+
v-model="item.data"
|
|
98
|
+
@keyup.enter.native="filterConfirm(column)"
|
|
99
|
+
style="margin-bottom: 5px"
|
|
100
|
+
/>
|
|
99
101
|
</div>
|
|
100
102
|
<a-button @click="filterAddExp(column)">添加条件</a-button>
|
|
101
103
|
<a-button @click="filterConfirm(column)">确认</a-button>
|
|
102
104
|
</div>
|
|
103
105
|
</template>
|
|
104
|
-
<!-- 选择筛选框-->
|
|
106
|
+
<!-- 选择筛选框-->
|
|
105
107
|
<template #select_filter="{ column }">
|
|
106
108
|
<div class="interceptor-class">
|
|
107
109
|
<a-checkbox-group
|
|
108
110
|
v-model="column.filters[0].data"
|
|
109
111
|
@keyup.enter.native="filterConfirm(column)"
|
|
110
112
|
>
|
|
111
|
-
<div style="max-height:200px;overflow-y:scroll">
|
|
112
|
-
<div
|
|
113
|
+
<div style="max-height: 200px; overflow-y: scroll">
|
|
114
|
+
<div
|
|
115
|
+
style="text-align: left"
|
|
116
|
+
v-for="loopSource in column.params.dataSource"
|
|
117
|
+
:key="loopSource.value"
|
|
118
|
+
>
|
|
113
119
|
<a-checkbox
|
|
114
120
|
:value="loopSource.value"
|
|
115
|
-
style="margin: 5px 0
|
|
116
|
-
|
|
121
|
+
style="margin: 5px 0"
|
|
122
|
+
>{{ loopSource.caption }}
|
|
117
123
|
</a-checkbox>
|
|
118
124
|
</div>
|
|
119
125
|
</div>
|
|
120
126
|
</a-checkbox-group>
|
|
121
|
-
<br
|
|
127
|
+
<br />
|
|
122
128
|
<a-button @click="filterConfirm(column)">确认</a-button>
|
|
123
129
|
</div>
|
|
124
130
|
</template>
|
|
@@ -194,7 +200,7 @@ import XEUtils from "xe-utils";
|
|
|
194
200
|
import { sysRowState, sysFormState, controlType } from "../../utils/enum";
|
|
195
201
|
import { replaceParamString, replaceParam } from "../../utils/common";
|
|
196
202
|
import request from "../../utils/request";
|
|
197
|
-
import {Input, Button, Row, Col, Checkbox} from "ant-design-vue";
|
|
203
|
+
import { Input, Button, Row, Col, Checkbox } from "ant-design-vue";
|
|
198
204
|
import { ValidationProvider } from "vee-validate";
|
|
199
205
|
import { Pulldown } from "vxe-table";
|
|
200
206
|
import { Tooltip } from "ant-design-vue";
|
|
@@ -228,9 +234,9 @@ export default {
|
|
|
228
234
|
sorts: [],
|
|
229
235
|
defaultSort: [],
|
|
230
236
|
filterExpression: {
|
|
231
|
-
operator:
|
|
232
|
-
expressions: []
|
|
233
|
-
}
|
|
237
|
+
operator: "and",
|
|
238
|
+
expressions: [],
|
|
239
|
+
},
|
|
234
240
|
};
|
|
235
241
|
},
|
|
236
242
|
props: {
|
|
@@ -430,39 +436,39 @@ export default {
|
|
|
430
436
|
if (this.columns[i].isCheckbox === true) {
|
|
431
437
|
this.columns[i]["type"] = "checkbox";
|
|
432
438
|
}
|
|
433
|
-
if(!this.columns[i].controlType) {
|
|
434
|
-
this.columns[i].controlType =
|
|
439
|
+
if (!this.columns[i].controlType) {
|
|
440
|
+
this.columns[i].controlType = "text";
|
|
435
441
|
}
|
|
436
442
|
// 设置字段的过滤插槽
|
|
437
|
-
if(this.columns[i].filter) {
|
|
443
|
+
if (this.columns[i].filter) {
|
|
438
444
|
this.columns[i]["filterMultiple"] = false;
|
|
439
445
|
|
|
440
|
-
switch(this.columns[i].controlType) {
|
|
441
|
-
case
|
|
442
|
-
this.columns[i][
|
|
443
|
-
filter: `checkbox_filter
|
|
444
|
-
}
|
|
445
|
-
break
|
|
446
|
-
case
|
|
447
|
-
this.columns[i][
|
|
448
|
-
filter: `select_filter
|
|
449
|
-
}
|
|
450
|
-
this.columns[i][
|
|
446
|
+
switch (this.columns[i].controlType) {
|
|
447
|
+
case "checkbox":
|
|
448
|
+
this.columns[i]["slots"] = {
|
|
449
|
+
filter: `checkbox_filter`,
|
|
450
|
+
};
|
|
451
|
+
break;
|
|
452
|
+
case "select":
|
|
453
|
+
this.columns[i]["slots"] = {
|
|
454
|
+
filter: `select_filter`,
|
|
455
|
+
};
|
|
456
|
+
this.columns[i]["filters"] = [
|
|
451
457
|
{
|
|
452
|
-
data: []
|
|
453
|
-
}
|
|
454
|
-
]
|
|
455
|
-
break
|
|
458
|
+
data: [],
|
|
459
|
+
},
|
|
460
|
+
];
|
|
461
|
+
break;
|
|
456
462
|
default:
|
|
457
|
-
this.columns[i][
|
|
458
|
-
filter: `text_filter
|
|
459
|
-
}
|
|
460
|
-
this.columns[i][
|
|
463
|
+
this.columns[i]["slots"] = {
|
|
464
|
+
filter: `text_filter`,
|
|
465
|
+
};
|
|
466
|
+
this.columns[i]["filters"] = [
|
|
461
467
|
{
|
|
462
|
-
data:
|
|
463
|
-
}
|
|
464
|
-
]
|
|
465
|
-
break
|
|
468
|
+
data: "",
|
|
469
|
+
},
|
|
470
|
+
];
|
|
471
|
+
break;
|
|
466
472
|
}
|
|
467
473
|
}
|
|
468
474
|
// 默认排序
|
|
@@ -542,7 +548,7 @@ export default {
|
|
|
542
548
|
inputClickEvent(event) {
|
|
543
549
|
if (this.$refs.pulldownRef.isPanelVisible() === false) {
|
|
544
550
|
this.$refs.pulldownRef.showPanel();
|
|
545
|
-
this.clearColumnFilter()
|
|
551
|
+
this.clearColumnFilter();
|
|
546
552
|
this.searchData();
|
|
547
553
|
} else {
|
|
548
554
|
this.$refs.pulldownRef.hidePanel();
|
|
@@ -765,9 +771,9 @@ export default {
|
|
|
765
771
|
if (this.isOld === true) {
|
|
766
772
|
tempExp = "";
|
|
767
773
|
}
|
|
768
|
-
if(this.filterExpression.expressions.length > 0) {
|
|
769
|
-
tempExp.expressions.push(this.filterExpression)
|
|
770
|
-
}else if (this.currentValue) {
|
|
774
|
+
if (this.filterExpression.expressions.length > 0) {
|
|
775
|
+
tempExp.expressions.push(this.filterExpression);
|
|
776
|
+
} else if (this.currentValue) {
|
|
771
777
|
for (let i = 0; i < this.filterCols.length; i++) {
|
|
772
778
|
if (this.isOld === true) {
|
|
773
779
|
tempExp =
|
|
@@ -867,7 +873,7 @@ export default {
|
|
|
867
873
|
vm.gridPagerConfig.total = responseData.extData.totalRows;
|
|
868
874
|
} else {
|
|
869
875
|
vm.searchRows = responseData.content;
|
|
870
|
-
vm.$refs.pupupGridView.loadData(vm.searchRows)
|
|
876
|
+
vm.$refs.pupupGridView.loadData(vm.searchRows);
|
|
871
877
|
vm.gridPagerConfig.total = responseData.otherContent.totalRows;
|
|
872
878
|
}
|
|
873
879
|
if (repeatRowInfo.field) {
|
|
@@ -887,7 +893,7 @@ export default {
|
|
|
887
893
|
}
|
|
888
894
|
// 若当前表格内只有一行,则不进行判断
|
|
889
895
|
if (vm.propTableData.length == 1) {
|
|
890
|
-
return
|
|
896
|
+
return;
|
|
891
897
|
}
|
|
892
898
|
// 设置字段sysRepeat后,所定字段的值全部相同则不可选择
|
|
893
899
|
let fieldNames = vm.columns
|
|
@@ -898,23 +904,36 @@ export default {
|
|
|
898
904
|
linkField: y.linkField,
|
|
899
905
|
};
|
|
900
906
|
});
|
|
901
|
-
|
|
907
|
+
if (fieldNames.length) {
|
|
902
908
|
vm.searchRows.forEach((info) => {
|
|
909
|
+
// 当一次创建多行时,过滤需特定字段不可为空的
|
|
910
|
+
// 获取数组对象,根据选定字段,过滤选定字段都为空的
|
|
911
|
+
let tempArr = vm.propTableData.filter((currentInfo) => {
|
|
912
|
+
let tempD = [];
|
|
913
|
+
fieldNames.forEach((z) => {
|
|
914
|
+
// 字段的值若为null、undefined,记录过滤掉
|
|
915
|
+
if (!currentInfo[z.linkField]) {
|
|
916
|
+
tempD.push(true);
|
|
917
|
+
}
|
|
918
|
+
});
|
|
919
|
+
return tempD.length !== fieldNames.length;
|
|
920
|
+
});
|
|
903
921
|
// 分为有参查询和无参查询
|
|
904
|
-
if (tempExp.expressions.length) {
|
|
905
|
-
let arr = []
|
|
922
|
+
if (tempExp.expressions.length && fieldNames.length == 1) {
|
|
906
923
|
for (let j = 0; j < fieldNames.length; j++) {
|
|
907
|
-
let mapArr =
|
|
908
|
-
|
|
924
|
+
let mapArr = tempArr.map(
|
|
925
|
+
(item) => item[fieldNames[j].linkField]
|
|
926
|
+
);
|
|
927
|
+
let setArr = new Set(mapArr);
|
|
909
928
|
if (setArr.size < mapArr.length) {
|
|
910
|
-
arr.push(true)
|
|
929
|
+
arr.push(true);
|
|
911
930
|
}
|
|
912
931
|
}
|
|
913
932
|
if (fieldNames.length === arr.length) {
|
|
914
933
|
info.sysRepeat = true;
|
|
915
934
|
}
|
|
916
935
|
} else {
|
|
917
|
-
|
|
936
|
+
tempArr.forEach((item) => {
|
|
918
937
|
// 接口字段可能和表字段field不一致,linkField一致
|
|
919
938
|
let arr = [];
|
|
920
939
|
for (let j = 0; j < fieldNames.length; j++) {
|
|
@@ -927,7 +946,7 @@ export default {
|
|
|
927
946
|
if (fieldNames.length === arr.length) {
|
|
928
947
|
info.sysRepeat = true;
|
|
929
948
|
}
|
|
930
|
-
})
|
|
949
|
+
});
|
|
931
950
|
}
|
|
932
951
|
})
|
|
933
952
|
}
|
|
@@ -966,126 +985,127 @@ export default {
|
|
|
966
985
|
},
|
|
967
986
|
|
|
968
987
|
// 下拉容器筛选条件被触发
|
|
969
|
-
filterVisible({column}) {
|
|
970
|
-
XEUtils.remove(column.filters, item => {
|
|
971
|
-
return item.data ===
|
|
972
|
-
})
|
|
973
|
-
if(column.filters.length === 0) {
|
|
988
|
+
filterVisible({ column }) {
|
|
989
|
+
XEUtils.remove(column.filters, (item) => {
|
|
990
|
+
return item.data === "";
|
|
991
|
+
});
|
|
992
|
+
if (column.filters.length === 0) {
|
|
974
993
|
column.filters.push({
|
|
975
|
-
data:
|
|
976
|
-
})
|
|
994
|
+
data: "",
|
|
995
|
+
});
|
|
977
996
|
}
|
|
978
997
|
},
|
|
979
998
|
filterConfirm(column) {
|
|
980
|
-
let vm = this
|
|
999
|
+
let vm = this;
|
|
981
1000
|
this.filterExpression = {
|
|
982
|
-
operator:
|
|
983
|
-
expressions: []
|
|
984
|
-
}
|
|
985
|
-
let col= this.columns.find(x=>x.field === column.field)
|
|
986
|
-
switch(col.controlType) {
|
|
987
|
-
case
|
|
988
|
-
column.filters[0].checked =
|
|
989
|
-
column.filters[0].data.length > 0
|
|
1001
|
+
operator: "and",
|
|
1002
|
+
expressions: [],
|
|
1003
|
+
};
|
|
1004
|
+
let col = this.columns.find((x) => x.field === column.field);
|
|
1005
|
+
switch (col.controlType) {
|
|
1006
|
+
case "select":
|
|
1007
|
+
column.filters[0].checked = column.filters[0].data.length > 0;
|
|
990
1008
|
break;
|
|
991
1009
|
default:
|
|
992
|
-
column.filters[0].checked =
|
|
993
|
-
column.filters[0].data !== ''
|
|
1010
|
+
column.filters[0].checked = column.filters[0].data !== "";
|
|
994
1011
|
break;
|
|
995
1012
|
}
|
|
996
|
-
|
|
997
|
-
let columns = this.$refs.pupupGridView.getTableColumn().collectColumn
|
|
998
|
-
XEUtils.each(columns, item => {
|
|
1013
|
+
//通知外部筛选改变事件
|
|
1014
|
+
let columns = this.$refs.pupupGridView.getTableColumn().collectColumn;
|
|
1015
|
+
XEUtils.each(columns, (item) => {
|
|
999
1016
|
let filterExpression = {
|
|
1000
|
-
operator:
|
|
1001
|
-
expressions: []
|
|
1002
|
-
}
|
|
1003
|
-
if(!col.controlType) {
|
|
1004
|
-
col.controlType =
|
|
1017
|
+
operator: "or",
|
|
1018
|
+
expressions: [],
|
|
1019
|
+
};
|
|
1020
|
+
if (!col.controlType) {
|
|
1021
|
+
col.controlType = "text";
|
|
1005
1022
|
}
|
|
1006
1023
|
switch (col.controlType) {
|
|
1007
|
-
case
|
|
1008
|
-
if(item.filters && item.filters[0].checked) {
|
|
1009
|
-
XEUtils.each(item.filters[0].data, loopItem => {
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
})
|
|
1016
|
-
if(filterExpression.expressions.length > 0) {
|
|
1017
|
-
vm.filterExpression.expressions.push(filterExpression)
|
|
1024
|
+
case "select":
|
|
1025
|
+
if (item.filters && item.filters[0].checked) {
|
|
1026
|
+
XEUtils.each(item.filters[0].data, (loopItem) => {
|
|
1027
|
+
filterExpression.expressions.push({
|
|
1028
|
+
field: item.field,
|
|
1029
|
+
operator: "EQ",
|
|
1030
|
+
value: loopItem,
|
|
1031
|
+
});
|
|
1032
|
+
});
|
|
1033
|
+
if (filterExpression.expressions.length > 0) {
|
|
1034
|
+
vm.filterExpression.expressions.push(filterExpression);
|
|
1018
1035
|
}
|
|
1019
1036
|
}
|
|
1020
|
-
break
|
|
1037
|
+
break;
|
|
1021
1038
|
default:
|
|
1022
|
-
if(item.filters && item.filters[0].checked) {
|
|
1023
|
-
XEUtils.each(item.filters, loopItem => {
|
|
1024
|
-
if(loopItem.data) {
|
|
1039
|
+
if (item.filters && item.filters[0].checked) {
|
|
1040
|
+
XEUtils.each(item.filters, (loopItem) => {
|
|
1041
|
+
if (loopItem.data) {
|
|
1025
1042
|
filterExpression.expressions.push({
|
|
1026
1043
|
field: item.field,
|
|
1027
1044
|
operator: "CO",
|
|
1028
|
-
value: loopItem.data
|
|
1029
|
-
})
|
|
1045
|
+
value: loopItem.data,
|
|
1046
|
+
});
|
|
1030
1047
|
}
|
|
1031
|
-
})
|
|
1032
|
-
if(filterExpression.expressions.length > 0) {
|
|
1033
|
-
vm.filterExpression.expressions.push(filterExpression)
|
|
1048
|
+
});
|
|
1049
|
+
if (filterExpression.expressions.length > 0) {
|
|
1050
|
+
vm.filterExpression.expressions.push(filterExpression);
|
|
1034
1051
|
}
|
|
1035
1052
|
}
|
|
1036
|
-
break
|
|
1053
|
+
break;
|
|
1037
1054
|
}
|
|
1038
|
-
})
|
|
1039
|
-
this.gridPagerConfig.currentPage = 1
|
|
1040
|
-
this.searchData()
|
|
1041
|
-
this.$refs.pupupGridView.closeFilter()
|
|
1055
|
+
});
|
|
1056
|
+
this.gridPagerConfig.currentPage = 1;
|
|
1057
|
+
this.searchData();
|
|
1058
|
+
this.$refs.pupupGridView.closeFilter();
|
|
1042
1059
|
},
|
|
1043
|
-
|
|
1060
|
+
// 添加筛选条件
|
|
1044
1061
|
filterAddExp(column) {
|
|
1045
|
-
column[
|
|
1046
|
-
data:
|
|
1047
|
-
})
|
|
1062
|
+
column["filters"].push({
|
|
1063
|
+
data: "",
|
|
1064
|
+
});
|
|
1048
1065
|
},
|
|
1049
1066
|
|
|
1050
|
-
|
|
1067
|
+
// 清除筛选条件
|
|
1051
1068
|
clearColumnFilter() {
|
|
1052
|
-
let columns = []
|
|
1053
|
-
let vm = this
|
|
1069
|
+
let columns = [];
|
|
1070
|
+
let vm = this;
|
|
1054
1071
|
try {
|
|
1055
|
-
columns = this.$refs.pupupGridView.getTableColumn().collectColumn
|
|
1056
|
-
}catch (err) {
|
|
1057
|
-
console.debug(err)
|
|
1072
|
+
columns = this.$refs.pupupGridView.getTableColumn().collectColumn;
|
|
1073
|
+
} catch (err) {
|
|
1074
|
+
console.debug(err);
|
|
1058
1075
|
}
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
operator: 'and',
|
|
1087
|
-
expressions: []
|
|
1076
|
+
XEUtils.each(columns, (item) => {
|
|
1077
|
+
let col = vm.columns.find((x) => x.field === item.field);
|
|
1078
|
+
if (!col) {
|
|
1079
|
+
return;
|
|
1080
|
+
}
|
|
1081
|
+
if (!col.controlType) {
|
|
1082
|
+
col.controlType = "text";
|
|
1083
|
+
}
|
|
1084
|
+
switch (col.controlType) {
|
|
1085
|
+
case "select":
|
|
1086
|
+
if (item.filters && item.filters[0].checked) {
|
|
1087
|
+
item.filters = [
|
|
1088
|
+
{
|
|
1089
|
+
data: [],
|
|
1090
|
+
},
|
|
1091
|
+
];
|
|
1092
|
+
}
|
|
1093
|
+
break;
|
|
1094
|
+
default:
|
|
1095
|
+
if (item.filters && item.filters[0].checked) {
|
|
1096
|
+
item.filters = [
|
|
1097
|
+
{
|
|
1098
|
+
data: "",
|
|
1099
|
+
},
|
|
1100
|
+
];
|
|
1101
|
+
}
|
|
1102
|
+
break;
|
|
1088
1103
|
}
|
|
1104
|
+
});
|
|
1105
|
+
this.filterExpression = {
|
|
1106
|
+
operator: "and",
|
|
1107
|
+
expressions: [],
|
|
1108
|
+
};
|
|
1089
1109
|
},
|
|
1090
1110
|
},
|
|
1091
1111
|
};
|
|
@@ -1103,12 +1123,12 @@ export default {
|
|
|
1103
1123
|
.d-grid-control {
|
|
1104
1124
|
height: 30px;
|
|
1105
1125
|
}
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
}
|
|
1126
|
+
.interceptor-class {
|
|
1127
|
+
padding: 10px;
|
|
1128
|
+
::v-deep .ant-btn {
|
|
1129
|
+
margin: 10px 10px 0;
|
|
1111
1130
|
}
|
|
1131
|
+
}
|
|
1112
1132
|
</style>
|
|
1113
1133
|
|
|
1114
1134
|
|
package/packages/utils/common.js
CHANGED
|
@@ -542,7 +542,13 @@ export function getExportParams(columns) {
|
|
|
542
542
|
return tempParams
|
|
543
543
|
}
|
|
544
544
|
export function setFormButtons(toolBtns,statusBtns,permissionBtns){
|
|
545
|
-
|
|
545
|
+
// 将获取的数据进行排序
|
|
546
|
+
let tempSortArr = permissionBtns.sort(function(a,b){
|
|
547
|
+
a.sort = a.sort?a.sort:1
|
|
548
|
+
b.sort = b.sort?b.sort:1
|
|
549
|
+
return a.sort-b.sort
|
|
550
|
+
})
|
|
551
|
+
XEUtils.arrayEach(tempSortArr,loopBtn=>{
|
|
546
552
|
let pushBtn = {
|
|
547
553
|
code: loopBtn.code,
|
|
548
554
|
caption: loopBtn.name,
|
package/packages/utils/store.js
CHANGED
|
@@ -163,12 +163,6 @@ export default new Vuex.Store({
|
|
|
163
163
|
SET_IDENTITY_URL:(state,url) => {
|
|
164
164
|
state.identityUrl = url
|
|
165
165
|
},
|
|
166
|
-
SET_PUR_SCH_DEFAULT_START_TIME:(state,purSchDefaultStartTime)=>{
|
|
167
|
-
state.purSchDefaultStartTime = purSchDefaultStartTime
|
|
168
|
-
},
|
|
169
|
-
SET_PUR_SCH_DEFAULT_CLOSING_TIME:(state,purSchDefaultClosingTime)=>{
|
|
170
|
-
state.purSchDefaultClosingTime = purSchDefaultClosingTime
|
|
171
|
-
},
|
|
172
166
|
},
|
|
173
167
|
actions: {
|
|
174
168
|
/**
|