gzhr-ui 1.1.19 → 1.1.21
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/index.mjs +1 -1
- package/dist/es/{table-h0HDoWcM.mjs → table-i6vL_Mxt.mjs} +747 -721
- package/dist/index.css +1 -1
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.js +18 -18
- package/package.json +1 -1
|
@@ -13,27 +13,27 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
13
13
|
},
|
|
14
14
|
emits: ["FilterSearch"],
|
|
15
15
|
setup(n, { emit: t }) {
|
|
16
|
-
const e = n, r = t, a = ref(""), o = ref(""), l = ref(!1), i = ref(),
|
|
17
|
-
var
|
|
18
|
-
const s = ((
|
|
16
|
+
const e = n, r = t, a = ref(""), o = ref(""), l = ref(!1), i = ref(), m = ref(), c = ref(), u = computed(() => {
|
|
17
|
+
var f, b;
|
|
18
|
+
const s = ((b = (f = e.column.filters) == null ? void 0 : f[0]) == null ? void 0 : b.data) || [];
|
|
19
19
|
return Array.isArray(s) && s.length === 2 && s[0] && s[1] ? `${s[0]} 至 ${s[1]}` : "";
|
|
20
20
|
});
|
|
21
21
|
onMounted(() => {
|
|
22
|
-
var
|
|
23
|
-
const s = ((
|
|
24
|
-
Array.isArray(s) && s.length === 2 && (a.value = s[0] || "", o.value = s[1] || ""), document.addEventListener("click",
|
|
22
|
+
var f, b;
|
|
23
|
+
const s = ((b = (f = e.column.filters) == null ? void 0 : f[0]) == null ? void 0 : b.data) || [];
|
|
24
|
+
Array.isArray(s) && s.length === 2 && (a.value = s[0] || "", o.value = s[1] || ""), document.addEventListener("click", d);
|
|
25
25
|
}), onBeforeUnmount(() => {
|
|
26
|
-
document.removeEventListener("click",
|
|
26
|
+
document.removeEventListener("click", d);
|
|
27
27
|
});
|
|
28
|
-
const
|
|
28
|
+
const _ = () => {
|
|
29
29
|
l.value = !l.value;
|
|
30
|
-
},
|
|
31
|
-
var
|
|
30
|
+
}, d = (s) => {
|
|
31
|
+
var V, D;
|
|
32
32
|
if (!l.value) return;
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
const f = s.target, b = c.value, C = (D = (V = m.value) == null ? void 0 : V.popperRef) == null ? void 0 : D.contentRef;
|
|
34
|
+
b && b.contains(f) || C && C.contains(f) || (l.value = !1);
|
|
35
35
|
};
|
|
36
|
-
function
|
|
36
|
+
function k() {
|
|
37
37
|
if (!a.value && !o.value)
|
|
38
38
|
e.column.filters[0].data = [];
|
|
39
39
|
else if (!a.value || !o.value) {
|
|
@@ -43,10 +43,10 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
43
43
|
e.column.filters[0].data = [a.value, o.value];
|
|
44
44
|
l.value = !1, r("FilterSearch", e.column);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function p() {
|
|
47
47
|
a.value = "", o.value = "", e.column.filters[0].data = [];
|
|
48
48
|
}
|
|
49
|
-
return (s,
|
|
49
|
+
return (s, f) => (openBlock(), createElementBlock("div", {
|
|
50
50
|
class: "size-full",
|
|
51
51
|
title: u.value,
|
|
52
52
|
ref_key: "wrapperRef",
|
|
@@ -57,16 +57,16 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
57
57
|
ref: i,
|
|
58
58
|
value: u.value,
|
|
59
59
|
readonly: "",
|
|
60
|
-
onClick:
|
|
60
|
+
onClick: _
|
|
61
61
|
}, null, 8, ["value"]),
|
|
62
62
|
createVNode(unref(ElPopover), {
|
|
63
63
|
ref_key: "popoverRef",
|
|
64
|
-
ref:
|
|
64
|
+
ref: m,
|
|
65
65
|
"virtual-ref": i.value,
|
|
66
66
|
"virtual-triggering": "",
|
|
67
67
|
trigger: "manual",
|
|
68
68
|
visible: l.value,
|
|
69
|
-
"onUpdate:visible":
|
|
69
|
+
"onUpdate:visible": f[2] || (f[2] = (b) => l.value = b),
|
|
70
70
|
"hide-after": 0,
|
|
71
71
|
width: "140",
|
|
72
72
|
"popper-class": "date-filter-popper"
|
|
@@ -75,7 +75,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
75
75
|
createElementVNode("div", _hoisted_2$7, [
|
|
76
76
|
createVNode(unref(ElDatePicker), {
|
|
77
77
|
modelValue: a.value,
|
|
78
|
-
"onUpdate:modelValue":
|
|
78
|
+
"onUpdate:modelValue": f[0] || (f[0] = (b) => a.value = b),
|
|
79
79
|
type: "date",
|
|
80
80
|
"value-format": "YYYY-MM-DD",
|
|
81
81
|
placeholder: "开始日期",
|
|
@@ -85,7 +85,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
85
85
|
}, null, 8, ["modelValue"]),
|
|
86
86
|
createVNode(unref(ElDatePicker), {
|
|
87
87
|
modelValue: o.value,
|
|
88
|
-
"onUpdate:modelValue":
|
|
88
|
+
"onUpdate:modelValue": f[1] || (f[1] = (b) => o.value = b),
|
|
89
89
|
type: "date",
|
|
90
90
|
"value-format": "YYYY-MM-DD",
|
|
91
91
|
placeholder: "结束日期",
|
|
@@ -98,9 +98,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
98
98
|
size: "small",
|
|
99
99
|
type: "primary",
|
|
100
100
|
class: "btn-confirm",
|
|
101
|
-
onClick:
|
|
101
|
+
onClick: k
|
|
102
102
|
}, {
|
|
103
|
-
default: withCtx(() =>
|
|
103
|
+
default: withCtx(() => f[3] || (f[3] = [
|
|
104
104
|
createTextVNode(" 确认 ")
|
|
105
105
|
])),
|
|
106
106
|
_: 1
|
|
@@ -108,9 +108,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
108
108
|
createVNode(unref(ElButton), {
|
|
109
109
|
size: "small",
|
|
110
110
|
class: "btn-reset",
|
|
111
|
-
onClick:
|
|
111
|
+
onClick: p
|
|
112
112
|
}, {
|
|
113
|
-
default: withCtx(() =>
|
|
113
|
+
default: withCtx(() => f[4] || (f[4] = [
|
|
114
114
|
createTextVNode(" 重置 ")
|
|
115
115
|
])),
|
|
116
116
|
_: 1
|
|
@@ -133,13 +133,13 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
133
133
|
emits: ["FilterSearch"],
|
|
134
134
|
setup(n, { emit: t }) {
|
|
135
135
|
const e = n, r = ref([]), a = computed(() => e.column.filters[0].data.length ? e.column.filters[0].data.map((u) => u ? "是" : "否").join(",") : ""), o = ref(), l = ref(), i = () => {
|
|
136
|
-
var u,
|
|
137
|
-
(
|
|
138
|
-
},
|
|
136
|
+
var u, _;
|
|
137
|
+
(_ = (u = unref(l).popperRef) == null ? void 0 : u.delayHide) == null || _.call(u);
|
|
138
|
+
}, m = t;
|
|
139
139
|
function c() {
|
|
140
140
|
r.value.length ? e.column.filters[0].data = [...r.value] : e.column.filters[0].data = [];
|
|
141
141
|
}
|
|
142
|
-
return (u,
|
|
142
|
+
return (u, _) => (openBlock(), createElementBlock("div", {
|
|
143
143
|
class: "size-full",
|
|
144
144
|
title: a.value
|
|
145
145
|
}, [
|
|
@@ -148,7 +148,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
148
148
|
ref: o,
|
|
149
149
|
value: a.value,
|
|
150
150
|
readonly: "",
|
|
151
|
-
onKeyup:
|
|
151
|
+
onKeyup: _[0] || (_[0] = withKeys((d) => m("FilterSearch", n.column), ["enter"]))
|
|
152
152
|
}, null, 8, ["value"]), [
|
|
153
153
|
[unref(ClickOutside), i]
|
|
154
154
|
]),
|
|
@@ -164,7 +164,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
164
164
|
createVNode(unref(ElCheckboxGroup), {
|
|
165
165
|
class: "flex flex-col",
|
|
166
166
|
modelValue: r.value,
|
|
167
|
-
"onUpdate:modelValue":
|
|
167
|
+
"onUpdate:modelValue": _[1] || (_[1] = (d) => r.value = d),
|
|
168
168
|
onChange: c
|
|
169
169
|
}, {
|
|
170
170
|
default: withCtx(() => [
|
|
@@ -197,16 +197,16 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
197
197
|
const e = n, r = ref([]);
|
|
198
198
|
ref("");
|
|
199
199
|
const a = computed(() => e.column.filters && e.column.filters[0].data.length ? e.column.filters[0].data.map((u) => {
|
|
200
|
-
var
|
|
201
|
-
return (
|
|
200
|
+
var _;
|
|
201
|
+
return (_ = e.column.params.options.find((d) => d.value === u)) == null ? void 0 : _.label;
|
|
202
202
|
}).join(",") : ""), o = ref(), l = ref(), i = () => {
|
|
203
|
-
var u,
|
|
204
|
-
(
|
|
205
|
-
},
|
|
203
|
+
var u, _;
|
|
204
|
+
(_ = (u = unref(l).popperRef) == null ? void 0 : u.delayHide) == null || _.call(u);
|
|
205
|
+
}, m = t;
|
|
206
206
|
function c() {
|
|
207
207
|
r.value.length ? e.column.filters[0].data = [...r.value] : e.column.filters[0].data = [];
|
|
208
208
|
}
|
|
209
|
-
return (u,
|
|
209
|
+
return (u, _) => (openBlock(), createElementBlock("div", {
|
|
210
210
|
class: "size-full",
|
|
211
211
|
title: a.value
|
|
212
212
|
}, [
|
|
@@ -215,7 +215,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
215
215
|
ref: o,
|
|
216
216
|
value: a.value,
|
|
217
217
|
readonly: "",
|
|
218
|
-
onKeyup:
|
|
218
|
+
onKeyup: _[0] || (_[0] = withKeys((d) => m("FilterSearch", n.column), ["enter"]))
|
|
219
219
|
}, null, 8, ["value"]), [
|
|
220
220
|
[unref(ClickOutside), i]
|
|
221
221
|
]),
|
|
@@ -232,14 +232,14 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
232
232
|
key: 0,
|
|
233
233
|
class: "flex flex-col",
|
|
234
234
|
modelValue: r.value,
|
|
235
|
-
"onUpdate:modelValue":
|
|
235
|
+
"onUpdate:modelValue": _[1] || (_[1] = (d) => r.value = d),
|
|
236
236
|
onChange: c
|
|
237
237
|
}, {
|
|
238
238
|
default: withCtx(() => [
|
|
239
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.column.params.options, (
|
|
240
|
-
key:
|
|
241
|
-
label:
|
|
242
|
-
value:
|
|
239
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.column.params.options, (d) => (openBlock(), createBlock(unref(ElCheckbox), {
|
|
240
|
+
key: d.value,
|
|
241
|
+
label: d.label,
|
|
242
|
+
value: d.value
|
|
243
243
|
}, null, 8, ["label", "value"]))), 128))
|
|
244
244
|
]),
|
|
245
245
|
_: 1
|
|
@@ -248,14 +248,14 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
248
248
|
key: 1,
|
|
249
249
|
class: "flex flex-col",
|
|
250
250
|
modelValue: r.value,
|
|
251
|
-
"onUpdate:modelValue":
|
|
251
|
+
"onUpdate:modelValue": _[2] || (_[2] = (d) => r.value = d),
|
|
252
252
|
onChange: c
|
|
253
253
|
}, {
|
|
254
254
|
default: withCtx(() => [
|
|
255
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.column.params.options, (
|
|
256
|
-
key:
|
|
257
|
-
label:
|
|
258
|
-
value:
|
|
255
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.column.params.options, (d) => (openBlock(), createBlock(unref(ElCheckbox), {
|
|
256
|
+
key: d.value,
|
|
257
|
+
label: d.label,
|
|
258
|
+
value: d.value
|
|
259
259
|
}, null, 8, ["label", "value"]))), 128))
|
|
260
260
|
]),
|
|
261
261
|
_: 1
|
|
@@ -281,28 +281,28 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
281
281
|
children: "children"
|
|
282
282
|
});
|
|
283
283
|
if (!e.column.params.TreeData) {
|
|
284
|
-
const { options: c, ParentNodeField: u, NodeKeyField:
|
|
285
|
-
e.column.params.TreeData = buildTree(deepClone(c), u,
|
|
284
|
+
const { options: c, ParentNodeField: u, NodeKeyField: _ } = e.column.params;
|
|
285
|
+
e.column.params.TreeData = buildTree(deepClone(c), u, _);
|
|
286
286
|
}
|
|
287
287
|
onMounted(() => {
|
|
288
288
|
r.value = e.column.params.TreeData;
|
|
289
289
|
});
|
|
290
290
|
const i = t;
|
|
291
|
-
function
|
|
291
|
+
function m() {
|
|
292
292
|
a.value ? e.column.filters[0].data = [a.value] : e.column.filters[0].data = [];
|
|
293
293
|
}
|
|
294
294
|
return (c, u) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
295
295
|
clearable: "",
|
|
296
296
|
modelValue: a.value,
|
|
297
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
297
|
+
"onUpdate:modelValue": u[0] || (u[0] = (_) => a.value = _),
|
|
298
298
|
data: r.value,
|
|
299
299
|
"render-after-expand": !1,
|
|
300
300
|
placeholder: "",
|
|
301
|
-
onChange:
|
|
301
|
+
onChange: m,
|
|
302
302
|
multiple: o.value,
|
|
303
303
|
"show-checkbox": o.value,
|
|
304
304
|
props: l.value,
|
|
305
|
-
onKeyup: u[1] || (u[1] = withKeys((
|
|
305
|
+
onKeyup: u[1] || (u[1] = withKeys((_) => i("FilterSearch", n.column), ["enter"]))
|
|
306
306
|
}, null, 8, ["modelValue", "data", "multiple", "show-checkbox", "props"]));
|
|
307
307
|
}
|
|
308
308
|
}, _sfc_main$v = {
|
|
@@ -321,8 +321,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
321
321
|
children: "children"
|
|
322
322
|
});
|
|
323
323
|
if (!e.column.params.TreeData) {
|
|
324
|
-
const { options: c, ParentNodeField: u, NodeKeyField:
|
|
325
|
-
e.column.params.TreeData = buildTree(deepClone(c), u,
|
|
324
|
+
const { options: c, ParentNodeField: u, NodeKeyField: _ } = e.column.params;
|
|
325
|
+
e.column.params.TreeData = buildTree(deepClone(c), u, _);
|
|
326
326
|
}
|
|
327
327
|
onMounted(() => {
|
|
328
328
|
r.value = e.column.params.TreeData;
|
|
@@ -331,14 +331,14 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
331
331
|
function i() {
|
|
332
332
|
a.value ? e.column.filters[0].data = a.value : e.column.filters[0].data = [];
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function m(c) {
|
|
335
335
|
cleanUpTreeFilterRows(), l("FilterSearch", e.column);
|
|
336
336
|
}
|
|
337
337
|
return (c, u) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
338
338
|
"popper-class": "tree-filter-row",
|
|
339
339
|
clearable: "",
|
|
340
340
|
modelValue: a.value,
|
|
341
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
341
|
+
"onUpdate:modelValue": u[0] || (u[0] = (_) => a.value = _),
|
|
342
342
|
data: r.value,
|
|
343
343
|
placeholder: "",
|
|
344
344
|
onChange: i,
|
|
@@ -346,7 +346,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
346
346
|
"show-checkbox": "",
|
|
347
347
|
"collapse-tags": "",
|
|
348
348
|
"collapse-tags-tooltip": "",
|
|
349
|
-
onKeyup: withKeys(
|
|
349
|
+
onKeyup: withKeys(m, ["enter"]),
|
|
350
350
|
props: o.value
|
|
351
351
|
}, null, 8, ["modelValue", "data", "props"]));
|
|
352
352
|
}
|
|
@@ -361,9 +361,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
361
361
|
emits: ["FilterSearch"],
|
|
362
362
|
setup(n, { emit: t }) {
|
|
363
363
|
const e = n, r = ref([null, null]), a = computed(() => e.column.filters && e.column.filters[0].data.length ? e.column.filters[0].data.join(" 至 ") : ""), o = ref(), l = ref(), i = () => {
|
|
364
|
-
var
|
|
365
|
-
(
|
|
366
|
-
},
|
|
364
|
+
var _, d;
|
|
365
|
+
(d = (_ = unref(l).popperRef) == null ? void 0 : _.delayHide) == null || d.call(_);
|
|
366
|
+
}, m = t;
|
|
367
367
|
function c() {
|
|
368
368
|
if (!r.value[0] && !r.value[1])
|
|
369
369
|
e.column.filters[0].data = [];
|
|
@@ -372,12 +372,12 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
372
372
|
return;
|
|
373
373
|
} else
|
|
374
374
|
e.column.filters[0].data = [...r.value];
|
|
375
|
-
l.value.hide(),
|
|
375
|
+
l.value.hide(), m("FilterSearch", e.column);
|
|
376
376
|
}
|
|
377
377
|
function u() {
|
|
378
378
|
r.value = [null, null];
|
|
379
379
|
}
|
|
380
|
-
return (
|
|
380
|
+
return (_, d) => (openBlock(), createElementBlock("div", {
|
|
381
381
|
class: "size-full",
|
|
382
382
|
title: a.value
|
|
383
383
|
}, [
|
|
@@ -386,7 +386,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
386
386
|
ref: o,
|
|
387
387
|
value: a.value,
|
|
388
388
|
readonly: "",
|
|
389
|
-
onKeyup:
|
|
389
|
+
onKeyup: d[0] || (d[0] = withKeys((k) => m("FilterSearch", n.column), ["enter"]))
|
|
390
390
|
}, null, 8, ["value"]), [
|
|
391
391
|
[unref(ClickOutside), i]
|
|
392
392
|
]),
|
|
@@ -403,12 +403,12 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
403
403
|
createVNode(unref(ElInputNumber), {
|
|
404
404
|
class: "w-full",
|
|
405
405
|
modelValue: r.value[0],
|
|
406
|
-
"onUpdate:modelValue":
|
|
406
|
+
"onUpdate:modelValue": d[1] || (d[1] = (k) => r.value[0] = k)
|
|
407
407
|
}, null, 8, ["modelValue"]),
|
|
408
408
|
createVNode(unref(ElInputNumber), {
|
|
409
409
|
class: "w-full",
|
|
410
410
|
modelValue: r.value[1],
|
|
411
|
-
"onUpdate:modelValue":
|
|
411
|
+
"onUpdate:modelValue": d[2] || (d[2] = (k) => r.value[1] = k)
|
|
412
412
|
}, null, 8, ["modelValue"])
|
|
413
413
|
]),
|
|
414
414
|
createElementVNode("div", _hoisted_3$4, [
|
|
@@ -417,7 +417,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
417
417
|
type: "primary",
|
|
418
418
|
onClick: c
|
|
419
419
|
}, {
|
|
420
|
-
default: withCtx(() =>
|
|
420
|
+
default: withCtx(() => d[3] || (d[3] = [
|
|
421
421
|
createTextVNode("确认")
|
|
422
422
|
])),
|
|
423
423
|
_: 1
|
|
@@ -426,7 +426,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
426
426
|
size: "small",
|
|
427
427
|
onClick: u
|
|
428
428
|
}, {
|
|
429
|
-
default: withCtx(() =>
|
|
429
|
+
default: withCtx(() => d[4] || (d[4] = [
|
|
430
430
|
createTextVNode("重置")
|
|
431
431
|
])),
|
|
432
432
|
_: 1
|
|
@@ -458,8 +458,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
458
458
|
let a = ref(0);
|
|
459
459
|
onMounted(() => {
|
|
460
460
|
if (e.column.params.filter) {
|
|
461
|
-
const
|
|
462
|
-
useElementClientSize(
|
|
461
|
+
const m = document.querySelector(`[colid=${e.column.id}]`);
|
|
462
|
+
useElementClientSize(m, ({ clientHeight: c }) => {
|
|
463
463
|
a.value = c <= 40 ? 65 : c;
|
|
464
464
|
});
|
|
465
465
|
} else
|
|
@@ -467,31 +467,31 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
467
467
|
r.value = e.column.params.TreeData;
|
|
468
468
|
});
|
|
469
469
|
const o = t;
|
|
470
|
-
function l(
|
|
471
|
-
if (
|
|
470
|
+
function l(m) {
|
|
471
|
+
if (m === "search") {
|
|
472
472
|
const c = e.gridRef.getColumns();
|
|
473
473
|
o("FilterSearch", e.column, c);
|
|
474
|
-
} else if (
|
|
474
|
+
} else if (m === "clear") {
|
|
475
475
|
e.column.filters.forEach((u) => {
|
|
476
476
|
Array.isArray(u.data) ? u.data = [] : u.data = "";
|
|
477
477
|
});
|
|
478
478
|
const c = e.gridRef.getColumns();
|
|
479
479
|
o("FilterSearch", e.column, c);
|
|
480
|
-
} else if (
|
|
480
|
+
} else if (m === "clearAll") {
|
|
481
481
|
const c = e.gridRef.getColumns();
|
|
482
482
|
c.forEach((u) => {
|
|
483
|
-
u.filters && u.filters.forEach((
|
|
484
|
-
Array.isArray(
|
|
483
|
+
u.filters && u.filters.forEach((_) => {
|
|
484
|
+
Array.isArray(_.data) ? _.data = [] : _.data = "";
|
|
485
485
|
});
|
|
486
486
|
}), o("FilterSearch", e.column, c);
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
function i() {
|
|
490
|
-
var
|
|
491
|
-
(
|
|
490
|
+
var m, c;
|
|
491
|
+
(m = e.column.params) != null && m.IsVirtualField || ((c = e.column).params ?? (c.params = {}), e.column.params.sortStatus === "asc" ? e.column.params.sortStatus = "desc" : e.column.params.sortStatus === "desc" ? e.column.params.sortStatus = null : e.column.params.sortStatus = "asc", o("SortChange", e.column, e.gridRef.getColumns()));
|
|
492
492
|
}
|
|
493
|
-
return (
|
|
494
|
-
var u,
|
|
493
|
+
return (m, c) => {
|
|
494
|
+
var u, _, d;
|
|
495
495
|
return openBlock(), createElementBlock("div", {
|
|
496
496
|
class: "flex flex-col filter-header",
|
|
497
497
|
title: n.column.title,
|
|
@@ -505,14 +505,14 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
505
505
|
style: normalizeStyle({ color: n.column.params.Required ? "red" : "" }),
|
|
506
506
|
class: "whitespace-nowrap overflow-hidden text-ellipsis"
|
|
507
507
|
}, toDisplayString(n.column.title), 5),
|
|
508
|
-
(
|
|
508
|
+
(_ = n.column.params) != null && _.sortable && ((d = n.column.params) != null && d.sortStatus) ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
|
509
509
|
default: withCtx(() => {
|
|
510
|
-
var
|
|
510
|
+
var k, p;
|
|
511
511
|
return [
|
|
512
|
-
((
|
|
512
|
+
((k = n.column.params) == null ? void 0 : k.sortStatus) === "asc" ? (openBlock(), createBlock(unref(HrIcon), {
|
|
513
513
|
key: 0,
|
|
514
514
|
icon: "ep:caret-top"
|
|
515
|
-
})) : ((
|
|
515
|
+
})) : ((p = n.column.params) == null ? void 0 : p.sortStatus) === "desc" ? (openBlock(), createBlock(unref(HrIcon), {
|
|
516
516
|
key: 1,
|
|
517
517
|
icon: "ep:caret-bottom"
|
|
518
518
|
})) : createCommentVNode("", !0)
|
|
@@ -525,31 +525,31 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
525
525
|
["radio_Table", "bool"].includes(n.column.params.FieldType) ? (openBlock(), createBlock(_sfc_main$y, {
|
|
526
526
|
key: 0,
|
|
527
527
|
column: n.column,
|
|
528
|
-
onFilterSearch: c[0] || (c[0] = (
|
|
528
|
+
onFilterSearch: c[0] || (c[0] = (k) => l("search"))
|
|
529
529
|
}, null, 8, ["column"])) : ["select", "check"].includes(n.column.params.FieldType) ? (openBlock(), createBlock(_sfc_main$x, {
|
|
530
530
|
key: 1,
|
|
531
531
|
column: n.column,
|
|
532
|
-
onFilterSearch: c[1] || (c[1] = (
|
|
532
|
+
onFilterSearch: c[1] || (c[1] = (k) => l("search"))
|
|
533
533
|
}, null, 8, ["column"])) : n.column.params.FieldType === "date" ? (openBlock(), createBlock(FilterDate, {
|
|
534
534
|
key: 2,
|
|
535
535
|
column: n.column,
|
|
536
|
-
onFilterSearch: c[2] || (c[2] = (
|
|
536
|
+
onFilterSearch: c[2] || (c[2] = (k) => l("search"))
|
|
537
537
|
}, null, 8, ["column"])) : n.column.params.FieldType === "tree" ? (openBlock(), createBlock(_sfc_main$w, {
|
|
538
538
|
key: 3,
|
|
539
539
|
column: n.column,
|
|
540
|
-
onFilterSearch: c[3] || (c[3] = (
|
|
540
|
+
onFilterSearch: c[3] || (c[3] = (k) => l("search"))
|
|
541
541
|
}, null, 8, ["column"])) : n.column.params.FieldType === "TreeMultipleSelect" ? (openBlock(), createBlock(_sfc_main$v, {
|
|
542
542
|
key: 4,
|
|
543
543
|
column: n.column,
|
|
544
|
-
onFilterSearch: c[4] || (c[4] = (
|
|
544
|
+
onFilterSearch: c[4] || (c[4] = (k) => l("search"))
|
|
545
545
|
}, null, 8, ["column"])) : n.column.params.FieldType === "inputNumber" ? (openBlock(), createBlock(_sfc_main$u, {
|
|
546
546
|
key: 5,
|
|
547
547
|
column: n.column,
|
|
548
|
-
onFilterSearch: c[5] || (c[5] = (
|
|
549
|
-
}, null, 8, ["column"])) : (openBlock(!0), createElementBlock(Fragment, { key: 6 }, renderList(n.column.filters, (
|
|
550
|
-
key:
|
|
551
|
-
modelValue:
|
|
552
|
-
"onUpdate:modelValue": (s) =>
|
|
548
|
+
onFilterSearch: c[5] || (c[5] = (k) => l("search"))
|
|
549
|
+
}, null, 8, ["column"])) : (openBlock(!0), createElementBlock(Fragment, { key: 6 }, renderList(n.column.filters, (k, p) => (openBlock(), createBlock(unref(ElInput), {
|
|
550
|
+
key: p,
|
|
551
|
+
modelValue: k.data,
|
|
552
|
+
"onUpdate:modelValue": (s) => k.data = s,
|
|
553
553
|
onKeyup: c[6] || (c[6] = withKeys((s) => l("search"), ["enter"])),
|
|
554
554
|
disabled: ["colorPicker", "iconPicker", "progress"].includes(n.column.params.FieldType)
|
|
555
555
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"]))), 128)),
|
|
@@ -653,18 +653,18 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
653
653
|
});
|
|
654
654
|
}
|
|
655
655
|
return (l, i) => (openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
656
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(r), (
|
|
657
|
-
key:
|
|
656
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(r), (m) => withDirectives((openBlock(), createBlock(unref(ElButton), {
|
|
657
|
+
key: m.Name,
|
|
658
658
|
class: "!text-[12px]",
|
|
659
659
|
link: "",
|
|
660
|
-
onClick: (c) => o(
|
|
660
|
+
onClick: (c) => o(m)
|
|
661
661
|
}, {
|
|
662
662
|
default: withCtx(() => [
|
|
663
|
-
createTextVNode(toDisplayString(
|
|
663
|
+
createTextVNode(toDisplayString(m.Name), 1)
|
|
664
664
|
]),
|
|
665
665
|
_: 2
|
|
666
666
|
}, 1032, ["onClick"])), [
|
|
667
|
-
[vShow,
|
|
667
|
+
[vShow, m.hide !== !0]
|
|
668
668
|
])), 128))
|
|
669
669
|
]));
|
|
670
670
|
}
|
|
@@ -696,13 +696,13 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
696
696
|
typeof e.row[e.column.field] != "boolean" ? r.value = !!e.row[e.column.field] : r.value = e.row[e.column.field];
|
|
697
697
|
});
|
|
698
698
|
const a = t;
|
|
699
|
-
function o(l, i,
|
|
700
|
-
i[
|
|
699
|
+
function o(l, i, m) {
|
|
700
|
+
i[m.field] = l, a("change", l, i, m);
|
|
701
701
|
}
|
|
702
702
|
return (l, i) => {
|
|
703
|
-
var
|
|
703
|
+
var m;
|
|
704
704
|
return openBlock(), createBlock(unref(ElCheckbox), {
|
|
705
|
-
disabled: (
|
|
705
|
+
disabled: (m = n.column.params) == null ? void 0 : m.disabled,
|
|
706
706
|
modelValue: r.value,
|
|
707
707
|
"onUpdate:modelValue": i[0] || (i[0] = (c) => r.value = c),
|
|
708
708
|
onChange: i[1] || (i[1] = (c) => o(c, n.row, n.column))
|
|
@@ -758,96 +758,96 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
758
758
|
});
|
|
759
759
|
function o(u) {
|
|
760
760
|
if (!u) return;
|
|
761
|
-
let
|
|
761
|
+
let _, d, k, p = 1;
|
|
762
762
|
if (u.startsWith("#"))
|
|
763
|
-
u = u.slice(1), u.length === 3 ? (
|
|
763
|
+
u = u.slice(1), u.length === 3 ? (_ = parseInt(u[0] + u[0], 16), d = parseInt(u[1] + u[1], 16), k = parseInt(u[2] + u[2], 16)) : u.length === 6 && (_ = parseInt(u.slice(0, 2), 16), d = parseInt(u.slice(2, 4), 16), k = parseInt(u.slice(4, 6), 16));
|
|
764
764
|
else if (u.startsWith("rgb")) {
|
|
765
765
|
const s = u.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);
|
|
766
|
-
s && (
|
|
766
|
+
s && (_ = parseInt(s[1]), d = parseInt(s[2]), k = parseInt(s[3]), s[4] && (p = parseFloat(s[4])));
|
|
767
767
|
} else if (u.startsWith("hsl")) {
|
|
768
768
|
const s = u.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%(?:,\s*(\d*\.?\d+))?\)/);
|
|
769
769
|
if (s) {
|
|
770
|
-
const
|
|
771
|
-
if (s[4] && (
|
|
772
|
-
|
|
770
|
+
const f = parseInt(s[1]) / 360, b = parseInt(s[2]) / 100, C = parseInt(s[3]) / 100;
|
|
771
|
+
if (s[4] && (p = parseFloat(s[4])), b === 0)
|
|
772
|
+
_ = d = k = C * 255;
|
|
773
773
|
else {
|
|
774
|
-
const
|
|
775
|
-
|
|
774
|
+
const V = (B, N, $) => ($ < 0 && ($ += 1), $ > 1 && ($ -= 1), $ < 0.16666666666666666 ? B + (N - B) * 6 * $ : $ < 0.5 ? N : $ < 0.6666666666666666 ? B + (N - B) * (0.6666666666666666 - $) * 6 : B), D = C < 0.5 ? C * (1 + b) : C + b - C * b, E = 2 * C - D;
|
|
775
|
+
_ = V(E, D, f + 1 / 3) * 255, d = V(E, D, f) * 255, k = V(E, D, f - 1 / 3) * 255;
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
|
-
return { r:
|
|
780
|
-
}
|
|
781
|
-
function l(u,
|
|
782
|
-
u /= 255,
|
|
783
|
-
const
|
|
784
|
-
let s,
|
|
785
|
-
if (
|
|
786
|
-
s =
|
|
779
|
+
return { r: _, g: d, b: k, a: p };
|
|
780
|
+
}
|
|
781
|
+
function l(u, _, d) {
|
|
782
|
+
u /= 255, _ /= 255, d /= 255;
|
|
783
|
+
const k = Math.max(u, _, d), p = Math.min(u, _, d);
|
|
784
|
+
let s, f, b = (k + p) / 2;
|
|
785
|
+
if (k === p)
|
|
786
|
+
s = f = 0;
|
|
787
787
|
else {
|
|
788
|
-
const
|
|
789
|
-
switch (
|
|
788
|
+
const C = k - p;
|
|
789
|
+
switch (f = b > 0.5 ? C / (2 - k - p) : C / (k + p), k) {
|
|
790
790
|
case u:
|
|
791
|
-
s = (
|
|
791
|
+
s = (_ - d) / C + (_ < d ? 6 : 0);
|
|
792
792
|
break;
|
|
793
|
-
case
|
|
794
|
-
s = (
|
|
793
|
+
case _:
|
|
794
|
+
s = (d - u) / C + 2;
|
|
795
795
|
break;
|
|
796
|
-
case
|
|
797
|
-
s = (u -
|
|
796
|
+
case d:
|
|
797
|
+
s = (u - _) / C + 4;
|
|
798
798
|
break;
|
|
799
799
|
}
|
|
800
800
|
s /= 6;
|
|
801
801
|
}
|
|
802
|
-
return { h: s, s:
|
|
802
|
+
return { h: s, s: f, l: b };
|
|
803
803
|
}
|
|
804
|
-
function i(u,
|
|
805
|
-
let
|
|
806
|
-
if (
|
|
807
|
-
|
|
804
|
+
function i(u, _, d) {
|
|
805
|
+
let k, p, s;
|
|
806
|
+
if (_ === 0)
|
|
807
|
+
k = p = s = d;
|
|
808
808
|
else {
|
|
809
|
-
const
|
|
810
|
-
|
|
809
|
+
const f = (V, D, E) => (E < 0 && (E += 1), E > 1 && (E -= 1), E < 0.16666666666666666 ? V + (D - V) * 6 * E : E < 0.5 ? D : E < 0.6666666666666666 ? V + (D - V) * (0.6666666666666666 - E) * 6 : V), b = d < 0.5 ? d * (1 + _) : d + _ - d * _, C = 2 * d - b;
|
|
810
|
+
k = f(C, b, u + 1 / 3), p = f(C, b, u), s = f(C, b, u - 1 / 3);
|
|
811
811
|
}
|
|
812
|
-
return { r: Math.round(
|
|
812
|
+
return { r: Math.round(k * 255), g: Math.round(p * 255), b: Math.round(s * 255) };
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function m(u, _) {
|
|
815
815
|
if (!u) return;
|
|
816
|
-
let { r:
|
|
817
|
-
|
|
818
|
-
const { r:
|
|
819
|
-
return `rgb(${
|
|
816
|
+
let { r: d, g: k, b: p } = o(u), { h: s, s: f, l: b } = l(d, k, p);
|
|
817
|
+
b = Math.max(0, b - _);
|
|
818
|
+
const { r: C, g: V, b: D } = i(s, f, b);
|
|
819
|
+
return `rgb(${C}, ${V}, ${D})`;
|
|
820
820
|
}
|
|
821
821
|
function c() {
|
|
822
|
-
function u(s,
|
|
823
|
-
return Math.floor(Math.random() * (
|
|
822
|
+
function u(s, f) {
|
|
823
|
+
return Math.floor(Math.random() * (f - s + 1)) + s;
|
|
824
824
|
}
|
|
825
|
-
const
|
|
826
|
-
return `#${
|
|
825
|
+
const _ = u(200, 255), d = u(200, 255), k = u(200, 255);
|
|
826
|
+
return `#${_.toString(16).padStart(2, "0")}${d.toString(16).padStart(2, "0")}${k.toString(16).padStart(2, "0")}`;
|
|
827
827
|
}
|
|
828
|
-
return (u,
|
|
829
|
-
const
|
|
828
|
+
return (u, _) => {
|
|
829
|
+
const d = resolveComponent("hr-icon");
|
|
830
830
|
return r.value ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
831
831
|
a.value ? (openBlock(), createBlock(unref(ElTag), {
|
|
832
832
|
key: 0,
|
|
833
833
|
color: a.value.Color,
|
|
834
834
|
size: "small",
|
|
835
|
-
style: normalizeStyle({ borderColor:
|
|
835
|
+
style: normalizeStyle({ borderColor: m(a.value.Color, "0.03") })
|
|
836
836
|
}, {
|
|
837
837
|
default: withCtx(() => [
|
|
838
|
-
a.value.LeftIcon ? (openBlock(), createBlock(
|
|
838
|
+
a.value.LeftIcon ? (openBlock(), createBlock(d, {
|
|
839
839
|
key: 0,
|
|
840
840
|
class: "mr0.25 v-middle mt0.15",
|
|
841
841
|
size: "13",
|
|
842
|
-
color:
|
|
842
|
+
color: m(a.value.Color, "0.3"),
|
|
843
843
|
icon: a.value.LeftIcon
|
|
844
844
|
}, null, 8, ["color", "icon"])) : createCommentVNode("", !0),
|
|
845
845
|
createElementVNode("span", _hoisted_2$4, toDisplayString(n.displayValue === void 0 ? r.value : n.displayValue), 1),
|
|
846
|
-
a.value.RightIcon ? (openBlock(), createBlock(
|
|
846
|
+
a.value.RightIcon ? (openBlock(), createBlock(d, {
|
|
847
847
|
key: 1,
|
|
848
848
|
class: "ml0.25 v-middle mt0.15",
|
|
849
849
|
size: "13",
|
|
850
|
-
color:
|
|
850
|
+
color: m(a.value.Color, "0.3"),
|
|
851
851
|
icon: a.value.RightIcon
|
|
852
852
|
}, null, 8, ["color", "icon"])) : createCommentVNode("", !0)
|
|
853
853
|
]),
|
|
@@ -988,19 +988,19 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
988
988
|
a.value = isColor(e.row[e.column.field]) ? e.row[e.column.field] : null;
|
|
989
989
|
});
|
|
990
990
|
const o = t;
|
|
991
|
-
function l(i,
|
|
992
|
-
|
|
991
|
+
function l(i, m, c) {
|
|
992
|
+
m[c.field] = i, o("change", i, m, c);
|
|
993
993
|
}
|
|
994
|
-
return (i,
|
|
994
|
+
return (i, m) => {
|
|
995
995
|
var c;
|
|
996
996
|
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
997
997
|
createVNode(unref(ElColorPicker), {
|
|
998
998
|
disabled: (c = n.column.params) == null ? void 0 : c.disabled,
|
|
999
999
|
class: "size-full",
|
|
1000
1000
|
modelValue: a.value,
|
|
1001
|
-
"onUpdate:modelValue":
|
|
1001
|
+
"onUpdate:modelValue": m[0] || (m[0] = (u) => a.value = u),
|
|
1002
1002
|
predefine: r.value,
|
|
1003
|
-
onChange:
|
|
1003
|
+
onChange: m[1] || (m[1] = (u) => l(u, n.row, n.column))
|
|
1004
1004
|
}, null, 8, ["disabled", "modelValue", "predefine"])
|
|
1005
1005
|
]);
|
|
1006
1006
|
};
|
|
@@ -1042,12 +1042,12 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1042
1042
|
setup(n) {
|
|
1043
1043
|
dayjs.extend(isoWeek), dayjs.extend(quarterOfYear), dayjs.extend(customParseFormat);
|
|
1044
1044
|
const t = n, e = computed(() => {
|
|
1045
|
-
var
|
|
1046
|
-
const
|
|
1047
|
-
return
|
|
1045
|
+
var C, V, D;
|
|
1046
|
+
const p = ((C = t.column.params) == null ? void 0 : C.DateType) || "date", s = (V = t.column.params) == null ? void 0 : V.formats, f = (D = t.row) == null ? void 0 : D[t.column.field], b = l(f, p);
|
|
1047
|
+
return b ? p === "time" ? b.format(s || "HH:mm:ss") : p === "date" ? b.format(s || "YYYY-MM-DD") : p === "datetime" ? b.format(s || "YYYY-MM-DD HH:mm:ss") : m(b, p, s) : "";
|
|
1048
1048
|
});
|
|
1049
|
-
function r(
|
|
1050
|
-
switch (
|
|
1049
|
+
function r(p) {
|
|
1050
|
+
switch (p) {
|
|
1051
1051
|
case "week":
|
|
1052
1052
|
return "YYYY年第WW周";
|
|
1053
1053
|
case "month":
|
|
@@ -1060,115 +1060,138 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1060
1060
|
return "";
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
|
-
function a(
|
|
1064
|
-
if (typeof
|
|
1065
|
-
const
|
|
1066
|
-
return
|
|
1063
|
+
function a(p, s) {
|
|
1064
|
+
if (typeof s == "string" && s.trim()) {
|
|
1065
|
+
const f = s.trim();
|
|
1066
|
+
return p === "month" && f.includes("MM") || p === "week" && f.includes("WW") || p === "quarter" && (f.includes("QCN") || f.includes("Q")) || p === "year" && f.includes("YYYY") ? f : (console.warn(`[DatePickerRender] invalid formats for ${p}: "${f}". Fallback to default.`), r(p));
|
|
1067
1067
|
}
|
|
1068
|
-
return r(
|
|
1068
|
+
return r(p);
|
|
1069
1069
|
}
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
const
|
|
1074
|
-
return
|
|
1070
|
+
computed({
|
|
1071
|
+
get() {
|
|
1072
|
+
var b, C, V, D;
|
|
1073
|
+
const p = ((C = (b = t.column) == null ? void 0 : b.params) == null ? void 0 : C.DateType) || "date", s = (D = t.row) == null ? void 0 : D[(V = t.column) == null ? void 0 : V.field], f = l(s, p);
|
|
1074
|
+
return f ? f.toDate() : null;
|
|
1075
|
+
},
|
|
1076
|
+
set(p) {
|
|
1077
|
+
var C, V, D;
|
|
1078
|
+
const s = (C = t.column) == null ? void 0 : C.field;
|
|
1079
|
+
if (!s) return;
|
|
1080
|
+
const f = ((D = (V = t.column) == null ? void 0 : V.params) == null ? void 0 : D.DateType) || "date", b = o(p, f);
|
|
1081
|
+
try {
|
|
1082
|
+
t.row && t.row[s] !== b && (t.row[s] = b);
|
|
1083
|
+
} catch (E) {
|
|
1084
|
+
console.error("[DatePickerRender] writeback failed:", E);
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
});
|
|
1088
|
+
function o(p, s) {
|
|
1089
|
+
if (p == null || p === "") return "";
|
|
1090
|
+
const f = dayjs(p);
|
|
1091
|
+
return f.isValid() ? s === "date" ? f.format("YYYY-MM-DD") : s === "datetime" ? f.format("YYYY-MM-DD HH:mm:ss") : s === "time" ? f.format("HH:mm:ss") : s === "week" ? f.startOf("isoWeek").format("YYYY-MM-DD") : s === "month" ? f.startOf("month").format("YYYY-MM-DD") : s === "quarter" ? f.startOf("quarter").format("YYYY-MM-DD") : s === "year" ? f.startOf("year").format("YYYY-MM-DD") : f.format("YYYY-MM-DD HH:mm:ss") : "";
|
|
1092
|
+
}
|
|
1093
|
+
function l(p, s) {
|
|
1094
|
+
if (p == null || p === "") return null;
|
|
1095
|
+
if (p instanceof Date) {
|
|
1096
|
+
const C = dayjs(p);
|
|
1097
|
+
return C.isValid() ? i(C, s) : null;
|
|
1075
1098
|
}
|
|
1076
|
-
const
|
|
1077
|
-
if (!
|
|
1078
|
-
if (
|
|
1079
|
-
const
|
|
1080
|
-
return
|
|
1099
|
+
const f = String(p).trim();
|
|
1100
|
+
if (!f) return null;
|
|
1101
|
+
if (s === "date") {
|
|
1102
|
+
const C = dayjs(f, ["YYYY-MM-DD", "YYYY-MM-DD HH:mm:ss"], !0);
|
|
1103
|
+
return C.isValid() ? C.startOf("day") : null;
|
|
1081
1104
|
}
|
|
1082
|
-
if (
|
|
1083
|
-
const
|
|
1084
|
-
return
|
|
1105
|
+
if (s === "datetime") {
|
|
1106
|
+
const C = dayjs(f, ["YYYY-MM-DD HH:mm:ss", "YYYY-MM-DD"], !0);
|
|
1107
|
+
return C.isValid() ? C : null;
|
|
1085
1108
|
}
|
|
1086
|
-
if (
|
|
1087
|
-
const
|
|
1088
|
-
return
|
|
1109
|
+
if (s === "time") {
|
|
1110
|
+
const C = dayjs(`1970-01-01 ${f}`, "YYYY-MM-DD HH:mm:ss", !0);
|
|
1111
|
+
return C.isValid() ? C : null;
|
|
1089
1112
|
}
|
|
1090
|
-
if (
|
|
1091
|
-
if (
|
|
1092
|
-
if (
|
|
1093
|
-
if (
|
|
1094
|
-
const
|
|
1095
|
-
return
|
|
1096
|
-
}
|
|
1097
|
-
function
|
|
1098
|
-
switch (
|
|
1113
|
+
if (s === "week") return u(f);
|
|
1114
|
+
if (s === "month") return _(f);
|
|
1115
|
+
if (s === "quarter") return d(f);
|
|
1116
|
+
if (s === "year") return k(f);
|
|
1117
|
+
const b = dayjs(f);
|
|
1118
|
+
return b.isValid() ? i(b, s) : null;
|
|
1119
|
+
}
|
|
1120
|
+
function i(p, s) {
|
|
1121
|
+
switch (s) {
|
|
1099
1122
|
case "week":
|
|
1100
|
-
return
|
|
1123
|
+
return p.startOf("isoWeek");
|
|
1101
1124
|
case "month":
|
|
1102
|
-
return
|
|
1125
|
+
return p.startOf("month");
|
|
1103
1126
|
case "quarter":
|
|
1104
|
-
return
|
|
1127
|
+
return p.startOf("quarter");
|
|
1105
1128
|
case "year":
|
|
1106
|
-
return
|
|
1129
|
+
return p.startOf("year");
|
|
1107
1130
|
default:
|
|
1108
|
-
return
|
|
1131
|
+
return p;
|
|
1109
1132
|
}
|
|
1110
1133
|
}
|
|
1111
|
-
function
|
|
1112
|
-
const
|
|
1113
|
-
if (!
|
|
1114
|
-
const
|
|
1115
|
-
return
|
|
1116
|
-
}
|
|
1117
|
-
function
|
|
1118
|
-
if (!
|
|
1119
|
-
const
|
|
1120
|
-
return
|
|
1121
|
-
}
|
|
1122
|
-
function
|
|
1123
|
-
const
|
|
1124
|
-
let
|
|
1125
|
-
if (
|
|
1126
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
1127
|
-
const
|
|
1128
|
-
return
|
|
1134
|
+
function m(p, s, f) {
|
|
1135
|
+
const b = a(s, f);
|
|
1136
|
+
if (!b) return "";
|
|
1137
|
+
const C = String(p.year()), V = String(p.isoWeekYear ? p.isoWeekYear() : p.year()), D = String(p.month() + 1).padStart(2, "0"), E = String(p.isoWeek()).padStart(2, "0"), B = String(p.quarter()), N = ["第一", "第二", "第三", "第四"][p.quarter() - 1];
|
|
1138
|
+
return b.replace(/QCN/g, N).replace(/YYYY/g, s === "week" ? V : C).replace(/MM/g, D).replace(/WW/g, E).replace(/Q/g, B);
|
|
1139
|
+
}
|
|
1140
|
+
function c(p, s) {
|
|
1141
|
+
if (!p || !s) return null;
|
|
1142
|
+
const f = dayjs(`${p}-01-04`, "YYYY-MM-DD", !0);
|
|
1143
|
+
return f.isValid() ? f.isoWeek(Number(s)).startOf("isoWeek") : null;
|
|
1144
|
+
}
|
|
1145
|
+
function u(p) {
|
|
1146
|
+
const s = String(p).trim();
|
|
1147
|
+
let f = s.match(/^(\d{4})年(?:第)?(\d{1,2})周$/);
|
|
1148
|
+
if (f || (f = s.match(/^(\d{4})[-]?W?(\d{1,2})$/i), f)) return c(Number(f[1]), Number(f[2]));
|
|
1149
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(s)) {
|
|
1150
|
+
const b = dayjs(s, "YYYY-MM-DD", !0);
|
|
1151
|
+
return b.isValid() ? b.startOf("isoWeek") : null;
|
|
1129
1152
|
}
|
|
1130
1153
|
return null;
|
|
1131
1154
|
}
|
|
1132
|
-
function
|
|
1133
|
-
const
|
|
1134
|
-
let
|
|
1135
|
-
if (
|
|
1136
|
-
if (
|
|
1137
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
1138
|
-
const
|
|
1139
|
-
return
|
|
1155
|
+
function _(p) {
|
|
1156
|
+
const s = String(p).trim();
|
|
1157
|
+
let f = s.match(/^(\d{4})年(\d{1,2})月$/);
|
|
1158
|
+
if (f) return dayjs(`${f[1]}-${String(f[2]).padStart(2, "0")}-01`, "YYYY-MM-DD", !0);
|
|
1159
|
+
if (f = s.match(/^(\d{4})-(\d{1,2})$/), f) return dayjs(`${f[1]}-${String(f[2]).padStart(2, "0")}-01`, "YYYY-MM-DD", !0);
|
|
1160
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(s)) {
|
|
1161
|
+
const b = dayjs(s, "YYYY-MM-DD", !0);
|
|
1162
|
+
return b.isValid() ? b.startOf("month") : null;
|
|
1140
1163
|
}
|
|
1141
1164
|
return null;
|
|
1142
1165
|
}
|
|
1143
|
-
function
|
|
1144
|
-
const
|
|
1145
|
-
let
|
|
1146
|
-
if (
|
|
1147
|
-
if (
|
|
1148
|
-
const
|
|
1149
|
-
return dayjs(`${
|
|
1166
|
+
function d(p) {
|
|
1167
|
+
const s = String(p).trim();
|
|
1168
|
+
let f = s.match(/^(\d{4})年第([1-4])季度$/);
|
|
1169
|
+
if (f) return dayjs(`${f[1]}-01-01`, "YYYY-MM-DD", !0).quarter(Number(f[2]));
|
|
1170
|
+
if (f = s.match(/^(\d{4})年(第一|第二|第三|第四)季度$/), f) {
|
|
1171
|
+
const b = { 第一: 1, 第二: 2, 第三: 3, 第四: 4 };
|
|
1172
|
+
return dayjs(`${f[1]}-01-01`, "YYYY-MM-DD", !0).quarter(b[f[2]]);
|
|
1150
1173
|
}
|
|
1151
|
-
if (
|
|
1152
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
1153
|
-
const
|
|
1154
|
-
return
|
|
1174
|
+
if (f = s.match(/^(\d{4})[-]?Q?([1-4])$/i), f) return dayjs(`${f[1]}-01-01`, "YYYY-MM-DD", !0).quarter(Number(f[2]));
|
|
1175
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(s)) {
|
|
1176
|
+
const b = dayjs(s, "YYYY-MM-DD", !0);
|
|
1177
|
+
return b.isValid() ? b.startOf("quarter") : null;
|
|
1155
1178
|
}
|
|
1156
1179
|
return null;
|
|
1157
1180
|
}
|
|
1158
|
-
function
|
|
1159
|
-
const
|
|
1160
|
-
let
|
|
1161
|
-
if (
|
|
1162
|
-
if (
|
|
1163
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
1164
|
-
const
|
|
1165
|
-
return
|
|
1181
|
+
function k(p) {
|
|
1182
|
+
const s = String(p).trim();
|
|
1183
|
+
let f = s.match(/^(\d{4})年$/);
|
|
1184
|
+
if (f) return dayjs(`${f[1]}-01-01`, "YYYY-MM-DD", !0);
|
|
1185
|
+
if (f = s.match(/^(\d{4})$/), f) return dayjs(`${f[1]}-01-01`, "YYYY-MM-DD", !0);
|
|
1186
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(s)) {
|
|
1187
|
+
const b = dayjs(s, "YYYY-MM-DD", !0);
|
|
1188
|
+
return b.isValid() ? b.startOf("year") : null;
|
|
1166
1189
|
}
|
|
1167
1190
|
return null;
|
|
1168
1191
|
}
|
|
1169
|
-
return (
|
|
1170
|
-
var
|
|
1171
|
-
return (
|
|
1192
|
+
return (p, s) => {
|
|
1193
|
+
var f;
|
|
1194
|
+
return (f = t.column.params) != null && f.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue: e.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1172
1195
|
key: 1,
|
|
1173
1196
|
title: e.value
|
|
1174
1197
|
}, toDisplayString(e.value), 9, _hoisted_1$9));
|
|
@@ -1207,7 +1230,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1207
1230
|
return (a, o) => {
|
|
1208
1231
|
const l = resolveDirective("viewer");
|
|
1209
1232
|
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
1210
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.row[n.column.field], (i,
|
|
1233
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.row[n.column.field], (i, m) => (openBlock(), createElementBlock("div", {
|
|
1211
1234
|
class: "Link flex",
|
|
1212
1235
|
title: i.FileName
|
|
1213
1236
|
}, [
|
|
@@ -1228,7 +1251,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1228
1251
|
createElementVNode("a", {
|
|
1229
1252
|
href: i.FilePath,
|
|
1230
1253
|
download: i.FileName
|
|
1231
|
-
}, toDisplayString(
|
|
1254
|
+
}, toDisplayString(m + 1) + "." + toDisplayString(i.FileType), 9, _hoisted_4$1)
|
|
1232
1255
|
], 8, _hoisted_2$3))), 256))
|
|
1233
1256
|
])), [
|
|
1234
1257
|
[
|
|
@@ -1268,8 +1291,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1268
1291
|
e("change", o, l, i);
|
|
1269
1292
|
}
|
|
1270
1293
|
function a(o, l) {
|
|
1271
|
-
var
|
|
1272
|
-
if ((
|
|
1294
|
+
var m;
|
|
1295
|
+
if ((m = l.params) != null && m.disable) return;
|
|
1273
1296
|
let i = layer.open({
|
|
1274
1297
|
type: 2,
|
|
1275
1298
|
title: "图标选择",
|
|
@@ -1317,25 +1340,25 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1317
1340
|
setup(n, { emit: t }) {
|
|
1318
1341
|
const e = n, r = t;
|
|
1319
1342
|
function a(o, l) {
|
|
1320
|
-
var
|
|
1321
|
-
if ((
|
|
1343
|
+
var p;
|
|
1344
|
+
if ((p = l.params) != null && p.disabled) return;
|
|
1322
1345
|
let {
|
|
1323
1346
|
PickPeopleType: i,
|
|
1324
|
-
PickPeopleCheckType:
|
|
1347
|
+
PickPeopleCheckType: m,
|
|
1325
1348
|
PickPeopleIsAll: c,
|
|
1326
1349
|
PickPeopleStatus: u,
|
|
1327
|
-
StoredValueField:
|
|
1328
|
-
ReturnValueField:
|
|
1329
|
-
BackfillField:
|
|
1350
|
+
StoredValueField: _,
|
|
1351
|
+
ReturnValueField: d,
|
|
1352
|
+
BackfillField: k
|
|
1330
1353
|
} = e.column.params;
|
|
1331
1354
|
openChoosePeople({
|
|
1332
1355
|
Type: i,
|
|
1333
|
-
Choose:
|
|
1356
|
+
Choose: m,
|
|
1334
1357
|
IsAll: c,
|
|
1335
1358
|
Status: u
|
|
1336
1359
|
}, (s) => {
|
|
1337
|
-
isEmpty(
|
|
1338
|
-
},
|
|
1360
|
+
isEmpty(_) ? o[l.field] = s.Name || null : (Array.isArray(_) || (_ = [_]), Array.isArray(d) || (d = [d]), _.forEach((f, b) => o[f] = s[d[b]] || null)), r("change", s, o, l);
|
|
1361
|
+
}, k ? o[k] : null);
|
|
1339
1362
|
}
|
|
1340
1363
|
return (o, l) => (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
1341
1364
|
createVNode(unref(ElButton), {
|
|
@@ -1413,8 +1436,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1413
1436
|
setup(n, { emit: t }) {
|
|
1414
1437
|
const e = n, r = t;
|
|
1415
1438
|
function a(o, l, i) {
|
|
1416
|
-
e.gridRef.getTableData().tableData.filter((
|
|
1417
|
-
|
|
1439
|
+
e.gridRef.getTableData().tableData.filter((m) => m !== l).forEach((m) => {
|
|
1440
|
+
m[i.field] && (m[i.field] = !1);
|
|
1418
1441
|
}), r("change", o, l, i);
|
|
1419
1442
|
}
|
|
1420
1443
|
return (o, l) => {
|
|
@@ -1422,8 +1445,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1422
1445
|
return openBlock(), createBlock(unref(ElRadioGroup), {
|
|
1423
1446
|
disabled: (i = n.column.params) == null ? void 0 : i.disabled,
|
|
1424
1447
|
modelValue: n.row[n.column.field],
|
|
1425
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
1426
|
-
onChange: l[1] || (l[1] = (
|
|
1448
|
+
"onUpdate:modelValue": l[0] || (l[0] = (m) => n.row[n.column.field] = m),
|
|
1449
|
+
onChange: l[1] || (l[1] = (m) => a(m, n.row, n.column))
|
|
1427
1450
|
}, {
|
|
1428
1451
|
default: withCtx(() => [
|
|
1429
1452
|
createVNode(unref(ElRadio), { value: !0 })
|
|
@@ -1464,17 +1487,17 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1464
1487
|
var l;
|
|
1465
1488
|
return ((l = t.column.params[t.gridRef.getRowid(t.row)]) == null ? void 0 : l.options) || t.column.params.options;
|
|
1466
1489
|
}), r = computed(() => {
|
|
1467
|
-
var i,
|
|
1490
|
+
var i, m;
|
|
1468
1491
|
const l = t.row[t.column.field];
|
|
1469
1492
|
if (l && l.length > 1) {
|
|
1470
1493
|
let c = [];
|
|
1471
1494
|
return l.split(",").map((u) => {
|
|
1472
|
-
var
|
|
1473
|
-
const
|
|
1474
|
-
|
|
1495
|
+
var d, k;
|
|
1496
|
+
const _ = (k = (d = e.value) == null ? void 0 : d.find((p) => p.value == u)) == null ? void 0 : k.label;
|
|
1497
|
+
_ !== void 0 && c.push(_);
|
|
1475
1498
|
}), c.join(",");
|
|
1476
1499
|
} else
|
|
1477
|
-
return ((
|
|
1500
|
+
return ((m = (i = e.value) == null ? void 0 : i.find((c) => c.value == l)) == null ? void 0 : m.label) || "";
|
|
1478
1501
|
});
|
|
1479
1502
|
return (l, i) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue: r.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1480
1503
|
key: 1,
|
|
@@ -1514,7 +1537,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1514
1537
|
return ((l = t.column.params[t.gridRef.getRowid(t.row)]) == null ? void 0 : l.options) || t.column.params.options;
|
|
1515
1538
|
}), r = computed(() => {
|
|
1516
1539
|
var l, i;
|
|
1517
|
-
return ((i = (l = e.value) == null ? void 0 : l.find((
|
|
1540
|
+
return ((i = (l = e.value) == null ? void 0 : l.find((m) => m.value == t.row[t.column.field])) == null ? void 0 : i.label) || "";
|
|
1518
1541
|
});
|
|
1519
1542
|
return (l, i) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, mergeProps({ key: 0 }, { ...t, displayValue: r.value }, { title: r.value }), null, 16, ["title"])) : (openBlock(), createElementBlock("span", {
|
|
1520
1543
|
key: 1,
|
|
@@ -1618,8 +1641,8 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1618
1641
|
setup(n, { emit: t }) {
|
|
1619
1642
|
dayjs.extend(isoWeek), dayjs.extend(quarterOfYear), dayjs.extend(customParseFormat);
|
|
1620
1643
|
const e = n, r = t, a = computed(() => {
|
|
1621
|
-
var
|
|
1622
|
-
return ((
|
|
1644
|
+
var v, w;
|
|
1645
|
+
return ((w = (v = e.column) == null ? void 0 : v.params) == null ? void 0 : w.DateType) || "date";
|
|
1623
1646
|
}), o = computed(() => {
|
|
1624
1647
|
switch (a.value) {
|
|
1625
1648
|
case "year":
|
|
@@ -1641,18 +1664,18 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1641
1664
|
function i() {
|
|
1642
1665
|
l.value = dayjs();
|
|
1643
1666
|
}
|
|
1644
|
-
const
|
|
1645
|
-
var
|
|
1646
|
-
return (
|
|
1667
|
+
const m = computed(() => {
|
|
1668
|
+
var v, w;
|
|
1669
|
+
return (w = (v = e.column) == null ? void 0 : v.params) == null ? void 0 : w.minDate;
|
|
1647
1670
|
}), c = computed(() => {
|
|
1648
|
-
var
|
|
1649
|
-
return (
|
|
1671
|
+
var v, w;
|
|
1672
|
+
return (w = (v = e.column) == null ? void 0 : v.params) == null ? void 0 : w.maxDate;
|
|
1650
1673
|
});
|
|
1651
|
-
function u(
|
|
1652
|
-
return
|
|
1674
|
+
function u(v) {
|
|
1675
|
+
return v == null || v === "" ? null : typeof v == "string" && v.trim() !== "" && !Number.isNaN(Number(v)) ? Number(v) : v;
|
|
1653
1676
|
}
|
|
1654
|
-
function
|
|
1655
|
-
switch (
|
|
1677
|
+
function _(v) {
|
|
1678
|
+
switch (v) {
|
|
1656
1679
|
case "week":
|
|
1657
1680
|
return "week";
|
|
1658
1681
|
case "month":
|
|
@@ -1667,102 +1690,102 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1667
1690
|
return "day";
|
|
1668
1691
|
}
|
|
1669
1692
|
}
|
|
1670
|
-
function
|
|
1671
|
-
switch (
|
|
1693
|
+
function d(v, w) {
|
|
1694
|
+
switch (w) {
|
|
1672
1695
|
case "week":
|
|
1673
|
-
return
|
|
1696
|
+
return v.startOf("isoWeek");
|
|
1674
1697
|
case "month":
|
|
1675
|
-
return
|
|
1698
|
+
return v.startOf("month");
|
|
1676
1699
|
case "quarter":
|
|
1677
|
-
return
|
|
1700
|
+
return v.startOf("quarter");
|
|
1678
1701
|
case "year":
|
|
1679
|
-
return
|
|
1702
|
+
return v.startOf("year");
|
|
1680
1703
|
case "date":
|
|
1681
|
-
return
|
|
1704
|
+
return v.startOf("day");
|
|
1682
1705
|
default:
|
|
1683
|
-
return
|
|
1706
|
+
return v;
|
|
1684
1707
|
}
|
|
1685
1708
|
}
|
|
1686
|
-
function
|
|
1687
|
-
const
|
|
1688
|
-
if (
|
|
1689
|
-
const T =
|
|
1690
|
-
if (typeof
|
|
1691
|
-
return
|
|
1692
|
-
if (typeof
|
|
1693
|
-
const
|
|
1694
|
-
return
|
|
1709
|
+
function k(v, w, R) {
|
|
1710
|
+
const Y = u(v);
|
|
1711
|
+
if (Y === null) return null;
|
|
1712
|
+
const T = d(l.value, w), P = _(w);
|
|
1713
|
+
if (typeof Y == "number" && !Number.isNaN(Y))
|
|
1714
|
+
return Y < 0 ? d(T.add(Y, P), w) : d(R === "min" ? T.subtract(Y, P) : T.add(Y, P), w);
|
|
1715
|
+
if (typeof Y == "string" || Y instanceof Date) {
|
|
1716
|
+
const M = $(Y, w);
|
|
1717
|
+
return M ? d(dayjs(M), w) : null;
|
|
1695
1718
|
}
|
|
1696
1719
|
return null;
|
|
1697
1720
|
}
|
|
1698
|
-
const
|
|
1699
|
-
const
|
|
1721
|
+
const p = computed(() => {
|
|
1722
|
+
const v = a.value;
|
|
1700
1723
|
return {
|
|
1701
|
-
min: m
|
|
1702
|
-
max:
|
|
1724
|
+
min: k(m.value, v, "min"),
|
|
1725
|
+
max: k(c.value, v, "max")
|
|
1703
1726
|
};
|
|
1704
|
-
}), s = computed(() =>
|
|
1705
|
-
function
|
|
1706
|
-
const { min:
|
|
1707
|
-
return !!(
|
|
1727
|
+
}), s = computed(() => p.value.min ? p.value.min.toDate() : null), f = computed(() => p.value.max ? p.value.max.toDate() : null);
|
|
1728
|
+
function b({ date: v }) {
|
|
1729
|
+
const { min: w, max: R } = p.value, Y = d(dayjs(v), a.value);
|
|
1730
|
+
return !!(w && Y.isBefore(w) || R && Y.isAfter(R));
|
|
1708
1731
|
}
|
|
1709
|
-
const
|
|
1732
|
+
const C = ref($(e.row[e.column.field], a.value)), V = ref(C.value);
|
|
1710
1733
|
watch(
|
|
1711
1734
|
() => e.row[e.column.field],
|
|
1712
|
-
(
|
|
1713
|
-
const
|
|
1714
|
-
|
|
1735
|
+
(v) => {
|
|
1736
|
+
const w = $(v, a.value);
|
|
1737
|
+
C.value = w, V.value = w;
|
|
1715
1738
|
}
|
|
1716
1739
|
);
|
|
1717
|
-
function
|
|
1718
|
-
if (
|
|
1719
|
-
if (
|
|
1720
|
-
const T = dayjs(`1970-01-01 ${String(
|
|
1740
|
+
function D(v, w) {
|
|
1741
|
+
if (v == null || v === "") return null;
|
|
1742
|
+
if (w === "time") {
|
|
1743
|
+
const T = dayjs(`1970-01-01 ${String(v)}`, "YYYY-MM-DD HH:mm:ss", !0);
|
|
1721
1744
|
return T.isValid() ? T : null;
|
|
1722
1745
|
}
|
|
1723
|
-
if (
|
|
1724
|
-
const T =
|
|
1725
|
-
return T.isValid() ?
|
|
1746
|
+
if (w === "date" || w === "datetime") {
|
|
1747
|
+
const T = v instanceof Date ? dayjs(v) : dayjs(String(v));
|
|
1748
|
+
return T.isValid() ? d(T, w) : null;
|
|
1726
1749
|
}
|
|
1727
|
-
const R = $(
|
|
1750
|
+
const R = $(v, w);
|
|
1728
1751
|
if (!R) return null;
|
|
1729
|
-
const
|
|
1730
|
-
return
|
|
1731
|
-
}
|
|
1732
|
-
function
|
|
1733
|
-
const
|
|
1734
|
-
if (!
|
|
1735
|
-
const { min: R, max:
|
|
1736
|
-
return !!(R &&
|
|
1737
|
-
}
|
|
1738
|
-
function
|
|
1739
|
-
const
|
|
1740
|
-
if (
|
|
1741
|
-
|
|
1752
|
+
const Y = dayjs(R, "YYYY-MM-DD", !0);
|
|
1753
|
+
return Y.isValid() ? d(Y, w) : null;
|
|
1754
|
+
}
|
|
1755
|
+
function E(v) {
|
|
1756
|
+
const w = D(v, a.value);
|
|
1757
|
+
if (!w) return !1;
|
|
1758
|
+
const { min: R, max: Y } = p.value;
|
|
1759
|
+
return !!(R && w.isBefore(R) || Y && w.isAfter(Y));
|
|
1760
|
+
}
|
|
1761
|
+
function B(v) {
|
|
1762
|
+
const w = v && typeof v == "object" && "value" in v ? v.value : v;
|
|
1763
|
+
if (w == null || w === "") {
|
|
1764
|
+
V.value = w, r("change", w);
|
|
1742
1765
|
return;
|
|
1743
1766
|
}
|
|
1744
|
-
if (i(),
|
|
1745
|
-
|
|
1767
|
+
if (i(), E(w)) {
|
|
1768
|
+
C.value = V.value;
|
|
1746
1769
|
return;
|
|
1747
1770
|
}
|
|
1748
|
-
|
|
1771
|
+
V.value = w, r("change", w);
|
|
1749
1772
|
}
|
|
1750
|
-
function
|
|
1751
|
-
|
|
1773
|
+
function N() {
|
|
1774
|
+
V.value = null, r("change", null);
|
|
1752
1775
|
}
|
|
1753
1776
|
onBeforeUnmount(() => {
|
|
1754
|
-
const
|
|
1755
|
-
|
|
1777
|
+
const v = a.value, w = C.value;
|
|
1778
|
+
w && (v === "year" ? e.row[e.column.field] = dayjs(w).format("YYYY年") : v === "month" ? e.row[e.column.field] = dayjs(w).format("YYYY年MM月") : v === "quarter" ? e.row[e.column.field] = dayjs(w).format("YYYY年第Q季度") : v === "week" ? e.row[e.column.field] = dayjs(w).format("YYYY年第WW周") : v === "datetime" ? e.row[e.column.field] = dayjs(w).format("YYYY-MM-DD HH:mm:ss") : v === "time" ? e.row[e.column.field] = dayjs(`1970-01-01 ${String(w)}`, "YYYY-MM-DD HH:mm:ss").format("HH:mm:ss") : e.row[e.column.field] = dayjs(w).format("YYYY-MM-DD"));
|
|
1756
1779
|
});
|
|
1757
|
-
function $(
|
|
1758
|
-
if (!
|
|
1759
|
-
const R = String(
|
|
1760
|
-
if (
|
|
1780
|
+
function $(v, w) {
|
|
1781
|
+
if (!v) return null;
|
|
1782
|
+
const R = String(v).trim();
|
|
1783
|
+
if (w === "month") {
|
|
1761
1784
|
if (/^\d{4}-\d{2}$/.test(R)) return `${R}-01`;
|
|
1762
|
-
const
|
|
1763
|
-
if (
|
|
1764
|
-
const H =
|
|
1765
|
-
return `${H}-${
|
|
1785
|
+
const M = R.match(/^(\d{4})年(\d{1,2})月$/);
|
|
1786
|
+
if (M) {
|
|
1787
|
+
const H = M[1], q = String(M[2]).padStart(2, "0");
|
|
1788
|
+
return `${H}-${q}-01`;
|
|
1766
1789
|
}
|
|
1767
1790
|
}
|
|
1768
1791
|
const T = {
|
|
@@ -1773,68 +1796,68 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1773
1796
|
month: "YYYY-MM",
|
|
1774
1797
|
quarter: "YYYY-Q",
|
|
1775
1798
|
year: "YYYY"
|
|
1776
|
-
}[
|
|
1799
|
+
}[w];
|
|
1777
1800
|
if (!T) throw new Error("Unsupported date type");
|
|
1778
|
-
let
|
|
1779
|
-
if (!
|
|
1780
|
-
const
|
|
1781
|
-
if (
|
|
1782
|
-
const [, H,
|
|
1783
|
-
|
|
1801
|
+
let P = dayjs(R, T);
|
|
1802
|
+
if (!P.isValid() && w === "week") {
|
|
1803
|
+
const M = R.match(/^(\d{4})年第(\d{1,2})周$/);
|
|
1804
|
+
if (M) {
|
|
1805
|
+
const [, H, q] = M;
|
|
1806
|
+
P = dayjs(`${H}-01-01`).isoWeek(Number(q));
|
|
1784
1807
|
}
|
|
1785
|
-
} else if (!
|
|
1786
|
-
const
|
|
1787
|
-
if (
|
|
1788
|
-
const [, H,
|
|
1789
|
-
|
|
1808
|
+
} else if (!P.isValid() && w === "quarter") {
|
|
1809
|
+
const M = R.match(/^(\d{4})年第(\d)季度$/);
|
|
1810
|
+
if (M) {
|
|
1811
|
+
const [, H, q] = M;
|
|
1812
|
+
P = dayjs(`${H}-01-01`).quarter(Number(q));
|
|
1790
1813
|
}
|
|
1791
|
-
} else if (!
|
|
1792
|
-
const
|
|
1793
|
-
|
|
1814
|
+
} else if (!P.isValid() && w === "year") {
|
|
1815
|
+
const M = R.match(/^(\d{4})年$/);
|
|
1816
|
+
M && (P = dayjs(`${M[1]}-01-01`));
|
|
1794
1817
|
}
|
|
1795
|
-
if (!
|
|
1796
|
-
const
|
|
1797
|
-
if (!
|
|
1798
|
-
|
|
1818
|
+
if (!P.isValid()) {
|
|
1819
|
+
const M = R instanceof Date ? dayjs(R) : dayjs(R);
|
|
1820
|
+
if (!M.isValid()) return null;
|
|
1821
|
+
P = M;
|
|
1799
1822
|
}
|
|
1800
|
-
return K(
|
|
1823
|
+
return K(P, w);
|
|
1801
1824
|
}
|
|
1802
|
-
function K(
|
|
1803
|
-
switch (
|
|
1825
|
+
function K(v, w) {
|
|
1826
|
+
switch (w) {
|
|
1804
1827
|
case "time":
|
|
1805
|
-
return
|
|
1828
|
+
return v.format("HH:mm:ss");
|
|
1806
1829
|
case "date":
|
|
1807
|
-
return
|
|
1830
|
+
return v.format("YYYY-MM-DD");
|
|
1808
1831
|
case "datetime":
|
|
1809
|
-
return
|
|
1832
|
+
return v.format("YYYY-MM-DD HH:mm:ss");
|
|
1810
1833
|
case "week":
|
|
1811
|
-
return
|
|
1834
|
+
return v.startOf("isoWeek").format("YYYY-MM-DD");
|
|
1812
1835
|
case "month":
|
|
1813
|
-
return
|
|
1836
|
+
return v.startOf("month").format("YYYY-MM-DD");
|
|
1814
1837
|
case "quarter":
|
|
1815
|
-
return
|
|
1838
|
+
return v.startOf("quarter").format("YYYY-MM-DD");
|
|
1816
1839
|
case "year":
|
|
1817
|
-
return
|
|
1840
|
+
return v.startOf("year").format("YYYY-MM-DD");
|
|
1818
1841
|
default:
|
|
1819
1842
|
return null;
|
|
1820
1843
|
}
|
|
1821
1844
|
}
|
|
1822
|
-
return (
|
|
1845
|
+
return (v, w) => {
|
|
1823
1846
|
const R = resolveComponent("vxe-input");
|
|
1824
1847
|
return openBlock(), createBlock(R, {
|
|
1825
|
-
modelValue:
|
|
1826
|
-
"onUpdate:modelValue":
|
|
1848
|
+
modelValue: C.value,
|
|
1849
|
+
"onUpdate:modelValue": w[0] || (w[0] = (Y) => C.value = Y),
|
|
1827
1850
|
type: a.value,
|
|
1828
1851
|
clearable: "",
|
|
1829
1852
|
transfer: "",
|
|
1830
1853
|
"label-format": o.value,
|
|
1831
1854
|
"min-date": s.value,
|
|
1832
|
-
"max-date":
|
|
1833
|
-
"disabled-method":
|
|
1855
|
+
"max-date": f.value,
|
|
1856
|
+
"disabled-method": b,
|
|
1834
1857
|
onFocus: i,
|
|
1835
1858
|
onClick: i,
|
|
1836
|
-
onChange:
|
|
1837
|
-
onClear:
|
|
1859
|
+
onChange: B,
|
|
1860
|
+
onClear: N
|
|
1838
1861
|
}, null, 8, ["modelValue", "type", "label-format", "min-date", "max-date"]);
|
|
1839
1862
|
};
|
|
1840
1863
|
}
|
|
@@ -1945,7 +1968,7 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1945
1968
|
t.row[t.column.field] = e.value;
|
|
1946
1969
|
const o = t.column.params.LabelStoreField;
|
|
1947
1970
|
if (o) {
|
|
1948
|
-
const i = (l = a.value.find((
|
|
1971
|
+
const i = (l = a.value.find((m) => m.value === e.value)) == null ? void 0 : l.label;
|
|
1949
1972
|
i !== void 0 ? t.row[o] = i : e.value === void 0 ? t.row[o] = null : e.value !== void 0 && i === void 0 && (t.row[o] = e.value);
|
|
1950
1973
|
}
|
|
1951
1974
|
}), (o, l) => (openBlock(), createBlock(unref(ElSelect), {
|
|
@@ -2004,7 +2027,7 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2004
2027
|
t.row[t.column.field] = o;
|
|
2005
2028
|
const l = t.column.params.LabelStoreField;
|
|
2006
2029
|
if (l) {
|
|
2007
|
-
const i = r.value.filter((
|
|
2030
|
+
const i = r.value.filter((m) => a.value.includes(m.value)).map((m) => m.label).join(",");
|
|
2008
2031
|
t.row[l] = i;
|
|
2009
2032
|
}
|
|
2010
2033
|
});
|
|
@@ -2066,20 +2089,20 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2066
2089
|
loading: !1
|
|
2067
2090
|
});
|
|
2068
2091
|
onBeforeUnmount(() => {
|
|
2069
|
-
const { StoredValueField: i, ReturnValueField:
|
|
2092
|
+
const { StoredValueField: i, ReturnValueField: m } = o;
|
|
2070
2093
|
i && i.length ? i.forEach((c, u) => {
|
|
2071
|
-
const
|
|
2072
|
-
|
|
2094
|
+
const _ = o.options.find((d) => d._value === a.value);
|
|
2095
|
+
_ && (r.row[c] = _[m[u]]);
|
|
2073
2096
|
}) : r.row[r.column.field] = a.value;
|
|
2074
2097
|
});
|
|
2075
2098
|
function l(i) {
|
|
2076
|
-
const { DataAPIOID:
|
|
2077
|
-
i ? (o.loading = !0, e("remoteMethod", { DataAPIOID:
|
|
2099
|
+
const { DataAPIOID: m, SearchField: c } = o;
|
|
2100
|
+
i ? (o.loading = !0, e("remoteMethod", { DataAPIOID: m, SearchField: c, query: i, params: o })) : r.row[r.column.field] = null;
|
|
2078
2101
|
}
|
|
2079
|
-
return (i,
|
|
2102
|
+
return (i, m) => (openBlock(), createBlock(unref(ElSelect), {
|
|
2080
2103
|
class: "z-1 vxe-table--ignore-clear",
|
|
2081
2104
|
modelValue: a.value,
|
|
2082
|
-
"onUpdate:modelValue":
|
|
2105
|
+
"onUpdate:modelValue": m[0] || (m[0] = (c) => a.value = c),
|
|
2083
2106
|
"allow-create": "",
|
|
2084
2107
|
"automatic-dropdown": "",
|
|
2085
2108
|
filterable: "",
|
|
@@ -2227,7 +2250,7 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2227
2250
|
indent: 12
|
|
2228
2251
|
}, {
|
|
2229
2252
|
label: withCtx(({ label: l, value: i }) => [
|
|
2230
|
-
createElementVNode("span", null, toDisplayString(n.column.params.options.find((
|
|
2253
|
+
createElementVNode("span", null, toDisplayString(n.column.params.options.find((m) => m[r.value.value] === i) ? l : ""), 1)
|
|
2231
2254
|
]),
|
|
2232
2255
|
_: 1
|
|
2233
2256
|
}, 8, ["modelValue", "data", "props"]));
|
|
@@ -2314,7 +2337,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2314
2337
|
function l() {
|
|
2315
2338
|
o("pageChange", e.pagination);
|
|
2316
2339
|
}
|
|
2317
|
-
return (i,
|
|
2340
|
+
return (i, m) => (openBlock(), createElementBlock("div", {
|
|
2318
2341
|
ref_key: "pagingDom",
|
|
2319
2342
|
ref: r,
|
|
2320
2343
|
class: "flex items-center w-full h-12 border border-solid border-[#e8eaec] box-border"
|
|
@@ -2324,9 +2347,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2324
2347
|
class: "w-full !h-full",
|
|
2325
2348
|
background: "",
|
|
2326
2349
|
"current-page": n.pagination.Page,
|
|
2327
|
-
"onUpdate:currentPage":
|
|
2350
|
+
"onUpdate:currentPage": m[0] || (m[0] = (c) => n.pagination.Page = c),
|
|
2328
2351
|
"page-size": n.pagination.PageSize,
|
|
2329
|
-
"onUpdate:pageSize":
|
|
2352
|
+
"onUpdate:pageSize": m[1] || (m[1] = (c) => n.pagination.PageSize = c),
|
|
2330
2353
|
total: n.pagination.Total,
|
|
2331
2354
|
layouts: a.value,
|
|
2332
2355
|
onPageChange: l,
|
|
@@ -2339,9 +2362,9 @@ function useFixedColumnPanel(n) {
|
|
|
2339
2362
|
function t() {
|
|
2340
2363
|
const l = n.value;
|
|
2341
2364
|
if (!l) return;
|
|
2342
|
-
const i = getFixableColumns(l),
|
|
2365
|
+
const i = getFixableColumns(l), m = new Map(i.map((d) => [d.field, d.fixed || ""])), c = i.filter((d) => m.get(d.field)).map((d) => d.field);
|
|
2343
2366
|
let u = "left";
|
|
2344
|
-
const
|
|
2367
|
+
const _ = `
|
|
2345
2368
|
<div style="padding:12px 14px;">
|
|
2346
2369
|
<div style="margin-bottom:10px;">
|
|
2347
2370
|
<label style="margin-right:12px;">
|
|
@@ -2353,12 +2376,12 @@ function useFixedColumnPanel(n) {
|
|
|
2353
2376
|
</div>
|
|
2354
2377
|
|
|
2355
2378
|
<div style="max-height:320px;overflow:auto;border:1px solid #eee;padding:8px;border-radius:6px;">
|
|
2356
|
-
${i.map((
|
|
2357
|
-
const
|
|
2379
|
+
${i.map((d) => {
|
|
2380
|
+
const k = String(d.title ?? d.field), p = c.includes(d.field) ? "checked" : "", s = m.get(d.field) === "left" ? "左固定" : m.get(d.field) === "right" ? "右固定" : "";
|
|
2358
2381
|
return `
|
|
2359
2382
|
<div style="display:flex;align-items:center;gap:8px;margin:6px 0;">
|
|
2360
|
-
<input type="checkbox" class="fix-col" value="${
|
|
2361
|
-
<span>${escapeHtml(
|
|
2383
|
+
<input type="checkbox" class="fix-col" value="${d.field}" ${p} />
|
|
2384
|
+
<span>${escapeHtml(k)}</span>
|
|
2362
2385
|
<span style="margin-left:auto;color:#999;font-size:12px;">${s}</span>
|
|
2363
2386
|
</div>
|
|
2364
2387
|
`;
|
|
@@ -2370,65 +2393,65 @@ function useFixedColumnPanel(n) {
|
|
|
2370
2393
|
type: 1,
|
|
2371
2394
|
title: "<b>固定列设置</b>",
|
|
2372
2395
|
area: ["520px", "520px"],
|
|
2373
|
-
content:
|
|
2396
|
+
content: _,
|
|
2374
2397
|
// 你想要的:不持久化,只要本次页面生效
|
|
2375
2398
|
btn: ["应用", "取消全部固定", "关闭"],
|
|
2376
|
-
success: function(
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
u =
|
|
2399
|
+
success: function(d) {
|
|
2400
|
+
d[0].querySelectorAll('input[name="fixSide"]').forEach((p) => {
|
|
2401
|
+
p.addEventListener("change", () => {
|
|
2402
|
+
u = p.value === "right" ? "right" : "left";
|
|
2380
2403
|
});
|
|
2381
2404
|
});
|
|
2382
2405
|
},
|
|
2383
2406
|
// 应用
|
|
2384
|
-
btn1: function(
|
|
2385
|
-
const
|
|
2407
|
+
btn1: function(d, k) {
|
|
2408
|
+
const p = Array.from(k[0].querySelectorAll("input.fix-col:checked")).map(
|
|
2386
2409
|
(s) => s.value
|
|
2387
2410
|
);
|
|
2388
|
-
applyFixed(l, i,
|
|
2411
|
+
applyFixed(l, i, p, u), window.layer.close(d);
|
|
2389
2412
|
},
|
|
2390
2413
|
// 取消全部固定
|
|
2391
|
-
btn2: function(
|
|
2392
|
-
return e(), window.layer.close(
|
|
2414
|
+
btn2: function(d) {
|
|
2415
|
+
return e(), window.layer.close(d), !1;
|
|
2393
2416
|
},
|
|
2394
2417
|
// 关闭
|
|
2395
|
-
btn3: function(
|
|
2396
|
-
window.layer.close(
|
|
2418
|
+
btn3: function(d) {
|
|
2419
|
+
window.layer.close(d);
|
|
2397
2420
|
}
|
|
2398
2421
|
});
|
|
2399
2422
|
}
|
|
2400
2423
|
function e() {
|
|
2401
|
-
var
|
|
2424
|
+
var m;
|
|
2402
2425
|
const l = n.value;
|
|
2403
2426
|
if (!l) return;
|
|
2404
2427
|
getFixableColumns(l).forEach((c) => {
|
|
2405
2428
|
var u;
|
|
2406
2429
|
return (u = l.setColumnFixed) == null ? void 0 : u.call(l, c, null);
|
|
2407
|
-
}), (
|
|
2430
|
+
}), (m = l.refreshColumn) == null || m.call(l);
|
|
2408
2431
|
}
|
|
2409
2432
|
function r(l) {
|
|
2410
2433
|
var u;
|
|
2411
2434
|
const i = n.value;
|
|
2412
2435
|
if (!i || !l) return;
|
|
2413
|
-
const
|
|
2414
|
-
c < 0 || (
|
|
2415
|
-
var
|
|
2416
|
-
(
|
|
2436
|
+
const m = getFixableColumns(i), c = o(m, l);
|
|
2437
|
+
c < 0 || (m.forEach((_, d) => {
|
|
2438
|
+
var k;
|
|
2439
|
+
(k = i.setColumnFixed) == null || k.call(i, _, d <= c ? "left" : null);
|
|
2417
2440
|
}), (u = i.refreshColumn) == null || u.call(i));
|
|
2418
2441
|
}
|
|
2419
2442
|
function a(l) {
|
|
2420
2443
|
var u;
|
|
2421
2444
|
const i = n.value;
|
|
2422
2445
|
if (!i || !l) return;
|
|
2423
|
-
const
|
|
2424
|
-
c < 0 || (
|
|
2425
|
-
var
|
|
2426
|
-
(
|
|
2446
|
+
const m = getFixableColumns(i), c = o(m, l);
|
|
2447
|
+
c < 0 || (m.forEach((_, d) => {
|
|
2448
|
+
var k;
|
|
2449
|
+
(k = i.setColumnFixed) == null || k.call(i, _, d >= c ? "right" : null);
|
|
2427
2450
|
}), (u = i.refreshColumn) == null || u.call(i));
|
|
2428
2451
|
}
|
|
2429
2452
|
function o(l, i) {
|
|
2430
|
-
const
|
|
2431
|
-
return
|
|
2453
|
+
const m = (i == null ? void 0 : i.field) || (i == null ? void 0 : i.property);
|
|
2454
|
+
return m ? l.findIndex((c) => ((c == null ? void 0 : c.field) || (c == null ? void 0 : c.property)) === m) : -1;
|
|
2432
2455
|
}
|
|
2433
2456
|
return {
|
|
2434
2457
|
openFixPanel: t,
|
|
@@ -2500,54 +2523,54 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2500
2523
|
"tableSelectRemote"
|
|
2501
2524
|
],
|
|
2502
2525
|
setup(n, { expose: t, emit: e }) {
|
|
2503
|
-
const r = n, a = e, o = ref(), { openFixPanel: l, clearAllFixed: i, freezeToLeft:
|
|
2526
|
+
const r = n, a = e, o = ref(), { openFixPanel: l, clearAllFixed: i, freezeToLeft: m, freezeToRight: c } = useFixedColumnPanel(o), u = reactive(r.config);
|
|
2504
2527
|
reactive(r.config.columns);
|
|
2505
|
-
let
|
|
2528
|
+
let _ = ref(!1), d = null;
|
|
2506
2529
|
onMounted(() => {
|
|
2507
2530
|
document.addEventListener("click", Z, !0);
|
|
2508
2531
|
}), onBeforeUnmount(() => {
|
|
2509
2532
|
document.removeEventListener("click", Z, !0), Q();
|
|
2510
2533
|
});
|
|
2511
2534
|
const {
|
|
2512
|
-
CheckboxRender:
|
|
2513
|
-
ColorPickerRender:
|
|
2535
|
+
CheckboxRender: k,
|
|
2536
|
+
ColorPickerRender: p,
|
|
2514
2537
|
IconPickerRender: s,
|
|
2515
|
-
RadioRender:
|
|
2516
|
-
ProgressRender:
|
|
2517
|
-
ActionRender:
|
|
2518
|
-
SelectRender:
|
|
2519
|
-
TreeSelectRender:
|
|
2520
|
-
SelectMultipleRender:
|
|
2521
|
-
TreeMultipleSelectRender:
|
|
2522
|
-
ChooseFrameRender:
|
|
2538
|
+
RadioRender: f,
|
|
2539
|
+
ProgressRender: b,
|
|
2540
|
+
ActionRender: C,
|
|
2541
|
+
SelectRender: V,
|
|
2542
|
+
TreeSelectRender: D,
|
|
2543
|
+
SelectMultipleRender: E,
|
|
2544
|
+
TreeMultipleSelectRender: B,
|
|
2545
|
+
ChooseFrameRender: N,
|
|
2523
2546
|
PickPeopleRender: $,
|
|
2524
2547
|
FileRender: K,
|
|
2525
|
-
CustomRender:
|
|
2526
|
-
DatePickerRender:
|
|
2548
|
+
CustomRender: v,
|
|
2549
|
+
DatePickerRender: w,
|
|
2527
2550
|
LabelRender: R
|
|
2528
2551
|
} = comps$1, {
|
|
2529
|
-
InputEditor:
|
|
2552
|
+
InputEditor: Y,
|
|
2530
2553
|
TreeSelectEditor: T,
|
|
2531
|
-
SelectEditor:
|
|
2532
|
-
TextareaEditor:
|
|
2554
|
+
SelectEditor: P,
|
|
2555
|
+
TextareaEditor: M,
|
|
2533
2556
|
DatePickerEditor: H,
|
|
2534
|
-
SelectMultipleEditor:
|
|
2557
|
+
SelectMultipleEditor: q,
|
|
2535
2558
|
TreeMultipleSelectEditor: te,
|
|
2536
2559
|
InputNumberEditor: le,
|
|
2537
2560
|
SelectRemoteEditor: oe
|
|
2538
2561
|
} = comps, re = computed(() => {
|
|
2539
|
-
var
|
|
2540
|
-
return ((((
|
|
2562
|
+
var y, x;
|
|
2563
|
+
return ((((y = r.pagination) == null ? void 0 : y.Page) || 1) - 1) * (((x = r.pagination) == null ? void 0 : x.PageSize) || 1e3);
|
|
2541
2564
|
}), J = computed(() => {
|
|
2542
|
-
var
|
|
2565
|
+
var x, g, h, S;
|
|
2543
2566
|
if (u.Number)
|
|
2544
2567
|
if (u.columns.some(
|
|
2545
|
-
(O) => O.type === "seq" || O.children && O.children.some((
|
|
2568
|
+
(O) => O.type === "seq" || O.children && O.children.some((F) => F.type === "seq")
|
|
2546
2569
|
))
|
|
2547
|
-
u.columns = u.columns.filter((O) => O.type === "seq" ? !1 : O.children ? (O.children = O.children.filter((
|
|
2570
|
+
u.columns = u.columns.filter((O) => O.type === "seq" ? !1 : O.children ? (O.children = O.children.filter((F) => F.type !== "seq"), O.children.length > 0) : !0);
|
|
2548
2571
|
else {
|
|
2549
2572
|
let O = u.columns.find((I) => ["left", "right"].includes(I.fixed));
|
|
2550
|
-
const
|
|
2573
|
+
const F = {
|
|
2551
2574
|
slots: {},
|
|
2552
2575
|
params: {},
|
|
2553
2576
|
type: "seq",
|
|
@@ -2556,10 +2579,10 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2556
2579
|
width: 50,
|
|
2557
2580
|
fixed: O || void 0
|
|
2558
2581
|
};
|
|
2559
|
-
u.columns.unshift(
|
|
2582
|
+
u.columns.unshift(F);
|
|
2560
2583
|
}
|
|
2561
2584
|
if (r.config.AutoFullWidth) {
|
|
2562
|
-
const O = X(r.config.columns || []).filter((z) => !z.children),
|
|
2585
|
+
const O = X(r.config.columns || []).filter((z) => !z.children), F = O.reduce((z, U) => {
|
|
2563
2586
|
let A = Number(U.width);
|
|
2564
2587
|
return z + (isNaN(A) ? 100 : A);
|
|
2565
2588
|
}, 0), I = (z = 0) => {
|
|
@@ -2569,18 +2592,18 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2569
2592
|
return;
|
|
2570
2593
|
}
|
|
2571
2594
|
const U = o.value.$el.clientWidth;
|
|
2572
|
-
|
|
2595
|
+
F !== U && O.forEach((A) => {
|
|
2573
2596
|
let W = Number(A.width);
|
|
2574
|
-
A.width = Number(((isNaN(W) ? 100 : W) * (U /
|
|
2597
|
+
A.width = Number(((isNaN(W) ? 100 : W) * (U / F)).toFixed(0));
|
|
2575
2598
|
});
|
|
2576
2599
|
};
|
|
2577
2600
|
I();
|
|
2578
2601
|
}
|
|
2579
|
-
let
|
|
2602
|
+
let y = {
|
|
2580
2603
|
keepSource: !0,
|
|
2581
2604
|
showOverflow: "title",
|
|
2582
2605
|
seqConfig: {
|
|
2583
|
-
seqMethod: (
|
|
2606
|
+
seqMethod: (j) => re.value + j.$rowIndex + 1
|
|
2584
2607
|
},
|
|
2585
2608
|
exportConfig: {},
|
|
2586
2609
|
importConfig: {},
|
|
@@ -2589,7 +2612,7 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2589
2612
|
...r.config,
|
|
2590
2613
|
// data: [...props.data], //不需要开启,目前是通过异步加载数据,开启会导致数据被当前配置覆盖
|
|
2591
2614
|
// ✅ 关键:开启“单元格选中”,才会出现 col--selected / col--current 等 class
|
|
2592
|
-
mouseConfig: r.dblEditEnabled ? { selected: !0 } : (
|
|
2615
|
+
mouseConfig: r.dblEditEnabled ? { selected: !0 } : (x = r.config) == null ? void 0 : x.mouseConfig,
|
|
2593
2616
|
// ✅ 开单元格高亮(不同版本字段名可能是 highlightCell)
|
|
2594
2617
|
highlightCell: !0,
|
|
2595
2618
|
highlightCurrentRow: !0,
|
|
@@ -2601,22 +2624,22 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2601
2624
|
// 只对 keep-source 开启有效,是否显示单元格新增与修改状态
|
|
2602
2625
|
showIcon: !1,
|
|
2603
2626
|
// 因为对过滤行进行了修改 该属性必须为false
|
|
2604
|
-
...(
|
|
2627
|
+
...(g = r.config) == null ? void 0 : g.editConfig,
|
|
2605
2628
|
// ⭐ 最终由父组件 dblEditEnabled 决定
|
|
2606
|
-
trigger: r.dblEditEnabled ? "dblclick" : ((
|
|
2629
|
+
trigger: r.dblEditEnabled ? "dblclick" : ((S = (h = r.config) == null ? void 0 : h.editConfig) == null ? void 0 : S.trigger) || "click"
|
|
2607
2630
|
},
|
|
2608
2631
|
showFooter: u["Total-Row"],
|
|
2609
2632
|
// 启用表尾统计
|
|
2610
2633
|
// showFooter: true, // 启用统计行
|
|
2611
|
-
footerMethod({ columns:
|
|
2612
|
-
var
|
|
2613
|
-
if (!(!u["Total-Field"] || !((
|
|
2634
|
+
footerMethod({ columns: j, data: O }) {
|
|
2635
|
+
var F;
|
|
2636
|
+
if (!(!u["Total-Field"] || !((F = u["Total-Field"]) != null && F.length)))
|
|
2614
2637
|
return [
|
|
2615
|
-
|
|
2638
|
+
j.map((I, z) => z == 0 || (typeof u["Total-Field"] == "string" ? I.field === u["Total-Field"] : Array.isArray(u["Total-Field"]) && u["Total-Field"].includes(I.field)) ? z === 0 ? "合计" : u["Total-Field"].includes(I.field) ? ee(O, I.field).toLocaleString("zh-CN") : "" : void 0)
|
|
2616
2639
|
];
|
|
2617
2640
|
}
|
|
2618
2641
|
};
|
|
2619
|
-
return u.BodyMenu && (
|
|
2642
|
+
return u.BodyMenu && (y.menuConfig = {
|
|
2620
2643
|
body: {
|
|
2621
2644
|
options: [[
|
|
2622
2645
|
{ type: "print", name: "打印", prefixConfig: { icon: "vxe-icon-print" } },
|
|
@@ -2624,72 +2647,72 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2624
2647
|
{ type: "myBtn2", name: "导出全部", prefixConfig: { icon: "vxe-icon-send-fill" } }
|
|
2625
2648
|
]]
|
|
2626
2649
|
}
|
|
2627
|
-
}),
|
|
2650
|
+
}), y;
|
|
2628
2651
|
}), G = ref(!1);
|
|
2629
|
-
let
|
|
2630
|
-
function ne(
|
|
2631
|
-
const
|
|
2632
|
-
if (!
|
|
2633
|
-
const
|
|
2634
|
-
if (
|
|
2635
|
-
const
|
|
2636
|
-
if (
|
|
2637
|
-
return Array.from(
|
|
2652
|
+
let L = null;
|
|
2653
|
+
function ne(y) {
|
|
2654
|
+
const x = y.clipboardData;
|
|
2655
|
+
if (!x) return null;
|
|
2656
|
+
const g = x.getData("text/html");
|
|
2657
|
+
if (g && /<table/i.test(g)) {
|
|
2658
|
+
const F = new DOMParser().parseFromString(g, "text/html").querySelector("table");
|
|
2659
|
+
if (F)
|
|
2660
|
+
return Array.from(F.querySelectorAll("tr")).map((z) => Array.from(z.querySelectorAll("th,td")).map((A) => (Array.from(A.querySelectorAll("br")).forEach((W) => W.replaceWith(`
|
|
2638
2661
|
`)), (A.textContent || "").replace(/\u00A0/g, " ").trimEnd())));
|
|
2639
2662
|
}
|
|
2640
|
-
const
|
|
2641
|
-
if (!
|
|
2642
|
-
const
|
|
2663
|
+
const h = x.getData("text/plain") || "";
|
|
2664
|
+
if (!h) return null;
|
|
2665
|
+
const j = h.replace(/\r\n/g, `
|
|
2643
2666
|
`).replace(/\r/g, `
|
|
2644
2667
|
`).split(`
|
|
2645
2668
|
`);
|
|
2646
|
-
for (;
|
|
2647
|
-
return
|
|
2669
|
+
for (; j.length && j[j.length - 1] === ""; ) j.pop();
|
|
2670
|
+
return j.map((O) => O.split(" "));
|
|
2648
2671
|
}
|
|
2649
2672
|
function ae() {
|
|
2650
|
-
|
|
2651
|
-
var
|
|
2673
|
+
L || (L = (y) => {
|
|
2674
|
+
var g, h, S;
|
|
2652
2675
|
if (!G.value) return;
|
|
2653
|
-
|
|
2654
|
-
const
|
|
2655
|
-
|
|
2656
|
-
}, window.addEventListener("paste",
|
|
2676
|
+
y.preventDefault(), y.stopPropagation(), (g = y.stopImmediatePropagation) == null || g.call(y);
|
|
2677
|
+
const x = ne(y);
|
|
2678
|
+
x && ((S = (h = r.gridRef) == null ? void 0 : h.onGridPaste) == null || S.call(h, x));
|
|
2679
|
+
}, window.addEventListener("paste", L, !0));
|
|
2657
2680
|
}
|
|
2658
2681
|
function Q() {
|
|
2659
|
-
|
|
2682
|
+
L && (window.removeEventListener("paste", L, !0), L = null);
|
|
2660
2683
|
}
|
|
2661
2684
|
const ie = {
|
|
2662
2685
|
//设置表头右键 存储当前列信息
|
|
2663
|
-
headerCellMenu({ column:
|
|
2664
|
-
|
|
2686
|
+
headerCellMenu({ column: y }) {
|
|
2687
|
+
d = y;
|
|
2665
2688
|
},
|
|
2666
|
-
cellMenu({ row:
|
|
2667
|
-
const
|
|
2668
|
-
|
|
2689
|
+
cellMenu({ row: y }) {
|
|
2690
|
+
const x = o.value;
|
|
2691
|
+
x && x.setCurrentRow(y);
|
|
2669
2692
|
},
|
|
2670
2693
|
//单击事件 设置选中行和选择单元格
|
|
2671
|
-
cellClick({ row:
|
|
2672
|
-
var
|
|
2673
|
-
const
|
|
2674
|
-
|
|
2694
|
+
cellClick({ row: y, column: x }) {
|
|
2695
|
+
var h, S;
|
|
2696
|
+
const g = o.value;
|
|
2697
|
+
g && ((h = g.setCurrentCell) == null || h.call(g, y, x.field), g.currentCell = x, (S = g.setCurrentRow) == null || S.call(g, y));
|
|
2675
2698
|
},
|
|
2676
2699
|
//双击事件 设置选中行和选择单元格
|
|
2677
|
-
cellDblclick({ row:
|
|
2678
|
-
var
|
|
2679
|
-
const
|
|
2680
|
-
|
|
2700
|
+
cellDblclick({ row: y, column: x }) {
|
|
2701
|
+
var h, S;
|
|
2702
|
+
const g = o.value;
|
|
2703
|
+
g && ((h = g.setCurrentCell) == null || h.call(g, y, x.field), (S = g.setCurrentRow) == null || S.call(g, y));
|
|
2681
2704
|
},
|
|
2682
|
-
async menuClick({ menu:
|
|
2683
|
-
const
|
|
2684
|
-
if (
|
|
2685
|
-
switch (
|
|
2705
|
+
async menuClick({ menu: y }) {
|
|
2706
|
+
const x = o.value;
|
|
2707
|
+
if (x)
|
|
2708
|
+
switch (y.code) {
|
|
2686
2709
|
case "reload":
|
|
2687
|
-
const
|
|
2688
|
-
r.gridRef.echoData(), layer.close(
|
|
2710
|
+
const g = layer.load(2, { shade: [0.5, "#fff"] });
|
|
2711
|
+
r.gridRef.echoData(), layer.close(g);
|
|
2689
2712
|
break;
|
|
2690
2713
|
case "Print":
|
|
2691
|
-
|
|
2692
|
-
columns:
|
|
2714
|
+
x.print({
|
|
2715
|
+
columns: x.getColumns().filter((j) => j.type !== "action" && j.type !== "checkbox"),
|
|
2693
2716
|
pageHeader: [{ text: r.config.PageName, align: "center" }],
|
|
2694
2717
|
// 目前无效
|
|
2695
2718
|
pageFooter: [{ text: "第 {pageNum} 页 共 {totalPage} 页", align: "center" }]
|
|
@@ -2697,30 +2720,33 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2697
2720
|
});
|
|
2698
2721
|
break;
|
|
2699
2722
|
case "exportCurrent":
|
|
2700
|
-
|
|
2701
|
-
|
|
2723
|
+
let h = (x == null ? void 0 : x.getTableData().tableData) || [];
|
|
2724
|
+
h = h.map((j) => {
|
|
2725
|
+
const { children: O, ...F } = j;
|
|
2726
|
+
return F;
|
|
2727
|
+
}), x.exportData({
|
|
2702
2728
|
type: "csv",
|
|
2703
2729
|
isHeader: !0,
|
|
2704
2730
|
isFooter: !1,
|
|
2705
|
-
columns:
|
|
2731
|
+
columns: x.getColumns().filter((j) => j.type !== "action" && j.type !== "checkbox"),
|
|
2706
2732
|
// 过滤出不需要导出的列
|
|
2707
2733
|
filename: `${r.config.PageName}(${H_getISODate(/* @__PURE__ */ new Date())})`,
|
|
2708
2734
|
// 文件名
|
|
2709
|
-
data:
|
|
2735
|
+
data: h
|
|
2710
2736
|
// 当前页数据
|
|
2711
2737
|
});
|
|
2712
2738
|
break;
|
|
2713
2739
|
case "exportAll":
|
|
2714
|
-
let
|
|
2715
|
-
|
|
2740
|
+
let S = await r.gridRef.handleExport();
|
|
2741
|
+
x.exportData({
|
|
2716
2742
|
type: "csv",
|
|
2717
2743
|
isHeader: !0,
|
|
2718
2744
|
isFooter: !0,
|
|
2719
|
-
columns:
|
|
2745
|
+
columns: x.getColumns().filter((j) => j.type !== "action" && j.type !== "checkbox" && j.type !== "seq"),
|
|
2720
2746
|
// 过滤出不需要导出的列
|
|
2721
2747
|
filename: `${r.config.PageName == "" ? "导出" : r.config.PageName}(${H_getISODate(/* @__PURE__ */ new Date())})`,
|
|
2722
2748
|
// 文件名
|
|
2723
|
-
data:
|
|
2749
|
+
data: S
|
|
2724
2750
|
});
|
|
2725
2751
|
break;
|
|
2726
2752
|
case "OpenCopy":
|
|
@@ -2736,110 +2762,110 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2736
2762
|
i();
|
|
2737
2763
|
break;
|
|
2738
2764
|
case "freezeLeftTo":
|
|
2739
|
-
d
|
|
2765
|
+
m(d);
|
|
2740
2766
|
break;
|
|
2741
2767
|
case "freezeRightTo":
|
|
2742
|
-
c(
|
|
2768
|
+
c(d);
|
|
2743
2769
|
break;
|
|
2744
2770
|
}
|
|
2745
2771
|
}
|
|
2746
2772
|
};
|
|
2747
|
-
function ue(
|
|
2748
|
-
a("ActionClick",
|
|
2773
|
+
function ue(y) {
|
|
2774
|
+
a("ActionClick", y);
|
|
2749
2775
|
}
|
|
2750
|
-
function ce(...
|
|
2751
|
-
a("PageChange", ...
|
|
2776
|
+
function ce(...y) {
|
|
2777
|
+
a("PageChange", ...y);
|
|
2752
2778
|
}
|
|
2753
|
-
function se(...
|
|
2754
|
-
a("Refresh", ...
|
|
2779
|
+
function se(...y) {
|
|
2780
|
+
a("Refresh", ...y);
|
|
2755
2781
|
}
|
|
2756
|
-
function de(...
|
|
2757
|
-
a("FilterSearch", ...
|
|
2782
|
+
function de(...y) {
|
|
2783
|
+
a("FilterSearch", ...y);
|
|
2758
2784
|
}
|
|
2759
|
-
function fe(...
|
|
2760
|
-
a("SortChange", ...
|
|
2785
|
+
function fe(...y) {
|
|
2786
|
+
a("SortChange", ...y);
|
|
2761
2787
|
}
|
|
2762
|
-
function me(...
|
|
2763
|
-
a("ActionRenderBefore", ...
|
|
2788
|
+
function me(...y) {
|
|
2789
|
+
a("ActionRenderBefore", ...y);
|
|
2764
2790
|
}
|
|
2765
|
-
function pe(...
|
|
2766
|
-
a("FileClick", ...
|
|
2791
|
+
function pe(...y) {
|
|
2792
|
+
a("FileClick", ...y);
|
|
2767
2793
|
}
|
|
2768
|
-
function ge(
|
|
2769
|
-
|
|
2794
|
+
function ge(y, x, g) {
|
|
2795
|
+
y.column = x, y.row = g, a("tableSelectRemote", y);
|
|
2770
2796
|
}
|
|
2771
|
-
function _e(...
|
|
2772
|
-
a("tableSelectChange", ...
|
|
2797
|
+
function _e(...y) {
|
|
2798
|
+
a("tableSelectChange", ...y);
|
|
2773
2799
|
}
|
|
2774
|
-
function
|
|
2775
|
-
a("RemoteMethod", ...
|
|
2800
|
+
function he(...y) {
|
|
2801
|
+
a("RemoteMethod", ...y);
|
|
2776
2802
|
}
|
|
2777
|
-
function
|
|
2778
|
-
a("ChooseBefor", ...
|
|
2803
|
+
function ve(...y) {
|
|
2804
|
+
a("ChooseBefor", ...y);
|
|
2779
2805
|
}
|
|
2780
|
-
function be(...
|
|
2781
|
-
a("PickPeople", ...
|
|
2806
|
+
function be(...y) {
|
|
2807
|
+
a("PickPeople", ...y);
|
|
2782
2808
|
}
|
|
2783
|
-
function ye(...
|
|
2784
|
-
a("CheckboxChange", ...
|
|
2809
|
+
function ye(...y) {
|
|
2810
|
+
a("CheckboxChange", ...y);
|
|
2785
2811
|
}
|
|
2786
|
-
function X(
|
|
2787
|
-
return
|
|
2788
|
-
|
|
2789
|
-
}),
|
|
2812
|
+
function X(y, x = "children", g = []) {
|
|
2813
|
+
return y.forEach((h) => {
|
|
2814
|
+
g.push(h), h[x] && h[x].length > 0 && X(h[x], x, g);
|
|
2815
|
+
}), g;
|
|
2790
2816
|
}
|
|
2791
|
-
const ke = ({ menu:
|
|
2792
|
-
var
|
|
2793
|
-
|
|
2794
|
-
}, we = (
|
|
2795
|
-
|
|
2796
|
-
let
|
|
2797
|
-
u.columns.splice((
|
|
2817
|
+
const ke = ({ menu: y }) => {
|
|
2818
|
+
var x, g;
|
|
2819
|
+
y.type == "print" ? (x = o.value) == null || x.openPrint() : y.type == "export" && ((g = o.value) == null || g.openExport());
|
|
2820
|
+
}, we = (y) => {
|
|
2821
|
+
_.value = !0;
|
|
2822
|
+
let x = u.columns.splice(y._index.oldIndex, 1)[0];
|
|
2823
|
+
u.columns.splice((y._index.newIndex || 1) - 1, 0, x);
|
|
2798
2824
|
};
|
|
2799
|
-
function Z(
|
|
2800
|
-
const
|
|
2801
|
-
if (!
|
|
2802
|
-
const
|
|
2803
|
-
if (!
|
|
2804
|
-
const
|
|
2805
|
-
|
|
2806
|
-
}
|
|
2807
|
-
function ee(
|
|
2808
|
-
if (!(
|
|
2809
|
-
function
|
|
2810
|
-
let
|
|
2811
|
-
function O(
|
|
2825
|
+
function Z(y) {
|
|
2826
|
+
const x = y.target.closest("tr.vxe-body--row");
|
|
2827
|
+
if (!x || !(o != null && o.value)) return;
|
|
2828
|
+
const g = x.getAttribute("rowid");
|
|
2829
|
+
if (!g) return;
|
|
2830
|
+
const h = o.value.getRowById(g);
|
|
2831
|
+
h && o.value.setCurrentRow(h);
|
|
2832
|
+
}
|
|
2833
|
+
function ee(y, x) {
|
|
2834
|
+
if (!(y instanceof Array)) return 0;
|
|
2835
|
+
function g(h, S) {
|
|
2836
|
+
let j = 0;
|
|
2837
|
+
function O(F) {
|
|
2812
2838
|
var I;
|
|
2813
|
-
if (((I =
|
|
2814
|
-
for (const z of
|
|
2839
|
+
if (((I = F.children) == null ? void 0 : I.length) > 0)
|
|
2840
|
+
for (const z of F.children)
|
|
2815
2841
|
O(z);
|
|
2816
2842
|
else
|
|
2817
|
-
|
|
2843
|
+
j = H_calculate(`${j}+${F[S] || 0}`);
|
|
2818
2844
|
}
|
|
2819
|
-
return O(
|
|
2845
|
+
return O(h), j;
|
|
2820
2846
|
}
|
|
2821
|
-
return
|
|
2822
|
-
var
|
|
2823
|
-
if (!(
|
|
2824
|
-
return H_calculate(`${
|
|
2825
|
-
if (((
|
|
2826
|
-
return H_calculate(`${
|
|
2827
|
-
if (((O =
|
|
2828
|
-
let
|
|
2829
|
-
return H_calculate(`${
|
|
2847
|
+
return y.reduce((h, S) => {
|
|
2848
|
+
var j, O;
|
|
2849
|
+
if (!(S != null && S.children))
|
|
2850
|
+
return H_calculate(`${h}+${Number(S[x]) || 0}`);
|
|
2851
|
+
if (((j = S.children) == null ? void 0 : j.length) === 0 && (S.ParentOID === "00000000-0000-0000-0000-000000000000" || S.ParentOID === null))
|
|
2852
|
+
return H_calculate(`${h}+${Number(S[x]) || 0}`);
|
|
2853
|
+
if (((O = S.children) == null ? void 0 : O.length) > 0 && (S.ParentOID === "00000000-0000-0000-0000-000000000000" || S.ParentOID === null)) {
|
|
2854
|
+
let F = g(S, x);
|
|
2855
|
+
return H_calculate(`${h}+${F}`);
|
|
2830
2856
|
}
|
|
2831
|
-
return
|
|
2857
|
+
return h;
|
|
2832
2858
|
}, 0);
|
|
2833
2859
|
}
|
|
2834
2860
|
return watch(
|
|
2835
2861
|
() => r.dblEditEnabled,
|
|
2836
|
-
async (
|
|
2837
|
-
var
|
|
2838
|
-
if (!
|
|
2862
|
+
async (y) => {
|
|
2863
|
+
var x, g, h;
|
|
2864
|
+
if (!y) {
|
|
2839
2865
|
await nextTick();
|
|
2840
|
-
const
|
|
2841
|
-
if (!
|
|
2842
|
-
(
|
|
2866
|
+
const S = o.value;
|
|
2867
|
+
if (!S) return;
|
|
2868
|
+
(x = S.clearEdit) == null || x.call(S), (g = S.clearSelected) == null || g.call(S), (h = S.clearCurrentRow) == null || h.call(S);
|
|
2843
2869
|
}
|
|
2844
2870
|
},
|
|
2845
2871
|
{ immediate: !0 }
|
|
@@ -2847,215 +2873,215 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2847
2873
|
gridRef: o,
|
|
2848
2874
|
getFieldTotal: ee,
|
|
2849
2875
|
gridOptions: J
|
|
2850
|
-
}), (
|
|
2876
|
+
}), (y, x) => (openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
2851
2877
|
createVNode(unref(VxeGrid), mergeProps({
|
|
2852
2878
|
class: ["grid-table", { "dbl-edit-on": r.dblEditEnabled }],
|
|
2853
2879
|
ref_key: "gridRef",
|
|
2854
2880
|
ref: o
|
|
2855
|
-
}, { ...J.value, ...
|
|
2881
|
+
}, { ...J.value, ...y.$attrs }, toHandlers(ie), {
|
|
2856
2882
|
onMenuClick: ke,
|
|
2857
2883
|
onColumnDragend: we,
|
|
2858
2884
|
"show-overflow": "tooltip",
|
|
2859
2885
|
onCheckboxChange: ye
|
|
2860
2886
|
}), {
|
|
2861
|
-
FilterRows: withCtx(({ column:
|
|
2887
|
+
FilterRows: withCtx(({ column: g }) => [
|
|
2862
2888
|
createVNode(_sfc_main$t, {
|
|
2863
|
-
column:
|
|
2889
|
+
column: g,
|
|
2864
2890
|
"grid-ref": o.value,
|
|
2865
2891
|
onFilterSearch: de,
|
|
2866
2892
|
onSortChange: fe
|
|
2867
2893
|
}, null, 8, ["column", "grid-ref"])
|
|
2868
2894
|
]),
|
|
2869
|
-
ActionRender: withCtx(({ row:
|
|
2870
|
-
createVNode(unref(
|
|
2871
|
-
row:
|
|
2872
|
-
column:
|
|
2895
|
+
ActionRender: withCtx(({ row: g, column: h }) => [
|
|
2896
|
+
createVNode(unref(C), {
|
|
2897
|
+
row: g,
|
|
2898
|
+
column: h,
|
|
2873
2899
|
"grid-ref": o.value,
|
|
2874
2900
|
onActionClick: ue,
|
|
2875
2901
|
onActionRenderBefore: me
|
|
2876
2902
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2877
2903
|
]),
|
|
2878
|
-
RadioRender: withCtx(({ row:
|
|
2879
|
-
createVNode(unref(
|
|
2880
|
-
row:
|
|
2881
|
-
column:
|
|
2904
|
+
RadioRender: withCtx(({ row: g, column: h }) => [
|
|
2905
|
+
createVNode(unref(f), {
|
|
2906
|
+
row: g,
|
|
2907
|
+
column: h,
|
|
2882
2908
|
"grid-ref": o.value
|
|
2883
2909
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2884
2910
|
]),
|
|
2885
|
-
CheckboxRender: withCtx(({ row:
|
|
2886
|
-
createVNode(unref(
|
|
2887
|
-
row:
|
|
2888
|
-
column:
|
|
2911
|
+
CheckboxRender: withCtx(({ row: g, column: h }) => [
|
|
2912
|
+
createVNode(unref(k), {
|
|
2913
|
+
row: g,
|
|
2914
|
+
column: h,
|
|
2889
2915
|
"grid-ref": o.value
|
|
2890
2916
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2891
2917
|
]),
|
|
2892
|
-
ColorPickerRender: withCtx(({ row:
|
|
2893
|
-
createVNode(unref(
|
|
2894
|
-
row:
|
|
2895
|
-
column:
|
|
2918
|
+
ColorPickerRender: withCtx(({ row: g, column: h }) => [
|
|
2919
|
+
createVNode(unref(p), {
|
|
2920
|
+
row: g,
|
|
2921
|
+
column: h,
|
|
2896
2922
|
"grid-ref": o.value
|
|
2897
2923
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2898
2924
|
]),
|
|
2899
|
-
IconPickerRender: withCtx(({ row:
|
|
2925
|
+
IconPickerRender: withCtx(({ row: g, column: h }) => [
|
|
2900
2926
|
createVNode(unref(s), {
|
|
2901
|
-
row:
|
|
2902
|
-
column:
|
|
2927
|
+
row: g,
|
|
2928
|
+
column: h,
|
|
2903
2929
|
"grid-ref": o.value
|
|
2904
2930
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2905
2931
|
]),
|
|
2906
|
-
ProgressRender: withCtx(({ row:
|
|
2907
|
-
createVNode(unref(
|
|
2908
|
-
row:
|
|
2909
|
-
column:
|
|
2932
|
+
ProgressRender: withCtx(({ row: g, column: h }) => [
|
|
2933
|
+
createVNode(unref(b), {
|
|
2934
|
+
row: g,
|
|
2935
|
+
column: h,
|
|
2910
2936
|
"grid-ref": o.value
|
|
2911
2937
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2912
2938
|
]),
|
|
2913
|
-
SelectRender: withCtx(({ row:
|
|
2914
|
-
createVNode(unref(
|
|
2915
|
-
row:
|
|
2916
|
-
column:
|
|
2939
|
+
SelectRender: withCtx(({ row: g, column: h }) => [
|
|
2940
|
+
createVNode(unref(V), {
|
|
2941
|
+
row: g,
|
|
2942
|
+
column: h,
|
|
2917
2943
|
"grid-ref": o.value
|
|
2918
2944
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2919
2945
|
]),
|
|
2920
|
-
SelectMultipleRender: withCtx(({ row:
|
|
2921
|
-
createVNode(unref(
|
|
2922
|
-
row:
|
|
2923
|
-
column:
|
|
2946
|
+
SelectMultipleRender: withCtx(({ row: g, column: h }) => [
|
|
2947
|
+
createVNode(unref(E), {
|
|
2948
|
+
row: g,
|
|
2949
|
+
column: h,
|
|
2924
2950
|
"grid-ref": o.value
|
|
2925
2951
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2926
2952
|
]),
|
|
2927
|
-
TreeSelectRender: withCtx(({ row:
|
|
2928
|
-
createVNode(unref(
|
|
2929
|
-
row:
|
|
2930
|
-
column:
|
|
2953
|
+
TreeSelectRender: withCtx(({ row: g, column: h }) => [
|
|
2954
|
+
createVNode(unref(D), {
|
|
2955
|
+
row: g,
|
|
2956
|
+
column: h,
|
|
2931
2957
|
"grid-ref": o.value
|
|
2932
2958
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2933
2959
|
]),
|
|
2934
|
-
TreeMultipleSelectRender: withCtx(({ row:
|
|
2935
|
-
createVNode(unref(
|
|
2936
|
-
row:
|
|
2937
|
-
column:
|
|
2960
|
+
TreeMultipleSelectRender: withCtx(({ row: g, column: h }) => [
|
|
2961
|
+
createVNode(unref(B), {
|
|
2962
|
+
row: g,
|
|
2963
|
+
column: h,
|
|
2938
2964
|
"grid-ref": o.value
|
|
2939
2965
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2940
2966
|
]),
|
|
2941
|
-
ChooseFrameRender: withCtx(({ row:
|
|
2942
|
-
createVNode(unref(
|
|
2943
|
-
row:
|
|
2944
|
-
column:
|
|
2967
|
+
ChooseFrameRender: withCtx(({ row: g, column: h }) => [
|
|
2968
|
+
createVNode(unref(N), {
|
|
2969
|
+
row: g,
|
|
2970
|
+
column: h,
|
|
2945
2971
|
"grid-ref": r.gridRef,
|
|
2946
|
-
onOnChooseBeforClick:
|
|
2972
|
+
onOnChooseBeforClick: ve
|
|
2947
2973
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2948
2974
|
]),
|
|
2949
|
-
PickPeopleRender: withCtx(({ row:
|
|
2975
|
+
PickPeopleRender: withCtx(({ row: g, column: h }) => [
|
|
2950
2976
|
createVNode(unref($), {
|
|
2951
|
-
row:
|
|
2952
|
-
column:
|
|
2977
|
+
row: g,
|
|
2978
|
+
column: h,
|
|
2953
2979
|
"grid-ref": o.value,
|
|
2954
2980
|
onChange: be
|
|
2955
2981
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2956
2982
|
]),
|
|
2957
|
-
FileRender: withCtx(({ row:
|
|
2983
|
+
FileRender: withCtx(({ row: g, column: h }) => [
|
|
2958
2984
|
createVNode(unref(K), {
|
|
2959
|
-
row:
|
|
2960
|
-
column:
|
|
2985
|
+
row: g,
|
|
2986
|
+
column: h,
|
|
2961
2987
|
"grid-ref": o.value,
|
|
2962
2988
|
onFileClick: pe
|
|
2963
2989
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2964
2990
|
]),
|
|
2965
|
-
CustomRender: withCtx(({ row:
|
|
2966
|
-
createVNode(unref(
|
|
2967
|
-
row:
|
|
2968
|
-
column:
|
|
2991
|
+
CustomRender: withCtx(({ row: g, column: h }) => [
|
|
2992
|
+
createVNode(unref(v), {
|
|
2993
|
+
row: g,
|
|
2994
|
+
column: h,
|
|
2969
2995
|
"grid-ref": o.value
|
|
2970
2996
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2971
2997
|
]),
|
|
2972
|
-
DatePickerRender: withCtx(({ row:
|
|
2973
|
-
createVNode(unref(
|
|
2974
|
-
row:
|
|
2975
|
-
column:
|
|
2998
|
+
DatePickerRender: withCtx(({ row: g, column: h }) => [
|
|
2999
|
+
createVNode(unref(w), {
|
|
3000
|
+
row: g,
|
|
3001
|
+
column: h,
|
|
2976
3002
|
"grid-ref": o.value
|
|
2977
3003
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2978
3004
|
]),
|
|
2979
|
-
LabelRender: withCtx(({ row:
|
|
3005
|
+
LabelRender: withCtx(({ row: g, column: h }) => [
|
|
2980
3006
|
createVNode(unref(R), {
|
|
2981
|
-
row:
|
|
2982
|
-
column:
|
|
3007
|
+
row: g,
|
|
3008
|
+
column: h,
|
|
2983
3009
|
"grid-ref": o.value
|
|
2984
3010
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2985
3011
|
]),
|
|
2986
|
-
InputEditor: withCtx(({ row:
|
|
2987
|
-
createVNode(unref(
|
|
2988
|
-
row:
|
|
2989
|
-
column:
|
|
3012
|
+
InputEditor: withCtx(({ row: g, column: h }) => [
|
|
3013
|
+
createVNode(unref(Y), {
|
|
3014
|
+
row: g,
|
|
3015
|
+
column: h,
|
|
2990
3016
|
"grid-ref": o.value
|
|
2991
3017
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2992
3018
|
]),
|
|
2993
|
-
TextareaEditor: withCtx(({ row:
|
|
2994
|
-
createVNode(unref(
|
|
2995
|
-
row:
|
|
2996
|
-
column:
|
|
3019
|
+
TextareaEditor: withCtx(({ row: g, column: h }) => [
|
|
3020
|
+
createVNode(unref(M), {
|
|
3021
|
+
row: g,
|
|
3022
|
+
column: h,
|
|
2997
3023
|
"grid-ref": o.value
|
|
2998
3024
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2999
3025
|
]),
|
|
3000
|
-
SelectEditor: withCtx(({ row:
|
|
3001
|
-
createVNode(unref(
|
|
3002
|
-
row:
|
|
3003
|
-
column:
|
|
3026
|
+
SelectEditor: withCtx(({ row: g, column: h }) => [
|
|
3027
|
+
createVNode(unref(P), {
|
|
3028
|
+
row: g,
|
|
3029
|
+
column: h,
|
|
3004
3030
|
"grid-ref": o.value
|
|
3005
3031
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3006
3032
|
]),
|
|
3007
|
-
SelectMultipleEditor: withCtx(({ row:
|
|
3008
|
-
createVNode(unref(
|
|
3009
|
-
row:
|
|
3010
|
-
column:
|
|
3033
|
+
SelectMultipleEditor: withCtx(({ row: g, column: h }) => [
|
|
3034
|
+
createVNode(unref(q), {
|
|
3035
|
+
row: g,
|
|
3036
|
+
column: h,
|
|
3011
3037
|
"grid-ref": o.value
|
|
3012
3038
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3013
3039
|
]),
|
|
3014
|
-
TreeSelectEditor: withCtx(({ row:
|
|
3040
|
+
TreeSelectEditor: withCtx(({ row: g, column: h }) => [
|
|
3015
3041
|
createVNode(unref(T), {
|
|
3016
|
-
row:
|
|
3017
|
-
column:
|
|
3042
|
+
row: g,
|
|
3043
|
+
column: h,
|
|
3018
3044
|
"grid-ref": o.value
|
|
3019
3045
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3020
3046
|
]),
|
|
3021
|
-
TreeMultipleSelectEditor: withCtx(({ row:
|
|
3047
|
+
TreeMultipleSelectEditor: withCtx(({ row: g, column: h }) => [
|
|
3022
3048
|
createVNode(unref(te), {
|
|
3023
|
-
row:
|
|
3024
|
-
column:
|
|
3049
|
+
row: g,
|
|
3050
|
+
column: h,
|
|
3025
3051
|
"grid-ref": o.value
|
|
3026
3052
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3027
3053
|
]),
|
|
3028
|
-
DatePickerEditor: withCtx(({ row:
|
|
3054
|
+
DatePickerEditor: withCtx(({ row: g, column: h }) => [
|
|
3029
3055
|
createVNode(unref(H), {
|
|
3030
|
-
row:
|
|
3031
|
-
column:
|
|
3056
|
+
row: g,
|
|
3057
|
+
column: h,
|
|
3032
3058
|
"grid-ref": o.value
|
|
3033
3059
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3034
3060
|
]),
|
|
3035
|
-
InputNumberEditor: withCtx(({ row:
|
|
3061
|
+
InputNumberEditor: withCtx(({ row: g, column: h }) => [
|
|
3036
3062
|
createVNode(unref(le), {
|
|
3037
|
-
row:
|
|
3038
|
-
column:
|
|
3063
|
+
row: g,
|
|
3064
|
+
column: h,
|
|
3039
3065
|
"grid-ref": o.value
|
|
3040
3066
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3041
3067
|
]),
|
|
3042
|
-
SelectRemoteEditor: withCtx(({ row:
|
|
3068
|
+
SelectRemoteEditor: withCtx(({ row: g, column: h }) => [
|
|
3043
3069
|
createVNode(unref(oe), {
|
|
3044
|
-
row:
|
|
3045
|
-
column:
|
|
3070
|
+
row: g,
|
|
3071
|
+
column: h,
|
|
3046
3072
|
"grid-ref": o.value,
|
|
3047
|
-
onRemoteMethod:
|
|
3073
|
+
onRemoteMethod: he
|
|
3048
3074
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3049
3075
|
]),
|
|
3050
|
-
tableSelect: withCtx(({ row:
|
|
3076
|
+
tableSelect: withCtx(({ row: g, column: h }) => [
|
|
3051
3077
|
createElementVNode("div", _hoisted_2$2, [
|
|
3052
3078
|
createVNode(unref(HrTableSelect), {
|
|
3053
|
-
modelValue:
|
|
3054
|
-
"onUpdate:modelValue": (
|
|
3055
|
-
columns:
|
|
3056
|
-
onRemoteMethod: (
|
|
3057
|
-
onChange: (
|
|
3058
|
-
width:
|
|
3079
|
+
modelValue: g[h.field],
|
|
3080
|
+
"onUpdate:modelValue": (S) => g[h.field] = S,
|
|
3081
|
+
columns: h.params.tableSelectColumns || [],
|
|
3082
|
+
onRemoteMethod: (S) => ge(S, h, g),
|
|
3083
|
+
onChange: (S) => _e({ change: S, row: g, column: h }),
|
|
3084
|
+
width: h.params.tableSelectWidth
|
|
3059
3085
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "columns", "onRemoteMethod", "onChange", "width"])
|
|
3060
3086
|
])
|
|
3061
3087
|
]),
|
|
@@ -3071,7 +3097,7 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
3071
3097
|
}, 16, ["class"])
|
|
3072
3098
|
]));
|
|
3073
3099
|
}
|
|
3074
|
-
}), Table = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
3100
|
+
}), Table = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-31c3e495"]]);
|
|
3075
3101
|
VxeUI.setConfig({
|
|
3076
3102
|
size: "small",
|
|
3077
3103
|
table: {
|
|
@@ -3119,22 +3145,22 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
3119
3145
|
createElementVNode("thead", null, [
|
|
3120
3146
|
createElementVNode("tr", null, [
|
|
3121
3147
|
i[0] || (i[0] = createElementVNode("th", { class: "w[50px]" }, "序号", -1)),
|
|
3122
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (
|
|
3123
|
-
style: normalizeStyle({ width: o(
|
|
3124
|
-
}, toDisplayString(
|
|
3148
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (m) => (openBlock(), createElementBlock("th", {
|
|
3149
|
+
style: normalizeStyle({ width: o(m.width) })
|
|
3150
|
+
}, toDisplayString(m.title), 5))), 256))
|
|
3125
3151
|
])
|
|
3126
3152
|
]),
|
|
3127
3153
|
createElementVNode("tbody", {
|
|
3128
3154
|
ref_key: "tbody",
|
|
3129
3155
|
ref: r
|
|
3130
3156
|
}, [
|
|
3131
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.value, (
|
|
3157
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.value, (m, c) => (openBlock(), createElementBlock("tr", {
|
|
3132
3158
|
class: normalizeClass({ zebra: c % 2 != 0, highlight: l.highlight === c }),
|
|
3133
|
-
onClick: (u) => a("change",
|
|
3159
|
+
onClick: (u) => a("change", m),
|
|
3134
3160
|
index: c
|
|
3135
3161
|
}, [
|
|
3136
3162
|
createElementVNode("td", _hoisted_3, toDisplayString(c + 1), 1),
|
|
3137
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (u) => (openBlock(), createElementBlock("td", null, toDisplayString(
|
|
3163
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (u) => (openBlock(), createElementBlock("td", null, toDisplayString(m[u.field]), 1))), 256))
|
|
3138
3164
|
], 10, _hoisted_2$1))), 256))
|
|
3139
3165
|
], 512)
|
|
3140
3166
|
]),
|
|
@@ -3162,41 +3188,41 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
3162
3188
|
query: "",
|
|
3163
3189
|
tableData: [],
|
|
3164
3190
|
loading: !1
|
|
3165
|
-
}), r = ref(), a = ref(), o = ref(!1), l = ref(-1), i = reactive({ x: 0, y: 0, w: 0 }),
|
|
3166
|
-
o.value = !0, c("remote-method", e),
|
|
3167
|
-
},
|
|
3191
|
+
}), r = ref(), a = ref(), o = ref(!1), l = ref(-1), i = reactive({ x: 0, y: 0, w: 0 }), m = useModel(n, "modelValue"), c = t, u = () => c("remote-method", e), _ = () => {
|
|
3192
|
+
o.value = !0, c("remote-method", e), d();
|
|
3193
|
+
}, d = async () => {
|
|
3168
3194
|
if (!o.value) return;
|
|
3169
|
-
const
|
|
3170
|
-
i.y = innerHeight -
|
|
3171
|
-
const
|
|
3172
|
-
i.x = innerWidth -
|
|
3195
|
+
const E = ($) => Number($) ? $ + "px" : $, B = r.value.getBoundingClientRect();
|
|
3196
|
+
i.y = innerHeight - B.y < B.y ? B.y - B.height - 280 : B.y + B.height + 5, i.w = n.width ? E(n.width) : B.width < 300 ? "300px" : B.width + "px", await nextTick();
|
|
3197
|
+
const N = a.value.$el.offsetWidth;
|
|
3198
|
+
i.x = innerWidth - B.x > N ? B.x : B.x + B.width - N;
|
|
3173
3199
|
};
|
|
3174
|
-
let
|
|
3175
|
-
const
|
|
3176
|
-
s(), c("change",
|
|
3177
|
-
},
|
|
3200
|
+
let k = !0;
|
|
3201
|
+
const p = () => k && (o.value = !1), s = () => (k = !1, setTimeout(() => k = !0, 16)), f = () => k && r.value.focus(), b = (E) => {
|
|
3202
|
+
s(), c("change", E), o.value = !1;
|
|
3203
|
+
}, C = () => l.value !== -1 && l.value--, V = () => l.value < e.tableData.length && l.value++, D = () => {
|
|
3178
3204
|
if (l.value == -1) return;
|
|
3179
|
-
const
|
|
3180
|
-
c("change",
|
|
3205
|
+
const E = e.tableData[l.value];
|
|
3206
|
+
c("change", E), r.value.blur();
|
|
3181
3207
|
};
|
|
3182
|
-
return watch(() => e.query, (
|
|
3183
|
-
|
|
3184
|
-
}), watch(() =>
|
|
3185
|
-
|
|
3208
|
+
return watch(() => e.query, (E) => {
|
|
3209
|
+
E !== m.value && (m.value = E);
|
|
3210
|
+
}), watch(() => m.value, (E) => {
|
|
3211
|
+
E !== e.query && (e.query = E);
|
|
3186
3212
|
}), effect(() => {
|
|
3187
3213
|
e.query, o.value, l.value = -1;
|
|
3188
|
-
}), effect(() => !o.value && (e.tableData = [])), document.addEventListener("scroll",
|
|
3214
|
+
}), effect(() => !o.value && (e.tableData = [])), document.addEventListener("scroll", d), (E, B) => (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
3189
3215
|
withDirectives(createElementVNode("input", {
|
|
3190
3216
|
ref_key: "input",
|
|
3191
3217
|
ref: r,
|
|
3192
|
-
"onUpdate:modelValue":
|
|
3218
|
+
"onUpdate:modelValue": B[0] || (B[0] = (N) => e.query = N),
|
|
3193
3219
|
onInput: u,
|
|
3194
|
-
onFocus:
|
|
3195
|
-
onBlur:
|
|
3220
|
+
onFocus: _,
|
|
3221
|
+
onBlur: p,
|
|
3196
3222
|
onKeydown: [
|
|
3197
|
-
withKeys(
|
|
3198
|
-
withKeys(
|
|
3199
|
-
withKeys(withModifiers(
|
|
3223
|
+
withKeys(C, ["up"]),
|
|
3224
|
+
withKeys(V, ["down"]),
|
|
3225
|
+
withKeys(withModifiers(D, ["prevent"]), ["enter"])
|
|
3200
3226
|
]
|
|
3201
3227
|
}, null, 40, _hoisted_2), [
|
|
3202
3228
|
[vModelText, e.query]
|
|
@@ -3206,13 +3232,13 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
3206
3232
|
ref_key: "table",
|
|
3207
3233
|
ref: a,
|
|
3208
3234
|
modelValue: e.tableData,
|
|
3209
|
-
"onUpdate:modelValue":
|
|
3235
|
+
"onUpdate:modelValue": B[1] || (B[1] = (N) => e.tableData = N),
|
|
3210
3236
|
loading: e.loading,
|
|
3211
3237
|
highlight: l.value,
|
|
3212
|
-
columns:
|
|
3238
|
+
columns: E.columns,
|
|
3213
3239
|
onMousedown: s,
|
|
3214
|
-
onClick:
|
|
3215
|
-
onChange:
|
|
3240
|
+
onClick: f,
|
|
3241
|
+
onChange: b,
|
|
3216
3242
|
style: normalizeStyle({ top: i.y + "px", left: i.x + "px", width: i.w })
|
|
3217
3243
|
}, null, 8, ["modelValue", "loading", "highlight", "columns", "style"])) : createCommentVNode("", !0)
|
|
3218
3244
|
]));
|