gzhr-ui 1.1.1 → 1.1.3

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.
@@ -1,2484 +0,0 @@
1
- import { a as ElInput, C as ClickOutside, b as ElPopover, V as VxeInput, c as ElButton, d as ElCheckboxGroup, e as ElCheckbox, f as ElTreeSelect, g as ElInputNumber, E as ElIcon, h as ElDropdown, i as ElDropdownMenu, j as ElDropdownItem, k as ElTag, l as isEmpty, m as ElColorPicker, n as dayjs, o as isoWeek, q as quarterOfYear, p as customParseFormat, r as ElImage, s as ElProgress, t as ElRadioGroup, u as ElRadio, v as ElSelect, w as ElOption, x as VxePager, y as VxeGrid, z as VxeUI } from "./vendor-PkgYxc4K.mjs";
2
- import { ref, computed, openBlock, createElementBlock, withDirectives, createVNode, unref, withCtx, createElementVNode, createTextVNode, withKeys, createBlock, Fragment, renderList, createCommentVNode, onMounted, defineComponent, resolveComponent, normalizeStyle, toDisplayString, watch, vShow, watchEffect, inject, normalizeProps, mergeProps, resolveDirective, onBeforeUnmount, reactive } from "vue";
3
- import { b as buildTree, d as deepClone, u as useElementClientSize, _ as _export_sfc, i as isColor, g as getFileIconUrl, p as preVideo, a as preCAD, w as withInstall } from "./utils-DZxjjV-b.mjs";
4
- const _hoisted_1$h = ["title"], _hoisted_2$4 = { class: "flex flex-col gap3" }, _hoisted_3$3 = { class: "flex flex-col gap3" }, _hoisted_4$1 = { class: "flex justify-between" }, _sfc_main$x = {
5
- __name: "filter-date",
6
- props: {
7
- column: {
8
- type: Object,
9
- default: () => ({})
10
- }
11
- },
12
- emits: ["FilterSearch"],
13
- setup(r, { emit: e }) {
14
- const t = r, o = ref([null, null]), n = computed(() => t.column.filters[0].data.length ? t.column.filters[0].data.join(" 至 ") : ""), c = ref(), l = ref(), a = () => {
15
- var i, d;
16
- (d = (i = unref(l).popperRef) == null ? void 0 : i.delayHide) == null || d.call(i);
17
- }, s = e;
18
- function m() {
19
- if (!o.value[0] && !o.value[1])
20
- t.column.filters[0].data = [];
21
- else if (!o.value[0] || !o.value[1]) {
22
- layer.msg("请选择完整的时间范围");
23
- return;
24
- } else
25
- t.column.filters[0].data = [...o.value];
26
- l.value.hide(), s("FilterSearch", t.column);
27
- }
28
- function u() {
29
- o.value = [null, null];
30
- }
31
- return (i, d) => (openBlock(), createElementBlock("div", {
32
- class: "size-full",
33
- title: n.value
34
- }, [
35
- withDirectives(createVNode(unref(ElInput), {
36
- ref_key: "inputRef",
37
- ref: c,
38
- value: n.value,
39
- readonly: ""
40
- }, null, 8, ["value"]), [
41
- [unref(ClickOutside), a]
42
- ]),
43
- createVNode(unref(ElPopover), {
44
- ref_key: "popoverRef",
45
- ref: l,
46
- "virtual-ref": c.value,
47
- trigger: "click",
48
- "virtual-triggering": "",
49
- "hide-after": 0,
50
- width: "205"
51
- }, {
52
- default: withCtx(() => [
53
- createElementVNode("div", _hoisted_2$4, [
54
- createElementVNode("div", _hoisted_3$3, [
55
- createVNode(unref(VxeInput), {
56
- modelValue: o.value[0],
57
- "onUpdate:modelValue": d[0] || (d[0] = (p) => o.value[0] = p),
58
- type: r.column.params.DateType || "date"
59
- }, null, 8, ["modelValue", "type"]),
60
- createVNode(unref(VxeInput), {
61
- modelValue: o.value[1],
62
- "onUpdate:modelValue": d[1] || (d[1] = (p) => o.value[1] = p),
63
- type: r.column.params.DateType || "date"
64
- }, null, 8, ["modelValue", "type"])
65
- ]),
66
- createElementVNode("div", _hoisted_4$1, [
67
- createVNode(unref(ElButton), {
68
- size: "small",
69
- type: "primary",
70
- onClick: m
71
- }, {
72
- default: withCtx(() => d[2] || (d[2] = [
73
- createTextVNode("确认")
74
- ])),
75
- _: 1
76
- }),
77
- createVNode(unref(ElButton), {
78
- size: "small",
79
- onClick: u
80
- }, {
81
- default: withCtx(() => d[3] || (d[3] = [
82
- createTextVNode("重置")
83
- ])),
84
- _: 1
85
- })
86
- ])
87
- ])
88
- ]),
89
- _: 1
90
- }, 8, ["virtual-ref"])
91
- ], 8, _hoisted_1$h));
92
- }
93
- }, _hoisted_1$g = ["title"], _sfc_main$w = {
94
- __name: "filter-boolean",
95
- props: {
96
- column: {
97
- type: Object,
98
- default: () => ({})
99
- }
100
- },
101
- emits: ["FilterSearch"],
102
- setup(r, { emit: e }) {
103
- const t = r, o = ref([]), n = computed(() => t.column.filters[0].data.length ? t.column.filters[0].data.map((u) => u ? "是" : "否").join(",") : ""), c = ref(), l = ref(), a = () => {
104
- var u, i;
105
- (i = (u = unref(l).popperRef) == null ? void 0 : u.delayHide) == null || i.call(u);
106
- }, s = e;
107
- function m() {
108
- o.value.length ? t.column.filters[0].data = [...o.value] : t.column.filters[0].data = [];
109
- }
110
- return (u, i) => (openBlock(), createElementBlock("div", {
111
- class: "size-full",
112
- title: n.value
113
- }, [
114
- withDirectives(createVNode(unref(ElInput), {
115
- ref_key: "inputRef",
116
- ref: c,
117
- value: n.value,
118
- readonly: "",
119
- onKeyup: i[0] || (i[0] = withKeys((d) => s("FilterSearch", r.column), ["enter"]))
120
- }, null, 8, ["value"]), [
121
- [unref(ClickOutside), a]
122
- ]),
123
- createVNode(unref(ElPopover), {
124
- ref_key: "popoverRef",
125
- ref: l,
126
- "virtual-ref": c.value,
127
- trigger: "click",
128
- "virtual-triggering": "",
129
- "hide-after": 0
130
- }, {
131
- default: withCtx(() => [
132
- createVNode(unref(ElCheckboxGroup), {
133
- class: "flex flex-col",
134
- modelValue: o.value,
135
- "onUpdate:modelValue": i[1] || (i[1] = (d) => o.value = d),
136
- onChange: m
137
- }, {
138
- default: withCtx(() => [
139
- createVNode(unref(ElCheckbox), {
140
- label: "是",
141
- value: !0
142
- }),
143
- createVNode(unref(ElCheckbox), {
144
- label: "否",
145
- value: !1
146
- })
147
- ]),
148
- _: 1
149
- }, 8, ["modelValue"])
150
- ]),
151
- _: 1
152
- }, 8, ["virtual-ref"])
153
- ], 8, _hoisted_1$g));
154
- }
155
- }, _hoisted_1$f = ["title"], _sfc_main$v = {
156
- __name: "filter-options",
157
- props: {
158
- column: {
159
- type: Object,
160
- default: () => ({})
161
- }
162
- },
163
- emits: ["FilterSearch"],
164
- setup(r, { emit: e }) {
165
- const t = r, o = ref([]);
166
- ref("");
167
- const n = computed(() => t.column.filters[0].data.length ? t.column.filters[0].data.map((u) => {
168
- var i;
169
- return (i = t.column.params.options.find((d) => d.value === u)) == null ? void 0 : i.label;
170
- }).join(",") : ""), c = ref(), l = ref(), a = () => {
171
- var u, i;
172
- (i = (u = unref(l).popperRef) == null ? void 0 : u.delayHide) == null || i.call(u);
173
- }, s = e;
174
- function m() {
175
- o.value.length ? t.column.filters[0].data = [...o.value] : t.column.filters[0].data = [];
176
- }
177
- return (u, i) => (openBlock(), createElementBlock("div", {
178
- class: "size-full",
179
- title: n.value
180
- }, [
181
- withDirectives(createVNode(unref(ElInput), {
182
- ref_key: "inputRef",
183
- ref: c,
184
- value: n.value,
185
- readonly: "",
186
- onKeyup: i[0] || (i[0] = withKeys((d) => s("FilterSearch", r.column), ["enter"]))
187
- }, null, 8, ["value"]), [
188
- [unref(ClickOutside), a]
189
- ]),
190
- createVNode(unref(ElPopover), {
191
- ref_key: "popoverRef",
192
- ref: l,
193
- "virtual-ref": c.value,
194
- trigger: "click",
195
- "virtual-triggering": "",
196
- "hide-after": 0
197
- }, {
198
- default: withCtx(() => [
199
- r.column.params.FieldType === "check" ? (openBlock(), createBlock(unref(ElCheckboxGroup), {
200
- key: 0,
201
- class: "flex flex-col",
202
- modelValue: o.value,
203
- "onUpdate:modelValue": i[1] || (i[1] = (d) => o.value = d),
204
- onChange: m
205
- }, {
206
- default: withCtx(() => [
207
- (openBlock(!0), createElementBlock(Fragment, null, renderList(r.column.params.options, (d) => (openBlock(), createBlock(unref(ElCheckbox), {
208
- key: d.value,
209
- label: d.label,
210
- value: d.value
211
- }, null, 8, ["label", "value"]))), 128))
212
- ]),
213
- _: 1
214
- }, 8, ["modelValue"])) : createCommentVNode("", !0),
215
- r.column.params.FieldType === "select" ? (openBlock(), createBlock(unref(ElCheckboxGroup), {
216
- key: 1,
217
- class: "flex flex-col",
218
- modelValue: o.value,
219
- "onUpdate:modelValue": i[2] || (i[2] = (d) => o.value = d),
220
- onChange: m
221
- }, {
222
- default: withCtx(() => [
223
- (openBlock(!0), createElementBlock(Fragment, null, renderList(r.column.params.options, (d) => (openBlock(), createBlock(unref(ElCheckbox), {
224
- key: d.value,
225
- label: d.label,
226
- value: d.value
227
- }, null, 8, ["label", "value"]))), 128))
228
- ]),
229
- _: 1
230
- }, 8, ["modelValue"])) : createCommentVNode("", !0)
231
- ]),
232
- _: 1
233
- }, 8, ["virtual-ref"])
234
- ], 8, _hoisted_1$f));
235
- }
236
- }, _sfc_main$u = {
237
- __name: "filter-treeSelect",
238
- props: {
239
- column: {
240
- type: Object,
241
- default: () => ({})
242
- }
243
- },
244
- emits: ["FilterSearch"],
245
- setup(r, { emit: e }) {
246
- const t = r, o = ref([]), n = ref(null), c = ref(t.column.params.FieldType === "TreeMultipleSelect"), l = ref({
247
- label: t.column.params.NodeNameField || "label",
248
- value: t.column.params.NodeValueField || "value",
249
- children: "children"
250
- });
251
- if (!t.column.params.TreeData) {
252
- const { options: m, ParentNodeField: u, NodeKeyField: i } = t.column.params;
253
- t.column.params.TreeData = buildTree(deepClone(m), u, i);
254
- }
255
- onMounted(() => {
256
- o.value = t.column.params.TreeData;
257
- });
258
- const a = e;
259
- function s() {
260
- n.value ? t.column.filters[0].data = [n.value] : t.column.filters[0].data = [];
261
- }
262
- return (m, u) => (openBlock(), createBlock(unref(ElTreeSelect), {
263
- clearable: "",
264
- modelValue: n.value,
265
- "onUpdate:modelValue": u[0] || (u[0] = (i) => n.value = i),
266
- data: o.value,
267
- "render-after-expand": !1,
268
- placeholder: "",
269
- onChange: s,
270
- multiple: c.value,
271
- "show-checkbox": c.value,
272
- props: l.value,
273
- onKeyup: u[1] || (u[1] = withKeys((i) => a("FilterSearch", r.column), ["enter"]))
274
- }, null, 8, ["modelValue", "data", "multiple", "show-checkbox", "props"]));
275
- }
276
- }, _sfc_main$t = {
277
- __name: "filter-treeSelects",
278
- props: {
279
- column: {
280
- type: Object,
281
- default: () => ({})
282
- }
283
- },
284
- emits: ["FilterSearch"],
285
- setup(r, { emit: e }) {
286
- const t = r, o = ref([]), n = ref([]), c = ref({
287
- label: t.column.params.NodeNameField || "label",
288
- value: t.column.params.NodeValueField || "value",
289
- children: "children"
290
- });
291
- if (!t.column.params.TreeData) {
292
- const { options: m, ParentNodeField: u, NodeKeyField: i } = t.column.params;
293
- t.column.params.TreeData = buildTree(deepClone(m), u, i);
294
- }
295
- onMounted(() => {
296
- o.value = t.column.params.TreeData;
297
- });
298
- const l = e;
299
- function a() {
300
- n.value ? t.column.filters[0].data = n.value : t.column.filters[0].data = [];
301
- }
302
- function s(m) {
303
- cleanUpTreeFilterRows(), l("FilterSearch", t.column);
304
- }
305
- return (m, u) => (openBlock(), createBlock(unref(ElTreeSelect), {
306
- "popper-class": "tree-filter-row",
307
- clearable: "",
308
- modelValue: n.value,
309
- "onUpdate:modelValue": u[0] || (u[0] = (i) => n.value = i),
310
- data: o.value,
311
- placeholder: "",
312
- onChange: a,
313
- multiple: "",
314
- "show-checkbox": "",
315
- "collapse-tags": "",
316
- "collapse-tags-tooltip": "",
317
- onKeyup: withKeys(s, ["enter"]),
318
- props: c.value
319
- }, null, 8, ["modelValue", "data", "props"]));
320
- }
321
- }, _hoisted_1$e = ["title"], _hoisted_2$3 = { class: "flex flex-col justify-center items-center gap2" }, _hoisted_3$2 = { class: "flex justify-between mt2" }, _sfc_main$s = {
322
- __name: "filter-inputNumber",
323
- props: {
324
- column: {
325
- type: Object,
326
- default: () => ({})
327
- }
328
- },
329
- emits: ["FilterSearch"],
330
- setup(r, { emit: e }) {
331
- const t = r, o = ref([null, null]), n = computed(() => t.column.filters[0].data.length ? t.column.filters[0].data.join(" 至 ") : ""), c = ref(), l = ref(), a = () => {
332
- var i, d;
333
- (d = (i = unref(l).popperRef) == null ? void 0 : i.delayHide) == null || d.call(i);
334
- }, s = e;
335
- function m() {
336
- if (!o.value[0] && !o.value[1])
337
- t.column.filters[0].data = [];
338
- else if (!o.value[0] || !o.value[1]) {
339
- layer.msg("请输入完整的数字范围");
340
- return;
341
- } else
342
- t.column.filters[0].data = [...o.value];
343
- l.value.hide(), s("FilterSearch", t.column);
344
- }
345
- function u() {
346
- o.value = [null, null];
347
- }
348
- return (i, d) => (openBlock(), createElementBlock("div", {
349
- class: "size-full",
350
- title: n.value
351
- }, [
352
- withDirectives(createVNode(unref(ElInput), {
353
- ref_key: "inputRef",
354
- ref: c,
355
- value: n.value,
356
- readonly: "",
357
- onKeyup: d[0] || (d[0] = withKeys((p) => s("FilterSearch", r.column), ["enter"]))
358
- }, null, 8, ["value"]), [
359
- [unref(ClickOutside), a]
360
- ]),
361
- createVNode(unref(ElPopover), {
362
- ref_key: "popoverRef",
363
- ref: l,
364
- "virtual-ref": c.value,
365
- trigger: "click",
366
- "virtual-triggering": "",
367
- "hide-after": 0
368
- }, {
369
- default: withCtx(() => [
370
- createElementVNode("div", _hoisted_2$3, [
371
- createVNode(unref(ElInputNumber), {
372
- class: "w-full",
373
- modelValue: o.value[0],
374
- "onUpdate:modelValue": d[1] || (d[1] = (p) => o.value[0] = p)
375
- }, null, 8, ["modelValue"]),
376
- createVNode(unref(ElInputNumber), {
377
- class: "w-full",
378
- modelValue: o.value[1],
379
- "onUpdate:modelValue": d[2] || (d[2] = (p) => o.value[1] = p)
380
- }, null, 8, ["modelValue"])
381
- ]),
382
- createElementVNode("div", _hoisted_3$2, [
383
- createVNode(unref(ElButton), {
384
- size: "small",
385
- type: "primary",
386
- onClick: m
387
- }, {
388
- default: withCtx(() => d[3] || (d[3] = [
389
- createTextVNode("确认")
390
- ])),
391
- _: 1
392
- }),
393
- createVNode(unref(ElButton), {
394
- size: "small",
395
- onClick: u
396
- }, {
397
- default: withCtx(() => d[4] || (d[4] = [
398
- createTextVNode("重置")
399
- ])),
400
- _: 1
401
- })
402
- ])
403
- ]),
404
- _: 1
405
- }, 8, ["virtual-ref"])
406
- ], 8, _hoisted_1$e));
407
- }
408
- }, _hoisted_1$d = ["title"], _hoisted_2$2 = {
409
- key: 0,
410
- class: "filter-cell flex flex-row justify-center items-center"
411
- }, _hoisted_3$1 = { class: "cursor-pointer" }, _sfc_main$r = /* @__PURE__ */ defineComponent({
412
- __name: "FilterRows",
413
- props: {
414
- column: {
415
- type: Object,
416
- default: () => ({})
417
- },
418
- gridRef: {
419
- type: Object,
420
- default: () => ({})
421
- }
422
- },
423
- emits: ["FilterSearch", "SortChange"],
424
- setup(r, { emit: e }) {
425
- const t = r, o = ref([]);
426
- let n = ref(0);
427
- onMounted(() => {
428
- if (t.column.params.filter) {
429
- const s = document.querySelector(`[colid=${t.column.id}]`);
430
- useElementClientSize(s, ({ clientHeight: m }) => {
431
- n.value = m <= 40 ? 65 : m;
432
- });
433
- } else
434
- n.value = 18;
435
- o.value = t.column.params.TreeData;
436
- });
437
- const c = e;
438
- function l(s) {
439
- if (s === "search") {
440
- const m = t.gridRef.getColumns();
441
- c("FilterSearch", t.column, m);
442
- } else s === "clear" ? t.column.filters.forEach((m) => {
443
- Array.isArray(m.data) ? m.data = [] : m.data = "";
444
- }) : s === "clearAll" && t.gridRef.getColumns().forEach((u) => {
445
- u.filters && u.filters.forEach((i) => {
446
- Array.isArray(i.data) ? i.data = [] : i.data = "";
447
- });
448
- });
449
- }
450
- function a() {
451
- var s;
452
- (s = t.column).params ?? (s.params = {}), t.column.params.sortStatus === "asc" ? t.column.params.sortStatus = "desc" : t.column.params.sortStatus === "desc" ? t.column.params.sortStatus = null : t.column.params.sortStatus = "asc", c("SortChange", t.column, t.gridRef.getColumns());
453
- }
454
- return (s, m) => {
455
- var i, d;
456
- const u = resolveComponent("hr-icon");
457
- return openBlock(), createElementBlock("div", {
458
- class: "flex flex-col filter-header",
459
- title: r.column.title,
460
- style: normalizeStyle({ height: unref(n) ? unref(n) + "px" : void 0 })
461
- }, [
462
- createElementVNode("div", {
463
- class: "filter-title h-full lh-9 flex justify-center items-center gap-1",
464
- onClick: a
465
- }, [
466
- createElementVNode("span", {
467
- style: normalizeStyle({ color: r.column.params.Required ? "red" : "" }),
468
- class: "whitespace-nowrap overflow-hidden text-ellipsis"
469
- }, toDisplayString(r.column.title), 5),
470
- (i = r.column.params) != null && i.sortable && ((d = r.column.params) != null && d.sortStatus) ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
471
- default: withCtx(() => {
472
- var p, v;
473
- return [
474
- ((p = r.column.params) == null ? void 0 : p.sortStatus) === "asc" ? (openBlock(), createBlock(u, {
475
- key: 0,
476
- icon: "ep:caret-top"
477
- })) : ((v = r.column.params) == null ? void 0 : v.sortStatus) === "desc" ? (openBlock(), createBlock(u, {
478
- key: 1,
479
- icon: "ep:caret-bottom"
480
- })) : createCommentVNode("", !0)
481
- ];
482
- }),
483
- _: 1
484
- })) : createCommentVNode("", !0)
485
- ]),
486
- r.column.params.filter ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
487
- ["radio_Table", "bool"].includes(r.column.params.FieldType) ? (openBlock(), createBlock(_sfc_main$w, {
488
- key: 0,
489
- column: r.column,
490
- onFilterSearch: m[0] || (m[0] = (p) => l("search"))
491
- }, null, 8, ["column"])) : ["select", "check"].includes(r.column.params.FieldType) ? (openBlock(), createBlock(_sfc_main$v, {
492
- key: 1,
493
- column: r.column,
494
- onFilterSearch: m[1] || (m[1] = (p) => l("search"))
495
- }, null, 8, ["column"])) : r.column.params.FieldType === "date" ? (openBlock(), createBlock(_sfc_main$x, {
496
- key: 2,
497
- column: r.column,
498
- onFilterSearch: m[2] || (m[2] = (p) => l("search"))
499
- }, null, 8, ["column"])) : r.column.params.FieldType === "tree" ? (openBlock(), createBlock(_sfc_main$u, {
500
- key: 3,
501
- column: r.column,
502
- onFilterSearch: m[3] || (m[3] = (p) => l("search"))
503
- }, null, 8, ["column"])) : r.column.params.FieldType === "TreeMultipleSelect" ? (openBlock(), createBlock(_sfc_main$t, {
504
- key: 4,
505
- column: r.column,
506
- onFilterSearch: m[4] || (m[4] = (p) => l("search"))
507
- }, null, 8, ["column"])) : r.column.params.FieldType === "inputNumber" ? (openBlock(), createBlock(_sfc_main$s, {
508
- key: 5,
509
- column: r.column,
510
- onFilterSearch: m[5] || (m[5] = (p) => l("search"))
511
- }, null, 8, ["column"])) : (openBlock(!0), createElementBlock(Fragment, { key: 6 }, renderList(r.column.filters, (p, v) => (openBlock(), createBlock(unref(ElInput), {
512
- key: v,
513
- modelValue: p.data,
514
- "onUpdate:modelValue": (g) => p.data = g,
515
- onKeyup: m[6] || (m[6] = withKeys((g) => l("search"), ["enter"])),
516
- disabled: ["colorPicker", "iconPicker", "progress"].includes(r.column.params.FieldType)
517
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"]))), 128)),
518
- createVNode(unref(ElDropdown), {
519
- class: "pr2 pt1",
520
- trigger: "click",
521
- onCommand: l,
522
- "popper-class": "filterMenus"
523
- }, {
524
- dropdown: withCtx(() => [
525
- createVNode(unref(ElDropdownMenu), null, {
526
- default: withCtx(() => [
527
- createVNode(unref(ElDropdownItem), { command: "search" }, {
528
- default: withCtx(() => m[7] || (m[7] = [
529
- createTextVNode("执行查询")
530
- ])),
531
- _: 1
532
- }),
533
- createVNode(unref(ElDropdownItem), { command: "clear" }, {
534
- default: withCtx(() => m[8] || (m[8] = [
535
- createTextVNode("清除当前条件")
536
- ])),
537
- _: 1
538
- }),
539
- createVNode(unref(ElDropdownItem), { command: "clearAll" }, {
540
- default: withCtx(() => m[9] || (m[9] = [
541
- createTextVNode("清除所有条件")
542
- ])),
543
- _: 1
544
- })
545
- ]),
546
- _: 1
547
- })
548
- ]),
549
- default: withCtx(() => [
550
- createElementVNode("span", _hoisted_3$1, [
551
- createVNode(unref(ElIcon), null, {
552
- default: withCtx(() => [
553
- createVNode(u, {
554
- size: "18",
555
- color: "#b4b4b4",
556
- icon: "material-symbols:filter-alt"
557
- })
558
- ]),
559
- _: 1
560
- })
561
- ])
562
- ]),
563
- _: 1
564
- })
565
- ])) : createCommentVNode("", !0)
566
- ], 12, _hoisted_1$d);
567
- };
568
- }
569
- }), _hoisted_1$c = { class: "ButtonLink flex flex-row justify-center" }, _sfc_main$q = /* @__PURE__ */ Object.assign({
570
- name: "ActionRender"
571
- }, {
572
- __name: "action-render",
573
- props: {
574
- gridRef: {
575
- type: Object,
576
- default: () => ({})
577
- },
578
- row: {
579
- type: Object,
580
- default: () => ({})
581
- },
582
- column: {
583
- type: Object,
584
- default: () => ({})
585
- }
586
- },
587
- emits: ["change", "ActionClick", "ActionRenderBefore"],
588
- setup(r, { emit: e }) {
589
- const t = r;
590
- let o = ref(deepClone(t.column.params.LinkButton ? t.column.params.LinkButton : []));
591
- const n = e;
592
- watch(() => t.row, () => {
593
- n("ActionRenderBefore", { row: t.row, column: t.column, gridRef: t.gridRef, LinkButton: o.value });
594
- }, {
595
- deep: !0,
596
- immediate: !0
597
- });
598
- function c(l) {
599
- n("ActionClick", { btnInfo: l, row: t.row, column: t.column, gridRef: t.gridRef });
600
- }
601
- return (l, a) => (openBlock(), createElementBlock("div", _hoisted_1$c, [
602
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(o), (s) => withDirectives((openBlock(), createBlock(unref(ElButton), {
603
- key: s.Name,
604
- class: "!text-[12px]",
605
- link: "",
606
- onClick: (m) => c(s)
607
- }, {
608
- default: withCtx(() => [
609
- createTextVNode(toDisplayString(s.Name), 1)
610
- ]),
611
- _: 2
612
- }, 1032, ["onClick"])), [
613
- [vShow, s.hide !== !0]
614
- ])), 128))
615
- ]));
616
- }
617
- }), actionRender = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-8517497e"]]), __vite_glob_0_0$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
618
- __proto__: null,
619
- default: actionRender
620
- }, Symbol.toStringTag, { value: "Module" })), _sfc_main$p = /* @__PURE__ */ Object.assign({
621
- name: "CheckboxRender"
622
- }, {
623
- __name: "checkbox-render",
624
- props: {
625
- gridRef: {
626
- type: Object,
627
- default: () => ({})
628
- },
629
- row: {
630
- type: Object,
631
- default: () => ({})
632
- },
633
- column: {
634
- type: Object,
635
- default: () => ({})
636
- }
637
- },
638
- emits: ["change"],
639
- setup(r, { emit: e }) {
640
- const t = r, o = ref(!!t.row[t.column.field]);
641
- watchEffect(() => {
642
- typeof t.row[t.column.field] != "boolean" ? o.value = !!t.row[t.column.field] : o.value = t.row[t.column.field];
643
- });
644
- const n = e;
645
- function c(l, a, s) {
646
- a[s.field] = l, n("change", l, a, s);
647
- }
648
- return (l, a) => {
649
- var s;
650
- return openBlock(), createBlock(unref(ElCheckbox), {
651
- disabled: (s = r.column.params) == null ? void 0 : s.disabled,
652
- modelValue: o.value,
653
- "onUpdate:modelValue": a[0] || (a[0] = (m) => o.value = m),
654
- onChange: a[1] || (a[1] = (m) => c(m, r.row, r.column))
655
- }, null, 8, ["disabled", "modelValue"]);
656
- };
657
- }
658
- }), __vite_glob_0_1$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
659
- __proto__: null,
660
- default: _sfc_main$p
661
- }, Symbol.toStringTag, { value: "Module" })), _hoisted_1$b = {
662
- key: 0,
663
- class: "tag h-full flex justify-center items-center"
664
- }, _hoisted_2$1 = { key: 1 }, _sfc_main$o = /* @__PURE__ */ Object.assign({
665
- name: "LabelRender"
666
- }, {
667
- __name: "label-render",
668
- props: {
669
- gridRef: {
670
- type: Object,
671
- default: () => ({})
672
- },
673
- row: {
674
- type: Object,
675
- default: () => ({})
676
- },
677
- column: {
678
- type: Object,
679
- default: () => ({})
680
- },
681
- displayValue: String
682
- },
683
- setup(r) {
684
- const e = r;
685
- e.column.params.LabelConfig || (e.column.params.LabelConfig = []);
686
- const t = ref(e.column.params.LabelConfig);
687
- t.value.forEach((u) => {
688
- u.Value == "true" ? u.Value = !0 : u.Value == "false" && (u.Value = !1);
689
- });
690
- const o = computed(() => e.row[e.column.field]), n = computed(() => t.value.find((u) => u.Value == o.value));
691
- onMounted(() => {
692
- e.column.params.LabelAutoColor && !n.value && (o.value || o.value === 0) && t.value.push({
693
- Value: o.value,
694
- Color: m()
695
- });
696
- });
697
- function c(u) {
698
- if (!u) return;
699
- let i, d, p, v = 1;
700
- if (u.startsWith("#"))
701
- u = u.slice(1), u.length === 3 ? (i = parseInt(u[0] + u[0], 16), d = parseInt(u[1] + u[1], 16), p = parseInt(u[2] + u[2], 16)) : u.length === 6 && (i = parseInt(u.slice(0, 2), 16), d = parseInt(u.slice(2, 4), 16), p = parseInt(u.slice(4, 6), 16));
702
- else if (u.startsWith("rgb")) {
703
- const g = u.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);
704
- g && (i = parseInt(g[1]), d = parseInt(g[2]), p = parseInt(g[3]), g[4] && (v = parseFloat(g[4])));
705
- } else if (u.startsWith("hsl")) {
706
- const g = u.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%(?:,\s*(\d*\.?\d+))?\)/);
707
- if (g) {
708
- const w = parseInt(g[1]) / 360, y = parseInt(g[2]) / 100, k = parseInt(g[3]) / 100;
709
- if (g[4] && (v = parseFloat(g[4])), y === 0)
710
- i = d = p = k * 255;
711
- else {
712
- const x = (E, R, O) => (O < 0 && (O += 1), O > 1 && (O -= 1), O < 0.16666666666666666 ? E + (R - E) * 6 * O : O < 0.5 ? R : O < 0.6666666666666666 ? E + (R - E) * (0.6666666666666666 - O) * 6 : E), j = k < 0.5 ? k * (1 + y) : k + y - k * y, C = 2 * k - j;
713
- i = x(C, j, w + 1 / 3) * 255, d = x(C, j, w) * 255, p = x(C, j, w - 1 / 3) * 255;
714
- }
715
- }
716
- }
717
- return { r: i, g: d, b: p, a: v };
718
- }
719
- function l(u, i, d) {
720
- u /= 255, i /= 255, d /= 255;
721
- const p = Math.max(u, i, d), v = Math.min(u, i, d);
722
- let g, w, y = (p + v) / 2;
723
- if (p === v)
724
- g = w = 0;
725
- else {
726
- const k = p - v;
727
- switch (w = y > 0.5 ? k / (2 - p - v) : k / (p + v), p) {
728
- case u:
729
- g = (i - d) / k + (i < d ? 6 : 0);
730
- break;
731
- case i:
732
- g = (d - u) / k + 2;
733
- break;
734
- case d:
735
- g = (u - i) / k + 4;
736
- break;
737
- }
738
- g /= 6;
739
- }
740
- return { h: g, s: w, l: y };
741
- }
742
- function a(u, i, d) {
743
- let p, v, g;
744
- if (i === 0)
745
- p = v = g = d;
746
- else {
747
- const w = (x, j, C) => (C < 0 && (C += 1), C > 1 && (C -= 1), C < 0.16666666666666666 ? x + (j - x) * 6 * C : C < 0.5 ? j : C < 0.6666666666666666 ? x + (j - x) * (0.6666666666666666 - C) * 6 : x), y = d < 0.5 ? d * (1 + i) : d + i - d * i, k = 2 * d - y;
748
- p = w(k, y, u + 1 / 3), v = w(k, y, u), g = w(k, y, u - 1 / 3);
749
- }
750
- return { r: Math.round(p * 255), g: Math.round(v * 255), b: Math.round(g * 255) };
751
- }
752
- function s(u, i) {
753
- if (!u) return;
754
- let { r: d, g: p, b: v } = c(u), { h: g, s: w, l: y } = l(d, p, v);
755
- y = Math.max(0, y - i);
756
- const { r: k, g: x, b: j } = a(g, w, y);
757
- return `rgb(${k}, ${x}, ${j})`;
758
- }
759
- function m() {
760
- function u(g, w) {
761
- return Math.floor(Math.random() * (w - g + 1)) + g;
762
- }
763
- const i = u(200, 255), d = u(200, 255), p = u(200, 255);
764
- return `#${i.toString(16).padStart(2, "0")}${d.toString(16).padStart(2, "0")}${p.toString(16).padStart(2, "0")}`;
765
- }
766
- return (u, i) => {
767
- const d = resolveComponent("hr-icon");
768
- return o.value ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
769
- n.value ? (openBlock(), createBlock(unref(ElTag), {
770
- key: 0,
771
- color: n.value.Color,
772
- size: "small",
773
- style: normalizeStyle({ borderColor: s(n.value.Color, "0.03") })
774
- }, {
775
- default: withCtx(() => [
776
- n.value.LeftIcon ? (openBlock(), createBlock(d, {
777
- key: 0,
778
- class: "mr0.25 v-middle mt0.15",
779
- size: "13",
780
- color: s(n.value.Color, "0.3"),
781
- icon: n.value.LeftIcon
782
- }, null, 8, ["color", "icon"])) : createCommentVNode("", !0),
783
- createElementVNode("span", {
784
- class: "v-middle",
785
- style: normalizeStyle({ color: s(n.value.Color, "0.3") })
786
- }, toDisplayString(r.displayValue === void 0 ? o.value : r.displayValue), 5),
787
- n.value.RightIcon ? (openBlock(), createBlock(d, {
788
- key: 1,
789
- class: "ml0.25 v-middle mt0.15",
790
- size: "13",
791
- color: s(n.value.Color, "0.3"),
792
- icon: n.value.RightIcon
793
- }, null, 8, ["color", "icon"])) : createCommentVNode("", !0)
794
- ]),
795
- _: 1
796
- }, 8, ["color", "style"])) : createCommentVNode("", !0),
797
- withDirectives(createElementVNode("span", null, toDisplayString(r.displayValue === void 0 ? o.value : r.displayValue), 513), [
798
- [vShow, !n.value]
799
- ])
800
- ])) : (openBlock(), createElementBlock("div", _hoisted_2$1));
801
- };
802
- }
803
- }), __vite_glob_0_8$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
804
- __proto__: null,
805
- default: _sfc_main$o
806
- }, Symbol.toStringTag, { value: "Module" })), _hoisted_1$a = { class: "ButtonLink w-full h-full" }, _sfc_main$n = /* @__PURE__ */ Object.assign({
807
- name: "ChooseFrameRender"
808
- }, {
809
- __name: "choose-frame-render",
810
- props: {
811
- gridRef: {
812
- type: Object,
813
- default: () => ({})
814
- },
815
- row: {
816
- type: Object,
817
- default: () => ({})
818
- },
819
- column: {
820
- type: Object,
821
- default: () => ({})
822
- }
823
- },
824
- emits: ["change"],
825
- setup(__props, { emit: __emit }) {
826
- const props = __props, value = computed(() => props.row[props.column.field]), emit = __emit;
827
- function handleChange(r, e, t) {
828
- emit("change", r, e, t);
829
- }
830
- const onBefore = inject("onBefore");
831
- function handleChoose(row, column, gridRef) {
832
- var r;
833
- if (onBefore && onBefore(column) || (r = column.params) != null && r.disabled) return;
834
- let { ChoosePageType, ChoosePageOID, StoredValueField, ReturnValueField, URLParamsObject, URLParamsHook } = props.column.params, urlParams = {}, selectedData = [], layerOptions = {};
835
- URLParamsObject && Object.assign(urlParams, URLParamsObject), URLParamsHook && Object.assign(urlParams, eval(`(${URLParamsHook})({ urlParams, selectedData, layerOptions, row, column, gridRef })`)), ChoosePageType === "autoPage" ? openAutoPage(ChoosePageOID, (e, t) => {
836
- isEmpty(StoredValueField) || isEmpty(ReturnValueField) || (Array.isArray(StoredValueField) || (StoredValueField = [StoredValueField]), Array.isArray(ReturnValueField) || (ReturnValueField = [ReturnValueField]), StoredValueField.forEach((o, n) => {
837
- var c;
838
- return row[o] = ((c = t[ReturnValueField[n]]) == null ? void 0 : c.join(",")) || null;
839
- }), handleChange(row[column.field], row, column));
840
- }, urlParams) : openChoosePage(ChoosePageOID, (e, t) => {
841
- isEmpty(StoredValueField) || isEmpty(ReturnValueField) || (Array.isArray(StoredValueField) || (StoredValueField = [StoredValueField]), Array.isArray(ReturnValueField) || (ReturnValueField = [ReturnValueField]), StoredValueField.forEach((o, n) => {
842
- var c;
843
- return row[o] = ((c = t[ReturnValueField[n]]) == null ? void 0 : c.join(",")) || null;
844
- }), handleChange(row[column.field], row, column));
845
- }, urlParams, selectedData, layerOptions);
846
- }
847
- return (r, e) => (openBlock(), createElementBlock("div", _hoisted_1$a, [
848
- props.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$o, normalizeProps(mergeProps({ key: 0 }, { ...props, displayValue: value.value })), null, 16)) : (openBlock(), createBlock(unref(ElButton), {
849
- key: 1,
850
- class: "!text-[12px]",
851
- link: "",
852
- onClick: e[0] || (e[0] = (t) => handleChoose(__props.row, __props.column, __props.gridRef))
853
- }, {
854
- default: withCtx(() => [
855
- createTextVNode(toDisplayString(value.value || "请选择"), 1)
856
- ]),
857
- _: 1
858
- }))
859
- ]));
860
- }
861
- }), chooseFrameRender = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-c44e48d9"]]), __vite_glob_0_2$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
862
- __proto__: null,
863
- default: chooseFrameRender
864
- }, Symbol.toStringTag, { value: "Module" })), _hoisted_1$9 = { class: "size-full color-picker" }, _sfc_main$m = /* @__PURE__ */ Object.assign({
865
- name: "ColorPickerRender"
866
- }, {
867
- __name: "color-picker-render",
868
- props: {
869
- gridRef: {
870
- type: Object,
871
- default: () => ({})
872
- },
873
- row: {
874
- type: Object,
875
- default: () => ({})
876
- },
877
- column: {
878
- type: Object,
879
- default: () => ({})
880
- }
881
- },
882
- emits: ["change"],
883
- setup(r, { emit: e }) {
884
- const t = r, o = ref([
885
- "#409EFF",
886
- "#67C23A",
887
- "#E6A23C",
888
- "#F56C6C",
889
- "#909399",
890
- "#BEF264",
891
- "#FDE047",
892
- "#FCD34D",
893
- "#FDBA74",
894
- "#FCA5A5",
895
- "#D6D3D1",
896
- "#D4D4D4",
897
- "#D4D4D8",
898
- "#D1D5DB",
899
- "#CBD5E1",
900
- "#F0ABFC",
901
- "#D8B4FE",
902
- "#C4B5FD",
903
- "#A5B4FC",
904
- "#93C5FD",
905
- "#7DD3FC",
906
- "#67E8F9",
907
- "#5EEAD4",
908
- "#6EE7B7",
909
- "#86EFAC",
910
- "#8A8A8A",
911
- "#BFBFBF",
912
- "#2C2C2C",
913
- "#DBDBDB",
914
- "#E6E6E6",
915
- "#FFFFFF",
916
- "#D4237A",
917
- "#13227A",
918
- "#1296DB",
919
- "#FDA4AF",
920
- "#F9A8D4"
921
- ]), n = ref(isColor(t.row[t.column.field]) ? t.row[t.column.field] : null);
922
- watchEffect(() => {
923
- n.value = isColor(t.row[t.column.field]) ? t.row[t.column.field] : null;
924
- });
925
- const c = e;
926
- function l(a, s, m) {
927
- s[m.field] = a, c("change", a, s, m);
928
- }
929
- return (a, s) => {
930
- var m;
931
- return openBlock(), createElementBlock("div", _hoisted_1$9, [
932
- createVNode(unref(ElColorPicker), {
933
- disabled: (m = r.column.params) == null ? void 0 : m.disabled,
934
- class: "size-full",
935
- modelValue: n.value,
936
- "onUpdate:modelValue": s[0] || (s[0] = (u) => n.value = u),
937
- predefine: o.value,
938
- onChange: s[1] || (s[1] = (u) => l(u, r.row, r.column))
939
- }, null, 8, ["disabled", "modelValue", "predefine"])
940
- ]);
941
- };
942
- }
943
- }), colorPickerRender = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-78c0384e"]]), __vite_glob_0_3$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
944
- __proto__: null,
945
- default: colorPickerRender
946
- }, Symbol.toStringTag, { value: "Module" })), _hoisted_1$8 = { class: "custom" }, _sfc_main$l = /* @__PURE__ */ Object.assign({
947
- name: "CustomRender"
948
- }, {
949
- __name: "custom-render",
950
- props: {
951
- gridRef: {
952
- type: Object,
953
- default: () => ({})
954
- },
955
- row: {
956
- type: Object,
957
- default: () => ({})
958
- },
959
- column: {
960
- type: Object,
961
- default: () => ({})
962
- }
963
- },
964
- setup(r) {
965
- return (e, t) => (openBlock(), createElementBlock("div", _hoisted_1$8));
966
- }
967
- }), __vite_glob_0_4$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
968
- __proto__: null,
969
- default: _sfc_main$l
970
- }, Symbol.toStringTag, { value: "Module" })), _hoisted_1$7 = ["title"], _sfc_main$k = /* @__PURE__ */ Object.assign({
971
- name: "DatePickerRender"
972
- }, {
973
- __name: "date-picker-render",
974
- props: {
975
- gridRef: {
976
- type: Object,
977
- default: () => ({})
978
- },
979
- row: {
980
- type: Object,
981
- default: () => ({})
982
- },
983
- column: {
984
- type: Object,
985
- default: () => ({})
986
- }
987
- },
988
- setup(r) {
989
- dayjs.extend(isoWeek), dayjs.extend(quarterOfYear), dayjs.extend(customParseFormat);
990
- const e = r, t = computed(() => {
991
- var a;
992
- const l = ((a = e.column.params) == null ? void 0 : a.DateType) || "date";
993
- return c(o(e.row[e.column.field], l), l);
994
- });
995
- function o(l, a) {
996
- if (!l) return null;
997
- const m = {
998
- time: "HH:mm:ss",
999
- date: "YYYY-MM-DD",
1000
- datetime: "YYYY-MM-DD HH:mm:ss",
1001
- week: "YYYY-WW",
1002
- month: "YYYY-MM",
1003
- quarter: "YYYY-Q",
1004
- year: "YYYY"
1005
- }[a];
1006
- if (!m) throw new Error("Unsupported date type");
1007
- let u = dayjs(l, m);
1008
- if (l.includes("周") || !u.isValid() && a === "week") {
1009
- const i = l.match(/^(\d{4})年第(\d{1,2})周$/);
1010
- if (i) {
1011
- const [, d, p] = i;
1012
- u = dayjs(`${d}-01-01`).isoWeek(Number(p));
1013
- }
1014
- } else if (l.includes("季度") || !u.isValid() && a === "quarter") {
1015
- const i = l.match(/^(\d{4})年第(\d)季度$/);
1016
- if (i) {
1017
- const [, d, p] = i;
1018
- u = dayjs(`${d}-01-01`).quarter(Number(p));
1019
- }
1020
- } else if (l.includes("月") || !u.isValid() && a === "month") {
1021
- const i = l.match(/^(\d{4})年(\d{1,2})月$/);
1022
- if (i) {
1023
- const [, d, p] = i;
1024
- u = dayjs(`${d}-${p}-01`);
1025
- }
1026
- } else if (l.includes("年") || !u.isValid() && a === "year") {
1027
- const i = l.match(/^(\d{4})年$/);
1028
- if (i) {
1029
- const [, d] = i;
1030
- u = dayjs(`${d}-01-01`);
1031
- }
1032
- }
1033
- return u.isValid() ? n(u, a) : null;
1034
- }
1035
- function n(l, a) {
1036
- switch (a) {
1037
- case "time":
1038
- return l.format("HH:mm:ss");
1039
- case "date":
1040
- return l.format("YYYY-MM-DD");
1041
- case "datetime":
1042
- return l.format("YYYY-MM-DD HH:mm:ss");
1043
- case "week":
1044
- return l.startOf("isoWeek").format("YYYY-MM-DD");
1045
- case "month":
1046
- return l.startOf("month").format("YYYY-MM-DD");
1047
- case "quarter":
1048
- return l.startOf("quarter").format("YYYY-MM-DD");
1049
- case "year":
1050
- return l.startOf("year").format("YYYY-MM-DD");
1051
- default:
1052
- return null;
1053
- }
1054
- }
1055
- function c(l, a) {
1056
- if (!l) return "";
1057
- switch (a) {
1058
- case "week":
1059
- return `${dayjs(l).year()}年第${dayjs(l).isoWeek()}周`;
1060
- case "month":
1061
- return `${dayjs(l).year()}年${dayjs(l).month() + 1}月`;
1062
- case "quarter":
1063
- return `${dayjs(l).year()}年第${dayjs(l).quarter()}季度`;
1064
- case "year":
1065
- return `${dayjs(l).year()}年`;
1066
- default:
1067
- const s = {
1068
- time: "HH:mm:ss",
1069
- date: "YYYY-MM-DD",
1070
- datetime: "YYYY-MM-DD HH:mm:ss"
1071
- };
1072
- return dayjs(l).format(s[a]);
1073
- }
1074
- }
1075
- return (l, a) => e.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$o, normalizeProps(mergeProps({ key: 0 }, { ...e, displayValue: t.value })), null, 16)) : (openBlock(), createElementBlock("span", {
1076
- key: 1,
1077
- title: t.value
1078
- }, toDisplayString(t.value), 9, _hoisted_1$7));
1079
- }
1080
- }), __vite_glob_0_5$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1081
- __proto__: null,
1082
- default: _sfc_main$k
1083
- }, Symbol.toStringTag, { value: "Module" })), _hoisted_1$6 = {
1084
- title: "附件",
1085
- class: "flex flex-row gap-1"
1086
- }, _hoisted_2 = ["title"], _hoisted_3 = ["onClick"], _hoisted_4 = ["href", "download"], _sfc_main$j = /* @__PURE__ */ Object.assign({
1087
- name: "FileRender"
1088
- }, {
1089
- __name: "file-render",
1090
- props: {
1091
- gridRef: {
1092
- type: Object,
1093
- default: () => ({})
1094
- },
1095
- row: {
1096
- type: Object,
1097
- default: () => ({})
1098
- },
1099
- column: {
1100
- type: Object,
1101
- default: () => ({})
1102
- }
1103
- },
1104
- emits: ["file-click"],
1105
- setup(r, { emit: e }) {
1106
- const t = e;
1107
- function o(n) {
1108
- [
1109
- "mp4",
1110
- "avi",
1111
- "mov",
1112
- "wmv",
1113
- "flv",
1114
- "mkv",
1115
- "webm",
1116
- "mpeg",
1117
- "mpg",
1118
- "m4v",
1119
- "3gp",
1120
- "3g2",
1121
- "ogg",
1122
- "ogv",
1123
- "ts",
1124
- "mts",
1125
- "m2ts",
1126
- "mxf"
1127
- ].includes(n.FileType) ? preVideo(n.FilePath) : ["dwg", "dxf", "dwf"].includes(n.FileType) && preCAD(n.FilePath), t("file-click", n);
1128
- }
1129
- return (n, c) => {
1130
- const l = resolveDirective("viewer");
1131
- return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$6, [
1132
- (openBlock(!0), createElementBlock(Fragment, null, renderList(r.row[r.column.field], (a, s) => (openBlock(), createElementBlock("div", {
1133
- class: "Link flex",
1134
- title: a.FileName
1135
- }, [
1136
- unref(getFileIconUrl)(a.FileType) ? (openBlock(), createElementBlock("div", {
1137
- key: 1,
1138
- class: "size-5 bg",
1139
- style: normalizeStyle({
1140
- backgroundImage: `url(${unref(getFileIconUrl)(a.FileType)})`,
1141
- backgroundSize: "cover"
1142
- }),
1143
- onClick: (m) => o(a)
1144
- }, null, 12, _hoisted_3)) : (openBlock(), createBlock(unref(ElImage), {
1145
- key: 0,
1146
- onClick: (m) => o(a),
1147
- class: "size-5",
1148
- src: a.FilePath
1149
- }, null, 8, ["onClick", "src"])),
1150
- createElementVNode("a", {
1151
- href: a.FilePath,
1152
- download: a.FileName
1153
- }, toDisplayString(s + 1) + "." + toDisplayString(a.FileType), 9, _hoisted_4)
1154
- ], 8, _hoisted_2))), 256))
1155
- ])), [
1156
- [
1157
- l,
1158
- void 0,
1159
- void 0,
1160
- { rebuild: !0 }
1161
- ]
1162
- ]);
1163
- };
1164
- }
1165
- }), fileRender = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-92060d8d"]]), __vite_glob_0_6$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1166
- __proto__: null,
1167
- default: fileRender
1168
- }, Symbol.toStringTag, { value: "Module" })), _sfc_main$i = /* @__PURE__ */ Object.assign({
1169
- name: "IconPickerRender"
1170
- }, {
1171
- __name: "icon-picker-render",
1172
- props: {
1173
- gridRef: {
1174
- type: Object,
1175
- default: () => ({})
1176
- },
1177
- row: {
1178
- type: Object,
1179
- default: () => ({})
1180
- },
1181
- column: {
1182
- type: Object,
1183
- default: () => ({})
1184
- }
1185
- },
1186
- emits: ["change"],
1187
- setup(r, { emit: e }) {
1188
- const t = e;
1189
- function o(c, l, a) {
1190
- t("change", c, l, a);
1191
- }
1192
- function n(c, l) {
1193
- var s;
1194
- if ((s = l.params) != null && s.disable) return;
1195
- let a = layer.open({
1196
- type: 2,
1197
- title: "图标选择",
1198
- maxmin: !0,
1199
- area: ["80%", "80%"],
1200
- content: "/Html/Custom/SelectIcon/hr-icon.html?callbackFn=setIcon&clearFn=clearIcon"
1201
- });
1202
- window.setIcon = (m) => {
1203
- c[l.field] = m.font_class, o(m, c, l);
1204
- }, window.clearIcon = (m) => {
1205
- c[l.field] = "", o(m, c, l), layer.close(a);
1206
- };
1207
- }
1208
- return (c, l) => {
1209
- const a = resolveComponent("hr-icon");
1210
- return openBlock(), createElementBlock("div", {
1211
- class: "w-full h-full flex justify-center items-center",
1212
- onClick: l[0] || (l[0] = (s) => n(r.row, r.column))
1213
- }, [
1214
- createVNode(a, {
1215
- icon: r.row[r.column.field]
1216
- }, null, 8, ["icon"])
1217
- ]);
1218
- };
1219
- }
1220
- }), __vite_glob_0_7$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1221
- __proto__: null,
1222
- default: _sfc_main$i
1223
- }, Symbol.toStringTag, { value: "Module" })), _hoisted_1$5 = { class: "ButtonLink w-full h-full flex" }, _sfc_main$h = /* @__PURE__ */ Object.assign({
1224
- name: "PickPeopleRender"
1225
- }, {
1226
- __name: "pick-people-render",
1227
- props: {
1228
- gridRef: {
1229
- type: Object,
1230
- default: () => ({})
1231
- },
1232
- row: {
1233
- type: Object,
1234
- default: () => ({})
1235
- },
1236
- column: {
1237
- type: Object,
1238
- default: () => ({})
1239
- }
1240
- },
1241
- emits: ["change"],
1242
- setup(r, { emit: e }) {
1243
- const t = r, o = e;
1244
- function n(c, l) {
1245
- var v;
1246
- if ((v = l.params) != null && v.disabled) return;
1247
- let {
1248
- PickPeopleType: a,
1249
- PickPeopleCheckType: s,
1250
- PickPeopleIsAll: m,
1251
- PickPeopleStatus: u,
1252
- StoredValueField: i,
1253
- ReturnValueField: d,
1254
- BackfillField: p
1255
- } = t.column.params;
1256
- openChoosePeople({
1257
- Type: a,
1258
- Choose: s,
1259
- IsAll: m,
1260
- Status: u
1261
- }, (g) => {
1262
- isEmpty(i) ? c[l.field] = g.Name || null : (Array.isArray(i) || (i = [i]), Array.isArray(d) || (d = [d]), i.forEach((w, y) => c[w] = g[d[y]] || null)), o("change", g, c, l);
1263
- }, p ? c[p] : null);
1264
- }
1265
- return (c, l) => (openBlock(), createElementBlock("div", _hoisted_1$5, [
1266
- createVNode(unref(ElButton), {
1267
- class: "!text-[12px]",
1268
- link: "",
1269
- onClick: l[0] || (l[0] = (a) => n(r.row, r.column))
1270
- }, {
1271
- default: withCtx(() => [
1272
- createTextVNode(toDisplayString(r.row[r.column.field] || "请选择"), 1)
1273
- ]),
1274
- _: 1
1275
- })
1276
- ]));
1277
- }
1278
- }), pickPeopleRender = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-8a753fa9"]]), __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1279
- __proto__: null,
1280
- default: pickPeopleRender
1281
- }, Symbol.toStringTag, { value: "Module" })), _sfc_main$g = /* @__PURE__ */ Object.assign({
1282
- name: "ProgressRender"
1283
- }, {
1284
- __name: "progress-render",
1285
- props: {
1286
- gridRef: {
1287
- type: Object,
1288
- default: () => ({})
1289
- },
1290
- row: {
1291
- type: Object,
1292
- default: () => ({})
1293
- },
1294
- column: {
1295
- type: Object,
1296
- default: () => ({})
1297
- }
1298
- },
1299
- emits: ["change"],
1300
- setup(r, { emit: e }) {
1301
- const t = r;
1302
- let o = ref(0);
1303
- return watchEffect(() => {
1304
- if (t.row[t.column.field]) {
1305
- const n = Number(parseFloat(t.row[t.column.field]));
1306
- if (isNaN(n))
1307
- return t.row[t.column.field] = o.value, layer.msg("请输入有效的数字");
1308
- o.value = n > 100 ? 100 : n, n > 100 ? t.row[t.column.field] = 100 : t.row[t.column.field] = o.value;
1309
- } else
1310
- o.value = 0;
1311
- }), (n, c) => (openBlock(), createBlock(unref(ElProgress), {
1312
- percentage: unref(o),
1313
- format: () => `${unref(o)}%`
1314
- }, null, 8, ["percentage", "format"]));
1315
- }
1316
- }), __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1317
- __proto__: null,
1318
- default: _sfc_main$g
1319
- }, Symbol.toStringTag, { value: "Module" })), _sfc_main$f = /* @__PURE__ */ Object.assign({
1320
- name: "RadioRender"
1321
- }, {
1322
- __name: "radio-render",
1323
- props: {
1324
- gridRef: {
1325
- type: Object,
1326
- default: () => ({})
1327
- },
1328
- row: {
1329
- type: Object,
1330
- default: () => ({})
1331
- },
1332
- column: {
1333
- type: Object,
1334
- default: () => ({})
1335
- }
1336
- },
1337
- emits: ["change"],
1338
- setup(r, { emit: e }) {
1339
- const t = r, o = e;
1340
- function n(c, l, a) {
1341
- t.gridRef.getTableData().tableData.filter((s) => s !== l).forEach((s) => {
1342
- s[a.field] && (s[a.field] = !1);
1343
- }), o("change", c, l, a);
1344
- }
1345
- return (c, l) => {
1346
- var a;
1347
- return openBlock(), createBlock(unref(ElRadioGroup), {
1348
- disabled: (a = r.column.params) == null ? void 0 : a.disabled,
1349
- modelValue: r.row[r.column.field],
1350
- "onUpdate:modelValue": l[0] || (l[0] = (s) => r.row[r.column.field] = s),
1351
- onChange: l[1] || (l[1] = (s) => n(s, r.row, r.column))
1352
- }, {
1353
- default: withCtx(() => [
1354
- createVNode(unref(ElRadio), { value: !0 })
1355
- ]),
1356
- _: 1
1357
- }, 8, ["disabled", "modelValue"]);
1358
- };
1359
- }
1360
- }), __vite_glob_0_11 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1361
- __proto__: null,
1362
- default: _sfc_main$f
1363
- }, Symbol.toStringTag, { value: "Module" })), _hoisted_1$4 = ["title"], _sfc_main$e = /* @__PURE__ */ Object.assign({
1364
- name: "SelectMultipleRender"
1365
- }, {
1366
- __name: "select-multiple-render",
1367
- props: {
1368
- gridRef: {
1369
- type: Object,
1370
- default: () => ({})
1371
- },
1372
- row: {
1373
- type: Object,
1374
- default: () => ({})
1375
- },
1376
- column: {
1377
- type: Object,
1378
- default: () => ({})
1379
- }
1380
- },
1381
- setup(r) {
1382
- var n, c;
1383
- const e = r;
1384
- (n = e.column.params)[c = e.gridRef.getRowid(e.row)] ?? (n[c] = {}), watchEffect(() => {
1385
- var l, a;
1386
- (l = e.column.params)[a = e.gridRef.getRowid(e.row)] ?? (l[a] = {}), !e.column.params[e.gridRef.getRowid(e.row)].options && e.column.params.options && (e.column.params[e.gridRef.getRowid(e.row)].options = deepClone(e.column.params.options));
1387
- });
1388
- const t = computed(() => {
1389
- var l;
1390
- return ((l = e.column.params[e.gridRef.getRowid(e.row)]) == null ? void 0 : l.options) || e.column.params.options;
1391
- }), o = computed(() => {
1392
- var a, s;
1393
- const l = e.row[e.column.field];
1394
- if (l && l.length > 1) {
1395
- let m = [];
1396
- return l.split(",").map((u) => {
1397
- var d, p;
1398
- const i = (p = (d = t.value) == null ? void 0 : d.find((v) => v.value == u)) == null ? void 0 : p.label;
1399
- i !== void 0 && m.push(i);
1400
- }), m.join(",");
1401
- } else
1402
- return ((s = (a = t.value) == null ? void 0 : a.find((m) => m.value == l)) == null ? void 0 : s.label) || "";
1403
- });
1404
- return (l, a) => e.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$o, normalizeProps(mergeProps({ key: 0 }, { ...e, displayValue: o.value })), null, 16)) : (openBlock(), createElementBlock("span", {
1405
- key: 1,
1406
- title: o.value
1407
- }, toDisplayString(o.value), 9, _hoisted_1$4));
1408
- }
1409
- }), __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1410
- __proto__: null,
1411
- default: _sfc_main$e
1412
- }, Symbol.toStringTag, { value: "Module" })), _hoisted_1$3 = ["title"], _sfc_main$d = /* @__PURE__ */ Object.assign({
1413
- name: "SelectRender"
1414
- }, {
1415
- __name: "select-render",
1416
- props: {
1417
- gridRef: {
1418
- type: Object,
1419
- default: () => ({})
1420
- },
1421
- row: {
1422
- type: Object,
1423
- default: () => ({})
1424
- },
1425
- column: {
1426
- type: Object,
1427
- default: () => ({})
1428
- }
1429
- },
1430
- setup(r) {
1431
- var n, c;
1432
- const e = r;
1433
- (n = e.column.params)[c = e.gridRef.getRowid(e.row)] ?? (n[c] = {}), watchEffect(() => {
1434
- var l, a;
1435
- (l = e.column.params)[a = e.gridRef.getRowid(e.row)] ?? (l[a] = {}), !e.column.params[e.gridRef.getRowid(e.row)].options && e.column.params.options && (e.column.params[e.gridRef.getRowid(e.row)].options = deepClone(e.column.params.options));
1436
- });
1437
- const t = computed(() => {
1438
- var l;
1439
- return ((l = e.column.params[e.gridRef.getRowid(e.row)]) == null ? void 0 : l.options) || e.column.params.options;
1440
- }), o = computed(() => {
1441
- var l, a;
1442
- return ((a = (l = t.value) == null ? void 0 : l.find((s) => s.value == e.row[e.column.field])) == null ? void 0 : a.label) || "";
1443
- });
1444
- return (l, a) => e.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$o, normalizeProps(mergeProps({ key: 0 }, { ...e, displayValue: o.value })), null, 16)) : (openBlock(), createElementBlock("span", {
1445
- key: 1,
1446
- title: o.value
1447
- }, toDisplayString(o.value), 9, _hoisted_1$3));
1448
- }
1449
- }), __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1450
- __proto__: null,
1451
- default: _sfc_main$d
1452
- }, Symbol.toStringTag, { value: "Module" })), _hoisted_1$2 = ["title"], _sfc_main$c = /* @__PURE__ */ Object.assign({
1453
- name: "TreeMultipleSelectRender"
1454
- }, {
1455
- __name: "tree-mulitiple-select-render",
1456
- props: {
1457
- gridRef: {
1458
- type: Object,
1459
- default: () => ({})
1460
- },
1461
- row: {
1462
- type: Object,
1463
- default: () => ({})
1464
- },
1465
- column: {
1466
- type: Object,
1467
- default: () => ({})
1468
- }
1469
- },
1470
- setup(r) {
1471
- const e = r;
1472
- if (!e.column.params.TreeData) {
1473
- const { options: o, ParentNodeField: n, NodeValueField: c } = e.column.params;
1474
- e.column.params.TreeData = buildTree(deepClone(o), n, c);
1475
- }
1476
- const t = computed(() => {
1477
- const { NodeNameField: o = "label", NodeValueField: n = "value" } = e.column.params;
1478
- if (e.row[e.column.field]) {
1479
- let c = e.row[e.column.field].split(",");
1480
- return e.column.params.options.filter((l) => c.includes(l[n])).map((l) => l[o]).join(",");
1481
- }
1482
- });
1483
- return (o, n) => e.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$o, normalizeProps(mergeProps({ key: 0 }, { ...e, displayValue: t.value })), null, 16)) : (openBlock(), createElementBlock("span", {
1484
- key: 1,
1485
- title: t.value
1486
- }, toDisplayString(t.value), 9, _hoisted_1$2));
1487
- }
1488
- }), __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1489
- __proto__: null,
1490
- default: _sfc_main$c
1491
- }, Symbol.toStringTag, { value: "Module" })), _hoisted_1$1 = ["title"], _sfc_main$b = /* @__PURE__ */ Object.assign({
1492
- name: "TreeSelectRender"
1493
- }, {
1494
- __name: "tree-select-render",
1495
- props: {
1496
- gridRef: {
1497
- type: Object,
1498
- default: () => ({})
1499
- },
1500
- row: {
1501
- type: Object,
1502
- default: () => ({})
1503
- },
1504
- column: {
1505
- type: Object,
1506
- default: () => ({})
1507
- }
1508
- },
1509
- setup(r) {
1510
- const e = r;
1511
- if (!e.column.params.TreeData) {
1512
- const { options: o, ParentNodeField: n, NodeKeyField: c } = e.column.params;
1513
- e.column.params.TreeData = buildTree(deepClone(o), n, c);
1514
- }
1515
- const t = computed(() => {
1516
- var c;
1517
- const { NodeNameField: o = "label", NodeValueField: n = "value" } = e.column.params;
1518
- return ((c = e.column.params.options.find((l) => l[n] == e.row[e.column.field])) == null ? void 0 : c[o]) || "";
1519
- });
1520
- return (o, n) => e.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$o, normalizeProps(mergeProps({ key: 0 }, { ...e, displayValue: t.value })), null, 16)) : (openBlock(), createElementBlock("span", {
1521
- key: 1,
1522
- title: t.value
1523
- }, toDisplayString(t.value), 9, _hoisted_1$1));
1524
- }
1525
- }), __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1526
- __proto__: null,
1527
- default: _sfc_main$b
1528
- }, Symbol.toStringTag, { value: "Module" }));
1529
- let comps$1 = {};
1530
- const modules$1 = /* @__PURE__ */ Object.assign({ "./action-render.vue": __vite_glob_0_0$1, "./checkbox-render.vue": __vite_glob_0_1$1, "./choose-frame-render.vue": __vite_glob_0_2$1, "./color-picker-render.vue": __vite_glob_0_3$1, "./custom-render.vue": __vite_glob_0_4$1, "./date-picker-render.vue": __vite_glob_0_5$1, "./file-render.vue": __vite_glob_0_6$1, "./icon-picker-render.vue": __vite_glob_0_7$1, "./label-render.vue": __vite_glob_0_8$1, "./pick-people-render.vue": __vite_glob_0_9, "./progress-render.vue": __vite_glob_0_10, "./radio-render.vue": __vite_glob_0_11, "./select-multiple-render.vue": __vite_glob_0_12, "./select-render.vue": __vite_glob_0_13, "./tree-mulitiple-select-render.vue": __vite_glob_0_14, "./tree-select-render.vue": __vite_glob_0_15 });
1531
- for (const r in modules$1) {
1532
- let e = modules$1[r].default.name;
1533
- comps$1[e] = modules$1[r].default;
1534
- }
1535
- const _sfc_main$a = /* @__PURE__ */ Object.assign({
1536
- name: "DatePickerEditor"
1537
- }, {
1538
- __name: "date-picker-editor",
1539
- props: {
1540
- gridRef: {
1541
- type: Object,
1542
- default: () => ({})
1543
- },
1544
- row: {
1545
- type: Object,
1546
- default: () => ({})
1547
- },
1548
- column: {
1549
- type: Object,
1550
- default: () => ({})
1551
- }
1552
- },
1553
- emits: ["change"],
1554
- setup(r, { emit: e }) {
1555
- var l;
1556
- dayjs.extend(isoWeek), dayjs.extend(quarterOfYear), dayjs.extend(customParseFormat);
1557
- const t = r, o = ref(n(t.row[t.column.field], ((l = t.column.params) == null ? void 0 : l.DateType) || "date"));
1558
- onBeforeUnmount(() => {
1559
- var s;
1560
- const a = ((s = t.column.params) == null ? void 0 : s.DateType) || "date";
1561
- o.value && (a === "year" ? t.row[t.column.field] = dayjs(o.value).format("YYYY年") : a === "month" ? t.row[t.column.field] = dayjs(o.value).format("YYYY年MM月") : a === "quarter" ? t.row[t.column.field] = dayjs(o.value).format("YYYY年第Q季度") : a === "week" ? t.row[t.column.field] = dayjs(o.value).format("YYYY年第WW周") : a === "datetime" ? t.row[t.column.field] = dayjs(o.value).format("YYYY-MM-DD HH:mm:ss") : t.row[t.column.field] = dayjs(o.value).format("YYYY-MM-DD"));
1562
- });
1563
- function n(a, s) {
1564
- if (!a) return null;
1565
- const u = {
1566
- time: "HH:mm:ss",
1567
- date: "YYYY-MM-DD",
1568
- datetime: "YYYY-MM-DD HH:mm:ss",
1569
- week: "YYYY-WW",
1570
- month: "YYYY-MM",
1571
- quarter: "YYYY-Q",
1572
- year: "YYYY"
1573
- }[s];
1574
- if (!u) throw new Error("Unsupported date type");
1575
- let i = dayjs(a, u);
1576
- if (!i.isValid() && s === "week") {
1577
- const d = a.match(/^(\d{4})年第(\d{2})周$/);
1578
- if (d) {
1579
- const [, p, v] = d;
1580
- i = dayjs(`${p}-01-01`).isoWeek(Number(v));
1581
- }
1582
- } else if (!i.isValid() && s === "quarter") {
1583
- const d = a.match(/^(\d{4})年第(\d)季度$/);
1584
- if (d) {
1585
- const [, p, v] = d;
1586
- i = dayjs(`${p}-01-01`).quarter(Number(v));
1587
- }
1588
- } else if (!i.isValid() && s === "month") {
1589
- const d = a.match(/^(\d{4})年(\d{2})月$/);
1590
- if (d) {
1591
- const [, p, v] = d;
1592
- i = dayjs(`${p}-${v}-01`);
1593
- }
1594
- } else if (!i.isValid() && s === "year") {
1595
- const d = a.match(/^(\d{4})年$/);
1596
- if (d) {
1597
- const [, p] = d;
1598
- i = dayjs(`${p}-01-01`);
1599
- }
1600
- }
1601
- return i.isValid() ? c(i, s) : null;
1602
- }
1603
- function c(a, s) {
1604
- switch (s) {
1605
- case "time":
1606
- return a.format("HH:mm:ss");
1607
- case "date":
1608
- return a.format("YYYY-MM-DD");
1609
- case "datetime":
1610
- return a.format("YYYY-MM-DD HH:mm:ss");
1611
- case "week":
1612
- return a.startOf("isoWeek").format("YYYY-MM-DD");
1613
- case "month":
1614
- return a.startOf("month").format("YYYY-MM-DD");
1615
- case "quarter":
1616
- return a.startOf("quarter").format("YYYY-MM-DD");
1617
- case "year":
1618
- return a.startOf("year").format("YYYY-MM-DD");
1619
- default:
1620
- return null;
1621
- }
1622
- }
1623
- return (a, s) => {
1624
- var m;
1625
- return openBlock(), createBlock(unref(VxeInput), {
1626
- modelValue: o.value,
1627
- "onUpdate:modelValue": s[0] || (s[0] = (u) => o.value = u),
1628
- type: ((m = r.column.params) == null ? void 0 : m.DateType) || "date",
1629
- clearable: "",
1630
- transfer: ""
1631
- }, null, 8, ["modelValue", "type"]);
1632
- };
1633
- }
1634
- }), datePickerEditor = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-27310af4"]]), __vite_glob_0_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1635
- __proto__: null,
1636
- default: datePickerEditor
1637
- }, Symbol.toStringTag, { value: "Module" })), _sfc_main$9 = /* @__PURE__ */ Object.assign({
1638
- name: "InputEditor"
1639
- }, {
1640
- __name: "input-editor",
1641
- props: {
1642
- gridRef: {
1643
- type: Object,
1644
- default: () => ({})
1645
- },
1646
- row: {
1647
- type: Object,
1648
- default: () => ({})
1649
- },
1650
- column: {
1651
- type: Object,
1652
- default: () => ({})
1653
- }
1654
- },
1655
- setup(r) {
1656
- const e = r, t = ref(e.row[e.column.field]);
1657
- return onBeforeUnmount(() => {
1658
- e.row[e.column.field] = t.value;
1659
- }), (o, n) => (openBlock(), createBlock(unref(ElInput), {
1660
- modelValue: t.value,
1661
- "onUpdate:modelValue": n[0] || (n[0] = (c) => t.value = c)
1662
- }, null, 8, ["modelValue"]));
1663
- }
1664
- }), __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1665
- __proto__: null,
1666
- default: _sfc_main$9
1667
- }, Symbol.toStringTag, { value: "Module" })), _sfc_main$8 = /* @__PURE__ */ Object.assign({
1668
- name: "InputNumberEditor"
1669
- }, {
1670
- __name: "input-number-editor",
1671
- props: {
1672
- gridRef: {
1673
- type: Object,
1674
- default: () => ({})
1675
- },
1676
- row: {
1677
- type: Object,
1678
- default: () => ({})
1679
- },
1680
- column: {
1681
- type: Object,
1682
- default: () => ({})
1683
- }
1684
- },
1685
- emits: ["change"],
1686
- setup(r, { emit: e }) {
1687
- const t = r, o = ref(t.row[t.column.field]);
1688
- return onBeforeUnmount(() => {
1689
- t.row[t.column.field] = o.value ? Number(o.value) : 0;
1690
- }), (n, c) => (openBlock(), createBlock(unref(ElInput), {
1691
- modelValue: o.value,
1692
- "onUpdate:modelValue": c[0] || (c[0] = (l) => o.value = l),
1693
- min: r.column.params.min,
1694
- max: r.column.params.max,
1695
- step: r.column.params.step,
1696
- type: "number"
1697
- }, null, 8, ["modelValue", "min", "max", "step"]));
1698
- }
1699
- }), __vite_glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1700
- __proto__: null,
1701
- default: _sfc_main$8
1702
- }, Symbol.toStringTag, { value: "Module" })), _sfc_main$7 = /* @__PURE__ */ Object.assign({
1703
- name: "SelectEditor"
1704
- }, {
1705
- __name: "select-editor",
1706
- props: {
1707
- gridRef: {
1708
- type: Object,
1709
- default: () => ({})
1710
- },
1711
- row: {
1712
- type: Object,
1713
- default: () => ({})
1714
- },
1715
- column: {
1716
- type: Object,
1717
- default: () => ({})
1718
- }
1719
- },
1720
- setup(r) {
1721
- const e = r, t = ref(e.row[e.column.field]), o = reactive(e.column.params || {
1722
- placeholder: "请选择",
1723
- disabled: !1,
1724
- clearable: !1
1725
- }), n = computed(() => {
1726
- var c;
1727
- return ((c = e.column.params[e.gridRef.getRowid(e.row)]) == null ? void 0 : c.options) || e.column.params.options || [];
1728
- });
1729
- return onBeforeUnmount(() => {
1730
- var l;
1731
- e.row[e.column.field] = t.value;
1732
- const c = e.column.params.LabelStoreField;
1733
- if (c) {
1734
- const a = (l = n.value.find((s) => s.value === t.value)) == null ? void 0 : l.label;
1735
- a !== void 0 ? e.row[c] = a : t.value === void 0 ? e.row[c] = null : t.value !== void 0 && a === void 0 && (e.row[c] = t.value);
1736
- }
1737
- }), (c, l) => (openBlock(), createBlock(unref(ElSelect), {
1738
- class: "z-1",
1739
- modelValue: t.value,
1740
- "onUpdate:modelValue": l[0] || (l[0] = (a) => t.value = a),
1741
- "automatic-dropdown": "",
1742
- placeholder: o.placeholder,
1743
- "popper-class": "select-dropdown",
1744
- clearable: ""
1745
- }, {
1746
- default: withCtx(() => [
1747
- (openBlock(!0), createElementBlock(Fragment, null, renderList(n.value, (a) => (openBlock(), createBlock(unref(ElOption), {
1748
- class: "vxe-table--ignore-clear",
1749
- key: a.value,
1750
- label: a.label,
1751
- value: a.value,
1752
- disabled: a.disabled
1753
- }, null, 8, ["label", "value", "disabled"]))), 128))
1754
- ]),
1755
- _: 1
1756
- }, 8, ["modelValue", "placeholder"]));
1757
- }
1758
- }), selectEditor = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-afd869c5"]]), __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1759
- __proto__: null,
1760
- default: selectEditor
1761
- }, Symbol.toStringTag, { value: "Module" })), _sfc_main$6 = /* @__PURE__ */ Object.assign({
1762
- name: "SelectMultipleEditor"
1763
- }, {
1764
- __name: "select-multiple-editor",
1765
- props: {
1766
- gridRef: {
1767
- type: Object,
1768
- default: () => ({})
1769
- },
1770
- row: {
1771
- type: Object,
1772
- default: () => ({})
1773
- },
1774
- column: {
1775
- type: Object,
1776
- default: () => ({})
1777
- }
1778
- },
1779
- setup(r) {
1780
- const e = r, t = reactive(e.column.params || {
1781
- placeholder: "请选择",
1782
- disabled: !1,
1783
- clearable: !1
1784
- }), o = computed(() => {
1785
- var c;
1786
- return ((c = e.column.params[e.gridRef.getRowid(e.row)]) == null ? void 0 : c.options) || e.column.params.options || [];
1787
- });
1788
- onBeforeUnmount(() => {
1789
- const c = n.value.join(",");
1790
- e.row[e.column.field] = c;
1791
- const l = e.column.params.LabelStoreField;
1792
- if (l) {
1793
- const a = o.value.filter((s) => n.value.includes(s.value)).map((s) => s.label).join(",");
1794
- e.row[l] = a;
1795
- }
1796
- });
1797
- const n = ref([]);
1798
- return watchEffect(() => {
1799
- e.row[e.column.field] ? n.value = e.row[e.column.field].split(",") : n.value = [];
1800
- }), (c, l) => (openBlock(), createBlock(unref(ElSelect), {
1801
- class: "z-1 vxe-table--ignore-clear",
1802
- modelValue: n.value,
1803
- "onUpdate:modelValue": l[0] || (l[0] = (a) => n.value = a),
1804
- "automatic-dropdown": "",
1805
- placeholder: t.placeholder,
1806
- "popper-class": "select-dropdown",
1807
- multiple: "",
1808
- clearable: ""
1809
- }, {
1810
- default: withCtx(() => [
1811
- (openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (a) => (openBlock(), createBlock(unref(ElOption), {
1812
- class: "vxe-table--ignore-clear",
1813
- key: a.value,
1814
- label: a.label,
1815
- value: a.value
1816
- }, null, 8, ["label", "value"]))), 128))
1817
- ]),
1818
- _: 1
1819
- }, 8, ["modelValue", "placeholder"]));
1820
- }
1821
- }), selectMultipleEditor = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-3efc6729"]]), __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1822
- __proto__: null,
1823
- default: selectMultipleEditor
1824
- }, Symbol.toStringTag, { value: "Module" })), _sfc_main$5 = /* @__PURE__ */ Object.assign({
1825
- name: "SelectRemoteEditor"
1826
- }, {
1827
- __name: "select-remote-editor",
1828
- props: {
1829
- gridRef: {
1830
- type: Object,
1831
- default: () => ({})
1832
- },
1833
- row: {
1834
- type: Object,
1835
- default: () => ({})
1836
- },
1837
- column: {
1838
- type: Object,
1839
- default: () => ({})
1840
- }
1841
- },
1842
- emits: ["remoteMethod"],
1843
- setup(r, { emit: e }) {
1844
- const t = e, o = r, n = ref(o.row[o.column.field] === void 0 ? "" : o.row[o.column.field]), c = reactive(o.column.params || {
1845
- options: [],
1846
- placeholder: "请选择",
1847
- disabled: !1,
1848
- clearable: !1,
1849
- SearchField: null,
1850
- ReturnValueField: null,
1851
- StoredValueField: null,
1852
- loading: !1
1853
- });
1854
- onBeforeUnmount(() => {
1855
- const { StoredValueField: a, ReturnValueField: s } = c;
1856
- a && a.length ? a.forEach((m, u) => {
1857
- const i = c.options.find((d) => d._value === n.value);
1858
- i && (o.row[m] = i[s[u]]);
1859
- }) : o.row[o.column.field] = n.value;
1860
- });
1861
- function l(a) {
1862
- const { DataAPIOID: s, SearchField: m } = c;
1863
- a ? (c.loading = !0, t("remoteMethod", { DataAPIOID: s, SearchField: m, query: a, params: c })) : o.column.params.options = [];
1864
- }
1865
- return (a, s) => (openBlock(), createBlock(unref(ElSelect), {
1866
- class: "z-1 vxe-table--ignore-clear",
1867
- modelValue: n.value,
1868
- "onUpdate:modelValue": s[0] || (s[0] = (m) => n.value = m),
1869
- "allow-create": "",
1870
- "automatic-dropdown": "",
1871
- placeholder: c.placeholder,
1872
- "popper-class": "select-dropdown",
1873
- loading: c.loading,
1874
- filterable: "",
1875
- remote: "",
1876
- "remote-method": l,
1877
- clearable: ""
1878
- }, {
1879
- default: withCtx(() => [
1880
- (openBlock(!0), createElementBlock(Fragment, null, renderList(c.options, (m) => (openBlock(), createBlock(unref(ElOption), {
1881
- class: "vxe-table--ignore-clear",
1882
- key: m._value,
1883
- label: m._label,
1884
- value: m._value
1885
- }, null, 8, ["label", "value"]))), 128))
1886
- ]),
1887
- _: 1
1888
- }, 8, ["modelValue", "placeholder", "loading"]));
1889
- }
1890
- }), selectRemoteEditor = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-e300cf04"]]), __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1891
- __proto__: null,
1892
- default: selectRemoteEditor
1893
- }, Symbol.toStringTag, { value: "Module" })), _sfc_main$4 = /* @__PURE__ */ Object.assign({
1894
- name: "TextareaEditor"
1895
- }, {
1896
- __name: "textarea-editor",
1897
- props: {
1898
- gridRef: {
1899
- type: Object,
1900
- default: () => ({})
1901
- },
1902
- row: {
1903
- type: Object,
1904
- default: () => ({})
1905
- },
1906
- column: {
1907
- type: Object,
1908
- default: () => ({})
1909
- }
1910
- },
1911
- setup(r) {
1912
- const e = r, t = ref(e.row[e.column.field]);
1913
- return onBeforeUnmount(() => {
1914
- e.row[e.column.field] = t.value;
1915
- }), (o, n) => (openBlock(), createBlock(unref(ElInput), {
1916
- modelValue: t.value,
1917
- "onUpdate:modelValue": n[0] || (n[0] = (c) => t.value = c),
1918
- rows: 2,
1919
- type: "textarea"
1920
- }, null, 8, ["modelValue"]));
1921
- }
1922
- }), textareaEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-8eb3d182"]]), __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1923
- __proto__: null,
1924
- default: textareaEditor
1925
- }, Symbol.toStringTag, { value: "Module" })), _sfc_main$3 = /* @__PURE__ */ Object.assign({
1926
- name: "TreeMultipleSelectEditor"
1927
- }, {
1928
- __name: "tree-multiple-select-editor",
1929
- props: {
1930
- gridRef: {
1931
- type: Object,
1932
- default: () => ({})
1933
- },
1934
- row: {
1935
- type: Object,
1936
- default: () => ({})
1937
- },
1938
- column: {
1939
- type: Object,
1940
- default: () => ({})
1941
- }
1942
- },
1943
- setup(r) {
1944
- const e = r, t = ref({
1945
- label: e.column.params.NodeNameField || "label",
1946
- value: e.column.params.NodeValueField || "value",
1947
- children: "children"
1948
- });
1949
- if (!e.column.params.TreeData) {
1950
- const { options: n, ParentNodeField: c, NodeValueField: l } = e.column.params;
1951
- e.column.params.TreeData = buildTree(deepClone(n), c, l);
1952
- }
1953
- const o = ref([]);
1954
- return onBeforeUnmount(() => {
1955
- e.row[e.column.field] = o.value.join(",");
1956
- }), watchEffect(() => {
1957
- e.row[e.column.field] ? o.value = e.row[e.column.field].split(",") : o.value = [];
1958
- }), (n, c) => (openBlock(), createBlock(unref(ElTreeSelect), {
1959
- class: "z-1 vxe-table--ignore-clear",
1960
- modelValue: o.value,
1961
- "onUpdate:modelValue": c[0] || (c[0] = (l) => o.value = l),
1962
- "automatic-dropdown": "",
1963
- "popper-class": "tree-select",
1964
- data: r.column.params.TreeData,
1965
- props: t.value,
1966
- clearable: "",
1967
- multiple: "",
1968
- indent: 12,
1969
- "show-checkbox": "",
1970
- "collapse-tags": ""
1971
- }, null, 8, ["modelValue", "data", "props"]));
1972
- }
1973
- }), treeMultipleSelectEditor = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-b1372431"]]), __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1974
- __proto__: null,
1975
- default: treeMultipleSelectEditor
1976
- }, Symbol.toStringTag, { value: "Module" })), _sfc_main$2 = /* @__PURE__ */ defineComponent({
1977
- name: "TreeSelectEditor",
1978
- __name: "tree-select-editor",
1979
- props: {
1980
- gridRef: {
1981
- type: Object,
1982
- default: () => ({})
1983
- },
1984
- row: {
1985
- type: Object,
1986
- default: () => ({})
1987
- },
1988
- column: {
1989
- type: Object,
1990
- default: () => ({})
1991
- }
1992
- },
1993
- setup(r) {
1994
- const e = r, t = ref(e.row[e.column.field]), o = ref({
1995
- label: e.column.params.NodeNameField || "label",
1996
- value: e.column.params.NodeValueField || "value",
1997
- children: "children"
1998
- });
1999
- if (!e.column.params.TreeData) {
2000
- const { options: n, ParentNodeField: c, NodeValueField: l } = e.column.params;
2001
- e.column.params.TreeData = buildTree(deepClone(n), c, l);
2002
- }
2003
- return onBeforeUnmount(() => {
2004
- e.row[e.column.field] = t.value;
2005
- }), (n, c) => (openBlock(), createBlock(unref(ElTreeSelect), {
2006
- class: "z-1 vxe-table--ignore-clear",
2007
- modelValue: t.value,
2008
- "onUpdate:modelValue": c[0] || (c[0] = (l) => t.value = l),
2009
- "automatic-dropdown": "",
2010
- "popper-class": "tree-select",
2011
- data: r.column.params.TreeData,
2012
- clearable: "",
2013
- props: o.value,
2014
- indent: 12
2015
- }, {
2016
- label: withCtx(({ label: l, value: a }) => [
2017
- createElementVNode("span", null, toDisplayString(r.column.params.options.find((s) => s[o.value.value] === a) ? l : ""), 1)
2018
- ]),
2019
- _: 1
2020
- }, 8, ["modelValue", "data", "props"]));
2021
- }
2022
- }), treeSelectEditor = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-a94bc2a1"]]), __vite_glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2023
- __proto__: null,
2024
- default: treeSelectEditor
2025
- }, Symbol.toStringTag, { value: "Module" }));
2026
- let comps = {};
2027
- const modules = /* @__PURE__ */ Object.assign({ "./date-picker-editor.vue": __vite_glob_0_0, "./input-editor.vue": __vite_glob_0_1, "./input-number-editor.vue": __vite_glob_0_2, "./select-editor.vue": __vite_glob_0_3, "./select-multiple-editor.vue": __vite_glob_0_4, "./select-remote-editor.vue": __vite_glob_0_5, "./textarea-editor.vue": __vite_glob_0_6, "./tree-multiple-select-editor.vue": __vite_glob_0_7, "./tree-select-editor.vue": __vite_glob_0_8 });
2028
- for (const r in modules) {
2029
- let e = modules[r].default.name;
2030
- comps[e] = modules[r].default;
2031
- }
2032
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2033
- __name: "paging",
2034
- props: {
2035
- pagination: {
2036
- type: Object,
2037
- default: () => ({
2038
- Page: 1,
2039
- // 当前页码
2040
- PageSize: 30,
2041
- // 分页大小
2042
- TotalPages: 100,
2043
- // 总页数
2044
- Total: 1e3
2045
- // 总条数
2046
- })
2047
- },
2048
- gridOptions: {
2049
- type: Object,
2050
- default: () => ({})
2051
- }
2052
- },
2053
- emits: ["pageChange", "refresh"],
2054
- setup(r, { emit: e }) {
2055
- const t = r, o = ref(), n = ref(["Total", "Sizes", "PrevJump", "PrevPage", "JumpNumber", "NextPage", "NextJump", "FullJump"]);
2056
- onMounted(() => {
2057
- t.gridOptions.Pages === !1 ? n.value = ["Total"] : useElementClientSize(o.value, ({ clientWidth: a }) => {
2058
- a < 300 ? n.value = ["Total"] : a < 500 ? n.value = ["Total", "PrevJump", "PrevPage", "JumpNumber", "NextPage", "NextJump"] : n.value = ["Total", "Sizes", "PrevJump", "PrevPage", "JumpNumber", "NextPage", "NextJump", "FullJump"];
2059
- });
2060
- }), watch(() => t.gridOptions.Pages, (a) => {
2061
- a === !1 ? n.value = ["Total"] : n.value = ["Total", "Sizes", "PrevJump", "PrevPage", "JumpNumber", "NextPage", "NextJump", "FullJump"];
2062
- });
2063
- const c = e;
2064
- function l() {
2065
- c("pageChange", t.pagination);
2066
- }
2067
- return (a, s) => (openBlock(), createElementBlock("div", {
2068
- ref_key: "pagingDom",
2069
- ref: o,
2070
- class: "flex items-center w-full h-12 border border-solid border-[#e8eaec] box-border"
2071
- }, [
2072
- createVNode(unref(VxePager), {
2073
- size: "small",
2074
- class: "w-full !h-full",
2075
- background: "",
2076
- "current-page": r.pagination.Page,
2077
- "onUpdate:currentPage": s[0] || (s[0] = (m) => r.pagination.Page = m),
2078
- "page-size": r.pagination.PageSize,
2079
- "onUpdate:pageSize": s[1] || (s[1] = (m) => r.pagination.PageSize = m),
2080
- total: r.pagination.Total,
2081
- layouts: n.value,
2082
- onPageChange: l,
2083
- "page-sizes": r.pagination.PageSizes
2084
- }, null, 8, ["current-page", "page-size", "total", "layouts", "page-sizes"])
2085
- ], 512));
2086
- }
2087
- }), _hoisted_1 = { class: "h-full w-full" }, _sfc_main = /* @__PURE__ */ defineComponent({
2088
- name: "HrTable",
2089
- __name: "index",
2090
- props: {
2091
- config: {
2092
- type: Object,
2093
- default: () => {
2094
- }
2095
- },
2096
- data: {
2097
- type: Array,
2098
- default: () => []
2099
- },
2100
- pagination: {
2101
- type: Object
2102
- }
2103
- },
2104
- emits: [
2105
- "ActionClick",
2106
- "PageChange",
2107
- "Refresh",
2108
- "FilterSearch",
2109
- "SortChange",
2110
- "ActionRenderBefore",
2111
- "PickPeople",
2112
- "FileClick",
2113
- "RemoteMethod"
2114
- ],
2115
- setup(r, { expose: e, emit: t }) {
2116
- const o = r, n = reactive(o.config), {
2117
- CheckboxRender: c,
2118
- ColorPickerRender: l,
2119
- IconPickerRender: a,
2120
- RadioRender: s,
2121
- ProgressRender: m,
2122
- ActionRender: u,
2123
- SelectRender: i,
2124
- TreeSelectRender: d,
2125
- SelectMultipleRender: p,
2126
- TreeMultipleSelectRender: v,
2127
- ChooseFrameRender: g,
2128
- PickPeopleRender: w,
2129
- FileRender: y,
2130
- CustomRender: k,
2131
- DatePickerRender: x,
2132
- LabelRender: j
2133
- } = comps$1, {
2134
- InputEditor: C,
2135
- TreeSelectEditor: E,
2136
- SelectEditor: R,
2137
- TextareaEditor: O,
2138
- DatePickerEditor: T,
2139
- SelectMultipleEditor: M,
2140
- TreeMultipleSelectEditor: I,
2141
- InputNumberEditor: z,
2142
- SelectRemoteEditor: A
2143
- } = comps, b = ref(), U = computed(() => ((o.pagination.Page || 1) - 1) * (o.pagination.PageSize || 1e3)), N = computed(() => {
2144
- var V;
2145
- if (n.Number) {
2146
- if (!n.columns.find((_) => _.type == "seq")) {
2147
- let _ = n.columns.find((F) => ["left", "right"].includes(F.fixed)), S = {
2148
- slots: {},
2149
- params: {},
2150
- type: "seq",
2151
- title: "序号",
2152
- align: "center",
2153
- width: 50
2154
- };
2155
- _ && (S.fixed = "left"), n.columns.unshift(S);
2156
- }
2157
- } else {
2158
- let f = o.config.columns.findIndex((_) => _.type == "seq");
2159
- f != -1 && o.config.columns.splice(f, 1);
2160
- }
2161
- if (o.config.AutoFullWidth) {
2162
- const _ = D(o.config.columns || []).filter(($) => !$.children), S = _.reduce(($, P) => {
2163
- let Y = Number(P.width);
2164
- return $ + (isNaN(Y) ? 100 : Y);
2165
- }, 0), F = b.value.$el.clientWidth;
2166
- S != F && _.forEach(($) => {
2167
- let P = Number($.width);
2168
- $.width = Number(((isNaN(P) ? 100 : P) * (F / S)).toFixed(0));
2169
- });
2170
- }
2171
- let h = {
2172
- keepSource: !0,
2173
- showOverflow: "title",
2174
- seqConfig: {
2175
- seqMethod: (f) => U.value + f.$rowIndex + 1
2176
- },
2177
- exportConfig: {},
2178
- importConfig: {},
2179
- printConfig: {},
2180
- columns: [],
2181
- ...o.config,
2182
- data: [...o.data],
2183
- editConfig: {
2184
- trigger: "click",
2185
- mode: "cell",
2186
- showStatus: !0,
2187
- // 只对 keep-source 开启有效,是否显示单元格新增与修改状态
2188
- showIcon: !1,
2189
- // 因为对过滤行进行了修改 该属性必须为false
2190
- ...(V = o.config) == null ? void 0 : V.editConfig
2191
- }
2192
- };
2193
- return n.BodyMenu && (h.menuConfig = {
2194
- body: {
2195
- options: [
2196
- [
2197
- { type: "print", name: "打印", prefixConfig: { icon: "vxe-icon-print" } },
2198
- { type: "export", name: "导出当前页", prefixConfig: { icon: "vxe-icon-send" } },
2199
- { type: "myBtn2", name: "导出全部", prefixConfig: { icon: "vxe-icon-send-fill" } }
2200
- ]
2201
- ]
2202
- }
2203
- }), h;
2204
- }), B = t;
2205
- e({
2206
- gridRef: b,
2207
- gridOptions: N
2208
- }), JSON.parse(JSON.stringify(o.config.columns)), watch(o.config.columns, (h) => {
2209
- var V;
2210
- (V = b.value) == null || V.loadColumn(h), JSON.parse(JSON.stringify(h));
2211
- });
2212
- function D(h, V = "children", f = []) {
2213
- return h.forEach((_) => {
2214
- f.push(_), _[V] && _[V].length > 0 && D(_[V], V, f);
2215
- }), f;
2216
- }
2217
- function L(...h) {
2218
- B("PickPeople", ...h);
2219
- }
2220
- const H = ({ menu: h }) => {
2221
- var V, f;
2222
- h.type == "print" ? (V = b.value) == null || V.openPrint() : h.type == "export" && ((f = b.value) == null || f.openExport());
2223
- };
2224
- function q(h) {
2225
- B("ActionClick", h);
2226
- }
2227
- function W(...h) {
2228
- B("PageChange", ...h);
2229
- }
2230
- function J(...h) {
2231
- B("Refresh", ...h);
2232
- }
2233
- function K(...h) {
2234
- B("FilterSearch", ...h);
2235
- }
2236
- function G(...h) {
2237
- B("SortChange", ...h);
2238
- }
2239
- function Q(...h) {
2240
- B("ActionRenderBefore", ...h);
2241
- }
2242
- function X(...h) {
2243
- B("FileClick", ...h);
2244
- }
2245
- function Z(...h) {
2246
- B("RemoteMethod", ...h);
2247
- }
2248
- return (h, V) => (openBlock(), createElementBlock("div", _hoisted_1, [
2249
- createVNode(unref(VxeGrid), mergeProps({
2250
- class: "grid-table",
2251
- ref_key: "gridRef",
2252
- ref: b
2253
- }, { ...N.value, ...h.$attrs }, { onMenuClick: H }), {
2254
- FilterRows: withCtx(({ column: f }) => [
2255
- createVNode(_sfc_main$r, {
2256
- column: f,
2257
- "grid-ref": b.value,
2258
- onFilterSearch: K,
2259
- onSortChange: G
2260
- }, null, 8, ["column", "grid-ref"])
2261
- ]),
2262
- ActionRender: withCtx(({ row: f, column: _ }) => [
2263
- createVNode(unref(u), {
2264
- row: f,
2265
- column: _,
2266
- "grid-ref": b.value,
2267
- onActionClick: q,
2268
- onActionRenderBefore: Q
2269
- }, null, 8, ["row", "column", "grid-ref"])
2270
- ]),
2271
- RadioRender: withCtx(({ row: f, column: _ }) => [
2272
- createVNode(unref(s), {
2273
- row: f,
2274
- column: _,
2275
- "grid-ref": b.value
2276
- }, null, 8, ["row", "column", "grid-ref"])
2277
- ]),
2278
- CheckboxRender: withCtx(({ row: f, column: _ }) => [
2279
- createVNode(unref(c), {
2280
- row: f,
2281
- column: _,
2282
- "grid-ref": b.value
2283
- }, null, 8, ["row", "column", "grid-ref"])
2284
- ]),
2285
- ColorPickerRender: withCtx(({ row: f, column: _ }) => [
2286
- createVNode(unref(l), {
2287
- row: f,
2288
- column: _,
2289
- "grid-ref": b.value
2290
- }, null, 8, ["row", "column", "grid-ref"])
2291
- ]),
2292
- IconPickerRender: withCtx(({ row: f, column: _ }) => [
2293
- createVNode(unref(a), {
2294
- row: f,
2295
- column: _,
2296
- "grid-ref": b.value
2297
- }, null, 8, ["row", "column", "grid-ref"])
2298
- ]),
2299
- ProgressRender: withCtx(({ row: f, column: _ }) => [
2300
- createVNode(unref(m), {
2301
- row: f,
2302
- column: _,
2303
- "grid-ref": b.value
2304
- }, null, 8, ["row", "column", "grid-ref"])
2305
- ]),
2306
- SelectRender: withCtx(({ row: f, column: _ }) => [
2307
- createVNode(unref(i), {
2308
- row: f,
2309
- column: _,
2310
- "grid-ref": b.value
2311
- }, null, 8, ["row", "column", "grid-ref"])
2312
- ]),
2313
- SelectMultipleRender: withCtx(({ row: f, column: _ }) => [
2314
- createVNode(unref(p), {
2315
- row: f,
2316
- column: _,
2317
- "grid-ref": b.value
2318
- }, null, 8, ["row", "column", "grid-ref"])
2319
- ]),
2320
- TreeSelectRender: withCtx(({ row: f, column: _ }) => [
2321
- createVNode(unref(d), {
2322
- row: f,
2323
- column: _,
2324
- "grid-ref": b.value
2325
- }, null, 8, ["row", "column", "grid-ref"])
2326
- ]),
2327
- TreeMultipleSelectRender: withCtx(({ row: f, column: _ }) => [
2328
- createVNode(unref(v), {
2329
- row: f,
2330
- column: _,
2331
- "grid-ref": b.value
2332
- }, null, 8, ["row", "column", "grid-ref"])
2333
- ]),
2334
- ChooseFrameRender: withCtx(({ row: f, column: _ }) => [
2335
- createVNode(unref(g), {
2336
- row: f,
2337
- column: _,
2338
- "grid-ref": b.value
2339
- }, null, 8, ["row", "column", "grid-ref"])
2340
- ]),
2341
- PickPeopleRender: withCtx(({ row: f, column: _ }) => [
2342
- createVNode(unref(w), {
2343
- row: f,
2344
- column: _,
2345
- "grid-ref": b.value,
2346
- onChange: L
2347
- }, null, 8, ["row", "column", "grid-ref"])
2348
- ]),
2349
- FileRender: withCtx(({ row: f, column: _ }) => [
2350
- createVNode(unref(y), {
2351
- row: f,
2352
- column: _,
2353
- "grid-ref": b.value,
2354
- onFileClick: X
2355
- }, null, 8, ["row", "column", "grid-ref"])
2356
- ]),
2357
- CustomRender: withCtx(({ row: f, column: _ }) => [
2358
- createVNode(unref(k), {
2359
- row: f,
2360
- column: _,
2361
- "grid-ref": b.value
2362
- }, null, 8, ["row", "column", "grid-ref"])
2363
- ]),
2364
- DatePickerRender: withCtx(({ row: f, column: _ }) => [
2365
- createVNode(unref(x), {
2366
- row: f,
2367
- column: _,
2368
- "grid-ref": b.value
2369
- }, null, 8, ["row", "column", "grid-ref"])
2370
- ]),
2371
- LabelRender: withCtx(({ row: f, column: _ }) => [
2372
- createVNode(unref(j), {
2373
- row: f,
2374
- column: _,
2375
- "grid-ref": b.value
2376
- }, null, 8, ["row", "column", "grid-ref"])
2377
- ]),
2378
- InputEditor: withCtx(({ row: f, column: _ }) => [
2379
- createVNode(unref(C), {
2380
- row: f,
2381
- column: _,
2382
- "grid-ref": b.value
2383
- }, null, 8, ["row", "column", "grid-ref"])
2384
- ]),
2385
- TextareaEditor: withCtx(({ row: f, column: _ }) => [
2386
- createVNode(unref(O), {
2387
- row: f,
2388
- column: _,
2389
- "grid-ref": b.value
2390
- }, null, 8, ["row", "column", "grid-ref"])
2391
- ]),
2392
- SelectEditor: withCtx(({ row: f, column: _ }) => [
2393
- createVNode(unref(R), {
2394
- row: f,
2395
- column: _,
2396
- "grid-ref": b.value
2397
- }, null, 8, ["row", "column", "grid-ref"])
2398
- ]),
2399
- SelectMultipleEditor: withCtx(({ row: f, column: _ }) => [
2400
- createVNode(unref(M), {
2401
- row: f,
2402
- column: _,
2403
- "grid-ref": b.value
2404
- }, null, 8, ["row", "column", "grid-ref"])
2405
- ]),
2406
- TreeSelectEditor: withCtx(({ row: f, column: _ }) => [
2407
- createVNode(unref(E), {
2408
- row: f,
2409
- column: _,
2410
- "grid-ref": b.value
2411
- }, null, 8, ["row", "column", "grid-ref"])
2412
- ]),
2413
- TreeMultipleSelectEditor: withCtx(({ row: f, column: _ }) => [
2414
- createVNode(unref(I), {
2415
- row: f,
2416
- column: _,
2417
- "grid-ref": b.value
2418
- }, null, 8, ["row", "column", "grid-ref"])
2419
- ]),
2420
- DatePickerEditor: withCtx(({ row: f, column: _ }) => [
2421
- createVNode(unref(T), {
2422
- row: f,
2423
- column: _,
2424
- "grid-ref": b.value
2425
- }, null, 8, ["row", "column", "grid-ref"])
2426
- ]),
2427
- InputNumberEditor: withCtx(({ row: f, column: _ }) => [
2428
- createVNode(unref(z), {
2429
- row: f,
2430
- column: _,
2431
- "grid-ref": b.value
2432
- }, null, 8, ["row", "column", "grid-ref"])
2433
- ]),
2434
- SelectRemoteEditor: withCtx(({ row: f, column: _ }) => [
2435
- createVNode(unref(A), {
2436
- row: f,
2437
- column: _,
2438
- "grid-ref": b.value,
2439
- onRemoteMethod: Z
2440
- }, null, 8, ["row", "column", "grid-ref"])
2441
- ]),
2442
- pager: withCtx(() => [
2443
- createVNode(_sfc_main$1, {
2444
- pagination: r.pagination,
2445
- gridOptions: N.value,
2446
- onPageChange: W,
2447
- onRefresh: J
2448
- }, null, 8, ["pagination", "gridOptions"])
2449
- ]),
2450
- _: 1
2451
- }, 16)
2452
- ]));
2453
- }
2454
- }), Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d15b6949"]]);
2455
- VxeUI.setConfig({
2456
- size: "small",
2457
- table: {
2458
- headerAlign: "center",
2459
- stripe: !0,
2460
- border: !0,
2461
- rowConfig: {
2462
- keyField: "_id",
2463
- // 行数据的唯一主键字段名
2464
- isCurrent: !0,
2465
- isHover: !0,
2466
- height: 29
2467
- },
2468
- columnConfig: {
2469
- resizable: !0,
2470
- minWidth: 100
2471
- },
2472
- filterConfig: {
2473
- showIcon: !1
2474
- // 过滤行显示图标
2475
- }
2476
- // tooltipConfig: {
2477
- // showAll: true
2478
- // },
2479
- }
2480
- });
2481
- const HrTable = withInstall(Table);
2482
- export {
2483
- HrTable as H
2484
- };