vue-2024-ui 0.1.18 → 0.1.19
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.es.js +984 -949
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { mergeModels as ze, useModel as Pe, ref as le, nextTick as et, onMounted as ut, computed as
|
|
3
|
-
import { Plus as Xt, ZoomIn as Gt, Delete as Qt,
|
|
4
|
-
import
|
|
5
|
-
import { Dexie as
|
|
6
|
-
var
|
|
1
|
+
import It, { ElForm as ct, ElButtonGroup as mt, ElButton as De, ElPopover as ht, ElMessage as xe, ElMessageBox as Vt, ElDialog as Bt, ElDrawer as Yt } from "element-plus";
|
|
2
|
+
import { mergeModels as ze, useModel as Pe, ref as le, nextTick as et, onMounted as ut, computed as Je, resolveComponent as B, openBlock as n, createElementBlock as x, Fragment as W, createElementVNode as X, createBlock as D, createCommentVNode as pe, unref as U, mergeProps as T, withCtx as y, renderSlot as h, renderList as R, createTextVNode as Me, toDisplayString as he, createSlots as me, createVNode as Z, normalizeProps as gt, useSlots as Tt, inject as _t, useAttrs as kt, onUnmounted as Ut, normalizeStyle as Oe, withModifiers as rt, resolveDynamicComponent as Ye, guardReactiveProps as Rt, Transition as Lt, withDirectives as jt, vShow as Ht, h as Ie, onBeforeUnmount as Nt, normalizeClass as St, watchEffect as zt, watch as Pt, createApp as Wt } from "vue";
|
|
3
|
+
import { Plus as Xt, ZoomIn as Gt, Delete as Qt, DocumentCopy as Zt, FullScreen as Jt, CopyDocument as Kt } from "@element-plus/icons-vue";
|
|
4
|
+
import Ft from "sortablejs";
|
|
5
|
+
import { Dexie as el } from "dexie";
|
|
6
|
+
var tl = {
|
|
7
7
|
name: "zh-cn",
|
|
8
8
|
el: {
|
|
9
9
|
breadcrumb: {
|
|
@@ -131,7 +131,7 @@ var el = {
|
|
|
131
131
|
close: "关闭此对话框"
|
|
132
132
|
},
|
|
133
133
|
upload: {
|
|
134
|
-
deleteTip: "按
|
|
134
|
+
deleteTip: "按 Delete 键可删除",
|
|
135
135
|
delete: "删除",
|
|
136
136
|
preview: "查看图片",
|
|
137
137
|
continue: "继续上传"
|
|
@@ -180,16 +180,16 @@ var el = {
|
|
|
180
180
|
indicator: "幻灯片切换至索引 {index}"
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
},
|
|
184
|
-
function
|
|
185
|
-
return
|
|
183
|
+
}, ll = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
184
|
+
function al(i) {
|
|
185
|
+
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
186
186
|
}
|
|
187
187
|
var xt = { exports: {} };
|
|
188
|
-
(function(
|
|
189
|
-
(function(
|
|
190
|
-
|
|
191
|
-
})(
|
|
192
|
-
var
|
|
188
|
+
(function(i, f) {
|
|
189
|
+
(function(r, t) {
|
|
190
|
+
i.exports = t();
|
|
191
|
+
})(ll, function() {
|
|
192
|
+
var r = 1e3, t = 6e4, e = 36e5, d = "millisecond", E = "second", S = "minute", F = "hour", _ = "day", w = "week", H = "month", ee = "quarter", O = "year", Y = "date", ie = "Invalid Date", oe = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, J = /\[([^\]]+)]|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, ve = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(p) {
|
|
193
193
|
var a = ["th", "st", "nd", "rd"], v = p % 100;
|
|
194
194
|
return "[" + p + (a[(v - 20) % 10] || a[v] || a[0]) + "]";
|
|
195
195
|
} }, ge = function(p, a, v) {
|
|
@@ -205,13 +205,13 @@ var xt = { exports: {} };
|
|
|
205
205
|
}, a: function(p) {
|
|
206
206
|
return p < 0 ? Math.ceil(p) || 0 : Math.floor(p);
|
|
207
207
|
}, p: function(p) {
|
|
208
|
-
return { M: H, y: O, w, d:
|
|
208
|
+
return { M: H, y: O, w, d: _, D: Y, h: F, m: S, s: E, ms: d, Q: ee }[p] || String(p || "").toLowerCase().replace(/s$/, "");
|
|
209
209
|
}, u: function(p) {
|
|
210
210
|
return p === void 0;
|
|
211
211
|
} }, de = "en", fe = {};
|
|
212
212
|
fe[de] = ve;
|
|
213
213
|
var ne = "$isDayjsObject", ae = function(p) {
|
|
214
|
-
return p instanceof
|
|
214
|
+
return p instanceof o || !(!p || !p[ne]);
|
|
215
215
|
}, $e = function p(a, v, g) {
|
|
216
216
|
var s;
|
|
217
217
|
if (!a) return de;
|
|
@@ -221,19 +221,19 @@ var xt = { exports: {} };
|
|
|
221
221
|
var C = a.split("-");
|
|
222
222
|
if (!s && C.length > 1) return p(C[0]);
|
|
223
223
|
} else {
|
|
224
|
-
var
|
|
225
|
-
fe[
|
|
224
|
+
var L = a.name;
|
|
225
|
+
fe[L] = a, s = L;
|
|
226
226
|
}
|
|
227
227
|
return !g && s && (de = s), s || !g && de;
|
|
228
228
|
}, se = function(p, a) {
|
|
229
229
|
if (ae(p)) return p.clone();
|
|
230
230
|
var v = typeof a == "object" ? a : {};
|
|
231
|
-
return v.date = p, v.args = arguments, new
|
|
231
|
+
return v.date = p, v.args = arguments, new o(v);
|
|
232
232
|
}, b = be;
|
|
233
233
|
b.l = $e, b.i = ae, b.w = function(p, a) {
|
|
234
234
|
return se(p, { locale: a.$L, utc: a.$u, x: a.$x, $offset: a.$offset });
|
|
235
235
|
};
|
|
236
|
-
var
|
|
236
|
+
var o = function() {
|
|
237
237
|
function p(v) {
|
|
238
238
|
this.$L = $e(v.locale, null, !0), this.parse(v), this.$x = this.$x || v.x || {}, this[ne] = !0;
|
|
239
239
|
}
|
|
@@ -245,10 +245,10 @@ var xt = { exports: {} };
|
|
|
245
245
|
if (b.u(s)) return /* @__PURE__ */ new Date();
|
|
246
246
|
if (s instanceof Date) return new Date(s);
|
|
247
247
|
if (typeof s == "string" && !/Z$/i.test(s)) {
|
|
248
|
-
var C = s.match(
|
|
248
|
+
var C = s.match(oe);
|
|
249
249
|
if (C) {
|
|
250
|
-
var
|
|
251
|
-
return M ? new Date(Date.UTC(C[1],
|
|
250
|
+
var L = C[2] - 1 || 0, Q = (C[7] || "0").substring(0, 3);
|
|
251
|
+
return M ? new Date(Date.UTC(C[1], L, C[3] || 1, C[4] || 0, C[5] || 0, C[6] || 0, Q)) : new Date(C[1], L, C[3] || 1, C[4] || 0, C[5] || 0, C[6] || 0, Q);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
return new Date(s);
|
|
@@ -274,40 +274,40 @@ var xt = { exports: {} };
|
|
|
274
274
|
}, a.valueOf = function() {
|
|
275
275
|
return this.$d.getTime();
|
|
276
276
|
}, a.startOf = function(v, g) {
|
|
277
|
-
var s = this, M = !!b.u(g) || g, C = b.p(v),
|
|
278
|
-
var
|
|
279
|
-
return M ?
|
|
280
|
-
},
|
|
281
|
-
return b.w(s.toDate()[
|
|
282
|
-
}, q = this.$W, A = this.$M, ue = this.$D,
|
|
277
|
+
var s = this, M = !!b.u(g) || g, C = b.p(v), L = function(Se, we) {
|
|
278
|
+
var Fe = b.w(s.$u ? Date.UTC(s.$y, we, Se) : new Date(s.$y, we, Se), s);
|
|
279
|
+
return M ? Fe : Fe.endOf(_);
|
|
280
|
+
}, Q = function(Se, we) {
|
|
281
|
+
return b.w(s.toDate()[Se].apply(s.toDate("s"), (M ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(we)), s);
|
|
282
|
+
}, q = this.$W, A = this.$M, ue = this.$D, ke = "set" + (this.$u ? "UTC" : "");
|
|
283
283
|
switch (C) {
|
|
284
284
|
case O:
|
|
285
|
-
return M ?
|
|
285
|
+
return M ? L(1, 0) : L(31, 11);
|
|
286
286
|
case H:
|
|
287
|
-
return M ?
|
|
287
|
+
return M ? L(1, A) : L(0, A + 1);
|
|
288
288
|
case w:
|
|
289
|
-
var
|
|
290
|
-
return
|
|
291
|
-
case
|
|
289
|
+
var _e = this.$locale().weekStart || 0, Te = (q < _e ? q + 7 : q) - _e;
|
|
290
|
+
return L(M ? ue - Te : ue + (6 - Te), A);
|
|
291
|
+
case _:
|
|
292
292
|
case Y:
|
|
293
|
-
return
|
|
294
|
-
case T:
|
|
295
|
-
return G(_e + "Minutes", 1);
|
|
293
|
+
return Q(ke + "Hours", 0);
|
|
296
294
|
case F:
|
|
297
|
-
return
|
|
295
|
+
return Q(ke + "Minutes", 1);
|
|
296
|
+
case S:
|
|
297
|
+
return Q(ke + "Seconds", 2);
|
|
298
298
|
case E:
|
|
299
|
-
return
|
|
299
|
+
return Q(ke + "Milliseconds", 3);
|
|
300
300
|
default:
|
|
301
301
|
return this.clone();
|
|
302
302
|
}
|
|
303
303
|
}, a.endOf = function(v) {
|
|
304
304
|
return this.startOf(v, !1);
|
|
305
305
|
}, a.$set = function(v, g) {
|
|
306
|
-
var s, M = b.p(v), C = "set" + (this.$u ? "UTC" : ""),
|
|
306
|
+
var s, M = b.p(v), C = "set" + (this.$u ? "UTC" : ""), L = (s = {}, s[_] = C + "Date", s[Y] = C + "Date", s[H] = C + "Month", s[O] = C + "FullYear", s[F] = C + "Hours", s[S] = C + "Minutes", s[E] = C + "Seconds", s[d] = C + "Milliseconds", s)[M], Q = M === _ ? this.$D + (g - this.$W) : g;
|
|
307
307
|
if (M === H || M === O) {
|
|
308
308
|
var q = this.clone().set(Y, 1);
|
|
309
|
-
q.$d[
|
|
310
|
-
} else
|
|
309
|
+
q.$d[L](Q), q.init(), this.$d = q.set(Y, Math.min(this.$D, q.daysInMonth())).$d;
|
|
310
|
+
} else L && this.$d[L](Q);
|
|
311
311
|
return this.init(), this;
|
|
312
312
|
}, a.set = function(v, g) {
|
|
313
313
|
return this.clone().$set(v, g);
|
|
@@ -316,31 +316,31 @@ var xt = { exports: {} };
|
|
|
316
316
|
}, a.add = function(v, g) {
|
|
317
317
|
var s, M = this;
|
|
318
318
|
v = Number(v);
|
|
319
|
-
var C = b.p(g),
|
|
319
|
+
var C = b.p(g), L = function(A) {
|
|
320
320
|
var ue = se(M);
|
|
321
321
|
return b.w(ue.date(ue.date() + Math.round(A * v)), M);
|
|
322
322
|
};
|
|
323
323
|
if (C === H) return this.set(H, this.$M + v);
|
|
324
324
|
if (C === O) return this.set(O, this.$y + v);
|
|
325
|
-
if (C ===
|
|
326
|
-
if (C === w) return
|
|
327
|
-
var
|
|
325
|
+
if (C === _) return L(1);
|
|
326
|
+
if (C === w) return L(7);
|
|
327
|
+
var Q = (s = {}, s[S] = t, s[F] = e, s[E] = r, s)[C] || 1, q = this.$d.getTime() + v * Q;
|
|
328
328
|
return b.w(q, this);
|
|
329
329
|
}, a.subtract = function(v, g) {
|
|
330
330
|
return this.add(-1 * v, g);
|
|
331
331
|
}, a.format = function(v) {
|
|
332
332
|
var g = this, s = this.$locale();
|
|
333
333
|
if (!this.isValid()) return s.invalidDate || ie;
|
|
334
|
-
var M = v || "YYYY-MM-DDTHH:mm:ssZ", C = b.z(this),
|
|
335
|
-
return we && (we[
|
|
336
|
-
},
|
|
337
|
-
return b.s(
|
|
338
|
-
},
|
|
334
|
+
var M = v || "YYYY-MM-DDTHH:mm:ssZ", C = b.z(this), L = this.$H, Q = this.$m, q = this.$M, A = s.weekdays, ue = s.months, ke = s.meridiem, _e = function(we, Fe, Ue, Re) {
|
|
335
|
+
return we && (we[Fe] || we(g, M)) || Ue[Fe].slice(0, Re);
|
|
336
|
+
}, Te = function(we) {
|
|
337
|
+
return b.s(L % 12 || 12, we, "0");
|
|
338
|
+
}, Se = ke || function(we, Fe, Ue) {
|
|
339
339
|
var Re = we < 12 ? "AM" : "PM";
|
|
340
340
|
return Ue ? Re.toLowerCase() : Re;
|
|
341
341
|
};
|
|
342
|
-
return M.replace(J, function(we,
|
|
343
|
-
return
|
|
342
|
+
return M.replace(J, function(we, Fe) {
|
|
343
|
+
return Fe || function(Ue) {
|
|
344
344
|
switch (Ue) {
|
|
345
345
|
case "YY":
|
|
346
346
|
return String(g.$y).slice(-2);
|
|
@@ -351,9 +351,9 @@ var xt = { exports: {} };
|
|
|
351
351
|
case "MM":
|
|
352
352
|
return b.s(q + 1, 2, "0");
|
|
353
353
|
case "MMM":
|
|
354
|
-
return
|
|
354
|
+
return _e(s.monthsShort, q, ue, 3);
|
|
355
355
|
case "MMMM":
|
|
356
|
-
return
|
|
356
|
+
return _e(ue, q);
|
|
357
357
|
case "D":
|
|
358
358
|
return g.$D;
|
|
359
359
|
case "DD":
|
|
@@ -361,27 +361,27 @@ var xt = { exports: {} };
|
|
|
361
361
|
case "d":
|
|
362
362
|
return String(g.$W);
|
|
363
363
|
case "dd":
|
|
364
|
-
return
|
|
364
|
+
return _e(s.weekdaysMin, g.$W, A, 2);
|
|
365
365
|
case "ddd":
|
|
366
|
-
return
|
|
366
|
+
return _e(s.weekdaysShort, g.$W, A, 3);
|
|
367
367
|
case "dddd":
|
|
368
368
|
return A[g.$W];
|
|
369
369
|
case "H":
|
|
370
|
-
return String(
|
|
370
|
+
return String(L);
|
|
371
371
|
case "HH":
|
|
372
|
-
return b.s(
|
|
372
|
+
return b.s(L, 2, "0");
|
|
373
373
|
case "h":
|
|
374
|
-
return
|
|
374
|
+
return Te(1);
|
|
375
375
|
case "hh":
|
|
376
|
-
return
|
|
376
|
+
return Te(2);
|
|
377
377
|
case "a":
|
|
378
|
-
return
|
|
378
|
+
return Se(L, Q, !0);
|
|
379
379
|
case "A":
|
|
380
|
-
return
|
|
380
|
+
return Se(L, Q, !1);
|
|
381
381
|
case "m":
|
|
382
|
-
return String(
|
|
382
|
+
return String(Q);
|
|
383
383
|
case "mm":
|
|
384
|
-
return b.s(
|
|
384
|
+
return b.s(Q, 2, "0");
|
|
385
385
|
case "s":
|
|
386
386
|
return String(g.$s);
|
|
387
387
|
case "ss":
|
|
@@ -397,10 +397,10 @@ var xt = { exports: {} };
|
|
|
397
397
|
}, a.utcOffset = function() {
|
|
398
398
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
399
399
|
}, a.diff = function(v, g, s) {
|
|
400
|
-
var M, C = this,
|
|
401
|
-
return b.m(C,
|
|
400
|
+
var M, C = this, L = b.p(g), Q = se(v), q = (Q.utcOffset() - this.utcOffset()) * t, A = this - Q, ue = function() {
|
|
401
|
+
return b.m(C, Q);
|
|
402
402
|
};
|
|
403
|
-
switch (
|
|
403
|
+
switch (L) {
|
|
404
404
|
case O:
|
|
405
405
|
M = ue() / 12;
|
|
406
406
|
break;
|
|
@@ -413,17 +413,17 @@ var xt = { exports: {} };
|
|
|
413
413
|
case w:
|
|
414
414
|
M = (A - q) / 6048e5;
|
|
415
415
|
break;
|
|
416
|
-
case
|
|
416
|
+
case _:
|
|
417
417
|
M = (A - q) / 864e5;
|
|
418
418
|
break;
|
|
419
|
-
case
|
|
419
|
+
case F:
|
|
420
420
|
M = A / e;
|
|
421
421
|
break;
|
|
422
|
-
case
|
|
422
|
+
case S:
|
|
423
423
|
M = A / t;
|
|
424
424
|
break;
|
|
425
425
|
case E:
|
|
426
|
-
M = A /
|
|
426
|
+
M = A / r;
|
|
427
427
|
break;
|
|
428
428
|
default:
|
|
429
429
|
M = A;
|
|
@@ -448,44 +448,44 @@ var xt = { exports: {} };
|
|
|
448
448
|
}, a.toString = function() {
|
|
449
449
|
return this.$d.toUTCString();
|
|
450
450
|
}, p;
|
|
451
|
-
}(),
|
|
452
|
-
return se.prototype =
|
|
453
|
-
|
|
451
|
+
}(), k = o.prototype;
|
|
452
|
+
return se.prototype = k, [["$ms", d], ["$s", E], ["$m", S], ["$H", F], ["$W", _], ["$M", H], ["$y", O], ["$D", Y]].forEach(function(p) {
|
|
453
|
+
k[p[1]] = function(a) {
|
|
454
454
|
return this.$g(a, p[0], p[1]);
|
|
455
455
|
};
|
|
456
456
|
}), se.extend = function(p, a) {
|
|
457
|
-
return p.$i || (p(a,
|
|
457
|
+
return p.$i || (p(a, o, se), p.$i = !0), se;
|
|
458
458
|
}, se.locale = $e, se.isDayjs = ae, se.unix = function(p) {
|
|
459
459
|
return se(1e3 * p);
|
|
460
460
|
}, se.en = fe[de], se.Ls = fe, se.p = {}, se;
|
|
461
461
|
});
|
|
462
462
|
})(xt);
|
|
463
|
-
var
|
|
464
|
-
const yt = /* @__PURE__ */
|
|
465
|
-
const
|
|
463
|
+
var ol = xt.exports;
|
|
464
|
+
const yt = /* @__PURE__ */ al(ol), Qe = (i, f) => {
|
|
465
|
+
const r = i.__vccOpts || i;
|
|
466
466
|
for (const [t, e] of f)
|
|
467
|
-
|
|
468
|
-
return
|
|
467
|
+
r[t] = e;
|
|
468
|
+
return r;
|
|
469
469
|
}, rl = {
|
|
470
470
|
style: { display: "flex", width: "100%" },
|
|
471
471
|
class: "g-ctrl-container"
|
|
472
|
-
},
|
|
472
|
+
}, ul = { style: { width: "var(--up-width)", height: "var(--up-height)", position: "relative", "box-sizing": "border-box" } }, nl = {
|
|
473
473
|
key: 19,
|
|
474
474
|
style: { position: "relative" }
|
|
475
|
-
},
|
|
475
|
+
}, sl = ["title"], il = { key: 20 }, dl = { key: 21 }, fl = { key: 22 }, cl = ["innerHTML"], ml = { key: 23 }, pl = ["innerHTML"], vl = ["innerHTML"], hl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
476
476
|
__name: "g-ctrl",
|
|
477
477
|
props: /* @__PURE__ */ ze(["t", "ctrlKey", "item", "model", "ctrlType", "formInfo"], {
|
|
478
478
|
modelValue: { required: !0 },
|
|
479
479
|
modelModifiers: {}
|
|
480
480
|
}),
|
|
481
481
|
emits: ["update:modelValue"],
|
|
482
|
-
setup(
|
|
482
|
+
setup(i) {
|
|
483
483
|
var $e, se;
|
|
484
|
-
const f = Pe(
|
|
484
|
+
const f = Pe(i, "modelValue"), r = i, t = le(r.item || {}), e = le(r.ctrlKey), d = le(r.ctrlType), E = le(r.model), S = le([]), F = le([]), _ = le(!1), w = le(!1), H = () => Object.keys(Tt()).filter((b) => b.startsWith(`${r.t}-${e}-`)).map((b) => b.replace(`${r.t}-${e}-`, "")), ee = le({
|
|
485
485
|
multiple: !1,
|
|
486
486
|
"show-file-list": !1,
|
|
487
487
|
"file-list": [],
|
|
488
|
-
showDel: ($e = t.value) != null && $e.showDel ? (se = t.value) == null ? void 0 : se.showDel :
|
|
488
|
+
showDel: ($e = t.value) != null && $e.showDel ? (se = t.value) == null ? void 0 : se.showDel : r.t !== "t"
|
|
489
489
|
}), O = le(t.value.innerHtml), Y = (b) => [
|
|
490
490
|
"year",
|
|
491
491
|
"years",
|
|
@@ -513,62 +513,62 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
513
513
|
daterange: "YYYY-MM-DD",
|
|
514
514
|
monthrange: "YYYY-MM",
|
|
515
515
|
yearrange: "YYYY"
|
|
516
|
-
})[b] || "YYYY-MM-DD",
|
|
516
|
+
})[b] || "YYYY-MM-DD", oe = le({
|
|
517
517
|
filterable: !0,
|
|
518
518
|
remote: !!(t.value && t.value["remote-method"]),
|
|
519
519
|
...t.value
|
|
520
520
|
}), J = le((b) => {
|
|
521
|
-
t.value["remote-method"](b, (
|
|
521
|
+
t.value["remote-method"](b, (o) => {
|
|
522
522
|
et(() => {
|
|
523
|
-
|
|
523
|
+
F.value = o;
|
|
524
524
|
});
|
|
525
525
|
});
|
|
526
526
|
}), ve = async (b = "options") => {
|
|
527
|
-
var
|
|
527
|
+
var o;
|
|
528
528
|
try {
|
|
529
|
-
const
|
|
530
|
-
if (typeof
|
|
531
|
-
|
|
529
|
+
const k = await ((o = t.value) == null ? void 0 : o.getDicts(r.formInfo));
|
|
530
|
+
if (typeof k == "string")
|
|
531
|
+
F.value = [{ label: k, value: f.value }];
|
|
532
532
|
else {
|
|
533
|
-
const p =
|
|
533
|
+
const p = k == null ? void 0 : k.map((a, v) => ({
|
|
534
534
|
...a,
|
|
535
535
|
value: a.value ?? a.label ?? v,
|
|
536
536
|
label: a.label || "未知选项"
|
|
537
537
|
}));
|
|
538
|
-
|
|
538
|
+
F.value = p || [];
|
|
539
539
|
}
|
|
540
|
-
} catch (
|
|
541
|
-
throw console.error("获取选项失败:",
|
|
540
|
+
} catch (k) {
|
|
541
|
+
throw console.error("获取选项失败:", k), k;
|
|
542
542
|
}
|
|
543
543
|
}, ge = () => {
|
|
544
|
-
var b,
|
|
545
|
-
t.value.noSearch !== !0 &&
|
|
544
|
+
var b, o;
|
|
545
|
+
t.value.noSearch !== !0 && r.t === "q" && ((o = (b = E.value) == null ? void 0 : b.table) == null || o.load());
|
|
546
546
|
}, be = (b) => {
|
|
547
547
|
b.preventDefault(), b.stopPropagation(), f.value = "";
|
|
548
548
|
}, de = (b) => {
|
|
549
|
-
|
|
549
|
+
_.value = !0;
|
|
550
550
|
}, fe = (b) => {
|
|
551
|
-
b.preventDefault(), b.stopPropagation(),
|
|
551
|
+
b.preventDefault(), b.stopPropagation(), _.value = !0;
|
|
552
552
|
}, ne = le(null);
|
|
553
553
|
ut(async () => {
|
|
554
|
-
var
|
|
555
|
-
t.value && t.value["remote-method"] && (
|
|
554
|
+
var k, p, a, v, g;
|
|
555
|
+
t.value && t.value["remote-method"] && (oe.value["remote-method"] = J), (p = (k = E.value[e.value]) == null ? void 0 : k.options) != null && p.length && (F.value = E.value[e.value].options);
|
|
556
556
|
const b = (s, M = "options", C = E.value[e.value]) => {
|
|
557
|
-
typeof t.value.getDicts == "function" && ve(M).catch((
|
|
558
|
-
console.error(`Failed to load ${M} for ${s}:`,
|
|
557
|
+
typeof t.value.getDicts == "function" && ve(M).catch((L) => {
|
|
558
|
+
console.error(`Failed to load ${M} for ${s}:`, L);
|
|
559
559
|
});
|
|
560
560
|
};
|
|
561
|
-
if (["radio", "radio-button", "checkbox-group", "checkbox-group-button", "select", "cascader"].includes(
|
|
561
|
+
if (["radio", "radio-button", "checkbox-group", "checkbox-group-button", "select", "cascader"].includes(d.value) && b(d.value), d.value === ye.TREESELECT && await (async () => {
|
|
562
562
|
try {
|
|
563
|
-
typeof t.value.getDicts == "function" ?
|
|
563
|
+
typeof t.value.getDicts == "function" ? S.value = await t.value.getDicts(r.formInfo) : S.value = F.value;
|
|
564
564
|
} catch (M) {
|
|
565
565
|
console.error("Failed to load data for tree-select:", M);
|
|
566
566
|
}
|
|
567
|
-
})(),
|
|
568
|
-
let s = t.value.type ||
|
|
569
|
-
(s === void 0 ||
|
|
570
|
-
var C,
|
|
571
|
-
(M.keyCode === 13 || M.key === "Enter") && ((
|
|
567
|
+
})(), r.t == "q") {
|
|
568
|
+
let s = t.value.type || d.value;
|
|
569
|
+
(s === void 0 || d.value === "input" || s == ye.NUMBER || s == ye.EMAIL || s == "url" || s == "text") && t.value.onKeyup == null && (t.value.onKeyup = (M) => {
|
|
570
|
+
var C, L;
|
|
571
|
+
(M.keyCode === 13 || M.key === "Enter") && ((L = (C = E.value) == null ? void 0 : C.table) == null || L.load());
|
|
572
572
|
}), [
|
|
573
573
|
"radio",
|
|
574
574
|
"switch",
|
|
@@ -586,83 +586,83 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
586
586
|
"datetimerange",
|
|
587
587
|
"week"
|
|
588
588
|
].includes(s) && t.value.onChange === void 0 && (t.value.onChange = (M) => {
|
|
589
|
-
var C,
|
|
590
|
-
(
|
|
589
|
+
var C, L;
|
|
590
|
+
(L = (C = E.value) == null ? void 0 : C.table) == null || L.load();
|
|
591
591
|
});
|
|
592
592
|
}
|
|
593
|
-
|
|
593
|
+
d.value == "image" && (t.value.width && ((a = ne.value) != null && a.$el) && ne.value.$el.style.setProperty("--up-width", typeof t.value.width == "number" ? t.value.width + "px" : t.value.width), t.value.height && ((v = ne.value) != null && v.$el) && ne.value.$el.style.setProperty("--up-height", typeof t.value.height == "number" ? t.value.height + "px" : t.value.height), t.value.fontSize && ((g = ne.value) != null && g.$el) && ne.value.$el.style.setProperty("--up-font-size", typeof t.value.fontSize == "number" ? t.value.fontSize + "px" : t.value.fontSize));
|
|
594
594
|
});
|
|
595
|
-
const ae =
|
|
595
|
+
const ae = Je(() => {
|
|
596
596
|
var b;
|
|
597
|
-
return t.value["file-list"] && t.value["file-list"].length ? (b = t.value["file-list"]) == null ? void 0 : b.map((
|
|
597
|
+
return t.value["file-list"] && t.value["file-list"].length ? (b = t.value["file-list"]) == null ? void 0 : b.map((o) => o == null ? void 0 : o.url) : [f.value];
|
|
598
598
|
});
|
|
599
|
-
return (b,
|
|
599
|
+
return (b, o) => {
|
|
600
600
|
var N, z, te, Ee, Ce, Le;
|
|
601
|
-
const
|
|
601
|
+
const k = B("el-image-viewer"), p = B("el-radio"), a = B("el-radio-group"), v = B("el-radio-button"), g = B("el-checkbox"), s = B("el-checkbox-group"), M = B("el-checkbox-button"), C = B("g-select-option"), L = B("el-option"), Q = B("el-select"), q = B("el-tree-select"), A = B("el-time-picker"), ue = B("el-time-select"), ke = B("el-date-picker"), _e = B("el-color-picker"), Te = B("el-rate"), Se = B("el-slider"), we = B("el-switch"), Fe = B("el-transfer"), Ue = B("el-cascader"), Re = B("el-icon"), nt = B("el-image"), tt = B("el-tooltip"), st = B("el-upload"), it = B("el-autocomplete"), dt = B("el-input-number"), lt = B("el-input"), l = B("el-link"), u = B("el-text"), m = B("el-avatar"), V = B("el-tag");
|
|
602
602
|
return n(), x(W, null, [
|
|
603
|
-
|
|
604
|
-
|
|
603
|
+
X("div", null, [
|
|
604
|
+
_.value ? (n(), D(k, {
|
|
605
605
|
key: 0,
|
|
606
606
|
teleported: !0,
|
|
607
607
|
"url-list": ae.value,
|
|
608
|
-
onClose:
|
|
608
|
+
onClose: o[0] || (o[0] = (c) => _.value = !1)
|
|
609
609
|
}, null, 8, ["url-list"])) : pe("", !0)
|
|
610
610
|
]),
|
|
611
|
-
|
|
612
|
-
|
|
611
|
+
X("div", rl, [
|
|
612
|
+
d.value == U(ye).RADIO ? (n(), D(a, T({
|
|
613
613
|
key: 0,
|
|
614
614
|
modelValue: f.value,
|
|
615
|
-
"onUpdate:modelValue":
|
|
615
|
+
"onUpdate:modelValue": o[1] || (o[1] = (c) => f.value = c)
|
|
616
616
|
}, t.value), {
|
|
617
617
|
default: y(() => [
|
|
618
|
-
h(b.$slots, `${
|
|
619
|
-
(n(!0), x(W, null,
|
|
618
|
+
h(b.$slots, `${r.t}-${e.value}`, { data: t.value }, () => [
|
|
619
|
+
(n(!0), x(W, null, R(F.value, (c) => (n(), D(p, T({ ref_for: !0 }, c), {
|
|
620
620
|
default: y(() => [
|
|
621
|
-
h(b.$slots, `${
|
|
621
|
+
h(b.$slots, `${r.t}-${e.value}-options`, { option: c }, void 0, !0)
|
|
622
622
|
]),
|
|
623
623
|
_: 2
|
|
624
624
|
}, 1040))), 256))
|
|
625
625
|
], !0)
|
|
626
626
|
]),
|
|
627
627
|
_: 3
|
|
628
|
-
}, 16, ["modelValue"])) :
|
|
628
|
+
}, 16, ["modelValue"])) : d.value == U(ye).RADIOBUTTON ? (n(), D(a, T({
|
|
629
629
|
key: 1,
|
|
630
630
|
modelValue: f.value,
|
|
631
|
-
"onUpdate:modelValue":
|
|
631
|
+
"onUpdate:modelValue": o[2] || (o[2] = (c) => f.value = c)
|
|
632
632
|
}, t.value), {
|
|
633
633
|
default: y(() => [
|
|
634
|
-
h(b.$slots, `${
|
|
635
|
-
(n(!0), x(W, null,
|
|
634
|
+
h(b.$slots, `${r.t}-${e.value}`, { data: t.value }, () => [
|
|
635
|
+
(n(!0), x(W, null, R(F.value, (c) => (n(), D(v, T({ ref_for: !0 }, c), {
|
|
636
636
|
default: y(() => [
|
|
637
|
-
h(b.$slots, `${
|
|
637
|
+
h(b.$slots, `${r.t}-${e.value}-options`, { option: c }, void 0, !0)
|
|
638
638
|
]),
|
|
639
639
|
_: 2
|
|
640
640
|
}, 1040))), 256))
|
|
641
641
|
], !0)
|
|
642
642
|
]),
|
|
643
643
|
_: 3
|
|
644
|
-
}, 16, ["modelValue"])) :
|
|
644
|
+
}, 16, ["modelValue"])) : d.value == U(ye).CHECKBOX ? (n(), D(g, T({
|
|
645
645
|
key: 2,
|
|
646
646
|
modelValue: f.value,
|
|
647
|
-
"onUpdate:modelValue":
|
|
647
|
+
"onUpdate:modelValue": o[3] || (o[3] = (c) => f.value = c)
|
|
648
648
|
}, t.value), {
|
|
649
649
|
default: y(() => [
|
|
650
|
-
h(b.$slots, `${
|
|
651
|
-
|
|
650
|
+
h(b.$slots, `${r.t}-${e.value}`, { data: t.value }, () => [
|
|
651
|
+
o[27] || (o[27] = Me(he(" ")))
|
|
652
652
|
], !0)
|
|
653
653
|
]),
|
|
654
654
|
_: 3
|
|
655
|
-
}, 16, ["modelValue"])) :
|
|
655
|
+
}, 16, ["modelValue"])) : d.value == U(ye).CHECKBOXGROUP ? (n(), D(s, T({
|
|
656
656
|
key: 3,
|
|
657
657
|
modelValue: f.value,
|
|
658
|
-
"onUpdate:modelValue":
|
|
658
|
+
"onUpdate:modelValue": o[4] || (o[4] = (c) => f.value = c)
|
|
659
659
|
}, t.value), {
|
|
660
660
|
default: y(() => [
|
|
661
|
-
h(b.$slots, `${
|
|
662
|
-
(n(!0), x(W, null,
|
|
661
|
+
h(b.$slots, `${r.t}-${e.value}`, { data: t.value }, () => [
|
|
662
|
+
(n(!0), x(W, null, R(F.value, (c) => (n(), D(g, T({ ref_for: !0 }, c), {
|
|
663
663
|
default: y(() => [
|
|
664
|
-
h(b.$slots, `${
|
|
665
|
-
Me(
|
|
664
|
+
h(b.$slots, `${r.t}-${e.value}-options`, { option: c }, () => [
|
|
665
|
+
Me(he(c.label), 1)
|
|
666
666
|
], !0)
|
|
667
667
|
]),
|
|
668
668
|
_: 2
|
|
@@ -670,46 +670,46 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
670
670
|
], !0)
|
|
671
671
|
]),
|
|
672
672
|
_: 3
|
|
673
|
-
}, 16, ["modelValue"])) :
|
|
673
|
+
}, 16, ["modelValue"])) : d.value == U(ye).CHECKBOXGROUPBUTTON ? (n(), D(s, T({
|
|
674
674
|
key: 4,
|
|
675
675
|
modelValue: f.value,
|
|
676
|
-
"onUpdate:modelValue":
|
|
676
|
+
"onUpdate:modelValue": o[5] || (o[5] = (c) => f.value = c)
|
|
677
677
|
}, t.value), {
|
|
678
678
|
default: y(() => [
|
|
679
|
-
h(b.$slots, `${
|
|
680
|
-
(n(!0), x(W, null,
|
|
679
|
+
h(b.$slots, `${r.t}-${e.value}`, { data: t.value }, () => [
|
|
680
|
+
(n(!0), x(W, null, R(F.value, (c) => (n(), D(M, T({ ref_for: !0 }, c), {
|
|
681
681
|
default: y(() => [
|
|
682
|
-
h(b.$slots, `${
|
|
682
|
+
h(b.$slots, `${r.t}-${e.value}-options`, { option: c }, void 0, !0)
|
|
683
683
|
]),
|
|
684
684
|
_: 2
|
|
685
685
|
}, 1040))), 256))
|
|
686
686
|
], !0)
|
|
687
687
|
]),
|
|
688
688
|
_: 3
|
|
689
|
-
}, 16, ["modelValue"])) :
|
|
689
|
+
}, 16, ["modelValue"])) : d.value === U(ye).SELECT ? (n(), D(Q, T({
|
|
690
690
|
key: 5,
|
|
691
691
|
modelValue: f.value,
|
|
692
|
-
"onUpdate:modelValue":
|
|
692
|
+
"onUpdate:modelValue": o[6] || (o[6] = (c) => f.value = c),
|
|
693
693
|
placeholder: E.value[e.value].label,
|
|
694
694
|
clearable: !0,
|
|
695
|
-
onClear:
|
|
696
|
-
|
|
695
|
+
onClear: o[7] || (o[7] = () => {
|
|
696
|
+
r.t == "q" && E.value.table.load();
|
|
697
697
|
})
|
|
698
|
-
},
|
|
698
|
+
}, oe.value), me({
|
|
699
699
|
default: y(() => [
|
|
700
|
-
h(b.$slots, `${
|
|
701
|
-
(n(!0), x(W, null,
|
|
700
|
+
h(b.$slots, `${r.t}-${e.value}`, { options: F.value }, () => [
|
|
701
|
+
(n(!0), x(W, null, R(F.value, (c) => (n(), x(W, {
|
|
702
702
|
key: c.value
|
|
703
703
|
}, [
|
|
704
|
-
Z(
|
|
705
|
-
onClick: (
|
|
706
|
-
|
|
704
|
+
Z(L, T({ ref_for: !0 }, U(Ve)(c, (G) => G != "children"), {
|
|
705
|
+
onClick: (G) => {
|
|
706
|
+
oe.value.change && oe.value.change(c), ge();
|
|
707
707
|
}
|
|
708
708
|
}), {
|
|
709
709
|
default: y(() => {
|
|
710
|
-
var
|
|
710
|
+
var G;
|
|
711
711
|
return [
|
|
712
|
-
(
|
|
712
|
+
(G = t.value) != null && G.columns ? h(b.$slots, `${r.t}-${e.value}-options`, {
|
|
713
713
|
key: 0,
|
|
714
714
|
option: c
|
|
715
715
|
}, () => {
|
|
@@ -718,14 +718,14 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
718
718
|
Z(C, {
|
|
719
719
|
columns: (ce = t.value) == null ? void 0 : ce.columns,
|
|
720
720
|
data: c,
|
|
721
|
-
t:
|
|
721
|
+
t: r.t
|
|
722
722
|
}, me({ _: 2 }, [
|
|
723
|
-
|
|
723
|
+
R(b.$slots, (Be, Ke) => ({
|
|
724
724
|
name: Ke,
|
|
725
|
-
fn: y((
|
|
725
|
+
fn: y((Ze) => [
|
|
726
726
|
h(b.$slots, Ke, {
|
|
727
727
|
option: c,
|
|
728
|
-
data:
|
|
728
|
+
data: Ze
|
|
729
729
|
}, void 0, !0)
|
|
730
730
|
])
|
|
731
731
|
}))
|
|
@@ -736,34 +736,34 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
736
736
|
}),
|
|
737
737
|
_: 2
|
|
738
738
|
}, 1040, ["onClick"]),
|
|
739
|
-
c.children && c.children.length ? (n(!0), x(W, { key: 0 },
|
|
739
|
+
c.children && c.children.length ? (n(!0), x(W, { key: 0 }, R(c.children, (G) => (n(), D(L, T({
|
|
740
740
|
style: { "margin-left": "20px" },
|
|
741
|
-
key:
|
|
741
|
+
key: G.value,
|
|
742
742
|
ref_for: !0
|
|
743
|
-
},
|
|
743
|
+
}, U(Ve)(G, (ce) => ce != "children"), {
|
|
744
744
|
onClick: (ce) => {
|
|
745
|
-
|
|
745
|
+
oe.value.change && oe.value.change(G), ge();
|
|
746
746
|
}
|
|
747
747
|
}), {
|
|
748
748
|
default: y(() => {
|
|
749
749
|
var ce;
|
|
750
750
|
return [
|
|
751
|
-
(ce = t.value) != null && ce.columns ? h(b.$slots, `${
|
|
751
|
+
(ce = t.value) != null && ce.columns ? h(b.$slots, `${r.t}-${e.value}-options`, {
|
|
752
752
|
key: 0,
|
|
753
|
-
option:
|
|
753
|
+
option: G
|
|
754
754
|
}, () => {
|
|
755
|
-
var
|
|
755
|
+
var Be;
|
|
756
756
|
return [
|
|
757
757
|
Z(C, {
|
|
758
|
-
columns: (
|
|
759
|
-
data:
|
|
760
|
-
t:
|
|
758
|
+
columns: (Be = t.value) == null ? void 0 : Be.columns,
|
|
759
|
+
data: G,
|
|
760
|
+
t: r.t
|
|
761
761
|
}, me({ _: 2 }, [
|
|
762
|
-
|
|
763
|
-
name:
|
|
762
|
+
R(b.$slots, (Ke, Ze) => ({
|
|
763
|
+
name: Ze,
|
|
764
764
|
fn: y((ft) => [
|
|
765
|
-
h(b.$slots,
|
|
766
|
-
option:
|
|
765
|
+
h(b.$slots, Ze, {
|
|
766
|
+
option: G,
|
|
767
767
|
data: ft
|
|
768
768
|
}, void 0, !0)
|
|
769
769
|
])
|
|
@@ -788,12 +788,12 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
788
788
|
Z(C, {
|
|
789
789
|
columns: (c = t.value) == null ? void 0 : c.columns,
|
|
790
790
|
title: !0,
|
|
791
|
-
t:
|
|
791
|
+
t: r.t
|
|
792
792
|
}, me({ _: 2 }, [
|
|
793
|
-
|
|
793
|
+
R(b.$slots, (G, ce) => ({
|
|
794
794
|
name: ce,
|
|
795
|
-
fn: y((
|
|
796
|
-
h(b.$slots, ce, { data:
|
|
795
|
+
fn: y((Be) => [
|
|
796
|
+
h(b.$slots, ce, { data: Be }, void 0, !0)
|
|
797
797
|
])
|
|
798
798
|
}))
|
|
799
799
|
]), 1032, ["columns", "t"])
|
|
@@ -801,103 +801,103 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
801
801
|
}),
|
|
802
802
|
key: "0"
|
|
803
803
|
} : void 0,
|
|
804
|
-
|
|
804
|
+
R(H(), (c) => ({
|
|
805
805
|
name: c,
|
|
806
|
-
fn: y((
|
|
807
|
-
h(b.$slots, `${
|
|
806
|
+
fn: y((G) => [
|
|
807
|
+
h(b.$slots, `${r.t}-${e.value}-${c}`, { data: G }, void 0, !0)
|
|
808
808
|
])
|
|
809
809
|
}))
|
|
810
|
-
]), 1040, ["modelValue", "placeholder"])) :
|
|
810
|
+
]), 1040, ["modelValue", "placeholder"])) : d.value == U(ye).TREESELECT ? (n(), D(q, T({
|
|
811
811
|
key: 6,
|
|
812
812
|
modelValue: f.value,
|
|
813
|
-
"onUpdate:modelValue":
|
|
813
|
+
"onUpdate:modelValue": o[8] || (o[8] = (c) => f.value = c),
|
|
814
814
|
placeholder: E.value[e.value].label
|
|
815
|
-
}, t.value, { data:
|
|
816
|
-
|
|
815
|
+
}, t.value, { data: S.value }), me({ _: 2 }, [
|
|
816
|
+
R(H(), (c) => ({
|
|
817
817
|
name: c,
|
|
818
|
-
fn: y((
|
|
819
|
-
h(b.$slots, `${
|
|
818
|
+
fn: y((G) => [
|
|
819
|
+
h(b.$slots, `${r.t}-${e.value}-${c}`, { data: G }, void 0, !0)
|
|
820
820
|
])
|
|
821
821
|
}))
|
|
822
|
-
]), 1040, ["modelValue", "placeholder", "data"])) :
|
|
822
|
+
]), 1040, ["modelValue", "placeholder", "data"])) : d.value == U(ye).TIME ? (n(), D(A, T({
|
|
823
823
|
key: 7,
|
|
824
824
|
modelValue: f.value,
|
|
825
|
-
"onUpdate:modelValue":
|
|
825
|
+
"onUpdate:modelValue": o[9] || (o[9] = (c) => f.value = c),
|
|
826
826
|
"arrow-control": ""
|
|
827
827
|
}, t.value, {
|
|
828
828
|
placeholder: E.value[e.value].label
|
|
829
|
-
}), null, 16, ["modelValue", "placeholder"])) :
|
|
829
|
+
}), null, 16, ["modelValue", "placeholder"])) : d.value == U(ye).TIMESELECT ? (n(), D(ue, T({
|
|
830
830
|
key: 8,
|
|
831
831
|
modelValue: f.value,
|
|
832
|
-
"onUpdate:modelValue":
|
|
832
|
+
"onUpdate:modelValue": o[10] || (o[10] = (c) => f.value = c),
|
|
833
833
|
start: "06:30",
|
|
834
834
|
step: "00:15",
|
|
835
835
|
end: "23:30",
|
|
836
836
|
placeholder: E.value[e.value].label
|
|
837
|
-
}, t.value), null, 16, ["modelValue", "placeholder"])) : Y(
|
|
837
|
+
}, t.value), null, 16, ["modelValue", "placeholder"])) : Y(d.value) ? (n(), D(ke, T({
|
|
838
838
|
key: 9,
|
|
839
839
|
modelValue: f.value,
|
|
840
|
-
"onUpdate:modelValue":
|
|
841
|
-
type:
|
|
840
|
+
"onUpdate:modelValue": o[11] || (o[11] = (c) => f.value = c),
|
|
841
|
+
type: d.value,
|
|
842
842
|
placeholder: E.value[e.value].label,
|
|
843
|
-
"value-format": ie(
|
|
843
|
+
"value-format": ie(d.value)
|
|
844
844
|
}, t.value), me({ _: 2 }, [
|
|
845
|
-
|
|
845
|
+
R(H(), (c) => ({
|
|
846
846
|
name: c,
|
|
847
|
-
fn: y((
|
|
848
|
-
h(b.$slots, `${
|
|
847
|
+
fn: y((G) => [
|
|
848
|
+
h(b.$slots, `${r.t}-${e.value}-${c}`, { data: G }, void 0, !0)
|
|
849
849
|
])
|
|
850
850
|
}))
|
|
851
|
-
]), 1040, ["modelValue", "type", "placeholder", "value-format"])) :
|
|
851
|
+
]), 1040, ["modelValue", "type", "placeholder", "value-format"])) : d.value == U(ye).COLOR ? (n(), D(_e, T({
|
|
852
852
|
key: 10,
|
|
853
853
|
modelValue: f.value,
|
|
854
|
-
"onUpdate:modelValue":
|
|
855
|
-
}, t.value), null, 16, ["modelValue"])) :
|
|
854
|
+
"onUpdate:modelValue": o[12] || (o[12] = (c) => f.value = c)
|
|
855
|
+
}, t.value), null, 16, ["modelValue"])) : d.value == U(ye).RATE ? (n(), D(Te, T({
|
|
856
856
|
key: 11,
|
|
857
857
|
modelValue: f.value,
|
|
858
|
-
"onUpdate:modelValue":
|
|
859
|
-
}, t.value), null, 16, ["modelValue"])) :
|
|
858
|
+
"onUpdate:modelValue": o[13] || (o[13] = (c) => f.value = c)
|
|
859
|
+
}, t.value), null, 16, ["modelValue"])) : d.value == U(ye).SLIDER ? (n(), D(Se, T({
|
|
860
860
|
key: 12,
|
|
861
861
|
modelValue: f.value,
|
|
862
|
-
"onUpdate:modelValue":
|
|
863
|
-
}, t.value), null, 16, ["modelValue"])) :
|
|
862
|
+
"onUpdate:modelValue": o[14] || (o[14] = (c) => f.value = c)
|
|
863
|
+
}, t.value), null, 16, ["modelValue"])) : d.value == U(ye).SWITCH ? (n(), D(we, T({
|
|
864
864
|
key: 13,
|
|
865
865
|
modelValue: f.value,
|
|
866
|
-
"onUpdate:modelValue":
|
|
866
|
+
"onUpdate:modelValue": o[15] || (o[15] = (c) => f.value = c),
|
|
867
867
|
inlinePrompt: !0
|
|
868
868
|
}, t.value), me({ _: 2 }, [
|
|
869
|
-
|
|
869
|
+
R(H(), (c) => ({
|
|
870
870
|
name: c,
|
|
871
|
-
fn: y((
|
|
872
|
-
h(b.$slots, `${
|
|
871
|
+
fn: y((G) => [
|
|
872
|
+
h(b.$slots, `${r.t}-${e.value}-${c}`, { data: G }, void 0, !0)
|
|
873
873
|
])
|
|
874
874
|
}))
|
|
875
|
-
]), 1040, ["modelValue"])) :
|
|
875
|
+
]), 1040, ["modelValue"])) : d.value == U(ye).TRANSFER ? (n(), D(Fe, T({
|
|
876
876
|
key: 14,
|
|
877
877
|
modelValue: f.value,
|
|
878
|
-
"onUpdate:modelValue":
|
|
878
|
+
"onUpdate:modelValue": o[16] || (o[16] = (c) => f.value = c)
|
|
879
879
|
}, t.value), me({ _: 2 }, [
|
|
880
|
-
|
|
880
|
+
R(H(), (c) => ({
|
|
881
881
|
name: c,
|
|
882
|
-
fn: y((
|
|
883
|
-
h(b.$slots, `${
|
|
882
|
+
fn: y((G) => [
|
|
883
|
+
h(b.$slots, `${r.t}-${e.value}-${c}`, { data: G }, void 0, !0)
|
|
884
884
|
])
|
|
885
885
|
}))
|
|
886
|
-
]), 1040, ["modelValue"])) :
|
|
886
|
+
]), 1040, ["modelValue"])) : d.value == U(ye).CASCADER ? (n(), D(Ue, T({
|
|
887
887
|
key: 15,
|
|
888
888
|
modelValue: f.value,
|
|
889
|
-
"onUpdate:modelValue":
|
|
890
|
-
}, t.value, { options:
|
|
891
|
-
|
|
889
|
+
"onUpdate:modelValue": o[17] || (o[17] = (c) => f.value = c)
|
|
890
|
+
}, t.value, { options: F.value }), me({ _: 2 }, [
|
|
891
|
+
R(H(), (c) => ({
|
|
892
892
|
name: c,
|
|
893
|
-
fn: y((
|
|
894
|
-
h(b.$slots, `${
|
|
893
|
+
fn: y((G) => [
|
|
894
|
+
h(b.$slots, `${r.t}-${e.value}-${c}`, { data: G }, void 0, !0)
|
|
895
895
|
])
|
|
896
896
|
}))
|
|
897
|
-
]), 1040, ["modelValue", "options"])) :
|
|
897
|
+
]), 1040, ["modelValue", "options"])) : d.value == U(ye).IMAGE ? (n(), D(st, T({
|
|
898
898
|
key: 16,
|
|
899
899
|
"file-list": t.value["file-list"],
|
|
900
|
-
"onUpdate:fileList":
|
|
900
|
+
"onUpdate:fileList": o[21] || (o[21] = (c) => t.value["file-list"] = c),
|
|
901
901
|
"list-type": "picture-card",
|
|
902
902
|
class: "custom-upload",
|
|
903
903
|
"on-preview": de
|
|
@@ -910,26 +910,26 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
910
910
|
return [
|
|
911
911
|
f.value ? (n(), x("div", {
|
|
912
912
|
key: 1,
|
|
913
|
-
onClick:
|
|
913
|
+
onClick: o[20] || (o[20] = (G) => G.stopPropagation()),
|
|
914
914
|
style: { display: "flex", width: "var(--up-width)", height: "var(--up-height)", position: "relative", "align-items": "center", "justify-content": "center", "box-sizing": "border-box" }
|
|
915
915
|
}, [
|
|
916
|
-
|
|
917
|
-
Z(nt,
|
|
916
|
+
X("div", ul, [
|
|
917
|
+
Z(nt, T({
|
|
918
918
|
style: { width: "var(--up-width)", height: "var(--up-height)" },
|
|
919
919
|
src: f.value
|
|
920
920
|
}, { fit: "cover", lazy: !0, ...(c = t.value) == null ? void 0 : c.img }), me({ _: 2 }, [
|
|
921
|
-
|
|
922
|
-
name:
|
|
923
|
-
fn: y((
|
|
924
|
-
h(b.$slots, `${
|
|
921
|
+
R(H(), (G, ce) => ({
|
|
922
|
+
name: G,
|
|
923
|
+
fn: y((Be) => [
|
|
924
|
+
h(b.$slots, `${r.t}-${e.value}-${G}`, { data: Be }, void 0, !0)
|
|
925
925
|
])
|
|
926
926
|
}))
|
|
927
927
|
]), 1040, ["src"])
|
|
928
928
|
]),
|
|
929
|
-
|
|
929
|
+
X("div", {
|
|
930
930
|
style: { display: "flex", width: "var(--up-width)", height: "var(--up-height)", position: "absolute", "align-items": "center", "justify-content": "center" },
|
|
931
|
-
onMouseenter:
|
|
932
|
-
onMouseleave:
|
|
931
|
+
onMouseenter: o[18] || (o[18] = (G) => w.value = !0),
|
|
932
|
+
onMouseleave: o[19] || (o[19] = (G) => w.value = !1),
|
|
933
933
|
class: "up-view"
|
|
934
934
|
}, [
|
|
935
935
|
w.value ? (n(), D(tt, {
|
|
@@ -938,7 +938,7 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
938
938
|
placement: "top"
|
|
939
939
|
}, {
|
|
940
940
|
default: y(() => [
|
|
941
|
-
Z(
|
|
941
|
+
Z(U(Gt), {
|
|
942
942
|
style: { width: "1.5em", height: "1.5em", "margin-right": "12px" },
|
|
943
943
|
color: "white",
|
|
944
944
|
onClick: fe
|
|
@@ -952,7 +952,7 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
952
952
|
placement: "top"
|
|
953
953
|
}, {
|
|
954
954
|
default: y(() => [
|
|
955
|
-
Z(
|
|
955
|
+
Z(U(Qt), {
|
|
956
956
|
style: { width: "1.5em", height: "1.5em" },
|
|
957
957
|
color: "white",
|
|
958
958
|
onClick: be
|
|
@@ -963,7 +963,7 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
963
963
|
], 32)
|
|
964
964
|
])) : (n(), D(Re, { key: 0 }, {
|
|
965
965
|
default: y(() => [
|
|
966
|
-
Z(
|
|
966
|
+
Z(U(Xt))
|
|
967
967
|
]),
|
|
968
968
|
_: 1
|
|
969
969
|
}))
|
|
@@ -971,118 +971,118 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
971
971
|
}),
|
|
972
972
|
_: 2
|
|
973
973
|
}, [
|
|
974
|
-
|
|
974
|
+
R(H(), (c, G) => ({
|
|
975
975
|
name: c,
|
|
976
976
|
fn: y((ce) => [
|
|
977
|
-
h(b.$slots, `${
|
|
977
|
+
h(b.$slots, `${r.t}-${e.value}-${c}`, { data: ce }, void 0, !0)
|
|
978
978
|
])
|
|
979
979
|
}))
|
|
980
|
-
]), 1040, ["file-list"])) :
|
|
980
|
+
]), 1040, ["file-list"])) : d.value == U(ye).AUTOCOMPLETE ? (n(), D(it, T({
|
|
981
981
|
key: 17,
|
|
982
982
|
modelValue: f.value,
|
|
983
|
-
"onUpdate:modelValue":
|
|
983
|
+
"onUpdate:modelValue": o[22] || (o[22] = (c) => f.value = c)
|
|
984
984
|
}, t.value, {
|
|
985
985
|
placeholder: E.value[e.value].label
|
|
986
986
|
}), me({ _: 2 }, [
|
|
987
|
-
|
|
987
|
+
R(H(), (c, G) => ({
|
|
988
988
|
name: c,
|
|
989
989
|
fn: y((ce) => [
|
|
990
|
-
h(b.$slots, `${
|
|
990
|
+
h(b.$slots, `${r.t}-${e.value}-${c}`, { data: ce }, void 0, !0)
|
|
991
991
|
])
|
|
992
992
|
}))
|
|
993
|
-
]), 1040, ["modelValue", "placeholder"])) :
|
|
993
|
+
]), 1040, ["modelValue", "placeholder"])) : d.value == U(ye).INPUTNUMBER ? (n(), D(dt, T({
|
|
994
994
|
key: 18,
|
|
995
995
|
modelValue: f.value,
|
|
996
|
-
"onUpdate:modelValue":
|
|
996
|
+
"onUpdate:modelValue": o[23] || (o[23] = (c) => f.value = c),
|
|
997
997
|
min: 0,
|
|
998
998
|
max: 1e8,
|
|
999
999
|
placeholder: E.value[e.value].label
|
|
1000
1000
|
}, t.value), me({ _: 2 }, [
|
|
1001
|
-
|
|
1001
|
+
R(H(), (c, G) => ({
|
|
1002
1002
|
name: c,
|
|
1003
1003
|
fn: y((ce) => [
|
|
1004
|
-
h(b.$slots, `${
|
|
1004
|
+
h(b.$slots, `${r.t}-${e.value}-${c}`, { data: ce }, void 0, !0)
|
|
1005
1005
|
])
|
|
1006
1006
|
}))
|
|
1007
|
-
]), 1040, ["modelValue", "placeholder"])) :
|
|
1008
|
-
Z(lt,
|
|
1007
|
+
]), 1040, ["modelValue", "placeholder"])) : d.value == U(ye).MONEY ? (n(), x("div", nl, [
|
|
1008
|
+
Z(lt, T({
|
|
1009
1009
|
modelValue: f.value,
|
|
1010
|
-
"onUpdate:modelValue":
|
|
1010
|
+
"onUpdate:modelValue": o[24] || (o[24] = (c) => f.value = c),
|
|
1011
1011
|
placeholder: E.value[e.value].label,
|
|
1012
|
-
type:
|
|
1012
|
+
type: U(ye).NUMBER,
|
|
1013
1013
|
maxlength: ((z = t.value) == null ? void 0 : z.max) || 25
|
|
1014
|
-
}, { ...t.value, type:
|
|
1014
|
+
}, { ...t.value, type: d.value }), me({
|
|
1015
1015
|
suffix: y(() => [
|
|
1016
|
-
|
|
1017
|
-
title:
|
|
1016
|
+
X("div", {
|
|
1017
|
+
title: U(Et)(f.value),
|
|
1018
1018
|
style: { "font-size": "10px", display: "block", width: "80px", "text-align": "right", overflow: "hidden", "text-overflow": "ellipsis" }
|
|
1019
|
-
},
|
|
1019
|
+
}, he(U(Et)(f.value)), 9, sl)
|
|
1020
1020
|
]),
|
|
1021
1021
|
_: 2
|
|
1022
1022
|
}, [
|
|
1023
|
-
|
|
1023
|
+
R(H(), (c, G) => ({
|
|
1024
1024
|
name: c,
|
|
1025
1025
|
fn: y((ce) => [
|
|
1026
|
-
h(b.$slots, `${
|
|
1026
|
+
h(b.$slots, `${r.t}-${e.value}-${c}`, { data: ce }, void 0, !0)
|
|
1027
1027
|
])
|
|
1028
1028
|
}))
|
|
1029
1029
|
]), 1040, ["modelValue", "placeholder", "type", "maxlength"])
|
|
1030
|
-
])) : (te =
|
|
1031
|
-
Z(l,
|
|
1032
|
-
type:
|
|
1030
|
+
])) : (te = d.value) != null && te.startsWith("link") ? (n(), x("div", il, [
|
|
1031
|
+
Z(l, T(t.value, {
|
|
1032
|
+
type: d.value.replace("link-", ""),
|
|
1033
1033
|
innerHTML: O.value || f.value
|
|
1034
1034
|
}), null, 16, ["type", "innerHTML"])
|
|
1035
|
-
])) :
|
|
1036
|
-
Z(u,
|
|
1037
|
-
type:
|
|
1035
|
+
])) : d.value != "textarea" && ((Ee = d.value) != null && Ee.startsWith("text")) ? (n(), x("div", dl, [
|
|
1036
|
+
Z(u, T(t.value, {
|
|
1037
|
+
type: d.value.replace("text-", ""),
|
|
1038
1038
|
innerHTML: O.value || f.value
|
|
1039
1039
|
}), null, 16, ["type", "innerHTML"])
|
|
1040
|
-
])) :
|
|
1041
|
-
O.value ? (n(), D(m, gt(
|
|
1040
|
+
])) : d.value == "avatar" ? (n(), x("div", fl, [
|
|
1041
|
+
O.value ? (n(), D(m, gt(T({ key: 0 }, t.value)), {
|
|
1042
1042
|
default: y(() => [
|
|
1043
|
-
|
|
1043
|
+
X("div", { innerHTML: O.value }, null, 8, cl)
|
|
1044
1044
|
]),
|
|
1045
1045
|
_: 1
|
|
1046
|
-
}, 16)) : (n(), D(m, gt(
|
|
1047
|
-
])) : (Ce =
|
|
1048
|
-
Array.isArray(O.value) && O.value.length > 0 ? (n(!0), x(W, { key: 0 },
|
|
1049
|
-
typeof c == "object" ? (n(), D(V,
|
|
1046
|
+
}, 16)) : (n(), D(m, gt(T({ key: 1 }, t.value)), null, 16))
|
|
1047
|
+
])) : (Ce = d.value) != null && Ce.startsWith("tag") ? (n(), x("div", ml, [
|
|
1048
|
+
Array.isArray(O.value) && O.value.length > 0 ? (n(!0), x(W, { key: 0 }, R(O.value, (c, G) => (n(), x(W, { key: G }, [
|
|
1049
|
+
typeof c == "object" ? (n(), D(V, T({
|
|
1050
1050
|
key: 0,
|
|
1051
1051
|
ref_for: !0
|
|
1052
1052
|
}, c, {
|
|
1053
1053
|
innerHTML: c == null ? void 0 : c.value,
|
|
1054
1054
|
style: { "margin-right": "3px" }
|
|
1055
|
-
}), null, 16, ["innerHTML"])) : (n(), D(V,
|
|
1055
|
+
}), null, 16, ["innerHTML"])) : (n(), D(V, T({
|
|
1056
1056
|
key: 1,
|
|
1057
1057
|
ref_for: !0
|
|
1058
1058
|
}, t.value, {
|
|
1059
|
-
type:
|
|
1059
|
+
type: d.value.replace("tag-", ""),
|
|
1060
1060
|
innerHTML: c,
|
|
1061
1061
|
style: { "margin-right": "3px" }
|
|
1062
1062
|
}), null, 16, ["type", "innerHTML"]))
|
|
1063
|
-
], 64))), 128)) : (n(), D(V,
|
|
1064
|
-
type:
|
|
1063
|
+
], 64))), 128)) : (n(), D(V, T({ key: 1 }, t.value, {
|
|
1064
|
+
type: d.value.replace("tag-", ""),
|
|
1065
1065
|
innerHTML: O.value || f.value
|
|
1066
1066
|
}), null, 16, ["type", "innerHTML"]))
|
|
1067
|
-
])) :
|
|
1067
|
+
])) : d.value == "div" ? (n(), x("div", T({ key: 24 }, t.value, {
|
|
1068
1068
|
innerHTML: O.value || f.value
|
|
1069
|
-
}), null, 16,
|
|
1069
|
+
}), null, 16, pl)) : d.value == "span" ? (n(), x("span", T({ key: 25 }, t.value, {
|
|
1070
1070
|
innerHTML: O.value || f.value
|
|
1071
|
-
}), null, 16,
|
|
1071
|
+
}), null, 16, vl)) : (n(), D(lt, T({
|
|
1072
1072
|
key: 26,
|
|
1073
1073
|
modelValue: f.value,
|
|
1074
|
-
"onUpdate:modelValue":
|
|
1074
|
+
"onUpdate:modelValue": o[25] || (o[25] = (c) => f.value = c),
|
|
1075
1075
|
placeholder: E.value[e.value].label,
|
|
1076
1076
|
maxlength: ((Le = t.value) == null ? void 0 : Le.max) || 25,
|
|
1077
1077
|
clearable: !0,
|
|
1078
|
-
onClear:
|
|
1079
|
-
|
|
1078
|
+
onClear: o[26] || (o[26] = () => {
|
|
1079
|
+
r.t == "q" && E.value.table.load();
|
|
1080
1080
|
})
|
|
1081
|
-
}, { ...t.value, type:
|
|
1082
|
-
|
|
1081
|
+
}, { ...t.value, type: d.value }), me({ _: 2 }, [
|
|
1082
|
+
R(H(), (c, G) => ({
|
|
1083
1083
|
name: c,
|
|
1084
1084
|
fn: y((ce) => [
|
|
1085
|
-
h(b.$slots, `${
|
|
1085
|
+
h(b.$slots, `${r.t}-${e.value}-${c}`, { data: ce }, void 0, !0)
|
|
1086
1086
|
])
|
|
1087
1087
|
}))
|
|
1088
1088
|
]), 1040, ["modelValue", "placeholder", "maxlength"]))
|
|
@@ -1090,7 +1090,7 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1090
1090
|
], 64);
|
|
1091
1091
|
};
|
|
1092
1092
|
}
|
|
1093
|
-
}), vt = /* @__PURE__ */
|
|
1093
|
+
}), vt = /* @__PURE__ */ Qe(hl, [["__scopeId", "data-v-30ecdb1c"]]), bt = /* @__PURE__ */ Object.assign({
|
|
1094
1094
|
name: "g-form",
|
|
1095
1095
|
inheritAttrs: !1
|
|
1096
1096
|
}, {
|
|
@@ -1100,9 +1100,9 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1100
1100
|
modelModifiers: {}
|
|
1101
1101
|
}),
|
|
1102
1102
|
emits: /* @__PURE__ */ ze(["submit", "reset"], ["update:modelValue"]),
|
|
1103
|
-
setup(
|
|
1103
|
+
setup(i, { expose: f, emit: r }) {
|
|
1104
1104
|
var ae, $e, se, b;
|
|
1105
|
-
const t = Pe(
|
|
1105
|
+
const t = Pe(i, "modelValue"), e = r, d = le(null), E = _t("options"), S = le({}), F = le(""), _ = i, w = {
|
|
1106
1106
|
inline: !0,
|
|
1107
1107
|
type: "hidden",
|
|
1108
1108
|
"scroll-to-error": !0,
|
|
@@ -1112,7 +1112,7 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1112
1112
|
style: {
|
|
1113
1113
|
display: "flex",
|
|
1114
1114
|
flexWrap: "wrap",
|
|
1115
|
-
...(ae =
|
|
1115
|
+
...(ae = kt()) == null ? void 0 : ae.style
|
|
1116
1116
|
},
|
|
1117
1117
|
// 表单底部属性
|
|
1118
1118
|
footer: {
|
|
@@ -1146,17 +1146,17 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1146
1146
|
editable: !1
|
|
1147
1147
|
}
|
|
1148
1148
|
};
|
|
1149
|
-
t.value.form =
|
|
1149
|
+
t.value.form = qe(
|
|
1150
1150
|
w,
|
|
1151
1151
|
E == null ? void 0 : E.form,
|
|
1152
1152
|
($e = t.value) == null ? void 0 : $e.form
|
|
1153
1153
|
);
|
|
1154
|
-
const H = async (
|
|
1154
|
+
const H = async (o, k) => {
|
|
1155
1155
|
let p = 5;
|
|
1156
1156
|
for (; p > 0; ) {
|
|
1157
|
-
if (await et(),
|
|
1158
|
-
|
|
1159
|
-
a ? e("submit",
|
|
1157
|
+
if (await et(), d.value) {
|
|
1158
|
+
d.value.validate((a, v) => {
|
|
1159
|
+
a ? e("submit", o, k) : console.log("表单验证不通过!", v);
|
|
1160
1160
|
});
|
|
1161
1161
|
return;
|
|
1162
1162
|
}
|
|
@@ -1164,20 +1164,20 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1164
1164
|
}
|
|
1165
1165
|
console.error("表单实例获取失败,请检查组件状态");
|
|
1166
1166
|
}, ee = async () => {
|
|
1167
|
-
let
|
|
1168
|
-
for (;
|
|
1169
|
-
if (await et(), !
|
|
1170
|
-
|
|
1167
|
+
let o = 5;
|
|
1168
|
+
for (; o > 0; ) {
|
|
1169
|
+
if (await et(), !d.value) {
|
|
1170
|
+
o--, await new Promise((p) => setTimeout(p, 50));
|
|
1171
1171
|
continue;
|
|
1172
1172
|
}
|
|
1173
|
-
let
|
|
1173
|
+
let k = !0;
|
|
1174
1174
|
if (e("reset", (p) => {
|
|
1175
|
-
|
|
1176
|
-
}),
|
|
1177
|
-
|
|
1175
|
+
k = p;
|
|
1176
|
+
}), k) {
|
|
1177
|
+
d.value.resetFields();
|
|
1178
1178
|
return;
|
|
1179
1179
|
}
|
|
1180
|
-
|
|
1180
|
+
o--, await new Promise((p) => setTimeout(p, 50));
|
|
1181
1181
|
}
|
|
1182
1182
|
console.error("表单实例获取失败,请检查组件状态");
|
|
1183
1183
|
};
|
|
@@ -1189,7 +1189,7 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1189
1189
|
width: "100%"
|
|
1190
1190
|
}
|
|
1191
1191
|
};
|
|
1192
|
-
t.value.formItems =
|
|
1192
|
+
t.value.formItems = qe(
|
|
1193
1193
|
O,
|
|
1194
1194
|
E == null ? void 0 : E.formItems,
|
|
1195
1195
|
(se = t == null ? void 0 : t.value) == null ? void 0 : se.formItems
|
|
@@ -1198,15 +1198,15 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1198
1198
|
span: 12,
|
|
1199
1199
|
offset: 0
|
|
1200
1200
|
};
|
|
1201
|
-
t.value.form.cols =
|
|
1201
|
+
t.value.form.cols = qe(
|
|
1202
1202
|
Y,
|
|
1203
1203
|
(b = E == null ? void 0 : E.form) == null ? void 0 : b.cols,
|
|
1204
1204
|
t.value.form.cols
|
|
1205
1205
|
);
|
|
1206
|
-
const ie = (
|
|
1207
|
-
let
|
|
1208
|
-
if (
|
|
1209
|
-
|
|
1206
|
+
const ie = (o) => {
|
|
1207
|
+
let k = [];
|
|
1208
|
+
if (o.rules)
|
|
1209
|
+
k = o.rules;
|
|
1210
1210
|
else {
|
|
1211
1211
|
const a = { ...{
|
|
1212
1212
|
required: void 0,
|
|
@@ -1216,78 +1216,78 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1216
1216
|
url: void 0,
|
|
1217
1217
|
pattern: void 0,
|
|
1218
1218
|
validate: void 0
|
|
1219
|
-
}, ...
|
|
1220
|
-
a.required &&
|
|
1219
|
+
}, ...o };
|
|
1220
|
+
a.required && k.push({ required: !0, message: `${a.label}不能为空!`, trigger: "blur" }), a.max !== void 0 && a.max !== null && a.max !== "" && (a.min === void 0 || a.min === null || a.min === "") && k.push({
|
|
1221
1221
|
validator: (v, g, s) => {
|
|
1222
1222
|
if (g == null || g === "") return s();
|
|
1223
1223
|
a.type !== "number" && a.type !== "input-number" ? ((g == null ? void 0 : g.toString()) || "").length > Number(a.max) ? s(new Error(`${a.label}长度不能超过${a.max}个字符!`)) : s() : Number(g) > Number(a.max) ? s(new Error(`${a.label}不能大于${a.max}!`)) : s();
|
|
1224
1224
|
}
|
|
1225
|
-
}), a.min !== void 0 && a.min !== null && a.min !== "" && (a.max === void 0 || a.max === null || a.max === "") &&
|
|
1225
|
+
}), a.min !== void 0 && a.min !== null && a.min !== "" && (a.max === void 0 || a.max === null || a.max === "") && k.push({
|
|
1226
1226
|
validator: (v, g, s) => {
|
|
1227
1227
|
if (g == null || g === "") return s();
|
|
1228
1228
|
a.type !== "number" && a.type !== "input-number" ? Number(a.min) < 1 ? s(new Error(`${a.label}长度最小值${a.min}设置错误!`)) : g.toString().length < Number(a.min) ? s(new Error(`${a.label}长度不能少于${a.min}个字符!`)) : s() : Number(g) < Number(a.min) ? s(new Error(`${a.label}不能小于${a.min}!`)) : s();
|
|
1229
1229
|
}
|
|
1230
|
-
}), a.min !== void 0 && a.min !== null && a.min !== "" && a.max !== void 0 && a.max !== null && a.max !== "" &&
|
|
1230
|
+
}), a.min !== void 0 && a.min !== null && a.min !== "" && a.max !== void 0 && a.max !== null && a.max !== "" && k.push({
|
|
1231
1231
|
validator: (v, g, s) => {
|
|
1232
1232
|
if (g == null || g === "") return s();
|
|
1233
1233
|
const M = Number(a.min), C = Number(a.max);
|
|
1234
1234
|
a.type !== "number" && a.type !== "input-number" ? Number(a.min) < 1 ? s(new Error(`${a.label}长度最小值${a.min}设置错误!`)) : g.toString().length < M || g.toString().length > C ? s(new Error(`${a.label}长度必须在${M}-${C}个字符之间!`)) : s() : Number(g) < M || g > C ? s(new Error(`${a.label}必须在${M}-${C}之间!`)) : s();
|
|
1235
1235
|
}
|
|
1236
|
-
}), a.type == "email" &&
|
|
1236
|
+
}), a.type == "email" && k.push({ type: "email", message: "不是一个正确的邮箱地址!" }), a.type == "url" && k.push({ type: "url", message: "不是一个合正确的URL!" }), a.pattern && k.push({ pattern: a == null ? void 0 : a.pattern, message: (a == null ? void 0 : a.message) || "格式不正确!" }), a.validate && k.push({
|
|
1237
1237
|
validator: (v, g, s) => a.validate(v, g, s)
|
|
1238
1238
|
});
|
|
1239
1239
|
}
|
|
1240
|
-
return
|
|
1241
|
-
},
|
|
1240
|
+
return k;
|
|
1241
|
+
}, oe = (o, k = !1) => {
|
|
1242
1242
|
var v, g, s, M, C;
|
|
1243
|
-
const p =
|
|
1243
|
+
const p = k ? o : o == null ? void 0 : o.item, a = typeof (p == null ? void 0 : p.editor) == "function" ? p.editor(S.value, (v = t.value.form) == null ? void 0 : v.modalState) : (p == null ? void 0 : p.editor) || {};
|
|
1244
1244
|
if (((g = t.value.form) == null ? void 0 : g.modalState) === "edit") {
|
|
1245
|
-
const
|
|
1246
|
-
return { ...a, ...
|
|
1245
|
+
const L = typeof (p == null ? void 0 : p.editor) == "object" ? (s = p.editor) == null ? void 0 : s.ep : typeof (p == null ? void 0 : p.editor) == "function" ? a == null ? void 0 : a.ep : {};
|
|
1246
|
+
return { ...a, ...L };
|
|
1247
1247
|
}
|
|
1248
1248
|
if (((M = t.value.form) == null ? void 0 : M.modalState) === "add") {
|
|
1249
|
-
const
|
|
1250
|
-
return { ...a, ...
|
|
1249
|
+
const L = typeof (p == null ? void 0 : p.editor) == "object" ? (C = p.editor) == null ? void 0 : C.ap : typeof (p == null ? void 0 : p.editor) == "function" ? a == null ? void 0 : a.ap : {};
|
|
1250
|
+
return { ...a, ...L };
|
|
1251
1251
|
}
|
|
1252
1252
|
return a;
|
|
1253
|
-
}, J = (
|
|
1253
|
+
}, J = (o) => {
|
|
1254
1254
|
var p, a, v, g, s;
|
|
1255
|
-
const
|
|
1256
|
-
return ((a = t.value.form) == null ? void 0 : a.modalState) === "edit" ? ((v =
|
|
1255
|
+
const k = typeof o.editor == "function" ? o.editor(S.value, (p = t.value.form) == null ? void 0 : p.modalState) : o.editor;
|
|
1256
|
+
return ((a = t.value.form) == null ? void 0 : a.modalState) === "edit" ? ((v = k == null ? void 0 : k.ep) == null ? void 0 : v.type) ?? (k == null ? void 0 : k.type) ?? o.type : ((g = t.value.form) == null ? void 0 : g.modalState) === "add" ? ((s = k == null ? void 0 : k.ap) == null ? void 0 : s.type) ?? (k == null ? void 0 : k.type) ?? o.type : (k == null ? void 0 : k.type) ?? o.type;
|
|
1257
1257
|
};
|
|
1258
1258
|
ut(() => {
|
|
1259
|
-
ve(),
|
|
1259
|
+
ve(), _ != null && _.editForm ? S.value = _.editForm : S.value = be.value;
|
|
1260
1260
|
}), Ut(() => {
|
|
1261
|
-
|
|
1261
|
+
d.value = null;
|
|
1262
1262
|
});
|
|
1263
1263
|
const ve = () => {
|
|
1264
|
-
|
|
1265
|
-
for (const [
|
|
1266
|
-
t.value[
|
|
1267
|
-
}, ge =
|
|
1264
|
+
F.value = Math.random().toString(36).substring(2);
|
|
1265
|
+
for (const [o, k] of Object.entries(ge.value))
|
|
1266
|
+
t.value[o].formItem = { ...t.value[o].formItem, ...k.formItem }, t.value[o].formItem.style = { ...t.value[o].formItem.style, ...k.formItem.style };
|
|
1267
|
+
}, ge = Je(() => Object.fromEntries(Object.entries(t.value).filter((o) => o[1].type != "hidden").filter((o) => o[1].edit !== !1).filter((o) => !["table", "tableColumns", "query", "queryItems"].includes(o[0])).filter((o) => o[1].editor !== !1).filter((o) => o[1].type !== "control").filter((o) => {
|
|
1268
1268
|
var p, a, v;
|
|
1269
|
-
const
|
|
1270
|
-
return t.value.form.modalState === "edit" ? ((a =
|
|
1271
|
-
}).map((
|
|
1272
|
-
const
|
|
1273
|
-
return Object.entries(ge.value).forEach(([
|
|
1269
|
+
const k = typeof o[1].editor == "function" ? o[1].editor(S.value, (p = t.value.form) == null ? void 0 : p.modalState) : o[1].editor;
|
|
1270
|
+
return t.value.form.modalState === "edit" ? ((a = k == null ? void 0 : k.ep) == null ? void 0 : a.editor) !== !1 : t.value.form.modalState === "add" ? ((v = k == null ? void 0 : k.ap) == null ? void 0 : v.editor) !== !1 : !0;
|
|
1271
|
+
}).map((o) => [o[0], o[1]]))), be = Je(() => Object.fromEntries(Object.entries(t.value).filter((o) => o[1].type != "hidden").filter((o) => o[1].type != "control").map((o) => [o[0], o[1].value]))), de = Je(() => {
|
|
1272
|
+
const o = /* @__PURE__ */ new Map();
|
|
1273
|
+
return Object.entries(ge.value).forEach(([k, p]) => {
|
|
1274
1274
|
if (p.groupName) {
|
|
1275
1275
|
const a = p.groupName;
|
|
1276
|
-
|
|
1276
|
+
o.has(a) || o.set(a, {
|
|
1277
1277
|
groupName: a,
|
|
1278
1278
|
items: []
|
|
1279
|
-
}),
|
|
1279
|
+
}), o.get(a).items.push({ key: k, item: p });
|
|
1280
1280
|
}
|
|
1281
|
-
}),
|
|
1282
|
-
|
|
1283
|
-
}), Array.from(
|
|
1281
|
+
}), o.forEach((k) => {
|
|
1282
|
+
k.tabPane = qe(...k.items.map(({ item: p }) => p.tabPane || {}));
|
|
1283
|
+
}), Array.from(o.values());
|
|
1284
1284
|
}), fe = [
|
|
1285
1285
|
{
|
|
1286
1286
|
name: "f-submit",
|
|
1287
1287
|
label: t.value.form.submit.label,
|
|
1288
1288
|
click: t.value.form.submit.click,
|
|
1289
1289
|
hidden: t.value.form.submit.hidden,
|
|
1290
|
-
info: Ve(t.value.form.submit, (
|
|
1290
|
+
info: Ve(t.value.form.submit, (o) => !["click"].includes(o)),
|
|
1291
1291
|
sort: t.value.form.submit.sort ?? 1,
|
|
1292
1292
|
// 使用空值合并运算符
|
|
1293
1293
|
originalOrder: 0
|
|
@@ -1297,38 +1297,38 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1297
1297
|
name: "f-reset",
|
|
1298
1298
|
label: t.value.form.reset.label,
|
|
1299
1299
|
click: t.value.form.reset.click,
|
|
1300
|
-
info: Ve(t.value.form.reset, (
|
|
1300
|
+
info: Ve(t.value.form.reset, (o) => !["click"].includes(o)),
|
|
1301
1301
|
hidden: t.value.form.reset.hidden,
|
|
1302
1302
|
sort: t.value.form.reset.sort ?? 2,
|
|
1303
1303
|
// 使用空值合并运算符
|
|
1304
1304
|
originalOrder: 1
|
|
1305
1305
|
// 添加原始顺序标识
|
|
1306
1306
|
}
|
|
1307
|
-
], ne =
|
|
1307
|
+
], ne = Je(() => fe.filter((o) => !o.hidden).sort((o, k) => o.sort - k.sort || o.originalOrder - k.originalOrder));
|
|
1308
1308
|
return f({
|
|
1309
1309
|
submit: H,
|
|
1310
1310
|
reset: ee,
|
|
1311
|
-
formData:
|
|
1312
|
-
}), (
|
|
1313
|
-
const p =
|
|
1314
|
-
return n(), D(M,
|
|
1311
|
+
formData: S
|
|
1312
|
+
}), (o, k) => {
|
|
1313
|
+
const p = B("el-form-item"), a = B("el-col"), v = B("el-tab-pane"), g = B("el-tabs"), s = B("el-button"), M = B("el-form");
|
|
1314
|
+
return n(), D(M, T({
|
|
1315
1315
|
ref_key: "gform",
|
|
1316
|
-
ref:
|
|
1317
|
-
model:
|
|
1316
|
+
ref: d,
|
|
1317
|
+
model: S.value,
|
|
1318
1318
|
style: { width: "98%", padding: 0, margin: 0, "box-sizing": "border-box" }
|
|
1319
|
-
},
|
|
1319
|
+
}, U(Ve)(t.value.form, (C) => !["footer", "submit", "reset", "slots", "type", "sort"].includes(C)), { class: "g-form-container" }), {
|
|
1320
1320
|
default: y(() => [
|
|
1321
|
-
de.value.length > 0 ? h(
|
|
1322
|
-
var C,
|
|
1321
|
+
de.value.length > 0 ? h(o.$slots, "default", { key: 0 }, () => {
|
|
1322
|
+
var C, L, Q;
|
|
1323
1323
|
return [
|
|
1324
|
-
Z(g,
|
|
1324
|
+
Z(g, T({
|
|
1325
1325
|
class: "demo-tabs",
|
|
1326
1326
|
modelValue: de.value[0].groupName,
|
|
1327
|
-
"onUpdate:modelValue":
|
|
1327
|
+
"onUpdate:modelValue": k[0] || (k[0] = (q) => de.value[0].groupName = q),
|
|
1328
1328
|
style: { width: "100%" }
|
|
1329
1329
|
}, t.value.form.tabs), {
|
|
1330
1330
|
default: y(() => [
|
|
1331
|
-
(n(!0), x(W, null,
|
|
1331
|
+
(n(!0), x(W, null, R(de.value, (q) => (n(), D(v, T({
|
|
1332
1332
|
key: q.groupName,
|
|
1333
1333
|
label: q.groupName,
|
|
1334
1334
|
name: q.groupName,
|
|
@@ -1336,41 +1336,41 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1336
1336
|
ref_for: !0
|
|
1337
1337
|
}, q.tabPane), {
|
|
1338
1338
|
default: y(() => [
|
|
1339
|
-
(n(!0), x(W, null,
|
|
1339
|
+
(n(!0), x(W, null, R(q.items, (A, ue) => (n(), D(a, T({ ref_for: !0 }, { ...t.value.form.cols, ...A == null ? void 0 : A.item.col }, {
|
|
1340
1340
|
key: A.key,
|
|
1341
1341
|
style: { width: "100%" }
|
|
1342
1342
|
}), {
|
|
1343
1343
|
default: y(() => {
|
|
1344
|
-
var
|
|
1344
|
+
var ke, _e;
|
|
1345
1345
|
return [
|
|
1346
|
-
Z(p,
|
|
1346
|
+
Z(p, T({
|
|
1347
1347
|
label: A == null ? void 0 : A.item.label,
|
|
1348
1348
|
prop: A.key,
|
|
1349
1349
|
rules: ie(A == null ? void 0 : A.item),
|
|
1350
1350
|
ref_for: !0
|
|
1351
|
-
}, { ...(
|
|
1351
|
+
}, { ...(ke = t.value) == null ? void 0 : ke.formItems, ...(_e = A == null ? void 0 : A.item) == null ? void 0 : _e.formItem }, { style: { width: "100%" } }), {
|
|
1352
1352
|
default: y(() => [
|
|
1353
|
-
h(
|
|
1353
|
+
h(o.$slots, "f-" + A.key, {
|
|
1354
1354
|
item: A == null ? void 0 : A.item,
|
|
1355
|
-
formInfo:
|
|
1355
|
+
formInfo: S.value,
|
|
1356
1356
|
model: t.value
|
|
1357
1357
|
}, () => [
|
|
1358
1358
|
(n(), D(vt, {
|
|
1359
|
-
modelValue:
|
|
1360
|
-
"onUpdate:modelValue": (
|
|
1361
|
-
item:
|
|
1359
|
+
modelValue: S.value[A.key],
|
|
1360
|
+
"onUpdate:modelValue": (Te) => S.value[A.key] = Te,
|
|
1361
|
+
item: oe(A),
|
|
1362
1362
|
ctrlKey: A.key,
|
|
1363
1363
|
ctrlType: J(A == null ? void 0 : A.item),
|
|
1364
1364
|
model: t.value,
|
|
1365
|
-
key: `${A.key}-${
|
|
1365
|
+
key: `${A.key}-${F.value}`,
|
|
1366
1366
|
class: "g-ctrl-container",
|
|
1367
1367
|
t: "f",
|
|
1368
|
-
formInfo:
|
|
1368
|
+
formInfo: S.value
|
|
1369
1369
|
}, me({ _: 2 }, [
|
|
1370
|
-
|
|
1371
|
-
name:
|
|
1370
|
+
R(o.$slots, (Te, Se) => ({
|
|
1371
|
+
name: Se,
|
|
1372
1372
|
fn: y((we) => [
|
|
1373
|
-
h(
|
|
1373
|
+
h(o.$slots, Se, {
|
|
1374
1374
|
data: we,
|
|
1375
1375
|
item: A.item,
|
|
1376
1376
|
model: t.value
|
|
@@ -1392,77 +1392,77 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1392
1392
|
]),
|
|
1393
1393
|
_: 3
|
|
1394
1394
|
}, 16, ["modelValue"]),
|
|
1395
|
-
(
|
|
1396
|
-
|
|
1397
|
-
style:
|
|
1395
|
+
(Q = (L = (C = t.value) == null ? void 0 : C.form) == null ? void 0 : L.footer) != null && Q.hidden ? pe("", !0) : h(o.$slots, "f-footer", { key: 0 }, () => [
|
|
1396
|
+
X("div", {
|
|
1397
|
+
style: Oe(t.value.form.footer.style)
|
|
1398
1398
|
}, [
|
|
1399
|
-
h(
|
|
1400
|
-
(n(!0), x(W, null,
|
|
1401
|
-
h(
|
|
1402
|
-
h(
|
|
1403
|
-
Z(s,
|
|
1404
|
-
onClick:
|
|
1399
|
+
h(o.$slots, "f-footer-left"),
|
|
1400
|
+
(n(!0), x(W, null, R(ne.value, (q) => (n(), x(W, null, [
|
|
1401
|
+
h(o.$slots, q.name + "-left"),
|
|
1402
|
+
h(o.$slots, q.name, {}, () => [
|
|
1403
|
+
Z(s, T({ ref_for: !0 }, q.info, {
|
|
1404
|
+
onClick: rt((A) => q.click(S.value, t.value), ["stop"])
|
|
1405
1405
|
}), {
|
|
1406
1406
|
default: y(() => [
|
|
1407
|
-
Me(
|
|
1407
|
+
Me(he(q == null ? void 0 : q.label), 1)
|
|
1408
1408
|
]),
|
|
1409
1409
|
_: 2
|
|
1410
1410
|
}, 1040, ["onClick"])
|
|
1411
1411
|
]),
|
|
1412
|
-
h(
|
|
1412
|
+
h(o.$slots, q.name + "-right")
|
|
1413
1413
|
], 64))), 256)),
|
|
1414
|
-
h(
|
|
1414
|
+
h(o.$slots, "f-footer-right")
|
|
1415
1415
|
], 4)
|
|
1416
1416
|
])
|
|
1417
1417
|
];
|
|
1418
|
-
}) : h(
|
|
1419
|
-
var C,
|
|
1418
|
+
}) : h(o.$slots, "default", { key: 1 }, () => {
|
|
1419
|
+
var C, L, Q;
|
|
1420
1420
|
return [
|
|
1421
|
-
(n(!0), x(W, null,
|
|
1421
|
+
(n(!0), x(W, null, R(ge.value, (q, A) => (n(), D(a, T({ ref_for: !0 }, { ...t.value.form.cols, ...q.col }, {
|
|
1422
1422
|
key: A,
|
|
1423
1423
|
style: { width: "100%" }
|
|
1424
1424
|
}), {
|
|
1425
1425
|
default: y(() => {
|
|
1426
1426
|
var ue;
|
|
1427
1427
|
return [
|
|
1428
|
-
Z(p,
|
|
1428
|
+
Z(p, T({
|
|
1429
1429
|
label: q.label,
|
|
1430
1430
|
prop: A,
|
|
1431
1431
|
rules: ie(q),
|
|
1432
1432
|
ref_for: !0
|
|
1433
1433
|
}, { ...(ue = t.value) == null ? void 0 : ue.formItems, ...q == null ? void 0 : q.formItem }, { style: { width: "100%" } }), {
|
|
1434
|
-
label: y((
|
|
1435
|
-
h(
|
|
1436
|
-
data:
|
|
1434
|
+
label: y((ke) => [
|
|
1435
|
+
h(o.$slots, `f-${A}-label`, {
|
|
1436
|
+
data: ke,
|
|
1437
1437
|
item: q,
|
|
1438
1438
|
model: t.value
|
|
1439
1439
|
}, () => [
|
|
1440
|
-
Me(
|
|
1440
|
+
Me(he(q.label), 1)
|
|
1441
1441
|
])
|
|
1442
1442
|
]),
|
|
1443
1443
|
default: y(() => [
|
|
1444
|
-
h(
|
|
1444
|
+
h(o.$slots, "f-" + A, {
|
|
1445
1445
|
item: q,
|
|
1446
|
-
formInfo:
|
|
1446
|
+
formInfo: S.value,
|
|
1447
1447
|
model: t.value
|
|
1448
1448
|
}, () => [
|
|
1449
1449
|
(n(), D(vt, {
|
|
1450
|
-
modelValue:
|
|
1451
|
-
"onUpdate:modelValue": (
|
|
1452
|
-
item:
|
|
1450
|
+
modelValue: S.value[A],
|
|
1451
|
+
"onUpdate:modelValue": (ke) => S.value[A] = ke,
|
|
1452
|
+
item: oe(q, !0),
|
|
1453
1453
|
ctrlKey: A,
|
|
1454
1454
|
ctrlType: J(q),
|
|
1455
|
-
key: `${A}-${
|
|
1455
|
+
key: `${A}-${F.value}`,
|
|
1456
1456
|
model: t.value,
|
|
1457
1457
|
class: "g-ctrl-container",
|
|
1458
1458
|
t: "f",
|
|
1459
|
-
formInfo:
|
|
1459
|
+
formInfo: S.value
|
|
1460
1460
|
}, me({ _: 2 }, [
|
|
1461
|
-
|
|
1462
|
-
name:
|
|
1463
|
-
fn: y((
|
|
1464
|
-
h(
|
|
1465
|
-
data:
|
|
1461
|
+
R(o.$slots, (ke, _e) => ({
|
|
1462
|
+
name: _e,
|
|
1463
|
+
fn: y((Te) => [
|
|
1464
|
+
h(o.$slots, _e, {
|
|
1465
|
+
data: Te,
|
|
1466
1466
|
item: q,
|
|
1467
1467
|
model: t.value
|
|
1468
1468
|
})
|
|
@@ -1477,26 +1477,26 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1477
1477
|
}),
|
|
1478
1478
|
_: 2
|
|
1479
1479
|
}, 1040))), 128)),
|
|
1480
|
-
(
|
|
1481
|
-
|
|
1482
|
-
style:
|
|
1480
|
+
(Q = (L = (C = t.value) == null ? void 0 : C.form) == null ? void 0 : L.footer) != null && Q.hidden ? pe("", !0) : h(o.$slots, "f-footer", { key: 0 }, () => [
|
|
1481
|
+
X("div", {
|
|
1482
|
+
style: Oe(t.value.form.footer.style)
|
|
1483
1483
|
}, [
|
|
1484
|
-
h(
|
|
1485
|
-
(n(!0), x(W, null,
|
|
1486
|
-
h(
|
|
1487
|
-
h(
|
|
1488
|
-
Z(s,
|
|
1489
|
-
onClick:
|
|
1484
|
+
h(o.$slots, "f-footer-left"),
|
|
1485
|
+
(n(!0), x(W, null, R(ne.value, (q) => (n(), x(W, null, [
|
|
1486
|
+
h(o.$slots, q.name + "-left"),
|
|
1487
|
+
h(o.$slots, q.name, {}, () => [
|
|
1488
|
+
Z(s, T({ ref_for: !0 }, q.info, {
|
|
1489
|
+
onClick: rt((A) => q.click(S.value, t.value), ["stop"])
|
|
1490
1490
|
}), {
|
|
1491
1491
|
default: y(() => [
|
|
1492
|
-
Me(
|
|
1492
|
+
Me(he(q == null ? void 0 : q.label), 1)
|
|
1493
1493
|
]),
|
|
1494
1494
|
_: 2
|
|
1495
1495
|
}, 1040, ["onClick"])
|
|
1496
1496
|
]),
|
|
1497
|
-
h(
|
|
1497
|
+
h(o.$slots, q.name + "-right")
|
|
1498
1498
|
], 64))), 256)),
|
|
1499
|
-
h(
|
|
1499
|
+
h(o.$slots, "f-footer-right")
|
|
1500
1500
|
], 4)
|
|
1501
1501
|
])
|
|
1502
1502
|
];
|
|
@@ -1515,28 +1515,28 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1515
1515
|
infoModifiers: {}
|
|
1516
1516
|
}),
|
|
1517
1517
|
emits: ["update:modelValue", "update:info"],
|
|
1518
|
-
setup(
|
|
1519
|
-
const f = Pe(
|
|
1520
|
-
var
|
|
1521
|
-
return typeof
|
|
1522
|
-
}).map((
|
|
1523
|
-
const
|
|
1524
|
-
return (
|
|
1518
|
+
setup(i) {
|
|
1519
|
+
const f = Pe(i, "modelValue"), r = i, t = Pe(i, "info"), e = (S) => Je(() => Object.fromEntries(Object.entries(f.value).filter((F) => {
|
|
1520
|
+
var _;
|
|
1521
|
+
return typeof F[1].search == "function" ? F[1].search && ((_ = F[1].search(t.value, f.value.table)) == null ? void 0 : _.more) === S : F[1].search && F[1].search.more === S;
|
|
1522
|
+
}).map((F) => [F[0], F[1]]))).value, d = (S) => typeof S.search == "function" ? S.search(t.value, f.value.table) : S.search || {}, E = (S) => {
|
|
1523
|
+
const F = d(S);
|
|
1524
|
+
return (F == null ? void 0 : F.type) || S.type;
|
|
1525
1525
|
};
|
|
1526
|
-
return (
|
|
1527
|
-
const
|
|
1528
|
-
return n(!0), x(W, null,
|
|
1526
|
+
return (S, F) => {
|
|
1527
|
+
const _ = B("el-form-item");
|
|
1528
|
+
return n(!0), x(W, null, R(e(r.more), (w, H) => h(S.$slots, `q-${H}`, {
|
|
1529
1529
|
key: H,
|
|
1530
1530
|
item: w,
|
|
1531
1531
|
queryModel: t.value,
|
|
1532
1532
|
model: f.value
|
|
1533
1533
|
}, () => [
|
|
1534
|
-
Z(
|
|
1534
|
+
Z(_, T({
|
|
1535
1535
|
label: w.label,
|
|
1536
1536
|
ref_for: !0
|
|
1537
|
-
}, { ...f.value.queryItems, ...
|
|
1537
|
+
}, { ...f.value.queryItems, ...d(w) }), {
|
|
1538
1538
|
label: y(() => [
|
|
1539
|
-
h(
|
|
1539
|
+
h(S.$slots, `q-${H}-label`, {
|
|
1540
1540
|
item: w,
|
|
1541
1541
|
model: f.value
|
|
1542
1542
|
})
|
|
@@ -1545,17 +1545,17 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1545
1545
|
Z(vt, {
|
|
1546
1546
|
modelValue: t.value[H],
|
|
1547
1547
|
"onUpdate:modelValue": (ee) => t.value[H] = ee,
|
|
1548
|
-
item: { ...w == null ? void 0 : w.editor, ...
|
|
1548
|
+
item: { ...w == null ? void 0 : w.editor, ...d(w) },
|
|
1549
1549
|
ctrlKey: H,
|
|
1550
1550
|
ctrlType: E(w),
|
|
1551
1551
|
model: f.value,
|
|
1552
1552
|
t: "q",
|
|
1553
1553
|
formInfo: t.value
|
|
1554
1554
|
}, me({ _: 2 }, [
|
|
1555
|
-
|
|
1555
|
+
R(Object.keys(S.$slots), (ee) => ({
|
|
1556
1556
|
name: ee,
|
|
1557
1557
|
fn: y((O) => [
|
|
1558
|
-
h(
|
|
1558
|
+
h(S.$slots, ee, {
|
|
1559
1559
|
data: O,
|
|
1560
1560
|
item: w,
|
|
1561
1561
|
model: f.value
|
|
@@ -1569,10 +1569,10 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1569
1569
|
])), 128);
|
|
1570
1570
|
};
|
|
1571
1571
|
}
|
|
1572
|
-
},
|
|
1572
|
+
}, yl = {
|
|
1573
1573
|
key: 0,
|
|
1574
1574
|
class: "outer"
|
|
1575
|
-
},
|
|
1575
|
+
}, gl = { class: "inner" }, bl = {
|
|
1576
1576
|
__name: "g-query",
|
|
1577
1577
|
props: {
|
|
1578
1578
|
modelValue: { required: !0 },
|
|
@@ -1581,8 +1581,8 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1581
1581
|
infoModifiers: {}
|
|
1582
1582
|
},
|
|
1583
1583
|
emits: /* @__PURE__ */ ze(["query", "reset"], ["update:modelValue", "update:info"]),
|
|
1584
|
-
setup(
|
|
1585
|
-
const
|
|
1584
|
+
setup(i, { emit: f }) {
|
|
1585
|
+
const r = Pe(i, "modelValue"), t = f, e = _t("options"), d = le(!1), E = Pe(i, "info"), S = {
|
|
1586
1586
|
hidden: !1,
|
|
1587
1587
|
type: "hidden",
|
|
1588
1588
|
labelWidth: 100,
|
|
@@ -1599,7 +1599,7 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1599
1599
|
type: "primary",
|
|
1600
1600
|
label: "更多",
|
|
1601
1601
|
click: () => {
|
|
1602
|
-
|
|
1602
|
+
d.value = !d.value;
|
|
1603
1603
|
}
|
|
1604
1604
|
},
|
|
1605
1605
|
reset: {
|
|
@@ -1616,7 +1616,7 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1616
1616
|
type: "primary",
|
|
1617
1617
|
label: "查询",
|
|
1618
1618
|
click: () => {
|
|
1619
|
-
t("query", E.value),
|
|
1619
|
+
t("query", E.value), d.value = !1;
|
|
1620
1620
|
}
|
|
1621
1621
|
},
|
|
1622
1622
|
btns: {
|
|
@@ -1630,8 +1630,8 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1630
1630
|
}
|
|
1631
1631
|
}
|
|
1632
1632
|
};
|
|
1633
|
-
|
|
1634
|
-
const
|
|
1633
|
+
r.value.query = qe(S, e == null ? void 0 : e.query, r.value.query);
|
|
1634
|
+
const F = {
|
|
1635
1635
|
2: {
|
|
1636
1636
|
title: "更多查询",
|
|
1637
1637
|
showClose: !1,
|
|
@@ -1648,116 +1648,116 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1648
1648
|
trigger: "click"
|
|
1649
1649
|
}
|
|
1650
1650
|
};
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1651
|
+
r.value.query.more.dialog = qe(
|
|
1652
|
+
F[r.value.query.more.mode] || {},
|
|
1653
|
+
r.value.query.more.dialog
|
|
1654
1654
|
);
|
|
1655
|
-
const
|
|
1655
|
+
const _ = {
|
|
1656
1656
|
type: "hidden",
|
|
1657
1657
|
labelPosition: "right",
|
|
1658
1658
|
style: {
|
|
1659
1659
|
width: "280px"
|
|
1660
1660
|
}
|
|
1661
1661
|
};
|
|
1662
|
-
|
|
1662
|
+
r.value.queryItems = qe(_, e == null ? void 0 : e.queryItems, r.value.queryItems);
|
|
1663
1663
|
const w = (O, Y) => {
|
|
1664
|
-
const ie = Object.keys(O.slots).filter((
|
|
1665
|
-
model:
|
|
1664
|
+
const ie = Object.keys(O.slots).filter((oe) => oe !== "default").reduce((oe, J) => (oe[J] = (ve) => O.slots[J]({
|
|
1665
|
+
model: r.value
|
|
1666
1666
|
// 传递当前模型数据
|
|
1667
|
-
}),
|
|
1668
|
-
return
|
|
1669
|
-
modelValue:
|
|
1670
|
-
"onUpdate:modelValue": (
|
|
1667
|
+
}), oe), {});
|
|
1668
|
+
return Ie(Dt, {
|
|
1669
|
+
modelValue: r.value,
|
|
1670
|
+
"onUpdate:modelValue": (oe) => r.value = oe,
|
|
1671
1671
|
info: E.value,
|
|
1672
|
-
"onUpdate:info": (
|
|
1672
|
+
"onUpdate:info": (oe) => E.value = oe,
|
|
1673
1673
|
more: Y
|
|
1674
1674
|
}, ie);
|
|
1675
|
-
}, H =
|
|
1676
|
-
var ie,
|
|
1675
|
+
}, H = Tt(), ee = () => {
|
|
1676
|
+
var ie, oe, J, ve, ge, be, de, fe, ne;
|
|
1677
1677
|
const O = [
|
|
1678
1678
|
{
|
|
1679
1679
|
key: "query",
|
|
1680
|
-
hidden: (J = (
|
|
1680
|
+
hidden: (J = (oe = (ie = r.value) == null ? void 0 : ie.query) == null ? void 0 : oe.query) == null ? void 0 : J.hidden,
|
|
1681
1681
|
component: De,
|
|
1682
1682
|
props: {
|
|
1683
|
-
...
|
|
1684
|
-
onClick:
|
|
1683
|
+
...r.value.query.query,
|
|
1684
|
+
onClick: r.value.query.query.click
|
|
1685
1685
|
},
|
|
1686
|
-
label:
|
|
1687
|
-
sort:
|
|
1686
|
+
label: r.value.query.query.label,
|
|
1687
|
+
sort: r.value.query.query.sort || 0
|
|
1688
1688
|
},
|
|
1689
1689
|
{
|
|
1690
1690
|
key: "reset",
|
|
1691
|
-
hidden: (be = (ge = (ve =
|
|
1691
|
+
hidden: (be = (ge = (ve = r.value) == null ? void 0 : ve.query) == null ? void 0 : ge.reset) == null ? void 0 : be.hidden,
|
|
1692
1692
|
component: De,
|
|
1693
1693
|
props: {
|
|
1694
|
-
...
|
|
1695
|
-
onClick:
|
|
1694
|
+
...r.value.query.reset,
|
|
1695
|
+
onClick: r.value.query.reset.click
|
|
1696
1696
|
},
|
|
1697
|
-
label:
|
|
1698
|
-
sort:
|
|
1697
|
+
label: r.value.query.reset.label,
|
|
1698
|
+
sort: r.value.query.reset.sort || 0
|
|
1699
1699
|
},
|
|
1700
1700
|
{
|
|
1701
1701
|
key: "more",
|
|
1702
|
-
hidden: (ne = (fe = (de =
|
|
1703
|
-
component:
|
|
1704
|
-
props:
|
|
1705
|
-
...
|
|
1706
|
-
onClick:
|
|
1702
|
+
hidden: (ne = (fe = (de = r.value) == null ? void 0 : de.query) == null ? void 0 : fe.more) == null ? void 0 : ne.hidden,
|
|
1703
|
+
component: r.value.query.more.mode === 3 ? ht : De,
|
|
1704
|
+
props: r.value.query.more.mode === 3 ? { ...r.value.query.more.dialog } : {
|
|
1705
|
+
...r.value.query.more,
|
|
1706
|
+
onClick: r.value.query.more.click
|
|
1707
1707
|
},
|
|
1708
|
-
label:
|
|
1709
|
-
sort:
|
|
1710
|
-
content:
|
|
1708
|
+
label: r.value.query.more.label,
|
|
1709
|
+
sort: r.value.query.more.sort || 0,
|
|
1710
|
+
content: r.value.query.more.mode === 3 ? () => Ie(ct, {
|
|
1711
1711
|
class: "query-form",
|
|
1712
|
-
...Ve(
|
|
1712
|
+
...Ve(r.value.query, (ae) => !["query", "more", "reset"].includes(ae))
|
|
1713
1713
|
}, () => w({ slots: H }, !0)) : null
|
|
1714
1714
|
}
|
|
1715
1715
|
];
|
|
1716
|
-
return O.sort((ae, $e) => ae.sort - $e.sort), O.filter((ae) => !ae.hidden).map((ae) => ae.key === "more" && ae.component === ht ?
|
|
1717
|
-
reference: () =>
|
|
1716
|
+
return O.sort((ae, $e) => ae.sort - $e.sort), O.filter((ae) => !ae.hidden).map((ae) => ae.key === "more" && ae.component === ht ? Ie(ht, ae.props, {
|
|
1717
|
+
reference: () => Ie(De, r.value.query.more, () => ae.label),
|
|
1718
1718
|
default: ae.content
|
|
1719
|
-
}) : (ae.props.slot = "query-" + ae.key, ae.label ?
|
|
1719
|
+
}) : (ae.props.slot = "query-" + ae.key, ae.label ? Ie(ae.component, ae.props, () => ae.label) : Ie(ae.component, ae.props)));
|
|
1720
1720
|
};
|
|
1721
1721
|
return (O, Y) => {
|
|
1722
|
-
var J, ve, ge, be, de, fe, ne, ae, $e, se, b,
|
|
1723
|
-
const ie =
|
|
1722
|
+
var J, ve, ge, be, de, fe, ne, ae, $e, se, b, o, k, p, a, v, g;
|
|
1723
|
+
const ie = B("el-form-item"), oe = B("el-drawer");
|
|
1724
1724
|
return n(), x(W, null, [
|
|
1725
|
-
|
|
1725
|
+
X("div", {
|
|
1726
1726
|
class: "g-query-container",
|
|
1727
|
-
style:
|
|
1727
|
+
style: Oe((ve = (J = r.value.query) == null ? void 0 : J.container) == null ? void 0 : ve.style)
|
|
1728
1728
|
}, [
|
|
1729
|
-
Z(
|
|
1730
|
-
onSubmit: Y[0] || (Y[0] =
|
|
1729
|
+
Z(U(ct), T({
|
|
1730
|
+
onSubmit: Y[0] || (Y[0] = rt(() => {
|
|
1731
1731
|
}, ["prevent"]))
|
|
1732
|
-
},
|
|
1732
|
+
}, U(Ve)(r.value.query, (s) => !["query", "more", "reset", "btns"].includes(s))), {
|
|
1733
1733
|
default: y(() => {
|
|
1734
1734
|
var s, M;
|
|
1735
1735
|
return [
|
|
1736
1736
|
(n(), D(Ye(w({ slots: O.$slots }, void 0)))),
|
|
1737
|
-
((M = (s =
|
|
1737
|
+
((M = (s = r.value.query) == null ? void 0 : s.container) == null ? void 0 : M.inline) === !0 ? (n(), D(ie, { key: 0 }, {
|
|
1738
1738
|
default: y(() => {
|
|
1739
|
-
var C,
|
|
1739
|
+
var C, L, Q, q, A;
|
|
1740
1740
|
return [
|
|
1741
|
-
|
|
1742
|
-
style:
|
|
1741
|
+
X("div", {
|
|
1742
|
+
style: Oe((L = (C = r.value.query) == null ? void 0 : C.btns) == null ? void 0 : L.style)
|
|
1743
1743
|
}, [
|
|
1744
|
-
|
|
1744
|
+
r.value.query.group ? (n(), D(U(mt), { key: 0 }, {
|
|
1745
1745
|
default: y(() => [
|
|
1746
|
-
(n(!0), x(W, null,
|
|
1746
|
+
(n(!0), x(W, null, R(ee(), (ue) => h(O.$slots, ue.props.slot, {}, () => [
|
|
1747
1747
|
(n(), D(Ye(ue)))
|
|
1748
1748
|
], !0)), 256)),
|
|
1749
1749
|
h(O.$slots, "q-btns", {}, void 0, !0)
|
|
1750
1750
|
]),
|
|
1751
1751
|
_: 3
|
|
1752
1752
|
})) : (n(), x(W, { key: 1 }, [
|
|
1753
|
-
(A = (q = (
|
|
1753
|
+
(A = (q = (Q = r.value) == null ? void 0 : Q.query) == null ? void 0 : q.btns) != null && A.group ? (n(), D(U(mt), { key: 0 }, {
|
|
1754
1754
|
default: y(() => [
|
|
1755
|
-
(n(!0), x(W, null,
|
|
1755
|
+
(n(!0), x(W, null, R(ee(), (ue) => h(O.$slots, ue.props.slot, {}, () => [
|
|
1756
1756
|
(n(), D(Ye(ue)))
|
|
1757
1757
|
], !0)), 256))
|
|
1758
1758
|
]),
|
|
1759
1759
|
_: 3
|
|
1760
|
-
})) : (n(!0), x(W, { key: 1 },
|
|
1760
|
+
})) : (n(!0), x(W, { key: 1 }, R(ee(), (ue) => h(O.$slots, ue.props.slot, {}, () => [
|
|
1761
1761
|
(n(), D(Ye(ue)))
|
|
1762
1762
|
], !0)), 256)),
|
|
1763
1763
|
h(O.$slots, "q-btns", {}, void 0, !0)
|
|
@@ -1771,57 +1771,57 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1771
1771
|
}),
|
|
1772
1772
|
_: 3
|
|
1773
1773
|
}, 16),
|
|
1774
|
-
((de = (be = (ge =
|
|
1774
|
+
((de = (be = (ge = r.value) == null ? void 0 : ge.query) == null ? void 0 : be.container) == null ? void 0 : de.inline) === !1 ? (n(), x("div", {
|
|
1775
1775
|
key: 0,
|
|
1776
|
-
style:
|
|
1776
|
+
style: Oe((ne = (fe = r.value.query) == null ? void 0 : fe.btns) == null ? void 0 : ne.style)
|
|
1777
1777
|
}, [
|
|
1778
|
-
|
|
1778
|
+
r.value.query.group ? (n(), D(U(mt), { key: 0 }, {
|
|
1779
1779
|
default: y(() => [
|
|
1780
|
-
(n(!0), x(W, null,
|
|
1780
|
+
(n(!0), x(W, null, R(ee(), (s) => h(O.$slots, s.props.slot, {}, () => [
|
|
1781
1781
|
(n(), D(Ye(s)))
|
|
1782
1782
|
], !0)), 256)),
|
|
1783
1783
|
h(O.$slots, "q-btns", {}, void 0, !0)
|
|
1784
1784
|
]),
|
|
1785
1785
|
_: 3
|
|
1786
1786
|
})) : (n(), x(W, { key: 1 }, [
|
|
1787
|
-
($e = (ae =
|
|
1787
|
+
($e = (ae = r.value.query) == null ? void 0 : ae.btns) != null && $e.group ? (n(), D(U(mt), { key: 0 }, {
|
|
1788
1788
|
default: y(() => [
|
|
1789
|
-
(n(!0), x(W, null,
|
|
1789
|
+
(n(!0), x(W, null, R(ee(), (s) => h(O.$slots, s.props.slot, {}, () => [
|
|
1790
1790
|
(n(), D(Ye(s)))
|
|
1791
1791
|
], !0)), 256))
|
|
1792
1792
|
]),
|
|
1793
1793
|
_: 3
|
|
1794
|
-
})) : (n(!0), x(W, { key: 1 },
|
|
1794
|
+
})) : (n(!0), x(W, { key: 1 }, R(ee(), (s) => h(O.$slots, s.props.slot, {}, () => [
|
|
1795
1795
|
(n(), D(Ye(s)))
|
|
1796
1796
|
], !0)), 256)),
|
|
1797
1797
|
h(O.$slots, "q-btns", {}, void 0, !0)
|
|
1798
1798
|
], 64))
|
|
1799
1799
|
], 4)) : pe("", !0)
|
|
1800
1800
|
], 4),
|
|
1801
|
-
|
|
1801
|
+
d.value && !((o = (b = (se = r.value) == null ? void 0 : se.query) == null ? void 0 : b.more) != null && o.hidden) && r.value.query.more.mode == 2 ? (n(), D(oe, T({
|
|
1802
1802
|
key: 0,
|
|
1803
|
-
modelValue:
|
|
1804
|
-
"onUpdate:modelValue": Y[6] || (Y[6] = (s) =>
|
|
1803
|
+
modelValue: d.value,
|
|
1804
|
+
"onUpdate:modelValue": Y[6] || (Y[6] = (s) => d.value = s),
|
|
1805
1805
|
title: "更多查询",
|
|
1806
1806
|
"show-close": !1
|
|
1807
|
-
},
|
|
1807
|
+
}, r.value.query.more.dialog), me({
|
|
1808
1808
|
default: y(() => [
|
|
1809
|
-
Z(
|
|
1810
|
-
onSubmit: Y[3] || (Y[3] =
|
|
1809
|
+
Z(U(ct), T({
|
|
1810
|
+
onSubmit: Y[3] || (Y[3] = rt(() => {
|
|
1811
1811
|
}, ["prevent"]))
|
|
1812
|
-
},
|
|
1812
|
+
}, U(Ve)(r.value.query, (s) => !["query", "more", "reset"].includes(s)), { style: { width: "98%" } }), {
|
|
1813
1813
|
default: y(() => [
|
|
1814
1814
|
Z(Dt, {
|
|
1815
|
-
modelValue:
|
|
1816
|
-
"onUpdate:modelValue": Y[1] || (Y[1] = (s) =>
|
|
1815
|
+
modelValue: r.value,
|
|
1816
|
+
"onUpdate:modelValue": Y[1] || (Y[1] = (s) => r.value = s),
|
|
1817
1817
|
info: E.value,
|
|
1818
1818
|
"onUpdate:info": Y[2] || (Y[2] = (s) => E.value = s),
|
|
1819
1819
|
more: !0
|
|
1820
1820
|
}, me({ _: 2 }, [
|
|
1821
|
-
|
|
1821
|
+
R(O.$slots, (s, M, C) => ({
|
|
1822
1822
|
name: M,
|
|
1823
|
-
fn: y((
|
|
1824
|
-
h(O.$slots, M, { model:
|
|
1823
|
+
fn: y((L) => [
|
|
1824
|
+
h(O.$slots, M, { model: r.value }, void 0, !0)
|
|
1825
1825
|
])
|
|
1826
1826
|
}))
|
|
1827
1827
|
]), 1032, ["modelValue", "info"])
|
|
@@ -1831,23 +1831,23 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1831
1831
|
]),
|
|
1832
1832
|
_: 2
|
|
1833
1833
|
}, [
|
|
1834
|
-
(g = (v = (a = (p = (
|
|
1834
|
+
(g = (v = (a = (p = (k = r.value) == null ? void 0 : k.query) == null ? void 0 : p.more) == null ? void 0 : a.dialog) == null ? void 0 : v.footer) != null && g.hidden ? void 0 : {
|
|
1835
1835
|
name: "footer",
|
|
1836
1836
|
fn: y(() => [
|
|
1837
|
-
|
|
1838
|
-
Z(
|
|
1839
|
-
onClick: Y[4] || (Y[4] = (s) =>
|
|
1837
|
+
X("div", gt(Rt(r.value.query.more.dialog.footer)), [
|
|
1838
|
+
Z(U(De), T(r.value.query.query, {
|
|
1839
|
+
onClick: Y[4] || (Y[4] = (s) => r.value.query.query.click())
|
|
1840
1840
|
}), {
|
|
1841
1841
|
default: y(() => [
|
|
1842
|
-
Me(
|
|
1842
|
+
Me(he(r.value.query.query.label), 1)
|
|
1843
1843
|
]),
|
|
1844
1844
|
_: 1
|
|
1845
1845
|
}, 16),
|
|
1846
|
-
Z(
|
|
1847
|
-
onClick: Y[5] || (Y[5] = (s) =>
|
|
1846
|
+
Z(U(De), T(r.value.query.reset, {
|
|
1847
|
+
onClick: Y[5] || (Y[5] = (s) => r.value.query.reset.click())
|
|
1848
1848
|
}), {
|
|
1849
1849
|
default: y(() => [
|
|
1850
|
-
Me(
|
|
1850
|
+
Me(he(r.value.query.reset.label), 1)
|
|
1851
1851
|
]),
|
|
1852
1852
|
_: 1
|
|
1853
1853
|
}, 16)
|
|
@@ -1864,19 +1864,19 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1864
1864
|
default: y(() => {
|
|
1865
1865
|
var s, M, C;
|
|
1866
1866
|
return [
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1867
|
+
d.value && !((C = (M = (s = r.value) == null ? void 0 : s.query) == null ? void 0 : M.more) != null && C.hidden) && r.value.query.more.mode == 1 ? (n(), x("div", yl, [
|
|
1868
|
+
X("div", gl, [
|
|
1869
|
+
r.value.query.more.mode == 1 ? jt((n(), D(U(ct), T({
|
|
1870
1870
|
key: 0,
|
|
1871
|
-
onSubmit: Y[7] || (Y[7] =
|
|
1871
|
+
onSubmit: Y[7] || (Y[7] = rt(() => {
|
|
1872
1872
|
}, ["prevent"]))
|
|
1873
|
-
},
|
|
1873
|
+
}, U(Ve)(r.value.query, (L) => !["query", "more", "reset"].includes(L))), {
|
|
1874
1874
|
default: y(() => [
|
|
1875
1875
|
(n(), D(Ye(w({ slots: O.$slots }, !0))))
|
|
1876
1876
|
]),
|
|
1877
1877
|
_: 1
|
|
1878
1878
|
}, 16)), [
|
|
1879
|
-
[Ht,
|
|
1879
|
+
[Ht, d.value]
|
|
1880
1880
|
]) : pe("", !0)
|
|
1881
1881
|
])
|
|
1882
1882
|
])) : pe("", !0)
|
|
@@ -1887,60 +1887,60 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1887
1887
|
], 64);
|
|
1888
1888
|
};
|
|
1889
1889
|
}
|
|
1890
|
-
},
|
|
1890
|
+
}, $l = /* @__PURE__ */ Qe(bl, [["__scopeId", "data-v-46ed95d5"]]), wl = { style: { padding: "0", margin: "0", "box-sizing": "border-box" } }, El = { style: { padding: "10px", "box-sizing": "border-box" } }, _l = { style: { margin: "10px" } }, kl = {
|
|
1891
1891
|
style: { display: "flex", "flex-wrap": "wrap" },
|
|
1892
1892
|
id: "excelSortEl"
|
|
1893
|
-
},
|
|
1893
|
+
}, Cl = ["textContent"], Dl = { style: { width: "100%", display: "flex", padding: "10px", "box-sizing": "border-box", "justify-content": "center", "border-top": "1px solid #dcdfe6" } }, Ml = {
|
|
1894
1894
|
__name: "check-excel-item",
|
|
1895
1895
|
props: {
|
|
1896
1896
|
items: Array,
|
|
1897
1897
|
commitText: String
|
|
1898
1898
|
},
|
|
1899
1899
|
emits: ["excel"],
|
|
1900
|
-
setup(
|
|
1901
|
-
const
|
|
1902
|
-
e.value.forEach((
|
|
1903
|
-
|
|
1900
|
+
setup(i, { emit: f }) {
|
|
1901
|
+
const r = i, t = f, e = le(r.items), d = () => {
|
|
1902
|
+
e.value.forEach((F) => {
|
|
1903
|
+
F.value = !0;
|
|
1904
1904
|
});
|
|
1905
1905
|
}, E = () => {
|
|
1906
|
-
e.value.forEach((
|
|
1907
|
-
|
|
1906
|
+
e.value.forEach((F) => {
|
|
1907
|
+
F.value = !1;
|
|
1908
1908
|
});
|
|
1909
|
-
},
|
|
1910
|
-
t("excel", e.value, (
|
|
1911
|
-
if (!
|
|
1909
|
+
}, S = () => {
|
|
1910
|
+
t("excel", e.value, (F, _ = "excel.xls") => {
|
|
1911
|
+
if (!F) {
|
|
1912
1912
|
console.error("下载链接无效");
|
|
1913
1913
|
return;
|
|
1914
1914
|
}
|
|
1915
1915
|
try {
|
|
1916
1916
|
const w = document.createElement("a");
|
|
1917
|
-
w.href =
|
|
1917
|
+
w.href = F, w.download = _, w.style.display = "none", document.body.appendChild(w), w.click(), document.body.removeChild(w);
|
|
1918
1918
|
} catch (w) {
|
|
1919
1919
|
console.error("下载文件时出现错误:", w);
|
|
1920
1920
|
}
|
|
1921
1921
|
});
|
|
1922
1922
|
};
|
|
1923
1923
|
return ut(() => {
|
|
1924
|
-
const
|
|
1924
|
+
const F = new Ft(document.getElementById("excelSortEl"), {
|
|
1925
1925
|
animation: 150,
|
|
1926
1926
|
onEnd: () => {
|
|
1927
|
-
|
|
1927
|
+
F.toArray();
|
|
1928
1928
|
}
|
|
1929
|
-
}),
|
|
1929
|
+
}), _ = F;
|
|
1930
1930
|
Nt(() => {
|
|
1931
|
-
|
|
1931
|
+
_ && _.destroy();
|
|
1932
1932
|
});
|
|
1933
|
-
}), (
|
|
1934
|
-
const w =
|
|
1935
|
-
return n(), x("div",
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
onClick:
|
|
1933
|
+
}), (F, _) => {
|
|
1934
|
+
const w = B("el-divider"), H = B("el-alert"), ee = B("el-checkbox"), O = B("el-button");
|
|
1935
|
+
return n(), x("div", wl, [
|
|
1936
|
+
X("div", El, [
|
|
1937
|
+
X("div", _l, [
|
|
1938
|
+
X("a", {
|
|
1939
|
+
onClick: d,
|
|
1940
1940
|
style: { cursor: "pointer" }
|
|
1941
1941
|
}, "全选"),
|
|
1942
1942
|
Z(w, { direction: "vertical" }),
|
|
1943
|
-
|
|
1943
|
+
X("a", {
|
|
1944
1944
|
onClick: E,
|
|
1945
1945
|
style: { cursor: "pointer" }
|
|
1946
1946
|
}, "全不选")
|
|
@@ -1952,9 +1952,9 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1952
1952
|
closable: !1,
|
|
1953
1953
|
style: { "margin-bottom": "10px" }
|
|
1954
1954
|
}),
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
(n(!0), x(W, null,
|
|
1955
|
+
_[0] || (_[0] = X("div", { style: { margin: "1px 0" } }, null, -1)),
|
|
1956
|
+
X("div", kl, [
|
|
1957
|
+
(n(!0), x(W, null, R(e.value, (Y) => (n(), D(ee, {
|
|
1958
1958
|
class: "check-box-hover",
|
|
1959
1959
|
style: { width: "120px !important", height: "30px !important", border: "1px solid #dfe6ec", margin: "5px !important", "border-radius": "3px !important", "padding-left": "5px !important", display: "flex !important", "align-items": "center !important" },
|
|
1960
1960
|
"data-id": Y.key,
|
|
@@ -1964,23 +1964,23 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1964
1964
|
title: Y.label
|
|
1965
1965
|
}, {
|
|
1966
1966
|
default: y(() => [
|
|
1967
|
-
|
|
1968
|
-
textContent:
|
|
1967
|
+
X("span", {
|
|
1968
|
+
textContent: he(Y.label),
|
|
1969
1969
|
style: { display: "block", "text-overflow": "ellipsis", width: "95px", overflow: "hidden" }
|
|
1970
|
-
}, null, 8,
|
|
1970
|
+
}, null, 8, Cl)
|
|
1971
1971
|
]),
|
|
1972
1972
|
_: 2
|
|
1973
1973
|
}, 1032, ["data-id", "modelValue", "onUpdate:modelValue", "title"]))), 128))
|
|
1974
1974
|
])
|
|
1975
1975
|
]),
|
|
1976
|
-
|
|
1976
|
+
X("div", Dl, [
|
|
1977
1977
|
Z(O, {
|
|
1978
1978
|
type: "primary",
|
|
1979
|
-
onClick:
|
|
1979
|
+
onClick: S,
|
|
1980
1980
|
disabled: e.value.filter((Y) => Y.value).length < 1
|
|
1981
1981
|
}, {
|
|
1982
1982
|
default: y(() => [
|
|
1983
|
-
Me(
|
|
1983
|
+
Me(he(r.commitText), 1)
|
|
1984
1984
|
]),
|
|
1985
1985
|
_: 1
|
|
1986
1986
|
}, 8, ["disabled"])
|
|
@@ -1988,44 +1988,44 @@ const yt = /* @__PURE__ */ ll(al), Je = (d, f) => {
|
|
|
1988
1988
|
]);
|
|
1989
1989
|
};
|
|
1990
1990
|
}
|
|
1991
|
-
},
|
|
1991
|
+
}, Vl = /* @__PURE__ */ Qe(Ml, [["__scopeId", "data-v-04791df1"]]), Ne = new el("gyc");
|
|
1992
1992
|
Ne.version(1).stores({
|
|
1993
1993
|
tableInfo: "++id,[user+page+key],user,page,key,showCol,width,sort",
|
|
1994
1994
|
tableList: "++id,name"
|
|
1995
1995
|
});
|
|
1996
|
-
async function
|
|
1997
|
-
if (await Ne.tableInfo.where({ user:
|
|
1998
|
-
let
|
|
1999
|
-
return await Ne.tableInfo.put({ ...
|
|
1996
|
+
async function ot(i, f, r, t = {}) {
|
|
1997
|
+
if (await Ne.tableInfo.where({ user: i, page: f, key: r }).count() > 0) {
|
|
1998
|
+
let d = await Ne.tableInfo.where({ user: i, page: f, key: r }).first();
|
|
1999
|
+
return await Ne.tableInfo.put({ ...d, ...t }), "update success";
|
|
2000
2000
|
} else {
|
|
2001
|
-
let
|
|
2002
|
-
return await Ne.tableInfo.add({ user:
|
|
2001
|
+
let d = { showCol: !0, width: "auto", sort: 0, ...t };
|
|
2002
|
+
return await Ne.tableInfo.add({ user: i, page: f, key: r, ...d }), "add success";
|
|
2003
2003
|
}
|
|
2004
2004
|
}
|
|
2005
|
-
async function
|
|
2006
|
-
return await Ne.tableInfo.where({ user:
|
|
2005
|
+
async function Tl(i, f) {
|
|
2006
|
+
return await Ne.tableInfo.where({ user: i, page: f }).toArray();
|
|
2007
2007
|
}
|
|
2008
|
-
async function Sl(
|
|
2008
|
+
async function Sl(i, f) {
|
|
2009
2009
|
try {
|
|
2010
|
-
const
|
|
2011
|
-
return console.log("删除了" +
|
|
2012
|
-
} catch (
|
|
2013
|
-
throw console.error("删除表格项设置信息时出错:",
|
|
2010
|
+
const r = await Ne.tableInfo.where({ user: i, page: f }).delete();
|
|
2011
|
+
return console.log("删除了" + r + "条数据"), r;
|
|
2012
|
+
} catch (r) {
|
|
2013
|
+
throw console.error("删除表格项设置信息时出错:", r), r;
|
|
2014
2014
|
}
|
|
2015
2015
|
}
|
|
2016
|
-
async function Fl(
|
|
2017
|
-
return await Ne.tableList.where({ name:
|
|
2016
|
+
async function Fl(i) {
|
|
2017
|
+
return await Ne.tableList.where({ name: i }).first();
|
|
2018
2018
|
}
|
|
2019
|
-
async function
|
|
2020
|
-
return typeof
|
|
2019
|
+
async function xl(i) {
|
|
2020
|
+
return typeof i == "string" && (i = { name: i }), await Ne.tableList.add(i), "add success";
|
|
2021
2021
|
}
|
|
2022
|
-
const
|
|
2022
|
+
const ql = {
|
|
2023
2023
|
style: { margin: "10px" },
|
|
2024
2024
|
class: "allcheck"
|
|
2025
|
-
},
|
|
2025
|
+
}, Ol = {
|
|
2026
2026
|
id: "cols",
|
|
2027
2027
|
style: { display: "flex", "flex-wrap": "wrap", margin: "0 !important", padding: "0 !important" }
|
|
2028
|
-
},
|
|
2028
|
+
}, Al = ["textContent"], Il = {
|
|
2029
2029
|
__name: "columns-setting",
|
|
2030
2030
|
props: /* @__PURE__ */ ze({
|
|
2031
2031
|
name: {
|
|
@@ -2037,21 +2037,21 @@ const xl = {
|
|
|
2037
2037
|
modelModifiers: {}
|
|
2038
2038
|
}),
|
|
2039
2039
|
emits: ["update:modelValue"],
|
|
2040
|
-
setup(
|
|
2041
|
-
const f =
|
|
2042
|
-
|
|
2040
|
+
setup(i) {
|
|
2041
|
+
const f = i, r = le([]), t = Pe(i, "modelValue"), e = async (_, w) => {
|
|
2042
|
+
_ ? t.value[w].showCol = !0 : t.value[w].showCol = !1;
|
|
2043
2043
|
try {
|
|
2044
|
-
await
|
|
2044
|
+
await ot(t.value.table.user, f.name, w, { showCol: _ });
|
|
2045
2045
|
} catch (H) {
|
|
2046
|
-
console.error("列显示状态保存信息时出错:", H),
|
|
2046
|
+
console.error("列显示状态保存信息时出错:", H), xe({
|
|
2047
2047
|
type: "error",
|
|
2048
2048
|
message: "列显示状态保存信息失败!"
|
|
2049
2049
|
});
|
|
2050
2050
|
}
|
|
2051
|
-
},
|
|
2052
|
-
const
|
|
2053
|
-
if (
|
|
2054
|
-
let w =
|
|
2051
|
+
}, d = () => {
|
|
2052
|
+
const _ = document.getElementById("cols");
|
|
2053
|
+
if (_) {
|
|
2054
|
+
let w = Ft.create(_, {
|
|
2055
2055
|
animation: 150,
|
|
2056
2056
|
filter: ".filtered",
|
|
2057
2057
|
//
|
|
@@ -2061,9 +2061,9 @@ const xl = {
|
|
|
2061
2061
|
t.value[ee].sort = O;
|
|
2062
2062
|
let Y = t.value[ee].width || "auto";
|
|
2063
2063
|
try {
|
|
2064
|
-
await
|
|
2064
|
+
await ot(t.value.table.user, f.name, ee, { sort: O, width: Y });
|
|
2065
2065
|
} catch (ie) {
|
|
2066
|
-
console.error("列排序和宽度保存信息时出错:", ie),
|
|
2066
|
+
console.error("列排序和宽度保存信息时出错:", ie), xe({
|
|
2067
2067
|
type: "error",
|
|
2068
2068
|
message: "列排序和宽度保存信息失败!"
|
|
2069
2069
|
});
|
|
@@ -2074,43 +2074,43 @@ const xl = {
|
|
|
2074
2074
|
}
|
|
2075
2075
|
}, E = async () => {
|
|
2076
2076
|
try {
|
|
2077
|
-
for (const
|
|
2078
|
-
|
|
2077
|
+
for (const _ of r.value)
|
|
2078
|
+
_.showCol = !0, t.value[_.value].showCol = !0, await ot(t.value.table.user, f.name, _.value, {
|
|
2079
2079
|
showCol: !0,
|
|
2080
|
-
width:
|
|
2081
|
-
sort:
|
|
2080
|
+
width: _.width,
|
|
2081
|
+
sort: _.sort
|
|
2082
2082
|
});
|
|
2083
|
-
} catch (
|
|
2084
|
-
console.error("全选列保存信息时出错:",
|
|
2083
|
+
} catch (_) {
|
|
2084
|
+
console.error("全选列保存信息时出错:", _), xe({
|
|
2085
2085
|
type: "error",
|
|
2086
2086
|
message: "全选列保存信息失败!"
|
|
2087
2087
|
});
|
|
2088
2088
|
}
|
|
2089
|
-
},
|
|
2089
|
+
}, S = async () => {
|
|
2090
2090
|
try {
|
|
2091
|
-
const
|
|
2092
|
-
for (const w of
|
|
2093
|
-
w.showCol = !1, t.value[w.value].showCol = !1, await
|
|
2091
|
+
const _ = r.value.filter((w) => !w.alwaysShow);
|
|
2092
|
+
for (const w of _)
|
|
2093
|
+
w.showCol = !1, t.value[w.value].showCol = !1, await ot(t.value.table.user, f.name, w.value, {
|
|
2094
2094
|
showCol: !1,
|
|
2095
2095
|
width: w.width,
|
|
2096
2096
|
sort: w.sort
|
|
2097
2097
|
});
|
|
2098
|
-
} catch (
|
|
2099
|
-
console.error("清除列保存信息时出错:",
|
|
2098
|
+
} catch (_) {
|
|
2099
|
+
console.error("清除列保存信息时出错:", _), xe({
|
|
2100
2100
|
type: "error",
|
|
2101
2101
|
message: "清除列保存信息失败!"
|
|
2102
2102
|
});
|
|
2103
2103
|
}
|
|
2104
|
-
},
|
|
2104
|
+
}, F = () => {
|
|
2105
2105
|
Vt.confirm("确定要复位吗?", "提示", {
|
|
2106
2106
|
confirmButtonText: "确定",
|
|
2107
2107
|
cancelButtonText: "取消",
|
|
2108
2108
|
type: "warning"
|
|
2109
2109
|
}).then(() => {
|
|
2110
|
-
Sl(t.value.table.user, f.name).then((
|
|
2110
|
+
Sl(t.value.table.user, f.name).then((_) => {
|
|
2111
2111
|
window.location.reload();
|
|
2112
|
-
}).catch((
|
|
2113
|
-
console.error("复位操作出错:",
|
|
2112
|
+
}).catch((_) => {
|
|
2113
|
+
console.error("复位操作出错:", _), xe({
|
|
2114
2114
|
type: "info",
|
|
2115
2115
|
message: "复位失败!"
|
|
2116
2116
|
});
|
|
@@ -2118,23 +2118,23 @@ const xl = {
|
|
|
2118
2118
|
});
|
|
2119
2119
|
};
|
|
2120
2120
|
return ut(async () => {
|
|
2121
|
-
|
|
2121
|
+
r.value = Object.entries(t.value).filter(([, _]) => _.visible !== !1).filter(([, _]) => _.type != "hidden").map(([_, w]) => ({
|
|
2122
2122
|
label: w.label,
|
|
2123
|
-
value:
|
|
2123
|
+
value: _,
|
|
2124
2124
|
alwaysShow: w.alwaysShow,
|
|
2125
2125
|
showCol: w.showCol !== !1,
|
|
2126
2126
|
sort: w.sort || 0,
|
|
2127
2127
|
width: w.width || "auto"
|
|
2128
|
-
})).sort((
|
|
2129
|
-
}), (
|
|
2130
|
-
const H =
|
|
2128
|
+
})).sort((_, w) => _.sort - w.sort), d();
|
|
2129
|
+
}), (_, w) => {
|
|
2130
|
+
const H = B("el-divider"), ee = B("el-alert"), O = B("el-checkbox");
|
|
2131
2131
|
return n(), x("div", null, [
|
|
2132
|
-
|
|
2133
|
-
|
|
2132
|
+
X("div", ql, [
|
|
2133
|
+
X("a", { onClick: E }, "全选"),
|
|
2134
2134
|
Z(H, { direction: "vertical" }),
|
|
2135
|
-
|
|
2135
|
+
X("a", { onClick: S }, "全不选"),
|
|
2136
2136
|
Z(H, { direction: "vertical" }),
|
|
2137
|
-
|
|
2137
|
+
X("a", { onClick: F }, "复位")
|
|
2138
2138
|
]),
|
|
2139
2139
|
Z(ee, {
|
|
2140
2140
|
title: "拖动表格列标题可以改变表格列显示顺序 !",
|
|
@@ -2143,13 +2143,13 @@ const xl = {
|
|
|
2143
2143
|
closable: !1,
|
|
2144
2144
|
style: { "margin-bottom": "10px" }
|
|
2145
2145
|
}),
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
(n(!0), x(W, null,
|
|
2146
|
+
X("div", null, [
|
|
2147
|
+
X("div", Ol, [
|
|
2148
|
+
(n(!0), x(W, null, R(r.value, (Y) => (n(), D(O, {
|
|
2149
2149
|
modelValue: Y.showCol,
|
|
2150
2150
|
"onUpdate:modelValue": (ie) => Y.showCol = ie,
|
|
2151
2151
|
"data-id": Y.value,
|
|
2152
|
-
class:
|
|
2152
|
+
class: St(["check-box-hover", Y.value == "control" ? "filtered" : ""]),
|
|
2153
2153
|
onChange: (ie) => e(ie, Y.value),
|
|
2154
2154
|
style: { width: "125px !important", height: "30px !important", border: "1px solid #dfe6ec", margin: "5px !important", "border-radius": "2px !important", "padding-left": "5px !important", display: "flex !important", "align-items": "center !important" },
|
|
2155
2155
|
value: Y.value,
|
|
@@ -2158,10 +2158,10 @@ const xl = {
|
|
|
2158
2158
|
key: Y.value
|
|
2159
2159
|
}, {
|
|
2160
2160
|
default: y(() => [
|
|
2161
|
-
|
|
2162
|
-
textContent:
|
|
2161
|
+
X("span", {
|
|
2162
|
+
textContent: he(Y.label),
|
|
2163
2163
|
style: { display: "block", "text-overflow": "ellipsis", width: "95px", overflow: "hidden" }
|
|
2164
|
-
}, null, 8,
|
|
2164
|
+
}, null, 8, Al)
|
|
2165
2165
|
]),
|
|
2166
2166
|
_: 2
|
|
2167
2167
|
}, 1032, ["modelValue", "onUpdate:modelValue", "data-id", "class", "onChange", "value", "title", "disabled"]))), 128))
|
|
@@ -2170,13 +2170,46 @@ const xl = {
|
|
|
2170
2170
|
]);
|
|
2171
2171
|
};
|
|
2172
2172
|
}
|
|
2173
|
-
}, Bl = /* @__PURE__ */
|
|
2173
|
+
}, Bl = /* @__PURE__ */ Qe(Il, [["__scopeId", "data-v-51f730d2"]]), Yl = { class: "title" }, Ul = { class: "content" }, Rl = {
|
|
2174
|
+
__name: "g-cell-toopTip",
|
|
2175
|
+
props: {
|
|
2176
|
+
content: {
|
|
2177
|
+
type: String,
|
|
2178
|
+
default: ""
|
|
2179
|
+
},
|
|
2180
|
+
column: {
|
|
2181
|
+
type: Object,
|
|
2182
|
+
default: () => ({})
|
|
2183
|
+
}
|
|
2184
|
+
},
|
|
2185
|
+
setup(i) {
|
|
2186
|
+
const f = i, r = () => {
|
|
2187
|
+
f.content ? (navigator.clipboard.writeText(f.content), xe.success("复制成功")) : xe.warning("没有内容可复制");
|
|
2188
|
+
};
|
|
2189
|
+
return (t, e) => (n(), x("div", {
|
|
2190
|
+
class: "g-cell-toopTip",
|
|
2191
|
+
style: Oe({ width: f.column.width + "px" })
|
|
2192
|
+
}, [
|
|
2193
|
+
X("div", Yl, [
|
|
2194
|
+
e[0] || (e[0] = X("span", { class: "title-text" }, "内容", -1)),
|
|
2195
|
+
X("span", {
|
|
2196
|
+
class: "copy-btn",
|
|
2197
|
+
onClick: r,
|
|
2198
|
+
title: "复制内容"
|
|
2199
|
+
}, [
|
|
2200
|
+
Z(U(Zt))
|
|
2201
|
+
])
|
|
2202
|
+
]),
|
|
2203
|
+
X("div", Ul, he(f.content), 1)
|
|
2204
|
+
], 4));
|
|
2205
|
+
}
|
|
2206
|
+
}, Ll = /* @__PURE__ */ Qe(Rl, [["__scopeId", "data-v-f28912da"]]), jl = { key: 0 }, Hl = { style: { display: "flex", "margin-top": "-2px" } }, Nl = { style: { display: "flex", flex: "1" } }, zl = {
|
|
2174
2207
|
style: { display: "flex", "justify-content": "center", width: "100%", height: "100%" },
|
|
2175
2208
|
id: "table-form"
|
|
2176
|
-
},
|
|
2209
|
+
}, Pl = { key: 1 }, Wl = { style: { display: "flex" } }, Xl = { style: { display: "flex", flex: "1" } }, Gl = { class: "g-table-container" }, Ql = {
|
|
2177
2210
|
key: 0,
|
|
2178
2211
|
class: "table-query-container"
|
|
2179
|
-
},
|
|
2212
|
+
}, Zl = { class: "table-container" }, Jl = ["innerHTML"], Kl = /* @__PURE__ */ Object.assign({
|
|
2180
2213
|
name: "g-table",
|
|
2181
2214
|
inheritAttrs: !1
|
|
2182
2215
|
}, {
|
|
@@ -2189,11 +2222,11 @@ const xl = {
|
|
|
2189
2222
|
modelModifiers: {}
|
|
2190
2223
|
}),
|
|
2191
2224
|
emits: /* @__PURE__ */ ze(["load", "open", "delete", "submit", "reset", "download", "row-save"], ["update:modelValue"]),
|
|
2192
|
-
setup(
|
|
2225
|
+
setup(i, { expose: f, emit: r }) {
|
|
2193
2226
|
var Re, nt, tt, st, it, dt, lt;
|
|
2194
|
-
const t =
|
|
2195
|
-
E.value = Object.fromEntries(
|
|
2196
|
-
const w = le(!1), H = ["type", "index", "label", "column-key", "prop", "width", "min-width", "fixed", "render-header", "sortable", "sort-method", "sort-by", "sort-orders", "resizable", "formatter", "show-overflow-tooltip", "align", "header-align", "class-name", "label-class-name", "selectable", "reserve-selection", "filters", "filter-placement", "filter-class-name", "filter-multiple", "filter-method", "filtered-value"], ee = le([]), O =
|
|
2227
|
+
const t = r, e = Pe(i, "modelValue"), d = _t("options"), E = le({}), S = le(null), F = le(null), _ = Object.entries(e.value).filter(([l, u]) => (u == null ? void 0 : u.search) !== void 0).map(([l, u]) => [l, u.value]);
|
|
2228
|
+
E.value = Object.fromEntries(_);
|
|
2229
|
+
const w = le(!1), H = ["type", "index", "label", "column-key", "prop", "width", "min-width", "fixed", "render-header", "sortable", "sort-method", "sort-by", "sort-orders", "resizable", "formatter", "show-overflow-tooltip", "align", "header-align", "class-name", "label-class-name", "selectable", "reserve-selection", "filters", "filter-placement", "filter-class-name", "filter-multiple", "filter-method", "filtered-value"], ee = le([]), O = i, Y = kt(), ie = le({}), oe = le([]), J = le(null), ve = le(""), ge = le({
|
|
2197
2230
|
autoWatch: !1,
|
|
2198
2231
|
data: [],
|
|
2199
2232
|
border: !0,
|
|
@@ -2207,22 +2240,22 @@ const xl = {
|
|
|
2207
2240
|
t("load", { currentPage: l, pageSize: u, ...E.value }, (m, V, { fields: N = [], sums: z = {} } = {}) => {
|
|
2208
2241
|
var te, Ee;
|
|
2209
2242
|
if (!Array.isArray(m)) {
|
|
2210
|
-
console.error("从 load 事件回调中接收到的数据不是数组格式。"),
|
|
2243
|
+
console.error("从 load 事件回调中接收到的数据不是数组格式。"), xe.error("数据加载失败,请检查数据格式。");
|
|
2211
2244
|
return;
|
|
2212
2245
|
}
|
|
2213
2246
|
if (typeof V != "number") {
|
|
2214
|
-
console.error("从 load 事件回调中接收到的 total 不是数字格式。"),
|
|
2247
|
+
console.error("从 load 事件回调中接收到的 total 不是数字格式。"), xe.error("数据加载失败,请检查数据格式。");
|
|
2215
2248
|
return;
|
|
2216
2249
|
}
|
|
2217
|
-
e.value.table.data = m, ((Ee = (te = e.value.control) == null ? void 0 : te.add) == null ? void 0 : Ee.inline) === !0 && e.value.table.data.unshift(J.value), e.value.table.page.total = V,
|
|
2250
|
+
e.value.table.data = m, ((Ee = (te = e.value.control) == null ? void 0 : te.add) == null ? void 0 : Ee.inline) === !0 && e.value.table.data.unshift(J.value), e.value.table.page.total = V, oe.value = N, ie.value = z, Se(), ve.value = Math.random().toString(36).substring(2);
|
|
2218
2251
|
}, J.value);
|
|
2219
2252
|
} catch (m) {
|
|
2220
|
-
console.error("触发 load 事件时出现错误:", m),
|
|
2253
|
+
console.error("触发 load 事件时出现错误:", m), xe.error("数据加载时出现错误,请稍后重试。");
|
|
2221
2254
|
}
|
|
2222
2255
|
},
|
|
2223
2256
|
onHeaderDragend: (l, u, m) => {
|
|
2224
2257
|
var V;
|
|
2225
|
-
|
|
2258
|
+
ot((V = e.value.table) == null ? void 0 : V.user, O.name, m.property, { width: l });
|
|
2226
2259
|
},
|
|
2227
2260
|
onRowDblclick: (l, u, m) => {
|
|
2228
2261
|
e.value.table.dblclickType == "edit" ? p(l, u, m, e) : e.value.table.dblclickType == "view" && v(l, u, m, e);
|
|
@@ -2253,9 +2286,9 @@ const xl = {
|
|
|
2253
2286
|
onSortChange: ({ column: l, prop: u, order: m }, V) => {
|
|
2254
2287
|
}
|
|
2255
2288
|
});
|
|
2256
|
-
e.value.table =
|
|
2289
|
+
e.value.table = qe(
|
|
2257
2290
|
ge.value,
|
|
2258
|
-
|
|
2291
|
+
d == null ? void 0 : d.table,
|
|
2259
2292
|
e.value.table,
|
|
2260
2293
|
Y
|
|
2261
2294
|
// 继承父组件的属性
|
|
@@ -2348,26 +2381,27 @@ const xl = {
|
|
|
2348
2381
|
"button-props": { round: !0, plain: !0 }
|
|
2349
2382
|
})
|
|
2350
2383
|
};
|
|
2351
|
-
e.value.control =
|
|
2384
|
+
e.value.control = qe(
|
|
2352
2385
|
be,
|
|
2353
|
-
|
|
2386
|
+
d == null ? void 0 : d.control,
|
|
2354
2387
|
(tt = e.value) == null ? void 0 : tt.control
|
|
2355
2388
|
);
|
|
2356
2389
|
const de = (l, u, m, V) => {
|
|
2357
|
-
var Ee, Ce, Le, c,
|
|
2390
|
+
var Ee, Ce, Le, c, G, ce;
|
|
2358
2391
|
if (!l || !u || m == null)
|
|
2359
2392
|
return console.warn("mergeDropdown: 缺少必要的参数(row, column或index)"), {};
|
|
2360
|
-
const N = ((Ee = be.dropdown) == null ? void 0 : Ee.call(be, l, u, m, V)) || {}, z = ((Le = (Ce =
|
|
2361
|
-
return
|
|
2393
|
+
const N = ((Ee = be.dropdown) == null ? void 0 : Ee.call(be, l, u, m, V)) || {}, z = ((Le = (Ce = d == null ? void 0 : d.control) == null ? void 0 : Ce.dropdown) == null ? void 0 : Le.call(Ce, l, u, m, V)) || {}, te = ((ce = (G = (c = e.value) == null ? void 0 : c.control) == null ? void 0 : G.dropdown) == null ? void 0 : ce.call(G, l, u, m, V)) || {};
|
|
2394
|
+
return qe(N, z, te) || {};
|
|
2362
2395
|
}, fe = {
|
|
2363
2396
|
type: "hidden",
|
|
2364
2397
|
"min-width": 100,
|
|
2365
2398
|
align: "center",
|
|
2366
|
-
formatter: (l, u, m, V) => m
|
|
2399
|
+
formatter: (l, u, m, V) => m,
|
|
2400
|
+
"tooltip-formatter": ({ row: l, column: u, cellValue: m }) => (console.log(l, u, m), Ie(Ll, { content: m, column: u }))
|
|
2367
2401
|
};
|
|
2368
|
-
e.value.tableColumns =
|
|
2402
|
+
e.value.tableColumns = qe(
|
|
2369
2403
|
fe,
|
|
2370
|
-
|
|
2404
|
+
d == null ? void 0 : d.tableColumns,
|
|
2371
2405
|
(st = e.value) == null ? void 0 : st.tableColumns
|
|
2372
2406
|
);
|
|
2373
2407
|
const ne = {
|
|
@@ -2376,9 +2410,9 @@ const xl = {
|
|
|
2376
2410
|
footer: { hidden: !1 },
|
|
2377
2411
|
modalState: void 0
|
|
2378
2412
|
};
|
|
2379
|
-
e.value.form =
|
|
2413
|
+
e.value.form = qe(
|
|
2380
2414
|
ne,
|
|
2381
|
-
|
|
2415
|
+
d == null ? void 0 : d.form,
|
|
2382
2416
|
(it = e.value) == null ? void 0 : it.form
|
|
2383
2417
|
);
|
|
2384
2418
|
const ae = {
|
|
@@ -2388,9 +2422,9 @@ const xl = {
|
|
|
2388
2422
|
width: "100%"
|
|
2389
2423
|
}
|
|
2390
2424
|
};
|
|
2391
|
-
e.value.formItems =
|
|
2425
|
+
e.value.formItems = qe(
|
|
2392
2426
|
ae,
|
|
2393
|
-
|
|
2427
|
+
d == null ? void 0 : d.formItems,
|
|
2394
2428
|
(dt = e == null ? void 0 : e.value) == null ? void 0 : dt.formItems
|
|
2395
2429
|
);
|
|
2396
2430
|
const $e = {
|
|
@@ -2406,17 +2440,17 @@ const xl = {
|
|
|
2406
2440
|
overflow: !0,
|
|
2407
2441
|
max: {
|
|
2408
2442
|
style: {},
|
|
2409
|
-
icon: () =>
|
|
2443
|
+
icon: () => Ie(Jt)
|
|
2410
2444
|
},
|
|
2411
2445
|
min: {
|
|
2412
2446
|
style: {},
|
|
2413
|
-
icon: () =>
|
|
2447
|
+
icon: () => Ie(Kt)
|
|
2414
2448
|
// 最小化图标
|
|
2415
2449
|
}
|
|
2416
2450
|
};
|
|
2417
|
-
e.value.dialog =
|
|
2451
|
+
e.value.dialog = qe(
|
|
2418
2452
|
$e,
|
|
2419
|
-
|
|
2453
|
+
d == null ? void 0 : d.dialog,
|
|
2420
2454
|
(lt = e.value) == null ? void 0 : lt.dialog
|
|
2421
2455
|
);
|
|
2422
2456
|
const se = (l, u) => {
|
|
@@ -2429,12 +2463,12 @@ const xl = {
|
|
|
2429
2463
|
};
|
|
2430
2464
|
m = l.format ? yt(m).format(l.format) : yt(m).format(N[l.type]);
|
|
2431
2465
|
}
|
|
2432
|
-
return l.type === "money" && (l.align = l.align || "right", l.width = l.width || 130, m = `<span title="${Et(parseFloat(m))}">${
|
|
2466
|
+
return l.type === "money" && (l.align = l.align || "right", l.width = l.width || 130, m = `<span title="${Et(parseFloat(m))}">${pa(parseFloat(m))}</span>`), l.prefix && m && (m = `<span>${l.prefix}${m}</span>`), l.suffix && m && (m = `${m}<span>${l.suffix}</span>`), m;
|
|
2433
2467
|
}, b = (l) => {
|
|
2434
|
-
E.value = Object.fromEntries(
|
|
2435
|
-
},
|
|
2468
|
+
E.value = Object.fromEntries(_), e.value.table.load();
|
|
2469
|
+
}, o = (l) => {
|
|
2436
2470
|
E.value = l, e.value.table.load();
|
|
2437
|
-
},
|
|
2471
|
+
}, k = async (l) => {
|
|
2438
2472
|
var u, m;
|
|
2439
2473
|
e.value.form.modalState = "add";
|
|
2440
2474
|
try {
|
|
@@ -2512,7 +2546,7 @@ const xl = {
|
|
|
2512
2546
|
size: 480,
|
|
2513
2547
|
width: 600,
|
|
2514
2548
|
slots: {
|
|
2515
|
-
default: () =>
|
|
2549
|
+
default: () => Ie(Vl, {
|
|
2516
2550
|
items: u,
|
|
2517
2551
|
commitText: l.control.download.excelLabel,
|
|
2518
2552
|
onExcel: (N, z) => {
|
|
@@ -2522,23 +2556,23 @@ const xl = {
|
|
|
2522
2556
|
}
|
|
2523
2557
|
}, l.control.download.mode);
|
|
2524
2558
|
}
|
|
2525
|
-
},
|
|
2559
|
+
}, L = (l) => {
|
|
2526
2560
|
var u;
|
|
2527
2561
|
(u = l.control.setting) != null && u.click ? l.control.setting.click(l) : wt({
|
|
2528
2562
|
title: l.control.setting.label,
|
|
2529
2563
|
size: 470,
|
|
2530
2564
|
width: 600,
|
|
2531
2565
|
slots: {
|
|
2532
|
-
default: () =>
|
|
2566
|
+
default: () => Ie(Bl, {
|
|
2533
2567
|
modelValue: l,
|
|
2534
2568
|
name: O.name
|
|
2535
2569
|
})
|
|
2536
2570
|
}
|
|
2537
2571
|
}, l.control.setting.mode);
|
|
2538
|
-
},
|
|
2539
|
-
{ type: "add", func:
|
|
2572
|
+
}, Q = e.value.control, q = [
|
|
2573
|
+
{ type: "add", func: k },
|
|
2540
2574
|
{ type: "download", func: C },
|
|
2541
|
-
{ type: "setting", func:
|
|
2575
|
+
{ type: "setting", func: L },
|
|
2542
2576
|
{ type: "view", func: v },
|
|
2543
2577
|
{ type: "edit", func: p },
|
|
2544
2578
|
{ type: "delete", func: a },
|
|
@@ -2547,18 +2581,18 @@ const xl = {
|
|
|
2547
2581
|
var V, N, z;
|
|
2548
2582
|
return {
|
|
2549
2583
|
name: `control-${u}`,
|
|
2550
|
-
attr:
|
|
2584
|
+
attr: Q == null ? void 0 : Q[u],
|
|
2551
2585
|
func: m,
|
|
2552
|
-
label: (V =
|
|
2553
|
-
sort: ((N =
|
|
2554
|
-
groupName: ((z =
|
|
2586
|
+
label: (V = Q == null ? void 0 : Q[u]) == null ? void 0 : V.label,
|
|
2587
|
+
sort: ((N = Q == null ? void 0 : Q[u]) == null ? void 0 : N.sort) || 0,
|
|
2588
|
+
groupName: ((z = Q == null ? void 0 : Q[u]) == null ? void 0 : z.groupName) || "default"
|
|
2555
2589
|
};
|
|
2556
2590
|
}).sort((u, m) => u.sort - m.sort), ue = (l) => A(l).reduce((u, m) => {
|
|
2557
2591
|
const V = m.groupName || "default";
|
|
2558
2592
|
return u[V] || (u[V] = []), u[V].push(m), u;
|
|
2559
|
-
}, {}),
|
|
2593
|
+
}, {}), ke = Je(() => Object.fromEntries(
|
|
2560
2594
|
Object.entries(e.value).filter(([l, u]) => u.type !== "hidden").filter(([l, u]) => u.visible !== !1).filter(([l, u]) => u.showCol !== !1).map(([l, u]) => (u.sort = typeof u.sort == "number" ? u.sort : 0, [l, u])).sort((l, u) => l[1].sort - u[1].sort)
|
|
2561
|
-
)),
|
|
2595
|
+
)), _e = le({}), Te = (l, u) => {
|
|
2562
2596
|
const m = (V, N) => {
|
|
2563
2597
|
for (const z of V) {
|
|
2564
2598
|
if (z.value == N) return z.label;
|
|
@@ -2571,16 +2605,16 @@ const xl = {
|
|
|
2571
2605
|
};
|
|
2572
2606
|
if (l.getDicts) {
|
|
2573
2607
|
const V = u.toString();
|
|
2574
|
-
return
|
|
2575
|
-
|
|
2608
|
+
return _e.value[V] ? (l.options = _e.value[V], l.formatter || (l.formatter = (N, z, te, Ee) => l.options && m(l.options, te) || te), Promise.resolve()) : l.getDicts(e.value.table.data).then((N) => {
|
|
2609
|
+
_e.value[V] = N, l.options = N, l.formatter || (l.formatter = (z, te, Ee, Ce) => l.options && m(l.options, Ee) || Ee);
|
|
2576
2610
|
});
|
|
2577
2611
|
}
|
|
2578
2612
|
return Promise.resolve();
|
|
2579
|
-
},
|
|
2613
|
+
}, Se = () => {
|
|
2580
2614
|
const l = [];
|
|
2581
2615
|
Object.keys(e.value).forEach((u) => {
|
|
2582
2616
|
if (e.value[u].getDicts) {
|
|
2583
|
-
const m =
|
|
2617
|
+
const m = Te(e.value[u], u).then(() => {
|
|
2584
2618
|
e.value.table.data.forEach((V) => {
|
|
2585
2619
|
var N;
|
|
2586
2620
|
if (e.value[u].getDicts && ((N = e.value[u]) == null ? void 0 : N.forceString) !== !1) {
|
|
@@ -2599,12 +2633,12 @@ const xl = {
|
|
|
2599
2633
|
}, we = (l, u, m, V) => {
|
|
2600
2634
|
var N, z;
|
|
2601
2635
|
return l.table ? (N = l.table(u, m, V)) != null && N.auth ? (z = l.table(u, m, V)) == null ? void 0 : z.auth(u, m, V) : !0 : !1;
|
|
2602
|
-
},
|
|
2636
|
+
}, Fe = (l, u) => l.name === "control-save" && u === 0 && e.value.control.add.inline === !0 ? l.attr.addLabel : l.label, Ue = () => {
|
|
2603
2637
|
if (e.value.dialog.mode == "drawer")
|
|
2604
|
-
|
|
2638
|
+
F.value.handleClose();
|
|
2605
2639
|
else if (e.value.dialog.mode == "dialog")
|
|
2606
2640
|
try {
|
|
2607
|
-
|
|
2641
|
+
S.value.handleClose();
|
|
2608
2642
|
} catch {
|
|
2609
2643
|
w.value = !1;
|
|
2610
2644
|
}
|
|
@@ -2620,27 +2654,27 @@ const xl = {
|
|
|
2620
2654
|
Object.entries(Ve(e.value, (u, m) => m.type != "control" && m.editor !== !1 && m.type != "hidden")).map(([u, m]) => [u, m.value])
|
|
2621
2655
|
));
|
|
2622
2656
|
}), !((l = e.value.table) != null && l.user)) {
|
|
2623
|
-
|
|
2657
|
+
xe.error("必须给使用此表格的用户一个名字!");
|
|
2624
2658
|
return;
|
|
2625
2659
|
}
|
|
2626
2660
|
if (!O.name) {
|
|
2627
|
-
|
|
2661
|
+
xe.error("必须给表格一个唯一的name属性");
|
|
2628
2662
|
return;
|
|
2629
2663
|
}
|
|
2630
2664
|
try {
|
|
2631
2665
|
let u = await Fl(O.name);
|
|
2632
2666
|
if (u) {
|
|
2633
2667
|
if (O.name !== u.name) {
|
|
2634
|
-
|
|
2668
|
+
xe.error("此表格已经存在,请换一个名字!");
|
|
2635
2669
|
return;
|
|
2636
2670
|
}
|
|
2637
2671
|
} else
|
|
2638
|
-
await
|
|
2672
|
+
await xl({ name: O.name });
|
|
2639
2673
|
} catch (u) {
|
|
2640
|
-
console.error("检查表格名称时出现错误:", u),
|
|
2674
|
+
console.error("检查表格名称时出现错误:", u), xe.error("检查表格名称时出现错误,请稍后重试。");
|
|
2641
2675
|
}
|
|
2642
2676
|
try {
|
|
2643
|
-
const u = await
|
|
2677
|
+
const u = await Tl(e.value.table.user, O.name);
|
|
2644
2678
|
u && u.forEach((m) => {
|
|
2645
2679
|
e.value[m.key] && (e.value[m.key].width = m.width, e.value[m.key].showCol = m.showCol, e.value[m.key].sort = m.sort);
|
|
2646
2680
|
});
|
|
@@ -2649,49 +2683,49 @@ const xl = {
|
|
|
2649
2683
|
}
|
|
2650
2684
|
e.value.table.autoWatch || e.value.table.load();
|
|
2651
2685
|
}), f({
|
|
2652
|
-
addRow:
|
|
2686
|
+
addRow: k,
|
|
2653
2687
|
editRow: p,
|
|
2654
2688
|
deleteRow: a,
|
|
2655
2689
|
readForm: v,
|
|
2656
2690
|
saveRowData: g,
|
|
2657
2691
|
closeDialog: Ue
|
|
2658
2692
|
}), (l, u) => {
|
|
2659
|
-
var ce,
|
|
2660
|
-
const m =
|
|
2693
|
+
var ce, Be, Ke, Ze, ft;
|
|
2694
|
+
const m = B("el-icon"), V = B("el-dialog"), N = B("el-drawer"), z = B("el-button-group"), te = B("el-dropdown-item"), Ee = B("el-dropdown-menu"), Ce = B("el-dropdown"), Le = B("el-table-column"), c = B("el-table"), G = B("el-pagination");
|
|
2661
2695
|
return n(), x(W, null, [
|
|
2662
|
-
e.value.dialog.mode == "dialog" && w.value ? (n(), x("div",
|
|
2663
|
-
Z(V,
|
|
2696
|
+
e.value.dialog.mode == "dialog" && w.value ? (n(), x("div", jl, [
|
|
2697
|
+
Z(V, T({
|
|
2664
2698
|
ref_key: "dialogRef",
|
|
2665
|
-
ref:
|
|
2699
|
+
ref: S,
|
|
2666
2700
|
id: "dialogRef",
|
|
2667
2701
|
modelValue: w.value,
|
|
2668
2702
|
"onUpdate:modelValue": u[3] || (u[3] = (j) => w.value = j),
|
|
2669
2703
|
fullscreen: e.value.dialog.fullScreen
|
|
2670
|
-
},
|
|
2671
|
-
width:
|
|
2704
|
+
}, U(Ve)(e.value.dialog, (j) => !["size", "max", "min"].includes(j)), {
|
|
2705
|
+
width: U(Ot)(e.value.dialog.width) + 35
|
|
2672
2706
|
}), {
|
|
2673
2707
|
header: y(() => {
|
|
2674
|
-
var j,
|
|
2708
|
+
var j, re, $, P, K, We, Xe, je, He, at;
|
|
2675
2709
|
return [
|
|
2676
|
-
|
|
2677
|
-
|
|
2710
|
+
X("div", Hl, [
|
|
2711
|
+
X("div", Nl, [
|
|
2678
2712
|
h(l.$slots, "f-header", {}, () => [
|
|
2679
|
-
|
|
2713
|
+
X("div", null, he(e.value.dialog.title), 1)
|
|
2680
2714
|
], !0)
|
|
2681
2715
|
]),
|
|
2682
|
-
((
|
|
2716
|
+
((re = (j = e.value) == null ? void 0 : j.dialog) == null ? void 0 : re.fullScreen) === !1 ? (n(), x("div", {
|
|
2683
2717
|
key: 0,
|
|
2684
|
-
style:
|
|
2685
|
-
onClick: u[0] || (u[0] = (
|
|
2718
|
+
style: Oe((K = (P = ($ = e.value) == null ? void 0 : $.dialog) == null ? void 0 : P.max) == null ? void 0 : K.style),
|
|
2719
|
+
onClick: u[0] || (u[0] = (I) => {
|
|
2686
2720
|
e.value.dialog.fullScreen = !0;
|
|
2687
2721
|
}),
|
|
2688
2722
|
class: "max"
|
|
2689
2723
|
}, [
|
|
2690
2724
|
Z(m, null, {
|
|
2691
2725
|
default: y(() => {
|
|
2692
|
-
var
|
|
2726
|
+
var I, Ae, Ge;
|
|
2693
2727
|
return [
|
|
2694
|
-
(n(), D(Ye((Ge = (
|
|
2728
|
+
(n(), D(Ye((Ge = (Ae = (I = e.value) == null ? void 0 : I.dialog) == null ? void 0 : Ae.max) == null ? void 0 : Ge.icon)))
|
|
2695
2729
|
];
|
|
2696
2730
|
}),
|
|
2697
2731
|
_: 1
|
|
@@ -2699,17 +2733,17 @@ const xl = {
|
|
|
2699
2733
|
], 4)) : pe("", !0),
|
|
2700
2734
|
((Xe = (We = e.value) == null ? void 0 : We.dialog) == null ? void 0 : Xe.fullScreen) === !0 ? (n(), x("div", {
|
|
2701
2735
|
key: 1,
|
|
2702
|
-
style:
|
|
2703
|
-
onClick: u[1] || (u[1] = (
|
|
2736
|
+
style: Oe((at = (He = (je = e.value) == null ? void 0 : je.dialog) == null ? void 0 : He.min) == null ? void 0 : at.style),
|
|
2737
|
+
onClick: u[1] || (u[1] = (I) => {
|
|
2704
2738
|
e.value.dialog.fullScreen = !1;
|
|
2705
2739
|
}),
|
|
2706
2740
|
class: "max"
|
|
2707
2741
|
}, [
|
|
2708
2742
|
Z(m, null, {
|
|
2709
2743
|
default: y(() => {
|
|
2710
|
-
var
|
|
2744
|
+
var I, Ae, Ge;
|
|
2711
2745
|
return [
|
|
2712
|
-
(n(), D(Ye((Ge = (
|
|
2746
|
+
(n(), D(Ye((Ge = (Ae = (I = e.value) == null ? void 0 : I.dialog) == null ? void 0 : Ae.min) == null ? void 0 : Ge.icon)))
|
|
2713
2747
|
];
|
|
2714
2748
|
}),
|
|
2715
2749
|
_: 1
|
|
@@ -2719,7 +2753,7 @@ const xl = {
|
|
|
2719
2753
|
];
|
|
2720
2754
|
}),
|
|
2721
2755
|
default: y(() => [
|
|
2722
|
-
|
|
2756
|
+
X("div", zl, [
|
|
2723
2757
|
h(l.$slots, "table-dialog-form", { model: e.value }, () => [
|
|
2724
2758
|
Z(bt, {
|
|
2725
2759
|
modelValue: e.value,
|
|
@@ -2727,10 +2761,10 @@ const xl = {
|
|
|
2727
2761
|
onSubmit: s,
|
|
2728
2762
|
onReset: M
|
|
2729
2763
|
}, me({ _: 2 }, [
|
|
2730
|
-
|
|
2731
|
-
name:
|
|
2764
|
+
R(l.$slots, (j, re, $) => ({
|
|
2765
|
+
name: re,
|
|
2732
2766
|
fn: y((P) => [
|
|
2733
|
-
h(l.$slots,
|
|
2767
|
+
h(l.$slots, re, { model: P }, void 0, !0)
|
|
2734
2768
|
])
|
|
2735
2769
|
}))
|
|
2736
2770
|
]), 1032, ["modelValue"])
|
|
@@ -2740,18 +2774,18 @@ const xl = {
|
|
|
2740
2774
|
_: 3
|
|
2741
2775
|
}, 16, ["modelValue", "fullscreen", "width"])
|
|
2742
2776
|
])) : pe("", !0),
|
|
2743
|
-
e.value.dialog.mode == "drawer" && w.value ? (n(), x("div",
|
|
2744
|
-
Z(N,
|
|
2777
|
+
e.value.dialog.mode == "drawer" && w.value ? (n(), x("div", Pl, [
|
|
2778
|
+
Z(N, T({
|
|
2745
2779
|
ref_key: "drawerRef",
|
|
2746
|
-
ref:
|
|
2780
|
+
ref: F,
|
|
2747
2781
|
modelValue: w.value,
|
|
2748
2782
|
"onUpdate:modelValue": u[5] || (u[5] = (j) => w.value = j)
|
|
2749
|
-
},
|
|
2783
|
+
}, U(Ve)(e.value.dialog, (j) => !["width"].includes(j))), {
|
|
2750
2784
|
header: y(() => [
|
|
2751
|
-
|
|
2752
|
-
|
|
2785
|
+
X("div", Wl, [
|
|
2786
|
+
X("div", Xl, [
|
|
2753
2787
|
h(l.$slots, "f-header", {}, () => [
|
|
2754
|
-
|
|
2788
|
+
X("div", null, he(e.value.dialog.title), 1)
|
|
2755
2789
|
], !0)
|
|
2756
2790
|
])
|
|
2757
2791
|
])
|
|
@@ -2764,10 +2798,10 @@ const xl = {
|
|
|
2764
2798
|
onSubmit: s,
|
|
2765
2799
|
onReset: M
|
|
2766
2800
|
}, me({ _: 2 }, [
|
|
2767
|
-
|
|
2768
|
-
name:
|
|
2801
|
+
R(l.$slots, (j, re, $) => ({
|
|
2802
|
+
name: re,
|
|
2769
2803
|
fn: y((P) => [
|
|
2770
|
-
h(l.$slots,
|
|
2804
|
+
h(l.$slots, re, { model: P }, void 0, !0)
|
|
2771
2805
|
])
|
|
2772
2806
|
}))
|
|
2773
2807
|
]), 1032, ["modelValue"])
|
|
@@ -2776,24 +2810,24 @@ const xl = {
|
|
|
2776
2810
|
_: 3
|
|
2777
2811
|
}, 16, ["modelValue"])
|
|
2778
2812
|
])) : pe("", !0),
|
|
2779
|
-
|
|
2780
|
-
((
|
|
2813
|
+
X("div", Gl, [
|
|
2814
|
+
((Be = (ce = e.value) == null ? void 0 : ce.query) == null ? void 0 : Be.hidden) != !0 ? (n(), x("div", Ql, [
|
|
2781
2815
|
h(l.$slots, "query", {}, () => [
|
|
2782
|
-
Z(
|
|
2816
|
+
Z($l, {
|
|
2783
2817
|
modelValue: e.value,
|
|
2784
2818
|
"onUpdate:modelValue": u[6] || (u[6] = (j) => e.value = j),
|
|
2785
2819
|
info: E.value,
|
|
2786
2820
|
"onUpdate:info": u[7] || (u[7] = (j) => E.value = j),
|
|
2787
|
-
onQuery:
|
|
2821
|
+
onQuery: o,
|
|
2788
2822
|
onReset: b
|
|
2789
2823
|
}, me({
|
|
2790
2824
|
"q-btns": y(() => [
|
|
2791
2825
|
h(l.$slots, "q-btns", {}, () => [
|
|
2792
|
-
(n(!0), x(W, null,
|
|
2793
|
-
|
|
2826
|
+
(n(!0), x(W, null, R(ue(["add", "download", "setting"]), (j, re) => (n(), x(W, null, [
|
|
2827
|
+
re == "default" ? (n(!0), x(W, { key: 0 }, R(j, ($) => (n(), x(W, null, [
|
|
2794
2828
|
h(l.$slots, $.name + "-left", {}, void 0, !0),
|
|
2795
2829
|
($.name === "control-add" ? $.attr.auth() && $.attr.inline === !1 : $.attr.auth()) ? h(l.$slots, $.name, { key: 0 }, () => [
|
|
2796
|
-
$.label ? (n(), D(
|
|
2830
|
+
$.label ? (n(), D(U(De), T({
|
|
2797
2831
|
key: 0,
|
|
2798
2832
|
title: $.label,
|
|
2799
2833
|
ref_for: !0
|
|
@@ -2801,10 +2835,10 @@ const xl = {
|
|
|
2801
2835
|
onClick: (P) => $.func(e.value, ee.value)
|
|
2802
2836
|
}), {
|
|
2803
2837
|
default: y(() => [
|
|
2804
|
-
Me(
|
|
2838
|
+
Me(he($.label), 1)
|
|
2805
2839
|
]),
|
|
2806
2840
|
_: 2
|
|
2807
|
-
}, 1040, ["title", "onClick"])) : (n(), D(
|
|
2841
|
+
}, 1040, ["title", "onClick"])) : (n(), D(U(De), T({
|
|
2808
2842
|
key: 1,
|
|
2809
2843
|
title: $.label,
|
|
2810
2844
|
ref_for: !0
|
|
@@ -2815,10 +2849,10 @@ const xl = {
|
|
|
2815
2849
|
h(l.$slots, $.name + "-right", {}, void 0, !0)
|
|
2816
2850
|
], 64))), 256)) : (n(), D(z, { key: 1 }, {
|
|
2817
2851
|
default: y(() => [
|
|
2818
|
-
(n(!0), x(W, null,
|
|
2852
|
+
(n(!0), x(W, null, R(j, ($) => (n(), x(W, null, [
|
|
2819
2853
|
h(l.$slots, $.name + "-left", {}, void 0, !0),
|
|
2820
2854
|
($.name === "control-add" ? $.attr.auth() && $.attr.inline === !1 : $.attr.auth()) ? h(l.$slots, $.name, { key: 0 }, () => [
|
|
2821
|
-
$.label ? (n(), D(
|
|
2855
|
+
$.label ? (n(), D(U(De), T({
|
|
2822
2856
|
key: 0,
|
|
2823
2857
|
title: $.label,
|
|
2824
2858
|
ref_for: !0
|
|
@@ -2826,10 +2860,10 @@ const xl = {
|
|
|
2826
2860
|
onClick: (P) => $.func(e.value, ee.value)
|
|
2827
2861
|
}), {
|
|
2828
2862
|
default: y(() => [
|
|
2829
|
-
Me(
|
|
2863
|
+
Me(he($.label), 1)
|
|
2830
2864
|
]),
|
|
2831
2865
|
_: 2
|
|
2832
|
-
}, 1040, ["title", "onClick"])) : (n(), D(
|
|
2866
|
+
}, 1040, ["title", "onClick"])) : (n(), D(U(De), T({
|
|
2833
2867
|
key: 1,
|
|
2834
2868
|
title: $.label,
|
|
2835
2869
|
ref_for: !0
|
|
@@ -2847,21 +2881,21 @@ const xl = {
|
|
|
2847
2881
|
]),
|
|
2848
2882
|
_: 2
|
|
2849
2883
|
}, [
|
|
2850
|
-
|
|
2851
|
-
name:
|
|
2884
|
+
R(l.$slots, (j, re, $) => ({
|
|
2885
|
+
name: re,
|
|
2852
2886
|
fn: y((P) => [
|
|
2853
|
-
h(l.$slots,
|
|
2887
|
+
h(l.$slots, re, { model: e.value }, void 0, !0)
|
|
2854
2888
|
])
|
|
2855
2889
|
}))
|
|
2856
2890
|
]), 1032, ["modelValue", "info"])
|
|
2857
2891
|
], !0)
|
|
2858
2892
|
])) : pe("", !0),
|
|
2859
|
-
|
|
2860
|
-
Z(c,
|
|
2861
|
-
"summary-method": (j) => e.value.table["summary-method"](j, { fields:
|
|
2893
|
+
X("div", Zl, [
|
|
2894
|
+
Z(c, T({ ...l.$attrs, ...U(Ve)(e.value.table, (j) => !["dblclickType", "page"].includes(j)) }, {
|
|
2895
|
+
"summary-method": (j) => e.value.table["summary-method"](j, { fields: oe.value, sums: ie.value }),
|
|
2862
2896
|
onSortChange: u[8] || (u[8] = (j) => {
|
|
2863
|
-
var
|
|
2864
|
-
e.value.table.onSortChange(j, E.value), ((
|
|
2897
|
+
var re, $;
|
|
2898
|
+
e.value.table.onSortChange(j, E.value), ((re = j == null ? void 0 : j.column) == null ? void 0 : re.sortable) === "custom" && (($ = e.value.table) == null || $.load());
|
|
2865
2899
|
})
|
|
2866
2900
|
}), {
|
|
2867
2901
|
append: y(() => [
|
|
@@ -2872,33 +2906,33 @@ const xl = {
|
|
|
2872
2906
|
]),
|
|
2873
2907
|
default: y(() => [
|
|
2874
2908
|
h(l.$slots, "default", {}, () => [
|
|
2875
|
-
(n(!0), x(W, null,
|
|
2876
|
-
prop:
|
|
2877
|
-
key:
|
|
2909
|
+
(n(!0), x(W, null, R(ke.value, (j, re) => (n(), D(Le, T({
|
|
2910
|
+
prop: re,
|
|
2911
|
+
key: re,
|
|
2878
2912
|
ref_for: !0
|
|
2879
|
-
}, { ...e.value.tableColumns, ...
|
|
2913
|
+
}, { ...e.value.tableColumns, ...U(Ve)(j, ($) => H.includes($)) }), me({
|
|
2880
2914
|
header: y(({ column: $, $index: P }) => [
|
|
2881
|
-
|
|
2915
|
+
re == "control" ? h(l.$slots, `${re}-header`, {
|
|
2882
2916
|
key: 0,
|
|
2883
2917
|
column: $,
|
|
2884
2918
|
$index: P
|
|
2885
2919
|
}, () => [
|
|
2886
|
-
|
|
2887
|
-
], !0) : h(l.$slots, `${
|
|
2920
|
+
X("span", null, he($.label), 1)
|
|
2921
|
+
], !0) : h(l.$slots, `${re}-header`, {
|
|
2888
2922
|
key: 1,
|
|
2889
2923
|
column: $,
|
|
2890
2924
|
$index: P
|
|
2891
2925
|
}, void 0, !0)
|
|
2892
2926
|
]),
|
|
2893
2927
|
"filter-icon": y(($) => [
|
|
2894
|
-
h(l.$slots, `${
|
|
2928
|
+
h(l.$slots, `${re}-filter-icon`, { data: $ }, void 0, !0)
|
|
2895
2929
|
]),
|
|
2896
2930
|
_: 2
|
|
2897
2931
|
}, [
|
|
2898
2932
|
j.type === "expand" ? {
|
|
2899
2933
|
name: "default",
|
|
2900
2934
|
fn: y(({ row: $, column: P, $index: K }) => [
|
|
2901
|
-
h(l.$slots, `${
|
|
2935
|
+
h(l.$slots, `${re}`, {
|
|
2902
2936
|
row: $,
|
|
2903
2937
|
column: P,
|
|
2904
2938
|
$index: K
|
|
@@ -2910,9 +2944,9 @@ const xl = {
|
|
|
2910
2944
|
fn: y(({ row: $, column: P, $index: K }) => {
|
|
2911
2945
|
var We, Xe;
|
|
2912
2946
|
return [
|
|
2913
|
-
|
|
2914
|
-
class:
|
|
2915
|
-
style:
|
|
2947
|
+
X("div", {
|
|
2948
|
+
class: St(["control", (We = e.value.control) == null ? void 0 : We.class]),
|
|
2949
|
+
style: Oe((Xe = e.value.control) == null ? void 0 : Xe.style)
|
|
2916
2950
|
}, [
|
|
2917
2951
|
h(l.$slots, "control", {}, () => [
|
|
2918
2952
|
h(l.$slots, "control-left", {
|
|
@@ -2920,94 +2954,94 @@ const xl = {
|
|
|
2920
2954
|
column: P,
|
|
2921
2955
|
$index: K
|
|
2922
2956
|
}, void 0, !0),
|
|
2923
|
-
(n(!0), x(W, null,
|
|
2957
|
+
(n(!0), x(W, null, R(ue(["view", "edit", "delete", "save"]), (je, He) => {
|
|
2924
2958
|
var at;
|
|
2925
2959
|
return n(), x(W, null, [
|
|
2926
|
-
He == "default" ? (n(!0), x(W, { key: 0 },
|
|
2927
|
-
h(l.$slots,
|
|
2960
|
+
He == "default" ? (n(!0), x(W, { key: 0 }, R(je, (I) => (n(), x(W, null, [
|
|
2961
|
+
h(l.$slots, I.name + "-left", {
|
|
2928
2962
|
row: $,
|
|
2929
2963
|
column: P,
|
|
2930
2964
|
$index: K
|
|
2931
2965
|
}, void 0, !0),
|
|
2932
|
-
|
|
2966
|
+
I.attr.auth($, P, K) ? h(l.$slots, I.name, {
|
|
2933
2967
|
key: 0,
|
|
2934
2968
|
row: $,
|
|
2935
2969
|
column: P,
|
|
2936
2970
|
$index: K
|
|
2937
2971
|
}, () => [
|
|
2938
|
-
|
|
2972
|
+
I.label ? (n(), D(U(De), T({
|
|
2939
2973
|
key: 0,
|
|
2940
|
-
title:
|
|
2974
|
+
title: I.label,
|
|
2941
2975
|
ref_for: !0
|
|
2942
|
-
},
|
|
2943
|
-
onClick: (
|
|
2976
|
+
}, I.attr, {
|
|
2977
|
+
onClick: (Ae) => I.func($, P, K, e.value)
|
|
2944
2978
|
}), {
|
|
2945
2979
|
default: y(() => [
|
|
2946
|
-
Me(
|
|
2980
|
+
Me(he(Fe(I, K)), 1)
|
|
2947
2981
|
]),
|
|
2948
2982
|
_: 2
|
|
2949
|
-
}, 1040, ["title", "onClick"])) : (n(), D(
|
|
2983
|
+
}, 1040, ["title", "onClick"])) : (n(), D(U(De), T({
|
|
2950
2984
|
key: 1,
|
|
2951
|
-
title:
|
|
2985
|
+
title: I.label,
|
|
2952
2986
|
ref_for: !0
|
|
2953
|
-
},
|
|
2954
|
-
onClick: (
|
|
2987
|
+
}, I.attr, {
|
|
2988
|
+
onClick: (Ae) => I.func($, P, K, e.value)
|
|
2955
2989
|
}), null, 16, ["title", "onClick"]))
|
|
2956
2990
|
], !0) : pe("", !0),
|
|
2957
|
-
h(l.$slots,
|
|
2991
|
+
h(l.$slots, I.name + "-right", {
|
|
2958
2992
|
row: $,
|
|
2959
2993
|
column: P,
|
|
2960
2994
|
$index: K
|
|
2961
2995
|
}, void 0, !0)
|
|
2962
|
-
], 64))), 256)) : He != null && He.startsWith("dropdown") && ((at = de($, P, K, e.value)) != null && at.auth()) ? (n(), D(Ce,
|
|
2996
|
+
], 64))), 256)) : He != null && He.startsWith("dropdown") && ((at = de($, P, K, e.value)) != null && at.auth()) ? (n(), D(Ce, T({
|
|
2963
2997
|
key: 1,
|
|
2964
2998
|
ref_for: !0
|
|
2965
2999
|
}, de($, P, K, e.value)), {
|
|
2966
3000
|
dropdown: y(() => [
|
|
2967
3001
|
Z(Ee, null, {
|
|
2968
3002
|
default: y(() => [
|
|
2969
|
-
(n(!0), x(W, null,
|
|
2970
|
-
var
|
|
3003
|
+
(n(!0), x(W, null, R(je, (I) => {
|
|
3004
|
+
var Ae, Ge, Ct;
|
|
2971
3005
|
return n(), x(W, null, [
|
|
2972
|
-
l.$slots[
|
|
3006
|
+
l.$slots[I.name + "-left"] ? h(l.$slots, I.name + "-left", {
|
|
2973
3007
|
key: 0,
|
|
2974
3008
|
row: $,
|
|
2975
3009
|
column: P,
|
|
2976
3010
|
$index: K
|
|
2977
3011
|
}, void 0, !0) : pe("", !0),
|
|
2978
|
-
|
|
3012
|
+
I.attr.auth($, P, K) ? (n(), D(te, T({
|
|
2979
3013
|
key: 1,
|
|
2980
3014
|
ref_for: !0
|
|
2981
|
-
}, { command: (
|
|
3015
|
+
}, { command: (Ae = I == null ? void 0 : I.attr) == null ? void 0 : Ae.command, divided: (Ge = I == null ? void 0 : I.attr) == null ? void 0 : Ge.divided, disabled: (Ct = I == null ? void 0 : I.attr) == null ? void 0 : Ct.disabled }), {
|
|
2982
3016
|
default: y(() => [
|
|
2983
|
-
h(l.$slots,
|
|
3017
|
+
h(l.$slots, I.name, {
|
|
2984
3018
|
row: $,
|
|
2985
3019
|
column: P,
|
|
2986
3020
|
$index: K
|
|
2987
3021
|
}, () => [
|
|
2988
|
-
|
|
3022
|
+
I.label ? (n(), D(U(De), T({
|
|
2989
3023
|
key: 0,
|
|
2990
|
-
title:
|
|
3024
|
+
title: I.label,
|
|
2991
3025
|
ref_for: !0
|
|
2992
|
-
},
|
|
2993
|
-
onClick: (At) =>
|
|
3026
|
+
}, I.attr, {
|
|
3027
|
+
onClick: (At) => I.func($, P, K, e.value)
|
|
2994
3028
|
}), {
|
|
2995
3029
|
default: y(() => [
|
|
2996
|
-
Me(
|
|
3030
|
+
Me(he(Fe(I, K)), 1)
|
|
2997
3031
|
]),
|
|
2998
3032
|
_: 2
|
|
2999
|
-
}, 1040, ["title", "onClick"])) : (n(), D(
|
|
3033
|
+
}, 1040, ["title", "onClick"])) : (n(), D(U(De), T({
|
|
3000
3034
|
key: 1,
|
|
3001
|
-
title:
|
|
3035
|
+
title: I.label,
|
|
3002
3036
|
ref_for: !0
|
|
3003
|
-
},
|
|
3004
|
-
onClick: (At) =>
|
|
3037
|
+
}, I.attr, {
|
|
3038
|
+
onClick: (At) => I.func($, P, K, e.value)
|
|
3005
3039
|
}), null, 16, ["title", "onClick"]))
|
|
3006
3040
|
], !0)
|
|
3007
3041
|
]),
|
|
3008
3042
|
_: 2
|
|
3009
3043
|
}, 1040)) : pe("", !0),
|
|
3010
|
-
l.$slots[
|
|
3044
|
+
l.$slots[I.name + "-right"] ? h(l.$slots, I.name + "-right", {
|
|
3011
3045
|
key: 2,
|
|
3012
3046
|
row: $,
|
|
3013
3047
|
column: P,
|
|
@@ -3020,46 +3054,46 @@ const xl = {
|
|
|
3020
3054
|
}, 1024)
|
|
3021
3055
|
]),
|
|
3022
3056
|
default: y(() => {
|
|
3023
|
-
var
|
|
3057
|
+
var I;
|
|
3024
3058
|
return [
|
|
3025
|
-
Me(
|
|
3059
|
+
Me(he((I = de($, P, K, e.value)) == null ? void 0 : I.label) + " ", 1)
|
|
3026
3060
|
];
|
|
3027
3061
|
}),
|
|
3028
3062
|
_: 2
|
|
3029
3063
|
}, 1040)) : (n(), D(z, { key: 2 }, {
|
|
3030
3064
|
default: y(() => [
|
|
3031
|
-
(n(!0), x(W, null,
|
|
3032
|
-
h(l.$slots,
|
|
3065
|
+
(n(!0), x(W, null, R(je, (I) => (n(), x(W, null, [
|
|
3066
|
+
h(l.$slots, I.name + "-left", {
|
|
3033
3067
|
row: $,
|
|
3034
3068
|
column: P,
|
|
3035
3069
|
$index: K
|
|
3036
3070
|
}, void 0, !0),
|
|
3037
|
-
|
|
3071
|
+
I.attr.auth($, P, K) ? h(l.$slots, I.name, {
|
|
3038
3072
|
key: 0,
|
|
3039
3073
|
row: $,
|
|
3040
3074
|
column: P,
|
|
3041
3075
|
$index: K
|
|
3042
3076
|
}, () => [
|
|
3043
|
-
|
|
3077
|
+
I.label ? (n(), D(U(De), T({
|
|
3044
3078
|
key: 0,
|
|
3045
|
-
title:
|
|
3079
|
+
title: I.label,
|
|
3046
3080
|
ref_for: !0
|
|
3047
|
-
},
|
|
3048
|
-
onClick: (
|
|
3081
|
+
}, I.attr, {
|
|
3082
|
+
onClick: (Ae) => I.func($, P, K, e.value)
|
|
3049
3083
|
}), {
|
|
3050
3084
|
default: y(() => [
|
|
3051
|
-
Me(
|
|
3085
|
+
Me(he(Fe(I, K)), 1)
|
|
3052
3086
|
]),
|
|
3053
3087
|
_: 2
|
|
3054
|
-
}, 1040, ["title", "onClick"])) : (n(), D(
|
|
3088
|
+
}, 1040, ["title", "onClick"])) : (n(), D(U(De), T({
|
|
3055
3089
|
key: 1,
|
|
3056
|
-
title:
|
|
3090
|
+
title: I.label,
|
|
3057
3091
|
ref_for: !0
|
|
3058
|
-
},
|
|
3059
|
-
onClick: (
|
|
3092
|
+
}, I.attr, {
|
|
3093
|
+
onClick: (Ae) => I.func($, P, K, e.value)
|
|
3060
3094
|
}), null, 16, ["title", "onClick"]))
|
|
3061
3095
|
], !0) : pe("", !0),
|
|
3062
|
-
h(l.$slots,
|
|
3096
|
+
h(l.$slots, I.name + "-right", {
|
|
3063
3097
|
row: $,
|
|
3064
3098
|
column: P,
|
|
3065
3099
|
$index: K
|
|
@@ -3083,7 +3117,7 @@ const xl = {
|
|
|
3083
3117
|
} : j.type != "selection" && j.type != "index" ? {
|
|
3084
3118
|
name: "default",
|
|
3085
3119
|
fn: y(({ row: $, column: P, $index: K }) => [
|
|
3086
|
-
we(j, $, P, K) && K != -1 ? h(l.$slots, `${
|
|
3120
|
+
we(j, $, P, K) && K != -1 ? h(l.$slots, `${re}`, {
|
|
3087
3121
|
key: 0,
|
|
3088
3122
|
row: $,
|
|
3089
3123
|
column: P,
|
|
@@ -3092,18 +3126,18 @@ const xl = {
|
|
|
3092
3126
|
var We;
|
|
3093
3127
|
return [
|
|
3094
3128
|
(n(), D(vt, {
|
|
3095
|
-
modelValue: $[
|
|
3096
|
-
"onUpdate:modelValue": (Xe) => $[
|
|
3129
|
+
modelValue: $[re],
|
|
3130
|
+
"onUpdate:modelValue": (Xe) => $[re] = Xe,
|
|
3097
3131
|
item: j == null ? void 0 : j.table($, P, K),
|
|
3098
|
-
ctrlKey:
|
|
3099
|
-
key: `${
|
|
3132
|
+
ctrlKey: re,
|
|
3133
|
+
key: `${re}-${K} -${ve.value}`,
|
|
3100
3134
|
ctrlType: (We = j.table($, P, K)) != null && We.type ? j.table($, P, K).type : j.type,
|
|
3101
3135
|
model: e.value,
|
|
3102
3136
|
class: "g-ctrl-container",
|
|
3103
3137
|
t: "t",
|
|
3104
3138
|
formInfo: $
|
|
3105
3139
|
}, me({ _: 2 }, [
|
|
3106
|
-
|
|
3140
|
+
R(l.$slots, (Xe, je) => ({
|
|
3107
3141
|
name: je,
|
|
3108
3142
|
fn: y((He) => [
|
|
3109
3143
|
h(l.$slots, je, {
|
|
@@ -3115,15 +3149,16 @@ const xl = {
|
|
|
3115
3149
|
}))
|
|
3116
3150
|
]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model", "formInfo"]))
|
|
3117
3151
|
];
|
|
3118
|
-
}, !0) : h(l.$slots, `${
|
|
3152
|
+
}, !0) : h(l.$slots, `${re}`, {
|
|
3119
3153
|
key: 1,
|
|
3120
3154
|
row: $,
|
|
3121
3155
|
column: P,
|
|
3122
3156
|
$index: K
|
|
3123
3157
|
}, () => [
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3158
|
+
X("div", {
|
|
3159
|
+
style: Oe([{ width: "100%", "text-overflow": "ellipsis", overflow: "hidden" }, j == null ? void 0 : j.style]),
|
|
3160
|
+
innerHTML: se(j, P.formatter($, P, $[re], K))
|
|
3161
|
+
}, null, 12, Jl)
|
|
3127
3162
|
], !0)
|
|
3128
3163
|
]),
|
|
3129
3164
|
key: "2"
|
|
@@ -3133,8 +3168,8 @@ const xl = {
|
|
|
3133
3168
|
]),
|
|
3134
3169
|
_: 3
|
|
3135
3170
|
}, 16, ["summary-method"]),
|
|
3136
|
-
(ft = (
|
|
3137
|
-
Z(
|
|
3171
|
+
(ft = (Ze = (Ke = e.value) == null ? void 0 : Ke.table) == null ? void 0 : Ze.page) != null && ft.hidden ? pe("", !0) : h(l.$slots, "page", { key: 0 }, () => [
|
|
3172
|
+
Z(G, T({
|
|
3138
3173
|
"page-size": e.value.table.page.pageSize,
|
|
3139
3174
|
"onUpdate:pageSize": u[9] || (u[9] = (j) => e.value.table.page.pageSize = j),
|
|
3140
3175
|
"current-page": e.value.table.page.currentPage,
|
|
@@ -3151,7 +3186,7 @@ const xl = {
|
|
|
3151
3186
|
], 64);
|
|
3152
3187
|
};
|
|
3153
3188
|
}
|
|
3154
|
-
}),
|
|
3189
|
+
}), ea = /* @__PURE__ */ Qe(Kl, [["__scopeId", "data-v-36a0d16c"]]), ta = { class: "g-tree-table" }, la = { class: "g-tree-container" }, aa = { class: "g-tree-table-container" }, oa = /* @__PURE__ */ Object.assign({
|
|
3155
3190
|
name: "g-tree-table",
|
|
3156
3191
|
inheritAttrs: !1
|
|
3157
3192
|
}, {
|
|
@@ -3161,44 +3196,44 @@ const xl = {
|
|
|
3161
3196
|
modelModifiers: {}
|
|
3162
3197
|
},
|
|
3163
3198
|
emits: /* @__PURE__ */ ze(["load"], ["update:modelValue"]),
|
|
3164
|
-
setup(
|
|
3165
|
-
var O, Y, ie,
|
|
3166
|
-
const
|
|
3199
|
+
setup(i, { emit: f }) {
|
|
3200
|
+
var O, Y, ie, oe;
|
|
3201
|
+
const r = f, t = Pe(i, "modelValue"), e = kt(), d = le(
|
|
3167
3202
|
typeof ((O = e == null ? void 0 : e.tree) == null ? void 0 : O.width) == "number" ? `${e.tree.width}px` : ((Y = e == null ? void 0 : e.tree) == null ? void 0 : Y.width) || "180px"
|
|
3168
|
-
), E = le(((ie = e == null ? void 0 : e.tree) == null ? void 0 : ie.search) === void 0 ? !0 : (
|
|
3203
|
+
), E = le(((ie = e == null ? void 0 : e.tree) == null ? void 0 : ie.search) === void 0 ? !0 : (oe = e == null ? void 0 : e.tree) == null ? void 0 : oe.search), S = le({}), F = le(""), _ = le(null), w = (J, ve) => {
|
|
3169
3204
|
var be, de;
|
|
3170
3205
|
if (!J) return !0;
|
|
3171
3206
|
const ge = ((de = (be = e.tree) == null ? void 0 : be.props) == null ? void 0 : de.label) || "label";
|
|
3172
3207
|
return ve[ge].includes(J);
|
|
3173
3208
|
}, H = (J, ve) => {
|
|
3174
|
-
|
|
3209
|
+
r("load", S.value, J, ve);
|
|
3175
3210
|
}, ee = (J) => {
|
|
3176
|
-
|
|
3211
|
+
S.value = J, t.value.table.load();
|
|
3177
3212
|
};
|
|
3178
|
-
return Pt(
|
|
3179
|
-
|
|
3213
|
+
return Pt(F, (J) => {
|
|
3214
|
+
_.value.filter(J);
|
|
3180
3215
|
}), (J, ve) => {
|
|
3181
|
-
const ge =
|
|
3182
|
-
return n(), x("div",
|
|
3183
|
-
|
|
3216
|
+
const ge = B("el-input"), be = B("el-tree"), de = B("g-table");
|
|
3217
|
+
return n(), x("div", ta, [
|
|
3218
|
+
X("div", {
|
|
3184
3219
|
class: "g-tree-left",
|
|
3185
|
-
style:
|
|
3220
|
+
style: Oe({ width: d.value })
|
|
3186
3221
|
}, [
|
|
3187
3222
|
E.value ? (n(), D(ge, {
|
|
3188
3223
|
key: 0,
|
|
3189
|
-
modelValue:
|
|
3190
|
-
"onUpdate:modelValue": ve[0] || (ve[0] = (fe) =>
|
|
3224
|
+
modelValue: F.value,
|
|
3225
|
+
"onUpdate:modelValue": ve[0] || (ve[0] = (fe) => F.value = fe),
|
|
3191
3226
|
style: { width: "100%", padding: "0 10px", "box-sizing": "border-box" },
|
|
3192
3227
|
placeholder: "输入节点查询",
|
|
3193
3228
|
clearable: ""
|
|
3194
3229
|
}, null, 8, ["modelValue"])) : pe("", !0),
|
|
3195
|
-
|
|
3196
|
-
Z(be,
|
|
3197
|
-
style: { width:
|
|
3230
|
+
X("div", la, [
|
|
3231
|
+
Z(be, T({
|
|
3232
|
+
style: { width: d.value },
|
|
3198
3233
|
"filter-node-method": w,
|
|
3199
3234
|
"expand-on-click-node": !1,
|
|
3200
3235
|
ref_key: "treeRef",
|
|
3201
|
-
ref:
|
|
3236
|
+
ref: _,
|
|
3202
3237
|
onNodeClick: ee
|
|
3203
3238
|
}, J.$attrs.tree), me({
|
|
3204
3239
|
default: y(({ node: fe, data: ne }) => [
|
|
@@ -3206,12 +3241,12 @@ const xl = {
|
|
|
3206
3241
|
node: fe,
|
|
3207
3242
|
data: ne
|
|
3208
3243
|
}, () => [
|
|
3209
|
-
|
|
3244
|
+
X("span", null, he(fe.label), 1)
|
|
3210
3245
|
], !0)
|
|
3211
3246
|
]),
|
|
3212
3247
|
_: 2
|
|
3213
3248
|
}, [
|
|
3214
|
-
|
|
3249
|
+
R(J.$slots, (fe, ne, ae) => ({
|
|
3215
3250
|
name: ne,
|
|
3216
3251
|
fn: y(($e) => [
|
|
3217
3252
|
h(J.$slots, ne, { data: $e }, void 0, !0)
|
|
@@ -3220,12 +3255,12 @@ const xl = {
|
|
|
3220
3255
|
]), 1040, ["style"])
|
|
3221
3256
|
])
|
|
3222
3257
|
], 4),
|
|
3223
|
-
|
|
3224
|
-
Z(de,
|
|
3258
|
+
X("div", aa, [
|
|
3259
|
+
Z(de, T({
|
|
3225
3260
|
modelValue: t.value,
|
|
3226
3261
|
"onUpdate:modelValue": ve[1] || (ve[1] = (fe) => t.value = fe)
|
|
3227
3262
|
}, J.$attrs, { onLoad: H }), me({ _: 2 }, [
|
|
3228
|
-
|
|
3263
|
+
R(J.$slots, (fe, ne, ae) => ({
|
|
3229
3264
|
name: ne,
|
|
3230
3265
|
fn: y(($e) => [
|
|
3231
3266
|
h(J.$slots, ne, { data: $e }, void 0, !0)
|
|
@@ -3236,14 +3271,14 @@ const xl = {
|
|
|
3236
3271
|
]);
|
|
3237
3272
|
};
|
|
3238
3273
|
}
|
|
3239
|
-
}),
|
|
3274
|
+
}), ra = /* @__PURE__ */ Qe(oa, [["__scopeId", "data-v-2d8b16ed"]]), ua = {
|
|
3240
3275
|
key: 0,
|
|
3241
3276
|
class: "op-group"
|
|
3242
|
-
},
|
|
3277
|
+
}, na = {
|
|
3243
3278
|
key: 1,
|
|
3244
3279
|
class: "op-items",
|
|
3245
3280
|
style: { width: "100%", height: "100%" }
|
|
3246
|
-
},
|
|
3281
|
+
}, sa = ["title"], Mt = "100px", ia = /* @__PURE__ */ Object.assign({ name: "g-select-option" }, {
|
|
3247
3282
|
__name: "g-select-option",
|
|
3248
3283
|
props: {
|
|
3249
3284
|
columns: {
|
|
@@ -3263,68 +3298,68 @@ const xl = {
|
|
|
3263
3298
|
default: ""
|
|
3264
3299
|
}
|
|
3265
3300
|
},
|
|
3266
|
-
setup(
|
|
3267
|
-
const f =
|
|
3268
|
-
return (
|
|
3269
|
-
(n(!0), x(W, null,
|
|
3270
|
-
style:
|
|
3301
|
+
setup(i) {
|
|
3302
|
+
const f = i;
|
|
3303
|
+
return (r, t) => f.title ? (n(), x("div", ua, [
|
|
3304
|
+
(n(!0), x(W, null, R(f.columns, (e) => (n(), x("span", {
|
|
3305
|
+
style: Oe({ width: (e == null ? void 0 : e.width) || Mt, ...e == null ? void 0 : e.titleStyle, textAlign: (e == null ? void 0 : e.align) || "center" }),
|
|
3271
3306
|
key: e.key
|
|
3272
3307
|
}, [
|
|
3273
|
-
h(
|
|
3274
|
-
Me(
|
|
3308
|
+
h(r.$slots, `${i.t}-title-${e.key}`, { col: e }, () => [
|
|
3309
|
+
Me(he(e.label), 1)
|
|
3275
3310
|
], !0)
|
|
3276
3311
|
], 4))), 128))
|
|
3277
|
-
])) : (n(), x("div",
|
|
3278
|
-
(n(!0), x(W, null,
|
|
3279
|
-
style:
|
|
3312
|
+
])) : (n(), x("div", na, [
|
|
3313
|
+
(n(!0), x(W, null, R(f.columns, (e) => (n(), x("span", {
|
|
3314
|
+
style: Oe({ width: (e == null ? void 0 : e.width) || Mt, textAlign: (e == null ? void 0 : e.align) || "center", ...e == null ? void 0 : e.style }),
|
|
3280
3315
|
key: e.key,
|
|
3281
|
-
title:
|
|
3316
|
+
title: i.data[e.key]
|
|
3282
3317
|
}, [
|
|
3283
|
-
h(
|
|
3284
|
-
Me(
|
|
3318
|
+
h(r.$slots, `${i.t}-option-${e.key}`, { col: e }, () => [
|
|
3319
|
+
Me(he(i.data[e.key] ?? "-"), 1)
|
|
3285
3320
|
], !0)
|
|
3286
|
-
], 12,
|
|
3321
|
+
], 12, sa))), 128))
|
|
3287
3322
|
]));
|
|
3288
3323
|
}
|
|
3289
|
-
}),
|
|
3324
|
+
}), da = /* @__PURE__ */ Qe(ia, [["__scopeId", "data-v-c0ac6b77"]]), fa = Object.freeze({}), qt = [ea, bt, ra, da];
|
|
3290
3325
|
let $t = {};
|
|
3291
|
-
const
|
|
3292
|
-
install: (
|
|
3293
|
-
$t = Object.freeze({ ...
|
|
3294
|
-
|
|
3295
|
-
}),
|
|
3326
|
+
const _a = {
|
|
3327
|
+
install: (i, f = {}) => {
|
|
3328
|
+
$t = Object.freeze({ ...fa, ...f }), qt.forEach((r) => {
|
|
3329
|
+
i.component(r.name, r);
|
|
3330
|
+
}), i.provide("options", $t), i.config.globalProperties.$openModal = wt;
|
|
3296
3331
|
}
|
|
3297
|
-
},
|
|
3332
|
+
}, ca = (i) => ({ dialog: Bt, drawer: Yt })[i] || null, wt = (i = {}, f = "dialog") => {
|
|
3298
3333
|
if (typeof document > "u") return () => {
|
|
3299
3334
|
};
|
|
3300
|
-
const
|
|
3335
|
+
const r = document.createElement("div");
|
|
3301
3336
|
let t = () => {
|
|
3302
3337
|
};
|
|
3303
|
-
const e =
|
|
3338
|
+
const e = ca(f);
|
|
3304
3339
|
if (!e) return () => {
|
|
3305
3340
|
};
|
|
3306
|
-
const
|
|
3341
|
+
const d = le(!0), E = Wt({
|
|
3307
3342
|
setup() {
|
|
3308
3343
|
return t = () => {
|
|
3309
|
-
|
|
3310
|
-
E.unmount(),
|
|
3344
|
+
d.value = !1, setTimeout(() => {
|
|
3345
|
+
E.unmount(), r.remove();
|
|
3311
3346
|
}, 300);
|
|
3312
3347
|
}, () => {
|
|
3313
|
-
var
|
|
3314
|
-
return
|
|
3315
|
-
modelValue:
|
|
3316
|
-
"onUpdate:modelValue": (w) =>
|
|
3348
|
+
var S, F, _;
|
|
3349
|
+
return Ie(e, {
|
|
3350
|
+
modelValue: d.value,
|
|
3351
|
+
"onUpdate:modelValue": (w) => d.value = w,
|
|
3317
3352
|
appendToBody: !0,
|
|
3318
3353
|
draggable: !0,
|
|
3319
3354
|
"align-center": !0,
|
|
3320
3355
|
overflow: !0,
|
|
3321
3356
|
destroyOnClose: !0,
|
|
3322
3357
|
"close-on-click-modal": !1,
|
|
3323
|
-
...
|
|
3358
|
+
...i
|
|
3324
3359
|
}, {
|
|
3325
|
-
default: (
|
|
3326
|
-
header: (
|
|
3327
|
-
footer: (
|
|
3360
|
+
default: (S = i.slots) == null ? void 0 : S.default,
|
|
3361
|
+
header: (F = i.slots) == null ? void 0 : F.header,
|
|
3362
|
+
footer: (_ = i.slots) == null ? void 0 : _.footer
|
|
3328
3363
|
});
|
|
3329
3364
|
};
|
|
3330
3365
|
},
|
|
@@ -3332,86 +3367,86 @@ const ga = {
|
|
|
3332
3367
|
pt();
|
|
3333
3368
|
}
|
|
3334
3369
|
});
|
|
3335
|
-
return qt.forEach((
|
|
3336
|
-
E.component(
|
|
3337
|
-
}), E.provide("options", $t), E.use(
|
|
3370
|
+
return qt.forEach((S) => {
|
|
3371
|
+
E.component(S.name, S);
|
|
3372
|
+
}), E.provide("options", $t), E.use(It, { locale: tl }), document.body.appendChild(r), E.mount(r), t;
|
|
3338
3373
|
};
|
|
3339
|
-
function Ot(
|
|
3340
|
-
if (typeof
|
|
3341
|
-
return
|
|
3342
|
-
if (
|
|
3343
|
-
return parseFloat(
|
|
3344
|
-
const
|
|
3345
|
-
if (
|
|
3346
|
-
return
|
|
3347
|
-
if (
|
|
3348
|
-
return t * parseFloat(
|
|
3349
|
-
if (
|
|
3374
|
+
function Ot(i, f = window.innerWidth) {
|
|
3375
|
+
if (typeof i == "number")
|
|
3376
|
+
return i;
|
|
3377
|
+
if (i.endsWith("px"))
|
|
3378
|
+
return parseFloat(i);
|
|
3379
|
+
const r = window.innerHeight, t = window.innerWidth;
|
|
3380
|
+
if (i.endsWith("vh"))
|
|
3381
|
+
return r * parseFloat(i) / 100;
|
|
3382
|
+
if (i.endsWith("vw"))
|
|
3383
|
+
return t * parseFloat(i) / 100;
|
|
3384
|
+
if (i.endsWith("%")) {
|
|
3350
3385
|
if (typeof f != "number")
|
|
3351
3386
|
throw new Error("Reference size is required to convert % to px");
|
|
3352
|
-
return f * parseFloat(
|
|
3387
|
+
return f * parseFloat(i) / 100;
|
|
3353
3388
|
}
|
|
3354
|
-
if (
|
|
3355
|
-
let
|
|
3356
|
-
if (/[0-9+\-*/().\s]+$/.test(
|
|
3357
|
-
return new Function("return " +
|
|
3389
|
+
if (i.startsWith("calc(") && i.endsWith(")")) {
|
|
3390
|
+
let d = function(S) {
|
|
3391
|
+
if (/[0-9+\-*/().\s]+$/.test(S))
|
|
3392
|
+
return new Function("return " + S)();
|
|
3358
3393
|
throw new Error("Invalid calc expression");
|
|
3359
3394
|
};
|
|
3360
|
-
const e =
|
|
3361
|
-
return
|
|
3395
|
+
const e = i.slice(5, -1).trim();
|
|
3396
|
+
return d(e.replace(/([0-9.]+)([a-z%]+)/g, (S, F, _) => Ot(F + _, f)));
|
|
3362
3397
|
}
|
|
3363
|
-
throw new Error("Unsupported unit in value: " +
|
|
3398
|
+
throw new Error("Unsupported unit in value: " + i);
|
|
3364
3399
|
}
|
|
3365
|
-
const
|
|
3366
|
-
const f = {},
|
|
3367
|
-
t[
|
|
3400
|
+
const qe = (...i) => {
|
|
3401
|
+
const f = {}, r = (t, e) => (Object.keys(e).forEach((d) => {
|
|
3402
|
+
t[d] = typeof e[d] == "object" && !Array.isArray(e[d]) ? r(t[d] || {}, e[d]) : e[d];
|
|
3368
3403
|
}), t);
|
|
3369
|
-
return
|
|
3404
|
+
return i.forEach((t = {}) => r(f, t)), f;
|
|
3370
3405
|
};
|
|
3371
|
-
function Ve(
|
|
3372
|
-
const
|
|
3373
|
-
for (const t in
|
|
3374
|
-
|
|
3375
|
-
return
|
|
3406
|
+
function Ve(i, f = (r, t) => f(r, t)) {
|
|
3407
|
+
const r = {};
|
|
3408
|
+
for (const t in i)
|
|
3409
|
+
i.hasOwnProperty(t) && f(t, i[t]) && (r[t] = i[t]);
|
|
3410
|
+
return r;
|
|
3376
3411
|
}
|
|
3377
|
-
function
|
|
3378
|
-
for (const
|
|
3379
|
-
if (
|
|
3380
|
-
return
|
|
3381
|
-
if (
|
|
3382
|
-
const E =
|
|
3412
|
+
function ma(i, f, r = "value", t = "label", e = "children") {
|
|
3413
|
+
for (const d of i) {
|
|
3414
|
+
if (d[r] === f)
|
|
3415
|
+
return d[t];
|
|
3416
|
+
if (d[e] && d[e].length > 0) {
|
|
3417
|
+
const E = ma(d[e], f, r, t, e);
|
|
3383
3418
|
if (E)
|
|
3384
3419
|
return E;
|
|
3385
3420
|
}
|
|
3386
3421
|
}
|
|
3387
3422
|
return null;
|
|
3388
3423
|
}
|
|
3389
|
-
function Et(
|
|
3390
|
-
if (!
|
|
3391
|
-
const f = ["角", "分"],
|
|
3424
|
+
function Et(i) {
|
|
3425
|
+
if (!i || isNaN(i)) return "零";
|
|
3426
|
+
const f = ["角", "分"], r = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], t = [
|
|
3392
3427
|
["元", "万", "亿"],
|
|
3393
3428
|
["", "拾", "佰", "仟"]
|
|
3394
|
-
], e =
|
|
3395
|
-
|
|
3396
|
-
let
|
|
3429
|
+
], e = i < 0 ? "欠" : "";
|
|
3430
|
+
i = Math.abs(i);
|
|
3431
|
+
let d = "";
|
|
3397
3432
|
for (let E = 0; E < f.length; E++)
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
for (let E = 0; E < t[0].length &&
|
|
3401
|
-
let
|
|
3402
|
-
for (let
|
|
3403
|
-
|
|
3404
|
-
|
|
3433
|
+
d += (r[Math.floor(i * 10 * Math.pow(10, E)) % 10] + f[E]).replace(/零./, "");
|
|
3434
|
+
d = d || "整", i = Math.floor(i);
|
|
3435
|
+
for (let E = 0; E < t[0].length && i > 0; E++) {
|
|
3436
|
+
let S = "";
|
|
3437
|
+
for (let F = 0; F < t[1].length && i > 0; F++)
|
|
3438
|
+
S = r[i % 10] + t[1][F] + S, i = Math.floor(i / 10);
|
|
3439
|
+
d = S.replace(/(零.)*零$/, "").replace(/^$/, "零") + t[0][E] + d;
|
|
3405
3440
|
}
|
|
3406
|
-
return e +
|
|
3441
|
+
return e + d.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整");
|
|
3407
3442
|
}
|
|
3408
|
-
function
|
|
3409
|
-
if (typeof
|
|
3443
|
+
function pa(i) {
|
|
3444
|
+
if (typeof i != "number" || isNaN(i) || !isFinite(i))
|
|
3410
3445
|
return "0.00";
|
|
3411
|
-
const f =
|
|
3412
|
-
return `${
|
|
3446
|
+
const f = i.toFixed(2), [r, t] = f.split(".");
|
|
3447
|
+
return `${r.replace(/\B(?=(\d{3})+(?!\d))/g, ",")}.${t}`;
|
|
3413
3448
|
}
|
|
3414
|
-
const
|
|
3449
|
+
const ye = {
|
|
3415
3450
|
RADIO: "radio",
|
|
3416
3451
|
RADIOBUTTON: "radio-button",
|
|
3417
3452
|
CHECKBOX: "checkbox",
|
|
@@ -3441,19 +3476,19 @@ const he = {
|
|
|
3441
3476
|
TEL: "tel"
|
|
3442
3477
|
}, pt = () => {
|
|
3443
3478
|
et(() => {
|
|
3444
|
-
const
|
|
3445
|
-
if (!
|
|
3479
|
+
const i = document.querySelector(".el-dialog");
|
|
3480
|
+
if (!i) {
|
|
3446
3481
|
console.warn("未找到对话框元素");
|
|
3447
3482
|
return;
|
|
3448
3483
|
}
|
|
3449
|
-
if (
|
|
3484
|
+
if (i.querySelector(".dialog-resize-handle"))
|
|
3450
3485
|
return;
|
|
3451
|
-
const f =
|
|
3452
|
-
|
|
3486
|
+
const f = va();
|
|
3487
|
+
i.appendChild(f), ha(i), ya(i, f);
|
|
3453
3488
|
});
|
|
3454
|
-
},
|
|
3455
|
-
const
|
|
3456
|
-
return Object.assign(
|
|
3489
|
+
}, va = () => {
|
|
3490
|
+
const i = document.createElement("div");
|
|
3491
|
+
return Object.assign(i.style, {
|
|
3457
3492
|
position: "absolute",
|
|
3458
3493
|
right: "0",
|
|
3459
3494
|
bottom: "0",
|
|
@@ -3462,37 +3497,37 @@ const he = {
|
|
|
3462
3497
|
background: "transparent",
|
|
3463
3498
|
cursor: "nwse-resize",
|
|
3464
3499
|
zIndex: "999999999999"
|
|
3465
|
-
}),
|
|
3466
|
-
},
|
|
3467
|
-
Object.assign(
|
|
3500
|
+
}), i.className = "dialog-resize-handle", i;
|
|
3501
|
+
}, ha = (i) => {
|
|
3502
|
+
Object.assign(i.style, {
|
|
3468
3503
|
transition: "none",
|
|
3469
3504
|
minWidth: "300px",
|
|
3470
3505
|
minHeight: "200px",
|
|
3471
3506
|
resize: "none"
|
|
3472
3507
|
// 防止与原生resize冲突
|
|
3473
3508
|
});
|
|
3474
|
-
},
|
|
3475
|
-
let
|
|
3476
|
-
const
|
|
3477
|
-
w.preventDefault(),
|
|
3478
|
-
},
|
|
3479
|
-
if (!
|
|
3480
|
-
const H = Math.max(300,
|
|
3481
|
-
|
|
3482
|
-
},
|
|
3483
|
-
|
|
3509
|
+
}, ya = (i, f) => {
|
|
3510
|
+
let r = !1, t, e, d, E;
|
|
3511
|
+
const S = (w) => {
|
|
3512
|
+
w.preventDefault(), r = !0, t = w.clientX, e = w.clientY, d = parseInt(document.defaultView.getComputedStyle(i).width), E = parseInt(document.defaultView.getComputedStyle(i).height), document.addEventListener("mousemove", F), document.addEventListener("mouseup", _);
|
|
3513
|
+
}, F = (w) => {
|
|
3514
|
+
if (!r) return;
|
|
3515
|
+
const H = Math.max(300, d + w.clientX - t), ee = Math.max(200, E + w.clientY - e);
|
|
3516
|
+
i.style.width = `${H}px`, i.style.height = `${ee}px`;
|
|
3517
|
+
}, _ = () => {
|
|
3518
|
+
r = !1, document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", _);
|
|
3484
3519
|
};
|
|
3485
|
-
f.addEventListener("mousedown",
|
|
3520
|
+
f.addEventListener("mousedown", S);
|
|
3486
3521
|
};
|
|
3487
3522
|
export {
|
|
3488
|
-
|
|
3523
|
+
ye as CT,
|
|
3489
3524
|
pt as bindResize,
|
|
3490
3525
|
Ot as convertToPx,
|
|
3491
|
-
|
|
3526
|
+
_a as default,
|
|
3492
3527
|
Ve as filterObject,
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3528
|
+
ma as findTreeLabelByValue,
|
|
3529
|
+
pa as formatAmount,
|
|
3530
|
+
qe as mergeObjects,
|
|
3496
3531
|
Et as moneyToChinese,
|
|
3497
3532
|
wt as openModal
|
|
3498
3533
|
};
|