gzhr-ui 1.1.21 → 1.1.23
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-B1K6jzd4.mjs → button-0Kif_Ogc.mjs} +1 -1
- package/dist/es/{icon-DQfhO9K8.mjs → icon-Cp44F-x9.mjs} +2 -2
- package/dist/es/index.mjs +5 -5
- package/dist/es/{table-i6vL_Mxt.mjs → table-m5msVcWS.mjs} +927 -891
- package/dist/es/{utils-B2xHWiw_.mjs → utils-DQkfuWK5.mjs} +1 -1
- package/dist/es/{vendor-8rrAVn-v.mjs → vendor-CR-Aabuz.mjs} +15638 -15122
- package/dist/index.css +1 -1
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.js +13 -13
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./button-
|
|
2
|
-
import { a as ElInput, b as ElPopover, c as ElDatePicker, d as ElButton, C as ClickOutside,
|
|
1
|
+
import "./button-0Kif_Ogc.mjs";
|
|
2
|
+
import { a as ElInput, b as ElPopover, c as ElDatePicker, d as ElButton, e as ElMessage, C as ClickOutside, f as ElCheckboxGroup, g as ElCheckbox, h as ElTreeSelect, i as ElInputNumber, E as ElIcon, j as ElDropdown, k as ElDropdownMenu, l as ElDropdownItem, m as ElTag, n as isEmpty, o as ElColorPicker, p as dayjs, q as isoWeek, r as quarterOfYear, s as customParseFormat, t as ElImage, u as ElProgress, v as ElRadioGroup, w as ElRadio, x as ElSelect, y as ElOption, V as VxePager, z as VxeGrid, A as VxeUI } from "./vendor-CR-Aabuz.mjs";
|
|
3
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, nextTick, toHandlers, useModel, mergeModels, effect, 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-
|
|
5
|
-
import { H as HrIcon } from "./icon-
|
|
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-DQkfuWK5.mjs";
|
|
5
|
+
import { H as HrIcon } from "./icon-Cp44F-x9.mjs";
|
|
6
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: {
|
|
@@ -12,45 +12,78 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
emits: ["FilterSearch"],
|
|
15
|
-
setup(
|
|
16
|
-
const e =
|
|
17
|
-
var
|
|
18
|
-
const
|
|
19
|
-
return Array.isArray(
|
|
15
|
+
setup(o, { emit: t }) {
|
|
16
|
+
const e = o, n = t, a = ref(""), r = ref(""), l = ref(!1), i = ref(), m = ref(), d = ref(), u = computed(() => {
|
|
17
|
+
var s, b;
|
|
18
|
+
const c = ((b = (s = e.column.filters) == null ? void 0 : s[0]) == null ? void 0 : b.data) || [];
|
|
19
|
+
return Array.isArray(c) && c.length === 2 && c[0] && c[1] ? `${c[0]} 至 ${c[1]}` : "";
|
|
20
20
|
});
|
|
21
21
|
onMounted(() => {
|
|
22
|
-
var
|
|
23
|
-
const
|
|
24
|
-
Array.isArray(
|
|
22
|
+
var s, b;
|
|
23
|
+
const c = ((b = (s = e.column.filters) == null ? void 0 : s[0]) == null ? void 0 : b.data) || [];
|
|
24
|
+
Array.isArray(c) && c.length === 2 && (a.value = c[0] || "", r.value = c[1] || ""), document.addEventListener("click", f);
|
|
25
25
|
}), onBeforeUnmount(() => {
|
|
26
|
-
document.removeEventListener("click",
|
|
26
|
+
document.removeEventListener("click", f);
|
|
27
27
|
});
|
|
28
28
|
const _ = () => {
|
|
29
29
|
l.value = !l.value;
|
|
30
|
-
},
|
|
31
|
-
var
|
|
30
|
+
}, f = (c) => {
|
|
31
|
+
var B, D;
|
|
32
32
|
if (!l.value) return;
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
const s = c.target, b = (j) => {
|
|
34
|
+
var $, q, v;
|
|
35
|
+
if (!j) return !1;
|
|
36
|
+
let Y = j;
|
|
37
|
+
for (let k = 0; k < 10 && Y; k++) {
|
|
38
|
+
const E = Y.classList;
|
|
39
|
+
if (E && (E.contains("el-picker-panel") || // 面板容器
|
|
40
|
+
E.contains("el-date-picker") || // 日期选择器
|
|
41
|
+
E.contains("el-date-range-picker") || // 日期范围选择器
|
|
42
|
+
E.contains("el-month-table") || // 月份表格
|
|
43
|
+
E.contains("el-year-table") || // 年份表格
|
|
44
|
+
E.contains("el-date-table") || // 日期表格
|
|
45
|
+
E.contains("el-picker-panel__content") || // 面板内容
|
|
46
|
+
E.contains("el-popper") || // 弹出层
|
|
47
|
+
E.contains("el-picker__popper") || E.contains("el-date-picker__header") || // 头部
|
|
48
|
+
E.contains("el-picker-panel__icon-btn") || // 箭头按钮
|
|
49
|
+
E.contains("el-date-picker__prev-btn") || // 上个月
|
|
50
|
+
E.contains("el-date-picker__next-btn") || // 下个月
|
|
51
|
+
E.contains("el-date-picker__dow")))
|
|
52
|
+
return !0;
|
|
53
|
+
if (Y.getAttribute) {
|
|
54
|
+
const O = Y.getAttribute("aria-label");
|
|
55
|
+
if (O && (O.includes("month") || O.includes("year") || O.includes("next") || O.includes("prev")))
|
|
56
|
+
return !0;
|
|
57
|
+
const P = Y.getAttribute("role");
|
|
58
|
+
if ((P === "button" || P === "gridcell" || P === "columnheader") && (($ = Y.parentElement) != null && $.classList.contains("el-date-table") || (q = Y.parentElement) != null && q.classList.contains("el-month-table") || (v = Y.parentElement) != null && v.classList.contains("el-year-table")))
|
|
59
|
+
return !0;
|
|
60
|
+
}
|
|
61
|
+
if (Y.id && Y.id.includes("el-picker-panel"))
|
|
62
|
+
return !0;
|
|
63
|
+
Y = Y.parentNode;
|
|
64
|
+
}
|
|
65
|
+
return !1;
|
|
66
|
+
}, S = d.value, x = (D = (B = m.value) == null ? void 0 : B.popperRef) == null ? void 0 : D.contentRef;
|
|
67
|
+
S && S.contains(s) || x && x.contains(s) || b(s) || s.closest && (s.closest(".el-picker-panel") || s.closest('[aria-label*="month"]') || s.closest('[aria-label*="year"]') || s.closest(".el-date-table") || s.closest(".el-month-table") || s.closest(".el-year-table")) || (l.value = !1);
|
|
35
68
|
};
|
|
36
|
-
function
|
|
37
|
-
if (!a.value && !
|
|
69
|
+
function w() {
|
|
70
|
+
if (!a.value && !r.value)
|
|
38
71
|
e.column.filters[0].data = [];
|
|
39
|
-
else if (!a.value || !
|
|
40
|
-
|
|
72
|
+
else if (!a.value || !r.value) {
|
|
73
|
+
ElMessage.warning("请选择完整的时间范围");
|
|
41
74
|
return;
|
|
42
75
|
} else
|
|
43
|
-
e.column.filters[0].data = [a.value,
|
|
44
|
-
l.value = !1,
|
|
76
|
+
e.column.filters[0].data = [a.value, r.value];
|
|
77
|
+
l.value = !1, n("FilterSearch", e.column);
|
|
45
78
|
}
|
|
46
79
|
function p() {
|
|
47
|
-
a.value = "",
|
|
80
|
+
a.value = "", r.value = "", e.column.filters[0].data = [];
|
|
48
81
|
}
|
|
49
|
-
return (
|
|
82
|
+
return (c, s) => (openBlock(), createElementBlock("div", {
|
|
50
83
|
class: "size-full",
|
|
51
84
|
title: u.value,
|
|
52
85
|
ref_key: "wrapperRef",
|
|
53
|
-
ref:
|
|
86
|
+
ref: d
|
|
54
87
|
}, [
|
|
55
88
|
createVNode(unref(ElInput), {
|
|
56
89
|
ref_key: "inputRef",
|
|
@@ -66,7 +99,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
66
99
|
"virtual-triggering": "",
|
|
67
100
|
trigger: "manual",
|
|
68
101
|
visible: l.value,
|
|
69
|
-
"onUpdate:visible":
|
|
102
|
+
"onUpdate:visible": s[2] || (s[2] = (b) => l.value = b),
|
|
70
103
|
"hide-after": 0,
|
|
71
104
|
width: "140",
|
|
72
105
|
"popper-class": "date-filter-popper"
|
|
@@ -75,7 +108,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
75
108
|
createElementVNode("div", _hoisted_2$7, [
|
|
76
109
|
createVNode(unref(ElDatePicker), {
|
|
77
110
|
modelValue: a.value,
|
|
78
|
-
"onUpdate:modelValue":
|
|
111
|
+
"onUpdate:modelValue": s[0] || (s[0] = (b) => a.value = b),
|
|
79
112
|
type: "date",
|
|
80
113
|
"value-format": "YYYY-MM-DD",
|
|
81
114
|
placeholder: "开始日期",
|
|
@@ -84,8 +117,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
84
117
|
style: { width: "100%" }
|
|
85
118
|
}, null, 8, ["modelValue"]),
|
|
86
119
|
createVNode(unref(ElDatePicker), {
|
|
87
|
-
modelValue:
|
|
88
|
-
"onUpdate:modelValue":
|
|
120
|
+
modelValue: r.value,
|
|
121
|
+
"onUpdate:modelValue": s[1] || (s[1] = (b) => r.value = b),
|
|
89
122
|
type: "date",
|
|
90
123
|
"value-format": "YYYY-MM-DD",
|
|
91
124
|
placeholder: "结束日期",
|
|
@@ -98,9 +131,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
98
131
|
size: "small",
|
|
99
132
|
type: "primary",
|
|
100
133
|
class: "btn-confirm",
|
|
101
|
-
onClick:
|
|
134
|
+
onClick: w
|
|
102
135
|
}, {
|
|
103
|
-
default: withCtx(() =>
|
|
136
|
+
default: withCtx(() => s[3] || (s[3] = [
|
|
104
137
|
createTextVNode(" 确认 ")
|
|
105
138
|
])),
|
|
106
139
|
_: 1
|
|
@@ -110,7 +143,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
110
143
|
class: "btn-reset",
|
|
111
144
|
onClick: p
|
|
112
145
|
}, {
|
|
113
|
-
default: withCtx(() =>
|
|
146
|
+
default: withCtx(() => s[4] || (s[4] = [
|
|
114
147
|
createTextVNode(" 重置 ")
|
|
115
148
|
])),
|
|
116
149
|
_: 1
|
|
@@ -122,7 +155,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
122
155
|
}, 8, ["virtual-ref", "visible"])
|
|
123
156
|
], 8, _hoisted_1$j));
|
|
124
157
|
}
|
|
125
|
-
}, FilterDate = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-
|
|
158
|
+
}, FilterDate = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-b79b5872"]]), _hoisted_1$i = ["title"], _sfc_main$y = {
|
|
126
159
|
__name: "filter-boolean",
|
|
127
160
|
props: {
|
|
128
161
|
column: {
|
|
@@ -131,13 +164,13 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
131
164
|
}
|
|
132
165
|
},
|
|
133
166
|
emits: ["FilterSearch"],
|
|
134
|
-
setup(
|
|
135
|
-
const e =
|
|
167
|
+
setup(o, { emit: t }) {
|
|
168
|
+
const e = o, n = ref([]), a = computed(() => e.column.filters[0].data.length ? e.column.filters[0].data.map((u) => u ? "是" : "否").join(",") : ""), r = ref(), l = ref(), i = () => {
|
|
136
169
|
var u, _;
|
|
137
170
|
(_ = (u = unref(l).popperRef) == null ? void 0 : u.delayHide) == null || _.call(u);
|
|
138
171
|
}, m = t;
|
|
139
|
-
function
|
|
140
|
-
|
|
172
|
+
function d() {
|
|
173
|
+
n.value.length ? e.column.filters[0].data = [...n.value] : e.column.filters[0].data = [];
|
|
141
174
|
}
|
|
142
175
|
return (u, _) => (openBlock(), createElementBlock("div", {
|
|
143
176
|
class: "size-full",
|
|
@@ -145,17 +178,17 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
145
178
|
}, [
|
|
146
179
|
withDirectives(createVNode(unref(ElInput), {
|
|
147
180
|
ref_key: "inputRef",
|
|
148
|
-
ref:
|
|
181
|
+
ref: r,
|
|
149
182
|
value: a.value,
|
|
150
183
|
readonly: "",
|
|
151
|
-
onKeyup: _[0] || (_[0] = withKeys((
|
|
184
|
+
onKeyup: _[0] || (_[0] = withKeys((f) => m("FilterSearch", o.column), ["enter"]))
|
|
152
185
|
}, null, 8, ["value"]), [
|
|
153
186
|
[unref(ClickOutside), i]
|
|
154
187
|
]),
|
|
155
188
|
createVNode(unref(ElPopover), {
|
|
156
189
|
ref_key: "popoverRef",
|
|
157
190
|
ref: l,
|
|
158
|
-
"virtual-ref":
|
|
191
|
+
"virtual-ref": r.value,
|
|
159
192
|
trigger: "click",
|
|
160
193
|
"virtual-triggering": "",
|
|
161
194
|
"hide-after": 0
|
|
@@ -163,9 +196,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
163
196
|
default: withCtx(() => [
|
|
164
197
|
createVNode(unref(ElCheckboxGroup), {
|
|
165
198
|
class: "flex flex-col",
|
|
166
|
-
modelValue:
|
|
167
|
-
"onUpdate:modelValue": _[1] || (_[1] = (
|
|
168
|
-
onChange:
|
|
199
|
+
modelValue: n.value,
|
|
200
|
+
"onUpdate:modelValue": _[1] || (_[1] = (f) => n.value = f),
|
|
201
|
+
onChange: d
|
|
169
202
|
}, {
|
|
170
203
|
default: withCtx(() => [
|
|
171
204
|
createVNode(unref(ElCheckbox), {
|
|
@@ -193,18 +226,18 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
193
226
|
}
|
|
194
227
|
},
|
|
195
228
|
emits: ["FilterSearch"],
|
|
196
|
-
setup(
|
|
197
|
-
const e =
|
|
229
|
+
setup(o, { emit: t }) {
|
|
230
|
+
const e = o, n = ref([]);
|
|
198
231
|
ref("");
|
|
199
232
|
const a = computed(() => e.column.filters && e.column.filters[0].data.length ? e.column.filters[0].data.map((u) => {
|
|
200
233
|
var _;
|
|
201
|
-
return (_ = e.column.params.options.find((
|
|
202
|
-
}).join(",") : ""),
|
|
234
|
+
return (_ = e.column.params.options.find((f) => f.value === u)) == null ? void 0 : _.label;
|
|
235
|
+
}).join(",") : ""), r = ref(), l = ref(), i = () => {
|
|
203
236
|
var u, _;
|
|
204
237
|
(_ = (u = unref(l).popperRef) == null ? void 0 : u.delayHide) == null || _.call(u);
|
|
205
238
|
}, m = t;
|
|
206
|
-
function
|
|
207
|
-
|
|
239
|
+
function d() {
|
|
240
|
+
n.value.length ? e.column.filters[0].data = [...n.value] : e.column.filters[0].data = [];
|
|
208
241
|
}
|
|
209
242
|
return (u, _) => (openBlock(), createElementBlock("div", {
|
|
210
243
|
class: "size-full",
|
|
@@ -212,50 +245,50 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
212
245
|
}, [
|
|
213
246
|
withDirectives(createVNode(unref(ElInput), {
|
|
214
247
|
ref_key: "inputRef",
|
|
215
|
-
ref:
|
|
248
|
+
ref: r,
|
|
216
249
|
value: a.value,
|
|
217
250
|
readonly: "",
|
|
218
|
-
onKeyup: _[0] || (_[0] = withKeys((
|
|
251
|
+
onKeyup: _[0] || (_[0] = withKeys((f) => m("FilterSearch", o.column), ["enter"]))
|
|
219
252
|
}, null, 8, ["value"]), [
|
|
220
253
|
[unref(ClickOutside), i]
|
|
221
254
|
]),
|
|
222
255
|
createVNode(unref(ElPopover), {
|
|
223
256
|
ref_key: "popoverRef",
|
|
224
257
|
ref: l,
|
|
225
|
-
"virtual-ref":
|
|
258
|
+
"virtual-ref": r.value,
|
|
226
259
|
trigger: "click",
|
|
227
260
|
"virtual-triggering": "",
|
|
228
261
|
"hide-after": 0
|
|
229
262
|
}, {
|
|
230
263
|
default: withCtx(() => [
|
|
231
|
-
|
|
264
|
+
o.column.params.FieldType === "check" ? (openBlock(), createBlock(unref(ElCheckboxGroup), {
|
|
232
265
|
key: 0,
|
|
233
266
|
class: "flex flex-col",
|
|
234
|
-
modelValue:
|
|
235
|
-
"onUpdate:modelValue": _[1] || (_[1] = (
|
|
236
|
-
onChange:
|
|
267
|
+
modelValue: n.value,
|
|
268
|
+
"onUpdate:modelValue": _[1] || (_[1] = (f) => n.value = f),
|
|
269
|
+
onChange: d
|
|
237
270
|
}, {
|
|
238
271
|
default: withCtx(() => [
|
|
239
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
240
|
-
key:
|
|
241
|
-
label:
|
|
242
|
-
value:
|
|
272
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(o.column.params.options, (f) => (openBlock(), createBlock(unref(ElCheckbox), {
|
|
273
|
+
key: f.value,
|
|
274
|
+
label: f.label,
|
|
275
|
+
value: f.value
|
|
243
276
|
}, null, 8, ["label", "value"]))), 128))
|
|
244
277
|
]),
|
|
245
278
|
_: 1
|
|
246
279
|
}, 8, ["modelValue"])) : createCommentVNode("", !0),
|
|
247
|
-
|
|
280
|
+
o.column.params.FieldType === "select" ? (openBlock(), createBlock(unref(ElCheckboxGroup), {
|
|
248
281
|
key: 1,
|
|
249
282
|
class: "flex flex-col",
|
|
250
|
-
modelValue:
|
|
251
|
-
"onUpdate:modelValue": _[2] || (_[2] = (
|
|
252
|
-
onChange:
|
|
283
|
+
modelValue: n.value,
|
|
284
|
+
"onUpdate:modelValue": _[2] || (_[2] = (f) => n.value = f),
|
|
285
|
+
onChange: d
|
|
253
286
|
}, {
|
|
254
287
|
default: withCtx(() => [
|
|
255
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
256
|
-
key:
|
|
257
|
-
label:
|
|
258
|
-
value:
|
|
288
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(o.column.params.options, (f) => (openBlock(), createBlock(unref(ElCheckbox), {
|
|
289
|
+
key: f.value,
|
|
290
|
+
label: f.label,
|
|
291
|
+
value: f.value
|
|
259
292
|
}, null, 8, ["label", "value"]))), 128))
|
|
260
293
|
]),
|
|
261
294
|
_: 1
|
|
@@ -274,35 +307,35 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
274
307
|
}
|
|
275
308
|
},
|
|
276
309
|
emits: ["FilterSearch"],
|
|
277
|
-
setup(
|
|
278
|
-
const e =
|
|
310
|
+
setup(o, { emit: t }) {
|
|
311
|
+
const e = o, n = ref([]), a = ref(null), r = ref(e.column.params.FieldType === "TreeMultipleSelect"), l = ref({
|
|
279
312
|
label: e.column.params.NodeNameField || "label",
|
|
280
313
|
value: e.column.params.NodeValueField || "value",
|
|
281
314
|
children: "children"
|
|
282
315
|
});
|
|
283
316
|
if (!e.column.params.TreeData) {
|
|
284
|
-
const { options:
|
|
285
|
-
e.column.params.TreeData = buildTree(deepClone(
|
|
317
|
+
const { options: d, ParentNodeField: u, NodeKeyField: _ } = e.column.params;
|
|
318
|
+
e.column.params.TreeData = buildTree(deepClone(d), u, _);
|
|
286
319
|
}
|
|
287
320
|
onMounted(() => {
|
|
288
|
-
|
|
321
|
+
n.value = e.column.params.TreeData;
|
|
289
322
|
});
|
|
290
323
|
const i = t;
|
|
291
324
|
function m() {
|
|
292
325
|
a.value ? e.column.filters[0].data = [a.value] : e.column.filters[0].data = [];
|
|
293
326
|
}
|
|
294
|
-
return (
|
|
327
|
+
return (d, u) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
295
328
|
clearable: "",
|
|
296
329
|
modelValue: a.value,
|
|
297
330
|
"onUpdate:modelValue": u[0] || (u[0] = (_) => a.value = _),
|
|
298
|
-
data:
|
|
331
|
+
data: n.value,
|
|
299
332
|
"render-after-expand": !1,
|
|
300
333
|
placeholder: "",
|
|
301
334
|
onChange: m,
|
|
302
|
-
multiple:
|
|
303
|
-
"show-checkbox":
|
|
335
|
+
multiple: r.value,
|
|
336
|
+
"show-checkbox": r.value,
|
|
304
337
|
props: l.value,
|
|
305
|
-
onKeyup: u[1] || (u[1] = withKeys((_) => i("FilterSearch",
|
|
338
|
+
onKeyup: u[1] || (u[1] = withKeys((_) => i("FilterSearch", o.column), ["enter"]))
|
|
306
339
|
}, null, 8, ["modelValue", "data", "multiple", "show-checkbox", "props"]));
|
|
307
340
|
}
|
|
308
341
|
}, _sfc_main$v = {
|
|
@@ -314,32 +347,32 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
314
347
|
}
|
|
315
348
|
},
|
|
316
349
|
emits: ["FilterSearch"],
|
|
317
|
-
setup(
|
|
318
|
-
const e =
|
|
350
|
+
setup(o, { emit: t }) {
|
|
351
|
+
const e = o, n = ref([]), a = ref([]), r = ref({
|
|
319
352
|
label: e.column.params.NodeNameField || "label",
|
|
320
353
|
value: e.column.params.NodeValueField || "value",
|
|
321
354
|
children: "children"
|
|
322
355
|
});
|
|
323
356
|
if (!e.column.params.TreeData) {
|
|
324
|
-
const { options:
|
|
325
|
-
e.column.params.TreeData = buildTree(deepClone(
|
|
357
|
+
const { options: d, ParentNodeField: u, NodeKeyField: _ } = e.column.params;
|
|
358
|
+
e.column.params.TreeData = buildTree(deepClone(d), u, _);
|
|
326
359
|
}
|
|
327
360
|
onMounted(() => {
|
|
328
|
-
|
|
361
|
+
n.value = e.column.params.TreeData;
|
|
329
362
|
});
|
|
330
363
|
const l = t;
|
|
331
364
|
function i() {
|
|
332
365
|
a.value ? e.column.filters[0].data = a.value : e.column.filters[0].data = [];
|
|
333
366
|
}
|
|
334
|
-
function m(
|
|
367
|
+
function m(d) {
|
|
335
368
|
cleanUpTreeFilterRows(), l("FilterSearch", e.column);
|
|
336
369
|
}
|
|
337
|
-
return (
|
|
370
|
+
return (d, u) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
338
371
|
"popper-class": "tree-filter-row",
|
|
339
372
|
clearable: "",
|
|
340
373
|
modelValue: a.value,
|
|
341
374
|
"onUpdate:modelValue": u[0] || (u[0] = (_) => a.value = _),
|
|
342
|
-
data:
|
|
375
|
+
data: n.value,
|
|
343
376
|
placeholder: "",
|
|
344
377
|
onChange: i,
|
|
345
378
|
multiple: "",
|
|
@@ -347,7 +380,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
347
380
|
"collapse-tags": "",
|
|
348
381
|
"collapse-tags-tooltip": "",
|
|
349
382
|
onKeyup: withKeys(m, ["enter"]),
|
|
350
|
-
props:
|
|
383
|
+
props: r.value
|
|
351
384
|
}, null, 8, ["modelValue", "data", "props"]));
|
|
352
385
|
}
|
|
353
386
|
}, _hoisted_1$g = ["title"], _hoisted_2$6 = { class: "flex flex-col justify-center items-center gap2" }, _hoisted_3$4 = { class: "flex justify-between mt2" }, _sfc_main$u = {
|
|
@@ -359,41 +392,41 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
359
392
|
}
|
|
360
393
|
},
|
|
361
394
|
emits: ["FilterSearch"],
|
|
362
|
-
setup(
|
|
363
|
-
const e =
|
|
364
|
-
var _,
|
|
365
|
-
(
|
|
395
|
+
setup(o, { emit: t }) {
|
|
396
|
+
const e = o, n = ref([null, null]), a = computed(() => e.column.filters && e.column.filters[0].data.length ? e.column.filters[0].data.join(" 至 ") : ""), r = ref(), l = ref(), i = () => {
|
|
397
|
+
var _, f;
|
|
398
|
+
(f = (_ = unref(l).popperRef) == null ? void 0 : _.delayHide) == null || f.call(_);
|
|
366
399
|
}, m = t;
|
|
367
|
-
function
|
|
368
|
-
if (!
|
|
400
|
+
function d() {
|
|
401
|
+
if (!n.value[0] && !n.value[1])
|
|
369
402
|
e.column.filters[0].data = [];
|
|
370
|
-
else if (!
|
|
403
|
+
else if (!n.value[0] || !n.value[1]) {
|
|
371
404
|
layer.msg("请输入完整的数字范围");
|
|
372
405
|
return;
|
|
373
406
|
} else
|
|
374
|
-
e.column.filters[0].data = [...
|
|
407
|
+
e.column.filters[0].data = [...n.value];
|
|
375
408
|
l.value.hide(), m("FilterSearch", e.column);
|
|
376
409
|
}
|
|
377
410
|
function u() {
|
|
378
|
-
|
|
411
|
+
n.value = [null, null];
|
|
379
412
|
}
|
|
380
|
-
return (_,
|
|
413
|
+
return (_, f) => (openBlock(), createElementBlock("div", {
|
|
381
414
|
class: "size-full",
|
|
382
415
|
title: a.value
|
|
383
416
|
}, [
|
|
384
417
|
withDirectives(createVNode(unref(ElInput), {
|
|
385
418
|
ref_key: "inputRef",
|
|
386
|
-
ref:
|
|
419
|
+
ref: r,
|
|
387
420
|
value: a.value,
|
|
388
421
|
readonly: "",
|
|
389
|
-
onKeyup:
|
|
422
|
+
onKeyup: f[0] || (f[0] = withKeys((w) => m("FilterSearch", o.column), ["enter"]))
|
|
390
423
|
}, null, 8, ["value"]), [
|
|
391
424
|
[unref(ClickOutside), i]
|
|
392
425
|
]),
|
|
393
426
|
createVNode(unref(ElPopover), {
|
|
394
427
|
ref_key: "popoverRef",
|
|
395
428
|
ref: l,
|
|
396
|
-
"virtual-ref":
|
|
429
|
+
"virtual-ref": r.value,
|
|
397
430
|
trigger: "click",
|
|
398
431
|
"virtual-triggering": "",
|
|
399
432
|
"hide-after": 0
|
|
@@ -402,22 +435,22 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
402
435
|
createElementVNode("div", _hoisted_2$6, [
|
|
403
436
|
createVNode(unref(ElInputNumber), {
|
|
404
437
|
class: "w-full",
|
|
405
|
-
modelValue:
|
|
406
|
-
"onUpdate:modelValue":
|
|
438
|
+
modelValue: n.value[0],
|
|
439
|
+
"onUpdate:modelValue": f[1] || (f[1] = (w) => n.value[0] = w)
|
|
407
440
|
}, null, 8, ["modelValue"]),
|
|
408
441
|
createVNode(unref(ElInputNumber), {
|
|
409
442
|
class: "w-full",
|
|
410
|
-
modelValue:
|
|
411
|
-
"onUpdate:modelValue":
|
|
443
|
+
modelValue: n.value[1],
|
|
444
|
+
"onUpdate:modelValue": f[2] || (f[2] = (w) => n.value[1] = w)
|
|
412
445
|
}, null, 8, ["modelValue"])
|
|
413
446
|
]),
|
|
414
447
|
createElementVNode("div", _hoisted_3$4, [
|
|
415
448
|
createVNode(unref(ElButton), {
|
|
416
449
|
size: "small",
|
|
417
450
|
type: "primary",
|
|
418
|
-
onClick:
|
|
451
|
+
onClick: d
|
|
419
452
|
}, {
|
|
420
|
-
default: withCtx(() =>
|
|
453
|
+
default: withCtx(() => f[3] || (f[3] = [
|
|
421
454
|
createTextVNode("确认")
|
|
422
455
|
])),
|
|
423
456
|
_: 1
|
|
@@ -426,7 +459,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
426
459
|
size: "small",
|
|
427
460
|
onClick: u
|
|
428
461
|
}, {
|
|
429
|
-
default: withCtx(() =>
|
|
462
|
+
default: withCtx(() => f[4] || (f[4] = [
|
|
430
463
|
createTextVNode("重置")
|
|
431
464
|
])),
|
|
432
465
|
_: 1
|
|
@@ -453,66 +486,66 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
453
486
|
}
|
|
454
487
|
},
|
|
455
488
|
emits: ["FilterSearch", "SortChange"],
|
|
456
|
-
setup(
|
|
457
|
-
const e =
|
|
489
|
+
setup(o, { emit: t }) {
|
|
490
|
+
const e = o, n = ref([]);
|
|
458
491
|
let a = ref(0);
|
|
459
492
|
onMounted(() => {
|
|
460
493
|
if (e.column.params.filter) {
|
|
461
494
|
const m = document.querySelector(`[colid=${e.column.id}]`);
|
|
462
|
-
useElementClientSize(m, ({ clientHeight:
|
|
463
|
-
a.value =
|
|
495
|
+
useElementClientSize(m, ({ clientHeight: d }) => {
|
|
496
|
+
a.value = d <= 40 ? 65 : d;
|
|
464
497
|
});
|
|
465
498
|
} else
|
|
466
499
|
a.value = 23;
|
|
467
|
-
|
|
500
|
+
n.value = e.column.params.TreeData;
|
|
468
501
|
});
|
|
469
|
-
const
|
|
502
|
+
const r = t;
|
|
470
503
|
function l(m) {
|
|
471
504
|
if (m === "search") {
|
|
472
|
-
const
|
|
473
|
-
|
|
505
|
+
const d = e.gridRef.getColumns();
|
|
506
|
+
r("FilterSearch", e.column, d);
|
|
474
507
|
} else if (m === "clear") {
|
|
475
508
|
e.column.filters.forEach((u) => {
|
|
476
509
|
Array.isArray(u.data) ? u.data = [] : u.data = "";
|
|
477
510
|
});
|
|
478
|
-
const
|
|
479
|
-
|
|
511
|
+
const d = e.gridRef.getColumns();
|
|
512
|
+
r("FilterSearch", e.column, d);
|
|
480
513
|
} else if (m === "clearAll") {
|
|
481
|
-
const
|
|
482
|
-
|
|
514
|
+
const d = e.gridRef.getColumns();
|
|
515
|
+
d.forEach((u) => {
|
|
483
516
|
u.filters && u.filters.forEach((_) => {
|
|
484
517
|
Array.isArray(_.data) ? _.data = [] : _.data = "";
|
|
485
518
|
});
|
|
486
|
-
}),
|
|
519
|
+
}), r("FilterSearch", e.column, d);
|
|
487
520
|
}
|
|
488
521
|
}
|
|
489
522
|
function i() {
|
|
490
|
-
var m,
|
|
491
|
-
(m = e.column.params) != null && m.IsVirtualField || ((
|
|
523
|
+
var m, d;
|
|
524
|
+
(m = e.column.params) != null && m.IsVirtualField || ((d = e.column).params ?? (d.params = {}), e.column.params.sortStatus === "asc" ? e.column.params.sortStatus = "desc" : e.column.params.sortStatus === "desc" ? e.column.params.sortStatus = null : e.column.params.sortStatus = "asc", r("SortChange", e.column, e.gridRef.getColumns()));
|
|
492
525
|
}
|
|
493
|
-
return (m,
|
|
494
|
-
var u, _,
|
|
526
|
+
return (m, d) => {
|
|
527
|
+
var u, _, f;
|
|
495
528
|
return openBlock(), createElementBlock("div", {
|
|
496
529
|
class: "flex flex-col filter-header",
|
|
497
|
-
title:
|
|
530
|
+
title: o.column.title,
|
|
498
531
|
style: normalizeStyle({ height: unref(a) ? unref(a) + "px" : void 0 })
|
|
499
532
|
}, [
|
|
500
533
|
createElementVNode("div", {
|
|
501
|
-
class: normalizeClass(["filter-title h-full lh-9 flex justify-center items-center gap-1", { "filter-title-border": (u =
|
|
534
|
+
class: normalizeClass(["filter-title h-full lh-9 flex justify-center items-center gap-1", { "filter-title-border": (u = o.column.params) == null ? void 0 : u.filter }]),
|
|
502
535
|
onClick: i
|
|
503
536
|
}, [
|
|
504
537
|
createElementVNode("span", {
|
|
505
|
-
style: normalizeStyle({ color:
|
|
538
|
+
style: normalizeStyle({ color: o.column.params.Required ? "red" : "" }),
|
|
506
539
|
class: "whitespace-nowrap overflow-hidden text-ellipsis"
|
|
507
|
-
}, toDisplayString(
|
|
508
|
-
(_ =
|
|
540
|
+
}, toDisplayString(o.column.title), 5),
|
|
541
|
+
(_ = o.column.params) != null && _.sortable && ((f = o.column.params) != null && f.sortStatus) ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
|
509
542
|
default: withCtx(() => {
|
|
510
|
-
var
|
|
543
|
+
var w, p;
|
|
511
544
|
return [
|
|
512
|
-
((
|
|
545
|
+
((w = o.column.params) == null ? void 0 : w.sortStatus) === "asc" ? (openBlock(), createBlock(unref(HrIcon), {
|
|
513
546
|
key: 0,
|
|
514
547
|
icon: "ep:caret-top"
|
|
515
|
-
})) : ((p =
|
|
548
|
+
})) : ((p = o.column.params) == null ? void 0 : p.sortStatus) === "desc" ? (openBlock(), createBlock(unref(HrIcon), {
|
|
516
549
|
key: 1,
|
|
517
550
|
icon: "ep:caret-bottom"
|
|
518
551
|
})) : createCommentVNode("", !0)
|
|
@@ -521,37 +554,37 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
521
554
|
_: 1
|
|
522
555
|
})) : createCommentVNode("", !0)
|
|
523
556
|
], 2),
|
|
524
|
-
|
|
525
|
-
["radio_Table", "bool"].includes(
|
|
557
|
+
o.column.params.filter ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
|
|
558
|
+
["radio_Table", "bool"].includes(o.column.params.FieldType) ? (openBlock(), createBlock(_sfc_main$y, {
|
|
526
559
|
key: 0,
|
|
527
|
-
column:
|
|
528
|
-
onFilterSearch:
|
|
529
|
-
}, null, 8, ["column"])) : ["select", "check"].includes(
|
|
560
|
+
column: o.column,
|
|
561
|
+
onFilterSearch: d[0] || (d[0] = (w) => l("search"))
|
|
562
|
+
}, null, 8, ["column"])) : ["select", "check"].includes(o.column.params.FieldType) ? (openBlock(), createBlock(_sfc_main$x, {
|
|
530
563
|
key: 1,
|
|
531
|
-
column:
|
|
532
|
-
onFilterSearch:
|
|
533
|
-
}, null, 8, ["column"])) :
|
|
564
|
+
column: o.column,
|
|
565
|
+
onFilterSearch: d[1] || (d[1] = (w) => l("search"))
|
|
566
|
+
}, null, 8, ["column"])) : o.column.params.FieldType === "date" ? (openBlock(), createBlock(FilterDate, {
|
|
534
567
|
key: 2,
|
|
535
|
-
column:
|
|
536
|
-
onFilterSearch:
|
|
537
|
-
}, null, 8, ["column"])) :
|
|
568
|
+
column: o.column,
|
|
569
|
+
onFilterSearch: d[2] || (d[2] = (w) => l("search"))
|
|
570
|
+
}, null, 8, ["column"])) : o.column.params.FieldType === "tree" ? (openBlock(), createBlock(_sfc_main$w, {
|
|
538
571
|
key: 3,
|
|
539
|
-
column:
|
|
540
|
-
onFilterSearch:
|
|
541
|
-
}, null, 8, ["column"])) :
|
|
572
|
+
column: o.column,
|
|
573
|
+
onFilterSearch: d[3] || (d[3] = (w) => l("search"))
|
|
574
|
+
}, null, 8, ["column"])) : o.column.params.FieldType === "TreeMultipleSelect" ? (openBlock(), createBlock(_sfc_main$v, {
|
|
542
575
|
key: 4,
|
|
543
|
-
column:
|
|
544
|
-
onFilterSearch:
|
|
545
|
-
}, null, 8, ["column"])) :
|
|
576
|
+
column: o.column,
|
|
577
|
+
onFilterSearch: d[4] || (d[4] = (w) => l("search"))
|
|
578
|
+
}, null, 8, ["column"])) : o.column.params.FieldType === "inputNumber" ? (openBlock(), createBlock(_sfc_main$u, {
|
|
546
579
|
key: 5,
|
|
547
|
-
column:
|
|
548
|
-
onFilterSearch:
|
|
549
|
-
}, null, 8, ["column"])) : (openBlock(!0), createElementBlock(Fragment, { key: 6 }, renderList(
|
|
580
|
+
column: o.column,
|
|
581
|
+
onFilterSearch: d[5] || (d[5] = (w) => l("search"))
|
|
582
|
+
}, null, 8, ["column"])) : (openBlock(!0), createElementBlock(Fragment, { key: 6 }, renderList(o.column.filters, (w, p) => (openBlock(), createBlock(unref(ElInput), {
|
|
550
583
|
key: p,
|
|
551
|
-
modelValue:
|
|
552
|
-
"onUpdate:modelValue": (
|
|
553
|
-
onKeyup:
|
|
554
|
-
disabled: ["colorPicker", "iconPicker", "progress"].includes(
|
|
584
|
+
modelValue: w.data,
|
|
585
|
+
"onUpdate:modelValue": (c) => w.data = c,
|
|
586
|
+
onKeyup: d[6] || (d[6] = withKeys((c) => l("search"), ["enter"])),
|
|
587
|
+
disabled: ["colorPicker", "iconPicker", "progress"].includes(o.column.params.FieldType)
|
|
555
588
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"]))), 128)),
|
|
556
589
|
createVNode(unref(ElDropdown), {
|
|
557
590
|
class: "pr2 pt1",
|
|
@@ -563,19 +596,19 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
563
596
|
createVNode(unref(ElDropdownMenu), null, {
|
|
564
597
|
default: withCtx(() => [
|
|
565
598
|
createVNode(unref(ElDropdownItem), { command: "search" }, {
|
|
566
|
-
default: withCtx(() =>
|
|
599
|
+
default: withCtx(() => d[7] || (d[7] = [
|
|
567
600
|
createTextVNode("执行查询")
|
|
568
601
|
])),
|
|
569
602
|
_: 1
|
|
570
603
|
}),
|
|
571
604
|
createVNode(unref(ElDropdownItem), { command: "clear" }, {
|
|
572
|
-
default: withCtx(() =>
|
|
605
|
+
default: withCtx(() => d[8] || (d[8] = [
|
|
573
606
|
createTextVNode("清除当前条件")
|
|
574
607
|
])),
|
|
575
608
|
_: 1
|
|
576
609
|
}),
|
|
577
610
|
createVNode(unref(ElDropdownItem), { command: "clearAll" }, {
|
|
578
|
-
default: withCtx(() =>
|
|
611
|
+
default: withCtx(() => d[9] || (d[9] = [
|
|
579
612
|
createTextVNode("清除所有条件")
|
|
580
613
|
])),
|
|
581
614
|
_: 1
|
|
@@ -623,9 +656,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
623
656
|
}
|
|
624
657
|
},
|
|
625
658
|
emits: ["change", "ActionClick", "ActionRenderBefore"],
|
|
626
|
-
setup(
|
|
627
|
-
const e =
|
|
628
|
-
let
|
|
659
|
+
setup(o, { emit: t }) {
|
|
660
|
+
const e = o;
|
|
661
|
+
let n = ref(
|
|
629
662
|
deepClone(e.column.params.LinkButton ? e.column.params.LinkButton : [])
|
|
630
663
|
);
|
|
631
664
|
const a = t;
|
|
@@ -636,7 +669,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
636
669
|
row: e.row,
|
|
637
670
|
column: e.column,
|
|
638
671
|
gridRef: e.gridRef,
|
|
639
|
-
LinkButton:
|
|
672
|
+
LinkButton: n.value
|
|
640
673
|
});
|
|
641
674
|
},
|
|
642
675
|
{
|
|
@@ -644,7 +677,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
644
677
|
immediate: !0
|
|
645
678
|
}
|
|
646
679
|
);
|
|
647
|
-
function
|
|
680
|
+
function r(l) {
|
|
648
681
|
a("ActionClick", {
|
|
649
682
|
btnInfo: l,
|
|
650
683
|
row: e.row,
|
|
@@ -653,11 +686,11 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
653
686
|
});
|
|
654
687
|
}
|
|
655
688
|
return (l, i) => (openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
656
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
689
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (m) => withDirectives((openBlock(), createBlock(unref(ElButton), {
|
|
657
690
|
key: m.Name,
|
|
658
691
|
class: "!text-[12px]",
|
|
659
692
|
link: "",
|
|
660
|
-
onClick: (
|
|
693
|
+
onClick: (d) => r(m)
|
|
661
694
|
}, {
|
|
662
695
|
default: withCtx(() => [
|
|
663
696
|
createTextVNode(toDisplayString(m.Name), 1)
|
|
@@ -690,22 +723,22 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
690
723
|
}
|
|
691
724
|
},
|
|
692
725
|
emits: ["change"],
|
|
693
|
-
setup(
|
|
694
|
-
const e =
|
|
726
|
+
setup(o, { emit: t }) {
|
|
727
|
+
const e = o, n = ref(!!e.row[e.column.field]);
|
|
695
728
|
watchEffect(() => {
|
|
696
|
-
typeof e.row[e.column.field] != "boolean" ?
|
|
729
|
+
typeof e.row[e.column.field] != "boolean" ? n.value = !!e.row[e.column.field] : n.value = e.row[e.column.field];
|
|
697
730
|
});
|
|
698
731
|
const a = t;
|
|
699
|
-
function
|
|
732
|
+
function r(l, i, m) {
|
|
700
733
|
i[m.field] = l, a("change", l, i, m);
|
|
701
734
|
}
|
|
702
735
|
return (l, i) => {
|
|
703
736
|
var m;
|
|
704
737
|
return openBlock(), createBlock(unref(ElCheckbox), {
|
|
705
|
-
disabled: (m =
|
|
706
|
-
modelValue:
|
|
707
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
708
|
-
onChange: i[1] || (i[1] = (
|
|
738
|
+
disabled: (m = o.column.params) == null ? void 0 : m.disabled,
|
|
739
|
+
modelValue: n.value,
|
|
740
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => n.value = d),
|
|
741
|
+
onChange: i[1] || (i[1] = (d) => r(d, o.row, o.column))
|
|
709
742
|
}, null, 8, ["disabled", "modelValue"]);
|
|
710
743
|
};
|
|
711
744
|
}
|
|
@@ -742,92 +775,92 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
742
775
|
},
|
|
743
776
|
displayValue: String
|
|
744
777
|
},
|
|
745
|
-
setup(
|
|
746
|
-
const t =
|
|
778
|
+
setup(o) {
|
|
779
|
+
const t = o;
|
|
747
780
|
t.column.params.LabelConfig || (t.column.params.LabelConfig = []);
|
|
748
781
|
const e = ref(t.column.params.LabelConfig);
|
|
749
782
|
e.value.forEach((u) => {
|
|
750
783
|
u.Value == "true" ? u.Value = !0 : u.Value == "false" && (u.Value = !1);
|
|
751
784
|
});
|
|
752
|
-
const
|
|
785
|
+
const n = computed(() => t.row[t.column.field]), a = computed(() => e.value.find((u) => u.Value == n.value));
|
|
753
786
|
onMounted(() => {
|
|
754
|
-
t.column.params.LabelAutoColor && !a.value && (
|
|
755
|
-
Value:
|
|
756
|
-
Color:
|
|
787
|
+
t.column.params.LabelAutoColor && !a.value && (n.value || n.value === 0) && e.value.push({
|
|
788
|
+
Value: n.value,
|
|
789
|
+
Color: d()
|
|
757
790
|
});
|
|
758
791
|
});
|
|
759
|
-
function
|
|
792
|
+
function r(u) {
|
|
760
793
|
if (!u) return;
|
|
761
|
-
let _,
|
|
794
|
+
let _, f, w, p = 1;
|
|
762
795
|
if (u.startsWith("#"))
|
|
763
|
-
u = u.slice(1), u.length === 3 ? (_ = parseInt(u[0] + u[0], 16),
|
|
796
|
+
u = u.slice(1), u.length === 3 ? (_ = parseInt(u[0] + u[0], 16), f = parseInt(u[1] + u[1], 16), w = parseInt(u[2] + u[2], 16)) : u.length === 6 && (_ = parseInt(u.slice(0, 2), 16), f = parseInt(u.slice(2, 4), 16), w = parseInt(u.slice(4, 6), 16));
|
|
764
797
|
else if (u.startsWith("rgb")) {
|
|
765
|
-
const
|
|
766
|
-
|
|
798
|
+
const c = u.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);
|
|
799
|
+
c && (_ = parseInt(c[1]), f = parseInt(c[2]), w = parseInt(c[3]), c[4] && (p = parseFloat(c[4])));
|
|
767
800
|
} else if (u.startsWith("hsl")) {
|
|
768
|
-
const
|
|
769
|
-
if (
|
|
770
|
-
const
|
|
771
|
-
if (
|
|
772
|
-
_ =
|
|
801
|
+
const c = u.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%(?:,\s*(\d*\.?\d+))?\)/);
|
|
802
|
+
if (c) {
|
|
803
|
+
const s = parseInt(c[1]) / 360, b = parseInt(c[2]) / 100, S = parseInt(c[3]) / 100;
|
|
804
|
+
if (c[4] && (p = parseFloat(c[4])), b === 0)
|
|
805
|
+
_ = f = w = S * 255;
|
|
773
806
|
else {
|
|
774
|
-
const
|
|
775
|
-
_ =
|
|
807
|
+
const x = (j, Y, $) => ($ < 0 && ($ += 1), $ > 1 && ($ -= 1), $ < 0.16666666666666666 ? j + (Y - j) * 6 * $ : $ < 0.5 ? Y : $ < 0.6666666666666666 ? j + (Y - j) * (0.6666666666666666 - $) * 6 : j), B = S < 0.5 ? S * (1 + b) : S + b - S * b, D = 2 * S - B;
|
|
808
|
+
_ = x(D, B, s + 1 / 3) * 255, f = x(D, B, s) * 255, w = x(D, B, s - 1 / 3) * 255;
|
|
776
809
|
}
|
|
777
810
|
}
|
|
778
811
|
}
|
|
779
|
-
return { r: _, g:
|
|
780
|
-
}
|
|
781
|
-
function l(u, _,
|
|
782
|
-
u /= 255, _ /= 255,
|
|
783
|
-
const
|
|
784
|
-
let
|
|
785
|
-
if (
|
|
786
|
-
|
|
812
|
+
return { r: _, g: f, b: w, a: p };
|
|
813
|
+
}
|
|
814
|
+
function l(u, _, f) {
|
|
815
|
+
u /= 255, _ /= 255, f /= 255;
|
|
816
|
+
const w = Math.max(u, _, f), p = Math.min(u, _, f);
|
|
817
|
+
let c, s, b = (w + p) / 2;
|
|
818
|
+
if (w === p)
|
|
819
|
+
c = s = 0;
|
|
787
820
|
else {
|
|
788
|
-
const
|
|
789
|
-
switch (
|
|
821
|
+
const S = w - p;
|
|
822
|
+
switch (s = b > 0.5 ? S / (2 - w - p) : S / (w + p), w) {
|
|
790
823
|
case u:
|
|
791
|
-
|
|
824
|
+
c = (_ - f) / S + (_ < f ? 6 : 0);
|
|
792
825
|
break;
|
|
793
826
|
case _:
|
|
794
|
-
|
|
827
|
+
c = (f - u) / S + 2;
|
|
795
828
|
break;
|
|
796
|
-
case
|
|
797
|
-
|
|
829
|
+
case f:
|
|
830
|
+
c = (u - _) / S + 4;
|
|
798
831
|
break;
|
|
799
832
|
}
|
|
800
|
-
|
|
833
|
+
c /= 6;
|
|
801
834
|
}
|
|
802
|
-
return { h:
|
|
835
|
+
return { h: c, s, l: b };
|
|
803
836
|
}
|
|
804
|
-
function i(u, _,
|
|
805
|
-
let
|
|
837
|
+
function i(u, _, f) {
|
|
838
|
+
let w, p, c;
|
|
806
839
|
if (_ === 0)
|
|
807
|
-
|
|
840
|
+
w = p = c = f;
|
|
808
841
|
else {
|
|
809
|
-
const
|
|
810
|
-
|
|
842
|
+
const s = (x, B, D) => (D < 0 && (D += 1), D > 1 && (D -= 1), D < 0.16666666666666666 ? x + (B - x) * 6 * D : D < 0.5 ? B : D < 0.6666666666666666 ? x + (B - x) * (0.6666666666666666 - D) * 6 : x), b = f < 0.5 ? f * (1 + _) : f + _ - f * _, S = 2 * f - b;
|
|
843
|
+
w = s(S, b, u + 1 / 3), p = s(S, b, u), c = s(S, b, u - 1 / 3);
|
|
811
844
|
}
|
|
812
|
-
return { r: Math.round(
|
|
845
|
+
return { r: Math.round(w * 255), g: Math.round(p * 255), b: Math.round(c * 255) };
|
|
813
846
|
}
|
|
814
847
|
function m(u, _) {
|
|
815
848
|
if (!u) return;
|
|
816
|
-
let { r:
|
|
849
|
+
let { r: f, g: w, b: p } = r(u), { h: c, s, l: b } = l(f, w, p);
|
|
817
850
|
b = Math.max(0, b - _);
|
|
818
|
-
const { r:
|
|
819
|
-
return `rgb(${
|
|
851
|
+
const { r: S, g: x, b: B } = i(c, s, b);
|
|
852
|
+
return `rgb(${S}, ${x}, ${B})`;
|
|
820
853
|
}
|
|
821
|
-
function
|
|
822
|
-
function u(
|
|
823
|
-
return Math.floor(Math.random() * (
|
|
854
|
+
function d() {
|
|
855
|
+
function u(c, s) {
|
|
856
|
+
return Math.floor(Math.random() * (s - c + 1)) + c;
|
|
824
857
|
}
|
|
825
|
-
const _ = u(200, 255),
|
|
826
|
-
return `#${_.toString(16).padStart(2, "0")}${
|
|
858
|
+
const _ = u(200, 255), f = u(200, 255), w = u(200, 255);
|
|
859
|
+
return `#${_.toString(16).padStart(2, "0")}${f.toString(16).padStart(2, "0")}${w.toString(16).padStart(2, "0")}`;
|
|
827
860
|
}
|
|
828
861
|
return (u, _) => {
|
|
829
|
-
const
|
|
830
|
-
return
|
|
862
|
+
const f = resolveComponent("hr-icon");
|
|
863
|
+
return n.value ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
831
864
|
a.value ? (openBlock(), createBlock(unref(ElTag), {
|
|
832
865
|
key: 0,
|
|
833
866
|
color: a.value.Color,
|
|
@@ -835,15 +868,15 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
835
868
|
style: normalizeStyle({ borderColor: m(a.value.Color, "0.03") })
|
|
836
869
|
}, {
|
|
837
870
|
default: withCtx(() => [
|
|
838
|
-
a.value.LeftIcon ? (openBlock(), createBlock(
|
|
871
|
+
a.value.LeftIcon ? (openBlock(), createBlock(f, {
|
|
839
872
|
key: 0,
|
|
840
873
|
class: "mr0.25 v-middle mt0.15",
|
|
841
874
|
size: "13",
|
|
842
875
|
color: m(a.value.Color, "0.3"),
|
|
843
876
|
icon: a.value.LeftIcon
|
|
844
877
|
}, null, 8, ["color", "icon"])) : createCommentVNode("", !0),
|
|
845
|
-
createElementVNode("span", _hoisted_2$4, toDisplayString(
|
|
846
|
-
a.value.RightIcon ? (openBlock(), createBlock(
|
|
878
|
+
createElementVNode("span", _hoisted_2$4, toDisplayString(o.displayValue === void 0 ? n.value : o.displayValue), 1),
|
|
879
|
+
a.value.RightIcon ? (openBlock(), createBlock(f, {
|
|
847
880
|
key: 1,
|
|
848
881
|
class: "ml0.25 v-middle mt0.15",
|
|
849
882
|
size: "13",
|
|
@@ -853,7 +886,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
853
886
|
]),
|
|
854
887
|
_: 1
|
|
855
888
|
}, 8, ["color", "style"])) : createCommentVNode("", !0),
|
|
856
|
-
withDirectives(createElementVNode("span", null, toDisplayString(
|
|
889
|
+
withDirectives(createElementVNode("span", null, toDisplayString(o.displayValue === void 0 ? n.value : o.displayValue), 513), [
|
|
857
890
|
[vShow, !a.value]
|
|
858
891
|
])
|
|
859
892
|
])) : (openBlock(), createElementBlock("div", _hoisted_3$2));
|
|
@@ -883,33 +916,33 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
883
916
|
emits: ["change"],
|
|
884
917
|
setup(__props, { emit: __emit }) {
|
|
885
918
|
const props = __props, value = computed(() => props.row[props.column.field]), emit = __emit;
|
|
886
|
-
function handleChange(
|
|
887
|
-
emit("change",
|
|
919
|
+
function handleChange(o, t, e) {
|
|
920
|
+
emit("change", o, t, e);
|
|
888
921
|
}
|
|
889
922
|
function handleChoose(row, column, gridRef) {
|
|
890
|
-
var
|
|
923
|
+
var o;
|
|
891
924
|
let result;
|
|
892
925
|
if (emit("onChooseBefor-Click", column, (t) => {
|
|
893
926
|
result = t;
|
|
894
|
-
}), !result || (
|
|
927
|
+
}), !result || (o = column.params) != null && o.disabled) return;
|
|
895
928
|
let { ChoosePageType, ChoosePageOID, StoredValueField, ReturnValueField, URLParamsObject, URLParamsHook } = props.column.params, urlParams = {}, selectedData = [], layerOptions = {};
|
|
896
929
|
URLParamsObject && Object.assign(urlParams, URLParamsObject), URLParamsHook && Object.assign(urlParams, eval(
|
|
897
930
|
`(function(urlParams, selectedData, layerOptions, row, column){
|
|
898
931
|
return eval((${URLParamsHook})(urlParams, selectedData, layerOptions, row, column))
|
|
899
932
|
}).call(gridRef)`
|
|
900
933
|
)), ChoosePageType === "autoPage" ? openAutoPage(ChoosePageOID, (t, e) => {
|
|
901
|
-
isEmpty(StoredValueField) || isEmpty(ReturnValueField) || (Array.isArray(StoredValueField) || (StoredValueField = [StoredValueField]), Array.isArray(ReturnValueField) || (ReturnValueField = [ReturnValueField]), StoredValueField.forEach((
|
|
902
|
-
var
|
|
903
|
-
return row[
|
|
934
|
+
isEmpty(StoredValueField) || isEmpty(ReturnValueField) || (Array.isArray(StoredValueField) || (StoredValueField = [StoredValueField]), Array.isArray(ReturnValueField) || (ReturnValueField = [ReturnValueField]), StoredValueField.forEach((n, a) => {
|
|
935
|
+
var r;
|
|
936
|
+
return row[n] = ((r = e[ReturnValueField[a]]) == null ? void 0 : r.join(",")) || null;
|
|
904
937
|
}), handleChange(row[column.field], row, column));
|
|
905
938
|
}, urlParams) : openChoosePage(ChoosePageOID, (t, e) => {
|
|
906
|
-
isEmpty(StoredValueField) || isEmpty(ReturnValueField) || (Array.isArray(StoredValueField) || (StoredValueField = [StoredValueField]), Array.isArray(ReturnValueField) || (ReturnValueField = [ReturnValueField]), StoredValueField.forEach((
|
|
907
|
-
var
|
|
908
|
-
return row[
|
|
939
|
+
isEmpty(StoredValueField) || isEmpty(ReturnValueField) || (Array.isArray(StoredValueField) || (StoredValueField = [StoredValueField]), Array.isArray(ReturnValueField) || (ReturnValueField = [ReturnValueField]), StoredValueField.forEach((n, a) => {
|
|
940
|
+
var r;
|
|
941
|
+
return row[n] = ((r = e[ReturnValueField[a]]) == null ? void 0 : r.join(",")) || null;
|
|
909
942
|
}), handleChange(row[column.field], row, column));
|
|
910
943
|
}, urlParams, selectedData, layerOptions);
|
|
911
944
|
}
|
|
912
|
-
return (
|
|
945
|
+
return (o, t) => (openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
913
946
|
props.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...props, displayValue: value.value })), null, 16)) : (openBlock(), createBlock(unref(ElButton), {
|
|
914
947
|
key: 1,
|
|
915
948
|
class: "!text-[12px]",
|
|
@@ -945,8 +978,8 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
945
978
|
}
|
|
946
979
|
},
|
|
947
980
|
emits: ["change"],
|
|
948
|
-
setup(
|
|
949
|
-
const e =
|
|
981
|
+
setup(o, { emit: t }) {
|
|
982
|
+
const e = o, n = ref([
|
|
950
983
|
"#409EFF",
|
|
951
984
|
"#67C23A",
|
|
952
985
|
"#E6A23C",
|
|
@@ -987,20 +1020,20 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
987
1020
|
watchEffect(() => {
|
|
988
1021
|
a.value = isColor(e.row[e.column.field]) ? e.row[e.column.field] : null;
|
|
989
1022
|
});
|
|
990
|
-
const
|
|
991
|
-
function l(i, m,
|
|
992
|
-
m[
|
|
1023
|
+
const r = t;
|
|
1024
|
+
function l(i, m, d) {
|
|
1025
|
+
m[d.field] = i, r("change", i, m, d);
|
|
993
1026
|
}
|
|
994
1027
|
return (i, m) => {
|
|
995
|
-
var
|
|
1028
|
+
var d;
|
|
996
1029
|
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
997
1030
|
createVNode(unref(ElColorPicker), {
|
|
998
|
-
disabled: (
|
|
1031
|
+
disabled: (d = o.column.params) == null ? void 0 : d.disabled,
|
|
999
1032
|
class: "size-full",
|
|
1000
1033
|
modelValue: a.value,
|
|
1001
1034
|
"onUpdate:modelValue": m[0] || (m[0] = (u) => a.value = u),
|
|
1002
|
-
predefine:
|
|
1003
|
-
onChange: m[1] || (m[1] = (u) => l(u,
|
|
1035
|
+
predefine: n.value,
|
|
1036
|
+
onChange: m[1] || (m[1] = (u) => l(u, o.row, o.column))
|
|
1004
1037
|
}, null, 8, ["disabled", "modelValue", "predefine"])
|
|
1005
1038
|
]);
|
|
1006
1039
|
};
|
|
@@ -1026,7 +1059,7 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1026
1059
|
default: () => ({})
|
|
1027
1060
|
}
|
|
1028
1061
|
},
|
|
1029
|
-
setup(
|
|
1062
|
+
setup(o) {
|
|
1030
1063
|
return (t, e) => (openBlock(), createElementBlock("div", _hoisted_1$a));
|
|
1031
1064
|
}
|
|
1032
1065
|
}), __vite_glob_0_4$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1039,14 +1072,14 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1039
1072
|
row: { type: Object, default: () => ({}) },
|
|
1040
1073
|
column: { type: Object, default: () => ({}) }
|
|
1041
1074
|
},
|
|
1042
|
-
setup(
|
|
1075
|
+
setup(o) {
|
|
1043
1076
|
dayjs.extend(isoWeek), dayjs.extend(quarterOfYear), dayjs.extend(customParseFormat);
|
|
1044
|
-
const t =
|
|
1045
|
-
var
|
|
1046
|
-
const p = ((
|
|
1047
|
-
return b ? p === "time" ? b.format(
|
|
1077
|
+
const t = o, e = computed(() => {
|
|
1078
|
+
var S, x, B;
|
|
1079
|
+
const p = ((S = t.column.params) == null ? void 0 : S.DateType) || "date", c = (x = t.column.params) == null ? void 0 : x.formats, s = (B = t.row) == null ? void 0 : B[t.column.field], b = l(s, p);
|
|
1080
|
+
return b ? p === "time" ? b.format(c || "HH:mm:ss") : p === "date" ? b.format(c || "YYYY-MM-DD") : p === "datetime" ? b.format(c || "YYYY-MM-DD HH:mm:ss") : m(b, p, c) : "";
|
|
1048
1081
|
});
|
|
1049
|
-
function
|
|
1082
|
+
function n(p) {
|
|
1050
1083
|
switch (p) {
|
|
1051
1084
|
case "week":
|
|
1052
1085
|
return "YYYY年第WW周";
|
|
@@ -1060,65 +1093,68 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1060
1093
|
return "";
|
|
1061
1094
|
}
|
|
1062
1095
|
}
|
|
1063
|
-
function a(p,
|
|
1064
|
-
if (typeof
|
|
1065
|
-
const
|
|
1066
|
-
return p === "month" &&
|
|
1096
|
+
function a(p, c) {
|
|
1097
|
+
if (typeof c == "string" && c.trim()) {
|
|
1098
|
+
const s = c.trim();
|
|
1099
|
+
return p === "month" && s.includes("MM") || p === "week" && s.includes("WW") || p === "quarter" && (s.includes("QCN") || s.includes("Q")) || p === "year" && s.includes("YYYY") ? s : (console.warn(`[DatePickerRender] invalid formats for ${p}: "${s}". Fallback to default.`), n(p));
|
|
1067
1100
|
}
|
|
1068
|
-
return
|
|
1101
|
+
return n(p);
|
|
1069
1102
|
}
|
|
1070
1103
|
computed({
|
|
1071
1104
|
get() {
|
|
1072
|
-
var b,
|
|
1073
|
-
const p = ((
|
|
1074
|
-
return
|
|
1105
|
+
var b, S, x, B;
|
|
1106
|
+
const p = ((S = (b = t.column) == null ? void 0 : b.params) == null ? void 0 : S.DateType) || "date", c = (B = t.row) == null ? void 0 : B[(x = t.column) == null ? void 0 : x.field], s = l(c, p);
|
|
1107
|
+
return s ? s.toDate() : null;
|
|
1075
1108
|
},
|
|
1076
1109
|
set(p) {
|
|
1077
|
-
var
|
|
1078
|
-
const
|
|
1079
|
-
if (!
|
|
1080
|
-
const
|
|
1110
|
+
var S, x, B;
|
|
1111
|
+
const c = (S = t.column) == null ? void 0 : S.field;
|
|
1112
|
+
if (!c) return;
|
|
1113
|
+
const s = ((B = (x = t.column) == null ? void 0 : x.params) == null ? void 0 : B.DateType) || "date", b = r(p, s);
|
|
1081
1114
|
try {
|
|
1082
|
-
t.row && t.row[
|
|
1083
|
-
} catch (
|
|
1084
|
-
console.error("[DatePickerRender] writeback failed:",
|
|
1115
|
+
t.row && t.row[c] !== b && (t.row[c] = b);
|
|
1116
|
+
} catch (D) {
|
|
1117
|
+
console.error("[DatePickerRender] writeback failed:", D);
|
|
1085
1118
|
}
|
|
1086
1119
|
}
|
|
1087
1120
|
});
|
|
1088
|
-
function
|
|
1121
|
+
function r(p, c) {
|
|
1089
1122
|
if (p == null || p === "") return "";
|
|
1090
|
-
const
|
|
1091
|
-
return
|
|
1123
|
+
const s = dayjs(p);
|
|
1124
|
+
return s.isValid() ? c === "date" ? s.format("YYYY-MM-DD") : c === "datetime" ? s.format("YYYY-MM-DD HH:mm:ss") : c === "time" ? s.format("HH:mm:ss") : c === "week" ? s.startOf("isoWeek").format("YYYY-MM-DD") : c === "month" ? s.startOf("month").format("YYYY-MM-DD") : c === "quarter" ? s.startOf("quarter").format("YYYY-MM-DD") : c === "year" ? s.startOf("year").format("YYYY-MM-DD") : s.format("YYYY-MM-DD HH:mm:ss") : "";
|
|
1092
1125
|
}
|
|
1093
|
-
function l(p,
|
|
1126
|
+
function l(p, c) {
|
|
1094
1127
|
if (p == null || p === "") return null;
|
|
1095
1128
|
if (p instanceof Date) {
|
|
1096
|
-
const
|
|
1097
|
-
return
|
|
1129
|
+
const x = dayjs(p);
|
|
1130
|
+
return x.isValid() ? i(x, c) : null;
|
|
1098
1131
|
}
|
|
1099
|
-
const
|
|
1100
|
-
if (!
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
return
|
|
1132
|
+
const s = String(p).trim();
|
|
1133
|
+
if (!s) return null;
|
|
1134
|
+
const b = dayjs(s);
|
|
1135
|
+
if (b.isValid())
|
|
1136
|
+
return c === "year" ? b.startOf("year") : c === "month" ? b.startOf("month") : c === "quarter" ? b.startOf("quarter") : c === "week" ? b.startOf("isoWeek") : b;
|
|
1137
|
+
if (c === "date") {
|
|
1138
|
+
const x = dayjs(s, ["YYYY-MM-DD", "YYYY-MM-DD HH:mm:ss"], !0);
|
|
1139
|
+
return x.isValid() ? x.startOf("day") : null;
|
|
1104
1140
|
}
|
|
1105
|
-
if (
|
|
1106
|
-
const
|
|
1107
|
-
return
|
|
1141
|
+
if (c === "datetime") {
|
|
1142
|
+
const x = dayjs(s, ["YYYY-MM-DD HH:mm:ss", "YYYY-MM-DD"], !0);
|
|
1143
|
+
return x.isValid() ? x : null;
|
|
1108
1144
|
}
|
|
1109
|
-
if (
|
|
1110
|
-
const
|
|
1111
|
-
return
|
|
1145
|
+
if (c === "time") {
|
|
1146
|
+
const x = dayjs(`1970-01-01 ${s}`, "YYYY-MM-DD HH:mm:ss", !0);
|
|
1147
|
+
return x.isValid() ? x : null;
|
|
1112
1148
|
}
|
|
1113
|
-
if (
|
|
1114
|
-
if (
|
|
1115
|
-
if (
|
|
1116
|
-
if (
|
|
1117
|
-
const
|
|
1118
|
-
return
|
|
1119
|
-
}
|
|
1120
|
-
function i(p,
|
|
1121
|
-
switch (
|
|
1149
|
+
if (c === "week") return u(s);
|
|
1150
|
+
if (c === "month") return _(s);
|
|
1151
|
+
if (c === "quarter") return f(s);
|
|
1152
|
+
if (c === "year") return w(s);
|
|
1153
|
+
const S = dayjs(s);
|
|
1154
|
+
return S.isValid() ? i(S, c) : null;
|
|
1155
|
+
}
|
|
1156
|
+
function i(p, c) {
|
|
1157
|
+
switch (c) {
|
|
1122
1158
|
case "week":
|
|
1123
1159
|
return p.startOf("isoWeek");
|
|
1124
1160
|
case "month":
|
|
@@ -1131,67 +1167,67 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1131
1167
|
return p;
|
|
1132
1168
|
}
|
|
1133
1169
|
}
|
|
1134
|
-
function m(p,
|
|
1135
|
-
const b = a(
|
|
1170
|
+
function m(p, c, s) {
|
|
1171
|
+
const b = a(c, s);
|
|
1136
1172
|
if (!b) return "";
|
|
1137
|
-
const
|
|
1138
|
-
return b.replace(/QCN/g,
|
|
1173
|
+
const S = String(p.year()), x = String(p.isoWeekYear ? p.isoWeekYear() : p.year()), B = String(p.month() + 1).padStart(2, "0"), D = String(p.isoWeek()).padStart(2, "0"), j = String(p.quarter()), Y = ["第一", "第二", "第三", "第四"][p.quarter() - 1];
|
|
1174
|
+
return b.replace(/QCN/g, Y).replace(/YYYY/g, c === "week" ? x : S).replace(/MM/g, B).replace(/WW/g, D).replace(/Q/g, j);
|
|
1139
1175
|
}
|
|
1140
|
-
function
|
|
1141
|
-
if (!p || !
|
|
1142
|
-
const
|
|
1143
|
-
return
|
|
1176
|
+
function d(p, c) {
|
|
1177
|
+
if (!p || !c) return null;
|
|
1178
|
+
const s = dayjs(`${p}-01-04`, "YYYY-MM-DD", !0);
|
|
1179
|
+
return s.isValid() ? s.isoWeek(Number(c)).startOf("isoWeek") : null;
|
|
1144
1180
|
}
|
|
1145
1181
|
function u(p) {
|
|
1146
|
-
const
|
|
1147
|
-
let
|
|
1148
|
-
if (
|
|
1149
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
1150
|
-
const b = dayjs(
|
|
1182
|
+
const c = String(p).trim();
|
|
1183
|
+
let s = c.match(/^(\d{4})年(?:第)?(\d{1,2})周$/);
|
|
1184
|
+
if (s || (s = c.match(/^(\d{4})[-]?W?(\d{1,2})$/i), s)) return d(Number(s[1]), Number(s[2]));
|
|
1185
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(c)) {
|
|
1186
|
+
const b = dayjs(c, "YYYY-MM-DD", !0);
|
|
1151
1187
|
return b.isValid() ? b.startOf("isoWeek") : null;
|
|
1152
1188
|
}
|
|
1153
1189
|
return null;
|
|
1154
1190
|
}
|
|
1155
1191
|
function _(p) {
|
|
1156
|
-
const
|
|
1157
|
-
let
|
|
1158
|
-
if (
|
|
1159
|
-
if (
|
|
1160
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
1161
|
-
const b = dayjs(
|
|
1192
|
+
const c = String(p).trim();
|
|
1193
|
+
let s = c.match(/^(\d{4})年(\d{1,2})月$/);
|
|
1194
|
+
if (s) return dayjs(`${s[1]}-${String(s[2]).padStart(2, "0")}-01`, "YYYY-MM-DD", !0);
|
|
1195
|
+
if (s = c.match(/^(\d{4})-(\d{1,2})$/), s) return dayjs(`${s[1]}-${String(s[2]).padStart(2, "0")}-01`, "YYYY-MM-DD", !0);
|
|
1196
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(c)) {
|
|
1197
|
+
const b = dayjs(c, "YYYY-MM-DD", !0);
|
|
1162
1198
|
return b.isValid() ? b.startOf("month") : null;
|
|
1163
1199
|
}
|
|
1164
1200
|
return null;
|
|
1165
1201
|
}
|
|
1166
|
-
function
|
|
1167
|
-
const
|
|
1168
|
-
let
|
|
1169
|
-
if (
|
|
1170
|
-
if (
|
|
1202
|
+
function f(p) {
|
|
1203
|
+
const c = String(p).trim();
|
|
1204
|
+
let s = c.match(/^(\d{4})年第([1-4])季度$/);
|
|
1205
|
+
if (s) return dayjs(`${s[1]}-01-01`, "YYYY-MM-DD", !0).quarter(Number(s[2]));
|
|
1206
|
+
if (s = c.match(/^(\d{4})年(第一|第二|第三|第四)季度$/), s) {
|
|
1171
1207
|
const b = { 第一: 1, 第二: 2, 第三: 3, 第四: 4 };
|
|
1172
|
-
return dayjs(`${
|
|
1208
|
+
return dayjs(`${s[1]}-01-01`, "YYYY-MM-DD", !0).quarter(b[s[2]]);
|
|
1173
1209
|
}
|
|
1174
|
-
if (
|
|
1175
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
1176
|
-
const b = dayjs(
|
|
1210
|
+
if (s = c.match(/^(\d{4})[-]?Q?([1-4])$/i), s) return dayjs(`${s[1]}-01-01`, "YYYY-MM-DD", !0).quarter(Number(s[2]));
|
|
1211
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(c)) {
|
|
1212
|
+
const b = dayjs(c, "YYYY-MM-DD", !0);
|
|
1177
1213
|
return b.isValid() ? b.startOf("quarter") : null;
|
|
1178
1214
|
}
|
|
1179
1215
|
return null;
|
|
1180
1216
|
}
|
|
1181
|
-
function
|
|
1182
|
-
const
|
|
1183
|
-
let
|
|
1184
|
-
if (
|
|
1185
|
-
if (
|
|
1186
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
1187
|
-
const b = dayjs(
|
|
1217
|
+
function w(p) {
|
|
1218
|
+
const c = String(p).trim();
|
|
1219
|
+
let s = c.match(/^(\d{4})年$/);
|
|
1220
|
+
if (s) return dayjs(`${s[1]}-01-01`, "YYYY-MM-DD", !0);
|
|
1221
|
+
if (s = c.match(/^(\d{4})$/), s) return dayjs(`${s[1]}-01-01`, "YYYY-MM-DD", !0);
|
|
1222
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(c)) {
|
|
1223
|
+
const b = dayjs(c, "YYYY-MM-DD", !0);
|
|
1188
1224
|
return b.isValid() ? b.startOf("year") : null;
|
|
1189
1225
|
}
|
|
1190
1226
|
return null;
|
|
1191
1227
|
}
|
|
1192
|
-
return (p,
|
|
1193
|
-
var
|
|
1194
|
-
return (
|
|
1228
|
+
return (p, c) => {
|
|
1229
|
+
var s;
|
|
1230
|
+
return (s = t.column.params) != null && s.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue: e.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1195
1231
|
key: 1,
|
|
1196
1232
|
title: e.value
|
|
1197
1233
|
}, toDisplayString(e.value), 9, _hoisted_1$9));
|
|
@@ -1222,15 +1258,15 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1222
1258
|
}
|
|
1223
1259
|
},
|
|
1224
1260
|
emits: ["file-click"],
|
|
1225
|
-
setup(
|
|
1261
|
+
setup(o, { emit: t }) {
|
|
1226
1262
|
const e = t;
|
|
1227
|
-
function
|
|
1263
|
+
function n(a) {
|
|
1228
1264
|
["jpg", "jpeg", "png", "gif", "bmp", "svg"].includes(a.FileType.toLowerCase()) || e("file-click", a);
|
|
1229
1265
|
}
|
|
1230
|
-
return (a,
|
|
1266
|
+
return (a, r) => {
|
|
1231
1267
|
const l = resolveDirective("viewer");
|
|
1232
1268
|
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
1233
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1269
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(o.row[o.column.field], (i, m) => (openBlock(), createElementBlock("div", {
|
|
1234
1270
|
class: "Link flex",
|
|
1235
1271
|
title: i.FileName
|
|
1236
1272
|
}, [
|
|
@@ -1241,10 +1277,10 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1241
1277
|
backgroundImage: `url(${unref(getFileIconUrl)(i.FileType)})`,
|
|
1242
1278
|
backgroundSize: "cover"
|
|
1243
1279
|
}),
|
|
1244
|
-
onClick: (
|
|
1280
|
+
onClick: (d) => n(i)
|
|
1245
1281
|
}, null, 12, _hoisted_3$1)) : (openBlock(), createBlock(unref(ElImage), {
|
|
1246
1282
|
key: 0,
|
|
1247
|
-
onClick: (
|
|
1283
|
+
onClick: (d) => n(i),
|
|
1248
1284
|
class: "size-5",
|
|
1249
1285
|
src: i.FilePath
|
|
1250
1286
|
}, null, 8, ["onClick", "src"])),
|
|
@@ -1285,12 +1321,12 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1285
1321
|
}
|
|
1286
1322
|
},
|
|
1287
1323
|
emits: ["change"],
|
|
1288
|
-
setup(
|
|
1324
|
+
setup(o, { emit: t }) {
|
|
1289
1325
|
const e = t;
|
|
1290
|
-
function r
|
|
1291
|
-
e("change",
|
|
1326
|
+
function n(r, l, i) {
|
|
1327
|
+
e("change", r, l, i);
|
|
1292
1328
|
}
|
|
1293
|
-
function a(
|
|
1329
|
+
function a(r, l) {
|
|
1294
1330
|
var m;
|
|
1295
1331
|
if ((m = l.params) != null && m.disable) return;
|
|
1296
1332
|
let i = layer.open({
|
|
@@ -1300,18 +1336,18 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1300
1336
|
area: ["80%", "80%"],
|
|
1301
1337
|
content: "/Html/Custom/SelectIcon/Icon.html?callbackFn=setIcon&clearFn=clearIcon"
|
|
1302
1338
|
});
|
|
1303
|
-
window.setIcon = (
|
|
1304
|
-
|
|
1305
|
-
}, window.clearIcon = (
|
|
1306
|
-
|
|
1339
|
+
window.setIcon = (d) => {
|
|
1340
|
+
r[l.field] = d.font_class, n(d, r, l);
|
|
1341
|
+
}, window.clearIcon = (d) => {
|
|
1342
|
+
r[l.field] = "", n(d, r, l), layer.close(i);
|
|
1307
1343
|
};
|
|
1308
1344
|
}
|
|
1309
|
-
return (
|
|
1345
|
+
return (r, l) => (openBlock(), createElementBlock("div", {
|
|
1310
1346
|
class: "w-full h-full flex justify-center items-center",
|
|
1311
|
-
onClick: l[0] || (l[0] = (i) => a(
|
|
1347
|
+
onClick: l[0] || (l[0] = (i) => a(o.row, o.column))
|
|
1312
1348
|
}, [
|
|
1313
1349
|
createVNode(unref(HrIcon), {
|
|
1314
|
-
icon:
|
|
1350
|
+
icon: o.row[o.column.field]
|
|
1315
1351
|
}, null, 8, ["icon"])
|
|
1316
1352
|
]));
|
|
1317
1353
|
}
|
|
@@ -1337,37 +1373,37 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1337
1373
|
}
|
|
1338
1374
|
},
|
|
1339
1375
|
emits: ["change"],
|
|
1340
|
-
setup(
|
|
1341
|
-
const e =
|
|
1342
|
-
function a(
|
|
1376
|
+
setup(o, { emit: t }) {
|
|
1377
|
+
const e = o, n = t;
|
|
1378
|
+
function a(r, l) {
|
|
1343
1379
|
var p;
|
|
1344
1380
|
if ((p = l.params) != null && p.disabled) return;
|
|
1345
1381
|
let {
|
|
1346
1382
|
PickPeopleType: i,
|
|
1347
1383
|
PickPeopleCheckType: m,
|
|
1348
|
-
PickPeopleIsAll:
|
|
1384
|
+
PickPeopleIsAll: d,
|
|
1349
1385
|
PickPeopleStatus: u,
|
|
1350
1386
|
StoredValueField: _,
|
|
1351
|
-
ReturnValueField:
|
|
1352
|
-
BackfillField:
|
|
1387
|
+
ReturnValueField: f,
|
|
1388
|
+
BackfillField: w
|
|
1353
1389
|
} = e.column.params;
|
|
1354
1390
|
openChoosePeople({
|
|
1355
1391
|
Type: i,
|
|
1356
1392
|
Choose: m,
|
|
1357
|
-
IsAll:
|
|
1393
|
+
IsAll: d,
|
|
1358
1394
|
Status: u
|
|
1359
|
-
}, (
|
|
1360
|
-
isEmpty(_) ?
|
|
1361
|
-
},
|
|
1395
|
+
}, (c) => {
|
|
1396
|
+
isEmpty(_) ? r[l.field] = c.Name || null : (Array.isArray(_) || (_ = [_]), Array.isArray(f) || (f = [f]), _.forEach((s, b) => r[s] = c[f[b]] || null)), n("change", c, r, l);
|
|
1397
|
+
}, w ? r[w] : null);
|
|
1362
1398
|
}
|
|
1363
|
-
return (
|
|
1399
|
+
return (r, l) => (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
1364
1400
|
createVNode(unref(ElButton), {
|
|
1365
1401
|
class: "!text-[12px]",
|
|
1366
1402
|
link: "",
|
|
1367
|
-
onClick: l[0] || (l[0] = (i) => a(
|
|
1403
|
+
onClick: l[0] || (l[0] = (i) => a(o.row, o.column))
|
|
1368
1404
|
}, {
|
|
1369
1405
|
default: withCtx(() => [
|
|
1370
|
-
createTextVNode(toDisplayString(
|
|
1406
|
+
createTextVNode(toDisplayString(o.row[o.column.field] || "请选择"), 1)
|
|
1371
1407
|
]),
|
|
1372
1408
|
_: 1
|
|
1373
1409
|
})
|
|
@@ -1395,20 +1431,20 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1395
1431
|
}
|
|
1396
1432
|
},
|
|
1397
1433
|
emits: ["change"],
|
|
1398
|
-
setup(
|
|
1399
|
-
const e =
|
|
1400
|
-
let
|
|
1434
|
+
setup(o, { emit: t }) {
|
|
1435
|
+
const e = o;
|
|
1436
|
+
let n = ref(0);
|
|
1401
1437
|
return watchEffect(() => {
|
|
1402
1438
|
if (e.row[e.column.field]) {
|
|
1403
1439
|
const a = Number(parseFloat(e.row[e.column.field]));
|
|
1404
1440
|
if (isNaN(a))
|
|
1405
|
-
return e.row[e.column.field] =
|
|
1406
|
-
|
|
1441
|
+
return e.row[e.column.field] = n.value, layer.msg("请输入有效的数字");
|
|
1442
|
+
n.value = a > 100 ? 100 : a, a > 100 ? e.row[e.column.field] = 100 : e.row[e.column.field] = n.value;
|
|
1407
1443
|
} else
|
|
1408
|
-
|
|
1409
|
-
}), (a,
|
|
1410
|
-
percentage: unref(
|
|
1411
|
-
format: () => `${unref(
|
|
1444
|
+
n.value = 0;
|
|
1445
|
+
}), (a, r) => (openBlock(), createBlock(unref(ElProgress), {
|
|
1446
|
+
percentage: unref(n),
|
|
1447
|
+
format: () => `${unref(n)}%`
|
|
1412
1448
|
}, null, 8, ["percentage", "format"]));
|
|
1413
1449
|
}
|
|
1414
1450
|
}), __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1433,20 +1469,20 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1433
1469
|
}
|
|
1434
1470
|
},
|
|
1435
1471
|
emits: ["change"],
|
|
1436
|
-
setup(
|
|
1437
|
-
const e =
|
|
1438
|
-
function a(
|
|
1472
|
+
setup(o, { emit: t }) {
|
|
1473
|
+
const e = o, n = t;
|
|
1474
|
+
function a(r, l, i) {
|
|
1439
1475
|
e.gridRef.getTableData().tableData.filter((m) => m !== l).forEach((m) => {
|
|
1440
1476
|
m[i.field] && (m[i.field] = !1);
|
|
1441
|
-
}),
|
|
1477
|
+
}), n("change", r, l, i);
|
|
1442
1478
|
}
|
|
1443
|
-
return (
|
|
1479
|
+
return (r, l) => {
|
|
1444
1480
|
var i;
|
|
1445
1481
|
return openBlock(), createBlock(unref(ElRadioGroup), {
|
|
1446
|
-
disabled: (i =
|
|
1447
|
-
modelValue:
|
|
1448
|
-
"onUpdate:modelValue": l[0] || (l[0] = (m) =>
|
|
1449
|
-
onChange: l[1] || (l[1] = (m) => a(m,
|
|
1482
|
+
disabled: (i = o.column.params) == null ? void 0 : i.disabled,
|
|
1483
|
+
modelValue: o.row[o.column.field],
|
|
1484
|
+
"onUpdate:modelValue": l[0] || (l[0] = (m) => o.row[o.column.field] = m),
|
|
1485
|
+
onChange: l[1] || (l[1] = (m) => a(m, o.row, o.column))
|
|
1450
1486
|
}, {
|
|
1451
1487
|
default: withCtx(() => [
|
|
1452
1488
|
createVNode(unref(ElRadio), { value: !0 })
|
|
@@ -1476,33 +1512,33 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1476
1512
|
default: () => ({})
|
|
1477
1513
|
}
|
|
1478
1514
|
},
|
|
1479
|
-
setup(
|
|
1480
|
-
var a,
|
|
1481
|
-
const t =
|
|
1482
|
-
(a = t.column.params)[
|
|
1515
|
+
setup(o) {
|
|
1516
|
+
var a, r;
|
|
1517
|
+
const t = o;
|
|
1518
|
+
(a = t.column.params)[r = t.gridRef.getRowid(t.row)] ?? (a[r] = {}), watchEffect(() => {
|
|
1483
1519
|
var l, i;
|
|
1484
1520
|
(l = t.column.params)[i = t.gridRef.getRowid(t.row)] ?? (l[i] = {}), !t.column.params[t.gridRef.getRowid(t.row)].options && t.column.params.options && (t.column.params[t.gridRef.getRowid(t.row)].options = deepClone(t.column.params.options));
|
|
1485
1521
|
});
|
|
1486
1522
|
const e = computed(() => {
|
|
1487
1523
|
var l;
|
|
1488
1524
|
return ((l = t.column.params[t.gridRef.getRowid(t.row)]) == null ? void 0 : l.options) || t.column.params.options;
|
|
1489
|
-
}),
|
|
1525
|
+
}), n = computed(() => {
|
|
1490
1526
|
var i, m;
|
|
1491
1527
|
const l = t.row[t.column.field];
|
|
1492
1528
|
if (l && l.length > 1) {
|
|
1493
|
-
let
|
|
1529
|
+
let d = [];
|
|
1494
1530
|
return l.split(",").map((u) => {
|
|
1495
|
-
var
|
|
1496
|
-
const _ = (
|
|
1497
|
-
_ !== void 0 &&
|
|
1498
|
-
}),
|
|
1531
|
+
var f, w;
|
|
1532
|
+
const _ = (w = (f = e.value) == null ? void 0 : f.find((p) => p.value == u)) == null ? void 0 : w.label;
|
|
1533
|
+
_ !== void 0 && d.push(_);
|
|
1534
|
+
}), d.join(",");
|
|
1499
1535
|
} else
|
|
1500
|
-
return ((m = (i = e.value) == null ? void 0 : i.find((
|
|
1536
|
+
return ((m = (i = e.value) == null ? void 0 : i.find((d) => d.value == l)) == null ? void 0 : m.label) || "";
|
|
1501
1537
|
});
|
|
1502
|
-
return (l, i) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue:
|
|
1538
|
+
return (l, i) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue: n.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1503
1539
|
key: 1,
|
|
1504
|
-
title:
|
|
1505
|
-
}, toDisplayString(
|
|
1540
|
+
title: n.value
|
|
1541
|
+
}, toDisplayString(n.value), 9, _hoisted_1$6));
|
|
1506
1542
|
}
|
|
1507
1543
|
}), __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1508
1544
|
__proto__: null,
|
|
@@ -1525,24 +1561,24 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1525
1561
|
default: () => ({})
|
|
1526
1562
|
}
|
|
1527
1563
|
},
|
|
1528
|
-
setup(
|
|
1529
|
-
var a,
|
|
1530
|
-
const t =
|
|
1531
|
-
(a = t.column.params)[
|
|
1564
|
+
setup(o) {
|
|
1565
|
+
var a, r;
|
|
1566
|
+
const t = o;
|
|
1567
|
+
(a = t.column.params)[r = t.gridRef.getRowid(t.row)] ?? (a[r] = {}), watchEffect(() => {
|
|
1532
1568
|
var l, i;
|
|
1533
1569
|
(l = t.column.params)[i = t.gridRef.getRowid(t.row)] ?? (l[i] = {}), !t.column.params[t.gridRef.getRowid(t.row)].options && t.column.params.options && (t.column.params[t.gridRef.getRowid(t.row)].options = deepClone(t.column.params.options));
|
|
1534
1570
|
});
|
|
1535
1571
|
const e = computed(() => {
|
|
1536
1572
|
var l;
|
|
1537
1573
|
return ((l = t.column.params[t.gridRef.getRowid(t.row)]) == null ? void 0 : l.options) || t.column.params.options;
|
|
1538
|
-
}),
|
|
1574
|
+
}), n = computed(() => {
|
|
1539
1575
|
var l, i;
|
|
1540
1576
|
return ((i = (l = e.value) == null ? void 0 : l.find((m) => m.value == t.row[t.column.field])) == null ? void 0 : i.label) || "";
|
|
1541
1577
|
});
|
|
1542
|
-
return (l, i) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, mergeProps({ key: 0 }, { ...t, displayValue:
|
|
1578
|
+
return (l, i) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, mergeProps({ key: 0 }, { ...t, displayValue: n.value }, { title: n.value }), null, 16, ["title"])) : (openBlock(), createElementBlock("span", {
|
|
1543
1579
|
key: 1,
|
|
1544
|
-
title:
|
|
1545
|
-
}, toDisplayString(
|
|
1580
|
+
title: n.value
|
|
1581
|
+
}, toDisplayString(n.value), 9, _hoisted_1$5));
|
|
1546
1582
|
}
|
|
1547
1583
|
}), __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1548
1584
|
__proto__: null,
|
|
@@ -1565,20 +1601,20 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1565
1601
|
default: () => ({})
|
|
1566
1602
|
}
|
|
1567
1603
|
},
|
|
1568
|
-
setup(
|
|
1569
|
-
const t =
|
|
1604
|
+
setup(o) {
|
|
1605
|
+
const t = o;
|
|
1570
1606
|
if (!t.column.params.TreeData) {
|
|
1571
|
-
const { options:
|
|
1572
|
-
t.column.params.TreeData = buildTree(deepClone(
|
|
1607
|
+
const { options: n, ParentNodeField: a, NodeValueField: r } = t.column.params;
|
|
1608
|
+
t.column.params.TreeData = buildTree(deepClone(n), a, r);
|
|
1573
1609
|
}
|
|
1574
1610
|
const e = computed(() => {
|
|
1575
|
-
const { NodeNameField:
|
|
1611
|
+
const { NodeNameField: n = "label", NodeValueField: a = "value" } = t.column.params;
|
|
1576
1612
|
if (t.row[t.column.field]) {
|
|
1577
|
-
let
|
|
1578
|
-
return t.column.params.options.filter((l) =>
|
|
1613
|
+
let r = t.row[t.column.field].split(",");
|
|
1614
|
+
return t.column.params.options.filter((l) => r.includes(l[a])).map((l) => l[n]).join(",");
|
|
1579
1615
|
}
|
|
1580
1616
|
});
|
|
1581
|
-
return (
|
|
1617
|
+
return (n, a) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue: e.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1582
1618
|
key: 1,
|
|
1583
1619
|
title: e.value
|
|
1584
1620
|
}, toDisplayString(e.value), 9, _hoisted_1$4));
|
|
@@ -1604,18 +1640,18 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1604
1640
|
default: () => ({})
|
|
1605
1641
|
}
|
|
1606
1642
|
},
|
|
1607
|
-
setup(
|
|
1608
|
-
const t =
|
|
1643
|
+
setup(o) {
|
|
1644
|
+
const t = o;
|
|
1609
1645
|
if (!t.column.params.TreeData) {
|
|
1610
|
-
const { options:
|
|
1611
|
-
t.column.params.TreeData = buildTree(deepClone(
|
|
1646
|
+
const { options: n, ParentNodeField: a, NodeKeyField: r } = t.column.params;
|
|
1647
|
+
t.column.params.TreeData = buildTree(deepClone(n), a, r);
|
|
1612
1648
|
}
|
|
1613
1649
|
const e = computed(() => {
|
|
1614
|
-
var
|
|
1615
|
-
const { NodeNameField:
|
|
1616
|
-
return ((
|
|
1650
|
+
var r;
|
|
1651
|
+
const { NodeNameField: n = "label", NodeValueField: a = "value" } = t.column.params;
|
|
1652
|
+
return ((r = t.column.params.options.find((l) => l[a] == t.row[t.column.field])) == null ? void 0 : r[n]) || "";
|
|
1617
1653
|
});
|
|
1618
|
-
return (
|
|
1654
|
+
return (n, a) => t.column.params.IsLabel ? (openBlock(), createBlock(_sfc_main$q, normalizeProps(mergeProps({ key: 0 }, { ...t, displayValue: e.value })), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
1619
1655
|
key: 1,
|
|
1620
1656
|
title: e.value
|
|
1621
1657
|
}, toDisplayString(e.value), 9, _hoisted_1$3));
|
|
@@ -1626,9 +1662,9 @@ const _hoisted_1$j = ["title"], _hoisted_2$7 = { class: "date-filter-popover" },
|
|
|
1626
1662
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1627
1663
|
let comps$1 = {};
|
|
1628
1664
|
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 });
|
|
1629
|
-
for (const
|
|
1630
|
-
let t = modules$1[
|
|
1631
|
-
comps$1[t] = modules$1[
|
|
1665
|
+
for (const o in modules$1) {
|
|
1666
|
+
let t = modules$1[o].default.name;
|
|
1667
|
+
comps$1[t] = modules$1[o].default;
|
|
1632
1668
|
}
|
|
1633
1669
|
const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" }, {
|
|
1634
1670
|
__name: "date-picker-editor",
|
|
@@ -1638,12 +1674,12 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1638
1674
|
column: { type: Object, default: () => ({}) }
|
|
1639
1675
|
},
|
|
1640
1676
|
emits: ["change"],
|
|
1641
|
-
setup(
|
|
1677
|
+
setup(o, { emit: t }) {
|
|
1642
1678
|
dayjs.extend(isoWeek), dayjs.extend(quarterOfYear), dayjs.extend(customParseFormat);
|
|
1643
|
-
const e =
|
|
1644
|
-
var v,
|
|
1645
|
-
return ((
|
|
1646
|
-
}),
|
|
1679
|
+
const e = o, n = t, a = computed(() => {
|
|
1680
|
+
var v, k;
|
|
1681
|
+
return ((k = (v = e.column) == null ? void 0 : v.params) == null ? void 0 : k.DateType) || "date";
|
|
1682
|
+
}), r = computed(() => {
|
|
1647
1683
|
switch (a.value) {
|
|
1648
1684
|
case "year":
|
|
1649
1685
|
return "yyyy年";
|
|
@@ -1665,11 +1701,11 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1665
1701
|
l.value = dayjs();
|
|
1666
1702
|
}
|
|
1667
1703
|
const m = computed(() => {
|
|
1668
|
-
var v,
|
|
1669
|
-
return (
|
|
1670
|
-
}),
|
|
1671
|
-
var v,
|
|
1672
|
-
return (
|
|
1704
|
+
var v, k;
|
|
1705
|
+
return (k = (v = e.column) == null ? void 0 : v.params) == null ? void 0 : k.minDate;
|
|
1706
|
+
}), d = computed(() => {
|
|
1707
|
+
var v, k;
|
|
1708
|
+
return (k = (v = e.column) == null ? void 0 : v.params) == null ? void 0 : k.maxDate;
|
|
1673
1709
|
});
|
|
1674
1710
|
function u(v) {
|
|
1675
1711
|
return v == null || v === "" ? null : typeof v == "string" && v.trim() !== "" && !Number.isNaN(Number(v)) ? Number(v) : v;
|
|
@@ -1690,8 +1726,8 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1690
1726
|
return "day";
|
|
1691
1727
|
}
|
|
1692
1728
|
}
|
|
1693
|
-
function
|
|
1694
|
-
switch (
|
|
1729
|
+
function f(v, k) {
|
|
1730
|
+
switch (k) {
|
|
1695
1731
|
case "week":
|
|
1696
1732
|
return v.startOf("isoWeek");
|
|
1697
1733
|
case "month":
|
|
@@ -1706,89 +1742,89 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1706
1742
|
return v;
|
|
1707
1743
|
}
|
|
1708
1744
|
}
|
|
1709
|
-
function
|
|
1710
|
-
const
|
|
1711
|
-
if (
|
|
1712
|
-
const
|
|
1713
|
-
if (typeof
|
|
1714
|
-
return
|
|
1715
|
-
if (typeof
|
|
1716
|
-
const
|
|
1717
|
-
return
|
|
1745
|
+
function w(v, k, E) {
|
|
1746
|
+
const O = u(v);
|
|
1747
|
+
if (O === null) return null;
|
|
1748
|
+
const P = f(l.value, k), T = _(k);
|
|
1749
|
+
if (typeof O == "number" && !Number.isNaN(O))
|
|
1750
|
+
return O < 0 ? f(P.add(O, T), k) : f(E === "min" ? P.subtract(O, T) : P.add(O, T), k);
|
|
1751
|
+
if (typeof O == "string" || O instanceof Date) {
|
|
1752
|
+
const N = $(O, k);
|
|
1753
|
+
return N ? f(dayjs(N), k) : null;
|
|
1718
1754
|
}
|
|
1719
1755
|
return null;
|
|
1720
1756
|
}
|
|
1721
1757
|
const p = computed(() => {
|
|
1722
1758
|
const v = a.value;
|
|
1723
1759
|
return {
|
|
1724
|
-
min:
|
|
1725
|
-
max:
|
|
1760
|
+
min: w(m.value, v, "min"),
|
|
1761
|
+
max: w(d.value, v, "max")
|
|
1726
1762
|
};
|
|
1727
|
-
}),
|
|
1763
|
+
}), c = computed(() => p.value.min ? p.value.min.toDate() : null), s = computed(() => p.value.max ? p.value.max.toDate() : null);
|
|
1728
1764
|
function b({ date: v }) {
|
|
1729
|
-
const { min:
|
|
1730
|
-
return !!(
|
|
1765
|
+
const { min: k, max: E } = p.value, O = f(dayjs(v), a.value);
|
|
1766
|
+
return !!(k && O.isBefore(k) || E && O.isAfter(E));
|
|
1731
1767
|
}
|
|
1732
|
-
const
|
|
1768
|
+
const S = ref($(e.row[e.column.field], a.value)), x = ref(S.value);
|
|
1733
1769
|
watch(
|
|
1734
1770
|
() => e.row[e.column.field],
|
|
1735
1771
|
(v) => {
|
|
1736
|
-
const
|
|
1737
|
-
|
|
1772
|
+
const k = $(v, a.value);
|
|
1773
|
+
S.value = k, x.value = k;
|
|
1738
1774
|
}
|
|
1739
1775
|
);
|
|
1740
|
-
function
|
|
1776
|
+
function B(v, k) {
|
|
1741
1777
|
if (v == null || v === "") return null;
|
|
1742
|
-
if (
|
|
1743
|
-
const
|
|
1744
|
-
return
|
|
1778
|
+
if (k === "time") {
|
|
1779
|
+
const P = dayjs(`1970-01-01 ${String(v)}`, "YYYY-MM-DD HH:mm:ss", !0);
|
|
1780
|
+
return P.isValid() ? P : null;
|
|
1745
1781
|
}
|
|
1746
|
-
if (
|
|
1747
|
-
const
|
|
1748
|
-
return
|
|
1782
|
+
if (k === "date" || k === "datetime") {
|
|
1783
|
+
const P = v instanceof Date ? dayjs(v) : dayjs(String(v));
|
|
1784
|
+
return P.isValid() ? f(P, k) : null;
|
|
1749
1785
|
}
|
|
1750
|
-
const
|
|
1751
|
-
if (!
|
|
1752
|
-
const
|
|
1753
|
-
return
|
|
1754
|
-
}
|
|
1755
|
-
function
|
|
1756
|
-
const
|
|
1757
|
-
if (!
|
|
1758
|
-
const { min:
|
|
1759
|
-
return !!(
|
|
1760
|
-
}
|
|
1761
|
-
function
|
|
1762
|
-
const
|
|
1763
|
-
if (
|
|
1764
|
-
|
|
1786
|
+
const E = $(v, k);
|
|
1787
|
+
if (!E) return null;
|
|
1788
|
+
const O = dayjs(E, "YYYY-MM-DD", !0);
|
|
1789
|
+
return O.isValid() ? f(O, k) : null;
|
|
1790
|
+
}
|
|
1791
|
+
function D(v) {
|
|
1792
|
+
const k = B(v, a.value);
|
|
1793
|
+
if (!k) return !1;
|
|
1794
|
+
const { min: E, max: O } = p.value;
|
|
1795
|
+
return !!(E && k.isBefore(E) || O && k.isAfter(O));
|
|
1796
|
+
}
|
|
1797
|
+
function j(v) {
|
|
1798
|
+
const k = v && typeof v == "object" && "value" in v ? v.value : v;
|
|
1799
|
+
if (k == null || k === "") {
|
|
1800
|
+
x.value = k, n("change", k);
|
|
1765
1801
|
return;
|
|
1766
1802
|
}
|
|
1767
|
-
if (i(),
|
|
1768
|
-
|
|
1803
|
+
if (i(), D(k)) {
|
|
1804
|
+
S.value = x.value;
|
|
1769
1805
|
return;
|
|
1770
1806
|
}
|
|
1771
|
-
|
|
1807
|
+
x.value = k, n("change", k);
|
|
1772
1808
|
}
|
|
1773
|
-
function
|
|
1774
|
-
|
|
1809
|
+
function Y() {
|
|
1810
|
+
x.value = null, n("change", null);
|
|
1775
1811
|
}
|
|
1776
1812
|
onBeforeUnmount(() => {
|
|
1777
|
-
const v = a.value,
|
|
1778
|
-
|
|
1813
|
+
const v = a.value, k = S.value;
|
|
1814
|
+
k && (v === "year" ? e.row[e.column.field] = dayjs(k).format("YYYY年") : v === "month" ? e.row[e.column.field] = dayjs(k).format("YYYY年MM月") : v === "quarter" ? e.row[e.column.field] = dayjs(k).format("YYYY年第Q季度") : v === "week" ? e.row[e.column.field] = dayjs(k).format("YYYY年第WW周") : v === "datetime" ? e.row[e.column.field] = dayjs(k).format("YYYY-MM-DD HH:mm:ss") : v === "time" ? e.row[e.column.field] = dayjs(`1970-01-01 ${String(k)}`, "YYYY-MM-DD HH:mm:ss").format("HH:mm:ss") : e.row[e.column.field] = dayjs(k).format("YYYY-MM-DD"));
|
|
1779
1815
|
});
|
|
1780
|
-
function $(v,
|
|
1816
|
+
function $(v, k) {
|
|
1781
1817
|
if (!v) return null;
|
|
1782
|
-
const
|
|
1783
|
-
if (
|
|
1784
|
-
if (/^\d{4}-\d{2}$/.test(
|
|
1785
|
-
const
|
|
1786
|
-
if (
|
|
1787
|
-
const H =
|
|
1788
|
-
return `${H}-${
|
|
1818
|
+
const E = String(v).trim();
|
|
1819
|
+
if (k === "month") {
|
|
1820
|
+
if (/^\d{4}-\d{2}$/.test(E)) return `${E}-01`;
|
|
1821
|
+
const N = E.match(/^(\d{4})年(\d{1,2})月$/);
|
|
1822
|
+
if (N) {
|
|
1823
|
+
const H = N[1], L = String(N[2]).padStart(2, "0");
|
|
1824
|
+
return `${H}-${L}-01`;
|
|
1789
1825
|
}
|
|
1790
1826
|
}
|
|
1791
|
-
const
|
|
1827
|
+
const P = {
|
|
1792
1828
|
time: "HH:mm:ss",
|
|
1793
1829
|
date: "YYYY-MM-DD",
|
|
1794
1830
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
@@ -1796,34 +1832,34 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1796
1832
|
month: "YYYY-MM",
|
|
1797
1833
|
quarter: "YYYY-Q",
|
|
1798
1834
|
year: "YYYY"
|
|
1799
|
-
}[
|
|
1800
|
-
if (!
|
|
1801
|
-
let
|
|
1802
|
-
if (!
|
|
1803
|
-
const
|
|
1804
|
-
if (
|
|
1805
|
-
const [, H,
|
|
1806
|
-
|
|
1835
|
+
}[k];
|
|
1836
|
+
if (!P) throw new Error("Unsupported date type");
|
|
1837
|
+
let T = dayjs(E, P);
|
|
1838
|
+
if (!T.isValid() && k === "week") {
|
|
1839
|
+
const N = E.match(/^(\d{4})年第(\d{1,2})周$/);
|
|
1840
|
+
if (N) {
|
|
1841
|
+
const [, H, L] = N;
|
|
1842
|
+
T = dayjs(`${H}-01-01`).isoWeek(Number(L));
|
|
1807
1843
|
}
|
|
1808
|
-
} else if (!
|
|
1809
|
-
const
|
|
1810
|
-
if (
|
|
1811
|
-
const [, H,
|
|
1812
|
-
|
|
1844
|
+
} else if (!T.isValid() && k === "quarter") {
|
|
1845
|
+
const N = E.match(/^(\d{4})年第(\d)季度$/);
|
|
1846
|
+
if (N) {
|
|
1847
|
+
const [, H, L] = N;
|
|
1848
|
+
T = dayjs(`${H}-01-01`).quarter(Number(L));
|
|
1813
1849
|
}
|
|
1814
|
-
} else if (!
|
|
1815
|
-
const
|
|
1816
|
-
|
|
1850
|
+
} else if (!T.isValid() && k === "year") {
|
|
1851
|
+
const N = E.match(/^(\d{4})年$/);
|
|
1852
|
+
N && (T = dayjs(`${N[1]}-01-01`));
|
|
1817
1853
|
}
|
|
1818
|
-
if (!
|
|
1819
|
-
const
|
|
1820
|
-
if (!
|
|
1821
|
-
|
|
1854
|
+
if (!T.isValid()) {
|
|
1855
|
+
const N = E instanceof Date ? dayjs(E) : dayjs(E);
|
|
1856
|
+
if (!N.isValid()) return null;
|
|
1857
|
+
T = N;
|
|
1822
1858
|
}
|
|
1823
|
-
return
|
|
1859
|
+
return q(T, k);
|
|
1824
1860
|
}
|
|
1825
|
-
function
|
|
1826
|
-
switch (
|
|
1861
|
+
function q(v, k) {
|
|
1862
|
+
switch (k) {
|
|
1827
1863
|
case "time":
|
|
1828
1864
|
return v.format("HH:mm:ss");
|
|
1829
1865
|
case "date":
|
|
@@ -1842,22 +1878,22 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1842
1878
|
return null;
|
|
1843
1879
|
}
|
|
1844
1880
|
}
|
|
1845
|
-
return (v,
|
|
1846
|
-
const
|
|
1847
|
-
return openBlock(), createBlock(
|
|
1848
|
-
modelValue:
|
|
1849
|
-
"onUpdate:modelValue":
|
|
1881
|
+
return (v, k) => {
|
|
1882
|
+
const E = resolveComponent("vxe-input");
|
|
1883
|
+
return openBlock(), createBlock(E, {
|
|
1884
|
+
modelValue: S.value,
|
|
1885
|
+
"onUpdate:modelValue": k[0] || (k[0] = (O) => S.value = O),
|
|
1850
1886
|
type: a.value,
|
|
1851
1887
|
clearable: "",
|
|
1852
1888
|
transfer: "",
|
|
1853
|
-
"label-format":
|
|
1854
|
-
"min-date":
|
|
1855
|
-
"max-date":
|
|
1889
|
+
"label-format": r.value,
|
|
1890
|
+
"min-date": c.value,
|
|
1891
|
+
"max-date": s.value,
|
|
1856
1892
|
"disabled-method": b,
|
|
1857
1893
|
onFocus: i,
|
|
1858
1894
|
onClick: i,
|
|
1859
|
-
onChange:
|
|
1860
|
-
onClear:
|
|
1895
|
+
onChange: j,
|
|
1896
|
+
onClear: Y
|
|
1861
1897
|
}, null, 8, ["modelValue", "type", "label-format", "min-date", "max-date"]);
|
|
1862
1898
|
};
|
|
1863
1899
|
}
|
|
@@ -1882,17 +1918,17 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1882
1918
|
default: () => ({})
|
|
1883
1919
|
}
|
|
1884
1920
|
},
|
|
1885
|
-
setup(
|
|
1886
|
-
const t =
|
|
1887
|
-
function
|
|
1921
|
+
setup(o) {
|
|
1922
|
+
const t = o, e = ref(t.row[t.column.field]);
|
|
1923
|
+
function n(a) {
|
|
1888
1924
|
t.row[t.column.field] = a;
|
|
1889
1925
|
}
|
|
1890
1926
|
return onBeforeUnmount(() => {
|
|
1891
1927
|
t.row[t.column.field] = e.value;
|
|
1892
|
-
}), (a,
|
|
1928
|
+
}), (a, r) => (openBlock(), createBlock(unref(ElInput), {
|
|
1893
1929
|
modelValue: e.value,
|
|
1894
|
-
"onUpdate:modelValue":
|
|
1895
|
-
onInput:
|
|
1930
|
+
"onUpdate:modelValue": r[0] || (r[0] = (l) => e.value = l),
|
|
1931
|
+
onInput: n
|
|
1896
1932
|
}, null, 8, ["modelValue"]));
|
|
1897
1933
|
}
|
|
1898
1934
|
}), __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1917,19 +1953,19 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1917
1953
|
}
|
|
1918
1954
|
},
|
|
1919
1955
|
emits: ["change"],
|
|
1920
|
-
setup(
|
|
1921
|
-
const e =
|
|
1922
|
-
return watch(
|
|
1923
|
-
const l =
|
|
1956
|
+
setup(o, { emit: t }) {
|
|
1957
|
+
const e = o, n = ref(e.row[e.column.field]), a = t;
|
|
1958
|
+
return watch(n, (r) => {
|
|
1959
|
+
const l = r === "" || r == null ? 0 : Number(r);
|
|
1924
1960
|
e.row[e.column.field] = l, a("change", l);
|
|
1925
1961
|
}), onBeforeUnmount(() => {
|
|
1926
|
-
e.row[e.column.field] =
|
|
1927
|
-
}), (
|
|
1928
|
-
modelValue:
|
|
1929
|
-
"onUpdate:modelValue": l[0] || (l[0] = (i) =>
|
|
1930
|
-
min:
|
|
1931
|
-
max:
|
|
1932
|
-
step:
|
|
1962
|
+
e.row[e.column.field] = n.value ? Number(n.value) : 0;
|
|
1963
|
+
}), (r, l) => (openBlock(), createBlock(unref(ElInput), {
|
|
1964
|
+
modelValue: n.value,
|
|
1965
|
+
"onUpdate:modelValue": l[0] || (l[0] = (i) => n.value = i),
|
|
1966
|
+
min: o.column.params.min,
|
|
1967
|
+
max: o.column.params.max,
|
|
1968
|
+
step: o.column.params.step,
|
|
1933
1969
|
type: "number"
|
|
1934
1970
|
}, null, 8, ["modelValue", "min", "max", "step"]));
|
|
1935
1971
|
}
|
|
@@ -1954,29 +1990,29 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
1954
1990
|
default: () => ({})
|
|
1955
1991
|
}
|
|
1956
1992
|
},
|
|
1957
|
-
setup(
|
|
1958
|
-
const t =
|
|
1993
|
+
setup(o) {
|
|
1994
|
+
const t = o, e = ref(t.row[t.column.field]), n = reactive(t.column.params || {
|
|
1959
1995
|
placeholder: "请选择",
|
|
1960
1996
|
disabled: !1,
|
|
1961
1997
|
clearable: !1
|
|
1962
1998
|
}), a = computed(() => {
|
|
1963
|
-
var
|
|
1964
|
-
return ((
|
|
1999
|
+
var r;
|
|
2000
|
+
return ((r = t.column.params[t.gridRef.getRowid(t.row)]) == null ? void 0 : r.options) || t.column.params.options || [];
|
|
1965
2001
|
});
|
|
1966
2002
|
return onBeforeUnmount(() => {
|
|
1967
2003
|
var l;
|
|
1968
2004
|
t.row[t.column.field] = e.value;
|
|
1969
|
-
const
|
|
1970
|
-
if (
|
|
2005
|
+
const r = t.column.params.LabelStoreField;
|
|
2006
|
+
if (r) {
|
|
1971
2007
|
const i = (l = a.value.find((m) => m.value === e.value)) == null ? void 0 : l.label;
|
|
1972
|
-
i !== void 0 ? t.row[
|
|
2008
|
+
i !== void 0 ? t.row[r] = i : e.value === void 0 ? t.row[r] = null : e.value !== void 0 && i === void 0 && (t.row[r] = e.value);
|
|
1973
2009
|
}
|
|
1974
|
-
}), (
|
|
2010
|
+
}), (r, l) => (openBlock(), createBlock(unref(ElSelect), {
|
|
1975
2011
|
class: "z-1",
|
|
1976
2012
|
modelValue: e.value,
|
|
1977
2013
|
"onUpdate:modelValue": l[0] || (l[0] = (i) => e.value = i),
|
|
1978
2014
|
"automatic-dropdown": "",
|
|
1979
|
-
placeholder:
|
|
2015
|
+
placeholder: n.placeholder,
|
|
1980
2016
|
"popper-class": "select-dropdown",
|
|
1981
2017
|
clearable: ""
|
|
1982
2018
|
}, {
|
|
@@ -2013,28 +2049,28 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2013
2049
|
default: () => ({})
|
|
2014
2050
|
}
|
|
2015
2051
|
},
|
|
2016
|
-
setup(
|
|
2017
|
-
const t =
|
|
2052
|
+
setup(o) {
|
|
2053
|
+
const t = o, e = reactive(t.column.params || {
|
|
2018
2054
|
placeholder: "请选择",
|
|
2019
2055
|
disabled: !1,
|
|
2020
2056
|
clearable: !1
|
|
2021
|
-
}),
|
|
2022
|
-
var
|
|
2023
|
-
return ((
|
|
2057
|
+
}), n = computed(() => {
|
|
2058
|
+
var r;
|
|
2059
|
+
return ((r = t.column.params[t.gridRef.getRowid(t.row)]) == null ? void 0 : r.options) || t.column.params.options || [];
|
|
2024
2060
|
});
|
|
2025
2061
|
onBeforeUnmount(() => {
|
|
2026
|
-
const
|
|
2027
|
-
t.row[t.column.field] =
|
|
2062
|
+
const r = a.value.join(",");
|
|
2063
|
+
t.row[t.column.field] = r;
|
|
2028
2064
|
const l = t.column.params.LabelStoreField;
|
|
2029
2065
|
if (l) {
|
|
2030
|
-
const i =
|
|
2066
|
+
const i = n.value.filter((m) => a.value.includes(m.value)).map((m) => m.label).join(",");
|
|
2031
2067
|
t.row[l] = i;
|
|
2032
2068
|
}
|
|
2033
2069
|
});
|
|
2034
2070
|
const a = ref([]);
|
|
2035
2071
|
return watchEffect(() => {
|
|
2036
2072
|
t.row[t.column.field] ? a.value = t.row[t.column.field].split(",") : a.value = [];
|
|
2037
|
-
}), (
|
|
2073
|
+
}), (r, l) => (openBlock(), createBlock(unref(ElSelect), {
|
|
2038
2074
|
class: "z-1 vxe-table--ignore-clear",
|
|
2039
2075
|
modelValue: a.value,
|
|
2040
2076
|
"onUpdate:modelValue": l[0] || (l[0] = (i) => a.value = i),
|
|
@@ -2045,7 +2081,7 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2045
2081
|
clearable: ""
|
|
2046
2082
|
}, {
|
|
2047
2083
|
default: withCtx(() => [
|
|
2048
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
2084
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.value, (i) => (openBlock(), createBlock(unref(ElOption), {
|
|
2049
2085
|
class: "vxe-table--ignore-clear",
|
|
2050
2086
|
key: i.value,
|
|
2051
2087
|
label: i.label,
|
|
@@ -2077,8 +2113,8 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2077
2113
|
}
|
|
2078
2114
|
},
|
|
2079
2115
|
emits: ["remoteMethod"],
|
|
2080
|
-
setup(
|
|
2081
|
-
const e = t,
|
|
2116
|
+
setup(o, { emit: t }) {
|
|
2117
|
+
const e = t, n = o, a = ref(n.row[n.column.field] === void 0 ? "" : n.row[n.column.field]), r = reactive(n.column.params || {
|
|
2082
2118
|
options: [],
|
|
2083
2119
|
placeholder: "请选择",
|
|
2084
2120
|
disabled: !1,
|
|
@@ -2089,35 +2125,35 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2089
2125
|
loading: !1
|
|
2090
2126
|
});
|
|
2091
2127
|
onBeforeUnmount(() => {
|
|
2092
|
-
const { StoredValueField: i, ReturnValueField: m } =
|
|
2093
|
-
i && i.length ? i.forEach((
|
|
2094
|
-
const _ =
|
|
2095
|
-
_ && (
|
|
2096
|
-
}) :
|
|
2128
|
+
const { StoredValueField: i, ReturnValueField: m } = r;
|
|
2129
|
+
i && i.length ? i.forEach((d, u) => {
|
|
2130
|
+
const _ = r.options.find((f) => f._value === a.value);
|
|
2131
|
+
_ && (n.row[d] = _[m[u]]);
|
|
2132
|
+
}) : n.row[n.column.field] = a.value;
|
|
2097
2133
|
});
|
|
2098
2134
|
function l(i) {
|
|
2099
|
-
const { DataAPIOID: m, SearchField:
|
|
2100
|
-
i ? (
|
|
2135
|
+
const { DataAPIOID: m, SearchField: d } = r;
|
|
2136
|
+
i ? (r.loading = !0, e("remoteMethod", { DataAPIOID: m, SearchField: d, query: i, params: r })) : n.row[n.column.field] = null;
|
|
2101
2137
|
}
|
|
2102
2138
|
return (i, m) => (openBlock(), createBlock(unref(ElSelect), {
|
|
2103
2139
|
class: "z-1 vxe-table--ignore-clear",
|
|
2104
2140
|
modelValue: a.value,
|
|
2105
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
2141
|
+
"onUpdate:modelValue": m[0] || (m[0] = (d) => a.value = d),
|
|
2106
2142
|
"allow-create": "",
|
|
2107
2143
|
"automatic-dropdown": "",
|
|
2108
2144
|
filterable: "",
|
|
2109
2145
|
remote: "",
|
|
2110
|
-
placeholder:
|
|
2146
|
+
placeholder: r.placeholder,
|
|
2111
2147
|
"popper-class": "select-dropdown",
|
|
2112
2148
|
"remote-method": l,
|
|
2113
2149
|
clearable: ""
|
|
2114
2150
|
}, {
|
|
2115
2151
|
default: withCtx(() => [
|
|
2116
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
2152
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(r.options, (d) => (openBlock(), createBlock(unref(ElOption), {
|
|
2117
2153
|
class: "vxe-table--ignore-clear",
|
|
2118
|
-
key:
|
|
2119
|
-
label:
|
|
2120
|
-
value:
|
|
2154
|
+
key: d._value,
|
|
2155
|
+
label: d._label,
|
|
2156
|
+
value: d._value
|
|
2121
2157
|
}, null, 8, ["label", "value"]))), 128))
|
|
2122
2158
|
]),
|
|
2123
2159
|
_: 1
|
|
@@ -2144,13 +2180,13 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2144
2180
|
default: () => ({})
|
|
2145
2181
|
}
|
|
2146
2182
|
},
|
|
2147
|
-
setup(
|
|
2148
|
-
const t =
|
|
2183
|
+
setup(o) {
|
|
2184
|
+
const t = o, e = ref(t.row[t.column.field]);
|
|
2149
2185
|
return onBeforeUnmount(() => {
|
|
2150
2186
|
t.row[t.column.field] = e.value;
|
|
2151
|
-
}), (
|
|
2187
|
+
}), (n, a) => (openBlock(), createBlock(unref(ElInput), {
|
|
2152
2188
|
modelValue: e.value,
|
|
2153
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
2189
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => e.value = r),
|
|
2154
2190
|
rows: 2,
|
|
2155
2191
|
type: "textarea"
|
|
2156
2192
|
}, null, 8, ["modelValue"]));
|
|
@@ -2176,28 +2212,28 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2176
2212
|
default: () => ({})
|
|
2177
2213
|
}
|
|
2178
2214
|
},
|
|
2179
|
-
setup(
|
|
2180
|
-
const t =
|
|
2215
|
+
setup(o) {
|
|
2216
|
+
const t = o, e = ref({
|
|
2181
2217
|
label: t.column.params.NodeNameField || "label",
|
|
2182
2218
|
value: t.column.params.NodeValueField || "value",
|
|
2183
2219
|
children: "children"
|
|
2184
2220
|
});
|
|
2185
2221
|
if (!t.column.params.TreeData) {
|
|
2186
|
-
const { options: a, ParentNodeField:
|
|
2187
|
-
t.column.params.TreeData = buildTree(deepClone(a),
|
|
2222
|
+
const { options: a, ParentNodeField: r, NodeValueField: l } = t.column.params;
|
|
2223
|
+
t.column.params.TreeData = buildTree(deepClone(a), r, l);
|
|
2188
2224
|
}
|
|
2189
|
-
const
|
|
2225
|
+
const n = ref([]);
|
|
2190
2226
|
return onBeforeUnmount(() => {
|
|
2191
|
-
t.row[t.column.field] =
|
|
2227
|
+
t.row[t.column.field] = n.value.join(",");
|
|
2192
2228
|
}), watchEffect(() => {
|
|
2193
|
-
t.row[t.column.field] ?
|
|
2194
|
-
}), (a,
|
|
2229
|
+
t.row[t.column.field] ? n.value = t.row[t.column.field].split(",") : n.value = [];
|
|
2230
|
+
}), (a, r) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
2195
2231
|
class: "z-1 vxe-table--ignore-clear",
|
|
2196
|
-
modelValue:
|
|
2197
|
-
"onUpdate:modelValue":
|
|
2232
|
+
modelValue: n.value,
|
|
2233
|
+
"onUpdate:modelValue": r[0] || (r[0] = (l) => n.value = l),
|
|
2198
2234
|
"automatic-dropdown": "",
|
|
2199
2235
|
"popper-class": "tree-select",
|
|
2200
|
-
data:
|
|
2236
|
+
data: o.column.params.TreeData,
|
|
2201
2237
|
props: e.value,
|
|
2202
2238
|
clearable: "",
|
|
2203
2239
|
multiple: "",
|
|
@@ -2226,31 +2262,31 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2226
2262
|
default: () => ({})
|
|
2227
2263
|
}
|
|
2228
2264
|
},
|
|
2229
|
-
setup(
|
|
2230
|
-
const t =
|
|
2265
|
+
setup(o) {
|
|
2266
|
+
const t = o, e = ref(t.row[t.column.field]), n = ref({
|
|
2231
2267
|
label: t.column.params.NodeNameField || "label",
|
|
2232
2268
|
value: t.column.params.NodeValueField || "value",
|
|
2233
2269
|
children: "children"
|
|
2234
2270
|
});
|
|
2235
2271
|
if (!t.column.params.TreeData) {
|
|
2236
|
-
const { options: a, ParentNodeField:
|
|
2237
|
-
t.column.params.TreeData = buildTree(deepClone(a),
|
|
2272
|
+
const { options: a, ParentNodeField: r, NodeValueField: l } = t.column.params;
|
|
2273
|
+
t.column.params.TreeData = buildTree(deepClone(a), r, l);
|
|
2238
2274
|
}
|
|
2239
2275
|
return onBeforeUnmount(() => {
|
|
2240
2276
|
t.row[t.column.field] = e.value;
|
|
2241
|
-
}), (a,
|
|
2277
|
+
}), (a, r) => (openBlock(), createBlock(unref(ElTreeSelect), {
|
|
2242
2278
|
class: "z-1 vxe-table--ignore-clear",
|
|
2243
2279
|
modelValue: e.value,
|
|
2244
|
-
"onUpdate:modelValue":
|
|
2280
|
+
"onUpdate:modelValue": r[0] || (r[0] = (l) => e.value = l),
|
|
2245
2281
|
"automatic-dropdown": "",
|
|
2246
2282
|
"popper-class": "tree-select",
|
|
2247
|
-
data:
|
|
2283
|
+
data: o.column.params.TreeData,
|
|
2248
2284
|
clearable: "",
|
|
2249
|
-
props:
|
|
2285
|
+
props: n.value,
|
|
2250
2286
|
indent: 12
|
|
2251
2287
|
}, {
|
|
2252
2288
|
label: withCtx(({ label: l, value: i }) => [
|
|
2253
|
-
createElementVNode("span", null, toDisplayString(
|
|
2289
|
+
createElementVNode("span", null, toDisplayString(o.column.params.options.find((m) => m[n.value.value] === i) ? l : ""), 1)
|
|
2254
2290
|
]),
|
|
2255
2291
|
_: 1
|
|
2256
2292
|
}, 8, ["modelValue", "data", "props"]));
|
|
@@ -2261,9 +2297,9 @@ const _sfc_main$c = /* @__PURE__ */ Object.assign({ name: "DatePickerEditor" },
|
|
|
2261
2297
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2262
2298
|
let comps = {};
|
|
2263
2299
|
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 });
|
|
2264
|
-
for (const
|
|
2265
|
-
let t = modules[
|
|
2266
|
-
comps[t] = modules[
|
|
2300
|
+
for (const o in modules) {
|
|
2301
|
+
let t = modules[o].default.name;
|
|
2302
|
+
comps[t] = modules[o].default;
|
|
2267
2303
|
}
|
|
2268
2304
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
2269
2305
|
__name: "paging",
|
|
@@ -2287,8 +2323,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2287
2323
|
}
|
|
2288
2324
|
},
|
|
2289
2325
|
emits: ["pageChange", "refresh"],
|
|
2290
|
-
setup(
|
|
2291
|
-
const e =
|
|
2326
|
+
setup(o, { emit: t }) {
|
|
2327
|
+
const e = o, n = ref(), a = ref([
|
|
2292
2328
|
"Total",
|
|
2293
2329
|
"Sizes",
|
|
2294
2330
|
"PrevJump",
|
|
@@ -2299,7 +2335,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2299
2335
|
"FullJump"
|
|
2300
2336
|
]);
|
|
2301
2337
|
onMounted(() => {
|
|
2302
|
-
e.gridOptions.Pages === !1 ? a.value = ["Total"] : useElementClientSize(
|
|
2338
|
+
e.gridOptions.Pages === !1 ? a.value = ["Total"] : useElementClientSize(n.value, ({ clientWidth: i }) => {
|
|
2303
2339
|
i < 300 ? a.value = ["Total"] : i < 500 ? a.value = [
|
|
2304
2340
|
"Total",
|
|
2305
2341
|
"PrevJump",
|
|
@@ -2333,36 +2369,36 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2333
2369
|
];
|
|
2334
2370
|
}
|
|
2335
2371
|
);
|
|
2336
|
-
const
|
|
2372
|
+
const r = t;
|
|
2337
2373
|
function l() {
|
|
2338
|
-
|
|
2374
|
+
r("pageChange", e.pagination);
|
|
2339
2375
|
}
|
|
2340
2376
|
return (i, m) => (openBlock(), createElementBlock("div", {
|
|
2341
2377
|
ref_key: "pagingDom",
|
|
2342
|
-
ref:
|
|
2378
|
+
ref: n,
|
|
2343
2379
|
class: "flex items-center w-full h-12 border border-solid border-[#e8eaec] box-border"
|
|
2344
2380
|
}, [
|
|
2345
2381
|
createVNode(unref(VxePager), {
|
|
2346
2382
|
size: "small",
|
|
2347
2383
|
class: "w-full !h-full",
|
|
2348
2384
|
background: "",
|
|
2349
|
-
"current-page":
|
|
2350
|
-
"onUpdate:currentPage": m[0] || (m[0] = (
|
|
2351
|
-
"page-size":
|
|
2352
|
-
"onUpdate:pageSize": m[1] || (m[1] = (
|
|
2353
|
-
total:
|
|
2385
|
+
"current-page": o.pagination.Page,
|
|
2386
|
+
"onUpdate:currentPage": m[0] || (m[0] = (d) => o.pagination.Page = d),
|
|
2387
|
+
"page-size": o.pagination.PageSize,
|
|
2388
|
+
"onUpdate:pageSize": m[1] || (m[1] = (d) => o.pagination.PageSize = d),
|
|
2389
|
+
total: o.pagination.Total,
|
|
2354
2390
|
layouts: a.value,
|
|
2355
2391
|
onPageChange: l,
|
|
2356
|
-
"page-sizes":
|
|
2392
|
+
"page-sizes": o.pagination.PageSizes
|
|
2357
2393
|
}, null, 8, ["current-page", "page-size", "total", "layouts", "page-sizes"])
|
|
2358
2394
|
], 512));
|
|
2359
2395
|
}
|
|
2360
2396
|
});
|
|
2361
|
-
function useFixedColumnPanel(
|
|
2397
|
+
function useFixedColumnPanel(o) {
|
|
2362
2398
|
function t() {
|
|
2363
|
-
const l =
|
|
2399
|
+
const l = o.value;
|
|
2364
2400
|
if (!l) return;
|
|
2365
|
-
const i = getFixableColumns(l), m = new Map(i.map((
|
|
2401
|
+
const i = getFixableColumns(l), m = new Map(i.map((f) => [f.field, f.fixed || ""])), d = i.filter((f) => m.get(f.field)).map((f) => f.field);
|
|
2366
2402
|
let u = "left";
|
|
2367
2403
|
const _ = `
|
|
2368
2404
|
<div style="padding:12px 14px;">
|
|
@@ -2376,13 +2412,13 @@ function useFixedColumnPanel(n) {
|
|
|
2376
2412
|
</div>
|
|
2377
2413
|
|
|
2378
2414
|
<div style="max-height:320px;overflow:auto;border:1px solid #eee;padding:8px;border-radius:6px;">
|
|
2379
|
-
${i.map((
|
|
2380
|
-
const
|
|
2415
|
+
${i.map((f) => {
|
|
2416
|
+
const w = String(f.title ?? f.field), p = d.includes(f.field) ? "checked" : "", c = m.get(f.field) === "left" ? "左固定" : m.get(f.field) === "right" ? "右固定" : "";
|
|
2381
2417
|
return `
|
|
2382
2418
|
<div style="display:flex;align-items:center;gap:8px;margin:6px 0;">
|
|
2383
|
-
<input type="checkbox" class="fix-col" value="${
|
|
2384
|
-
<span>${escapeHtml(
|
|
2385
|
-
<span style="margin-left:auto;color:#999;font-size:12px;">${
|
|
2419
|
+
<input type="checkbox" class="fix-col" value="${f.field}" ${p} />
|
|
2420
|
+
<span>${escapeHtml(w)}</span>
|
|
2421
|
+
<span style="margin-left:auto;color:#999;font-size:12px;">${c}</span>
|
|
2386
2422
|
</div>
|
|
2387
2423
|
`;
|
|
2388
2424
|
}).join("")}
|
|
@@ -2396,95 +2432,95 @@ function useFixedColumnPanel(n) {
|
|
|
2396
2432
|
content: _,
|
|
2397
2433
|
// 你想要的:不持久化,只要本次页面生效
|
|
2398
2434
|
btn: ["应用", "取消全部固定", "关闭"],
|
|
2399
|
-
success: function(
|
|
2400
|
-
|
|
2435
|
+
success: function(f) {
|
|
2436
|
+
f[0].querySelectorAll('input[name="fixSide"]').forEach((p) => {
|
|
2401
2437
|
p.addEventListener("change", () => {
|
|
2402
2438
|
u = p.value === "right" ? "right" : "left";
|
|
2403
2439
|
});
|
|
2404
2440
|
});
|
|
2405
2441
|
},
|
|
2406
2442
|
// 应用
|
|
2407
|
-
btn1: function(
|
|
2408
|
-
const p = Array.from(
|
|
2409
|
-
(
|
|
2443
|
+
btn1: function(f, w) {
|
|
2444
|
+
const p = Array.from(w[0].querySelectorAll("input.fix-col:checked")).map(
|
|
2445
|
+
(c) => c.value
|
|
2410
2446
|
);
|
|
2411
|
-
applyFixed(l, i, p, u), window.layer.close(
|
|
2447
|
+
applyFixed(l, i, p, u), window.layer.close(f);
|
|
2412
2448
|
},
|
|
2413
2449
|
// 取消全部固定
|
|
2414
|
-
btn2: function(
|
|
2415
|
-
return e(), window.layer.close(
|
|
2450
|
+
btn2: function(f) {
|
|
2451
|
+
return e(), window.layer.close(f), !1;
|
|
2416
2452
|
},
|
|
2417
2453
|
// 关闭
|
|
2418
|
-
btn3: function(
|
|
2419
|
-
window.layer.close(
|
|
2454
|
+
btn3: function(f) {
|
|
2455
|
+
window.layer.close(f);
|
|
2420
2456
|
}
|
|
2421
2457
|
});
|
|
2422
2458
|
}
|
|
2423
2459
|
function e() {
|
|
2424
2460
|
var m;
|
|
2425
|
-
const l =
|
|
2461
|
+
const l = o.value;
|
|
2426
2462
|
if (!l) return;
|
|
2427
|
-
getFixableColumns(l).forEach((
|
|
2463
|
+
getFixableColumns(l).forEach((d) => {
|
|
2428
2464
|
var u;
|
|
2429
|
-
return (u = l.setColumnFixed) == null ? void 0 : u.call(l,
|
|
2465
|
+
return (u = l.setColumnFixed) == null ? void 0 : u.call(l, d, null);
|
|
2430
2466
|
}), (m = l.refreshColumn) == null || m.call(l);
|
|
2431
2467
|
}
|
|
2432
|
-
function
|
|
2468
|
+
function n(l) {
|
|
2433
2469
|
var u;
|
|
2434
|
-
const i =
|
|
2470
|
+
const i = o.value;
|
|
2435
2471
|
if (!i || !l) return;
|
|
2436
|
-
const m = getFixableColumns(i),
|
|
2437
|
-
|
|
2438
|
-
var
|
|
2439
|
-
(
|
|
2472
|
+
const m = getFixableColumns(i), d = r(m, l);
|
|
2473
|
+
d < 0 || (m.forEach((_, f) => {
|
|
2474
|
+
var w;
|
|
2475
|
+
(w = i.setColumnFixed) == null || w.call(i, _, f <= d ? "left" : null);
|
|
2440
2476
|
}), (u = i.refreshColumn) == null || u.call(i));
|
|
2441
2477
|
}
|
|
2442
2478
|
function a(l) {
|
|
2443
2479
|
var u;
|
|
2444
|
-
const i =
|
|
2480
|
+
const i = o.value;
|
|
2445
2481
|
if (!i || !l) return;
|
|
2446
|
-
const m = getFixableColumns(i),
|
|
2447
|
-
|
|
2448
|
-
var
|
|
2449
|
-
(
|
|
2482
|
+
const m = getFixableColumns(i), d = r(m, l);
|
|
2483
|
+
d < 0 || (m.forEach((_, f) => {
|
|
2484
|
+
var w;
|
|
2485
|
+
(w = i.setColumnFixed) == null || w.call(i, _, f >= d ? "right" : null);
|
|
2450
2486
|
}), (u = i.refreshColumn) == null || u.call(i));
|
|
2451
2487
|
}
|
|
2452
|
-
function
|
|
2488
|
+
function r(l, i) {
|
|
2453
2489
|
const m = (i == null ? void 0 : i.field) || (i == null ? void 0 : i.property);
|
|
2454
|
-
return m ? l.findIndex((
|
|
2490
|
+
return m ? l.findIndex((d) => ((d == null ? void 0 : d.field) || (d == null ? void 0 : d.property)) === m) : -1;
|
|
2455
2491
|
}
|
|
2456
2492
|
return {
|
|
2457
2493
|
openFixPanel: t,
|
|
2458
2494
|
clearAllFixed: e,
|
|
2459
|
-
freezeToLeft:
|
|
2495
|
+
freezeToLeft: n,
|
|
2460
2496
|
freezeToRight: a
|
|
2461
2497
|
};
|
|
2462
2498
|
}
|
|
2463
|
-
function getFixableColumns(
|
|
2499
|
+
function getFixableColumns(o) {
|
|
2464
2500
|
var e;
|
|
2465
|
-
return getLeafColumns(((e =
|
|
2501
|
+
return getLeafColumns(((e = o.getColumns) == null ? void 0 : e.call(o)) || []).filter((n) => n && n.field).filter((n) => !["seq", "checkbox", "radio", "expand"].includes(n.type)).filter((n) => n.type !== "action");
|
|
2466
2502
|
}
|
|
2467
|
-
function getLeafColumns(
|
|
2468
|
-
const t = [], e = (
|
|
2469
|
-
|
|
2503
|
+
function getLeafColumns(o = []) {
|
|
2504
|
+
const t = [], e = (n) => {
|
|
2505
|
+
n.forEach((a) => {
|
|
2470
2506
|
a && (Array.isArray(a.children) && a.children.length ? e(a.children) : t.push(a));
|
|
2471
2507
|
});
|
|
2472
2508
|
};
|
|
2473
|
-
return e(
|
|
2509
|
+
return e(o), t;
|
|
2474
2510
|
}
|
|
2475
|
-
function applyFixed(
|
|
2476
|
-
var
|
|
2511
|
+
function applyFixed(o, t, e, n) {
|
|
2512
|
+
var r;
|
|
2477
2513
|
const a = new Set(e);
|
|
2478
2514
|
t.forEach((l) => {
|
|
2479
2515
|
var i;
|
|
2480
|
-
return (i =
|
|
2516
|
+
return (i = o.setColumnFixed) == null ? void 0 : i.call(o, l, null);
|
|
2481
2517
|
}), t.forEach((l) => {
|
|
2482
2518
|
var i;
|
|
2483
|
-
a.has(l.field) && ((i =
|
|
2484
|
-
}), (
|
|
2519
|
+
a.has(l.field) && ((i = o.setColumnFixed) == null || i.call(o, l, n));
|
|
2520
|
+
}), (r = o.refreshColumn) == null || r.call(o);
|
|
2485
2521
|
}
|
|
2486
|
-
function escapeHtml(
|
|
2487
|
-
return
|
|
2522
|
+
function escapeHtml(o) {
|
|
2523
|
+
return o.replace(
|
|
2488
2524
|
/[&<>"']/g,
|
|
2489
2525
|
(t) => ({
|
|
2490
2526
|
"&": "&",
|
|
@@ -2522,79 +2558,79 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2522
2558
|
"tableSelectChange",
|
|
2523
2559
|
"tableSelectRemote"
|
|
2524
2560
|
],
|
|
2525
|
-
setup(
|
|
2526
|
-
const
|
|
2527
|
-
reactive(
|
|
2528
|
-
let _ = ref(!1),
|
|
2561
|
+
setup(o, { expose: t, emit: e }) {
|
|
2562
|
+
const n = o, a = e, r = ref(), { openFixPanel: l, clearAllFixed: i, freezeToLeft: m, freezeToRight: d } = useFixedColumnPanel(r), u = reactive(n.config);
|
|
2563
|
+
reactive(n.config.columns);
|
|
2564
|
+
let _ = ref(!1), f = null;
|
|
2529
2565
|
onMounted(() => {
|
|
2530
2566
|
document.addEventListener("click", Z, !0);
|
|
2531
2567
|
}), onBeforeUnmount(() => {
|
|
2532
2568
|
document.removeEventListener("click", Z, !0), Q();
|
|
2533
2569
|
});
|
|
2534
2570
|
const {
|
|
2535
|
-
CheckboxRender:
|
|
2571
|
+
CheckboxRender: w,
|
|
2536
2572
|
ColorPickerRender: p,
|
|
2537
|
-
IconPickerRender:
|
|
2538
|
-
RadioRender:
|
|
2573
|
+
IconPickerRender: c,
|
|
2574
|
+
RadioRender: s,
|
|
2539
2575
|
ProgressRender: b,
|
|
2540
|
-
ActionRender:
|
|
2541
|
-
SelectRender:
|
|
2542
|
-
TreeSelectRender:
|
|
2543
|
-
SelectMultipleRender:
|
|
2544
|
-
TreeMultipleSelectRender:
|
|
2545
|
-
ChooseFrameRender:
|
|
2576
|
+
ActionRender: S,
|
|
2577
|
+
SelectRender: x,
|
|
2578
|
+
TreeSelectRender: B,
|
|
2579
|
+
SelectMultipleRender: D,
|
|
2580
|
+
TreeMultipleSelectRender: j,
|
|
2581
|
+
ChooseFrameRender: Y,
|
|
2546
2582
|
PickPeopleRender: $,
|
|
2547
|
-
FileRender:
|
|
2583
|
+
FileRender: q,
|
|
2548
2584
|
CustomRender: v,
|
|
2549
|
-
DatePickerRender:
|
|
2550
|
-
LabelRender:
|
|
2585
|
+
DatePickerRender: k,
|
|
2586
|
+
LabelRender: E
|
|
2551
2587
|
} = comps$1, {
|
|
2552
|
-
InputEditor:
|
|
2553
|
-
TreeSelectEditor:
|
|
2554
|
-
SelectEditor:
|
|
2555
|
-
TextareaEditor:
|
|
2588
|
+
InputEditor: O,
|
|
2589
|
+
TreeSelectEditor: P,
|
|
2590
|
+
SelectEditor: T,
|
|
2591
|
+
TextareaEditor: N,
|
|
2556
2592
|
DatePickerEditor: H,
|
|
2557
|
-
SelectMultipleEditor:
|
|
2593
|
+
SelectMultipleEditor: L,
|
|
2558
2594
|
TreeMultipleSelectEditor: te,
|
|
2559
2595
|
InputNumberEditor: le,
|
|
2560
|
-
SelectRemoteEditor:
|
|
2561
|
-
} = comps,
|
|
2562
|
-
var y,
|
|
2563
|
-
return ((((y =
|
|
2596
|
+
SelectRemoteEditor: re
|
|
2597
|
+
} = comps, ne = computed(() => {
|
|
2598
|
+
var y, C;
|
|
2599
|
+
return ((((y = n.pagination) == null ? void 0 : y.Page) || 1) - 1) * (((C = n.pagination) == null ? void 0 : C.PageSize) || 1e3);
|
|
2564
2600
|
}), J = computed(() => {
|
|
2565
|
-
var
|
|
2601
|
+
var C, g, h, V;
|
|
2566
2602
|
if (u.Number)
|
|
2567
2603
|
if (u.columns.some(
|
|
2568
|
-
(
|
|
2604
|
+
(F) => F.type === "seq" || F.children && F.children.some((M) => M.type === "seq")
|
|
2569
2605
|
))
|
|
2570
|
-
u.columns = u.columns.filter((
|
|
2606
|
+
u.columns = u.columns.filter((F) => F.type === "seq" ? !1 : F.children ? (F.children = F.children.filter((M) => M.type !== "seq"), F.children.length > 0) : !0);
|
|
2571
2607
|
else {
|
|
2572
|
-
let
|
|
2573
|
-
const
|
|
2608
|
+
let F = u.columns.find((I) => ["left", "right"].includes(I.fixed));
|
|
2609
|
+
const M = {
|
|
2574
2610
|
slots: {},
|
|
2575
2611
|
params: {},
|
|
2576
2612
|
type: "seq",
|
|
2577
2613
|
title: "序号",
|
|
2578
2614
|
align: "center",
|
|
2579
2615
|
width: 50,
|
|
2580
|
-
fixed:
|
|
2616
|
+
fixed: F || void 0
|
|
2581
2617
|
};
|
|
2582
|
-
u.columns.unshift(
|
|
2618
|
+
u.columns.unshift(M);
|
|
2583
2619
|
}
|
|
2584
|
-
if (
|
|
2585
|
-
const
|
|
2586
|
-
let A = Number(
|
|
2620
|
+
if (n.config.AutoFullWidth) {
|
|
2621
|
+
const F = X(n.config.columns || []).filter((z) => !z.children), M = F.reduce((z, W) => {
|
|
2622
|
+
let A = Number(W.width);
|
|
2587
2623
|
return z + (isNaN(A) ? 100 : A);
|
|
2588
2624
|
}, 0), I = (z = 0) => {
|
|
2589
2625
|
if (z > 50) return;
|
|
2590
|
-
if (!
|
|
2626
|
+
if (!r.value) {
|
|
2591
2627
|
setTimeout(() => I(++z), 0);
|
|
2592
2628
|
return;
|
|
2593
2629
|
}
|
|
2594
|
-
const
|
|
2595
|
-
|
|
2596
|
-
let
|
|
2597
|
-
A.width = Number(((isNaN(
|
|
2630
|
+
const W = r.value.$el.clientWidth;
|
|
2631
|
+
M !== W && F.forEach((A) => {
|
|
2632
|
+
let K = Number(A.width);
|
|
2633
|
+
A.width = Number(((isNaN(K) ? 100 : K) * (W / M)).toFixed(0));
|
|
2598
2634
|
});
|
|
2599
2635
|
};
|
|
2600
2636
|
I();
|
|
@@ -2603,16 +2639,16 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2603
2639
|
keepSource: !0,
|
|
2604
2640
|
showOverflow: "title",
|
|
2605
2641
|
seqConfig: {
|
|
2606
|
-
seqMethod: (
|
|
2642
|
+
seqMethod: (R) => ne.value + R.$rowIndex + 1
|
|
2607
2643
|
},
|
|
2608
2644
|
exportConfig: {},
|
|
2609
2645
|
importConfig: {},
|
|
2610
2646
|
printConfig: {},
|
|
2611
2647
|
columns: [],
|
|
2612
|
-
...
|
|
2648
|
+
...n.config,
|
|
2613
2649
|
// data: [...props.data], //不需要开启,目前是通过异步加载数据,开启会导致数据被当前配置覆盖
|
|
2614
2650
|
// ✅ 关键:开启“单元格选中”,才会出现 col--selected / col--current 等 class
|
|
2615
|
-
mouseConfig:
|
|
2651
|
+
mouseConfig: n.dblEditEnabled ? { selected: !0 } : (C = n.config) == null ? void 0 : C.mouseConfig,
|
|
2616
2652
|
// ✅ 开单元格高亮(不同版本字段名可能是 highlightCell)
|
|
2617
2653
|
highlightCell: !0,
|
|
2618
2654
|
highlightCurrentRow: !0,
|
|
@@ -2624,18 +2660,18 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2624
2660
|
// 只对 keep-source 开启有效,是否显示单元格新增与修改状态
|
|
2625
2661
|
showIcon: !1,
|
|
2626
2662
|
// 因为对过滤行进行了修改 该属性必须为false
|
|
2627
|
-
...(g =
|
|
2663
|
+
...(g = n.config) == null ? void 0 : g.editConfig,
|
|
2628
2664
|
// ⭐ 最终由父组件 dblEditEnabled 决定
|
|
2629
|
-
trigger:
|
|
2665
|
+
trigger: n.dblEditEnabled ? "dblclick" : ((V = (h = n.config) == null ? void 0 : h.editConfig) == null ? void 0 : V.trigger) || "click"
|
|
2630
2666
|
},
|
|
2631
2667
|
showFooter: u["Total-Row"],
|
|
2632
2668
|
// 启用表尾统计
|
|
2633
2669
|
// showFooter: true, // 启用统计行
|
|
2634
|
-
footerMethod({ columns:
|
|
2635
|
-
var
|
|
2636
|
-
if (!(!u["Total-Field"] || !((
|
|
2670
|
+
footerMethod({ columns: R, data: F }) {
|
|
2671
|
+
var M;
|
|
2672
|
+
if (!(!u["Total-Field"] || !((M = u["Total-Field"]) != null && M.length)))
|
|
2637
2673
|
return [
|
|
2638
|
-
|
|
2674
|
+
R.map((I, z) => z == 0 || (typeof u["Total-Field"] == "string" ? I.field === u["Total-Field"] : Array.isArray(u["Total-Field"]) && u["Total-Field"].includes(I.field)) ? z === 0 ? "合计" : u["Total-Field"].includes(I.field) ? ee(F, I.field).toLocaleString("zh-CN") : "" : void 0)
|
|
2639
2675
|
];
|
|
2640
2676
|
}
|
|
2641
2677
|
};
|
|
@@ -2649,111 +2685,111 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2649
2685
|
}
|
|
2650
2686
|
}), y;
|
|
2651
2687
|
}), G = ref(!1);
|
|
2652
|
-
let
|
|
2653
|
-
function
|
|
2654
|
-
const
|
|
2655
|
-
if (!
|
|
2656
|
-
const g =
|
|
2688
|
+
let U = null;
|
|
2689
|
+
function oe(y) {
|
|
2690
|
+
const C = y.clipboardData;
|
|
2691
|
+
if (!C) return null;
|
|
2692
|
+
const g = C.getData("text/html");
|
|
2657
2693
|
if (g && /<table/i.test(g)) {
|
|
2658
|
-
const
|
|
2659
|
-
if (
|
|
2660
|
-
return Array.from(
|
|
2694
|
+
const M = new DOMParser().parseFromString(g, "text/html").querySelector("table");
|
|
2695
|
+
if (M)
|
|
2696
|
+
return Array.from(M.querySelectorAll("tr")).map((z) => Array.from(z.querySelectorAll("th,td")).map((A) => (Array.from(A.querySelectorAll("br")).forEach((K) => K.replaceWith(`
|
|
2661
2697
|
`)), (A.textContent || "").replace(/\u00A0/g, " ").trimEnd())));
|
|
2662
2698
|
}
|
|
2663
|
-
const h =
|
|
2699
|
+
const h = C.getData("text/plain") || "";
|
|
2664
2700
|
if (!h) return null;
|
|
2665
|
-
const
|
|
2701
|
+
const R = h.replace(/\r\n/g, `
|
|
2666
2702
|
`).replace(/\r/g, `
|
|
2667
2703
|
`).split(`
|
|
2668
2704
|
`);
|
|
2669
|
-
for (;
|
|
2670
|
-
return
|
|
2705
|
+
for (; R.length && R[R.length - 1] === ""; ) R.pop();
|
|
2706
|
+
return R.map((F) => F.split(" "));
|
|
2671
2707
|
}
|
|
2672
2708
|
function ae() {
|
|
2673
|
-
|
|
2674
|
-
var g, h,
|
|
2709
|
+
U || (U = (y) => {
|
|
2710
|
+
var g, h, V;
|
|
2675
2711
|
if (!G.value) return;
|
|
2676
2712
|
y.preventDefault(), y.stopPropagation(), (g = y.stopImmediatePropagation) == null || g.call(y);
|
|
2677
|
-
const
|
|
2678
|
-
|
|
2679
|
-
}, window.addEventListener("paste",
|
|
2713
|
+
const C = oe(y);
|
|
2714
|
+
C && ((V = (h = n.gridRef) == null ? void 0 : h.onGridPaste) == null || V.call(h, C));
|
|
2715
|
+
}, window.addEventListener("paste", U, !0));
|
|
2680
2716
|
}
|
|
2681
2717
|
function Q() {
|
|
2682
|
-
|
|
2718
|
+
U && (window.removeEventListener("paste", U, !0), U = null);
|
|
2683
2719
|
}
|
|
2684
2720
|
const ie = {
|
|
2685
2721
|
//设置表头右键 存储当前列信息
|
|
2686
2722
|
headerCellMenu({ column: y }) {
|
|
2687
|
-
|
|
2723
|
+
f = y;
|
|
2688
2724
|
},
|
|
2689
2725
|
cellMenu({ row: y }) {
|
|
2690
|
-
const
|
|
2691
|
-
|
|
2726
|
+
const C = r.value;
|
|
2727
|
+
C && C.setCurrentRow(y);
|
|
2692
2728
|
},
|
|
2693
2729
|
//单击事件 设置选中行和选择单元格
|
|
2694
|
-
cellClick({ row: y, column:
|
|
2695
|
-
var h,
|
|
2696
|
-
const g =
|
|
2697
|
-
g && ((h = g.setCurrentCell) == null || h.call(g, y,
|
|
2730
|
+
cellClick({ row: y, column: C }) {
|
|
2731
|
+
var h, V;
|
|
2732
|
+
const g = r.value;
|
|
2733
|
+
g && ((h = g.setCurrentCell) == null || h.call(g, y, C.field), g.currentCell = C, (V = g.setCurrentRow) == null || V.call(g, y));
|
|
2698
2734
|
},
|
|
2699
2735
|
//双击事件 设置选中行和选择单元格
|
|
2700
|
-
cellDblclick({ row: y, column:
|
|
2701
|
-
var h,
|
|
2702
|
-
const g =
|
|
2703
|
-
g && ((h = g.setCurrentCell) == null || h.call(g, y,
|
|
2736
|
+
cellDblclick({ row: y, column: C }) {
|
|
2737
|
+
var h, V;
|
|
2738
|
+
const g = r.value;
|
|
2739
|
+
g && ((h = g.setCurrentCell) == null || h.call(g, y, C.field), (V = g.setCurrentRow) == null || V.call(g, y));
|
|
2704
2740
|
},
|
|
2705
2741
|
async menuClick({ menu: y }) {
|
|
2706
|
-
const
|
|
2707
|
-
if (
|
|
2742
|
+
const C = r.value;
|
|
2743
|
+
if (C)
|
|
2708
2744
|
switch (y.code) {
|
|
2709
2745
|
case "reload":
|
|
2710
2746
|
const g = layer.load(2, { shade: [0.5, "#fff"] });
|
|
2711
|
-
|
|
2747
|
+
n.gridRef.echoData(), layer.close(g);
|
|
2712
2748
|
break;
|
|
2713
2749
|
case "Print":
|
|
2714
|
-
|
|
2715
|
-
columns:
|
|
2716
|
-
pageHeader: [{ text:
|
|
2750
|
+
C.print({
|
|
2751
|
+
columns: C.getColumns().filter((R) => R.type !== "action" && R.type !== "checkbox"),
|
|
2752
|
+
pageHeader: [{ text: n.config.PageName, align: "center" }],
|
|
2717
2753
|
// 目前无效
|
|
2718
2754
|
pageFooter: [{ text: "第 {pageNum} 页 共 {totalPage} 页", align: "center" }]
|
|
2719
2755
|
//目前无效
|
|
2720
2756
|
});
|
|
2721
2757
|
break;
|
|
2722
2758
|
case "exportCurrent":
|
|
2723
|
-
let h = (
|
|
2724
|
-
h = h.map((
|
|
2725
|
-
const { children:
|
|
2726
|
-
return
|
|
2727
|
-
}),
|
|
2759
|
+
let h = (C == null ? void 0 : C.getTableData().tableData) || [];
|
|
2760
|
+
h = h.map((R) => {
|
|
2761
|
+
const { children: F, ...M } = R;
|
|
2762
|
+
return M;
|
|
2763
|
+
}), C.exportData({
|
|
2728
2764
|
type: "csv",
|
|
2729
2765
|
isHeader: !0,
|
|
2730
2766
|
isFooter: !1,
|
|
2731
|
-
columns:
|
|
2767
|
+
columns: C.getColumns().filter((R) => R.type !== "action" && R.type !== "checkbox"),
|
|
2732
2768
|
// 过滤出不需要导出的列
|
|
2733
|
-
filename: `${
|
|
2769
|
+
filename: `${n.config.PageName}(${H_getISODate(/* @__PURE__ */ new Date())})`,
|
|
2734
2770
|
// 文件名
|
|
2735
2771
|
data: h
|
|
2736
2772
|
// 当前页数据
|
|
2737
2773
|
});
|
|
2738
2774
|
break;
|
|
2739
2775
|
case "exportAll":
|
|
2740
|
-
let
|
|
2741
|
-
|
|
2776
|
+
let V = await n.gridRef.handleExport();
|
|
2777
|
+
C.exportData({
|
|
2742
2778
|
type: "csv",
|
|
2743
2779
|
isHeader: !0,
|
|
2744
2780
|
isFooter: !0,
|
|
2745
|
-
columns:
|
|
2781
|
+
columns: C.getColumns().filter((R) => R.type !== "action" && R.type !== "checkbox" && R.type !== "seq"),
|
|
2746
2782
|
// 过滤出不需要导出的列
|
|
2747
|
-
filename: `${
|
|
2783
|
+
filename: `${n.config.PageName == "" ? "导出" : n.config.PageName}(${H_getISODate(/* @__PURE__ */ new Date())})`,
|
|
2748
2784
|
// 文件名
|
|
2749
|
-
data:
|
|
2785
|
+
data: V
|
|
2750
2786
|
});
|
|
2751
2787
|
break;
|
|
2752
2788
|
case "OpenCopy":
|
|
2753
|
-
|
|
2789
|
+
n.gridRef.openCopy(), G.value = !0, ae();
|
|
2754
2790
|
break;
|
|
2755
2791
|
case "CloseCopy":
|
|
2756
|
-
|
|
2792
|
+
n.gridRef.closeCopy(), G.value = !1, Q();
|
|
2757
2793
|
break;
|
|
2758
2794
|
case "colFixPanel":
|
|
2759
2795
|
l();
|
|
@@ -2762,10 +2798,10 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2762
2798
|
i();
|
|
2763
2799
|
break;
|
|
2764
2800
|
case "freezeLeftTo":
|
|
2765
|
-
m(
|
|
2801
|
+
m(f);
|
|
2766
2802
|
break;
|
|
2767
2803
|
case "freezeRightTo":
|
|
2768
|
-
|
|
2804
|
+
d(f);
|
|
2769
2805
|
break;
|
|
2770
2806
|
}
|
|
2771
2807
|
}
|
|
@@ -2791,8 +2827,8 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2791
2827
|
function pe(...y) {
|
|
2792
2828
|
a("FileClick", ...y);
|
|
2793
2829
|
}
|
|
2794
|
-
function ge(y,
|
|
2795
|
-
y.column =
|
|
2830
|
+
function ge(y, C, g) {
|
|
2831
|
+
y.column = C, y.row = g, a("tableSelectRemote", y);
|
|
2796
2832
|
}
|
|
2797
2833
|
function _e(...y) {
|
|
2798
2834
|
a("tableSelectChange", ...y);
|
|
@@ -2809,75 +2845,75 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2809
2845
|
function ye(...y) {
|
|
2810
2846
|
a("CheckboxChange", ...y);
|
|
2811
2847
|
}
|
|
2812
|
-
function X(y,
|
|
2848
|
+
function X(y, C = "children", g = []) {
|
|
2813
2849
|
return y.forEach((h) => {
|
|
2814
|
-
g.push(h), h[
|
|
2850
|
+
g.push(h), h[C] && h[C].length > 0 && X(h[C], C, g);
|
|
2815
2851
|
}), g;
|
|
2816
2852
|
}
|
|
2817
2853
|
const ke = ({ menu: y }) => {
|
|
2818
|
-
var
|
|
2819
|
-
y.type == "print" ? (
|
|
2854
|
+
var C, g;
|
|
2855
|
+
y.type == "print" ? (C = r.value) == null || C.openPrint() : y.type == "export" && ((g = r.value) == null || g.openExport());
|
|
2820
2856
|
}, we = (y) => {
|
|
2821
2857
|
_.value = !0;
|
|
2822
|
-
let
|
|
2823
|
-
u.columns.splice((y._index.newIndex || 1) - 1, 0,
|
|
2858
|
+
let C = u.columns.splice(y._index.oldIndex, 1)[0];
|
|
2859
|
+
u.columns.splice((y._index.newIndex || 1) - 1, 0, C);
|
|
2824
2860
|
};
|
|
2825
2861
|
function Z(y) {
|
|
2826
|
-
const
|
|
2827
|
-
if (!
|
|
2828
|
-
const g =
|
|
2862
|
+
const C = y.target.closest("tr.vxe-body--row");
|
|
2863
|
+
if (!C || !(r != null && r.value)) return;
|
|
2864
|
+
const g = C.getAttribute("rowid");
|
|
2829
2865
|
if (!g) return;
|
|
2830
|
-
const h =
|
|
2831
|
-
h &&
|
|
2866
|
+
const h = r.value.getRowById(g);
|
|
2867
|
+
h && r.value.setCurrentRow(h);
|
|
2832
2868
|
}
|
|
2833
|
-
function ee(y,
|
|
2869
|
+
function ee(y, C) {
|
|
2834
2870
|
if (!(y instanceof Array)) return 0;
|
|
2835
|
-
function g(h,
|
|
2836
|
-
let
|
|
2837
|
-
function
|
|
2871
|
+
function g(h, V) {
|
|
2872
|
+
let R = 0;
|
|
2873
|
+
function F(M) {
|
|
2838
2874
|
var I;
|
|
2839
|
-
if (((I =
|
|
2840
|
-
for (const z of
|
|
2841
|
-
|
|
2875
|
+
if (((I = M.children) == null ? void 0 : I.length) > 0)
|
|
2876
|
+
for (const z of M.children)
|
|
2877
|
+
F(z);
|
|
2842
2878
|
else
|
|
2843
|
-
|
|
2879
|
+
R = H_calculate(`${R}+${M[V] || 0}`);
|
|
2844
2880
|
}
|
|
2845
|
-
return
|
|
2881
|
+
return F(h), R;
|
|
2846
2882
|
}
|
|
2847
|
-
return y.reduce((h,
|
|
2848
|
-
var
|
|
2849
|
-
if (!(
|
|
2850
|
-
return H_calculate(`${h}+${Number(
|
|
2851
|
-
if (((
|
|
2852
|
-
return H_calculate(`${h}+${Number(
|
|
2853
|
-
if (((
|
|
2854
|
-
let
|
|
2855
|
-
return H_calculate(`${h}+${
|
|
2883
|
+
return y.reduce((h, V) => {
|
|
2884
|
+
var R, F;
|
|
2885
|
+
if (!(V != null && V.children))
|
|
2886
|
+
return H_calculate(`${h}+${Number(V[C]) || 0}`);
|
|
2887
|
+
if (((R = V.children) == null ? void 0 : R.length) === 0 && (V.ParentOID === "00000000-0000-0000-0000-000000000000" || V.ParentOID === null))
|
|
2888
|
+
return H_calculate(`${h}+${Number(V[C]) || 0}`);
|
|
2889
|
+
if (((F = V.children) == null ? void 0 : F.length) > 0 && (V.ParentOID === "00000000-0000-0000-0000-000000000000" || V.ParentOID === null)) {
|
|
2890
|
+
let M = g(V, C);
|
|
2891
|
+
return H_calculate(`${h}+${M}`);
|
|
2856
2892
|
}
|
|
2857
2893
|
return h;
|
|
2858
2894
|
}, 0);
|
|
2859
2895
|
}
|
|
2860
2896
|
return watch(
|
|
2861
|
-
() =>
|
|
2897
|
+
() => n.dblEditEnabled,
|
|
2862
2898
|
async (y) => {
|
|
2863
|
-
var
|
|
2899
|
+
var C, g, h;
|
|
2864
2900
|
if (!y) {
|
|
2865
2901
|
await nextTick();
|
|
2866
|
-
const
|
|
2867
|
-
if (!
|
|
2868
|
-
(
|
|
2902
|
+
const V = r.value;
|
|
2903
|
+
if (!V) return;
|
|
2904
|
+
(C = V.clearEdit) == null || C.call(V), (g = V.clearSelected) == null || g.call(V), (h = V.clearCurrentRow) == null || h.call(V);
|
|
2869
2905
|
}
|
|
2870
2906
|
},
|
|
2871
2907
|
{ immediate: !0 }
|
|
2872
2908
|
), t({
|
|
2873
|
-
gridRef:
|
|
2909
|
+
gridRef: r,
|
|
2874
2910
|
getFieldTotal: ee,
|
|
2875
2911
|
gridOptions: J
|
|
2876
|
-
}), (y,
|
|
2912
|
+
}), (y, C) => (openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
2877
2913
|
createVNode(unref(VxeGrid), mergeProps({
|
|
2878
|
-
class: ["grid-table", { "dbl-edit-on":
|
|
2914
|
+
class: ["grid-table", { "dbl-edit-on": n.dblEditEnabled }],
|
|
2879
2915
|
ref_key: "gridRef",
|
|
2880
|
-
ref:
|
|
2916
|
+
ref: r
|
|
2881
2917
|
}, { ...J.value, ...y.$attrs }, toHandlers(ie), {
|
|
2882
2918
|
onMenuClick: ke,
|
|
2883
2919
|
onColumnDragend: we,
|
|
@@ -2887,88 +2923,88 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2887
2923
|
FilterRows: withCtx(({ column: g }) => [
|
|
2888
2924
|
createVNode(_sfc_main$t, {
|
|
2889
2925
|
column: g,
|
|
2890
|
-
"grid-ref":
|
|
2926
|
+
"grid-ref": r.value,
|
|
2891
2927
|
onFilterSearch: de,
|
|
2892
2928
|
onSortChange: fe
|
|
2893
2929
|
}, null, 8, ["column", "grid-ref"])
|
|
2894
2930
|
]),
|
|
2895
2931
|
ActionRender: withCtx(({ row: g, column: h }) => [
|
|
2896
|
-
createVNode(unref(
|
|
2932
|
+
createVNode(unref(S), {
|
|
2897
2933
|
row: g,
|
|
2898
2934
|
column: h,
|
|
2899
|
-
"grid-ref":
|
|
2935
|
+
"grid-ref": r.value,
|
|
2900
2936
|
onActionClick: ue,
|
|
2901
2937
|
onActionRenderBefore: me
|
|
2902
2938
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2903
2939
|
]),
|
|
2904
2940
|
RadioRender: withCtx(({ row: g, column: h }) => [
|
|
2905
|
-
createVNode(unref(
|
|
2941
|
+
createVNode(unref(s), {
|
|
2906
2942
|
row: g,
|
|
2907
2943
|
column: h,
|
|
2908
|
-
"grid-ref":
|
|
2944
|
+
"grid-ref": r.value
|
|
2909
2945
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2910
2946
|
]),
|
|
2911
2947
|
CheckboxRender: withCtx(({ row: g, column: h }) => [
|
|
2912
|
-
createVNode(unref(
|
|
2948
|
+
createVNode(unref(w), {
|
|
2913
2949
|
row: g,
|
|
2914
2950
|
column: h,
|
|
2915
|
-
"grid-ref":
|
|
2951
|
+
"grid-ref": r.value
|
|
2916
2952
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2917
2953
|
]),
|
|
2918
2954
|
ColorPickerRender: withCtx(({ row: g, column: h }) => [
|
|
2919
2955
|
createVNode(unref(p), {
|
|
2920
2956
|
row: g,
|
|
2921
2957
|
column: h,
|
|
2922
|
-
"grid-ref":
|
|
2958
|
+
"grid-ref": r.value
|
|
2923
2959
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2924
2960
|
]),
|
|
2925
2961
|
IconPickerRender: withCtx(({ row: g, column: h }) => [
|
|
2926
|
-
createVNode(unref(
|
|
2962
|
+
createVNode(unref(c), {
|
|
2927
2963
|
row: g,
|
|
2928
2964
|
column: h,
|
|
2929
|
-
"grid-ref":
|
|
2965
|
+
"grid-ref": r.value
|
|
2930
2966
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2931
2967
|
]),
|
|
2932
2968
|
ProgressRender: withCtx(({ row: g, column: h }) => [
|
|
2933
2969
|
createVNode(unref(b), {
|
|
2934
2970
|
row: g,
|
|
2935
2971
|
column: h,
|
|
2936
|
-
"grid-ref":
|
|
2972
|
+
"grid-ref": r.value
|
|
2937
2973
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2938
2974
|
]),
|
|
2939
2975
|
SelectRender: withCtx(({ row: g, column: h }) => [
|
|
2940
|
-
createVNode(unref(
|
|
2976
|
+
createVNode(unref(x), {
|
|
2941
2977
|
row: g,
|
|
2942
2978
|
column: h,
|
|
2943
|
-
"grid-ref":
|
|
2979
|
+
"grid-ref": r.value
|
|
2944
2980
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2945
2981
|
]),
|
|
2946
2982
|
SelectMultipleRender: withCtx(({ row: g, column: h }) => [
|
|
2947
|
-
createVNode(unref(
|
|
2983
|
+
createVNode(unref(D), {
|
|
2948
2984
|
row: g,
|
|
2949
2985
|
column: h,
|
|
2950
|
-
"grid-ref":
|
|
2986
|
+
"grid-ref": r.value
|
|
2951
2987
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2952
2988
|
]),
|
|
2953
2989
|
TreeSelectRender: withCtx(({ row: g, column: h }) => [
|
|
2954
|
-
createVNode(unref(
|
|
2990
|
+
createVNode(unref(B), {
|
|
2955
2991
|
row: g,
|
|
2956
2992
|
column: h,
|
|
2957
|
-
"grid-ref":
|
|
2993
|
+
"grid-ref": r.value
|
|
2958
2994
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2959
2995
|
]),
|
|
2960
2996
|
TreeMultipleSelectRender: withCtx(({ row: g, column: h }) => [
|
|
2961
|
-
createVNode(unref(
|
|
2997
|
+
createVNode(unref(j), {
|
|
2962
2998
|
row: g,
|
|
2963
2999
|
column: h,
|
|
2964
|
-
"grid-ref":
|
|
3000
|
+
"grid-ref": r.value
|
|
2965
3001
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2966
3002
|
]),
|
|
2967
3003
|
ChooseFrameRender: withCtx(({ row: g, column: h }) => [
|
|
2968
|
-
createVNode(unref(
|
|
3004
|
+
createVNode(unref(Y), {
|
|
2969
3005
|
row: g,
|
|
2970
3006
|
column: h,
|
|
2971
|
-
"grid-ref":
|
|
3007
|
+
"grid-ref": n.gridRef,
|
|
2972
3008
|
onOnChooseBeforClick: ve
|
|
2973
3009
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2974
3010
|
]),
|
|
@@ -2976,15 +3012,15 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2976
3012
|
createVNode(unref($), {
|
|
2977
3013
|
row: g,
|
|
2978
3014
|
column: h,
|
|
2979
|
-
"grid-ref":
|
|
3015
|
+
"grid-ref": r.value,
|
|
2980
3016
|
onChange: be
|
|
2981
3017
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2982
3018
|
]),
|
|
2983
3019
|
FileRender: withCtx(({ row: g, column: h }) => [
|
|
2984
|
-
createVNode(unref(
|
|
3020
|
+
createVNode(unref(q), {
|
|
2985
3021
|
row: g,
|
|
2986
3022
|
column: h,
|
|
2987
|
-
"grid-ref":
|
|
3023
|
+
"grid-ref": r.value,
|
|
2988
3024
|
onFileClick: pe
|
|
2989
3025
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2990
3026
|
]),
|
|
@@ -2992,84 +3028,84 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
2992
3028
|
createVNode(unref(v), {
|
|
2993
3029
|
row: g,
|
|
2994
3030
|
column: h,
|
|
2995
|
-
"grid-ref":
|
|
3031
|
+
"grid-ref": r.value
|
|
2996
3032
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
2997
3033
|
]),
|
|
2998
3034
|
DatePickerRender: withCtx(({ row: g, column: h }) => [
|
|
2999
|
-
createVNode(unref(
|
|
3035
|
+
createVNode(unref(k), {
|
|
3000
3036
|
row: g,
|
|
3001
3037
|
column: h,
|
|
3002
|
-
"grid-ref":
|
|
3038
|
+
"grid-ref": r.value
|
|
3003
3039
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3004
3040
|
]),
|
|
3005
3041
|
LabelRender: withCtx(({ row: g, column: h }) => [
|
|
3006
|
-
createVNode(unref(
|
|
3042
|
+
createVNode(unref(E), {
|
|
3007
3043
|
row: g,
|
|
3008
3044
|
column: h,
|
|
3009
|
-
"grid-ref":
|
|
3045
|
+
"grid-ref": r.value
|
|
3010
3046
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3011
3047
|
]),
|
|
3012
3048
|
InputEditor: withCtx(({ row: g, column: h }) => [
|
|
3013
|
-
createVNode(unref(
|
|
3049
|
+
createVNode(unref(O), {
|
|
3014
3050
|
row: g,
|
|
3015
3051
|
column: h,
|
|
3016
|
-
"grid-ref":
|
|
3052
|
+
"grid-ref": r.value
|
|
3017
3053
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3018
3054
|
]),
|
|
3019
3055
|
TextareaEditor: withCtx(({ row: g, column: h }) => [
|
|
3020
|
-
createVNode(unref(
|
|
3056
|
+
createVNode(unref(N), {
|
|
3021
3057
|
row: g,
|
|
3022
3058
|
column: h,
|
|
3023
|
-
"grid-ref":
|
|
3059
|
+
"grid-ref": r.value
|
|
3024
3060
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3025
3061
|
]),
|
|
3026
3062
|
SelectEditor: withCtx(({ row: g, column: h }) => [
|
|
3027
|
-
createVNode(unref(
|
|
3063
|
+
createVNode(unref(T), {
|
|
3028
3064
|
row: g,
|
|
3029
3065
|
column: h,
|
|
3030
|
-
"grid-ref":
|
|
3066
|
+
"grid-ref": r.value
|
|
3031
3067
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3032
3068
|
]),
|
|
3033
3069
|
SelectMultipleEditor: withCtx(({ row: g, column: h }) => [
|
|
3034
|
-
createVNode(unref(
|
|
3070
|
+
createVNode(unref(L), {
|
|
3035
3071
|
row: g,
|
|
3036
3072
|
column: h,
|
|
3037
|
-
"grid-ref":
|
|
3073
|
+
"grid-ref": r.value
|
|
3038
3074
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3039
3075
|
]),
|
|
3040
3076
|
TreeSelectEditor: withCtx(({ row: g, column: h }) => [
|
|
3041
|
-
createVNode(unref(
|
|
3077
|
+
createVNode(unref(P), {
|
|
3042
3078
|
row: g,
|
|
3043
3079
|
column: h,
|
|
3044
|
-
"grid-ref":
|
|
3080
|
+
"grid-ref": r.value
|
|
3045
3081
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3046
3082
|
]),
|
|
3047
3083
|
TreeMultipleSelectEditor: withCtx(({ row: g, column: h }) => [
|
|
3048
3084
|
createVNode(unref(te), {
|
|
3049
3085
|
row: g,
|
|
3050
3086
|
column: h,
|
|
3051
|
-
"grid-ref":
|
|
3087
|
+
"grid-ref": r.value
|
|
3052
3088
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3053
3089
|
]),
|
|
3054
3090
|
DatePickerEditor: withCtx(({ row: g, column: h }) => [
|
|
3055
3091
|
createVNode(unref(H), {
|
|
3056
3092
|
row: g,
|
|
3057
3093
|
column: h,
|
|
3058
|
-
"grid-ref":
|
|
3094
|
+
"grid-ref": r.value
|
|
3059
3095
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3060
3096
|
]),
|
|
3061
3097
|
InputNumberEditor: withCtx(({ row: g, column: h }) => [
|
|
3062
3098
|
createVNode(unref(le), {
|
|
3063
3099
|
row: g,
|
|
3064
3100
|
column: h,
|
|
3065
|
-
"grid-ref":
|
|
3101
|
+
"grid-ref": r.value
|
|
3066
3102
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3067
3103
|
]),
|
|
3068
3104
|
SelectRemoteEditor: withCtx(({ row: g, column: h }) => [
|
|
3069
|
-
createVNode(unref(
|
|
3105
|
+
createVNode(unref(re), {
|
|
3070
3106
|
row: g,
|
|
3071
3107
|
column: h,
|
|
3072
|
-
"grid-ref":
|
|
3108
|
+
"grid-ref": r.value,
|
|
3073
3109
|
onRemoteMethod: he
|
|
3074
3110
|
}, null, 8, ["row", "column", "grid-ref"])
|
|
3075
3111
|
]),
|
|
@@ -3077,17 +3113,17 @@ const _hoisted_1$2 = { class: "h-full w-full" }, _hoisted_2$2 = { style: { "padd
|
|
|
3077
3113
|
createElementVNode("div", _hoisted_2$2, [
|
|
3078
3114
|
createVNode(unref(HrTableSelect), {
|
|
3079
3115
|
modelValue: g[h.field],
|
|
3080
|
-
"onUpdate:modelValue": (
|
|
3116
|
+
"onUpdate:modelValue": (V) => g[h.field] = V,
|
|
3081
3117
|
columns: h.params.tableSelectColumns || [],
|
|
3082
|
-
onRemoteMethod: (
|
|
3083
|
-
onChange: (
|
|
3118
|
+
onRemoteMethod: (V) => ge(V, h, g),
|
|
3119
|
+
onChange: (V) => _e({ change: V, row: g, column: h }),
|
|
3084
3120
|
width: h.params.tableSelectWidth
|
|
3085
3121
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "columns", "onRemoteMethod", "onChange", "width"])
|
|
3086
3122
|
])
|
|
3087
3123
|
]),
|
|
3088
3124
|
pager: withCtx(() => [
|
|
3089
3125
|
createVNode(_sfc_main$3, {
|
|
3090
|
-
pagination:
|
|
3126
|
+
pagination: o.pagination,
|
|
3091
3127
|
gridOptions: J.value,
|
|
3092
3128
|
onPageChange: ce,
|
|
3093
3129
|
onRefresh: se
|
|
@@ -3135,31 +3171,31 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
3135
3171
|
modelModifiers: {}
|
|
3136
3172
|
}),
|
|
3137
3173
|
emits: /* @__PURE__ */ mergeModels(["change"], ["update:modelValue"]),
|
|
3138
|
-
setup(
|
|
3139
|
-
const e = useModel(
|
|
3140
|
-
return watch(() =>
|
|
3174
|
+
setup(o, { emit: t }) {
|
|
3175
|
+
const e = useModel(o, "modelValue"), n = ref(), a = t, r = (l) => l ? `${Number(l) ? l + "px" : l}` : "150px";
|
|
3176
|
+
return watch(() => o.highlight, (l) => {
|
|
3141
3177
|
var i;
|
|
3142
|
-
return (i =
|
|
3178
|
+
return (i = n.value.querySelector(`[index="${l}"]`)) == null ? void 0 : i.scrollIntoView({ block: "center", behavior: "smooth" });
|
|
3143
3179
|
}), (l, i) => (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
3144
3180
|
createElementVNode("table", null, [
|
|
3145
3181
|
createElementVNode("thead", null, [
|
|
3146
3182
|
createElementVNode("tr", null, [
|
|
3147
3183
|
i[0] || (i[0] = createElementVNode("th", { class: "w[50px]" }, "序号", -1)),
|
|
3148
3184
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (m) => (openBlock(), createElementBlock("th", {
|
|
3149
|
-
style: normalizeStyle({ width:
|
|
3185
|
+
style: normalizeStyle({ width: r(m.width) })
|
|
3150
3186
|
}, toDisplayString(m.title), 5))), 256))
|
|
3151
3187
|
])
|
|
3152
3188
|
]),
|
|
3153
3189
|
createElementVNode("tbody", {
|
|
3154
3190
|
ref_key: "tbody",
|
|
3155
|
-
ref:
|
|
3191
|
+
ref: n
|
|
3156
3192
|
}, [
|
|
3157
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.value, (m,
|
|
3158
|
-
class: normalizeClass({ zebra:
|
|
3193
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.value, (m, d) => (openBlock(), createElementBlock("tr", {
|
|
3194
|
+
class: normalizeClass({ zebra: d % 2 != 0, highlight: l.highlight === d }),
|
|
3159
3195
|
onClick: (u) => a("change", m),
|
|
3160
|
-
index:
|
|
3196
|
+
index: d
|
|
3161
3197
|
}, [
|
|
3162
|
-
createElementVNode("td", _hoisted_3, toDisplayString(
|
|
3198
|
+
createElementVNode("td", _hoisted_3, toDisplayString(d + 1), 1),
|
|
3163
3199
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.columns, (u) => (openBlock(), createElementBlock("td", null, toDisplayString(m[u.field]), 1))), 256))
|
|
3164
3200
|
], 10, _hoisted_2$1))), 256))
|
|
3165
3201
|
], 512)
|
|
@@ -3183,61 +3219,61 @@ const HrTable = withInstall(Table), _hoisted_1$1 = { class: "remote-table" }, _h
|
|
|
3183
3219
|
modelModifiers: {}
|
|
3184
3220
|
}),
|
|
3185
3221
|
emits: /* @__PURE__ */ mergeModels(["remote-method", "change"], ["update:modelValue"]),
|
|
3186
|
-
setup(
|
|
3222
|
+
setup(o, { emit: t }) {
|
|
3187
3223
|
const e = reactive({
|
|
3188
3224
|
query: "",
|
|
3189
3225
|
tableData: [],
|
|
3190
3226
|
loading: !1
|
|
3191
|
-
}),
|
|
3192
|
-
|
|
3193
|
-
},
|
|
3194
|
-
if (!
|
|
3195
|
-
const
|
|
3196
|
-
i.y = innerHeight -
|
|
3197
|
-
const
|
|
3198
|
-
i.x = innerWidth -
|
|
3227
|
+
}), n = ref(), a = ref(), r = ref(!1), l = ref(-1), i = reactive({ x: 0, y: 0, w: 0 }), m = useModel(o, "modelValue"), d = t, u = () => d("remote-method", e), _ = () => {
|
|
3228
|
+
r.value = !0, d("remote-method", e), f();
|
|
3229
|
+
}, f = async () => {
|
|
3230
|
+
if (!r.value) return;
|
|
3231
|
+
const D = ($) => Number($) ? $ + "px" : $, j = n.value.getBoundingClientRect();
|
|
3232
|
+
i.y = innerHeight - j.y < j.y ? j.y - j.height - 280 : j.y + j.height + 5, i.w = o.width ? D(o.width) : j.width < 300 ? "300px" : j.width + "px", await nextTick();
|
|
3233
|
+
const Y = a.value.$el.offsetWidth;
|
|
3234
|
+
i.x = innerWidth - j.x > Y ? j.x : j.x + j.width - Y;
|
|
3199
3235
|
};
|
|
3200
|
-
let
|
|
3201
|
-
const p = () =>
|
|
3202
|
-
|
|
3203
|
-
},
|
|
3236
|
+
let w = !0;
|
|
3237
|
+
const p = () => w && (r.value = !1), c = () => (w = !1, setTimeout(() => w = !0, 16)), s = () => w && n.value.focus(), b = (D) => {
|
|
3238
|
+
c(), d("change", D), r.value = !1;
|
|
3239
|
+
}, S = () => l.value !== -1 && l.value--, x = () => l.value < e.tableData.length && l.value++, B = () => {
|
|
3204
3240
|
if (l.value == -1) return;
|
|
3205
|
-
const
|
|
3206
|
-
|
|
3241
|
+
const D = e.tableData[l.value];
|
|
3242
|
+
d("change", D), n.value.blur();
|
|
3207
3243
|
};
|
|
3208
|
-
return watch(() => e.query, (
|
|
3209
|
-
|
|
3210
|
-
}), watch(() => m.value, (
|
|
3211
|
-
|
|
3244
|
+
return watch(() => e.query, (D) => {
|
|
3245
|
+
D !== m.value && (m.value = D);
|
|
3246
|
+
}), watch(() => m.value, (D) => {
|
|
3247
|
+
D !== e.query && (e.query = D);
|
|
3212
3248
|
}), effect(() => {
|
|
3213
|
-
e.query,
|
|
3214
|
-
}), effect(() => !
|
|
3249
|
+
e.query, r.value, l.value = -1;
|
|
3250
|
+
}), effect(() => !r.value && (e.tableData = [])), document.addEventListener("scroll", f), (D, j) => (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
3215
3251
|
withDirectives(createElementVNode("input", {
|
|
3216
3252
|
ref_key: "input",
|
|
3217
|
-
ref:
|
|
3218
|
-
"onUpdate:modelValue":
|
|
3253
|
+
ref: n,
|
|
3254
|
+
"onUpdate:modelValue": j[0] || (j[0] = (Y) => e.query = Y),
|
|
3219
3255
|
onInput: u,
|
|
3220
3256
|
onFocus: _,
|
|
3221
3257
|
onBlur: p,
|
|
3222
3258
|
onKeydown: [
|
|
3223
|
-
withKeys(
|
|
3224
|
-
withKeys(
|
|
3225
|
-
withKeys(withModifiers(
|
|
3259
|
+
withKeys(S, ["up"]),
|
|
3260
|
+
withKeys(x, ["down"]),
|
|
3261
|
+
withKeys(withModifiers(B, ["prevent"]), ["enter"])
|
|
3226
3262
|
]
|
|
3227
3263
|
}, null, 40, _hoisted_2), [
|
|
3228
3264
|
[vModelText, e.query]
|
|
3229
3265
|
]),
|
|
3230
|
-
|
|
3266
|
+
r.value ? (openBlock(), createBlock(hrTable, {
|
|
3231
3267
|
key: 0,
|
|
3232
3268
|
ref_key: "table",
|
|
3233
3269
|
ref: a,
|
|
3234
3270
|
modelValue: e.tableData,
|
|
3235
|
-
"onUpdate:modelValue":
|
|
3271
|
+
"onUpdate:modelValue": j[1] || (j[1] = (Y) => e.tableData = Y),
|
|
3236
3272
|
loading: e.loading,
|
|
3237
3273
|
highlight: l.value,
|
|
3238
|
-
columns:
|
|
3239
|
-
onMousedown:
|
|
3240
|
-
onClick:
|
|
3274
|
+
columns: D.columns,
|
|
3275
|
+
onMousedown: c,
|
|
3276
|
+
onClick: s,
|
|
3241
3277
|
onChange: b,
|
|
3242
3278
|
style: normalizeStyle({ top: i.y + "px", left: i.x + "px", width: i.w })
|
|
3243
3279
|
}, null, 8, ["modelValue", "loading", "highlight", "columns", "style"])) : createCommentVNode("", !0)
|