gzhr-ui 1.1.11 → 1.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/{button-gTulgQZJ.mjs → button-DDCRUA17.mjs} +1 -1
- package/dist/es/{icon-iNG7ZwAk.mjs → icon-Dx0--dHl.mjs} +2 -2
- package/dist/es/index.mjs +5 -5
- package/dist/es/{table-YHgyyyfZ.mjs → table-CgdebjjS.mjs} +755 -748
- package/dist/es/{utils-D3bEDOQn.mjs → utils-OZSnHKWO.mjs} +1 -1
- package/dist/es/vendor-CUWEHqGm.mjs +54996 -0
- package/dist/index.css +1 -1
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.js +13 -13
- package/package.json +3 -2
- package/dist/es/vendor-Oml3ZDAp.mjs +0 -51554
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./button-
|
|
2
|
-
import { a as ElInput,
|
|
3
|
-
import { ref, computed, openBlock, createElementBlock,
|
|
4
|
-
import { b as buildTree, d as deepClone, u as useElementClientSize,
|
|
5
|
-
import { H as HrIcon } from "./icon-
|
|
6
|
-
const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "
|
|
1
|
+
import "./button-DDCRUA17.mjs";
|
|
2
|
+
import { a as ElInput, b as ElPopover, c as ElDatePicker, d as ElButton, C as ClickOutside, e as ElCheckboxGroup, f as ElCheckbox, g as ElTreeSelect, h as ElInputNumber, E as ElIcon, i as ElDropdown, j as ElDropdownMenu, k as ElDropdownItem, l as ElTag, m as isEmpty, n as ElColorPicker, o as dayjs, p as isoWeek, q as quarterOfYear, r as customParseFormat, s as ElImage, t as ElProgress, u as ElRadioGroup, v as ElRadio, V as VxeInput, w as ElSelect, x as ElOption, y as VxePager, z as VxeGrid, A as VxeUI } from "./vendor-CUWEHqGm.mjs";
|
|
3
|
+
import { ref, computed, onMounted, onBeforeUnmount, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, createTextVNode, withDirectives, withKeys, createBlock, Fragment, renderList, createCommentVNode, defineComponent, normalizeStyle, normalizeClass, toDisplayString, watch, vShow, watchEffect, resolveComponent, normalizeProps, mergeProps, resolveDirective, reactive, toHandlers, useModel, mergeModels, effect, nextTick, withModifiers, vModelText } from "vue";
|
|
4
|
+
import { _ as _export_sfc, b as buildTree, d as deepClone, u as useElementClientSize, i as isColor, g as getFileIconUrl, w as withInstall } from "./utils-OZSnHKWO.mjs";
|
|
5
|
+
import { H as HrIcon } from "./icon-Dx0--dHl.mjs";
|
|
6
|
+
const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" }, _hoisted_3$5 = { class: "btn-row" }, _sfc_main$z = {
|
|
7
7
|
__name: "filter-date",
|
|
8
8
|
props: {
|
|
9
9
|
column: {
|
|
@@ -12,76 +12,106 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
emits: ["FilterSearch"],
|
|
15
|
-
setup(
|
|
16
|
-
const e =
|
|
17
|
-
var
|
|
18
|
-
(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
setup(n, { emit: t }) {
|
|
16
|
+
const e = n, r = t, c = ref(""), o = ref(""), l = ref(!1), a = ref(), u = ref(), s = ref(), i = computed(() => {
|
|
17
|
+
var h, k;
|
|
18
|
+
const g = ((k = (h = e.column.filters) == null ? void 0 : h[0]) == null ? void 0 : k.data) || [];
|
|
19
|
+
return Array.isArray(g) && g.length === 2 && g[0] && g[1] ? `${g[0]} 至 ${g[1]}` : "";
|
|
20
|
+
});
|
|
21
|
+
onMounted(() => {
|
|
22
|
+
var h, k;
|
|
23
|
+
const g = ((k = (h = e.column.filters) == null ? void 0 : h[0]) == null ? void 0 : k.data) || [];
|
|
24
|
+
Array.isArray(g) && g.length === 2 && (c.value = g[0] || "", o.value = g[1] || ""), document.addEventListener("click", m);
|
|
25
|
+
}), onBeforeUnmount(() => {
|
|
26
|
+
document.removeEventListener("click", m);
|
|
27
|
+
});
|
|
28
|
+
const d = () => {
|
|
29
|
+
l.value = !l.value;
|
|
30
|
+
}, m = (g) => {
|
|
31
|
+
var E, B;
|
|
32
|
+
if (!l.value) return;
|
|
33
|
+
const h = g.target, k = s.value, x = (B = (E = u.value) == null ? void 0 : E.popperRef) == null ? void 0 : B.contentRef;
|
|
34
|
+
k && k.contains(h) || x && x.contains(h) || (l.value = !1);
|
|
35
|
+
};
|
|
36
|
+
function _() {
|
|
37
|
+
if (!c.value && !o.value)
|
|
22
38
|
e.column.filters[0].data = [];
|
|
23
|
-
else if (!
|
|
24
|
-
layer.msg("请选择完整的时间范围");
|
|
39
|
+
else if (!c.value || !o.value) {
|
|
40
|
+
layer != null && layer.msg && layer.msg("请选择完整的时间范围");
|
|
25
41
|
return;
|
|
26
42
|
} else
|
|
27
|
-
e.column.filters[0].data = [
|
|
28
|
-
l.value
|
|
43
|
+
e.column.filters[0].data = [c.value, o.value];
|
|
44
|
+
l.value = !1, r("FilterSearch", e.column);
|
|
29
45
|
}
|
|
30
|
-
function
|
|
31
|
-
|
|
46
|
+
function y() {
|
|
47
|
+
c.value = "", o.value = "", e.column.filters[0].data = [];
|
|
32
48
|
}
|
|
33
|
-
return (
|
|
49
|
+
return (g, h) => (openBlock(), createElementBlock("div", {
|
|
34
50
|
class: "size-full",
|
|
35
|
-
title:
|
|
51
|
+
title: i.value,
|
|
52
|
+
ref_key: "wrapperRef",
|
|
53
|
+
ref: s
|
|
36
54
|
}, [
|
|
37
|
-
|
|
55
|
+
createVNode(unref(ElInput), {
|
|
38
56
|
ref_key: "inputRef",
|
|
39
|
-
ref:
|
|
40
|
-
value:
|
|
41
|
-
readonly: ""
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
]),
|
|
57
|
+
ref: a,
|
|
58
|
+
value: i.value,
|
|
59
|
+
readonly: "",
|
|
60
|
+
onClick: d
|
|
61
|
+
}, null, 8, ["value"]),
|
|
45
62
|
createVNode(unref(ElPopover), {
|
|
46
63
|
ref_key: "popoverRef",
|
|
47
|
-
ref:
|
|
48
|
-
"virtual-ref":
|
|
49
|
-
trigger: "click",
|
|
64
|
+
ref: u,
|
|
65
|
+
"virtual-ref": a.value,
|
|
50
66
|
"virtual-triggering": "",
|
|
67
|
+
trigger: "manual",
|
|
68
|
+
visible: l.value,
|
|
69
|
+
"onUpdate:visible": h[2] || (h[2] = (k) => l.value = k),
|
|
51
70
|
"hide-after": 0,
|
|
52
|
-
width: "
|
|
71
|
+
width: "140",
|
|
72
|
+
"popper-class": "date-filter-popper"
|
|
53
73
|
}, {
|
|
54
74
|
default: withCtx(() => [
|
|
55
75
|
createElementVNode("div", _hoisted_2$7, [
|
|
76
|
+
createVNode(unref(ElDatePicker), {
|
|
77
|
+
modelValue: c.value,
|
|
78
|
+
"onUpdate:modelValue": h[0] || (h[0] = (k) => c.value = k),
|
|
79
|
+
type: "date",
|
|
80
|
+
"value-format": "YYYY-MM-DD",
|
|
81
|
+
placeholder: "开始日期",
|
|
82
|
+
size: "small",
|
|
83
|
+
teleported: !1,
|
|
84
|
+
style: { width: "100%" }
|
|
85
|
+
}, null, 8, ["modelValue"]),
|
|
86
|
+
createVNode(unref(ElDatePicker), {
|
|
87
|
+
modelValue: o.value,
|
|
88
|
+
"onUpdate:modelValue": h[1] || (h[1] = (k) => o.value = k),
|
|
89
|
+
type: "date",
|
|
90
|
+
"value-format": "YYYY-MM-DD",
|
|
91
|
+
placeholder: "结束日期",
|
|
92
|
+
size: "small",
|
|
93
|
+
teleported: !1,
|
|
94
|
+
style: { width: "100%" }
|
|
95
|
+
}, null, 8, ["modelValue"]),
|
|
56
96
|
createElementVNode("div", _hoisted_3$5, [
|
|
57
|
-
createVNode(unref(VxeInput), {
|
|
58
|
-
modelValue: r.value[0],
|
|
59
|
-
"onUpdate:modelValue": d[0] || (d[0] = (_) => r.value[0] = _),
|
|
60
|
-
type: a.column.params.DateType || "date"
|
|
61
|
-
}, null, 8, ["modelValue", "type"]),
|
|
62
|
-
createVNode(unref(VxeInput), {
|
|
63
|
-
modelValue: r.value[1],
|
|
64
|
-
"onUpdate:modelValue": d[1] || (d[1] = (_) => r.value[1] = _),
|
|
65
|
-
type: a.column.params.DateType || "date"
|
|
66
|
-
}, null, 8, ["modelValue", "type"])
|
|
67
|
-
]),
|
|
68
|
-
createElementVNode("div", _hoisted_4$2, [
|
|
69
97
|
createVNode(unref(ElButton), {
|
|
70
98
|
size: "small",
|
|
71
99
|
type: "primary",
|
|
72
|
-
|
|
100
|
+
class: "btn-confirm",
|
|
101
|
+
onClick: _
|
|
73
102
|
}, {
|
|
74
|
-
default: withCtx(() =>
|
|
75
|
-
createTextVNode("确认")
|
|
103
|
+
default: withCtx(() => h[3] || (h[3] = [
|
|
104
|
+
createTextVNode(" 确认 ")
|
|
76
105
|
])),
|
|
77
106
|
_: 1
|
|
78
107
|
}),
|
|
79
108
|
createVNode(unref(ElButton), {
|
|
80
109
|
size: "small",
|
|
81
|
-
|
|
110
|
+
class: "btn-reset",
|
|
111
|
+
onClick: y
|
|
82
112
|
}, {
|
|
83
|
-
default: withCtx(() =>
|
|
84
|
-
createTextVNode("重置")
|
|
113
|
+
default: withCtx(() => h[4] || (h[4] = [
|
|
114
|
+
createTextVNode(" 重置 ")
|
|
85
115
|
])),
|
|
86
116
|
_: 1
|
|
87
117
|
})
|
|
@@ -89,10 +119,10 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
89
119
|
])
|
|
90
120
|
]),
|
|
91
121
|
_: 1
|
|
92
|
-
}, 8, ["virtual-ref"])
|
|
122
|
+
}, 8, ["virtual-ref", "visible"])
|
|
93
123
|
], 8, _hoisted_1$j));
|
|
94
124
|
}
|
|
95
|
-
}, _hoisted_1$i = ["title"], _sfc_main$y = {
|
|
125
|
+
}, FilterDate = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-3d74a4cf"]]), _hoisted_1$i = ["title"], _sfc_main$y = {
|
|
96
126
|
__name: "filter-boolean",
|
|
97
127
|
props: {
|
|
98
128
|
column: {
|
|
@@ -101,15 +131,15 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
101
131
|
}
|
|
102
132
|
},
|
|
103
133
|
emits: ["FilterSearch"],
|
|
104
|
-
setup(
|
|
105
|
-
const e =
|
|
106
|
-
var
|
|
107
|
-
(
|
|
108
|
-
},
|
|
109
|
-
function
|
|
134
|
+
setup(n, { emit: t }) {
|
|
135
|
+
const e = n, r = ref([]), c = computed(() => e.column.filters[0].data.length ? e.column.filters[0].data.map((i) => i ? "是" : "否").join(",") : ""), o = ref(), l = ref(), a = () => {
|
|
136
|
+
var i, d;
|
|
137
|
+
(d = (i = unref(l).popperRef) == null ? void 0 : i.delayHide) == null || d.call(i);
|
|
138
|
+
}, u = t;
|
|
139
|
+
function s() {
|
|
110
140
|
r.value.length ? e.column.filters[0].data = [...r.value] : e.column.filters[0].data = [];
|
|
111
141
|
}
|
|
112
|
-
return (
|
|
142
|
+
return (i, d) => (openBlock(), createElementBlock("div", {
|
|
113
143
|
class: "size-full",
|
|
114
144
|
title: c.value
|
|
115
145
|
}, [
|
|
@@ -118,9 +148,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
118
148
|
ref: o,
|
|
119
149
|
value: c.value,
|
|
120
150
|
readonly: "",
|
|
121
|
-
onKeyup:
|
|
151
|
+
onKeyup: d[0] || (d[0] = withKeys((m) => u("FilterSearch", n.column), ["enter"]))
|
|
122
152
|
}, null, 8, ["value"]), [
|
|
123
|
-
[unref(ClickOutside),
|
|
153
|
+
[unref(ClickOutside), a]
|
|
124
154
|
]),
|
|
125
155
|
createVNode(unref(ElPopover), {
|
|
126
156
|
ref_key: "popoverRef",
|
|
@@ -134,8 +164,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
134
164
|
createVNode(unref(ElCheckboxGroup), {
|
|
135
165
|
class: "flex flex-col",
|
|
136
166
|
modelValue: r.value,
|
|
137
|
-
"onUpdate:modelValue":
|
|
138
|
-
onChange:
|
|
167
|
+
"onUpdate:modelValue": d[1] || (d[1] = (m) => r.value = m),
|
|
168
|
+
onChange: s
|
|
139
169
|
}, {
|
|
140
170
|
default: withCtx(() => [
|
|
141
171
|
createVNode(unref(ElCheckbox), {
|
|
@@ -163,20 +193,20 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
163
193
|
}
|
|
164
194
|
},
|
|
165
195
|
emits: ["FilterSearch"],
|
|
166
|
-
setup(
|
|
167
|
-
const e =
|
|
196
|
+
setup(n, { emit: t }) {
|
|
197
|
+
const e = n, r = ref([]);
|
|
168
198
|
ref("");
|
|
169
|
-
const c = computed(() => e.column.filters[0].data.length ? e.column.filters[0].data.map((
|
|
170
|
-
var
|
|
171
|
-
return (
|
|
172
|
-
}).join(",") : ""), o = ref(), l = ref(),
|
|
173
|
-
var
|
|
174
|
-
(
|
|
175
|
-
},
|
|
176
|
-
function
|
|
199
|
+
const c = computed(() => e.column.filters && e.column.filters[0].data.length ? e.column.filters[0].data.map((i) => {
|
|
200
|
+
var d;
|
|
201
|
+
return (d = e.column.params.options.find((m) => m.value === i)) == null ? void 0 : d.label;
|
|
202
|
+
}).join(",") : ""), o = ref(), l = ref(), a = () => {
|
|
203
|
+
var i, d;
|
|
204
|
+
(d = (i = unref(l).popperRef) == null ? void 0 : i.delayHide) == null || d.call(i);
|
|
205
|
+
}, u = t;
|
|
206
|
+
function s() {
|
|
177
207
|
r.value.length ? e.column.filters[0].data = [...r.value] : e.column.filters[0].data = [];
|
|
178
208
|
}
|
|
179
|
-
return (
|
|
209
|
+
return (i, d) => (openBlock(), createElementBlock("div", {
|
|
180
210
|
class: "size-full",
|
|
181
211
|
title: c.value
|
|
182
212
|
}, [
|
|
@@ -185,9 +215,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
185
215
|
ref: o,
|
|
186
216
|
value: c.value,
|
|
187
217
|
readonly: "",
|
|
188
|
-
onKeyup:
|
|
218
|
+
onKeyup: d[0] || (d[0] = withKeys((m) => u("FilterSearch", n.column), ["enter"]))
|
|
189
219
|
}, null, 8, ["value"]), [
|
|
190
|
-
[unref(ClickOutside),
|
|
220
|
+
[unref(ClickOutside), a]
|
|
191
221
|
]),
|
|
192
222
|
createVNode(unref(ElPopover), {
|
|
193
223
|
ref_key: "popoverRef",
|
|
@@ -198,34 +228,34 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
198
228
|
"hide-after": 0
|
|
199
229
|
}, {
|
|
200
230
|
default: withCtx(() => [
|
|
201
|
-
|
|
231
|
+
n.column.params.FieldType === "check" ? (openBlock(), createBlock(unref(ElCheckboxGroup), {
|
|
202
232
|
key: 0,
|
|
203
233
|
class: "flex flex-col",
|
|
204
234
|
modelValue: r.value,
|
|
205
|
-
"onUpdate:modelValue":
|
|
206
|
-
onChange:
|
|
235
|
+
"onUpdate:modelValue": d[1] || (d[1] = (m) => r.value = m),
|
|
236
|
+
onChange: s
|
|
207
237
|
}, {
|
|
208
238
|
default: withCtx(() => [
|
|
209
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
210
|
-
key:
|
|
211
|
-
label:
|
|
212
|
-
value:
|
|
239
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.column.params.options, (m) => (openBlock(), createBlock(unref(ElCheckbox), {
|
|
240
|
+
key: m.value,
|
|
241
|
+
label: m.label,
|
|
242
|
+
value: m.value
|
|
213
243
|
}, null, 8, ["label", "value"]))), 128))
|
|
214
244
|
]),
|
|
215
245
|
_: 1
|
|
216
246
|
}, 8, ["modelValue"])) : createCommentVNode("", !0),
|
|
217
|
-
|
|
247
|
+
n.column.params.FieldType === "select" ? (openBlock(), createBlock(unref(ElCheckboxGroup), {
|
|
218
248
|
key: 1,
|
|
219
249
|
class: "flex flex-col",
|
|
220
250
|
modelValue: r.value,
|
|
221
|
-
"onUpdate:modelValue":
|
|
222
|
-
onChange:
|
|
251
|
+
"onUpdate:modelValue": d[2] || (d[2] = (m) => r.value = m),
|
|
252
|
+
onChange: s
|
|
223
253
|
}, {
|
|
224
254
|
default: withCtx(() => [
|
|
225
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
226
|
-
key:
|
|
227
|
-
label:
|
|
228
|
-
value:
|
|
255
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.column.params.options, (m) => (openBlock(), createBlock(unref(ElCheckbox), {
|
|
256
|
+
key: m.value,
|
|
257
|
+
label: m.label,
|
|
258
|
+
value: m.value
|
|
229
259
|
}, null, 8, ["label", "value"]))), 128))
|
|
230
260
|
]),
|
|
231
261
|
_: 1
|
|
@@ -244,35 +274,35 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
244
274
|
}
|
|
245
275
|
},
|
|
246
276
|
emits: ["FilterSearch"],
|
|
247
|
-
setup(
|
|
248
|
-
const e =
|
|
277
|
+
setup(n, { emit: t }) {
|
|
278
|
+
const e = n, r = ref([]), c = ref(null), o = ref(e.column.params.FieldType === "TreeMultipleSelect"), l = ref({
|
|
249
279
|
label: e.column.params.NodeNameField || "label",
|
|
250
280
|
value: e.column.params.NodeValueField || "value",
|
|
251
281
|
children: "children"
|
|
252
282
|
});
|
|
253
283
|
if (!e.column.params.TreeData) {
|
|
254
|
-
const { options:
|
|
255
|
-
e.column.params.TreeData = buildTree(deepClone(
|
|
284
|
+
const { options: s, ParentNodeField: i, NodeKeyField: d } = e.column.params;
|
|
285
|
+
e.column.params.TreeData = buildTree(deepClone(s), i, d);
|
|
256
286
|
}
|
|
257
287
|
onMounted(() => {
|
|
258
288
|
r.value = e.column.params.TreeData;
|
|
259
289
|
});
|
|
260
|
-
const
|
|
261
|
-
function
|
|
290
|
+
const a = t;
|
|
291
|
+
function u() {
|
|
262
292
|
c.value ? e.column.filters[0].data = [c.value] : e.column.filters[0].data = [];
|
|
263
293
|
}
|
|
264
|
-
return (
|
|
294
|
+
return (s, i) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
265
295
|
clearable: "",
|
|
266
296
|
modelValue: c.value,
|
|
267
|
-
"onUpdate:modelValue":
|
|
297
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => c.value = d),
|
|
268
298
|
data: r.value,
|
|
269
299
|
"render-after-expand": !1,
|
|
270
300
|
placeholder: "",
|
|
271
|
-
onChange:
|
|
301
|
+
onChange: u,
|
|
272
302
|
multiple: o.value,
|
|
273
303
|
"show-checkbox": o.value,
|
|
274
304
|
props: l.value,
|
|
275
|
-
onKeyup:
|
|
305
|
+
onKeyup: i[1] || (i[1] = withKeys((d) => a("FilterSearch", n.column), ["enter"]))
|
|
276
306
|
}, null, 8, ["modelValue", "data", "multiple", "show-checkbox", "props"]));
|
|
277
307
|
}
|
|
278
308
|
}, _sfc_main$v = {
|
|
@@ -284,39 +314,39 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
284
314
|
}
|
|
285
315
|
},
|
|
286
316
|
emits: ["FilterSearch"],
|
|
287
|
-
setup(
|
|
288
|
-
const e =
|
|
317
|
+
setup(n, { emit: t }) {
|
|
318
|
+
const e = n, r = ref([]), c = ref([]), o = ref({
|
|
289
319
|
label: e.column.params.NodeNameField || "label",
|
|
290
320
|
value: e.column.params.NodeValueField || "value",
|
|
291
321
|
children: "children"
|
|
292
322
|
});
|
|
293
323
|
if (!e.column.params.TreeData) {
|
|
294
|
-
const { options:
|
|
295
|
-
e.column.params.TreeData = buildTree(deepClone(
|
|
324
|
+
const { options: s, ParentNodeField: i, NodeKeyField: d } = e.column.params;
|
|
325
|
+
e.column.params.TreeData = buildTree(deepClone(s), i, d);
|
|
296
326
|
}
|
|
297
327
|
onMounted(() => {
|
|
298
328
|
r.value = e.column.params.TreeData;
|
|
299
329
|
});
|
|
300
330
|
const l = t;
|
|
301
|
-
function
|
|
331
|
+
function a() {
|
|
302
332
|
c.value ? e.column.filters[0].data = c.value : e.column.filters[0].data = [];
|
|
303
333
|
}
|
|
304
|
-
function
|
|
334
|
+
function u(s) {
|
|
305
335
|
cleanUpTreeFilterRows(), l("FilterSearch", e.column);
|
|
306
336
|
}
|
|
307
|
-
return (
|
|
337
|
+
return (s, i) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
308
338
|
"popper-class": "tree-filter-row",
|
|
309
339
|
clearable: "",
|
|
310
340
|
modelValue: c.value,
|
|
311
|
-
"onUpdate:modelValue":
|
|
341
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => c.value = d),
|
|
312
342
|
data: r.value,
|
|
313
343
|
placeholder: "",
|
|
314
|
-
onChange:
|
|
344
|
+
onChange: a,
|
|
315
345
|
multiple: "",
|
|
316
346
|
"show-checkbox": "",
|
|
317
347
|
"collapse-tags": "",
|
|
318
348
|
"collapse-tags-tooltip": "",
|
|
319
|
-
onKeyup: withKeys(
|
|
349
|
+
onKeyup: withKeys(u, ["enter"]),
|
|
320
350
|
props: o.value
|
|
321
351
|
}, null, 8, ["modelValue", "data", "props"]));
|
|
322
352
|
}
|
|
@@ -329,12 +359,12 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
329
359
|
}
|
|
330
360
|
},
|
|
331
361
|
emits: ["FilterSearch"],
|
|
332
|
-
setup(
|
|
333
|
-
const e =
|
|
334
|
-
var
|
|
335
|
-
(
|
|
336
|
-
},
|
|
337
|
-
function
|
|
362
|
+
setup(n, { emit: t }) {
|
|
363
|
+
const e = n, r = ref([null, null]), c = computed(() => e.column.filters && e.column.filters[0].data.length ? e.column.filters[0].data.join(" 至 ") : ""), o = ref(), l = ref(), a = () => {
|
|
364
|
+
var d, m;
|
|
365
|
+
(m = (d = unref(l).popperRef) == null ? void 0 : d.delayHide) == null || m.call(d);
|
|
366
|
+
}, u = t;
|
|
367
|
+
function s() {
|
|
338
368
|
if (!r.value[0] && !r.value[1])
|
|
339
369
|
e.column.filters[0].data = [];
|
|
340
370
|
else if (!r.value[0] || !r.value[1]) {
|
|
@@ -342,12 +372,12 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
342
372
|
return;
|
|
343
373
|
} else
|
|
344
374
|
e.column.filters[0].data = [...r.value];
|
|
345
|
-
l.value.hide(),
|
|
375
|
+
l.value.hide(), u("FilterSearch", e.column);
|
|
346
376
|
}
|
|
347
|
-
function
|
|
377
|
+
function i() {
|
|
348
378
|
r.value = [null, null];
|
|
349
379
|
}
|
|
350
|
-
return (
|
|
380
|
+
return (d, m) => (openBlock(), createElementBlock("div", {
|
|
351
381
|
class: "size-full",
|
|
352
382
|
title: c.value
|
|
353
383
|
}, [
|
|
@@ -356,9 +386,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
356
386
|
ref: o,
|
|
357
387
|
value: c.value,
|
|
358
388
|
readonly: "",
|
|
359
|
-
onKeyup:
|
|
389
|
+
onKeyup: m[0] || (m[0] = withKeys((_) => u("FilterSearch", n.column), ["enter"]))
|
|
360
390
|
}, null, 8, ["value"]), [
|
|
361
|
-
[unref(ClickOutside),
|
|
391
|
+
[unref(ClickOutside), a]
|
|
362
392
|
]),
|
|
363
393
|
createVNode(unref(ElPopover), {
|
|
364
394
|
ref_key: "popoverRef",
|
|
@@ -373,30 +403,30 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
373
403
|
createVNode(unref(ElInputNumber), {
|
|
374
404
|
class: "w-full",
|
|
375
405
|
modelValue: r.value[0],
|
|
376
|
-
"onUpdate:modelValue":
|
|
406
|
+
"onUpdate:modelValue": m[1] || (m[1] = (_) => r.value[0] = _)
|
|
377
407
|
}, null, 8, ["modelValue"]),
|
|
378
408
|
createVNode(unref(ElInputNumber), {
|
|
379
409
|
class: "w-full",
|
|
380
410
|
modelValue: r.value[1],
|
|
381
|
-
"onUpdate:modelValue":
|
|
411
|
+
"onUpdate:modelValue": m[2] || (m[2] = (_) => r.value[1] = _)
|
|
382
412
|
}, null, 8, ["modelValue"])
|
|
383
413
|
]),
|
|
384
414
|
createElementVNode("div", _hoisted_3$4, [
|
|
385
415
|
createVNode(unref(ElButton), {
|
|
386
416
|
size: "small",
|
|
387
417
|
type: "primary",
|
|
388
|
-
onClick:
|
|
418
|
+
onClick: s
|
|
389
419
|
}, {
|
|
390
|
-
default: withCtx(() =>
|
|
420
|
+
default: withCtx(() => m[3] || (m[3] = [
|
|
391
421
|
createTextVNode("确认")
|
|
392
422
|
])),
|
|
393
423
|
_: 1
|
|
394
424
|
}),
|
|
395
425
|
createVNode(unref(ElButton), {
|
|
396
426
|
size: "small",
|
|
397
|
-
onClick:
|
|
427
|
+
onClick: i
|
|
398
428
|
}, {
|
|
399
|
-
default: withCtx(() =>
|
|
429
|
+
default: withCtx(() => m[4] || (m[4] = [
|
|
400
430
|
createTextVNode("重置")
|
|
401
431
|
])),
|
|
402
432
|
_: 1
|
|
@@ -423,66 +453,66 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
423
453
|
}
|
|
424
454
|
},
|
|
425
455
|
emits: ["FilterSearch", "SortChange"],
|
|
426
|
-
setup(
|
|
427
|
-
const e =
|
|
456
|
+
setup(n, { emit: t }) {
|
|
457
|
+
const e = n, r = ref([]);
|
|
428
458
|
let c = ref(0);
|
|
429
459
|
onMounted(() => {
|
|
430
460
|
if (e.column.params.filter) {
|
|
431
|
-
const
|
|
432
|
-
useElementClientSize(
|
|
433
|
-
c.value =
|
|
461
|
+
const u = document.querySelector(`[colid=${e.column.id}]`);
|
|
462
|
+
useElementClientSize(u, ({ clientHeight: s }) => {
|
|
463
|
+
c.value = s <= 40 ? 65 : s;
|
|
434
464
|
});
|
|
435
465
|
} else
|
|
436
|
-
c.value =
|
|
466
|
+
c.value = 23;
|
|
437
467
|
r.value = e.column.params.TreeData;
|
|
438
468
|
});
|
|
439
469
|
const o = t;
|
|
440
|
-
function l(
|
|
441
|
-
if (
|
|
442
|
-
const
|
|
443
|
-
o("FilterSearch", e.column,
|
|
444
|
-
} else if (
|
|
445
|
-
e.column.filters.forEach((
|
|
446
|
-
Array.isArray(
|
|
470
|
+
function l(u) {
|
|
471
|
+
if (u === "search") {
|
|
472
|
+
const s = e.gridRef.getColumns();
|
|
473
|
+
o("FilterSearch", e.column, s);
|
|
474
|
+
} else if (u === "clear") {
|
|
475
|
+
e.column.filters.forEach((i) => {
|
|
476
|
+
Array.isArray(i.data) ? i.data = [] : i.data = "";
|
|
447
477
|
});
|
|
448
|
-
const
|
|
449
|
-
o("FilterSearch", e.column,
|
|
450
|
-
} else if (
|
|
451
|
-
const
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
Array.isArray(
|
|
478
|
+
const s = e.gridRef.getColumns();
|
|
479
|
+
o("FilterSearch", e.column, s);
|
|
480
|
+
} else if (u === "clearAll") {
|
|
481
|
+
const s = e.gridRef.getColumns();
|
|
482
|
+
s.forEach((i) => {
|
|
483
|
+
i.filters && i.filters.forEach((d) => {
|
|
484
|
+
Array.isArray(d.data) ? d.data = [] : d.data = "";
|
|
455
485
|
});
|
|
456
|
-
}), o("FilterSearch", e.column,
|
|
486
|
+
}), o("FilterSearch", e.column, s);
|
|
457
487
|
}
|
|
458
488
|
}
|
|
459
|
-
function
|
|
460
|
-
var
|
|
461
|
-
(
|
|
489
|
+
function a() {
|
|
490
|
+
var u, s;
|
|
491
|
+
(u = e.column.params) != null && u.IsVirtualField || ((s = e.column).params ?? (s.params = {}), e.column.params.sortStatus === "asc" ? e.column.params.sortStatus = "desc" : e.column.params.sortStatus === "desc" ? e.column.params.sortStatus = null : e.column.params.sortStatus = "asc", o("SortChange", e.column, e.gridRef.getColumns()));
|
|
462
492
|
}
|
|
463
|
-
return (
|
|
464
|
-
var
|
|
493
|
+
return (u, s) => {
|
|
494
|
+
var i, d, m;
|
|
465
495
|
return openBlock(), createElementBlock("div", {
|
|
466
496
|
class: "flex flex-col filter-header",
|
|
467
|
-
title:
|
|
497
|
+
title: n.column.title,
|
|
468
498
|
style: normalizeStyle({ height: unref(c) ? unref(c) + "px" : void 0 })
|
|
469
499
|
}, [
|
|
470
500
|
createElementVNode("div", {
|
|
471
|
-
class: normalizeClass(["filter-title h-full lh-9 flex justify-center items-center gap-1", { "filter-title-border": (
|
|
472
|
-
onClick:
|
|
501
|
+
class: normalizeClass(["filter-title h-full lh-9 flex justify-center items-center gap-1", { "filter-title-border": (i = n.column.params) == null ? void 0 : i.filter }]),
|
|
502
|
+
onClick: a
|
|
473
503
|
}, [
|
|
474
504
|
createElementVNode("span", {
|
|
475
|
-
style: normalizeStyle({ color:
|
|
505
|
+
style: normalizeStyle({ color: n.column.params.Required ? "red" : "" }),
|
|
476
506
|
class: "whitespace-nowrap overflow-hidden text-ellipsis"
|
|
477
|
-
}, toDisplayString(
|
|
478
|
-
(
|
|
507
|
+
}, toDisplayString(n.column.title), 5),
|
|
508
|
+
(d = n.column.params) != null && d.sortable && ((m = n.column.params) != null && m.sortStatus) ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
|
479
509
|
default: withCtx(() => {
|
|
480
510
|
var _, y;
|
|
481
511
|
return [
|
|
482
|
-
((_ =
|
|
512
|
+
((_ = n.column.params) == null ? void 0 : _.sortStatus) === "asc" ? (openBlock(), createBlock(unref(HrIcon), {
|
|
483
513
|
key: 0,
|
|
484
514
|
icon: "ep:caret-top"
|
|
485
|
-
})) : ((y =
|
|
515
|
+
})) : ((y = n.column.params) == null ? void 0 : y.sortStatus) === "desc" ? (openBlock(), createBlock(unref(HrIcon), {
|
|
486
516
|
key: 1,
|
|
487
517
|
icon: "ep:caret-bottom"
|
|
488
518
|
})) : createCommentVNode("", !0)
|
|
@@ -491,37 +521,37 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
491
521
|
_: 1
|
|
492
522
|
})) : createCommentVNode("", !0)
|
|
493
523
|
], 2),
|
|
494
|
-
|
|
495
|
-
["radio_Table", "bool"].includes(
|
|
524
|
+
n.column.params.filter ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
|
|
525
|
+
["radio_Table", "bool"].includes(n.column.params.FieldType) ? (openBlock(), createBlock(_sfc_main$y, {
|
|
496
526
|
key: 0,
|
|
497
|
-
column:
|
|
498
|
-
onFilterSearch:
|
|
499
|
-
}, null, 8, ["column"])) : ["select", "check"].includes(
|
|
527
|
+
column: n.column,
|
|
528
|
+
onFilterSearch: s[0] || (s[0] = (_) => l("search"))
|
|
529
|
+
}, null, 8, ["column"])) : ["select", "check"].includes(n.column.params.FieldType) ? (openBlock(), createBlock(_sfc_main$x, {
|
|
500
530
|
key: 1,
|
|
501
|
-
column:
|
|
502
|
-
onFilterSearch:
|
|
503
|
-
}, null, 8, ["column"])) :
|
|
531
|
+
column: n.column,
|
|
532
|
+
onFilterSearch: s[1] || (s[1] = (_) => l("search"))
|
|
533
|
+
}, null, 8, ["column"])) : n.column.params.FieldType === "date" ? (openBlock(), createBlock(FilterDate, {
|
|
504
534
|
key: 2,
|
|
505
|
-
column:
|
|
506
|
-
onFilterSearch:
|
|
507
|
-
}, null, 8, ["column"])) :
|
|
535
|
+
column: n.column,
|
|
536
|
+
onFilterSearch: s[2] || (s[2] = (_) => l("search"))
|
|
537
|
+
}, null, 8, ["column"])) : n.column.params.FieldType === "tree" ? (openBlock(), createBlock(_sfc_main$w, {
|
|
508
538
|
key: 3,
|
|
509
|
-
column:
|
|
510
|
-
onFilterSearch:
|
|
511
|
-
}, null, 8, ["column"])) :
|
|
539
|
+
column: n.column,
|
|
540
|
+
onFilterSearch: s[3] || (s[3] = (_) => l("search"))
|
|
541
|
+
}, null, 8, ["column"])) : n.column.params.FieldType === "TreeMultipleSelect" ? (openBlock(), createBlock(_sfc_main$v, {
|
|
512
542
|
key: 4,
|
|
513
|
-
column:
|
|
514
|
-
onFilterSearch:
|
|
515
|
-
}, null, 8, ["column"])) :
|
|
543
|
+
column: n.column,
|
|
544
|
+
onFilterSearch: s[4] || (s[4] = (_) => l("search"))
|
|
545
|
+
}, null, 8, ["column"])) : n.column.params.FieldType === "inputNumber" ? (openBlock(), createBlock(_sfc_main$u, {
|
|
516
546
|
key: 5,
|
|
517
|
-
column:
|
|
518
|
-
onFilterSearch:
|
|
519
|
-
}, null, 8, ["column"])) : (openBlock(!0), createElementBlock(Fragment, { key: 6 }, renderList(
|
|
547
|
+
column: n.column,
|
|
548
|
+
onFilterSearch: s[5] || (s[5] = (_) => l("search"))
|
|
549
|
+
}, null, 8, ["column"])) : (openBlock(!0), createElementBlock(Fragment, { key: 6 }, renderList(n.column.filters, (_, y) => (openBlock(), createBlock(unref(ElInput), {
|
|
520
550
|
key: y,
|
|
521
551
|
modelValue: _.data,
|
|
522
|
-
"onUpdate:modelValue": (
|
|
523
|
-
onKeyup:
|
|
524
|
-
disabled: ["colorPicker", "iconPicker", "progress"].includes(
|
|
552
|
+
"onUpdate:modelValue": (g) => _.data = g,
|
|
553
|
+
onKeyup: s[6] || (s[6] = withKeys((g) => l("search"), ["enter"])),
|
|
554
|
+
disabled: ["colorPicker", "iconPicker", "progress"].includes(n.column.params.FieldType)
|
|
525
555
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"]))), 128)),
|
|
526
556
|
createVNode(unref(ElDropdown), {
|
|
527
557
|
class: "pr2 pt1",
|
|
@@ -533,19 +563,19 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
533
563
|
createVNode(unref(ElDropdownMenu), null, {
|
|
534
564
|
default: withCtx(() => [
|
|
535
565
|
createVNode(unref(ElDropdownItem), { command: "search" }, {
|
|
536
|
-
default: withCtx(() =>
|
|
566
|
+
default: withCtx(() => s[7] || (s[7] = [
|
|
537
567
|
createTextVNode("执行查询")
|
|
538
568
|
])),
|
|
539
569
|
_: 1
|
|
540
570
|
}),
|
|
541
571
|
createVNode(unref(ElDropdownItem), { command: "clear" }, {
|
|
542
|
-
default: withCtx(() =>
|
|
572
|
+
default: withCtx(() => s[8] || (s[8] = [
|
|
543
573
|
createTextVNode("清除当前条件")
|
|
544
574
|
])),
|
|
545
575
|
_: 1
|
|
546
576
|
}),
|
|
547
577
|
createVNode(unref(ElDropdownItem), { command: "clearAll" }, {
|
|
548
|
-
default: withCtx(() =>
|
|
578
|
+
default: withCtx(() => s[9] || (s[9] = [
|
|
549
579
|
createTextVNode("清除所有条件")
|
|
550
580
|
])),
|
|
551
581
|
_: 1
|
|
@@ -593,8 +623,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
593
623
|
}
|
|
594
624
|
},
|
|
595
625
|
emits: ["change", "ActionClick", "ActionRenderBefore"],
|
|
596
|
-
setup(
|
|
597
|
-
const e =
|
|
626
|
+
setup(n, { emit: t }) {
|
|
627
|
+
const e = n;
|
|
598
628
|
let r = ref(
|
|
599
629
|
deepClone(e.column.params.LinkButton ? e.column.params.LinkButton : [])
|
|
600
630
|
);
|
|
@@ -622,19 +652,19 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
622
652
|
gridRef: e.gridRef
|
|
623
653
|
});
|
|
624
654
|
}
|
|
625
|
-
return (l,
|
|
626
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(r), (
|
|
627
|
-
key:
|
|
655
|
+
return (l, a) => (openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
656
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(r), (u) => withDirectives((openBlock(), createBlock(unref(ElButton), {
|
|
657
|
+
key: u.Name,
|
|
628
658
|
class: "!text-[12px]",
|
|
629
659
|
link: "",
|
|
630
|
-
onClick: (
|
|
660
|
+
onClick: (s) => o(u)
|
|
631
661
|
}, {
|
|
632
662
|
default: withCtx(() => [
|
|
633
|
-
createTextVNode(toDisplayString(
|
|
663
|
+
createTextVNode(toDisplayString(u.Name), 1)
|
|
634
664
|
]),
|
|
635
665
|
_: 2
|
|
636
666
|
}, 1032, ["onClick"])), [
|
|
637
|
-
[vShow,
|
|
667
|
+
[vShow, u.hide !== !0]
|
|
638
668
|
])), 128))
|
|
639
669
|
]));
|
|
640
670
|
}
|
|
@@ -660,22 +690,22 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
660
690
|
}
|
|
661
691
|
},
|
|
662
692
|
emits: ["change"],
|
|
663
|
-
setup(
|
|
664
|
-
const e =
|
|
693
|
+
setup(n, { emit: t }) {
|
|
694
|
+
const e = n, r = ref(!!e.row[e.column.field]);
|
|
665
695
|
watchEffect(() => {
|
|
666
696
|
typeof e.row[e.column.field] != "boolean" ? r.value = !!e.row[e.column.field] : r.value = e.row[e.column.field];
|
|
667
697
|
});
|
|
668
698
|
const c = t;
|
|
669
|
-
function o(l,
|
|
670
|
-
|
|
699
|
+
function o(l, a, u) {
|
|
700
|
+
a[u.field] = l, c("change", l, a, u);
|
|
671
701
|
}
|
|
672
|
-
return (l,
|
|
673
|
-
var
|
|
702
|
+
return (l, a) => {
|
|
703
|
+
var u;
|
|
674
704
|
return openBlock(), createBlock(unref(ElCheckbox), {
|
|
675
|
-
disabled: (
|
|
705
|
+
disabled: (u = n.column.params) == null ? void 0 : u.disabled,
|
|
676
706
|
modelValue: r.value,
|
|
677
|
-
"onUpdate:modelValue":
|
|
678
|
-
onChange:
|
|
707
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => r.value = s),
|
|
708
|
+
onChange: a[1] || (a[1] = (s) => o(s, n.row, n.column))
|
|
679
709
|
}, null, 8, ["disabled", "modelValue"]);
|
|
680
710
|
};
|
|
681
711
|
}
|
|
@@ -712,118 +742,118 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
712
742
|
},
|
|
713
743
|
displayValue: String
|
|
714
744
|
},
|
|
715
|
-
setup(
|
|
716
|
-
const t =
|
|
745
|
+
setup(n) {
|
|
746
|
+
const t = n;
|
|
717
747
|
t.column.params.LabelConfig || (t.column.params.LabelConfig = []);
|
|
718
748
|
const e = ref(t.column.params.LabelConfig);
|
|
719
|
-
e.value.forEach((
|
|
720
|
-
|
|
749
|
+
e.value.forEach((i) => {
|
|
750
|
+
i.Value == "true" ? i.Value = !0 : i.Value == "false" && (i.Value = !1);
|
|
721
751
|
});
|
|
722
|
-
const r = computed(() => t.row[t.column.field]), c = computed(() => e.value.find((
|
|
752
|
+
const r = computed(() => t.row[t.column.field]), c = computed(() => e.value.find((i) => i.Value == r.value));
|
|
723
753
|
onMounted(() => {
|
|
724
754
|
t.column.params.LabelAutoColor && !c.value && (r.value || r.value === 0) && e.value.push({
|
|
725
755
|
Value: r.value,
|
|
726
|
-
Color:
|
|
756
|
+
Color: s()
|
|
727
757
|
});
|
|
728
758
|
});
|
|
729
|
-
function o(
|
|
730
|
-
if (!
|
|
731
|
-
let
|
|
732
|
-
if (
|
|
733
|
-
|
|
734
|
-
else if (
|
|
735
|
-
const
|
|
736
|
-
|
|
737
|
-
} else if (
|
|
738
|
-
const
|
|
739
|
-
if (
|
|
740
|
-
const
|
|
741
|
-
if (
|
|
742
|
-
|
|
759
|
+
function o(i) {
|
|
760
|
+
if (!i) return;
|
|
761
|
+
let d, m, _, y = 1;
|
|
762
|
+
if (i.startsWith("#"))
|
|
763
|
+
i = i.slice(1), i.length === 3 ? (d = parseInt(i[0] + i[0], 16), m = parseInt(i[1] + i[1], 16), _ = parseInt(i[2] + i[2], 16)) : i.length === 6 && (d = parseInt(i.slice(0, 2), 16), m = parseInt(i.slice(2, 4), 16), _ = parseInt(i.slice(4, 6), 16));
|
|
764
|
+
else if (i.startsWith("rgb")) {
|
|
765
|
+
const g = i.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);
|
|
766
|
+
g && (d = parseInt(g[1]), m = parseInt(g[2]), _ = parseInt(g[3]), g[4] && (y = parseFloat(g[4])));
|
|
767
|
+
} else if (i.startsWith("hsl")) {
|
|
768
|
+
const g = i.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%(?:,\s*(\d*\.?\d+))?\)/);
|
|
769
|
+
if (g) {
|
|
770
|
+
const h = parseInt(g[1]) / 360, k = parseInt(g[2]) / 100, x = parseInt(g[3]) / 100;
|
|
771
|
+
if (g[4] && (y = parseFloat(g[4])), k === 0)
|
|
772
|
+
d = m = _ = x * 255;
|
|
743
773
|
else {
|
|
744
|
-
const
|
|
745
|
-
|
|
774
|
+
const E = (V, R, j) => (j < 0 && (j += 1), j > 1 && (j -= 1), j < 0.16666666666666666 ? V + (R - V) * 6 * j : j < 0.5 ? R : j < 0.6666666666666666 ? V + (R - V) * (0.6666666666666666 - j) * 6 : V), B = x < 0.5 ? x * (1 + k) : x + k - x * k, C = 2 * x - B;
|
|
775
|
+
d = E(C, B, h + 1 / 3) * 255, m = E(C, B, h) * 255, _ = E(C, B, h - 1 / 3) * 255;
|
|
746
776
|
}
|
|
747
777
|
}
|
|
748
778
|
}
|
|
749
|
-
return { r:
|
|
779
|
+
return { r: d, g: m, b: _, a: y };
|
|
750
780
|
}
|
|
751
|
-
function l(
|
|
752
|
-
|
|
753
|
-
const _ = Math.max(
|
|
754
|
-
let
|
|
781
|
+
function l(i, d, m) {
|
|
782
|
+
i /= 255, d /= 255, m /= 255;
|
|
783
|
+
const _ = Math.max(i, d, m), y = Math.min(i, d, m);
|
|
784
|
+
let g, h, k = (_ + y) / 2;
|
|
755
785
|
if (_ === y)
|
|
756
|
-
|
|
786
|
+
g = h = 0;
|
|
757
787
|
else {
|
|
758
788
|
const x = _ - y;
|
|
759
|
-
switch (
|
|
760
|
-
case
|
|
761
|
-
|
|
762
|
-
break;
|
|
763
|
-
case s:
|
|
764
|
-
h = (d - u) / x + 2;
|
|
789
|
+
switch (h = k > 0.5 ? x / (2 - _ - y) : x / (_ + y), _) {
|
|
790
|
+
case i:
|
|
791
|
+
g = (d - m) / x + (d < m ? 6 : 0);
|
|
765
792
|
break;
|
|
766
793
|
case d:
|
|
767
|
-
|
|
794
|
+
g = (m - i) / x + 2;
|
|
795
|
+
break;
|
|
796
|
+
case m:
|
|
797
|
+
g = (i - d) / x + 4;
|
|
768
798
|
break;
|
|
769
799
|
}
|
|
770
|
-
|
|
800
|
+
g /= 6;
|
|
771
801
|
}
|
|
772
|
-
return { h, s:
|
|
802
|
+
return { h: g, s: h, l: k };
|
|
773
803
|
}
|
|
774
|
-
function
|
|
775
|
-
let _, y,
|
|
776
|
-
if (
|
|
777
|
-
_ = y =
|
|
804
|
+
function a(i, d, m) {
|
|
805
|
+
let _, y, g;
|
|
806
|
+
if (d === 0)
|
|
807
|
+
_ = y = g = m;
|
|
778
808
|
else {
|
|
779
|
-
const
|
|
780
|
-
_ =
|
|
809
|
+
const h = (E, B, C) => (C < 0 && (C += 1), C > 1 && (C -= 1), C < 0.16666666666666666 ? E + (B - E) * 6 * C : C < 0.5 ? B : C < 0.6666666666666666 ? E + (B - E) * (0.6666666666666666 - C) * 6 : E), k = m < 0.5 ? m * (1 + d) : m + d - m * d, x = 2 * m - k;
|
|
810
|
+
_ = h(x, k, i + 1 / 3), y = h(x, k, i), g = h(x, k, i - 1 / 3);
|
|
781
811
|
}
|
|
782
|
-
return { r: Math.round(_ * 255), g: Math.round(y * 255), b: Math.round(
|
|
783
|
-
}
|
|
784
|
-
function i
|
|
785
|
-
if (!
|
|
786
|
-
let { r:
|
|
787
|
-
|
|
788
|
-
const { r: x, g:
|
|
789
|
-
return `rgb(${x}, ${
|
|
790
|
-
}
|
|
791
|
-
function
|
|
792
|
-
function
|
|
793
|
-
return Math.floor(Math.random() * (
|
|
812
|
+
return { r: Math.round(_ * 255), g: Math.round(y * 255), b: Math.round(g * 255) };
|
|
813
|
+
}
|
|
814
|
+
function u(i, d) {
|
|
815
|
+
if (!i) return;
|
|
816
|
+
let { r: m, g: _, b: y } = o(i), { h: g, s: h, l: k } = l(m, _, y);
|
|
817
|
+
k = Math.max(0, k - d);
|
|
818
|
+
const { r: x, g: E, b: B } = a(g, h, k);
|
|
819
|
+
return `rgb(${x}, ${E}, ${B})`;
|
|
820
|
+
}
|
|
821
|
+
function s() {
|
|
822
|
+
function i(g, h) {
|
|
823
|
+
return Math.floor(Math.random() * (h - g + 1)) + g;
|
|
794
824
|
}
|
|
795
|
-
const
|
|
796
|
-
return `#${
|
|
825
|
+
const d = i(200, 255), m = i(200, 255), _ = i(200, 255);
|
|
826
|
+
return `#${d.toString(16).padStart(2, "0")}${m.toString(16).padStart(2, "0")}${_.toString(16).padStart(2, "0")}`;
|
|
797
827
|
}
|
|
798
|
-
return (
|
|
799
|
-
const
|
|
828
|
+
return (i, d) => {
|
|
829
|
+
const m = resolveComponent("hr-icon");
|
|
800
830
|
return r.value ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
801
831
|
c.value ? (openBlock(), createBlock(unref(ElTag), {
|
|
802
832
|
key: 0,
|
|
803
833
|
color: c.value.Color,
|
|
804
834
|
size: "small",
|
|
805
|
-
style: normalizeStyle({ borderColor:
|
|
835
|
+
style: normalizeStyle({ borderColor: u(c.value.Color, "0.03") })
|
|
806
836
|
}, {
|
|
807
837
|
default: withCtx(() => [
|
|
808
|
-
c.value.LeftIcon ? (openBlock(), createBlock(
|
|
838
|
+
c.value.LeftIcon ? (openBlock(), createBlock(m, {
|
|
809
839
|
key: 0,
|
|
810
840
|
class: "mr0.25 v-middle mt0.15",
|
|
811
841
|
size: "13",
|
|
812
|
-
color:
|
|
842
|
+
color: u(c.value.Color, "0.3"),
|
|
813
843
|
icon: c.value.LeftIcon
|
|
814
844
|
}, null, 8, ["color", "icon"])) : createCommentVNode("", !0),
|
|
815
|
-
createElementVNode("span", _hoisted_2$4, toDisplayString(
|
|
816
|
-
c.value.RightIcon ? (openBlock(), createBlock(
|
|
845
|
+
createElementVNode("span", _hoisted_2$4, toDisplayString(n.displayValue === void 0 ? r.value : n.displayValue), 1),
|
|
846
|
+
c.value.RightIcon ? (openBlock(), createBlock(m, {
|
|
817
847
|
key: 1,
|
|
818
848
|
class: "ml0.25 v-middle mt0.15",
|
|
819
849
|
size: "13",
|
|
820
|
-
color:
|
|
850
|
+
color: u(c.value.Color, "0.3"),
|
|
821
851
|
icon: c.value.RightIcon
|
|
822
852
|
}, null, 8, ["color", "icon"])) : createCommentVNode("", !0)
|
|
823
853
|
]),
|
|
824
854
|
_: 1
|
|
825
855
|
}, 8, ["color", "style"])) : createCommentVNode("", !0),
|
|
826
|
-
withDirectives(createElementVNode("span", null, toDisplayString(
|
|
856
|
+
withDirectives(createElementVNode("span", null, toDisplayString(n.displayValue === void 0 ? r.value : n.displayValue), 513), [
|
|
827
857
|
[vShow, !c.value]
|
|
828
858
|
])
|
|
829
859
|
])) : (openBlock(), createElementBlock("div", _hoisted_3$2));
|
|
@@ -853,15 +883,15 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
853
883
|
emits: ["change"],
|
|
854
884
|
setup(__props, { emit: __emit }) {
|
|
855
885
|
const props = __props, value = computed(() => props.row[props.column.field]), emit = __emit;
|
|
856
|
-
function handleChange(
|
|
857
|
-
emit("change",
|
|
886
|
+
function handleChange(n, t, e) {
|
|
887
|
+
emit("change", n, t, e);
|
|
858
888
|
}
|
|
859
889
|
function handleChoose(row, column, gridRef) {
|
|
860
|
-
var
|
|
890
|
+
var n;
|
|
861
891
|
let result;
|
|
862
892
|
if (emit("onChooseBefor-Click", column, (t) => {
|
|
863
893
|
result = t;
|
|
864
|
-
}), !result || (
|
|
894
|
+
}), !result || (n = column.params) != null && n.disabled) return;
|
|
865
895
|
let { ChoosePageType, ChoosePageOID, StoredValueField, ReturnValueField, URLParamsObject, URLParamsHook } = props.column.params, urlParams = {}, selectedData = [], layerOptions = {};
|
|
866
896
|
URLParamsObject && Object.assign(urlParams, URLParamsObject), URLParamsHook && Object.assign(urlParams, eval(
|
|
867
897
|
`(function(urlParams, selectedData, layerOptions, row, column){
|
|
@@ -879,7 +909,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
879
909
|
}), handleChange(row[column.field], row, column));
|
|
880
910
|
}, urlParams, selectedData, layerOptions);
|
|
881
911
|
}
|
|
882
|
-
return (
|
|
912
|
+
return (n, t) => (openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
883
913
|
props.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...props, displayValue: value.value })), null, 16)) : (openBlock(), createBlock(unref(ElButton), {
|
|
884
914
|
key: 1,
|
|
885
915
|
class: "!text-[12px]",
|
|
@@ -915,8 +945,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
915
945
|
}
|
|
916
946
|
},
|
|
917
947
|
emits: ["change"],
|
|
918
|
-
setup(
|
|
919
|
-
const e =
|
|
948
|
+
setup(n, { emit: t }) {
|
|
949
|
+
const e = n, r = ref([
|
|
920
950
|
"#409EFF",
|
|
921
951
|
"#67C23A",
|
|
922
952
|
"#E6A23C",
|
|
@@ -958,19 +988,19 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
958
988
|
c.value = isColor(e.row[e.column.field]) ? e.row[e.column.field] : null;
|
|
959
989
|
});
|
|
960
990
|
const o = t;
|
|
961
|
-
function l(
|
|
962
|
-
|
|
991
|
+
function l(a, u, s) {
|
|
992
|
+
u[s.field] = a, o("change", a, u, s);
|
|
963
993
|
}
|
|
964
|
-
return (
|
|
965
|
-
var
|
|
994
|
+
return (a, u) => {
|
|
995
|
+
var s;
|
|
966
996
|
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
967
997
|
createVNode(unref(ElColorPicker), {
|
|
968
|
-
disabled: (
|
|
998
|
+
disabled: (s = n.column.params) == null ? void 0 : s.disabled,
|
|
969
999
|
class: "size-full",
|
|
970
1000
|
modelValue: c.value,
|
|
971
|
-
"onUpdate:modelValue":
|
|
1001
|
+
"onUpdate:modelValue": u[0] || (u[0] = (i) => c.value = i),
|
|
972
1002
|
predefine: r.value,
|
|
973
|
-
onChange:
|
|
1003
|
+
onChange: u[1] || (u[1] = (i) => l(i, n.row, n.column))
|
|
974
1004
|
}, null, 8, ["disabled", "modelValue", "predefine"])
|
|
975
1005
|
]);
|
|
976
1006
|
};
|
|
@@ -996,7 +1026,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
996
1026
|
default: () => ({})
|
|
997
1027
|
}
|
|
998
1028
|
},
|
|
999
|
-
setup(
|
|
1029
|
+
setup(n) {
|
|
1000
1030
|
return (t, e) => (openBlock(), createElementBlock("div", _hoisted_1$a));
|
|
1001
1031
|
}
|
|
1002
1032
|
}), __vite_glob_0_4$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1020,16 +1050,16 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1020
1050
|
default: () => ({})
|
|
1021
1051
|
}
|
|
1022
1052
|
},
|
|
1023
|
-
setup(
|
|
1053
|
+
setup(n) {
|
|
1024
1054
|
dayjs.extend(isoWeek), dayjs.extend(quarterOfYear), dayjs.extend(customParseFormat);
|
|
1025
|
-
const t =
|
|
1026
|
-
var
|
|
1027
|
-
const l = ((
|
|
1055
|
+
const t = n, e = computed(() => {
|
|
1056
|
+
var a;
|
|
1057
|
+
const l = ((a = t.column.params) == null ? void 0 : a.DateType) || "date";
|
|
1028
1058
|
return o(r(t.row[t.column.field], l), l);
|
|
1029
1059
|
});
|
|
1030
|
-
function r(l,
|
|
1060
|
+
function r(l, a) {
|
|
1031
1061
|
if (!l) return null;
|
|
1032
|
-
const
|
|
1062
|
+
const s = {
|
|
1033
1063
|
time: "HH:mm:ss",
|
|
1034
1064
|
date: "YYYY-MM-DD",
|
|
1035
1065
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
@@ -1037,38 +1067,38 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1037
1067
|
month: "YYYY-MM",
|
|
1038
1068
|
quarter: "YYYY-Q",
|
|
1039
1069
|
year: "YYYY"
|
|
1040
|
-
}[
|
|
1041
|
-
if (!
|
|
1042
|
-
let
|
|
1043
|
-
if (l.includes("周") || !
|
|
1044
|
-
const
|
|
1045
|
-
if (
|
|
1046
|
-
const [,
|
|
1047
|
-
|
|
1070
|
+
}[a];
|
|
1071
|
+
if (!s) throw new Error("Unsupported date type");
|
|
1072
|
+
let i = dayjs(l, s);
|
|
1073
|
+
if (l.includes("周") || !i.isValid() && a === "week") {
|
|
1074
|
+
const d = l.match(/^(\d{4})年第(\d{1,2})周$/);
|
|
1075
|
+
if (d) {
|
|
1076
|
+
const [, m, _] = d;
|
|
1077
|
+
i = dayjs(`${m}-01-01`).isoWeek(Number(_));
|
|
1048
1078
|
}
|
|
1049
|
-
} else if (l.includes("季度") || !
|
|
1050
|
-
const
|
|
1051
|
-
if (
|
|
1052
|
-
const [,
|
|
1053
|
-
|
|
1079
|
+
} else if (l.includes("季度") || !i.isValid() && a === "quarter") {
|
|
1080
|
+
const d = l.match(/^(\d{4})年第(\d)季度$/);
|
|
1081
|
+
if (d) {
|
|
1082
|
+
const [, m, _] = d;
|
|
1083
|
+
i = dayjs(`${m}-01-01`).quarter(Number(_));
|
|
1054
1084
|
}
|
|
1055
|
-
} else if (l.includes("月") || !
|
|
1056
|
-
const
|
|
1057
|
-
if (
|
|
1058
|
-
const [,
|
|
1059
|
-
|
|
1085
|
+
} else if (l.includes("月") || !i.isValid() && a === "month") {
|
|
1086
|
+
const d = l.match(/^(\d{4})年(\d{1,2})月$/);
|
|
1087
|
+
if (d) {
|
|
1088
|
+
const [, m, _] = d;
|
|
1089
|
+
i = dayjs(`${m}-${_}-01`);
|
|
1060
1090
|
}
|
|
1061
|
-
} else if (l.includes("年") || !
|
|
1062
|
-
const
|
|
1063
|
-
if (
|
|
1064
|
-
const [,
|
|
1065
|
-
|
|
1091
|
+
} else if (l.includes("年") || !i.isValid() && a === "year") {
|
|
1092
|
+
const d = l.match(/^(\d{4})年$/);
|
|
1093
|
+
if (d) {
|
|
1094
|
+
const [, m] = d;
|
|
1095
|
+
i = dayjs(`${m}-01-01`);
|
|
1066
1096
|
}
|
|
1067
1097
|
}
|
|
1068
|
-
return
|
|
1098
|
+
return i.isValid() ? c(i, a) : null;
|
|
1069
1099
|
}
|
|
1070
|
-
function c(l,
|
|
1071
|
-
switch (
|
|
1100
|
+
function c(l, a) {
|
|
1101
|
+
switch (a) {
|
|
1072
1102
|
case "time":
|
|
1073
1103
|
return l.format("HH:mm:ss");
|
|
1074
1104
|
case "date":
|
|
@@ -1087,9 +1117,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1087
1117
|
return null;
|
|
1088
1118
|
}
|
|
1089
1119
|
}
|
|
1090
|
-
function o(l,
|
|
1120
|
+
function o(l, a) {
|
|
1091
1121
|
if (!l) return "";
|
|
1092
|
-
switch (
|
|
1122
|
+
switch (a) {
|
|
1093
1123
|
case "week":
|
|
1094
1124
|
return `${dayjs(l).year()}年第${dayjs(l).isoWeek()}周`;
|
|
1095
1125
|
case "month":
|
|
@@ -1099,15 +1129,15 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1099
1129
|
case "year":
|
|
1100
1130
|
return `${dayjs(l).year()}年`;
|
|
1101
1131
|
default:
|
|
1102
|
-
const
|
|
1132
|
+
const u = {
|
|
1103
1133
|
time: "HH:mm:ss",
|
|
1104
1134
|
date: "YYYY-MM-DD",
|
|
1105
1135
|
datetime: "YYYY-MM-DD HH:mm:ss"
|
|
1106
1136
|
};
|
|
1107
|
-
return dayjs(l).format(
|
|
1137
|
+
return dayjs(l).format(u[a]);
|
|
1108
1138
|
}
|
|
1109
1139
|
}
|
|
1110
|
-
return (l,
|
|
1140
|
+
return (l, a) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue: e.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1111
1141
|
key: 1,
|
|
1112
1142
|
title: e.value
|
|
1113
1143
|
}, toDisplayString(e.value), 9, _hoisted_1$9));
|
|
@@ -1137,7 +1167,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1137
1167
|
}
|
|
1138
1168
|
},
|
|
1139
1169
|
emits: ["file-click"],
|
|
1140
|
-
setup(
|
|
1170
|
+
setup(n, { emit: t }) {
|
|
1141
1171
|
const e = t;
|
|
1142
1172
|
function r(c) {
|
|
1143
1173
|
["jpg", "jpeg", "png", "gif", "bmp", "svg"].includes(c.FileType.toLowerCase()) || e("file-click", c);
|
|
@@ -1145,28 +1175,28 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1145
1175
|
return (c, o) => {
|
|
1146
1176
|
const l = resolveDirective("viewer");
|
|
1147
1177
|
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
1148
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1178
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.row[n.column.field], (a, u) => (openBlock(), createElementBlock("div", {
|
|
1149
1179
|
class: "Link flex",
|
|
1150
|
-
title:
|
|
1180
|
+
title: a.FileName
|
|
1151
1181
|
}, [
|
|
1152
|
-
unref(getFileIconUrl)(
|
|
1182
|
+
unref(getFileIconUrl)(a.FileType) ? (openBlock(), createElementBlock("div", {
|
|
1153
1183
|
key: 1,
|
|
1154
1184
|
class: "size-5 bg",
|
|
1155
1185
|
style: normalizeStyle({
|
|
1156
|
-
backgroundImage: `url(${unref(getFileIconUrl)(
|
|
1186
|
+
backgroundImage: `url(${unref(getFileIconUrl)(a.FileType)})`,
|
|
1157
1187
|
backgroundSize: "cover"
|
|
1158
1188
|
}),
|
|
1159
|
-
onClick: (
|
|
1189
|
+
onClick: (s) => r(a)
|
|
1160
1190
|
}, null, 12, _hoisted_3$1)) : (openBlock(), createBlock(unref(ElImage), {
|
|
1161
1191
|
key: 0,
|
|
1162
|
-
onClick: (
|
|
1192
|
+
onClick: (s) => r(a),
|
|
1163
1193
|
class: "size-5",
|
|
1164
|
-
src:
|
|
1194
|
+
src: a.FilePath
|
|
1165
1195
|
}, null, 8, ["onClick", "src"])),
|
|
1166
1196
|
createElementVNode("a", {
|
|
1167
|
-
href:
|
|
1168
|
-
download:
|
|
1169
|
-
}, toDisplayString(
|
|
1197
|
+
href: a.FilePath,
|
|
1198
|
+
download: a.FileName
|
|
1199
|
+
}, toDisplayString(u + 1) + "." + toDisplayString(a.FileType), 9, _hoisted_4$1)
|
|
1170
1200
|
], 8, _hoisted_2$3))), 256))
|
|
1171
1201
|
])), [
|
|
1172
1202
|
[
|
|
@@ -1200,33 +1230,33 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1200
1230
|
}
|
|
1201
1231
|
},
|
|
1202
1232
|
emits: ["change"],
|
|
1203
|
-
setup(
|
|
1233
|
+
setup(n, { emit: t }) {
|
|
1204
1234
|
const e = t;
|
|
1205
|
-
function r(o, l,
|
|
1206
|
-
e("change", o, l,
|
|
1235
|
+
function r(o, l, a) {
|
|
1236
|
+
e("change", o, l, a);
|
|
1207
1237
|
}
|
|
1208
1238
|
function c(o, l) {
|
|
1209
|
-
var
|
|
1210
|
-
if ((
|
|
1211
|
-
let
|
|
1239
|
+
var u;
|
|
1240
|
+
if ((u = l.params) != null && u.disable) return;
|
|
1241
|
+
let a = layer.open({
|
|
1212
1242
|
type: 2,
|
|
1213
1243
|
title: "图标选择",
|
|
1214
1244
|
maxmin: !0,
|
|
1215
1245
|
area: ["80%", "80%"],
|
|
1216
1246
|
content: "/Html/Custom/SelectIcon/Icon.html?callbackFn=setIcon&clearFn=clearIcon"
|
|
1217
1247
|
});
|
|
1218
|
-
window.setIcon = (
|
|
1219
|
-
o[l.field] =
|
|
1220
|
-
}, window.clearIcon = (
|
|
1221
|
-
o[l.field] = "", r(
|
|
1248
|
+
window.setIcon = (s) => {
|
|
1249
|
+
o[l.field] = s.font_class, r(s, o, l);
|
|
1250
|
+
}, window.clearIcon = (s) => {
|
|
1251
|
+
o[l.field] = "", r(s, o, l), layer.close(a);
|
|
1222
1252
|
};
|
|
1223
1253
|
}
|
|
1224
1254
|
return (o, l) => (openBlock(), createElementBlock("div", {
|
|
1225
1255
|
class: "w-full h-full flex justify-center items-center",
|
|
1226
|
-
onClick: l[0] || (l[0] = (
|
|
1256
|
+
onClick: l[0] || (l[0] = (a) => c(n.row, n.column))
|
|
1227
1257
|
}, [
|
|
1228
1258
|
createVNode(unref(HrIcon), {
|
|
1229
|
-
icon:
|
|
1259
|
+
icon: n.row[n.column.field]
|
|
1230
1260
|
}, null, 8, ["icon"])
|
|
1231
1261
|
]));
|
|
1232
1262
|
}
|
|
@@ -1252,37 +1282,37 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1252
1282
|
}
|
|
1253
1283
|
},
|
|
1254
1284
|
emits: ["change"],
|
|
1255
|
-
setup(
|
|
1256
|
-
const e =
|
|
1285
|
+
setup(n, { emit: t }) {
|
|
1286
|
+
const e = n, r = t;
|
|
1257
1287
|
function c(o, l) {
|
|
1258
1288
|
var y;
|
|
1259
1289
|
if ((y = l.params) != null && y.disabled) return;
|
|
1260
1290
|
let {
|
|
1261
|
-
PickPeopleType:
|
|
1262
|
-
PickPeopleCheckType:
|
|
1263
|
-
PickPeopleIsAll:
|
|
1264
|
-
PickPeopleStatus:
|
|
1265
|
-
StoredValueField:
|
|
1266
|
-
ReturnValueField:
|
|
1291
|
+
PickPeopleType: a,
|
|
1292
|
+
PickPeopleCheckType: u,
|
|
1293
|
+
PickPeopleIsAll: s,
|
|
1294
|
+
PickPeopleStatus: i,
|
|
1295
|
+
StoredValueField: d,
|
|
1296
|
+
ReturnValueField: m,
|
|
1267
1297
|
BackfillField: _
|
|
1268
1298
|
} = e.column.params;
|
|
1269
1299
|
openChoosePeople({
|
|
1270
|
-
Type:
|
|
1271
|
-
Choose:
|
|
1272
|
-
IsAll:
|
|
1273
|
-
Status:
|
|
1274
|
-
}, (
|
|
1275
|
-
isEmpty(
|
|
1300
|
+
Type: a,
|
|
1301
|
+
Choose: u,
|
|
1302
|
+
IsAll: s,
|
|
1303
|
+
Status: i
|
|
1304
|
+
}, (g) => {
|
|
1305
|
+
isEmpty(d) ? o[l.field] = g.Name || null : (Array.isArray(d) || (d = [d]), Array.isArray(m) || (m = [m]), d.forEach((h, k) => o[h] = g[m[k]] || null)), r("change", g, o, l);
|
|
1276
1306
|
}, _ ? o[_] : null);
|
|
1277
1307
|
}
|
|
1278
1308
|
return (o, l) => (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
1279
1309
|
createVNode(unref(ElButton), {
|
|
1280
1310
|
class: "!text-[12px]",
|
|
1281
1311
|
link: "",
|
|
1282
|
-
onClick: l[0] || (l[0] = (
|
|
1312
|
+
onClick: l[0] || (l[0] = (a) => c(n.row, n.column))
|
|
1283
1313
|
}, {
|
|
1284
1314
|
default: withCtx(() => [
|
|
1285
|
-
createTextVNode(toDisplayString(
|
|
1315
|
+
createTextVNode(toDisplayString(n.row[n.column.field] || "请选择"), 1)
|
|
1286
1316
|
]),
|
|
1287
1317
|
_: 1
|
|
1288
1318
|
})
|
|
@@ -1310,8 +1340,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1310
1340
|
}
|
|
1311
1341
|
},
|
|
1312
1342
|
emits: ["change"],
|
|
1313
|
-
setup(
|
|
1314
|
-
const e =
|
|
1343
|
+
setup(n, { emit: t }) {
|
|
1344
|
+
const e = n;
|
|
1315
1345
|
let r = ref(0);
|
|
1316
1346
|
return watchEffect(() => {
|
|
1317
1347
|
if (e.row[e.column.field]) {
|
|
@@ -1348,20 +1378,20 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1348
1378
|
}
|
|
1349
1379
|
},
|
|
1350
1380
|
emits: ["change"],
|
|
1351
|
-
setup(
|
|
1352
|
-
const e =
|
|
1353
|
-
function c(o, l,
|
|
1354
|
-
e.gridRef.getTableData().tableData.filter((
|
|
1355
|
-
|
|
1356
|
-
}), r("change", o, l,
|
|
1381
|
+
setup(n, { emit: t }) {
|
|
1382
|
+
const e = n, r = t;
|
|
1383
|
+
function c(o, l, a) {
|
|
1384
|
+
e.gridRef.getTableData().tableData.filter((u) => u !== l).forEach((u) => {
|
|
1385
|
+
u[a.field] && (u[a.field] = !1);
|
|
1386
|
+
}), r("change", o, l, a);
|
|
1357
1387
|
}
|
|
1358
1388
|
return (o, l) => {
|
|
1359
|
-
var
|
|
1389
|
+
var a;
|
|
1360
1390
|
return openBlock(), createBlock(unref(ElRadioGroup), {
|
|
1361
|
-
disabled: (
|
|
1362
|
-
modelValue:
|
|
1363
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
1364
|
-
onChange: l[1] || (l[1] = (
|
|
1391
|
+
disabled: (a = n.column.params) == null ? void 0 : a.disabled,
|
|
1392
|
+
modelValue: n.row[n.column.field],
|
|
1393
|
+
"onUpdate:modelValue": l[0] || (l[0] = (u) => n.row[n.column.field] = u),
|
|
1394
|
+
onChange: l[1] || (l[1] = (u) => c(u, n.row, n.column))
|
|
1365
1395
|
}, {
|
|
1366
1396
|
default: withCtx(() => [
|
|
1367
1397
|
createVNode(unref(ElRadio), { value: !0 })
|
|
@@ -1391,30 +1421,30 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1391
1421
|
default: () => ({})
|
|
1392
1422
|
}
|
|
1393
1423
|
},
|
|
1394
|
-
setup(
|
|
1424
|
+
setup(n) {
|
|
1395
1425
|
var c, o;
|
|
1396
|
-
const t =
|
|
1426
|
+
const t = n;
|
|
1397
1427
|
(c = t.column.params)[o = t.gridRef.getRowid(t.row)] ?? (c[o] = {}), watchEffect(() => {
|
|
1398
|
-
var l,
|
|
1399
|
-
(l = t.column.params)[
|
|
1428
|
+
var l, a;
|
|
1429
|
+
(l = t.column.params)[a = t.gridRef.getRowid(t.row)] ?? (l[a] = {}), !t.column.params[t.gridRef.getRowid(t.row)].options && t.column.params.options && (t.column.params[t.gridRef.getRowid(t.row)].options = deepClone(t.column.params.options));
|
|
1400
1430
|
});
|
|
1401
1431
|
const e = computed(() => {
|
|
1402
1432
|
var l;
|
|
1403
1433
|
return ((l = t.column.params[t.gridRef.getRowid(t.row)]) == null ? void 0 : l.options) || t.column.params.options;
|
|
1404
1434
|
}), r = computed(() => {
|
|
1405
|
-
var
|
|
1435
|
+
var a, u;
|
|
1406
1436
|
const l = t.row[t.column.field];
|
|
1407
1437
|
if (l && l.length > 1) {
|
|
1408
|
-
let
|
|
1409
|
-
return l.split(",").map((
|
|
1410
|
-
var
|
|
1411
|
-
const
|
|
1412
|
-
|
|
1413
|
-
}),
|
|
1438
|
+
let s = [];
|
|
1439
|
+
return l.split(",").map((i) => {
|
|
1440
|
+
var m, _;
|
|
1441
|
+
const d = (_ = (m = e.value) == null ? void 0 : m.find((y) => y.value == i)) == null ? void 0 : _.label;
|
|
1442
|
+
d !== void 0 && s.push(d);
|
|
1443
|
+
}), s.join(",");
|
|
1414
1444
|
} else
|
|
1415
|
-
return ((
|
|
1445
|
+
return ((u = (a = e.value) == null ? void 0 : a.find((s) => s.value == l)) == null ? void 0 : u.label) || "";
|
|
1416
1446
|
});
|
|
1417
|
-
return (l,
|
|
1447
|
+
return (l, a) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue: r.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1418
1448
|
key: 1,
|
|
1419
1449
|
title: r.value
|
|
1420
1450
|
}, toDisplayString(r.value), 9, _hoisted_1$6));
|
|
@@ -1440,21 +1470,21 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1440
1470
|
default: () => ({})
|
|
1441
1471
|
}
|
|
1442
1472
|
},
|
|
1443
|
-
setup(
|
|
1473
|
+
setup(n) {
|
|
1444
1474
|
var c, o;
|
|
1445
|
-
const t =
|
|
1475
|
+
const t = n;
|
|
1446
1476
|
(c = t.column.params)[o = t.gridRef.getRowid(t.row)] ?? (c[o] = {}), watchEffect(() => {
|
|
1447
|
-
var l,
|
|
1448
|
-
(l = t.column.params)[
|
|
1477
|
+
var l, a;
|
|
1478
|
+
(l = t.column.params)[a = t.gridRef.getRowid(t.row)] ?? (l[a] = {}), !t.column.params[t.gridRef.getRowid(t.row)].options && t.column.params.options && (t.column.params[t.gridRef.getRowid(t.row)].options = deepClone(t.column.params.options));
|
|
1449
1479
|
});
|
|
1450
1480
|
const e = computed(() => {
|
|
1451
1481
|
var l;
|
|
1452
1482
|
return ((l = t.column.params[t.gridRef.getRowid(t.row)]) == null ? void 0 : l.options) || t.column.params.options;
|
|
1453
1483
|
}), r = computed(() => {
|
|
1454
|
-
var l,
|
|
1455
|
-
return ((
|
|
1484
|
+
var l, a;
|
|
1485
|
+
return ((a = (l = e.value) == null ? void 0 : l.find((u) => u.value == t.row[t.column.field])) == null ? void 0 : a.label) || "";
|
|
1456
1486
|
});
|
|
1457
|
-
return (l,
|
|
1487
|
+
return (l, a) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, mergeProps({ key: 0 }, { ...t, displayValue: r.value }, { title: r.value }), null, 16, ["title"])) : (openBlock(), createElementBlock("span", {
|
|
1458
1488
|
key: 1,
|
|
1459
1489
|
title: r.value
|
|
1460
1490
|
}, toDisplayString(r.value), 9, _hoisted_1$5));
|
|
@@ -1480,8 +1510,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1480
1510
|
default: () => ({})
|
|
1481
1511
|
}
|
|
1482
1512
|
},
|
|
1483
|
-
setup(
|
|
1484
|
-
const t =
|
|
1513
|
+
setup(n) {
|
|
1514
|
+
const t = n;
|
|
1485
1515
|
if (!t.column.params.TreeData) {
|
|
1486
1516
|
const { options: r, ParentNodeField: c, NodeValueField: o } = t.column.params;
|
|
1487
1517
|
t.column.params.TreeData = buildTree(deepClone(r), c, o);
|
|
@@ -1519,8 +1549,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1519
1549
|
default: () => ({})
|
|
1520
1550
|
}
|
|
1521
1551
|
},
|
|
1522
|
-
setup(
|
|
1523
|
-
const t =
|
|
1552
|
+
setup(n) {
|
|
1553
|
+
const t = n;
|
|
1524
1554
|
if (!t.column.params.TreeData) {
|
|
1525
1555
|
const { options: r, ParentNodeField: c, NodeKeyField: o } = t.column.params;
|
|
1526
1556
|
t.column.params.TreeData = buildTree(deepClone(r), c, o);
|
|
@@ -1541,9 +1571,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "flex flex-col gap3" },
|
|
|
1541
1571
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1542
1572
|
let comps$1 = {};
|
|
1543
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 });
|
|
1544
|
-
for (const
|
|
1545
|
-
let t = modules$1[
|
|
1546
|
-
comps$1[t] = modules$1[
|
|
1574
|
+
for (const n in modules$1) {
|
|
1575
|
+
let t = modules$1[n].default.name;
|
|
1576
|
+
comps$1[t] = modules$1[n].default;
|
|
1547
1577
|
}
|
|
1548
1578
|
const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
1549
1579
|
name: "DatePickerEditor"
|
|
@@ -1564,18 +1594,18 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1564
1594
|
}
|
|
1565
1595
|
},
|
|
1566
1596
|
emits: ["change"],
|
|
1567
|
-
setup(
|
|
1597
|
+
setup(n, { emit: t }) {
|
|
1568
1598
|
var l;
|
|
1569
1599
|
dayjs.extend(isoWeek), dayjs.extend(quarterOfYear), dayjs.extend(customParseFormat);
|
|
1570
|
-
const e =
|
|
1600
|
+
const e = n, r = ref(c(e.row[e.column.field], ((l = e.column.params) == null ? void 0 : l.DateType) || "date"));
|
|
1571
1601
|
onBeforeUnmount(() => {
|
|
1572
|
-
var
|
|
1573
|
-
const
|
|
1574
|
-
r.value && (
|
|
1602
|
+
var u;
|
|
1603
|
+
const a = ((u = e.column.params) == null ? void 0 : u.DateType) || "date";
|
|
1604
|
+
r.value && (a === "year" ? e.row[e.column.field] = dayjs(r.value).format("YYYY年") : a === "month" ? e.row[e.column.field] = dayjs(r.value).format("YYYY年MM月") : a === "quarter" ? e.row[e.column.field] = dayjs(r.value).format("YYYY年第Q季度") : a === "week" ? e.row[e.column.field] = dayjs(r.value).format("YYYY年第WW周") : a === "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"));
|
|
1575
1605
|
});
|
|
1576
|
-
function c(
|
|
1577
|
-
if (!
|
|
1578
|
-
const
|
|
1606
|
+
function c(a, u) {
|
|
1607
|
+
if (!a) return null;
|
|
1608
|
+
const i = {
|
|
1579
1609
|
time: "HH:mm:ss",
|
|
1580
1610
|
date: "YYYY-MM-DD",
|
|
1581
1611
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
@@ -1583,62 +1613,62 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1583
1613
|
month: "YYYY-MM",
|
|
1584
1614
|
quarter: "YYYY-Q",
|
|
1585
1615
|
year: "YYYY"
|
|
1586
|
-
}[
|
|
1587
|
-
if (!
|
|
1588
|
-
let
|
|
1589
|
-
if (!
|
|
1590
|
-
const
|
|
1591
|
-
if (
|
|
1592
|
-
const [, _, y] =
|
|
1593
|
-
|
|
1616
|
+
}[u];
|
|
1617
|
+
if (!i) throw new Error("Unsupported date type");
|
|
1618
|
+
let d = dayjs(a, i);
|
|
1619
|
+
if (!d.isValid() && u === "week") {
|
|
1620
|
+
const m = a.match(/^(\d{4})年第(\d{2})周$/);
|
|
1621
|
+
if (m) {
|
|
1622
|
+
const [, _, y] = m;
|
|
1623
|
+
d = dayjs(`${_}-01-01`).isoWeek(Number(y));
|
|
1594
1624
|
}
|
|
1595
|
-
} else if (!
|
|
1596
|
-
const
|
|
1597
|
-
if (
|
|
1598
|
-
const [, _, y] =
|
|
1599
|
-
|
|
1625
|
+
} else if (!d.isValid() && u === "quarter") {
|
|
1626
|
+
const m = a.match(/^(\d{4})年第(\d)季度$/);
|
|
1627
|
+
if (m) {
|
|
1628
|
+
const [, _, y] = m;
|
|
1629
|
+
d = dayjs(`${_}-01-01`).quarter(Number(y));
|
|
1600
1630
|
}
|
|
1601
|
-
} else if (!
|
|
1602
|
-
const
|
|
1603
|
-
if (
|
|
1604
|
-
const [, _, y] =
|
|
1605
|
-
|
|
1631
|
+
} else if (!d.isValid() && u === "month") {
|
|
1632
|
+
const m = a.match(/^(\d{4})年(\d{2})月$/);
|
|
1633
|
+
if (m) {
|
|
1634
|
+
const [, _, y] = m;
|
|
1635
|
+
d = dayjs(`${_}-${y}-01`);
|
|
1606
1636
|
}
|
|
1607
|
-
} else if (!
|
|
1608
|
-
const
|
|
1609
|
-
if (
|
|
1610
|
-
const [, _] =
|
|
1611
|
-
|
|
1637
|
+
} else if (!d.isValid() && u === "year") {
|
|
1638
|
+
const m = a.match(/^(\d{4})年$/);
|
|
1639
|
+
if (m) {
|
|
1640
|
+
const [, _] = m;
|
|
1641
|
+
d = dayjs(`${_}-01-01`);
|
|
1612
1642
|
}
|
|
1613
1643
|
}
|
|
1614
|
-
return
|
|
1644
|
+
return d.isValid() ? o(d, u) : null;
|
|
1615
1645
|
}
|
|
1616
|
-
function o(
|
|
1617
|
-
switch (
|
|
1646
|
+
function o(a, u) {
|
|
1647
|
+
switch (u) {
|
|
1618
1648
|
case "time":
|
|
1619
|
-
return
|
|
1649
|
+
return a.format("HH:mm:ss");
|
|
1620
1650
|
case "date":
|
|
1621
|
-
return
|
|
1651
|
+
return a.format("YYYY-MM-DD");
|
|
1622
1652
|
case "datetime":
|
|
1623
|
-
return
|
|
1653
|
+
return a.format("YYYY-MM-DD HH:mm:ss");
|
|
1624
1654
|
case "week":
|
|
1625
|
-
return
|
|
1655
|
+
return a.startOf("isoWeek").format("YYYY-MM-DD");
|
|
1626
1656
|
case "month":
|
|
1627
|
-
return
|
|
1657
|
+
return a.startOf("month").format("YYYY-MM-DD");
|
|
1628
1658
|
case "quarter":
|
|
1629
|
-
return
|
|
1659
|
+
return a.startOf("quarter").format("YYYY-MM-DD");
|
|
1630
1660
|
case "year":
|
|
1631
|
-
return
|
|
1661
|
+
return a.startOf("year").format("YYYY-MM-DD");
|
|
1632
1662
|
default:
|
|
1633
1663
|
return null;
|
|
1634
1664
|
}
|
|
1635
1665
|
}
|
|
1636
|
-
return (
|
|
1637
|
-
var
|
|
1666
|
+
return (a, u) => {
|
|
1667
|
+
var s;
|
|
1638
1668
|
return openBlock(), createBlock(unref(VxeInput), {
|
|
1639
1669
|
modelValue: r.value,
|
|
1640
|
-
"onUpdate:modelValue":
|
|
1641
|
-
type: ((
|
|
1670
|
+
"onUpdate:modelValue": u[0] || (u[0] = (i) => r.value = i),
|
|
1671
|
+
type: ((s = n.column.params) == null ? void 0 : s.DateType) || "date",
|
|
1642
1672
|
clearable: "",
|
|
1643
1673
|
transfer: ""
|
|
1644
1674
|
}, null, 8, ["modelValue", "type"]);
|
|
@@ -1665,8 +1695,8 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1665
1695
|
default: () => ({})
|
|
1666
1696
|
}
|
|
1667
1697
|
},
|
|
1668
|
-
setup(
|
|
1669
|
-
const t =
|
|
1698
|
+
setup(n) {
|
|
1699
|
+
const t = n, e = ref(t.row[t.column.field]);
|
|
1670
1700
|
return onBeforeUnmount(() => {
|
|
1671
1701
|
t.row[t.column.field] = e.value;
|
|
1672
1702
|
}), (r, c) => (openBlock(), createBlock(unref(ElInput), {
|
|
@@ -1696,16 +1726,16 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1696
1726
|
}
|
|
1697
1727
|
},
|
|
1698
1728
|
emits: ["change"],
|
|
1699
|
-
setup(
|
|
1700
|
-
const e =
|
|
1729
|
+
setup(n, { emit: t }) {
|
|
1730
|
+
const e = n, r = ref(e.row[e.column.field]);
|
|
1701
1731
|
return onBeforeUnmount(() => {
|
|
1702
1732
|
e.row[e.column.field] = r.value ? Number(r.value) : 0;
|
|
1703
1733
|
}), (c, o) => (openBlock(), createBlock(unref(ElInput), {
|
|
1704
1734
|
modelValue: r.value,
|
|
1705
1735
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => r.value = l),
|
|
1706
|
-
min:
|
|
1707
|
-
max:
|
|
1708
|
-
step:
|
|
1736
|
+
min: n.column.params.min,
|
|
1737
|
+
max: n.column.params.max,
|
|
1738
|
+
step: n.column.params.step,
|
|
1709
1739
|
type: "number"
|
|
1710
1740
|
}, null, 8, ["modelValue", "min", "max", "step"]));
|
|
1711
1741
|
}
|
|
@@ -1730,8 +1760,8 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1730
1760
|
default: () => ({})
|
|
1731
1761
|
}
|
|
1732
1762
|
},
|
|
1733
|
-
setup(
|
|
1734
|
-
const t =
|
|
1763
|
+
setup(n) {
|
|
1764
|
+
const t = n, e = ref(t.row[t.column.field]), r = reactive(t.column.params || {
|
|
1735
1765
|
placeholder: "请选择",
|
|
1736
1766
|
disabled: !1,
|
|
1737
1767
|
clearable: !1
|
|
@@ -1744,25 +1774,25 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1744
1774
|
t.row[t.column.field] = e.value;
|
|
1745
1775
|
const o = t.column.params.LabelStoreField;
|
|
1746
1776
|
if (o) {
|
|
1747
|
-
const
|
|
1748
|
-
|
|
1777
|
+
const a = (l = c.value.find((u) => u.value === e.value)) == null ? void 0 : l.label;
|
|
1778
|
+
a !== void 0 ? t.row[o] = a : e.value === void 0 ? t.row[o] = null : e.value !== void 0 && a === void 0 && (t.row[o] = e.value);
|
|
1749
1779
|
}
|
|
1750
1780
|
}), (o, l) => (openBlock(), createBlock(unref(ElSelect), {
|
|
1751
1781
|
class: "z-1",
|
|
1752
1782
|
modelValue: e.value,
|
|
1753
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
1783
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => e.value = a),
|
|
1754
1784
|
"automatic-dropdown": "",
|
|
1755
1785
|
placeholder: r.placeholder,
|
|
1756
1786
|
"popper-class": "select-dropdown",
|
|
1757
1787
|
clearable: ""
|
|
1758
1788
|
}, {
|
|
1759
1789
|
default: withCtx(() => [
|
|
1760
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (
|
|
1790
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (a) => (openBlock(), createBlock(unref(ElOption), {
|
|
1761
1791
|
class: "vxe-table--ignore-clear",
|
|
1762
|
-
key:
|
|
1763
|
-
label:
|
|
1764
|
-
value:
|
|
1765
|
-
disabled:
|
|
1792
|
+
key: a.value,
|
|
1793
|
+
label: a.label,
|
|
1794
|
+
value: a.value,
|
|
1795
|
+
disabled: a.disabled
|
|
1766
1796
|
}, null, 8, ["label", "value", "disabled"]))), 128))
|
|
1767
1797
|
]),
|
|
1768
1798
|
_: 1
|
|
@@ -1789,8 +1819,8 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1789
1819
|
default: () => ({})
|
|
1790
1820
|
}
|
|
1791
1821
|
},
|
|
1792
|
-
setup(
|
|
1793
|
-
const t =
|
|
1822
|
+
setup(n) {
|
|
1823
|
+
const t = n, e = reactive(t.column.params || {
|
|
1794
1824
|
placeholder: "请选择",
|
|
1795
1825
|
disabled: !1,
|
|
1796
1826
|
clearable: !1
|
|
@@ -1803,8 +1833,8 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1803
1833
|
t.row[t.column.field] = o;
|
|
1804
1834
|
const l = t.column.params.LabelStoreField;
|
|
1805
1835
|
if (l) {
|
|
1806
|
-
const
|
|
1807
|
-
t.row[l] =
|
|
1836
|
+
const a = r.value.filter((u) => c.value.includes(u.value)).map((u) => u.label).join(",");
|
|
1837
|
+
t.row[l] = a;
|
|
1808
1838
|
}
|
|
1809
1839
|
});
|
|
1810
1840
|
const c = ref([]);
|
|
@@ -1813,7 +1843,7 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1813
1843
|
}), (o, l) => (openBlock(), createBlock(unref(ElSelect), {
|
|
1814
1844
|
class: "z-1 vxe-table--ignore-clear",
|
|
1815
1845
|
modelValue: c.value,
|
|
1816
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
1846
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => c.value = a),
|
|
1817
1847
|
"automatic-dropdown": "",
|
|
1818
1848
|
placeholder: e.placeholder,
|
|
1819
1849
|
"popper-class": "select-dropdown",
|
|
@@ -1821,11 +1851,11 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1821
1851
|
clearable: ""
|
|
1822
1852
|
}, {
|
|
1823
1853
|
default: withCtx(() => [
|
|
1824
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(r.value, (
|
|
1854
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(r.value, (a) => (openBlock(), createBlock(unref(ElOption), {
|
|
1825
1855
|
class: "vxe-table--ignore-clear",
|
|
1826
|
-
key:
|
|
1827
|
-
label:
|
|
1828
|
-
value:
|
|
1856
|
+
key: a.value,
|
|
1857
|
+
label: a.label,
|
|
1858
|
+
value: a.value
|
|
1829
1859
|
}, null, 8, ["label", "value"]))), 128))
|
|
1830
1860
|
]),
|
|
1831
1861
|
_: 1
|
|
@@ -1853,8 +1883,8 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1853
1883
|
}
|
|
1854
1884
|
},
|
|
1855
1885
|
emits: ["remoteMethod"],
|
|
1856
|
-
setup(
|
|
1857
|
-
const e = t, r =
|
|
1886
|
+
setup(n, { emit: t }) {
|
|
1887
|
+
const e = t, r = n, c = ref(r.row[r.column.field] === void 0 ? "" : r.row[r.column.field]), o = reactive(r.column.params || {
|
|
1858
1888
|
options: [],
|
|
1859
1889
|
placeholder: "请选择",
|
|
1860
1890
|
disabled: !1,
|
|
@@ -1865,20 +1895,20 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1865
1895
|
loading: !1
|
|
1866
1896
|
});
|
|
1867
1897
|
onBeforeUnmount(() => {
|
|
1868
|
-
const { StoredValueField:
|
|
1869
|
-
|
|
1870
|
-
const
|
|
1871
|
-
|
|
1898
|
+
const { StoredValueField: a, ReturnValueField: u } = o;
|
|
1899
|
+
a && a.length ? a.forEach((s, i) => {
|
|
1900
|
+
const d = o.options.find((m) => m._value === c.value);
|
|
1901
|
+
d && (r.row[s] = d[u[i]]);
|
|
1872
1902
|
}) : r.row[r.column.field] = c.value;
|
|
1873
1903
|
});
|
|
1874
|
-
function l(
|
|
1875
|
-
const { DataAPIOID:
|
|
1876
|
-
|
|
1904
|
+
function l(a) {
|
|
1905
|
+
const { DataAPIOID: u, SearchField: s } = o;
|
|
1906
|
+
a ? (o.loading = !0, e("remoteMethod", { DataAPIOID: u, SearchField: s, query: a, params: o })) : r.row[r.column.field] = null;
|
|
1877
1907
|
}
|
|
1878
|
-
return (
|
|
1908
|
+
return (a, u) => (openBlock(), createBlock(unref(ElSelect), {
|
|
1879
1909
|
class: "z-1 vxe-table--ignore-clear",
|
|
1880
1910
|
modelValue: c.value,
|
|
1881
|
-
"onUpdate:modelValue":
|
|
1911
|
+
"onUpdate:modelValue": u[0] || (u[0] = (s) => c.value = s),
|
|
1882
1912
|
"allow-create": "",
|
|
1883
1913
|
"automatic-dropdown": "",
|
|
1884
1914
|
filterable: "",
|
|
@@ -1889,11 +1919,11 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1889
1919
|
clearable: ""
|
|
1890
1920
|
}, {
|
|
1891
1921
|
default: withCtx(() => [
|
|
1892
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(o.options, (
|
|
1922
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(o.options, (s) => (openBlock(), createBlock(unref(ElOption), {
|
|
1893
1923
|
class: "vxe-table--ignore-clear",
|
|
1894
|
-
key:
|
|
1895
|
-
label:
|
|
1896
|
-
value:
|
|
1924
|
+
key: s._value,
|
|
1925
|
+
label: s._label,
|
|
1926
|
+
value: s._value
|
|
1897
1927
|
}, null, 8, ["label", "value"]))), 128))
|
|
1898
1928
|
]),
|
|
1899
1929
|
_: 1
|
|
@@ -1920,8 +1950,8 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1920
1950
|
default: () => ({})
|
|
1921
1951
|
}
|
|
1922
1952
|
},
|
|
1923
|
-
setup(
|
|
1924
|
-
const t =
|
|
1953
|
+
setup(n) {
|
|
1954
|
+
const t = n, e = ref(t.row[t.column.field]);
|
|
1925
1955
|
return onBeforeUnmount(() => {
|
|
1926
1956
|
t.row[t.column.field] = e.value;
|
|
1927
1957
|
}), (r, c) => (openBlock(), createBlock(unref(ElInput), {
|
|
@@ -1952,8 +1982,8 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1952
1982
|
default: () => ({})
|
|
1953
1983
|
}
|
|
1954
1984
|
},
|
|
1955
|
-
setup(
|
|
1956
|
-
const t =
|
|
1985
|
+
setup(n) {
|
|
1986
|
+
const t = n, e = ref({
|
|
1957
1987
|
label: t.column.params.NodeNameField || "label",
|
|
1958
1988
|
value: t.column.params.NodeValueField || "value",
|
|
1959
1989
|
children: "children"
|
|
@@ -1973,7 +2003,7 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
1973
2003
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => r.value = l),
|
|
1974
2004
|
"automatic-dropdown": "",
|
|
1975
2005
|
"popper-class": "tree-select",
|
|
1976
|
-
data:
|
|
2006
|
+
data: n.column.params.TreeData,
|
|
1977
2007
|
props: e.value,
|
|
1978
2008
|
clearable: "",
|
|
1979
2009
|
multiple: "",
|
|
@@ -2002,8 +2032,8 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
2002
2032
|
default: () => ({})
|
|
2003
2033
|
}
|
|
2004
2034
|
},
|
|
2005
|
-
setup(
|
|
2006
|
-
const t =
|
|
2035
|
+
setup(n) {
|
|
2036
|
+
const t = n, e = ref(t.row[t.column.field]), r = ref({
|
|
2007
2037
|
label: t.column.params.NodeNameField || "label",
|
|
2008
2038
|
value: t.column.params.NodeValueField || "value",
|
|
2009
2039
|
children: "children"
|
|
@@ -2020,13 +2050,13 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
2020
2050
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => e.value = l),
|
|
2021
2051
|
"automatic-dropdown": "",
|
|
2022
2052
|
"popper-class": "tree-select",
|
|
2023
|
-
data:
|
|
2053
|
+
data: n.column.params.TreeData,
|
|
2024
2054
|
clearable: "",
|
|
2025
2055
|
props: r.value,
|
|
2026
2056
|
indent: 12
|
|
2027
2057
|
}, {
|
|
2028
|
-
label: withCtx(({ label: l, value:
|
|
2029
|
-
createElementVNode("span", null, toDisplayString(
|
|
2058
|
+
label: withCtx(({ label: l, value: a }) => [
|
|
2059
|
+
createElementVNode("span", null, toDisplayString(n.column.params.options.find((u) => u[r.value.value] === a) ? l : ""), 1)
|
|
2030
2060
|
]),
|
|
2031
2061
|
_: 1
|
|
2032
2062
|
}, 8, ["modelValue", "data", "props"]));
|
|
@@ -2037,9 +2067,9 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({
|
|
|
2037
2067
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2038
2068
|
let comps = {};
|
|
2039
2069
|
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 });
|
|
2040
|
-
for (const
|
|
2041
|
-
let t = modules[
|
|
2042
|
-
comps[t] = modules[
|
|
2070
|
+
for (const n in modules) {
|
|
2071
|
+
let t = modules[n].default.name;
|
|
2072
|
+
comps[t] = modules[n].default;
|
|
2043
2073
|
}
|
|
2044
2074
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
2045
2075
|
__name: "paging",
|
|
@@ -2063,8 +2093,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2063
2093
|
}
|
|
2064
2094
|
},
|
|
2065
2095
|
emits: ["pageChange", "refresh"],
|
|
2066
|
-
setup(
|
|
2067
|
-
const e =
|
|
2096
|
+
setup(n, { emit: t }) {
|
|
2097
|
+
const e = n, r = ref(), c = ref([
|
|
2068
2098
|
"Total",
|
|
2069
2099
|
"Sizes",
|
|
2070
2100
|
"PrevJump",
|
|
@@ -2075,8 +2105,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2075
2105
|
"FullJump"
|
|
2076
2106
|
]);
|
|
2077
2107
|
onMounted(() => {
|
|
2078
|
-
e.gridOptions.Pages === !1 ? c.value = ["Total"] : useElementClientSize(r.value, ({ clientWidth:
|
|
2079
|
-
|
|
2108
|
+
e.gridOptions.Pages === !1 ? c.value = ["Total"] : useElementClientSize(r.value, ({ clientWidth: a }) => {
|
|
2109
|
+
a < 300 ? c.value = ["Total"] : a < 500 ? c.value = [
|
|
2080
2110
|
"Total",
|
|
2081
2111
|
"PrevJump",
|
|
2082
2112
|
"PrevPage",
|
|
@@ -2096,8 +2126,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2096
2126
|
});
|
|
2097
2127
|
}), watch(
|
|
2098
2128
|
() => e.gridOptions.Pages,
|
|
2099
|
-
(
|
|
2100
|
-
|
|
2129
|
+
(a) => {
|
|
2130
|
+
a === !1 ? c.value = ["Total"] : c.value = [
|
|
2101
2131
|
"Total",
|
|
2102
2132
|
"Sizes",
|
|
2103
2133
|
"PrevJump",
|
|
@@ -2113,7 +2143,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2113
2143
|
function l() {
|
|
2114
2144
|
o("pageChange", e.pagination);
|
|
2115
2145
|
}
|
|
2116
|
-
return (
|
|
2146
|
+
return (a, u) => (openBlock(), createElementBlock("div", {
|
|
2117
2147
|
ref_key: "pagingDom",
|
|
2118
2148
|
ref: r,
|
|
2119
2149
|
class: "flex items-center w-full h-12 border border-solid border-[#e8eaec] box-border"
|
|
@@ -2122,14 +2152,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2122
2152
|
size: "small",
|
|
2123
2153
|
class: "w-full !h-full",
|
|
2124
2154
|
background: "",
|
|
2125
|
-
"current-page":
|
|
2126
|
-
"onUpdate:currentPage":
|
|
2127
|
-
"page-size":
|
|
2128
|
-
"onUpdate:pageSize":
|
|
2129
|
-
total:
|
|
2155
|
+
"current-page": n.pagination.Page,
|
|
2156
|
+
"onUpdate:currentPage": u[0] || (u[0] = (s) => n.pagination.Page = s),
|
|
2157
|
+
"page-size": n.pagination.PageSize,
|
|
2158
|
+
"onUpdate:pageSize": u[1] || (u[1] = (s) => n.pagination.PageSize = s),
|
|
2159
|
+
total: n.pagination.Total,
|
|
2130
2160
|
layouts: c.value,
|
|
2131
2161
|
onPageChange: l,
|
|
2132
|
-
"page-sizes":
|
|
2162
|
+
"page-sizes": n.pagination.PageSizes
|
|
2133
2163
|
}, null, 8, ["current-page", "page-size", "total", "layouts", "page-sizes"])
|
|
2134
2164
|
], 512));
|
|
2135
2165
|
}
|
|
@@ -2158,55 +2188,55 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2158
2188
|
"tableSelectChange",
|
|
2159
2189
|
"tableSelectRemote"
|
|
2160
2190
|
],
|
|
2161
|
-
setup(
|
|
2162
|
-
const r =
|
|
2191
|
+
setup(n, { expose: t, emit: e }) {
|
|
2192
|
+
const r = n, c = e, o = ref(), l = reactive(r.config);
|
|
2163
2193
|
reactive(r.config.columns);
|
|
2164
|
-
let
|
|
2194
|
+
let a = ref(!1);
|
|
2165
2195
|
onMounted(() => {
|
|
2166
|
-
document.addEventListener("click",
|
|
2196
|
+
document.addEventListener("click", M, !0);
|
|
2167
2197
|
}), onBeforeUnmount(() => {
|
|
2168
|
-
document.removeEventListener("click",
|
|
2198
|
+
document.removeEventListener("click", M, !0);
|
|
2169
2199
|
});
|
|
2170
2200
|
const {
|
|
2171
|
-
CheckboxRender:
|
|
2172
|
-
ColorPickerRender:
|
|
2173
|
-
IconPickerRender:
|
|
2174
|
-
RadioRender:
|
|
2175
|
-
ProgressRender:
|
|
2201
|
+
CheckboxRender: u,
|
|
2202
|
+
ColorPickerRender: s,
|
|
2203
|
+
IconPickerRender: i,
|
|
2204
|
+
RadioRender: d,
|
|
2205
|
+
ProgressRender: m,
|
|
2176
2206
|
ActionRender: _,
|
|
2177
2207
|
SelectRender: y,
|
|
2178
|
-
TreeSelectRender:
|
|
2179
|
-
SelectMultipleRender:
|
|
2180
|
-
TreeMultipleSelectRender:
|
|
2208
|
+
TreeSelectRender: g,
|
|
2209
|
+
SelectMultipleRender: h,
|
|
2210
|
+
TreeMultipleSelectRender: k,
|
|
2181
2211
|
ChooseFrameRender: x,
|
|
2182
|
-
PickPeopleRender:
|
|
2183
|
-
FileRender:
|
|
2184
|
-
CustomRender:
|
|
2185
|
-
DatePickerRender:
|
|
2212
|
+
PickPeopleRender: E,
|
|
2213
|
+
FileRender: B,
|
|
2214
|
+
CustomRender: C,
|
|
2215
|
+
DatePickerRender: V,
|
|
2186
2216
|
LabelRender: R
|
|
2187
2217
|
} = comps$1, {
|
|
2188
2218
|
InputEditor: j,
|
|
2189
|
-
TreeSelectEditor:
|
|
2190
|
-
SelectEditor:
|
|
2191
|
-
TextareaEditor:
|
|
2192
|
-
DatePickerEditor:
|
|
2193
|
-
SelectMultipleEditor:
|
|
2194
|
-
TreeMultipleSelectEditor:
|
|
2195
|
-
InputNumberEditor:
|
|
2196
|
-
SelectRemoteEditor:
|
|
2197
|
-
} = comps,
|
|
2198
|
-
var
|
|
2199
|
-
return ((((
|
|
2200
|
-
}),
|
|
2201
|
-
var
|
|
2219
|
+
TreeSelectEditor: Y,
|
|
2220
|
+
SelectEditor: I,
|
|
2221
|
+
TextareaEditor: z,
|
|
2222
|
+
DatePickerEditor: A,
|
|
2223
|
+
SelectMultipleEditor: H,
|
|
2224
|
+
TreeMultipleSelectEditor: U,
|
|
2225
|
+
InputNumberEditor: L,
|
|
2226
|
+
SelectRemoteEditor: q
|
|
2227
|
+
} = comps, W = computed(() => {
|
|
2228
|
+
var v, b;
|
|
2229
|
+
return ((((v = r.pagination) == null ? void 0 : v.Page) || 1) - 1) * (((b = r.pagination) == null ? void 0 : b.PageSize) || 1e3);
|
|
2230
|
+
}), N = computed(() => {
|
|
2231
|
+
var b;
|
|
2202
2232
|
if (l.Number)
|
|
2203
2233
|
if (l.columns.some(
|
|
2204
|
-
(f) => f.type === "seq" || f.children && f.children.some((
|
|
2234
|
+
(f) => f.type === "seq" || f.children && f.children.some((w) => w.type === "seq")
|
|
2205
2235
|
))
|
|
2206
|
-
l.columns = l.columns.filter((f) => f.type === "seq" ? !1 : f.children ? (f.children = f.children.filter((
|
|
2236
|
+
l.columns = l.columns.filter((f) => f.type === "seq" ? !1 : f.children ? (f.children = f.children.filter((w) => w.type !== "seq"), f.children.length > 0) : !0);
|
|
2207
2237
|
else {
|
|
2208
|
-
let f = l.columns.find((
|
|
2209
|
-
const
|
|
2238
|
+
let f = l.columns.find(($) => ["left", "right"].includes($.fixed));
|
|
2239
|
+
const w = {
|
|
2210
2240
|
slots: {},
|
|
2211
2241
|
params: {},
|
|
2212
2242
|
type: "seq",
|
|
@@ -2215,31 +2245,31 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2215
2245
|
width: 50,
|
|
2216
2246
|
fixed: f || void 0
|
|
2217
2247
|
};
|
|
2218
|
-
l.columns.unshift(
|
|
2248
|
+
l.columns.unshift(w);
|
|
2219
2249
|
}
|
|
2220
2250
|
if (r.config.AutoFullWidth) {
|
|
2221
|
-
const f =
|
|
2251
|
+
const f = P(r.config.columns || []).filter((S) => !S.children), w = f.reduce((S, O) => {
|
|
2222
2252
|
let D = Number(O.width);
|
|
2223
|
-
return
|
|
2224
|
-
}, 0),
|
|
2225
|
-
if (
|
|
2253
|
+
return S + (isNaN(D) ? 100 : D);
|
|
2254
|
+
}, 0), $ = (S = 0) => {
|
|
2255
|
+
if (S > 50) return;
|
|
2226
2256
|
if (!o.value) {
|
|
2227
|
-
setTimeout(() =>
|
|
2257
|
+
setTimeout(() => $(++S), 0);
|
|
2228
2258
|
return;
|
|
2229
2259
|
}
|
|
2230
2260
|
const O = o.value.$el.clientWidth;
|
|
2231
|
-
|
|
2261
|
+
w !== O && f.forEach((D) => {
|
|
2232
2262
|
let F = Number(D.width);
|
|
2233
|
-
D.width = Number(((isNaN(F) ? 100 : F) * (O /
|
|
2263
|
+
D.width = Number(((isNaN(F) ? 100 : F) * (O / w)).toFixed(0));
|
|
2234
2264
|
});
|
|
2235
2265
|
};
|
|
2236
|
-
|
|
2266
|
+
$();
|
|
2237
2267
|
}
|
|
2238
|
-
let
|
|
2268
|
+
let v = {
|
|
2239
2269
|
keepSource: !0,
|
|
2240
2270
|
showOverflow: "title",
|
|
2241
2271
|
seqConfig: {
|
|
2242
|
-
seqMethod: (p) =>
|
|
2272
|
+
seqMethod: (p) => W.value + p.$rowIndex + 1
|
|
2243
2273
|
},
|
|
2244
2274
|
exportConfig: {},
|
|
2245
2275
|
importConfig: {},
|
|
@@ -2254,18 +2284,18 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2254
2284
|
// 只对 keep-source 开启有效,是否显示单元格新增与修改状态
|
|
2255
2285
|
showIcon: !1,
|
|
2256
2286
|
// 因为对过滤行进行了修改 该属性必须为false
|
|
2257
|
-
...(
|
|
2287
|
+
...(b = r.config) == null ? void 0 : b.editConfig
|
|
2258
2288
|
},
|
|
2259
2289
|
showFooter: l["Total-Row"],
|
|
2260
2290
|
// 启用表尾统计
|
|
2261
2291
|
// showFooter: true, // 启用统计行
|
|
2262
2292
|
footerMethod({ columns: p, data: f }) {
|
|
2263
2293
|
return [
|
|
2264
|
-
p.map((
|
|
2294
|
+
p.map((w, $) => $ === 0 ? "合计" : l["Total-Field"].includes(w.field) ? T(f, w.field).toLocaleString("zh-CN") : "")
|
|
2265
2295
|
];
|
|
2266
2296
|
}
|
|
2267
2297
|
};
|
|
2268
|
-
return l.BodyMenu && (
|
|
2298
|
+
return l.BodyMenu && (v.menuConfig = {
|
|
2269
2299
|
body: {
|
|
2270
2300
|
options: [[
|
|
2271
2301
|
{ type: "print", name: "打印", prefixConfig: { icon: "vxe-icon-print" } },
|
|
@@ -2273,160 +2303,138 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2273
2303
|
{ type: "myBtn2", name: "导出全部", prefixConfig: { icon: "vxe-icon-send-fill" } }
|
|
2274
2304
|
]]
|
|
2275
2305
|
}
|
|
2276
|
-
}),
|
|
2277
|
-
}),
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
const P = F == null ? void 0 : F.sort((T, N) => {
|
|
2282
|
-
const M = T[v.field] ?? 0, Y = N[v.field] ?? 0, U = M - Y;
|
|
2283
|
-
return U !== 0 ? U : T[v.field] == g[v.field] ? -1 : 0;
|
|
2284
|
-
});
|
|
2285
|
-
P == null || P.forEach((T, N) => {
|
|
2286
|
-
T[v.field] = N + 1;
|
|
2287
|
-
}), (f = o == null ? void 0 : o.value) == null || f.reloadData(P);
|
|
2288
|
-
} else if (v.params.NodeSum) {
|
|
2289
|
-
let F = function(N) {
|
|
2290
|
-
let M = 0;
|
|
2291
|
-
return N.children.forEach((Y) => {
|
|
2292
|
-
Y.children && Y.children.length > 0 ? M += F(Y) : M += Number(Y[v.field]) || 0;
|
|
2293
|
-
}), N.children.length > 0 && (N[v.field] = M), M;
|
|
2294
|
-
}, P = (b = o == null ? void 0 : o.value) == null ? void 0 : b.getTableData().tableData;
|
|
2295
|
-
const T = (V = o == null ? void 0 : o.value) == null ? void 0 : V.getTreeExpandRecords();
|
|
2296
|
-
P.forEach((N) => {
|
|
2297
|
-
F(N);
|
|
2298
|
-
}), ($ = o == null ? void 0 : o.value) == null || $.reloadData(P), (O = o == null ? void 0 : o.value) == null || O.setTreeExpand(T, !0);
|
|
2299
|
-
}
|
|
2300
|
-
(D = o == null ? void 0 : o.value) == null || D.updateFooter();
|
|
2301
|
-
}, te = {
|
|
2302
|
-
cellMenu({ row: g }) {
|
|
2303
|
-
const v = o.value;
|
|
2304
|
-
v && v.setCurrentRow(g);
|
|
2306
|
+
}), v;
|
|
2307
|
+
}), K = {
|
|
2308
|
+
cellMenu({ row: v }) {
|
|
2309
|
+
const b = o.value;
|
|
2310
|
+
b && b.setCurrentRow(v);
|
|
2305
2311
|
},
|
|
2306
|
-
async menuClick({ menu:
|
|
2307
|
-
const
|
|
2308
|
-
if (
|
|
2309
|
-
switch (
|
|
2312
|
+
async menuClick({ menu: v }) {
|
|
2313
|
+
const b = o.value;
|
|
2314
|
+
if (b)
|
|
2315
|
+
switch (v.code) {
|
|
2310
2316
|
case "reload":
|
|
2311
2317
|
const p = layer.load(2, { shade: [0.5, "#fff"] });
|
|
2312
2318
|
r.gridRef.echoData(), layer.close(p);
|
|
2313
2319
|
break;
|
|
2314
2320
|
case "Print":
|
|
2315
|
-
|
|
2321
|
+
b.print();
|
|
2316
2322
|
break;
|
|
2317
2323
|
case "exportCurrent":
|
|
2318
|
-
const f = (
|
|
2319
|
-
|
|
2324
|
+
const f = (b == null ? void 0 : b.getTableData().tableData) || [];
|
|
2325
|
+
b.exportData({
|
|
2320
2326
|
type: "csv",
|
|
2321
2327
|
isHeader: !0,
|
|
2322
2328
|
isFooter: !1,
|
|
2323
|
-
columns:
|
|
2329
|
+
columns: b.getColumns().filter(($) => $.type !== "action" && $.type !== "checkbox"),
|
|
2324
2330
|
// 过滤出不需要导出的列
|
|
2325
|
-
filename: r.config.PageName
|
|
2331
|
+
filename: `${r.config.PageName}(${H_getISODate(/* @__PURE__ */ new Date())})`,
|
|
2326
2332
|
// 文件名
|
|
2327
2333
|
data: f
|
|
2328
2334
|
// 当前页数据
|
|
2329
2335
|
});
|
|
2330
2336
|
break;
|
|
2331
2337
|
case "exportAll":
|
|
2332
|
-
let
|
|
2333
|
-
|
|
2338
|
+
let w = await r.gridRef.handleExport();
|
|
2339
|
+
b.exportData({
|
|
2334
2340
|
type: "csv",
|
|
2335
2341
|
isHeader: !0,
|
|
2336
2342
|
isFooter: !0,
|
|
2337
|
-
columns:
|
|
2343
|
+
columns: b.getColumns().filter(($) => $.type !== "action" && $.type !== "checkbox" && $.type !== "seq"),
|
|
2338
2344
|
// 过滤出不需要导出的列
|
|
2339
|
-
|
|
2345
|
+
filename: `${r.config.PageName == "" ? "导出" : r.config.PageName}(${H_getISODate(/* @__PURE__ */ new Date())})`,
|
|
2346
|
+
// 文件名
|
|
2347
|
+
data: w
|
|
2340
2348
|
});
|
|
2341
2349
|
break;
|
|
2342
2350
|
case "print":
|
|
2343
|
-
|
|
2351
|
+
b.print();
|
|
2344
2352
|
break;
|
|
2345
2353
|
}
|
|
2346
2354
|
}
|
|
2347
2355
|
};
|
|
2348
|
-
function
|
|
2349
|
-
c("ActionClick",
|
|
2356
|
+
function J(v) {
|
|
2357
|
+
c("ActionClick", v);
|
|
2350
2358
|
}
|
|
2351
|
-
function
|
|
2352
|
-
c("PageChange", ...
|
|
2359
|
+
function G(...v) {
|
|
2360
|
+
c("PageChange", ...v);
|
|
2353
2361
|
}
|
|
2354
|
-
function
|
|
2355
|
-
c("Refresh", ...
|
|
2362
|
+
function Q(...v) {
|
|
2363
|
+
c("Refresh", ...v);
|
|
2356
2364
|
}
|
|
2357
|
-
function
|
|
2358
|
-
c("FilterSearch", ...
|
|
2365
|
+
function X(...v) {
|
|
2366
|
+
c("FilterSearch", ...v);
|
|
2359
2367
|
}
|
|
2360
|
-
function
|
|
2361
|
-
c("SortChange", ...
|
|
2368
|
+
function Z(...v) {
|
|
2369
|
+
c("SortChange", ...v);
|
|
2362
2370
|
}
|
|
2363
|
-
function
|
|
2364
|
-
c("ActionRenderBefore", ...
|
|
2371
|
+
function ee(...v) {
|
|
2372
|
+
c("ActionRenderBefore", ...v);
|
|
2365
2373
|
}
|
|
2366
|
-
function
|
|
2367
|
-
c("FileClick", ...
|
|
2374
|
+
function te(...v) {
|
|
2375
|
+
c("FileClick", ...v);
|
|
2368
2376
|
}
|
|
2369
|
-
function
|
|
2370
|
-
|
|
2377
|
+
function le(v, b, p) {
|
|
2378
|
+
v.column = b, v.row = p, c("tableSelectRemote", v);
|
|
2371
2379
|
}
|
|
2372
|
-
function
|
|
2373
|
-
c("tableSelectChange", ...
|
|
2380
|
+
function oe(...v) {
|
|
2381
|
+
c("tableSelectChange", ...v);
|
|
2374
2382
|
}
|
|
2375
|
-
function
|
|
2376
|
-
c("RemoteMethod", ...
|
|
2383
|
+
function re(...v) {
|
|
2384
|
+
c("RemoteMethod", ...v);
|
|
2377
2385
|
}
|
|
2378
|
-
function
|
|
2379
|
-
c("ChooseBefor", ...
|
|
2386
|
+
function ae(...v) {
|
|
2387
|
+
c("ChooseBefor", ...v);
|
|
2380
2388
|
}
|
|
2381
|
-
function
|
|
2382
|
-
c("PickPeople", ...
|
|
2389
|
+
function ne(...v) {
|
|
2390
|
+
c("PickPeople", ...v);
|
|
2383
2391
|
}
|
|
2384
|
-
function
|
|
2385
|
-
c("CheckboxChange", ...
|
|
2392
|
+
function ce(...v) {
|
|
2393
|
+
c("CheckboxChange", ...v);
|
|
2386
2394
|
}
|
|
2387
|
-
function
|
|
2388
|
-
return
|
|
2389
|
-
p.push(f), f[
|
|
2395
|
+
function P(v, b = "children", p = []) {
|
|
2396
|
+
return v.forEach((f) => {
|
|
2397
|
+
p.push(f), f[b] && f[b].length > 0 && P(f[b], b, p);
|
|
2390
2398
|
}), p;
|
|
2391
2399
|
}
|
|
2392
|
-
const
|
|
2393
|
-
var
|
|
2394
|
-
|
|
2395
|
-
},
|
|
2396
|
-
|
|
2397
|
-
let
|
|
2398
|
-
l.columns.splice((
|
|
2400
|
+
const ie = ({ menu: v }) => {
|
|
2401
|
+
var b, p;
|
|
2402
|
+
v.type == "print" ? (b = o.value) == null || b.openPrint() : v.type == "export" && ((p = o.value) == null || p.openExport());
|
|
2403
|
+
}, ue = (v) => {
|
|
2404
|
+
a.value = !0;
|
|
2405
|
+
let b = l.columns.splice(v._index.oldIndex, 1)[0];
|
|
2406
|
+
l.columns.splice((v._index.newIndex || 1) - 1, 0, b);
|
|
2399
2407
|
};
|
|
2400
|
-
function
|
|
2401
|
-
const
|
|
2402
|
-
if (!
|
|
2403
|
-
const p =
|
|
2408
|
+
function M(v) {
|
|
2409
|
+
const b = v.target.closest("tr.vxe-body--row");
|
|
2410
|
+
if (!b || !(o != null && o.value)) return;
|
|
2411
|
+
const p = b.getAttribute("rowid");
|
|
2404
2412
|
if (!p) return;
|
|
2405
2413
|
const f = o.value.getRowById(p);
|
|
2406
2414
|
f && o.value.setCurrentRow(f);
|
|
2407
2415
|
}
|
|
2408
|
-
function
|
|
2409
|
-
if (!(
|
|
2410
|
-
function p(f,
|
|
2411
|
-
let
|
|
2412
|
-
function
|
|
2416
|
+
function T(v, b) {
|
|
2417
|
+
if (!(v instanceof Array)) return 0;
|
|
2418
|
+
function p(f, w) {
|
|
2419
|
+
let $ = 0;
|
|
2420
|
+
function S(O) {
|
|
2413
2421
|
var D;
|
|
2414
2422
|
if (((D = O.children) == null ? void 0 : D.length) > 0)
|
|
2415
2423
|
for (const F of O.children)
|
|
2416
|
-
|
|
2424
|
+
S(F);
|
|
2417
2425
|
else
|
|
2418
|
-
|
|
2426
|
+
$ = H_calculate(`${$}+${O[w] || 0}`);
|
|
2419
2427
|
}
|
|
2420
|
-
return
|
|
2428
|
+
return S(f), $;
|
|
2421
2429
|
}
|
|
2422
|
-
return
|
|
2423
|
-
var
|
|
2424
|
-
if (!(
|
|
2425
|
-
return H_calculate(`${f}+${Number(b
|
|
2426
|
-
if (((
|
|
2427
|
-
return H_calculate(`${f}+${Number(b
|
|
2428
|
-
if (((
|
|
2429
|
-
let O = p(
|
|
2430
|
+
return v.reduce((f, w) => {
|
|
2431
|
+
var $, S;
|
|
2432
|
+
if (!(w != null && w.children))
|
|
2433
|
+
return H_calculate(`${f}+${Number(w[b]) || 0}`);
|
|
2434
|
+
if ((($ = w.children) == null ? void 0 : $.length) === 0 && (w.ParentOID === "00000000-0000-0000-0000-000000000000" || w.ParentOID === null))
|
|
2435
|
+
return H_calculate(`${f}+${Number(w[b]) || 0}`);
|
|
2436
|
+
if (((S = w.children) == null ? void 0 : S.length) > 0 && (w.ParentOID === "00000000-0000-0000-0000-000000000000" || w.ParentOID === null)) {
|
|
2437
|
+
let O = p(w, b);
|
|
2430
2438
|
return H_calculate(`${f}+${O}`);
|
|
2431
2439
|
}
|
|
2432
2440
|
return f;
|
|
@@ -2434,26 +2442,25 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2434
2442
|
}
|
|
2435
2443
|
return t({
|
|
2436
2444
|
gridRef: o,
|
|
2437
|
-
getFieldTotal:
|
|
2438
|
-
gridOptions:
|
|
2439
|
-
}), (
|
|
2445
|
+
getFieldTotal: T,
|
|
2446
|
+
gridOptions: N
|
|
2447
|
+
}), (v, b) => (openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
2440
2448
|
createVNode(unref(VxeGrid), mergeProps({
|
|
2441
2449
|
class: "grid-table",
|
|
2442
2450
|
ref_key: "gridRef",
|
|
2443
2451
|
ref: o
|
|
2444
|
-
}, { ...
|
|
2445
|
-
onMenuClick:
|
|
2446
|
-
onColumnDragend:
|
|
2452
|
+
}, { ...N.value, ...v.$attrs }, toHandlers(K), {
|
|
2453
|
+
onMenuClick: ie,
|
|
2454
|
+
onColumnDragend: ue,
|
|
2447
2455
|
"show-overflow": "tooltip",
|
|
2448
|
-
|
|
2449
|
-
onCheckboxChange: pe
|
|
2456
|
+
onCheckboxChange: ce
|
|
2450
2457
|
}), {
|
|
2451
2458
|
FilterRows: withCtx(({ column: p }) => [
|
|
2452
2459
|
createVNode(_sfc_main$t, {
|
|
2453
2460
|
column: p,
|
|
2454
2461
|
"grid-ref": o.value,
|
|
2455
|
-
onFilterSearch:
|
|
2456
|
-
onSortChange:
|
|
2462
|
+
onFilterSearch: X,
|
|
2463
|
+
onSortChange: Z
|
|
2457
2464
|
}, null, 8, ["column", "grid-ref"])
|
|
2458
2465
|
]),
|
|
2459
2466
|
ActionRender: withCtx(({ row: p, column: f }) => [
|
|
@@ -2461,40 +2468,40 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2461
2468
|
row: p,
|
|
2462
2469
|
column: f,
|
|
2463
2470
|
"grid-ref": o.value,
|
|
2464
|
-
onActionClick:
|
|
2465
|
-
onActionRenderBefore:
|
|
2471
|
+
onActionClick: J,
|
|
2472
|
+
onActionRenderBefore: ee
|
|
2466
2473
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2467
2474
|
]),
|
|
2468
2475
|
RadioRender: withCtx(({ row: p, column: f }) => [
|
|
2469
|
-
createVNode(unref(
|
|
2476
|
+
createVNode(unref(d), {
|
|
2470
2477
|
row: p,
|
|
2471
2478
|
column: f,
|
|
2472
2479
|
"grid-ref": o.value
|
|
2473
2480
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2474
2481
|
]),
|
|
2475
2482
|
CheckboxRender: withCtx(({ row: p, column: f }) => [
|
|
2476
|
-
createVNode(unref(
|
|
2483
|
+
createVNode(unref(u), {
|
|
2477
2484
|
row: p,
|
|
2478
2485
|
column: f,
|
|
2479
2486
|
"grid-ref": o.value
|
|
2480
2487
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2481
2488
|
]),
|
|
2482
2489
|
ColorPickerRender: withCtx(({ row: p, column: f }) => [
|
|
2483
|
-
createVNode(unref(
|
|
2490
|
+
createVNode(unref(s), {
|
|
2484
2491
|
row: p,
|
|
2485
2492
|
column: f,
|
|
2486
2493
|
"grid-ref": o.value
|
|
2487
2494
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2488
2495
|
]),
|
|
2489
2496
|
IconPickerRender: withCtx(({ row: p, column: f }) => [
|
|
2490
|
-
createVNode(unref(
|
|
2497
|
+
createVNode(unref(i), {
|
|
2491
2498
|
row: p,
|
|
2492
2499
|
column: f,
|
|
2493
2500
|
"grid-ref": o.value
|
|
2494
2501
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2495
2502
|
]),
|
|
2496
2503
|
ProgressRender: withCtx(({ row: p, column: f }) => [
|
|
2497
|
-
createVNode(unref(
|
|
2504
|
+
createVNode(unref(m), {
|
|
2498
2505
|
row: p,
|
|
2499
2506
|
column: f,
|
|
2500
2507
|
"grid-ref": o.value
|
|
@@ -2508,21 +2515,21 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2508
2515
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2509
2516
|
]),
|
|
2510
2517
|
SelectMultipleRender: withCtx(({ row: p, column: f }) => [
|
|
2511
|
-
createVNode(unref(
|
|
2518
|
+
createVNode(unref(h), {
|
|
2512
2519
|
row: p,
|
|
2513
2520
|
column: f,
|
|
2514
2521
|
"grid-ref": o.value
|
|
2515
2522
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2516
2523
|
]),
|
|
2517
2524
|
TreeSelectRender: withCtx(({ row: p, column: f }) => [
|
|
2518
|
-
createVNode(unref(
|
|
2525
|
+
createVNode(unref(g), {
|
|
2519
2526
|
row: p,
|
|
2520
2527
|
column: f,
|
|
2521
2528
|
"grid-ref": o.value
|
|
2522
2529
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2523
2530
|
]),
|
|
2524
2531
|
TreeMultipleSelectRender: withCtx(({ row: p, column: f }) => [
|
|
2525
|
-
createVNode(unref(
|
|
2532
|
+
createVNode(unref(k), {
|
|
2526
2533
|
row: p,
|
|
2527
2534
|
column: f,
|
|
2528
2535
|
"grid-ref": o.value
|
|
@@ -2533,34 +2540,34 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2533
2540
|
row: p,
|
|
2534
2541
|
column: f,
|
|
2535
2542
|
"grid-ref": r.gridRef,
|
|
2536
|
-
onOnChooseBeforClick:
|
|
2543
|
+
onOnChooseBeforClick: ae
|
|
2537
2544
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2538
2545
|
]),
|
|
2539
2546
|
PickPeopleRender: withCtx(({ row: p, column: f }) => [
|
|
2540
|
-
createVNode(unref(
|
|
2547
|
+
createVNode(unref(E), {
|
|
2541
2548
|
row: p,
|
|
2542
2549
|
column: f,
|
|
2543
2550
|
"grid-ref": o.value,
|
|
2544
|
-
onChange:
|
|
2551
|
+
onChange: ne
|
|
2545
2552
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2546
2553
|
]),
|
|
2547
2554
|
FileRender: withCtx(({ row: p, column: f }) => [
|
|
2548
|
-
createVNode(unref(
|
|
2555
|
+
createVNode(unref(B), {
|
|
2549
2556
|
row: p,
|
|
2550
2557
|
column: f,
|
|
2551
2558
|
"grid-ref": o.value,
|
|
2552
|
-
onFileClick:
|
|
2559
|
+
onFileClick: te
|
|
2553
2560
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2554
2561
|
]),
|
|
2555
2562
|
CustomRender: withCtx(({ row: p, column: f }) => [
|
|
2556
|
-
createVNode(unref(
|
|
2563
|
+
createVNode(unref(C), {
|
|
2557
2564
|
row: p,
|
|
2558
2565
|
column: f,
|
|
2559
2566
|
"grid-ref": o.value
|
|
2560
2567
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2561
2568
|
]),
|
|
2562
2569
|
DatePickerRender: withCtx(({ row: p, column: f }) => [
|
|
2563
|
-
createVNode(unref(
|
|
2570
|
+
createVNode(unref(V), {
|
|
2564
2571
|
row: p,
|
|
2565
2572
|
column: f,
|
|
2566
2573
|
"grid-ref": o.value
|
|
@@ -2581,87 +2588,87 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2581
2588
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2582
2589
|
]),
|
|
2583
2590
|
TextareaEditor: withCtx(({ row: p, column: f }) => [
|
|
2584
|
-
createVNode(unref(
|
|
2591
|
+
createVNode(unref(z), {
|
|
2585
2592
|
row: p,
|
|
2586
2593
|
column: f,
|
|
2587
2594
|
"grid-ref": o.value
|
|
2588
2595
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2589
2596
|
]),
|
|
2590
2597
|
SelectEditor: withCtx(({ row: p, column: f }) => [
|
|
2591
|
-
createVNode(unref(
|
|
2598
|
+
createVNode(unref(I), {
|
|
2592
2599
|
row: p,
|
|
2593
2600
|
column: f,
|
|
2594
2601
|
"grid-ref": o.value
|
|
2595
2602
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2596
2603
|
]),
|
|
2597
2604
|
SelectMultipleEditor: withCtx(({ row: p, column: f }) => [
|
|
2598
|
-
createVNode(unref(
|
|
2605
|
+
createVNode(unref(H), {
|
|
2599
2606
|
row: p,
|
|
2600
2607
|
column: f,
|
|
2601
2608
|
"grid-ref": o.value
|
|
2602
2609
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2603
2610
|
]),
|
|
2604
2611
|
TreeSelectEditor: withCtx(({ row: p, column: f }) => [
|
|
2605
|
-
createVNode(unref(
|
|
2612
|
+
createVNode(unref(Y), {
|
|
2606
2613
|
row: p,
|
|
2607
2614
|
column: f,
|
|
2608
2615
|
"grid-ref": o.value
|
|
2609
2616
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2610
2617
|
]),
|
|
2611
2618
|
TreeMultipleSelectEditor: withCtx(({ row: p, column: f }) => [
|
|
2612
|
-
createVNode(unref(
|
|
2619
|
+
createVNode(unref(U), {
|
|
2613
2620
|
row: p,
|
|
2614
2621
|
column: f,
|
|
2615
2622
|
"grid-ref": o.value
|
|
2616
2623
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2617
2624
|
]),
|
|
2618
2625
|
DatePickerEditor: withCtx(({ row: p, column: f }) => [
|
|
2619
|
-
createVNode(unref(
|
|
2626
|
+
createVNode(unref(A), {
|
|
2620
2627
|
row: p,
|
|
2621
2628
|
column: f,
|
|
2622
2629
|
"grid-ref": o.value
|
|
2623
2630
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2624
2631
|
]),
|
|
2625
2632
|
InputNumberEditor: withCtx(({ row: p, column: f }) => [
|
|
2626
|
-
createVNode(unref(
|
|
2633
|
+
createVNode(unref(L), {
|
|
2627
2634
|
row: p,
|
|
2628
2635
|
column: f,
|
|
2629
2636
|
"grid-ref": o.value
|
|
2630
2637
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2631
2638
|
]),
|
|
2632
2639
|
SelectRemoteEditor: withCtx(({ row: p, column: f }) => [
|
|
2633
|
-
createVNode(unref(
|
|
2640
|
+
createVNode(unref(q), {
|
|
2634
2641
|
row: p,
|
|
2635
2642
|
column: f,
|
|
2636
2643
|
"grid-ref": o.value,
|
|
2637
|
-
onRemoteMethod:
|
|
2644
|
+
onRemoteMethod: re
|
|
2638
2645
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2639
2646
|
]),
|
|
2640
2647
|
tableSelect: withCtx(({ row: p, column: f }) => [
|
|
2641
2648
|
createElementVNode("div", _hoisted_2$2, [
|
|
2642
2649
|
createVNode(unref(HrTableSelect), {
|
|
2643
2650
|
modelValue: p[f.field],
|
|
2644
|
-
"onUpdate:modelValue": (
|
|
2651
|
+
"onUpdate:modelValue": (w) => p[f.field] = w,
|
|
2645
2652
|
columns: f.params.tableSelectColumns || [],
|
|
2646
|
-
onRemoteMethod: (
|
|
2647
|
-
onChange: (
|
|
2653
|
+
onRemoteMethod: (w) => le(w, f, p),
|
|
2654
|
+
onChange: (w) => oe({ change: w, row: p, column: f }),
|
|
2648
2655
|
width: f.params.tableSelectWidth
|
|
2649
2656
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "columns", "onRemoteMethod", "onChange", "width"])
|
|
2650
2657
|
])
|
|
2651
2658
|
]),
|
|
2652
2659
|
pager: withCtx(() => [
|
|
2653
2660
|
createVNode(_sfc_main$3, {
|
|
2654
|
-
pagination:
|
|
2655
|
-
gridOptions:
|
|
2656
|
-
onPageChange:
|
|
2657
|
-
onRefresh:
|
|
2661
|
+
pagination: n.pagination,
|
|
2662
|
+
gridOptions: N.value,
|
|
2663
|
+
onPageChange: G,
|
|
2664
|
+
onRefresh: Q
|
|
2658
2665
|
}, null, 8, ["pagination", "gridOptions"])
|
|
2659
2666
|
]),
|
|
2660
2667
|
_: 1
|
|
2661
2668
|
}, 16)
|
|
2662
2669
|
]));
|
|
2663
2670
|
}
|
|
2664
|
-
}), Table = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
2671
|
+
}), Table = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-3dad13dc"]]);
|
|
2665
2672
|
VxeUI.setConfig({
|
|
2666
2673
|
size: "small",
|
|
2667
2674
|
table: {
|
|
@@ -2699,32 +2706,32 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
2699
2706
|
modelModifiers: {}
|
|
2700
2707
|
}),
|
|
2701
2708
|
emits: /* @__PURE__ */ mergeModels(["change"], ["update:modelValue"]),
|
|
2702
|
-
setup(
|
|
2703
|
-
const e = useModel(
|
|
2704
|
-
return watch(() =>
|
|
2705
|
-
var
|
|
2706
|
-
return (
|
|
2707
|
-
}), (l,
|
|
2709
|
+
setup(n, { emit: t }) {
|
|
2710
|
+
const e = useModel(n, "modelValue"), r = ref(), c = t, o = (l) => l ? `${Number(l) ? l + "px" : l}` : "150px";
|
|
2711
|
+
return watch(() => n.highlight, (l) => {
|
|
2712
|
+
var a;
|
|
2713
|
+
return (a = r.value.querySelector(`[index="${l}"]`)) == null ? void 0 : a.scrollIntoView({ block: "center", behavior: "smooth" });
|
|
2714
|
+
}), (l, a) => (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
2708
2715
|
createElementVNode("table", null, [
|
|
2709
2716
|
createElementVNode("thead", null, [
|
|
2710
2717
|
createElementVNode("tr", null, [
|
|
2711
|
-
|
|
2712
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (
|
|
2713
|
-
style: normalizeStyle({ width: o(
|
|
2714
|
-
}, toDisplayString(
|
|
2718
|
+
a[0] || (a[0] = createElementVNode("th", { class: "w[50px]" }, "序号", -1)),
|
|
2719
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (u) => (openBlock(), createElementBlock("th", {
|
|
2720
|
+
style: normalizeStyle({ width: o(u.width) })
|
|
2721
|
+
}, toDisplayString(u.title), 5))), 256))
|
|
2715
2722
|
])
|
|
2716
2723
|
]),
|
|
2717
2724
|
createElementVNode("tbody", {
|
|
2718
2725
|
ref_key: "tbody",
|
|
2719
2726
|
ref: r
|
|
2720
2727
|
}, [
|
|
2721
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.value, (
|
|
2722
|
-
class: normalizeClass({ zebra:
|
|
2723
|
-
onClick: (
|
|
2724
|
-
index:
|
|
2728
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.value, (u, s) => (openBlock(), createElementBlock("tr", {
|
|
2729
|
+
class: normalizeClass({ zebra: s % 2 != 0, highlight: l.highlight === s }),
|
|
2730
|
+
onClick: (i) => c("change", u),
|
|
2731
|
+
index: s
|
|
2725
2732
|
}, [
|
|
2726
|
-
createElementVNode("td", _hoisted_3, toDisplayString(
|
|
2727
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (
|
|
2733
|
+
createElementVNode("td", _hoisted_3, toDisplayString(s + 1), 1),
|
|
2734
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (i) => (openBlock(), createElementBlock("td", null, toDisplayString(u[i.field]), 1))), 256))
|
|
2728
2735
|
], 10, _hoisted_2$1))), 256))
|
|
2729
2736
|
], 512)
|
|
2730
2737
|
]),
|
|
@@ -2747,46 +2754,46 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
2747
2754
|
modelModifiers: {}
|
|
2748
2755
|
}),
|
|
2749
2756
|
emits: /* @__PURE__ */ mergeModels(["remote-method", "change"], ["update:modelValue"]),
|
|
2750
|
-
setup(
|
|
2757
|
+
setup(n, { emit: t }) {
|
|
2751
2758
|
const e = reactive({
|
|
2752
2759
|
query: "",
|
|
2753
2760
|
tableData: [],
|
|
2754
2761
|
loading: !1
|
|
2755
|
-
}), r = ref(), c = ref(), o = ref(!1), l = ref(-1),
|
|
2756
|
-
o.value = !0,
|
|
2757
|
-
},
|
|
2762
|
+
}), r = ref(), c = ref(), o = ref(!1), l = ref(-1), a = reactive({ x: 0, y: 0, w: 0 }), u = useModel(n, "modelValue"), s = t, i = () => s("remote-method", e), d = () => {
|
|
2763
|
+
o.value = !0, s("remote-method", e), m();
|
|
2764
|
+
}, m = async () => {
|
|
2758
2765
|
if (!o.value) return;
|
|
2759
|
-
const
|
|
2760
|
-
|
|
2766
|
+
const C = (j) => Number(j) ? j + "px" : j, V = r.value.getBoundingClientRect();
|
|
2767
|
+
a.y = innerHeight - V.y < V.y ? V.y - V.height - 280 : V.y + V.height + 5, a.w = n.width ? C(n.width) : V.width < 300 ? "300px" : V.width + "px", await nextTick();
|
|
2761
2768
|
const R = c.value.$el.offsetWidth;
|
|
2762
|
-
|
|
2769
|
+
a.x = innerWidth - V.x > R ? V.x : V.x + V.width - R;
|
|
2763
2770
|
};
|
|
2764
2771
|
let _ = !0;
|
|
2765
|
-
const y = () => _ && (o.value = !1),
|
|
2766
|
-
|
|
2767
|
-
}, x = () => l.value !== -1 && l.value--,
|
|
2772
|
+
const y = () => _ && (o.value = !1), g = () => (_ = !1, setTimeout(() => _ = !0, 16)), h = () => _ && r.value.focus(), k = (C) => {
|
|
2773
|
+
g(), s("change", C), o.value = !1;
|
|
2774
|
+
}, x = () => l.value !== -1 && l.value--, E = () => l.value < e.tableData.length && l.value++, B = () => {
|
|
2768
2775
|
if (l.value == -1) return;
|
|
2769
|
-
const
|
|
2770
|
-
|
|
2776
|
+
const C = e.tableData[l.value];
|
|
2777
|
+
s("change", C), r.value.blur();
|
|
2771
2778
|
};
|
|
2772
|
-
return watch(() => e.query, (
|
|
2773
|
-
|
|
2774
|
-
}), watch(() =>
|
|
2775
|
-
|
|
2779
|
+
return watch(() => e.query, (C) => {
|
|
2780
|
+
C !== u.value && (u.value = C);
|
|
2781
|
+
}), watch(() => u.value, (C) => {
|
|
2782
|
+
C !== e.query && (e.query = C);
|
|
2776
2783
|
}), effect(() => {
|
|
2777
2784
|
e.query, o.value, l.value = -1;
|
|
2778
|
-
}), effect(() => !o.value && (e.tableData = [])), document.addEventListener("scroll",
|
|
2785
|
+
}), effect(() => !o.value && (e.tableData = [])), document.addEventListener("scroll", m), (C, V) => (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
2779
2786
|
withDirectives(createElementVNode("input", {
|
|
2780
2787
|
ref_key: "input",
|
|
2781
2788
|
ref: r,
|
|
2782
|
-
"onUpdate:modelValue":
|
|
2783
|
-
onInput:
|
|
2784
|
-
onFocus:
|
|
2789
|
+
"onUpdate:modelValue": V[0] || (V[0] = (R) => e.query = R),
|
|
2790
|
+
onInput: i,
|
|
2791
|
+
onFocus: d,
|
|
2785
2792
|
onBlur: y,
|
|
2786
2793
|
onKeydown: [
|
|
2787
2794
|
withKeys(x, ["up"]),
|
|
2788
|
-
withKeys(
|
|
2789
|
-
withKeys(withModifiers(
|
|
2795
|
+
withKeys(E, ["down"]),
|
|
2796
|
+
withKeys(withModifiers(B, ["prevent"]), ["enter"])
|
|
2790
2797
|
]
|
|
2791
2798
|
}, null, 40, _hoisted_2), [
|
|
2792
2799
|
[vModelText, e.query]
|
|
@@ -2796,14 +2803,14 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
2796
2803
|
ref_key: "table",
|
|
2797
2804
|
ref: c,
|
|
2798
2805
|
modelValue: e.tableData,
|
|
2799
|
-
"onUpdate:modelValue":
|
|
2806
|
+
"onUpdate:modelValue": V[1] || (V[1] = (R) => e.tableData = R),
|
|
2800
2807
|
loading: e.loading,
|
|
2801
2808
|
highlight: l.value,
|
|
2802
|
-
columns:
|
|
2803
|
-
onMousedown:
|
|
2804
|
-
onClick:
|
|
2805
|
-
onChange:
|
|
2806
|
-
style: normalizeStyle({ top:
|
|
2809
|
+
columns: C.columns,
|
|
2810
|
+
onMousedown: g,
|
|
2811
|
+
onClick: h,
|
|
2812
|
+
onChange: k,
|
|
2813
|
+
style: normalizeStyle({ top: a.y + "px", left: a.x + "px", width: a.w })
|
|
2807
2814
|
}, null, 8, ["modelValue", "loading", "highlight", "columns", "style"])) : createCommentVNode("", !0)
|
|
2808
2815
|
]));
|
|
2809
2816
|
}
|