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