gzhr-ui 1.1.14 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/index.mjs +1 -1
- package/dist/es/{table-C-phm-Yp.mjs → table-Bgvs7lgM.mjs} +1094 -937
- package/dist/index.css +1 -1
- package/dist/types/components/table/src/composables/useFixedColumnPanel.d.ts +13 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.js +32 -11
- package/package.json +1 -1
|
@@ -12,61 +12,61 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
emits: ["FilterSearch"],
|
|
15
|
-
setup(
|
|
16
|
-
const e =
|
|
17
|
-
var
|
|
18
|
-
const
|
|
19
|
-
return Array.isArray(
|
|
15
|
+
setup(a, { emit: l }) {
|
|
16
|
+
const e = a, r = l, i = ref(""), n = ref(""), t = ref(!1), o = ref(), u = ref(), d = ref(), c = computed(() => {
|
|
17
|
+
var k, w;
|
|
18
|
+
const h = ((w = (k = e.column.filters) == null ? void 0 : k[0]) == null ? void 0 : w.data) || [];
|
|
19
|
+
return Array.isArray(h) && h.length === 2 && h[0] && h[1] ? `${h[0]} 至 ${h[1]}` : "";
|
|
20
20
|
});
|
|
21
21
|
onMounted(() => {
|
|
22
|
-
var
|
|
23
|
-
const
|
|
24
|
-
Array.isArray(
|
|
22
|
+
var k, w;
|
|
23
|
+
const h = ((w = (k = e.column.filters) == null ? void 0 : k[0]) == null ? void 0 : w.data) || [];
|
|
24
|
+
Array.isArray(h) && h.length === 2 && (i.value = h[0] || "", n.value = h[1] || ""), document.addEventListener("click", s);
|
|
25
25
|
}), onBeforeUnmount(() => {
|
|
26
|
-
document.removeEventListener("click",
|
|
26
|
+
document.removeEventListener("click", s);
|
|
27
27
|
});
|
|
28
|
-
const
|
|
28
|
+
const f = () => {
|
|
29
29
|
t.value = !t.value;
|
|
30
|
-
},
|
|
31
|
-
var
|
|
30
|
+
}, s = (h) => {
|
|
31
|
+
var j, R;
|
|
32
32
|
if (!t.value) return;
|
|
33
|
-
const
|
|
34
|
-
w && w.contains(
|
|
33
|
+
const k = h.target, w = d.value, E = (R = (j = u.value) == null ? void 0 : j.popperRef) == null ? void 0 : R.contentRef;
|
|
34
|
+
w && w.contains(k) || E && E.contains(k) || (t.value = !1);
|
|
35
35
|
};
|
|
36
|
-
function
|
|
37
|
-
if (!
|
|
36
|
+
function _() {
|
|
37
|
+
if (!i.value && !n.value)
|
|
38
38
|
e.column.filters[0].data = [];
|
|
39
|
-
else if (!
|
|
39
|
+
else if (!i.value || !n.value) {
|
|
40
40
|
layer != null && layer.msg && layer.msg("请选择完整的时间范围");
|
|
41
41
|
return;
|
|
42
42
|
} else
|
|
43
|
-
e.column.filters[0].data = [
|
|
43
|
+
e.column.filters[0].data = [i.value, n.value];
|
|
44
44
|
t.value = !1, r("FilterSearch", e.column);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
|
|
46
|
+
function y() {
|
|
47
|
+
i.value = "", n.value = "", e.column.filters[0].data = [];
|
|
48
48
|
}
|
|
49
|
-
return (
|
|
49
|
+
return (h, k) => (openBlock(), createElementBlock("div", {
|
|
50
50
|
class: "size-full",
|
|
51
|
-
title:
|
|
51
|
+
title: c.value,
|
|
52
52
|
ref_key: "wrapperRef",
|
|
53
|
-
ref:
|
|
53
|
+
ref: d
|
|
54
54
|
}, [
|
|
55
55
|
createVNode(unref(ElInput), {
|
|
56
56
|
ref_key: "inputRef",
|
|
57
|
-
ref:
|
|
58
|
-
value:
|
|
57
|
+
ref: o,
|
|
58
|
+
value: c.value,
|
|
59
59
|
readonly: "",
|
|
60
|
-
onClick:
|
|
60
|
+
onClick: f
|
|
61
61
|
}, null, 8, ["value"]),
|
|
62
62
|
createVNode(unref(ElPopover), {
|
|
63
63
|
ref_key: "popoverRef",
|
|
64
64
|
ref: u,
|
|
65
|
-
"virtual-ref":
|
|
65
|
+
"virtual-ref": o.value,
|
|
66
66
|
"virtual-triggering": "",
|
|
67
67
|
trigger: "manual",
|
|
68
68
|
visible: t.value,
|
|
69
|
-
"onUpdate:visible":
|
|
69
|
+
"onUpdate:visible": k[2] || (k[2] = (w) => t.value = w),
|
|
70
70
|
"hide-after": 0,
|
|
71
71
|
width: "140",
|
|
72
72
|
"popper-class": "date-filter-popper"
|
|
@@ -74,8 +74,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
74
74
|
default: withCtx(() => [
|
|
75
75
|
createElementVNode("div", _hoisted_2$7, [
|
|
76
76
|
createVNode(unref(ElDatePicker), {
|
|
77
|
-
modelValue:
|
|
78
|
-
"onUpdate:modelValue":
|
|
77
|
+
modelValue: i.value,
|
|
78
|
+
"onUpdate:modelValue": k[0] || (k[0] = (w) => i.value = w),
|
|
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: n.value,
|
|
88
|
+
"onUpdate:modelValue": k[1] || (k[1] = (w) => n.value = w),
|
|
89
89
|
type: "date",
|
|
90
90
|
"value-format": "YYYY-MM-DD",
|
|
91
91
|
placeholder: "结束日期",
|
|
@@ -98,9 +98,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
98
98
|
size: "small",
|
|
99
99
|
type: "primary",
|
|
100
100
|
class: "btn-confirm",
|
|
101
|
-
onClick:
|
|
101
|
+
onClick: _
|
|
102
102
|
}, {
|
|
103
|
-
default: withCtx(() =>
|
|
103
|
+
default: withCtx(() => k[3] || (k[3] = [
|
|
104
104
|
createTextVNode(" 确认 ")
|
|
105
105
|
])),
|
|
106
106
|
_: 1
|
|
@@ -108,9 +108,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
108
108
|
createVNode(unref(ElButton), {
|
|
109
109
|
size: "small",
|
|
110
110
|
class: "btn-reset",
|
|
111
|
-
onClick:
|
|
111
|
+
onClick: y
|
|
112
112
|
}, {
|
|
113
|
-
default: withCtx(() =>
|
|
113
|
+
default: withCtx(() => k[4] || (k[4] = [
|
|
114
114
|
createTextVNode(" 重置 ")
|
|
115
115
|
])),
|
|
116
116
|
_: 1
|
|
@@ -131,31 +131,31 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
emits: ["FilterSearch"],
|
|
134
|
-
setup(
|
|
135
|
-
const e =
|
|
136
|
-
var
|
|
137
|
-
(
|
|
134
|
+
setup(a, { emit: l }) {
|
|
135
|
+
const e = a, r = ref([]), i = computed(() => e.column.filters[0].data.length ? e.column.filters[0].data.map((c) => c ? "是" : "否").join(",") : ""), n = ref(), t = ref(), o = () => {
|
|
136
|
+
var c, f;
|
|
137
|
+
(f = (c = unref(t).popperRef) == null ? void 0 : c.delayHide) == null || f.call(c);
|
|
138
138
|
}, u = l;
|
|
139
|
-
function
|
|
139
|
+
function d() {
|
|
140
140
|
r.value.length ? e.column.filters[0].data = [...r.value] : e.column.filters[0].data = [];
|
|
141
141
|
}
|
|
142
|
-
return (
|
|
142
|
+
return (c, f) => (openBlock(), createElementBlock("div", {
|
|
143
143
|
class: "size-full",
|
|
144
|
-
title:
|
|
144
|
+
title: i.value
|
|
145
145
|
}, [
|
|
146
146
|
withDirectives(createVNode(unref(ElInput), {
|
|
147
147
|
ref_key: "inputRef",
|
|
148
|
-
ref:
|
|
149
|
-
value:
|
|
148
|
+
ref: n,
|
|
149
|
+
value: i.value,
|
|
150
150
|
readonly: "",
|
|
151
|
-
onKeyup:
|
|
151
|
+
onKeyup: f[0] || (f[0] = withKeys((s) => u("FilterSearch", a.column), ["enter"]))
|
|
152
152
|
}, null, 8, ["value"]), [
|
|
153
|
-
[unref(ClickOutside),
|
|
153
|
+
[unref(ClickOutside), o]
|
|
154
154
|
]),
|
|
155
155
|
createVNode(unref(ElPopover), {
|
|
156
156
|
ref_key: "popoverRef",
|
|
157
157
|
ref: t,
|
|
158
|
-
"virtual-ref":
|
|
158
|
+
"virtual-ref": n.value,
|
|
159
159
|
trigger: "click",
|
|
160
160
|
"virtual-triggering": "",
|
|
161
161
|
"hide-after": 0
|
|
@@ -164,8 +164,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
164
164
|
createVNode(unref(ElCheckboxGroup), {
|
|
165
165
|
class: "flex flex-col",
|
|
166
166
|
modelValue: r.value,
|
|
167
|
-
"onUpdate:modelValue":
|
|
168
|
-
onChange:
|
|
167
|
+
"onUpdate:modelValue": f[1] || (f[1] = (s) => r.value = s),
|
|
168
|
+
onChange: d
|
|
169
169
|
}, {
|
|
170
170
|
default: withCtx(() => [
|
|
171
171
|
createVNode(unref(ElCheckbox), {
|
|
@@ -193,69 +193,69 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
195
|
emits: ["FilterSearch"],
|
|
196
|
-
setup(
|
|
197
|
-
const e =
|
|
196
|
+
setup(a, { emit: l }) {
|
|
197
|
+
const e = a, r = ref([]);
|
|
198
198
|
ref("");
|
|
199
|
-
const
|
|
200
|
-
var
|
|
201
|
-
return (
|
|
202
|
-
}).join(",") : ""),
|
|
203
|
-
var
|
|
204
|
-
(
|
|
199
|
+
const i = computed(() => e.column.filters && e.column.filters[0].data.length ? e.column.filters[0].data.map((c) => {
|
|
200
|
+
var f;
|
|
201
|
+
return (f = e.column.params.options.find((s) => s.value === c)) == null ? void 0 : f.label;
|
|
202
|
+
}).join(",") : ""), n = ref(), t = ref(), o = () => {
|
|
203
|
+
var c, f;
|
|
204
|
+
(f = (c = unref(t).popperRef) == null ? void 0 : c.delayHide) == null || f.call(c);
|
|
205
205
|
}, u = l;
|
|
206
|
-
function
|
|
206
|
+
function d() {
|
|
207
207
|
r.value.length ? e.column.filters[0].data = [...r.value] : e.column.filters[0].data = [];
|
|
208
208
|
}
|
|
209
|
-
return (
|
|
209
|
+
return (c, f) => (openBlock(), createElementBlock("div", {
|
|
210
210
|
class: "size-full",
|
|
211
|
-
title:
|
|
211
|
+
title: i.value
|
|
212
212
|
}, [
|
|
213
213
|
withDirectives(createVNode(unref(ElInput), {
|
|
214
214
|
ref_key: "inputRef",
|
|
215
|
-
ref:
|
|
216
|
-
value:
|
|
215
|
+
ref: n,
|
|
216
|
+
value: i.value,
|
|
217
217
|
readonly: "",
|
|
218
|
-
onKeyup:
|
|
218
|
+
onKeyup: f[0] || (f[0] = withKeys((s) => u("FilterSearch", a.column), ["enter"]))
|
|
219
219
|
}, null, 8, ["value"]), [
|
|
220
|
-
[unref(ClickOutside),
|
|
220
|
+
[unref(ClickOutside), o]
|
|
221
221
|
]),
|
|
222
222
|
createVNode(unref(ElPopover), {
|
|
223
223
|
ref_key: "popoverRef",
|
|
224
224
|
ref: t,
|
|
225
|
-
"virtual-ref":
|
|
225
|
+
"virtual-ref": n.value,
|
|
226
226
|
trigger: "click",
|
|
227
227
|
"virtual-triggering": "",
|
|
228
228
|
"hide-after": 0
|
|
229
229
|
}, {
|
|
230
230
|
default: withCtx(() => [
|
|
231
|
-
|
|
231
|
+
a.column.params.FieldType === "check" ? (openBlock(), createBlock(unref(ElCheckboxGroup), {
|
|
232
232
|
key: 0,
|
|
233
233
|
class: "flex flex-col",
|
|
234
234
|
modelValue: r.value,
|
|
235
|
-
"onUpdate:modelValue":
|
|
236
|
-
onChange:
|
|
235
|
+
"onUpdate:modelValue": f[1] || (f[1] = (s) => r.value = s),
|
|
236
|
+
onChange: d
|
|
237
237
|
}, {
|
|
238
238
|
default: withCtx(() => [
|
|
239
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
240
|
-
key:
|
|
241
|
-
label:
|
|
242
|
-
value:
|
|
239
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.column.params.options, (s) => (openBlock(), createBlock(unref(ElCheckbox), {
|
|
240
|
+
key: s.value,
|
|
241
|
+
label: s.label,
|
|
242
|
+
value: s.value
|
|
243
243
|
}, null, 8, ["label", "value"]))), 128))
|
|
244
244
|
]),
|
|
245
245
|
_: 1
|
|
246
246
|
}, 8, ["modelValue"])) : createCommentVNode("", !0),
|
|
247
|
-
|
|
247
|
+
a.column.params.FieldType === "select" ? (openBlock(), createBlock(unref(ElCheckboxGroup), {
|
|
248
248
|
key: 1,
|
|
249
249
|
class: "flex flex-col",
|
|
250
250
|
modelValue: r.value,
|
|
251
|
-
"onUpdate:modelValue":
|
|
252
|
-
onChange:
|
|
251
|
+
"onUpdate:modelValue": f[2] || (f[2] = (s) => r.value = s),
|
|
252
|
+
onChange: d
|
|
253
253
|
}, {
|
|
254
254
|
default: withCtx(() => [
|
|
255
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
256
|
-
key:
|
|
257
|
-
label:
|
|
258
|
-
value:
|
|
255
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.column.params.options, (s) => (openBlock(), createBlock(unref(ElCheckbox), {
|
|
256
|
+
key: s.value,
|
|
257
|
+
label: s.label,
|
|
258
|
+
value: s.value
|
|
259
259
|
}, null, 8, ["label", "value"]))), 128))
|
|
260
260
|
]),
|
|
261
261
|
_: 1
|
|
@@ -274,35 +274,35 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
274
274
|
}
|
|
275
275
|
},
|
|
276
276
|
emits: ["FilterSearch"],
|
|
277
|
-
setup(
|
|
278
|
-
const e =
|
|
277
|
+
setup(a, { emit: l }) {
|
|
278
|
+
const e = a, r = ref([]), i = ref(null), n = ref(e.column.params.FieldType === "TreeMultipleSelect"), t = 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: d, ParentNodeField: c, NodeKeyField: f } = e.column.params;
|
|
285
|
+
e.column.params.TreeData = buildTree(deepClone(d), c, f);
|
|
286
286
|
}
|
|
287
287
|
onMounted(() => {
|
|
288
288
|
r.value = e.column.params.TreeData;
|
|
289
289
|
});
|
|
290
|
-
const
|
|
290
|
+
const o = l;
|
|
291
291
|
function u() {
|
|
292
|
-
|
|
292
|
+
i.value ? e.column.filters[0].data = [i.value] : e.column.filters[0].data = [];
|
|
293
293
|
}
|
|
294
|
-
return (
|
|
294
|
+
return (d, c) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
295
295
|
clearable: "",
|
|
296
|
-
modelValue:
|
|
297
|
-
"onUpdate:modelValue":
|
|
296
|
+
modelValue: i.value,
|
|
297
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => i.value = f),
|
|
298
298
|
data: r.value,
|
|
299
299
|
"render-after-expand": !1,
|
|
300
300
|
placeholder: "",
|
|
301
301
|
onChange: u,
|
|
302
|
-
multiple:
|
|
303
|
-
"show-checkbox":
|
|
302
|
+
multiple: n.value,
|
|
303
|
+
"show-checkbox": n.value,
|
|
304
304
|
props: t.value,
|
|
305
|
-
onKeyup:
|
|
305
|
+
onKeyup: c[1] || (c[1] = withKeys((f) => o("FilterSearch", a.column), ["enter"]))
|
|
306
306
|
}, null, 8, ["modelValue", "data", "multiple", "show-checkbox", "props"]));
|
|
307
307
|
}
|
|
308
308
|
}, _sfc_main$v = {
|
|
@@ -314,40 +314,40 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
314
314
|
}
|
|
315
315
|
},
|
|
316
316
|
emits: ["FilterSearch"],
|
|
317
|
-
setup(
|
|
318
|
-
const e =
|
|
317
|
+
setup(a, { emit: l }) {
|
|
318
|
+
const e = a, r = ref([]), i = ref([]), n = 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: d, ParentNodeField: c, NodeKeyField: f } = e.column.params;
|
|
325
|
+
e.column.params.TreeData = buildTree(deepClone(d), c, f);
|
|
326
326
|
}
|
|
327
327
|
onMounted(() => {
|
|
328
328
|
r.value = e.column.params.TreeData;
|
|
329
329
|
});
|
|
330
330
|
const t = l;
|
|
331
|
-
function
|
|
332
|
-
|
|
331
|
+
function o() {
|
|
332
|
+
i.value ? e.column.filters[0].data = i.value : e.column.filters[0].data = [];
|
|
333
333
|
}
|
|
334
|
-
function u(
|
|
334
|
+
function u(d) {
|
|
335
335
|
cleanUpTreeFilterRows(), t("FilterSearch", e.column);
|
|
336
336
|
}
|
|
337
|
-
return (
|
|
337
|
+
return (d, c) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
338
338
|
"popper-class": "tree-filter-row",
|
|
339
339
|
clearable: "",
|
|
340
|
-
modelValue:
|
|
341
|
-
"onUpdate:modelValue":
|
|
340
|
+
modelValue: i.value,
|
|
341
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => i.value = f),
|
|
342
342
|
data: r.value,
|
|
343
343
|
placeholder: "",
|
|
344
|
-
onChange:
|
|
344
|
+
onChange: o,
|
|
345
345
|
multiple: "",
|
|
346
346
|
"show-checkbox": "",
|
|
347
347
|
"collapse-tags": "",
|
|
348
348
|
"collapse-tags-tooltip": "",
|
|
349
349
|
onKeyup: withKeys(u, ["enter"]),
|
|
350
|
-
props:
|
|
350
|
+
props: n.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 = {
|
|
@@ -359,12 +359,12 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
359
359
|
}
|
|
360
360
|
},
|
|
361
361
|
emits: ["FilterSearch"],
|
|
362
|
-
setup(
|
|
363
|
-
const e =
|
|
364
|
-
var
|
|
365
|
-
(
|
|
362
|
+
setup(a, { emit: l }) {
|
|
363
|
+
const e = a, r = ref([null, null]), i = computed(() => e.column.filters && e.column.filters[0].data.length ? e.column.filters[0].data.join(" 至 ") : ""), n = ref(), t = ref(), o = () => {
|
|
364
|
+
var f, s;
|
|
365
|
+
(s = (f = unref(t).popperRef) == null ? void 0 : f.delayHide) == null || s.call(f);
|
|
366
366
|
}, u = l;
|
|
367
|
-
function
|
|
367
|
+
function d() {
|
|
368
368
|
if (!r.value[0] && !r.value[1])
|
|
369
369
|
e.column.filters[0].data = [];
|
|
370
370
|
else if (!r.value[0] || !r.value[1]) {
|
|
@@ -374,26 +374,26 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
374
374
|
e.column.filters[0].data = [...r.value];
|
|
375
375
|
t.value.hide(), u("FilterSearch", e.column);
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function c() {
|
|
378
378
|
r.value = [null, null];
|
|
379
379
|
}
|
|
380
|
-
return (
|
|
380
|
+
return (f, s) => (openBlock(), createElementBlock("div", {
|
|
381
381
|
class: "size-full",
|
|
382
|
-
title:
|
|
382
|
+
title: i.value
|
|
383
383
|
}, [
|
|
384
384
|
withDirectives(createVNode(unref(ElInput), {
|
|
385
385
|
ref_key: "inputRef",
|
|
386
|
-
ref:
|
|
387
|
-
value:
|
|
386
|
+
ref: n,
|
|
387
|
+
value: i.value,
|
|
388
388
|
readonly: "",
|
|
389
|
-
onKeyup:
|
|
389
|
+
onKeyup: s[0] || (s[0] = withKeys((_) => u("FilterSearch", a.column), ["enter"]))
|
|
390
390
|
}, null, 8, ["value"]), [
|
|
391
|
-
[unref(ClickOutside),
|
|
391
|
+
[unref(ClickOutside), o]
|
|
392
392
|
]),
|
|
393
393
|
createVNode(unref(ElPopover), {
|
|
394
394
|
ref_key: "popoverRef",
|
|
395
395
|
ref: t,
|
|
396
|
-
"virtual-ref":
|
|
396
|
+
"virtual-ref": n.value,
|
|
397
397
|
trigger: "click",
|
|
398
398
|
"virtual-triggering": "",
|
|
399
399
|
"hide-after": 0
|
|
@@ -403,30 +403,30 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
403
403
|
createVNode(unref(ElInputNumber), {
|
|
404
404
|
class: "w-full",
|
|
405
405
|
modelValue: r.value[0],
|
|
406
|
-
"onUpdate:modelValue":
|
|
406
|
+
"onUpdate:modelValue": s[1] || (s[1] = (_) => r.value[0] = _)
|
|
407
407
|
}, null, 8, ["modelValue"]),
|
|
408
408
|
createVNode(unref(ElInputNumber), {
|
|
409
409
|
class: "w-full",
|
|
410
410
|
modelValue: r.value[1],
|
|
411
|
-
"onUpdate:modelValue":
|
|
411
|
+
"onUpdate:modelValue": s[2] || (s[2] = (_) => r.value[1] = _)
|
|
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: d
|
|
419
419
|
}, {
|
|
420
|
-
default: withCtx(() =>
|
|
420
|
+
default: withCtx(() => s[3] || (s[3] = [
|
|
421
421
|
createTextVNode("确认")
|
|
422
422
|
])),
|
|
423
423
|
_: 1
|
|
424
424
|
}),
|
|
425
425
|
createVNode(unref(ElButton), {
|
|
426
426
|
size: "small",
|
|
427
|
-
onClick:
|
|
427
|
+
onClick: c
|
|
428
428
|
}, {
|
|
429
|
-
default: withCtx(() =>
|
|
429
|
+
default: withCtx(() => s[4] || (s[4] = [
|
|
430
430
|
createTextVNode("重置")
|
|
431
431
|
])),
|
|
432
432
|
_: 1
|
|
@@ -453,66 +453,66 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
453
453
|
}
|
|
454
454
|
},
|
|
455
455
|
emits: ["FilterSearch", "SortChange"],
|
|
456
|
-
setup(
|
|
457
|
-
const e =
|
|
458
|
-
let
|
|
456
|
+
setup(a, { emit: l }) {
|
|
457
|
+
const e = a, r = ref([]);
|
|
458
|
+
let i = ref(0);
|
|
459
459
|
onMounted(() => {
|
|
460
460
|
if (e.column.params.filter) {
|
|
461
461
|
const u = document.querySelector(`[colid=${e.column.id}]`);
|
|
462
|
-
useElementClientSize(u, ({ clientHeight:
|
|
463
|
-
|
|
462
|
+
useElementClientSize(u, ({ clientHeight: d }) => {
|
|
463
|
+
i.value = d <= 40 ? 65 : d;
|
|
464
464
|
});
|
|
465
465
|
} else
|
|
466
|
-
|
|
466
|
+
i.value = 23;
|
|
467
467
|
r.value = e.column.params.TreeData;
|
|
468
468
|
});
|
|
469
|
-
const
|
|
469
|
+
const n = l;
|
|
470
470
|
function t(u) {
|
|
471
471
|
if (u === "search") {
|
|
472
|
-
const
|
|
473
|
-
|
|
472
|
+
const d = e.gridRef.getColumns();
|
|
473
|
+
n("FilterSearch", e.column, d);
|
|
474
474
|
} else if (u === "clear") {
|
|
475
|
-
e.column.filters.forEach((
|
|
476
|
-
Array.isArray(
|
|
475
|
+
e.column.filters.forEach((c) => {
|
|
476
|
+
Array.isArray(c.data) ? c.data = [] : c.data = "";
|
|
477
477
|
});
|
|
478
|
-
const
|
|
479
|
-
|
|
478
|
+
const d = e.gridRef.getColumns();
|
|
479
|
+
n("FilterSearch", e.column, d);
|
|
480
480
|
} else if (u === "clearAll") {
|
|
481
|
-
const
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
Array.isArray(
|
|
481
|
+
const d = e.gridRef.getColumns();
|
|
482
|
+
d.forEach((c) => {
|
|
483
|
+
c.filters && c.filters.forEach((f) => {
|
|
484
|
+
Array.isArray(f.data) ? f.data = [] : f.data = "";
|
|
485
485
|
});
|
|
486
|
-
}),
|
|
486
|
+
}), n("FilterSearch", e.column, d);
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
function
|
|
490
|
-
var u,
|
|
491
|
-
(u = e.column.params) != null && u.IsVirtualField || ((
|
|
489
|
+
function o() {
|
|
490
|
+
var u, d;
|
|
491
|
+
(u = e.column.params) != null && u.IsVirtualField || ((d = e.column).params ?? (d.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", n("SortChange", e.column, e.gridRef.getColumns()));
|
|
492
492
|
}
|
|
493
|
-
return (u,
|
|
494
|
-
var
|
|
493
|
+
return (u, d) => {
|
|
494
|
+
var c, f, s;
|
|
495
495
|
return openBlock(), createElementBlock("div", {
|
|
496
496
|
class: "flex flex-col filter-header",
|
|
497
|
-
title:
|
|
498
|
-
style: normalizeStyle({ height: unref(
|
|
497
|
+
title: a.column.title,
|
|
498
|
+
style: normalizeStyle({ height: unref(i) ? unref(i) + "px" : void 0 })
|
|
499
499
|
}, [
|
|
500
500
|
createElementVNode("div", {
|
|
501
|
-
class: normalizeClass(["filter-title h-full lh-9 flex justify-center items-center gap-1", { "filter-title-border": (
|
|
502
|
-
onClick:
|
|
501
|
+
class: normalizeClass(["filter-title h-full lh-9 flex justify-center items-center gap-1", { "filter-title-border": (c = a.column.params) == null ? void 0 : c.filter }]),
|
|
502
|
+
onClick: o
|
|
503
503
|
}, [
|
|
504
504
|
createElementVNode("span", {
|
|
505
|
-
style: normalizeStyle({ color:
|
|
505
|
+
style: normalizeStyle({ color: a.column.params.Required ? "red" : "" }),
|
|
506
506
|
class: "whitespace-nowrap overflow-hidden text-ellipsis"
|
|
507
|
-
}, toDisplayString(
|
|
508
|
-
(
|
|
507
|
+
}, toDisplayString(a.column.title), 5),
|
|
508
|
+
(f = a.column.params) != null && f.sortable && ((s = a.column.params) != null && s.sortStatus) ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
|
509
509
|
default: withCtx(() => {
|
|
510
|
-
var
|
|
510
|
+
var _, y;
|
|
511
511
|
return [
|
|
512
|
-
((
|
|
512
|
+
((_ = a.column.params) == null ? void 0 : _.sortStatus) === "asc" ? (openBlock(), createBlock(unref(HrIcon), {
|
|
513
513
|
key: 0,
|
|
514
514
|
icon: "ep:caret-top"
|
|
515
|
-
})) : ((
|
|
515
|
+
})) : ((y = a.column.params) == null ? void 0 : y.sortStatus) === "desc" ? (openBlock(), createBlock(unref(HrIcon), {
|
|
516
516
|
key: 1,
|
|
517
517
|
icon: "ep:caret-bottom"
|
|
518
518
|
})) : createCommentVNode("", !0)
|
|
@@ -521,37 +521,37 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
521
521
|
_: 1
|
|
522
522
|
})) : createCommentVNode("", !0)
|
|
523
523
|
], 2),
|
|
524
|
-
|
|
525
|
-
["radio_Table", "bool"].includes(
|
|
524
|
+
a.column.params.filter ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
|
|
525
|
+
["radio_Table", "bool"].includes(a.column.params.FieldType) ? (openBlock(), createBlock(_sfc_main$y, {
|
|
526
526
|
key: 0,
|
|
527
|
-
column:
|
|
528
|
-
onFilterSearch:
|
|
529
|
-
}, null, 8, ["column"])) : ["select", "check"].includes(
|
|
527
|
+
column: a.column,
|
|
528
|
+
onFilterSearch: d[0] || (d[0] = (_) => t("search"))
|
|
529
|
+
}, null, 8, ["column"])) : ["select", "check"].includes(a.column.params.FieldType) ? (openBlock(), createBlock(_sfc_main$x, {
|
|
530
530
|
key: 1,
|
|
531
|
-
column:
|
|
532
|
-
onFilterSearch:
|
|
533
|
-
}, null, 8, ["column"])) :
|
|
531
|
+
column: a.column,
|
|
532
|
+
onFilterSearch: d[1] || (d[1] = (_) => t("search"))
|
|
533
|
+
}, null, 8, ["column"])) : a.column.params.FieldType === "date" ? (openBlock(), createBlock(FilterDate, {
|
|
534
534
|
key: 2,
|
|
535
|
-
column:
|
|
536
|
-
onFilterSearch:
|
|
537
|
-
}, null, 8, ["column"])) :
|
|
535
|
+
column: a.column,
|
|
536
|
+
onFilterSearch: d[2] || (d[2] = (_) => t("search"))
|
|
537
|
+
}, null, 8, ["column"])) : a.column.params.FieldType === "tree" ? (openBlock(), createBlock(_sfc_main$w, {
|
|
538
538
|
key: 3,
|
|
539
|
-
column:
|
|
540
|
-
onFilterSearch:
|
|
541
|
-
}, null, 8, ["column"])) :
|
|
539
|
+
column: a.column,
|
|
540
|
+
onFilterSearch: d[3] || (d[3] = (_) => t("search"))
|
|
541
|
+
}, null, 8, ["column"])) : a.column.params.FieldType === "TreeMultipleSelect" ? (openBlock(), createBlock(_sfc_main$v, {
|
|
542
542
|
key: 4,
|
|
543
|
-
column:
|
|
544
|
-
onFilterSearch:
|
|
545
|
-
}, null, 8, ["column"])) :
|
|
543
|
+
column: a.column,
|
|
544
|
+
onFilterSearch: d[4] || (d[4] = (_) => t("search"))
|
|
545
|
+
}, null, 8, ["column"])) : a.column.params.FieldType === "inputNumber" ? (openBlock(), createBlock(_sfc_main$u, {
|
|
546
546
|
key: 5,
|
|
547
|
-
column:
|
|
548
|
-
onFilterSearch:
|
|
549
|
-
}, null, 8, ["column"])) : (openBlock(!0), createElementBlock(Fragment, { key: 6 }, renderList(
|
|
550
|
-
key:
|
|
551
|
-
modelValue:
|
|
552
|
-
"onUpdate:modelValue": (
|
|
553
|
-
onKeyup:
|
|
554
|
-
disabled: ["colorPicker", "iconPicker", "progress"].includes(
|
|
547
|
+
column: a.column,
|
|
548
|
+
onFilterSearch: d[5] || (d[5] = (_) => t("search"))
|
|
549
|
+
}, null, 8, ["column"])) : (openBlock(!0), createElementBlock(Fragment, { key: 6 }, renderList(a.column.filters, (_, y) => (openBlock(), createBlock(unref(ElInput), {
|
|
550
|
+
key: y,
|
|
551
|
+
modelValue: _.data,
|
|
552
|
+
"onUpdate:modelValue": (h) => _.data = h,
|
|
553
|
+
onKeyup: d[6] || (d[6] = withKeys((h) => t("search"), ["enter"])),
|
|
554
|
+
disabled: ["colorPicker", "iconPicker", "progress"].includes(a.column.params.FieldType)
|
|
555
555
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"]))), 128)),
|
|
556
556
|
createVNode(unref(ElDropdown), {
|
|
557
557
|
class: "pr2 pt1",
|
|
@@ -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(() => d[7] || (d[7] = [
|
|
567
567
|
createTextVNode("执行查询")
|
|
568
568
|
])),
|
|
569
569
|
_: 1
|
|
570
570
|
}),
|
|
571
571
|
createVNode(unref(ElDropdownItem), { command: "clear" }, {
|
|
572
|
-
default: withCtx(() =>
|
|
572
|
+
default: withCtx(() => d[8] || (d[8] = [
|
|
573
573
|
createTextVNode("清除当前条件")
|
|
574
574
|
])),
|
|
575
575
|
_: 1
|
|
576
576
|
}),
|
|
577
577
|
createVNode(unref(ElDropdownItem), { command: "clearAll" }, {
|
|
578
|
-
default: withCtx(() =>
|
|
578
|
+
default: withCtx(() => d[9] || (d[9] = [
|
|
579
579
|
createTextVNode("清除所有条件")
|
|
580
580
|
])),
|
|
581
581
|
_: 1
|
|
@@ -623,16 +623,16 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
623
623
|
}
|
|
624
624
|
},
|
|
625
625
|
emits: ["change", "ActionClick", "ActionRenderBefore"],
|
|
626
|
-
setup(
|
|
627
|
-
const e =
|
|
626
|
+
setup(a, { emit: l }) {
|
|
627
|
+
const e = a;
|
|
628
628
|
let r = ref(
|
|
629
629
|
deepClone(e.column.params.LinkButton ? e.column.params.LinkButton : [])
|
|
630
630
|
);
|
|
631
|
-
const
|
|
631
|
+
const i = l;
|
|
632
632
|
watch(
|
|
633
633
|
() => e.row,
|
|
634
634
|
() => {
|
|
635
|
-
|
|
635
|
+
i("ActionRenderBefore", {
|
|
636
636
|
row: e.row,
|
|
637
637
|
column: e.column,
|
|
638
638
|
gridRef: e.gridRef,
|
|
@@ -644,20 +644,20 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
644
644
|
immediate: !0
|
|
645
645
|
}
|
|
646
646
|
);
|
|
647
|
-
function
|
|
648
|
-
|
|
647
|
+
function n(t) {
|
|
648
|
+
i("ActionClick", {
|
|
649
649
|
btnInfo: t,
|
|
650
650
|
row: e.row,
|
|
651
651
|
column: e.column,
|
|
652
652
|
gridRef: e.gridRef
|
|
653
653
|
});
|
|
654
654
|
}
|
|
655
|
-
return (t,
|
|
655
|
+
return (t, o) => (openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
656
656
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(r), (u) => withDirectives((openBlock(), createBlock(unref(ElButton), {
|
|
657
657
|
key: u.Name,
|
|
658
658
|
class: "!text-[12px]",
|
|
659
659
|
link: "",
|
|
660
|
-
onClick: (
|
|
660
|
+
onClick: (d) => n(u)
|
|
661
661
|
}, {
|
|
662
662
|
default: withCtx(() => [
|
|
663
663
|
createTextVNode(toDisplayString(u.Name), 1)
|
|
@@ -690,22 +690,22 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
690
690
|
}
|
|
691
691
|
},
|
|
692
692
|
emits: ["change"],
|
|
693
|
-
setup(
|
|
694
|
-
const e =
|
|
693
|
+
setup(a, { emit: l }) {
|
|
694
|
+
const e = a, r = ref(!!e.row[e.column.field]);
|
|
695
695
|
watchEffect(() => {
|
|
696
696
|
typeof e.row[e.column.field] != "boolean" ? r.value = !!e.row[e.column.field] : r.value = e.row[e.column.field];
|
|
697
697
|
});
|
|
698
|
-
const
|
|
699
|
-
function
|
|
700
|
-
|
|
698
|
+
const i = l;
|
|
699
|
+
function n(t, o, u) {
|
|
700
|
+
o[u.field] = t, i("change", t, o, u);
|
|
701
701
|
}
|
|
702
|
-
return (t,
|
|
702
|
+
return (t, o) => {
|
|
703
703
|
var u;
|
|
704
704
|
return openBlock(), createBlock(unref(ElCheckbox), {
|
|
705
|
-
disabled: (u =
|
|
705
|
+
disabled: (u = a.column.params) == null ? void 0 : u.disabled,
|
|
706
706
|
modelValue: r.value,
|
|
707
|
-
"onUpdate:modelValue":
|
|
708
|
-
onChange:
|
|
707
|
+
"onUpdate:modelValue": o[0] || (o[0] = (d) => r.value = d),
|
|
708
|
+
onChange: o[1] || (o[1] = (d) => n(d, a.row, a.column))
|
|
709
709
|
}, null, 8, ["disabled", "modelValue"]);
|
|
710
710
|
};
|
|
711
711
|
}
|
|
@@ -742,119 +742,119 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
742
742
|
},
|
|
743
743
|
displayValue: String
|
|
744
744
|
},
|
|
745
|
-
setup(
|
|
746
|
-
const l =
|
|
745
|
+
setup(a) {
|
|
746
|
+
const l = a;
|
|
747
747
|
l.column.params.LabelConfig || (l.column.params.LabelConfig = []);
|
|
748
748
|
const e = ref(l.column.params.LabelConfig);
|
|
749
|
-
e.value.forEach((
|
|
750
|
-
|
|
749
|
+
e.value.forEach((c) => {
|
|
750
|
+
c.Value == "true" ? c.Value = !0 : c.Value == "false" && (c.Value = !1);
|
|
751
751
|
});
|
|
752
|
-
const r = computed(() => l.row[l.column.field]),
|
|
752
|
+
const r = computed(() => l.row[l.column.field]), i = computed(() => e.value.find((c) => c.Value == r.value));
|
|
753
753
|
onMounted(() => {
|
|
754
|
-
l.column.params.LabelAutoColor && !
|
|
754
|
+
l.column.params.LabelAutoColor && !i.value && (r.value || r.value === 0) && e.value.push({
|
|
755
755
|
Value: r.value,
|
|
756
|
-
Color:
|
|
756
|
+
Color: d()
|
|
757
757
|
});
|
|
758
758
|
});
|
|
759
|
-
function
|
|
760
|
-
if (!
|
|
761
|
-
let
|
|
762
|
-
if (
|
|
763
|
-
|
|
764
|
-
else if (
|
|
765
|
-
const
|
|
766
|
-
|
|
767
|
-
} else if (
|
|
768
|
-
const
|
|
769
|
-
if (
|
|
770
|
-
const
|
|
771
|
-
if (
|
|
772
|
-
|
|
759
|
+
function n(c) {
|
|
760
|
+
if (!c) return;
|
|
761
|
+
let f, s, _, y = 1;
|
|
762
|
+
if (c.startsWith("#"))
|
|
763
|
+
c = c.slice(1), c.length === 3 ? (f = parseInt(c[0] + c[0], 16), s = parseInt(c[1] + c[1], 16), _ = parseInt(c[2] + c[2], 16)) : c.length === 6 && (f = parseInt(c.slice(0, 2), 16), s = parseInt(c.slice(2, 4), 16), _ = parseInt(c.slice(4, 6), 16));
|
|
764
|
+
else if (c.startsWith("rgb")) {
|
|
765
|
+
const h = c.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);
|
|
766
|
+
h && (f = parseInt(h[1]), s = parseInt(h[2]), _ = parseInt(h[3]), h[4] && (y = parseFloat(h[4])));
|
|
767
|
+
} else if (c.startsWith("hsl")) {
|
|
768
|
+
const h = c.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%(?:,\s*(\d*\.?\d+))?\)/);
|
|
769
|
+
if (h) {
|
|
770
|
+
const k = parseInt(h[1]) / 360, w = parseInt(h[2]) / 100, E = parseInt(h[3]) / 100;
|
|
771
|
+
if (h[4] && (y = parseFloat(h[4])), w === 0)
|
|
772
|
+
f = s = _ = E * 255;
|
|
773
773
|
else {
|
|
774
|
-
const
|
|
775
|
-
|
|
774
|
+
const j = (S, D, F) => (F < 0 && (F += 1), F > 1 && (F -= 1), F < 0.16666666666666666 ? S + (D - S) * 6 * F : F < 0.5 ? D : F < 0.6666666666666666 ? S + (D - S) * (0.6666666666666666 - F) * 6 : S), R = E < 0.5 ? E * (1 + w) : E + w - E * w, C = 2 * E - R;
|
|
775
|
+
f = j(C, R, k + 1 / 3) * 255, s = j(C, R, k) * 255, _ = j(C, R, k - 1 / 3) * 255;
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
|
-
return { r:
|
|
780
|
-
}
|
|
781
|
-
function t(
|
|
782
|
-
|
|
783
|
-
const
|
|
784
|
-
let
|
|
785
|
-
if (
|
|
786
|
-
|
|
779
|
+
return { r: f, g: s, b: _, a: y };
|
|
780
|
+
}
|
|
781
|
+
function t(c, f, s) {
|
|
782
|
+
c /= 255, f /= 255, s /= 255;
|
|
783
|
+
const _ = Math.max(c, f, s), y = Math.min(c, f, s);
|
|
784
|
+
let h, k, w = (_ + y) / 2;
|
|
785
|
+
if (_ === y)
|
|
786
|
+
h = k = 0;
|
|
787
787
|
else {
|
|
788
|
-
const
|
|
789
|
-
switch (
|
|
790
|
-
case
|
|
791
|
-
|
|
788
|
+
const E = _ - y;
|
|
789
|
+
switch (k = w > 0.5 ? E / (2 - _ - y) : E / (_ + y), _) {
|
|
790
|
+
case c:
|
|
791
|
+
h = (f - s) / E + (f < s ? 6 : 0);
|
|
792
792
|
break;
|
|
793
|
-
case
|
|
794
|
-
|
|
793
|
+
case f:
|
|
794
|
+
h = (s - c) / E + 2;
|
|
795
795
|
break;
|
|
796
|
-
case
|
|
797
|
-
|
|
796
|
+
case s:
|
|
797
|
+
h = (c - f) / E + 4;
|
|
798
798
|
break;
|
|
799
799
|
}
|
|
800
|
-
|
|
800
|
+
h /= 6;
|
|
801
801
|
}
|
|
802
|
-
return { h
|
|
802
|
+
return { h, s: k, l: w };
|
|
803
803
|
}
|
|
804
|
-
function
|
|
805
|
-
let
|
|
806
|
-
if (
|
|
807
|
-
|
|
804
|
+
function o(c, f, s) {
|
|
805
|
+
let _, y, h;
|
|
806
|
+
if (f === 0)
|
|
807
|
+
_ = y = h = s;
|
|
808
808
|
else {
|
|
809
|
-
const
|
|
810
|
-
|
|
809
|
+
const k = (j, R, C) => (C < 0 && (C += 1), C > 1 && (C -= 1), C < 0.16666666666666666 ? j + (R - j) * 6 * C : C < 0.5 ? R : C < 0.6666666666666666 ? j + (R - j) * (0.6666666666666666 - C) * 6 : j), w = s < 0.5 ? s * (1 + f) : s + f - s * f, E = 2 * s - w;
|
|
810
|
+
_ = k(E, w, c + 1 / 3), y = k(E, w, c), h = k(E, w, c - 1 / 3);
|
|
811
811
|
}
|
|
812
|
-
return { r: Math.round(
|
|
813
|
-
}
|
|
814
|
-
function u(
|
|
815
|
-
if (!
|
|
816
|
-
let { r:
|
|
817
|
-
w = Math.max(0, w -
|
|
818
|
-
const { r:
|
|
819
|
-
return `rgb(${
|
|
820
|
-
}
|
|
821
|
-
function
|
|
822
|
-
function
|
|
823
|
-
return Math.floor(Math.random() * (
|
|
812
|
+
return { r: Math.round(_ * 255), g: Math.round(y * 255), b: Math.round(h * 255) };
|
|
813
|
+
}
|
|
814
|
+
function u(c, f) {
|
|
815
|
+
if (!c) return;
|
|
816
|
+
let { r: s, g: _, b: y } = n(c), { h, s: k, l: w } = t(s, _, y);
|
|
817
|
+
w = Math.max(0, w - f);
|
|
818
|
+
const { r: E, g: j, b: R } = o(h, k, w);
|
|
819
|
+
return `rgb(${E}, ${j}, ${R})`;
|
|
820
|
+
}
|
|
821
|
+
function d() {
|
|
822
|
+
function c(h, k) {
|
|
823
|
+
return Math.floor(Math.random() * (k - h + 1)) + h;
|
|
824
824
|
}
|
|
825
|
-
const
|
|
826
|
-
return `#${
|
|
825
|
+
const f = c(200, 255), s = c(200, 255), _ = c(200, 255);
|
|
826
|
+
return `#${f.toString(16).padStart(2, "0")}${s.toString(16).padStart(2, "0")}${_.toString(16).padStart(2, "0")}`;
|
|
827
827
|
}
|
|
828
|
-
return (
|
|
829
|
-
const
|
|
828
|
+
return (c, f) => {
|
|
829
|
+
const s = resolveComponent("hr-icon");
|
|
830
830
|
return r.value ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
831
|
-
|
|
831
|
+
i.value ? (openBlock(), createBlock(unref(ElTag), {
|
|
832
832
|
key: 0,
|
|
833
|
-
color:
|
|
833
|
+
color: i.value.Color,
|
|
834
834
|
size: "small",
|
|
835
|
-
style: normalizeStyle({ borderColor: u(
|
|
835
|
+
style: normalizeStyle({ borderColor: u(i.value.Color, "0.03") })
|
|
836
836
|
}, {
|
|
837
837
|
default: withCtx(() => [
|
|
838
|
-
|
|
838
|
+
i.value.LeftIcon ? (openBlock(), createBlock(s, {
|
|
839
839
|
key: 0,
|
|
840
840
|
class: "mr0.25 v-middle mt0.15",
|
|
841
841
|
size: "13",
|
|
842
|
-
color: u(
|
|
843
|
-
icon:
|
|
842
|
+
color: u(i.value.Color, "0.3"),
|
|
843
|
+
icon: i.value.LeftIcon
|
|
844
844
|
}, null, 8, ["color", "icon"])) : createCommentVNode("", !0),
|
|
845
|
-
createElementVNode("span", _hoisted_2$4, toDisplayString(
|
|
846
|
-
|
|
845
|
+
createElementVNode("span", _hoisted_2$4, toDisplayString(a.displayValue === void 0 ? r.value : a.displayValue), 1),
|
|
846
|
+
i.value.RightIcon ? (openBlock(), createBlock(s, {
|
|
847
847
|
key: 1,
|
|
848
848
|
class: "ml0.25 v-middle mt0.15",
|
|
849
849
|
size: "13",
|
|
850
|
-
color: u(
|
|
851
|
-
icon:
|
|
850
|
+
color: u(i.value.Color, "0.3"),
|
|
851
|
+
icon: i.value.RightIcon
|
|
852
852
|
}, null, 8, ["color", "icon"])) : createCommentVNode("", !0)
|
|
853
853
|
]),
|
|
854
854
|
_: 1
|
|
855
855
|
}, 8, ["color", "style"])) : createCommentVNode("", !0),
|
|
856
|
-
withDirectives(createElementVNode("span", null, toDisplayString(
|
|
857
|
-
[vShow, !
|
|
856
|
+
withDirectives(createElementVNode("span", null, toDisplayString(a.displayValue === void 0 ? r.value : a.displayValue), 513), [
|
|
857
|
+
[vShow, !i.value]
|
|
858
858
|
])
|
|
859
859
|
])) : (openBlock(), createElementBlock("div", _hoisted_3$2));
|
|
860
860
|
};
|
|
@@ -883,33 +883,33 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
883
883
|
emits: ["change"],
|
|
884
884
|
setup(__props, { emit: __emit }) {
|
|
885
885
|
const props = __props, value = computed(() => props.row[props.column.field]), emit = __emit;
|
|
886
|
-
function handleChange(
|
|
887
|
-
emit("change",
|
|
886
|
+
function handleChange(a, l, e) {
|
|
887
|
+
emit("change", a, l, e);
|
|
888
888
|
}
|
|
889
889
|
function handleChoose(row, column, gridRef) {
|
|
890
|
-
var
|
|
890
|
+
var a;
|
|
891
891
|
let result;
|
|
892
892
|
if (emit("onChooseBefor-Click", column, (l) => {
|
|
893
893
|
result = l;
|
|
894
|
-
}), !result || (
|
|
894
|
+
}), !result || (a = column.params) != null && a.disabled) return;
|
|
895
895
|
let { ChoosePageType, ChoosePageOID, StoredValueField, ReturnValueField, URLParamsObject, URLParamsHook } = props.column.params, urlParams = {}, selectedData = [], layerOptions = {};
|
|
896
896
|
URLParamsObject && Object.assign(urlParams, URLParamsObject), URLParamsHook && Object.assign(urlParams, eval(
|
|
897
897
|
`(function(urlParams, selectedData, layerOptions, row, column){
|
|
898
898
|
return eval((${URLParamsHook})(urlParams, selectedData, layerOptions, row, column))
|
|
899
899
|
}).call(gridRef)`
|
|
900
900
|
)), ChoosePageType === "autoPage" ? openAutoPage(ChoosePageOID, (l, e) => {
|
|
901
|
-
isEmpty(StoredValueField) || isEmpty(ReturnValueField) || (Array.isArray(StoredValueField) || (StoredValueField = [StoredValueField]), Array.isArray(ReturnValueField) || (ReturnValueField = [ReturnValueField]), StoredValueField.forEach((r,
|
|
902
|
-
var
|
|
903
|
-
return row[r] = ((
|
|
901
|
+
isEmpty(StoredValueField) || isEmpty(ReturnValueField) || (Array.isArray(StoredValueField) || (StoredValueField = [StoredValueField]), Array.isArray(ReturnValueField) || (ReturnValueField = [ReturnValueField]), StoredValueField.forEach((r, i) => {
|
|
902
|
+
var n;
|
|
903
|
+
return row[r] = ((n = e[ReturnValueField[i]]) == null ? void 0 : n.join(",")) || null;
|
|
904
904
|
}), handleChange(row[column.field], row, column));
|
|
905
905
|
}, urlParams) : openChoosePage(ChoosePageOID, (l, e) => {
|
|
906
|
-
isEmpty(StoredValueField) || isEmpty(ReturnValueField) || (Array.isArray(StoredValueField) || (StoredValueField = [StoredValueField]), Array.isArray(ReturnValueField) || (ReturnValueField = [ReturnValueField]), StoredValueField.forEach((r,
|
|
907
|
-
var
|
|
908
|
-
return row[r] = ((
|
|
906
|
+
isEmpty(StoredValueField) || isEmpty(ReturnValueField) || (Array.isArray(StoredValueField) || (StoredValueField = [StoredValueField]), Array.isArray(ReturnValueField) || (ReturnValueField = [ReturnValueField]), StoredValueField.forEach((r, i) => {
|
|
907
|
+
var n;
|
|
908
|
+
return row[r] = ((n = e[ReturnValueField[i]]) == null ? void 0 : n.join(",")) || null;
|
|
909
909
|
}), handleChange(row[column.field], row, column));
|
|
910
910
|
}, urlParams, selectedData, layerOptions);
|
|
911
911
|
}
|
|
912
|
-
return (
|
|
912
|
+
return (a, l) => (openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
913
913
|
props.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...props, displayValue: value.value })), null, 16)) : (openBlock(), createBlock(unref(ElButton), {
|
|
914
914
|
key: 1,
|
|
915
915
|
class: "!text-[12px]",
|
|
@@ -945,8 +945,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
945
945
|
}
|
|
946
946
|
},
|
|
947
947
|
emits: ["change"],
|
|
948
|
-
setup(
|
|
949
|
-
const e =
|
|
948
|
+
setup(a, { emit: l }) {
|
|
949
|
+
const e = a, r = ref([
|
|
950
950
|
"#409EFF",
|
|
951
951
|
"#67C23A",
|
|
952
952
|
"#E6A23C",
|
|
@@ -983,24 +983,24 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
983
983
|
"#1296DB",
|
|
984
984
|
"#FDA4AF",
|
|
985
985
|
"#F9A8D4"
|
|
986
|
-
]),
|
|
986
|
+
]), i = ref(isColor(e.row[e.column.field]) ? e.row[e.column.field] : null);
|
|
987
987
|
watchEffect(() => {
|
|
988
|
-
|
|
988
|
+
i.value = isColor(e.row[e.column.field]) ? e.row[e.column.field] : null;
|
|
989
989
|
});
|
|
990
|
-
const
|
|
991
|
-
function t(
|
|
992
|
-
u[
|
|
990
|
+
const n = l;
|
|
991
|
+
function t(o, u, d) {
|
|
992
|
+
u[d.field] = o, n("change", o, u, d);
|
|
993
993
|
}
|
|
994
|
-
return (
|
|
995
|
-
var
|
|
994
|
+
return (o, u) => {
|
|
995
|
+
var d;
|
|
996
996
|
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
997
997
|
createVNode(unref(ElColorPicker), {
|
|
998
|
-
disabled: (
|
|
998
|
+
disabled: (d = a.column.params) == null ? void 0 : d.disabled,
|
|
999
999
|
class: "size-full",
|
|
1000
|
-
modelValue:
|
|
1001
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
1000
|
+
modelValue: i.value,
|
|
1001
|
+
"onUpdate:modelValue": u[0] || (u[0] = (c) => i.value = c),
|
|
1002
1002
|
predefine: r.value,
|
|
1003
|
-
onChange: u[1] || (u[1] = (
|
|
1003
|
+
onChange: u[1] || (u[1] = (c) => t(c, a.row, a.column))
|
|
1004
1004
|
}, null, 8, ["disabled", "modelValue", "predefine"])
|
|
1005
1005
|
]);
|
|
1006
1006
|
};
|
|
@@ -1026,7 +1026,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1026
1026
|
default: () => ({})
|
|
1027
1027
|
}
|
|
1028
1028
|
},
|
|
1029
|
-
setup(
|
|
1029
|
+
setup(a) {
|
|
1030
1030
|
return (l, e) => (openBlock(), createElementBlock("div", _hoisted_1$a));
|
|
1031
1031
|
}
|
|
1032
1032
|
}), __vite_glob_0_4$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1050,16 +1050,16 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1050
1050
|
default: () => ({})
|
|
1051
1051
|
}
|
|
1052
1052
|
},
|
|
1053
|
-
setup(
|
|
1053
|
+
setup(a) {
|
|
1054
1054
|
dayjs.extend(isoWeek), dayjs.extend(quarterOfYear), dayjs.extend(customParseFormat);
|
|
1055
|
-
const l =
|
|
1056
|
-
var
|
|
1057
|
-
const t = ((
|
|
1058
|
-
return
|
|
1055
|
+
const l = a, e = computed(() => {
|
|
1056
|
+
var o;
|
|
1057
|
+
const t = ((o = l.column.params) == null ? void 0 : o.DateType) || "date";
|
|
1058
|
+
return n(r(l.row[l.column.field], t), t);
|
|
1059
1059
|
});
|
|
1060
|
-
function r(t,
|
|
1060
|
+
function r(t, o) {
|
|
1061
1061
|
if (!t) return null;
|
|
1062
|
-
const
|
|
1062
|
+
const d = {
|
|
1063
1063
|
time: "HH:mm:ss",
|
|
1064
1064
|
date: "YYYY-MM-DD",
|
|
1065
1065
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
@@ -1067,38 +1067,38 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1067
1067
|
month: "YYYY-MM",
|
|
1068
1068
|
quarter: "YYYY-Q",
|
|
1069
1069
|
year: "YYYY"
|
|
1070
|
-
}[
|
|
1071
|
-
if (!
|
|
1072
|
-
let
|
|
1073
|
-
if (t.includes("周") || !
|
|
1074
|
-
const
|
|
1075
|
-
if (
|
|
1076
|
-
const [,
|
|
1077
|
-
|
|
1070
|
+
}[o];
|
|
1071
|
+
if (!d) throw new Error("Unsupported date type");
|
|
1072
|
+
let c = dayjs(t, d);
|
|
1073
|
+
if (t.includes("周") || !c.isValid() && o === "week") {
|
|
1074
|
+
const f = t.match(/^(\d{4})年第(\d{1,2})周$/);
|
|
1075
|
+
if (f) {
|
|
1076
|
+
const [, s, _] = f;
|
|
1077
|
+
c = dayjs(`${s}-01-01`).isoWeek(Number(_));
|
|
1078
1078
|
}
|
|
1079
|
-
} else if (t.includes("季度") || !
|
|
1080
|
-
const
|
|
1081
|
-
if (
|
|
1082
|
-
const [,
|
|
1083
|
-
|
|
1079
|
+
} else if (t.includes("季度") || !c.isValid() && o === "quarter") {
|
|
1080
|
+
const f = t.match(/^(\d{4})年第(\d)季度$/);
|
|
1081
|
+
if (f) {
|
|
1082
|
+
const [, s, _] = f;
|
|
1083
|
+
c = dayjs(`${s}-01-01`).quarter(Number(_));
|
|
1084
1084
|
}
|
|
1085
|
-
} else if (t.includes("月") || !
|
|
1086
|
-
const
|
|
1087
|
-
if (
|
|
1088
|
-
const [,
|
|
1089
|
-
|
|
1085
|
+
} else if (t.includes("月") || !c.isValid() && o === "month") {
|
|
1086
|
+
const f = t.match(/^(\d{4})年(\d{1,2})月$/);
|
|
1087
|
+
if (f) {
|
|
1088
|
+
const [, s, _] = f;
|
|
1089
|
+
c = dayjs(`${s}-${_}-01`);
|
|
1090
1090
|
}
|
|
1091
|
-
} else if (t.includes("年") || !
|
|
1092
|
-
const
|
|
1093
|
-
if (
|
|
1094
|
-
const [,
|
|
1095
|
-
|
|
1091
|
+
} else if (t.includes("年") || !c.isValid() && o === "year") {
|
|
1092
|
+
const f = t.match(/^(\d{4})年$/);
|
|
1093
|
+
if (f) {
|
|
1094
|
+
const [, s] = f;
|
|
1095
|
+
c = dayjs(`${s}-01-01`);
|
|
1096
1096
|
}
|
|
1097
1097
|
}
|
|
1098
|
-
return
|
|
1098
|
+
return c.isValid() ? i(c, o) : null;
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1101
|
-
switch (
|
|
1100
|
+
function i(t, o) {
|
|
1101
|
+
switch (o) {
|
|
1102
1102
|
case "time":
|
|
1103
1103
|
return t.format("HH:mm:ss");
|
|
1104
1104
|
case "date":
|
|
@@ -1117,9 +1117,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1117
1117
|
return null;
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1120
|
+
function n(t, o) {
|
|
1121
1121
|
if (!t) return "";
|
|
1122
|
-
switch (
|
|
1122
|
+
switch (o) {
|
|
1123
1123
|
case "week":
|
|
1124
1124
|
return `${dayjs(t).year()}年第${dayjs(t).isoWeek()}周`;
|
|
1125
1125
|
case "month":
|
|
@@ -1134,10 +1134,10 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1134
1134
|
date: "YYYY-MM-DD",
|
|
1135
1135
|
datetime: "YYYY-MM-DD HH:mm:ss"
|
|
1136
1136
|
};
|
|
1137
|
-
return dayjs(t).format(u[
|
|
1137
|
+
return dayjs(t).format(u[o]);
|
|
1138
1138
|
}
|
|
1139
1139
|
}
|
|
1140
|
-
return (t,
|
|
1140
|
+
return (t, o) => l.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...l, displayValue: e.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1141
1141
|
key: 1,
|
|
1142
1142
|
title: e.value
|
|
1143
1143
|
}, toDisplayString(e.value), 9, _hoisted_1$9));
|
|
@@ -1167,36 +1167,36 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1167
1167
|
}
|
|
1168
1168
|
},
|
|
1169
1169
|
emits: ["file-click"],
|
|
1170
|
-
setup(
|
|
1170
|
+
setup(a, { emit: l }) {
|
|
1171
1171
|
const e = l;
|
|
1172
|
-
function r(
|
|
1173
|
-
["jpg", "jpeg", "png", "gif", "bmp", "svg"].includes(
|
|
1172
|
+
function r(i) {
|
|
1173
|
+
["jpg", "jpeg", "png", "gif", "bmp", "svg"].includes(i.FileType.toLowerCase()) || e("file-click", i);
|
|
1174
1174
|
}
|
|
1175
|
-
return (
|
|
1175
|
+
return (i, n) => {
|
|
1176
1176
|
const t = resolveDirective("viewer");
|
|
1177
1177
|
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
1178
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1178
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.row[a.column.field], (o, u) => (openBlock(), createElementBlock("div", {
|
|
1179
1179
|
class: "Link flex",
|
|
1180
|
-
title:
|
|
1180
|
+
title: o.FileName
|
|
1181
1181
|
}, [
|
|
1182
|
-
unref(getFileIconUrl)(
|
|
1182
|
+
unref(getFileIconUrl)(o.FileType) ? (openBlock(), createElementBlock("div", {
|
|
1183
1183
|
key: 1,
|
|
1184
1184
|
class: "size-5 bg",
|
|
1185
1185
|
style: normalizeStyle({
|
|
1186
|
-
backgroundImage: `url(${unref(getFileIconUrl)(
|
|
1186
|
+
backgroundImage: `url(${unref(getFileIconUrl)(o.FileType)})`,
|
|
1187
1187
|
backgroundSize: "cover"
|
|
1188
1188
|
}),
|
|
1189
|
-
onClick: (
|
|
1189
|
+
onClick: (d) => r(o)
|
|
1190
1190
|
}, null, 12, _hoisted_3$1)) : (openBlock(), createBlock(unref(ElImage), {
|
|
1191
1191
|
key: 0,
|
|
1192
|
-
onClick: (
|
|
1192
|
+
onClick: (d) => r(o),
|
|
1193
1193
|
class: "size-5",
|
|
1194
|
-
src:
|
|
1194
|
+
src: o.FilePath
|
|
1195
1195
|
}, null, 8, ["onClick", "src"])),
|
|
1196
1196
|
createElementVNode("a", {
|
|
1197
|
-
href:
|
|
1198
|
-
download:
|
|
1199
|
-
}, toDisplayString(u + 1) + "." + toDisplayString(
|
|
1197
|
+
href: o.FilePath,
|
|
1198
|
+
download: o.FileName
|
|
1199
|
+
}, toDisplayString(u + 1) + "." + toDisplayString(o.FileType), 9, _hoisted_4$1)
|
|
1200
1200
|
], 8, _hoisted_2$3))), 256))
|
|
1201
1201
|
])), [
|
|
1202
1202
|
[
|
|
@@ -1230,33 +1230,33 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1230
1230
|
}
|
|
1231
1231
|
},
|
|
1232
1232
|
emits: ["change"],
|
|
1233
|
-
setup(
|
|
1233
|
+
setup(a, { emit: l }) {
|
|
1234
1234
|
const e = l;
|
|
1235
|
-
function r(
|
|
1236
|
-
e("change",
|
|
1235
|
+
function r(n, t, o) {
|
|
1236
|
+
e("change", n, t, o);
|
|
1237
1237
|
}
|
|
1238
|
-
function
|
|
1238
|
+
function i(n, t) {
|
|
1239
1239
|
var u;
|
|
1240
1240
|
if ((u = t.params) != null && u.disable) return;
|
|
1241
|
-
let
|
|
1241
|
+
let o = layer.open({
|
|
1242
1242
|
type: 2,
|
|
1243
1243
|
title: "图标选择",
|
|
1244
1244
|
maxmin: !0,
|
|
1245
1245
|
area: ["80%", "80%"],
|
|
1246
1246
|
content: "/Html/Custom/SelectIcon/Icon.html?callbackFn=setIcon&clearFn=clearIcon"
|
|
1247
1247
|
});
|
|
1248
|
-
window.setIcon = (
|
|
1249
|
-
|
|
1250
|
-
}, window.clearIcon = (
|
|
1251
|
-
|
|
1248
|
+
window.setIcon = (d) => {
|
|
1249
|
+
n[t.field] = d.font_class, r(d, n, t);
|
|
1250
|
+
}, window.clearIcon = (d) => {
|
|
1251
|
+
n[t.field] = "", r(d, n, t), layer.close(o);
|
|
1252
1252
|
};
|
|
1253
1253
|
}
|
|
1254
|
-
return (
|
|
1254
|
+
return (n, t) => (openBlock(), createElementBlock("div", {
|
|
1255
1255
|
class: "w-full h-full flex justify-center items-center",
|
|
1256
|
-
onClick: t[0] || (t[0] = (
|
|
1256
|
+
onClick: t[0] || (t[0] = (o) => i(a.row, a.column))
|
|
1257
1257
|
}, [
|
|
1258
1258
|
createVNode(unref(HrIcon), {
|
|
1259
|
-
icon:
|
|
1259
|
+
icon: a.row[a.column.field]
|
|
1260
1260
|
}, null, 8, ["icon"])
|
|
1261
1261
|
]));
|
|
1262
1262
|
}
|
|
@@ -1282,37 +1282,37 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1282
1282
|
}
|
|
1283
1283
|
},
|
|
1284
1284
|
emits: ["change"],
|
|
1285
|
-
setup(
|
|
1286
|
-
const e =
|
|
1287
|
-
function
|
|
1288
|
-
var
|
|
1289
|
-
if ((
|
|
1285
|
+
setup(a, { emit: l }) {
|
|
1286
|
+
const e = a, r = l;
|
|
1287
|
+
function i(n, t) {
|
|
1288
|
+
var y;
|
|
1289
|
+
if ((y = t.params) != null && y.disabled) return;
|
|
1290
1290
|
let {
|
|
1291
|
-
PickPeopleType:
|
|
1291
|
+
PickPeopleType: o,
|
|
1292
1292
|
PickPeopleCheckType: u,
|
|
1293
|
-
PickPeopleIsAll:
|
|
1294
|
-
PickPeopleStatus:
|
|
1295
|
-
StoredValueField:
|
|
1296
|
-
ReturnValueField:
|
|
1297
|
-
BackfillField:
|
|
1293
|
+
PickPeopleIsAll: d,
|
|
1294
|
+
PickPeopleStatus: c,
|
|
1295
|
+
StoredValueField: f,
|
|
1296
|
+
ReturnValueField: s,
|
|
1297
|
+
BackfillField: _
|
|
1298
1298
|
} = e.column.params;
|
|
1299
1299
|
openChoosePeople({
|
|
1300
|
-
Type:
|
|
1300
|
+
Type: o,
|
|
1301
1301
|
Choose: u,
|
|
1302
|
-
IsAll:
|
|
1303
|
-
Status:
|
|
1304
|
-
}, (
|
|
1305
|
-
isEmpty(
|
|
1306
|
-
},
|
|
1302
|
+
IsAll: d,
|
|
1303
|
+
Status: c
|
|
1304
|
+
}, (h) => {
|
|
1305
|
+
isEmpty(f) ? n[t.field] = h.Name || null : (Array.isArray(f) || (f = [f]), Array.isArray(s) || (s = [s]), f.forEach((k, w) => n[k] = h[s[w]] || null)), r("change", h, n, t);
|
|
1306
|
+
}, _ ? n[_] : null);
|
|
1307
1307
|
}
|
|
1308
|
-
return (
|
|
1308
|
+
return (n, t) => (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
1309
1309
|
createVNode(unref(ElButton), {
|
|
1310
1310
|
class: "!text-[12px]",
|
|
1311
1311
|
link: "",
|
|
1312
|
-
onClick: t[0] || (t[0] = (
|
|
1312
|
+
onClick: t[0] || (t[0] = (o) => i(a.row, a.column))
|
|
1313
1313
|
}, {
|
|
1314
1314
|
default: withCtx(() => [
|
|
1315
|
-
createTextVNode(toDisplayString(
|
|
1315
|
+
createTextVNode(toDisplayString(a.row[a.column.field] || "请选择"), 1)
|
|
1316
1316
|
]),
|
|
1317
1317
|
_: 1
|
|
1318
1318
|
})
|
|
@@ -1340,18 +1340,18 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1340
1340
|
}
|
|
1341
1341
|
},
|
|
1342
1342
|
emits: ["change"],
|
|
1343
|
-
setup(
|
|
1344
|
-
const e =
|
|
1343
|
+
setup(a, { emit: l }) {
|
|
1344
|
+
const e = a;
|
|
1345
1345
|
let r = ref(0);
|
|
1346
1346
|
return watchEffect(() => {
|
|
1347
1347
|
if (e.row[e.column.field]) {
|
|
1348
|
-
const
|
|
1349
|
-
if (isNaN(
|
|
1348
|
+
const i = Number(parseFloat(e.row[e.column.field]));
|
|
1349
|
+
if (isNaN(i))
|
|
1350
1350
|
return e.row[e.column.field] = r.value, layer.msg("请输入有效的数字");
|
|
1351
|
-
r.value =
|
|
1351
|
+
r.value = i > 100 ? 100 : i, i > 100 ? e.row[e.column.field] = 100 : e.row[e.column.field] = r.value;
|
|
1352
1352
|
} else
|
|
1353
1353
|
r.value = 0;
|
|
1354
|
-
}), (
|
|
1354
|
+
}), (i, n) => (openBlock(), createBlock(unref(ElProgress), {
|
|
1355
1355
|
percentage: unref(r),
|
|
1356
1356
|
format: () => `${unref(r)}%`
|
|
1357
1357
|
}, null, 8, ["percentage", "format"]));
|
|
@@ -1378,20 +1378,20 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1378
1378
|
}
|
|
1379
1379
|
},
|
|
1380
1380
|
emits: ["change"],
|
|
1381
|
-
setup(
|
|
1382
|
-
const e =
|
|
1383
|
-
function
|
|
1381
|
+
setup(a, { emit: l }) {
|
|
1382
|
+
const e = a, r = l;
|
|
1383
|
+
function i(n, t, o) {
|
|
1384
1384
|
e.gridRef.getTableData().tableData.filter((u) => u !== t).forEach((u) => {
|
|
1385
|
-
u[
|
|
1386
|
-
}), r("change",
|
|
1385
|
+
u[o.field] && (u[o.field] = !1);
|
|
1386
|
+
}), r("change", n, t, o);
|
|
1387
1387
|
}
|
|
1388
|
-
return (
|
|
1389
|
-
var
|
|
1388
|
+
return (n, t) => {
|
|
1389
|
+
var o;
|
|
1390
1390
|
return openBlock(), createBlock(unref(ElRadioGroup), {
|
|
1391
|
-
disabled: (
|
|
1392
|
-
modelValue:
|
|
1393
|
-
"onUpdate:modelValue": t[0] || (t[0] = (u) =>
|
|
1394
|
-
onChange: t[1] || (t[1] = (u) =>
|
|
1391
|
+
disabled: (o = a.column.params) == null ? void 0 : o.disabled,
|
|
1392
|
+
modelValue: a.row[a.column.field],
|
|
1393
|
+
"onUpdate:modelValue": t[0] || (t[0] = (u) => a.row[a.column.field] = u),
|
|
1394
|
+
onChange: t[1] || (t[1] = (u) => i(u, a.row, a.column))
|
|
1395
1395
|
}, {
|
|
1396
1396
|
default: withCtx(() => [
|
|
1397
1397
|
createVNode(unref(ElRadio), { value: !0 })
|
|
@@ -1421,30 +1421,30 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1421
1421
|
default: () => ({})
|
|
1422
1422
|
}
|
|
1423
1423
|
},
|
|
1424
|
-
setup(
|
|
1425
|
-
var
|
|
1426
|
-
const l =
|
|
1427
|
-
(
|
|
1428
|
-
var t,
|
|
1429
|
-
(t = l.column.params)[
|
|
1424
|
+
setup(a) {
|
|
1425
|
+
var i, n;
|
|
1426
|
+
const l = a;
|
|
1427
|
+
(i = l.column.params)[n = l.gridRef.getRowid(l.row)] ?? (i[n] = {}), watchEffect(() => {
|
|
1428
|
+
var t, o;
|
|
1429
|
+
(t = l.column.params)[o = l.gridRef.getRowid(l.row)] ?? (t[o] = {}), !l.column.params[l.gridRef.getRowid(l.row)].options && l.column.params.options && (l.column.params[l.gridRef.getRowid(l.row)].options = deepClone(l.column.params.options));
|
|
1430
1430
|
});
|
|
1431
1431
|
const e = computed(() => {
|
|
1432
1432
|
var t;
|
|
1433
1433
|
return ((t = l.column.params[l.gridRef.getRowid(l.row)]) == null ? void 0 : t.options) || l.column.params.options;
|
|
1434
1434
|
}), r = computed(() => {
|
|
1435
|
-
var
|
|
1435
|
+
var o, u;
|
|
1436
1436
|
const t = l.row[l.column.field];
|
|
1437
1437
|
if (t && t.length > 1) {
|
|
1438
|
-
let
|
|
1439
|
-
return t.split(",").map((
|
|
1440
|
-
var
|
|
1441
|
-
const
|
|
1442
|
-
|
|
1443
|
-
}),
|
|
1438
|
+
let d = [];
|
|
1439
|
+
return t.split(",").map((c) => {
|
|
1440
|
+
var s, _;
|
|
1441
|
+
const f = (_ = (s = e.value) == null ? void 0 : s.find((y) => y.value == c)) == null ? void 0 : _.label;
|
|
1442
|
+
f !== void 0 && d.push(f);
|
|
1443
|
+
}), d.join(",");
|
|
1444
1444
|
} else
|
|
1445
|
-
return ((u = (
|
|
1445
|
+
return ((u = (o = e.value) == null ? void 0 : o.find((d) => d.value == t)) == null ? void 0 : u.label) || "";
|
|
1446
1446
|
});
|
|
1447
|
-
return (t,
|
|
1447
|
+
return (t, o) => l.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...l, displayValue: r.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1448
1448
|
key: 1,
|
|
1449
1449
|
title: r.value
|
|
1450
1450
|
}, toDisplayString(r.value), 9, _hoisted_1$6));
|
|
@@ -1470,21 +1470,21 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1470
1470
|
default: () => ({})
|
|
1471
1471
|
}
|
|
1472
1472
|
},
|
|
1473
|
-
setup(
|
|
1474
|
-
var
|
|
1475
|
-
const l =
|
|
1476
|
-
(
|
|
1477
|
-
var t,
|
|
1478
|
-
(t = l.column.params)[
|
|
1473
|
+
setup(a) {
|
|
1474
|
+
var i, n;
|
|
1475
|
+
const l = a;
|
|
1476
|
+
(i = l.column.params)[n = l.gridRef.getRowid(l.row)] ?? (i[n] = {}), watchEffect(() => {
|
|
1477
|
+
var t, o;
|
|
1478
|
+
(t = l.column.params)[o = l.gridRef.getRowid(l.row)] ?? (t[o] = {}), !l.column.params[l.gridRef.getRowid(l.row)].options && l.column.params.options && (l.column.params[l.gridRef.getRowid(l.row)].options = deepClone(l.column.params.options));
|
|
1479
1479
|
});
|
|
1480
1480
|
const e = computed(() => {
|
|
1481
1481
|
var t;
|
|
1482
1482
|
return ((t = l.column.params[l.gridRef.getRowid(l.row)]) == null ? void 0 : t.options) || l.column.params.options;
|
|
1483
1483
|
}), r = computed(() => {
|
|
1484
|
-
var t,
|
|
1485
|
-
return ((
|
|
1484
|
+
var t, o;
|
|
1485
|
+
return ((o = (t = e.value) == null ? void 0 : t.find((u) => u.value == l.row[l.column.field])) == null ? void 0 : o.label) || "";
|
|
1486
1486
|
});
|
|
1487
|
-
return (t,
|
|
1487
|
+
return (t, o) => l.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, mergeProps({ key: 0 }, { ...l, displayValue: r.value }, { title: r.value }), null, 16, ["title"])) : (openBlock(), createElementBlock("span", {
|
|
1488
1488
|
key: 1,
|
|
1489
1489
|
title: r.value
|
|
1490
1490
|
}, toDisplayString(r.value), 9, _hoisted_1$5));
|
|
@@ -1510,20 +1510,20 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1510
1510
|
default: () => ({})
|
|
1511
1511
|
}
|
|
1512
1512
|
},
|
|
1513
|
-
setup(
|
|
1514
|
-
const l =
|
|
1513
|
+
setup(a) {
|
|
1514
|
+
const l = a;
|
|
1515
1515
|
if (!l.column.params.TreeData) {
|
|
1516
|
-
const { options: r, ParentNodeField:
|
|
1517
|
-
l.column.params.TreeData = buildTree(deepClone(r),
|
|
1516
|
+
const { options: r, ParentNodeField: i, NodeValueField: n } = l.column.params;
|
|
1517
|
+
l.column.params.TreeData = buildTree(deepClone(r), i, n);
|
|
1518
1518
|
}
|
|
1519
1519
|
const e = computed(() => {
|
|
1520
|
-
const { NodeNameField: r = "label", NodeValueField:
|
|
1520
|
+
const { NodeNameField: r = "label", NodeValueField: i = "value" } = l.column.params;
|
|
1521
1521
|
if (l.row[l.column.field]) {
|
|
1522
|
-
let
|
|
1523
|
-
return l.column.params.options.filter((t) =>
|
|
1522
|
+
let n = l.row[l.column.field].split(",");
|
|
1523
|
+
return l.column.params.options.filter((t) => n.includes(t[i])).map((t) => t[r]).join(",");
|
|
1524
1524
|
}
|
|
1525
1525
|
});
|
|
1526
|
-
return (r,
|
|
1526
|
+
return (r, i) => l.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...l, displayValue: e.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1527
1527
|
key: 1,
|
|
1528
1528
|
title: e.value
|
|
1529
1529
|
}, toDisplayString(e.value), 9, _hoisted_1$4));
|
|
@@ -1549,18 +1549,18 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1549
1549
|
default: () => ({})
|
|
1550
1550
|
}
|
|
1551
1551
|
},
|
|
1552
|
-
setup(
|
|
1553
|
-
const l =
|
|
1552
|
+
setup(a) {
|
|
1553
|
+
const l = a;
|
|
1554
1554
|
if (!l.column.params.TreeData) {
|
|
1555
|
-
const { options: r, ParentNodeField:
|
|
1556
|
-
l.column.params.TreeData = buildTree(deepClone(r),
|
|
1555
|
+
const { options: r, ParentNodeField: i, NodeKeyField: n } = l.column.params;
|
|
1556
|
+
l.column.params.TreeData = buildTree(deepClone(r), i, n);
|
|
1557
1557
|
}
|
|
1558
1558
|
const e = computed(() => {
|
|
1559
|
-
var
|
|
1560
|
-
const { NodeNameField: r = "label", NodeValueField:
|
|
1561
|
-
return ((
|
|
1559
|
+
var n;
|
|
1560
|
+
const { NodeNameField: r = "label", NodeValueField: i = "value" } = l.column.params;
|
|
1561
|
+
return ((n = l.column.params.options.find((t) => t[i] == l.row[l.column.field])) == null ? void 0 : n[r]) || "";
|
|
1562
1562
|
});
|
|
1563
|
-
return (r,
|
|
1563
|
+
return (r, i) => l.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...l, displayValue: e.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1564
1564
|
key: 1,
|
|
1565
1565
|
title: e.value
|
|
1566
1566
|
}, toDisplayString(e.value), 9, _hoisted_1$3));
|
|
@@ -1571,9 +1571,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1571
1571
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1572
1572
|
let comps$1 = {};
|
|
1573
1573
|
const modules$1 = /* @__PURE__ */ Object.assign({ "./action-render.vue": __vite_glob_0_0$1, "./checkbox-render.vue": __vite_glob_0_1$1, "./choose-frame-render.vue": __vite_glob_0_2$1, "./color-picker-render.vue": __vite_glob_0_3$1, "./custom-render.vue": __vite_glob_0_4$1, "./date-picker-render.vue": __vite_glob_0_5$1, "./file-render.vue": __vite_glob_0_6$1, "./icon-picker-render.vue": __vite_glob_0_7$1, "./label-render.vue": __vite_glob_0_8$1, "./pick-people-render.vue": __vite_glob_0_9, "./progress-render.vue": __vite_glob_0_10, "./radio-render.vue": __vite_glob_0_11, "./select-multiple-render.vue": __vite_glob_0_12, "./select-render.vue": __vite_glob_0_13, "./tree-mulitiple-select-render.vue": __vite_glob_0_14, "./tree-select-render.vue": __vite_glob_0_15 });
|
|
1574
|
-
for (const
|
|
1575
|
-
let l = modules$1[
|
|
1576
|
-
comps$1[l] = modules$1[
|
|
1574
|
+
for (const a in modules$1) {
|
|
1575
|
+
let l = modules$1[a].default.name;
|
|
1576
|
+
comps$1[l] = modules$1[a].default;
|
|
1577
1577
|
}
|
|
1578
1578
|
const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
1579
1579
|
name: "DatePickerEditor"
|
|
@@ -1594,18 +1594,18 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1594
1594
|
}
|
|
1595
1595
|
},
|
|
1596
1596
|
emits: ["change"],
|
|
1597
|
-
setup(
|
|
1597
|
+
setup(a, { emit: l }) {
|
|
1598
1598
|
var t;
|
|
1599
1599
|
dayjs.extend(isoWeek), dayjs.extend(quarterOfYear), dayjs.extend(customParseFormat);
|
|
1600
|
-
const e =
|
|
1600
|
+
const e = a, r = ref(i(e.row[e.column.field], ((t = e.column.params) == null ? void 0 : t.DateType) || "date"));
|
|
1601
1601
|
onBeforeUnmount(() => {
|
|
1602
1602
|
var u;
|
|
1603
|
-
const
|
|
1604
|
-
r.value && (
|
|
1603
|
+
const o = ((u = e.column.params) == null ? void 0 : u.DateType) || "date";
|
|
1604
|
+
r.value && (o === "year" ? e.row[e.column.field] = dayjs(r.value).format("YYYY年") : o === "month" ? e.row[e.column.field] = dayjs(r.value).format("YYYY年MM月") : o === "quarter" ? e.row[e.column.field] = dayjs(r.value).format("YYYY年第Q季度") : o === "week" ? e.row[e.column.field] = dayjs(r.value).format("YYYY年第WW周") : o === "datetime" ? e.row[e.column.field] = dayjs(r.value).format("YYYY-MM-DD HH:mm:ss") : e.row[e.column.field] = dayjs(r.value).format("YYYY-MM-DD"));
|
|
1605
1605
|
});
|
|
1606
|
-
function
|
|
1607
|
-
if (!
|
|
1608
|
-
const
|
|
1606
|
+
function i(o, u) {
|
|
1607
|
+
if (!o) return null;
|
|
1608
|
+
const c = {
|
|
1609
1609
|
time: "HH:mm:ss",
|
|
1610
1610
|
date: "YYYY-MM-DD",
|
|
1611
1611
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
@@ -1614,61 +1614,61 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1614
1614
|
quarter: "YYYY-Q",
|
|
1615
1615
|
year: "YYYY"
|
|
1616
1616
|
}[u];
|
|
1617
|
-
if (!
|
|
1618
|
-
let
|
|
1619
|
-
if (!
|
|
1620
|
-
const
|
|
1621
|
-
if (
|
|
1622
|
-
const [,
|
|
1623
|
-
|
|
1617
|
+
if (!c) throw new Error("Unsupported date type");
|
|
1618
|
+
let f = dayjs(o, c);
|
|
1619
|
+
if (!f.isValid() && u === "week") {
|
|
1620
|
+
const s = o.match(/^(\d{4})年第(\d{2})周$/);
|
|
1621
|
+
if (s) {
|
|
1622
|
+
const [, _, y] = s;
|
|
1623
|
+
f = dayjs(`${_}-01-01`).isoWeek(Number(y));
|
|
1624
1624
|
}
|
|
1625
|
-
} else if (!
|
|
1626
|
-
const
|
|
1627
|
-
if (
|
|
1628
|
-
const [,
|
|
1629
|
-
|
|
1625
|
+
} else if (!f.isValid() && u === "quarter") {
|
|
1626
|
+
const s = o.match(/^(\d{4})年第(\d)季度$/);
|
|
1627
|
+
if (s) {
|
|
1628
|
+
const [, _, y] = s;
|
|
1629
|
+
f = dayjs(`${_}-01-01`).quarter(Number(y));
|
|
1630
1630
|
}
|
|
1631
|
-
} else if (!
|
|
1632
|
-
const
|
|
1633
|
-
if (
|
|
1634
|
-
const [,
|
|
1635
|
-
|
|
1631
|
+
} else if (!f.isValid() && u === "month") {
|
|
1632
|
+
const s = o.match(/^(\d{4})年(\d{2})月$/);
|
|
1633
|
+
if (s) {
|
|
1634
|
+
const [, _, y] = s;
|
|
1635
|
+
f = dayjs(`${_}-${y}-01`);
|
|
1636
1636
|
}
|
|
1637
|
-
} else if (!
|
|
1638
|
-
const
|
|
1639
|
-
if (
|
|
1640
|
-
const [,
|
|
1641
|
-
|
|
1637
|
+
} else if (!f.isValid() && u === "year") {
|
|
1638
|
+
const s = o.match(/^(\d{4})年$/);
|
|
1639
|
+
if (s) {
|
|
1640
|
+
const [, _] = s;
|
|
1641
|
+
f = dayjs(`${_}-01-01`);
|
|
1642
1642
|
}
|
|
1643
1643
|
}
|
|
1644
|
-
return
|
|
1644
|
+
return f.isValid() ? n(f, u) : null;
|
|
1645
1645
|
}
|
|
1646
|
-
function o
|
|
1646
|
+
function n(o, u) {
|
|
1647
1647
|
switch (u) {
|
|
1648
1648
|
case "time":
|
|
1649
|
-
return
|
|
1649
|
+
return o.format("HH:mm:ss");
|
|
1650
1650
|
case "date":
|
|
1651
|
-
return
|
|
1651
|
+
return o.format("YYYY-MM-DD");
|
|
1652
1652
|
case "datetime":
|
|
1653
|
-
return
|
|
1653
|
+
return o.format("YYYY-MM-DD HH:mm:ss");
|
|
1654
1654
|
case "week":
|
|
1655
|
-
return
|
|
1655
|
+
return o.startOf("isoWeek").format("YYYY-MM-DD");
|
|
1656
1656
|
case "month":
|
|
1657
|
-
return
|
|
1657
|
+
return o.startOf("month").format("YYYY-MM-DD");
|
|
1658
1658
|
case "quarter":
|
|
1659
|
-
return
|
|
1659
|
+
return o.startOf("quarter").format("YYYY-MM-DD");
|
|
1660
1660
|
case "year":
|
|
1661
|
-
return
|
|
1661
|
+
return o.startOf("year").format("YYYY-MM-DD");
|
|
1662
1662
|
default:
|
|
1663
1663
|
return null;
|
|
1664
1664
|
}
|
|
1665
1665
|
}
|
|
1666
|
-
return (
|
|
1667
|
-
var
|
|
1666
|
+
return (o, u) => {
|
|
1667
|
+
var d;
|
|
1668
1668
|
return openBlock(), createBlock(unref(VxeInput), {
|
|
1669
1669
|
modelValue: r.value,
|
|
1670
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
1671
|
-
type: ((
|
|
1670
|
+
"onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c),
|
|
1671
|
+
type: ((d = a.column.params) == null ? void 0 : d.DateType) || "date",
|
|
1672
1672
|
clearable: "",
|
|
1673
1673
|
transfer: ""
|
|
1674
1674
|
}, null, 8, ["modelValue", "type"]);
|
|
@@ -1695,16 +1695,16 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1695
1695
|
default: () => ({})
|
|
1696
1696
|
}
|
|
1697
1697
|
},
|
|
1698
|
-
setup(
|
|
1699
|
-
const l =
|
|
1700
|
-
function r(
|
|
1701
|
-
l.row[l.column.field] =
|
|
1698
|
+
setup(a) {
|
|
1699
|
+
const l = a, e = ref(l.row[l.column.field]);
|
|
1700
|
+
function r(i) {
|
|
1701
|
+
l.row[l.column.field] = i;
|
|
1702
1702
|
}
|
|
1703
1703
|
return onBeforeUnmount(() => {
|
|
1704
1704
|
l.row[l.column.field] = e.value;
|
|
1705
|
-
}), (
|
|
1705
|
+
}), (i, n) => (openBlock(), createBlock(unref(ElInput), {
|
|
1706
1706
|
modelValue: e.value,
|
|
1707
|
-
"onUpdate:modelValue":
|
|
1707
|
+
"onUpdate:modelValue": n[0] || (n[0] = (t) => e.value = t),
|
|
1708
1708
|
onInput: r
|
|
1709
1709
|
}, null, 8, ["modelValue"]));
|
|
1710
1710
|
}
|
|
@@ -1730,21 +1730,21 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1730
1730
|
}
|
|
1731
1731
|
},
|
|
1732
1732
|
emits: ["change"],
|
|
1733
|
-
setup(
|
|
1734
|
-
const e =
|
|
1735
|
-
return watch(r, (
|
|
1736
|
-
const t =
|
|
1737
|
-
e.row[e.column.field] = t,
|
|
1733
|
+
setup(a, { emit: l }) {
|
|
1734
|
+
const e = a, r = ref(e.row[e.column.field]), i = l;
|
|
1735
|
+
return watch(r, (n) => {
|
|
1736
|
+
const t = n === "" || n == null ? 0 : Number(n);
|
|
1737
|
+
e.row[e.column.field] = t, i("change", t);
|
|
1738
1738
|
}), onBeforeUnmount(() => {
|
|
1739
1739
|
e.row[e.column.field] = r.value ? Number(r.value) : 0;
|
|
1740
|
-
}), (
|
|
1740
|
+
}), (n, t) => (openBlock(), createBlock(unref(ElInput), {
|
|
1741
1741
|
modelValue: r.value,
|
|
1742
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1743
|
-
min:
|
|
1744
|
-
max:
|
|
1745
|
-
step:
|
|
1742
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => r.value = o),
|
|
1743
|
+
min: a.column.params.min,
|
|
1744
|
+
max: a.column.params.max,
|
|
1745
|
+
step: a.column.params.step,
|
|
1746
1746
|
type: "number",
|
|
1747
|
-
onInput:
|
|
1747
|
+
onInput: n.handleInput
|
|
1748
1748
|
}, null, 8, ["modelValue", "min", "max", "step", "onInput"]));
|
|
1749
1749
|
}
|
|
1750
1750
|
}), __vite_glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1768,39 +1768,39 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1768
1768
|
default: () => ({})
|
|
1769
1769
|
}
|
|
1770
1770
|
},
|
|
1771
|
-
setup(
|
|
1772
|
-
const l =
|
|
1771
|
+
setup(a) {
|
|
1772
|
+
const l = a, e = ref(l.row[l.column.field]), r = reactive(l.column.params || {
|
|
1773
1773
|
placeholder: "请选择",
|
|
1774
1774
|
disabled: !1,
|
|
1775
1775
|
clearable: !1
|
|
1776
|
-
}),
|
|
1777
|
-
var
|
|
1778
|
-
return ((
|
|
1776
|
+
}), i = computed(() => {
|
|
1777
|
+
var n;
|
|
1778
|
+
return ((n = l.column.params[l.gridRef.getRowid(l.row)]) == null ? void 0 : n.options) || l.column.params.options || [];
|
|
1779
1779
|
});
|
|
1780
1780
|
return onBeforeUnmount(() => {
|
|
1781
1781
|
var t;
|
|
1782
1782
|
l.row[l.column.field] = e.value;
|
|
1783
|
-
const
|
|
1784
|
-
if (
|
|
1785
|
-
const
|
|
1786
|
-
|
|
1783
|
+
const n = l.column.params.LabelStoreField;
|
|
1784
|
+
if (n) {
|
|
1785
|
+
const o = (t = i.value.find((u) => u.value === e.value)) == null ? void 0 : t.label;
|
|
1786
|
+
o !== void 0 ? l.row[n] = o : e.value === void 0 ? l.row[n] = null : e.value !== void 0 && o === void 0 && (l.row[n] = e.value);
|
|
1787
1787
|
}
|
|
1788
|
-
}), (
|
|
1788
|
+
}), (n, t) => (openBlock(), createBlock(unref(ElSelect), {
|
|
1789
1789
|
class: "z-1",
|
|
1790
1790
|
modelValue: e.value,
|
|
1791
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1791
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value = o),
|
|
1792
1792
|
"automatic-dropdown": "",
|
|
1793
1793
|
placeholder: r.placeholder,
|
|
1794
1794
|
"popper-class": "select-dropdown",
|
|
1795
1795
|
clearable: ""
|
|
1796
1796
|
}, {
|
|
1797
1797
|
default: withCtx(() => [
|
|
1798
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1798
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(i.value, (o) => (openBlock(), createBlock(unref(ElOption), {
|
|
1799
1799
|
class: "vxe-table--ignore-clear",
|
|
1800
|
-
key:
|
|
1801
|
-
label:
|
|
1802
|
-
value:
|
|
1803
|
-
disabled:
|
|
1800
|
+
key: o.value,
|
|
1801
|
+
label: o.label,
|
|
1802
|
+
value: o.value,
|
|
1803
|
+
disabled: o.disabled
|
|
1804
1804
|
}, null, 8, ["label", "value", "disabled"]))), 128))
|
|
1805
1805
|
]),
|
|
1806
1806
|
_: 1
|
|
@@ -1827,31 +1827,31 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1827
1827
|
default: () => ({})
|
|
1828
1828
|
}
|
|
1829
1829
|
},
|
|
1830
|
-
setup(
|
|
1831
|
-
const l =
|
|
1830
|
+
setup(a) {
|
|
1831
|
+
const l = a, e = reactive(l.column.params || {
|
|
1832
1832
|
placeholder: "请选择",
|
|
1833
1833
|
disabled: !1,
|
|
1834
1834
|
clearable: !1
|
|
1835
1835
|
}), r = computed(() => {
|
|
1836
|
-
var
|
|
1837
|
-
return ((
|
|
1836
|
+
var n;
|
|
1837
|
+
return ((n = l.column.params[l.gridRef.getRowid(l.row)]) == null ? void 0 : n.options) || l.column.params.options || [];
|
|
1838
1838
|
});
|
|
1839
1839
|
onBeforeUnmount(() => {
|
|
1840
|
-
const
|
|
1841
|
-
l.row[l.column.field] =
|
|
1840
|
+
const n = i.value.join(",");
|
|
1841
|
+
l.row[l.column.field] = n;
|
|
1842
1842
|
const t = l.column.params.LabelStoreField;
|
|
1843
1843
|
if (t) {
|
|
1844
|
-
const
|
|
1845
|
-
l.row[t] =
|
|
1844
|
+
const o = r.value.filter((u) => i.value.includes(u.value)).map((u) => u.label).join(",");
|
|
1845
|
+
l.row[t] = o;
|
|
1846
1846
|
}
|
|
1847
1847
|
});
|
|
1848
|
-
const
|
|
1848
|
+
const i = ref([]);
|
|
1849
1849
|
return watchEffect(() => {
|
|
1850
|
-
l.row[l.column.field] ?
|
|
1851
|
-
}), (
|
|
1850
|
+
l.row[l.column.field] ? i.value = l.row[l.column.field].split(",") : i.value = [];
|
|
1851
|
+
}), (n, t) => (openBlock(), createBlock(unref(ElSelect), {
|
|
1852
1852
|
class: "z-1 vxe-table--ignore-clear",
|
|
1853
|
-
modelValue:
|
|
1854
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1853
|
+
modelValue: i.value,
|
|
1854
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => i.value = o),
|
|
1855
1855
|
"automatic-dropdown": "",
|
|
1856
1856
|
placeholder: e.placeholder,
|
|
1857
1857
|
"popper-class": "select-dropdown",
|
|
@@ -1859,11 +1859,11 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1859
1859
|
clearable: ""
|
|
1860
1860
|
}, {
|
|
1861
1861
|
default: withCtx(() => [
|
|
1862
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(r.value, (
|
|
1862
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(r.value, (o) => (openBlock(), createBlock(unref(ElOption), {
|
|
1863
1863
|
class: "vxe-table--ignore-clear",
|
|
1864
|
-
key:
|
|
1865
|
-
label:
|
|
1866
|
-
value:
|
|
1864
|
+
key: o.value,
|
|
1865
|
+
label: o.label,
|
|
1866
|
+
value: o.value
|
|
1867
1867
|
}, null, 8, ["label", "value"]))), 128))
|
|
1868
1868
|
]),
|
|
1869
1869
|
_: 1
|
|
@@ -1891,8 +1891,8 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1891
1891
|
}
|
|
1892
1892
|
},
|
|
1893
1893
|
emits: ["remoteMethod"],
|
|
1894
|
-
setup(
|
|
1895
|
-
const e = l, r =
|
|
1894
|
+
setup(a, { emit: l }) {
|
|
1895
|
+
const e = l, r = a, i = ref(r.row[r.column.field] === void 0 ? "" : r.row[r.column.field]), n = reactive(r.column.params || {
|
|
1896
1896
|
options: [],
|
|
1897
1897
|
placeholder: "请选择",
|
|
1898
1898
|
disabled: !1,
|
|
@@ -1903,35 +1903,35 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1903
1903
|
loading: !1
|
|
1904
1904
|
});
|
|
1905
1905
|
onBeforeUnmount(() => {
|
|
1906
|
-
const { StoredValueField:
|
|
1907
|
-
|
|
1908
|
-
const
|
|
1909
|
-
|
|
1910
|
-
}) : r.row[r.column.field] =
|
|
1906
|
+
const { StoredValueField: o, ReturnValueField: u } = n;
|
|
1907
|
+
o && o.length ? o.forEach((d, c) => {
|
|
1908
|
+
const f = n.options.find((s) => s._value === i.value);
|
|
1909
|
+
f && (r.row[d] = f[u[c]]);
|
|
1910
|
+
}) : r.row[r.column.field] = i.value;
|
|
1911
1911
|
});
|
|
1912
|
-
function t(
|
|
1913
|
-
const { DataAPIOID: u, SearchField:
|
|
1914
|
-
|
|
1912
|
+
function t(o) {
|
|
1913
|
+
const { DataAPIOID: u, SearchField: d } = n;
|
|
1914
|
+
o ? (n.loading = !0, e("remoteMethod", { DataAPIOID: u, SearchField: d, query: o, params: n })) : r.row[r.column.field] = null;
|
|
1915
1915
|
}
|
|
1916
|
-
return (
|
|
1916
|
+
return (o, u) => (openBlock(), createBlock(unref(ElSelect), {
|
|
1917
1917
|
class: "z-1 vxe-table--ignore-clear",
|
|
1918
|
-
modelValue:
|
|
1919
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
1918
|
+
modelValue: i.value,
|
|
1919
|
+
"onUpdate:modelValue": u[0] || (u[0] = (d) => i.value = d),
|
|
1920
1920
|
"allow-create": "",
|
|
1921
1921
|
"automatic-dropdown": "",
|
|
1922
1922
|
filterable: "",
|
|
1923
1923
|
remote: "",
|
|
1924
|
-
placeholder:
|
|
1924
|
+
placeholder: n.placeholder,
|
|
1925
1925
|
"popper-class": "select-dropdown",
|
|
1926
1926
|
"remote-method": t,
|
|
1927
1927
|
clearable: ""
|
|
1928
1928
|
}, {
|
|
1929
1929
|
default: withCtx(() => [
|
|
1930
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1930
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.options, (d) => (openBlock(), createBlock(unref(ElOption), {
|
|
1931
1931
|
class: "vxe-table--ignore-clear",
|
|
1932
|
-
key:
|
|
1933
|
-
label:
|
|
1934
|
-
value:
|
|
1932
|
+
key: d._value,
|
|
1933
|
+
label: d._label,
|
|
1934
|
+
value: d._value
|
|
1935
1935
|
}, null, 8, ["label", "value"]))), 128))
|
|
1936
1936
|
]),
|
|
1937
1937
|
_: 1
|
|
@@ -1958,13 +1958,13 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1958
1958
|
default: () => ({})
|
|
1959
1959
|
}
|
|
1960
1960
|
},
|
|
1961
|
-
setup(
|
|
1962
|
-
const l =
|
|
1961
|
+
setup(a) {
|
|
1962
|
+
const l = a, e = ref(l.row[l.column.field]);
|
|
1963
1963
|
return onBeforeUnmount(() => {
|
|
1964
1964
|
l.row[l.column.field] = e.value;
|
|
1965
|
-
}), (r,
|
|
1965
|
+
}), (r, i) => (openBlock(), createBlock(unref(ElInput), {
|
|
1966
1966
|
modelValue: e.value,
|
|
1967
|
-
"onUpdate:modelValue":
|
|
1967
|
+
"onUpdate:modelValue": i[0] || (i[0] = (n) => e.value = n),
|
|
1968
1968
|
rows: 2,
|
|
1969
1969
|
type: "textarea"
|
|
1970
1970
|
}, null, 8, ["modelValue"]));
|
|
@@ -1990,28 +1990,28 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1990
1990
|
default: () => ({})
|
|
1991
1991
|
}
|
|
1992
1992
|
},
|
|
1993
|
-
setup(
|
|
1994
|
-
const l =
|
|
1993
|
+
setup(a) {
|
|
1994
|
+
const l = a, e = ref({
|
|
1995
1995
|
label: l.column.params.NodeNameField || "label",
|
|
1996
1996
|
value: l.column.params.NodeValueField || "value",
|
|
1997
1997
|
children: "children"
|
|
1998
1998
|
});
|
|
1999
1999
|
if (!l.column.params.TreeData) {
|
|
2000
|
-
const { options:
|
|
2001
|
-
l.column.params.TreeData = buildTree(deepClone(
|
|
2000
|
+
const { options: i, ParentNodeField: n, NodeValueField: t } = l.column.params;
|
|
2001
|
+
l.column.params.TreeData = buildTree(deepClone(i), n, t);
|
|
2002
2002
|
}
|
|
2003
2003
|
const r = ref([]);
|
|
2004
2004
|
return onBeforeUnmount(() => {
|
|
2005
2005
|
l.row[l.column.field] = r.value.join(",");
|
|
2006
2006
|
}), watchEffect(() => {
|
|
2007
2007
|
l.row[l.column.field] ? r.value = l.row[l.column.field].split(",") : r.value = [];
|
|
2008
|
-
}), (
|
|
2008
|
+
}), (i, n) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
2009
2009
|
class: "z-1 vxe-table--ignore-clear",
|
|
2010
2010
|
modelValue: r.value,
|
|
2011
|
-
"onUpdate:modelValue":
|
|
2011
|
+
"onUpdate:modelValue": n[0] || (n[0] = (t) => r.value = t),
|
|
2012
2012
|
"automatic-dropdown": "",
|
|
2013
2013
|
"popper-class": "tree-select",
|
|
2014
|
-
data:
|
|
2014
|
+
data: a.column.params.TreeData,
|
|
2015
2015
|
props: e.value,
|
|
2016
2016
|
clearable: "",
|
|
2017
2017
|
multiple: "",
|
|
@@ -2040,31 +2040,31 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
2040
2040
|
default: () => ({})
|
|
2041
2041
|
}
|
|
2042
2042
|
},
|
|
2043
|
-
setup(
|
|
2044
|
-
const l =
|
|
2043
|
+
setup(a) {
|
|
2044
|
+
const l = a, e = ref(l.row[l.column.field]), r = ref({
|
|
2045
2045
|
label: l.column.params.NodeNameField || "label",
|
|
2046
2046
|
value: l.column.params.NodeValueField || "value",
|
|
2047
2047
|
children: "children"
|
|
2048
2048
|
});
|
|
2049
2049
|
if (!l.column.params.TreeData) {
|
|
2050
|
-
const { options:
|
|
2051
|
-
l.column.params.TreeData = buildTree(deepClone(
|
|
2050
|
+
const { options: i, ParentNodeField: n, NodeValueField: t } = l.column.params;
|
|
2051
|
+
l.column.params.TreeData = buildTree(deepClone(i), n, t);
|
|
2052
2052
|
}
|
|
2053
2053
|
return onBeforeUnmount(() => {
|
|
2054
2054
|
l.row[l.column.field] = e.value;
|
|
2055
|
-
}), (
|
|
2055
|
+
}), (i, n) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
2056
2056
|
class: "z-1 vxe-table--ignore-clear",
|
|
2057
2057
|
modelValue: e.value,
|
|
2058
|
-
"onUpdate:modelValue":
|
|
2058
|
+
"onUpdate:modelValue": n[0] || (n[0] = (t) => e.value = t),
|
|
2059
2059
|
"automatic-dropdown": "",
|
|
2060
2060
|
"popper-class": "tree-select",
|
|
2061
|
-
data:
|
|
2061
|
+
data: a.column.params.TreeData,
|
|
2062
2062
|
clearable: "",
|
|
2063
2063
|
props: r.value,
|
|
2064
2064
|
indent: 12
|
|
2065
2065
|
}, {
|
|
2066
|
-
label: withCtx(({ label: t, value:
|
|
2067
|
-
createElementVNode("span", null, toDisplayString(
|
|
2066
|
+
label: withCtx(({ label: t, value: o }) => [
|
|
2067
|
+
createElementVNode("span", null, toDisplayString(a.column.params.options.find((u) => u[r.value.value] === o) ? t : ""), 1)
|
|
2068
2068
|
]),
|
|
2069
2069
|
_: 1
|
|
2070
2070
|
}, 8, ["modelValue", "data", "props"]));
|
|
@@ -2075,9 +2075,9 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
2075
2075
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2076
2076
|
let comps = {};
|
|
2077
2077
|
const modules = /* @__PURE__ */ Object.assign({ "./date-picker-editor.vue": __vite_glob_0_0, "./input-editor.vue": __vite_glob_0_1, "./input-number-editor.vue": __vite_glob_0_2, "./select-editor.vue": __vite_glob_0_3, "./select-multiple-editor.vue": __vite_glob_0_4, "./select-remote-editor.vue": __vite_glob_0_5, "./textarea-editor.vue": __vite_glob_0_6, "./tree-multiple-select-editor.vue": __vite_glob_0_7, "./tree-select-editor.vue": __vite_glob_0_8 });
|
|
2078
|
-
for (const
|
|
2079
|
-
let l = modules[
|
|
2080
|
-
comps[l] = modules[
|
|
2078
|
+
for (const a in modules) {
|
|
2079
|
+
let l = modules[a].default.name;
|
|
2080
|
+
comps[l] = modules[a].default;
|
|
2081
2081
|
}
|
|
2082
2082
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
2083
2083
|
__name: "paging",
|
|
@@ -2101,8 +2101,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2101
2101
|
}
|
|
2102
2102
|
},
|
|
2103
2103
|
emits: ["pageChange", "refresh"],
|
|
2104
|
-
setup(
|
|
2105
|
-
const e =
|
|
2104
|
+
setup(a, { emit: l }) {
|
|
2105
|
+
const e = a, r = ref(), i = ref([
|
|
2106
2106
|
"Total",
|
|
2107
2107
|
"Sizes",
|
|
2108
2108
|
"PrevJump",
|
|
@@ -2113,15 +2113,15 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2113
2113
|
"FullJump"
|
|
2114
2114
|
]);
|
|
2115
2115
|
onMounted(() => {
|
|
2116
|
-
e.gridOptions.Pages === !1 ?
|
|
2117
|
-
|
|
2116
|
+
e.gridOptions.Pages === !1 ? i.value = ["Total"] : useElementClientSize(r.value, ({ clientWidth: o }) => {
|
|
2117
|
+
o < 300 ? i.value = ["Total"] : o < 500 ? i.value = [
|
|
2118
2118
|
"Total",
|
|
2119
2119
|
"PrevJump",
|
|
2120
2120
|
"PrevPage",
|
|
2121
2121
|
"JumpNumber",
|
|
2122
2122
|
"NextPage",
|
|
2123
2123
|
"NextJump"
|
|
2124
|
-
] :
|
|
2124
|
+
] : i.value = [
|
|
2125
2125
|
"Total",
|
|
2126
2126
|
"Sizes",
|
|
2127
2127
|
"PrevJump",
|
|
@@ -2134,8 +2134,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2134
2134
|
});
|
|
2135
2135
|
}), watch(
|
|
2136
2136
|
() => e.gridOptions.Pages,
|
|
2137
|
-
(
|
|
2138
|
-
|
|
2137
|
+
(o) => {
|
|
2138
|
+
o === !1 ? i.value = ["Total"] : i.value = [
|
|
2139
2139
|
"Total",
|
|
2140
2140
|
"Sizes",
|
|
2141
2141
|
"PrevJump",
|
|
@@ -2147,11 +2147,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2147
2147
|
];
|
|
2148
2148
|
}
|
|
2149
2149
|
);
|
|
2150
|
-
const
|
|
2150
|
+
const n = l;
|
|
2151
2151
|
function t() {
|
|
2152
|
-
|
|
2152
|
+
n("pageChange", e.pagination);
|
|
2153
2153
|
}
|
|
2154
|
-
return (
|
|
2154
|
+
return (o, u) => (openBlock(), createElementBlock("div", {
|
|
2155
2155
|
ref_key: "pagingDom",
|
|
2156
2156
|
ref: r,
|
|
2157
2157
|
class: "flex items-center w-full h-12 border border-solid border-[#e8eaec] box-border"
|
|
@@ -2160,18 +2160,156 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2160
2160
|
size: "small",
|
|
2161
2161
|
class: "w-full !h-full",
|
|
2162
2162
|
background: "",
|
|
2163
|
-
"current-page":
|
|
2164
|
-
"onUpdate:currentPage": u[0] || (u[0] = (
|
|
2165
|
-
"page-size":
|
|
2166
|
-
"onUpdate:pageSize": u[1] || (u[1] = (
|
|
2167
|
-
total:
|
|
2168
|
-
layouts:
|
|
2163
|
+
"current-page": a.pagination.Page,
|
|
2164
|
+
"onUpdate:currentPage": u[0] || (u[0] = (d) => a.pagination.Page = d),
|
|
2165
|
+
"page-size": a.pagination.PageSize,
|
|
2166
|
+
"onUpdate:pageSize": u[1] || (u[1] = (d) => a.pagination.PageSize = d),
|
|
2167
|
+
total: a.pagination.Total,
|
|
2168
|
+
layouts: i.value,
|
|
2169
2169
|
onPageChange: t,
|
|
2170
|
-
"page-sizes":
|
|
2170
|
+
"page-sizes": a.pagination.PageSizes
|
|
2171
2171
|
}, null, 8, ["current-page", "page-size", "total", "layouts", "page-sizes"])
|
|
2172
2172
|
], 512));
|
|
2173
2173
|
}
|
|
2174
|
-
})
|
|
2174
|
+
});
|
|
2175
|
+
function useFixedColumnPanel(a) {
|
|
2176
|
+
function l() {
|
|
2177
|
+
const t = a.value;
|
|
2178
|
+
if (!t) return;
|
|
2179
|
+
const o = getFixableColumns(t), u = new Map(o.map((s) => [s.field, s.fixed || ""])), d = o.filter((s) => u.get(s.field)).map((s) => s.field);
|
|
2180
|
+
let c = "left";
|
|
2181
|
+
const f = `
|
|
2182
|
+
<div style="padding:12px 14px;">
|
|
2183
|
+
<div style="margin-bottom:10px;">
|
|
2184
|
+
<label style="margin-right:12px;">
|
|
2185
|
+
<input type="radio" name="fixSide" value="left" checked /> 固定到左侧
|
|
2186
|
+
</label>
|
|
2187
|
+
<label>
|
|
2188
|
+
<input type="radio" name="fixSide" value="right" /> 固定到右侧
|
|
2189
|
+
</label>
|
|
2190
|
+
</div>
|
|
2191
|
+
|
|
2192
|
+
<div style="max-height:320px;overflow:auto;border:1px solid #eee;padding:8px;border-radius:6px;">
|
|
2193
|
+
${o.map((s) => {
|
|
2194
|
+
const _ = String(s.title ?? s.field), y = d.includes(s.field) ? "checked" : "", h = u.get(s.field) === "left" ? "左固定" : u.get(s.field) === "right" ? "右固定" : "";
|
|
2195
|
+
return `
|
|
2196
|
+
<div style="display:flex;align-items:center;gap:8px;margin:6px 0;">
|
|
2197
|
+
<input type="checkbox" class="fix-col" value="${s.field}" ${y} />
|
|
2198
|
+
<span>${escapeHtml(_)}</span>
|
|
2199
|
+
<span style="margin-left:auto;color:#999;font-size:12px;">${h}</span>
|
|
2200
|
+
</div>
|
|
2201
|
+
`;
|
|
2202
|
+
}).join("")}
|
|
2203
|
+
</div>
|
|
2204
|
+
</div>
|
|
2205
|
+
`;
|
|
2206
|
+
window.layer.open({
|
|
2207
|
+
type: 1,
|
|
2208
|
+
title: "<b>固定列设置</b>",
|
|
2209
|
+
area: ["520px", "520px"],
|
|
2210
|
+
content: f,
|
|
2211
|
+
// 你想要的:不持久化,只要本次页面生效
|
|
2212
|
+
btn: ["应用", "取消全部固定", "关闭"],
|
|
2213
|
+
success: function(s) {
|
|
2214
|
+
s[0].querySelectorAll('input[name="fixSide"]').forEach((y) => {
|
|
2215
|
+
y.addEventListener("change", () => {
|
|
2216
|
+
c = y.value === "right" ? "right" : "left";
|
|
2217
|
+
});
|
|
2218
|
+
});
|
|
2219
|
+
},
|
|
2220
|
+
// 应用
|
|
2221
|
+
btn1: function(s, _) {
|
|
2222
|
+
const y = Array.from(_[0].querySelectorAll("input.fix-col:checked")).map(
|
|
2223
|
+
(h) => h.value
|
|
2224
|
+
);
|
|
2225
|
+
applyFixed(t, o, y, c), window.layer.close(s);
|
|
2226
|
+
},
|
|
2227
|
+
// 取消全部固定
|
|
2228
|
+
btn2: function(s) {
|
|
2229
|
+
return e(), window.layer.close(s), !1;
|
|
2230
|
+
},
|
|
2231
|
+
// 关闭
|
|
2232
|
+
btn3: function(s) {
|
|
2233
|
+
window.layer.close(s);
|
|
2234
|
+
}
|
|
2235
|
+
});
|
|
2236
|
+
}
|
|
2237
|
+
function e() {
|
|
2238
|
+
var u;
|
|
2239
|
+
const t = a.value;
|
|
2240
|
+
if (!t) return;
|
|
2241
|
+
getFixableColumns(t).forEach((d) => {
|
|
2242
|
+
var c;
|
|
2243
|
+
return (c = t.setColumnFixed) == null ? void 0 : c.call(t, d, null);
|
|
2244
|
+
}), (u = t.refreshColumn) == null || u.call(t);
|
|
2245
|
+
}
|
|
2246
|
+
function r(t) {
|
|
2247
|
+
var c;
|
|
2248
|
+
const o = a.value;
|
|
2249
|
+
if (!o || !t) return;
|
|
2250
|
+
const u = getFixableColumns(o), d = n(u, t);
|
|
2251
|
+
d < 0 || (u.forEach((f, s) => {
|
|
2252
|
+
var _;
|
|
2253
|
+
(_ = o.setColumnFixed) == null || _.call(o, f, s <= d ? "left" : null);
|
|
2254
|
+
}), (c = o.refreshColumn) == null || c.call(o));
|
|
2255
|
+
}
|
|
2256
|
+
function i(t) {
|
|
2257
|
+
var c;
|
|
2258
|
+
const o = a.value;
|
|
2259
|
+
if (!o || !t) return;
|
|
2260
|
+
const u = getFixableColumns(o), d = n(u, t);
|
|
2261
|
+
d < 0 || (u.forEach((f, s) => {
|
|
2262
|
+
var _;
|
|
2263
|
+
(_ = o.setColumnFixed) == null || _.call(o, f, s >= d ? "right" : null);
|
|
2264
|
+
}), (c = o.refreshColumn) == null || c.call(o));
|
|
2265
|
+
}
|
|
2266
|
+
function n(t, o) {
|
|
2267
|
+
const u = (o == null ? void 0 : o.field) || (o == null ? void 0 : o.property);
|
|
2268
|
+
return u ? t.findIndex((d) => ((d == null ? void 0 : d.field) || (d == null ? void 0 : d.property)) === u) : -1;
|
|
2269
|
+
}
|
|
2270
|
+
return {
|
|
2271
|
+
openFixPanel: l,
|
|
2272
|
+
clearAllFixed: e,
|
|
2273
|
+
freezeToLeft: r,
|
|
2274
|
+
freezeToRight: i
|
|
2275
|
+
};
|
|
2276
|
+
}
|
|
2277
|
+
function getFixableColumns(a) {
|
|
2278
|
+
var e;
|
|
2279
|
+
return getLeafColumns(((e = a.getColumns) == null ? void 0 : e.call(a)) || []).filter((r) => r && r.field).filter((r) => !["seq", "checkbox", "radio", "expand"].includes(r.type)).filter((r) => r.type !== "action");
|
|
2280
|
+
}
|
|
2281
|
+
function getLeafColumns(a = []) {
|
|
2282
|
+
const l = [], e = (r) => {
|
|
2283
|
+
r.forEach((i) => {
|
|
2284
|
+
i && (Array.isArray(i.children) && i.children.length ? e(i.children) : l.push(i));
|
|
2285
|
+
});
|
|
2286
|
+
};
|
|
2287
|
+
return e(a), l;
|
|
2288
|
+
}
|
|
2289
|
+
function applyFixed(a, l, e, r) {
|
|
2290
|
+
var n;
|
|
2291
|
+
const i = new Set(e);
|
|
2292
|
+
l.forEach((t) => {
|
|
2293
|
+
var o;
|
|
2294
|
+
return (o = a.setColumnFixed) == null ? void 0 : o.call(a, t, null);
|
|
2295
|
+
}), l.forEach((t) => {
|
|
2296
|
+
var o;
|
|
2297
|
+
i.has(t.field) && ((o = a.setColumnFixed) == null || o.call(a, t, r));
|
|
2298
|
+
}), (n = a.refreshColumn) == null || n.call(a);
|
|
2299
|
+
}
|
|
2300
|
+
function escapeHtml(a) {
|
|
2301
|
+
return a.replace(
|
|
2302
|
+
/[&<>"']/g,
|
|
2303
|
+
(l) => ({
|
|
2304
|
+
"&": "&",
|
|
2305
|
+
"<": "<",
|
|
2306
|
+
">": ">",
|
|
2307
|
+
'"': """,
|
|
2308
|
+
"'": "'"
|
|
2309
|
+
})[l]
|
|
2310
|
+
);
|
|
2311
|
+
}
|
|
2312
|
+
const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padding-top": "1px", "box-sizing": "border-box" } }, _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
2175
2313
|
name: "HrTable",
|
|
2176
2314
|
__name: "index",
|
|
2177
2315
|
props: {
|
|
@@ -2198,88 +2336,88 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2198
2336
|
"tableSelectChange",
|
|
2199
2337
|
"tableSelectRemote"
|
|
2200
2338
|
],
|
|
2201
|
-
setup(
|
|
2202
|
-
const r =
|
|
2339
|
+
setup(a, { expose: l, emit: e }) {
|
|
2340
|
+
const r = a, i = e, n = ref(), { openFixPanel: t, clearAllFixed: o, freezeToLeft: u, freezeToRight: d } = useFixedColumnPanel(n), c = reactive(r.config);
|
|
2203
2341
|
reactive(r.config.columns);
|
|
2204
|
-
let
|
|
2342
|
+
let f = ref(!1), s = null;
|
|
2205
2343
|
onMounted(() => {
|
|
2206
2344
|
document.addEventListener("click", H, !0);
|
|
2207
2345
|
}), onBeforeUnmount(() => {
|
|
2208
2346
|
document.removeEventListener("click", H, !0), z();
|
|
2209
2347
|
});
|
|
2210
2348
|
const {
|
|
2211
|
-
CheckboxRender:
|
|
2212
|
-
ColorPickerRender:
|
|
2213
|
-
IconPickerRender:
|
|
2214
|
-
RadioRender:
|
|
2215
|
-
ProgressRender:
|
|
2216
|
-
ActionRender:
|
|
2217
|
-
SelectRender:
|
|
2218
|
-
TreeSelectRender:
|
|
2219
|
-
SelectMultipleRender:
|
|
2220
|
-
TreeMultipleSelectRender:
|
|
2221
|
-
ChooseFrameRender:
|
|
2222
|
-
PickPeopleRender:
|
|
2223
|
-
FileRender:
|
|
2224
|
-
CustomRender:
|
|
2225
|
-
DatePickerRender:
|
|
2226
|
-
LabelRender:
|
|
2349
|
+
CheckboxRender: _,
|
|
2350
|
+
ColorPickerRender: y,
|
|
2351
|
+
IconPickerRender: h,
|
|
2352
|
+
RadioRender: k,
|
|
2353
|
+
ProgressRender: w,
|
|
2354
|
+
ActionRender: E,
|
|
2355
|
+
SelectRender: j,
|
|
2356
|
+
TreeSelectRender: R,
|
|
2357
|
+
SelectMultipleRender: C,
|
|
2358
|
+
TreeMultipleSelectRender: S,
|
|
2359
|
+
ChooseFrameRender: D,
|
|
2360
|
+
PickPeopleRender: F,
|
|
2361
|
+
FileRender: U,
|
|
2362
|
+
CustomRender: q,
|
|
2363
|
+
DatePickerRender: W,
|
|
2364
|
+
LabelRender: K
|
|
2227
2365
|
} = comps$1, {
|
|
2228
|
-
InputEditor:
|
|
2229
|
-
TreeSelectEditor:
|
|
2230
|
-
SelectEditor:
|
|
2231
|
-
TextareaEditor:
|
|
2232
|
-
DatePickerEditor:
|
|
2233
|
-
SelectMultipleEditor:
|
|
2234
|
-
TreeMultipleSelectEditor:
|
|
2235
|
-
InputNumberEditor:
|
|
2236
|
-
SelectRemoteEditor:
|
|
2237
|
-
} = comps,
|
|
2238
|
-
var
|
|
2239
|
-
return ((((
|
|
2366
|
+
InputEditor: J,
|
|
2367
|
+
TreeSelectEditor: G,
|
|
2368
|
+
SelectEditor: Q,
|
|
2369
|
+
TextareaEditor: X,
|
|
2370
|
+
DatePickerEditor: Z,
|
|
2371
|
+
SelectMultipleEditor: ee,
|
|
2372
|
+
TreeMultipleSelectEditor: te,
|
|
2373
|
+
InputNumberEditor: le,
|
|
2374
|
+
SelectRemoteEditor: oe
|
|
2375
|
+
} = comps, re = computed(() => {
|
|
2376
|
+
var g, v;
|
|
2377
|
+
return ((((g = r.pagination) == null ? void 0 : g.Page) || 1) - 1) * (((v = r.pagination) == null ? void 0 : v.PageSize) || 1e3);
|
|
2240
2378
|
}), Y = computed(() => {
|
|
2241
|
-
var
|
|
2242
|
-
if (
|
|
2243
|
-
if (
|
|
2244
|
-
(
|
|
2379
|
+
var v, m, p, b;
|
|
2380
|
+
if (c.Number)
|
|
2381
|
+
if (c.columns.some(
|
|
2382
|
+
(V) => V.type === "seq" || V.children && V.children.some((B) => B.type === "seq")
|
|
2245
2383
|
))
|
|
2246
|
-
|
|
2384
|
+
c.columns = c.columns.filter((V) => V.type === "seq" ? !1 : V.children ? (V.children = V.children.filter((B) => B.type !== "seq"), V.children.length > 0) : !0);
|
|
2247
2385
|
else {
|
|
2248
|
-
let
|
|
2249
|
-
const
|
|
2386
|
+
let V = c.columns.find((O) => ["left", "right"].includes(O.fixed));
|
|
2387
|
+
const B = {
|
|
2250
2388
|
slots: {},
|
|
2251
2389
|
params: {},
|
|
2252
2390
|
type: "seq",
|
|
2253
2391
|
title: "序号",
|
|
2254
2392
|
align: "center",
|
|
2255
2393
|
width: 50,
|
|
2256
|
-
fixed:
|
|
2394
|
+
fixed: V || void 0
|
|
2257
2395
|
};
|
|
2258
|
-
|
|
2396
|
+
c.columns.unshift(B);
|
|
2259
2397
|
}
|
|
2260
2398
|
if (r.config.AutoFullWidth) {
|
|
2261
|
-
const
|
|
2399
|
+
const V = A(r.config.columns || []).filter(($) => !$.children), B = V.reduce(($, T) => {
|
|
2262
2400
|
let P = Number(T.width);
|
|
2263
|
-
return
|
|
2264
|
-
}, 0), O = (
|
|
2265
|
-
if (
|
|
2266
|
-
if (!
|
|
2267
|
-
setTimeout(() => O(
|
|
2401
|
+
return $ + (isNaN(P) ? 100 : P);
|
|
2402
|
+
}, 0), O = ($ = 0) => {
|
|
2403
|
+
if ($ > 50) return;
|
|
2404
|
+
if (!n.value) {
|
|
2405
|
+
setTimeout(() => O(++$), 0);
|
|
2268
2406
|
return;
|
|
2269
2407
|
}
|
|
2270
|
-
const T =
|
|
2271
|
-
|
|
2408
|
+
const T = n.value.$el.clientWidth;
|
|
2409
|
+
B !== T && V.forEach((P) => {
|
|
2272
2410
|
let M = Number(P.width);
|
|
2273
|
-
P.width = Number(((isNaN(M) ? 100 : M) * (T /
|
|
2411
|
+
P.width = Number(((isNaN(M) ? 100 : M) * (T / B)).toFixed(0));
|
|
2274
2412
|
});
|
|
2275
2413
|
};
|
|
2276
2414
|
O();
|
|
2277
2415
|
}
|
|
2278
|
-
let
|
|
2416
|
+
let g = {
|
|
2279
2417
|
keepSource: !0,
|
|
2280
2418
|
showOverflow: "title",
|
|
2281
2419
|
seqConfig: {
|
|
2282
|
-
seqMethod: (
|
|
2420
|
+
seqMethod: (x) => re.value + x.$rowIndex + 1
|
|
2283
2421
|
},
|
|
2284
2422
|
exportConfig: {},
|
|
2285
2423
|
importConfig: {},
|
|
@@ -2288,7 +2426,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2288
2426
|
...r.config,
|
|
2289
2427
|
// data: [...props.data], //不需要开启,目前是通过异步加载数据,开启会导致数据被当前配置覆盖
|
|
2290
2428
|
// ✅ 关键:开启“单元格选中”,才会出现 col--selected / col--current 等 class
|
|
2291
|
-
mouseConfig: r.dblEditEnabled ? { selected: !0 } : (
|
|
2429
|
+
mouseConfig: r.dblEditEnabled ? { selected: !0 } : (v = r.config) == null ? void 0 : v.mouseConfig,
|
|
2292
2430
|
// ✅ 开单元格高亮(不同版本字段名可能是 highlightCell)
|
|
2293
2431
|
highlightCell: !0,
|
|
2294
2432
|
highlightCurrentRow: !0,
|
|
@@ -2300,22 +2438,22 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2300
2438
|
// 只对 keep-source 开启有效,是否显示单元格新增与修改状态
|
|
2301
2439
|
showIcon: !1,
|
|
2302
2440
|
// 因为对过滤行进行了修改 该属性必须为false
|
|
2303
|
-
...(
|
|
2441
|
+
...(m = r.config) == null ? void 0 : m.editConfig,
|
|
2304
2442
|
// ⭐ 最终由父组件 dblEditEnabled 决定
|
|
2305
2443
|
trigger: r.dblEditEnabled ? "dblclick" : ((b = (p = r.config) == null ? void 0 : p.editConfig) == null ? void 0 : b.trigger) || "click"
|
|
2306
2444
|
},
|
|
2307
|
-
showFooter:
|
|
2445
|
+
showFooter: c["Total-Row"],
|
|
2308
2446
|
// 启用表尾统计
|
|
2309
2447
|
// showFooter: true, // 启用统计行
|
|
2310
|
-
footerMethod({ columns:
|
|
2311
|
-
var
|
|
2312
|
-
if (!(!
|
|
2448
|
+
footerMethod({ columns: x, data: V }) {
|
|
2449
|
+
var B;
|
|
2450
|
+
if (!(!c["Total-Field"] || !((B = c["Total-Field"]) != null && B.length)))
|
|
2313
2451
|
return [
|
|
2314
|
-
|
|
2452
|
+
x.map((O, $) => $ == 0 || (typeof c["Total-Field"] == "string" ? O.field === c["Total-Field"] : Array.isArray(c["Total-Field"]) && c["Total-Field"].includes(O.field)) ? $ === 0 ? "合计" : c["Total-Field"].includes(O.field) ? L(V, O.field).toLocaleString("zh-CN") : "" : void 0)
|
|
2315
2453
|
];
|
|
2316
2454
|
}
|
|
2317
2455
|
};
|
|
2318
|
-
return
|
|
2456
|
+
return c.BodyMenu && (g.menuConfig = {
|
|
2319
2457
|
body: {
|
|
2320
2458
|
options: [[
|
|
2321
2459
|
{ type: "print", name: "打印", prefixConfig: { icon: "vxe-icon-print" } },
|
|
@@ -2323,75 +2461,85 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2323
2461
|
{ type: "myBtn2", name: "导出全部", prefixConfig: { icon: "vxe-icon-send-fill" } }
|
|
2324
2462
|
]]
|
|
2325
2463
|
}
|
|
2326
|
-
}),
|
|
2464
|
+
}), g;
|
|
2327
2465
|
}), I = ref(!1);
|
|
2328
2466
|
let N = null;
|
|
2329
|
-
function
|
|
2330
|
-
const
|
|
2331
|
-
if (!
|
|
2332
|
-
const
|
|
2333
|
-
if (
|
|
2334
|
-
const
|
|
2335
|
-
if (
|
|
2336
|
-
return Array.from(
|
|
2467
|
+
function ne(g) {
|
|
2468
|
+
const v = g.clipboardData;
|
|
2469
|
+
if (!v) return null;
|
|
2470
|
+
const m = v.getData("text/html");
|
|
2471
|
+
if (m && /<table/i.test(m)) {
|
|
2472
|
+
const B = new DOMParser().parseFromString(m, "text/html").querySelector("table");
|
|
2473
|
+
if (B)
|
|
2474
|
+
return Array.from(B.querySelectorAll("tr")).map(($) => Array.from($.querySelectorAll("th,td")).map((P) => (Array.from(P.querySelectorAll("br")).forEach((M) => M.replaceWith(`
|
|
2337
2475
|
`)), (P.textContent || "").replace(/\u00A0/g, " ").trimEnd())));
|
|
2338
2476
|
}
|
|
2339
|
-
const p =
|
|
2477
|
+
const p = v.getData("text/plain") || "";
|
|
2340
2478
|
if (!p) return null;
|
|
2341
|
-
const
|
|
2479
|
+
const x = p.replace(/\r\n/g, `
|
|
2342
2480
|
`).replace(/\r/g, `
|
|
2343
2481
|
`).split(`
|
|
2344
2482
|
`);
|
|
2345
|
-
for (;
|
|
2346
|
-
return
|
|
2483
|
+
for (; x.length && x[x.length - 1] === ""; ) x.pop();
|
|
2484
|
+
return x.map((V) => V.split(" "));
|
|
2347
2485
|
}
|
|
2348
|
-
function
|
|
2349
|
-
N || (N = (
|
|
2350
|
-
var
|
|
2486
|
+
function ae() {
|
|
2487
|
+
N || (N = (g) => {
|
|
2488
|
+
var m, p, b;
|
|
2351
2489
|
if (!I.value) return;
|
|
2352
|
-
|
|
2353
|
-
const
|
|
2354
|
-
|
|
2490
|
+
g.preventDefault(), g.stopPropagation(), (m = g.stopImmediatePropagation) == null || m.call(g);
|
|
2491
|
+
const v = ne(g);
|
|
2492
|
+
v && ((b = (p = r.gridRef) == null ? void 0 : p.onGridPaste) == null || b.call(p, v));
|
|
2355
2493
|
}, window.addEventListener("paste", N, !0));
|
|
2356
2494
|
}
|
|
2357
2495
|
function z() {
|
|
2358
2496
|
N && (window.removeEventListener("paste", N, !0), N = null);
|
|
2359
2497
|
}
|
|
2360
|
-
const
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2498
|
+
const ie = {
|
|
2499
|
+
//设置表头右键 存储当前列信息
|
|
2500
|
+
headerCellMenu({ column: g }) {
|
|
2501
|
+
s = g;
|
|
2502
|
+
},
|
|
2503
|
+
cellMenu({ row: g }) {
|
|
2504
|
+
const v = n.value;
|
|
2505
|
+
v && v.setCurrentRow(g);
|
|
2364
2506
|
},
|
|
2365
2507
|
//单击事件 设置选中行和选择单元格
|
|
2366
|
-
cellClick({ row:
|
|
2508
|
+
cellClick({ row: g, column: v }) {
|
|
2367
2509
|
var p, b;
|
|
2368
|
-
const
|
|
2369
|
-
|
|
2510
|
+
const m = n.value;
|
|
2511
|
+
m && ((p = m.setCurrentCell) == null || p.call(m, g, v.field), m.currentCell = v, (b = m.setCurrentRow) == null || b.call(m, g));
|
|
2370
2512
|
},
|
|
2371
2513
|
//双击事件 设置选中行和选择单元格
|
|
2372
|
-
cellDblclick({ row:
|
|
2514
|
+
cellDblclick({ row: g, column: v }) {
|
|
2373
2515
|
var p, b;
|
|
2374
|
-
const
|
|
2375
|
-
|
|
2516
|
+
const m = n.value;
|
|
2517
|
+
m && ((p = m.setCurrentCell) == null || p.call(m, g, v.field), (b = m.setCurrentRow) == null || b.call(m, g));
|
|
2376
2518
|
},
|
|
2377
|
-
async menuClick({ menu:
|
|
2378
|
-
const
|
|
2379
|
-
if (
|
|
2380
|
-
switch (
|
|
2519
|
+
async menuClick({ menu: g }) {
|
|
2520
|
+
const v = n.value;
|
|
2521
|
+
if (v)
|
|
2522
|
+
switch (g.code) {
|
|
2381
2523
|
case "reload":
|
|
2382
|
-
const
|
|
2383
|
-
r.gridRef.echoData(), layer.close(
|
|
2524
|
+
const m = layer.load(2, { shade: [0.5, "#fff"] });
|
|
2525
|
+
r.gridRef.echoData(), layer.close(m);
|
|
2384
2526
|
break;
|
|
2385
2527
|
case "Print":
|
|
2386
|
-
|
|
2528
|
+
v.print({
|
|
2529
|
+
columns: v.getColumns().filter((x) => x.type !== "action" && x.type !== "checkbox"),
|
|
2530
|
+
pageHeader: [{ text: r.config.PageName, align: "center" }],
|
|
2531
|
+
// 目前无效
|
|
2532
|
+
pageFooter: [{ text: "第 {pageNum} 页 共 {totalPage} 页", align: "center" }]
|
|
2533
|
+
//目前无效
|
|
2534
|
+
});
|
|
2387
2535
|
break;
|
|
2388
2536
|
case "exportCurrent":
|
|
2389
|
-
const p = (
|
|
2390
|
-
|
|
2537
|
+
const p = (v == null ? void 0 : v.getTableData().tableData) || [];
|
|
2538
|
+
v.exportData({
|
|
2391
2539
|
type: "csv",
|
|
2392
2540
|
isHeader: !0,
|
|
2393
2541
|
isFooter: !1,
|
|
2394
|
-
columns:
|
|
2542
|
+
columns: v.getColumns().filter((x) => x.type !== "action" && x.type !== "checkbox"),
|
|
2395
2543
|
// 过滤出不需要导出的列
|
|
2396
2544
|
filename: `${r.config.PageName}(${H_getISODate(/* @__PURE__ */ new Date())})`,
|
|
2397
2545
|
// 文件名
|
|
@@ -2401,357 +2549,366 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2401
2549
|
break;
|
|
2402
2550
|
case "exportAll":
|
|
2403
2551
|
let b = await r.gridRef.handleExport();
|
|
2404
|
-
|
|
2552
|
+
v.exportData({
|
|
2405
2553
|
type: "csv",
|
|
2406
2554
|
isHeader: !0,
|
|
2407
2555
|
isFooter: !0,
|
|
2408
|
-
columns:
|
|
2556
|
+
columns: v.getColumns().filter((x) => x.type !== "action" && x.type !== "checkbox" && x.type !== "seq"),
|
|
2409
2557
|
// 过滤出不需要导出的列
|
|
2410
2558
|
filename: `${r.config.PageName == "" ? "导出" : r.config.PageName}(${H_getISODate(/* @__PURE__ */ new Date())})`,
|
|
2411
2559
|
// 文件名
|
|
2412
2560
|
data: b
|
|
2413
2561
|
});
|
|
2414
2562
|
break;
|
|
2415
|
-
case "print":
|
|
2416
|
-
h.print();
|
|
2417
|
-
break;
|
|
2418
2563
|
case "OpenCopy":
|
|
2419
|
-
r.gridRef.openCopy(), I.value = !0,
|
|
2564
|
+
r.gridRef.openCopy(), I.value = !0, ae();
|
|
2420
2565
|
break;
|
|
2421
2566
|
case "CloseCopy":
|
|
2422
2567
|
r.gridRef.closeCopy(), I.value = !1, z();
|
|
2423
2568
|
break;
|
|
2569
|
+
case "colFixPanel":
|
|
2570
|
+
t();
|
|
2571
|
+
break;
|
|
2572
|
+
case "colUnfixAll":
|
|
2573
|
+
o();
|
|
2574
|
+
break;
|
|
2575
|
+
case "freezeLeftTo":
|
|
2576
|
+
u(s);
|
|
2577
|
+
break;
|
|
2578
|
+
case "freezeRightTo":
|
|
2579
|
+
d(s);
|
|
2580
|
+
break;
|
|
2424
2581
|
}
|
|
2425
2582
|
}
|
|
2426
2583
|
};
|
|
2427
|
-
function
|
|
2428
|
-
|
|
2584
|
+
function ce(g) {
|
|
2585
|
+
i("ActionClick", g);
|
|
2429
2586
|
}
|
|
2430
|
-
function
|
|
2431
|
-
|
|
2587
|
+
function ue(...g) {
|
|
2588
|
+
i("PageChange", ...g);
|
|
2432
2589
|
}
|
|
2433
|
-
function
|
|
2434
|
-
|
|
2590
|
+
function se(...g) {
|
|
2591
|
+
i("Refresh", ...g);
|
|
2435
2592
|
}
|
|
2436
|
-
function
|
|
2437
|
-
|
|
2593
|
+
function de(...g) {
|
|
2594
|
+
i("FilterSearch", ...g);
|
|
2438
2595
|
}
|
|
2439
|
-
function
|
|
2440
|
-
|
|
2596
|
+
function fe(...g) {
|
|
2597
|
+
i("SortChange", ...g);
|
|
2441
2598
|
}
|
|
2442
|
-
function
|
|
2443
|
-
|
|
2599
|
+
function me(...g) {
|
|
2600
|
+
i("ActionRenderBefore", ...g);
|
|
2444
2601
|
}
|
|
2445
|
-
function
|
|
2446
|
-
|
|
2602
|
+
function pe(...g) {
|
|
2603
|
+
i("FileClick", ...g);
|
|
2447
2604
|
}
|
|
2448
|
-
function
|
|
2449
|
-
|
|
2605
|
+
function _e(g, v, m) {
|
|
2606
|
+
g.column = v, g.row = m, i("tableSelectRemote", g);
|
|
2450
2607
|
}
|
|
2451
|
-
function
|
|
2452
|
-
|
|
2608
|
+
function ge(...g) {
|
|
2609
|
+
i("tableSelectChange", ...g);
|
|
2453
2610
|
}
|
|
2454
|
-
function
|
|
2455
|
-
|
|
2611
|
+
function he(...g) {
|
|
2612
|
+
i("RemoteMethod", ...g);
|
|
2456
2613
|
}
|
|
2457
|
-
function
|
|
2458
|
-
|
|
2614
|
+
function ve(...g) {
|
|
2615
|
+
i("ChooseBefor", ...g);
|
|
2459
2616
|
}
|
|
2460
|
-
function
|
|
2461
|
-
|
|
2617
|
+
function be(...g) {
|
|
2618
|
+
i("PickPeople", ...g);
|
|
2462
2619
|
}
|
|
2463
|
-
function
|
|
2464
|
-
|
|
2620
|
+
function ye(...g) {
|
|
2621
|
+
i("CheckboxChange", ...g);
|
|
2465
2622
|
}
|
|
2466
|
-
function A(
|
|
2467
|
-
return
|
|
2468
|
-
|
|
2469
|
-
}),
|
|
2623
|
+
function A(g, v = "children", m = []) {
|
|
2624
|
+
return g.forEach((p) => {
|
|
2625
|
+
m.push(p), p[v] && p[v].length > 0 && A(p[v], v, m);
|
|
2626
|
+
}), m;
|
|
2470
2627
|
}
|
|
2471
|
-
const
|
|
2472
|
-
var
|
|
2473
|
-
|
|
2474
|
-
},
|
|
2475
|
-
|
|
2476
|
-
let
|
|
2477
|
-
|
|
2628
|
+
const ke = ({ menu: g }) => {
|
|
2629
|
+
var v, m;
|
|
2630
|
+
g.type == "print" ? (v = n.value) == null || v.openPrint() : g.type == "export" && ((m = n.value) == null || m.openExport());
|
|
2631
|
+
}, we = (g) => {
|
|
2632
|
+
f.value = !0;
|
|
2633
|
+
let v = c.columns.splice(g._index.oldIndex, 1)[0];
|
|
2634
|
+
c.columns.splice((g._index.newIndex || 1) - 1, 0, v);
|
|
2478
2635
|
};
|
|
2479
|
-
function H(
|
|
2480
|
-
const
|
|
2481
|
-
if (!
|
|
2482
|
-
const
|
|
2483
|
-
if (!
|
|
2484
|
-
const p =
|
|
2485
|
-
p &&
|
|
2486
|
-
}
|
|
2487
|
-
function
|
|
2488
|
-
if (!(
|
|
2489
|
-
function
|
|
2490
|
-
let
|
|
2491
|
-
function
|
|
2636
|
+
function H(g) {
|
|
2637
|
+
const v = g.target.closest("tr.vxe-body--row");
|
|
2638
|
+
if (!v || !(n != null && n.value)) return;
|
|
2639
|
+
const m = v.getAttribute("rowid");
|
|
2640
|
+
if (!m) return;
|
|
2641
|
+
const p = n.value.getRowById(m);
|
|
2642
|
+
p && n.value.setCurrentRow(p);
|
|
2643
|
+
}
|
|
2644
|
+
function L(g, v) {
|
|
2645
|
+
if (!(g instanceof Array)) return 0;
|
|
2646
|
+
function m(p, b) {
|
|
2647
|
+
let x = 0;
|
|
2648
|
+
function V(B) {
|
|
2492
2649
|
var O;
|
|
2493
|
-
if (((O =
|
|
2494
|
-
for (const
|
|
2495
|
-
|
|
2650
|
+
if (((O = B.children) == null ? void 0 : O.length) > 0)
|
|
2651
|
+
for (const $ of B.children)
|
|
2652
|
+
V($);
|
|
2496
2653
|
else
|
|
2497
|
-
|
|
2654
|
+
x = H_calculate(`${x}+${B[b] || 0}`);
|
|
2498
2655
|
}
|
|
2499
|
-
return
|
|
2656
|
+
return V(p), x;
|
|
2500
2657
|
}
|
|
2501
|
-
return
|
|
2502
|
-
var
|
|
2658
|
+
return g.reduce((p, b) => {
|
|
2659
|
+
var x, V;
|
|
2503
2660
|
if (!(b != null && b.children))
|
|
2504
|
-
return H_calculate(`${p}+${Number(b[
|
|
2505
|
-
if (((
|
|
2506
|
-
return H_calculate(`${p}+${Number(b[
|
|
2507
|
-
if (((
|
|
2508
|
-
let
|
|
2509
|
-
return H_calculate(`${p}+${
|
|
2661
|
+
return H_calculate(`${p}+${Number(b[v]) || 0}`);
|
|
2662
|
+
if (((x = b.children) == null ? void 0 : x.length) === 0 && (b.ParentOID === "00000000-0000-0000-0000-000000000000" || b.ParentOID === null))
|
|
2663
|
+
return H_calculate(`${p}+${Number(b[v]) || 0}`);
|
|
2664
|
+
if (((V = b.children) == null ? void 0 : V.length) > 0 && (b.ParentOID === "00000000-0000-0000-0000-000000000000" || b.ParentOID === null)) {
|
|
2665
|
+
let B = m(b, v);
|
|
2666
|
+
return H_calculate(`${p}+${B}`);
|
|
2510
2667
|
}
|
|
2511
2668
|
return p;
|
|
2512
2669
|
}, 0);
|
|
2513
2670
|
}
|
|
2514
2671
|
return watch(
|
|
2515
2672
|
() => r.dblEditEnabled,
|
|
2516
|
-
async (
|
|
2517
|
-
var
|
|
2518
|
-
if (!
|
|
2673
|
+
async (g) => {
|
|
2674
|
+
var v, m, p;
|
|
2675
|
+
if (!g) {
|
|
2519
2676
|
await nextTick();
|
|
2520
|
-
const b =
|
|
2677
|
+
const b = n.value;
|
|
2521
2678
|
if (!b) return;
|
|
2522
|
-
(
|
|
2679
|
+
(v = b.clearEdit) == null || v.call(b), (m = b.clearSelected) == null || m.call(b), (p = b.clearCurrentRow) == null || p.call(b);
|
|
2523
2680
|
}
|
|
2524
2681
|
},
|
|
2525
2682
|
{ immediate: !0 }
|
|
2526
2683
|
), l({
|
|
2527
|
-
gridRef:
|
|
2528
|
-
getFieldTotal:
|
|
2684
|
+
gridRef: n,
|
|
2685
|
+
getFieldTotal: L,
|
|
2529
2686
|
gridOptions: Y
|
|
2530
|
-
}), (
|
|
2687
|
+
}), (g, v) => (openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
2531
2688
|
createVNode(unref(VxeGrid), mergeProps({
|
|
2532
2689
|
class: ["grid-table", { "dbl-edit-on": r.dblEditEnabled }],
|
|
2533
2690
|
ref_key: "gridRef",
|
|
2534
|
-
ref:
|
|
2535
|
-
}, { ...Y.value, ...
|
|
2536
|
-
onMenuClick:
|
|
2537
|
-
onColumnDragend:
|
|
2691
|
+
ref: n
|
|
2692
|
+
}, { ...Y.value, ...g.$attrs }, toHandlers(ie), {
|
|
2693
|
+
onMenuClick: ke,
|
|
2694
|
+
onColumnDragend: we,
|
|
2538
2695
|
"show-overflow": "tooltip",
|
|
2539
|
-
onCheckboxChange:
|
|
2696
|
+
onCheckboxChange: ye
|
|
2540
2697
|
}), {
|
|
2541
|
-
FilterRows: withCtx(({ column:
|
|
2698
|
+
FilterRows: withCtx(({ column: m }) => [
|
|
2542
2699
|
createVNode(_sfc_main$t, {
|
|
2543
|
-
column:
|
|
2544
|
-
"grid-ref":
|
|
2545
|
-
onFilterSearch:
|
|
2546
|
-
onSortChange:
|
|
2700
|
+
column: m,
|
|
2701
|
+
"grid-ref": n.value,
|
|
2702
|
+
onFilterSearch: de,
|
|
2703
|
+
onSortChange: fe
|
|
2547
2704
|
}, null, 8, ["column", "grid-ref"])
|
|
2548
2705
|
]),
|
|
2549
|
-
ActionRender: withCtx(({ row:
|
|
2550
|
-
createVNode(unref(
|
|
2551
|
-
row:
|
|
2706
|
+
ActionRender: withCtx(({ row: m, column: p }) => [
|
|
2707
|
+
createVNode(unref(E), {
|
|
2708
|
+
row: m,
|
|
2552
2709
|
column: p,
|
|
2553
|
-
"grid-ref":
|
|
2554
|
-
onActionClick:
|
|
2555
|
-
onActionRenderBefore:
|
|
2710
|
+
"grid-ref": n.value,
|
|
2711
|
+
onActionClick: ce,
|
|
2712
|
+
onActionRenderBefore: me
|
|
2556
2713
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2557
2714
|
]),
|
|
2558
|
-
RadioRender: withCtx(({ row:
|
|
2559
|
-
createVNode(unref(
|
|
2560
|
-
row:
|
|
2715
|
+
RadioRender: withCtx(({ row: m, column: p }) => [
|
|
2716
|
+
createVNode(unref(k), {
|
|
2717
|
+
row: m,
|
|
2561
2718
|
column: p,
|
|
2562
|
-
"grid-ref":
|
|
2719
|
+
"grid-ref": n.value
|
|
2563
2720
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2564
2721
|
]),
|
|
2565
|
-
CheckboxRender: withCtx(({ row:
|
|
2566
|
-
createVNode(unref(
|
|
2567
|
-
row:
|
|
2722
|
+
CheckboxRender: withCtx(({ row: m, column: p }) => [
|
|
2723
|
+
createVNode(unref(_), {
|
|
2724
|
+
row: m,
|
|
2568
2725
|
column: p,
|
|
2569
|
-
"grid-ref":
|
|
2726
|
+
"grid-ref": n.value
|
|
2570
2727
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2571
2728
|
]),
|
|
2572
|
-
ColorPickerRender: withCtx(({ row:
|
|
2573
|
-
createVNode(unref(
|
|
2574
|
-
row:
|
|
2729
|
+
ColorPickerRender: withCtx(({ row: m, column: p }) => [
|
|
2730
|
+
createVNode(unref(y), {
|
|
2731
|
+
row: m,
|
|
2575
2732
|
column: p,
|
|
2576
|
-
"grid-ref":
|
|
2733
|
+
"grid-ref": n.value
|
|
2577
2734
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2578
2735
|
]),
|
|
2579
|
-
IconPickerRender: withCtx(({ row:
|
|
2580
|
-
createVNode(unref(
|
|
2581
|
-
row:
|
|
2736
|
+
IconPickerRender: withCtx(({ row: m, column: p }) => [
|
|
2737
|
+
createVNode(unref(h), {
|
|
2738
|
+
row: m,
|
|
2582
2739
|
column: p,
|
|
2583
|
-
"grid-ref":
|
|
2740
|
+
"grid-ref": n.value
|
|
2584
2741
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2585
2742
|
]),
|
|
2586
|
-
ProgressRender: withCtx(({ row:
|
|
2587
|
-
createVNode(unref(
|
|
2588
|
-
row:
|
|
2743
|
+
ProgressRender: withCtx(({ row: m, column: p }) => [
|
|
2744
|
+
createVNode(unref(w), {
|
|
2745
|
+
row: m,
|
|
2589
2746
|
column: p,
|
|
2590
|
-
"grid-ref":
|
|
2747
|
+
"grid-ref": n.value
|
|
2591
2748
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2592
2749
|
]),
|
|
2593
|
-
SelectRender: withCtx(({ row:
|
|
2594
|
-
createVNode(unref(
|
|
2595
|
-
row:
|
|
2750
|
+
SelectRender: withCtx(({ row: m, column: p }) => [
|
|
2751
|
+
createVNode(unref(j), {
|
|
2752
|
+
row: m,
|
|
2596
2753
|
column: p,
|
|
2597
|
-
"grid-ref":
|
|
2754
|
+
"grid-ref": n.value
|
|
2598
2755
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2599
2756
|
]),
|
|
2600
|
-
SelectMultipleRender: withCtx(({ row:
|
|
2601
|
-
createVNode(unref(
|
|
2602
|
-
row:
|
|
2757
|
+
SelectMultipleRender: withCtx(({ row: m, column: p }) => [
|
|
2758
|
+
createVNode(unref(C), {
|
|
2759
|
+
row: m,
|
|
2603
2760
|
column: p,
|
|
2604
|
-
"grid-ref":
|
|
2761
|
+
"grid-ref": n.value
|
|
2605
2762
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2606
2763
|
]),
|
|
2607
|
-
TreeSelectRender: withCtx(({ row:
|
|
2608
|
-
createVNode(unref(
|
|
2609
|
-
row:
|
|
2764
|
+
TreeSelectRender: withCtx(({ row: m, column: p }) => [
|
|
2765
|
+
createVNode(unref(R), {
|
|
2766
|
+
row: m,
|
|
2610
2767
|
column: p,
|
|
2611
|
-
"grid-ref":
|
|
2768
|
+
"grid-ref": n.value
|
|
2612
2769
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2613
2770
|
]),
|
|
2614
|
-
TreeMultipleSelectRender: withCtx(({ row:
|
|
2615
|
-
createVNode(unref(
|
|
2616
|
-
row:
|
|
2771
|
+
TreeMultipleSelectRender: withCtx(({ row: m, column: p }) => [
|
|
2772
|
+
createVNode(unref(S), {
|
|
2773
|
+
row: m,
|
|
2617
2774
|
column: p,
|
|
2618
|
-
"grid-ref":
|
|
2775
|
+
"grid-ref": n.value
|
|
2619
2776
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2620
2777
|
]),
|
|
2621
|
-
ChooseFrameRender: withCtx(({ row:
|
|
2622
|
-
createVNode(unref(
|
|
2623
|
-
row:
|
|
2778
|
+
ChooseFrameRender: withCtx(({ row: m, column: p }) => [
|
|
2779
|
+
createVNode(unref(D), {
|
|
2780
|
+
row: m,
|
|
2624
2781
|
column: p,
|
|
2625
2782
|
"grid-ref": r.gridRef,
|
|
2626
|
-
onOnChooseBeforClick:
|
|
2783
|
+
onOnChooseBeforClick: ve
|
|
2627
2784
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2628
2785
|
]),
|
|
2629
|
-
PickPeopleRender: withCtx(({ row:
|
|
2630
|
-
createVNode(unref(
|
|
2631
|
-
row:
|
|
2786
|
+
PickPeopleRender: withCtx(({ row: m, column: p }) => [
|
|
2787
|
+
createVNode(unref(F), {
|
|
2788
|
+
row: m,
|
|
2632
2789
|
column: p,
|
|
2633
|
-
"grid-ref":
|
|
2634
|
-
onChange:
|
|
2790
|
+
"grid-ref": n.value,
|
|
2791
|
+
onChange: be
|
|
2635
2792
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2636
2793
|
]),
|
|
2637
|
-
FileRender: withCtx(({ row:
|
|
2638
|
-
createVNode(unref(
|
|
2639
|
-
row:
|
|
2794
|
+
FileRender: withCtx(({ row: m, column: p }) => [
|
|
2795
|
+
createVNode(unref(U), {
|
|
2796
|
+
row: m,
|
|
2640
2797
|
column: p,
|
|
2641
|
-
"grid-ref":
|
|
2642
|
-
onFileClick:
|
|
2798
|
+
"grid-ref": n.value,
|
|
2799
|
+
onFileClick: pe
|
|
2643
2800
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2644
2801
|
]),
|
|
2645
|
-
CustomRender: withCtx(({ row:
|
|
2646
|
-
createVNode(unref(
|
|
2647
|
-
row:
|
|
2802
|
+
CustomRender: withCtx(({ row: m, column: p }) => [
|
|
2803
|
+
createVNode(unref(q), {
|
|
2804
|
+
row: m,
|
|
2648
2805
|
column: p,
|
|
2649
|
-
"grid-ref":
|
|
2806
|
+
"grid-ref": n.value
|
|
2650
2807
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2651
2808
|
]),
|
|
2652
|
-
DatePickerRender: withCtx(({ row:
|
|
2653
|
-
createVNode(unref(
|
|
2654
|
-
row:
|
|
2809
|
+
DatePickerRender: withCtx(({ row: m, column: p }) => [
|
|
2810
|
+
createVNode(unref(W), {
|
|
2811
|
+
row: m,
|
|
2655
2812
|
column: p,
|
|
2656
|
-
"grid-ref":
|
|
2813
|
+
"grid-ref": n.value
|
|
2657
2814
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2658
2815
|
]),
|
|
2659
|
-
LabelRender: withCtx(({ row:
|
|
2660
|
-
createVNode(unref(
|
|
2661
|
-
row:
|
|
2816
|
+
LabelRender: withCtx(({ row: m, column: p }) => [
|
|
2817
|
+
createVNode(unref(K), {
|
|
2818
|
+
row: m,
|
|
2662
2819
|
column: p,
|
|
2663
|
-
"grid-ref":
|
|
2820
|
+
"grid-ref": n.value
|
|
2664
2821
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2665
2822
|
]),
|
|
2666
|
-
InputEditor: withCtx(({ row:
|
|
2667
|
-
createVNode(unref(
|
|
2668
|
-
row:
|
|
2823
|
+
InputEditor: withCtx(({ row: m, column: p }) => [
|
|
2824
|
+
createVNode(unref(J), {
|
|
2825
|
+
row: m,
|
|
2669
2826
|
column: p,
|
|
2670
|
-
"grid-ref":
|
|
2827
|
+
"grid-ref": n.value
|
|
2671
2828
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2672
2829
|
]),
|
|
2673
|
-
TextareaEditor: withCtx(({ row:
|
|
2674
|
-
createVNode(unref(
|
|
2675
|
-
row:
|
|
2830
|
+
TextareaEditor: withCtx(({ row: m, column: p }) => [
|
|
2831
|
+
createVNode(unref(X), {
|
|
2832
|
+
row: m,
|
|
2676
2833
|
column: p,
|
|
2677
|
-
"grid-ref":
|
|
2834
|
+
"grid-ref": n.value
|
|
2678
2835
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2679
2836
|
]),
|
|
2680
|
-
SelectEditor: withCtx(({ row:
|
|
2681
|
-
createVNode(unref(
|
|
2682
|
-
row:
|
|
2837
|
+
SelectEditor: withCtx(({ row: m, column: p }) => [
|
|
2838
|
+
createVNode(unref(Q), {
|
|
2839
|
+
row: m,
|
|
2683
2840
|
column: p,
|
|
2684
|
-
"grid-ref":
|
|
2841
|
+
"grid-ref": n.value
|
|
2685
2842
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2686
2843
|
]),
|
|
2687
|
-
SelectMultipleEditor: withCtx(({ row:
|
|
2688
|
-
createVNode(unref(
|
|
2689
|
-
row:
|
|
2844
|
+
SelectMultipleEditor: withCtx(({ row: m, column: p }) => [
|
|
2845
|
+
createVNode(unref(ee), {
|
|
2846
|
+
row: m,
|
|
2690
2847
|
column: p,
|
|
2691
|
-
"grid-ref":
|
|
2848
|
+
"grid-ref": n.value
|
|
2692
2849
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2693
2850
|
]),
|
|
2694
|
-
TreeSelectEditor: withCtx(({ row:
|
|
2695
|
-
createVNode(unref(
|
|
2696
|
-
row:
|
|
2851
|
+
TreeSelectEditor: withCtx(({ row: m, column: p }) => [
|
|
2852
|
+
createVNode(unref(G), {
|
|
2853
|
+
row: m,
|
|
2697
2854
|
column: p,
|
|
2698
|
-
"grid-ref":
|
|
2855
|
+
"grid-ref": n.value
|
|
2699
2856
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2700
2857
|
]),
|
|
2701
|
-
TreeMultipleSelectEditor: withCtx(({ row:
|
|
2702
|
-
createVNode(unref(
|
|
2703
|
-
row:
|
|
2858
|
+
TreeMultipleSelectEditor: withCtx(({ row: m, column: p }) => [
|
|
2859
|
+
createVNode(unref(te), {
|
|
2860
|
+
row: m,
|
|
2704
2861
|
column: p,
|
|
2705
|
-
"grid-ref":
|
|
2862
|
+
"grid-ref": n.value
|
|
2706
2863
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2707
2864
|
]),
|
|
2708
|
-
DatePickerEditor: withCtx(({ row:
|
|
2709
|
-
createVNode(unref(
|
|
2710
|
-
row:
|
|
2865
|
+
DatePickerEditor: withCtx(({ row: m, column: p }) => [
|
|
2866
|
+
createVNode(unref(Z), {
|
|
2867
|
+
row: m,
|
|
2711
2868
|
column: p,
|
|
2712
|
-
"grid-ref":
|
|
2869
|
+
"grid-ref": n.value
|
|
2713
2870
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2714
2871
|
]),
|
|
2715
|
-
InputNumberEditor: withCtx(({ row:
|
|
2716
|
-
createVNode(unref(
|
|
2717
|
-
row:
|
|
2872
|
+
InputNumberEditor: withCtx(({ row: m, column: p }) => [
|
|
2873
|
+
createVNode(unref(le), {
|
|
2874
|
+
row: m,
|
|
2718
2875
|
column: p,
|
|
2719
|
-
"grid-ref":
|
|
2876
|
+
"grid-ref": n.value
|
|
2720
2877
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2721
2878
|
]),
|
|
2722
|
-
SelectRemoteEditor: withCtx(({ row:
|
|
2723
|
-
createVNode(unref(
|
|
2724
|
-
row:
|
|
2879
|
+
SelectRemoteEditor: withCtx(({ row: m, column: p }) => [
|
|
2880
|
+
createVNode(unref(oe), {
|
|
2881
|
+
row: m,
|
|
2725
2882
|
column: p,
|
|
2726
|
-
"grid-ref":
|
|
2727
|
-
onRemoteMethod:
|
|
2883
|
+
"grid-ref": n.value,
|
|
2884
|
+
onRemoteMethod: he
|
|
2728
2885
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2729
2886
|
]),
|
|
2730
|
-
tableSelect: withCtx(({ row:
|
|
2887
|
+
tableSelect: withCtx(({ row: m, column: p }) => [
|
|
2731
2888
|
createElementVNode("div", _hoisted_2$2, [
|
|
2732
2889
|
createVNode(unref(HrTableSelect), {
|
|
2733
|
-
modelValue:
|
|
2734
|
-
"onUpdate:modelValue": (b) =>
|
|
2890
|
+
modelValue: m[p.field],
|
|
2891
|
+
"onUpdate:modelValue": (b) => m[p.field] = b,
|
|
2735
2892
|
columns: p.params.tableSelectColumns || [],
|
|
2736
|
-
onRemoteMethod: (b) =>
|
|
2737
|
-
onChange: (b) =>
|
|
2893
|
+
onRemoteMethod: (b) => _e(b, p, m),
|
|
2894
|
+
onChange: (b) => ge({ change: b, row: m, column: p }),
|
|
2738
2895
|
width: p.params.tableSelectWidth
|
|
2739
2896
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "columns", "onRemoteMethod", "onChange", "width"])
|
|
2740
2897
|
])
|
|
2741
2898
|
]),
|
|
2742
2899
|
pager: withCtx(() => [
|
|
2743
2900
|
createVNode(_sfc_main$3, {
|
|
2744
|
-
pagination:
|
|
2901
|
+
pagination: a.pagination,
|
|
2745
2902
|
gridOptions: Y.value,
|
|
2746
|
-
onPageChange:
|
|
2747
|
-
onRefresh:
|
|
2903
|
+
onPageChange: ue,
|
|
2904
|
+
onRefresh: se
|
|
2748
2905
|
}, null, 8, ["pagination", "gridOptions"])
|
|
2749
2906
|
]),
|
|
2750
2907
|
_: 1
|
|
2751
2908
|
}, 16, ["class"])
|
|
2752
2909
|
]));
|
|
2753
2910
|
}
|
|
2754
|
-
}), Table = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
2911
|
+
}), Table = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-d33fb7c4"]]);
|
|
2755
2912
|
VxeUI.setConfig({
|
|
2756
2913
|
size: "small",
|
|
2757
2914
|
table: {
|
|
@@ -2789,18 +2946,18 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
2789
2946
|
modelModifiers: {}
|
|
2790
2947
|
}),
|
|
2791
2948
|
emits: /* @__PURE__ */ mergeModels(["change"], ["update:modelValue"]),
|
|
2792
|
-
setup(
|
|
2793
|
-
const e = useModel(
|
|
2794
|
-
return watch(() =>
|
|
2795
|
-
var
|
|
2796
|
-
return (
|
|
2797
|
-
}), (t,
|
|
2949
|
+
setup(a, { emit: l }) {
|
|
2950
|
+
const e = useModel(a, "modelValue"), r = ref(), i = l, n = (t) => t ? `${Number(t) ? t + "px" : t}` : "150px";
|
|
2951
|
+
return watch(() => a.highlight, (t) => {
|
|
2952
|
+
var o;
|
|
2953
|
+
return (o = r.value.querySelector(`[index="${t}"]`)) == null ? void 0 : o.scrollIntoView({ block: "center", behavior: "smooth" });
|
|
2954
|
+
}), (t, o) => (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
2798
2955
|
createElementVNode("table", null, [
|
|
2799
2956
|
createElementVNode("thead", null, [
|
|
2800
2957
|
createElementVNode("tr", null, [
|
|
2801
|
-
|
|
2958
|
+
o[0] || (o[0] = createElementVNode("th", { class: "w[50px]" }, "序号", -1)),
|
|
2802
2959
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(t.columns, (u) => (openBlock(), createElementBlock("th", {
|
|
2803
|
-
style: normalizeStyle({ width:
|
|
2960
|
+
style: normalizeStyle({ width: n(u.width) })
|
|
2804
2961
|
}, toDisplayString(u.title), 5))), 256))
|
|
2805
2962
|
])
|
|
2806
2963
|
]),
|
|
@@ -2808,13 +2965,13 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
2808
2965
|
ref_key: "tbody",
|
|
2809
2966
|
ref: r
|
|
2810
2967
|
}, [
|
|
2811
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.value, (u,
|
|
2812
|
-
class: normalizeClass({ zebra:
|
|
2813
|
-
onClick: (
|
|
2814
|
-
index:
|
|
2968
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.value, (u, d) => (openBlock(), createElementBlock("tr", {
|
|
2969
|
+
class: normalizeClass({ zebra: d % 2 != 0, highlight: t.highlight === d }),
|
|
2970
|
+
onClick: (c) => i("change", u),
|
|
2971
|
+
index: d
|
|
2815
2972
|
}, [
|
|
2816
|
-
createElementVNode("td", _hoisted_3, toDisplayString(
|
|
2817
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(t.columns, (
|
|
2973
|
+
createElementVNode("td", _hoisted_3, toDisplayString(d + 1), 1),
|
|
2974
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(t.columns, (c) => (openBlock(), createElementBlock("td", null, toDisplayString(u[c.field]), 1))), 256))
|
|
2818
2975
|
], 10, _hoisted_2$1))), 256))
|
|
2819
2976
|
], 512)
|
|
2820
2977
|
]),
|
|
@@ -2837,63 +2994,63 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
2837
2994
|
modelModifiers: {}
|
|
2838
2995
|
}),
|
|
2839
2996
|
emits: /* @__PURE__ */ mergeModels(["remote-method", "change"], ["update:modelValue"]),
|
|
2840
|
-
setup(
|
|
2997
|
+
setup(a, { emit: l }) {
|
|
2841
2998
|
const e = reactive({
|
|
2842
2999
|
query: "",
|
|
2843
3000
|
tableData: [],
|
|
2844
3001
|
loading: !1
|
|
2845
|
-
}), r = ref(),
|
|
2846
|
-
|
|
2847
|
-
},
|
|
2848
|
-
if (!
|
|
2849
|
-
const C = (
|
|
2850
|
-
|
|
2851
|
-
const
|
|
2852
|
-
|
|
3002
|
+
}), r = ref(), i = ref(), n = ref(!1), t = ref(-1), o = reactive({ x: 0, y: 0, w: 0 }), u = useModel(a, "modelValue"), d = l, c = () => d("remote-method", e), f = () => {
|
|
3003
|
+
n.value = !0, d("remote-method", e), s();
|
|
3004
|
+
}, s = async () => {
|
|
3005
|
+
if (!n.value) return;
|
|
3006
|
+
const C = (F) => Number(F) ? F + "px" : F, S = r.value.getBoundingClientRect();
|
|
3007
|
+
o.y = innerHeight - S.y < S.y ? S.y - S.height - 280 : S.y + S.height + 5, o.w = a.width ? C(a.width) : S.width < 300 ? "300px" : S.width + "px", await nextTick();
|
|
3008
|
+
const D = i.value.$el.offsetWidth;
|
|
3009
|
+
o.x = innerWidth - S.x > D ? S.x : S.x + S.width - D;
|
|
2853
3010
|
};
|
|
2854
|
-
let
|
|
2855
|
-
const
|
|
2856
|
-
|
|
2857
|
-
},
|
|
3011
|
+
let _ = !0;
|
|
3012
|
+
const y = () => _ && (n.value = !1), h = () => (_ = !1, setTimeout(() => _ = !0, 16)), k = () => _ && r.value.focus(), w = (C) => {
|
|
3013
|
+
h(), d("change", C), n.value = !1;
|
|
3014
|
+
}, E = () => t.value !== -1 && t.value--, j = () => t.value < e.tableData.length && t.value++, R = () => {
|
|
2858
3015
|
if (t.value == -1) return;
|
|
2859
3016
|
const C = e.tableData[t.value];
|
|
2860
|
-
|
|
3017
|
+
d("change", C), r.value.blur();
|
|
2861
3018
|
};
|
|
2862
3019
|
return watch(() => e.query, (C) => {
|
|
2863
3020
|
C !== u.value && (u.value = C);
|
|
2864
3021
|
}), watch(() => u.value, (C) => {
|
|
2865
3022
|
C !== e.query && (e.query = C);
|
|
2866
3023
|
}), effect(() => {
|
|
2867
|
-
e.query,
|
|
2868
|
-
}), effect(() => !
|
|
3024
|
+
e.query, n.value, t.value = -1;
|
|
3025
|
+
}), effect(() => !n.value && (e.tableData = [])), document.addEventListener("scroll", s), (C, S) => (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
2869
3026
|
withDirectives(createElementVNode("input", {
|
|
2870
3027
|
ref_key: "input",
|
|
2871
3028
|
ref: r,
|
|
2872
|
-
"onUpdate:modelValue":
|
|
2873
|
-
onInput:
|
|
2874
|
-
onFocus:
|
|
2875
|
-
onBlur:
|
|
3029
|
+
"onUpdate:modelValue": S[0] || (S[0] = (D) => e.query = D),
|
|
3030
|
+
onInput: c,
|
|
3031
|
+
onFocus: f,
|
|
3032
|
+
onBlur: y,
|
|
2876
3033
|
onKeydown: [
|
|
2877
|
-
withKeys(
|
|
2878
|
-
withKeys(
|
|
2879
|
-
withKeys(withModifiers(
|
|
3034
|
+
withKeys(E, ["up"]),
|
|
3035
|
+
withKeys(j, ["down"]),
|
|
3036
|
+
withKeys(withModifiers(R, ["prevent"]), ["enter"])
|
|
2880
3037
|
]
|
|
2881
3038
|
}, null, 40, _hoisted_2), [
|
|
2882
3039
|
[vModelText, e.query]
|
|
2883
3040
|
]),
|
|
2884
|
-
|
|
3041
|
+
n.value ? (openBlock(), createBlock(hrTable, {
|
|
2885
3042
|
key: 0,
|
|
2886
3043
|
ref_key: "table",
|
|
2887
|
-
ref:
|
|
3044
|
+
ref: i,
|
|
2888
3045
|
modelValue: e.tableData,
|
|
2889
|
-
"onUpdate:modelValue":
|
|
3046
|
+
"onUpdate:modelValue": S[1] || (S[1] = (D) => e.tableData = D),
|
|
2890
3047
|
loading: e.loading,
|
|
2891
3048
|
highlight: t.value,
|
|
2892
3049
|
columns: C.columns,
|
|
2893
|
-
onMousedown:
|
|
2894
|
-
onClick:
|
|
3050
|
+
onMousedown: h,
|
|
3051
|
+
onClick: k,
|
|
2895
3052
|
onChange: w,
|
|
2896
|
-
style: normalizeStyle({ top:
|
|
3053
|
+
style: normalizeStyle({ top: o.y + "px", left: o.x + "px", width: o.w })
|
|
2897
3054
|
}, null, 8, ["modelValue", "loading", "highlight", "columns", "style"])) : createCommentVNode("", !0)
|
|
2898
3055
|
]));
|
|
2899
3056
|
}
|