z-ui-pc 1.0.2 → 1.0.4
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/index.css +1 -1
- package/dist/index.d.ts +30 -0
- package/dist/index.js +798 -773
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref as T, defineComponent as X, resolveComponent as S, createBlock as R, openBlock as g, unref as
|
|
2
|
-
import N, { isNumber as Mt, cloneDeep as fe, isUndefined as Oe, isEqual as oo, omit as Pt, merge as
|
|
1
|
+
import { ref as T, defineComponent as X, resolveComponent as S, createBlock as R, openBlock as g, unref as i, createSlots as Ct, withCtx as B, createElementVNode as M, normalizeStyle as ht, toDisplayString as q, useCssVars as Te, computed as G, createElementBlock as _, renderSlot as pe, createTextVNode as W, normalizeClass as re, createCommentVNode as z, provide as Uo, inject as Qo, resolveDynamicComponent as Jt, mergeProps as oe, toHandlers as be, watch as ot, nextTick as ne, isRef as Ae, normalizeProps as zo, guardReactiveProps as Zo, mergeModels as Ie, useModel as Ge, createVNode as E, Fragment as K, renderList as se, useSlots as $t, resolveDirective as Fe, withDirectives as de, onBeforeUnmount as xe, markRaw as Gt, watchEffect as Ue, getCurrentScope as nt, onScopeDispose as ut, withModifiers as ye, watchPostEffect as At, onActivated as Yo, onDeactivated as Xo, onMounted as Qe, onUnmounted as vt, useTemplateRef as Wo, Teleport as jo, withKeys as Ko, h as Et, isVNode as qo, Transition as eo, getCurrentInstance as to, defineAsyncComponent as Jo, render as xt } from "vue";
|
|
2
|
+
import N, { isNumber as Mt, cloneDeep as fe, isUndefined as Oe, isEqual as oo, omit as Pt, merge as Ve, mergeWith as $o, isObject as Ke, isString as no, isFunction as uo, sortBy as en, debounce as tn, isNull as Rt } from "lodash";
|
|
3
3
|
import ve from "dayjs";
|
|
4
|
-
import { CircleClose as ao, Search as so, Close as
|
|
4
|
+
import { CircleClose as ao, Search as so, Close as dt, EditPen as lo, CloseBold as yt, Plus as ro, Loading as on, ArrowDownBold as nn, ArrowUp as un, ArrowDown as an, Delete as sn, CircleCloseFilled as ln, QuestionFilled as Nt } from "@element-plus/icons-vue";
|
|
5
5
|
import { ElAnchor as rn, ElMessage as Bt, ElMessageBox as bt, ElLoading as cn, ElInput as dn } from "element-plus";
|
|
6
6
|
import { VueDraggable as qe } from "vue-draggable-plus";
|
|
7
7
|
import Dn from "mitt";
|
|
@@ -38,24 +38,24 @@ const mn = (e, t) => (o) => {
|
|
|
38
38
|
return (o, n) => {
|
|
39
39
|
const u = S("el-tooltip");
|
|
40
40
|
return g(), R(u, {
|
|
41
|
-
visible:
|
|
42
|
-
"onUpdate:visible": n[0] || (n[0] = (a) =>
|
|
43
|
-
effect:
|
|
44
|
-
placement:
|
|
41
|
+
visible: i(J).visible,
|
|
42
|
+
"onUpdate:visible": n[0] || (n[0] = (a) => i(J).visible = a),
|
|
43
|
+
effect: i(J).effect,
|
|
44
|
+
placement: i(J).placement,
|
|
45
45
|
trigger: "hover",
|
|
46
46
|
"virtual-triggering": "",
|
|
47
47
|
"virtual-ref": t.value,
|
|
48
48
|
"popper-class": "auto-tooltip",
|
|
49
|
-
"raw-content":
|
|
50
|
-
content:
|
|
51
|
-
enterable:
|
|
52
|
-
},
|
|
53
|
-
|
|
49
|
+
"raw-content": i(J).rawContent,
|
|
50
|
+
content: i(J).rawContent ? i(J).content : void 0,
|
|
51
|
+
enterable: i(J).enterable
|
|
52
|
+
}, Ct({ _: 2 }, [
|
|
53
|
+
i(J).rawContent ? void 0 : {
|
|
54
54
|
name: "content",
|
|
55
55
|
fn: B(() => [
|
|
56
|
-
|
|
57
|
-
style:
|
|
58
|
-
}, q(
|
|
56
|
+
M("div", {
|
|
57
|
+
style: ht({ maxWidth: i(J).tipWidth || void 0, wordBreak: "break-all" })
|
|
58
|
+
}, q(i(J).content), 5)
|
|
59
59
|
]),
|
|
60
60
|
key: "0"
|
|
61
61
|
}
|
|
@@ -123,7 +123,7 @@ const mn = (e, t) => (o) => {
|
|
|
123
123
|
}));
|
|
124
124
|
const t = G(() => Mt(e.mb) ? `${e.mb}px` : e.mb), o = G(() => Mt(e.mt) ? `${e.mt}px` : e.mt);
|
|
125
125
|
return (n, u) => (g(), _("div", An, [
|
|
126
|
-
|
|
126
|
+
M("div", {
|
|
127
127
|
class: re([
|
|
128
128
|
"classify-title",
|
|
129
129
|
{
|
|
@@ -172,7 +172,7 @@ const mn = (e, t) => (o) => {
|
|
|
172
172
|
e.value = o;
|
|
173
173
|
}
|
|
174
174
|
};
|
|
175
|
-
},
|
|
175
|
+
}, Me = () => i(Qo(Do));
|
|
176
176
|
var ee = /* @__PURE__ */ ((e) => (e.INPUT = "el-input", e.SELECT = "base-select", e.DATE = "el-date-picker", e.DATE_RANGE = "date-range", e.SWITCH = "el-switch", e.RADIO = "base-radio", e.GROUP_SELECT_INPUT = "group-select-input", e.SEARCH_INPUT = "base-search-input", e.CASCADER = "el-cascader", e.NUMBER_RANGE = "number-range", e.DATE_RANGE_AND_SELECT_GROUP = "date-range-and-select-group", e.NUMBER_INPUT = "number-input", e))(ee || {}), ie = /* @__PURE__ */ ((e) => (e.CHANGE = "change", e.OPEN_CONFIG_DIALOG = "openConfigDialog", e.COLUMNS_LOADED = "columnsLoaded", e.SAVE_CONFIG = "saveConfig", e.UPDATE_ACTIVE_GROUP = "updateActiveGroup", e))(ie || {});
|
|
177
177
|
const kn = {
|
|
178
178
|
key: 0,
|
|
@@ -184,36 +184,36 @@ const kn = {
|
|
|
184
184
|
disabled: { type: Boolean, default: !1 }
|
|
185
185
|
},
|
|
186
186
|
setup(e) {
|
|
187
|
-
const t =
|
|
188
|
-
t.updateFormData(e.prop, fe(
|
|
187
|
+
const t = Me(), o = G(() => t.formItems.find((r) => r.prop === e.prop)), n = (r) => {
|
|
188
|
+
t.updateFormData(e.prop, fe(r));
|
|
189
189
|
}, u = () => o.value?.parseColumnEvent(() => {
|
|
190
190
|
t.emit(ie.CHANGE);
|
|
191
191
|
}) ?? {}, a = G({
|
|
192
192
|
get() {
|
|
193
193
|
return t.activeGroupColumnsMap.get(o.value?.prop)?.dynamicExpression;
|
|
194
194
|
},
|
|
195
|
-
set(
|
|
195
|
+
set(r) {
|
|
196
196
|
const l = t.activeGroupColumnsMap.get(o.value?.prop);
|
|
197
|
-
l && (l.dynamicExpression =
|
|
197
|
+
l && (l.dynamicExpression = r);
|
|
198
198
|
}
|
|
199
199
|
}), s = G(() => {
|
|
200
|
-
const
|
|
200
|
+
const r = o.value?.attrs ?? {};
|
|
201
201
|
return e.disabled ? {
|
|
202
|
-
...
|
|
202
|
+
...r,
|
|
203
203
|
disabled: !0
|
|
204
|
-
} :
|
|
204
|
+
} : r;
|
|
205
205
|
});
|
|
206
|
-
return (
|
|
206
|
+
return (r, l) => o.value ? (g(), _("div", kn, [
|
|
207
207
|
(g(), R(Jt(o.value.getFormComponent), oe(s.value, {
|
|
208
208
|
"dynamic-expression": a.value,
|
|
209
209
|
"onUpdate:dynamicExpression": l[0] || (l[0] = (p) => a.value = p),
|
|
210
|
-
"model-value":
|
|
210
|
+
"model-value": i(t).formData[r.prop]
|
|
211
211
|
}, be(u()), {
|
|
212
212
|
"onUpdate:modelValue": l[1] || (l[1] = (p) => n(p))
|
|
213
213
|
}), null, 16, ["dynamic-expression", "model-value"]))
|
|
214
214
|
])) : z("", !0);
|
|
215
215
|
}
|
|
216
|
-
}), Tn = /* @__PURE__ */ te(Sn, [["__scopeId", "data-v-78cd4e80"]]), Je = "列信息",
|
|
216
|
+
}), Tn = /* @__PURE__ */ te(Sn, [["__scopeId", "data-v-78cd4e80"]]), Je = "列信息", He = "默认筛选", Gn = "自定义筛选", xn = 10;
|
|
217
217
|
function Mn(e) {
|
|
218
218
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
219
219
|
}
|
|
@@ -223,7 +223,7 @@ function Rn() {
|
|
|
223
223
|
(function(o, n) {
|
|
224
224
|
e.exports = n();
|
|
225
225
|
})(Pn, (function() {
|
|
226
|
-
var o, n, u = 1e3, a = 6e4, s = 36e5,
|
|
226
|
+
var o, n, u = 1e3, a = 6e4, s = 36e5, r = 864e5, l = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, p = 31536e6, c = 2628e6, D = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, F = { years: p, months: c, days: r, hours: s, minutes: a, seconds: u, milliseconds: 1, weeks: 6048e5 }, d = function(y) {
|
|
227
227
|
return y instanceof k;
|
|
228
228
|
}, f = function(y, w, A) {
|
|
229
229
|
return new k(y, A, w.$l);
|
|
@@ -239,11 +239,11 @@ function Rn() {
|
|
|
239
239
|
return y ? C(y) ? { negative: !0, format: "" + v(y) + w } : { negative: !1, format: "" + y + w } : { negative: !1, format: "" };
|
|
240
240
|
}, k = (function() {
|
|
241
241
|
function y(A, V, P) {
|
|
242
|
-
var
|
|
242
|
+
var O = this;
|
|
243
243
|
if (this.$d = {}, this.$l = P, A === void 0 && (this.$ms = 0, this.parseFromMilliseconds()), V) return f(A * F[m(V)], this);
|
|
244
244
|
if (typeof A == "number") return this.$ms = A, this.parseFromMilliseconds(), this;
|
|
245
245
|
if (typeof A == "object") return Object.keys(A).forEach((function(b) {
|
|
246
|
-
|
|
246
|
+
O.$d[m(b)] = A[b];
|
|
247
247
|
})), this.calMilliseconds(), this;
|
|
248
248
|
if (typeof A == "string") {
|
|
249
249
|
var Y = A.match(D);
|
|
@@ -264,20 +264,20 @@ function Rn() {
|
|
|
264
264
|
}), 0);
|
|
265
265
|
}, w.parseFromMilliseconds = function() {
|
|
266
266
|
var A = this.$ms;
|
|
267
|
-
this.$d.years = h(A / p), A %= p, this.$d.months = h(A /
|
|
267
|
+
this.$d.years = h(A / p), A %= p, this.$d.months = h(A / c), A %= c, this.$d.days = h(A / r), A %= r, this.$d.hours = h(A / s), A %= s, this.$d.minutes = h(A / a), A %= a, this.$d.seconds = h(A / u), A %= u, this.$d.milliseconds = A;
|
|
268
268
|
}, w.toISOString = function() {
|
|
269
269
|
var A = I(this.$d.years, "Y"), V = I(this.$d.months, "M"), P = +this.$d.days || 0;
|
|
270
270
|
this.$d.weeks && (P += 7 * this.$d.weeks);
|
|
271
|
-
var
|
|
271
|
+
var O = I(P, "D"), Y = I(this.$d.hours, "H"), $ = I(this.$d.minutes, "M"), b = this.$d.seconds || 0;
|
|
272
272
|
this.$d.milliseconds && (b += this.$d.milliseconds / 1e3, b = Math.round(1e3 * b) / 1e3);
|
|
273
|
-
var H = I(b, "S"), U = A.negative || V.negative ||
|
|
273
|
+
var H = I(b, "S"), U = A.negative || V.negative || O.negative || Y.negative || $.negative || H.negative, j = Y.format || $.format || H.format ? "T" : "", ue = (U ? "-" : "") + "P" + A.format + V.format + O.format + j + Y.format + $.format + H.format;
|
|
274
274
|
return ue === "P" || ue === "-P" ? "P0D" : ue;
|
|
275
275
|
}, w.toJSON = function() {
|
|
276
276
|
return this.toISOString();
|
|
277
277
|
}, w.format = function(A) {
|
|
278
278
|
var V = A || "YYYY-MM-DDTHH:mm:ss", P = { Y: this.$d.years, YY: n.s(this.$d.years, 2, "0"), YYYY: n.s(this.$d.years, 4, "0"), M: this.$d.months, MM: n.s(this.$d.months, 2, "0"), D: this.$d.days, DD: n.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: n.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: n.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: n.s(this.$d.seconds, 2, "0"), SSS: n.s(this.$d.milliseconds, 3, "0") };
|
|
279
|
-
return V.replace(l, (function(
|
|
280
|
-
return Y || String(P[
|
|
279
|
+
return V.replace(l, (function(O, Y) {
|
|
280
|
+
return Y || String(P[O]);
|
|
281
281
|
}));
|
|
282
282
|
}, w.as = function(A) {
|
|
283
283
|
return this.$ms / F[m(A)];
|
|
@@ -285,8 +285,8 @@ function Rn() {
|
|
|
285
285
|
var V = this.$ms, P = m(A);
|
|
286
286
|
return P === "milliseconds" ? V %= 1e3 : V = P === "weeks" ? h(V / F[P]) : this.$d[P], V || 0;
|
|
287
287
|
}, w.add = function(A, V, P) {
|
|
288
|
-
var
|
|
289
|
-
return
|
|
288
|
+
var O;
|
|
289
|
+
return O = V ? A * F[m(V)] : d(A) ? A.$ms : f(A, this).$ms, f(this.$ms + O * (P ? -1 : 1), this);
|
|
290
290
|
}, w.subtract = function(A, V) {
|
|
291
291
|
return this.add(A, V, !0);
|
|
292
292
|
}, w.locale = function(A) {
|
|
@@ -331,19 +331,19 @@ function Rn() {
|
|
|
331
331
|
}, w.asYears = function() {
|
|
332
332
|
return this.as("years");
|
|
333
333
|
}, y;
|
|
334
|
-
})(),
|
|
334
|
+
})(), x = function(y, w, A) {
|
|
335
335
|
return y.add(w.years() * A, "y").add(w.months() * A, "M").add(w.days() * A, "d").add(w.hours() * A, "h").add(w.minutes() * A, "m").add(w.seconds() * A, "s").add(w.milliseconds() * A, "ms");
|
|
336
336
|
};
|
|
337
337
|
return function(y, w, A) {
|
|
338
|
-
o = A, n = A().$utils(), A.duration = function(
|
|
338
|
+
o = A, n = A().$utils(), A.duration = function(O, Y) {
|
|
339
339
|
var $ = A.locale();
|
|
340
|
-
return f(
|
|
341
|
-
}, A.isDuration =
|
|
340
|
+
return f(O, { $l: $ }, Y);
|
|
341
|
+
}, A.isDuration = d;
|
|
342
342
|
var V = w.prototype.add, P = w.prototype.subtract;
|
|
343
|
-
w.prototype.add = function(
|
|
344
|
-
return
|
|
345
|
-
}, w.prototype.subtract = function(
|
|
346
|
-
return
|
|
343
|
+
w.prototype.add = function(O, Y) {
|
|
344
|
+
return d(O) ? x(this, O, 1) : V.bind(this)(O, Y);
|
|
345
|
+
}, w.prototype.subtract = function(O, Y) {
|
|
346
|
+
return d(O) ? x(this, O, -1) : P.bind(this)(O, Y);
|
|
347
347
|
};
|
|
348
348
|
};
|
|
349
349
|
}));
|
|
@@ -352,14 +352,14 @@ function Rn() {
|
|
|
352
352
|
var Nn = Rn();
|
|
353
353
|
const Vn = /* @__PURE__ */ Mn(Nn);
|
|
354
354
|
ve.extend(Vn);
|
|
355
|
-
const ze = "YYYY-MM-DD HH:mm:ss",
|
|
355
|
+
const ze = "YYYY-MM-DD HH:mm:ss", Ln = (e, t = ze) => [ve(e).startOf("day"), ve(e).endOf("day")].map((o) => o.format(t)), po = (e = ze) => Ln(void 0, e);
|
|
356
356
|
function xl(e) {
|
|
357
357
|
return ve.duration(Math.ceil(Number(e) || 0), "seconds").format("mm:ss");
|
|
358
358
|
}
|
|
359
359
|
const Ml = (e, t = "HH:mm:ss") => {
|
|
360
360
|
const o = new Date(e * 1e3), n = o.getUTCHours(), u = o.getUTCMinutes(), a = o.getUTCSeconds();
|
|
361
361
|
return t.replace("HH", n.toString().padStart(2, "0")).replace("mm", u.toString().padStart(2, "0")).replace("ss", a.toString().padStart(2, "0"));
|
|
362
|
-
}, Pl = (e, t = ze, o = "day") => [ve().subtract(e, o), ve()].map((n) => n.format(t)), ce = (e, t = ze, o = "day") => [ve().subtract(e, o).startOf("day"), ve().endOf("day")].map((n) => n.format(t).padStart(10, "0")), Rl = (e) => e.getTime() > Date.now(),
|
|
362
|
+
}, Pl = (e, t = ze, o = "day") => [ve().subtract(e, o), ve()].map((n) => n.format(t)), ce = (e, t = ze, o = "day") => [ve().subtract(e, o).startOf("day"), ve().endOf("day")].map((n) => n.format(t).padStart(10, "0")), Rl = (e) => e.getTime() > Date.now(), On = (e, t, o, n) => {
|
|
363
363
|
if (!e)
|
|
364
364
|
return e;
|
|
365
365
|
const u = ve(e).format(t || ze);
|
|
@@ -403,7 +403,7 @@ const Ml = (e, t = "HH:mm:ss") => {
|
|
|
403
403
|
n = ce(12, t, "month");
|
|
404
404
|
break;
|
|
405
405
|
}
|
|
406
|
-
return n.map((u, a) =>
|
|
406
|
+
return n.map((u, a) => On(u, t, o, a === n.length - 1));
|
|
407
407
|
},
|
|
408
408
|
GET_DATE_RANGE_SELECT_GROUP: (e, t, o, n) => (
|
|
409
409
|
// eslint-disable-next-line new-cap
|
|
@@ -434,8 +434,8 @@ const Ml = (e, t = "HH:mm:ss") => {
|
|
|
434
434
|
() => {
|
|
435
435
|
if (N.isFunction(e.options)) {
|
|
436
436
|
const s = e.options();
|
|
437
|
-
fo(s) ? (n.value = !0, s.then((
|
|
438
|
-
a(
|
|
437
|
+
fo(s) ? (n.value = !0, s.then((r) => {
|
|
438
|
+
a(r);
|
|
439
439
|
})) : a(s);
|
|
440
440
|
} else
|
|
441
441
|
a(e.options);
|
|
@@ -490,28 +490,28 @@ const Ml = (e, t = "HH:mm:ss") => {
|
|
|
490
490
|
Te((f) => ({
|
|
491
491
|
"375bdcec": F.value
|
|
492
492
|
}));
|
|
493
|
-
const o = e, n = t, { parseOptions: u, loadingOptions: a } = Ze(o), { value: s } = _e(o, n),
|
|
493
|
+
const o = e, n = t, { parseOptions: u, loadingOptions: a } = Ze(o), { value: s } = _e(o, n), r = G(() => N.omit(o.on, ["blur", "change"])), l = G(() => Be(N.omit(o, ["on", "options", "modelValue"]))), p = () => {
|
|
494
494
|
n("change", s.value);
|
|
495
495
|
};
|
|
496
|
-
let
|
|
496
|
+
let c;
|
|
497
497
|
const D = async (f) => {
|
|
498
|
-
f ?
|
|
499
|
-
}, F = G(() => o.width || "100%"),
|
|
498
|
+
f ? c = fe(s.value) : (await ne(), oo(c, s.value) || p(), c = void 0), o.on.visibleChange?.(f);
|
|
499
|
+
}, F = G(() => o.width || "100%"), d = (f, m) => {
|
|
500
500
|
const C = Reflect.get(o.on, f);
|
|
501
|
-
C && C(m), p(),
|
|
501
|
+
C && C(m), p(), c = fe(o.props.multiple ? m ?? [] : m);
|
|
502
502
|
};
|
|
503
503
|
return (f, m) => {
|
|
504
504
|
const C = S("el-cascader");
|
|
505
505
|
return g(), R(C, oe({
|
|
506
|
-
modelValue:
|
|
506
|
+
modelValue: i(s),
|
|
507
507
|
"onUpdate:modelValue": m[0] || (m[0] = (h) => Ae(s) ? s.value = h : null),
|
|
508
508
|
class: "z-cascader",
|
|
509
|
-
loading:
|
|
510
|
-
}, l.value, { options:
|
|
509
|
+
loading: i(a)
|
|
510
|
+
}, l.value, { options: i(u) }, be(r.value), {
|
|
511
511
|
onVisibleChange: D,
|
|
512
|
-
onClear: m[1] || (m[1] = (h) =>
|
|
513
|
-
onRemoveTag: m[2] || (m[2] = (h) =>
|
|
514
|
-
}),
|
|
512
|
+
onClear: m[1] || (m[1] = (h) => d("clear", h)),
|
|
513
|
+
onRemoveTag: m[2] || (m[2] = (h) => d("removeTag", h))
|
|
514
|
+
}), Ct({ _: 2 }, [
|
|
515
515
|
f.$slots.default ? {
|
|
516
516
|
name: "default",
|
|
517
517
|
fn: B(({ node: h, data: v }) => [
|
|
@@ -536,7 +536,7 @@ const Ml = (e, t = "HH:mm:ss") => {
|
|
|
536
536
|
e.value = void 0;
|
|
537
537
|
}
|
|
538
538
|
};
|
|
539
|
-
},
|
|
539
|
+
}, Dt = /* @__PURE__ */ X({
|
|
540
540
|
__name: "BaseDate",
|
|
541
541
|
props: /* @__PURE__ */ Ie({
|
|
542
542
|
on: { default: () => ({}) },
|
|
@@ -592,7 +592,7 @@ const Ml = (e, t = "HH:mm:ss") => {
|
|
|
592
592
|
}),
|
|
593
593
|
emits: /* @__PURE__ */ Ie(["update:modelValue", "change"], ["update:dynamicExpression"]),
|
|
594
594
|
setup(e, { emit: t }) {
|
|
595
|
-
const o = e, n = Ge(e, "dynamicExpression"), u = t, { value: a } = _e(o, u), { pushDynamicExpression: s, updateDynamicExpression:
|
|
595
|
+
const o = e, n = Ge(e, "dynamicExpression"), u = t, { value: a } = _e(o, u), { pushDynamicExpression: s, updateDynamicExpression: r } = Yn(n), l = G(
|
|
596
596
|
() => Be(
|
|
597
597
|
N.omit(o, [
|
|
598
598
|
"on",
|
|
@@ -607,29 +607,29 @@ const Ml = (e, t = "HH:mm:ss") => {
|
|
|
607
607
|
), p = G(() => {
|
|
608
608
|
if (o.useDefaultTimeToDay)
|
|
609
609
|
return [new Date(2e3, 1, 1, 0, 0, 0), new Date(2e3, 1, 1, 23, 59, 59)];
|
|
610
|
-
}),
|
|
611
|
-
if (!
|
|
612
|
-
return
|
|
613
|
-
const m = o.format || "", C = ve(
|
|
610
|
+
}), c = (d, f) => {
|
|
611
|
+
if (!d)
|
|
612
|
+
return d;
|
|
613
|
+
const m = o.format || "", C = ve(d).format(m);
|
|
614
614
|
return o.autoAddSeconds && m === "YYYY-MM-DD HH:mm" ? `${C}:${f ? "59" : "00"}` : C;
|
|
615
615
|
}, D = G(() => ({
|
|
616
616
|
...o.on,
|
|
617
|
-
"update:modelValue": (
|
|
618
|
-
const f =
|
|
617
|
+
"update:modelValue": (d) => {
|
|
618
|
+
const f = d ?? "";
|
|
619
619
|
if (Array.isArray(f)) {
|
|
620
620
|
const [m, C] = f;
|
|
621
|
-
u("update:modelValue", [
|
|
621
|
+
u("update:modelValue", [c(m), c(C, !0)]);
|
|
622
622
|
} else
|
|
623
|
-
u("update:modelValue",
|
|
624
|
-
|
|
623
|
+
u("update:modelValue", c(f, !0));
|
|
624
|
+
r();
|
|
625
625
|
},
|
|
626
626
|
/* clear 事件会触发 emit */
|
|
627
627
|
change: N.debounce(() => {
|
|
628
628
|
u("change", a.value);
|
|
629
629
|
})
|
|
630
630
|
})), F = G(
|
|
631
|
-
() => o.shortcuts?.map((
|
|
632
|
-
const { value: f, text: m } =
|
|
631
|
+
() => o.shortcuts?.map((d) => {
|
|
632
|
+
const { value: f, text: m } = d;
|
|
633
633
|
return {
|
|
634
634
|
text: m,
|
|
635
635
|
value: () => (s({
|
|
@@ -639,11 +639,11 @@ const Ml = (e, t = "HH:mm:ss") => {
|
|
|
639
639
|
};
|
|
640
640
|
})
|
|
641
641
|
);
|
|
642
|
-
return (
|
|
642
|
+
return (d, f) => {
|
|
643
643
|
const m = S("el-date-picker");
|
|
644
644
|
return g(), R(m, oe(l.value, {
|
|
645
645
|
"popper-class": `z-base-date-popper ${o.popperClass || ""}`,
|
|
646
|
-
"model-value":
|
|
646
|
+
"model-value": i(a),
|
|
647
647
|
"default-time": p.value,
|
|
648
648
|
shortcuts: F.value
|
|
649
649
|
}, be(D.value)), null, 16, ["popper-class", "model-value", "default-time", "shortcuts"]);
|
|
@@ -713,13 +713,13 @@ const Ml = (e, t = "HH:mm:ss") => {
|
|
|
713
713
|
}),
|
|
714
714
|
emits: /* @__PURE__ */ Ie(["update:modelValue", "change"], ["update:dynamicExpression"]),
|
|
715
715
|
setup(e, { emit: t }) {
|
|
716
|
-
const o = e, n = Ge(e, "dynamicExpression"), u = t, a = G(() => Be(N.omit(o, ["options", "on", "modelValue"]))), { value: s } = _e(o, u), { parseOptions:
|
|
717
|
-
o.defaultSelectFirst && !s.value?.length &&
|
|
716
|
+
const o = e, n = Ge(e, "dynamicExpression"), u = t, a = G(() => Be(N.omit(o, ["options", "on", "modelValue"]))), { value: s } = _e(o, u), { parseOptions: r, loadingOptions: l } = Ze(o, () => {
|
|
717
|
+
o.defaultSelectFirst && !s.value?.length && r.value.length && u("update:modelValue", ["", "", r.value[0]?.value ?? ""]);
|
|
718
718
|
}), p = () => {
|
|
719
719
|
ne().then(() => {
|
|
720
720
|
u("change", s.value);
|
|
721
721
|
});
|
|
722
|
-
},
|
|
722
|
+
}, c = G({
|
|
723
723
|
get() {
|
|
724
724
|
return o.modelValue[2];
|
|
725
725
|
},
|
|
@@ -744,7 +744,7 @@ const Ml = (e, t = "HH:mm:ss") => {
|
|
|
744
744
|
const h = fe(s.value), v = o.whenEmptyDateClearSelect && !C ? "" : s.value?.[2], k = [...C || ["", ""], v];
|
|
745
745
|
s.value = k, oo(h, k) || p();
|
|
746
746
|
}
|
|
747
|
-
}),
|
|
747
|
+
}), d = G(() => {
|
|
748
748
|
if (!o.disabledSelectByEmptyData)
|
|
749
749
|
return !1;
|
|
750
750
|
const [C, h] = o.modelValue;
|
|
@@ -771,26 +771,26 @@ const Ml = (e, t = "HH:mm:ss") => {
|
|
|
771
771
|
}
|
|
772
772
|
])
|
|
773
773
|
}, [
|
|
774
|
-
|
|
775
|
-
E(
|
|
774
|
+
M("div", Xn, [
|
|
775
|
+
E(Dt, oe({
|
|
776
776
|
"dynamic-expression": f.value,
|
|
777
777
|
"onUpdate:dynamicExpression": h[0] || (h[0] = (k) => f.value = k),
|
|
778
778
|
modelValue: F.value,
|
|
779
779
|
"onUpdate:modelValue": h[1] || (h[1] = (k) => F.value = k)
|
|
780
780
|
}, a.value), null, 16, ["dynamic-expression", "modelValue"])
|
|
781
781
|
]),
|
|
782
|
-
|
|
782
|
+
M("div", Wn, [
|
|
783
783
|
E(I, oe({
|
|
784
|
-
modelValue:
|
|
785
|
-
"onUpdate:modelValue": h[2] || (h[2] = (k) =>
|
|
784
|
+
modelValue: c.value,
|
|
785
|
+
"onUpdate:modelValue": h[2] || (h[2] = (k) => c.value = k)
|
|
786
786
|
}, m.value ?? {}, {
|
|
787
787
|
style: { width: C.selectWidth },
|
|
788
|
-
disabled:
|
|
788
|
+
disabled: d.value ?? C.disabled,
|
|
789
789
|
clearable: !1,
|
|
790
|
-
loading:
|
|
790
|
+
loading: i(l)
|
|
791
791
|
}), {
|
|
792
792
|
default: B(() => [
|
|
793
|
-
(g(!0), _(K, null, se(r
|
|
793
|
+
(g(!0), _(K, null, se(i(r), (k) => (g(), R(v, oe({
|
|
794
794
|
key: k.value
|
|
795
795
|
}, { ref_for: !0 }, k), null, 16))), 128))
|
|
796
796
|
]),
|
|
@@ -807,11 +807,11 @@ const Ml = (e, t = "HH:mm:ss") => {
|
|
|
807
807
|
const t = $t(), o = G(() => Object.keys(t));
|
|
808
808
|
return (n, u) => {
|
|
809
809
|
const a = S("el-input"), s = Fe("paste-trim");
|
|
810
|
-
return de((g(), R(a, { class: "base-input" },
|
|
811
|
-
se(o.value, (
|
|
812
|
-
name:
|
|
810
|
+
return de((g(), R(a, { class: "base-input" }, Ct({ _: 2 }, [
|
|
811
|
+
se(o.value, (r) => ({
|
|
812
|
+
name: r,
|
|
813
813
|
fn: B(() => [
|
|
814
|
-
pe(n.$slots,
|
|
814
|
+
pe(n.$slots, r)
|
|
815
815
|
])
|
|
816
816
|
}))
|
|
817
817
|
]), 1024)), [
|
|
@@ -862,35 +862,35 @@ const Ml = (e, t = "HH:mm:ss") => {
|
|
|
862
862
|
() => Be(N.omit(o, ["on", "modelValue", "precision", "max", "min"]))
|
|
863
863
|
);
|
|
864
864
|
let s = o.modelValue;
|
|
865
|
-
const
|
|
866
|
-
let
|
|
867
|
-
isNaN(Number(
|
|
865
|
+
const r = (F) => {
|
|
866
|
+
let d = F;
|
|
867
|
+
isNaN(Number(d)) && (d = s), s !== d && (s = d), u.value = s;
|
|
868
868
|
}, l = () => {
|
|
869
869
|
let F = "^\\d+$";
|
|
870
870
|
return o.precision && (F = `^\\d+(\\.)?(\\d{1,${o.precision}})?$`), new RegExp(F);
|
|
871
871
|
}, p = () => {
|
|
872
|
-
|
|
873
|
-
},
|
|
872
|
+
r(parseFloat(s)), o.on?.change?.(s), n("change", s);
|
|
873
|
+
}, c = (F) => {
|
|
874
874
|
if (typeof F != "number" && !F) {
|
|
875
|
-
|
|
875
|
+
r(F);
|
|
876
876
|
return;
|
|
877
877
|
}
|
|
878
|
-
const { min:
|
|
878
|
+
const { min: d, max: f } = o;
|
|
879
879
|
if (F && !l().test(F)) {
|
|
880
|
-
|
|
880
|
+
r(s);
|
|
881
881
|
return;
|
|
882
882
|
}
|
|
883
|
-
const m = Number(F), C = typeof
|
|
884
|
-
|
|
883
|
+
const m = Number(F), C = typeof d < "u" && m < d, h = typeof f < "u" && m > f;
|
|
884
|
+
r(h ? f : C ? d : F), o.on?.input?.(s);
|
|
885
885
|
}, D = G(() => N.omit(o.on, ["change", "input"]));
|
|
886
|
-
return (F,
|
|
886
|
+
return (F, d) => {
|
|
887
887
|
const f = S("el-input"), m = Fe("paste-trim");
|
|
888
888
|
return g(), _("div", Jn, [
|
|
889
889
|
de((g(), R(f, oe(a.value, {
|
|
890
|
-
modelValue:
|
|
891
|
-
"onUpdate:modelValue":
|
|
890
|
+
modelValue: i(u),
|
|
891
|
+
"onUpdate:modelValue": d[0] || (d[0] = (C) => Ae(u) ? u.value = C : null)
|
|
892
892
|
}, be(D.value), {
|
|
893
|
-
onInput:
|
|
893
|
+
onInput: c,
|
|
894
894
|
onChange: p
|
|
895
895
|
}), {
|
|
896
896
|
suffix: B(() => [
|
|
@@ -904,20 +904,20 @@ const Ml = (e, t = "HH:mm:ss") => {
|
|
|
904
904
|
};
|
|
905
905
|
}
|
|
906
906
|
}), eu = /* @__PURE__ */ te($n, [["__scopeId", "data-v-fd1ded59"]]);
|
|
907
|
-
let
|
|
908
|
-
const
|
|
907
|
+
let Lt = 1;
|
|
908
|
+
const Ne = [], Xe = [], _t = () => ({
|
|
909
909
|
startAsyncTask: () => {
|
|
910
|
-
const u =
|
|
911
|
-
|
|
910
|
+
const u = Lt++;
|
|
911
|
+
Ne.push(u);
|
|
912
912
|
},
|
|
913
913
|
taskComplete: async () => {
|
|
914
|
-
await ne(),
|
|
914
|
+
await ne(), Ne.pop(), Ne.length === 0 && (Xe.forEach((u) => u()), Xe.length = 0);
|
|
915
915
|
},
|
|
916
916
|
onTaskAllComplete: (u) => {
|
|
917
|
-
|
|
917
|
+
Ne.length === 0 ? u() : Xe.push(u);
|
|
918
918
|
},
|
|
919
919
|
clearAllAsyncTask: () => {
|
|
920
|
-
|
|
920
|
+
Ne.length = 0, Xe.length = 0, Lt = 1;
|
|
921
921
|
}
|
|
922
922
|
}), tu = { class: "base-number-range__container" }, ou = {
|
|
923
923
|
key: 0,
|
|
@@ -944,18 +944,18 @@ const Re = [], Xe = [], _t = () => ({
|
|
|
944
944
|
const o = e, n = t, { value: u } = _e(o, n), a = () => u.value?.map?.((v) => {
|
|
945
945
|
const I = parseFloat(String(v));
|
|
946
946
|
return isNaN(I) ? void 0 : I;
|
|
947
|
-
}) ?? [], s = G(() => N.omit(o.on, ["focus", "input", "change"])),
|
|
947
|
+
}) ?? [], s = G(() => N.omit(o.on, ["focus", "input", "change"])), r = (v) => {
|
|
948
948
|
if (Reflect.has(o.on, v)) {
|
|
949
949
|
const I = Reflect.get(o.on, v);
|
|
950
950
|
N.isFunction(I) && I(u.value);
|
|
951
951
|
}
|
|
952
952
|
}, { startAsyncTask: l, taskComplete: p } = _t();
|
|
953
|
-
let
|
|
953
|
+
let c;
|
|
954
954
|
const D = () => {
|
|
955
|
-
|
|
955
|
+
c && (clearTimeout(c), p()), c = void 0;
|
|
956
956
|
}, F = () => {
|
|
957
|
-
D(),
|
|
958
|
-
},
|
|
957
|
+
D(), r("focus");
|
|
958
|
+
}, d = () => {
|
|
959
959
|
let v = "^\\d+$";
|
|
960
960
|
return o.precision && (v = `^\\d+(\\.)?(\\d{1,${o.precision}})?$`), new RegExp(v);
|
|
961
961
|
};
|
|
@@ -967,34 +967,34 @@ const Re = [], Xe = [], _t = () => ({
|
|
|
967
967
|
f[I] = v;
|
|
968
968
|
return;
|
|
969
969
|
}
|
|
970
|
-
const { min: k, max:
|
|
971
|
-
if (v && !
|
|
970
|
+
const { min: k, max: x } = o, y = [...u.value];
|
|
971
|
+
if (v && !d().test(v)) {
|
|
972
972
|
m(f);
|
|
973
973
|
return;
|
|
974
974
|
}
|
|
975
|
-
const w = Number(v), A = typeof k < "u" && w < k, V = typeof
|
|
976
|
-
V || A ? (y.splice(I, 1, V ?
|
|
975
|
+
const w = Number(v), A = typeof k < "u" && w < k, V = typeof x < "u" && w > x;
|
|
976
|
+
V || A ? (y.splice(I, 1, V ? x : k), m(y)) : f[I] = v;
|
|
977
977
|
}, h = () => {
|
|
978
|
-
l(),
|
|
979
|
-
|
|
978
|
+
l(), c = setTimeout(() => {
|
|
979
|
+
r("change"), n("change", a()), p();
|
|
980
980
|
}, 200), m(a());
|
|
981
981
|
};
|
|
982
|
-
return
|
|
982
|
+
return xe(() => {
|
|
983
983
|
D();
|
|
984
984
|
}), (v, I) => {
|
|
985
|
-
const k = S("el-input"),
|
|
985
|
+
const k = S("el-input"), x = Fe("paste-trim");
|
|
986
986
|
return g(), _("div", tu, [
|
|
987
987
|
(g(), _(K, null, se([0, 1], (y) => (g(), _(K, { key: y }, [
|
|
988
988
|
de(E(k, oe({ ref_for: !0 }, y === 0 ? v.minProps : v.maxProps, {
|
|
989
|
-
modelValue:
|
|
990
|
-
"onUpdate:modelValue": (w) =>
|
|
989
|
+
modelValue: i(u)[y],
|
|
990
|
+
"onUpdate:modelValue": (w) => i(u)[y] = w,
|
|
991
991
|
disabled: v.disabled
|
|
992
992
|
}, be(s.value), {
|
|
993
993
|
onFocus: F,
|
|
994
994
|
onChange: h,
|
|
995
995
|
onInput: (w) => C(w, y)
|
|
996
996
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onInput"]), [
|
|
997
|
-
[
|
|
997
|
+
[x]
|
|
998
998
|
]),
|
|
999
999
|
y === 0 ? (g(), _("div", ou, "至")) : z("", !0)
|
|
1000
1000
|
], 64))), 64))
|
|
@@ -1019,16 +1019,16 @@ const Re = [], Xe = [], _t = () => ({
|
|
|
1019
1019
|
},
|
|
1020
1020
|
emits: ["update:modelValue"],
|
|
1021
1021
|
setup(e, { emit: t }) {
|
|
1022
|
-
const o = e, n = t, { parseOptions: u, loadingOptions: a } = Ze(o), { value: s } = _e(o, n),
|
|
1023
|
-
return (p,
|
|
1024
|
-
const D = S("el-radio"), F = S("el-radio-group"),
|
|
1025
|
-
return de((g(), R(F, oe(
|
|
1026
|
-
modelValue:
|
|
1027
|
-
"onUpdate:modelValue":
|
|
1022
|
+
const o = e, n = t, { parseOptions: u, loadingOptions: a } = Ze(o), { value: s } = _e(o, n), r = G(() => Be(Pt(o, ["on", "options", "modelValue"]))), l = (p) => Be(Pt(p, ["label", "leaf", "children"]));
|
|
1023
|
+
return (p, c) => {
|
|
1024
|
+
const D = S("el-radio"), F = S("el-radio-group"), d = Fe("loading");
|
|
1025
|
+
return de((g(), R(F, oe(r.value, {
|
|
1026
|
+
modelValue: i(s),
|
|
1027
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => Ae(s) ? s.value = f : null)
|
|
1028
1028
|
}), {
|
|
1029
1029
|
default: B(() => [
|
|
1030
1030
|
pe(p.$slots, "default", {}, () => [
|
|
1031
|
-
(g(!0), _(K, null, se(
|
|
1031
|
+
(g(!0), _(K, null, se(i(u), (f) => (g(), R(D, oe({
|
|
1032
1032
|
key: f.value
|
|
1033
1033
|
}, { ref_for: !0 }, l(f)), {
|
|
1034
1034
|
default: B(() => [
|
|
@@ -1040,7 +1040,7 @@ const Re = [], Xe = [], _t = () => ({
|
|
|
1040
1040
|
]),
|
|
1041
1041
|
_: 3
|
|
1042
1042
|
}, 16, ["modelValue"])), [
|
|
1043
|
-
[
|
|
1043
|
+
[d, i(a)]
|
|
1044
1044
|
]);
|
|
1045
1045
|
};
|
|
1046
1046
|
}
|
|
@@ -1082,31 +1082,31 @@ const Re = [], Xe = [], _t = () => ({
|
|
|
1082
1082
|
setup(e, { emit: t }) {
|
|
1083
1083
|
const o = e, n = t, { value: u } = _e(o, n), a = G(() => Be(N.omit(o, ["on", "modelValue"]))), s = (l) => {
|
|
1084
1084
|
n("update:modelValue", l), n("change", l);
|
|
1085
|
-
},
|
|
1085
|
+
}, r = () => {
|
|
1086
1086
|
n("update:modelValue", ""), n("change", "");
|
|
1087
1087
|
};
|
|
1088
1088
|
return (l, p) => {
|
|
1089
|
-
const
|
|
1089
|
+
const c = S("el-icon"), D = S("el-input"), F = Fe("paste-trim");
|
|
1090
1090
|
return de((g(), R(D, oe(a.value, {
|
|
1091
|
-
modelValue:
|
|
1092
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
1091
|
+
modelValue: i(u),
|
|
1092
|
+
"onUpdate:modelValue": p[0] || (p[0] = (d) => Ae(u) ? u.value = d : null),
|
|
1093
1093
|
clearable: !1,
|
|
1094
1094
|
class: "base-search-input"
|
|
1095
1095
|
}, be(o.on), { onChange: s }), {
|
|
1096
1096
|
suffix: B(() => [
|
|
1097
|
-
|
|
1098
|
-
|
|
1097
|
+
M("div", su, [
|
|
1098
|
+
i(u) ? (g(), R(c, {
|
|
1099
1099
|
key: 0,
|
|
1100
|
-
onClick:
|
|
1100
|
+
onClick: r
|
|
1101
1101
|
}, {
|
|
1102
1102
|
default: B(() => [
|
|
1103
|
-
E(
|
|
1103
|
+
E(i(ao))
|
|
1104
1104
|
]),
|
|
1105
1105
|
_: 1
|
|
1106
1106
|
})) : z("", !0),
|
|
1107
|
-
E(
|
|
1107
|
+
E(c, null, {
|
|
1108
1108
|
default: B(() => [
|
|
1109
|
-
E(
|
|
1109
|
+
E(i(so))
|
|
1110
1110
|
]),
|
|
1111
1111
|
_: 1
|
|
1112
1112
|
})
|
|
@@ -1178,18 +1178,18 @@ const Re = [], Xe = [], _t = () => ({
|
|
|
1178
1178
|
Te((p) => ({
|
|
1179
1179
|
"1471bb1c": l.value
|
|
1180
1180
|
}));
|
|
1181
|
-
const o = e, n = t, { parseOptions: u, loadingOptions: a } = Ze(o), { value: s } = _e(o, n),
|
|
1182
|
-
return (p,
|
|
1181
|
+
const o = e, n = t, { parseOptions: u, loadingOptions: a } = Ze(o), { value: s } = _e(o, n), r = G(() => Be(N.omit(o, ["on", "options", "modelValue"]))), l = G(() => o.width || "100%");
|
|
1182
|
+
return (p, c) => {
|
|
1183
1183
|
const D = S("el-option"), F = S("el-select");
|
|
1184
|
-
return g(), R(F, oe(
|
|
1185
|
-
modelValue:
|
|
1186
|
-
"onUpdate:modelValue":
|
|
1187
|
-
loading:
|
|
1184
|
+
return g(), R(F, oe(r.value, {
|
|
1185
|
+
modelValue: i(s),
|
|
1186
|
+
"onUpdate:modelValue": c[0] || (c[0] = (d) => Ae(s) ? s.value = d : null),
|
|
1187
|
+
loading: i(a)
|
|
1188
1188
|
}, be(p.on)), {
|
|
1189
1189
|
default: B(() => [
|
|
1190
|
-
(g(!0), _(K, null, se(
|
|
1191
|
-
key:
|
|
1192
|
-
}, { ref_for: !0 },
|
|
1190
|
+
(g(!0), _(K, null, se(i(u), (d) => (g(), R(D, oe({
|
|
1191
|
+
key: d.value
|
|
1192
|
+
}, { ref_for: !0 }, d), null, 16))), 128))
|
|
1193
1193
|
]),
|
|
1194
1194
|
_: 1
|
|
1195
1195
|
}, 16, ["modelValue", "loading"]);
|
|
@@ -1254,21 +1254,21 @@ const Re = [], Xe = [], _t = () => ({
|
|
|
1254
1254
|
setup(e, { emit: t }) {
|
|
1255
1255
|
const o = e, n = t, { value: u } = _e(o, n), { parseOptions: a, loadingOptions: s } = Ze(o, () => {
|
|
1256
1256
|
o.defaultSelectFirst && !u.value?.length && a.value.length && n("update:modelValue", ["", a.value[0]?.value ?? ""]);
|
|
1257
|
-
}),
|
|
1257
|
+
}), r = G(() => {
|
|
1258
1258
|
const m = du(o.selectWidth, o.selectAttrs);
|
|
1259
1259
|
return Object.assign({}, m);
|
|
1260
1260
|
}), l = () => {
|
|
1261
1261
|
n("change", u.value);
|
|
1262
|
-
}, p = G(() => a.value.find((C) => C.value === u.value[1])?.placeholder ?? o.placeholder),
|
|
1262
|
+
}, p = G(() => a.value.find((C) => C.value === u.value[1])?.placeholder ?? o.placeholder), c = G(
|
|
1263
1263
|
() => a.value.find((m) => m.value === u.value[1])
|
|
1264
1264
|
), D = (m) => {
|
|
1265
1265
|
const [, C] = u.value;
|
|
1266
1266
|
let h = m;
|
|
1267
|
-
|
|
1267
|
+
c.value?.type === "id" && (h = pu(m)), n("update:modelValue", [h, C || ""]);
|
|
1268
1268
|
}, F = () => {
|
|
1269
1269
|
const m = u.value[0];
|
|
1270
1270
|
D(""), (o.changeOnSelect || m) && l();
|
|
1271
|
-
},
|
|
1271
|
+
}, d = G(
|
|
1272
1272
|
() => Be(
|
|
1273
1273
|
N.omit(o, ["modelValue", "groupSelectInputAttrs", "placeholder", "options", "className", "class"])
|
|
1274
1274
|
)
|
|
@@ -1276,7 +1276,7 @@ const Re = [], Xe = [], _t = () => ({
|
|
|
1276
1276
|
D(""), l();
|
|
1277
1277
|
};
|
|
1278
1278
|
return (m, C) => {
|
|
1279
|
-
const h = S("el-icon"), v = S("el-option"), I = S("el-select"), k = S("el-input"),
|
|
1279
|
+
const h = S("el-icon"), v = S("el-option"), I = S("el-select"), k = S("el-input"), x = Fe("paste-trim");
|
|
1280
1280
|
return de((g(), R(k, oe({
|
|
1281
1281
|
class: [
|
|
1282
1282
|
"group-select-input",
|
|
@@ -1285,28 +1285,28 @@ const Re = [], Xe = [], _t = () => ({
|
|
|
1285
1285
|
"is-reverse": m.selectToFirst
|
|
1286
1286
|
}
|
|
1287
1287
|
]
|
|
1288
|
-
},
|
|
1289
|
-
"model-value":
|
|
1288
|
+
}, d.value, {
|
|
1289
|
+
"model-value": i(u)[0],
|
|
1290
1290
|
placeholder: p.value,
|
|
1291
1291
|
clearable: !1,
|
|
1292
|
-
maxlength:
|
|
1292
|
+
maxlength: c.value?.maxlength ?? d.value.maxlength,
|
|
1293
1293
|
"onUpdate:modelValue": D,
|
|
1294
1294
|
onChange: l
|
|
1295
1295
|
}), {
|
|
1296
1296
|
suffix: B(() => [
|
|
1297
|
-
|
|
1298
|
-
|
|
1297
|
+
M("div", mu, [
|
|
1298
|
+
i(u)[0] ? (g(), R(h, {
|
|
1299
1299
|
key: 0,
|
|
1300
1300
|
onClick: f
|
|
1301
1301
|
}, {
|
|
1302
1302
|
default: B(() => [
|
|
1303
|
-
E(
|
|
1303
|
+
E(i(ao))
|
|
1304
1304
|
]),
|
|
1305
1305
|
_: 1
|
|
1306
1306
|
})) : z("", !0),
|
|
1307
1307
|
E(h, null, {
|
|
1308
1308
|
default: B(() => [
|
|
1309
|
-
E(
|
|
1309
|
+
E(i(so))
|
|
1310
1310
|
]),
|
|
1311
1311
|
_: 1
|
|
1312
1312
|
})
|
|
@@ -1314,15 +1314,15 @@ const Re = [], Xe = [], _t = () => ({
|
|
|
1314
1314
|
]),
|
|
1315
1315
|
prepend: B(() => [
|
|
1316
1316
|
E(I, oe({
|
|
1317
|
-
modelValue:
|
|
1318
|
-
"onUpdate:modelValue": C[0] || (C[0] = (y) =>
|
|
1319
|
-
},
|
|
1320
|
-
disabled:
|
|
1321
|
-
loading:
|
|
1317
|
+
modelValue: i(u)[1],
|
|
1318
|
+
"onUpdate:modelValue": C[0] || (C[0] = (y) => i(u)[1] = y)
|
|
1319
|
+
}, r.value, {
|
|
1320
|
+
disabled: r.value.disabled ?? m.disabled,
|
|
1321
|
+
loading: i(s),
|
|
1322
1322
|
onChange: F
|
|
1323
1323
|
}), {
|
|
1324
1324
|
default: B(() => [
|
|
1325
|
-
(g(!0), _(K, null, se(
|
|
1325
|
+
(g(!0), _(K, null, se(i(a), (y) => (g(), R(v, oe({
|
|
1326
1326
|
key: y.value
|
|
1327
1327
|
}, { ref_for: !0 }, y), null, 16))), 128))
|
|
1328
1328
|
]),
|
|
@@ -1331,16 +1331,16 @@ const Re = [], Xe = [], _t = () => ({
|
|
|
1331
1331
|
]),
|
|
1332
1332
|
_: 1
|
|
1333
1333
|
}, 16, ["class", "model-value", "placeholder", "maxlength"])), [
|
|
1334
|
-
[
|
|
1334
|
+
[x]
|
|
1335
1335
|
]);
|
|
1336
1336
|
};
|
|
1337
1337
|
}
|
|
1338
|
-
}), gu = /* @__PURE__ */ te(fu, [["__scopeId", "data-v-833d44cc"]]),
|
|
1338
|
+
}), gu = /* @__PURE__ */ te(fu, [["__scopeId", "data-v-833d44cc"]]), Ot = {
|
|
1339
1339
|
[ee.GROUP_SELECT_INPUT]: gu,
|
|
1340
1340
|
[ee.SELECT]: cu,
|
|
1341
1341
|
[ee.SEARCH_INPUT]: ru,
|
|
1342
|
-
[ee.DATE]:
|
|
1343
|
-
[ee.DATE_RANGE]:
|
|
1342
|
+
[ee.DATE]: Dt,
|
|
1343
|
+
[ee.DATE_RANGE]: Dt,
|
|
1344
1344
|
[ee.CASCADER]: Zn,
|
|
1345
1345
|
[ee.NUMBER_RANGE]: uu,
|
|
1346
1346
|
[ee.DATE_RANGE_AND_SELECT_GROUP]: Kn,
|
|
@@ -1348,7 +1348,7 @@ const Re = [], Xe = [], _t = () => ({
|
|
|
1348
1348
|
[ee.INPUT]: qn,
|
|
1349
1349
|
[ee.RADIO]: au
|
|
1350
1350
|
}, Fu = "__custom-component__", ke = /* @__PURE__ */ new Map(), Se = (e) => `${Fu}${e}`, Fo = (e) => ke.has(Se(e));
|
|
1351
|
-
function
|
|
1351
|
+
function pt(e, t) {
|
|
1352
1352
|
ke.has(Se(e)) && console.warn(`${e} 组件已经存在,重复定义会覆盖原有的组件`), ke.set(Se(e), t);
|
|
1353
1353
|
}
|
|
1354
1354
|
const Cu = (e) => ke.get(Se(e)), hu = (e) => ke.has(Se(e)), Au = (e) => ke.get(Se(e))?.component, vu = (e) => {
|
|
@@ -1392,8 +1392,8 @@ const Cu = (e) => ke.get(Se(e)), hu = (e) => ke.has(Se(e)), Au = (e) => ke.get(S
|
|
|
1392
1392
|
}
|
|
1393
1393
|
], he = (e, t) => {
|
|
1394
1394
|
const o = e.attrs || (e.attrs = {});
|
|
1395
|
-
return $o(o, t, (n, u) => n && u && Ke(n) && Ke(u) ?
|
|
1396
|
-
},
|
|
1395
|
+
return $o(o, t, (n, u) => n && u && Ke(n) && Ke(u) ? Ve(u, n) : n ?? u), e;
|
|
1396
|
+
}, mt = {
|
|
1397
1397
|
[ee.RADIO]: (e) => e,
|
|
1398
1398
|
[ee.SWITCH]: (e) => e,
|
|
1399
1399
|
[ee.INPUT]: (e) => {
|
|
@@ -1426,7 +1426,7 @@ const Cu = (e) => ke.get(Se(e)), hu = (e) => ke.has(Se(e)), Au = (e) => ke.get(S
|
|
|
1426
1426
|
defaultValue: /* @__PURE__ */ new Date()
|
|
1427
1427
|
});
|
|
1428
1428
|
},
|
|
1429
|
-
[ee.DATE_RANGE]: (e) =>
|
|
1429
|
+
[ee.DATE_RANGE]: (e) => Ve(
|
|
1430
1430
|
{
|
|
1431
1431
|
defaultValue: []
|
|
1432
1432
|
},
|
|
@@ -1446,7 +1446,7 @@ const Cu = (e) => ke.get(Se(e)), hu = (e) => ke.has(Se(e)), Au = (e) => ke.get(S
|
|
|
1446
1446
|
shortcuts: yu
|
|
1447
1447
|
})
|
|
1448
1448
|
),
|
|
1449
|
-
[ee.GROUP_SELECT_INPUT]: (e) =>
|
|
1449
|
+
[ee.GROUP_SELECT_INPUT]: (e) => Ve(
|
|
1450
1450
|
{
|
|
1451
1451
|
defaultValue: []
|
|
1452
1452
|
},
|
|
@@ -1475,7 +1475,7 @@ const Cu = (e) => ke.get(Se(e)), hu = (e) => ke.has(Se(e)), Au = (e) => ke.get(S
|
|
|
1475
1475
|
collapseTags: !0,
|
|
1476
1476
|
collapseTagsTooltip: !0,
|
|
1477
1477
|
filterable: !0
|
|
1478
|
-
}),
|
|
1478
|
+
}), Ve(
|
|
1479
1479
|
{
|
|
1480
1480
|
format: (s) => (
|
|
1481
1481
|
/* 如果是单选,则默认拿到最后一个值 */
|
|
@@ -1491,7 +1491,7 @@ const Cu = (e) => ke.get(Se(e)), hu = (e) => ke.has(Se(e)), Au = (e) => ke.get(S
|
|
|
1491
1491
|
const { label: t } = e, o = {
|
|
1492
1492
|
clearable: !0
|
|
1493
1493
|
};
|
|
1494
|
-
return
|
|
1494
|
+
return Ve(
|
|
1495
1495
|
{
|
|
1496
1496
|
defaultValue: []
|
|
1497
1497
|
},
|
|
@@ -1511,7 +1511,7 @@ const Cu = (e) => ke.get(Se(e)), hu = (e) => ke.has(Se(e)), Au = (e) => ke.get(S
|
|
|
1511
1511
|
);
|
|
1512
1512
|
},
|
|
1513
1513
|
[ee.DATE_RANGE_AND_SELECT_GROUP]: (e) => {
|
|
1514
|
-
const t =
|
|
1514
|
+
const t = mt[ee.DATE_RANGE](e);
|
|
1515
1515
|
return he(t, {
|
|
1516
1516
|
selectOptions: {
|
|
1517
1517
|
placeholder: "请选择"
|
|
@@ -1528,8 +1528,8 @@ const Cu = (e) => ke.get(Se(e)), hu = (e) => ke.has(Se(e)), Au = (e) => ke.get(S
|
|
|
1528
1528
|
}
|
|
1529
1529
|
}, Bu = (e) => typeof e == "string", bu = (e) => {
|
|
1530
1530
|
const { tag: t } = e;
|
|
1531
|
-
if (no(t) && Reflect.has(
|
|
1532
|
-
return Reflect.get(
|
|
1531
|
+
if (no(t) && Reflect.has(mt, t))
|
|
1532
|
+
return Reflect.get(mt, t)(e);
|
|
1533
1533
|
if (Bu(t) && Fo(t)) {
|
|
1534
1534
|
const o = Cu(t);
|
|
1535
1535
|
if (o?.defaultPraseStrategy && uo(o.defaultPraseStrategy))
|
|
@@ -1594,7 +1594,7 @@ class Co {
|
|
|
1594
1594
|
*/
|
|
1595
1595
|
stopStacks = /* @__PURE__ */ new Set();
|
|
1596
1596
|
get getFormComponent() {
|
|
1597
|
-
return this.tag ? this._customTagName || Fo(this.tag) ? Gt(Au(this.tag)) : Reflect.has(
|
|
1597
|
+
return this.tag ? this._customTagName || Fo(this.tag) ? Gt(Au(this.tag)) : Reflect.has(Ot, this.tag) ? Gt(Ot[this.tag]) : this.tag : this.tag;
|
|
1598
1598
|
}
|
|
1599
1599
|
constructor(t) {
|
|
1600
1600
|
t && this.initProps(t);
|
|
@@ -1611,7 +1611,7 @@ class Co {
|
|
|
1611
1611
|
update(t) {
|
|
1612
1612
|
if (Ke(t.tag)) {
|
|
1613
1613
|
const o = `vertical__${zn(t.tag) || t.prop}`;
|
|
1614
|
-
hu(o) ||
|
|
1614
|
+
hu(o) || pt(o, {
|
|
1615
1615
|
component: t.tag
|
|
1616
1616
|
}), this._customTagName = o, t.tag = o;
|
|
1617
1617
|
}
|
|
@@ -1667,11 +1667,11 @@ function ho(e) {
|
|
|
1667
1667
|
const a = t ? e() : e;
|
|
1668
1668
|
n.value.initProps(a);
|
|
1669
1669
|
});
|
|
1670
|
-
n.value.addStopper(u),
|
|
1670
|
+
n.value.addStopper(u), nt() && ut(() => {
|
|
1671
1671
|
n.value.removeStopper(u);
|
|
1672
1672
|
});
|
|
1673
1673
|
}
|
|
1674
|
-
return
|
|
1674
|
+
return i(n);
|
|
1675
1675
|
}
|
|
1676
1676
|
const wu = (e) => {
|
|
1677
1677
|
const { formItemAttrs: t, prop: o, label: n } = e;
|
|
@@ -1694,7 +1694,7 @@ const wu = (e) => {
|
|
|
1694
1694
|
dynamicExpression: u
|
|
1695
1695
|
};
|
|
1696
1696
|
return o && (a.checked = !0), a;
|
|
1697
|
-
},
|
|
1697
|
+
}, at = (e, t) => {
|
|
1698
1698
|
const o = {
|
|
1699
1699
|
groupName: t,
|
|
1700
1700
|
columns: []
|
|
@@ -1711,10 +1711,10 @@ const wu = (e) => {
|
|
|
1711
1711
|
}
|
|
1712
1712
|
return t;
|
|
1713
1713
|
}, Su = (e) => Array.isArray(e), Tu = (e, t) => {
|
|
1714
|
-
const o =
|
|
1714
|
+
const o = at(t, He), n = new Map(o.columns.map((u) => [u.prop, u]));
|
|
1715
1715
|
return e.forEach(({ prop: u, checked: a }, s) => {
|
|
1716
|
-
const
|
|
1717
|
-
|
|
1716
|
+
const r = n.get(u);
|
|
1717
|
+
r && (r.checked = !!a, a && (r.sort = s + 1));
|
|
1718
1718
|
}), {
|
|
1719
1719
|
useGroup: o.groupName,
|
|
1720
1720
|
groups: [o]
|
|
@@ -1729,16 +1729,16 @@ const wu = (e) => {
|
|
|
1729
1729
|
}, vo = (e, t) => {
|
|
1730
1730
|
if (Su(e))
|
|
1731
1731
|
return Tu(e, t);
|
|
1732
|
-
const { groups: o = [], useGroup: n = Je } = e, u = [], a =
|
|
1733
|
-
const { groupName: l, columns: p } =
|
|
1732
|
+
const { groups: o = [], useGroup: n = Je } = e, u = [], a = at(t, Je).columns, s = (r) => {
|
|
1733
|
+
const { groupName: l, columns: p } = r, c = new Map(p.map((D) => [D.prop, D]));
|
|
1734
1734
|
u.push({
|
|
1735
1735
|
groupName: l,
|
|
1736
1736
|
columns: a.map((D) => {
|
|
1737
|
-
const { readonly: F } = D,
|
|
1738
|
-
return
|
|
1739
|
-
...
|
|
1740
|
-
value: wt(
|
|
1741
|
-
checked: !Oe(
|
|
1737
|
+
const { readonly: F } = D, d = c.get(D.prop);
|
|
1738
|
+
return d ? {
|
|
1739
|
+
...d,
|
|
1740
|
+
value: wt(d),
|
|
1741
|
+
checked: !Oe(d.sort),
|
|
1742
1742
|
readonly: F
|
|
1743
1743
|
} : D;
|
|
1744
1744
|
})
|
|
@@ -1751,34 +1751,34 @@ const wu = (e) => {
|
|
|
1751
1751
|
}, Gu = { class: "advanced-filter-form__container" }, Ut = "advanced_filter_", xu = /* @__PURE__ */ X({
|
|
1752
1752
|
__name: "AdvancedFilterForm",
|
|
1753
1753
|
setup(e) {
|
|
1754
|
-
const t =
|
|
1755
|
-
const
|
|
1754
|
+
const t = Me(), o = T(), n = T(), u = G(() => {
|
|
1755
|
+
const d = ku(t.columns);
|
|
1756
1756
|
return {
|
|
1757
|
-
groupNames: Reflect.ownKeys(
|
|
1758
|
-
formItems:
|
|
1757
|
+
groupNames: Reflect.ownKeys(d),
|
|
1758
|
+
formItems: d
|
|
1759
1759
|
};
|
|
1760
|
-
}), a = T(u.value?.groupNames?.[0] ?? ""), s = (
|
|
1760
|
+
}), a = T(u.value?.groupNames?.[0] ?? ""), s = (d) => u.value.formItems[d].every(
|
|
1761
1761
|
(f) => !!t.activeGroupColumnsMap.get(f.prop)?.checked
|
|
1762
|
-
),
|
|
1763
|
-
const f = u.value.formItems[
|
|
1762
|
+
), r = (d) => {
|
|
1763
|
+
const f = u.value.formItems[d], m = f.filter(
|
|
1764
1764
|
(C) => !!t.activeGroupColumnsMap.get(C.prop)?.checked
|
|
1765
1765
|
).length;
|
|
1766
1766
|
return m > 0 && m < f.length;
|
|
1767
|
-
}, l = (
|
|
1768
|
-
u.value.formItems[
|
|
1767
|
+
}, l = (d, f) => {
|
|
1768
|
+
u.value.formItems[d].forEach((m) => {
|
|
1769
1769
|
t.updateActiveGroupColumnChecked(m.prop, f);
|
|
1770
1770
|
});
|
|
1771
|
-
}, p = (
|
|
1772
|
-
|
|
1773
|
-
}, F = (
|
|
1774
|
-
a.value =
|
|
1771
|
+
}, p = (d) => !!t.activeGroupColumnsMap.get(d)?.checked, c = (d, f) => `${f ? "#" : ""}${Ut}${d}`, D = (d) => {
|
|
1772
|
+
d.preventDefault();
|
|
1773
|
+
}, F = (d) => {
|
|
1774
|
+
a.value = d ? d.replace(`#${Ut}`, "") : u.value?.groupNames?.[0] ?? "";
|
|
1775
1775
|
};
|
|
1776
1776
|
return t.on(ie.UPDATE_ACTIVE_GROUP, () => {
|
|
1777
|
-
n.value?.scrollTo(
|
|
1778
|
-
}), (
|
|
1777
|
+
n.value?.scrollTo(c(u.value.groupNames[0], !0));
|
|
1778
|
+
}), (d, f) => {
|
|
1779
1779
|
const m = S("el-anchor-link"), C = S("el-checkbox"), h = S("el-col"), v = S("el-row"), I = S("el-form"), k = Fe("ellipsis");
|
|
1780
1780
|
return g(), _("div", Gu, [
|
|
1781
|
-
E(
|
|
1781
|
+
E(i(rn), {
|
|
1782
1782
|
ref_key: "anchorRef",
|
|
1783
1783
|
ref: n,
|
|
1784
1784
|
class: "advanced-filter-form__groups",
|
|
@@ -1792,53 +1792,53 @@ const wu = (e) => {
|
|
|
1792
1792
|
onChange: F
|
|
1793
1793
|
}, {
|
|
1794
1794
|
default: B(() => [
|
|
1795
|
-
(g(!0), _(K, null, se(u.value.groupNames, (
|
|
1796
|
-
key:
|
|
1797
|
-
class: re(["group-item", { "is-active":
|
|
1798
|
-
href:
|
|
1795
|
+
(g(!0), _(K, null, se(u.value.groupNames, (x) => (g(), R(m, {
|
|
1796
|
+
key: x,
|
|
1797
|
+
class: re(["group-item", { "is-active": x === a.value }]),
|
|
1798
|
+
href: c(x, !0)
|
|
1799
1799
|
}, {
|
|
1800
1800
|
default: B(() => [
|
|
1801
|
-
W(q(
|
|
1801
|
+
W(q(x), 1)
|
|
1802
1802
|
]),
|
|
1803
1803
|
_: 2
|
|
1804
1804
|
}, 1032, ["class", "href"]))), 128))
|
|
1805
1805
|
]),
|
|
1806
1806
|
_: 1
|
|
1807
1807
|
}, 8, ["container"]),
|
|
1808
|
-
|
|
1808
|
+
M("div", {
|
|
1809
1809
|
ref_key: "formContentRef",
|
|
1810
1810
|
ref: o,
|
|
1811
1811
|
class: "advanced-filter-form__content"
|
|
1812
1812
|
}, [
|
|
1813
1813
|
E(I, {
|
|
1814
|
-
model:
|
|
1814
|
+
model: i(t).formData,
|
|
1815
1815
|
onSubmit: f[0] || (f[0] = ye(() => {
|
|
1816
1816
|
}, ["prevent"]))
|
|
1817
1817
|
}, {
|
|
1818
1818
|
default: B(() => [
|
|
1819
1819
|
E(v, { span: 24 }, {
|
|
1820
1820
|
default: B(() => [
|
|
1821
|
-
(g(!0), _(K, null, se(u.value.groupNames, (
|
|
1821
|
+
(g(!0), _(K, null, se(u.value.groupNames, (x) => (g(), _(K, { key: x }, [
|
|
1822
1822
|
E(h, {
|
|
1823
|
-
id:
|
|
1823
|
+
id: c(x),
|
|
1824
1824
|
class: "advanced-filter-form__item advanced-filter-form__group-title",
|
|
1825
1825
|
span: 24
|
|
1826
1826
|
}, {
|
|
1827
1827
|
default: B(() => [
|
|
1828
1828
|
E(C, {
|
|
1829
|
-
"model-value": s(
|
|
1830
|
-
indeterminate:
|
|
1831
|
-
onChange: (y) => l(
|
|
1829
|
+
"model-value": s(x),
|
|
1830
|
+
indeterminate: r(x),
|
|
1831
|
+
onChange: (y) => l(x, y)
|
|
1832
1832
|
}, {
|
|
1833
1833
|
default: B(() => [
|
|
1834
|
-
W(q(
|
|
1834
|
+
W(q(x), 1)
|
|
1835
1835
|
]),
|
|
1836
1836
|
_: 2
|
|
1837
1837
|
}, 1032, ["model-value", "indeterminate", "onChange"])
|
|
1838
1838
|
]),
|
|
1839
1839
|
_: 2
|
|
1840
1840
|
}, 1032, ["id"]),
|
|
1841
|
-
(g(!0), _(K, null, se(u.value.formItems[
|
|
1841
|
+
(g(!0), _(K, null, se(u.value.formItems[x], (y) => (g(), R(h, {
|
|
1842
1842
|
key: y.prop,
|
|
1843
1843
|
class: "advanced-filter-form__item",
|
|
1844
1844
|
span: 12
|
|
@@ -1847,7 +1847,7 @@ const wu = (e) => {
|
|
|
1847
1847
|
E(C, {
|
|
1848
1848
|
disabled: y.readonly,
|
|
1849
1849
|
"model-value": p(y.prop),
|
|
1850
|
-
onChange: (w) =>
|
|
1850
|
+
onChange: (w) => i(t).updateActiveGroupColumnChecked(y.prop, w)
|
|
1851
1851
|
}, {
|
|
1852
1852
|
default: B(() => [
|
|
1853
1853
|
de((g(), _("div", null, [
|
|
@@ -1882,7 +1882,7 @@ const wu = (e) => {
|
|
|
1882
1882
|
}, Vu = /* @__PURE__ */ X({
|
|
1883
1883
|
__name: "AdvancedFilterSelectedList",
|
|
1884
1884
|
setup(e) {
|
|
1885
|
-
const t =
|
|
1885
|
+
const t = Me(), o = G({
|
|
1886
1886
|
get() {
|
|
1887
1887
|
return fe(t.activeGroupSelectedColumns ?? []);
|
|
1888
1888
|
},
|
|
@@ -1894,9 +1894,9 @@ const wu = (e) => {
|
|
|
1894
1894
|
return a?.advancedFilterLabel || a?.label || "";
|
|
1895
1895
|
});
|
|
1896
1896
|
return (u, a) => {
|
|
1897
|
-
const s = S("el-icon"),
|
|
1897
|
+
const s = S("el-icon"), r = Fe("ellipsis");
|
|
1898
1898
|
return g(), _("div", Pu, [
|
|
1899
|
-
E(
|
|
1899
|
+
E(i(qe), {
|
|
1900
1900
|
modelValue: o.value,
|
|
1901
1901
|
"onUpdate:modelValue": a[0] || (a[0] = (l) => o.value = l),
|
|
1902
1902
|
draggable: ".selected-item-drag"
|
|
@@ -1906,21 +1906,21 @@ const wu = (e) => {
|
|
|
1906
1906
|
key: l.prop,
|
|
1907
1907
|
class: "selected-item selected-item-drag"
|
|
1908
1908
|
}, [
|
|
1909
|
-
a[1] || (a[1] =
|
|
1909
|
+
a[1] || (a[1] = M("img", {
|
|
1910
1910
|
src: $e,
|
|
1911
1911
|
alt: "... "
|
|
1912
1912
|
}, null, -1)),
|
|
1913
1913
|
de((g(), _("span", Ru, [
|
|
1914
1914
|
W(q(n.value(l.prop)), 1)
|
|
1915
1915
|
])), [
|
|
1916
|
-
[
|
|
1916
|
+
[r]
|
|
1917
1917
|
]),
|
|
1918
1918
|
l.readonly ? z("", !0) : (g(), _("div", Nu, [
|
|
1919
1919
|
E(s, {
|
|
1920
|
-
onClick: (p) =>
|
|
1920
|
+
onClick: (p) => i(t).updateActiveGroupColumnChecked(l.prop, !1)
|
|
1921
1921
|
}, {
|
|
1922
1922
|
default: B(() => [
|
|
1923
|
-
E(
|
|
1923
|
+
E(i(dt))
|
|
1924
1924
|
]),
|
|
1925
1925
|
_: 2
|
|
1926
1926
|
}, 1032, ["onClick"])
|
|
@@ -1932,27 +1932,27 @@ const wu = (e) => {
|
|
|
1932
1932
|
]);
|
|
1933
1933
|
};
|
|
1934
1934
|
}
|
|
1935
|
-
}),
|
|
1935
|
+
}), Lu = /* @__PURE__ */ te(Vu, [["__scopeId", "data-v-559c9d11"]]), Ou = { class: "advanced-filter-tab__container" }, Hu = { class: "advanced-filter-tab__content advanced-filter-tab__form" }, Uu = { class: "advanced-filter-tab__content advanced-filter-tab__selected" }, Qu = { class: "title" }, zu = /* @__PURE__ */ X({
|
|
1936
1936
|
__name: "AdvancedFilterTab",
|
|
1937
1937
|
setup(e) {
|
|
1938
|
-
const t =
|
|
1938
|
+
const t = Me(), o = G(
|
|
1939
1939
|
() => t.activeGroupColumns?.filter((n) => n.checked).length || 0
|
|
1940
1940
|
);
|
|
1941
|
-
return (n, u) => (g(), _("div",
|
|
1942
|
-
|
|
1943
|
-
u[1] || (u[1] =
|
|
1941
|
+
return (n, u) => (g(), _("div", Ou, [
|
|
1942
|
+
M("div", Hu, [
|
|
1943
|
+
u[1] || (u[1] = M("div", { class: "title" }, "搜索列", -1)),
|
|
1944
1944
|
E(Mu)
|
|
1945
1945
|
]),
|
|
1946
|
-
|
|
1947
|
-
|
|
1946
|
+
M("div", Uu, [
|
|
1947
|
+
M("div", Qu, [
|
|
1948
1948
|
W(" 已选 " + q(o.value) + " 个 ", 1),
|
|
1949
|
-
|
|
1949
|
+
M("div", {
|
|
1950
1950
|
class: "reset-btn",
|
|
1951
1951
|
onClick: u[0] || (u[0] = //@ts-ignore
|
|
1952
|
-
(...a) =>
|
|
1952
|
+
(...a) => i(t).resetActiveGroupColumnsStatus && i(t).resetActiveGroupColumnsStatus(...a))
|
|
1953
1953
|
}, "重置")
|
|
1954
1954
|
]),
|
|
1955
|
-
E(
|
|
1955
|
+
E(Lu)
|
|
1956
1956
|
])
|
|
1957
1957
|
]));
|
|
1958
1958
|
}
|
|
@@ -1972,7 +1972,7 @@ function Xu(e, t) {
|
|
|
1972
1972
|
...t
|
|
1973
1973
|
});
|
|
1974
1974
|
}
|
|
1975
|
-
function
|
|
1975
|
+
function ft(e, t) {
|
|
1976
1976
|
const o = e.message || e.msg || e || "操作失败";
|
|
1977
1977
|
Bt.error({
|
|
1978
1978
|
message: o,
|
|
@@ -1992,7 +1992,7 @@ async function Eo(e, t) {
|
|
|
1992
1992
|
return !1;
|
|
1993
1993
|
}
|
|
1994
1994
|
}
|
|
1995
|
-
async function
|
|
1995
|
+
async function Ll(e, t, o) {
|
|
1996
1996
|
try {
|
|
1997
1997
|
return await bt.confirm(e, {
|
|
1998
1998
|
title: o?.title || "提示",
|
|
@@ -2000,8 +2000,8 @@ async function Ol(e, t, o) {
|
|
|
2000
2000
|
...o,
|
|
2001
2001
|
beforeClose: async (n, u, a) => {
|
|
2002
2002
|
if (n === "confirm") {
|
|
2003
|
-
const s = (
|
|
2004
|
-
u.confirmButtonLoading =
|
|
2003
|
+
const s = (r) => {
|
|
2004
|
+
u.confirmButtonLoading = r, u.cancelButtonLoading = r;
|
|
2005
2005
|
};
|
|
2006
2006
|
try {
|
|
2007
2007
|
s(!0), await t(), a();
|
|
@@ -2020,7 +2020,7 @@ async function Ol(e, t, o) {
|
|
|
2020
2020
|
return !1;
|
|
2021
2021
|
}
|
|
2022
2022
|
}
|
|
2023
|
-
function
|
|
2023
|
+
function Ol(e, t) {
|
|
2024
2024
|
return bt.alert(e, {
|
|
2025
2025
|
title: "温馨提示",
|
|
2026
2026
|
confirmButtonText: "我知道了",
|
|
@@ -2038,27 +2038,27 @@ const Wu = { class: "advanced-filter-tab-item__footer" }, ju = /* @__PURE__ */ X
|
|
|
2038
2038
|
},
|
|
2039
2039
|
emits: ["update:modelValue"],
|
|
2040
2040
|
setup(e) {
|
|
2041
|
-
const t = Ge(e, "modelValue"), o = T(), n =
|
|
2041
|
+
const t = Ge(e, "modelValue"), o = T(), n = Me(), u = G(() => t.value === He), a = T(t.value), s = async () => {
|
|
2042
2042
|
await Eo(`确定删除${t.value}吗?`) && n.removeGroup(t.value);
|
|
2043
|
-
},
|
|
2043
|
+
}, r = () => {
|
|
2044
2044
|
o.value?.hide(), a.value = t.value;
|
|
2045
2045
|
}, l = () => {
|
|
2046
2046
|
if (!a.value)
|
|
2047
|
-
return
|
|
2047
|
+
return ft("名称不能为空");
|
|
2048
2048
|
if (n.groups.some((p) => p.groupName !== t.value && p.groupName === a.value))
|
|
2049
|
-
return
|
|
2050
|
-
n.updateGroupName(t.value, a.value),
|
|
2049
|
+
return ft("名称不能重复");
|
|
2050
|
+
n.updateGroupName(t.value, a.value), r();
|
|
2051
2051
|
};
|
|
2052
|
-
return (p,
|
|
2053
|
-
const D = S("el-icon"), F = S("el-input"),
|
|
2052
|
+
return (p, c) => {
|
|
2053
|
+
const D = S("el-icon"), F = S("el-input"), d = S("el-button"), f = S("el-popover");
|
|
2054
2054
|
return g(), _("div", {
|
|
2055
2055
|
class: re([
|
|
2056
2056
|
"advanced-filter-tab-item__container",
|
|
2057
2057
|
{
|
|
2058
|
-
"is-active": t.value ===
|
|
2058
|
+
"is-active": t.value === i(n).activeGroupName
|
|
2059
2059
|
}
|
|
2060
2060
|
]),
|
|
2061
|
-
onClick:
|
|
2061
|
+
onClick: c[1] || (c[1] = ye((m) => i(n).updateActiveGroup(t.value, !0), ["stop"]))
|
|
2062
2062
|
}, [
|
|
2063
2063
|
W(q(t.value) + " ", 1),
|
|
2064
2064
|
u.value ? z("", !0) : (g(), R(f, {
|
|
@@ -2072,7 +2072,7 @@ const Wu = { class: "advanced-filter-tab-item__footer" }, ju = /* @__PURE__ */ X
|
|
|
2072
2072
|
reference: B(() => [
|
|
2073
2073
|
E(D, null, {
|
|
2074
2074
|
default: B(() => [
|
|
2075
|
-
E(
|
|
2075
|
+
E(i(lo))
|
|
2076
2076
|
]),
|
|
2077
2077
|
_: 1
|
|
2078
2078
|
})
|
|
@@ -2080,23 +2080,23 @@ const Wu = { class: "advanced-filter-tab-item__footer" }, ju = /* @__PURE__ */ X
|
|
|
2080
2080
|
default: B(() => [
|
|
2081
2081
|
E(F, {
|
|
2082
2082
|
modelValue: a.value,
|
|
2083
|
-
"onUpdate:modelValue":
|
|
2083
|
+
"onUpdate:modelValue": c[0] || (c[0] = (m) => a.value = m),
|
|
2084
2084
|
placeholder: "请输入分组名称",
|
|
2085
2085
|
maxlength: "8",
|
|
2086
2086
|
"show-word-limit": ""
|
|
2087
2087
|
}, null, 8, ["modelValue"]),
|
|
2088
|
-
|
|
2089
|
-
E(
|
|
2090
|
-
default: B(() => [...
|
|
2088
|
+
M("div", Wu, [
|
|
2089
|
+
E(d, { onClick: r }, {
|
|
2090
|
+
default: B(() => [...c[2] || (c[2] = [
|
|
2091
2091
|
W("取消", -1)
|
|
2092
2092
|
])]),
|
|
2093
2093
|
_: 1
|
|
2094
2094
|
}),
|
|
2095
|
-
E(
|
|
2095
|
+
E(d, {
|
|
2096
2096
|
type: "primary",
|
|
2097
2097
|
onClick: l
|
|
2098
2098
|
}, {
|
|
2099
|
-
default: B(() => [...
|
|
2099
|
+
default: B(() => [...c[3] || (c[3] = [
|
|
2100
2100
|
W("确认", -1)
|
|
2101
2101
|
])]),
|
|
2102
2102
|
_: 1
|
|
@@ -2110,7 +2110,7 @@ const Wu = { class: "advanced-filter-tab-item__footer" }, ju = /* @__PURE__ */ X
|
|
|
2110
2110
|
onClick: ye(s, ["stop"])
|
|
2111
2111
|
}, {
|
|
2112
2112
|
default: B(() => [
|
|
2113
|
-
E(
|
|
2113
|
+
E(i(yt))
|
|
2114
2114
|
]),
|
|
2115
2115
|
_: 1
|
|
2116
2116
|
}))
|
|
@@ -2120,13 +2120,13 @@ const Wu = { class: "advanced-filter-tab-item__footer" }, ju = /* @__PURE__ */ X
|
|
|
2120
2120
|
}), Ku = /* @__PURE__ */ te(ju, [["__scopeId", "data-v-00bacd88"]]), qu = { class: "advanced-content__container" }, Ju = { class: "advanced-content__tab-header" }, $u = /* @__PURE__ */ X({
|
|
2121
2121
|
__name: "AdvancedFilterContent",
|
|
2122
2122
|
setup(e) {
|
|
2123
|
-
const t =
|
|
2123
|
+
const t = Me();
|
|
2124
2124
|
return (o, n) => {
|
|
2125
2125
|
const u = S("el-button");
|
|
2126
2126
|
return g(), _("div", qu, [
|
|
2127
|
-
|
|
2128
|
-
n[2] || (n[2] =
|
|
2129
|
-
(g(!0), _(K, null, se(
|
|
2127
|
+
M("div", Ju, [
|
|
2128
|
+
n[2] || (n[2] = M("div", { class: "title" }, "常用筛选", -1)),
|
|
2129
|
+
(g(!0), _(K, null, se(i(t).groups, (a) => (g(), _("div", {
|
|
2130
2130
|
key: a.groupName,
|
|
2131
2131
|
class: "advanced-content__tabs"
|
|
2132
2132
|
}, [
|
|
@@ -2135,12 +2135,12 @@ const Wu = { class: "advanced-filter-tab-item__footer" }, ju = /* @__PURE__ */ X
|
|
|
2135
2135
|
"onUpdate:modelValue": (s) => a.groupName = s
|
|
2136
2136
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2137
2137
|
]))), 128)),
|
|
2138
|
-
|
|
2138
|
+
i(t).canAddAdvancedFilterGroup ? (g(), R(u, {
|
|
2139
2139
|
key: 0,
|
|
2140
|
-
icon:
|
|
2140
|
+
icon: i(ro),
|
|
2141
2141
|
link: "",
|
|
2142
2142
|
type: "primary",
|
|
2143
|
-
onClick: n[0] || (n[0] = (a) =>
|
|
2143
|
+
onClick: n[0] || (n[0] = (a) => i(t).addNewGroup(!0))
|
|
2144
2144
|
}, {
|
|
2145
2145
|
default: B(() => [...n[1] || (n[1] = [
|
|
2146
2146
|
W("添加自定义筛选", -1)
|
|
@@ -2148,7 +2148,7 @@ const Wu = { class: "advanced-filter-tab-item__footer" }, ju = /* @__PURE__ */ X
|
|
|
2148
2148
|
_: 1
|
|
2149
2149
|
}, 8, ["icon"])) : z("", !0)
|
|
2150
2150
|
]),
|
|
2151
|
-
|
|
2151
|
+
i(t).groups.length ? (g(), R(Zu, { key: 0 })) : z("", !0)
|
|
2152
2152
|
]);
|
|
2153
2153
|
};
|
|
2154
2154
|
}
|
|
@@ -2188,12 +2188,12 @@ class ta {
|
|
|
2188
2188
|
}
|
|
2189
2189
|
}
|
|
2190
2190
|
}
|
|
2191
|
-
const
|
|
2191
|
+
const Le = new ta();
|
|
2192
2192
|
class yo {
|
|
2193
2193
|
/**
|
|
2194
2194
|
* 当前激活的分组名称
|
|
2195
2195
|
*/
|
|
2196
|
-
activeGroupName =
|
|
2196
|
+
activeGroupName = He;
|
|
2197
2197
|
/**
|
|
2198
2198
|
* 高级筛选中的分组数据
|
|
2199
2199
|
*/
|
|
@@ -2211,7 +2211,7 @@ class yo {
|
|
|
2211
2211
|
* 新增一个新的分组
|
|
2212
2212
|
*/
|
|
2213
2213
|
addNewGroup(t) {
|
|
2214
|
-
const o = this.advancedFilterGroup.groups, n =
|
|
2214
|
+
const o = this.advancedFilterGroup.groups, n = at(this.formItems, t);
|
|
2215
2215
|
return o.push(n), this.advancedFilterSelectedColumns.push({
|
|
2216
2216
|
groupName: t,
|
|
2217
2217
|
columns: n.columns.filter((u) => u.checked)
|
|
@@ -2232,7 +2232,7 @@ class yo {
|
|
|
2232
2232
|
*/
|
|
2233
2233
|
async initGroups(t, o) {
|
|
2234
2234
|
if (t && o) {
|
|
2235
|
-
const n = await
|
|
2235
|
+
const n = await Le.loadViewConfig({ pageId: t, type: 1 }, o);
|
|
2236
2236
|
if (n?.length) {
|
|
2237
2237
|
const [{ config: u }] = n;
|
|
2238
2238
|
if (u?.length) {
|
|
@@ -2242,7 +2242,7 @@ class yo {
|
|
|
2242
2242
|
}
|
|
2243
2243
|
}
|
|
2244
2244
|
}
|
|
2245
|
-
this.addNewGroup(
|
|
2245
|
+
this.addNewGroup(He);
|
|
2246
2246
|
}
|
|
2247
2247
|
updateActiveGroup(t) {
|
|
2248
2248
|
this.activeGroupName = t;
|
|
@@ -2316,12 +2316,12 @@ class yo {
|
|
|
2316
2316
|
groups: t.map(
|
|
2317
2317
|
({ groupName: n, columns: u }) => ({
|
|
2318
2318
|
groupName: n,
|
|
2319
|
-
columns: u.map(({ prop: a, sort: s, value:
|
|
2319
|
+
columns: u.map(({ prop: a, sort: s, value: r, checked: l, dynamicExpression: p }) => ({
|
|
2320
2320
|
prop: a,
|
|
2321
2321
|
/* 有sort存在则代表是勾选的数据 */
|
|
2322
2322
|
sort: s,
|
|
2323
2323
|
/* 如果有动态数据,则不保存原 value/dynamicExpression */
|
|
2324
|
-
value: l ? p ? void 0 :
|
|
2324
|
+
value: l ? p ? void 0 : r : void 0,
|
|
2325
2325
|
dynamicExpression: l ? p : void 0
|
|
2326
2326
|
}))
|
|
2327
2327
|
})
|
|
@@ -2337,7 +2337,7 @@ class yo {
|
|
|
2337
2337
|
return this.advancedFilterGroup.useGroup = this.activeGroupName, this.groups.forEach((o) => {
|
|
2338
2338
|
const n = o.columns, u = t.get(o.groupName)?.columns ?? [];
|
|
2339
2339
|
if (u.length) {
|
|
2340
|
-
const a = new Map(u.map((s,
|
|
2340
|
+
const a = new Map(u.map((s, r) => [s.prop, r + 1]));
|
|
2341
2341
|
n.forEach((s) => {
|
|
2342
2342
|
s.sort = a.get(s.prop) ?? void 0;
|
|
2343
2343
|
});
|
|
@@ -2384,7 +2384,7 @@ class oa extends yo {
|
|
|
2384
2384
|
o !== -1 && this.groups.splice(o, 1);
|
|
2385
2385
|
const n = this.advancedFilterSelectedColumns.findIndex((a) => a.groupName === t);
|
|
2386
2386
|
n !== -1 && this.advancedFilterSelectedColumns.splice(n, 1);
|
|
2387
|
-
const u = this.groups[o - 1]?.groupName ??
|
|
2387
|
+
const u = this.groups[o - 1]?.groupName ?? He;
|
|
2388
2388
|
return t === this.activeGroupName ? u : this.activeGroupName;
|
|
2389
2389
|
}
|
|
2390
2390
|
/**
|
|
@@ -2414,7 +2414,7 @@ class oa extends yo {
|
|
|
2414
2414
|
resetActiveGroupColumnsStatus() {
|
|
2415
2415
|
const t = this.groups.find((o) => o.groupName === this.activeGroupName);
|
|
2416
2416
|
if (t) {
|
|
2417
|
-
const o =
|
|
2417
|
+
const o = at(this.formItems, "").columns;
|
|
2418
2418
|
t.columns = o, this.updateGroupSelectedColumns(o.filter((n) => n.checked));
|
|
2419
2419
|
}
|
|
2420
2420
|
}
|
|
@@ -2482,12 +2482,12 @@ class ua {
|
|
|
2482
2482
|
getFormatData(t) {
|
|
2483
2483
|
const o = N.cloneDeep(this.formData ?? {});
|
|
2484
2484
|
return t.reduce((n, u) => {
|
|
2485
|
-
const { format: a, prop: s } = u,
|
|
2485
|
+
const { format: a, prop: s } = u, r = Reflect.get(o, s);
|
|
2486
2486
|
if (a && typeof a == "function") {
|
|
2487
|
-
const l = a(
|
|
2487
|
+
const l = a(r, o, u);
|
|
2488
2488
|
l && typeof N.isPlainObject(l) && Object.assign(n, l);
|
|
2489
2489
|
} else
|
|
2490
|
-
Reflect.set(n, s,
|
|
2490
|
+
Reflect.set(n, s, r);
|
|
2491
2491
|
return n;
|
|
2492
2492
|
}, {});
|
|
2493
2493
|
}
|
|
@@ -2495,7 +2495,7 @@ class ua {
|
|
|
2495
2495
|
class aa {
|
|
2496
2496
|
_instance;
|
|
2497
2497
|
get instance() {
|
|
2498
|
-
return
|
|
2498
|
+
return i(this._instance);
|
|
2499
2499
|
}
|
|
2500
2500
|
componentInstanceRefs;
|
|
2501
2501
|
/**
|
|
@@ -2589,10 +2589,10 @@ class Bo {
|
|
|
2589
2589
|
parseColumns(t) {
|
|
2590
2590
|
const { initialFormData: o } = this.config;
|
|
2591
2591
|
return N.isEmpty(o) ? t : t.map((n) => {
|
|
2592
|
-
const { defaultValue: u, ...a } = n, s = a.prop,
|
|
2592
|
+
const { defaultValue: u, ...a } = n, s = a.prop, r = Reflect.get(o, s);
|
|
2593
2593
|
return {
|
|
2594
2594
|
...a,
|
|
2595
|
-
defaultValue: Reflect.has(o, s) ?
|
|
2595
|
+
defaultValue: Reflect.has(o, s) ? r : u
|
|
2596
2596
|
};
|
|
2597
2597
|
});
|
|
2598
2598
|
}
|
|
@@ -2655,26 +2655,26 @@ class Bo {
|
|
|
2655
2655
|
resetFormDataTo(t, o = "auto", n) {
|
|
2656
2656
|
const u = this.columns.length;
|
|
2657
2657
|
for (let a = 0; a < u; ++a) {
|
|
2658
|
-
const { tag: s, prop:
|
|
2659
|
-
if (s &&
|
|
2660
|
-
const l = Reflect.get(t,
|
|
2661
|
-
if (Reflect.has(t,
|
|
2662
|
-
this.updateFormData(
|
|
2658
|
+
const { tag: s, prop: r } = this.columns[a];
|
|
2659
|
+
if (s && r) {
|
|
2660
|
+
const l = Reflect.get(t, r), p = Reflect.get(this.formData, r);
|
|
2661
|
+
if (Reflect.has(t, r)) {
|
|
2662
|
+
this.updateFormData(r, l);
|
|
2663
2663
|
continue;
|
|
2664
2664
|
}
|
|
2665
2665
|
if (o === "empty") {
|
|
2666
|
-
this.updateFormData(
|
|
2666
|
+
this.updateFormData(r, void 0);
|
|
2667
2667
|
continue;
|
|
2668
2668
|
}
|
|
2669
|
-
const
|
|
2669
|
+
const c = n || (() => {
|
|
2670
2670
|
});
|
|
2671
2671
|
if (o === "custom") {
|
|
2672
|
-
this.updateFormData(
|
|
2672
|
+
this.updateFormData(r, c(r, p));
|
|
2673
2673
|
continue;
|
|
2674
2674
|
}
|
|
2675
2675
|
if (o === "auto") {
|
|
2676
2676
|
const D = Reflect.get(sa, s);
|
|
2677
|
-
D && N.isFunction(D) ? this.updateFormData(
|
|
2677
|
+
D && N.isFunction(D) ? this.updateFormData(r, D(p)) : this.updateFormData(r, c(r, p));
|
|
2678
2678
|
}
|
|
2679
2679
|
}
|
|
2680
2680
|
}
|
|
@@ -2728,7 +2728,7 @@ class Bo {
|
|
|
2728
2728
|
* 保存高级筛选数据
|
|
2729
2729
|
*/
|
|
2730
2730
|
async saveAdvancedFilterData() {
|
|
2731
|
-
this.config.pageId && await
|
|
2731
|
+
this.config.pageId && await Le.saveViewConfig(
|
|
2732
2732
|
{ pageId: this.config.pageId, type: 1, config: this.columnManagement.buildAdvancedFilterColumns() },
|
|
2733
2733
|
this
|
|
2734
2734
|
);
|
|
@@ -2800,8 +2800,8 @@ class la extends Bo {
|
|
|
2800
2800
|
for (let u = 0; u < n; ++u) {
|
|
2801
2801
|
const a = this.activeGroupColumns[u], s = o.get(a.prop);
|
|
2802
2802
|
if (s) {
|
|
2803
|
-
const
|
|
2804
|
-
a.value = fe(t ?
|
|
2803
|
+
const r = this.formData[a.prop];
|
|
2804
|
+
a.value = fe(t ? r ?? s.defaultValue : r);
|
|
2805
2805
|
}
|
|
2806
2806
|
}
|
|
2807
2807
|
}
|
|
@@ -2835,17 +2835,17 @@ class la extends Bo {
|
|
|
2835
2835
|
super.destroy(), _t().clearAllAsyncTask();
|
|
2836
2836
|
}
|
|
2837
2837
|
}
|
|
2838
|
-
function
|
|
2838
|
+
function gt(e, t) {
|
|
2839
2839
|
const o = T(e ?? !1);
|
|
2840
2840
|
let n;
|
|
2841
2841
|
const u = (s) => {
|
|
2842
2842
|
o.value = s;
|
|
2843
|
-
}, a = (s) => new Promise((
|
|
2843
|
+
}, a = (s) => new Promise((r) => {
|
|
2844
2844
|
u(!0);
|
|
2845
2845
|
const l = s();
|
|
2846
2846
|
fo(l) ? l.finally(() => {
|
|
2847
|
-
u(!1),
|
|
2848
|
-
}) : (u(!1),
|
|
2847
|
+
u(!1), r();
|
|
2848
|
+
}) : (u(!1), r());
|
|
2849
2849
|
});
|
|
2850
2850
|
return t && At(() => {
|
|
2851
2851
|
o.value ? n = cn.service({
|
|
@@ -2864,16 +2864,16 @@ const ra = {
|
|
|
2864
2864
|
setup(e) {
|
|
2865
2865
|
const t = T(!1), { setAdvancedFormBuilder: o, advancedFormBuilder: n } = In(), u = () => {
|
|
2866
2866
|
t.value = !1, n.value?.destroy(), n.value = void 0;
|
|
2867
|
-
}, { onTaskAllComplete: a } = _t(), [s,
|
|
2867
|
+
}, { onTaskAllComplete: a } = _t(), [s, r] = gt(), l = () => {
|
|
2868
2868
|
s.value = !0, a(() => {
|
|
2869
|
-
|
|
2869
|
+
r(async () => {
|
|
2870
2870
|
await ne(), n.value?.updateActiveGroupColumnsValue(!1), await n.value?.saveAdvancedFilterData(), n.value && (e.formBuilder.updateGroupsByAdvancedFilter(
|
|
2871
2871
|
vo(n.value.columnManagement.getFormatSaveGroups(), e.formBuilder.columns)
|
|
2872
2872
|
), await ne()), n.value?.emit(ie.SAVE_CONFIG), e.formBuilder.emit(ie.SAVE_CONFIG), Yu("操作成功");
|
|
2873
2873
|
});
|
|
2874
2874
|
});
|
|
2875
|
-
}, [p,
|
|
2876
|
-
|
|
2875
|
+
}, [p, c] = gt(), D = (F) => {
|
|
2876
|
+
c(async () => {
|
|
2877
2877
|
o(
|
|
2878
2878
|
new la([], {
|
|
2879
2879
|
pageId: e.formBuilder.config.pageId
|
|
@@ -2887,11 +2887,11 @@ const ra = {
|
|
|
2887
2887
|
p.value = !0, t.value = !0, setTimeout(() => {
|
|
2888
2888
|
D(F);
|
|
2889
2889
|
});
|
|
2890
|
-
}), (F,
|
|
2890
|
+
}), (F, d) => {
|
|
2891
2891
|
const f = S("el-icon"), m = S("el-button"), C = S("el-dialog");
|
|
2892
2892
|
return g(), R(C, {
|
|
2893
2893
|
modelValue: t.value,
|
|
2894
|
-
"onUpdate:modelValue":
|
|
2894
|
+
"onUpdate:modelValue": d[0] || (d[0] = (h) => t.value = h),
|
|
2895
2895
|
class: "advanced-filter__dialog",
|
|
2896
2896
|
width: "1300px",
|
|
2897
2897
|
title: "高级筛选",
|
|
@@ -2900,40 +2900,40 @@ const ra = {
|
|
|
2900
2900
|
}, {
|
|
2901
2901
|
footer: B(() => [
|
|
2902
2902
|
E(m, {
|
|
2903
|
-
loading:
|
|
2903
|
+
loading: i(s),
|
|
2904
2904
|
onClick: u
|
|
2905
2905
|
}, {
|
|
2906
|
-
default: B(() => [...
|
|
2906
|
+
default: B(() => [...d[2] || (d[2] = [
|
|
2907
2907
|
W("取消", -1)
|
|
2908
2908
|
])]),
|
|
2909
2909
|
_: 1
|
|
2910
2910
|
}, 8, ["loading"]),
|
|
2911
2911
|
E(m, {
|
|
2912
|
-
loading:
|
|
2912
|
+
loading: i(s),
|
|
2913
2913
|
type: "primary",
|
|
2914
2914
|
onClick: l
|
|
2915
2915
|
}, {
|
|
2916
|
-
default: B(() => [...
|
|
2916
|
+
default: B(() => [...d[3] || (d[3] = [
|
|
2917
2917
|
W("确认", -1)
|
|
2918
2918
|
])]),
|
|
2919
2919
|
_: 1
|
|
2920
2920
|
}, 8, ["loading"])
|
|
2921
2921
|
]),
|
|
2922
2922
|
default: B(() => [
|
|
2923
|
-
|
|
2924
|
-
|
|
2923
|
+
i(p) ? (g(), _("div", ra, [
|
|
2924
|
+
M("div", ia, [
|
|
2925
2925
|
E(f, { class: "is-loading" }, {
|
|
2926
2926
|
default: B(() => [
|
|
2927
|
-
E(
|
|
2927
|
+
E(i(on))
|
|
2928
2928
|
]),
|
|
2929
2929
|
_: 1
|
|
2930
2930
|
}),
|
|
2931
|
-
|
|
2931
|
+
d[1] || (d[1] = M("div", { class: "text" }, "加载中", -1))
|
|
2932
2932
|
])
|
|
2933
2933
|
])) : z("", !0),
|
|
2934
|
-
|
|
2934
|
+
i(n) && t.value && !i(p) ? (g(), R(ea, {
|
|
2935
2935
|
key: 1,
|
|
2936
|
-
"advanced-form-builder":
|
|
2936
|
+
"advanced-form-builder": i(n)
|
|
2937
2937
|
}, null, 8, ["advanced-form-builder"])) : z("", !0)
|
|
2938
2938
|
]),
|
|
2939
2939
|
_: 1
|
|
@@ -2946,13 +2946,13 @@ const ra = {
|
|
|
2946
2946
|
h && Reflect.set(n.value, h, m);
|
|
2947
2947
|
}, a = T(!1), s = () => {
|
|
2948
2948
|
a.value = !a.value;
|
|
2949
|
-
},
|
|
2949
|
+
}, r = T(!1), l = T([]), p = 5, c = async () => {
|
|
2950
2950
|
if (go(t.value?.$el))
|
|
2951
2951
|
return;
|
|
2952
2952
|
e.hiddenProps.clear();
|
|
2953
2953
|
const m = l.value.reduce((v, I) => {
|
|
2954
|
-
const k = I.$el,
|
|
2955
|
-
return
|
|
2954
|
+
const k = I.$el, x = k?.getAttribute("data-prop");
|
|
2955
|
+
return x && v.set(x, k), v;
|
|
2956
2956
|
}, /* @__PURE__ */ new Map());
|
|
2957
2957
|
if (!a.value) {
|
|
2958
2958
|
await ne();
|
|
@@ -2960,9 +2960,9 @@ const ra = {
|
|
|
2960
2960
|
e.getShowColumns.forEach((I) => {
|
|
2961
2961
|
const { prop: k } = I;
|
|
2962
2962
|
if (N.isString(k)) {
|
|
2963
|
-
const
|
|
2964
|
-
if (
|
|
2965
|
-
const { top: y } =
|
|
2963
|
+
const x = m.get(k);
|
|
2964
|
+
if (x) {
|
|
2965
|
+
const { top: y } = x.getBoundingClientRect() ?? {};
|
|
2966
2966
|
v ? Math.abs(y - v) > p ? e.hiddenProps.add(k) : e.hiddenProps.delete(k) : (v = y, e.hiddenProps.delete(k));
|
|
2967
2967
|
} else
|
|
2968
2968
|
e.hiddenProps.add(k);
|
|
@@ -2974,10 +2974,10 @@ const ra = {
|
|
|
2974
2974
|
if (C && h) {
|
|
2975
2975
|
const v = m.get(C.prop), I = m.get(h.prop);
|
|
2976
2976
|
if (v && I) {
|
|
2977
|
-
const { top: k } = v.getBoundingClientRect() ?? {}, { top:
|
|
2978
|
-
|
|
2977
|
+
const { top: k } = v.getBoundingClientRect() ?? {}, { top: x } = I.getBoundingClientRect() ?? {}, y = Math.abs(k - x) > p;
|
|
2978
|
+
r.value = !y;
|
|
2979
2979
|
}
|
|
2980
|
-
v && !I && (
|
|
2980
|
+
v && !I && (r.value = !1);
|
|
2981
2981
|
}
|
|
2982
2982
|
};
|
|
2983
2983
|
let D = !0;
|
|
@@ -2988,11 +2988,11 @@ const ra = {
|
|
|
2988
2988
|
sort: m.sort
|
|
2989
2989
|
})).concat([e.config.hideExpandBtn, a.value]),
|
|
2990
2990
|
() => {
|
|
2991
|
-
!e.config.hideExpandBtn && e.columns &&
|
|
2991
|
+
!e.config.hideExpandBtn && e.columns && c(), t.value && n.value && e.formInstanceManagement.init(t, n);
|
|
2992
2992
|
},
|
|
2993
2993
|
{ flush: "post", deep: !0 }
|
|
2994
2994
|
);
|
|
2995
|
-
let
|
|
2995
|
+
let d;
|
|
2996
2996
|
const f = async () => {
|
|
2997
2997
|
if (e.config.pageId) {
|
|
2998
2998
|
o.value = !0;
|
|
@@ -3003,9 +3003,9 @@ const ra = {
|
|
|
3003
3003
|
}
|
|
3004
3004
|
} else
|
|
3005
3005
|
e.columnManagement.showAllFormItems();
|
|
3006
|
-
o.value = !1, await ne(), e.config.hideExpandBtn ? F() : (
|
|
3007
|
-
D && requestAnimationFrame(
|
|
3008
|
-
}), t.value &&
|
|
3006
|
+
o.value = !1, await ne(), e.config.hideExpandBtn ? F() : (d = new ResizeObserver(() => {
|
|
3007
|
+
D && requestAnimationFrame(c);
|
|
3008
|
+
}), t.value && d.observe(t.value.$el));
|
|
3009
3009
|
};
|
|
3010
3010
|
return Yo(() => {
|
|
3011
3011
|
D = !0;
|
|
@@ -3017,14 +3017,14 @@ const ra = {
|
|
|
3017
3017
|
e.emit(ie.COLUMNS_LOADED);
|
|
3018
3018
|
});
|
|
3019
3019
|
});
|
|
3020
|
-
}),
|
|
3021
|
-
|
|
3020
|
+
}), xe(() => {
|
|
3021
|
+
d?.disconnect(), F(), e?.destroy();
|
|
3022
3022
|
}), {
|
|
3023
3023
|
collectionRef: u,
|
|
3024
3024
|
updateExpand: s,
|
|
3025
3025
|
isExpand: a,
|
|
3026
3026
|
baseFormRef: t,
|
|
3027
|
-
autoHiddenExpand:
|
|
3027
|
+
autoHiddenExpand: r,
|
|
3028
3028
|
colRefs: l,
|
|
3029
3029
|
loadingConfigColumns: o
|
|
3030
3030
|
};
|
|
@@ -3036,7 +3036,7 @@ const ra = {
|
|
|
3036
3036
|
},
|
|
3037
3037
|
emits: ["change"],
|
|
3038
3038
|
setup(e, { emit: t }) {
|
|
3039
|
-
const o = t, { baseFormRef: n, isExpand: u, autoHiddenExpand: a, colRefs: s, loadingConfigColumns:
|
|
3039
|
+
const o = t, { baseFormRef: n, isExpand: u, autoHiddenExpand: a, colRefs: s, loadingConfigColumns: r, collectionRef: l, updateExpand: p } = da(e.formBuilder), { configManagement: c, config: D } = e.formBuilder, F = (C, h) => h ? no(h) ? `${Object.keys(C).reduce((I, k) => (I.push(`${k}:${Reflect.get(C, k)}`), I), []).join(";")} ${h}` : { ...C, ...h } : C, d = G(
|
|
3040
3040
|
() => (C) => C.parseColumnEvent((...h) => {
|
|
3041
3041
|
e.formBuilder.emit(ie.CHANGE), o("change", ...h);
|
|
3042
3042
|
})
|
|
@@ -3048,30 +3048,30 @@ const ra = {
|
|
|
3048
3048
|
return e.formBuilder.on(ie.SAVE_CONFIG, async () => {
|
|
3049
3049
|
e.formBuilder.resetFormDataByActiveGroup(), e.formBuilder.emit(ie.CHANGE), await ne(), m();
|
|
3050
3050
|
}), e.formBuilder.on(ie.UPDATE_ACTIVE_GROUP, m), (C, h) => {
|
|
3051
|
-
const v = S("el-form-item"), I = S("el-col"), k = S("el-row"),
|
|
3051
|
+
const v = S("el-form-item"), I = S("el-col"), k = S("el-row"), x = S("el-form"), y = S("el-icon"), w = Fe("loading");
|
|
3052
3052
|
return g(), _(K, null, [
|
|
3053
|
-
|
|
3053
|
+
M("div", {
|
|
3054
3054
|
class: re([
|
|
3055
3055
|
"base-form__container z-form",
|
|
3056
|
-
|
|
3057
|
-
|
|
3056
|
+
i(D).className || "",
|
|
3057
|
+
i(D).useRowLayout ? "base-form__layout-container" : "base-form__no-layout-container",
|
|
3058
3058
|
C.formBuilder.getShowColumns.length ? "base-form__has-columns" : ""
|
|
3059
3059
|
])
|
|
3060
3060
|
}, [
|
|
3061
3061
|
de((g(), _("div", Da, [
|
|
3062
|
-
r
|
|
3062
|
+
i(r) ? z("", !0) : (g(), R(x, oe({
|
|
3063
3063
|
key: 0,
|
|
3064
3064
|
ref_key: "baseFormRef",
|
|
3065
3065
|
ref: n,
|
|
3066
3066
|
class: "base-form__form"
|
|
3067
|
-
},
|
|
3067
|
+
}, i(c).getFormAttrs, {
|
|
3068
3068
|
model: C.formBuilder.formData,
|
|
3069
3069
|
onSubmit: h[0] || (h[0] = ye(() => {
|
|
3070
3070
|
}, ["prevent"]))
|
|
3071
3071
|
}), {
|
|
3072
3072
|
default: B(() => [
|
|
3073
|
-
E(k, oe({ class: "base-form__row" },
|
|
3074
|
-
style: F({ marginLeft: "0", marginRight: "0" },
|
|
3073
|
+
E(k, oe({ class: "base-form__row" }, i(c).getRowAttrs, {
|
|
3074
|
+
style: F({ marginLeft: "0", marginRight: "0" }, i(D).rowAttrs?.style)
|
|
3075
3075
|
}), {
|
|
3076
3076
|
default: B(() => [
|
|
3077
3077
|
(g(!0), _(K, null, se(C.formBuilder.getShowColumns, (A) => (g(), R(I, oe({ ref_for: !0 }, A.elColAttrs ?? {}, {
|
|
@@ -3080,20 +3080,20 @@ const ra = {
|
|
|
3080
3080
|
ref_key: "colRefs",
|
|
3081
3081
|
ref: s,
|
|
3082
3082
|
span: A.span,
|
|
3083
|
-
style: F(
|
|
3083
|
+
style: F(i(D).useRowLayout ? {} : { paddingLeft: "0", paddingRight: "0" }, A.style),
|
|
3084
3084
|
"data-prop": A.prop,
|
|
3085
3085
|
"data-visible": A.visible
|
|
3086
3086
|
}), {
|
|
3087
3087
|
default: B(() => [
|
|
3088
|
-
E(v, oe({ ref_for: !0 },
|
|
3088
|
+
E(v, oe({ ref_for: !0 }, i(wu)(A), {
|
|
3089
3089
|
class: A.className
|
|
3090
3090
|
}), {
|
|
3091
3091
|
default: B(() => [
|
|
3092
3092
|
(g(), R(Jt(A.getFormComponent), oe({ ref_for: !0 }, A.attrs, {
|
|
3093
3093
|
ref_for: !0,
|
|
3094
|
-
ref: (V) =>
|
|
3094
|
+
ref: (V) => i(l)(V, A),
|
|
3095
3095
|
"model-value": C.formBuilder.formData[A.prop]
|
|
3096
|
-
}, be(
|
|
3096
|
+
}, be(d.value(A)), {
|
|
3097
3097
|
"onUpdate:modelValue": (V) => f(A, V)
|
|
3098
3098
|
}), null, 16, ["model-value", "onUpdate:modelValue"]))
|
|
3099
3099
|
]),
|
|
@@ -3109,23 +3109,23 @@ const ra = {
|
|
|
3109
3109
|
_: 1
|
|
3110
3110
|
}, 16, ["model"]))
|
|
3111
3111
|
])), [
|
|
3112
|
-
[w, r
|
|
3112
|
+
[w, i(r)]
|
|
3113
3113
|
]),
|
|
3114
|
-
|
|
3115
|
-
|
|
3114
|
+
i(D).hideExpandBtn ? z("", !0) : (g(), _(K, { key: 0 }, [
|
|
3115
|
+
i(a) ? z("", !0) : (g(), _("div", {
|
|
3116
3116
|
key: 0,
|
|
3117
|
-
class: re(["expand-btn", { "expand-btn__expand":
|
|
3118
|
-
style:
|
|
3117
|
+
class: re(["expand-btn", { "expand-btn__expand": i(u) }]),
|
|
3118
|
+
style: ht({ display: C.formBuilder.getShowColumns.length ? "" : "none" }),
|
|
3119
3119
|
onClick: h[1] || (h[1] = //@ts-ignore
|
|
3120
|
-
(...A) =>
|
|
3120
|
+
(...A) => i(p) && i(p)(...A))
|
|
3121
3121
|
}, [
|
|
3122
3122
|
E(y, null, {
|
|
3123
3123
|
default: B(() => [
|
|
3124
|
-
E(
|
|
3124
|
+
E(i(nn))
|
|
3125
3125
|
]),
|
|
3126
3126
|
_: 1
|
|
3127
3127
|
}),
|
|
3128
|
-
W(" " + q(
|
|
3128
|
+
W(" " + q(i(u) ? "收起" : "展开"), 1)
|
|
3129
3129
|
], 6))
|
|
3130
3130
|
], 64))
|
|
3131
3131
|
], 2),
|
|
@@ -3153,12 +3153,12 @@ const ra = {
|
|
|
3153
3153
|
return Qe(() => {
|
|
3154
3154
|
!o.value && e.steps.length && (o.value = e.steps[0].value);
|
|
3155
3155
|
}), (u, a) => (g(), _("div", ga, [
|
|
3156
|
-
(g(!0), _(K, null, se(u.steps, (s,
|
|
3156
|
+
(g(!0), _(K, null, se(u.steps, (s, r) => (g(), _("div", {
|
|
3157
3157
|
key: s.value,
|
|
3158
3158
|
class: re(["z-base-step__step-item", { "is-active": s.value === o.value }]),
|
|
3159
3159
|
onClick: (l) => n("change", s.value)
|
|
3160
3160
|
}, [
|
|
3161
|
-
|
|
3161
|
+
M("div", Ca, [
|
|
3162
3162
|
E(io, {
|
|
3163
3163
|
class: "circle__container",
|
|
3164
3164
|
size: "32px",
|
|
@@ -3166,7 +3166,7 @@ const ra = {
|
|
|
3166
3166
|
}, null, 8, ["content"]),
|
|
3167
3167
|
W(" " + q(s.label), 1)
|
|
3168
3168
|
]),
|
|
3169
|
-
|
|
3169
|
+
r !== u.steps.length - 1 ? (g(), _("div", ha)) : z("", !0)
|
|
3170
3170
|
], 10, Fa))), 128))
|
|
3171
3171
|
]));
|
|
3172
3172
|
}
|
|
@@ -3178,7 +3178,7 @@ const ra = {
|
|
|
3178
3178
|
const n = S("el-icon");
|
|
3179
3179
|
return g(), R(n, { class: "z-plus-bold__container" }, {
|
|
3180
3180
|
default: B(() => [
|
|
3181
|
-
E(
|
|
3181
|
+
E(i(yt))
|
|
3182
3182
|
]),
|
|
3183
3183
|
_: 1
|
|
3184
3184
|
});
|
|
@@ -3210,12 +3210,12 @@ const ra = {
|
|
|
3210
3210
|
return At(() => {
|
|
3211
3211
|
!a && n.value && (a = new ResizeObserver(() => {
|
|
3212
3212
|
n.value && (u.value = n.value.scrollWidth - n.value.clientWidth > 2);
|
|
3213
|
-
}), a.observe(n.value),
|
|
3213
|
+
}), a.observe(n.value), nt() && ut(() => {
|
|
3214
3214
|
a?.disconnect();
|
|
3215
3215
|
}));
|
|
3216
3216
|
}), vt(() => {
|
|
3217
3217
|
a?.disconnect();
|
|
3218
|
-
}), (s,
|
|
3218
|
+
}), (s, r) => {
|
|
3219
3219
|
const l = S("el-tag"), p = S("el-tooltip");
|
|
3220
3220
|
return g(), _("div", _a, [E(p, {
|
|
3221
3221
|
disabled: !o.value.length || !u.value,
|
|
@@ -3223,14 +3223,14 @@ const ra = {
|
|
|
3223
3223
|
placement: "top",
|
|
3224
3224
|
"popper-class": "z-show-to-tags__tooltip"
|
|
3225
3225
|
}, {
|
|
3226
|
-
content: B(() => [
|
|
3227
|
-
key:
|
|
3226
|
+
content: B(() => [M("div", ka, [(g(!0), _(K, null, se(o.value, (c) => (g(), R(l, {
|
|
3227
|
+
key: c,
|
|
3228
3228
|
type: "primary"
|
|
3229
3229
|
}, {
|
|
3230
|
-
default: B(() => [W(q(
|
|
3230
|
+
default: B(() => [W(q(c), 1)]),
|
|
3231
3231
|
_: 2
|
|
3232
3232
|
}, 1024))), 128))])]),
|
|
3233
|
-
default: B(() => [
|
|
3233
|
+
default: B(() => [M("div", wa, [M("div", {
|
|
3234
3234
|
ref_key: "contentRef",
|
|
3235
3235
|
ref: n,
|
|
3236
3236
|
class: "z-show-to-tags__content"
|
|
@@ -3240,36 +3240,36 @@ const ra = {
|
|
|
3240
3240
|
};
|
|
3241
3241
|
}
|
|
3242
3242
|
}), Ta = /* @__PURE__ */ te(Sa, [["__scopeId", "data-v-2c568d65"]]), Ga = ge(Ta, "ZShowToTags"), xa = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAACQElEQVR4Xu2YzXGDMBCFXUJKoISU4AYAHYH4wCUZID7QQdKB3UHcgdOBS6EESki0DGDpgYyQUOJk+GZ0gdXqod3VD5vNyso/h7Hyge32W3x+N5C4MM4vQZLXQZx/saj00OZX6QVycWLzkyJFWySIXw/UV9VYnDPsMxsKcZgUHyjw2ooj9kHGPrBvSfaO9rNhUeZxZxU6D3nY+eBnP8lS+hDshyiFuhQZxNlRR5yIQmhNY6DtLEgIiuSDVdzxFm11UAilVs39aAnMyVakh3a6iEIpbSTffCy014LybkmRRC+U5yT5Ip/iGGxnECkKh+QkeX5Em7k0QoXCoRSCybgI5tP4fD2THJiGBRjLbSpK41kN4+IsdbYM+S1Y2hSs2ay6mM1bwGpQa60ALNpLecOi6a3RFixcrfDz/baUhboLe0e7qfRj8hop0WYAJje+d4W8rk6fGyg/T4LQCt+7gsbqxtWqiz8kVAp9je9dIYypF/phMbk/uRsVE25rOid3W8yWp5RO8tcKnLVTGIKnNHyvBM+NWjuFIRj2IMo+0UYJhj94yg9jNvjMBJzN2Re8wawKeRNExdsSKUFHR3EMOp+izSSDWW0PziSydWoltA15JU2G6bkCt9PuZ4Ot0DGRWou8imYFGL2BmgulHxgDkbaXO6K528BFzERoe6M9jPixvos1dDmJTUcoiaMNAwvzx0TqCh3kuNSyk3W4CT9+YSRG1eiHF/ZBcGvsPnCpNXgxul2n/Ud1fwJFSNwiIV5ZuXO+AeSMxwCzcroLAAAAAElFTkSuQmCC", Ma = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAABdUlEQVR4Xu2V0W3DIBCGM0JG6CheIPY9RcbyQx7B6oM3SEboBu0GHaEjdASP0BFajhhKzlgl5VJV7X0SinX4hy8G481GEM7U3XCqlXl3zV7T/lsRzwu9rmj/AhH9gh8V5cqKqIcrK6IerqyIeriyIurhyhaJAozbRpmXWg2voMwYRQJr2ZidMmD7p0YNzzimr7OJNt3wGOpKP0SRwFo2BrP+Hhwz1DlE48HdE42eREwqS4HDuMUxqGyxaN3qY44kQrO030NlXa5I1O4lf9105m3XG4D+vqItmZ1F8Y/R+7HhXsUxU3N9RzS3TYts2DafArntT4uGSXCZ7LEE0Opq0eZ9mxJFFvdji5Z+/g1zXS+K17d4meDyZYK9lXZndIGoqyn9lCObylIWkq0+YJ1F1NUvZHkO/LrTJ19nE8WzDz97tj7hUkWRwFo2Bj+/VBJhE80hN2uX+47WfqVoChFNUZIV0RQlWRFNUZIVUW5ElJurRYX/wgexw+vYgAE1fgAAAABJRU5ErkJggg==", Qt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAB00lEQVR4Xu1Y0ZGCMBC1hCvBEizhSrgSLIEOpAR/GAw6gx1cCZZgCZRgCXf7xoRZH+ESDxL94M28EZPd5LGEzZLVasGCedC27Rrk9rdAXdfbpmkuxpib8McRbcIt22dHVVUbEdRpcSPs5GbW7J8FVuRDBAO8SXQ3PE5SIDqIkkdIK7+F5RltbJM1slZQLwBrUV6gD7aDKOn7Zlu2SwIbTR2ljm0YIu6qfWSMT7aZHeb+WHWEgusOwujmCraZHfQog9F0gK26uZb7Z4fNl0+vt//6BXE8HvG48JhLYh8Ze839Ywz5FU9nBBG5U4NmJeZmPV7YSA4GyMmorHA4HPbsmJun02nPugYw9x3FOUW/1VOBudy8UVlhERpAVqEqpRW45v6/kEUoSj7ez51/bG5MLtQWKVzOaUaVdsmF6q1xjDFbZlKhqEFJ0BVttg59WAq+elUjqVDexfSOIv+/xvp8SCpUBsR3Uy9GWLo+Q3XrS4UCZviJ3GIL1G2R4yQXWpKoASWaJfsxkgsFRIj2YZFntvchi1Cgvp+W9G86UlLzxClJNqFTsQidG1OFIvWUmdinuVihD4n6RQwfUNj9u/M452J0aegOty6eQZISc0aLXLDgzfALQFYngxmEg2kAAAAASUVORK5CYII=", Pa = (e) => {
|
|
3243
|
-
const t = T(""), o = T(!0), n = T(
|
|
3244
|
-
() => (b) =>
|
|
3245
|
-
),
|
|
3243
|
+
const t = T(""), o = T(!0), n = T(i(e.groupName) || ""), u = T([]), a = T([]), s = T([]), r = T({}), l = G(() => Object.keys(r.value) ?? []), p = G(
|
|
3244
|
+
() => (b) => r.value[b]
|
|
3245
|
+
), c = (b = r.value) => {
|
|
3246
3246
|
const H = [];
|
|
3247
3247
|
return l.value.forEach((U) => {
|
|
3248
3248
|
H.push(...b[U]);
|
|
3249
3249
|
}), H;
|
|
3250
3250
|
}, D = G(() => (b) => {
|
|
3251
|
-
const H =
|
|
3251
|
+
const H = r.value[b], U = H.filter((j) => j.checked).length;
|
|
3252
3252
|
return !!U && U < H.length;
|
|
3253
3253
|
}), F = (b, H = {}) => {
|
|
3254
|
-
const U =
|
|
3254
|
+
const U = c(e.initialGroupData).find((j) => j.prop === b.prop);
|
|
3255
3255
|
return U && Object.assign(b, U, H), b;
|
|
3256
|
-
},
|
|
3256
|
+
}, d = (b) => {
|
|
3257
3257
|
a.value = [];
|
|
3258
3258
|
const H = [], U = [], j = new Map(b.map((ae) => [ae.prop, ae])), ue = (ae, De, Q) => {
|
|
3259
3259
|
De && (Q?.fixed ? H.push(F(ae, { fixed: Q.fixed })) : U.push(ae)), ae.checked = !!De;
|
|
3260
3260
|
};
|
|
3261
|
-
|
|
3261
|
+
c(r.value).forEach((ae) => {
|
|
3262
3262
|
const De = j.get(ae.prop);
|
|
3263
3263
|
ae.readonly ? a.value.push(F(ae, { fixed: ae.fixed })) : ue(ae, De ? De.checked : ae.checked, De);
|
|
3264
3264
|
}), u.value = H, s.value = e.hasLockColumns ? U : H.concat(U);
|
|
3265
3265
|
}, f = (b, H) => {
|
|
3266
|
-
|
|
3266
|
+
r.value[H].forEach((j) => {
|
|
3267
3267
|
j.readonly ? j.checked = !0 : j.checked = b;
|
|
3268
|
-
}), c(
|
|
3268
|
+
}), d(c());
|
|
3269
3269
|
}, m = G(
|
|
3270
|
-
() =>
|
|
3270
|
+
() => c().filter((b) => b.checked || b.readonly).length
|
|
3271
3271
|
), C = (b) => {
|
|
3272
|
-
const H =
|
|
3272
|
+
const H = r.value[b];
|
|
3273
3273
|
return H.filter((j) => j.checked).length === H.length;
|
|
3274
3274
|
}, h = (b, H) => {
|
|
3275
3275
|
if (H && u.value.length >= 5 && !b.fixed)
|
|
@@ -3283,20 +3283,20 @@ const ra = {
|
|
|
3283
3283
|
}, I = (b) => {
|
|
3284
3284
|
v(!1, b);
|
|
3285
3285
|
}, k = (b) => {
|
|
3286
|
-
|
|
3286
|
+
c().forEach((U) => {
|
|
3287
3287
|
F(U, { checked: U.defaultChecked ?? !1 });
|
|
3288
3288
|
});
|
|
3289
|
-
const H =
|
|
3290
|
-
if (
|
|
3289
|
+
const H = c();
|
|
3290
|
+
if (d(b === "reset" ? H : e.savedColumnsData ?? H), b === "init" && e.savedColumnsData) {
|
|
3291
3291
|
const U = new Map(e.savedColumnsData.map((j, ue) => [j.prop, ue]));
|
|
3292
3292
|
s.value = N.sortBy(s.value, (j) => U.get(j.prop)), u.value = N.sortBy(u.value, (j) => U.get(j.prop));
|
|
3293
3293
|
}
|
|
3294
3294
|
};
|
|
3295
3295
|
(() => {
|
|
3296
|
-
|
|
3296
|
+
r.value = N.cloneDeep(e.initialGroupData), k("init"), t.value = e.defaultActiveTab || l.value[0];
|
|
3297
3297
|
})();
|
|
3298
3298
|
let y = !1, w;
|
|
3299
|
-
const A = T(), V = T(), P = T(),
|
|
3299
|
+
const A = T(), V = T(), P = T(), O = (b, H = !1) => {
|
|
3300
3300
|
if (t.value = b, H) {
|
|
3301
3301
|
y = !0, clearTimeout(w);
|
|
3302
3302
|
const U = l.value.indexOf(b);
|
|
@@ -3315,7 +3315,7 @@ const ra = {
|
|
|
3315
3315
|
const U = b.target.getAttribute("data-group-name");
|
|
3316
3316
|
if (!y) {
|
|
3317
3317
|
if (b.isIntersecting)
|
|
3318
|
-
U &&
|
|
3318
|
+
U && O(U);
|
|
3319
3319
|
else if (t.value === U) {
|
|
3320
3320
|
const j = l.value.indexOf(U);
|
|
3321
3321
|
j > 0 && (t.value = l.value[j - 1]);
|
|
@@ -3327,12 +3327,12 @@ const ra = {
|
|
|
3327
3327
|
Y.observe(b);
|
|
3328
3328
|
}));
|
|
3329
3329
|
});
|
|
3330
|
-
return
|
|
3330
|
+
return xe(() => {
|
|
3331
3331
|
$(), Y && Y?.disconnect();
|
|
3332
3332
|
}), {
|
|
3333
3333
|
isSave: o,
|
|
3334
3334
|
currentGroupName: n,
|
|
3335
|
-
duplicateData:
|
|
3335
|
+
duplicateData: r,
|
|
3336
3336
|
groupNameList: l,
|
|
3337
3337
|
activeTab: t,
|
|
3338
3338
|
isIndeterminate: D,
|
|
@@ -3345,9 +3345,9 @@ const ra = {
|
|
|
3345
3345
|
groupNameRefs: A,
|
|
3346
3346
|
observerRootElementRef: V,
|
|
3347
3347
|
isCheckAll: C,
|
|
3348
|
-
getAllColumns:
|
|
3348
|
+
getAllColumns: c,
|
|
3349
3349
|
checkAll: f,
|
|
3350
|
-
updateActiveTab:
|
|
3350
|
+
updateActiveTab: O,
|
|
3351
3351
|
updateFixed: h,
|
|
3352
3352
|
deleteChecked: I,
|
|
3353
3353
|
checkItem: v,
|
|
@@ -3359,9 +3359,9 @@ const ra = {
|
|
|
3359
3359
|
class: "config-columns__search-container"
|
|
3360
3360
|
}, Va = {
|
|
3361
3361
|
class: "content"
|
|
3362
|
-
},
|
|
3362
|
+
}, La = {
|
|
3363
3363
|
class: "tabs"
|
|
3364
|
-
},
|
|
3364
|
+
}, Oa = ["onClick"], Ha = ["data-group-name"], Ua = {
|
|
3365
3365
|
class: "check-sub"
|
|
3366
3366
|
}, Qa = {
|
|
3367
3367
|
class: "config-columns__select-container"
|
|
@@ -3412,13 +3412,13 @@ const ra = {
|
|
|
3412
3412
|
groupNameList: u,
|
|
3413
3413
|
isSave: a,
|
|
3414
3414
|
currentGroupName: s,
|
|
3415
|
-
activeTab:
|
|
3415
|
+
activeTab: r,
|
|
3416
3416
|
isIndeterminate: l,
|
|
3417
3417
|
getCurrentColumnsList: p,
|
|
3418
|
-
checkedUnfixedColumns:
|
|
3418
|
+
checkedUnfixedColumns: c,
|
|
3419
3419
|
checkedFixedColumns: D,
|
|
3420
3420
|
readonlyColumns: F,
|
|
3421
|
-
getAllCheckedColumnsLength:
|
|
3421
|
+
getAllCheckedColumnsLength: d,
|
|
3422
3422
|
scrollbarRef: f,
|
|
3423
3423
|
groupNameRefs: m,
|
|
3424
3424
|
observerRootElementRef: C,
|
|
@@ -3426,15 +3426,15 @@ const ra = {
|
|
|
3426
3426
|
checkAll: v,
|
|
3427
3427
|
updateActiveTab: I,
|
|
3428
3428
|
updateFixed: k,
|
|
3429
|
-
deleteChecked:
|
|
3429
|
+
deleteChecked: x,
|
|
3430
3430
|
checkItem: y,
|
|
3431
3431
|
initAndReset: w
|
|
3432
3432
|
} = Pa(o), A = T(!1), V = () => {
|
|
3433
3433
|
A.value = !1;
|
|
3434
3434
|
}, P = () => {
|
|
3435
3435
|
n("cancel");
|
|
3436
|
-
},
|
|
3437
|
-
!s.value && a.value ? (A.value = !0,
|
|
3436
|
+
}, O = () => {
|
|
3437
|
+
!s.value && a.value ? (A.value = !0, ft("请输入自定义列名称")) : n("confirm", fe(F.value.concat(D.value, c.value)), s.value, a.value);
|
|
3438
3438
|
}, Y = ($) => {
|
|
3439
3439
|
const {
|
|
3440
3440
|
item: b,
|
|
@@ -3454,25 +3454,25 @@ const ra = {
|
|
|
3454
3454
|
alt: "锁",
|
|
3455
3455
|
onClick: () => k(b, void 0)
|
|
3456
3456
|
}, null), E(S("el-icon"), {
|
|
3457
|
-
onClick: () =>
|
|
3457
|
+
onClick: () => x(b)
|
|
3458
3458
|
}, {
|
|
3459
|
-
default: () => [E(
|
|
3459
|
+
default: () => [E(dt, null, null)]
|
|
3460
3460
|
})])]);
|
|
3461
3461
|
};
|
|
3462
3462
|
return ($, b) => {
|
|
3463
3463
|
const H = S("el-scrollbar"), U = S("el-checkbox"), j = S("el-icon"), ue = S("el-input"), ae = S("el-button"), De = Fe("ellipsis");
|
|
3464
|
-
return g(), _(K, null, [
|
|
3464
|
+
return g(), _(K, null, [M("div", Ra, [M("div", Na, [b[5] || (b[5] = M("div", {
|
|
3465
3465
|
class: "title"
|
|
3466
|
-
}, "搜索列", -1)),
|
|
3466
|
+
}, "搜索列", -1)), M("div", Va, [M("div", La, [E(H, {
|
|
3467
3467
|
class: "position__scrollbar"
|
|
3468
3468
|
}, {
|
|
3469
|
-
default: B(() => [(g(!0), _(K, null, se(
|
|
3469
|
+
default: B(() => [(g(!0), _(K, null, se(i(u), (Q) => de((g(), _("div", {
|
|
3470
3470
|
key: Q,
|
|
3471
|
-
class: re(["tab-item", Q === r
|
|
3472
|
-
onClick: (me) =>
|
|
3473
|
-
}, [W(q(Q), 1)], 10,
|
|
3471
|
+
class: re(["tab-item", Q === i(r) ? "is-active" : ""]),
|
|
3472
|
+
onClick: (me) => i(I)(Q, !0)
|
|
3473
|
+
}, [W(q(Q), 1)], 10, Oa)), [[De]])), 128))]),
|
|
3474
3474
|
_: 1
|
|
3475
|
-
})]),
|
|
3475
|
+
})]), M("div", {
|
|
3476
3476
|
ref_key: "observerRootElementRef",
|
|
3477
3477
|
ref: C,
|
|
3478
3478
|
class: "active-tab-content"
|
|
@@ -3481,103 +3481,103 @@ const ra = {
|
|
|
3481
3481
|
ref: f,
|
|
3482
3482
|
class: "position__scrollbar"
|
|
3483
3483
|
}, {
|
|
3484
|
-
default: B(() => [(g(!0), _(K, null, se(
|
|
3484
|
+
default: B(() => [(g(!0), _(K, null, se(i(u), (Q) => (g(), _(K, {
|
|
3485
3485
|
key: Q
|
|
3486
|
-
}, [
|
|
3486
|
+
}, [M("div", {
|
|
3487
3487
|
ref_for: !0,
|
|
3488
3488
|
ref_key: "groupNameRefs",
|
|
3489
3489
|
ref: m,
|
|
3490
3490
|
class: "check-tab",
|
|
3491
3491
|
"data-group-name": Q
|
|
3492
3492
|
}, [E(U, {
|
|
3493
|
-
"model-value":
|
|
3494
|
-
indeterminate:
|
|
3495
|
-
onChange: (me) =>
|
|
3493
|
+
"model-value": i(h)(Q),
|
|
3494
|
+
indeterminate: i(l)(Q),
|
|
3495
|
+
onChange: (me) => i(v)(me, Q)
|
|
3496
3496
|
}, {
|
|
3497
3497
|
default: B(() => [de((g(), _("div", null, [W(q(Q), 1)])), [[De]])]),
|
|
3498
3498
|
_: 2
|
|
3499
|
-
}, 1032, ["model-value", "indeterminate", "onChange"])], 8, Ha),
|
|
3499
|
+
}, 1032, ["model-value", "indeterminate", "onChange"])], 8, Ha), M("div", Ua, [(g(!0), _(K, null, se(i(p)(Q), (me) => (g(), _("div", {
|
|
3500
3500
|
key: me.prop,
|
|
3501
3501
|
class: "check-sub__item"
|
|
3502
3502
|
}, [E(U, {
|
|
3503
3503
|
modelValue: me.checked,
|
|
3504
|
-
"onUpdate:modelValue": (
|
|
3504
|
+
"onUpdate:modelValue": (Pe) => me.checked = Pe,
|
|
3505
3505
|
disabled: me.readonly,
|
|
3506
|
-
onChange: (
|
|
3506
|
+
onChange: (Pe) => i(y)(Pe, me)
|
|
3507
3507
|
}, {
|
|
3508
3508
|
default: B(() => [de((g(), _("div", null, [W(q(me.label), 1)])), [[De]])]),
|
|
3509
3509
|
_: 2
|
|
3510
3510
|
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled", "onChange"])]))), 128))])], 64))), 128))]),
|
|
3511
3511
|
_: 1
|
|
3512
|
-
}, 512)], 512)])]),
|
|
3512
|
+
}, 512)], 512)])]), M("div", Qa, [M("div", za, [M("div", Za, "已选 " + q(i(d)) + " 个", 1), M("div", {
|
|
3513
3513
|
class: "reset",
|
|
3514
|
-
onClick: b[0] || (b[0] = (Q) =>
|
|
3515
|
-
}, "重置")]),
|
|
3514
|
+
onClick: b[0] || (b[0] = (Q) => i(w)("reset"))
|
|
3515
|
+
}, "重置")]), M("div", Ya, [E(H, {
|
|
3516
3516
|
class: "position__scrollbar-no-right"
|
|
3517
3517
|
}, {
|
|
3518
|
-
default: B(() => [$.hasLockColumns ? (g(), _("div", Xa, [(g(!0), _(K, null, se(
|
|
3518
|
+
default: B(() => [$.hasLockColumns ? (g(), _("div", Xa, [(g(!0), _(K, null, se(i(F), (Q) => (g(), R(Y, {
|
|
3519
3519
|
key: Q.prop,
|
|
3520
3520
|
item: Q
|
|
3521
|
-
}, null, 8, ["item"]))), 128)), E(
|
|
3522
|
-
modelValue:
|
|
3521
|
+
}, null, 8, ["item"]))), 128)), E(i(qe), {
|
|
3522
|
+
modelValue: i(D),
|
|
3523
3523
|
"onUpdate:modelValue": b[1] || (b[1] = (Q) => Ae(D) ? D.value = Q : null),
|
|
3524
3524
|
draggable: ".select-item-drag"
|
|
3525
3525
|
}, {
|
|
3526
|
-
default: B(() => [(g(!0), _(K, null, se(
|
|
3526
|
+
default: B(() => [(g(!0), _(K, null, se(i(D), (Q) => (g(), R(Y, {
|
|
3527
3527
|
key: Q.prop,
|
|
3528
3528
|
draggable: "1",
|
|
3529
3529
|
item: Q
|
|
3530
3530
|
}, null, 8, ["item"]))), 128))]),
|
|
3531
3531
|
_: 1
|
|
3532
|
-
}, 8, ["modelValue"]), b[6] || (b[6] =
|
|
3532
|
+
}, 8, ["modelValue"]), b[6] || (b[6] = M("div", {
|
|
3533
3533
|
class: "select-fixed__tips"
|
|
3534
|
-
}, "最多可横向锁定5列", -1))])) : z("", !0),
|
|
3535
|
-
modelValue:
|
|
3536
|
-
"onUpdate:modelValue": b[2] || (b[2] = (Q) => Ae(
|
|
3534
|
+
}, "最多可横向锁定5列", -1))])) : z("", !0), M("div", Wa, [E(i(qe), {
|
|
3535
|
+
modelValue: i(c),
|
|
3536
|
+
"onUpdate:modelValue": b[2] || (b[2] = (Q) => Ae(c) ? c.value = Q : null),
|
|
3537
3537
|
draggable: ".select-item-drag"
|
|
3538
3538
|
}, {
|
|
3539
|
-
default: B(() => [(g(!0), _(K, null, se(
|
|
3539
|
+
default: B(() => [(g(!0), _(K, null, se(i(c), (Q) => (g(), _("div", {
|
|
3540
3540
|
key: Q.prop,
|
|
3541
3541
|
class: re(["select-item", ($.hasLockColumns, "select-item-drag")]),
|
|
3542
3542
|
"data-prop": Q.prop
|
|
3543
|
-
}, [
|
|
3544
|
-
src:
|
|
3543
|
+
}, [M("img", {
|
|
3544
|
+
src: i($e),
|
|
3545
3545
|
alt: "..."
|
|
3546
|
-
}, null, 8, Ka), de((g(), _("span", qa, [W(q(Q.label), 1)])), [[De]]),
|
|
3546
|
+
}, null, 8, Ka), de((g(), _("span", qa, [W(q(Q.label), 1)])), [[De]]), M("div", Ja, [$.hasLockColumns ? (g(), _("img", {
|
|
3547
3547
|
key: 0,
|
|
3548
3548
|
class: re({
|
|
3549
|
-
"not-lock":
|
|
3549
|
+
"not-lock": i(D).length >= 5
|
|
3550
3550
|
}),
|
|
3551
|
-
src:
|
|
3551
|
+
src: i(Qt),
|
|
3552
3552
|
alt: "锁",
|
|
3553
|
-
onClick: (me) =>
|
|
3553
|
+
onClick: (me) => i(k)(Q, "left")
|
|
3554
3554
|
}, null, 10, $a)) : z("", !0), Q.readonly ? z("", !0) : (g(), R(j, {
|
|
3555
3555
|
key: 1,
|
|
3556
|
-
onClick: (me) =>
|
|
3556
|
+
onClick: (me) => i(x)(Q)
|
|
3557
3557
|
}, {
|
|
3558
|
-
default: B(() => [E(
|
|
3558
|
+
default: B(() => [E(i(dt))]),
|
|
3559
3559
|
_: 2
|
|
3560
3560
|
}, 1032, ["onClick"]))])], 10, ja))), 128))]),
|
|
3561
3561
|
_: 1
|
|
3562
3562
|
}, 8, ["modelValue"])])]),
|
|
3563
3563
|
_: 1
|
|
3564
|
-
})])])]),
|
|
3565
|
-
modelValue:
|
|
3564
|
+
})])])]), M("div", es, [M("div", ts, [E(U, {
|
|
3565
|
+
modelValue: i(a),
|
|
3566
3566
|
"onUpdate:modelValue": b[3] || (b[3] = (Q) => Ae(a) ? a.value = Q : null)
|
|
3567
3567
|
}, {
|
|
3568
3568
|
default: B(() => [...b[7] || (b[7] = [W("保存为常用自定义列", -1)])]),
|
|
3569
3569
|
_: 1
|
|
3570
3570
|
}, 8, ["modelValue"]), E(ue, {
|
|
3571
|
-
modelValue:
|
|
3571
|
+
modelValue: i(s),
|
|
3572
3572
|
"onUpdate:modelValue": b[4] || (b[4] = (Q) => Ae(s) ? s.value = Q : null),
|
|
3573
3573
|
class: re(A.value ? "is-error" : ""),
|
|
3574
3574
|
placeholder: "请输入",
|
|
3575
3575
|
maxlength: "10",
|
|
3576
3576
|
onInput: V
|
|
3577
3577
|
}, {
|
|
3578
|
-
suffix: B(() => [W(q(
|
|
3578
|
+
suffix: B(() => [W(q(i(s)?.length || 0) + "/10", 1)]),
|
|
3579
3579
|
_: 1
|
|
3580
|
-
}, 8, ["modelValue", "class"]), de((g(), _("div", os, [W("设置会将应用于" + q(o.pageName) + "列表", 1)])), [[De]])]),
|
|
3580
|
+
}, 8, ["modelValue", "class"]), de((g(), _("div", os, [W("设置会将应用于" + q(o.pageName) + "列表", 1)])), [[De]])]), M("div", ns, [E(ae, {
|
|
3581
3581
|
loading: $.loading,
|
|
3582
3582
|
onClick: P
|
|
3583
3583
|
}, {
|
|
@@ -3586,7 +3586,7 @@ const ra = {
|
|
|
3586
3586
|
}, 8, ["loading"]), E(ae, {
|
|
3587
3587
|
loading: $.loading,
|
|
3588
3588
|
type: "primary",
|
|
3589
|
-
onClick:
|
|
3589
|
+
onClick: O
|
|
3590
3590
|
}, {
|
|
3591
3591
|
default: B(() => [...b[9] || (b[9] = [W("确定", -1)])]),
|
|
3592
3592
|
_: 1
|
|
@@ -3600,28 +3600,28 @@ const ra = {
|
|
|
3600
3600
|
},
|
|
3601
3601
|
emits: ["saveColumns"],
|
|
3602
3602
|
setup(e, { expose: t, emit: o }) {
|
|
3603
|
-
const n = o, [u, a] =
|
|
3604
|
-
let
|
|
3603
|
+
const n = o, [u, a] = gt(!0), s = T({}), r = T(void 0), l = T(!1), p = T("");
|
|
3604
|
+
let c;
|
|
3605
3605
|
const D = async (f, m) => {
|
|
3606
3606
|
s.value = fe(f.groupData), p.value = f.groupName, u.value = !0, await ne();
|
|
3607
3607
|
try {
|
|
3608
|
-
|
|
3608
|
+
r.value = m;
|
|
3609
3609
|
} finally {
|
|
3610
3610
|
a(() => {
|
|
3611
3611
|
l.value = !0;
|
|
3612
3612
|
});
|
|
3613
3613
|
}
|
|
3614
3614
|
return new Promise((C) => {
|
|
3615
|
-
|
|
3615
|
+
c = C;
|
|
3616
3616
|
});
|
|
3617
3617
|
}, F = () => {
|
|
3618
3618
|
l.value = !1;
|
|
3619
|
-
},
|
|
3619
|
+
}, d = (f, m, C) => {
|
|
3620
3620
|
if (f.length === 0) {
|
|
3621
3621
|
Xu("至少保留一列");
|
|
3622
3622
|
return;
|
|
3623
3623
|
}
|
|
3624
|
-
u.value = !1,
|
|
3624
|
+
u.value = !1, c({
|
|
3625
3625
|
data: {
|
|
3626
3626
|
updateData: f,
|
|
3627
3627
|
groupName: m,
|
|
@@ -3650,11 +3650,11 @@ const ra = {
|
|
|
3650
3650
|
l.value ? (g(), R(as, {
|
|
3651
3651
|
key: 0,
|
|
3652
3652
|
"initial-group-data": s.value,
|
|
3653
|
-
"saved-columns-data":
|
|
3653
|
+
"saved-columns-data": r.value,
|
|
3654
3654
|
"group-name": p.value,
|
|
3655
3655
|
"page-name": f.columnConfig?.pageName,
|
|
3656
|
-
loading:
|
|
3657
|
-
onConfirm:
|
|
3656
|
+
loading: i(u),
|
|
3657
|
+
onConfirm: d,
|
|
3658
3658
|
onCancel: F
|
|
3659
3659
|
}, null, 8, ["initial-group-data", "saved-columns-data", "group-name", "page-name", "loading"])) : z("", !0)
|
|
3660
3660
|
]),
|
|
@@ -3663,12 +3663,12 @@ const ra = {
|
|
|
3663
3663
|
};
|
|
3664
3664
|
}
|
|
3665
3665
|
}), ls = () => {
|
|
3666
|
-
const e = Wo("listenElementRef"), t = () => e?.value || document.body, o = [], n = (a, s,
|
|
3667
|
-
o.push({ event: a, fn: s, options:
|
|
3666
|
+
const e = Wo("listenElementRef"), t = () => e?.value || document.body, o = [], n = (a, s, r) => {
|
|
3667
|
+
o.push({ event: a, fn: s, options: r }), t().addEventListener(a, s, r);
|
|
3668
3668
|
}, u = () => {
|
|
3669
|
-
o.forEach(({ event: a, fn: s, options:
|
|
3669
|
+
o.forEach(({ event: a, fn: s, options: r }) => t().removeEventListener(a, s, r)), o.length = 0;
|
|
3670
3670
|
};
|
|
3671
|
-
return
|
|
3671
|
+
return xe(u), nt() && ut(u), {
|
|
3672
3672
|
stops: u,
|
|
3673
3673
|
on: n,
|
|
3674
3674
|
listenElementRef: e
|
|
@@ -3683,11 +3683,11 @@ const ra = {
|
|
|
3683
3683
|
},
|
|
3684
3684
|
emits: ["find", "hidden"],
|
|
3685
3685
|
setup(e, { emit: t }) {
|
|
3686
|
-
const o = t, n = T(0), u = T(""), a = T(!1), s = T(), { on:
|
|
3686
|
+
const o = t, n = T(0), u = T(""), a = T(!1), s = T(), { on: r } = ls(), l = (m) => {
|
|
3687
3687
|
n.value = m, o("find", u.value, m);
|
|
3688
3688
|
}, p = tn(() => {
|
|
3689
3689
|
l(0);
|
|
3690
|
-
}, 500),
|
|
3690
|
+
}, 500), c = () => {
|
|
3691
3691
|
const m = n.value > 0 ? n.value - 1 : e.count - 1;
|
|
3692
3692
|
l(m);
|
|
3693
3693
|
}, D = () => {
|
|
@@ -3695,21 +3695,22 @@ const ra = {
|
|
|
3695
3695
|
l(m);
|
|
3696
3696
|
}, F = async () => {
|
|
3697
3697
|
a.value = !0, await ne(), s.value?.focus();
|
|
3698
|
-
},
|
|
3698
|
+
}, d = () => {
|
|
3699
3699
|
a.value = !1, u.value = "", n.value = 0, o("hidden");
|
|
3700
3700
|
}, f = G(() => e.count ? n.value + 1 : 0);
|
|
3701
3701
|
return Qe(() => {
|
|
3702
|
-
|
|
3703
|
-
const C = m.target, h = s.value?.$el?.contains?.(C), { key: v, metaKey: I, ctrlKey: k } = m;
|
|
3702
|
+
r("keydown", (m) => {
|
|
3703
|
+
const C = m.target, h = s.value?.$el?.contains?.(C), { key: v, metaKey: I, ctrlKey: k, shiftKey: x } = m;
|
|
3704
3704
|
switch (v) {
|
|
3705
|
+
// ctrl + shift + f
|
|
3705
3706
|
case "f":
|
|
3706
|
-
(I || k) && (m.preventDefault(), F());
|
|
3707
|
+
(I || k) && x && (m.preventDefault(), F());
|
|
3707
3708
|
break;
|
|
3708
3709
|
case "Escape":
|
|
3709
|
-
|
|
3710
|
+
d();
|
|
3710
3711
|
break;
|
|
3711
3712
|
case "ArrowUp":
|
|
3712
|
-
h && m.preventDefault(),
|
|
3713
|
+
h && m.preventDefault(), c();
|
|
3713
3714
|
break;
|
|
3714
3715
|
case "ArrowDown":
|
|
3715
3716
|
h && m.preventDefault(), D();
|
|
@@ -3720,24 +3721,24 @@ const ra = {
|
|
|
3720
3721
|
const h = S("el-icon");
|
|
3721
3722
|
return g(), R(jo, { to: "body" }, [
|
|
3722
3723
|
a.value ? (g(), _("div", rs, [
|
|
3723
|
-
E(
|
|
3724
|
+
E(i(dn), {
|
|
3724
3725
|
ref_key: "inputRef",
|
|
3725
3726
|
ref: s,
|
|
3726
3727
|
modelValue: u.value,
|
|
3727
3728
|
"onUpdate:modelValue": C[0] || (C[0] = (v) => u.value = v),
|
|
3728
3729
|
placeholder: "请输入搜索关键字",
|
|
3729
|
-
onInput:
|
|
3730
|
+
onInput: i(p),
|
|
3730
3731
|
onKeydown: Ko(D, ["enter"])
|
|
3731
3732
|
}, {
|
|
3732
3733
|
append: B(() => [
|
|
3733
|
-
|
|
3734
|
-
|
|
3734
|
+
M("div", is, q(f.value) + "/" + q(m.count), 1),
|
|
3735
|
+
M("div", cs, [
|
|
3735
3736
|
E(h, {
|
|
3736
3737
|
class: re(m.count ? "is-active" : "is-disable"),
|
|
3737
|
-
onClick:
|
|
3738
|
+
onClick: c
|
|
3738
3739
|
}, {
|
|
3739
3740
|
default: B(() => [
|
|
3740
|
-
E(
|
|
3741
|
+
E(i(un))
|
|
3741
3742
|
]),
|
|
3742
3743
|
_: 1
|
|
3743
3744
|
}, 8, ["class"]),
|
|
@@ -3746,13 +3747,13 @@ const ra = {
|
|
|
3746
3747
|
onClick: D
|
|
3747
3748
|
}, {
|
|
3748
3749
|
default: B(() => [
|
|
3749
|
-
E(
|
|
3750
|
+
E(i(an))
|
|
3750
3751
|
]),
|
|
3751
3752
|
_: 1
|
|
3752
3753
|
}, 8, ["class"]),
|
|
3753
|
-
E(h, { onClick:
|
|
3754
|
+
E(h, { onClick: d }, {
|
|
3754
3755
|
default: B(() => [
|
|
3755
|
-
E(
|
|
3756
|
+
E(i(yt))
|
|
3756
3757
|
]),
|
|
3757
3758
|
_: 1
|
|
3758
3759
|
})
|
|
@@ -3764,7 +3765,7 @@ const ra = {
|
|
|
3764
3765
|
]);
|
|
3765
3766
|
};
|
|
3766
3767
|
}
|
|
3767
|
-
}), Ds = /* @__PURE__ */ te(ds, [["__scopeId", "data-v-
|
|
3768
|
+
}), Ds = /* @__PURE__ */ te(ds, [["__scopeId", "data-v-40635ba0"]]), ps = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAADGklEQVR4Xu1Y0ZEaMQy9ElICJVACDWCcj0zYzc2En8zA5j7oIHRw6SDXQUqgBErYEigh8TN2Yr/Vyobc3keGN6OBYyVZlp5k7z083HHHbbB2/86u9zNN2ObNYZvd3jS7s5NfBenfN18/s/2bwK63MyEgTc7IPvuZHCGbHIwqy0+7PfuZHKtmd4wBuO/9st1uJFm1f6mxarsf7OfVEDLXm6Y7Ofm+bJ4sl10LwG3iZ6Lryw8f8BX9Lttuw3ZXARnh8kniNmPZNqKWIvZxu2DbKmDnxu946JRFaxLOviI921bBrLtv7EhwrpY9IuVzZss+2+7Atio4C3Dof8dwd2UGv8A9p3fQshlhN6iOtzni09ktvC/3e9ps5toRhiylgdr1P5Jdgf044PAz64i4ZGyYzRJwVGJOXjbppoP7jsqwngSmQFVjGTYqLIbnYxz0G3WBV/hYUHKOrJPhMt/yRVgnReBytrER6UvB8mbVrA7nZnfSyC0FieagBrn8rmTpMgpxoFQGKnTh6AK8KfAMJYzP8b2Ge1KQ3peSIA/bfpkPghUokJYqBDljHc/f9Kx3I411xCAFXyKkYPk8Lm0kwj1/SXSzCTJSlVmqU4QzfE6d8KmhPUuBZ6lu9izfBCbMIX1ehHB8Di4epZJG5N3cndJnOEh4neo3ASiysWmHOx2Mk7abs459fMrno0ARZJHXKwYb5mIxSICHtJMzeIyAcUqFkmc8l7oeMEQB2Kldz+Q2hXOXs1oQ1Zdhvip33EGWxmZoRLgVZeNFkpIfwPDMLXU/Z2msXCnAMx7uPkDXcDUvdFxJicsDCDwtnxIBqEh8qUtPKQ1hveuyGWEKM/Q1MVxLbl4Rwpl/xi79uHFBB3r0NVc4ADp/bPDpfMAXVw/0YdsihJu3KLc0ypjc/CZR09F+AYXD9kM3Z31Z8lPrKvC4SqRP/9Y6m9/r+bITpYZCKpARcBHiuzlkr/ZfNem4ixz0fPfnvHszBc/dbY3tXg24iCQZOcfNsOTZHN/QZOCS1oh6LE4FYYSpgrJrTTcp/JtAmI+aQGdSHt7xP+M34WzNZBUBRu8AAAAASUVORK5CYII=", ms = ["src", "alt"], fs = ["src", "alt"], gs = /* @__PURE__ */ X({
|
|
3768
3769
|
name: "ZOperationIconButton",
|
|
3769
3770
|
__name: "ZOperationIconButton",
|
|
3770
3771
|
props: {
|
|
@@ -3784,11 +3785,11 @@ const ra = {
|
|
|
3784
3785
|
offset: 16
|
|
3785
3786
|
}, {
|
|
3786
3787
|
default: B(() => [
|
|
3787
|
-
|
|
3788
|
+
M("div", {
|
|
3788
3789
|
class: "z-operation-icon-button",
|
|
3789
3790
|
onClick: u[0] || (u[0] = (s) => o("click"))
|
|
3790
3791
|
}, [
|
|
3791
|
-
|
|
3792
|
+
M("img", {
|
|
3792
3793
|
src: n.src,
|
|
3793
3794
|
alt: n.alt || n.tips
|
|
3794
3795
|
}, null, 8, ms)
|
|
@@ -3800,21 +3801,21 @@ const ra = {
|
|
|
3800
3801
|
class: "z-operation-icon-button",
|
|
3801
3802
|
onClick: u[1] || (u[1] = (s) => o("click"))
|
|
3802
3803
|
}, [
|
|
3803
|
-
|
|
3804
|
+
M("img", {
|
|
3804
3805
|
src: n.src,
|
|
3805
3806
|
alt: n.alt
|
|
3806
3807
|
}, null, 8, fs)
|
|
3807
3808
|
]));
|
|
3808
3809
|
};
|
|
3809
3810
|
}
|
|
3810
|
-
}),
|
|
3811
|
+
}), Ft = /* @__PURE__ */ te(gs, [["__scopeId", "data-v-d649a8a9"]]), bo = (e) => {
|
|
3811
3812
|
const t = {
|
|
3812
3813
|
defaultChecked: !0,
|
|
3813
3814
|
// 如果设置了 _render 则不显示 showOverflowTooltip
|
|
3814
3815
|
showOverflowTooltip: !e._render
|
|
3815
3816
|
};
|
|
3816
3817
|
return e.prop ? Object.assign(t, e) : e;
|
|
3817
|
-
}, Hl = (e) => e.map(bo), _o = "-", zt = "base-table__column__is-draggable",
|
|
3818
|
+
}, Hl = (e) => e.map(bo), _o = "-", zt = "base-table__column__is-draggable", rt = E("span", {
|
|
3818
3819
|
style: {
|
|
3819
3820
|
color: "#999",
|
|
3820
3821
|
fontSize: "12px"
|
|
@@ -3876,7 +3877,7 @@ const ra = {
|
|
|
3876
3877
|
const o = t, n = (a) => ["config-columns__btn-item", a === e.groupId ? "config-columns__btn-item--active" : ""], u = (a) => {
|
|
3877
3878
|
const {
|
|
3878
3879
|
id: s,
|
|
3879
|
-
name:
|
|
3880
|
+
name: r
|
|
3880
3881
|
} = a;
|
|
3881
3882
|
return E(S("el-dropdown-item"), {
|
|
3882
3883
|
class: n(s),
|
|
@@ -3886,7 +3887,7 @@ const ra = {
|
|
|
3886
3887
|
}, {
|
|
3887
3888
|
default: () => [de(E("div", {
|
|
3888
3889
|
class: "config-columns__btn-item-name"
|
|
3889
|
-
}, [
|
|
3890
|
+
}, [r]), [[Fe("ellipsis")]]), s !== et ? E("div", {
|
|
3890
3891
|
class: "config-columns__btn-operation"
|
|
3891
3892
|
}, [E(S("el-icon"), {
|
|
3892
3893
|
class: "edit-icon",
|
|
@@ -3904,24 +3905,24 @@ const ra = {
|
|
|
3904
3905
|
});
|
|
3905
3906
|
};
|
|
3906
3907
|
return (a, s) => {
|
|
3907
|
-
const
|
|
3908
|
-
return g(), R(
|
|
3908
|
+
const r = S("el-dropdown-item"), l = S("el-button"), p = S("el-dropdown-menu"), c = S("el-dropdown");
|
|
3909
|
+
return g(), R(c, {
|
|
3909
3910
|
"popper-class": "config-columns__btn-popper",
|
|
3910
3911
|
trigger: "hover",
|
|
3911
3912
|
placement: "bottom-end"
|
|
3912
3913
|
}, {
|
|
3913
3914
|
dropdown: B(() => [E(p, null, {
|
|
3914
|
-
default: B(() => [E(
|
|
3915
|
+
default: B(() => [E(r, {
|
|
3915
3916
|
disabled: ""
|
|
3916
3917
|
}, {
|
|
3917
3918
|
default: B(() => [...s[1] || (s[1] = [W("系统推荐", -1)])]),
|
|
3918
3919
|
_: 1
|
|
3919
3920
|
}), E(u, {
|
|
3920
|
-
id:
|
|
3921
|
+
id: i(et),
|
|
3921
3922
|
name: a.columnConfig?.systemGroupName || "系统默认"
|
|
3922
|
-
}, null, 8, ["id", "name"]), s[3] || (s[3] =
|
|
3923
|
+
}, null, 8, ["id", "name"]), s[3] || (s[3] = M("div", {
|
|
3923
3924
|
class: "config-columns__btn-item__line"
|
|
3924
|
-
}, null, -1)), E(
|
|
3925
|
+
}, null, -1)), E(r, {
|
|
3925
3926
|
disabled: ""
|
|
3926
3927
|
}, {
|
|
3927
3928
|
default: B(() => [W("常用自定义列(" + q(a.columnGroups?.length || 0) + "/10)", 1)]),
|
|
@@ -3930,13 +3931,13 @@ const ra = {
|
|
|
3930
3931
|
id: D.id,
|
|
3931
3932
|
key: D.id,
|
|
3932
3933
|
name: D.groupName
|
|
3933
|
-
}, null, 8, ["id", "name"]))), 128)), a.columnGroups?.length < 10 ? (g(), R(
|
|
3934
|
+
}, null, 8, ["id", "name"]))), 128)), a.columnGroups?.length < 10 ? (g(), R(r, {
|
|
3934
3935
|
key: 0,
|
|
3935
3936
|
class: "config-columns__btn-add"
|
|
3936
3937
|
}, {
|
|
3937
3938
|
default: B(() => [E(l, {
|
|
3938
3939
|
link: "",
|
|
3939
|
-
icon:
|
|
3940
|
+
icon: i(ro),
|
|
3940
3941
|
type: "primary",
|
|
3941
3942
|
onClick: s[0] || (s[0] = (D) => o("edit", ""))
|
|
3942
3943
|
}, {
|
|
@@ -3947,8 +3948,8 @@ const ra = {
|
|
|
3947
3948
|
})) : z("", !0)]),
|
|
3948
3949
|
_: 1
|
|
3949
3950
|
})]),
|
|
3950
|
-
default: B(() => [E(
|
|
3951
|
-
src:
|
|
3951
|
+
default: B(() => [E(Ft, {
|
|
3952
|
+
src: i(ps),
|
|
3952
3953
|
alt: "自定义列"
|
|
3953
3954
|
}, null, 8, ["src"])]),
|
|
3954
3955
|
_: 1
|
|
@@ -3984,54 +3985,57 @@ function ws(e) {
|
|
|
3984
3985
|
row: n
|
|
3985
3986
|
} = e;
|
|
3986
3987
|
if ((!n || N.isEmpty(n)) && !t.renderToEmpty)
|
|
3987
|
-
return
|
|
3988
|
+
return rt;
|
|
3988
3989
|
const {
|
|
3989
3990
|
_render: u,
|
|
3990
3991
|
renderToOptions: a,
|
|
3991
3992
|
onClick: s,
|
|
3992
|
-
emptyClick:
|
|
3993
|
+
emptyClick: r,
|
|
3993
3994
|
emptyValue: l,
|
|
3994
3995
|
prop: p
|
|
3995
3996
|
} = t;
|
|
3996
3997
|
if (u) {
|
|
3997
3998
|
const {
|
|
3998
|
-
$tableData:
|
|
3999
|
+
$tableData: d,
|
|
3999
4000
|
$index: f,
|
|
4000
4001
|
$defaultSort: m,
|
|
4001
4002
|
$rowKey: C
|
|
4002
4003
|
} = o;
|
|
4003
4004
|
let h = f;
|
|
4004
|
-
m && (C ? h =
|
|
4005
|
-
const v = u(Et,
|
|
4006
|
-
return typeof v != "number" && (!v || v === _o) ?
|
|
4005
|
+
m && (C ? h = d.findIndex((I) => Reflect.get(I, C) === Reflect.get(n, C)) : console.warn("如果设置了default-sort,必须要设置row-key,否则可能会导致自定义渲染内容错乱!"));
|
|
4006
|
+
const v = u(Et, e.data ?? {}, Reflect.get(d, h) ?? {});
|
|
4007
|
+
return typeof v != "number" && (!v || v === _o) ? rt : v;
|
|
4007
4008
|
}
|
|
4008
|
-
const
|
|
4009
|
+
const c = l ?? rt;
|
|
4009
4010
|
if (!p)
|
|
4010
|
-
return
|
|
4011
|
-
const D = Reflect.get(
|
|
4011
|
+
return c;
|
|
4012
|
+
const D = Reflect.get(e.data, p);
|
|
4012
4013
|
if (a) {
|
|
4013
|
-
const
|
|
4014
|
-
return
|
|
4014
|
+
const d = a.find((m) => m.value === D), f = d?.label ?? c;
|
|
4015
|
+
return d?._color ? E("span", {
|
|
4016
|
+
key: D,
|
|
4015
4017
|
style: {
|
|
4016
|
-
color:
|
|
4018
|
+
color: d._color
|
|
4017
4019
|
}
|
|
4018
|
-
}, [f]) :
|
|
4020
|
+
}, [f]) : d?._status ? E("span", {
|
|
4021
|
+
key: D,
|
|
4019
4022
|
class: "custom-status__color",
|
|
4020
4023
|
style: {
|
|
4021
|
-
"--status-color":
|
|
4024
|
+
"--status-color": d._status
|
|
4022
4025
|
}
|
|
4023
4026
|
}, [f]) : f;
|
|
4024
4027
|
}
|
|
4025
4028
|
const F = Un(D) || D == l;
|
|
4026
4029
|
if (s) {
|
|
4027
|
-
const
|
|
4030
|
+
const d = E(wo, {
|
|
4031
|
+
key: D,
|
|
4028
4032
|
onClick: () => s?.(e.data)
|
|
4029
4033
|
}, _s(D) ? D : {
|
|
4030
4034
|
default: () => [D]
|
|
4031
4035
|
});
|
|
4032
|
-
return
|
|
4036
|
+
return r ? d : F ? c : d;
|
|
4033
4037
|
}
|
|
4034
|
-
return F ?
|
|
4038
|
+
return F ? c : D;
|
|
4035
4039
|
}
|
|
4036
4040
|
function Is(e) {
|
|
4037
4041
|
const {
|
|
@@ -4044,24 +4048,24 @@ function Is(e) {
|
|
|
4044
4048
|
} = t;
|
|
4045
4049
|
return u ? u(Et, o, n, t) : a;
|
|
4046
4050
|
}
|
|
4047
|
-
const
|
|
4051
|
+
const it = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
4048
4052
|
const t = T([]), o = async () => {
|
|
4049
4053
|
if (e.columnConfig?.pageId) {
|
|
4050
|
-
const l = await
|
|
4054
|
+
const l = await Le.loadViewConfig({ pageId: e.columnConfig.pageId, type: 2 });
|
|
4051
4055
|
if (l?.length) {
|
|
4052
4056
|
const [{ config: p }] = l;
|
|
4053
4057
|
t.value = p ? JSON.parse(p) : [];
|
|
4054
4058
|
}
|
|
4055
4059
|
}
|
|
4056
4060
|
}, n = (l) => {
|
|
4057
|
-
const p = {},
|
|
4058
|
-
for (let F = 0; F <
|
|
4059
|
-
const { groupName:
|
|
4061
|
+
const p = {}, c = e.columns.length;
|
|
4062
|
+
for (let F = 0; F < c; ++F) {
|
|
4063
|
+
const { groupName: d = Cs, prop: f, label: m, defaultChecked: C, readonly: h, fixed: v } = e.columns[F];
|
|
4060
4064
|
if (!f || !m)
|
|
4061
4065
|
continue;
|
|
4062
|
-
let I = Reflect.get(p,
|
|
4063
|
-
I || Reflect.set(p,
|
|
4064
|
-
const k = { prop: f, label: m, defaultChecked: C, fixed:
|
|
4066
|
+
let I = Reflect.get(p, d);
|
|
4067
|
+
I || Reflect.set(p, d, I = []);
|
|
4068
|
+
const k = { prop: f, label: m, defaultChecked: C, fixed: it(v) };
|
|
4065
4069
|
h && (k.defaultChecked = !0, k.readonly = !0), I.push(k);
|
|
4066
4070
|
}
|
|
4067
4071
|
return {
|
|
@@ -4069,15 +4073,15 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4069
4073
|
groupData: p
|
|
4070
4074
|
};
|
|
4071
4075
|
}, u = (l) => {
|
|
4072
|
-
const p = new Map(l.map((
|
|
4073
|
-
return e.columns.forEach((
|
|
4074
|
-
|
|
4075
|
-
prop:
|
|
4076
|
-
checked: !!(
|
|
4077
|
-
fixed:
|
|
4076
|
+
const p = new Map(l.map((c) => [c.prop, c]));
|
|
4077
|
+
return e.columns.forEach((c) => {
|
|
4078
|
+
c.prop && (p.has(c.prop) ? p.delete(c.prop) : l.push({
|
|
4079
|
+
prop: c.prop,
|
|
4080
|
+
checked: !!(c.readonly || c.defaultChecked),
|
|
4081
|
+
fixed: it(c.fixed)
|
|
4078
4082
|
}));
|
|
4079
|
-
}), p.size && p.forEach((
|
|
4080
|
-
const D = l.findIndex((F) => F.prop ===
|
|
4083
|
+
}), p.size && p.forEach((c) => {
|
|
4084
|
+
const D = l.findIndex((F) => F.prop === c.prop);
|
|
4081
4085
|
D !== -1 && l.splice(D, 1);
|
|
4082
4086
|
}), l;
|
|
4083
4087
|
};
|
|
@@ -4086,7 +4090,7 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4086
4090
|
getGroupedColumnInfo: n,
|
|
4087
4091
|
getCheckedColumnsById: (l) => {
|
|
4088
4092
|
if (l) {
|
|
4089
|
-
const p = t.value.find((
|
|
4093
|
+
const p = t.value.find((c) => c.id === l)?.columns;
|
|
4090
4094
|
if (p)
|
|
4091
4095
|
return u(p);
|
|
4092
4096
|
}
|
|
@@ -4094,23 +4098,23 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4094
4098
|
(p) => ({
|
|
4095
4099
|
prop: p.prop,
|
|
4096
4100
|
checked: !!(p.readonly || p.defaultChecked),
|
|
4097
|
-
fixed:
|
|
4101
|
+
fixed: it(p.fixed)
|
|
4098
4102
|
})
|
|
4099
4103
|
);
|
|
4100
4104
|
},
|
|
4101
|
-
saveConfigColumns: async (l, p,
|
|
4102
|
-
const D = new Map(l.map((f, m) => [f.prop, { ...f, index: m }])), F = e.columns.filter((f) => f.prop && f.label),
|
|
4105
|
+
saveConfigColumns: async (l, p, c) => {
|
|
4106
|
+
const D = new Map(l.map((f, m) => [f.prop, { ...f, index: m }])), F = e.columns.filter((f) => f.prop && f.label), d = N.sortBy(F, (f) => D.get(f.prop)?.index ?? -1).map(
|
|
4103
4107
|
(f) => ({
|
|
4104
4108
|
prop: f.prop,
|
|
4105
4109
|
checked: D.has(f.prop),
|
|
4106
4110
|
fixed: D.get(f.prop)?.fixed
|
|
4107
4111
|
})
|
|
4108
4112
|
);
|
|
4109
|
-
if (
|
|
4113
|
+
if (c) {
|
|
4110
4114
|
const { id: f, groupName: m } = p, C = t.value.find((h) => h.id === f);
|
|
4111
|
-
C ? (C.columns =
|
|
4115
|
+
C ? (C.columns = d, C.groupName = m) : t.value.push({ ...p, columns: d });
|
|
4112
4116
|
try {
|
|
4113
|
-
await
|
|
4117
|
+
await Le.saveViewConfig({
|
|
4114
4118
|
pageId: e.columnConfig?.pageId,
|
|
4115
4119
|
type: 2,
|
|
4116
4120
|
config: JSON.stringify(t.value)
|
|
@@ -4119,11 +4123,11 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4119
4123
|
console.log(h);
|
|
4120
4124
|
}
|
|
4121
4125
|
}
|
|
4122
|
-
return u(
|
|
4126
|
+
return u(d);
|
|
4123
4127
|
},
|
|
4124
4128
|
deleteGroupByGroupId: async (l) => {
|
|
4125
|
-
const p = t.value.findIndex((
|
|
4126
|
-
p > -1 && t.value.splice(p, 1), await
|
|
4129
|
+
const p = t.value.findIndex((c) => c.id === l);
|
|
4130
|
+
p > -1 && t.value.splice(p, 1), await Le.saveViewConfig({
|
|
4127
4131
|
pageId: e.columnConfig?.pageId,
|
|
4128
4132
|
type: 2,
|
|
4129
4133
|
config: JSON.stringify(t.value)
|
|
@@ -4139,14 +4143,14 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4139
4143
|
getGroupedColumnInfo: u,
|
|
4140
4144
|
saveConfigColumns: a,
|
|
4141
4145
|
columnGroups: s
|
|
4142
|
-
} = ks(e),
|
|
4146
|
+
} = ks(e), r = T(!0), l = T(e.columnConfig?.groupId ?? et), p = T([]), c = T(), D = (v) => {
|
|
4143
4147
|
const I = new Map(v.map((y, w) => [y.prop, { ...y, index: w }])), k = [];
|
|
4144
4148
|
e.columns.forEach((y) => y.readonly && k.push(y));
|
|
4145
|
-
const
|
|
4149
|
+
const x = N.sortBy(
|
|
4146
4150
|
e.columns.filter((y) => !y.readonly && (I.get(y.prop)?.checked || !y.prop)),
|
|
4147
4151
|
(y) => I.get(y.prop)?.index ?? -1
|
|
4148
4152
|
);
|
|
4149
|
-
k.reverse().forEach((y) =>
|
|
4153
|
+
k.reverse().forEach((y) => x.unshift(y)), p.value = x.map(
|
|
4150
4154
|
(y) => ({
|
|
4151
4155
|
...y,
|
|
4152
4156
|
fixed: y.prop ? I.get(y.prop)?.fixed : y.fixed
|
|
@@ -4154,16 +4158,16 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4154
4158
|
);
|
|
4155
4159
|
}, F = (v, I) => {
|
|
4156
4160
|
l.value = v, D(I ?? o(v));
|
|
4157
|
-
},
|
|
4158
|
-
|
|
4161
|
+
}, d = (v) => {
|
|
4162
|
+
c.value?.openDialog(u(v), o(v)).then(async (I) => {
|
|
4159
4163
|
const {
|
|
4160
|
-
data: { updateData: k, groupName:
|
|
4164
|
+
data: { updateData: k, groupName: x, isSave: y },
|
|
4161
4165
|
close: w
|
|
4162
|
-
} = I, A = v || `${(/* @__PURE__ */ new Date()).valueOf()}`, V = await a(k, { groupName:
|
|
4166
|
+
} = I, A = v || `${(/* @__PURE__ */ new Date()).valueOf()}`, V = await a(k, { groupName: x, id: A }, y);
|
|
4163
4167
|
w(), y ? A === l.value ? D(o(v)) : F(A) : F(Fs, V);
|
|
4164
4168
|
});
|
|
4165
4169
|
}, f = () => {
|
|
4166
|
-
p.value = e.columns.filter(({ type: v, defaultChecked: I, readonly: k, prop:
|
|
4170
|
+
p.value = e.columns.filter(({ type: v, defaultChecked: I, readonly: k, prop: x }) => k || v && Reflect.has(je, v) || !x ? !0 : !!I);
|
|
4167
4171
|
};
|
|
4168
4172
|
(async () => {
|
|
4169
4173
|
if (e.columnConfig?.pageId)
|
|
@@ -4172,10 +4176,10 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4172
4176
|
} catch (v) {
|
|
4173
4177
|
console.log(v);
|
|
4174
4178
|
}
|
|
4175
|
-
f(),
|
|
4179
|
+
f(), r.value = !1;
|
|
4176
4180
|
})();
|
|
4177
4181
|
const C = (v) => {
|
|
4178
|
-
|
|
4182
|
+
d(v);
|
|
4179
4183
|
}, h = async (v) => {
|
|
4180
4184
|
await n(v), v === l.value && F(et);
|
|
4181
4185
|
};
|
|
@@ -4190,11 +4194,11 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4190
4194
|
}
|
|
4191
4195
|
), {
|
|
4192
4196
|
configColumns: p,
|
|
4193
|
-
configColumnsDialogRef:
|
|
4194
|
-
loadingConfigColumns:
|
|
4197
|
+
configColumnsDialogRef: c,
|
|
4198
|
+
loadingConfigColumns: r,
|
|
4195
4199
|
groupId: l,
|
|
4196
4200
|
columnGroups: s,
|
|
4197
|
-
openConfigColumnDialog:
|
|
4201
|
+
openConfigColumnDialog: d,
|
|
4198
4202
|
changeGroupId: F,
|
|
4199
4203
|
editGroupByGroupId: C,
|
|
4200
4204
|
deleteGroupByGroupId: h
|
|
@@ -4207,15 +4211,15 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4207
4211
|
loadingConfigColumns: u,
|
|
4208
4212
|
columnGroups: a,
|
|
4209
4213
|
changeGroupId: s,
|
|
4210
|
-
openConfigColumnDialog:
|
|
4214
|
+
openConfigColumnDialog: r,
|
|
4211
4215
|
editGroupByGroupId: l,
|
|
4212
4216
|
deleteGroupByGroupId: p
|
|
4213
|
-
} = Ss(e),
|
|
4217
|
+
} = Ss(e), c = T(), D = T(), F = T({
|
|
4214
4218
|
current: 1,
|
|
4215
4219
|
size: e.paginationProps?.pageSize || Zt.pageSize,
|
|
4216
4220
|
total: 0
|
|
4217
|
-
}),
|
|
4218
|
-
const P =
|
|
4221
|
+
}), d = G(() => ({ ...Zt, ...e.paginationProps })), f = T(""), m = () => {
|
|
4222
|
+
const P = c.value?.getBoundingClientRect();
|
|
4219
4223
|
f.value = `${P?.width}px`;
|
|
4220
4224
|
}, C = new ResizeObserver(() => requestAnimationFrame(m)), h = T([]), v = G(() => {
|
|
4221
4225
|
const P = N.omit(e, [
|
|
@@ -4227,25 +4231,25 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4227
4231
|
"hasPagination",
|
|
4228
4232
|
"paginationProps"
|
|
4229
4233
|
]);
|
|
4230
|
-
return N.mergeWith({ height: "100%" }, P, (
|
|
4234
|
+
return N.mergeWith({ height: "100%" }, P, (O, Y) => O && Y && N.isObject(O) && N.isObject(Y) ? N.merge(Y, O) : Y ?? O);
|
|
4231
4235
|
}), I = G(
|
|
4232
4236
|
() => (P) => N.omit(P, ["_render", "renderHeader", "hidden", "className", "isOperation"])
|
|
4233
|
-
), k = G(() => (Array.isArray(e.operationBtnList) ? e.operationBtnList : [e.operationBtnList])?.map((
|
|
4237
|
+
), k = G(() => (Array.isArray(e.operationBtnList) ? e.operationBtnList : [e.operationBtnList])?.map((O) => N.isString(O) ? { type: O } : O)), x = G(
|
|
4234
4238
|
() => o.value.filter(
|
|
4235
4239
|
(P) => (
|
|
4236
4240
|
// 处理列的显示隐藏
|
|
4237
4241
|
!(N.isFunction(P.hidden) ? P.hidden(P) : P.hidden)
|
|
4238
4242
|
)
|
|
4239
4243
|
).map((P) => {
|
|
4240
|
-
const
|
|
4241
|
-
return
|
|
4244
|
+
const O = P.type;
|
|
4245
|
+
return O && Reflect.has(je, O) ? { ...Reflect.get(je, O), ...P } : P;
|
|
4242
4246
|
})
|
|
4243
4247
|
), y = T(!1), w = async (P = F.value) => {
|
|
4244
4248
|
y.value = !0;
|
|
4245
4249
|
try {
|
|
4246
|
-
const
|
|
4247
|
-
if (
|
|
4248
|
-
const { data: Y, total: $, records: b, count: H } = await
|
|
4250
|
+
const O = e.loadMethod;
|
|
4251
|
+
if (O && typeof O == "function") {
|
|
4252
|
+
const { data: Y, total: $, records: b, count: H } = await O(N.omit(P, "total")) ?? {}, U = b || Y || [], ue = Number(H || $ || 0);
|
|
4249
4253
|
if (!U.length && P.current > 1 && ue) {
|
|
4250
4254
|
const ae = Math.ceil(ue / P.size);
|
|
4251
4255
|
if (P.current > ae)
|
|
@@ -4263,20 +4267,20 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4263
4267
|
A.value++;
|
|
4264
4268
|
};
|
|
4265
4269
|
return Qe(() => {
|
|
4266
|
-
|
|
4267
|
-
}),
|
|
4270
|
+
c.value && C.observe(c.value);
|
|
4271
|
+
}), xe(() => {
|
|
4268
4272
|
C?.disconnect();
|
|
4269
4273
|
}), {
|
|
4270
|
-
baseTableContainerRef:
|
|
4274
|
+
baseTableContainerRef: c,
|
|
4271
4275
|
baseTableRef: D,
|
|
4272
4276
|
pagination: F,
|
|
4273
|
-
getPaginationProps:
|
|
4277
|
+
getPaginationProps: d,
|
|
4274
4278
|
paginationWidth: f,
|
|
4275
4279
|
tableData: h,
|
|
4276
4280
|
getTableAttrs: v,
|
|
4277
4281
|
getColumnAttrs: I,
|
|
4278
4282
|
specialColumnMap: je,
|
|
4279
|
-
getTableRenderColumns:
|
|
4283
|
+
getTableRenderColumns: x,
|
|
4280
4284
|
configColumnsDialogRef: n,
|
|
4281
4285
|
getParseOperationBtnList: k,
|
|
4282
4286
|
loadingConfigColumns: u,
|
|
@@ -4286,7 +4290,7 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4286
4290
|
columnGroups: a,
|
|
4287
4291
|
changeGroupId: s,
|
|
4288
4292
|
loadData: w,
|
|
4289
|
-
openConfigColumnDialog:
|
|
4293
|
+
openConfigColumnDialog: r,
|
|
4290
4294
|
resetColumnsWidth: V,
|
|
4291
4295
|
editGroupByGroupId: l,
|
|
4292
4296
|
deleteGroupByGroupId: p
|
|
@@ -4322,22 +4326,22 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4322
4326
|
};
|
|
4323
4327
|
}, xs = (e) => {
|
|
4324
4328
|
const t = T(0), o = () => {
|
|
4325
|
-
const p = [],
|
|
4326
|
-
if (
|
|
4327
|
-
const D =
|
|
4329
|
+
const p = [], c = e.value?.$el?.querySelector(".el-table__inner-wrapper");
|
|
4330
|
+
if (c) {
|
|
4331
|
+
const D = c.querySelectorAll(".el-table__header-wrapper");
|
|
4328
4332
|
if (D.length) {
|
|
4329
|
-
const
|
|
4333
|
+
const d = Array.from(D).filter((f) => {
|
|
4330
4334
|
const { display: m } = getComputedStyle(f);
|
|
4331
4335
|
return m !== "none";
|
|
4332
4336
|
}).pop()?.querySelectorAll(".el-table__cell");
|
|
4333
|
-
if (
|
|
4334
|
-
const f = Array.from(
|
|
4337
|
+
if (d?.length) {
|
|
4338
|
+
const f = Array.from(d), [m] = f, C = f.find((A) => !A.classList.contains("el-table-fixed-column--left")), h = C?.getBoundingClientRect().left ?? 0, v = c.getBoundingClientRect().left;
|
|
4335
4339
|
let I = Math.abs(h - v);
|
|
4336
4340
|
if (m !== C) {
|
|
4337
|
-
const A = f.findLastIndex((Y) => Y.classList.contains("el-table-fixed-column--left")), V = f[A], { left: P, width:
|
|
4338
|
-
I = P +
|
|
4341
|
+
const A = f.findLastIndex((Y) => Y.classList.contains("el-table-fixed-column--left")), V = f[A], { left: P, width: O } = V.getBoundingClientRect();
|
|
4342
|
+
I = P + O - h;
|
|
4339
4343
|
}
|
|
4340
|
-
const { width: k } = e.value.$el.getBoundingClientRect(),
|
|
4344
|
+
const { width: k } = e.value.$el.getBoundingClientRect(), x = c.querySelector(".el-scrollbar__thumb"), y = x ? x.getBoundingClientRect().width : 0, w = y ? y / 2 : 0;
|
|
4341
4345
|
f.forEach((A) => {
|
|
4342
4346
|
const { top: V, left: P } = A.getBoundingClientRect();
|
|
4343
4347
|
p.push({ element: A, rect: { top: V, left: P + I - k / 2 - w } });
|
|
@@ -4346,30 +4350,30 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4346
4350
|
}
|
|
4347
4351
|
}
|
|
4348
4352
|
return p;
|
|
4349
|
-
}, n = (p,
|
|
4353
|
+
}, n = (p, c) => p.toLowerCase().includes(c.toLowerCase()), u = [], a = () => {
|
|
4350
4354
|
u.forEach((p) => p()), t.value = 0, u.length = 0;
|
|
4351
4355
|
}, s = ({ element: p }) => {
|
|
4352
4356
|
p.classList.add("el-table__cell__search-result"), u.push(() => {
|
|
4353
4357
|
p.classList.remove("el-table__cell__search-result");
|
|
4354
4358
|
});
|
|
4355
|
-
},
|
|
4356
|
-
const { top:
|
|
4357
|
-
e.value.scrollTo(D,
|
|
4359
|
+
}, r = ({ rect: p }) => {
|
|
4360
|
+
const { top: c, left: D } = p;
|
|
4361
|
+
e.value.scrollTo(D, c);
|
|
4358
4362
|
};
|
|
4359
4363
|
return {
|
|
4360
4364
|
count: t,
|
|
4361
|
-
find: (p,
|
|
4365
|
+
find: (p, c) => {
|
|
4362
4366
|
if (a(), p) {
|
|
4363
4367
|
const D = o();
|
|
4364
4368
|
if (D?.length) {
|
|
4365
|
-
const F = D.filter(({ element:
|
|
4366
|
-
const f =
|
|
4369
|
+
const F = D.filter(({ element: d }) => {
|
|
4370
|
+
const f = d.textContent;
|
|
4367
4371
|
return f ? n(f, p) : !1;
|
|
4368
4372
|
});
|
|
4369
4373
|
if (F.length) {
|
|
4370
4374
|
F.forEach(s);
|
|
4371
|
-
const
|
|
4372
|
-
|
|
4375
|
+
const d = F[c];
|
|
4376
|
+
d && r(d), t.value = F.length;
|
|
4373
4377
|
}
|
|
4374
4378
|
}
|
|
4375
4379
|
}
|
|
@@ -4379,16 +4383,16 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4379
4383
|
}, Ms = "__base-table-sticky-container", ko = "data-sticky", Ps = (e) => e.setAttribute(ko, "true"), Rs = (e) => e.removeAttribute(ko), Ns = (e) => {
|
|
4380
4384
|
const t = () => null;
|
|
4381
4385
|
return e ? N.isString(e) ? () => document.querySelector(e) : N.isFunction(e) ? e : e instanceof HTMLElement ? () => e : (console.warn("未知的选择器类型"), t) : t;
|
|
4382
|
-
}, Vs = (e) => Ns(e)(),
|
|
4386
|
+
}, Vs = (e) => Ns(e)(), Ls = (e, t) => {
|
|
4383
4387
|
const o = [], n = (s) => {
|
|
4384
4388
|
o.includes(s) || o.push(s);
|
|
4385
4389
|
}, u = new IntersectionObserver(([s]) => {
|
|
4386
|
-
let
|
|
4390
|
+
let r = "top";
|
|
4387
4391
|
if (!s.isIntersecting) {
|
|
4388
|
-
const l = s.boundingClientRect, p = s.rootBounds,
|
|
4389
|
-
l.bottom <=
|
|
4392
|
+
const l = s.boundingClientRect, p = s.rootBounds, c = p ? p.top : 0, D = p ? p.bottom : window.innerHeight;
|
|
4393
|
+
l.bottom <= c ? r = "top" : l.top >= D && (r = "bottom");
|
|
4390
4394
|
}
|
|
4391
|
-
o.forEach((l) => l(s.isIntersecting,
|
|
4395
|
+
o.forEach((l) => l(s.isIntersecting, r));
|
|
4392
4396
|
}, t);
|
|
4393
4397
|
return u.observe(e), {
|
|
4394
4398
|
onWatchVisible: n,
|
|
@@ -4396,7 +4400,7 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4396
4400
|
u?.disconnect(), o.length = 0;
|
|
4397
4401
|
}
|
|
4398
4402
|
};
|
|
4399
|
-
},
|
|
4403
|
+
}, Os = (e) => {
|
|
4400
4404
|
const t = [], o = (u) => {
|
|
4401
4405
|
t.includes(u) || t.push(u);
|
|
4402
4406
|
}, n = new ResizeObserver(
|
|
@@ -4425,21 +4429,21 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4425
4429
|
return o && t.push(o), t;
|
|
4426
4430
|
}, Qs = (e) => {
|
|
4427
4431
|
const t = () => Vs(e.stickyTriggerSelector ?? `.${Ms}`), o = [], n = (D) => {
|
|
4428
|
-
let F,
|
|
4432
|
+
let F, d = D.style.display;
|
|
4429
4433
|
return {
|
|
4430
4434
|
insert: () => {
|
|
4431
|
-
F ? F.style.display =
|
|
4435
|
+
F ? F.style.display = d : (F = D.cloneNode(!0), D.parentElement?.insertBefore(F, D));
|
|
4432
4436
|
},
|
|
4433
4437
|
remove: () => {
|
|
4434
4438
|
F && D.parentElement?.contains(F) && D.parentElement?.removeChild(F), F = void 0;
|
|
4435
4439
|
},
|
|
4436
4440
|
hidden: () => {
|
|
4437
|
-
F && (
|
|
4441
|
+
F && (d = F.style.display, F.style.display = "none");
|
|
4438
4442
|
},
|
|
4439
4443
|
getCloneElement: () => F
|
|
4440
4444
|
};
|
|
4441
4445
|
}, u = (D) => D.style.display === "none", a = (D, F) => {
|
|
4442
|
-
const
|
|
4446
|
+
const d = N.cloneDeep(getComputedStyle(D)), { insert: f, hidden: m, remove: C, getCloneElement: h } = n(D);
|
|
4443
4447
|
o.push(C);
|
|
4444
4448
|
let v;
|
|
4445
4449
|
return {
|
|
@@ -4447,58 +4451,58 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4447
4451
|
if (go(D))
|
|
4448
4452
|
return;
|
|
4449
4453
|
f();
|
|
4450
|
-
const k = h(), { top:
|
|
4454
|
+
const k = h(), { top: x } = F.getBoundingClientRect(), { left: y, width: w } = D.getBoundingClientRect();
|
|
4451
4455
|
Ps(D), Object.assign(
|
|
4452
4456
|
D.style,
|
|
4453
4457
|
{
|
|
4454
4458
|
position: "fixed",
|
|
4455
|
-
top: `${
|
|
4459
|
+
top: `${x}px`,
|
|
4456
4460
|
left: `${y}px`,
|
|
4457
4461
|
width: `${w}px`,
|
|
4458
4462
|
zIndex: 100
|
|
4459
4463
|
},
|
|
4460
4464
|
I ?? {}
|
|
4461
4465
|
);
|
|
4462
|
-
const { onUpdate: A, onStop: V } =
|
|
4466
|
+
const { onUpdate: A, onStop: V } = Os(k);
|
|
4463
4467
|
A(() => {
|
|
4464
4468
|
if (!u(k)) {
|
|
4465
|
-
const { width: P, left:
|
|
4466
|
-
D.style.width = `${P}px`, D.style.left = `${
|
|
4469
|
+
const { width: P, left: O } = k.getBoundingClientRect();
|
|
4470
|
+
D.style.width = `${P}px`, D.style.left = `${O}px`;
|
|
4467
4471
|
}
|
|
4468
4472
|
}), v = V;
|
|
4469
4473
|
},
|
|
4470
4474
|
reset: () => {
|
|
4471
4475
|
Rs(D), Object.assign(D.style, {
|
|
4472
|
-
position:
|
|
4473
|
-
top:
|
|
4474
|
-
left:
|
|
4475
|
-
width:
|
|
4476
|
-
zIndex:
|
|
4476
|
+
position: d.position ?? "",
|
|
4477
|
+
top: d.top ?? "",
|
|
4478
|
+
left: d.left ?? "",
|
|
4479
|
+
width: d.width ?? "",
|
|
4480
|
+
zIndex: d.zIndex ?? ""
|
|
4477
4481
|
}), m(), v?.();
|
|
4478
4482
|
}
|
|
4479
4483
|
};
|
|
4480
|
-
}, s = (D, F,
|
|
4481
|
-
const { update: m, reset: C } = a(D,
|
|
4484
|
+
}, s = (D, F, d, f) => {
|
|
4485
|
+
const { update: m, reset: C } = a(D, d);
|
|
4482
4486
|
F((h, v) => {
|
|
4483
|
-
!h &&
|
|
4487
|
+
!h && d && v === "top" ? m(f) : C();
|
|
4484
4488
|
});
|
|
4485
|
-
},
|
|
4489
|
+
}, r = (D) => {
|
|
4486
4490
|
const F = t();
|
|
4487
4491
|
if (!F)
|
|
4488
4492
|
return;
|
|
4489
|
-
const { onWatchVisible:
|
|
4493
|
+
const { onWatchVisible: d, onStopWatchVisible: f } = Ls(D, { root: F }), { baseTableOperationElement: m, baseTableRef: C } = e;
|
|
4490
4494
|
if (!m.value)
|
|
4491
4495
|
return;
|
|
4492
|
-
s(m.value,
|
|
4496
|
+
s(m.value, d, F);
|
|
4493
4497
|
const h = Us(C.value?.$el), { top: v } = F.getBoundingClientRect(), { height: I } = m.value.getBoundingClientRect();
|
|
4494
4498
|
h.forEach(
|
|
4495
|
-
(k) => s(k,
|
|
4499
|
+
(k) => s(k, d, F, {
|
|
4496
4500
|
top: `${v + I}px`
|
|
4497
4501
|
})
|
|
4498
4502
|
), o.push(f);
|
|
4499
4503
|
}, l = () => {
|
|
4500
4504
|
const { baseTableOperationElement: D } = e;
|
|
4501
|
-
D.value &&
|
|
4505
|
+
D.value && r(Hs(D.value, "base-table-watch-sticky__operation"));
|
|
4502
4506
|
}, p = () => {
|
|
4503
4507
|
o.forEach((D) => D()), o.length = 0;
|
|
4504
4508
|
};
|
|
@@ -4517,10 +4521,10 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4517
4521
|
console.warn("ResizeObserver is not supported");
|
|
4518
4522
|
return;
|
|
4519
4523
|
}
|
|
4520
|
-
const a = () => uo(n) ?
|
|
4524
|
+
const a = () => uo(n) ? i(n()) : i(n), s = () => {
|
|
4521
4525
|
e = new ResizeObserver(([l]) => u(l)), e.observe(a());
|
|
4522
|
-
}, { stop:
|
|
4523
|
-
a() && (s(),
|
|
4526
|
+
}, { stop: r } = At(() => {
|
|
4527
|
+
a() && (s(), r?.());
|
|
4524
4528
|
});
|
|
4525
4529
|
}, o = () => {
|
|
4526
4530
|
e?.disconnect();
|
|
@@ -4572,7 +4576,7 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4572
4576
|
fit: { type: Boolean, default: !0 },
|
|
4573
4577
|
stripe: { type: Boolean },
|
|
4574
4578
|
border: { type: Boolean, default: !0 },
|
|
4575
|
-
rowKey: {},
|
|
4579
|
+
rowKey: { type: [String, Function], default: "id" },
|
|
4576
4580
|
context: {},
|
|
4577
4581
|
showHeader: { type: Boolean, default: !0 },
|
|
4578
4582
|
showSummary: { type: Boolean },
|
|
@@ -4627,19 +4631,19 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4627
4631
|
"changeGroup"
|
|
4628
4632
|
], ["update:selectList"]),
|
|
4629
4633
|
setup(e, { expose: t, emit: o }) {
|
|
4630
|
-
Te((
|
|
4631
|
-
|
|
4632
|
-
|
|
4634
|
+
Te((L) => ({
|
|
4635
|
+
"37090bd2": St.value,
|
|
4636
|
+
"2d13c73c": i(F)
|
|
4633
4637
|
}));
|
|
4634
|
-
const n = e, u = Ge(e, "selectList"), a = o, s = $t(), { baseTableEventMap:
|
|
4635
|
-
|
|
4638
|
+
const n = e, u = Ge(e, "selectList"), a = o, s = $t(), { baseTableEventMap: r } = Gs(a, (L, ...Z) => {
|
|
4639
|
+
L === "selection-change" && (u.value = Z[0]);
|
|
4636
4640
|
}), {
|
|
4637
4641
|
baseTableRef: l,
|
|
4638
4642
|
baseTableContainerRef: p,
|
|
4639
|
-
pagination:
|
|
4643
|
+
pagination: c,
|
|
4640
4644
|
getPaginationProps: D,
|
|
4641
4645
|
paginationWidth: F,
|
|
4642
|
-
tableData:
|
|
4646
|
+
tableData: d,
|
|
4643
4647
|
getTableAttrs: f,
|
|
4644
4648
|
getColumnAttrs: m,
|
|
4645
4649
|
specialColumnMap: C,
|
|
@@ -4647,13 +4651,13 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4647
4651
|
configColumnsDialogRef: v,
|
|
4648
4652
|
getParseOperationBtnList: I,
|
|
4649
4653
|
loadingConfigColumns: k,
|
|
4650
|
-
loadDataLoading:
|
|
4654
|
+
loadDataLoading: x,
|
|
4651
4655
|
groupId: y,
|
|
4652
4656
|
resetKey: w,
|
|
4653
4657
|
columnGroups: A,
|
|
4654
4658
|
changeGroupId: V,
|
|
4655
4659
|
editGroupByGroupId: P,
|
|
4656
|
-
deleteGroupByGroupId:
|
|
4660
|
+
deleteGroupByGroupId: O,
|
|
4657
4661
|
loadData: Y,
|
|
4658
4662
|
openConfigColumnDialog: $,
|
|
4659
4663
|
resetColumnsWidth: b
|
|
@@ -4661,41 +4665,41 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4661
4665
|
let ue = !1;
|
|
4662
4666
|
const ae = () => {
|
|
4663
4667
|
ue || (Y(), a("paginationChange"));
|
|
4664
|
-
}, De = async (
|
|
4665
|
-
ue = !0,
|
|
4668
|
+
}, De = async (L = !0) => {
|
|
4669
|
+
ue = !0, L && Object.assign(c.value, {
|
|
4666
4670
|
current: 1
|
|
4667
4671
|
}), await ne(), await Y(), a("refreshed"), await ne(), ue = !1;
|
|
4668
|
-
}, Q = T(), { start: me, reset:
|
|
4672
|
+
}, Q = T(), { start: me, reset: Pe } = Qs({
|
|
4669
4673
|
baseTableOperationElement: Q,
|
|
4670
4674
|
baseTableRef: l,
|
|
4671
4675
|
stickyTriggerSelector: n.stickyTriggerSelector
|
|
4672
|
-
}), Go = async (
|
|
4673
|
-
|
|
4674
|
-
},
|
|
4676
|
+
}), Go = async (L, Z) => {
|
|
4677
|
+
L === y.value && !Z || (V(L, Z), await Pe(), a("changeGroup", L));
|
|
4678
|
+
}, st = T(!1), It = async () => {
|
|
4675
4679
|
try {
|
|
4676
4680
|
n.autoLoad && await Y();
|
|
4677
4681
|
} finally {
|
|
4678
|
-
|
|
4682
|
+
st.value = !0;
|
|
4679
4683
|
}
|
|
4680
|
-
}, xo = () =>
|
|
4681
|
-
!k.value &&
|
|
4682
|
-
}), Po = G(() => (
|
|
4684
|
+
}, xo = () => c.value, kt = G(() => N.omit(c.value, "total")), Mo = Ue(() => {
|
|
4685
|
+
!k.value && st.value && (a("loaded"), n.stickyHeader && ne(me), Mo());
|
|
4686
|
+
}), Po = G(() => (L) => {
|
|
4683
4687
|
const Z = n.enableDragProps;
|
|
4684
|
-
return Z && (Array.isArray(Z) ? Z : [Z]).includes(
|
|
4688
|
+
return Z && (Array.isArray(Z) ? Z : [Z]).includes(L.prop || "") ? zt : "";
|
|
4685
4689
|
}), Ro = () => {
|
|
4686
4690
|
l.value?.clearSelection?.();
|
|
4687
|
-
}, No = G(() => !n.enableDragProps), Vo = (
|
|
4688
|
-
const { oldIndex: Z, newIndex: Ce } =
|
|
4689
|
-
Rt(Z) || Rt(Ce) || Z === Ce || a("drag", { oldIndex: Z, newIndex: Ce },
|
|
4690
|
-
},
|
|
4691
|
-
if (!Oe(
|
|
4691
|
+
}, No = G(() => !n.enableDragProps), Vo = (L) => {
|
|
4692
|
+
const { oldIndex: Z, newIndex: Ce } = L;
|
|
4693
|
+
Rt(Z) || Rt(Ce) || Z === Ce || a("drag", { oldIndex: Z, newIndex: Ce }, d.value);
|
|
4694
|
+
}, Lo = (L) => {
|
|
4695
|
+
if (!Oe(L.newIndex) && !Oe(L.oldIndex)) {
|
|
4692
4696
|
const Z = document.querySelectorAll(".el-table__row"), Ce = document.querySelector(".mainWrapper");
|
|
4693
|
-
if (!Z[
|
|
4694
|
-
const Ee = Z[
|
|
4695
|
-
Ee.bottom >= we.height ? Z[
|
|
4697
|
+
if (!Z[L.newIndex] || !Ce) return;
|
|
4698
|
+
const Ee = Z[L.newIndex].getBoundingClientRect(), we = Ce.getBoundingClientRect();
|
|
4699
|
+
Ee.bottom >= we.height ? Z[L.newIndex]?.scrollIntoView({
|
|
4696
4700
|
behavior: "smooth",
|
|
4697
4701
|
block: "center"
|
|
4698
|
-
}) : Ee.top <= 220 && Z[
|
|
4702
|
+
}) : Ee.top <= 220 && Z[L.newIndex]?.scrollIntoView({
|
|
4699
4703
|
behavior: "smooth",
|
|
4700
4704
|
block: "center"
|
|
4701
4705
|
});
|
|
@@ -4704,11 +4708,11 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4704
4708
|
Qe(async () => {
|
|
4705
4709
|
await ne(), n.formBuilder ? n.formBuilder.onColumnsLoaded(It) : await It();
|
|
4706
4710
|
});
|
|
4707
|
-
const
|
|
4708
|
-
const
|
|
4711
|
+
const Oo = () => {
|
|
4712
|
+
const L = Object.values(C).map((Z) => Z.prop);
|
|
4709
4713
|
return h.value.reduce((Z, Ce) => {
|
|
4710
4714
|
const { prop: Ee, exportProp: we } = Ce;
|
|
4711
|
-
return Ee && !
|
|
4715
|
+
return Ee && !L.includes(Ee) && (we ? (Array.isArray(we) ? we : [we]).forEach((Ye) => {
|
|
4712
4716
|
Z.includes(Ye) || Z.push(Ye);
|
|
4713
4717
|
}) : !Z.includes(Ee) && Z.push(Ee)), Z;
|
|
4714
4718
|
}, []);
|
|
@@ -4716,8 +4720,8 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4716
4720
|
return Ho(
|
|
4717
4721
|
() => l?.value?.$el,
|
|
4718
4722
|
() => {
|
|
4719
|
-
const { left:
|
|
4720
|
-
St.value = `${
|
|
4723
|
+
const { left: L } = l.value.$el.getBoundingClientRect();
|
|
4724
|
+
St.value = `${L + 3}px`;
|
|
4721
4725
|
}
|
|
4722
4726
|
), t({
|
|
4723
4727
|
loadData: Y,
|
|
@@ -4727,23 +4731,23 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4727
4731
|
clearSort: () => {
|
|
4728
4732
|
l.value?.clearSort();
|
|
4729
4733
|
},
|
|
4730
|
-
getExportColumnsProps:
|
|
4734
|
+
getExportColumnsProps: Oo,
|
|
4731
4735
|
elTable: l,
|
|
4732
|
-
getTableData: () =>
|
|
4733
|
-
}), (
|
|
4736
|
+
getTableData: () => d.value
|
|
4737
|
+
}), (L, Z) => {
|
|
4734
4738
|
const Ce = S("el-icon"), Ee = S("el-table-column"), we = S("el-table"), Tt = S("el-pagination"), Ye = Fe("loading");
|
|
4735
4739
|
return g(), _(K, null, [
|
|
4736
|
-
|
|
4740
|
+
M("div", {
|
|
4737
4741
|
ref_key: "baseTableContainerRef",
|
|
4738
4742
|
ref: p,
|
|
4739
4743
|
class: re([
|
|
4740
4744
|
"base-table__container z-table",
|
|
4741
4745
|
{
|
|
4742
|
-
"is-full-height":
|
|
4746
|
+
"is-full-height": L.fullHeight
|
|
4743
4747
|
}
|
|
4744
4748
|
])
|
|
4745
4749
|
}, [
|
|
4746
|
-
|
|
4750
|
+
L.hasDefaultOperation || u.value.length || s.header || s.operation ? (g(), _("div", {
|
|
4747
4751
|
key: 0,
|
|
4748
4752
|
ref_key: "baseTableOperationElement",
|
|
4749
4753
|
ref: Q,
|
|
@@ -4755,11 +4759,11 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4755
4759
|
"select-count",
|
|
4756
4760
|
{
|
|
4757
4761
|
"select-count--auto-width": !s.selectSlot,
|
|
4758
|
-
"select-count__hidden": !
|
|
4762
|
+
"select-count__hidden": !L.showSelectCount
|
|
4759
4763
|
}
|
|
4760
4764
|
])
|
|
4761
4765
|
}, [
|
|
4762
|
-
|
|
4766
|
+
L.showSelectCount ? (g(), _("div", {
|
|
4763
4767
|
key: 0,
|
|
4764
4768
|
class: re([
|
|
4765
4769
|
"select-count__count",
|
|
@@ -4771,71 +4775,71 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4771
4775
|
W(" 已选 " + q(u.value.length) + " 项 ", 1),
|
|
4772
4776
|
E(Ce, { onClick: Ro }, {
|
|
4773
4777
|
default: B(() => [
|
|
4774
|
-
E(
|
|
4778
|
+
E(i(ln))
|
|
4775
4779
|
]),
|
|
4776
4780
|
_: 1
|
|
4777
4781
|
})
|
|
4778
4782
|
], 2)) : z("", !0),
|
|
4779
|
-
pe(
|
|
4783
|
+
pe(L.$slots, "selectSlot", {}, void 0, !0)
|
|
4780
4784
|
], 2)) : z("", !0),
|
|
4781
4785
|
!s.selectSlot || !u.value.length ? (g(), _("div", Zs, [
|
|
4782
|
-
pe(
|
|
4786
|
+
pe(L.$slots, "header", { pagination: kt.value }, void 0, !0)
|
|
4783
4787
|
])) : z("", !0),
|
|
4784
|
-
|
|
4785
|
-
pe(
|
|
4786
|
-
(g(!0), _(K, null, se(
|
|
4788
|
+
L.hasDefaultOperation && (!s.selectSlot || !u.value.length) ? (g(), _("div", Ys, [
|
|
4789
|
+
pe(L.$slots, "operation", { pagination: kt.value }, void 0, !0),
|
|
4790
|
+
(g(!0), _(K, null, se(i(I), (le) => (g(), _(K, {
|
|
4787
4791
|
key: le.type
|
|
4788
4792
|
}, [
|
|
4789
|
-
le.type === "refresh" ? (g(), R(
|
|
4793
|
+
le.type === "refresh" ? (g(), R(Ft, {
|
|
4790
4794
|
key: 0,
|
|
4791
4795
|
tips: "刷新",
|
|
4792
|
-
src:
|
|
4793
|
-
onClick: Z[0] || (Z[0] = (
|
|
4796
|
+
src: i(xa),
|
|
4797
|
+
onClick: Z[0] || (Z[0] = (Re) => De(!1))
|
|
4794
4798
|
}, null, 8, ["src"])) : z("", !0),
|
|
4795
|
-
le.type === "resetColumnsWidth" ? (g(), R(
|
|
4799
|
+
le.type === "resetColumnsWidth" ? (g(), R(Ft, {
|
|
4796
4800
|
key: 1,
|
|
4797
|
-
src:
|
|
4801
|
+
src: i(Ma),
|
|
4798
4802
|
tips: "重置列宽",
|
|
4799
|
-
onClick:
|
|
4803
|
+
onClick: i(b)
|
|
4800
4804
|
}, null, 8, ["src", "onClick"])) : z("", !0),
|
|
4801
|
-
le.type === "configColumns" &&
|
|
4805
|
+
le.type === "configColumns" && L.columnConfig?.pageId ? (g(), R(As, {
|
|
4802
4806
|
key: 2,
|
|
4803
|
-
"group-id":
|
|
4804
|
-
"column-groups":
|
|
4807
|
+
"group-id": i(y),
|
|
4808
|
+
"column-groups": i(A),
|
|
4805
4809
|
"column-config": n.columnConfig,
|
|
4806
4810
|
onChange: Go,
|
|
4807
|
-
onEdit:
|
|
4808
|
-
onDelete:
|
|
4811
|
+
onEdit: i(P),
|
|
4812
|
+
onDelete: i(O)
|
|
4809
4813
|
}, null, 8, ["group-id", "column-groups", "column-config", "onEdit", "onDelete"])) : z("", !0)
|
|
4810
4814
|
], 64))), 128))
|
|
4811
4815
|
])) : z("", !0)
|
|
4812
4816
|
], 512)) : z("", !0),
|
|
4813
4817
|
de((g(), _("div", {
|
|
4814
|
-
key:
|
|
4818
|
+
key: i(w),
|
|
4815
4819
|
class: re([
|
|
4816
4820
|
"base-table__body",
|
|
4817
4821
|
{
|
|
4818
|
-
"base-table__body__fix-pagination": !
|
|
4819
|
-
"base-table__body__update-scroll":
|
|
4820
|
-
"base-table__body__auto-scroll-y":
|
|
4822
|
+
"base-table__body__fix-pagination": !L.whenFixedPaginationNoPadding && L.fixedPagination,
|
|
4823
|
+
"base-table__body__update-scroll": L.hasPagination && L.fixedPagination,
|
|
4824
|
+
"base-table__body__auto-scroll-y": L.autoScrollY
|
|
4821
4825
|
}
|
|
4822
4826
|
])
|
|
4823
4827
|
}, [
|
|
4824
|
-
!
|
|
4828
|
+
!i(k) && st.value ? (g(), R(i(qe), {
|
|
4825
4829
|
key: 0,
|
|
4826
|
-
modelValue:
|
|
4830
|
+
modelValue: i(d),
|
|
4827
4831
|
"onUpdate:modelValue": [
|
|
4828
|
-
Z[1] || (Z[1] = (le) => Ae(
|
|
4832
|
+
Z[1] || (Z[1] = (le) => Ae(d) ? d.value = le : null),
|
|
4829
4833
|
Z[2] || (Z[2] = (le) => a("update:tableData", le))
|
|
4830
4834
|
],
|
|
4831
4835
|
disabled: No.value,
|
|
4832
4836
|
class: "base-table__draggable",
|
|
4833
4837
|
target: ".base-table__table tbody",
|
|
4834
|
-
"item-key":
|
|
4835
|
-
handle: `.${
|
|
4836
|
-
animation:
|
|
4838
|
+
"item-key": L.draggableAttrs?.idKey ?? L.rowKey ?? "id",
|
|
4839
|
+
handle: `.${i(zt)}`,
|
|
4840
|
+
animation: L.draggableAttrs?.animation ?? 150,
|
|
4837
4841
|
onEnd: Vo,
|
|
4838
|
-
onChange:
|
|
4842
|
+
onChange: Lo
|
|
4839
4843
|
}, {
|
|
4840
4844
|
default: B(() => [
|
|
4841
4845
|
E(we, oe({
|
|
@@ -4844,42 +4848,42 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4844
4848
|
class: [
|
|
4845
4849
|
"base-table__table",
|
|
4846
4850
|
{
|
|
4847
|
-
"el-table__outside-border":
|
|
4848
|
-
"is-empty__table": !
|
|
4851
|
+
"el-table__outside-border": L.border,
|
|
4852
|
+
"is-empty__table": !i(d).length
|
|
4849
4853
|
}
|
|
4850
4854
|
]
|
|
4851
|
-
},
|
|
4852
|
-
"header-cell-style":
|
|
4853
|
-
data:
|
|
4855
|
+
}, i(f), {
|
|
4856
|
+
"header-cell-style": i(hs),
|
|
4857
|
+
data: i(d),
|
|
4854
4858
|
"show-overflow-tooltip": ""
|
|
4855
|
-
}, be(r
|
|
4859
|
+
}, be(i(r))), {
|
|
4856
4860
|
empty: B(() => [
|
|
4857
|
-
pe(
|
|
4861
|
+
pe(L.$slots, "empty", {}, () => [
|
|
4858
4862
|
E(co)
|
|
4859
4863
|
], !0)
|
|
4860
4864
|
]),
|
|
4861
4865
|
default: B(() => [
|
|
4862
|
-
(g(!0), _(K, null, se(
|
|
4866
|
+
(g(!0), _(K, null, se(i(h), (le) => (g(), R(Ee, oe({ ref_for: !0 }, i(m)(le), {
|
|
4863
4867
|
key: le.prop,
|
|
4864
4868
|
"class-name": `${Po.value(le)} ${le.className ?? ""}`
|
|
4865
4869
|
}), {
|
|
4866
|
-
header: B(({ column:
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
E(
|
|
4870
|
+
header: B(({ column: Re, $index: lt }) => [
|
|
4871
|
+
M("div", Xs, [
|
|
4872
|
+
M("div", Ws, [
|
|
4873
|
+
E(i(Is), {
|
|
4870
4874
|
column: le,
|
|
4871
|
-
"header-column":
|
|
4872
|
-
index:
|
|
4875
|
+
"header-column": Re,
|
|
4876
|
+
index: lt
|
|
4873
4877
|
}, null, 8, ["column", "header-column", "index"])
|
|
4874
4878
|
])
|
|
4875
4879
|
])
|
|
4876
4880
|
]),
|
|
4877
|
-
default: B(({ row:
|
|
4878
|
-
!le.type || !
|
|
4881
|
+
default: B(({ row: Re, $index: lt }) => [
|
|
4882
|
+
!le.type || !i(C)[le.type] ? (g(), R(i(ws), {
|
|
4879
4883
|
key: 0,
|
|
4880
4884
|
column: le,
|
|
4881
|
-
row:
|
|
4882
|
-
data: { ...
|
|
4885
|
+
row: Re,
|
|
4886
|
+
data: { ...Re, $index: lt, $tableData: i(d), $defaultSort: L.defaultSort, $rowKey: L.rowKey }
|
|
4883
4887
|
}, null, 8, ["column", "row", "data"])) : z("", !0)
|
|
4884
4888
|
]),
|
|
4885
4889
|
_: 2
|
|
@@ -4891,22 +4895,22 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4891
4895
|
_: 3
|
|
4892
4896
|
}, 8, ["modelValue", "disabled", "item-key", "handle", "animation"])) : z("", !0)
|
|
4893
4897
|
], 2)), [
|
|
4894
|
-
[Ye,
|
|
4898
|
+
[Ye, i(k) || i(x)]
|
|
4895
4899
|
]),
|
|
4896
|
-
|
|
4897
|
-
|
|
4900
|
+
L.hasPagination ? (g(), _("div", js, [
|
|
4901
|
+
M("div", {
|
|
4898
4902
|
class: re({
|
|
4899
|
-
"base-table__pagination-fixed":
|
|
4903
|
+
"base-table__pagination-fixed": L.fixedPagination,
|
|
4900
4904
|
"base-table__base-pagination": !0,
|
|
4901
|
-
"base-table__pagination-right":
|
|
4905
|
+
"base-table__pagination-right": L.paginationPosition === "right"
|
|
4902
4906
|
})
|
|
4903
4907
|
}, [
|
|
4904
|
-
E(Tt, oe(
|
|
4905
|
-
"current-page":
|
|
4906
|
-
"onUpdate:currentPage": Z[3] || (Z[3] = (le) =>
|
|
4907
|
-
"page-size":
|
|
4908
|
-
"onUpdate:pageSize": Z[4] || (Z[4] = (le) =>
|
|
4909
|
-
total:
|
|
4908
|
+
E(Tt, oe(i(D), {
|
|
4909
|
+
"current-page": i(c).current,
|
|
4910
|
+
"onUpdate:currentPage": Z[3] || (Z[3] = (le) => i(c).current = le),
|
|
4911
|
+
"page-size": i(c).size,
|
|
4912
|
+
"onUpdate:pageSize": Z[4] || (Z[4] = (le) => i(c).size = le),
|
|
4913
|
+
total: i(c).total,
|
|
4910
4914
|
onChange: ae
|
|
4911
4915
|
}), null, 16, ["current-page", "page-size", "total"])
|
|
4912
4916
|
], 2)
|
|
@@ -4918,16 +4922,16 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4918
4922
|
"column-config": n.columnConfig,
|
|
4919
4923
|
onSaveColumns: Z[5] || (Z[5] = (le) => a("saveColumns"))
|
|
4920
4924
|
}, null, 8, ["column-config"]),
|
|
4921
|
-
|
|
4925
|
+
L.enableColumnSearch ? (g(), R(Ds, {
|
|
4922
4926
|
key: 0,
|
|
4923
|
-
count:
|
|
4924
|
-
onFind:
|
|
4925
|
-
onHidden:
|
|
4927
|
+
count: i(H),
|
|
4928
|
+
onFind: i(U),
|
|
4929
|
+
onHidden: i(j)
|
|
4926
4930
|
}, null, 8, ["count", "onFind", "onHidden"])) : z("", !0)
|
|
4927
4931
|
], 64);
|
|
4928
4932
|
};
|
|
4929
4933
|
}
|
|
4930
|
-
}), qs = /* @__PURE__ */ te(Ks, [["__scopeId", "data-v-
|
|
4934
|
+
}), qs = /* @__PURE__ */ te(Ks, [["__scopeId", "data-v-e56819ff"]]), Js = ge(qs, "ZTable"), $s = ge(wo, "ZTableLinkButton"), el = { class: "z-tips-form-item__container" }, tl = /* @__PURE__ */ X({
|
|
4931
4935
|
name: "ZTipsFormItem",
|
|
4932
4936
|
__name: "index",
|
|
4933
4937
|
props: {
|
|
@@ -4944,28 +4948,28 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4944
4948
|
o("click");
|
|
4945
4949
|
};
|
|
4946
4950
|
return (u, a) => {
|
|
4947
|
-
const s = S("el-icon"),
|
|
4951
|
+
const s = S("el-icon"), r = S("el-tooltip"), l = S("el-form-item");
|
|
4948
4952
|
return g(), R(l, {
|
|
4949
4953
|
class: "z-tips-form-item__form-item",
|
|
4950
4954
|
prop: u.prop
|
|
4951
4955
|
}, {
|
|
4952
4956
|
label: B(() => [
|
|
4953
|
-
|
|
4957
|
+
M("div", el, [
|
|
4954
4958
|
W(q(u.label) + " ", 1),
|
|
4955
|
-
u.content ? (g(), R(
|
|
4959
|
+
u.content ? (g(), R(r, {
|
|
4956
4960
|
key: 0,
|
|
4957
4961
|
content: u.content,
|
|
4958
4962
|
placement: "top",
|
|
4959
4963
|
"raw-content": u.rawContent
|
|
4960
4964
|
}, {
|
|
4961
4965
|
default: B(() => [
|
|
4962
|
-
|
|
4966
|
+
M("div", {
|
|
4963
4967
|
class: "tips__icon",
|
|
4964
4968
|
onClick: ye(n, ["stop", "prevent"])
|
|
4965
4969
|
}, [
|
|
4966
4970
|
E(s, null, {
|
|
4967
4971
|
default: B(() => [
|
|
4968
|
-
E(
|
|
4972
|
+
E(i(Nt))
|
|
4969
4973
|
]),
|
|
4970
4974
|
_: 1
|
|
4971
4975
|
})
|
|
@@ -4980,7 +4984,7 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
4980
4984
|
}, [
|
|
4981
4985
|
E(s, null, {
|
|
4982
4986
|
default: B(() => [
|
|
4983
|
-
E(
|
|
4987
|
+
E(i(Nt))
|
|
4984
4988
|
]),
|
|
4985
4989
|
_: 1
|
|
4986
4990
|
}),
|
|
@@ -5021,7 +5025,7 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
5021
5025
|
});
|
|
5022
5026
|
}, s = (l) => {
|
|
5023
5027
|
l.style.maxHeight = "", l.style.opacity = "";
|
|
5024
|
-
},
|
|
5028
|
+
}, r = G(() => !Oe(e.visible));
|
|
5025
5029
|
return (l, p) => (g(), R(eo, {
|
|
5026
5030
|
name: "z-transition-fade-height",
|
|
5027
5031
|
onBeforeEnter: t,
|
|
@@ -5032,7 +5036,7 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
5032
5036
|
onAfterLeave: s
|
|
5033
5037
|
}, {
|
|
5034
5038
|
default: B(() => [
|
|
5035
|
-
!
|
|
5039
|
+
!r.value || l.visible ? (g(), _("div", ul, [
|
|
5036
5040
|
pe(l.$slots, "default", {}, void 0, !0)
|
|
5037
5041
|
])) : z("", !0)
|
|
5038
5042
|
]),
|
|
@@ -5075,7 +5079,7 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
5075
5079
|
o.visible ? (g(), _("div", {
|
|
5076
5080
|
key: 0,
|
|
5077
5081
|
class: "z-fade-slide__container",
|
|
5078
|
-
style:
|
|
5082
|
+
style: ht(t.value)
|
|
5079
5083
|
}, [
|
|
5080
5084
|
pe(o.$slots, "default", {}, void 0, !0)
|
|
5081
5085
|
], 4)) : z("", !0)
|
|
@@ -5109,9 +5113,9 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
5109
5113
|
if (document.execCommand)
|
|
5110
5114
|
document.execCommand("insertText", !1, u);
|
|
5111
5115
|
else {
|
|
5112
|
-
const { selectionStart: a, selectionEnd: s, value:
|
|
5116
|
+
const { selectionStart: a, selectionEnd: s, value: r } = e, l = r.length;
|
|
5113
5117
|
if (l) {
|
|
5114
|
-
e.value =
|
|
5118
|
+
e.value = r.substring(0, a ?? 0) + u + r.substring(s ?? l);
|
|
5115
5119
|
const p = (a ?? 0) + u.length;
|
|
5116
5120
|
ne().then(() => {
|
|
5117
5121
|
e.setSelectionRange(p, p);
|
|
@@ -5136,10 +5140,10 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
5136
5140
|
const t = e.querySelector(".el-input__wrapper > input") || e, o = () => {
|
|
5137
5141
|
const u = t.value, a = Xt(u);
|
|
5138
5142
|
if (u !== a) {
|
|
5139
|
-
const s = t.selectionStart,
|
|
5143
|
+
const s = t.selectionStart, r = t.selectionEnd;
|
|
5140
5144
|
t.value = a;
|
|
5141
5145
|
const l = u.length - a.length;
|
|
5142
|
-
s &&
|
|
5146
|
+
s && r && t.setSelectionRange(s - l, r - l), So(t);
|
|
5143
5147
|
}
|
|
5144
5148
|
};
|
|
5145
5149
|
t.addEventListener("input", o), e._handleInput = o;
|
|
@@ -5173,15 +5177,15 @@ const lt = (e) => typeof e == "boolean" ? e ? "left" : void 0 : e, ks = (e) => {
|
|
|
5173
5177
|
}, Fl = (e) => ({
|
|
5174
5178
|
...gl,
|
|
5175
5179
|
...e ?? {}
|
|
5176
|
-
}), Cl = "1.0.
|
|
5180
|
+
}), Cl = "1.0.4", hl = {
|
|
5177
5181
|
version: Cl
|
|
5178
5182
|
};
|
|
5179
5183
|
function Ql(e, t, o) {
|
|
5180
5184
|
if (Ke(e))
|
|
5181
5185
|
for (const [n, u] of Object.entries(e))
|
|
5182
|
-
|
|
5186
|
+
pt(n, u);
|
|
5183
5187
|
else
|
|
5184
|
-
|
|
5188
|
+
pt(e, { component: o, defaultPraseStrategy: t });
|
|
5185
5189
|
}
|
|
5186
5190
|
function zl(e) {
|
|
5187
5191
|
return ho(e);
|
|
@@ -5191,7 +5195,7 @@ const Al = (e, t) => {
|
|
|
5191
5195
|
return e?.length && n.value.setBaseColumnsGetter(() => fe(e)), t?.baseTableRef && n.value.onChange(() => {
|
|
5192
5196
|
t.baseTableRef?.value?.refresh();
|
|
5193
5197
|
}), {
|
|
5194
|
-
formBuilder:
|
|
5198
|
+
formBuilder: i(n)
|
|
5195
5199
|
};
|
|
5196
5200
|
}, Zl = (e, t) => {
|
|
5197
5201
|
const { formBuilder: o } = Al([], t);
|
|
@@ -5207,6 +5211,26 @@ const Al = (e, t) => {
|
|
|
5207
5211
|
}, Wl = (e, t) => (o) => {
|
|
5208
5212
|
const [n, u] = o, a = {};
|
|
5209
5213
|
return e && Reflect.set(a, e, u), t && Reflect.set(a, t, n), a;
|
|
5214
|
+
}, jl = () => {
|
|
5215
|
+
const e = () => document.body, t = [];
|
|
5216
|
+
function o(u, a, s, r) {
|
|
5217
|
+
let l, p, c, D;
|
|
5218
|
+
if (typeof u == "string" ? (l = e(), p = u, c = a, D = s) : (l = u, p = a, c = s, D = r), !l)
|
|
5219
|
+
return () => {
|
|
5220
|
+
};
|
|
5221
|
+
l.addEventListener(p, c, D);
|
|
5222
|
+
const F = { target: l, event: p, fn: c, options: D };
|
|
5223
|
+
return t.push(F), () => {
|
|
5224
|
+
l.removeEventListener(p, c, D), t.splice(t.indexOf(F), 1);
|
|
5225
|
+
};
|
|
5226
|
+
}
|
|
5227
|
+
const n = () => {
|
|
5228
|
+
t.forEach(({ target: u, event: a, fn: s, options: r }) => u.removeEventListener(a, s, r)), t.length = 0;
|
|
5229
|
+
};
|
|
5230
|
+
return xe(n), nt() && ut(n), {
|
|
5231
|
+
stop: n,
|
|
5232
|
+
on: o
|
|
5233
|
+
};
|
|
5210
5234
|
};
|
|
5211
5235
|
var vl = /* @__PURE__ */ ((e) => (e.CONFIRM = "dialog:confirm", e.CANCEL = "dialog:cancel", e))(vl || {});
|
|
5212
5236
|
const Wt = "__dialog_root__", jt = () => {
|
|
@@ -5231,18 +5255,18 @@ const Wt = "__dialog_root__", jt = () => {
|
|
|
5231
5255
|
unmount: t
|
|
5232
5256
|
};
|
|
5233
5257
|
};
|
|
5234
|
-
let
|
|
5235
|
-
const Kt = () => `z-dialog-${
|
|
5236
|
-
class
|
|
5258
|
+
let ct = 0;
|
|
5259
|
+
const Kt = () => `z-dialog-${ct >= Number.MAX_SAFE_INTEGER ? ct = 0 : ++ct}`;
|
|
5260
|
+
class Kl extends Error {
|
|
5237
5261
|
}
|
|
5238
5262
|
const qt = (e) => {
|
|
5239
5263
|
const [t, ...o] = e.toString();
|
|
5240
5264
|
return `on${t.toUpperCase() + o.join("")}`;
|
|
5241
|
-
}, tt = T(/* @__PURE__ */ new Map()),
|
|
5265
|
+
}, tt = T(/* @__PURE__ */ new Map()), ql = () => {
|
|
5242
5266
|
tt.value.forEach((e) => {
|
|
5243
5267
|
e.forEach((t) => t.cleanup());
|
|
5244
5268
|
}), tt.value.clear();
|
|
5245
|
-
},
|
|
5269
|
+
}, Jl = () => {
|
|
5246
5270
|
to()?.appContext || console.warn("useOpenDialog must be called in setup");
|
|
5247
5271
|
const t = Kt(), o = T([]);
|
|
5248
5272
|
Ue(() => {
|
|
@@ -5250,27 +5274,27 @@ const qt = (e) => {
|
|
|
5250
5274
|
});
|
|
5251
5275
|
const { mount: n } = El(), u = pn(), a = (l, p) => {
|
|
5252
5276
|
if (l) {
|
|
5253
|
-
const
|
|
5254
|
-
if (
|
|
5277
|
+
const c = o.value.findIndex((D) => D.id === l);
|
|
5278
|
+
if (c > -1)
|
|
5255
5279
|
if (p)
|
|
5256
|
-
o.value[
|
|
5280
|
+
o.value[c].cleanup(), o.value.splice(c, 1);
|
|
5257
5281
|
else {
|
|
5258
|
-
for (let D =
|
|
5282
|
+
for (let D = c; D < o.value.length; D++)
|
|
5259
5283
|
o.value[D].cleanup();
|
|
5260
|
-
o.value.splice(
|
|
5284
|
+
o.value.splice(c);
|
|
5261
5285
|
}
|
|
5262
5286
|
} else
|
|
5263
|
-
o.value.forEach((
|
|
5264
|
-
|
|
5287
|
+
o.value.forEach((c) => {
|
|
5288
|
+
c.cleanup();
|
|
5265
5289
|
}), o.value = [];
|
|
5266
|
-
}, s = async (l, p,
|
|
5290
|
+
}, s = async (l, p, c, D) => {
|
|
5267
5291
|
const F = Qn(l) ? Jo({
|
|
5268
5292
|
loader: l,
|
|
5269
5293
|
delay: 0
|
|
5270
5294
|
// 立即加载
|
|
5271
5295
|
}) : l;
|
|
5272
5296
|
await ne();
|
|
5273
|
-
const
|
|
5297
|
+
const d = c ?? Kt(), f = document.createElement("div");
|
|
5274
5298
|
return new Promise((m, C) => {
|
|
5275
5299
|
const h = D?.notCloseBeforeRouteChange ? null : ot(
|
|
5276
5300
|
() => u.fullPath,
|
|
@@ -5283,7 +5307,7 @@ const qt = (e) => {
|
|
|
5283
5307
|
modelValue: !0,
|
|
5284
5308
|
"onUpdate:modelValue": (I) => {
|
|
5285
5309
|
I || ne(() => {
|
|
5286
|
-
o.value.find((k) => k.id ===
|
|
5310
|
+
o.value.find((k) => k.id === d) && (a(d), C());
|
|
5287
5311
|
});
|
|
5288
5312
|
},
|
|
5289
5313
|
[qt(
|
|
@@ -5302,7 +5326,7 @@ const qt = (e) => {
|
|
|
5302
5326
|
f
|
|
5303
5327
|
);
|
|
5304
5328
|
o.value.push({
|
|
5305
|
-
id:
|
|
5329
|
+
id: d,
|
|
5306
5330
|
cleanup: () => {
|
|
5307
5331
|
v(f), h?.();
|
|
5308
5332
|
}
|
|
@@ -5312,7 +5336,7 @@ const qt = (e) => {
|
|
|
5312
5336
|
return {
|
|
5313
5337
|
openDialog: s,
|
|
5314
5338
|
closeDialog: a,
|
|
5315
|
-
openDialogIgnoreRouteChange: (l, p,
|
|
5339
|
+
openDialogIgnoreRouteChange: (l, p, c, D) => s(l, p, c, { ...D, notCloseBeforeRouteChange: !0 })
|
|
5316
5340
|
};
|
|
5317
5341
|
}, yl = (e, t) => {
|
|
5318
5342
|
const o = Fl(t);
|
|
@@ -5320,19 +5344,19 @@ const qt = (e) => {
|
|
|
5320
5344
|
const a = Reflect.get(Yt, u);
|
|
5321
5345
|
a.install ? e.use(a, t) : console.error(`组件${u}不存在`);
|
|
5322
5346
|
}), o.injectDirective && e.use(fl);
|
|
5323
|
-
},
|
|
5347
|
+
}, $l = {
|
|
5324
5348
|
install: yl,
|
|
5325
5349
|
version: hl.version
|
|
5326
5350
|
};
|
|
5327
5351
|
export {
|
|
5328
|
-
|
|
5352
|
+
Ol as $alert,
|
|
5329
5353
|
Eo as $confirm,
|
|
5330
|
-
|
|
5331
|
-
|
|
5354
|
+
ft as $error,
|
|
5355
|
+
Ll as $loadingConfirm,
|
|
5332
5356
|
Yu as $success,
|
|
5333
5357
|
Xu as $warning,
|
|
5334
5358
|
Zn as BaseCascader,
|
|
5335
|
-
|
|
5359
|
+
Dt as BaseDate,
|
|
5336
5360
|
Kn as BaseDateRangeAndSelectGroup,
|
|
5337
5361
|
Co as BaseFormItem,
|
|
5338
5362
|
qn as BaseInput,
|
|
@@ -5355,18 +5379,18 @@ export {
|
|
|
5355
5379
|
Eu as MAX_MONEY,
|
|
5356
5380
|
Ms as STICKY_CONTAINER_CLASS,
|
|
5357
5381
|
zt as TABLE_DRAGGABLE_CLASS,
|
|
5358
|
-
|
|
5382
|
+
rt as TABLE_EMPTY_NODE,
|
|
5359
5383
|
_o as TABLE_EMPTY_VALUE,
|
|
5360
5384
|
hs as TABLE_HEADER_CELL_STYLE,
|
|
5361
5385
|
Fs as TEMP_GROUP_ID,
|
|
5362
|
-
|
|
5386
|
+
Kl as UseDialogError,
|
|
5363
5387
|
gn as ZAutoTooltip,
|
|
5364
5388
|
hn as ZCircleText,
|
|
5365
5389
|
bn as ZClassifyTitle,
|
|
5366
5390
|
wn as ZEmpty,
|
|
5367
5391
|
fa as ZForm,
|
|
5368
5392
|
Ea as ZHorizontalStep,
|
|
5369
|
-
|
|
5393
|
+
Ft as ZOperationIconButton,
|
|
5370
5394
|
ba as ZPlusBold,
|
|
5371
5395
|
Ga as ZShowToTags,
|
|
5372
5396
|
Js as ZTable,
|
|
@@ -5374,14 +5398,14 @@ export {
|
|
|
5374
5398
|
nl as ZTipsFormItem,
|
|
5375
5399
|
ll as ZTransitionFadeHeight,
|
|
5376
5400
|
cl as ZTransitionFadeSlide,
|
|
5377
|
-
|
|
5378
|
-
|
|
5401
|
+
Ot as baseFormComponents,
|
|
5402
|
+
ql as closeAllDialog,
|
|
5379
5403
|
ho as createBaseFormItem,
|
|
5380
5404
|
bo as createBaseTableColumn,
|
|
5381
5405
|
Hl as createBaseTableColumns,
|
|
5382
5406
|
zl as createCustomFormItem,
|
|
5383
5407
|
Ul as createSortColumn,
|
|
5384
|
-
|
|
5408
|
+
$l as default,
|
|
5385
5409
|
Ql as defineCustomFormComponent,
|
|
5386
5410
|
Yl as formatArrayKeyToObjectValue,
|
|
5387
5411
|
Wl as formatGroupSelectInputToObject,
|
|
@@ -5389,7 +5413,7 @@ export {
|
|
|
5389
5413
|
xl as formatSecond,
|
|
5390
5414
|
Ml as formatSeconds,
|
|
5391
5415
|
Xl as formatSelectAndInputGroupValue,
|
|
5392
|
-
|
|
5416
|
+
Ln as getAppointDateRange,
|
|
5393
5417
|
po as getCurrentDateRange,
|
|
5394
5418
|
Pl as getDaysRange,
|
|
5395
5419
|
ce as getRecentDateRange,
|
|
@@ -5405,14 +5429,15 @@ export {
|
|
|
5405
5429
|
je as specialColumnMap,
|
|
5406
5430
|
So as triggerEvent,
|
|
5407
5431
|
Xt as trimEmoji,
|
|
5408
|
-
|
|
5432
|
+
Le as uiConfigService,
|
|
5409
5433
|
Gl as updateEllipsisTooltipConfig,
|
|
5410
|
-
|
|
5434
|
+
gt as useAsyncLoader,
|
|
5411
5435
|
Ts as useBaseTable,
|
|
5412
5436
|
Al as useCreateFormBuilder,
|
|
5413
5437
|
Zl as useDynamicCreateFormBuilder,
|
|
5438
|
+
jl as useEvent,
|
|
5414
5439
|
ls as useListenEvent,
|
|
5415
|
-
|
|
5440
|
+
Jl as useOpenDialog,
|
|
5416
5441
|
Ze as useOptions,
|
|
5417
5442
|
zs as useResizeObserver,
|
|
5418
5443
|
Qs as useTableSticky,
|