gzhr-ui 1.1.21 → 1.1.22
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.
|
@@ -13,44 +13,44 @@ 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,
|
|
17
|
-
var
|
|
18
|
-
const
|
|
19
|
-
return Array.isArray(
|
|
16
|
+
const e = n, o = t, a = ref(""), r = ref(""), l = ref(!1), i = ref(), m = ref(), s = ref(), u = computed(() => {
|
|
17
|
+
var d, v;
|
|
18
|
+
const c = ((v = (d = e.column.filters) == null ? void 0 : d[0]) == null ? void 0 : v.data) || [];
|
|
19
|
+
return Array.isArray(c) && c.length === 2 && c[0] && c[1] ? `${c[0]} 至 ${c[1]}` : "";
|
|
20
20
|
});
|
|
21
21
|
onMounted(() => {
|
|
22
|
-
var
|
|
23
|
-
const
|
|
24
|
-
Array.isArray(
|
|
22
|
+
var d, v;
|
|
23
|
+
const c = ((v = (d = e.column.filters) == null ? void 0 : d[0]) == null ? void 0 : v.data) || [];
|
|
24
|
+
Array.isArray(c) && c.length === 2 && (a.value = c[0] || "", r.value = c[1] || ""), document.addEventListener("click", f);
|
|
25
25
|
}), onBeforeUnmount(() => {
|
|
26
|
-
document.removeEventListener("click",
|
|
26
|
+
document.removeEventListener("click", f);
|
|
27
27
|
});
|
|
28
28
|
const _ = () => {
|
|
29
29
|
l.value = !l.value;
|
|
30
|
-
},
|
|
31
|
-
var
|
|
30
|
+
}, f = (c) => {
|
|
31
|
+
var x, D;
|
|
32
32
|
if (!l.value) return;
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
const d = c.target, v = s.value, S = (D = (x = m.value) == null ? void 0 : x.popperRef) == null ? void 0 : D.contentRef;
|
|
34
|
+
v && v.contains(d) || S && S.contains(d) || (l.value = !1);
|
|
35
35
|
};
|
|
36
36
|
function k() {
|
|
37
|
-
if (!a.value && !
|
|
37
|
+
if (!a.value && !r.value)
|
|
38
38
|
e.column.filters[0].data = [];
|
|
39
|
-
else if (!a.value || !
|
|
39
|
+
else if (!a.value || !r.value) {
|
|
40
40
|
layer != null && layer.msg && layer.msg("请选择完整的时间范围");
|
|
41
41
|
return;
|
|
42
42
|
} else
|
|
43
|
-
e.column.filters[0].data = [a.value,
|
|
44
|
-
l.value = !1,
|
|
43
|
+
e.column.filters[0].data = [a.value, r.value];
|
|
44
|
+
l.value = !1, o("FilterSearch", e.column);
|
|
45
45
|
}
|
|
46
46
|
function p() {
|
|
47
|
-
a.value = "",
|
|
47
|
+
a.value = "", r.value = "", e.column.filters[0].data = [];
|
|
48
48
|
}
|
|
49
|
-
return (
|
|
49
|
+
return (c, d) => (openBlock(), createElementBlock("div", {
|
|
50
50
|
class: "size-full",
|
|
51
51
|
title: u.value,
|
|
52
52
|
ref_key: "wrapperRef",
|
|
53
|
-
ref:
|
|
53
|
+
ref: s
|
|
54
54
|
}, [
|
|
55
55
|
createVNode(unref(ElInput), {
|
|
56
56
|
ref_key: "inputRef",
|
|
@@ -66,7 +66,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
66
66
|
"virtual-triggering": "",
|
|
67
67
|
trigger: "manual",
|
|
68
68
|
visible: l.value,
|
|
69
|
-
"onUpdate:visible":
|
|
69
|
+
"onUpdate:visible": d[2] || (d[2] = (v) => l.value = v),
|
|
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": d[0] || (d[0] = (v) => a.value = v),
|
|
79
79
|
type: "date",
|
|
80
80
|
"value-format": "YYYY-MM-DD",
|
|
81
81
|
placeholder: "开始日期",
|
|
@@ -84,8 +84,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
84
84
|
style: { width: "100%" }
|
|
85
85
|
}, null, 8, ["modelValue"]),
|
|
86
86
|
createVNode(unref(ElDatePicker), {
|
|
87
|
-
modelValue:
|
|
88
|
-
"onUpdate:modelValue":
|
|
87
|
+
modelValue: r.value,
|
|
88
|
+
"onUpdate:modelValue": d[1] || (d[1] = (v) => r.value = v),
|
|
89
89
|
type: "date",
|
|
90
90
|
"value-format": "YYYY-MM-DD",
|
|
91
91
|
placeholder: "结束日期",
|
|
@@ -100,7 +100,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
100
100
|
class: "btn-confirm",
|
|
101
101
|
onClick: k
|
|
102
102
|
}, {
|
|
103
|
-
default: withCtx(() =>
|
|
103
|
+
default: withCtx(() => d[3] || (d[3] = [
|
|
104
104
|
createTextVNode(" 确认 ")
|
|
105
105
|
])),
|
|
106
106
|
_: 1
|
|
@@ -110,7 +110,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
110
110
|
class: "btn-reset",
|
|
111
111
|
onClick: p
|
|
112
112
|
}, {
|
|
113
|
-
default: withCtx(() =>
|
|
113
|
+
default: withCtx(() => d[4] || (d[4] = [
|
|
114
114
|
createTextVNode(" 重置 ")
|
|
115
115
|
])),
|
|
116
116
|
_: 1
|
|
@@ -132,12 +132,12 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
132
132
|
},
|
|
133
133
|
emits: ["FilterSearch"],
|
|
134
134
|
setup(n, { emit: t }) {
|
|
135
|
-
const e = n,
|
|
135
|
+
const e = n, o = ref([]), a = computed(() => e.column.filters[0].data.length ? e.column.filters[0].data.map((u) => u ? "是" : "否").join(",") : ""), r = ref(), l = ref(), i = () => {
|
|
136
136
|
var u, _;
|
|
137
137
|
(_ = (u = unref(l).popperRef) == null ? void 0 : u.delayHide) == null || _.call(u);
|
|
138
138
|
}, m = t;
|
|
139
|
-
function
|
|
140
|
-
|
|
139
|
+
function s() {
|
|
140
|
+
o.value.length ? e.column.filters[0].data = [...o.value] : e.column.filters[0].data = [];
|
|
141
141
|
}
|
|
142
142
|
return (u, _) => (openBlock(), createElementBlock("div", {
|
|
143
143
|
class: "size-full",
|
|
@@ -145,17 +145,17 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
145
145
|
}, [
|
|
146
146
|
withDirectives(createVNode(unref(ElInput), {
|
|
147
147
|
ref_key: "inputRef",
|
|
148
|
-
ref:
|
|
148
|
+
ref: r,
|
|
149
149
|
value: a.value,
|
|
150
150
|
readonly: "",
|
|
151
|
-
onKeyup: _[0] || (_[0] = withKeys((
|
|
151
|
+
onKeyup: _[0] || (_[0] = withKeys((f) => m("FilterSearch", n.column), ["enter"]))
|
|
152
152
|
}, null, 8, ["value"]), [
|
|
153
153
|
[unref(ClickOutside), i]
|
|
154
154
|
]),
|
|
155
155
|
createVNode(unref(ElPopover), {
|
|
156
156
|
ref_key: "popoverRef",
|
|
157
157
|
ref: l,
|
|
158
|
-
"virtual-ref":
|
|
158
|
+
"virtual-ref": r.value,
|
|
159
159
|
trigger: "click",
|
|
160
160
|
"virtual-triggering": "",
|
|
161
161
|
"hide-after": 0
|
|
@@ -163,9 +163,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
163
163
|
default: withCtx(() => [
|
|
164
164
|
createVNode(unref(ElCheckboxGroup), {
|
|
165
165
|
class: "flex flex-col",
|
|
166
|
-
modelValue:
|
|
167
|
-
"onUpdate:modelValue": _[1] || (_[1] = (
|
|
168
|
-
onChange:
|
|
166
|
+
modelValue: o.value,
|
|
167
|
+
"onUpdate:modelValue": _[1] || (_[1] = (f) => o.value = f),
|
|
168
|
+
onChange: s
|
|
169
169
|
}, {
|
|
170
170
|
default: withCtx(() => [
|
|
171
171
|
createVNode(unref(ElCheckbox), {
|
|
@@ -194,17 +194,17 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
194
194
|
},
|
|
195
195
|
emits: ["FilterSearch"],
|
|
196
196
|
setup(n, { emit: t }) {
|
|
197
|
-
const e = n,
|
|
197
|
+
const e = n, o = 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
200
|
var _;
|
|
201
|
-
return (_ = e.column.params.options.find((
|
|
202
|
-
}).join(",") : ""),
|
|
201
|
+
return (_ = e.column.params.options.find((f) => f.value === u)) == null ? void 0 : _.label;
|
|
202
|
+
}).join(",") : ""), r = ref(), l = ref(), i = () => {
|
|
203
203
|
var u, _;
|
|
204
204
|
(_ = (u = unref(l).popperRef) == null ? void 0 : u.delayHide) == null || _.call(u);
|
|
205
205
|
}, m = t;
|
|
206
|
-
function
|
|
207
|
-
|
|
206
|
+
function s() {
|
|
207
|
+
o.value.length ? e.column.filters[0].data = [...o.value] : e.column.filters[0].data = [];
|
|
208
208
|
}
|
|
209
209
|
return (u, _) => (openBlock(), createElementBlock("div", {
|
|
210
210
|
class: "size-full",
|
|
@@ -212,17 +212,17 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
212
212
|
}, [
|
|
213
213
|
withDirectives(createVNode(unref(ElInput), {
|
|
214
214
|
ref_key: "inputRef",
|
|
215
|
-
ref:
|
|
215
|
+
ref: r,
|
|
216
216
|
value: a.value,
|
|
217
217
|
readonly: "",
|
|
218
|
-
onKeyup: _[0] || (_[0] = withKeys((
|
|
218
|
+
onKeyup: _[0] || (_[0] = withKeys((f) => m("FilterSearch", n.column), ["enter"]))
|
|
219
219
|
}, null, 8, ["value"]), [
|
|
220
220
|
[unref(ClickOutside), i]
|
|
221
221
|
]),
|
|
222
222
|
createVNode(unref(ElPopover), {
|
|
223
223
|
ref_key: "popoverRef",
|
|
224
224
|
ref: l,
|
|
225
|
-
"virtual-ref":
|
|
225
|
+
"virtual-ref": r.value,
|
|
226
226
|
trigger: "click",
|
|
227
227
|
"virtual-triggering": "",
|
|
228
228
|
"hide-after": 0
|
|
@@ -231,15 +231,15 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
231
231
|
n.column.params.FieldType === "check" ? (openBlock(), createBlock(unref(ElCheckboxGroup), {
|
|
232
232
|
key: 0,
|
|
233
233
|
class: "flex flex-col",
|
|
234
|
-
modelValue:
|
|
235
|
-
"onUpdate:modelValue": _[1] || (_[1] = (
|
|
236
|
-
onChange:
|
|
234
|
+
modelValue: o.value,
|
|
235
|
+
"onUpdate:modelValue": _[1] || (_[1] = (f) => o.value = f),
|
|
236
|
+
onChange: s
|
|
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, (f) => (openBlock(), createBlock(unref(ElCheckbox), {
|
|
240
|
+
key: f.value,
|
|
241
|
+
label: f.label,
|
|
242
|
+
value: f.value
|
|
243
243
|
}, null, 8, ["label", "value"]))), 128))
|
|
244
244
|
]),
|
|
245
245
|
_: 1
|
|
@@ -247,15 +247,15 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
247
247
|
n.column.params.FieldType === "select" ? (openBlock(), createBlock(unref(ElCheckboxGroup), {
|
|
248
248
|
key: 1,
|
|
249
249
|
class: "flex flex-col",
|
|
250
|
-
modelValue:
|
|
251
|
-
"onUpdate:modelValue": _[2] || (_[2] = (
|
|
252
|
-
onChange:
|
|
250
|
+
modelValue: o.value,
|
|
251
|
+
"onUpdate:modelValue": _[2] || (_[2] = (f) => o.value = f),
|
|
252
|
+
onChange: s
|
|
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, (f) => (openBlock(), createBlock(unref(ElCheckbox), {
|
|
256
|
+
key: f.value,
|
|
257
|
+
label: f.label,
|
|
258
|
+
value: f.value
|
|
259
259
|
}, null, 8, ["label", "value"]))), 128))
|
|
260
260
|
]),
|
|
261
261
|
_: 1
|
|
@@ -275,32 +275,32 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
275
275
|
},
|
|
276
276
|
emits: ["FilterSearch"],
|
|
277
277
|
setup(n, { emit: t }) {
|
|
278
|
-
const e = n,
|
|
278
|
+
const e = n, o = ref([]), a = ref(null), r = ref(e.column.params.FieldType === "TreeMultipleSelect"), l = ref({
|
|
279
279
|
label: e.column.params.NodeNameField || "label",
|
|
280
280
|
value: e.column.params.NodeValueField || "value",
|
|
281
281
|
children: "children"
|
|
282
282
|
});
|
|
283
283
|
if (!e.column.params.TreeData) {
|
|
284
|
-
const { options:
|
|
285
|
-
e.column.params.TreeData = buildTree(deepClone(
|
|
284
|
+
const { options: s, ParentNodeField: u, NodeKeyField: _ } = e.column.params;
|
|
285
|
+
e.column.params.TreeData = buildTree(deepClone(s), u, _);
|
|
286
286
|
}
|
|
287
287
|
onMounted(() => {
|
|
288
|
-
|
|
288
|
+
o.value = e.column.params.TreeData;
|
|
289
289
|
});
|
|
290
290
|
const i = t;
|
|
291
291
|
function m() {
|
|
292
292
|
a.value ? e.column.filters[0].data = [a.value] : e.column.filters[0].data = [];
|
|
293
293
|
}
|
|
294
|
-
return (
|
|
294
|
+
return (s, u) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
295
295
|
clearable: "",
|
|
296
296
|
modelValue: a.value,
|
|
297
297
|
"onUpdate:modelValue": u[0] || (u[0] = (_) => a.value = _),
|
|
298
|
-
data:
|
|
298
|
+
data: o.value,
|
|
299
299
|
"render-after-expand": !1,
|
|
300
300
|
placeholder: "",
|
|
301
301
|
onChange: m,
|
|
302
|
-
multiple:
|
|
303
|
-
"show-checkbox":
|
|
302
|
+
multiple: r.value,
|
|
303
|
+
"show-checkbox": r.value,
|
|
304
304
|
props: l.value,
|
|
305
305
|
onKeyup: u[1] || (u[1] = withKeys((_) => i("FilterSearch", n.column), ["enter"]))
|
|
306
306
|
}, null, 8, ["modelValue", "data", "multiple", "show-checkbox", "props"]));
|
|
@@ -315,31 +315,31 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
315
315
|
},
|
|
316
316
|
emits: ["FilterSearch"],
|
|
317
317
|
setup(n, { emit: t }) {
|
|
318
|
-
const e = n,
|
|
318
|
+
const e = n, o = ref([]), a = ref([]), r = ref({
|
|
319
319
|
label: e.column.params.NodeNameField || "label",
|
|
320
320
|
value: e.column.params.NodeValueField || "value",
|
|
321
321
|
children: "children"
|
|
322
322
|
});
|
|
323
323
|
if (!e.column.params.TreeData) {
|
|
324
|
-
const { options:
|
|
325
|
-
e.column.params.TreeData = buildTree(deepClone(
|
|
324
|
+
const { options: s, ParentNodeField: u, NodeKeyField: _ } = e.column.params;
|
|
325
|
+
e.column.params.TreeData = buildTree(deepClone(s), u, _);
|
|
326
326
|
}
|
|
327
327
|
onMounted(() => {
|
|
328
|
-
|
|
328
|
+
o.value = e.column.params.TreeData;
|
|
329
329
|
});
|
|
330
330
|
const l = t;
|
|
331
331
|
function i() {
|
|
332
332
|
a.value ? e.column.filters[0].data = a.value : e.column.filters[0].data = [];
|
|
333
333
|
}
|
|
334
|
-
function m(
|
|
334
|
+
function m(s) {
|
|
335
335
|
cleanUpTreeFilterRows(), l("FilterSearch", e.column);
|
|
336
336
|
}
|
|
337
|
-
return (
|
|
337
|
+
return (s, u) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
338
338
|
"popper-class": "tree-filter-row",
|
|
339
339
|
clearable: "",
|
|
340
340
|
modelValue: a.value,
|
|
341
341
|
"onUpdate:modelValue": u[0] || (u[0] = (_) => a.value = _),
|
|
342
|
-
data:
|
|
342
|
+
data: o.value,
|
|
343
343
|
placeholder: "",
|
|
344
344
|
onChange: i,
|
|
345
345
|
multiple: "",
|
|
@@ -347,7 +347,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
347
347
|
"collapse-tags": "",
|
|
348
348
|
"collapse-tags-tooltip": "",
|
|
349
349
|
onKeyup: withKeys(m, ["enter"]),
|
|
350
|
-
props:
|
|
350
|
+
props: r.value
|
|
351
351
|
}, null, 8, ["modelValue", "data", "props"]));
|
|
352
352
|
}
|
|
353
353
|
}, _hoisted_1$g = ["title"], _hoisted_2$6 = { class: "flex flex-col justify-center items-center gap2" }, _hoisted_3$4 = { class: "flex justify-between mt2" }, _sfc_main$u = {
|
|
@@ -360,40 +360,40 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
360
360
|
},
|
|
361
361
|
emits: ["FilterSearch"],
|
|
362
362
|
setup(n, { emit: t }) {
|
|
363
|
-
const e = n,
|
|
364
|
-
var _,
|
|
365
|
-
(
|
|
363
|
+
const e = n, o = ref([null, null]), a = computed(() => e.column.filters && e.column.filters[0].data.length ? e.column.filters[0].data.join(" 至 ") : ""), r = ref(), l = ref(), i = () => {
|
|
364
|
+
var _, f;
|
|
365
|
+
(f = (_ = unref(l).popperRef) == null ? void 0 : _.delayHide) == null || f.call(_);
|
|
366
366
|
}, m = t;
|
|
367
|
-
function
|
|
368
|
-
if (!
|
|
367
|
+
function s() {
|
|
368
|
+
if (!o.value[0] && !o.value[1])
|
|
369
369
|
e.column.filters[0].data = [];
|
|
370
|
-
else if (!
|
|
370
|
+
else if (!o.value[0] || !o.value[1]) {
|
|
371
371
|
layer.msg("请输入完整的数字范围");
|
|
372
372
|
return;
|
|
373
373
|
} else
|
|
374
|
-
e.column.filters[0].data = [...
|
|
374
|
+
e.column.filters[0].data = [...o.value];
|
|
375
375
|
l.value.hide(), m("FilterSearch", e.column);
|
|
376
376
|
}
|
|
377
377
|
function u() {
|
|
378
|
-
|
|
378
|
+
o.value = [null, null];
|
|
379
379
|
}
|
|
380
|
-
return (_,
|
|
380
|
+
return (_, f) => (openBlock(), createElementBlock("div", {
|
|
381
381
|
class: "size-full",
|
|
382
382
|
title: a.value
|
|
383
383
|
}, [
|
|
384
384
|
withDirectives(createVNode(unref(ElInput), {
|
|
385
385
|
ref_key: "inputRef",
|
|
386
|
-
ref:
|
|
386
|
+
ref: r,
|
|
387
387
|
value: a.value,
|
|
388
388
|
readonly: "",
|
|
389
|
-
onKeyup:
|
|
389
|
+
onKeyup: f[0] || (f[0] = withKeys((k) => m("FilterSearch", n.column), ["enter"]))
|
|
390
390
|
}, null, 8, ["value"]), [
|
|
391
391
|
[unref(ClickOutside), i]
|
|
392
392
|
]),
|
|
393
393
|
createVNode(unref(ElPopover), {
|
|
394
394
|
ref_key: "popoverRef",
|
|
395
395
|
ref: l,
|
|
396
|
-
"virtual-ref":
|
|
396
|
+
"virtual-ref": r.value,
|
|
397
397
|
trigger: "click",
|
|
398
398
|
"virtual-triggering": "",
|
|
399
399
|
"hide-after": 0
|
|
@@ -402,22 +402,22 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
402
402
|
createElementVNode("div", _hoisted_2$6, [
|
|
403
403
|
createVNode(unref(ElInputNumber), {
|
|
404
404
|
class: "w-full",
|
|
405
|
-
modelValue:
|
|
406
|
-
"onUpdate:modelValue":
|
|
405
|
+
modelValue: o.value[0],
|
|
406
|
+
"onUpdate:modelValue": f[1] || (f[1] = (k) => o.value[0] = k)
|
|
407
407
|
}, null, 8, ["modelValue"]),
|
|
408
408
|
createVNode(unref(ElInputNumber), {
|
|
409
409
|
class: "w-full",
|
|
410
|
-
modelValue:
|
|
411
|
-
"onUpdate:modelValue":
|
|
410
|
+
modelValue: o.value[1],
|
|
411
|
+
"onUpdate:modelValue": f[2] || (f[2] = (k) => o.value[1] = k)
|
|
412
412
|
}, null, 8, ["modelValue"])
|
|
413
413
|
]),
|
|
414
414
|
createElementVNode("div", _hoisted_3$4, [
|
|
415
415
|
createVNode(unref(ElButton), {
|
|
416
416
|
size: "small",
|
|
417
417
|
type: "primary",
|
|
418
|
-
onClick:
|
|
418
|
+
onClick: s
|
|
419
419
|
}, {
|
|
420
|
-
default: withCtx(() =>
|
|
420
|
+
default: withCtx(() => f[3] || (f[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(() => f[4] || (f[4] = [
|
|
430
430
|
createTextVNode("重置")
|
|
431
431
|
])),
|
|
432
432
|
_: 1
|
|
@@ -454,44 +454,44 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
454
454
|
},
|
|
455
455
|
emits: ["FilterSearch", "SortChange"],
|
|
456
456
|
setup(n, { emit: t }) {
|
|
457
|
-
const e = n,
|
|
457
|
+
const e = n, o = ref([]);
|
|
458
458
|
let a = ref(0);
|
|
459
459
|
onMounted(() => {
|
|
460
460
|
if (e.column.params.filter) {
|
|
461
461
|
const m = document.querySelector(`[colid=${e.column.id}]`);
|
|
462
|
-
useElementClientSize(m, ({ clientHeight:
|
|
463
|
-
a.value =
|
|
462
|
+
useElementClientSize(m, ({ clientHeight: s }) => {
|
|
463
|
+
a.value = s <= 40 ? 65 : s;
|
|
464
464
|
});
|
|
465
465
|
} else
|
|
466
466
|
a.value = 23;
|
|
467
|
-
|
|
467
|
+
o.value = e.column.params.TreeData;
|
|
468
468
|
});
|
|
469
|
-
const
|
|
469
|
+
const r = t;
|
|
470
470
|
function l(m) {
|
|
471
471
|
if (m === "search") {
|
|
472
|
-
const
|
|
473
|
-
|
|
472
|
+
const s = e.gridRef.getColumns();
|
|
473
|
+
r("FilterSearch", e.column, s);
|
|
474
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
|
-
const
|
|
479
|
-
|
|
478
|
+
const s = e.gridRef.getColumns();
|
|
479
|
+
r("FilterSearch", e.column, s);
|
|
480
480
|
} else if (m === "clearAll") {
|
|
481
|
-
const
|
|
482
|
-
|
|
481
|
+
const s = e.gridRef.getColumns();
|
|
482
|
+
s.forEach((u) => {
|
|
483
483
|
u.filters && u.filters.forEach((_) => {
|
|
484
484
|
Array.isArray(_.data) ? _.data = [] : _.data = "";
|
|
485
485
|
});
|
|
486
|
-
}),
|
|
486
|
+
}), r("FilterSearch", e.column, s);
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
function i() {
|
|
490
|
-
var m,
|
|
491
|
-
(m = e.column.params) != null && m.IsVirtualField || ((
|
|
490
|
+
var m, s;
|
|
491
|
+
(m = e.column.params) != null && m.IsVirtualField || ((s = e.column).params ?? (s.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", r("SortChange", e.column, e.gridRef.getColumns()));
|
|
492
492
|
}
|
|
493
|
-
return (m,
|
|
494
|
-
var u, _,
|
|
493
|
+
return (m, s) => {
|
|
494
|
+
var u, _, f;
|
|
495
495
|
return openBlock(), createElementBlock("div", {
|
|
496
496
|
class: "flex flex-col filter-header",
|
|
497
497
|
title: n.column.title,
|
|
@@ -505,7 +505,7 @@ 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
|
-
(_ = n.column.params) != null && _.sortable && ((
|
|
508
|
+
(_ = n.column.params) != null && _.sortable && ((f = n.column.params) != null && f.sortStatus) ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
|
509
509
|
default: withCtx(() => {
|
|
510
510
|
var k, p;
|
|
511
511
|
return [
|
|
@@ -525,32 +525,32 @@ 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:
|
|
528
|
+
onFilterSearch: s[0] || (s[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:
|
|
532
|
+
onFilterSearch: s[1] || (s[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:
|
|
536
|
+
onFilterSearch: s[2] || (s[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:
|
|
540
|
+
onFilterSearch: s[3] || (s[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:
|
|
544
|
+
onFilterSearch: s[4] || (s[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:
|
|
548
|
+
onFilterSearch: s[5] || (s[5] = (k) => l("search"))
|
|
549
549
|
}, null, 8, ["column"])) : (openBlock(!0), createElementBlock(Fragment, { key: 6 }, renderList(n.column.filters, (k, p) => (openBlock(), createBlock(unref(ElInput), {
|
|
550
550
|
key: p,
|
|
551
551
|
modelValue: k.data,
|
|
552
|
-
"onUpdate:modelValue": (
|
|
553
|
-
onKeyup:
|
|
552
|
+
"onUpdate:modelValue": (c) => k.data = c,
|
|
553
|
+
onKeyup: s[6] || (s[6] = withKeys((c) => l("search"), ["enter"])),
|
|
554
554
|
disabled: ["colorPicker", "iconPicker", "progress"].includes(n.column.params.FieldType)
|
|
555
555
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"]))), 128)),
|
|
556
556
|
createVNode(unref(ElDropdown), {
|
|
@@ -563,19 +563,19 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
563
563
|
createVNode(unref(ElDropdownMenu), null, {
|
|
564
564
|
default: withCtx(() => [
|
|
565
565
|
createVNode(unref(ElDropdownItem), { command: "search" }, {
|
|
566
|
-
default: withCtx(() =>
|
|
566
|
+
default: withCtx(() => s[7] || (s[7] = [
|
|
567
567
|
createTextVNode("执行查询")
|
|
568
568
|
])),
|
|
569
569
|
_: 1
|
|
570
570
|
}),
|
|
571
571
|
createVNode(unref(ElDropdownItem), { command: "clear" }, {
|
|
572
|
-
default: withCtx(() =>
|
|
572
|
+
default: withCtx(() => s[8] || (s[8] = [
|
|
573
573
|
createTextVNode("清除当前条件")
|
|
574
574
|
])),
|
|
575
575
|
_: 1
|
|
576
576
|
}),
|
|
577
577
|
createVNode(unref(ElDropdownItem), { command: "clearAll" }, {
|
|
578
|
-
default: withCtx(() =>
|
|
578
|
+
default: withCtx(() => s[9] || (s[9] = [
|
|
579
579
|
createTextVNode("清除所有条件")
|
|
580
580
|
])),
|
|
581
581
|
_: 1
|
|
@@ -625,7 +625,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
625
625
|
emits: ["change", "ActionClick", "ActionRenderBefore"],
|
|
626
626
|
setup(n, { emit: t }) {
|
|
627
627
|
const e = n;
|
|
628
|
-
let
|
|
628
|
+
let o = ref(
|
|
629
629
|
deepClone(e.column.params.LinkButton ? e.column.params.LinkButton : [])
|
|
630
630
|
);
|
|
631
631
|
const a = t;
|
|
@@ -636,7 +636,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
636
636
|
row: e.row,
|
|
637
637
|
column: e.column,
|
|
638
638
|
gridRef: e.gridRef,
|
|
639
|
-
LinkButton:
|
|
639
|
+
LinkButton: o.value
|
|
640
640
|
});
|
|
641
641
|
},
|
|
642
642
|
{
|
|
@@ -644,7 +644,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
644
644
|
immediate: !0
|
|
645
645
|
}
|
|
646
646
|
);
|
|
647
|
-
function
|
|
647
|
+
function r(l) {
|
|
648
648
|
a("ActionClick", {
|
|
649
649
|
btnInfo: l,
|
|
650
650
|
row: e.row,
|
|
@@ -653,11 +653,11 @@ 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(
|
|
656
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(o), (m) => withDirectives((openBlock(), createBlock(unref(ElButton), {
|
|
657
657
|
key: m.Name,
|
|
658
658
|
class: "!text-[12px]",
|
|
659
659
|
link: "",
|
|
660
|
-
onClick: (
|
|
660
|
+
onClick: (s) => r(m)
|
|
661
661
|
}, {
|
|
662
662
|
default: withCtx(() => [
|
|
663
663
|
createTextVNode(toDisplayString(m.Name), 1)
|
|
@@ -691,21 +691,21 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
691
691
|
},
|
|
692
692
|
emits: ["change"],
|
|
693
693
|
setup(n, { emit: t }) {
|
|
694
|
-
const e = n,
|
|
694
|
+
const e = n, o = ref(!!e.row[e.column.field]);
|
|
695
695
|
watchEffect(() => {
|
|
696
|
-
typeof e.row[e.column.field] != "boolean" ?
|
|
696
|
+
typeof e.row[e.column.field] != "boolean" ? o.value = !!e.row[e.column.field] : o.value = e.row[e.column.field];
|
|
697
697
|
});
|
|
698
698
|
const a = t;
|
|
699
|
-
function
|
|
699
|
+
function r(l, i, m) {
|
|
700
700
|
i[m.field] = l, a("change", l, i, m);
|
|
701
701
|
}
|
|
702
702
|
return (l, i) => {
|
|
703
703
|
var m;
|
|
704
704
|
return openBlock(), createBlock(unref(ElCheckbox), {
|
|
705
705
|
disabled: (m = n.column.params) == null ? void 0 : m.disabled,
|
|
706
|
-
modelValue:
|
|
707
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
708
|
-
onChange: i[1] || (i[1] = (
|
|
706
|
+
modelValue: o.value,
|
|
707
|
+
"onUpdate:modelValue": i[0] || (i[0] = (s) => o.value = s),
|
|
708
|
+
onChange: i[1] || (i[1] = (s) => r(s, n.row, n.column))
|
|
709
709
|
}, null, 8, ["disabled", "modelValue"]);
|
|
710
710
|
};
|
|
711
711
|
}
|
|
@@ -749,85 +749,85 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
749
749
|
e.value.forEach((u) => {
|
|
750
750
|
u.Value == "true" ? u.Value = !0 : u.Value == "false" && (u.Value = !1);
|
|
751
751
|
});
|
|
752
|
-
const
|
|
752
|
+
const o = computed(() => t.row[t.column.field]), a = computed(() => e.value.find((u) => u.Value == o.value));
|
|
753
753
|
onMounted(() => {
|
|
754
|
-
t.column.params.LabelAutoColor && !a.value && (
|
|
755
|
-
Value:
|
|
756
|
-
Color:
|
|
754
|
+
t.column.params.LabelAutoColor && !a.value && (o.value || o.value === 0) && e.value.push({
|
|
755
|
+
Value: o.value,
|
|
756
|
+
Color: s()
|
|
757
757
|
});
|
|
758
758
|
});
|
|
759
|
-
function
|
|
759
|
+
function r(u) {
|
|
760
760
|
if (!u) return;
|
|
761
|
-
let _,
|
|
761
|
+
let _, f, k, p = 1;
|
|
762
762
|
if (u.startsWith("#"))
|
|
763
|
-
u = u.slice(1), u.length === 3 ? (_ = parseInt(u[0] + u[0], 16),
|
|
763
|
+
u = u.slice(1), u.length === 3 ? (_ = parseInt(u[0] + u[0], 16), f = parseInt(u[1] + u[1], 16), k = parseInt(u[2] + u[2], 16)) : u.length === 6 && (_ = parseInt(u.slice(0, 2), 16), f = parseInt(u.slice(2, 4), 16), k = parseInt(u.slice(4, 6), 16));
|
|
764
764
|
else if (u.startsWith("rgb")) {
|
|
765
|
-
const
|
|
766
|
-
|
|
765
|
+
const c = u.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);
|
|
766
|
+
c && (_ = parseInt(c[1]), f = parseInt(c[2]), k = parseInt(c[3]), c[4] && (p = parseFloat(c[4])));
|
|
767
767
|
} else if (u.startsWith("hsl")) {
|
|
768
|
-
const
|
|
769
|
-
if (
|
|
770
|
-
const
|
|
771
|
-
if (
|
|
772
|
-
_ =
|
|
768
|
+
const c = u.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%(?:,\s*(\d*\.?\d+))?\)/);
|
|
769
|
+
if (c) {
|
|
770
|
+
const d = parseInt(c[1]) / 360, v = parseInt(c[2]) / 100, S = parseInt(c[3]) / 100;
|
|
771
|
+
if (c[4] && (p = parseFloat(c[4])), v === 0)
|
|
772
|
+
_ = f = k = S * 255;
|
|
773
773
|
else {
|
|
774
|
-
const
|
|
775
|
-
_ =
|
|
774
|
+
const x = (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 = S < 0.5 ? S * (1 + v) : S + v - S * v, E = 2 * S - D;
|
|
775
|
+
_ = x(E, D, d + 1 / 3) * 255, f = x(E, D, d) * 255, k = x(E, D, d - 1 / 3) * 255;
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
|
-
return { r: _, g:
|
|
779
|
+
return { r: _, g: f, b: k, a: p };
|
|
780
780
|
}
|
|
781
|
-
function l(u, _,
|
|
782
|
-
u /= 255, _ /= 255,
|
|
783
|
-
const k = Math.max(u, _,
|
|
784
|
-
let
|
|
781
|
+
function l(u, _, f) {
|
|
782
|
+
u /= 255, _ /= 255, f /= 255;
|
|
783
|
+
const k = Math.max(u, _, f), p = Math.min(u, _, f);
|
|
784
|
+
let c, d, v = (k + p) / 2;
|
|
785
785
|
if (k === p)
|
|
786
|
-
|
|
786
|
+
c = d = 0;
|
|
787
787
|
else {
|
|
788
|
-
const
|
|
789
|
-
switch (
|
|
788
|
+
const S = k - p;
|
|
789
|
+
switch (d = v > 0.5 ? S / (2 - k - p) : S / (k + p), k) {
|
|
790
790
|
case u:
|
|
791
|
-
|
|
791
|
+
c = (_ - f) / S + (_ < f ? 6 : 0);
|
|
792
792
|
break;
|
|
793
793
|
case _:
|
|
794
|
-
|
|
794
|
+
c = (f - u) / S + 2;
|
|
795
795
|
break;
|
|
796
|
-
case
|
|
797
|
-
|
|
796
|
+
case f:
|
|
797
|
+
c = (u - _) / S + 4;
|
|
798
798
|
break;
|
|
799
799
|
}
|
|
800
|
-
|
|
800
|
+
c /= 6;
|
|
801
801
|
}
|
|
802
|
-
return { h:
|
|
802
|
+
return { h: c, s: d, l: v };
|
|
803
803
|
}
|
|
804
|
-
function i(u, _,
|
|
805
|
-
let k, p,
|
|
804
|
+
function i(u, _, f) {
|
|
805
|
+
let k, p, c;
|
|
806
806
|
if (_ === 0)
|
|
807
|
-
k = p =
|
|
807
|
+
k = p = c = f;
|
|
808
808
|
else {
|
|
809
|
-
const
|
|
810
|
-
k =
|
|
809
|
+
const d = (x, D, E) => (E < 0 && (E += 1), E > 1 && (E -= 1), E < 0.16666666666666666 ? x + (D - x) * 6 * E : E < 0.5 ? D : E < 0.6666666666666666 ? x + (D - x) * (0.6666666666666666 - E) * 6 : x), v = f < 0.5 ? f * (1 + _) : f + _ - f * _, S = 2 * f - v;
|
|
810
|
+
k = d(S, v, u + 1 / 3), p = d(S, v, u), c = d(S, v, u - 1 / 3);
|
|
811
811
|
}
|
|
812
|
-
return { r: Math.round(k * 255), g: Math.round(p * 255), b: Math.round(
|
|
812
|
+
return { r: Math.round(k * 255), g: Math.round(p * 255), b: Math.round(c * 255) };
|
|
813
813
|
}
|
|
814
814
|
function m(u, _) {
|
|
815
815
|
if (!u) return;
|
|
816
|
-
let { r:
|
|
817
|
-
|
|
818
|
-
const { r:
|
|
819
|
-
return `rgb(${
|
|
820
|
-
}
|
|
821
|
-
function
|
|
822
|
-
function u(
|
|
823
|
-
return Math.floor(Math.random() * (
|
|
816
|
+
let { r: f, g: k, b: p } = r(u), { h: c, s: d, l: v } = l(f, k, p);
|
|
817
|
+
v = Math.max(0, v - _);
|
|
818
|
+
const { r: S, g: x, b: D } = i(c, d, v);
|
|
819
|
+
return `rgb(${S}, ${x}, ${D})`;
|
|
820
|
+
}
|
|
821
|
+
function s() {
|
|
822
|
+
function u(c, d) {
|
|
823
|
+
return Math.floor(Math.random() * (d - c + 1)) + c;
|
|
824
824
|
}
|
|
825
|
-
const _ = u(200, 255),
|
|
826
|
-
return `#${_.toString(16).padStart(2, "0")}${
|
|
825
|
+
const _ = u(200, 255), f = u(200, 255), k = u(200, 255);
|
|
826
|
+
return `#${_.toString(16).padStart(2, "0")}${f.toString(16).padStart(2, "0")}${k.toString(16).padStart(2, "0")}`;
|
|
827
827
|
}
|
|
828
828
|
return (u, _) => {
|
|
829
|
-
const
|
|
830
|
-
return
|
|
829
|
+
const f = resolveComponent("hr-icon");
|
|
830
|
+
return o.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,
|
|
@@ -835,15 +835,15 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
835
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(f, {
|
|
839
839
|
key: 0,
|
|
840
840
|
class: "mr0.25 v-middle mt0.15",
|
|
841
841
|
size: "13",
|
|
842
842
|
color: m(a.value.Color, "0.3"),
|
|
843
843
|
icon: a.value.LeftIcon
|
|
844
844
|
}, null, 8, ["color", "icon"])) : createCommentVNode("", !0),
|
|
845
|
-
createElementVNode("span", _hoisted_2$4, toDisplayString(n.displayValue === void 0 ?
|
|
846
|
-
a.value.RightIcon ? (openBlock(), createBlock(
|
|
845
|
+
createElementVNode("span", _hoisted_2$4, toDisplayString(n.displayValue === void 0 ? o.value : n.displayValue), 1),
|
|
846
|
+
a.value.RightIcon ? (openBlock(), createBlock(f, {
|
|
847
847
|
key: 1,
|
|
848
848
|
class: "ml0.25 v-middle mt0.15",
|
|
849
849
|
size: "13",
|
|
@@ -853,7 +853,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
853
853
|
]),
|
|
854
854
|
_: 1
|
|
855
855
|
}, 8, ["color", "style"])) : createCommentVNode("", !0),
|
|
856
|
-
withDirectives(createElementVNode("span", null, toDisplayString(n.displayValue === void 0 ?
|
|
856
|
+
withDirectives(createElementVNode("span", null, toDisplayString(n.displayValue === void 0 ? o.value : n.displayValue), 513), [
|
|
857
857
|
[vShow, !a.value]
|
|
858
858
|
])
|
|
859
859
|
])) : (openBlock(), createElementBlock("div", _hoisted_3$2));
|
|
@@ -898,14 +898,14 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
898
898
|
return eval((${URLParamsHook})(urlParams, selectedData, layerOptions, row, column))
|
|
899
899
|
}).call(gridRef)`
|
|
900
900
|
)), ChoosePageType === "autoPage" ? openAutoPage(ChoosePageOID, (t, e) => {
|
|
901
|
-
isEmpty(StoredValueField) || isEmpty(ReturnValueField) || (Array.isArray(StoredValueField) || (StoredValueField = [StoredValueField]), Array.isArray(ReturnValueField) || (ReturnValueField = [ReturnValueField]), StoredValueField.forEach((
|
|
902
|
-
var
|
|
903
|
-
return row[
|
|
901
|
+
isEmpty(StoredValueField) || isEmpty(ReturnValueField) || (Array.isArray(StoredValueField) || (StoredValueField = [StoredValueField]), Array.isArray(ReturnValueField) || (ReturnValueField = [ReturnValueField]), StoredValueField.forEach((o, a) => {
|
|
902
|
+
var r;
|
|
903
|
+
return row[o] = ((r = e[ReturnValueField[a]]) == null ? void 0 : r.join(",")) || null;
|
|
904
904
|
}), handleChange(row[column.field], row, column));
|
|
905
905
|
}, urlParams) : openChoosePage(ChoosePageOID, (t, e) => {
|
|
906
|
-
isEmpty(StoredValueField) || isEmpty(ReturnValueField) || (Array.isArray(StoredValueField) || (StoredValueField = [StoredValueField]), Array.isArray(ReturnValueField) || (ReturnValueField = [ReturnValueField]), StoredValueField.forEach((
|
|
907
|
-
var
|
|
908
|
-
return row[
|
|
906
|
+
isEmpty(StoredValueField) || isEmpty(ReturnValueField) || (Array.isArray(StoredValueField) || (StoredValueField = [StoredValueField]), Array.isArray(ReturnValueField) || (ReturnValueField = [ReturnValueField]), StoredValueField.forEach((o, a) => {
|
|
907
|
+
var r;
|
|
908
|
+
return row[o] = ((r = e[ReturnValueField[a]]) == null ? void 0 : r.join(",")) || null;
|
|
909
909
|
}), handleChange(row[column.field], row, column));
|
|
910
910
|
}, urlParams, selectedData, layerOptions);
|
|
911
911
|
}
|
|
@@ -946,7 +946,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
946
946
|
},
|
|
947
947
|
emits: ["change"],
|
|
948
948
|
setup(n, { emit: t }) {
|
|
949
|
-
const e = n,
|
|
949
|
+
const e = n, o = ref([
|
|
950
950
|
"#409EFF",
|
|
951
951
|
"#67C23A",
|
|
952
952
|
"#E6A23C",
|
|
@@ -987,19 +987,19 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
987
987
|
watchEffect(() => {
|
|
988
988
|
a.value = isColor(e.row[e.column.field]) ? e.row[e.column.field] : null;
|
|
989
989
|
});
|
|
990
|
-
const
|
|
991
|
-
function l(i, m,
|
|
992
|
-
m[
|
|
990
|
+
const r = t;
|
|
991
|
+
function l(i, m, s) {
|
|
992
|
+
m[s.field] = i, r("change", i, m, s);
|
|
993
993
|
}
|
|
994
994
|
return (i, m) => {
|
|
995
|
-
var
|
|
995
|
+
var s;
|
|
996
996
|
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
997
997
|
createVNode(unref(ElColorPicker), {
|
|
998
|
-
disabled: (
|
|
998
|
+
disabled: (s = n.column.params) == null ? void 0 : s.disabled,
|
|
999
999
|
class: "size-full",
|
|
1000
1000
|
modelValue: a.value,
|
|
1001
1001
|
"onUpdate:modelValue": m[0] || (m[0] = (u) => a.value = u),
|
|
1002
|
-
predefine:
|
|
1002
|
+
predefine: o.value,
|
|
1003
1003
|
onChange: m[1] || (m[1] = (u) => l(u, n.row, n.column))
|
|
1004
1004
|
}, null, 8, ["disabled", "modelValue", "predefine"])
|
|
1005
1005
|
]);
|
|
@@ -1042,11 +1042,11 @@ 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 p = ((
|
|
1047
|
-
return
|
|
1045
|
+
var S, x, D;
|
|
1046
|
+
const p = ((S = t.column.params) == null ? void 0 : S.DateType) || "date", c = (x = t.column.params) == null ? void 0 : x.formats, d = (D = t.row) == null ? void 0 : D[t.column.field], v = l(d, p);
|
|
1047
|
+
return v ? p === "time" ? v.format(c || "HH:mm:ss") : p === "date" ? v.format(c || "YYYY-MM-DD") : p === "datetime" ? v.format(c || "YYYY-MM-DD HH:mm:ss") : m(v, p, c) : "";
|
|
1048
1048
|
});
|
|
1049
|
-
function
|
|
1049
|
+
function o(p) {
|
|
1050
1050
|
switch (p) {
|
|
1051
1051
|
case "week":
|
|
1052
1052
|
return "YYYY年第WW周";
|
|
@@ -1060,65 +1060,68 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1060
1060
|
return "";
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
|
-
function a(p,
|
|
1064
|
-
if (typeof
|
|
1065
|
-
const
|
|
1066
|
-
return p === "month" &&
|
|
1063
|
+
function a(p, c) {
|
|
1064
|
+
if (typeof c == "string" && c.trim()) {
|
|
1065
|
+
const d = c.trim();
|
|
1066
|
+
return p === "month" && d.includes("MM") || p === "week" && d.includes("WW") || p === "quarter" && (d.includes("QCN") || d.includes("Q")) || p === "year" && d.includes("YYYY") ? d : (console.warn(`[DatePickerRender] invalid formats for ${p}: "${d}". Fallback to default.`), o(p));
|
|
1067
1067
|
}
|
|
1068
|
-
return
|
|
1068
|
+
return o(p);
|
|
1069
1069
|
}
|
|
1070
1070
|
computed({
|
|
1071
1071
|
get() {
|
|
1072
|
-
var
|
|
1073
|
-
const p = ((
|
|
1074
|
-
return
|
|
1072
|
+
var v, S, x, D;
|
|
1073
|
+
const p = ((S = (v = t.column) == null ? void 0 : v.params) == null ? void 0 : S.DateType) || "date", c = (D = t.row) == null ? void 0 : D[(x = t.column) == null ? void 0 : x.field], d = l(c, p);
|
|
1074
|
+
return d ? d.toDate() : null;
|
|
1075
1075
|
},
|
|
1076
1076
|
set(p) {
|
|
1077
|
-
var
|
|
1078
|
-
const
|
|
1079
|
-
if (!
|
|
1080
|
-
const
|
|
1077
|
+
var S, x, D;
|
|
1078
|
+
const c = (S = t.column) == null ? void 0 : S.field;
|
|
1079
|
+
if (!c) return;
|
|
1080
|
+
const d = ((D = (x = t.column) == null ? void 0 : x.params) == null ? void 0 : D.DateType) || "date", v = r(p, d);
|
|
1081
1081
|
try {
|
|
1082
|
-
t.row && t.row[
|
|
1082
|
+
t.row && t.row[c] !== v && (t.row[c] = v);
|
|
1083
1083
|
} catch (E) {
|
|
1084
1084
|
console.error("[DatePickerRender] writeback failed:", E);
|
|
1085
1085
|
}
|
|
1086
1086
|
}
|
|
1087
1087
|
});
|
|
1088
|
-
function
|
|
1088
|
+
function r(p, c) {
|
|
1089
1089
|
if (p == null || p === "") return "";
|
|
1090
|
-
const
|
|
1091
|
-
return
|
|
1090
|
+
const d = dayjs(p);
|
|
1091
|
+
return d.isValid() ? c === "date" ? d.format("YYYY-MM-DD") : c === "datetime" ? d.format("YYYY-MM-DD HH:mm:ss") : c === "time" ? d.format("HH:mm:ss") : c === "week" ? d.startOf("isoWeek").format("YYYY-MM-DD") : c === "month" ? d.startOf("month").format("YYYY-MM-DD") : c === "quarter" ? d.startOf("quarter").format("YYYY-MM-DD") : c === "year" ? d.startOf("year").format("YYYY-MM-DD") : d.format("YYYY-MM-DD HH:mm:ss") : "";
|
|
1092
1092
|
}
|
|
1093
|
-
function l(p,
|
|
1093
|
+
function l(p, c) {
|
|
1094
1094
|
if (p == null || p === "") return null;
|
|
1095
1095
|
if (p instanceof Date) {
|
|
1096
|
-
const
|
|
1097
|
-
return
|
|
1096
|
+
const x = dayjs(p);
|
|
1097
|
+
return x.isValid() ? i(x, c) : null;
|
|
1098
1098
|
}
|
|
1099
|
-
const
|
|
1100
|
-
if (!
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
return
|
|
1099
|
+
const d = String(p).trim();
|
|
1100
|
+
if (!d) return null;
|
|
1101
|
+
const v = dayjs(d);
|
|
1102
|
+
if (v.isValid())
|
|
1103
|
+
return c === "year" ? v.startOf("year") : c === "month" ? v.startOf("month") : c === "quarter" ? v.startOf("quarter") : c === "week" ? v.startOf("isoWeek") : v;
|
|
1104
|
+
if (c === "date") {
|
|
1105
|
+
const x = dayjs(d, ["YYYY-MM-DD", "YYYY-MM-DD HH:mm:ss"], !0);
|
|
1106
|
+
return x.isValid() ? x.startOf("day") : null;
|
|
1104
1107
|
}
|
|
1105
|
-
if (
|
|
1106
|
-
const
|
|
1107
|
-
return
|
|
1108
|
+
if (c === "datetime") {
|
|
1109
|
+
const x = dayjs(d, ["YYYY-MM-DD HH:mm:ss", "YYYY-MM-DD"], !0);
|
|
1110
|
+
return x.isValid() ? x : null;
|
|
1108
1111
|
}
|
|
1109
|
-
if (
|
|
1110
|
-
const
|
|
1111
|
-
return
|
|
1112
|
+
if (c === "time") {
|
|
1113
|
+
const x = dayjs(`1970-01-01 ${d}`, "YYYY-MM-DD HH:mm:ss", !0);
|
|
1114
|
+
return x.isValid() ? x : null;
|
|
1112
1115
|
}
|
|
1113
|
-
if (
|
|
1114
|
-
if (
|
|
1115
|
-
if (
|
|
1116
|
-
if (
|
|
1117
|
-
const
|
|
1118
|
-
return
|
|
1119
|
-
}
|
|
1120
|
-
function i(p,
|
|
1121
|
-
switch (
|
|
1116
|
+
if (c === "week") return u(d);
|
|
1117
|
+
if (c === "month") return _(d);
|
|
1118
|
+
if (c === "quarter") return f(d);
|
|
1119
|
+
if (c === "year") return k(d);
|
|
1120
|
+
const S = dayjs(d);
|
|
1121
|
+
return S.isValid() ? i(S, c) : null;
|
|
1122
|
+
}
|
|
1123
|
+
function i(p, c) {
|
|
1124
|
+
switch (c) {
|
|
1122
1125
|
case "week":
|
|
1123
1126
|
return p.startOf("isoWeek");
|
|
1124
1127
|
case "month":
|
|
@@ -1131,67 +1134,67 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1131
1134
|
return p;
|
|
1132
1135
|
}
|
|
1133
1136
|
}
|
|
1134
|
-
function m(p,
|
|
1135
|
-
const
|
|
1136
|
-
if (!
|
|
1137
|
-
const
|
|
1138
|
-
return
|
|
1137
|
+
function m(p, c, d) {
|
|
1138
|
+
const v = a(c, d);
|
|
1139
|
+
if (!v) return "";
|
|
1140
|
+
const S = String(p.year()), x = 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];
|
|
1141
|
+
return v.replace(/QCN/g, N).replace(/YYYY/g, c === "week" ? x : S).replace(/MM/g, D).replace(/WW/g, E).replace(/Q/g, B);
|
|
1139
1142
|
}
|
|
1140
|
-
function
|
|
1141
|
-
if (!p || !
|
|
1142
|
-
const
|
|
1143
|
-
return
|
|
1143
|
+
function s(p, c) {
|
|
1144
|
+
if (!p || !c) return null;
|
|
1145
|
+
const d = dayjs(`${p}-01-04`, "YYYY-MM-DD", !0);
|
|
1146
|
+
return d.isValid() ? d.isoWeek(Number(c)).startOf("isoWeek") : null;
|
|
1144
1147
|
}
|
|
1145
1148
|
function u(p) {
|
|
1146
|
-
const
|
|
1147
|
-
let
|
|
1148
|
-
if (
|
|
1149
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
1150
|
-
const
|
|
1151
|
-
return
|
|
1149
|
+
const c = String(p).trim();
|
|
1150
|
+
let d = c.match(/^(\d{4})年(?:第)?(\d{1,2})周$/);
|
|
1151
|
+
if (d || (d = c.match(/^(\d{4})[-]?W?(\d{1,2})$/i), d)) return s(Number(d[1]), Number(d[2]));
|
|
1152
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(c)) {
|
|
1153
|
+
const v = dayjs(c, "YYYY-MM-DD", !0);
|
|
1154
|
+
return v.isValid() ? v.startOf("isoWeek") : null;
|
|
1152
1155
|
}
|
|
1153
1156
|
return null;
|
|
1154
1157
|
}
|
|
1155
1158
|
function _(p) {
|
|
1156
|
-
const
|
|
1157
|
-
let
|
|
1158
|
-
if (
|
|
1159
|
-
if (
|
|
1160
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
1161
|
-
const
|
|
1162
|
-
return
|
|
1159
|
+
const c = String(p).trim();
|
|
1160
|
+
let d = c.match(/^(\d{4})年(\d{1,2})月$/);
|
|
1161
|
+
if (d) return dayjs(`${d[1]}-${String(d[2]).padStart(2, "0")}-01`, "YYYY-MM-DD", !0);
|
|
1162
|
+
if (d = c.match(/^(\d{4})-(\d{1,2})$/), d) return dayjs(`${d[1]}-${String(d[2]).padStart(2, "0")}-01`, "YYYY-MM-DD", !0);
|
|
1163
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(c)) {
|
|
1164
|
+
const v = dayjs(c, "YYYY-MM-DD", !0);
|
|
1165
|
+
return v.isValid() ? v.startOf("month") : null;
|
|
1163
1166
|
}
|
|
1164
1167
|
return null;
|
|
1165
1168
|
}
|
|
1166
|
-
function
|
|
1167
|
-
const
|
|
1168
|
-
let
|
|
1169
|
-
if (
|
|
1170
|
-
if (
|
|
1171
|
-
const
|
|
1172
|
-
return dayjs(`${
|
|
1169
|
+
function f(p) {
|
|
1170
|
+
const c = String(p).trim();
|
|
1171
|
+
let d = c.match(/^(\d{4})年第([1-4])季度$/);
|
|
1172
|
+
if (d) return dayjs(`${d[1]}-01-01`, "YYYY-MM-DD", !0).quarter(Number(d[2]));
|
|
1173
|
+
if (d = c.match(/^(\d{4})年(第一|第二|第三|第四)季度$/), d) {
|
|
1174
|
+
const v = { 第一: 1, 第二: 2, 第三: 3, 第四: 4 };
|
|
1175
|
+
return dayjs(`${d[1]}-01-01`, "YYYY-MM-DD", !0).quarter(v[d[2]]);
|
|
1173
1176
|
}
|
|
1174
|
-
if (
|
|
1175
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
1176
|
-
const
|
|
1177
|
-
return
|
|
1177
|
+
if (d = c.match(/^(\d{4})[-]?Q?([1-4])$/i), d) return dayjs(`${d[1]}-01-01`, "YYYY-MM-DD", !0).quarter(Number(d[2]));
|
|
1178
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(c)) {
|
|
1179
|
+
const v = dayjs(c, "YYYY-MM-DD", !0);
|
|
1180
|
+
return v.isValid() ? v.startOf("quarter") : null;
|
|
1178
1181
|
}
|
|
1179
1182
|
return null;
|
|
1180
1183
|
}
|
|
1181
1184
|
function k(p) {
|
|
1182
|
-
const
|
|
1183
|
-
let
|
|
1184
|
-
if (
|
|
1185
|
-
if (
|
|
1186
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
1187
|
-
const
|
|
1188
|
-
return
|
|
1185
|
+
const c = String(p).trim();
|
|
1186
|
+
let d = c.match(/^(\d{4})年$/);
|
|
1187
|
+
if (d) return dayjs(`${d[1]}-01-01`, "YYYY-MM-DD", !0);
|
|
1188
|
+
if (d = c.match(/^(\d{4})$/), d) return dayjs(`${d[1]}-01-01`, "YYYY-MM-DD", !0);
|
|
1189
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(c)) {
|
|
1190
|
+
const v = dayjs(c, "YYYY-MM-DD", !0);
|
|
1191
|
+
return v.isValid() ? v.startOf("year") : null;
|
|
1189
1192
|
}
|
|
1190
1193
|
return null;
|
|
1191
1194
|
}
|
|
1192
|
-
return (p,
|
|
1193
|
-
var
|
|
1194
|
-
return (
|
|
1195
|
+
return (p, c) => {
|
|
1196
|
+
var d;
|
|
1197
|
+
return (d = t.column.params) != null && d.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue: e.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1195
1198
|
key: 1,
|
|
1196
1199
|
title: e.value
|
|
1197
1200
|
}, toDisplayString(e.value), 9, _hoisted_1$9));
|
|
@@ -1224,10 +1227,10 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1224
1227
|
emits: ["file-click"],
|
|
1225
1228
|
setup(n, { emit: t }) {
|
|
1226
1229
|
const e = t;
|
|
1227
|
-
function
|
|
1230
|
+
function o(a) {
|
|
1228
1231
|
["jpg", "jpeg", "png", "gif", "bmp", "svg"].includes(a.FileType.toLowerCase()) || e("file-click", a);
|
|
1229
1232
|
}
|
|
1230
|
-
return (a,
|
|
1233
|
+
return (a, r) => {
|
|
1231
1234
|
const l = resolveDirective("viewer");
|
|
1232
1235
|
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
1233
1236
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.row[n.column.field], (i, m) => (openBlock(), createElementBlock("div", {
|
|
@@ -1241,10 +1244,10 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1241
1244
|
backgroundImage: `url(${unref(getFileIconUrl)(i.FileType)})`,
|
|
1242
1245
|
backgroundSize: "cover"
|
|
1243
1246
|
}),
|
|
1244
|
-
onClick: (
|
|
1247
|
+
onClick: (s) => o(i)
|
|
1245
1248
|
}, null, 12, _hoisted_3$1)) : (openBlock(), createBlock(unref(ElImage), {
|
|
1246
1249
|
key: 0,
|
|
1247
|
-
onClick: (
|
|
1250
|
+
onClick: (s) => o(i),
|
|
1248
1251
|
class: "size-5",
|
|
1249
1252
|
src: i.FilePath
|
|
1250
1253
|
}, null, 8, ["onClick", "src"])),
|
|
@@ -1287,10 +1290,10 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1287
1290
|
emits: ["change"],
|
|
1288
1291
|
setup(n, { emit: t }) {
|
|
1289
1292
|
const e = t;
|
|
1290
|
-
function r
|
|
1291
|
-
e("change",
|
|
1293
|
+
function o(r, l, i) {
|
|
1294
|
+
e("change", r, l, i);
|
|
1292
1295
|
}
|
|
1293
|
-
function a(
|
|
1296
|
+
function a(r, l) {
|
|
1294
1297
|
var m;
|
|
1295
1298
|
if ((m = l.params) != null && m.disable) return;
|
|
1296
1299
|
let i = layer.open({
|
|
@@ -1300,13 +1303,13 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1300
1303
|
area: ["80%", "80%"],
|
|
1301
1304
|
content: "/Html/Custom/SelectIcon/Icon.html?callbackFn=setIcon&clearFn=clearIcon"
|
|
1302
1305
|
});
|
|
1303
|
-
window.setIcon = (
|
|
1304
|
-
|
|
1305
|
-
}, window.clearIcon = (
|
|
1306
|
-
|
|
1306
|
+
window.setIcon = (s) => {
|
|
1307
|
+
r[l.field] = s.font_class, o(s, r, l);
|
|
1308
|
+
}, window.clearIcon = (s) => {
|
|
1309
|
+
r[l.field] = "", o(s, r, l), layer.close(i);
|
|
1307
1310
|
};
|
|
1308
1311
|
}
|
|
1309
|
-
return (
|
|
1312
|
+
return (r, l) => (openBlock(), createElementBlock("div", {
|
|
1310
1313
|
class: "w-full h-full flex justify-center items-center",
|
|
1311
1314
|
onClick: l[0] || (l[0] = (i) => a(n.row, n.column))
|
|
1312
1315
|
}, [
|
|
@@ -1338,29 +1341,29 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1338
1341
|
},
|
|
1339
1342
|
emits: ["change"],
|
|
1340
1343
|
setup(n, { emit: t }) {
|
|
1341
|
-
const e = n,
|
|
1342
|
-
function a(
|
|
1344
|
+
const e = n, o = t;
|
|
1345
|
+
function a(r, l) {
|
|
1343
1346
|
var p;
|
|
1344
1347
|
if ((p = l.params) != null && p.disabled) return;
|
|
1345
1348
|
let {
|
|
1346
1349
|
PickPeopleType: i,
|
|
1347
1350
|
PickPeopleCheckType: m,
|
|
1348
|
-
PickPeopleIsAll:
|
|
1351
|
+
PickPeopleIsAll: s,
|
|
1349
1352
|
PickPeopleStatus: u,
|
|
1350
1353
|
StoredValueField: _,
|
|
1351
|
-
ReturnValueField:
|
|
1354
|
+
ReturnValueField: f,
|
|
1352
1355
|
BackfillField: k
|
|
1353
1356
|
} = e.column.params;
|
|
1354
1357
|
openChoosePeople({
|
|
1355
1358
|
Type: i,
|
|
1356
1359
|
Choose: m,
|
|
1357
|
-
IsAll:
|
|
1360
|
+
IsAll: s,
|
|
1358
1361
|
Status: u
|
|
1359
|
-
}, (
|
|
1360
|
-
isEmpty(_) ?
|
|
1361
|
-
}, k ?
|
|
1362
|
+
}, (c) => {
|
|
1363
|
+
isEmpty(_) ? r[l.field] = c.Name || null : (Array.isArray(_) || (_ = [_]), Array.isArray(f) || (f = [f]), _.forEach((d, v) => r[d] = c[f[v]] || null)), o("change", c, r, l);
|
|
1364
|
+
}, k ? r[k] : null);
|
|
1362
1365
|
}
|
|
1363
|
-
return (
|
|
1366
|
+
return (r, l) => (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
1364
1367
|
createVNode(unref(ElButton), {
|
|
1365
1368
|
class: "!text-[12px]",
|
|
1366
1369
|
link: "",
|
|
@@ -1397,18 +1400,18 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1397
1400
|
emits: ["change"],
|
|
1398
1401
|
setup(n, { emit: t }) {
|
|
1399
1402
|
const e = n;
|
|
1400
|
-
let
|
|
1403
|
+
let o = ref(0);
|
|
1401
1404
|
return watchEffect(() => {
|
|
1402
1405
|
if (e.row[e.column.field]) {
|
|
1403
1406
|
const a = Number(parseFloat(e.row[e.column.field]));
|
|
1404
1407
|
if (isNaN(a))
|
|
1405
|
-
return e.row[e.column.field] =
|
|
1406
|
-
|
|
1408
|
+
return e.row[e.column.field] = o.value, layer.msg("请输入有效的数字");
|
|
1409
|
+
o.value = a > 100 ? 100 : a, a > 100 ? e.row[e.column.field] = 100 : e.row[e.column.field] = o.value;
|
|
1407
1410
|
} else
|
|
1408
|
-
|
|
1409
|
-
}), (a,
|
|
1410
|
-
percentage: unref(
|
|
1411
|
-
format: () => `${unref(
|
|
1411
|
+
o.value = 0;
|
|
1412
|
+
}), (a, r) => (openBlock(), createBlock(unref(ElProgress), {
|
|
1413
|
+
percentage: unref(o),
|
|
1414
|
+
format: () => `${unref(o)}%`
|
|
1412
1415
|
}, null, 8, ["percentage", "format"]));
|
|
1413
1416
|
}
|
|
1414
1417
|
}), __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1434,13 +1437,13 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1434
1437
|
},
|
|
1435
1438
|
emits: ["change"],
|
|
1436
1439
|
setup(n, { emit: t }) {
|
|
1437
|
-
const e = n,
|
|
1438
|
-
function a(
|
|
1440
|
+
const e = n, o = t;
|
|
1441
|
+
function a(r, l, i) {
|
|
1439
1442
|
e.gridRef.getTableData().tableData.filter((m) => m !== l).forEach((m) => {
|
|
1440
1443
|
m[i.field] && (m[i.field] = !1);
|
|
1441
|
-
}),
|
|
1444
|
+
}), o("change", r, l, i);
|
|
1442
1445
|
}
|
|
1443
|
-
return (
|
|
1446
|
+
return (r, l) => {
|
|
1444
1447
|
var i;
|
|
1445
1448
|
return openBlock(), createBlock(unref(ElRadioGroup), {
|
|
1446
1449
|
disabled: (i = n.column.params) == null ? void 0 : i.disabled,
|
|
@@ -1477,32 +1480,32 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1477
1480
|
}
|
|
1478
1481
|
},
|
|
1479
1482
|
setup(n) {
|
|
1480
|
-
var a,
|
|
1483
|
+
var a, r;
|
|
1481
1484
|
const t = n;
|
|
1482
|
-
(a = t.column.params)[
|
|
1485
|
+
(a = t.column.params)[r = t.gridRef.getRowid(t.row)] ?? (a[r] = {}), watchEffect(() => {
|
|
1483
1486
|
var l, i;
|
|
1484
1487
|
(l = t.column.params)[i = t.gridRef.getRowid(t.row)] ?? (l[i] = {}), !t.column.params[t.gridRef.getRowid(t.row)].options && t.column.params.options && (t.column.params[t.gridRef.getRowid(t.row)].options = deepClone(t.column.params.options));
|
|
1485
1488
|
});
|
|
1486
1489
|
const e = computed(() => {
|
|
1487
1490
|
var l;
|
|
1488
1491
|
return ((l = t.column.params[t.gridRef.getRowid(t.row)]) == null ? void 0 : l.options) || t.column.params.options;
|
|
1489
|
-
}),
|
|
1492
|
+
}), o = computed(() => {
|
|
1490
1493
|
var i, m;
|
|
1491
1494
|
const l = t.row[t.column.field];
|
|
1492
1495
|
if (l && l.length > 1) {
|
|
1493
|
-
let
|
|
1496
|
+
let s = [];
|
|
1494
1497
|
return l.split(",").map((u) => {
|
|
1495
|
-
var
|
|
1496
|
-
const _ = (k = (
|
|
1497
|
-
_ !== void 0 &&
|
|
1498
|
-
}),
|
|
1498
|
+
var f, k;
|
|
1499
|
+
const _ = (k = (f = e.value) == null ? void 0 : f.find((p) => p.value == u)) == null ? void 0 : k.label;
|
|
1500
|
+
_ !== void 0 && s.push(_);
|
|
1501
|
+
}), s.join(",");
|
|
1499
1502
|
} else
|
|
1500
|
-
return ((m = (i = e.value) == null ? void 0 : i.find((
|
|
1503
|
+
return ((m = (i = e.value) == null ? void 0 : i.find((s) => s.value == l)) == null ? void 0 : m.label) || "";
|
|
1501
1504
|
});
|
|
1502
|
-
return (l, i) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue:
|
|
1505
|
+
return (l, i) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue: o.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1503
1506
|
key: 1,
|
|
1504
|
-
title:
|
|
1505
|
-
}, toDisplayString(
|
|
1507
|
+
title: o.value
|
|
1508
|
+
}, toDisplayString(o.value), 9, _hoisted_1$6));
|
|
1506
1509
|
}
|
|
1507
1510
|
}), __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1508
1511
|
__proto__: null,
|
|
@@ -1526,23 +1529,23 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1526
1529
|
}
|
|
1527
1530
|
},
|
|
1528
1531
|
setup(n) {
|
|
1529
|
-
var a,
|
|
1532
|
+
var a, r;
|
|
1530
1533
|
const t = n;
|
|
1531
|
-
(a = t.column.params)[
|
|
1534
|
+
(a = t.column.params)[r = t.gridRef.getRowid(t.row)] ?? (a[r] = {}), watchEffect(() => {
|
|
1532
1535
|
var l, i;
|
|
1533
1536
|
(l = t.column.params)[i = t.gridRef.getRowid(t.row)] ?? (l[i] = {}), !t.column.params[t.gridRef.getRowid(t.row)].options && t.column.params.options && (t.column.params[t.gridRef.getRowid(t.row)].options = deepClone(t.column.params.options));
|
|
1534
1537
|
});
|
|
1535
1538
|
const e = computed(() => {
|
|
1536
1539
|
var l;
|
|
1537
1540
|
return ((l = t.column.params[t.gridRef.getRowid(t.row)]) == null ? void 0 : l.options) || t.column.params.options;
|
|
1538
|
-
}),
|
|
1541
|
+
}), o = computed(() => {
|
|
1539
1542
|
var l, i;
|
|
1540
1543
|
return ((i = (l = e.value) == null ? void 0 : l.find((m) => m.value == t.row[t.column.field])) == null ? void 0 : i.label) || "";
|
|
1541
1544
|
});
|
|
1542
|
-
return (l, i) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, mergeProps({ key: 0 }, { ...t, displayValue:
|
|
1545
|
+
return (l, i) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, mergeProps({ key: 0 }, { ...t, displayValue: o.value }, { title: o.value }), null, 16, ["title"])) : (openBlock(), createElementBlock("span", {
|
|
1543
1546
|
key: 1,
|
|
1544
|
-
title:
|
|
1545
|
-
}, toDisplayString(
|
|
1547
|
+
title: o.value
|
|
1548
|
+
}, toDisplayString(o.value), 9, _hoisted_1$5));
|
|
1546
1549
|
}
|
|
1547
1550
|
}), __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1548
1551
|
__proto__: null,
|
|
@@ -1568,17 +1571,17 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1568
1571
|
setup(n) {
|
|
1569
1572
|
const t = n;
|
|
1570
1573
|
if (!t.column.params.TreeData) {
|
|
1571
|
-
const { options:
|
|
1572
|
-
t.column.params.TreeData = buildTree(deepClone(
|
|
1574
|
+
const { options: o, ParentNodeField: a, NodeValueField: r } = t.column.params;
|
|
1575
|
+
t.column.params.TreeData = buildTree(deepClone(o), a, r);
|
|
1573
1576
|
}
|
|
1574
1577
|
const e = computed(() => {
|
|
1575
|
-
const { NodeNameField:
|
|
1578
|
+
const { NodeNameField: o = "label", NodeValueField: a = "value" } = t.column.params;
|
|
1576
1579
|
if (t.row[t.column.field]) {
|
|
1577
|
-
let
|
|
1578
|
-
return t.column.params.options.filter((l) =>
|
|
1580
|
+
let r = t.row[t.column.field].split(",");
|
|
1581
|
+
return t.column.params.options.filter((l) => r.includes(l[a])).map((l) => l[o]).join(",");
|
|
1579
1582
|
}
|
|
1580
1583
|
});
|
|
1581
|
-
return (
|
|
1584
|
+
return (o, a) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue: e.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1582
1585
|
key: 1,
|
|
1583
1586
|
title: e.value
|
|
1584
1587
|
}, toDisplayString(e.value), 9, _hoisted_1$4));
|
|
@@ -1607,15 +1610,15 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1607
1610
|
setup(n) {
|
|
1608
1611
|
const t = n;
|
|
1609
1612
|
if (!t.column.params.TreeData) {
|
|
1610
|
-
const { options:
|
|
1611
|
-
t.column.params.TreeData = buildTree(deepClone(
|
|
1613
|
+
const { options: o, ParentNodeField: a, NodeKeyField: r } = t.column.params;
|
|
1614
|
+
t.column.params.TreeData = buildTree(deepClone(o), a, r);
|
|
1612
1615
|
}
|
|
1613
1616
|
const e = computed(() => {
|
|
1614
|
-
var
|
|
1615
|
-
const { NodeNameField:
|
|
1616
|
-
return ((
|
|
1617
|
+
var r;
|
|
1618
|
+
const { NodeNameField: o = "label", NodeValueField: a = "value" } = t.column.params;
|
|
1619
|
+
return ((r = t.column.params.options.find((l) => l[a] == t.row[t.column.field])) == null ? void 0 : r[o]) || "";
|
|
1617
1620
|
});
|
|
1618
|
-
return (
|
|
1621
|
+
return (o, a) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue: e.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1619
1622
|
key: 1,
|
|
1620
1623
|
title: e.value
|
|
1621
1624
|
}, toDisplayString(e.value), 9, _hoisted_1$3));
|
|
@@ -1640,10 +1643,10 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1640
1643
|
emits: ["change"],
|
|
1641
1644
|
setup(n, { emit: t }) {
|
|
1642
1645
|
dayjs.extend(isoWeek), dayjs.extend(quarterOfYear), dayjs.extend(customParseFormat);
|
|
1643
|
-
const e = n,
|
|
1644
|
-
var
|
|
1645
|
-
return ((w = (
|
|
1646
|
-
}),
|
|
1646
|
+
const e = n, o = t, a = computed(() => {
|
|
1647
|
+
var b, w;
|
|
1648
|
+
return ((w = (b = e.column) == null ? void 0 : b.params) == null ? void 0 : w.DateType) || "date";
|
|
1649
|
+
}), r = computed(() => {
|
|
1647
1650
|
switch (a.value) {
|
|
1648
1651
|
case "year":
|
|
1649
1652
|
return "yyyy年";
|
|
@@ -1665,17 +1668,17 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1665
1668
|
l.value = dayjs();
|
|
1666
1669
|
}
|
|
1667
1670
|
const m = computed(() => {
|
|
1668
|
-
var
|
|
1669
|
-
return (w = (
|
|
1670
|
-
}),
|
|
1671
|
-
var
|
|
1672
|
-
return (w = (
|
|
1671
|
+
var b, w;
|
|
1672
|
+
return (w = (b = e.column) == null ? void 0 : b.params) == null ? void 0 : w.minDate;
|
|
1673
|
+
}), s = computed(() => {
|
|
1674
|
+
var b, w;
|
|
1675
|
+
return (w = (b = e.column) == null ? void 0 : b.params) == null ? void 0 : w.maxDate;
|
|
1673
1676
|
});
|
|
1674
|
-
function u(
|
|
1675
|
-
return
|
|
1677
|
+
function u(b) {
|
|
1678
|
+
return b == null || b === "" ? null : typeof b == "string" && b.trim() !== "" && !Number.isNaN(Number(b)) ? Number(b) : b;
|
|
1676
1679
|
}
|
|
1677
|
-
function _(
|
|
1678
|
-
switch (
|
|
1680
|
+
function _(b) {
|
|
1681
|
+
switch (b) {
|
|
1679
1682
|
case "week":
|
|
1680
1683
|
return "week";
|
|
1681
1684
|
case "month":
|
|
@@ -1690,96 +1693,96 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1690
1693
|
return "day";
|
|
1691
1694
|
}
|
|
1692
1695
|
}
|
|
1693
|
-
function
|
|
1696
|
+
function f(b, w) {
|
|
1694
1697
|
switch (w) {
|
|
1695
1698
|
case "week":
|
|
1696
|
-
return
|
|
1699
|
+
return b.startOf("isoWeek");
|
|
1697
1700
|
case "month":
|
|
1698
|
-
return
|
|
1701
|
+
return b.startOf("month");
|
|
1699
1702
|
case "quarter":
|
|
1700
|
-
return
|
|
1703
|
+
return b.startOf("quarter");
|
|
1701
1704
|
case "year":
|
|
1702
|
-
return
|
|
1705
|
+
return b.startOf("year");
|
|
1703
1706
|
case "date":
|
|
1704
|
-
return
|
|
1707
|
+
return b.startOf("day");
|
|
1705
1708
|
default:
|
|
1706
|
-
return
|
|
1709
|
+
return b;
|
|
1707
1710
|
}
|
|
1708
1711
|
}
|
|
1709
|
-
function k(
|
|
1710
|
-
const Y = u(
|
|
1712
|
+
function k(b, w, R) {
|
|
1713
|
+
const Y = u(b);
|
|
1711
1714
|
if (Y === null) return null;
|
|
1712
|
-
const T =
|
|
1715
|
+
const T = f(l.value, w), P = _(w);
|
|
1713
1716
|
if (typeof Y == "number" && !Number.isNaN(Y))
|
|
1714
|
-
return Y < 0 ?
|
|
1717
|
+
return Y < 0 ? f(T.add(Y, P), w) : f(R === "min" ? T.subtract(Y, P) : T.add(Y, P), w);
|
|
1715
1718
|
if (typeof Y == "string" || Y instanceof Date) {
|
|
1716
1719
|
const M = $(Y, w);
|
|
1717
|
-
return M ?
|
|
1720
|
+
return M ? f(dayjs(M), w) : null;
|
|
1718
1721
|
}
|
|
1719
1722
|
return null;
|
|
1720
1723
|
}
|
|
1721
1724
|
const p = computed(() => {
|
|
1722
|
-
const
|
|
1725
|
+
const b = a.value;
|
|
1723
1726
|
return {
|
|
1724
|
-
min: k(m.value,
|
|
1725
|
-
max: k(
|
|
1727
|
+
min: k(m.value, b, "min"),
|
|
1728
|
+
max: k(s.value, b, "max")
|
|
1726
1729
|
};
|
|
1727
|
-
}),
|
|
1728
|
-
function
|
|
1729
|
-
const { min: w, max: R } = p.value, Y =
|
|
1730
|
+
}), c = computed(() => p.value.min ? p.value.min.toDate() : null), d = computed(() => p.value.max ? p.value.max.toDate() : null);
|
|
1731
|
+
function v({ date: b }) {
|
|
1732
|
+
const { min: w, max: R } = p.value, Y = f(dayjs(b), a.value);
|
|
1730
1733
|
return !!(w && Y.isBefore(w) || R && Y.isAfter(R));
|
|
1731
1734
|
}
|
|
1732
|
-
const
|
|
1735
|
+
const S = ref($(e.row[e.column.field], a.value)), x = ref(S.value);
|
|
1733
1736
|
watch(
|
|
1734
1737
|
() => e.row[e.column.field],
|
|
1735
|
-
(
|
|
1736
|
-
const w = $(
|
|
1737
|
-
|
|
1738
|
+
(b) => {
|
|
1739
|
+
const w = $(b, a.value);
|
|
1740
|
+
S.value = w, x.value = w;
|
|
1738
1741
|
}
|
|
1739
1742
|
);
|
|
1740
|
-
function D(
|
|
1741
|
-
if (
|
|
1743
|
+
function D(b, w) {
|
|
1744
|
+
if (b == null || b === "") return null;
|
|
1742
1745
|
if (w === "time") {
|
|
1743
|
-
const T = dayjs(`1970-01-01 ${String(
|
|
1746
|
+
const T = dayjs(`1970-01-01 ${String(b)}`, "YYYY-MM-DD HH:mm:ss", !0);
|
|
1744
1747
|
return T.isValid() ? T : null;
|
|
1745
1748
|
}
|
|
1746
1749
|
if (w === "date" || w === "datetime") {
|
|
1747
|
-
const T =
|
|
1748
|
-
return T.isValid() ?
|
|
1750
|
+
const T = b instanceof Date ? dayjs(b) : dayjs(String(b));
|
|
1751
|
+
return T.isValid() ? f(T, w) : null;
|
|
1749
1752
|
}
|
|
1750
|
-
const R = $(
|
|
1753
|
+
const R = $(b, w);
|
|
1751
1754
|
if (!R) return null;
|
|
1752
1755
|
const Y = dayjs(R, "YYYY-MM-DD", !0);
|
|
1753
|
-
return Y.isValid() ?
|
|
1756
|
+
return Y.isValid() ? f(Y, w) : null;
|
|
1754
1757
|
}
|
|
1755
|
-
function E(
|
|
1756
|
-
const w = D(
|
|
1758
|
+
function E(b) {
|
|
1759
|
+
const w = D(b, a.value);
|
|
1757
1760
|
if (!w) return !1;
|
|
1758
1761
|
const { min: R, max: Y } = p.value;
|
|
1759
1762
|
return !!(R && w.isBefore(R) || Y && w.isAfter(Y));
|
|
1760
1763
|
}
|
|
1761
|
-
function B(
|
|
1762
|
-
const w =
|
|
1764
|
+
function B(b) {
|
|
1765
|
+
const w = b && typeof b == "object" && "value" in b ? b.value : b;
|
|
1763
1766
|
if (w == null || w === "") {
|
|
1764
|
-
|
|
1767
|
+
x.value = w, o("change", w);
|
|
1765
1768
|
return;
|
|
1766
1769
|
}
|
|
1767
1770
|
if (i(), E(w)) {
|
|
1768
|
-
|
|
1771
|
+
S.value = x.value;
|
|
1769
1772
|
return;
|
|
1770
1773
|
}
|
|
1771
|
-
|
|
1774
|
+
x.value = w, o("change", w);
|
|
1772
1775
|
}
|
|
1773
1776
|
function N() {
|
|
1774
|
-
|
|
1777
|
+
x.value = null, o("change", null);
|
|
1775
1778
|
}
|
|
1776
1779
|
onBeforeUnmount(() => {
|
|
1777
|
-
const
|
|
1778
|
-
w && (
|
|
1780
|
+
const b = a.value, w = S.value;
|
|
1781
|
+
w && (b === "year" ? e.row[e.column.field] = dayjs(w).format("YYYY年") : b === "month" ? e.row[e.column.field] = dayjs(w).format("YYYY年MM月") : b === "quarter" ? e.row[e.column.field] = dayjs(w).format("YYYY年第Q季度") : b === "week" ? e.row[e.column.field] = dayjs(w).format("YYYY年第WW周") : b === "datetime" ? e.row[e.column.field] = dayjs(w).format("YYYY-MM-DD HH:mm:ss") : b === "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"));
|
|
1779
1782
|
});
|
|
1780
|
-
function $(
|
|
1781
|
-
if (!
|
|
1782
|
-
const R = String(
|
|
1783
|
+
function $(b, w) {
|
|
1784
|
+
if (!b) return null;
|
|
1785
|
+
const R = String(b).trim();
|
|
1783
1786
|
if (w === "month") {
|
|
1784
1787
|
if (/^\d{4}-\d{2}$/.test(R)) return `${R}-01`;
|
|
1785
1788
|
const M = R.match(/^(\d{4})年(\d{1,2})月$/);
|
|
@@ -1822,38 +1825,38 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1822
1825
|
}
|
|
1823
1826
|
return K(P, w);
|
|
1824
1827
|
}
|
|
1825
|
-
function K(
|
|
1828
|
+
function K(b, w) {
|
|
1826
1829
|
switch (w) {
|
|
1827
1830
|
case "time":
|
|
1828
|
-
return
|
|
1831
|
+
return b.format("HH:mm:ss");
|
|
1829
1832
|
case "date":
|
|
1830
|
-
return
|
|
1833
|
+
return b.format("YYYY-MM-DD");
|
|
1831
1834
|
case "datetime":
|
|
1832
|
-
return
|
|
1835
|
+
return b.format("YYYY-MM-DD HH:mm:ss");
|
|
1833
1836
|
case "week":
|
|
1834
|
-
return
|
|
1837
|
+
return b.startOf("isoWeek").format("YYYY-MM-DD");
|
|
1835
1838
|
case "month":
|
|
1836
|
-
return
|
|
1839
|
+
return b.startOf("month").format("YYYY-MM-DD");
|
|
1837
1840
|
case "quarter":
|
|
1838
|
-
return
|
|
1841
|
+
return b.startOf("quarter").format("YYYY-MM-DD");
|
|
1839
1842
|
case "year":
|
|
1840
|
-
return
|
|
1843
|
+
return b.startOf("year").format("YYYY-MM-DD");
|
|
1841
1844
|
default:
|
|
1842
1845
|
return null;
|
|
1843
1846
|
}
|
|
1844
1847
|
}
|
|
1845
|
-
return (
|
|
1848
|
+
return (b, w) => {
|
|
1846
1849
|
const R = resolveComponent("vxe-input");
|
|
1847
1850
|
return openBlock(), createBlock(R, {
|
|
1848
|
-
modelValue:
|
|
1849
|
-
"onUpdate:modelValue": w[0] || (w[0] = (Y) =>
|
|
1851
|
+
modelValue: S.value,
|
|
1852
|
+
"onUpdate:modelValue": w[0] || (w[0] = (Y) => S.value = Y),
|
|
1850
1853
|
type: a.value,
|
|
1851
1854
|
clearable: "",
|
|
1852
1855
|
transfer: "",
|
|
1853
|
-
"label-format":
|
|
1854
|
-
"min-date":
|
|
1855
|
-
"max-date":
|
|
1856
|
-
"disabled-method":
|
|
1856
|
+
"label-format": r.value,
|
|
1857
|
+
"min-date": c.value,
|
|
1858
|
+
"max-date": d.value,
|
|
1859
|
+
"disabled-method": v,
|
|
1857
1860
|
onFocus: i,
|
|
1858
1861
|
onClick: i,
|
|
1859
1862
|
onChange: B,
|
|
@@ -1884,15 +1887,15 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1884
1887
|
},
|
|
1885
1888
|
setup(n) {
|
|
1886
1889
|
const t = n, e = ref(t.row[t.column.field]);
|
|
1887
|
-
function
|
|
1890
|
+
function o(a) {
|
|
1888
1891
|
t.row[t.column.field] = a;
|
|
1889
1892
|
}
|
|
1890
1893
|
return onBeforeUnmount(() => {
|
|
1891
1894
|
t.row[t.column.field] = e.value;
|
|
1892
|
-
}), (a,
|
|
1895
|
+
}), (a, r) => (openBlock(), createBlock(unref(ElInput), {
|
|
1893
1896
|
modelValue: e.value,
|
|
1894
|
-
"onUpdate:modelValue":
|
|
1895
|
-
onInput:
|
|
1897
|
+
"onUpdate:modelValue": r[0] || (r[0] = (l) => e.value = l),
|
|
1898
|
+
onInput: o
|
|
1896
1899
|
}, null, 8, ["modelValue"]));
|
|
1897
1900
|
}
|
|
1898
1901
|
}), __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1918,15 +1921,15 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1918
1921
|
},
|
|
1919
1922
|
emits: ["change"],
|
|
1920
1923
|
setup(n, { emit: t }) {
|
|
1921
|
-
const e = n,
|
|
1922
|
-
return watch(
|
|
1923
|
-
const l =
|
|
1924
|
+
const e = n, o = ref(e.row[e.column.field]), a = t;
|
|
1925
|
+
return watch(o, (r) => {
|
|
1926
|
+
const l = r === "" || r == null ? 0 : Number(r);
|
|
1924
1927
|
e.row[e.column.field] = l, a("change", l);
|
|
1925
1928
|
}), onBeforeUnmount(() => {
|
|
1926
|
-
e.row[e.column.field] =
|
|
1927
|
-
}), (
|
|
1928
|
-
modelValue:
|
|
1929
|
-
"onUpdate:modelValue": l[0] || (l[0] = (i) =>
|
|
1929
|
+
e.row[e.column.field] = o.value ? Number(o.value) : 0;
|
|
1930
|
+
}), (r, l) => (openBlock(), createBlock(unref(ElInput), {
|
|
1931
|
+
modelValue: o.value,
|
|
1932
|
+
"onUpdate:modelValue": l[0] || (l[0] = (i) => o.value = i),
|
|
1930
1933
|
min: n.column.params.min,
|
|
1931
1934
|
max: n.column.params.max,
|
|
1932
1935
|
step: n.column.params.step,
|
|
@@ -1955,28 +1958,28 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1955
1958
|
}
|
|
1956
1959
|
},
|
|
1957
1960
|
setup(n) {
|
|
1958
|
-
const t = n, e = ref(t.row[t.column.field]),
|
|
1961
|
+
const t = n, e = ref(t.row[t.column.field]), o = reactive(t.column.params || {
|
|
1959
1962
|
placeholder: "请选择",
|
|
1960
1963
|
disabled: !1,
|
|
1961
1964
|
clearable: !1
|
|
1962
1965
|
}), a = computed(() => {
|
|
1963
|
-
var
|
|
1964
|
-
return ((
|
|
1966
|
+
var r;
|
|
1967
|
+
return ((r = t.column.params[t.gridRef.getRowid(t.row)]) == null ? void 0 : r.options) || t.column.params.options || [];
|
|
1965
1968
|
});
|
|
1966
1969
|
return onBeforeUnmount(() => {
|
|
1967
1970
|
var l;
|
|
1968
1971
|
t.row[t.column.field] = e.value;
|
|
1969
|
-
const
|
|
1970
|
-
if (
|
|
1972
|
+
const r = t.column.params.LabelStoreField;
|
|
1973
|
+
if (r) {
|
|
1971
1974
|
const i = (l = a.value.find((m) => m.value === e.value)) == null ? void 0 : l.label;
|
|
1972
|
-
i !== void 0 ? t.row[
|
|
1975
|
+
i !== void 0 ? t.row[r] = i : e.value === void 0 ? t.row[r] = null : e.value !== void 0 && i === void 0 && (t.row[r] = e.value);
|
|
1973
1976
|
}
|
|
1974
|
-
}), (
|
|
1977
|
+
}), (r, l) => (openBlock(), createBlock(unref(ElSelect), {
|
|
1975
1978
|
class: "z-1",
|
|
1976
1979
|
modelValue: e.value,
|
|
1977
1980
|
"onUpdate:modelValue": l[0] || (l[0] = (i) => e.value = i),
|
|
1978
1981
|
"automatic-dropdown": "",
|
|
1979
|
-
placeholder:
|
|
1982
|
+
placeholder: o.placeholder,
|
|
1980
1983
|
"popper-class": "select-dropdown",
|
|
1981
1984
|
clearable: ""
|
|
1982
1985
|
}, {
|
|
@@ -2018,23 +2021,23 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2018
2021
|
placeholder: "请选择",
|
|
2019
2022
|
disabled: !1,
|
|
2020
2023
|
clearable: !1
|
|
2021
|
-
}),
|
|
2022
|
-
var
|
|
2023
|
-
return ((
|
|
2024
|
+
}), o = computed(() => {
|
|
2025
|
+
var r;
|
|
2026
|
+
return ((r = t.column.params[t.gridRef.getRowid(t.row)]) == null ? void 0 : r.options) || t.column.params.options || [];
|
|
2024
2027
|
});
|
|
2025
2028
|
onBeforeUnmount(() => {
|
|
2026
|
-
const
|
|
2027
|
-
t.row[t.column.field] =
|
|
2029
|
+
const r = a.value.join(",");
|
|
2030
|
+
t.row[t.column.field] = r;
|
|
2028
2031
|
const l = t.column.params.LabelStoreField;
|
|
2029
2032
|
if (l) {
|
|
2030
|
-
const i =
|
|
2033
|
+
const i = o.value.filter((m) => a.value.includes(m.value)).map((m) => m.label).join(",");
|
|
2031
2034
|
t.row[l] = i;
|
|
2032
2035
|
}
|
|
2033
2036
|
});
|
|
2034
2037
|
const a = ref([]);
|
|
2035
2038
|
return watchEffect(() => {
|
|
2036
2039
|
t.row[t.column.field] ? a.value = t.row[t.column.field].split(",") : a.value = [];
|
|
2037
|
-
}), (
|
|
2040
|
+
}), (r, l) => (openBlock(), createBlock(unref(ElSelect), {
|
|
2038
2041
|
class: "z-1 vxe-table--ignore-clear",
|
|
2039
2042
|
modelValue: a.value,
|
|
2040
2043
|
"onUpdate:modelValue": l[0] || (l[0] = (i) => a.value = i),
|
|
@@ -2045,7 +2048,7 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2045
2048
|
clearable: ""
|
|
2046
2049
|
}, {
|
|
2047
2050
|
default: withCtx(() => [
|
|
2048
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
2051
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (i) => (openBlock(), createBlock(unref(ElOption), {
|
|
2049
2052
|
class: "vxe-table--ignore-clear",
|
|
2050
2053
|
key: i.value,
|
|
2051
2054
|
label: i.label,
|
|
@@ -2078,7 +2081,7 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2078
2081
|
},
|
|
2079
2082
|
emits: ["remoteMethod"],
|
|
2080
2083
|
setup(n, { emit: t }) {
|
|
2081
|
-
const e = t,
|
|
2084
|
+
const e = t, o = n, a = ref(o.row[o.column.field] === void 0 ? "" : o.row[o.column.field]), r = reactive(o.column.params || {
|
|
2082
2085
|
options: [],
|
|
2083
2086
|
placeholder: "请选择",
|
|
2084
2087
|
disabled: !1,
|
|
@@ -2089,35 +2092,35 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2089
2092
|
loading: !1
|
|
2090
2093
|
});
|
|
2091
2094
|
onBeforeUnmount(() => {
|
|
2092
|
-
const { StoredValueField: i, ReturnValueField: m } =
|
|
2093
|
-
i && i.length ? i.forEach((
|
|
2094
|
-
const _ =
|
|
2095
|
-
_ && (
|
|
2096
|
-
}) :
|
|
2095
|
+
const { StoredValueField: i, ReturnValueField: m } = r;
|
|
2096
|
+
i && i.length ? i.forEach((s, u) => {
|
|
2097
|
+
const _ = r.options.find((f) => f._value === a.value);
|
|
2098
|
+
_ && (o.row[s] = _[m[u]]);
|
|
2099
|
+
}) : o.row[o.column.field] = a.value;
|
|
2097
2100
|
});
|
|
2098
2101
|
function l(i) {
|
|
2099
|
-
const { DataAPIOID: m, SearchField:
|
|
2100
|
-
i ? (
|
|
2102
|
+
const { DataAPIOID: m, SearchField: s } = r;
|
|
2103
|
+
i ? (r.loading = !0, e("remoteMethod", { DataAPIOID: m, SearchField: s, query: i, params: r })) : o.row[o.column.field] = null;
|
|
2101
2104
|
}
|
|
2102
2105
|
return (i, m) => (openBlock(), createBlock(unref(ElSelect), {
|
|
2103
2106
|
class: "z-1 vxe-table--ignore-clear",
|
|
2104
2107
|
modelValue: a.value,
|
|
2105
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
2108
|
+
"onUpdate:modelValue": m[0] || (m[0] = (s) => a.value = s),
|
|
2106
2109
|
"allow-create": "",
|
|
2107
2110
|
"automatic-dropdown": "",
|
|
2108
2111
|
filterable: "",
|
|
2109
2112
|
remote: "",
|
|
2110
|
-
placeholder:
|
|
2113
|
+
placeholder: r.placeholder,
|
|
2111
2114
|
"popper-class": "select-dropdown",
|
|
2112
2115
|
"remote-method": l,
|
|
2113
2116
|
clearable: ""
|
|
2114
2117
|
}, {
|
|
2115
2118
|
default: withCtx(() => [
|
|
2116
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
2119
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(r.options, (s) => (openBlock(), createBlock(unref(ElOption), {
|
|
2117
2120
|
class: "vxe-table--ignore-clear",
|
|
2118
|
-
key:
|
|
2119
|
-
label:
|
|
2120
|
-
value:
|
|
2121
|
+
key: s._value,
|
|
2122
|
+
label: s._label,
|
|
2123
|
+
value: s._value
|
|
2121
2124
|
}, null, 8, ["label", "value"]))), 128))
|
|
2122
2125
|
]),
|
|
2123
2126
|
_: 1
|
|
@@ -2148,9 +2151,9 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2148
2151
|
const t = n, e = ref(t.row[t.column.field]);
|
|
2149
2152
|
return onBeforeUnmount(() => {
|
|
2150
2153
|
t.row[t.column.field] = e.value;
|
|
2151
|
-
}), (
|
|
2154
|
+
}), (o, a) => (openBlock(), createBlock(unref(ElInput), {
|
|
2152
2155
|
modelValue: e.value,
|
|
2153
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
2156
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => e.value = r),
|
|
2154
2157
|
rows: 2,
|
|
2155
2158
|
type: "textarea"
|
|
2156
2159
|
}, null, 8, ["modelValue"]));
|
|
@@ -2183,18 +2186,18 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2183
2186
|
children: "children"
|
|
2184
2187
|
});
|
|
2185
2188
|
if (!t.column.params.TreeData) {
|
|
2186
|
-
const { options: a, ParentNodeField:
|
|
2187
|
-
t.column.params.TreeData = buildTree(deepClone(a),
|
|
2189
|
+
const { options: a, ParentNodeField: r, NodeValueField: l } = t.column.params;
|
|
2190
|
+
t.column.params.TreeData = buildTree(deepClone(a), r, l);
|
|
2188
2191
|
}
|
|
2189
|
-
const
|
|
2192
|
+
const o = ref([]);
|
|
2190
2193
|
return onBeforeUnmount(() => {
|
|
2191
|
-
t.row[t.column.field] =
|
|
2194
|
+
t.row[t.column.field] = o.value.join(",");
|
|
2192
2195
|
}), watchEffect(() => {
|
|
2193
|
-
t.row[t.column.field] ?
|
|
2194
|
-
}), (a,
|
|
2196
|
+
t.row[t.column.field] ? o.value = t.row[t.column.field].split(",") : o.value = [];
|
|
2197
|
+
}), (a, r) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
2195
2198
|
class: "z-1 vxe-table--ignore-clear",
|
|
2196
|
-
modelValue:
|
|
2197
|
-
"onUpdate:modelValue":
|
|
2199
|
+
modelValue: o.value,
|
|
2200
|
+
"onUpdate:modelValue": r[0] || (r[0] = (l) => o.value = l),
|
|
2198
2201
|
"automatic-dropdown": "",
|
|
2199
2202
|
"popper-class": "tree-select",
|
|
2200
2203
|
data: n.column.params.TreeData,
|
|
@@ -2227,30 +2230,30 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2227
2230
|
}
|
|
2228
2231
|
},
|
|
2229
2232
|
setup(n) {
|
|
2230
|
-
const t = n, e = ref(t.row[t.column.field]),
|
|
2233
|
+
const t = n, e = ref(t.row[t.column.field]), o = ref({
|
|
2231
2234
|
label: t.column.params.NodeNameField || "label",
|
|
2232
2235
|
value: t.column.params.NodeValueField || "value",
|
|
2233
2236
|
children: "children"
|
|
2234
2237
|
});
|
|
2235
2238
|
if (!t.column.params.TreeData) {
|
|
2236
|
-
const { options: a, ParentNodeField:
|
|
2237
|
-
t.column.params.TreeData = buildTree(deepClone(a),
|
|
2239
|
+
const { options: a, ParentNodeField: r, NodeValueField: l } = t.column.params;
|
|
2240
|
+
t.column.params.TreeData = buildTree(deepClone(a), r, l);
|
|
2238
2241
|
}
|
|
2239
2242
|
return onBeforeUnmount(() => {
|
|
2240
2243
|
t.row[t.column.field] = e.value;
|
|
2241
|
-
}), (a,
|
|
2244
|
+
}), (a, r) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
2242
2245
|
class: "z-1 vxe-table--ignore-clear",
|
|
2243
2246
|
modelValue: e.value,
|
|
2244
|
-
"onUpdate:modelValue":
|
|
2247
|
+
"onUpdate:modelValue": r[0] || (r[0] = (l) => e.value = l),
|
|
2245
2248
|
"automatic-dropdown": "",
|
|
2246
2249
|
"popper-class": "tree-select",
|
|
2247
2250
|
data: n.column.params.TreeData,
|
|
2248
2251
|
clearable: "",
|
|
2249
|
-
props:
|
|
2252
|
+
props: o.value,
|
|
2250
2253
|
indent: 12
|
|
2251
2254
|
}, {
|
|
2252
2255
|
label: withCtx(({ label: l, value: i }) => [
|
|
2253
|
-
createElementVNode("span", null, toDisplayString(n.column.params.options.find((m) => m[
|
|
2256
|
+
createElementVNode("span", null, toDisplayString(n.column.params.options.find((m) => m[o.value.value] === i) ? l : ""), 1)
|
|
2254
2257
|
]),
|
|
2255
2258
|
_: 1
|
|
2256
2259
|
}, 8, ["modelValue", "data", "props"]));
|
|
@@ -2288,7 +2291,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2288
2291
|
},
|
|
2289
2292
|
emits: ["pageChange", "refresh"],
|
|
2290
2293
|
setup(n, { emit: t }) {
|
|
2291
|
-
const e = n,
|
|
2294
|
+
const e = n, o = ref(), a = ref([
|
|
2292
2295
|
"Total",
|
|
2293
2296
|
"Sizes",
|
|
2294
2297
|
"PrevJump",
|
|
@@ -2299,7 +2302,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2299
2302
|
"FullJump"
|
|
2300
2303
|
]);
|
|
2301
2304
|
onMounted(() => {
|
|
2302
|
-
e.gridOptions.Pages === !1 ? a.value = ["Total"] : useElementClientSize(
|
|
2305
|
+
e.gridOptions.Pages === !1 ? a.value = ["Total"] : useElementClientSize(o.value, ({ clientWidth: i }) => {
|
|
2303
2306
|
i < 300 ? a.value = ["Total"] : i < 500 ? a.value = [
|
|
2304
2307
|
"Total",
|
|
2305
2308
|
"PrevJump",
|
|
@@ -2333,13 +2336,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2333
2336
|
];
|
|
2334
2337
|
}
|
|
2335
2338
|
);
|
|
2336
|
-
const
|
|
2339
|
+
const r = t;
|
|
2337
2340
|
function l() {
|
|
2338
|
-
|
|
2341
|
+
r("pageChange", e.pagination);
|
|
2339
2342
|
}
|
|
2340
2343
|
return (i, m) => (openBlock(), createElementBlock("div", {
|
|
2341
2344
|
ref_key: "pagingDom",
|
|
2342
|
-
ref:
|
|
2345
|
+
ref: o,
|
|
2343
2346
|
class: "flex items-center w-full h-12 border border-solid border-[#e8eaec] box-border"
|
|
2344
2347
|
}, [
|
|
2345
2348
|
createVNode(unref(VxePager), {
|
|
@@ -2347,9 +2350,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2347
2350
|
class: "w-full !h-full",
|
|
2348
2351
|
background: "",
|
|
2349
2352
|
"current-page": n.pagination.Page,
|
|
2350
|
-
"onUpdate:currentPage": m[0] || (m[0] = (
|
|
2353
|
+
"onUpdate:currentPage": m[0] || (m[0] = (s) => n.pagination.Page = s),
|
|
2351
2354
|
"page-size": n.pagination.PageSize,
|
|
2352
|
-
"onUpdate:pageSize": m[1] || (m[1] = (
|
|
2355
|
+
"onUpdate:pageSize": m[1] || (m[1] = (s) => n.pagination.PageSize = s),
|
|
2353
2356
|
total: n.pagination.Total,
|
|
2354
2357
|
layouts: a.value,
|
|
2355
2358
|
onPageChange: l,
|
|
@@ -2362,7 +2365,7 @@ function useFixedColumnPanel(n) {
|
|
|
2362
2365
|
function t() {
|
|
2363
2366
|
const l = n.value;
|
|
2364
2367
|
if (!l) return;
|
|
2365
|
-
const i = getFixableColumns(l), m = new Map(i.map((
|
|
2368
|
+
const i = getFixableColumns(l), m = new Map(i.map((f) => [f.field, f.fixed || ""])), s = i.filter((f) => m.get(f.field)).map((f) => f.field);
|
|
2366
2369
|
let u = "left";
|
|
2367
2370
|
const _ = `
|
|
2368
2371
|
<div style="padding:12px 14px;">
|
|
@@ -2376,13 +2379,13 @@ function useFixedColumnPanel(n) {
|
|
|
2376
2379
|
</div>
|
|
2377
2380
|
|
|
2378
2381
|
<div style="max-height:320px;overflow:auto;border:1px solid #eee;padding:8px;border-radius:6px;">
|
|
2379
|
-
${i.map((
|
|
2380
|
-
const k = String(
|
|
2382
|
+
${i.map((f) => {
|
|
2383
|
+
const k = String(f.title ?? f.field), p = s.includes(f.field) ? "checked" : "", c = m.get(f.field) === "left" ? "左固定" : m.get(f.field) === "right" ? "右固定" : "";
|
|
2381
2384
|
return `
|
|
2382
2385
|
<div style="display:flex;align-items:center;gap:8px;margin:6px 0;">
|
|
2383
|
-
<input type="checkbox" class="fix-col" value="${
|
|
2386
|
+
<input type="checkbox" class="fix-col" value="${f.field}" ${p} />
|
|
2384
2387
|
<span>${escapeHtml(k)}</span>
|
|
2385
|
-
<span style="margin-left:auto;color:#999;font-size:12px;">${
|
|
2388
|
+
<span style="margin-left:auto;color:#999;font-size:12px;">${c}</span>
|
|
2386
2389
|
</div>
|
|
2387
2390
|
`;
|
|
2388
2391
|
}).join("")}
|
|
@@ -2396,27 +2399,27 @@ function useFixedColumnPanel(n) {
|
|
|
2396
2399
|
content: _,
|
|
2397
2400
|
// 你想要的:不持久化,只要本次页面生效
|
|
2398
2401
|
btn: ["应用", "取消全部固定", "关闭"],
|
|
2399
|
-
success: function(
|
|
2400
|
-
|
|
2402
|
+
success: function(f) {
|
|
2403
|
+
f[0].querySelectorAll('input[name="fixSide"]').forEach((p) => {
|
|
2401
2404
|
p.addEventListener("change", () => {
|
|
2402
2405
|
u = p.value === "right" ? "right" : "left";
|
|
2403
2406
|
});
|
|
2404
2407
|
});
|
|
2405
2408
|
},
|
|
2406
2409
|
// 应用
|
|
2407
|
-
btn1: function(
|
|
2410
|
+
btn1: function(f, k) {
|
|
2408
2411
|
const p = Array.from(k[0].querySelectorAll("input.fix-col:checked")).map(
|
|
2409
|
-
(
|
|
2412
|
+
(c) => c.value
|
|
2410
2413
|
);
|
|
2411
|
-
applyFixed(l, i, p, u), window.layer.close(
|
|
2414
|
+
applyFixed(l, i, p, u), window.layer.close(f);
|
|
2412
2415
|
},
|
|
2413
2416
|
// 取消全部固定
|
|
2414
|
-
btn2: function(
|
|
2415
|
-
return e(), window.layer.close(
|
|
2417
|
+
btn2: function(f) {
|
|
2418
|
+
return e(), window.layer.close(f), !1;
|
|
2416
2419
|
},
|
|
2417
2420
|
// 关闭
|
|
2418
|
-
btn3: function(
|
|
2419
|
-
window.layer.close(
|
|
2421
|
+
btn3: function(f) {
|
|
2422
|
+
window.layer.close(f);
|
|
2420
2423
|
}
|
|
2421
2424
|
});
|
|
2422
2425
|
}
|
|
@@ -2424,64 +2427,64 @@ function useFixedColumnPanel(n) {
|
|
|
2424
2427
|
var m;
|
|
2425
2428
|
const l = n.value;
|
|
2426
2429
|
if (!l) return;
|
|
2427
|
-
getFixableColumns(l).forEach((
|
|
2430
|
+
getFixableColumns(l).forEach((s) => {
|
|
2428
2431
|
var u;
|
|
2429
|
-
return (u = l.setColumnFixed) == null ? void 0 : u.call(l,
|
|
2432
|
+
return (u = l.setColumnFixed) == null ? void 0 : u.call(l, s, null);
|
|
2430
2433
|
}), (m = l.refreshColumn) == null || m.call(l);
|
|
2431
2434
|
}
|
|
2432
|
-
function
|
|
2435
|
+
function o(l) {
|
|
2433
2436
|
var u;
|
|
2434
2437
|
const i = n.value;
|
|
2435
2438
|
if (!i || !l) return;
|
|
2436
|
-
const m = getFixableColumns(i),
|
|
2437
|
-
|
|
2439
|
+
const m = getFixableColumns(i), s = r(m, l);
|
|
2440
|
+
s < 0 || (m.forEach((_, f) => {
|
|
2438
2441
|
var k;
|
|
2439
|
-
(k = i.setColumnFixed) == null || k.call(i, _,
|
|
2442
|
+
(k = i.setColumnFixed) == null || k.call(i, _, f <= s ? "left" : null);
|
|
2440
2443
|
}), (u = i.refreshColumn) == null || u.call(i));
|
|
2441
2444
|
}
|
|
2442
2445
|
function a(l) {
|
|
2443
2446
|
var u;
|
|
2444
2447
|
const i = n.value;
|
|
2445
2448
|
if (!i || !l) return;
|
|
2446
|
-
const m = getFixableColumns(i),
|
|
2447
|
-
|
|
2449
|
+
const m = getFixableColumns(i), s = r(m, l);
|
|
2450
|
+
s < 0 || (m.forEach((_, f) => {
|
|
2448
2451
|
var k;
|
|
2449
|
-
(k = i.setColumnFixed) == null || k.call(i, _,
|
|
2452
|
+
(k = i.setColumnFixed) == null || k.call(i, _, f >= s ? "right" : null);
|
|
2450
2453
|
}), (u = i.refreshColumn) == null || u.call(i));
|
|
2451
2454
|
}
|
|
2452
|
-
function
|
|
2455
|
+
function r(l, i) {
|
|
2453
2456
|
const m = (i == null ? void 0 : i.field) || (i == null ? void 0 : i.property);
|
|
2454
|
-
return m ? l.findIndex((
|
|
2457
|
+
return m ? l.findIndex((s) => ((s == null ? void 0 : s.field) || (s == null ? void 0 : s.property)) === m) : -1;
|
|
2455
2458
|
}
|
|
2456
2459
|
return {
|
|
2457
2460
|
openFixPanel: t,
|
|
2458
2461
|
clearAllFixed: e,
|
|
2459
|
-
freezeToLeft:
|
|
2462
|
+
freezeToLeft: o,
|
|
2460
2463
|
freezeToRight: a
|
|
2461
2464
|
};
|
|
2462
2465
|
}
|
|
2463
2466
|
function getFixableColumns(n) {
|
|
2464
2467
|
var e;
|
|
2465
|
-
return getLeafColumns(((e = n.getColumns) == null ? void 0 : e.call(n)) || []).filter((
|
|
2468
|
+
return getLeafColumns(((e = n.getColumns) == null ? void 0 : e.call(n)) || []).filter((o) => o && o.field).filter((o) => !["seq", "checkbox", "radio", "expand"].includes(o.type)).filter((o) => o.type !== "action");
|
|
2466
2469
|
}
|
|
2467
2470
|
function getLeafColumns(n = []) {
|
|
2468
|
-
const t = [], e = (
|
|
2469
|
-
|
|
2471
|
+
const t = [], e = (o) => {
|
|
2472
|
+
o.forEach((a) => {
|
|
2470
2473
|
a && (Array.isArray(a.children) && a.children.length ? e(a.children) : t.push(a));
|
|
2471
2474
|
});
|
|
2472
2475
|
};
|
|
2473
2476
|
return e(n), t;
|
|
2474
2477
|
}
|
|
2475
|
-
function applyFixed(n, t, e,
|
|
2476
|
-
var
|
|
2478
|
+
function applyFixed(n, t, e, o) {
|
|
2479
|
+
var r;
|
|
2477
2480
|
const a = new Set(e);
|
|
2478
2481
|
t.forEach((l) => {
|
|
2479
2482
|
var i;
|
|
2480
2483
|
return (i = n.setColumnFixed) == null ? void 0 : i.call(n, l, null);
|
|
2481
2484
|
}), t.forEach((l) => {
|
|
2482
2485
|
var i;
|
|
2483
|
-
a.has(l.field) && ((i = n.setColumnFixed) == null || i.call(n, l,
|
|
2484
|
-
}), (
|
|
2486
|
+
a.has(l.field) && ((i = n.setColumnFixed) == null || i.call(n, l, o));
|
|
2487
|
+
}), (r = n.refreshColumn) == null || r.call(n);
|
|
2485
2488
|
}
|
|
2486
2489
|
function escapeHtml(n) {
|
|
2487
2490
|
return n.replace(
|
|
@@ -2523,9 +2526,9 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2523
2526
|
"tableSelectRemote"
|
|
2524
2527
|
],
|
|
2525
2528
|
setup(n, { expose: t, emit: e }) {
|
|
2526
|
-
const
|
|
2527
|
-
reactive(
|
|
2528
|
-
let _ = ref(!1),
|
|
2529
|
+
const o = n, a = e, r = ref(), { openFixPanel: l, clearAllFixed: i, freezeToLeft: m, freezeToRight: s } = useFixedColumnPanel(r), u = reactive(o.config);
|
|
2530
|
+
reactive(o.config.columns);
|
|
2531
|
+
let _ = ref(!1), f = null;
|
|
2529
2532
|
onMounted(() => {
|
|
2530
2533
|
document.addEventListener("click", Z, !0);
|
|
2531
2534
|
}), onBeforeUnmount(() => {
|
|
@@ -2534,18 +2537,18 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2534
2537
|
const {
|
|
2535
2538
|
CheckboxRender: k,
|
|
2536
2539
|
ColorPickerRender: p,
|
|
2537
|
-
IconPickerRender:
|
|
2538
|
-
RadioRender:
|
|
2539
|
-
ProgressRender:
|
|
2540
|
-
ActionRender:
|
|
2541
|
-
SelectRender:
|
|
2540
|
+
IconPickerRender: c,
|
|
2541
|
+
RadioRender: d,
|
|
2542
|
+
ProgressRender: v,
|
|
2543
|
+
ActionRender: S,
|
|
2544
|
+
SelectRender: x,
|
|
2542
2545
|
TreeSelectRender: D,
|
|
2543
2546
|
SelectMultipleRender: E,
|
|
2544
2547
|
TreeMultipleSelectRender: B,
|
|
2545
2548
|
ChooseFrameRender: N,
|
|
2546
2549
|
PickPeopleRender: $,
|
|
2547
2550
|
FileRender: K,
|
|
2548
|
-
CustomRender:
|
|
2551
|
+
CustomRender: b,
|
|
2549
2552
|
DatePickerRender: w,
|
|
2550
2553
|
LabelRender: R
|
|
2551
2554
|
} = comps$1, {
|
|
@@ -2557,12 +2560,12 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2557
2560
|
SelectMultipleEditor: q,
|
|
2558
2561
|
TreeMultipleSelectEditor: te,
|
|
2559
2562
|
InputNumberEditor: le,
|
|
2560
|
-
SelectRemoteEditor:
|
|
2561
|
-
} = comps,
|
|
2562
|
-
var y,
|
|
2563
|
-
return ((((y =
|
|
2563
|
+
SelectRemoteEditor: re
|
|
2564
|
+
} = comps, oe = computed(() => {
|
|
2565
|
+
var y, C;
|
|
2566
|
+
return ((((y = o.pagination) == null ? void 0 : y.Page) || 1) - 1) * (((C = o.pagination) == null ? void 0 : C.PageSize) || 1e3);
|
|
2564
2567
|
}), J = computed(() => {
|
|
2565
|
-
var
|
|
2568
|
+
var C, g, h, V;
|
|
2566
2569
|
if (u.Number)
|
|
2567
2570
|
if (u.columns.some(
|
|
2568
2571
|
(O) => O.type === "seq" || O.children && O.children.some((F) => F.type === "seq")
|
|
@@ -2581,17 +2584,17 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2581
2584
|
};
|
|
2582
2585
|
u.columns.unshift(F);
|
|
2583
2586
|
}
|
|
2584
|
-
if (
|
|
2585
|
-
const O = X(
|
|
2587
|
+
if (o.config.AutoFullWidth) {
|
|
2588
|
+
const O = X(o.config.columns || []).filter((z) => !z.children), F = O.reduce((z, U) => {
|
|
2586
2589
|
let A = Number(U.width);
|
|
2587
2590
|
return z + (isNaN(A) ? 100 : A);
|
|
2588
2591
|
}, 0), I = (z = 0) => {
|
|
2589
2592
|
if (z > 50) return;
|
|
2590
|
-
if (!
|
|
2593
|
+
if (!r.value) {
|
|
2591
2594
|
setTimeout(() => I(++z), 0);
|
|
2592
2595
|
return;
|
|
2593
2596
|
}
|
|
2594
|
-
const U =
|
|
2597
|
+
const U = r.value.$el.clientWidth;
|
|
2595
2598
|
F !== U && O.forEach((A) => {
|
|
2596
2599
|
let W = Number(A.width);
|
|
2597
2600
|
A.width = Number(((isNaN(W) ? 100 : W) * (U / F)).toFixed(0));
|
|
@@ -2603,16 +2606,16 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2603
2606
|
keepSource: !0,
|
|
2604
2607
|
showOverflow: "title",
|
|
2605
2608
|
seqConfig: {
|
|
2606
|
-
seqMethod: (j) =>
|
|
2609
|
+
seqMethod: (j) => oe.value + j.$rowIndex + 1
|
|
2607
2610
|
},
|
|
2608
2611
|
exportConfig: {},
|
|
2609
2612
|
importConfig: {},
|
|
2610
2613
|
printConfig: {},
|
|
2611
2614
|
columns: [],
|
|
2612
|
-
...
|
|
2615
|
+
...o.config,
|
|
2613
2616
|
// data: [...props.data], //不需要开启,目前是通过异步加载数据,开启会导致数据被当前配置覆盖
|
|
2614
2617
|
// ✅ 关键:开启“单元格选中”,才会出现 col--selected / col--current 等 class
|
|
2615
|
-
mouseConfig:
|
|
2618
|
+
mouseConfig: o.dblEditEnabled ? { selected: !0 } : (C = o.config) == null ? void 0 : C.mouseConfig,
|
|
2616
2619
|
// ✅ 开单元格高亮(不同版本字段名可能是 highlightCell)
|
|
2617
2620
|
highlightCell: !0,
|
|
2618
2621
|
highlightCurrentRow: !0,
|
|
@@ -2624,9 +2627,9 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2624
2627
|
// 只对 keep-source 开启有效,是否显示单元格新增与修改状态
|
|
2625
2628
|
showIcon: !1,
|
|
2626
2629
|
// 因为对过滤行进行了修改 该属性必须为false
|
|
2627
|
-
...(g =
|
|
2630
|
+
...(g = o.config) == null ? void 0 : g.editConfig,
|
|
2628
2631
|
// ⭐ 最终由父组件 dblEditEnabled 决定
|
|
2629
|
-
trigger:
|
|
2632
|
+
trigger: o.dblEditEnabled ? "dblclick" : ((V = (h = o.config) == null ? void 0 : h.editConfig) == null ? void 0 : V.trigger) || "click"
|
|
2630
2633
|
},
|
|
2631
2634
|
showFooter: u["Total-Row"],
|
|
2632
2635
|
// 启用表尾统计
|
|
@@ -2651,16 +2654,16 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2651
2654
|
}), G = ref(!1);
|
|
2652
2655
|
let L = null;
|
|
2653
2656
|
function ne(y) {
|
|
2654
|
-
const
|
|
2655
|
-
if (!
|
|
2656
|
-
const g =
|
|
2657
|
+
const C = y.clipboardData;
|
|
2658
|
+
if (!C) return null;
|
|
2659
|
+
const g = C.getData("text/html");
|
|
2657
2660
|
if (g && /<table/i.test(g)) {
|
|
2658
2661
|
const F = new DOMParser().parseFromString(g, "text/html").querySelector("table");
|
|
2659
2662
|
if (F)
|
|
2660
2663
|
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(`
|
|
2661
2664
|
`)), (A.textContent || "").replace(/\u00A0/g, " ").trimEnd())));
|
|
2662
2665
|
}
|
|
2663
|
-
const h =
|
|
2666
|
+
const h = C.getData("text/plain") || "";
|
|
2664
2667
|
if (!h) return null;
|
|
2665
2668
|
const j = h.replace(/\r\n/g, `
|
|
2666
2669
|
`).replace(/\r/g, `
|
|
@@ -2671,11 +2674,11 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2671
2674
|
}
|
|
2672
2675
|
function ae() {
|
|
2673
2676
|
L || (L = (y) => {
|
|
2674
|
-
var g, h,
|
|
2677
|
+
var g, h, V;
|
|
2675
2678
|
if (!G.value) return;
|
|
2676
2679
|
y.preventDefault(), y.stopPropagation(), (g = y.stopImmediatePropagation) == null || g.call(y);
|
|
2677
|
-
const
|
|
2678
|
-
|
|
2680
|
+
const C = ne(y);
|
|
2681
|
+
C && ((V = (h = o.gridRef) == null ? void 0 : h.onGridPaste) == null || V.call(h, C));
|
|
2679
2682
|
}, window.addEventListener("paste", L, !0));
|
|
2680
2683
|
}
|
|
2681
2684
|
function Q() {
|
|
@@ -2684,76 +2687,76 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2684
2687
|
const ie = {
|
|
2685
2688
|
//设置表头右键 存储当前列信息
|
|
2686
2689
|
headerCellMenu({ column: y }) {
|
|
2687
|
-
|
|
2690
|
+
f = y;
|
|
2688
2691
|
},
|
|
2689
2692
|
cellMenu({ row: y }) {
|
|
2690
|
-
const
|
|
2691
|
-
|
|
2693
|
+
const C = r.value;
|
|
2694
|
+
C && C.setCurrentRow(y);
|
|
2692
2695
|
},
|
|
2693
2696
|
//单击事件 设置选中行和选择单元格
|
|
2694
|
-
cellClick({ row: y, column:
|
|
2695
|
-
var h,
|
|
2696
|
-
const g =
|
|
2697
|
-
g && ((h = g.setCurrentCell) == null || h.call(g, y,
|
|
2697
|
+
cellClick({ row: y, column: C }) {
|
|
2698
|
+
var h, V;
|
|
2699
|
+
const g = r.value;
|
|
2700
|
+
g && ((h = g.setCurrentCell) == null || h.call(g, y, C.field), g.currentCell = C, (V = g.setCurrentRow) == null || V.call(g, y));
|
|
2698
2701
|
},
|
|
2699
2702
|
//双击事件 设置选中行和选择单元格
|
|
2700
|
-
cellDblclick({ row: y, column:
|
|
2701
|
-
var h,
|
|
2702
|
-
const g =
|
|
2703
|
-
g && ((h = g.setCurrentCell) == null || h.call(g, y,
|
|
2703
|
+
cellDblclick({ row: y, column: C }) {
|
|
2704
|
+
var h, V;
|
|
2705
|
+
const g = r.value;
|
|
2706
|
+
g && ((h = g.setCurrentCell) == null || h.call(g, y, C.field), (V = g.setCurrentRow) == null || V.call(g, y));
|
|
2704
2707
|
},
|
|
2705
2708
|
async menuClick({ menu: y }) {
|
|
2706
|
-
const
|
|
2707
|
-
if (
|
|
2709
|
+
const C = r.value;
|
|
2710
|
+
if (C)
|
|
2708
2711
|
switch (y.code) {
|
|
2709
2712
|
case "reload":
|
|
2710
2713
|
const g = layer.load(2, { shade: [0.5, "#fff"] });
|
|
2711
|
-
|
|
2714
|
+
o.gridRef.echoData(), layer.close(g);
|
|
2712
2715
|
break;
|
|
2713
2716
|
case "Print":
|
|
2714
|
-
|
|
2715
|
-
columns:
|
|
2716
|
-
pageHeader: [{ text:
|
|
2717
|
+
C.print({
|
|
2718
|
+
columns: C.getColumns().filter((j) => j.type !== "action" && j.type !== "checkbox"),
|
|
2719
|
+
pageHeader: [{ text: o.config.PageName, align: "center" }],
|
|
2717
2720
|
// 目前无效
|
|
2718
2721
|
pageFooter: [{ text: "第 {pageNum} 页 共 {totalPage} 页", align: "center" }]
|
|
2719
2722
|
//目前无效
|
|
2720
2723
|
});
|
|
2721
2724
|
break;
|
|
2722
2725
|
case "exportCurrent":
|
|
2723
|
-
let h = (
|
|
2726
|
+
let h = (C == null ? void 0 : C.getTableData().tableData) || [];
|
|
2724
2727
|
h = h.map((j) => {
|
|
2725
2728
|
const { children: O, ...F } = j;
|
|
2726
2729
|
return F;
|
|
2727
|
-
}),
|
|
2730
|
+
}), C.exportData({
|
|
2728
2731
|
type: "csv",
|
|
2729
2732
|
isHeader: !0,
|
|
2730
2733
|
isFooter: !1,
|
|
2731
|
-
columns:
|
|
2734
|
+
columns: C.getColumns().filter((j) => j.type !== "action" && j.type !== "checkbox"),
|
|
2732
2735
|
// 过滤出不需要导出的列
|
|
2733
|
-
filename: `${
|
|
2736
|
+
filename: `${o.config.PageName}(${H_getISODate(/* @__PURE__ */ new Date())})`,
|
|
2734
2737
|
// 文件名
|
|
2735
2738
|
data: h
|
|
2736
2739
|
// 当前页数据
|
|
2737
2740
|
});
|
|
2738
2741
|
break;
|
|
2739
2742
|
case "exportAll":
|
|
2740
|
-
let
|
|
2741
|
-
|
|
2743
|
+
let V = await o.gridRef.handleExport();
|
|
2744
|
+
C.exportData({
|
|
2742
2745
|
type: "csv",
|
|
2743
2746
|
isHeader: !0,
|
|
2744
2747
|
isFooter: !0,
|
|
2745
|
-
columns:
|
|
2748
|
+
columns: C.getColumns().filter((j) => j.type !== "action" && j.type !== "checkbox" && j.type !== "seq"),
|
|
2746
2749
|
// 过滤出不需要导出的列
|
|
2747
|
-
filename: `${
|
|
2750
|
+
filename: `${o.config.PageName == "" ? "导出" : o.config.PageName}(${H_getISODate(/* @__PURE__ */ new Date())})`,
|
|
2748
2751
|
// 文件名
|
|
2749
|
-
data:
|
|
2752
|
+
data: V
|
|
2750
2753
|
});
|
|
2751
2754
|
break;
|
|
2752
2755
|
case "OpenCopy":
|
|
2753
|
-
|
|
2756
|
+
o.gridRef.openCopy(), G.value = !0, ae();
|
|
2754
2757
|
break;
|
|
2755
2758
|
case "CloseCopy":
|
|
2756
|
-
|
|
2759
|
+
o.gridRef.closeCopy(), G.value = !1, Q();
|
|
2757
2760
|
break;
|
|
2758
2761
|
case "colFixPanel":
|
|
2759
2762
|
l();
|
|
@@ -2762,10 +2765,10 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2762
2765
|
i();
|
|
2763
2766
|
break;
|
|
2764
2767
|
case "freezeLeftTo":
|
|
2765
|
-
m(
|
|
2768
|
+
m(f);
|
|
2766
2769
|
break;
|
|
2767
2770
|
case "freezeRightTo":
|
|
2768
|
-
|
|
2771
|
+
s(f);
|
|
2769
2772
|
break;
|
|
2770
2773
|
}
|
|
2771
2774
|
}
|
|
@@ -2791,8 +2794,8 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2791
2794
|
function pe(...y) {
|
|
2792
2795
|
a("FileClick", ...y);
|
|
2793
2796
|
}
|
|
2794
|
-
function ge(y,
|
|
2795
|
-
y.column =
|
|
2797
|
+
function ge(y, C, g) {
|
|
2798
|
+
y.column = C, y.row = g, a("tableSelectRemote", y);
|
|
2796
2799
|
}
|
|
2797
2800
|
function _e(...y) {
|
|
2798
2801
|
a("tableSelectChange", ...y);
|
|
@@ -2809,30 +2812,30 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2809
2812
|
function ye(...y) {
|
|
2810
2813
|
a("CheckboxChange", ...y);
|
|
2811
2814
|
}
|
|
2812
|
-
function X(y,
|
|
2815
|
+
function X(y, C = "children", g = []) {
|
|
2813
2816
|
return y.forEach((h) => {
|
|
2814
|
-
g.push(h), h[
|
|
2817
|
+
g.push(h), h[C] && h[C].length > 0 && X(h[C], C, g);
|
|
2815
2818
|
}), g;
|
|
2816
2819
|
}
|
|
2817
2820
|
const ke = ({ menu: y }) => {
|
|
2818
|
-
var
|
|
2819
|
-
y.type == "print" ? (
|
|
2821
|
+
var C, g;
|
|
2822
|
+
y.type == "print" ? (C = r.value) == null || C.openPrint() : y.type == "export" && ((g = r.value) == null || g.openExport());
|
|
2820
2823
|
}, we = (y) => {
|
|
2821
2824
|
_.value = !0;
|
|
2822
|
-
let
|
|
2823
|
-
u.columns.splice((y._index.newIndex || 1) - 1, 0,
|
|
2825
|
+
let C = u.columns.splice(y._index.oldIndex, 1)[0];
|
|
2826
|
+
u.columns.splice((y._index.newIndex || 1) - 1, 0, C);
|
|
2824
2827
|
};
|
|
2825
2828
|
function Z(y) {
|
|
2826
|
-
const
|
|
2827
|
-
if (!
|
|
2828
|
-
const g =
|
|
2829
|
+
const C = y.target.closest("tr.vxe-body--row");
|
|
2830
|
+
if (!C || !(r != null && r.value)) return;
|
|
2831
|
+
const g = C.getAttribute("rowid");
|
|
2829
2832
|
if (!g) return;
|
|
2830
|
-
const h =
|
|
2831
|
-
h &&
|
|
2833
|
+
const h = r.value.getRowById(g);
|
|
2834
|
+
h && r.value.setCurrentRow(h);
|
|
2832
2835
|
}
|
|
2833
|
-
function ee(y,
|
|
2836
|
+
function ee(y, C) {
|
|
2834
2837
|
if (!(y instanceof Array)) return 0;
|
|
2835
|
-
function g(h,
|
|
2838
|
+
function g(h, V) {
|
|
2836
2839
|
let j = 0;
|
|
2837
2840
|
function O(F) {
|
|
2838
2841
|
var I;
|
|
@@ -2840,44 +2843,44 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2840
2843
|
for (const z of F.children)
|
|
2841
2844
|
O(z);
|
|
2842
2845
|
else
|
|
2843
|
-
j = H_calculate(`${j}+${F[
|
|
2846
|
+
j = H_calculate(`${j}+${F[V] || 0}`);
|
|
2844
2847
|
}
|
|
2845
2848
|
return O(h), j;
|
|
2846
2849
|
}
|
|
2847
|
-
return y.reduce((h,
|
|
2850
|
+
return y.reduce((h, V) => {
|
|
2848
2851
|
var j, O;
|
|
2849
|
-
if (!(
|
|
2850
|
-
return H_calculate(`${h}+${Number(
|
|
2851
|
-
if (((j =
|
|
2852
|
-
return H_calculate(`${h}+${Number(
|
|
2853
|
-
if (((O =
|
|
2854
|
-
let F = g(
|
|
2852
|
+
if (!(V != null && V.children))
|
|
2853
|
+
return H_calculate(`${h}+${Number(V[C]) || 0}`);
|
|
2854
|
+
if (((j = V.children) == null ? void 0 : j.length) === 0 && (V.ParentOID === "00000000-0000-0000-0000-000000000000" || V.ParentOID === null))
|
|
2855
|
+
return H_calculate(`${h}+${Number(V[C]) || 0}`);
|
|
2856
|
+
if (((O = V.children) == null ? void 0 : O.length) > 0 && (V.ParentOID === "00000000-0000-0000-0000-000000000000" || V.ParentOID === null)) {
|
|
2857
|
+
let F = g(V, C);
|
|
2855
2858
|
return H_calculate(`${h}+${F}`);
|
|
2856
2859
|
}
|
|
2857
2860
|
return h;
|
|
2858
2861
|
}, 0);
|
|
2859
2862
|
}
|
|
2860
2863
|
return watch(
|
|
2861
|
-
() =>
|
|
2864
|
+
() => o.dblEditEnabled,
|
|
2862
2865
|
async (y) => {
|
|
2863
|
-
var
|
|
2866
|
+
var C, g, h;
|
|
2864
2867
|
if (!y) {
|
|
2865
2868
|
await nextTick();
|
|
2866
|
-
const
|
|
2867
|
-
if (!
|
|
2868
|
-
(
|
|
2869
|
+
const V = r.value;
|
|
2870
|
+
if (!V) return;
|
|
2871
|
+
(C = V.clearEdit) == null || C.call(V), (g = V.clearSelected) == null || g.call(V), (h = V.clearCurrentRow) == null || h.call(V);
|
|
2869
2872
|
}
|
|
2870
2873
|
},
|
|
2871
2874
|
{ immediate: !0 }
|
|
2872
2875
|
), t({
|
|
2873
|
-
gridRef:
|
|
2876
|
+
gridRef: r,
|
|
2874
2877
|
getFieldTotal: ee,
|
|
2875
2878
|
gridOptions: J
|
|
2876
|
-
}), (y,
|
|
2879
|
+
}), (y, C) => (openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
2877
2880
|
createVNode(unref(VxeGrid), mergeProps({
|
|
2878
|
-
class: ["grid-table", { "dbl-edit-on":
|
|
2881
|
+
class: ["grid-table", { "dbl-edit-on": o.dblEditEnabled }],
|
|
2879
2882
|
ref_key: "gridRef",
|
|
2880
|
-
ref:
|
|
2883
|
+
ref: r
|
|
2881
2884
|
}, { ...J.value, ...y.$attrs }, toHandlers(ie), {
|
|
2882
2885
|
onMenuClick: ke,
|
|
2883
2886
|
onColumnDragend: we,
|
|
@@ -2887,88 +2890,88 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2887
2890
|
FilterRows: withCtx(({ column: g }) => [
|
|
2888
2891
|
createVNode(_sfc_main$t, {
|
|
2889
2892
|
column: g,
|
|
2890
|
-
"grid-ref":
|
|
2893
|
+
"grid-ref": r.value,
|
|
2891
2894
|
onFilterSearch: de,
|
|
2892
2895
|
onSortChange: fe
|
|
2893
2896
|
}, null, 8, ["column", "grid-ref"])
|
|
2894
2897
|
]),
|
|
2895
2898
|
ActionRender: withCtx(({ row: g, column: h }) => [
|
|
2896
|
-
createVNode(unref(
|
|
2899
|
+
createVNode(unref(S), {
|
|
2897
2900
|
row: g,
|
|
2898
2901
|
column: h,
|
|
2899
|
-
"grid-ref":
|
|
2902
|
+
"grid-ref": r.value,
|
|
2900
2903
|
onActionClick: ue,
|
|
2901
2904
|
onActionRenderBefore: me
|
|
2902
2905
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2903
2906
|
]),
|
|
2904
2907
|
RadioRender: withCtx(({ row: g, column: h }) => [
|
|
2905
|
-
createVNode(unref(
|
|
2908
|
+
createVNode(unref(d), {
|
|
2906
2909
|
row: g,
|
|
2907
2910
|
column: h,
|
|
2908
|
-
"grid-ref":
|
|
2911
|
+
"grid-ref": r.value
|
|
2909
2912
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2910
2913
|
]),
|
|
2911
2914
|
CheckboxRender: withCtx(({ row: g, column: h }) => [
|
|
2912
2915
|
createVNode(unref(k), {
|
|
2913
2916
|
row: g,
|
|
2914
2917
|
column: h,
|
|
2915
|
-
"grid-ref":
|
|
2918
|
+
"grid-ref": r.value
|
|
2916
2919
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2917
2920
|
]),
|
|
2918
2921
|
ColorPickerRender: withCtx(({ row: g, column: h }) => [
|
|
2919
2922
|
createVNode(unref(p), {
|
|
2920
2923
|
row: g,
|
|
2921
2924
|
column: h,
|
|
2922
|
-
"grid-ref":
|
|
2925
|
+
"grid-ref": r.value
|
|
2923
2926
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2924
2927
|
]),
|
|
2925
2928
|
IconPickerRender: withCtx(({ row: g, column: h }) => [
|
|
2926
|
-
createVNode(unref(
|
|
2929
|
+
createVNode(unref(c), {
|
|
2927
2930
|
row: g,
|
|
2928
2931
|
column: h,
|
|
2929
|
-
"grid-ref":
|
|
2932
|
+
"grid-ref": r.value
|
|
2930
2933
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2931
2934
|
]),
|
|
2932
2935
|
ProgressRender: withCtx(({ row: g, column: h }) => [
|
|
2933
|
-
createVNode(unref(
|
|
2936
|
+
createVNode(unref(v), {
|
|
2934
2937
|
row: g,
|
|
2935
2938
|
column: h,
|
|
2936
|
-
"grid-ref":
|
|
2939
|
+
"grid-ref": r.value
|
|
2937
2940
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2938
2941
|
]),
|
|
2939
2942
|
SelectRender: withCtx(({ row: g, column: h }) => [
|
|
2940
|
-
createVNode(unref(
|
|
2943
|
+
createVNode(unref(x), {
|
|
2941
2944
|
row: g,
|
|
2942
2945
|
column: h,
|
|
2943
|
-
"grid-ref":
|
|
2946
|
+
"grid-ref": r.value
|
|
2944
2947
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2945
2948
|
]),
|
|
2946
2949
|
SelectMultipleRender: withCtx(({ row: g, column: h }) => [
|
|
2947
2950
|
createVNode(unref(E), {
|
|
2948
2951
|
row: g,
|
|
2949
2952
|
column: h,
|
|
2950
|
-
"grid-ref":
|
|
2953
|
+
"grid-ref": r.value
|
|
2951
2954
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2952
2955
|
]),
|
|
2953
2956
|
TreeSelectRender: withCtx(({ row: g, column: h }) => [
|
|
2954
2957
|
createVNode(unref(D), {
|
|
2955
2958
|
row: g,
|
|
2956
2959
|
column: h,
|
|
2957
|
-
"grid-ref":
|
|
2960
|
+
"grid-ref": r.value
|
|
2958
2961
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2959
2962
|
]),
|
|
2960
2963
|
TreeMultipleSelectRender: withCtx(({ row: g, column: h }) => [
|
|
2961
2964
|
createVNode(unref(B), {
|
|
2962
2965
|
row: g,
|
|
2963
2966
|
column: h,
|
|
2964
|
-
"grid-ref":
|
|
2967
|
+
"grid-ref": r.value
|
|
2965
2968
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2966
2969
|
]),
|
|
2967
2970
|
ChooseFrameRender: withCtx(({ row: g, column: h }) => [
|
|
2968
2971
|
createVNode(unref(N), {
|
|
2969
2972
|
row: g,
|
|
2970
2973
|
column: h,
|
|
2971
|
-
"grid-ref":
|
|
2974
|
+
"grid-ref": o.gridRef,
|
|
2972
2975
|
onOnChooseBeforClick: ve
|
|
2973
2976
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2974
2977
|
]),
|
|
@@ -2976,7 +2979,7 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2976
2979
|
createVNode(unref($), {
|
|
2977
2980
|
row: g,
|
|
2978
2981
|
column: h,
|
|
2979
|
-
"grid-ref":
|
|
2982
|
+
"grid-ref": r.value,
|
|
2980
2983
|
onChange: be
|
|
2981
2984
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2982
2985
|
]),
|
|
@@ -2984,92 +2987,92 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2984
2987
|
createVNode(unref(K), {
|
|
2985
2988
|
row: g,
|
|
2986
2989
|
column: h,
|
|
2987
|
-
"grid-ref":
|
|
2990
|
+
"grid-ref": r.value,
|
|
2988
2991
|
onFileClick: pe
|
|
2989
2992
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2990
2993
|
]),
|
|
2991
2994
|
CustomRender: withCtx(({ row: g, column: h }) => [
|
|
2992
|
-
createVNode(unref(
|
|
2995
|
+
createVNode(unref(b), {
|
|
2993
2996
|
row: g,
|
|
2994
2997
|
column: h,
|
|
2995
|
-
"grid-ref":
|
|
2998
|
+
"grid-ref": r.value
|
|
2996
2999
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2997
3000
|
]),
|
|
2998
3001
|
DatePickerRender: withCtx(({ row: g, column: h }) => [
|
|
2999
3002
|
createVNode(unref(w), {
|
|
3000
3003
|
row: g,
|
|
3001
3004
|
column: h,
|
|
3002
|
-
"grid-ref":
|
|
3005
|
+
"grid-ref": r.value
|
|
3003
3006
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3004
3007
|
]),
|
|
3005
3008
|
LabelRender: withCtx(({ row: g, column: h }) => [
|
|
3006
3009
|
createVNode(unref(R), {
|
|
3007
3010
|
row: g,
|
|
3008
3011
|
column: h,
|
|
3009
|
-
"grid-ref":
|
|
3012
|
+
"grid-ref": r.value
|
|
3010
3013
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3011
3014
|
]),
|
|
3012
3015
|
InputEditor: withCtx(({ row: g, column: h }) => [
|
|
3013
3016
|
createVNode(unref(Y), {
|
|
3014
3017
|
row: g,
|
|
3015
3018
|
column: h,
|
|
3016
|
-
"grid-ref":
|
|
3019
|
+
"grid-ref": r.value
|
|
3017
3020
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3018
3021
|
]),
|
|
3019
3022
|
TextareaEditor: withCtx(({ row: g, column: h }) => [
|
|
3020
3023
|
createVNode(unref(M), {
|
|
3021
3024
|
row: g,
|
|
3022
3025
|
column: h,
|
|
3023
|
-
"grid-ref":
|
|
3026
|
+
"grid-ref": r.value
|
|
3024
3027
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3025
3028
|
]),
|
|
3026
3029
|
SelectEditor: withCtx(({ row: g, column: h }) => [
|
|
3027
3030
|
createVNode(unref(P), {
|
|
3028
3031
|
row: g,
|
|
3029
3032
|
column: h,
|
|
3030
|
-
"grid-ref":
|
|
3033
|
+
"grid-ref": r.value
|
|
3031
3034
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3032
3035
|
]),
|
|
3033
3036
|
SelectMultipleEditor: withCtx(({ row: g, column: h }) => [
|
|
3034
3037
|
createVNode(unref(q), {
|
|
3035
3038
|
row: g,
|
|
3036
3039
|
column: h,
|
|
3037
|
-
"grid-ref":
|
|
3040
|
+
"grid-ref": r.value
|
|
3038
3041
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3039
3042
|
]),
|
|
3040
3043
|
TreeSelectEditor: withCtx(({ row: g, column: h }) => [
|
|
3041
3044
|
createVNode(unref(T), {
|
|
3042
3045
|
row: g,
|
|
3043
3046
|
column: h,
|
|
3044
|
-
"grid-ref":
|
|
3047
|
+
"grid-ref": r.value
|
|
3045
3048
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3046
3049
|
]),
|
|
3047
3050
|
TreeMultipleSelectEditor: withCtx(({ row: g, column: h }) => [
|
|
3048
3051
|
createVNode(unref(te), {
|
|
3049
3052
|
row: g,
|
|
3050
3053
|
column: h,
|
|
3051
|
-
"grid-ref":
|
|
3054
|
+
"grid-ref": r.value
|
|
3052
3055
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3053
3056
|
]),
|
|
3054
3057
|
DatePickerEditor: withCtx(({ row: g, column: h }) => [
|
|
3055
3058
|
createVNode(unref(H), {
|
|
3056
3059
|
row: g,
|
|
3057
3060
|
column: h,
|
|
3058
|
-
"grid-ref":
|
|
3061
|
+
"grid-ref": r.value
|
|
3059
3062
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3060
3063
|
]),
|
|
3061
3064
|
InputNumberEditor: withCtx(({ row: g, column: h }) => [
|
|
3062
3065
|
createVNode(unref(le), {
|
|
3063
3066
|
row: g,
|
|
3064
3067
|
column: h,
|
|
3065
|
-
"grid-ref":
|
|
3068
|
+
"grid-ref": r.value
|
|
3066
3069
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3067
3070
|
]),
|
|
3068
3071
|
SelectRemoteEditor: withCtx(({ row: g, column: h }) => [
|
|
3069
|
-
createVNode(unref(
|
|
3072
|
+
createVNode(unref(re), {
|
|
3070
3073
|
row: g,
|
|
3071
3074
|
column: h,
|
|
3072
|
-
"grid-ref":
|
|
3075
|
+
"grid-ref": r.value,
|
|
3073
3076
|
onRemoteMethod: he
|
|
3074
3077
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3075
3078
|
]),
|
|
@@ -3077,10 +3080,10 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
3077
3080
|
createElementVNode("div", _hoisted_2$2, [
|
|
3078
3081
|
createVNode(unref(HrTableSelect), {
|
|
3079
3082
|
modelValue: g[h.field],
|
|
3080
|
-
"onUpdate:modelValue": (
|
|
3083
|
+
"onUpdate:modelValue": (V) => g[h.field] = V,
|
|
3081
3084
|
columns: h.params.tableSelectColumns || [],
|
|
3082
|
-
onRemoteMethod: (
|
|
3083
|
-
onChange: (
|
|
3085
|
+
onRemoteMethod: (V) => ge(V, h, g),
|
|
3086
|
+
onChange: (V) => _e({ change: V, row: g, column: h }),
|
|
3084
3087
|
width: h.params.tableSelectWidth
|
|
3085
3088
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "columns", "onRemoteMethod", "onChange", "width"])
|
|
3086
3089
|
])
|
|
@@ -3136,30 +3139,30 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
3136
3139
|
}),
|
|
3137
3140
|
emits: /* @__PURE__ */ mergeModels(["change"], ["update:modelValue"]),
|
|
3138
3141
|
setup(n, { emit: t }) {
|
|
3139
|
-
const e = useModel(n, "modelValue"),
|
|
3142
|
+
const e = useModel(n, "modelValue"), o = ref(), a = t, r = (l) => l ? `${Number(l) ? l + "px" : l}` : "150px";
|
|
3140
3143
|
return watch(() => n.highlight, (l) => {
|
|
3141
3144
|
var i;
|
|
3142
|
-
return (i =
|
|
3145
|
+
return (i = o.value.querySelector(`[index="${l}"]`)) == null ? void 0 : i.scrollIntoView({ block: "center", behavior: "smooth" });
|
|
3143
3146
|
}), (l, i) => (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
3144
3147
|
createElementVNode("table", null, [
|
|
3145
3148
|
createElementVNode("thead", null, [
|
|
3146
3149
|
createElementVNode("tr", null, [
|
|
3147
3150
|
i[0] || (i[0] = createElementVNode("th", { class: "w[50px]" }, "序号", -1)),
|
|
3148
3151
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (m) => (openBlock(), createElementBlock("th", {
|
|
3149
|
-
style: normalizeStyle({ width:
|
|
3152
|
+
style: normalizeStyle({ width: r(m.width) })
|
|
3150
3153
|
}, toDisplayString(m.title), 5))), 256))
|
|
3151
3154
|
])
|
|
3152
3155
|
]),
|
|
3153
3156
|
createElementVNode("tbody", {
|
|
3154
3157
|
ref_key: "tbody",
|
|
3155
|
-
ref:
|
|
3158
|
+
ref: o
|
|
3156
3159
|
}, [
|
|
3157
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.value, (m,
|
|
3158
|
-
class: normalizeClass({ zebra:
|
|
3160
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.value, (m, s) => (openBlock(), createElementBlock("tr", {
|
|
3161
|
+
class: normalizeClass({ zebra: s % 2 != 0, highlight: l.highlight === s }),
|
|
3159
3162
|
onClick: (u) => a("change", m),
|
|
3160
|
-
index:
|
|
3163
|
+
index: s
|
|
3161
3164
|
}, [
|
|
3162
|
-
createElementVNode("td", _hoisted_3, toDisplayString(
|
|
3165
|
+
createElementVNode("td", _hoisted_3, toDisplayString(s + 1), 1),
|
|
3163
3166
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (u) => (openBlock(), createElementBlock("td", null, toDisplayString(m[u.field]), 1))), 256))
|
|
3164
3167
|
], 10, _hoisted_2$1))), 256))
|
|
3165
3168
|
], 512)
|
|
@@ -3188,46 +3191,46 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
3188
3191
|
query: "",
|
|
3189
3192
|
tableData: [],
|
|
3190
3193
|
loading: !1
|
|
3191
|
-
}),
|
|
3192
|
-
|
|
3193
|
-
},
|
|
3194
|
-
if (!
|
|
3195
|
-
const E = ($) => Number($) ? $ + "px" : $, B =
|
|
3194
|
+
}), o = ref(), a = ref(), r = ref(!1), l = ref(-1), i = reactive({ x: 0, y: 0, w: 0 }), m = useModel(n, "modelValue"), s = t, u = () => s("remote-method", e), _ = () => {
|
|
3195
|
+
r.value = !0, s("remote-method", e), f();
|
|
3196
|
+
}, f = async () => {
|
|
3197
|
+
if (!r.value) return;
|
|
3198
|
+
const E = ($) => Number($) ? $ + "px" : $, B = o.value.getBoundingClientRect();
|
|
3196
3199
|
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
3200
|
const N = a.value.$el.offsetWidth;
|
|
3198
3201
|
i.x = innerWidth - B.x > N ? B.x : B.x + B.width - N;
|
|
3199
3202
|
};
|
|
3200
3203
|
let k = !0;
|
|
3201
|
-
const p = () => k && (
|
|
3202
|
-
|
|
3203
|
-
},
|
|
3204
|
+
const p = () => k && (r.value = !1), c = () => (k = !1, setTimeout(() => k = !0, 16)), d = () => k && o.value.focus(), v = (E) => {
|
|
3205
|
+
c(), s("change", E), r.value = !1;
|
|
3206
|
+
}, S = () => l.value !== -1 && l.value--, x = () => l.value < e.tableData.length && l.value++, D = () => {
|
|
3204
3207
|
if (l.value == -1) return;
|
|
3205
3208
|
const E = e.tableData[l.value];
|
|
3206
|
-
|
|
3209
|
+
s("change", E), o.value.blur();
|
|
3207
3210
|
};
|
|
3208
3211
|
return watch(() => e.query, (E) => {
|
|
3209
3212
|
E !== m.value && (m.value = E);
|
|
3210
3213
|
}), watch(() => m.value, (E) => {
|
|
3211
3214
|
E !== e.query && (e.query = E);
|
|
3212
3215
|
}), effect(() => {
|
|
3213
|
-
e.query,
|
|
3214
|
-
}), effect(() => !
|
|
3216
|
+
e.query, r.value, l.value = -1;
|
|
3217
|
+
}), effect(() => !r.value && (e.tableData = [])), document.addEventListener("scroll", f), (E, B) => (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
3215
3218
|
withDirectives(createElementVNode("input", {
|
|
3216
3219
|
ref_key: "input",
|
|
3217
|
-
ref:
|
|
3220
|
+
ref: o,
|
|
3218
3221
|
"onUpdate:modelValue": B[0] || (B[0] = (N) => e.query = N),
|
|
3219
3222
|
onInput: u,
|
|
3220
3223
|
onFocus: _,
|
|
3221
3224
|
onBlur: p,
|
|
3222
3225
|
onKeydown: [
|
|
3223
|
-
withKeys(
|
|
3224
|
-
withKeys(
|
|
3226
|
+
withKeys(S, ["up"]),
|
|
3227
|
+
withKeys(x, ["down"]),
|
|
3225
3228
|
withKeys(withModifiers(D, ["prevent"]), ["enter"])
|
|
3226
3229
|
]
|
|
3227
3230
|
}, null, 40, _hoisted_2), [
|
|
3228
3231
|
[vModelText, e.query]
|
|
3229
3232
|
]),
|
|
3230
|
-
|
|
3233
|
+
r.value ? (openBlock(), createBlock(hrTable, {
|
|
3231
3234
|
key: 0,
|
|
3232
3235
|
ref_key: "table",
|
|
3233
3236
|
ref: a,
|
|
@@ -3236,9 +3239,9 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
3236
3239
|
loading: e.loading,
|
|
3237
3240
|
highlight: l.value,
|
|
3238
3241
|
columns: E.columns,
|
|
3239
|
-
onMousedown:
|
|
3240
|
-
onClick:
|
|
3241
|
-
onChange:
|
|
3242
|
+
onMousedown: c,
|
|
3243
|
+
onClick: d,
|
|
3244
|
+
onChange: v,
|
|
3242
3245
|
style: normalizeStyle({ top: i.y + "px", left: i.x + "px", width: i.w })
|
|
3243
3246
|
}, null, 8, ["modelValue", "loading", "highlight", "columns", "style"])) : createCommentVNode("", !0)
|
|
3244
3247
|
]));
|