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