cloud-web-corejs 1.0.54-dev.810 → 1.0.54-dev.812

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.
Files changed (83) hide show
  1. package/package.json +1 -1
  2. package/src/components/VabUpload/image-viewer.vue +442 -442
  3. package/src/components/VabUpload/index.vue +44 -2
  4. package/src/components/VabUpload/mixins.js +126 -19
  5. package/src/components/VabUpload/view.vue +247 -209
  6. package/src/components/baseTabs/mixins.js +181 -181
  7. package/src/components/mobile/wf/content.vue +1665 -1556
  8. package/src/components/table/config.js +78 -78
  9. package/src/components/table/index.js +1276 -1276
  10. package/src/components/table/tableForm.vue +330 -330
  11. package/src/components/table/tableFormMixin.js +318 -318
  12. package/src/components/table/vxeFilter/index.js +163 -163
  13. package/src/components/table/vxeFilter/mixin.js +316 -316
  14. package/src/components/wf/content.vue +1188 -1188
  15. package/src/components/wf/wf.js +29 -12
  16. package/src/components/wf/wfActionDropdown.vue +1 -1
  17. package/src/components/wf/wfActionItems.js +1 -1
  18. package/src/components/xform/docs/2026-08 xform H5 P0 /345/256/236/347/216/260/350/247/204/346/240/274.md" +528 -0
  19. package/src/components/xform/docs/2026-08 xform H5 P1 /345/256/236/347/216/260/350/247/204/346/240/274.md" +412 -0
  20. package/src/components/xform/docs/2026-08 xform H5 P2 /345/256/236/347/216/260/350/247/204/346/240/274.md" +287 -0
  21. package/src/components/xform/docs/2026-08 xform /347/247/273/345/212/250/347/253/257/345/270/203/345/261/200/345/257/271/351/275/220 bill_setting /346/226/271/346/241/210.md" +400 -0
  22. package/src/components/xform/form-designer/designer.js +15 -0
  23. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
  24. package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
  25. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
  26. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
  27. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
  28. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
  29. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
  30. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
  31. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
  32. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
  33. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +29 -1
  34. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
  35. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
  36. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
  37. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
  38. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
  39. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +1 -0
  40. package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
  41. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -438
  42. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
  43. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
  44. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
  45. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
  46. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
  47. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
  48. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
  49. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
  50. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
  51. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
  52. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
  53. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
  54. package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
  55. package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
  56. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
  57. package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
  58. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
  59. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +4 -0
  60. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +55 -3
  61. package/src/components/xform/form-render/container-item/data-table-mixin.js +33 -12
  62. package/src/components/xform/form-render/container-item/detail-h5-item.vue +183 -32
  63. package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
  64. package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
  65. package/src/components/xform/form-render/container-item/list-h5-item.vue +1642 -1700
  66. package/src/components/xform/form-render/index.vue +153 -147
  67. package/src/components/xform/form-render/indexMixin.js +12 -0
  68. package/src/components/xform/lang/en-US.js +10 -0
  69. package/src/components/xform/lang/zh-CN.js +12 -0
  70. package/src/components/xform/mixins/defaultHandle.js +707 -707
  71. package/src/components/xform/styles/h5.scss +1634 -0
  72. package/src/components/xform/utils/textMaskUtil.js +182 -182
  73. package/src/components/xform/utils/treeTableUtil.js +1292 -1265
  74. package/src/components/xform/utils/util.js +56 -11
  75. package/src/utils/pdfUtil.js +429 -429
  76. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
  77. package/src/views/bd/setting/table_model/edit.vue +1066 -1066
  78. package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
  79. package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
  80. package/src/views/user/home/wjl/content.vue +394 -31
  81. package/src/views/user/role/edit.vue +632 -632
  82. package/src/views/user/role/list.vue +260 -260
  83. package/src/views/user/wf/wf_manage/list.vue +1116 -1116
@@ -1,316 +1,316 @@
1
- // 直接引用工具函数,不走 $table 实例上的补丁方法:
2
- // initVxeTable 只把 getCellValue/createParams 挂在初始化时的那个 xTable 实例上,
3
- // 页面若用 v-if 销毁重建 vxe-grid(如 product_problem_record/list.vue),
4
- // 新实例上没有这两个方法,筛选面板会报 $table.getCellValue is not a function
5
- import { getCellValue, createParams } from "../util/index";
6
-
7
- let modules = {};
8
-
9
- modules = {
10
- contentMixin: {
11
- name: "FilterContent",
12
- props: {
13
- params: Object,
14
- },
15
- data() {
16
- return {
17
- size: "mini",
18
- isAll: false,
19
- option: null,
20
- colValList: [],
21
- valList: [],
22
- valMap: null,
23
- };
24
- },
25
- created() {
26
- this.load();
27
- },
28
- methods: {
29
- getShowValue(val) {
30
- if (this.valMap && Object.keys(this.valMap).length > 0) {
31
- return this.valMap[val];
32
- } else {
33
- return val;
34
- }
35
- },
36
- load() {
37
- const { $table, column } = this.params;
38
- const { fullColumn, tableColumn } = $table.getTableColumn();
39
- const { fullData } = $table.getTableData();
40
- const option = column.filters[0];
41
- if (!option.data) {
42
- option.data = {
43
- sVal: "",
44
- };
45
- } else if (option.data.sVal == null) {
46
- option.data.sVal = "";
47
- }
48
-
49
- if (!option.data.hasFilter) {
50
- this.isAll = true;
51
- }
52
-
53
- let vals = option.data && option.data.vals ? option.data.vals : [];
54
- let valMap =
55
- option.data && option.data.valMap ? option.data.valMap : null;
56
-
57
- let lsm = {};
58
- let colValList = [];
59
- fullData.map((row, $rowIndex) => {
60
- let cellValue = getCellValue({
61
- row,
62
- $rowIndex,
63
- $table,
64
- column,
65
- });
66
- let sortValue = cellValue
67
- let sortField = column.params?.sortField;
68
- if(sortField){
69
- sortValue = row[sortField]??null;
70
- }
71
- if (lsm[cellValue]) {
72
- lsm[cellValue].count = lsm[cellValue].count + 1;
73
- } else {
74
- lsm[cellValue] = {
75
- checked: !option.data.hasFilter || vals.includes(cellValue),
76
- value: cellValue,
77
- sortValue: sortValue,
78
- count: 1,
79
- };
80
- }
81
- });
82
- for (let key in lsm) {
83
- colValList.push(lsm[key]);
84
- }
85
- colValList = this.sortByField(colValList, "sortValue");
86
-
87
- const columnsArr = [];
88
-
89
- this.option = option;
90
- this.colValList = colValList;
91
- this.valList = colValList;
92
- this.valMap = valMap;
93
-
94
- let filterColumns = fullColumn.filter((row, $rowIndex) => {
95
- return (
96
- row.filterRender &&
97
- row.filterRender.name == "FilterContent" &&
98
- row.field != column.field
99
- );
100
- });
101
-
102
- let datas = fullData.filter((row, $rowIndex) => {
103
- let item = filterColumns.find((filterColumn) => {
104
- let option1 = filterColumn.filters[0];
105
- if (!option1.data.hasFilter) {
106
- return false;
107
- }
108
- const vals = option1.data.vals || [];
109
- let param = createParams({
110
- $table: $table,
111
- row,
112
- column: filterColumn,
113
- });
114
- let cellValue = getCellValue(param);
115
- return !vals.includes(cellValue);
116
- });
117
- return item == null;
118
- });
119
- let lsm2 = {};
120
- datas.map((row, $rowIndex) => {
121
- let cellValue = getCellValue({
122
- row,
123
- $rowIndex,
124
- $table,
125
- column,
126
- });
127
- if (lsm2[cellValue]) {
128
- lsm2[cellValue].count = lsm2[cellValue].count + 1;
129
- } else {
130
- lsm2[cellValue] = {
131
- value: cellValue,
132
- count: 1,
133
- };
134
- }
135
- });
136
- colValList.forEach((colVal) => {
137
- let item = lsm2[colVal.value];
138
- if (item) {
139
- colVal.filterCount = item.count;
140
- } else {
141
- colVal.filterCount = 0;
142
- }
143
- });
144
-
145
- this.searchEvent();
146
- },
147
- sortByField(array, field) {
148
- return [...array].sort((a, b) => {
149
- const valA = a[field];
150
- const valB = b[field];
151
-
152
- // 处理 null/undefined(视为最小值)
153
- if (valA == null) return -1;
154
- if (valB == null) return 1;
155
- if (valA == null && valB == null) return 0;
156
-
157
- // 尝试数值比较
158
- const numA = Number(valA);
159
- const numB = Number(valB);
160
- if (!isNaN(numA) && !isNaN(numB)) {
161
- return numA - numB;
162
- }
163
-
164
- // 字符串比较
165
- return String(valA).localeCompare(String(valB));
166
- });
167
- },
168
- searchEvent() {
169
- let that = this;
170
- const { option, colValList } = this;
171
- this.valList = option.data.sVal
172
- ? colValList.filter(function (item) {
173
- let value = item.value;
174
- // 空单元格的 value 为 null/undefined,数值列为 number,必须转字符串再匹配
175
- return (
176
- value != null &&
177
- String(value).indexOf(option.data.sVal) > -1
178
- );
179
- })
180
- : colValList;
181
- let isAll = this.valList.every((item) => {
182
- return item.checked == true;
183
- });
184
- this.isAll = isAll;
185
- },
186
- changeAllEvent() {
187
- const { isAll } = this;
188
- this.valList.forEach((item) => {
189
- item.checked = isAll;
190
- });
191
- },
192
- checkItem(checked) {
193
- if (checked) {
194
- let isAll = this.valList.every((item) => {
195
- return item.checked == true;
196
- });
197
- this.isAll = isAll;
198
- } else {
199
- this.isAll = false;
200
- }
201
- },
202
- confirmFilterEvent(evnt) {
203
- const { params, option, valList, colValList } = this;
204
- const { data } = option;
205
- const { $panel, $table } = params;
206
- let vals = valList
207
- .filter((item) => item.checked)
208
- .map((item) => item.value);
209
- if (!option.data.sVal && colValList.length == vals.length) {
210
- this.resetFilterEvent();
211
- return;
212
- }
213
- data.vals = vals;
214
- option.data.hasFilter = true;
215
- $panel.changeOption(evnt, true, option);
216
- $panel.confirmFilter();
217
- $table.setAllCheckboxRow(false);
218
- },
219
- resetFilterEvent() {
220
- const { $panel, $table } = this.params;
221
- this.option.data.hasFilter = false;
222
- $panel.resetFilter();
223
- $table.setAllCheckboxRow(false);
224
- },
225
- },
226
- },
227
- complexMixin: {
228
- name: "FilterComplex",
229
- props: {
230
- params: Object,
231
- events: Object,
232
- },
233
- data() {
234
- return {
235
- size: "mini", // 被所有子组件继承 size
236
- column: null,
237
- option: null,
238
- };
239
- },
240
- created() {
241
- this.load();
242
- },
243
- methods: {
244
- load() {
245
- const { column } = this.params;
246
- const option = column.filters[0];
247
- if (!option.data) {
248
- option.data = {
249
- type: "lt",
250
- };
251
- } else if (!option.data.type) {
252
- option.data.type = "lt";
253
- }
254
-
255
- this.column = column;
256
- this.option = option;
257
- },
258
- changeOptionEvent() {
259
- const { params, option } = this;
260
- const { $panel } = params;
261
- const checked = !!option.data.name;
262
- $panel.changeOption(null, checked, option);
263
- },
264
- confirmEvent() {
265
- const { $panel, column } = this.params;
266
- $panel.confirmFilter();
267
- },
268
- resetEvent() {
269
- // eslint-disable-next-line no-unused-vars
270
- const { $panel } = this.params;
271
- $panel.resetFilter();
272
- },
273
- },
274
- },
275
- inputMixin: {
276
- name: "FilterInput",
277
- props: {
278
- params: Object,
279
- },
280
- data() {
281
- return {
282
- column: null,
283
- option: null,
284
- };
285
- },
286
- created() {
287
- this.load();
288
- },
289
- methods: {
290
- load() {
291
- const { column } = this.params;
292
- const option = column.filters[0];
293
- this.column = column;
294
- this.option = option;
295
- },
296
- changeOptionEvent() {
297
- const { params, option } = this;
298
- const { $panel } = params;
299
- const checked = !!option.data;
300
- $panel.changeOption(null, checked, option);
301
- },
302
- keyupEvent({ $event }) {
303
- const { params } = this;
304
- const { $panel } = params;
305
- if ($event.keyCode === 13) {
306
- $panel.confirmFilter();
307
- }
308
- },
309
- },
310
- },
311
- };
312
-
313
- export const inputMixin = modules.inputMixin;
314
- export const complexMixin = modules.complexMixin;
315
- export const contentMixin = modules.contentMixin;
316
- export default modules;
1
+ // 直接引用工具函数,不走 $table 实例上的补丁方法:
2
+ // initVxeTable 只把 getCellValue/createParams 挂在初始化时的那个 xTable 实例上,
3
+ // 页面若用 v-if 销毁重建 vxe-grid(如 product_problem_record/list.vue),
4
+ // 新实例上没有这两个方法,筛选面板会报 $table.getCellValue is not a function
5
+ import { getCellValue, createParams } from "../util/index";
6
+
7
+ let modules = {};
8
+
9
+ modules = {
10
+ contentMixin: {
11
+ name: "FilterContent",
12
+ props: {
13
+ params: Object,
14
+ },
15
+ data() {
16
+ return {
17
+ size: "mini",
18
+ isAll: false,
19
+ option: null,
20
+ colValList: [],
21
+ valList: [],
22
+ valMap: null,
23
+ };
24
+ },
25
+ created() {
26
+ this.load();
27
+ },
28
+ methods: {
29
+ getShowValue(val) {
30
+ if (this.valMap && Object.keys(this.valMap).length > 0) {
31
+ return this.valMap[val];
32
+ } else {
33
+ return val;
34
+ }
35
+ },
36
+ load() {
37
+ const { $table, column } = this.params;
38
+ const { fullColumn, tableColumn } = $table.getTableColumn();
39
+ const { fullData } = $table.getTableData();
40
+ const option = column.filters[0];
41
+ if (!option.data) {
42
+ option.data = {
43
+ sVal: "",
44
+ };
45
+ } else if (option.data.sVal == null) {
46
+ option.data.sVal = "";
47
+ }
48
+
49
+ if (!option.data.hasFilter) {
50
+ this.isAll = true;
51
+ }
52
+
53
+ let vals = option.data && option.data.vals ? option.data.vals : [];
54
+ let valMap =
55
+ option.data && option.data.valMap ? option.data.valMap : null;
56
+
57
+ let lsm = {};
58
+ let colValList = [];
59
+ fullData.map((row, $rowIndex) => {
60
+ let cellValue = getCellValue({
61
+ row,
62
+ $rowIndex,
63
+ $table,
64
+ column,
65
+ });
66
+ let sortValue = cellValue
67
+ let sortField = column.params?.sortField;
68
+ if(sortField){
69
+ sortValue = row[sortField]??null;
70
+ }
71
+ if (lsm[cellValue]) {
72
+ lsm[cellValue].count = lsm[cellValue].count + 1;
73
+ } else {
74
+ lsm[cellValue] = {
75
+ checked: !option.data.hasFilter || vals.includes(cellValue),
76
+ value: cellValue,
77
+ sortValue: sortValue,
78
+ count: 1,
79
+ };
80
+ }
81
+ });
82
+ for (let key in lsm) {
83
+ colValList.push(lsm[key]);
84
+ }
85
+ colValList = this.sortByField(colValList, "sortValue");
86
+
87
+ const columnsArr = [];
88
+
89
+ this.option = option;
90
+ this.colValList = colValList;
91
+ this.valList = colValList;
92
+ this.valMap = valMap;
93
+
94
+ let filterColumns = fullColumn.filter((row, $rowIndex) => {
95
+ return (
96
+ row.filterRender &&
97
+ row.filterRender.name == "FilterContent" &&
98
+ row.field != column.field
99
+ );
100
+ });
101
+
102
+ let datas = fullData.filter((row, $rowIndex) => {
103
+ let item = filterColumns.find((filterColumn) => {
104
+ let option1 = filterColumn.filters[0];
105
+ if (!option1.data.hasFilter) {
106
+ return false;
107
+ }
108
+ const vals = option1.data.vals || [];
109
+ let param = createParams({
110
+ $table: $table,
111
+ row,
112
+ column: filterColumn,
113
+ });
114
+ let cellValue = getCellValue(param);
115
+ return !vals.includes(cellValue);
116
+ });
117
+ return item == null;
118
+ });
119
+ let lsm2 = {};
120
+ datas.map((row, $rowIndex) => {
121
+ let cellValue = getCellValue({
122
+ row,
123
+ $rowIndex,
124
+ $table,
125
+ column,
126
+ });
127
+ if (lsm2[cellValue]) {
128
+ lsm2[cellValue].count = lsm2[cellValue].count + 1;
129
+ } else {
130
+ lsm2[cellValue] = {
131
+ value: cellValue,
132
+ count: 1,
133
+ };
134
+ }
135
+ });
136
+ colValList.forEach((colVal) => {
137
+ let item = lsm2[colVal.value];
138
+ if (item) {
139
+ colVal.filterCount = item.count;
140
+ } else {
141
+ colVal.filterCount = 0;
142
+ }
143
+ });
144
+
145
+ this.searchEvent();
146
+ },
147
+ sortByField(array, field) {
148
+ return [...array].sort((a, b) => {
149
+ const valA = a[field];
150
+ const valB = b[field];
151
+
152
+ // 处理 null/undefined(视为最小值)
153
+ if (valA == null) return -1;
154
+ if (valB == null) return 1;
155
+ if (valA == null && valB == null) return 0;
156
+
157
+ // 尝试数值比较
158
+ const numA = Number(valA);
159
+ const numB = Number(valB);
160
+ if (!isNaN(numA) && !isNaN(numB)) {
161
+ return numA - numB;
162
+ }
163
+
164
+ // 字符串比较
165
+ return String(valA).localeCompare(String(valB));
166
+ });
167
+ },
168
+ searchEvent() {
169
+ let that = this;
170
+ const { option, colValList } = this;
171
+ this.valList = option.data.sVal
172
+ ? colValList.filter(function (item) {
173
+ let value = item.value;
174
+ // 空单元格的 value 为 null/undefined,数值列为 number,必须转字符串再匹配
175
+ return (
176
+ value != null &&
177
+ String(value).indexOf(option.data.sVal) > -1
178
+ );
179
+ })
180
+ : colValList;
181
+ let isAll = this.valList.every((item) => {
182
+ return item.checked == true;
183
+ });
184
+ this.isAll = isAll;
185
+ },
186
+ changeAllEvent() {
187
+ const { isAll } = this;
188
+ this.valList.forEach((item) => {
189
+ item.checked = isAll;
190
+ });
191
+ },
192
+ checkItem(checked) {
193
+ if (checked) {
194
+ let isAll = this.valList.every((item) => {
195
+ return item.checked == true;
196
+ });
197
+ this.isAll = isAll;
198
+ } else {
199
+ this.isAll = false;
200
+ }
201
+ },
202
+ confirmFilterEvent(evnt) {
203
+ const { params, option, valList, colValList } = this;
204
+ const { data } = option;
205
+ const { $panel, $table } = params;
206
+ let vals = valList
207
+ .filter((item) => item.checked)
208
+ .map((item) => item.value);
209
+ if (!option.data.sVal && colValList.length == vals.length) {
210
+ this.resetFilterEvent();
211
+ return;
212
+ }
213
+ data.vals = vals;
214
+ option.data.hasFilter = true;
215
+ $panel.changeOption(evnt, true, option);
216
+ $panel.confirmFilter();
217
+ $table.setAllCheckboxRow(false);
218
+ },
219
+ resetFilterEvent() {
220
+ const { $panel, $table } = this.params;
221
+ this.option.data.hasFilter = false;
222
+ $panel.resetFilter();
223
+ $table.setAllCheckboxRow(false);
224
+ },
225
+ },
226
+ },
227
+ complexMixin: {
228
+ name: "FilterComplex",
229
+ props: {
230
+ params: Object,
231
+ events: Object,
232
+ },
233
+ data() {
234
+ return {
235
+ size: "mini", // 被所有子组件继承 size
236
+ column: null,
237
+ option: null,
238
+ };
239
+ },
240
+ created() {
241
+ this.load();
242
+ },
243
+ methods: {
244
+ load() {
245
+ const { column } = this.params;
246
+ const option = column.filters[0];
247
+ if (!option.data) {
248
+ option.data = {
249
+ type: "lt",
250
+ };
251
+ } else if (!option.data.type) {
252
+ option.data.type = "lt";
253
+ }
254
+
255
+ this.column = column;
256
+ this.option = option;
257
+ },
258
+ changeOptionEvent() {
259
+ const { params, option } = this;
260
+ const { $panel } = params;
261
+ const checked = !!option.data.name;
262
+ $panel.changeOption(null, checked, option);
263
+ },
264
+ confirmEvent() {
265
+ const { $panel, column } = this.params;
266
+ $panel.confirmFilter();
267
+ },
268
+ resetEvent() {
269
+ // eslint-disable-next-line no-unused-vars
270
+ const { $panel } = this.params;
271
+ $panel.resetFilter();
272
+ },
273
+ },
274
+ },
275
+ inputMixin: {
276
+ name: "FilterInput",
277
+ props: {
278
+ params: Object,
279
+ },
280
+ data() {
281
+ return {
282
+ column: null,
283
+ option: null,
284
+ };
285
+ },
286
+ created() {
287
+ this.load();
288
+ },
289
+ methods: {
290
+ load() {
291
+ const { column } = this.params;
292
+ const option = column.filters[0];
293
+ this.column = column;
294
+ this.option = option;
295
+ },
296
+ changeOptionEvent() {
297
+ const { params, option } = this;
298
+ const { $panel } = params;
299
+ const checked = !!option.data;
300
+ $panel.changeOption(null, checked, option);
301
+ },
302
+ keyupEvent({ $event }) {
303
+ const { params } = this;
304
+ const { $panel } = params;
305
+ if ($event.keyCode === 13) {
306
+ $panel.confirmFilter();
307
+ }
308
+ },
309
+ },
310
+ },
311
+ };
312
+
313
+ export const inputMixin = modules.inputMixin;
314
+ export const complexMixin = modules.complexMixin;
315
+ export const contentMixin = modules.contentMixin;
316
+ export default modules;