gzhr-ui 1.1.5 → 1.1.7
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.
|
@@ -16,7 +16,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
16
16
|
const e = a, r = ref([null, null]), c = computed(() => e.column.filters[0].data.length ? e.column.filters[0].data.join(" 至 ") : ""), o = ref(), l = ref(), n = () => {
|
|
17
17
|
var s, d;
|
|
18
18
|
(d = (s = unref(l).popperRef) == null ? void 0 : s.delayHide) == null || d.call(s);
|
|
19
|
-
},
|
|
19
|
+
}, i = t;
|
|
20
20
|
function m() {
|
|
21
21
|
if (!r.value[0] && !r.value[1])
|
|
22
22
|
e.column.filters[0].data = [];
|
|
@@ -25,9 +25,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
25
25
|
return;
|
|
26
26
|
} else
|
|
27
27
|
e.column.filters[0].data = [...r.value];
|
|
28
|
-
l.value.hide(),
|
|
28
|
+
l.value.hide(), i("FilterSearch", e.column);
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function u() {
|
|
31
31
|
r.value = [null, null];
|
|
32
32
|
}
|
|
33
33
|
return (s, d) => (openBlock(), createElementBlock("div", {
|
|
@@ -78,7 +78,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
78
78
|
}),
|
|
79
79
|
createVNode(unref(ElButton), {
|
|
80
80
|
size: "small",
|
|
81
|
-
onClick:
|
|
81
|
+
onClick: u
|
|
82
82
|
}, {
|
|
83
83
|
default: withCtx(() => d[3] || (d[3] = [
|
|
84
84
|
createTextVNode("重置")
|
|
@@ -102,14 +102,14 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
102
102
|
},
|
|
103
103
|
emits: ["FilterSearch"],
|
|
104
104
|
setup(a, { emit: t }) {
|
|
105
|
-
const e = a, r = ref([]), c = computed(() => e.column.filters[0].data.length ? e.column.filters[0].data.map((
|
|
106
|
-
var
|
|
107
|
-
(s = (
|
|
108
|
-
},
|
|
105
|
+
const e = a, r = ref([]), c = computed(() => e.column.filters[0].data.length ? e.column.filters[0].data.map((u) => u ? "是" : "否").join(",") : ""), o = ref(), l = ref(), n = () => {
|
|
106
|
+
var u, s;
|
|
107
|
+
(s = (u = unref(l).popperRef) == null ? void 0 : u.delayHide) == null || s.call(u);
|
|
108
|
+
}, i = t;
|
|
109
109
|
function m() {
|
|
110
110
|
r.value.length ? e.column.filters[0].data = [...r.value] : e.column.filters[0].data = [];
|
|
111
111
|
}
|
|
112
|
-
return (
|
|
112
|
+
return (u, s) => (openBlock(), createElementBlock("div", {
|
|
113
113
|
class: "size-full",
|
|
114
114
|
title: c.value
|
|
115
115
|
}, [
|
|
@@ -118,7 +118,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
118
118
|
ref: o,
|
|
119
119
|
value: c.value,
|
|
120
120
|
readonly: "",
|
|
121
|
-
onKeyup: s[0] || (s[0] = withKeys((d) =>
|
|
121
|
+
onKeyup: s[0] || (s[0] = withKeys((d) => i("FilterSearch", a.column), ["enter"]))
|
|
122
122
|
}, null, 8, ["value"]), [
|
|
123
123
|
[unref(ClickOutside), n]
|
|
124
124
|
]),
|
|
@@ -166,17 +166,17 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
166
166
|
setup(a, { emit: t }) {
|
|
167
167
|
const e = a, r = ref([]);
|
|
168
168
|
ref("");
|
|
169
|
-
const c = computed(() => e.column.filters[0].data.length ? e.column.filters[0].data.map((
|
|
169
|
+
const c = computed(() => e.column.filters[0].data.length ? e.column.filters[0].data.map((u) => {
|
|
170
170
|
var s;
|
|
171
|
-
return (s = e.column.params.options.find((d) => d.value ===
|
|
171
|
+
return (s = e.column.params.options.find((d) => d.value === u)) == null ? void 0 : s.label;
|
|
172
172
|
}).join(",") : ""), o = ref(), l = ref(), n = () => {
|
|
173
|
-
var
|
|
174
|
-
(s = (
|
|
175
|
-
},
|
|
173
|
+
var u, s;
|
|
174
|
+
(s = (u = unref(l).popperRef) == null ? void 0 : u.delayHide) == null || s.call(u);
|
|
175
|
+
}, i = t;
|
|
176
176
|
function m() {
|
|
177
177
|
r.value.length ? e.column.filters[0].data = [...r.value] : e.column.filters[0].data = [];
|
|
178
178
|
}
|
|
179
|
-
return (
|
|
179
|
+
return (u, s) => (openBlock(), createElementBlock("div", {
|
|
180
180
|
class: "size-full",
|
|
181
181
|
title: c.value
|
|
182
182
|
}, [
|
|
@@ -185,7 +185,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
185
185
|
ref: o,
|
|
186
186
|
value: c.value,
|
|
187
187
|
readonly: "",
|
|
188
|
-
onKeyup: s[0] || (s[0] = withKeys((d) =>
|
|
188
|
+
onKeyup: s[0] || (s[0] = withKeys((d) => i("FilterSearch", a.column), ["enter"]))
|
|
189
189
|
}, null, 8, ["value"]), [
|
|
190
190
|
[unref(ClickOutside), n]
|
|
191
191
|
]),
|
|
@@ -251,28 +251,28 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
251
251
|
children: "children"
|
|
252
252
|
});
|
|
253
253
|
if (!e.column.params.TreeData) {
|
|
254
|
-
const { options: m, ParentNodeField:
|
|
255
|
-
e.column.params.TreeData = buildTree(deepClone(m),
|
|
254
|
+
const { options: m, ParentNodeField: u, NodeKeyField: s } = e.column.params;
|
|
255
|
+
e.column.params.TreeData = buildTree(deepClone(m), u, s);
|
|
256
256
|
}
|
|
257
257
|
onMounted(() => {
|
|
258
258
|
r.value = e.column.params.TreeData;
|
|
259
259
|
});
|
|
260
260
|
const n = t;
|
|
261
|
-
function
|
|
261
|
+
function i() {
|
|
262
262
|
c.value ? e.column.filters[0].data = [c.value] : e.column.filters[0].data = [];
|
|
263
263
|
}
|
|
264
|
-
return (m,
|
|
264
|
+
return (m, u) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
265
265
|
clearable: "",
|
|
266
266
|
modelValue: c.value,
|
|
267
|
-
"onUpdate:modelValue":
|
|
267
|
+
"onUpdate:modelValue": u[0] || (u[0] = (s) => c.value = s),
|
|
268
268
|
data: r.value,
|
|
269
269
|
"render-after-expand": !1,
|
|
270
270
|
placeholder: "",
|
|
271
|
-
onChange:
|
|
271
|
+
onChange: i,
|
|
272
272
|
multiple: o.value,
|
|
273
273
|
"show-checkbox": o.value,
|
|
274
274
|
props: l.value,
|
|
275
|
-
onKeyup:
|
|
275
|
+
onKeyup: u[1] || (u[1] = withKeys((s) => n("FilterSearch", a.column), ["enter"]))
|
|
276
276
|
}, null, 8, ["modelValue", "data", "multiple", "show-checkbox", "props"]));
|
|
277
277
|
}
|
|
278
278
|
}, _sfc_main$v = {
|
|
@@ -291,8 +291,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
291
291
|
children: "children"
|
|
292
292
|
});
|
|
293
293
|
if (!e.column.params.TreeData) {
|
|
294
|
-
const { options: m, ParentNodeField:
|
|
295
|
-
e.column.params.TreeData = buildTree(deepClone(m),
|
|
294
|
+
const { options: m, ParentNodeField: u, NodeKeyField: s } = e.column.params;
|
|
295
|
+
e.column.params.TreeData = buildTree(deepClone(m), u, s);
|
|
296
296
|
}
|
|
297
297
|
onMounted(() => {
|
|
298
298
|
r.value = e.column.params.TreeData;
|
|
@@ -301,14 +301,14 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
301
301
|
function n() {
|
|
302
302
|
c.value ? e.column.filters[0].data = c.value : e.column.filters[0].data = [];
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function i(m) {
|
|
305
305
|
cleanUpTreeFilterRows(), l("FilterSearch", e.column);
|
|
306
306
|
}
|
|
307
|
-
return (m,
|
|
307
|
+
return (m, u) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
308
308
|
"popper-class": "tree-filter-row",
|
|
309
309
|
clearable: "",
|
|
310
310
|
modelValue: c.value,
|
|
311
|
-
"onUpdate:modelValue":
|
|
311
|
+
"onUpdate:modelValue": u[0] || (u[0] = (s) => c.value = s),
|
|
312
312
|
data: r.value,
|
|
313
313
|
placeholder: "",
|
|
314
314
|
onChange: n,
|
|
@@ -316,7 +316,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
316
316
|
"show-checkbox": "",
|
|
317
317
|
"collapse-tags": "",
|
|
318
318
|
"collapse-tags-tooltip": "",
|
|
319
|
-
onKeyup: withKeys(
|
|
319
|
+
onKeyup: withKeys(i, ["enter"]),
|
|
320
320
|
props: o.value
|
|
321
321
|
}, null, 8, ["modelValue", "data", "props"]));
|
|
322
322
|
}
|
|
@@ -333,7 +333,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
333
333
|
const e = a, r = ref([null, null]), c = computed(() => e.column.filters[0].data.length ? e.column.filters[0].data.join(" 至 ") : ""), o = ref(), l = ref(), n = () => {
|
|
334
334
|
var s, d;
|
|
335
335
|
(d = (s = unref(l).popperRef) == null ? void 0 : s.delayHide) == null || d.call(s);
|
|
336
|
-
},
|
|
336
|
+
}, i = t;
|
|
337
337
|
function m() {
|
|
338
338
|
if (!r.value[0] && !r.value[1])
|
|
339
339
|
e.column.filters[0].data = [];
|
|
@@ -342,9 +342,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
342
342
|
return;
|
|
343
343
|
} else
|
|
344
344
|
e.column.filters[0].data = [...r.value];
|
|
345
|
-
l.value.hide(),
|
|
345
|
+
l.value.hide(), i("FilterSearch", e.column);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function u() {
|
|
348
348
|
r.value = [null, null];
|
|
349
349
|
}
|
|
350
350
|
return (s, d) => (openBlock(), createElementBlock("div", {
|
|
@@ -356,7 +356,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
356
356
|
ref: o,
|
|
357
357
|
value: c.value,
|
|
358
358
|
readonly: "",
|
|
359
|
-
onKeyup: d[0] || (d[0] = withKeys((_) =>
|
|
359
|
+
onKeyup: d[0] || (d[0] = withKeys((_) => i("FilterSearch", a.column), ["enter"]))
|
|
360
360
|
}, null, 8, ["value"]), [
|
|
361
361
|
[unref(ClickOutside), n]
|
|
362
362
|
]),
|
|
@@ -394,7 +394,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
394
394
|
}),
|
|
395
395
|
createVNode(unref(ElButton), {
|
|
396
396
|
size: "small",
|
|
397
|
-
onClick:
|
|
397
|
+
onClick: u
|
|
398
398
|
}, {
|
|
399
399
|
default: withCtx(() => d[4] || (d[4] = [
|
|
400
400
|
createTextVNode("重置")
|
|
@@ -428,8 +428,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
428
428
|
let c = ref(0);
|
|
429
429
|
onMounted(() => {
|
|
430
430
|
if (e.column.params.filter) {
|
|
431
|
-
const
|
|
432
|
-
useElementClientSize(
|
|
431
|
+
const i = document.querySelector(`[colid=${e.column.id}]`);
|
|
432
|
+
useElementClientSize(i, ({ clientHeight: m }) => {
|
|
433
433
|
c.value = m <= 40 ? 65 : m;
|
|
434
434
|
});
|
|
435
435
|
} else
|
|
@@ -437,31 +437,38 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
437
437
|
r.value = e.column.params.TreeData;
|
|
438
438
|
});
|
|
439
439
|
const o = t;
|
|
440
|
-
function l(
|
|
441
|
-
if (
|
|
440
|
+
function l(i) {
|
|
441
|
+
if (i === "search") {
|
|
442
442
|
const m = e.gridRef.getColumns();
|
|
443
443
|
o("FilterSearch", e.column, m);
|
|
444
|
-
} else
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
i.filters && i.filters.forEach((s) => {
|
|
448
|
-
Array.isArray(s.data) ? s.data = [] : s.data = "";
|
|
444
|
+
} else if (i === "clear") {
|
|
445
|
+
e.column.filters.forEach((u) => {
|
|
446
|
+
Array.isArray(u.data) ? u.data = [] : u.data = "";
|
|
449
447
|
});
|
|
450
|
-
|
|
448
|
+
const m = e.gridRef.getColumns();
|
|
449
|
+
o("FilterSearch", e.column, m);
|
|
450
|
+
} else if (i === "clearAll") {
|
|
451
|
+
const m = e.gridRef.getColumns();
|
|
452
|
+
m.forEach((u) => {
|
|
453
|
+
u.filters && u.filters.forEach((s) => {
|
|
454
|
+
Array.isArray(s.data) ? s.data = [] : s.data = "";
|
|
455
|
+
});
|
|
456
|
+
}), o("FilterSearch", e.column, m);
|
|
457
|
+
}
|
|
451
458
|
}
|
|
452
459
|
function n() {
|
|
453
|
-
var
|
|
454
|
-
(
|
|
460
|
+
var i;
|
|
461
|
+
(i = e.column).params ?? (i.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());
|
|
455
462
|
}
|
|
456
|
-
return (
|
|
457
|
-
var
|
|
463
|
+
return (i, m) => {
|
|
464
|
+
var u, s, d;
|
|
458
465
|
return openBlock(), createElementBlock("div", {
|
|
459
466
|
class: "flex flex-col filter-header",
|
|
460
467
|
title: a.column.title,
|
|
461
468
|
style: normalizeStyle({ height: unref(c) ? unref(c) + "px" : void 0 })
|
|
462
469
|
}, [
|
|
463
470
|
createElementVNode("div", {
|
|
464
|
-
class: normalizeClass(["filter-title h-full lh-9 flex justify-center items-center gap-1", { "filter-title-border": (
|
|
471
|
+
class: normalizeClass(["filter-title h-full lh-9 flex justify-center items-center gap-1", { "filter-title-border": (u = a.column.params) == null ? void 0 : u.filter }]),
|
|
465
472
|
onClick: n
|
|
466
473
|
}, [
|
|
467
474
|
createElementVNode("span", {
|
|
@@ -616,18 +623,18 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
616
623
|
});
|
|
617
624
|
}
|
|
618
625
|
return (l, n) => (openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
619
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(r), (
|
|
620
|
-
key:
|
|
626
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(r), (i) => withDirectives((openBlock(), createBlock(unref(ElButton), {
|
|
627
|
+
key: i.Name,
|
|
621
628
|
class: "!text-[12px]",
|
|
622
629
|
link: "",
|
|
623
|
-
onClick: (m) => o(
|
|
630
|
+
onClick: (m) => o(i)
|
|
624
631
|
}, {
|
|
625
632
|
default: withCtx(() => [
|
|
626
|
-
createTextVNode(toDisplayString(
|
|
633
|
+
createTextVNode(toDisplayString(i.Name), 1)
|
|
627
634
|
]),
|
|
628
635
|
_: 2
|
|
629
636
|
}, 1032, ["onClick"])), [
|
|
630
|
-
[vShow,
|
|
637
|
+
[vShow, i.hide !== !0]
|
|
631
638
|
])), 128))
|
|
632
639
|
]));
|
|
633
640
|
}
|
|
@@ -659,13 +666,13 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
659
666
|
typeof e.row[e.column.field] != "boolean" ? r.value = !!e.row[e.column.field] : r.value = e.row[e.column.field];
|
|
660
667
|
});
|
|
661
668
|
const c = t;
|
|
662
|
-
function o(l, n,
|
|
663
|
-
n[
|
|
669
|
+
function o(l, n, i) {
|
|
670
|
+
n[i.field] = l, c("change", l, n, i);
|
|
664
671
|
}
|
|
665
672
|
return (l, n) => {
|
|
666
|
-
var
|
|
673
|
+
var i;
|
|
667
674
|
return openBlock(), createBlock(unref(ElCheckbox), {
|
|
668
|
-
disabled: (
|
|
675
|
+
disabled: (i = a.column.params) == null ? void 0 : i.disabled,
|
|
669
676
|
modelValue: r.value,
|
|
670
677
|
"onUpdate:modelValue": n[0] || (n[0] = (m) => r.value = m),
|
|
671
678
|
onChange: n[1] || (n[1] = (m) => o(m, a.row, a.column))
|
|
@@ -709,26 +716,26 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
709
716
|
const t = a;
|
|
710
717
|
t.column.params.LabelConfig || (t.column.params.LabelConfig = []);
|
|
711
718
|
const e = ref(t.column.params.LabelConfig);
|
|
712
|
-
e.value.forEach((
|
|
713
|
-
|
|
719
|
+
e.value.forEach((u) => {
|
|
720
|
+
u.Value == "true" ? u.Value = !0 : u.Value == "false" && (u.Value = !1);
|
|
714
721
|
});
|
|
715
|
-
const r = computed(() => t.row[t.column.field]), c = computed(() => e.value.find((
|
|
722
|
+
const r = computed(() => t.row[t.column.field]), c = computed(() => e.value.find((u) => u.Value == r.value));
|
|
716
723
|
onMounted(() => {
|
|
717
724
|
t.column.params.LabelAutoColor && !c.value && (r.value || r.value === 0) && e.value.push({
|
|
718
725
|
Value: r.value,
|
|
719
726
|
Color: m()
|
|
720
727
|
});
|
|
721
728
|
});
|
|
722
|
-
function o(
|
|
723
|
-
if (!
|
|
729
|
+
function o(u) {
|
|
730
|
+
if (!u) return;
|
|
724
731
|
let s, d, _, y = 1;
|
|
725
|
-
if (
|
|
726
|
-
|
|
727
|
-
else if (
|
|
728
|
-
const h =
|
|
732
|
+
if (u.startsWith("#"))
|
|
733
|
+
u = u.slice(1), u.length === 3 ? (s = parseInt(u[0] + u[0], 16), d = parseInt(u[1] + u[1], 16), _ = parseInt(u[2] + u[2], 16)) : u.length === 6 && (s = parseInt(u.slice(0, 2), 16), d = parseInt(u.slice(2, 4), 16), _ = parseInt(u.slice(4, 6), 16));
|
|
734
|
+
else if (u.startsWith("rgb")) {
|
|
735
|
+
const h = u.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);
|
|
729
736
|
h && (s = parseInt(h[1]), d = parseInt(h[2]), _ = parseInt(h[3]), h[4] && (y = parseFloat(h[4])));
|
|
730
|
-
} else if (
|
|
731
|
-
const h =
|
|
737
|
+
} else if (u.startsWith("hsl")) {
|
|
738
|
+
const h = u.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%(?:,\s*(\d*\.?\d+))?\)/);
|
|
732
739
|
if (h) {
|
|
733
740
|
const E = parseInt(h[1]) / 360, C = parseInt(h[2]) / 100, x = parseInt(h[3]) / 100;
|
|
734
741
|
if (h[4] && (y = parseFloat(h[4])), C === 0)
|
|
@@ -741,68 +748,68 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
741
748
|
}
|
|
742
749
|
return { r: s, g: d, b: _, a: y };
|
|
743
750
|
}
|
|
744
|
-
function l(
|
|
745
|
-
|
|
746
|
-
const _ = Math.max(
|
|
751
|
+
function l(u, s, d) {
|
|
752
|
+
u /= 255, s /= 255, d /= 255;
|
|
753
|
+
const _ = Math.max(u, s, d), y = Math.min(u, s, d);
|
|
747
754
|
let h, E, C = (_ + y) / 2;
|
|
748
755
|
if (_ === y)
|
|
749
756
|
h = E = 0;
|
|
750
757
|
else {
|
|
751
758
|
const x = _ - y;
|
|
752
759
|
switch (E = C > 0.5 ? x / (2 - _ - y) : x / (_ + y), _) {
|
|
753
|
-
case
|
|
760
|
+
case u:
|
|
754
761
|
h = (s - d) / x + (s < d ? 6 : 0);
|
|
755
762
|
break;
|
|
756
763
|
case s:
|
|
757
|
-
h = (d -
|
|
764
|
+
h = (d - u) / x + 2;
|
|
758
765
|
break;
|
|
759
766
|
case d:
|
|
760
|
-
h = (
|
|
767
|
+
h = (u - s) / x + 4;
|
|
761
768
|
break;
|
|
762
769
|
}
|
|
763
770
|
h /= 6;
|
|
764
771
|
}
|
|
765
772
|
return { h, s: E, l: C };
|
|
766
773
|
}
|
|
767
|
-
function n(
|
|
774
|
+
function n(u, s, d) {
|
|
768
775
|
let _, y, h;
|
|
769
776
|
if (s === 0)
|
|
770
777
|
_ = y = h = d;
|
|
771
778
|
else {
|
|
772
779
|
const E = (B, S, k) => (k < 0 && (k += 1), k > 1 && (k -= 1), k < 0.16666666666666666 ? B + (S - B) * 6 * k : k < 0.5 ? S : k < 0.6666666666666666 ? B + (S - B) * (0.6666666666666666 - k) * 6 : B), C = d < 0.5 ? d * (1 + s) : d + s - d * s, x = 2 * d - C;
|
|
773
|
-
_ = E(x, C,
|
|
780
|
+
_ = E(x, C, u + 1 / 3), y = E(x, C, u), h = E(x, C, u - 1 / 3);
|
|
774
781
|
}
|
|
775
782
|
return { r: Math.round(_ * 255), g: Math.round(y * 255), b: Math.round(h * 255) };
|
|
776
783
|
}
|
|
777
|
-
function u
|
|
778
|
-
if (!
|
|
779
|
-
let { r: d, g: _, b: y } = o(
|
|
784
|
+
function i(u, s) {
|
|
785
|
+
if (!u) return;
|
|
786
|
+
let { r: d, g: _, b: y } = o(u), { h, s: E, l: C } = l(d, _, y);
|
|
780
787
|
C = Math.max(0, C - s);
|
|
781
788
|
const { r: x, g: B, b: S } = n(h, E, C);
|
|
782
789
|
return `rgb(${x}, ${B}, ${S})`;
|
|
783
790
|
}
|
|
784
791
|
function m() {
|
|
785
|
-
function
|
|
792
|
+
function u(h, E) {
|
|
786
793
|
return Math.floor(Math.random() * (E - h + 1)) + h;
|
|
787
794
|
}
|
|
788
|
-
const s =
|
|
795
|
+
const s = u(200, 255), d = u(200, 255), _ = u(200, 255);
|
|
789
796
|
return `#${s.toString(16).padStart(2, "0")}${d.toString(16).padStart(2, "0")}${_.toString(16).padStart(2, "0")}`;
|
|
790
797
|
}
|
|
791
|
-
return (
|
|
798
|
+
return (u, s) => {
|
|
792
799
|
const d = resolveComponent("hr-icon");
|
|
793
800
|
return r.value ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
794
801
|
c.value ? (openBlock(), createBlock(unref(ElTag), {
|
|
795
802
|
key: 0,
|
|
796
803
|
color: c.value.Color,
|
|
797
804
|
size: "small",
|
|
798
|
-
style: normalizeStyle({ borderColor:
|
|
805
|
+
style: normalizeStyle({ borderColor: i(c.value.Color, "0.03") })
|
|
799
806
|
}, {
|
|
800
807
|
default: withCtx(() => [
|
|
801
808
|
c.value.LeftIcon ? (openBlock(), createBlock(d, {
|
|
802
809
|
key: 0,
|
|
803
810
|
class: "mr0.25 v-middle mt0.15",
|
|
804
811
|
size: "13",
|
|
805
|
-
color:
|
|
812
|
+
color: i(c.value.Color, "0.3"),
|
|
806
813
|
icon: c.value.LeftIcon
|
|
807
814
|
}, null, 8, ["color", "icon"])) : createCommentVNode("", !0),
|
|
808
815
|
createElementVNode("span", _hoisted_2$4, toDisplayString(a.displayValue === void 0 ? r.value : a.displayValue), 1),
|
|
@@ -810,7 +817,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
810
817
|
key: 1,
|
|
811
818
|
class: "ml0.25 v-middle mt0.15",
|
|
812
819
|
size: "13",
|
|
813
|
-
color:
|
|
820
|
+
color: i(c.value.Color, "0.3"),
|
|
814
821
|
icon: c.value.RightIcon
|
|
815
822
|
}, null, 8, ["color", "icon"])) : createCommentVNode("", !0)
|
|
816
823
|
]),
|
|
@@ -951,19 +958,19 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
951
958
|
c.value = isColor(e.row[e.column.field]) ? e.row[e.column.field] : null;
|
|
952
959
|
});
|
|
953
960
|
const o = t;
|
|
954
|
-
function l(n,
|
|
955
|
-
|
|
961
|
+
function l(n, i, m) {
|
|
962
|
+
i[m.field] = n, o("change", n, i, m);
|
|
956
963
|
}
|
|
957
|
-
return (n,
|
|
964
|
+
return (n, i) => {
|
|
958
965
|
var m;
|
|
959
966
|
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
960
967
|
createVNode(unref(ElColorPicker), {
|
|
961
968
|
disabled: (m = a.column.params) == null ? void 0 : m.disabled,
|
|
962
969
|
class: "size-full",
|
|
963
970
|
modelValue: c.value,
|
|
964
|
-
"onUpdate:modelValue":
|
|
971
|
+
"onUpdate:modelValue": i[0] || (i[0] = (u) => c.value = u),
|
|
965
972
|
predefine: r.value,
|
|
966
|
-
onChange:
|
|
973
|
+
onChange: i[1] || (i[1] = (u) => l(u, a.row, a.column))
|
|
967
974
|
}, null, 8, ["disabled", "modelValue", "predefine"])
|
|
968
975
|
]);
|
|
969
976
|
};
|
|
@@ -1032,33 +1039,33 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1032
1039
|
year: "YYYY"
|
|
1033
1040
|
}[n];
|
|
1034
1041
|
if (!m) throw new Error("Unsupported date type");
|
|
1035
|
-
let
|
|
1036
|
-
if (l.includes("周") || !
|
|
1042
|
+
let u = dayjs(l, m);
|
|
1043
|
+
if (l.includes("周") || !u.isValid() && n === "week") {
|
|
1037
1044
|
const s = l.match(/^(\d{4})年第(\d{1,2})周$/);
|
|
1038
1045
|
if (s) {
|
|
1039
1046
|
const [, d, _] = s;
|
|
1040
|
-
|
|
1047
|
+
u = dayjs(`${d}-01-01`).isoWeek(Number(_));
|
|
1041
1048
|
}
|
|
1042
|
-
} else if (l.includes("季度") || !
|
|
1049
|
+
} else if (l.includes("季度") || !u.isValid() && n === "quarter") {
|
|
1043
1050
|
const s = l.match(/^(\d{4})年第(\d)季度$/);
|
|
1044
1051
|
if (s) {
|
|
1045
1052
|
const [, d, _] = s;
|
|
1046
|
-
|
|
1053
|
+
u = dayjs(`${d}-01-01`).quarter(Number(_));
|
|
1047
1054
|
}
|
|
1048
|
-
} else if (l.includes("月") || !
|
|
1055
|
+
} else if (l.includes("月") || !u.isValid() && n === "month") {
|
|
1049
1056
|
const s = l.match(/^(\d{4})年(\d{1,2})月$/);
|
|
1050
1057
|
if (s) {
|
|
1051
1058
|
const [, d, _] = s;
|
|
1052
|
-
|
|
1059
|
+
u = dayjs(`${d}-${_}-01`);
|
|
1053
1060
|
}
|
|
1054
|
-
} else if (l.includes("年") || !
|
|
1061
|
+
} else if (l.includes("年") || !u.isValid() && n === "year") {
|
|
1055
1062
|
const s = l.match(/^(\d{4})年$/);
|
|
1056
1063
|
if (s) {
|
|
1057
1064
|
const [, d] = s;
|
|
1058
|
-
|
|
1065
|
+
u = dayjs(`${d}-01-01`);
|
|
1059
1066
|
}
|
|
1060
1067
|
}
|
|
1061
|
-
return
|
|
1068
|
+
return u.isValid() ? c(u, n) : null;
|
|
1062
1069
|
}
|
|
1063
1070
|
function c(l, n) {
|
|
1064
1071
|
switch (n) {
|
|
@@ -1092,12 +1099,12 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1092
1099
|
case "year":
|
|
1093
1100
|
return `${dayjs(l).year()}年`;
|
|
1094
1101
|
default:
|
|
1095
|
-
const
|
|
1102
|
+
const i = {
|
|
1096
1103
|
time: "HH:mm:ss",
|
|
1097
1104
|
date: "YYYY-MM-DD",
|
|
1098
1105
|
datetime: "YYYY-MM-DD HH:mm:ss"
|
|
1099
1106
|
};
|
|
1100
|
-
return dayjs(l).format(
|
|
1107
|
+
return dayjs(l).format(i[n]);
|
|
1101
1108
|
}
|
|
1102
1109
|
}
|
|
1103
1110
|
return (l, n) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue: e.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
@@ -1138,7 +1145,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1138
1145
|
return (c, o) => {
|
|
1139
1146
|
const l = resolveDirective("viewer");
|
|
1140
1147
|
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
1141
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.row[a.column.field], (n,
|
|
1148
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.row[a.column.field], (n, i) => (openBlock(), createElementBlock("div", {
|
|
1142
1149
|
class: "Link flex",
|
|
1143
1150
|
title: n.FileName
|
|
1144
1151
|
}, [
|
|
@@ -1159,7 +1166,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1159
1166
|
createElementVNode("a", {
|
|
1160
1167
|
href: n.FilePath,
|
|
1161
1168
|
download: n.FileName
|
|
1162
|
-
}, toDisplayString(
|
|
1169
|
+
}, toDisplayString(i + 1) + "." + toDisplayString(n.FileType), 9, _hoisted_4$1)
|
|
1163
1170
|
], 8, _hoisted_2$3))), 256))
|
|
1164
1171
|
])), [
|
|
1165
1172
|
[
|
|
@@ -1199,8 +1206,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1199
1206
|
e("change", o, l, n);
|
|
1200
1207
|
}
|
|
1201
1208
|
function c(o, l) {
|
|
1202
|
-
var
|
|
1203
|
-
if ((
|
|
1209
|
+
var i;
|
|
1210
|
+
if ((i = l.params) != null && i.disable) return;
|
|
1204
1211
|
let n = layer.open({
|
|
1205
1212
|
type: 2,
|
|
1206
1213
|
title: "图标选择",
|
|
@@ -1252,18 +1259,18 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1252
1259
|
if ((y = l.params) != null && y.disabled) return;
|
|
1253
1260
|
let {
|
|
1254
1261
|
PickPeopleType: n,
|
|
1255
|
-
PickPeopleCheckType:
|
|
1262
|
+
PickPeopleCheckType: i,
|
|
1256
1263
|
PickPeopleIsAll: m,
|
|
1257
|
-
PickPeopleStatus:
|
|
1264
|
+
PickPeopleStatus: u,
|
|
1258
1265
|
StoredValueField: s,
|
|
1259
1266
|
ReturnValueField: d,
|
|
1260
1267
|
BackfillField: _
|
|
1261
1268
|
} = e.column.params;
|
|
1262
1269
|
openChoosePeople({
|
|
1263
1270
|
Type: n,
|
|
1264
|
-
Choose:
|
|
1271
|
+
Choose: i,
|
|
1265
1272
|
IsAll: m,
|
|
1266
|
-
Status:
|
|
1273
|
+
Status: u
|
|
1267
1274
|
}, (h) => {
|
|
1268
1275
|
isEmpty(s) ? o[l.field] = h.Name || null : (Array.isArray(s) || (s = [s]), Array.isArray(d) || (d = [d]), s.forEach((E, C) => o[E] = h[d[C]] || null)), r("change", h, o, l);
|
|
1269
1276
|
}, _ ? o[_] : null);
|
|
@@ -1344,8 +1351,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1344
1351
|
setup(a, { emit: t }) {
|
|
1345
1352
|
const e = a, r = t;
|
|
1346
1353
|
function c(o, l, n) {
|
|
1347
|
-
e.gridRef.getTableData().tableData.filter((
|
|
1348
|
-
|
|
1354
|
+
e.gridRef.getTableData().tableData.filter((i) => i !== l).forEach((i) => {
|
|
1355
|
+
i[n.field] && (i[n.field] = !1);
|
|
1349
1356
|
}), r("change", o, l, n);
|
|
1350
1357
|
}
|
|
1351
1358
|
return (o, l) => {
|
|
@@ -1353,8 +1360,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1353
1360
|
return openBlock(), createBlock(unref(ElRadioGroup), {
|
|
1354
1361
|
disabled: (n = a.column.params) == null ? void 0 : n.disabled,
|
|
1355
1362
|
modelValue: a.row[a.column.field],
|
|
1356
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
1357
|
-
onChange: l[1] || (l[1] = (
|
|
1363
|
+
"onUpdate:modelValue": l[0] || (l[0] = (i) => a.row[a.column.field] = i),
|
|
1364
|
+
onChange: l[1] || (l[1] = (i) => c(i, a.row, a.column))
|
|
1358
1365
|
}, {
|
|
1359
1366
|
default: withCtx(() => [
|
|
1360
1367
|
createVNode(unref(ElRadio), { value: !0 })
|
|
@@ -1395,17 +1402,17 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1395
1402
|
var l;
|
|
1396
1403
|
return ((l = t.column.params[t.gridRef.getRowid(t.row)]) == null ? void 0 : l.options) || t.column.params.options;
|
|
1397
1404
|
}), r = computed(() => {
|
|
1398
|
-
var n,
|
|
1405
|
+
var n, i;
|
|
1399
1406
|
const l = t.row[t.column.field];
|
|
1400
1407
|
if (l && l.length > 1) {
|
|
1401
1408
|
let m = [];
|
|
1402
|
-
return l.split(",").map((
|
|
1409
|
+
return l.split(",").map((u) => {
|
|
1403
1410
|
var d, _;
|
|
1404
|
-
const s = (_ = (d = e.value) == null ? void 0 : d.find((y) => y.value ==
|
|
1411
|
+
const s = (_ = (d = e.value) == null ? void 0 : d.find((y) => y.value == u)) == null ? void 0 : _.label;
|
|
1405
1412
|
s !== void 0 && m.push(s);
|
|
1406
1413
|
}), m.join(",");
|
|
1407
1414
|
} else
|
|
1408
|
-
return ((
|
|
1415
|
+
return ((i = (n = e.value) == null ? void 0 : n.find((m) => m.value == l)) == null ? void 0 : i.label) || "";
|
|
1409
1416
|
});
|
|
1410
1417
|
return (l, n) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue: r.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1411
1418
|
key: 1,
|
|
@@ -1445,7 +1452,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1445
1452
|
return ((l = t.column.params[t.gridRef.getRowid(t.row)]) == null ? void 0 : l.options) || t.column.params.options;
|
|
1446
1453
|
}), r = computed(() => {
|
|
1447
1454
|
var l, n;
|
|
1448
|
-
return ((n = (l = e.value) == null ? void 0 : l.find((
|
|
1455
|
+
return ((n = (l = e.value) == null ? void 0 : l.find((i) => i.value == t.row[t.column.field])) == null ? void 0 : n.label) || "";
|
|
1449
1456
|
});
|
|
1450
1457
|
return (l, n) => 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", {
|
|
1451
1458
|
key: 1,
|
|
@@ -1562,13 +1569,13 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1562
1569
|
dayjs.extend(isoWeek), dayjs.extend(quarterOfYear), dayjs.extend(customParseFormat);
|
|
1563
1570
|
const e = a, r = ref(c(e.row[e.column.field], ((l = e.column.params) == null ? void 0 : l.DateType) || "date"));
|
|
1564
1571
|
onBeforeUnmount(() => {
|
|
1565
|
-
var
|
|
1566
|
-
const n = ((
|
|
1572
|
+
var i;
|
|
1573
|
+
const n = ((i = e.column.params) == null ? void 0 : i.DateType) || "date";
|
|
1567
1574
|
r.value && (n === "year" ? e.row[e.column.field] = dayjs(r.value).format("YYYY年") : n === "month" ? e.row[e.column.field] = dayjs(r.value).format("YYYY年MM月") : n === "quarter" ? e.row[e.column.field] = dayjs(r.value).format("YYYY年第Q季度") : n === "week" ? e.row[e.column.field] = dayjs(r.value).format("YYYY年第WW周") : n === "datetime" ? e.row[e.column.field] = dayjs(r.value).format("YYYY-MM-DD HH:mm:ss") : e.row[e.column.field] = dayjs(r.value).format("YYYY-MM-DD"));
|
|
1568
1575
|
});
|
|
1569
|
-
function c(n,
|
|
1576
|
+
function c(n, i) {
|
|
1570
1577
|
if (!n) return null;
|
|
1571
|
-
const
|
|
1578
|
+
const u = {
|
|
1572
1579
|
time: "HH:mm:ss",
|
|
1573
1580
|
date: "YYYY-MM-DD",
|
|
1574
1581
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
@@ -1576,38 +1583,38 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1576
1583
|
month: "YYYY-MM",
|
|
1577
1584
|
quarter: "YYYY-Q",
|
|
1578
1585
|
year: "YYYY"
|
|
1579
|
-
}[
|
|
1580
|
-
if (!
|
|
1581
|
-
let s = dayjs(n,
|
|
1582
|
-
if (!s.isValid() &&
|
|
1586
|
+
}[i];
|
|
1587
|
+
if (!u) throw new Error("Unsupported date type");
|
|
1588
|
+
let s = dayjs(n, u);
|
|
1589
|
+
if (!s.isValid() && i === "week") {
|
|
1583
1590
|
const d = n.match(/^(\d{4})年第(\d{2})周$/);
|
|
1584
1591
|
if (d) {
|
|
1585
1592
|
const [, _, y] = d;
|
|
1586
1593
|
s = dayjs(`${_}-01-01`).isoWeek(Number(y));
|
|
1587
1594
|
}
|
|
1588
|
-
} else if (!s.isValid() &&
|
|
1595
|
+
} else if (!s.isValid() && i === "quarter") {
|
|
1589
1596
|
const d = n.match(/^(\d{4})年第(\d)季度$/);
|
|
1590
1597
|
if (d) {
|
|
1591
1598
|
const [, _, y] = d;
|
|
1592
1599
|
s = dayjs(`${_}-01-01`).quarter(Number(y));
|
|
1593
1600
|
}
|
|
1594
|
-
} else if (!s.isValid() &&
|
|
1601
|
+
} else if (!s.isValid() && i === "month") {
|
|
1595
1602
|
const d = n.match(/^(\d{4})年(\d{2})月$/);
|
|
1596
1603
|
if (d) {
|
|
1597
1604
|
const [, _, y] = d;
|
|
1598
1605
|
s = dayjs(`${_}-${y}-01`);
|
|
1599
1606
|
}
|
|
1600
|
-
} else if (!s.isValid() &&
|
|
1607
|
+
} else if (!s.isValid() && i === "year") {
|
|
1601
1608
|
const d = n.match(/^(\d{4})年$/);
|
|
1602
1609
|
if (d) {
|
|
1603
1610
|
const [, _] = d;
|
|
1604
1611
|
s = dayjs(`${_}-01-01`);
|
|
1605
1612
|
}
|
|
1606
1613
|
}
|
|
1607
|
-
return s.isValid() ? o(s,
|
|
1614
|
+
return s.isValid() ? o(s, i) : null;
|
|
1608
1615
|
}
|
|
1609
|
-
function o(n,
|
|
1610
|
-
switch (
|
|
1616
|
+
function o(n, i) {
|
|
1617
|
+
switch (i) {
|
|
1611
1618
|
case "time":
|
|
1612
1619
|
return n.format("HH:mm:ss");
|
|
1613
1620
|
case "date":
|
|
@@ -1626,11 +1633,11 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1626
1633
|
return null;
|
|
1627
1634
|
}
|
|
1628
1635
|
}
|
|
1629
|
-
return (n,
|
|
1636
|
+
return (n, i) => {
|
|
1630
1637
|
var m;
|
|
1631
1638
|
return openBlock(), createBlock(unref(VxeInput), {
|
|
1632
1639
|
modelValue: r.value,
|
|
1633
|
-
"onUpdate:modelValue":
|
|
1640
|
+
"onUpdate:modelValue": i[0] || (i[0] = (u) => r.value = u),
|
|
1634
1641
|
type: ((m = a.column.params) == null ? void 0 : m.DateType) || "date",
|
|
1635
1642
|
clearable: "",
|
|
1636
1643
|
transfer: ""
|
|
@@ -1737,7 +1744,7 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1737
1744
|
t.row[t.column.field] = e.value;
|
|
1738
1745
|
const o = t.column.params.LabelStoreField;
|
|
1739
1746
|
if (o) {
|
|
1740
|
-
const n = (l = c.value.find((
|
|
1747
|
+
const n = (l = c.value.find((i) => i.value === e.value)) == null ? void 0 : l.label;
|
|
1741
1748
|
n !== void 0 ? t.row[o] = n : e.value === void 0 ? t.row[o] = null : e.value !== void 0 && n === void 0 && (t.row[o] = e.value);
|
|
1742
1749
|
}
|
|
1743
1750
|
}), (o, l) => (openBlock(), createBlock(unref(ElSelect), {
|
|
@@ -1796,7 +1803,7 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1796
1803
|
t.row[t.column.field] = o;
|
|
1797
1804
|
const l = t.column.params.LabelStoreField;
|
|
1798
1805
|
if (l) {
|
|
1799
|
-
const n = r.value.filter((
|
|
1806
|
+
const n = r.value.filter((i) => c.value.includes(i.value)).map((i) => i.label).join(",");
|
|
1800
1807
|
t.row[l] = n;
|
|
1801
1808
|
}
|
|
1802
1809
|
});
|
|
@@ -1858,20 +1865,20 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1858
1865
|
loading: !1
|
|
1859
1866
|
});
|
|
1860
1867
|
onBeforeUnmount(() => {
|
|
1861
|
-
const { StoredValueField: n, ReturnValueField:
|
|
1862
|
-
n && n.length ? n.forEach((m,
|
|
1868
|
+
const { StoredValueField: n, ReturnValueField: i } = o;
|
|
1869
|
+
n && n.length ? n.forEach((m, u) => {
|
|
1863
1870
|
const s = o.options.find((d) => d._value === c.value);
|
|
1864
|
-
s && (r.row[m] = s[u
|
|
1871
|
+
s && (r.row[m] = s[i[u]]);
|
|
1865
1872
|
}) : r.row[r.column.field] = c.value;
|
|
1866
1873
|
});
|
|
1867
1874
|
function l(n) {
|
|
1868
|
-
const { DataAPIOID:
|
|
1869
|
-
n ? (o.loading = !0, e("remoteMethod", { DataAPIOID:
|
|
1875
|
+
const { DataAPIOID: i, SearchField: m } = o;
|
|
1876
|
+
n ? (o.loading = !0, e("remoteMethod", { DataAPIOID: i, SearchField: m, query: n, params: o })) : r.row[r.column.field] = null;
|
|
1870
1877
|
}
|
|
1871
|
-
return (n,
|
|
1878
|
+
return (n, i) => (openBlock(), createBlock(unref(ElSelect), {
|
|
1872
1879
|
class: "z-1 vxe-table--ignore-clear",
|
|
1873
1880
|
modelValue: c.value,
|
|
1874
|
-
"onUpdate:modelValue":
|
|
1881
|
+
"onUpdate:modelValue": i[0] || (i[0] = (m) => c.value = m),
|
|
1875
1882
|
"allow-create": "",
|
|
1876
1883
|
"automatic-dropdown": "",
|
|
1877
1884
|
filterable: "",
|
|
@@ -2019,7 +2026,7 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
2019
2026
|
indent: 12
|
|
2020
2027
|
}, {
|
|
2021
2028
|
label: withCtx(({ label: l, value: n }) => [
|
|
2022
|
-
createElementVNode("span", null, toDisplayString(a.column.params.options.find((
|
|
2029
|
+
createElementVNode("span", null, toDisplayString(a.column.params.options.find((i) => i[r.value.value] === n) ? l : ""), 1)
|
|
2023
2030
|
]),
|
|
2024
2031
|
_: 1
|
|
2025
2032
|
}, 8, ["modelValue", "data", "props"]));
|
|
@@ -2106,7 +2113,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2106
2113
|
function l() {
|
|
2107
2114
|
o("pageChange", e.pagination);
|
|
2108
2115
|
}
|
|
2109
|
-
return (n,
|
|
2116
|
+
return (n, i) => (openBlock(), createElementBlock("div", {
|
|
2110
2117
|
ref_key: "pagingDom",
|
|
2111
2118
|
ref: r,
|
|
2112
2119
|
class: "flex items-center w-full h-12 border border-solid border-[#e8eaec] box-border"
|
|
@@ -2116,9 +2123,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2116
2123
|
class: "w-full !h-full",
|
|
2117
2124
|
background: "",
|
|
2118
2125
|
"current-page": a.pagination.Page,
|
|
2119
|
-
"onUpdate:currentPage":
|
|
2126
|
+
"onUpdate:currentPage": i[0] || (i[0] = (m) => a.pagination.Page = m),
|
|
2120
2127
|
"page-size": a.pagination.PageSize,
|
|
2121
|
-
"onUpdate:pageSize":
|
|
2128
|
+
"onUpdate:pageSize": i[1] || (i[1] = (m) => a.pagination.PageSize = m),
|
|
2122
2129
|
total: a.pagination.Total,
|
|
2123
2130
|
layouts: c.value,
|
|
2124
2131
|
onPageChange: l,
|
|
@@ -2161,9 +2168,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2161
2168
|
document.removeEventListener("click", A, !0);
|
|
2162
2169
|
});
|
|
2163
2170
|
const {
|
|
2164
|
-
CheckboxRender:
|
|
2171
|
+
CheckboxRender: i,
|
|
2165
2172
|
ColorPickerRender: m,
|
|
2166
|
-
IconPickerRender:
|
|
2173
|
+
IconPickerRender: u,
|
|
2167
2174
|
RadioRender: s,
|
|
2168
2175
|
ProgressRender: d,
|
|
2169
2176
|
ActionRender: _,
|
|
@@ -2466,7 +2473,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2466
2473
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2467
2474
|
]),
|
|
2468
2475
|
CheckboxRender: withCtx(({ row: p, column: f }) => [
|
|
2469
|
-
createVNode(unref(
|
|
2476
|
+
createVNode(unref(i), {
|
|
2470
2477
|
row: p,
|
|
2471
2478
|
column: f,
|
|
2472
2479
|
"grid-ref": o.value
|
|
@@ -2480,7 +2487,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2480
2487
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2481
2488
|
]),
|
|
2482
2489
|
IconPickerRender: withCtx(({ row: p, column: f }) => [
|
|
2483
|
-
createVNode(unref(
|
|
2490
|
+
createVNode(unref(u), {
|
|
2484
2491
|
row: p,
|
|
2485
2492
|
column: f,
|
|
2486
2493
|
"grid-ref": o.value
|
|
@@ -2702,22 +2709,22 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
2702
2709
|
createElementVNode("thead", null, [
|
|
2703
2710
|
createElementVNode("tr", null, [
|
|
2704
2711
|
n[0] || (n[0] = createElementVNode("th", { class: "w[50px]" }, "序号", -1)),
|
|
2705
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (
|
|
2706
|
-
style: normalizeStyle({ width: o(
|
|
2707
|
-
}, toDisplayString(
|
|
2712
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (i) => (openBlock(), createElementBlock("th", {
|
|
2713
|
+
style: normalizeStyle({ width: o(i.width) })
|
|
2714
|
+
}, toDisplayString(i.title), 5))), 256))
|
|
2708
2715
|
])
|
|
2709
2716
|
]),
|
|
2710
2717
|
createElementVNode("tbody", {
|
|
2711
2718
|
ref_key: "tbody",
|
|
2712
2719
|
ref: r
|
|
2713
2720
|
}, [
|
|
2714
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.value, (
|
|
2721
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.value, (i, m) => (openBlock(), createElementBlock("tr", {
|
|
2715
2722
|
class: normalizeClass({ zebra: m % 2 != 0, highlight: l.highlight === m }),
|
|
2716
|
-
onClick: (
|
|
2723
|
+
onClick: (u) => c("change", i),
|
|
2717
2724
|
index: m
|
|
2718
2725
|
}, [
|
|
2719
2726
|
createElementVNode("td", _hoisted_3, toDisplayString(m + 1), 1),
|
|
2720
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (
|
|
2727
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (u) => (openBlock(), createElementBlock("td", null, toDisplayString(i[u.field]), 1))), 256))
|
|
2721
2728
|
], 10, _hoisted_2$1))), 256))
|
|
2722
2729
|
], 512)
|
|
2723
2730
|
]),
|
|
@@ -2745,7 +2752,7 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
2745
2752
|
query: "",
|
|
2746
2753
|
tableData: [],
|
|
2747
2754
|
loading: !1
|
|
2748
|
-
}), r = ref(), c = ref(), o = ref(!1), l = ref(-1), n = reactive({ x: 0, y: 0, w: 0 }),
|
|
2755
|
+
}), r = ref(), c = ref(), o = ref(!1), l = ref(-1), n = reactive({ x: 0, y: 0, w: 0 }), i = useModel(a, "modelValue"), m = t, u = () => m("remote-method", e), s = () => {
|
|
2749
2756
|
o.value = !0, m("remote-method", e), d();
|
|
2750
2757
|
}, d = async () => {
|
|
2751
2758
|
if (!o.value) return;
|
|
@@ -2763,8 +2770,8 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
2763
2770
|
m("change", k), r.value.blur();
|
|
2764
2771
|
};
|
|
2765
2772
|
return watch(() => e.query, (k) => {
|
|
2766
|
-
k !==
|
|
2767
|
-
}), watch(() =>
|
|
2773
|
+
k !== i.value && (i.value = k);
|
|
2774
|
+
}), watch(() => i.value, (k) => {
|
|
2768
2775
|
k !== e.query && (e.query = k);
|
|
2769
2776
|
}), effect(() => {
|
|
2770
2777
|
e.query, o.value, l.value = -1;
|
|
@@ -2773,7 +2780,7 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
2773
2780
|
ref_key: "input",
|
|
2774
2781
|
ref: r,
|
|
2775
2782
|
"onUpdate:modelValue": w[0] || (w[0] = (R) => e.query = R),
|
|
2776
|
-
onInput:
|
|
2783
|
+
onInput: u,
|
|
2777
2784
|
onFocus: s,
|
|
2778
2785
|
onBlur: y,
|
|
2779
2786
|
onKeydown: [
|