doway-coms 1.6.39 → 1.6.41

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 (67) hide show
  1. package/.browserslistrc +2 -2
  2. package/README.md +28 -28
  3. package/package.json +52 -52
  4. package/packages/BaseButton/index.js +7 -7
  5. package/packages/BaseButton/src/index.vue +241 -241
  6. package/packages/BaseCheckbox/index.js +7 -7
  7. package/packages/BaseCheckbox/src/index.vue +134 -134
  8. package/packages/BaseDate/index.js +7 -7
  9. package/packages/BaseDate/src/index.vue +197 -197
  10. package/packages/BaseDateWeek/index.js +7 -7
  11. package/packages/BaseDateWeek/src/index.vue +163 -163
  12. package/packages/BaseDatetime/index.js +7 -7
  13. package/packages/BaseDatetime/src/index.vue +196 -196
  14. package/packages/BaseForm/index.js +7 -7
  15. package/packages/BaseForm/src/index.vue +666 -666
  16. package/packages/BaseGantt/index.js +9 -9
  17. package/packages/BaseGantt/src/index.vue +608 -608
  18. package/packages/BaseGrid/index.js +9 -9
  19. package/packages/BaseGrid/src/index.vue +2742 -2739
  20. package/packages/BaseGridAdjust/index.js +9 -9
  21. package/packages/BaseGridAdjust/src/index.vue +455 -455
  22. package/packages/BaseInput/index.js +7 -7
  23. package/packages/BaseInput/src/index.vue +164 -164
  24. package/packages/BaseIntervalInput/index.js +7 -7
  25. package/packages/BaseIntervalInput/src/index.vue +310 -310
  26. package/packages/BaseKanbanEmpty/index.js +7 -7
  27. package/packages/BaseKanbanEmpty/src/index.vue +176 -176
  28. package/packages/BaseNumberInput/index.js +7 -7
  29. package/packages/BaseNumberInput/src/index.vue +229 -229
  30. package/packages/BasePagination/index.js +7 -7
  31. package/packages/BasePagination/src/index.vue +91 -91
  32. package/packages/BasePictureCard/index.js +7 -7
  33. package/packages/BasePictureCard/src/index.vue +580 -580
  34. package/packages/BasePrintPreview/index.js +7 -7
  35. package/packages/BasePrintPreview/src/index.vue +117 -117
  36. package/packages/BasePulldown/index.js +7 -7
  37. package/packages/BasePulldown/src/index.vue +1136 -1136
  38. package/packages/BaseSearch/index.js +7 -7
  39. package/packages/BaseSearch/src/index.vue +935 -935
  40. package/packages/BaseSelect/index.js +7 -7
  41. package/packages/BaseSelect/src/index.vue +155 -155
  42. package/packages/BaseSelectMulti/index.js +7 -7
  43. package/packages/BaseSelectMulti/src/index.vue +148 -148
  44. package/packages/BaseTextArea/index.js +7 -7
  45. package/packages/BaseTextArea/src/index.vue +178 -178
  46. package/packages/BaseTime/index.js +7 -7
  47. package/packages/BaseTime/src/index.vue +166 -166
  48. package/packages/BaseTool/index.js +7 -7
  49. package/packages/BaseTool/src/index.vue +349 -349
  50. package/packages/BaseToolStatus/index.js +7 -7
  51. package/packages/BaseToolStatus/src/index.vue +383 -383
  52. package/packages/index.js +165 -167
  53. package/packages/styles/default.less +80 -80
  54. package/packages/utils/api.js +45 -74
  55. package/packages/utils/auth.js +38 -38
  56. package/packages/utils/common.js +595 -595
  57. package/packages/utils/dom.js +181 -181
  58. package/packages/utils/enum.js +83 -83
  59. package/packages/utils/filters.js +458 -458
  60. package/packages/utils/gridFormat.js +60 -60
  61. package/packages/utils/msg.js +16 -16
  62. package/packages/utils/patchFiles.js +44 -44
  63. package/packages/utils/request.js +169 -169
  64. package/packages/utils/store.js +261 -261
  65. package/vue.config.js +59 -59
  66. package/packages/LeaveAMessage/index.js +0 -8
  67. package/packages/LeaveAMessage/src/index.vue +0 -386
@@ -1,1137 +1,1137 @@
1
- <template>
2
- <div class="d-control-container">
3
- <div
4
- class="d-control-label"
5
- v-if="showLabel === true"
6
- :style="{ width: labelWidth > 0 ? labelWidth + 'px' : 'none' }"
7
- >
8
- {{ label }}
9
- <span v-if="rules && rules['required']" class="d-control-label-required"
10
- >*</span
11
- >
12
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
13
- <img src="../../styles/icon/help.png" alt="" style="width: 14px" />
14
- </Tooltip>
15
- </div>
16
- <div
17
- :class="{
18
- 'd-control': showLabel === true,
19
- 'd-grid-control': showLabel === false,
20
- }"
21
- >
22
- <VxePulldown
23
- style="width: 100%"
24
- @hide-panel="pullDownHideEvent"
25
- ref="pulldownRef"
26
- v-if="edit === true"
27
- transfer
28
- >
29
- <template #default>
30
- <ValidationProvider :name="label" v-slot="v" :rules="rules">
31
- <a-input
32
- :size="'small'"
33
- allow-clear
34
- @change="inputChangeEvent"
35
- class="inner-cell-control"
36
- v-model="currentValue"
37
- @click="inputClickEvent"
38
- @focus="inputFocusEvent"
39
- @blur="inputBlurEvent"
40
- @keydown="inputKeydownEvent"
41
- @keyup="inputKeyupEvent"
42
- :class="{ 'd-error-input': v.errors.length > 0 }"
43
- ></a-input>
44
- <div class="d-error-msg">
45
- {{ v.errors[0] }}
46
- </div>
47
- </ValidationProvider>
48
- </template>
49
- <template #dropdown>
50
- <div class="pulldown-grid interceptor-class">
51
- <vxe-grid
52
- size="mini"
53
- border
54
- :row-class-name="gridRowStyle"
55
- highlight-current-row
56
- :keyboard-config="{ isArrow: true }"
57
- highlight-hover-row
58
- auto-resize
59
- resizable
60
- :loading="gridLoading"
61
- height="auto"
62
- ref="pupupGridView"
63
- :data="searchRows"
64
- @cell-click="gridCellClick"
65
- @filter-visible="filterVisible"
66
- :columns="internalColumns"
67
- :checkbox-config="{ checkMethod: checkMethod }"
68
- @sort-change="sortChange"
69
- :filter-config="{
70
- remote: true,
71
- }"
72
- :sort-config="{
73
- multiple: true,
74
- remote: true,
75
- chronological: true,
76
- defaultSort: defaultSort,
77
- }"
78
- >
79
- <!-- :pager-config="gridPagerConfig" -->
80
- <!-- @page-change="pageChangeEvent" -->
81
- <template #matCode_header="{ column }">
82
- <div class="first-col">
83
- <div class="first-col-top">
84
- {{ column.title }}
85
- </div>
86
- <div class="first-col-bottom">
87
- <input style="width: 100%" />
88
- </div>
89
- </div>
90
- </template>
91
- <!-- 普通输入框的过滤筛选-->
92
- <template #text_filter="{ column }">
93
- <div class="interceptor-class">
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
- />
101
- </div>
102
- <a-button @click="filterAddExp(column)">添加条件</a-button>
103
- <a-button @click="filterConfirm(column)">确认</a-button>
104
- </div>
105
- </template>
106
- <!-- 选择筛选框-->
107
- <template #select_filter="{ column }">
108
- <div class="interceptor-class">
109
- <a-checkbox-group
110
- v-model="column.filters[0].data"
111
- @keyup.enter.native="filterConfirm(column)"
112
- >
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
- >
119
- <a-checkbox
120
- :value="loopSource.value"
121
- style="margin: 5px 0"
122
- >{{ loopSource.caption }}
123
- </a-checkbox>
124
- </div>
125
- </div>
126
- </a-checkbox-group>
127
- <br />
128
- <a-button @click="filterConfirm(column)">确认</a-button>
129
- </div>
130
- </template>
131
- <template #pager>
132
- <a-row>
133
- <a-col :span="8">
134
- <a-button
135
- v-if="isMultiSelect === true"
136
- type="primary"
137
- size="small"
138
- style="margin: 5px"
139
- @click="multiSelectConfirm"
140
- >
141
- 确认选择
142
- </a-button>
143
- <a-button
144
- v-if="popupAddName"
145
- type="primary"
146
- size="small"
147
- style="margin: 5px"
148
- @click="pagerBtnClick(btn)"
149
- >
150
- 新增
151
- </a-button>
152
-
153
- <template v-if="optBtns.length > 0">
154
- <a-button
155
- v-for="btn in optBtns"
156
- :key="btn.field"
157
- type="primary"
158
- size="small"
159
- style="margin: 5px"
160
- @click="pagerBtnClick(btn)"
161
- >
162
- {{ btn.name }}
163
- </a-button>
164
- </template>
165
- </a-col>
166
- <a-col :span="16">
167
- <vxe-pager
168
- align="right"
169
- size="mini"
170
- :current-page.sync="gridPagerConfig.currentPage"
171
- :page-size.sync="gridPagerConfig.pageSize"
172
- :total="gridPagerConfig.total"
173
- @page-change="pageChangeEvent"
174
- >
175
- </vxe-pager>
176
- </a-col>
177
- </a-row>
178
- </template>
179
- </vxe-grid>
180
- </div>
181
- </template>
182
- </VxePulldown>
183
- <span v-if="edit === false">
184
- <a v-if="route" @click="routeLinkClick">{{ currentValue }}</a>
185
- <span v-else> {{ currentValue }}</span>
186
- </span>
187
- </div>
188
- <keep-alive>
189
- <div
190
- :is="popupAddName"
191
- ref="pupupAddView"
192
- @popupSaveAfter="popupSaveAfter"
193
- ></div>
194
- </keep-alive>
195
- </div>
196
- </template>
197
-
198
- <script>
199
- import XEUtils from "xe-utils";
200
- import { sysRowState, sysFormState, controlType } from "../../utils/enum";
201
- import { replaceParamString, replaceParam } from "../../utils/common";
202
- import request from "../../utils/request";
203
- import { Input, Button, Row, Col, Checkbox } from "ant-design-vue";
204
- import { ValidationProvider } from "vee-validate";
205
- import { Pulldown } from "vxe-table";
206
- import { Tooltip } from "ant-design-vue";
207
- export default {
208
- name: "BasePulldown",
209
- components: {
210
- "a-input": Input,
211
- "a-button": Button,
212
- "a-row": Row,
213
- "a-col": Col,
214
- "a-checkbox": Checkbox,
215
- "a-checkbox-group": Checkbox.Group,
216
- VxePulldown: Pulldown,
217
- ValidationProvider,
218
- Tooltip,
219
- },
220
- data() {
221
- return {
222
- fetchFields: "",
223
- internalColumns: [],
224
- isInputChanged: false,
225
- inputTimeout: null,
226
- searchRows: [],
227
- filterCols: [],
228
- gridLoading: false,
229
- gridPagerConfig: {
230
- total: 0,
231
- currentPage: 1,
232
- pageSize: 10,
233
- },
234
- sorts: [],
235
- defaultSort: [],
236
- filterExpression: {
237
- operator: "and",
238
- expressions: [],
239
- },
240
- };
241
- },
242
- props: {
243
- labelWidth: {
244
- type: Number,
245
- default: function () {
246
- return 0;
247
- },
248
- },
249
- isMultiSelect: {
250
- type: Boolean,
251
- default: function () {
252
- return false;
253
- },
254
- },
255
- popupAddName: {
256
- type: String,
257
- default: function () {
258
- return null;
259
- },
260
- },
261
- popupAddPath: {
262
- type: String,
263
- default: function () {
264
- return null;
265
- },
266
- },
267
- rules: {
268
- type: Object,
269
- default: function () {
270
- return null;
271
- },
272
- },
273
- showLabel: {
274
- type: Boolean,
275
- default: function () {
276
- return true;
277
- },
278
- },
279
- label: {
280
- type: String,
281
- default: function () {
282
- return "";
283
- },
284
- },
285
- defaultExpression: {
286
- type: String,
287
- default: function () {
288
- return "";
289
- },
290
- },
291
- formRow: {
292
- type: Object,
293
- default: function () {
294
- return {};
295
- },
296
- },
297
- row: {
298
- type: Object,
299
- default: function () {
300
- return {};
301
- },
302
- },
303
- edit: {
304
- type: Boolean,
305
- default: function () {
306
- return false;
307
- },
308
- },
309
- route: Object,
310
- placeholder: {
311
- // 提示信息
312
- type: String,
313
- },
314
- api: {
315
- // api接口
316
- type: String,
317
- },
318
- field: {
319
- type: String,
320
- },
321
- pageSize: {
322
- // 分页数量,默认不分页
323
- type: Number,
324
- default: () => {
325
- return 0;
326
- },
327
- },
328
- columns: {
329
- // 列集合
330
- type: Array,
331
- default: () => {
332
- return [];
333
- },
334
- },
335
- isOld: {
336
- // 列集合
337
- type: Boolean,
338
- default: () => {
339
- return false;
340
- },
341
- },
342
- exps: {
343
- // 条件
344
- type: Array,
345
- default: () => {
346
- return [];
347
- },
348
- },
349
- value: {
350
- type: String,
351
- default: function () {
352
- return "";
353
- },
354
- },
355
- optBtns: {
356
- // 操作按钮
357
- type: Array,
358
- default: () => {
359
- return [];
360
- },
361
- },
362
- gridTable: {
363
- // 操作按钮
364
- type: Object,
365
- default: () => {
366
- return null;
367
- },
368
- },
369
- immediate: {
370
- type: Boolean,
371
- default: true,
372
- },
373
- isLocalData: {
374
- type: Boolean,
375
- default: false,
376
- },
377
- tooltip: {
378
- type: String,
379
- default: function () {
380
- return "";
381
- },
382
- },
383
- propTableData: {
384
- type: Array,
385
- default: function () {
386
- return [];
387
- },
388
- },
389
- },
390
- watch: {},
391
- computed: {
392
- currentValue: {
393
- // 动态计算currentValue的值
394
- get: function () {
395
- return this.value; // 将props中的value赋值给currentValue
396
- },
397
- set: function (val) {
398
- this.$emit("input", val); // 通过$emit触发父组件
399
- },
400
- },
401
- },
402
- created() {
403
- // if (this.popupAddName && !this.$options.components[this.popupAddName]) {
404
- // // const tempRequire = require('@/views' + this.popupAddPath + '.vue').default
405
- // // this.$options.components[this.popupAddName] = tempRequire
406
- // this.$options.components[this.popupAddName] = () =>
407
- // import('@/views' + this.popupAddPath + '.vue')
408
- // }
409
- this.gridPagerConfig.pageSize = this.pageSize;
410
-
411
- this.internalColumns.push({
412
- type: "seq",
413
- fixed: "left",
414
- width: 50,
415
- });
416
-
417
- if (this.isMultiSelect === true) {
418
- this.internalColumns.push({
419
- type: "checkbox",
420
- fixed: "left",
421
- width: 40,
422
- });
423
- }
424
-
425
- for (let i = 0; i < this.columns.length; i++) {
426
- this.fetchFields = this.fetchFields + this.columns[i].field + ",";
427
- this.columns[i]["params"] = {
428
- dataSource: [],
429
- };
430
- if (this.columns[i].dataSource) {
431
- this.columns[i]["params"].dataSource = this.columns[i].dataSource;
432
- }
433
- if (!this.columns[i].width) {
434
- this.columns[i]["width"] = 100;
435
- }
436
- if (this.columns[i].isCheckbox === true) {
437
- this.columns[i]["type"] = "checkbox";
438
- }
439
- if (!this.columns[i].controlType) {
440
- this.columns[i].controlType = "text";
441
- }
442
- // 设置字段的过滤插槽
443
- if (this.columns[i].filter) {
444
- this.columns[i]["filterMultiple"] = false;
445
-
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"] = [
457
- {
458
- data: [],
459
- },
460
- ];
461
- break;
462
- default:
463
- this.columns[i]["slots"] = {
464
- filter: `text_filter`,
465
- };
466
- this.columns[i]["filters"] = [
467
- {
468
- data: "",
469
- },
470
- ];
471
- break;
472
- }
473
- }
474
- // 默认排序
475
- if (this.columns[i].defaultSort) {
476
- this.defaultSort.push({
477
- field: this.columns[i].field,
478
- order: this.columns[i].defaultSort,
479
- });
480
- this.sorts.push([this.columns[i].field, this.columns[i].defaultSort]);
481
- }
482
- this.internalColumns.push(this.columns[i]);
483
- if (this.columns[i].filter === true) {
484
- this.filterCols.push(this.columns[i]);
485
- }
486
- }
487
- },
488
- methods: {
489
- gridRowStyle(scope) {
490
- if (scope.row.sysRepeat === true) {
491
- return "row--pending";
492
- }
493
- // if(scope.row.)
494
- },
495
- clearInputValue() {
496
- if (this.isInputChanged === true) {
497
- this.setLinkValue(null, this.row);
498
- this.$emit("selectChanged", null);
499
- }
500
- },
501
- routeLinkClick() {
502
- //首先需要判断是否有权限
503
- // let treeModule = XEUtils.findTree(
504
- // this.$store.getters.addRouters,
505
- // item => item.name === this.route.name
506
- // )
507
- // if (!treeModule) {
508
- // this.$antwarning('没有权限')
509
- // return
510
- // }
511
- this.$router.pushRoute({
512
- name: this.route.name,
513
- query: { id: this.row[this.route.field] },
514
- });
515
- },
516
- /**
517
- * 输入框改变事件
518
- */
519
- inputChangeEvent(event) {
520
- this.isInputChanged = true;
521
- if (event.type === "click" && event.pointerType === "mouse") {
522
- //点击了清空按钮
523
- this.$nextTick(() => {
524
- this.clearInputValue();
525
- this.inputClickEvent(null);
526
- });
527
- }
528
- },
529
- inputBlurEvent(event) {},
530
- /**
531
- * 输入框获取焦点事件
532
- */
533
- inputFocusEvent(event) {
534
- event.currentTarget.select();
535
- // this.$refs.pulldownRef.showPanel()
536
- // this.searchData()
537
- },
538
- /**
539
- * Tab键隐藏面板
540
- */
541
- inputKeydownEvent(event) {
542
- if (event.keyCode === 9) {
543
- //tab事件
544
- this.$refs.pulldownRef.hidePanel();
545
- this.clearInputValue();
546
- }
547
- },
548
- inputClickEvent(event) {
549
- if (this.$refs.pulldownRef.isPanelVisible() === false) {
550
- this.$refs.pulldownRef.showPanel();
551
- this.clearColumnFilter();
552
- this.searchData();
553
- } else {
554
- this.$refs.pulldownRef.hidePanel();
555
- }
556
- },
557
- /**
558
- * 输入库输入事件
559
- */
560
- inputKeyupEvent(event) {
561
- //好像ok
562
- if (!this.immediate && event.keyCode !== 13) {
563
- console.debug("davistest");
564
- } else {
565
- if (this.inputTimeout) {
566
- clearTimeout(this.inputTimeout);
567
- }
568
- let vm = this;
569
- this.inputTimeout = setTimeout(() => {
570
- //判断面板是否打开
571
- if (vm.$refs.pulldownRef.isPanelVisible() === false) {
572
- vm.$refs.pulldownRef.showPanel();
573
- }
574
- vm.searchData();
575
- }, 500);
576
- }
577
- },
578
- /**
579
- * 网格列选中事件
580
- */
581
- gridCellClick({ row, column }) {
582
- if (row.sysRepeat === true) {
583
- return;
584
- }
585
- if (column.type === "seq" || column.type === "checkbox") {
586
- return;
587
- }
588
- this.isInputChanged = false;
589
- this.setLinkValue(row, this.row);
590
- this.$emit("selectChanged", row);
591
- this.$refs.pulldownRef.hidePanel();
592
- },
593
- setLinkValue(pulldownRow, oriRow) {
594
- for (let i = 0; i < this.internalColumns.length; i++) {
595
- if (this.internalColumns[i].linkField) {
596
- let tempLinkFields = this.internalColumns[i].linkField.split(".");
597
- let tempRow = oriRow;
598
- // for(let j=0;j<tempLinkFields.length;j++){
599
- // let tempField = tempLinkFields[j]
600
- // //如果赋值的属性不存在数据集中,就忽略更新,防止修改后网格单元格值不更细
601
- // if (!(tempField in tempRow)) {
602
- // this.$antwarning(
603
- // '赋值字段[' + this.internalColumns[i].linkField + ']不存在'
604
- // )
605
- // break
606
- // }
607
- // if(j===tempLinkFields.length-1){
608
- // if (pulldownRow === null) {
609
- // if (this.internalColumns[i].nullClear === false) {
610
- // //是否空值清除数据,用于可选可输入的控件
611
- // continue
612
- // }
613
- // this.$set(tempRow, tempField, null)
614
- // } else {
615
- // this.$set(
616
- // tempRow,
617
- // tempField,
618
- // this.getLinkValue(tempField, pulldownRow)
619
- // )
620
- // }
621
- // }else{
622
- // tempRow = tempRow[tempField]
623
- // }
624
- // }
625
-
626
- //如果赋值的属性不存在数据集中,就忽略更新,防止修改后网格单元格值不更细
627
- if (!(this.internalColumns[i].linkField in oriRow)) {
628
- this.$antwarning(
629
- "赋值字段[" + this.internalColumns[i].linkField + "]不存在"
630
- );
631
- continue;
632
- }
633
- if (pulldownRow === null) {
634
- if (this.internalColumns[i].nullClear === false) {
635
- //是否空值清楚数据,用于可选可输入的控件
636
- continue;
637
- }
638
- this.$set(oriRow, this.internalColumns[i].linkField, null);
639
- } else {
640
- this.$set(
641
- oriRow,
642
- this.internalColumns[i].linkField,
643
- this.getLinkValue(this.internalColumns[i].field, pulldownRow)
644
- );
645
- }
646
- }
647
- }
648
- },
649
- getLinkValue(field, row) {
650
- let linkField = field.split(".");
651
- if (linkField.length > 1) {
652
- let fieldValue = row;
653
- for (let i = 0; i < linkField.length; i++) {
654
- if (
655
- fieldValue[linkField[i]] === undefined ||
656
- fieldValue[linkField[i]] === null
657
- ) {
658
- return null;
659
- }
660
- fieldValue = fieldValue[linkField[i]];
661
- }
662
- return fieldValue;
663
- }
664
- return row[field];
665
- },
666
- /**
667
- * 左下角按钮点击事件
668
- */
669
- pagerBtnClick(btn) {
670
- this.$refs.pupupAddView.show();
671
- // this.$emit('pulldownBtnClick', btn)
672
- this.$refs.pulldownRef.hidePanel();
673
- },
674
- // 多选内容时,若数据不满足条件,不可选中
675
- checkMethod({ row }) {
676
- if (row.sysRepeat) {
677
- return false;
678
- }
679
- return true;
680
- },
681
- /**
682
- * 确认多选
683
- */
684
- multiSelectConfirm() {
685
- this.isInputChanged = false;
686
- this.$emit(
687
- "confirmMultiSelect",
688
- this,
689
- this.$refs.pupupGridView.getCheckboxRecords(true)
690
- );
691
- this.$refs.pulldownRef.hidePanel();
692
- },
693
- popupSaveAfter(pupupAddRowInfo) {
694
- let postData = {
695
- fields: null,
696
- begin: 1,
697
- size: 1,
698
- expression: {},
699
- sorts: "",
700
- };
701
- let tempKeyExp = XEUtils.find(
702
- this.internalColumns,
703
- (item) => item.isKey === true
704
- );
705
- postData.expression = {
706
- operator: "and",
707
- expressions: [
708
- {
709
- operator: "and",
710
- expressions: [
711
- {
712
- field: tempKeyExp.field,
713
- operator: "EQ",
714
- value: pupupAddRowInfo["id"],
715
- },
716
- ],
717
- },
718
- ],
719
- };
720
- let vm = this;
721
- let tempApi = this.getPostApi(postData);
722
- request({
723
- url: tempApi,
724
- method: "post",
725
- data: postData,
726
- })
727
- .then((responseData) => {
728
- if (responseData.content.length > 0) {
729
- vm.setLinkValue(responseData.content[0], vm.row);
730
- vm.$emit("selectChanged", responseData.content[0]);
731
- }
732
- })
733
- .catch((error) => {
734
- console.error(error);
735
- })
736
- .finally(() => {});
737
- },
738
- /**
739
- * 分页改变事件
740
- */
741
- pageChangeEvent({ currentPage, pageSize }) {
742
- this.gridPagerConfig.currentPage = currentPage;
743
- this.gridPagerConfig.pageSize = pageSize;
744
- this.searchData();
745
- },
746
- /**
747
- * 面板隐藏事件
748
- */
749
- pullDownHideEvent({ $event }) {
750
- this.clearInputValue();
751
- },
752
- /**
753
- * 查询数据
754
- */
755
- searchData() {
756
- if (this.isLocalData === true) {
757
- let tempSearch = {
758
- value: this.currentValue,
759
- dataSource: [],
760
- };
761
- this.$emit("preSearch", tempSearch);
762
- this.searchRows = tempSearch.dataSource;
763
- this.gridPagerConfig.total = tempSearch.dataSource.length;
764
- return;
765
- }
766
-
767
- let tempExp = {
768
- operator: "or",
769
- expressions: [],
770
- };
771
- if (this.isOld === true) {
772
- tempExp = "";
773
- }
774
- if (this.filterExpression.expressions.length > 0) {
775
- tempExp.expressions.push(this.filterExpression);
776
- } else if (this.currentValue) {
777
- for (let i = 0; i < this.filterCols.length; i++) {
778
- if (this.isOld === true) {
779
- tempExp =
780
- tempExp +
781
- this.filterCols[i].field +
782
- '.contains("' +
783
- this.currentValue +
784
- '")';
785
- if (i < this.filterCols.length - 1) {
786
- tempExp = tempExp + " or ";
787
- }
788
- } else {
789
- if (this.filterCols[i].controlType == "number") {
790
- tempExp.expressions.push({
791
- field: this.filterCols[i].field,
792
- operator: "EQ",
793
- value: Number(this.currentValue),
794
- });
795
- } else {
796
- tempExp.expressions.push({
797
- field: this.filterCols[i].field,
798
- operator: "CO",
799
- value: this.currentValue,
800
- });
801
- }
802
- }
803
- }
804
- }
805
- if (this.isOld === true && tempExp.length > 0) {
806
- tempExp = "(" + tempExp + ")";
807
- }
808
-
809
- if (this.defaultExpression) {
810
- let tempDefault = replaceParamString(
811
- this.defaultExpression,
812
- this.formRow,
813
- this.$store.getters.moduleSelectItems[this.$route.meta.moduleId]
814
- );
815
-
816
- if (tempExp) {
817
- tempExp = tempExp + " and (" + tempDefault + ")";
818
- } else {
819
- tempExp = tempDefault;
820
- }
821
- }
822
-
823
- let postExpression = {
824
- field: this.field,
825
- expression: tempExp,
826
- extendParams: {},
827
- };
828
- let repeatRowInfo = {
829
- field: "",
830
- values: [],
831
- };
832
- //查询之前从外部组件构造其他的条件
833
- this.$emit("preSearch", postExpression, repeatRowInfo);
834
- let postData = {
835
- fields: this.fetchFields,
836
- begin:
837
- (this.gridPagerConfig.currentPage - 1) *
838
- this.gridPagerConfig.pageSize +
839
- 1,
840
- size: this.gridPagerConfig.pageSize,
841
- expression: postExpression.expression,
842
- sorts: this.sorts,
843
- extendParams: postExpression.extendParams,
844
- };
845
- // console.log(postData.sorts);
846
- let tempApi = this.getPostApi(postData);
847
-
848
- // let tempApi = this.api
849
- // if (this.api.indexOf('?') > 0) {
850
- // tempApi = this.api.substring(0, this.api.indexOf('?'))
851
- // let tempExtenParams = this.api.substring(this.api.indexOf('?') + 1)
852
- // tempExtenParams = replaceParam(tempExtenParams, this.formRow)
853
- // let tempSplitParams = tempExtenParams.split('&')
854
- // for (let i = 0; i < tempSplitParams.length; i++) {
855
- // let tempSplitValue = tempSplitParams[i].split('=')
856
- // this.$set(
857
- // postData.extendParams,
858
- // tempSplitValue[0],
859
- // tempSplitValue[1]
860
- // )
861
- // }
862
- // }
863
- let vm = this;
864
- vm.gridLoading = true;
865
- request({
866
- url: tempApi,
867
- method: "post",
868
- data: postData,
869
- })
870
- .then((responseData) => {
871
- if (vm.isOld === true) {
872
- vm.searchRows = responseData.data;
873
- vm.gridPagerConfig.total = responseData.extData.totalRows;
874
- } else {
875
- vm.searchRows = responseData.content;
876
- vm.$refs.pupupGridView.loadData(vm.searchRows);
877
- vm.gridPagerConfig.total = responseData.otherContent.totalRows;
878
- }
879
- if (repeatRowInfo.field) {
880
- //设置重复值
881
- XEUtils.arrayEach(vm.searchRows, (item) => {
882
- if (
883
- XEUtils.arrayIndexOf(
884
- repeatRowInfo.values,
885
- item[repeatRowInfo.field]
886
- ) > -1
887
- ) {
888
- item["sysRepeat"] = true;
889
- } else {
890
- item["sysRepeat"] = false;
891
- }
892
- });
893
- }
894
- // 若当前表格内只有一行,则不进行判断
895
- if (vm.propTableData.length == 1) {
896
- return;
897
- }
898
- // 设置字段sysRepeat后,所定字段的值全部相同则不可选择
899
- let fieldNames = vm.columns
900
- .filter((x) => x.sysRepeat)
901
- .map((y) => {
902
- return {
903
- field: y.field,
904
- linkField: y.linkField,
905
- };
906
- });
907
- if (fieldNames.length) {
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
- });
921
- // 分为有参查询和无参查询
922
- if (tempExp.expressions.length && fieldNames.length == 1) {
923
- for (let j = 0; j < fieldNames.length; j++) {
924
- let mapArr = tempArr.map(
925
- (item) => item[fieldNames[j].linkField]
926
- );
927
- let setArr = new Set(mapArr);
928
- if (setArr.size < mapArr.length) {
929
- arr.push(true);
930
- }
931
- }
932
- if (fieldNames.length === arr.length) {
933
- info.sysRepeat = true;
934
- }
935
- } else {
936
- tempArr.forEach((item) => {
937
- // 接口字段可能和表字段field不一致,linkField一致
938
- let arr = [];
939
- for (let j = 0; j < fieldNames.length; j++) {
940
- if (
941
- info[fieldNames[j].field] == item[fieldNames[j].linkField]
942
- ) {
943
- arr.push(true);
944
- }
945
- }
946
- if (fieldNames.length === arr.length) {
947
- info.sysRepeat = true;
948
- }
949
- });
950
- }
951
- })
952
- }
953
- })
954
- .catch((error) => {
955
- console.error(error);
956
- })
957
- .finally(() => {
958
- vm.gridLoading = false;
959
- });
960
- },
961
- getPostApi(postData) {
962
- let tempApi = this.api;
963
- if (this.api.indexOf("?") > 0) {
964
- tempApi = this.api.substring(0, this.api.indexOf("?"));
965
- let tempExtenParams = this.api.substring(this.api.indexOf("?") + 1);
966
- tempExtenParams = replaceParam(tempExtenParams, this.formRow);
967
- let tempSplitParams = tempExtenParams.split("&");
968
- for (let i = 0; i < tempSplitParams.length; i++) {
969
- let tempSplitValue = tempSplitParams[i].split("=");
970
- this.$set(
971
- postData.extendParams,
972
- tempSplitValue[0],
973
- tempSplitValue[1]
974
- );
975
- }
976
- }
977
- return tempApi;
978
- },
979
- sortChange({ column, property, order, sortBy, sortList, $event }) {
980
- let currentSort = sortList.map((x) => {
981
- return [x.field, x.order];
982
- });
983
- this.sorts = currentSort;
984
- this.searchData();
985
- },
986
-
987
- // 下拉容器筛选条件被触发
988
- filterVisible({ column }) {
989
- XEUtils.remove(column.filters, (item) => {
990
- return item.data === "";
991
- });
992
- if (column.filters.length === 0) {
993
- column.filters.push({
994
- data: "",
995
- });
996
- }
997
- },
998
- filterConfirm(column) {
999
- let vm = this;
1000
- this.filterExpression = {
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;
1008
- break;
1009
- default:
1010
- column.filters[0].checked = column.filters[0].data !== "";
1011
- break;
1012
- }
1013
- //通知外部筛选改变事件
1014
- let columns = this.$refs.pupupGridView.getTableColumn().collectColumn;
1015
- XEUtils.each(columns, (item) => {
1016
- let filterExpression = {
1017
- operator: "or",
1018
- expressions: [],
1019
- };
1020
- if (!col.controlType) {
1021
- col.controlType = "text";
1022
- }
1023
- switch (col.controlType) {
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);
1035
- }
1036
- }
1037
- break;
1038
- default:
1039
- if (item.filters && item.filters[0].checked) {
1040
- XEUtils.each(item.filters, (loopItem) => {
1041
- if (loopItem.data) {
1042
- filterExpression.expressions.push({
1043
- field: item.field,
1044
- operator: "CO",
1045
- value: loopItem.data,
1046
- });
1047
- }
1048
- });
1049
- if (filterExpression.expressions.length > 0) {
1050
- vm.filterExpression.expressions.push(filterExpression);
1051
- }
1052
- }
1053
- break;
1054
- }
1055
- });
1056
- this.gridPagerConfig.currentPage = 1;
1057
- this.searchData();
1058
- this.$refs.pupupGridView.closeFilter();
1059
- },
1060
- // 添加筛选条件
1061
- filterAddExp(column) {
1062
- column["filters"].push({
1063
- data: "",
1064
- });
1065
- },
1066
-
1067
- // 清除筛选条件
1068
- clearColumnFilter() {
1069
- let columns = [];
1070
- let vm = this;
1071
- try {
1072
- columns = this.$refs.pupupGridView.getTableColumn().collectColumn;
1073
- } catch (err) {
1074
- console.debug(err);
1075
- }
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;
1103
- }
1104
- });
1105
- this.filterExpression = {
1106
- operator: "and",
1107
- expressions: [],
1108
- };
1109
- },
1110
- },
1111
- };
1112
- </script>
1113
-
1114
- <style lang="scss" scoped>
1115
- .pulldown-grid {
1116
- min-width: 600px;
1117
- width: auto;
1118
- height: 350px;
1119
- background-color: #fff;
1120
- box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
1121
- }
1122
-
1123
- .d-grid-control {
1124
- height: 30px;
1125
- }
1126
- .interceptor-class {
1127
- padding: 10px;
1128
- ::v-deep .ant-btn {
1129
- margin: 10px 10px 0;
1130
- }
1131
- }
1132
- </style>
1133
-
1134
-
1135
- <style lang="less">
1136
- @import "../../styles/default.less";
1
+ <template>
2
+ <div class="d-control-container">
3
+ <div
4
+ class="d-control-label"
5
+ v-if="showLabel === true"
6
+ :style="{ width: labelWidth > 0 ? labelWidth + 'px' : 'none' }"
7
+ >
8
+ {{ label }}
9
+ <span v-if="rules && rules['required']" class="d-control-label-required"
10
+ >*</span
11
+ >
12
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
13
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px" />
14
+ </Tooltip>
15
+ </div>
16
+ <div
17
+ :class="{
18
+ 'd-control': showLabel === true,
19
+ 'd-grid-control': showLabel === false,
20
+ }"
21
+ >
22
+ <VxePulldown
23
+ style="width: 100%"
24
+ @hide-panel="pullDownHideEvent"
25
+ ref="pulldownRef"
26
+ v-if="edit === true"
27
+ transfer
28
+ >
29
+ <template #default>
30
+ <ValidationProvider :name="label" v-slot="v" :rules="rules">
31
+ <a-input
32
+ :size="'small'"
33
+ allow-clear
34
+ @change="inputChangeEvent"
35
+ class="inner-cell-control"
36
+ v-model="currentValue"
37
+ @click="inputClickEvent"
38
+ @focus="inputFocusEvent"
39
+ @blur="inputBlurEvent"
40
+ @keydown="inputKeydownEvent"
41
+ @keyup="inputKeyupEvent"
42
+ :class="{ 'd-error-input': v.errors.length > 0 }"
43
+ ></a-input>
44
+ <div class="d-error-msg">
45
+ {{ v.errors[0] }}
46
+ </div>
47
+ </ValidationProvider>
48
+ </template>
49
+ <template #dropdown>
50
+ <div class="pulldown-grid interceptor-class">
51
+ <vxe-grid
52
+ size="mini"
53
+ border
54
+ :row-class-name="gridRowStyle"
55
+ highlight-current-row
56
+ :keyboard-config="{ isArrow: true }"
57
+ highlight-hover-row
58
+ auto-resize
59
+ resizable
60
+ :loading="gridLoading"
61
+ height="auto"
62
+ ref="pupupGridView"
63
+ :data="searchRows"
64
+ @cell-click="gridCellClick"
65
+ @filter-visible="filterVisible"
66
+ :columns="internalColumns"
67
+ :checkbox-config="{ checkMethod: checkMethod }"
68
+ @sort-change="sortChange"
69
+ :filter-config="{
70
+ remote: true,
71
+ }"
72
+ :sort-config="{
73
+ multiple: true,
74
+ remote: true,
75
+ chronological: true,
76
+ defaultSort: defaultSort,
77
+ }"
78
+ >
79
+ <!-- :pager-config="gridPagerConfig" -->
80
+ <!-- @page-change="pageChangeEvent" -->
81
+ <template #matCode_header="{ column }">
82
+ <div class="first-col">
83
+ <div class="first-col-top">
84
+ {{ column.title }}
85
+ </div>
86
+ <div class="first-col-bottom">
87
+ <input style="width: 100%" />
88
+ </div>
89
+ </div>
90
+ </template>
91
+ <!-- 普通输入框的过滤筛选-->
92
+ <template #text_filter="{ column }">
93
+ <div class="interceptor-class">
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
+ />
101
+ </div>
102
+ <a-button @click="filterAddExp(column)">添加条件</a-button>
103
+ <a-button @click="filterConfirm(column)">确认</a-button>
104
+ </div>
105
+ </template>
106
+ <!-- 选择筛选框-->
107
+ <template #select_filter="{ column }">
108
+ <div class="interceptor-class">
109
+ <a-checkbox-group
110
+ v-model="column.filters[0].data"
111
+ @keyup.enter.native="filterConfirm(column)"
112
+ >
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
+ >
119
+ <a-checkbox
120
+ :value="loopSource.value"
121
+ style="margin: 5px 0"
122
+ >{{ loopSource.caption }}
123
+ </a-checkbox>
124
+ </div>
125
+ </div>
126
+ </a-checkbox-group>
127
+ <br />
128
+ <a-button @click="filterConfirm(column)">确认</a-button>
129
+ </div>
130
+ </template>
131
+ <template #pager>
132
+ <a-row>
133
+ <a-col :span="8">
134
+ <a-button
135
+ v-if="isMultiSelect === true"
136
+ type="primary"
137
+ size="small"
138
+ style="margin: 5px"
139
+ @click="multiSelectConfirm"
140
+ >
141
+ 确认选择
142
+ </a-button>
143
+ <a-button
144
+ v-if="popupAddName"
145
+ type="primary"
146
+ size="small"
147
+ style="margin: 5px"
148
+ @click="pagerBtnClick(btn)"
149
+ >
150
+ 新增
151
+ </a-button>
152
+
153
+ <template v-if="optBtns.length > 0">
154
+ <a-button
155
+ v-for="btn in optBtns"
156
+ :key="btn.field"
157
+ type="primary"
158
+ size="small"
159
+ style="margin: 5px"
160
+ @click="pagerBtnClick(btn)"
161
+ >
162
+ {{ btn.name }}
163
+ </a-button>
164
+ </template>
165
+ </a-col>
166
+ <a-col :span="16">
167
+ <vxe-pager
168
+ align="right"
169
+ size="mini"
170
+ :current-page.sync="gridPagerConfig.currentPage"
171
+ :page-size.sync="gridPagerConfig.pageSize"
172
+ :total="gridPagerConfig.total"
173
+ @page-change="pageChangeEvent"
174
+ >
175
+ </vxe-pager>
176
+ </a-col>
177
+ </a-row>
178
+ </template>
179
+ </vxe-grid>
180
+ </div>
181
+ </template>
182
+ </VxePulldown>
183
+ <span v-if="edit === false">
184
+ <a v-if="route" @click="routeLinkClick">{{ currentValue }}</a>
185
+ <span v-else> {{ currentValue }}</span>
186
+ </span>
187
+ </div>
188
+ <keep-alive>
189
+ <div
190
+ :is="popupAddName"
191
+ ref="pupupAddView"
192
+ @popupSaveAfter="popupSaveAfter"
193
+ ></div>
194
+ </keep-alive>
195
+ </div>
196
+ </template>
197
+
198
+ <script>
199
+ import XEUtils from "xe-utils";
200
+ import { sysRowState, sysFormState, controlType } from "../../utils/enum";
201
+ import { replaceParamString, replaceParam } from "../../utils/common";
202
+ import request from "../../utils/request";
203
+ import { Input, Button, Row, Col, Checkbox } from "ant-design-vue";
204
+ import { ValidationProvider } from "vee-validate";
205
+ import { Pulldown } from "vxe-table";
206
+ import { Tooltip } from "ant-design-vue";
207
+ export default {
208
+ name: "BasePulldown",
209
+ components: {
210
+ "a-input": Input,
211
+ "a-button": Button,
212
+ "a-row": Row,
213
+ "a-col": Col,
214
+ "a-checkbox": Checkbox,
215
+ "a-checkbox-group": Checkbox.Group,
216
+ VxePulldown: Pulldown,
217
+ ValidationProvider,
218
+ Tooltip,
219
+ },
220
+ data() {
221
+ return {
222
+ fetchFields: "",
223
+ internalColumns: [],
224
+ isInputChanged: false,
225
+ inputTimeout: null,
226
+ searchRows: [],
227
+ filterCols: [],
228
+ gridLoading: false,
229
+ gridPagerConfig: {
230
+ total: 0,
231
+ currentPage: 1,
232
+ pageSize: 10,
233
+ },
234
+ sorts: [],
235
+ defaultSort: [],
236
+ filterExpression: {
237
+ operator: "and",
238
+ expressions: [],
239
+ },
240
+ };
241
+ },
242
+ props: {
243
+ labelWidth: {
244
+ type: Number,
245
+ default: function () {
246
+ return 0;
247
+ },
248
+ },
249
+ isMultiSelect: {
250
+ type: Boolean,
251
+ default: function () {
252
+ return false;
253
+ },
254
+ },
255
+ popupAddName: {
256
+ type: String,
257
+ default: function () {
258
+ return null;
259
+ },
260
+ },
261
+ popupAddPath: {
262
+ type: String,
263
+ default: function () {
264
+ return null;
265
+ },
266
+ },
267
+ rules: {
268
+ type: Object,
269
+ default: function () {
270
+ return null;
271
+ },
272
+ },
273
+ showLabel: {
274
+ type: Boolean,
275
+ default: function () {
276
+ return true;
277
+ },
278
+ },
279
+ label: {
280
+ type: String,
281
+ default: function () {
282
+ return "";
283
+ },
284
+ },
285
+ defaultExpression: {
286
+ type: String,
287
+ default: function () {
288
+ return "";
289
+ },
290
+ },
291
+ formRow: {
292
+ type: Object,
293
+ default: function () {
294
+ return {};
295
+ },
296
+ },
297
+ row: {
298
+ type: Object,
299
+ default: function () {
300
+ return {};
301
+ },
302
+ },
303
+ edit: {
304
+ type: Boolean,
305
+ default: function () {
306
+ return false;
307
+ },
308
+ },
309
+ route: Object,
310
+ placeholder: {
311
+ // 提示信息
312
+ type: String,
313
+ },
314
+ api: {
315
+ // api接口
316
+ type: String,
317
+ },
318
+ field: {
319
+ type: String,
320
+ },
321
+ pageSize: {
322
+ // 分页数量,默认不分页
323
+ type: Number,
324
+ default: () => {
325
+ return 0;
326
+ },
327
+ },
328
+ columns: {
329
+ // 列集合
330
+ type: Array,
331
+ default: () => {
332
+ return [];
333
+ },
334
+ },
335
+ isOld: {
336
+ // 列集合
337
+ type: Boolean,
338
+ default: () => {
339
+ return false;
340
+ },
341
+ },
342
+ exps: {
343
+ // 条件
344
+ type: Array,
345
+ default: () => {
346
+ return [];
347
+ },
348
+ },
349
+ value: {
350
+ type: String,
351
+ default: function () {
352
+ return "";
353
+ },
354
+ },
355
+ optBtns: {
356
+ // 操作按钮
357
+ type: Array,
358
+ default: () => {
359
+ return [];
360
+ },
361
+ },
362
+ gridTable: {
363
+ // 操作按钮
364
+ type: Object,
365
+ default: () => {
366
+ return null;
367
+ },
368
+ },
369
+ immediate: {
370
+ type: Boolean,
371
+ default: true,
372
+ },
373
+ isLocalData: {
374
+ type: Boolean,
375
+ default: false,
376
+ },
377
+ tooltip: {
378
+ type: String,
379
+ default: function () {
380
+ return "";
381
+ },
382
+ },
383
+ propTableData: {
384
+ type: Array,
385
+ default: function () {
386
+ return [];
387
+ },
388
+ },
389
+ },
390
+ watch: {},
391
+ computed: {
392
+ currentValue: {
393
+ // 动态计算currentValue的值
394
+ get: function () {
395
+ return this.value; // 将props中的value赋值给currentValue
396
+ },
397
+ set: function (val) {
398
+ this.$emit("input", val); // 通过$emit触发父组件
399
+ },
400
+ },
401
+ },
402
+ created() {
403
+ // if (this.popupAddName && !this.$options.components[this.popupAddName]) {
404
+ // // const tempRequire = require('@/views' + this.popupAddPath + '.vue').default
405
+ // // this.$options.components[this.popupAddName] = tempRequire
406
+ // this.$options.components[this.popupAddName] = () =>
407
+ // import('@/views' + this.popupAddPath + '.vue')
408
+ // }
409
+ this.gridPagerConfig.pageSize = this.pageSize;
410
+
411
+ this.internalColumns.push({
412
+ type: "seq",
413
+ fixed: "left",
414
+ width: 50,
415
+ });
416
+
417
+ if (this.isMultiSelect === true) {
418
+ this.internalColumns.push({
419
+ type: "checkbox",
420
+ fixed: "left",
421
+ width: 40,
422
+ });
423
+ }
424
+
425
+ for (let i = 0; i < this.columns.length; i++) {
426
+ this.fetchFields = this.fetchFields + this.columns[i].field + ",";
427
+ this.columns[i]["params"] = {
428
+ dataSource: [],
429
+ };
430
+ if (this.columns[i].dataSource) {
431
+ this.columns[i]["params"].dataSource = this.columns[i].dataSource;
432
+ }
433
+ if (!this.columns[i].width) {
434
+ this.columns[i]["width"] = 100;
435
+ }
436
+ if (this.columns[i].isCheckbox === true) {
437
+ this.columns[i]["type"] = "checkbox";
438
+ }
439
+ if (!this.columns[i].controlType) {
440
+ this.columns[i].controlType = "text";
441
+ }
442
+ // 设置字段的过滤插槽
443
+ if (this.columns[i].filter) {
444
+ this.columns[i]["filterMultiple"] = false;
445
+
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"] = [
457
+ {
458
+ data: [],
459
+ },
460
+ ];
461
+ break;
462
+ default:
463
+ this.columns[i]["slots"] = {
464
+ filter: `text_filter`,
465
+ };
466
+ this.columns[i]["filters"] = [
467
+ {
468
+ data: "",
469
+ },
470
+ ];
471
+ break;
472
+ }
473
+ }
474
+ // 默认排序
475
+ if (this.columns[i].defaultSort) {
476
+ this.defaultSort.push({
477
+ field: this.columns[i].field,
478
+ order: this.columns[i].defaultSort,
479
+ });
480
+ this.sorts.push([this.columns[i].field, this.columns[i].defaultSort]);
481
+ }
482
+ this.internalColumns.push(this.columns[i]);
483
+ if (this.columns[i].filter === true) {
484
+ this.filterCols.push(this.columns[i]);
485
+ }
486
+ }
487
+ },
488
+ methods: {
489
+ gridRowStyle(scope) {
490
+ if (scope.row.sysRepeat === true) {
491
+ return "row--pending";
492
+ }
493
+ // if(scope.row.)
494
+ },
495
+ clearInputValue() {
496
+ if (this.isInputChanged === true) {
497
+ this.setLinkValue(null, this.row);
498
+ this.$emit("selectChanged", null);
499
+ }
500
+ },
501
+ routeLinkClick() {
502
+ //首先需要判断是否有权限
503
+ // let treeModule = XEUtils.findTree(
504
+ // this.$store.getters.addRouters,
505
+ // item => item.name === this.route.name
506
+ // )
507
+ // if (!treeModule) {
508
+ // this.$antwarning('没有权限')
509
+ // return
510
+ // }
511
+ this.$router.pushRoute({
512
+ name: this.route.name,
513
+ query: { id: this.row[this.route.field] },
514
+ });
515
+ },
516
+ /**
517
+ * 输入框改变事件
518
+ */
519
+ inputChangeEvent(event) {
520
+ this.isInputChanged = true;
521
+ if (event.type === "click" && event.pointerType === "mouse") {
522
+ //点击了清空按钮
523
+ this.$nextTick(() => {
524
+ this.clearInputValue();
525
+ this.inputClickEvent(null);
526
+ });
527
+ }
528
+ },
529
+ inputBlurEvent(event) {},
530
+ /**
531
+ * 输入框获取焦点事件
532
+ */
533
+ inputFocusEvent(event) {
534
+ event.currentTarget.select();
535
+ // this.$refs.pulldownRef.showPanel()
536
+ // this.searchData()
537
+ },
538
+ /**
539
+ * Tab键隐藏面板
540
+ */
541
+ inputKeydownEvent(event) {
542
+ if (event.keyCode === 9) {
543
+ //tab事件
544
+ this.$refs.pulldownRef.hidePanel();
545
+ this.clearInputValue();
546
+ }
547
+ },
548
+ inputClickEvent(event) {
549
+ if (this.$refs.pulldownRef.isPanelVisible() === false) {
550
+ this.$refs.pulldownRef.showPanel();
551
+ this.clearColumnFilter();
552
+ this.searchData();
553
+ } else {
554
+ this.$refs.pulldownRef.hidePanel();
555
+ }
556
+ },
557
+ /**
558
+ * 输入库输入事件
559
+ */
560
+ inputKeyupEvent(event) {
561
+ //好像ok
562
+ if (!this.immediate && event.keyCode !== 13) {
563
+ console.debug("davistest");
564
+ } else {
565
+ if (this.inputTimeout) {
566
+ clearTimeout(this.inputTimeout);
567
+ }
568
+ let vm = this;
569
+ this.inputTimeout = setTimeout(() => {
570
+ //判断面板是否打开
571
+ if (vm.$refs.pulldownRef.isPanelVisible() === false) {
572
+ vm.$refs.pulldownRef.showPanel();
573
+ }
574
+ vm.searchData();
575
+ }, 500);
576
+ }
577
+ },
578
+ /**
579
+ * 网格列选中事件
580
+ */
581
+ gridCellClick({ row, column }) {
582
+ if (row.sysRepeat === true) {
583
+ return;
584
+ }
585
+ if (column.type === "seq" || column.type === "checkbox") {
586
+ return;
587
+ }
588
+ this.isInputChanged = false;
589
+ this.setLinkValue(row, this.row);
590
+ this.$emit("selectChanged", row);
591
+ this.$refs.pulldownRef.hidePanel();
592
+ },
593
+ setLinkValue(pulldownRow, oriRow) {
594
+ for (let i = 0; i < this.internalColumns.length; i++) {
595
+ if (this.internalColumns[i].linkField) {
596
+ let tempLinkFields = this.internalColumns[i].linkField.split(".");
597
+ let tempRow = oriRow;
598
+ // for(let j=0;j<tempLinkFields.length;j++){
599
+ // let tempField = tempLinkFields[j]
600
+ // //如果赋值的属性不存在数据集中,就忽略更新,防止修改后网格单元格值不更细
601
+ // if (!(tempField in tempRow)) {
602
+ // this.$antwarning(
603
+ // '赋值字段[' + this.internalColumns[i].linkField + ']不存在'
604
+ // )
605
+ // break
606
+ // }
607
+ // if(j===tempLinkFields.length-1){
608
+ // if (pulldownRow === null) {
609
+ // if (this.internalColumns[i].nullClear === false) {
610
+ // //是否空值清除数据,用于可选可输入的控件
611
+ // continue
612
+ // }
613
+ // this.$set(tempRow, tempField, null)
614
+ // } else {
615
+ // this.$set(
616
+ // tempRow,
617
+ // tempField,
618
+ // this.getLinkValue(tempField, pulldownRow)
619
+ // )
620
+ // }
621
+ // }else{
622
+ // tempRow = tempRow[tempField]
623
+ // }
624
+ // }
625
+
626
+ //如果赋值的属性不存在数据集中,就忽略更新,防止修改后网格单元格值不更细
627
+ if (!(this.internalColumns[i].linkField in oriRow)) {
628
+ this.$antwarning(
629
+ "赋值字段[" + this.internalColumns[i].linkField + "]不存在"
630
+ );
631
+ continue;
632
+ }
633
+ if (pulldownRow === null) {
634
+ if (this.internalColumns[i].nullClear === false) {
635
+ //是否空值清楚数据,用于可选可输入的控件
636
+ continue;
637
+ }
638
+ this.$set(oriRow, this.internalColumns[i].linkField, null);
639
+ } else {
640
+ this.$set(
641
+ oriRow,
642
+ this.internalColumns[i].linkField,
643
+ this.getLinkValue(this.internalColumns[i].field, pulldownRow)
644
+ );
645
+ }
646
+ }
647
+ }
648
+ },
649
+ getLinkValue(field, row) {
650
+ let linkField = field.split(".");
651
+ if (linkField.length > 1) {
652
+ let fieldValue = row;
653
+ for (let i = 0; i < linkField.length; i++) {
654
+ if (
655
+ fieldValue[linkField[i]] === undefined ||
656
+ fieldValue[linkField[i]] === null
657
+ ) {
658
+ return null;
659
+ }
660
+ fieldValue = fieldValue[linkField[i]];
661
+ }
662
+ return fieldValue;
663
+ }
664
+ return row[field];
665
+ },
666
+ /**
667
+ * 左下角按钮点击事件
668
+ */
669
+ pagerBtnClick(btn) {
670
+ this.$refs.pupupAddView.show();
671
+ // this.$emit('pulldownBtnClick', btn)
672
+ this.$refs.pulldownRef.hidePanel();
673
+ },
674
+ // 多选内容时,若数据不满足条件,不可选中
675
+ checkMethod({ row }) {
676
+ if (row.sysRepeat) {
677
+ return false;
678
+ }
679
+ return true;
680
+ },
681
+ /**
682
+ * 确认多选
683
+ */
684
+ multiSelectConfirm() {
685
+ this.isInputChanged = false;
686
+ this.$emit(
687
+ "confirmMultiSelect",
688
+ this,
689
+ this.$refs.pupupGridView.getCheckboxRecords(true)
690
+ );
691
+ this.$refs.pulldownRef.hidePanel();
692
+ },
693
+ popupSaveAfter(pupupAddRowInfo) {
694
+ let postData = {
695
+ fields: null,
696
+ begin: 1,
697
+ size: 1,
698
+ expression: {},
699
+ sorts: "",
700
+ };
701
+ let tempKeyExp = XEUtils.find(
702
+ this.internalColumns,
703
+ (item) => item.isKey === true
704
+ );
705
+ postData.expression = {
706
+ operator: "and",
707
+ expressions: [
708
+ {
709
+ operator: "and",
710
+ expressions: [
711
+ {
712
+ field: tempKeyExp.field,
713
+ operator: "EQ",
714
+ value: pupupAddRowInfo["id"],
715
+ },
716
+ ],
717
+ },
718
+ ],
719
+ };
720
+ let vm = this;
721
+ let tempApi = this.getPostApi(postData);
722
+ request({
723
+ url: tempApi,
724
+ method: "post",
725
+ data: postData,
726
+ })
727
+ .then((responseData) => {
728
+ if (responseData.content.length > 0) {
729
+ vm.setLinkValue(responseData.content[0], vm.row);
730
+ vm.$emit("selectChanged", responseData.content[0]);
731
+ }
732
+ })
733
+ .catch((error) => {
734
+ console.error(error);
735
+ })
736
+ .finally(() => {});
737
+ },
738
+ /**
739
+ * 分页改变事件
740
+ */
741
+ pageChangeEvent({ currentPage, pageSize }) {
742
+ this.gridPagerConfig.currentPage = currentPage;
743
+ this.gridPagerConfig.pageSize = pageSize;
744
+ this.searchData();
745
+ },
746
+ /**
747
+ * 面板隐藏事件
748
+ */
749
+ pullDownHideEvent({ $event }) {
750
+ this.clearInputValue();
751
+ },
752
+ /**
753
+ * 查询数据
754
+ */
755
+ searchData() {
756
+ if (this.isLocalData === true) {
757
+ let tempSearch = {
758
+ value: this.currentValue,
759
+ dataSource: [],
760
+ };
761
+ this.$emit("preSearch", tempSearch);
762
+ this.searchRows = tempSearch.dataSource;
763
+ this.gridPagerConfig.total = tempSearch.dataSource.length;
764
+ return;
765
+ }
766
+
767
+ let tempExp = {
768
+ operator: "or",
769
+ expressions: [],
770
+ };
771
+ if (this.isOld === true) {
772
+ tempExp = "";
773
+ }
774
+ if (this.filterExpression.expressions.length > 0) {
775
+ tempExp.expressions.push(this.filterExpression);
776
+ } else if (this.currentValue) {
777
+ for (let i = 0; i < this.filterCols.length; i++) {
778
+ if (this.isOld === true) {
779
+ tempExp =
780
+ tempExp +
781
+ this.filterCols[i].field +
782
+ '.contains("' +
783
+ this.currentValue +
784
+ '")';
785
+ if (i < this.filterCols.length - 1) {
786
+ tempExp = tempExp + " or ";
787
+ }
788
+ } else {
789
+ if (this.filterCols[i].controlType == "number") {
790
+ tempExp.expressions.push({
791
+ field: this.filterCols[i].field,
792
+ operator: "EQ",
793
+ value: Number(this.currentValue),
794
+ });
795
+ } else {
796
+ tempExp.expressions.push({
797
+ field: this.filterCols[i].field,
798
+ operator: "CO",
799
+ value: this.currentValue,
800
+ });
801
+ }
802
+ }
803
+ }
804
+ }
805
+ if (this.isOld === true && tempExp.length > 0) {
806
+ tempExp = "(" + tempExp + ")";
807
+ }
808
+
809
+ if (this.defaultExpression) {
810
+ let tempDefault = replaceParamString(
811
+ this.defaultExpression,
812
+ this.formRow,
813
+ this.$store.getters.moduleSelectItems[this.$route.meta.moduleId]
814
+ );
815
+
816
+ if (tempExp) {
817
+ tempExp = tempExp + " and (" + tempDefault + ")";
818
+ } else {
819
+ tempExp = tempDefault;
820
+ }
821
+ }
822
+
823
+ let postExpression = {
824
+ field: this.field,
825
+ expression: tempExp,
826
+ extendParams: {},
827
+ };
828
+ let repeatRowInfo = {
829
+ field: "",
830
+ values: [],
831
+ };
832
+ //查询之前从外部组件构造其他的条件
833
+ this.$emit("preSearch", postExpression, repeatRowInfo);
834
+ let postData = {
835
+ fields: this.fetchFields,
836
+ begin:
837
+ (this.gridPagerConfig.currentPage - 1) *
838
+ this.gridPagerConfig.pageSize +
839
+ 1,
840
+ size: this.gridPagerConfig.pageSize,
841
+ expression: postExpression.expression,
842
+ sorts: this.sorts,
843
+ extendParams: postExpression.extendParams,
844
+ };
845
+ // console.log(postData.sorts);
846
+ let tempApi = this.getPostApi(postData);
847
+
848
+ // let tempApi = this.api
849
+ // if (this.api.indexOf('?') > 0) {
850
+ // tempApi = this.api.substring(0, this.api.indexOf('?'))
851
+ // let tempExtenParams = this.api.substring(this.api.indexOf('?') + 1)
852
+ // tempExtenParams = replaceParam(tempExtenParams, this.formRow)
853
+ // let tempSplitParams = tempExtenParams.split('&')
854
+ // for (let i = 0; i < tempSplitParams.length; i++) {
855
+ // let tempSplitValue = tempSplitParams[i].split('=')
856
+ // this.$set(
857
+ // postData.extendParams,
858
+ // tempSplitValue[0],
859
+ // tempSplitValue[1]
860
+ // )
861
+ // }
862
+ // }
863
+ let vm = this;
864
+ vm.gridLoading = true;
865
+ request({
866
+ url: tempApi,
867
+ method: "post",
868
+ data: postData,
869
+ })
870
+ .then((responseData) => {
871
+ if (vm.isOld === true) {
872
+ vm.searchRows = responseData.data;
873
+ vm.gridPagerConfig.total = responseData.extData.totalRows;
874
+ } else {
875
+ vm.searchRows = responseData.content;
876
+ vm.$refs.pupupGridView.loadData(vm.searchRows);
877
+ vm.gridPagerConfig.total = responseData.otherContent.totalRows;
878
+ }
879
+ if (repeatRowInfo.field) {
880
+ //设置重复值
881
+ XEUtils.arrayEach(vm.searchRows, (item) => {
882
+ if (
883
+ XEUtils.arrayIndexOf(
884
+ repeatRowInfo.values,
885
+ item[repeatRowInfo.field]
886
+ ) > -1
887
+ ) {
888
+ item["sysRepeat"] = true;
889
+ } else {
890
+ item["sysRepeat"] = false;
891
+ }
892
+ });
893
+ }
894
+ // 若当前表格内只有一行,则不进行判断
895
+ if (vm.propTableData.length == 1) {
896
+ return;
897
+ }
898
+ // 设置字段sysRepeat后,所定字段的值全部相同则不可选择
899
+ let fieldNames = vm.columns
900
+ .filter((x) => x.sysRepeat)
901
+ .map((y) => {
902
+ return {
903
+ field: y.field,
904
+ linkField: y.linkField,
905
+ };
906
+ });
907
+ if (fieldNames.length) {
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
+ });
921
+ // 分为有参查询和无参查询
922
+ if (tempExp.expressions.length && fieldNames.length == 1) {
923
+ for (let j = 0; j < fieldNames.length; j++) {
924
+ let mapArr = tempArr.map(
925
+ (item) => item[fieldNames[j].linkField]
926
+ );
927
+ let setArr = new Set(mapArr);
928
+ if (setArr.size < mapArr.length) {
929
+ arr.push(true);
930
+ }
931
+ }
932
+ if (fieldNames.length === arr.length) {
933
+ info.sysRepeat = true;
934
+ }
935
+ } else {
936
+ tempArr.forEach((item) => {
937
+ // 接口字段可能和表字段field不一致,linkField一致
938
+ let arr = [];
939
+ for (let j = 0; j < fieldNames.length; j++) {
940
+ if (
941
+ info[fieldNames[j].field] == item[fieldNames[j].linkField]
942
+ ) {
943
+ arr.push(true);
944
+ }
945
+ }
946
+ if (fieldNames.length === arr.length) {
947
+ info.sysRepeat = true;
948
+ }
949
+ });
950
+ }
951
+ })
952
+ }
953
+ })
954
+ .catch((error) => {
955
+ console.error(error);
956
+ })
957
+ .finally(() => {
958
+ vm.gridLoading = false;
959
+ });
960
+ },
961
+ getPostApi(postData) {
962
+ let tempApi = this.api;
963
+ if (this.api.indexOf("?") > 0) {
964
+ tempApi = this.api.substring(0, this.api.indexOf("?"));
965
+ let tempExtenParams = this.api.substring(this.api.indexOf("?") + 1);
966
+ tempExtenParams = replaceParam(tempExtenParams, this.formRow);
967
+ let tempSplitParams = tempExtenParams.split("&");
968
+ for (let i = 0; i < tempSplitParams.length; i++) {
969
+ let tempSplitValue = tempSplitParams[i].split("=");
970
+ this.$set(
971
+ postData.extendParams,
972
+ tempSplitValue[0],
973
+ tempSplitValue[1]
974
+ );
975
+ }
976
+ }
977
+ return tempApi;
978
+ },
979
+ sortChange({ column, property, order, sortBy, sortList, $event }) {
980
+ let currentSort = sortList.map((x) => {
981
+ return [x.field, x.order];
982
+ });
983
+ this.sorts = currentSort;
984
+ this.searchData();
985
+ },
986
+
987
+ // 下拉容器筛选条件被触发
988
+ filterVisible({ column }) {
989
+ XEUtils.remove(column.filters, (item) => {
990
+ return item.data === "";
991
+ });
992
+ if (column.filters.length === 0) {
993
+ column.filters.push({
994
+ data: "",
995
+ });
996
+ }
997
+ },
998
+ filterConfirm(column) {
999
+ let vm = this;
1000
+ this.filterExpression = {
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;
1008
+ break;
1009
+ default:
1010
+ column.filters[0].checked = column.filters[0].data !== "";
1011
+ break;
1012
+ }
1013
+ //通知外部筛选改变事件
1014
+ let columns = this.$refs.pupupGridView.getTableColumn().collectColumn;
1015
+ XEUtils.each(columns, (item) => {
1016
+ let filterExpression = {
1017
+ operator: "or",
1018
+ expressions: [],
1019
+ };
1020
+ if (!col.controlType) {
1021
+ col.controlType = "text";
1022
+ }
1023
+ switch (col.controlType) {
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);
1035
+ }
1036
+ }
1037
+ break;
1038
+ default:
1039
+ if (item.filters && item.filters[0].checked) {
1040
+ XEUtils.each(item.filters, (loopItem) => {
1041
+ if (loopItem.data) {
1042
+ filterExpression.expressions.push({
1043
+ field: item.field,
1044
+ operator: "CO",
1045
+ value: loopItem.data,
1046
+ });
1047
+ }
1048
+ });
1049
+ if (filterExpression.expressions.length > 0) {
1050
+ vm.filterExpression.expressions.push(filterExpression);
1051
+ }
1052
+ }
1053
+ break;
1054
+ }
1055
+ });
1056
+ this.gridPagerConfig.currentPage = 1;
1057
+ this.searchData();
1058
+ this.$refs.pupupGridView.closeFilter();
1059
+ },
1060
+ // 添加筛选条件
1061
+ filterAddExp(column) {
1062
+ column["filters"].push({
1063
+ data: "",
1064
+ });
1065
+ },
1066
+
1067
+ // 清除筛选条件
1068
+ clearColumnFilter() {
1069
+ let columns = [];
1070
+ let vm = this;
1071
+ try {
1072
+ columns = this.$refs.pupupGridView.getTableColumn().collectColumn;
1073
+ } catch (err) {
1074
+ console.debug(err);
1075
+ }
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;
1103
+ }
1104
+ });
1105
+ this.filterExpression = {
1106
+ operator: "and",
1107
+ expressions: [],
1108
+ };
1109
+ },
1110
+ },
1111
+ };
1112
+ </script>
1113
+
1114
+ <style lang="scss" scoped>
1115
+ .pulldown-grid {
1116
+ min-width: 600px;
1117
+ width: auto;
1118
+ height: 350px;
1119
+ background-color: #fff;
1120
+ box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
1121
+ }
1122
+
1123
+ .d-grid-control {
1124
+ height: 30px;
1125
+ }
1126
+ .interceptor-class {
1127
+ padding: 10px;
1128
+ ::v-deep .ant-btn {
1129
+ margin: 10px 10px 0;
1130
+ }
1131
+ }
1132
+ </style>
1133
+
1134
+
1135
+ <style lang="less">
1136
+ @import "../../styles/default.less";
1137
1137
  </style>