vue-2024-ui 0.0.80 → 0.0.81
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 +1017 -995
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _t, { ElForm as
|
|
2
|
-
import { mergeModels as Be, useModel as Ie, ref as
|
|
3
|
-
import { FullScreen as
|
|
1
|
+
import _t, { ElForm as We, ElButtonGroup as Ge, ElButton as _e, ElPopover as Ke, ElMessage as Te, ElMessageBox as vt, ElDialog as kt, ElDrawer as Ct } from "element-plus";
|
|
2
|
+
import { mergeModels as Be, useModel as Ie, ref as ye, nextTick as yt, onMounted as Ne, resolveComponent as L, openBlock as n, createElementBlock as q, unref as o, createBlock as S, mergeProps as F, withCtx as y, renderSlot as p, Fragment as P, renderList as Y, createTextVNode as we, toDisplayString as Ee, createSlots as ce, createVNode as Z, createCommentVNode as $e, normalizeProps as Qe, createElementVNode as J, useSlots as ht, inject as at, useAttrs as nt, onUnmounted as Dt, computed as Ye, normalizeStyle as Oe, withModifiers as ct, guardReactiveProps as ft, resolveDynamicComponent as Ae, Transition as Mt, withDirectives as Vt, vShow as Tt, h as qe, onBeforeUnmount as Ft, normalizeClass as gt, watchEffect as St, watch as qt, createApp as xt } from "vue";
|
|
3
|
+
import { FullScreen as Ot, Remove as At } from "@element-plus/icons-vue";
|
|
4
4
|
import bt from "sortablejs";
|
|
5
5
|
import { Dexie as Bt } from "dexie";
|
|
6
6
|
var It = {
|
|
@@ -189,55 +189,55 @@ var $t = { exports: {} };
|
|
|
189
189
|
(function(t, e) {
|
|
190
190
|
f.exports = e();
|
|
191
191
|
})(Yt, function() {
|
|
192
|
-
var t = 1e3, e = 6e4,
|
|
193
|
-
var $ = ["th", "st", "nd", "rd"], g =
|
|
194
|
-
return "[" +
|
|
195
|
-
} }, ne = function(
|
|
196
|
-
var _ = String(
|
|
197
|
-
return !_ || _.length >= $ ?
|
|
198
|
-
}, ie = { s: ne, z: function(
|
|
199
|
-
var $ = -
|
|
192
|
+
var t = 1e3, e = 6e4, a = 36e5, d = "millisecond", U = "second", T = "minute", x = "hour", E = "day", D = "week", z = "month", te = "quarter", R = "year", M = "date", b = "Invalid Date", w = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, re = /\[([^\]]+)]|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, K = { 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(A) {
|
|
193
|
+
var $ = ["th", "st", "nd", "rd"], g = A % 100;
|
|
194
|
+
return "[" + A + ($[(g - 20) % 10] || $[g] || $[0]) + "]";
|
|
195
|
+
} }, ne = function(A, $, g) {
|
|
196
|
+
var _ = String(A);
|
|
197
|
+
return !_ || _.length >= $ ? A : "" + Array($ + 1 - _.length).join(g) + A;
|
|
198
|
+
}, ie = { s: ne, z: function(A) {
|
|
199
|
+
var $ = -A.utcOffset(), g = Math.abs($), _ = Math.floor(g / 60), s = g % 60;
|
|
200
200
|
return ($ <= 0 ? "+" : "-") + ne(_, 2, "0") + ":" + ne(s, 2, "0");
|
|
201
|
-
}, m: function
|
|
202
|
-
if ($.date() < g.date()) return -
|
|
203
|
-
var _ = 12 * (g.year() - $.year()) + (g.month() - $.month()), s = $.clone().add(_,
|
|
204
|
-
return +(-(_ + (g - s) / (i ? s -
|
|
205
|
-
}, a: function(
|
|
206
|
-
return
|
|
207
|
-
}, p: function(
|
|
208
|
-
return { M:
|
|
209
|
-
}, u: function(
|
|
210
|
-
return
|
|
201
|
+
}, m: function A($, g) {
|
|
202
|
+
if ($.date() < g.date()) return -A(g, $);
|
|
203
|
+
var _ = 12 * (g.year() - $.year()) + (g.month() - $.month()), s = $.clone().add(_, z), i = g - s < 0, O = $.clone().add(_ + (i ? -1 : 1), z);
|
|
204
|
+
return +(-(_ + (g - s) / (i ? s - O : O - s)) || 0);
|
|
205
|
+
}, a: function(A) {
|
|
206
|
+
return A < 0 ? Math.ceil(A) || 0 : Math.floor(A);
|
|
207
|
+
}, p: function(A) {
|
|
208
|
+
return { M: z, y: R, w: D, d: E, D: M, h: x, m: T, s: U, ms: d, Q: te }[A] || String(A || "").toLowerCase().replace(/s$/, "");
|
|
209
|
+
}, u: function(A) {
|
|
210
|
+
return A === void 0;
|
|
211
211
|
} }, fe = "en", pe = {};
|
|
212
212
|
pe[fe] = K;
|
|
213
|
-
var m = "$isDayjsObject",
|
|
214
|
-
return
|
|
215
|
-
}, C = function
|
|
213
|
+
var m = "$isDayjsObject", V = function(A) {
|
|
214
|
+
return A instanceof ee || !(!A || !A[m]);
|
|
215
|
+
}, C = function A($, g, _) {
|
|
216
216
|
var s;
|
|
217
217
|
if (!$) return fe;
|
|
218
218
|
if (typeof $ == "string") {
|
|
219
219
|
var i = $.toLowerCase();
|
|
220
220
|
pe[i] && (s = i), g && (pe[i] = g, s = i);
|
|
221
|
-
var
|
|
222
|
-
if (!s &&
|
|
221
|
+
var O = $.split("-");
|
|
222
|
+
if (!s && O.length > 1) return A(O[0]);
|
|
223
223
|
} else {
|
|
224
224
|
var H = $.name;
|
|
225
225
|
pe[H] = $, s = H;
|
|
226
226
|
}
|
|
227
227
|
return !_ && s && (fe = s), s || !_ && fe;
|
|
228
|
-
},
|
|
229
|
-
if (
|
|
228
|
+
}, h = function(A, $) {
|
|
229
|
+
if (V(A)) return A.clone();
|
|
230
230
|
var g = typeof $ == "object" ? $ : {};
|
|
231
|
-
return g.date =
|
|
231
|
+
return g.date = A, g.args = arguments, new ee(g);
|
|
232
232
|
}, I = ie;
|
|
233
|
-
I.l = C, I.i =
|
|
234
|
-
return
|
|
233
|
+
I.l = C, I.i = V, I.w = function(A, $) {
|
|
234
|
+
return h(A, { locale: $.$L, utc: $.$u, x: $.$x, $offset: $.$offset });
|
|
235
235
|
};
|
|
236
236
|
var ee = function() {
|
|
237
|
-
function
|
|
237
|
+
function A(g) {
|
|
238
238
|
this.$L = C(g.locale, null, !0), this.parse(g), this.$x = this.$x || g.x || {}, this[m] = !0;
|
|
239
239
|
}
|
|
240
|
-
var $ =
|
|
240
|
+
var $ = A.prototype;
|
|
241
241
|
return $.parse = function(g) {
|
|
242
242
|
this.$d = function(_) {
|
|
243
243
|
var s = _.date, i = _.utc;
|
|
@@ -245,10 +245,10 @@ var $t = { exports: {} };
|
|
|
245
245
|
if (I.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
|
|
249
|
-
if (
|
|
250
|
-
var H =
|
|
251
|
-
return i ? new Date(Date.UTC(
|
|
248
|
+
var O = s.match(w);
|
|
249
|
+
if (O) {
|
|
250
|
+
var H = O[2] - 1 || 0, X = (O[7] || "0").substring(0, 3);
|
|
251
|
+
return i ? new Date(Date.UTC(O[1], H, O[3] || 1, O[4] || 0, O[5] || 0, O[6] || 0, X)) : new Date(O[1], H, O[3] || 1, O[4] || 0, O[5] || 0, O[6] || 0, X);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
return new Date(s);
|
|
@@ -261,12 +261,12 @@ var $t = { exports: {} };
|
|
|
261
261
|
}, $.isValid = function() {
|
|
262
262
|
return this.$d.toString() !== b;
|
|
263
263
|
}, $.isSame = function(g, _) {
|
|
264
|
-
var s =
|
|
264
|
+
var s = h(g);
|
|
265
265
|
return this.startOf(_) <= s && s <= this.endOf(_);
|
|
266
266
|
}, $.isAfter = function(g, _) {
|
|
267
|
-
return
|
|
267
|
+
return h(g) < this.startOf(_);
|
|
268
268
|
}, $.isBefore = function(g, _) {
|
|
269
|
-
return this.endOf(_) <
|
|
269
|
+
return this.endOf(_) < h(g);
|
|
270
270
|
}, $.$g = function(g, _, s) {
|
|
271
271
|
return I.u(g) ? this[_] : this.set(s, g);
|
|
272
272
|
}, $.unix = function() {
|
|
@@ -274,40 +274,40 @@ var $t = { exports: {} };
|
|
|
274
274
|
}, $.valueOf = function() {
|
|
275
275
|
return this.$d.getTime();
|
|
276
276
|
}, $.startOf = function(g, _) {
|
|
277
|
-
var s = this, i = !!I.u(_) || _,
|
|
278
|
-
var
|
|
279
|
-
return i ?
|
|
280
|
-
},
|
|
277
|
+
var s = this, i = !!I.u(_) || _, O = I.p(g), H = function(De, u) {
|
|
278
|
+
var N = I.w(s.$u ? Date.UTC(s.$y, u, De) : new Date(s.$y, u, De), s);
|
|
279
|
+
return i ? N : N.endOf(E);
|
|
280
|
+
}, X = function(De, u) {
|
|
281
281
|
return I.w(s.toDate()[De].apply(s.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(u)), s);
|
|
282
|
-
}, ue = this.$W, de = this.$M, he = this.$D,
|
|
283
|
-
switch (
|
|
284
|
-
case
|
|
282
|
+
}, ue = this.$W, de = this.$M, he = this.$D, ve = "set" + (this.$u ? "UTC" : "");
|
|
283
|
+
switch (O) {
|
|
284
|
+
case R:
|
|
285
285
|
return i ? H(1, 0) : H(31, 11);
|
|
286
|
-
case
|
|
286
|
+
case z:
|
|
287
287
|
return i ? H(1, de) : H(0, de + 1);
|
|
288
288
|
case D:
|
|
289
|
-
var Ce = this.$locale().weekStart || 0,
|
|
290
|
-
return H(i ? he -
|
|
289
|
+
var Ce = this.$locale().weekStart || 0, Fe = (ue < Ce ? ue + 7 : ue) - Ce;
|
|
290
|
+
return H(i ? he - Fe : he + (6 - Fe), de);
|
|
291
291
|
case E:
|
|
292
|
-
case
|
|
293
|
-
return
|
|
292
|
+
case M:
|
|
293
|
+
return X(ve + "Hours", 0);
|
|
294
|
+
case x:
|
|
295
|
+
return X(ve + "Minutes", 1);
|
|
294
296
|
case T:
|
|
295
|
-
return
|
|
296
|
-
case
|
|
297
|
-
return
|
|
298
|
-
case Y:
|
|
299
|
-
return J($e + "Milliseconds", 3);
|
|
297
|
+
return X(ve + "Seconds", 2);
|
|
298
|
+
case U:
|
|
299
|
+
return X(ve + "Milliseconds", 3);
|
|
300
300
|
default:
|
|
301
301
|
return this.clone();
|
|
302
302
|
}
|
|
303
303
|
}, $.endOf = function(g) {
|
|
304
304
|
return this.startOf(g, !1);
|
|
305
305
|
}, $.$set = function(g, _) {
|
|
306
|
-
var s, i = I.p(g),
|
|
307
|
-
if (i ===
|
|
308
|
-
var ue = this.clone().set(
|
|
309
|
-
ue.$d[H](
|
|
310
|
-
} else H && this.$d[H](
|
|
306
|
+
var s, i = I.p(g), O = "set" + (this.$u ? "UTC" : ""), H = (s = {}, s[E] = O + "Date", s[M] = O + "Date", s[z] = O + "Month", s[R] = O + "FullYear", s[x] = O + "Hours", s[T] = O + "Minutes", s[U] = O + "Seconds", s[d] = O + "Milliseconds", s)[i], X = i === E ? this.$D + (_ - this.$W) : _;
|
|
307
|
+
if (i === z || i === R) {
|
|
308
|
+
var ue = this.clone().set(M, 1);
|
|
309
|
+
ue.$d[H](X), ue.init(), this.$d = ue.set(M, Math.min(this.$D, ue.daysInMonth())).$d;
|
|
310
|
+
} else H && this.$d[H](X);
|
|
311
311
|
return this.init(), this;
|
|
312
312
|
}, $.set = function(g, _) {
|
|
313
313
|
return this.clone().$set(g, _);
|
|
@@ -316,31 +316,31 @@ var $t = { exports: {} };
|
|
|
316
316
|
}, $.add = function(g, _) {
|
|
317
317
|
var s, i = this;
|
|
318
318
|
g = Number(g);
|
|
319
|
-
var
|
|
320
|
-
var he =
|
|
319
|
+
var O = I.p(_), H = function(de) {
|
|
320
|
+
var he = h(i);
|
|
321
321
|
return I.w(he.date(he.date() + Math.round(de * g)), i);
|
|
322
322
|
};
|
|
323
|
-
if (
|
|
324
|
-
if (
|
|
325
|
-
if (
|
|
326
|
-
if (
|
|
327
|
-
var
|
|
323
|
+
if (O === z) return this.set(z, this.$M + g);
|
|
324
|
+
if (O === R) return this.set(R, this.$y + g);
|
|
325
|
+
if (O === E) return H(1);
|
|
326
|
+
if (O === D) return H(7);
|
|
327
|
+
var X = (s = {}, s[T] = e, s[x] = a, s[U] = t, s)[O] || 1, ue = this.$d.getTime() + g * X;
|
|
328
328
|
return I.w(ue, this);
|
|
329
329
|
}, $.subtract = function(g, _) {
|
|
330
330
|
return this.add(-1 * g, _);
|
|
331
331
|
}, $.format = function(g) {
|
|
332
332
|
var _ = this, s = this.$locale();
|
|
333
333
|
if (!this.isValid()) return s.invalidDate || b;
|
|
334
|
-
var i = g || "YYYY-MM-DDTHH:mm:ssZ",
|
|
335
|
-
return u && (u[
|
|
336
|
-
},
|
|
334
|
+
var i = g || "YYYY-MM-DDTHH:mm:ssZ", O = I.z(this), H = this.$H, X = this.$m, ue = this.$M, de = s.weekdays, he = s.months, ve = s.meridiem, Ce = function(u, N, se, Me) {
|
|
335
|
+
return u && (u[N] || u(_, i)) || se[N].slice(0, Me);
|
|
336
|
+
}, Fe = function(u) {
|
|
337
337
|
return I.s(H % 12 || 12, u, "0");
|
|
338
|
-
}, De =
|
|
339
|
-
var
|
|
340
|
-
return se ?
|
|
338
|
+
}, De = ve || function(u, N, se) {
|
|
339
|
+
var Me = u < 12 ? "AM" : "PM";
|
|
340
|
+
return se ? Me.toLowerCase() : Me;
|
|
341
341
|
};
|
|
342
|
-
return i.replace(
|
|
343
|
-
return
|
|
342
|
+
return i.replace(re, function(u, N) {
|
|
343
|
+
return N || function(se) {
|
|
344
344
|
switch (se) {
|
|
345
345
|
case "YY":
|
|
346
346
|
return String(_.$y).slice(-2);
|
|
@@ -371,17 +371,17 @@ var $t = { exports: {} };
|
|
|
371
371
|
case "HH":
|
|
372
372
|
return I.s(H, 2, "0");
|
|
373
373
|
case "h":
|
|
374
|
-
return
|
|
374
|
+
return Fe(1);
|
|
375
375
|
case "hh":
|
|
376
|
-
return
|
|
376
|
+
return Fe(2);
|
|
377
377
|
case "a":
|
|
378
|
-
return De(H,
|
|
378
|
+
return De(H, X, !0);
|
|
379
379
|
case "A":
|
|
380
|
-
return De(H,
|
|
380
|
+
return De(H, X, !1);
|
|
381
381
|
case "m":
|
|
382
|
-
return String(
|
|
382
|
+
return String(X);
|
|
383
383
|
case "mm":
|
|
384
|
-
return I.s(
|
|
384
|
+
return I.s(X, 2, "0");
|
|
385
385
|
case "s":
|
|
386
386
|
return String(_.$s);
|
|
387
387
|
case "ss":
|
|
@@ -389,22 +389,22 @@ var $t = { exports: {} };
|
|
|
389
389
|
case "SSS":
|
|
390
390
|
return I.s(_.$ms, 3, "0");
|
|
391
391
|
case "Z":
|
|
392
|
-
return
|
|
392
|
+
return O;
|
|
393
393
|
}
|
|
394
394
|
return null;
|
|
395
|
-
}(u) ||
|
|
395
|
+
}(u) || O.replace(":", "");
|
|
396
396
|
});
|
|
397
397
|
}, $.utcOffset = function() {
|
|
398
398
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
399
399
|
}, $.diff = function(g, _, s) {
|
|
400
|
-
var i,
|
|
401
|
-
return I.m(
|
|
400
|
+
var i, O = this, H = I.p(_), X = h(g), ue = (X.utcOffset() - this.utcOffset()) * e, de = this - X, he = function() {
|
|
401
|
+
return I.m(O, X);
|
|
402
402
|
};
|
|
403
403
|
switch (H) {
|
|
404
|
-
case
|
|
404
|
+
case R:
|
|
405
405
|
i = he() / 12;
|
|
406
406
|
break;
|
|
407
|
-
case
|
|
407
|
+
case z:
|
|
408
408
|
i = he();
|
|
409
409
|
break;
|
|
410
410
|
case te:
|
|
@@ -416,13 +416,13 @@ var $t = { exports: {} };
|
|
|
416
416
|
case E:
|
|
417
417
|
i = (de - ue) / 864e5;
|
|
418
418
|
break;
|
|
419
|
-
case
|
|
420
|
-
i = de /
|
|
419
|
+
case x:
|
|
420
|
+
i = de / a;
|
|
421
421
|
break;
|
|
422
|
-
case
|
|
422
|
+
case T:
|
|
423
423
|
i = de / e;
|
|
424
424
|
break;
|
|
425
|
-
case
|
|
425
|
+
case U:
|
|
426
426
|
i = de / t;
|
|
427
427
|
break;
|
|
428
428
|
default:
|
|
@@ -430,7 +430,7 @@ var $t = { exports: {} };
|
|
|
430
430
|
}
|
|
431
431
|
return s ? i : I.a(i);
|
|
432
432
|
}, $.daysInMonth = function() {
|
|
433
|
-
return this.endOf(
|
|
433
|
+
return this.endOf(z).$D;
|
|
434
434
|
}, $.$locale = function() {
|
|
435
435
|
return pe[this.$L];
|
|
436
436
|
}, $.locale = function(g, _) {
|
|
@@ -447,27 +447,27 @@ var $t = { exports: {} };
|
|
|
447
447
|
return this.$d.toISOString();
|
|
448
448
|
}, $.toString = function() {
|
|
449
449
|
return this.$d.toUTCString();
|
|
450
|
-
},
|
|
451
|
-
}(),
|
|
452
|
-
return
|
|
453
|
-
|
|
454
|
-
return this.$g($,
|
|
450
|
+
}, A;
|
|
451
|
+
}(), ae = ee.prototype;
|
|
452
|
+
return h.prototype = ae, [["$ms", d], ["$s", U], ["$m", T], ["$H", x], ["$W", E], ["$M", z], ["$y", R], ["$D", M]].forEach(function(A) {
|
|
453
|
+
ae[A[1]] = function($) {
|
|
454
|
+
return this.$g($, A[0], A[1]);
|
|
455
455
|
};
|
|
456
|
-
}),
|
|
457
|
-
return
|
|
458
|
-
},
|
|
459
|
-
return
|
|
460
|
-
},
|
|
456
|
+
}), h.extend = function(A, $) {
|
|
457
|
+
return A.$i || (A($, ee, h), A.$i = !0), h;
|
|
458
|
+
}, h.locale = C, h.isDayjs = V, h.unix = function(A) {
|
|
459
|
+
return h(1e3 * A);
|
|
460
|
+
}, h.en = pe[fe], h.Ls = pe, h.p = {}, h;
|
|
461
461
|
});
|
|
462
462
|
})($t);
|
|
463
463
|
var jt = $t.exports;
|
|
464
|
-
const et = /* @__PURE__ */ Ut(jt),
|
|
464
|
+
const et = /* @__PURE__ */ Ut(jt), Lt = {
|
|
465
465
|
style: { display: "flex", width: "100%" },
|
|
466
466
|
class: "g-ctrl-container"
|
|
467
|
-
},
|
|
467
|
+
}, Rt = {
|
|
468
468
|
key: 19,
|
|
469
469
|
style: { position: "relative" }
|
|
470
|
-
}, Ht = ["title"], Nt = { key: 20 }, Pt = { key: 21 },
|
|
470
|
+
}, Ht = ["title"], Nt = { key: 20 }, Pt = { key: 21 }, zt = ["innerHTML"], Wt = ["innerHTML"], Xe = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
471
471
|
__name: "g-ctrl",
|
|
472
472
|
props: /* @__PURE__ */ Be(["t", "ctrlKey", "item", "model", "ctrlType", "formInfo"], {
|
|
473
473
|
modelValue: { required: !0 },
|
|
@@ -475,7 +475,7 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
475
475
|
}),
|
|
476
476
|
emits: ["update:modelValue"],
|
|
477
477
|
setup(f) {
|
|
478
|
-
const c = Ie(f, "modelValue"), t = f, e = t.item || {},
|
|
478
|
+
const c = Ie(f, "modelValue"), t = f, e = t.item || {}, a = t.ctrlKey, d = t.ctrlType, U = t.model, T = ye([]), x = ye([]), E = () => Object.keys(ht()).filter((b) => b.startsWith(`${t.t}-${a}-`)).map((b) => b.replace(`${t.t}-${a}-`, "")), D = (b) => [
|
|
479
479
|
"year",
|
|
480
480
|
"years",
|
|
481
481
|
"month",
|
|
@@ -488,7 +488,7 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
488
488
|
"daterange",
|
|
489
489
|
"monthrange",
|
|
490
490
|
"yearrange"
|
|
491
|
-
].includes(b),
|
|
491
|
+
].includes(b), z = (b) => ({
|
|
492
492
|
year: "YYYY",
|
|
493
493
|
years: "YYYY",
|
|
494
494
|
month: "YYYY-MM",
|
|
@@ -502,105 +502,105 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
502
502
|
daterange: "YYYY-MM-DD",
|
|
503
503
|
monthrange: "YYYY-MM",
|
|
504
504
|
yearrange: "YYYY"
|
|
505
|
-
})[b] || "YYYY-MM-DD", te =
|
|
505
|
+
})[b] || "YYYY-MM-DD", te = ye({
|
|
506
506
|
filterable: !0,
|
|
507
507
|
remote: !!(e && e["remote-method"]),
|
|
508
508
|
...e
|
|
509
|
-
}),
|
|
509
|
+
}), R = ye((b) => {
|
|
510
510
|
e["remote-method"](b, (w) => {
|
|
511
|
-
|
|
512
|
-
|
|
511
|
+
yt(() => {
|
|
512
|
+
x.value = w;
|
|
513
513
|
});
|
|
514
514
|
});
|
|
515
|
-
}),
|
|
515
|
+
}), M = async (b = "options") => {
|
|
516
516
|
try {
|
|
517
517
|
const w = await (e == null ? void 0 : e.getDicts(t.formInfo));
|
|
518
518
|
if (typeof w == "string")
|
|
519
|
-
|
|
519
|
+
x.value = [{ label: w, value: c.value }];
|
|
520
520
|
else {
|
|
521
|
-
const
|
|
521
|
+
const re = w == null ? void 0 : w.map((K, ne) => ({
|
|
522
522
|
...K,
|
|
523
523
|
value: K.value ?? K.label ?? ne,
|
|
524
524
|
label: K.label || "未知选项"
|
|
525
525
|
}));
|
|
526
|
-
|
|
526
|
+
x.value = re || [];
|
|
527
527
|
}
|
|
528
528
|
} catch (w) {
|
|
529
529
|
throw console.error("获取选项失败:", w), w;
|
|
530
530
|
}
|
|
531
531
|
};
|
|
532
532
|
return Ne(async () => {
|
|
533
|
-
var
|
|
534
|
-
e && e["remote-method"] && (te.value["remote-method"] =
|
|
535
|
-
const b = (ne, ie = "options", fe =
|
|
536
|
-
typeof e.getDicts == "function" &&
|
|
533
|
+
var re, K;
|
|
534
|
+
e && e["remote-method"] && (te.value["remote-method"] = R), (K = (re = U[a]) == null ? void 0 : re.options) != null && K.length && (x.value = U[a].options);
|
|
535
|
+
const b = (ne, ie = "options", fe = U[a]) => {
|
|
536
|
+
typeof e.getDicts == "function" && M(ie).catch((pe) => {
|
|
537
537
|
console.error(`Failed to load ${ie} for ${ne}:`, pe);
|
|
538
538
|
});
|
|
539
539
|
};
|
|
540
|
-
["radio", "radio-button", "checkbox-group", "checkbox-group-button", "select", "cascader"].includes(d) && b(d), d ===
|
|
540
|
+
["radio", "radio-button", "checkbox-group", "checkbox-group-button", "select", "cascader"].includes(d) && b(d), d === be.TREESELECT && await (async () => {
|
|
541
541
|
try {
|
|
542
|
-
typeof e.getDicts == "function" ?
|
|
542
|
+
typeof e.getDicts == "function" ? T.value = await e.getDicts(t.formInfo) : T.value = x.value;
|
|
543
543
|
} catch (ie) {
|
|
544
544
|
console.error("Failed to load data for tree-select:", ie);
|
|
545
545
|
}
|
|
546
546
|
})();
|
|
547
547
|
}), (b, w) => {
|
|
548
|
-
var Ce,
|
|
549
|
-
const
|
|
550
|
-
return n(), q("div",
|
|
551
|
-
o(d) == o(
|
|
548
|
+
var Ce, Fe, De;
|
|
549
|
+
const re = L("el-radio"), K = L("el-radio-group"), ne = L("el-radio-button"), ie = L("el-checkbox"), fe = L("el-checkbox-group"), pe = L("el-checkbox-button"), m = L("g-select-option"), V = L("el-option"), C = L("el-select"), h = L("el-tree-select"), I = L("el-time-picker"), ee = L("el-time-select"), ae = L("el-date-picker"), A = L("el-color-picker"), $ = L("el-rate"), g = L("el-slider"), _ = L("el-switch"), s = L("el-transfer"), i = L("el-cascader"), O = L("el-button"), H = L("el-upload"), X = L("el-autocomplete"), ue = L("el-input-number"), de = L("el-input"), he = L("el-link"), ve = L("el-tag");
|
|
550
|
+
return n(), q("div", Lt, [
|
|
551
|
+
o(d) == o(be).RADIO ? (n(), S(K, F({
|
|
552
552
|
key: 0,
|
|
553
553
|
modelValue: c.value,
|
|
554
554
|
"onUpdate:modelValue": w[0] || (w[0] = (u) => c.value = u)
|
|
555
555
|
}, o(e)), {
|
|
556
|
-
default:
|
|
557
|
-
p(b.$slots, `${t.t}-${o(
|
|
558
|
-
(n(!0), q(
|
|
559
|
-
default:
|
|
560
|
-
p(b.$slots, `${t.t}-${o(
|
|
556
|
+
default: y(() => [
|
|
557
|
+
p(b.$slots, `${t.t}-${o(a)}`, { data: o(e) }, () => [
|
|
558
|
+
(n(!0), q(P, null, Y(x.value, (u) => (n(), S(re, F({ ref_for: !0 }, u), {
|
|
559
|
+
default: y(() => [
|
|
560
|
+
p(b.$slots, `${t.t}-${o(a)}-options`, { option: u })
|
|
561
561
|
]),
|
|
562
562
|
_: 2
|
|
563
563
|
}, 1040))), 256))
|
|
564
564
|
])
|
|
565
565
|
]),
|
|
566
566
|
_: 3
|
|
567
|
-
}, 16, ["modelValue"])) : o(d) == o(
|
|
567
|
+
}, 16, ["modelValue"])) : o(d) == o(be).RADIOBUTTON ? (n(), S(K, F({
|
|
568
568
|
key: 1,
|
|
569
569
|
modelValue: c.value,
|
|
570
570
|
"onUpdate:modelValue": w[1] || (w[1] = (u) => c.value = u)
|
|
571
571
|
}, o(e)), {
|
|
572
|
-
default:
|
|
573
|
-
p(b.$slots, `${t.t}-${o(
|
|
574
|
-
(n(!0), q(
|
|
575
|
-
default:
|
|
576
|
-
p(b.$slots, `${t.t}-${o(
|
|
572
|
+
default: y(() => [
|
|
573
|
+
p(b.$slots, `${t.t}-${o(a)}`, { data: o(e) }, () => [
|
|
574
|
+
(n(!0), q(P, null, Y(x.value, (u) => (n(), S(ne, F({ ref_for: !0 }, u), {
|
|
575
|
+
default: y(() => [
|
|
576
|
+
p(b.$slots, `${t.t}-${o(a)}-options`, { option: u })
|
|
577
577
|
]),
|
|
578
578
|
_: 2
|
|
579
579
|
}, 1040))), 256))
|
|
580
580
|
])
|
|
581
581
|
]),
|
|
582
582
|
_: 3
|
|
583
|
-
}, 16, ["modelValue"])) : o(d) == o(
|
|
583
|
+
}, 16, ["modelValue"])) : o(d) == o(be).CHECKBOX ? (n(), S(ie, F({
|
|
584
584
|
key: 2,
|
|
585
585
|
modelValue: c.value,
|
|
586
586
|
"onUpdate:modelValue": w[2] || (w[2] = (u) => c.value = u)
|
|
587
587
|
}, o(e)), {
|
|
588
|
-
default:
|
|
589
|
-
p(b.$slots, `${t.t}-${o(
|
|
588
|
+
default: y(() => [
|
|
589
|
+
p(b.$slots, `${t.t}-${o(a)}`, { data: o(e) }, () => [
|
|
590
590
|
w[20] || (w[20] = we(Ee(" ")))
|
|
591
591
|
])
|
|
592
592
|
]),
|
|
593
593
|
_: 3
|
|
594
|
-
}, 16, ["modelValue"])) : o(d) == o(
|
|
594
|
+
}, 16, ["modelValue"])) : o(d) == o(be).CHECKBOXGROUP ? (n(), S(fe, F({
|
|
595
595
|
key: 3,
|
|
596
596
|
modelValue: c.value,
|
|
597
597
|
"onUpdate:modelValue": w[3] || (w[3] = (u) => c.value = u)
|
|
598
598
|
}, o(e)), {
|
|
599
|
-
default:
|
|
600
|
-
p(b.$slots, `${t.t}-${o(
|
|
601
|
-
(n(!0), q(
|
|
602
|
-
default:
|
|
603
|
-
p(b.$slots, `${t.t}-${o(
|
|
599
|
+
default: y(() => [
|
|
600
|
+
p(b.$slots, `${t.t}-${o(a)}`, { data: o(e) }, () => [
|
|
601
|
+
(n(!0), q(P, null, Y(x.value, (u) => (n(), S(ie, F({ ref_for: !0 }, u), {
|
|
602
|
+
default: y(() => [
|
|
603
|
+
p(b.$slots, `${t.t}-${o(a)}-options`, { option: u }, () => [
|
|
604
604
|
we(Ee(u.label), 1)
|
|
605
605
|
])
|
|
606
606
|
]),
|
|
@@ -609,103 +609,103 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
609
609
|
])
|
|
610
610
|
]),
|
|
611
611
|
_: 3
|
|
612
|
-
}, 16, ["modelValue"])) : o(d) == o(
|
|
612
|
+
}, 16, ["modelValue"])) : o(d) == o(be).CHECKBOXGROUPBUTTON ? (n(), S(fe, F({
|
|
613
613
|
key: 4,
|
|
614
614
|
modelValue: c.value,
|
|
615
615
|
"onUpdate:modelValue": w[4] || (w[4] = (u) => c.value = u)
|
|
616
616
|
}, o(e)), {
|
|
617
|
-
default:
|
|
618
|
-
p(b.$slots, `${t.t}-${o(
|
|
619
|
-
(n(!0), q(
|
|
620
|
-
default:
|
|
621
|
-
p(b.$slots, `${t.t}-${o(
|
|
617
|
+
default: y(() => [
|
|
618
|
+
p(b.$slots, `${t.t}-${o(a)}`, { data: o(e) }, () => [
|
|
619
|
+
(n(!0), q(P, null, Y(x.value, (u) => (n(), S(pe, F({ ref_for: !0 }, u), {
|
|
620
|
+
default: y(() => [
|
|
621
|
+
p(b.$slots, `${t.t}-${o(a)}-options`, { option: u })
|
|
622
622
|
]),
|
|
623
623
|
_: 2
|
|
624
624
|
}, 1040))), 256))
|
|
625
625
|
])
|
|
626
626
|
]),
|
|
627
627
|
_: 3
|
|
628
|
-
}, 16, ["modelValue"])) : o(d) === o(
|
|
628
|
+
}, 16, ["modelValue"])) : o(d) === o(be).SELECT ? (n(), S(C, F({
|
|
629
629
|
key: 5,
|
|
630
630
|
modelValue: c.value,
|
|
631
631
|
"onUpdate:modelValue": w[5] || (w[5] = (u) => c.value = u),
|
|
632
|
-
placeholder: o(
|
|
632
|
+
placeholder: o(U)[o(a)].label
|
|
633
633
|
}, te.value), ce({
|
|
634
|
-
default:
|
|
635
|
-
p(b.$slots, `${t.t}-${o(
|
|
636
|
-
(n(!0), q(
|
|
634
|
+
default: y(() => [
|
|
635
|
+
p(b.$slots, `${t.t}-${o(a)}`, { options: x.value }, () => [
|
|
636
|
+
(n(!0), q(P, null, Y(x.value, (u) => (n(), q(P, {
|
|
637
637
|
key: u.value
|
|
638
638
|
}, [
|
|
639
|
-
|
|
640
|
-
onClick: (
|
|
639
|
+
Z(V, F({ ref_for: !0 }, o(ke)(u, (N) => N != "children"), {
|
|
640
|
+
onClick: (N) => te.value.change && te.value.change(u)
|
|
641
641
|
}), {
|
|
642
|
-
default:
|
|
643
|
-
var
|
|
642
|
+
default: y(() => {
|
|
643
|
+
var N;
|
|
644
644
|
return [
|
|
645
|
-
(
|
|
645
|
+
(N = o(e)) != null && N.columns ? p(b.$slots, `${t.t}-${o(a)}-options`, {
|
|
646
646
|
key: 0,
|
|
647
647
|
option: u
|
|
648
648
|
}, () => {
|
|
649
649
|
var se;
|
|
650
650
|
return [
|
|
651
|
-
|
|
651
|
+
Z(m, {
|
|
652
652
|
columns: (se = o(e)) == null ? void 0 : se.columns,
|
|
653
653
|
data: u,
|
|
654
654
|
t: t.t
|
|
655
655
|
}, ce({ _: 2 }, [
|
|
656
|
-
|
|
656
|
+
Y(b.$slots, (Me, l) => ({
|
|
657
657
|
name: l,
|
|
658
|
-
fn:
|
|
658
|
+
fn: y((r) => [
|
|
659
659
|
p(b.$slots, l, {
|
|
660
660
|
option: u,
|
|
661
|
-
data:
|
|
661
|
+
data: r
|
|
662
662
|
})
|
|
663
663
|
])
|
|
664
664
|
}))
|
|
665
665
|
]), 1032, ["columns", "data", "t"])
|
|
666
666
|
];
|
|
667
|
-
}) :
|
|
667
|
+
}) : $e("", !0)
|
|
668
668
|
];
|
|
669
669
|
}),
|
|
670
670
|
_: 2
|
|
671
671
|
}, 1040, ["onClick"]),
|
|
672
|
-
u.children && u.children.length ? (n(!0), q(
|
|
672
|
+
u.children && u.children.length ? (n(!0), q(P, { key: 0 }, Y(u.children, (N) => (n(), S(V, F({
|
|
673
673
|
style: { "margin-left": "20px" },
|
|
674
|
-
key:
|
|
674
|
+
key: N.value,
|
|
675
675
|
ref_for: !0
|
|
676
|
-
}, o(ke)(
|
|
677
|
-
onClick: (se) => te.value.change && te.value.change(
|
|
676
|
+
}, o(ke)(N, (se) => se != "children"), {
|
|
677
|
+
onClick: (se) => te.value.change && te.value.change(N)
|
|
678
678
|
}), {
|
|
679
|
-
default:
|
|
679
|
+
default: y(() => {
|
|
680
680
|
var se;
|
|
681
681
|
return [
|
|
682
|
-
(se = o(e)) != null && se.columns ? p(b.$slots, `${t.t}-${o(
|
|
682
|
+
(se = o(e)) != null && se.columns ? p(b.$slots, `${t.t}-${o(a)}-options`, {
|
|
683
683
|
key: 0,
|
|
684
|
-
option:
|
|
684
|
+
option: N
|
|
685
685
|
}, () => {
|
|
686
|
-
var
|
|
686
|
+
var Me;
|
|
687
687
|
return [
|
|
688
|
-
|
|
689
|
-
columns: (
|
|
690
|
-
data:
|
|
688
|
+
Z(m, {
|
|
689
|
+
columns: (Me = o(e)) == null ? void 0 : Me.columns,
|
|
690
|
+
data: N,
|
|
691
691
|
t: t.t
|
|
692
692
|
}, ce({ _: 2 }, [
|
|
693
|
-
|
|
694
|
-
name:
|
|
695
|
-
fn:
|
|
696
|
-
p(b.$slots,
|
|
697
|
-
option:
|
|
693
|
+
Y(b.$slots, (l, r) => ({
|
|
694
|
+
name: r,
|
|
695
|
+
fn: y((v) => [
|
|
696
|
+
p(b.$slots, r, {
|
|
697
|
+
option: N,
|
|
698
698
|
data: v
|
|
699
699
|
})
|
|
700
700
|
])
|
|
701
701
|
}))
|
|
702
702
|
]), 1032, ["columns", "data", "t"])
|
|
703
703
|
];
|
|
704
|
-
}) :
|
|
704
|
+
}) : $e("", !0)
|
|
705
705
|
];
|
|
706
706
|
}),
|
|
707
707
|
_: 2
|
|
708
|
-
}, 1040, ["onClick"]))), 128)) :
|
|
708
|
+
}, 1040, ["onClick"]))), 128)) : $e("", !0)
|
|
709
709
|
], 64))), 128))
|
|
710
710
|
])
|
|
711
711
|
]),
|
|
@@ -713,18 +713,18 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
713
713
|
}, [
|
|
714
714
|
(Ce = o(e)) != null && Ce.columns ? {
|
|
715
715
|
name: "header",
|
|
716
|
-
fn:
|
|
716
|
+
fn: y(() => {
|
|
717
717
|
var u;
|
|
718
718
|
return [
|
|
719
|
-
|
|
719
|
+
Z(m, {
|
|
720
720
|
columns: (u = o(e)) == null ? void 0 : u.columns,
|
|
721
721
|
title: !0,
|
|
722
722
|
t: t.t
|
|
723
723
|
}, ce({ _: 2 }, [
|
|
724
|
-
|
|
724
|
+
Y(b.$slots, (N, se) => ({
|
|
725
725
|
name: se,
|
|
726
|
-
fn:
|
|
727
|
-
p(b.$slots, se, { data:
|
|
726
|
+
fn: y((Me) => [
|
|
727
|
+
p(b.$slots, se, { data: Me })
|
|
728
728
|
])
|
|
729
729
|
}))
|
|
730
730
|
]), 1032, ["columns", "t"])
|
|
@@ -732,102 +732,102 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
732
732
|
}),
|
|
733
733
|
key: "0"
|
|
734
734
|
} : void 0,
|
|
735
|
-
|
|
735
|
+
Y(E(), (u) => ({
|
|
736
736
|
name: u,
|
|
737
|
-
fn:
|
|
738
|
-
p(b.$slots, `${t.t}-${o(
|
|
737
|
+
fn: y((N) => [
|
|
738
|
+
p(b.$slots, `${t.t}-${o(a)}-${u}`, { data: N })
|
|
739
739
|
])
|
|
740
740
|
}))
|
|
741
|
-
]), 1040, ["modelValue", "placeholder"])) : o(d) == o(
|
|
741
|
+
]), 1040, ["modelValue", "placeholder"])) : o(d) == o(be).TREESELECT ? (n(), S(h, F({
|
|
742
742
|
key: 6,
|
|
743
743
|
modelValue: c.value,
|
|
744
744
|
"onUpdate:modelValue": w[6] || (w[6] = (u) => c.value = u),
|
|
745
|
-
placeholder: o(
|
|
746
|
-
}, o(e), { data:
|
|
747
|
-
|
|
745
|
+
placeholder: o(U)[o(a)].label
|
|
746
|
+
}, o(e), { data: T.value }), ce({ _: 2 }, [
|
|
747
|
+
Y(E(), (u) => ({
|
|
748
748
|
name: u,
|
|
749
|
-
fn:
|
|
750
|
-
p(b.$slots, `${t.t}-${o(
|
|
749
|
+
fn: y((N) => [
|
|
750
|
+
p(b.$slots, `${t.t}-${o(a)}-${u}`, { data: N })
|
|
751
751
|
])
|
|
752
752
|
}))
|
|
753
|
-
]), 1040, ["modelValue", "placeholder", "data"])) : o(d) == o(
|
|
753
|
+
]), 1040, ["modelValue", "placeholder", "data"])) : o(d) == o(be).TIME ? (n(), S(I, F({
|
|
754
754
|
key: 7,
|
|
755
755
|
modelValue: c.value,
|
|
756
756
|
"onUpdate:modelValue": w[7] || (w[7] = (u) => c.value = u),
|
|
757
757
|
"arrow-control": ""
|
|
758
758
|
}, o(e), {
|
|
759
|
-
placeholder: o(
|
|
760
|
-
}), null, 16, ["modelValue", "placeholder"])) : o(d) == o(
|
|
759
|
+
placeholder: o(U)[o(a)].label
|
|
760
|
+
}), null, 16, ["modelValue", "placeholder"])) : o(d) == o(be).TIMESELECT ? (n(), S(ee, F({
|
|
761
761
|
key: 8,
|
|
762
762
|
modelValue: c.value,
|
|
763
763
|
"onUpdate:modelValue": w[8] || (w[8] = (u) => c.value = u),
|
|
764
764
|
start: "06:30",
|
|
765
765
|
step: "00:15",
|
|
766
766
|
end: "23:30",
|
|
767
|
-
placeholder: o(
|
|
768
|
-
}, o(e)), null, 16, ["modelValue", "placeholder"])) : D(o(d)) ? (n(),
|
|
767
|
+
placeholder: o(U)[o(a)].label
|
|
768
|
+
}, o(e)), null, 16, ["modelValue", "placeholder"])) : D(o(d)) ? (n(), S(ae, F({
|
|
769
769
|
key: 9,
|
|
770
770
|
modelValue: c.value,
|
|
771
771
|
"onUpdate:modelValue": w[9] || (w[9] = (u) => c.value = u),
|
|
772
772
|
type: "date",
|
|
773
|
-
placeholder: o(
|
|
774
|
-
"value-format":
|
|
773
|
+
placeholder: o(U)[o(a)].label,
|
|
774
|
+
"value-format": z(o(d))
|
|
775
775
|
}, o(e)), ce({ _: 2 }, [
|
|
776
|
-
|
|
776
|
+
Y(E(), (u) => ({
|
|
777
777
|
name: u,
|
|
778
|
-
fn:
|
|
779
|
-
p(b.$slots, `${t.t}-${o(
|
|
778
|
+
fn: y((N) => [
|
|
779
|
+
p(b.$slots, `${t.t}-${o(a)}-${u}`, { data: N })
|
|
780
780
|
])
|
|
781
781
|
}))
|
|
782
|
-
]), 1040, ["modelValue", "placeholder", "value-format"])) : o(d) == o(
|
|
782
|
+
]), 1040, ["modelValue", "placeholder", "value-format"])) : o(d) == o(be).COLOR ? (n(), S(A, F({
|
|
783
783
|
key: 10,
|
|
784
784
|
modelValue: c.value,
|
|
785
785
|
"onUpdate:modelValue": w[10] || (w[10] = (u) => c.value = u)
|
|
786
|
-
}, o(e)), null, 16, ["modelValue"])) : o(d) == o(
|
|
786
|
+
}, o(e)), null, 16, ["modelValue"])) : o(d) == o(be).RATE ? (n(), S($, F({
|
|
787
787
|
key: 11,
|
|
788
788
|
modelValue: c.value,
|
|
789
789
|
"onUpdate:modelValue": w[11] || (w[11] = (u) => c.value = u)
|
|
790
|
-
}, o(e)), null, 16, ["modelValue"])) : o(d) == o(
|
|
790
|
+
}, o(e)), null, 16, ["modelValue"])) : o(d) == o(be).SLIDER ? (n(), S(g, F({
|
|
791
791
|
key: 12,
|
|
792
792
|
modelValue: c.value,
|
|
793
793
|
"onUpdate:modelValue": w[12] || (w[12] = (u) => c.value = u)
|
|
794
|
-
}, o(e)), null, 16, ["modelValue"])) : o(d) == o(
|
|
794
|
+
}, o(e)), null, 16, ["modelValue"])) : o(d) == o(be).SWITCH ? (n(), S(_, F({
|
|
795
795
|
key: 13,
|
|
796
796
|
modelValue: c.value,
|
|
797
797
|
"onUpdate:modelValue": w[13] || (w[13] = (u) => c.value = u)
|
|
798
798
|
}, o(e)), ce({ _: 2 }, [
|
|
799
|
-
|
|
799
|
+
Y(E(), (u) => ({
|
|
800
800
|
name: u,
|
|
801
|
-
fn:
|
|
802
|
-
p(b.$slots, `${t.t}-${o(
|
|
801
|
+
fn: y((N) => [
|
|
802
|
+
p(b.$slots, `${t.t}-${o(a)}-${u}`, { data: N })
|
|
803
803
|
])
|
|
804
804
|
}))
|
|
805
|
-
]), 1040, ["modelValue"])) : o(d) == o(
|
|
805
|
+
]), 1040, ["modelValue"])) : o(d) == o(be).TRANSFER ? (n(), S(s, F({
|
|
806
806
|
key: 14,
|
|
807
807
|
modelValue: c.value,
|
|
808
808
|
"onUpdate:modelValue": w[14] || (w[14] = (u) => c.value = u)
|
|
809
809
|
}, o(e)), ce({ _: 2 }, [
|
|
810
|
-
|
|
810
|
+
Y(E(), (u) => ({
|
|
811
811
|
name: u,
|
|
812
|
-
fn:
|
|
813
|
-
p(b.$slots, `${t.t}-${o(
|
|
812
|
+
fn: y((N) => [
|
|
813
|
+
p(b.$slots, `${t.t}-${o(a)}-${u}`, { data: N })
|
|
814
814
|
])
|
|
815
815
|
}))
|
|
816
|
-
]), 1040, ["modelValue"])) : o(d) == o(
|
|
816
|
+
]), 1040, ["modelValue"])) : o(d) == o(be).CASCADER ? (n(), S(i, F({
|
|
817
817
|
key: 15,
|
|
818
818
|
modelValue: c.value,
|
|
819
819
|
"onUpdate:modelValue": w[15] || (w[15] = (u) => c.value = u)
|
|
820
|
-
}, o(e), { options:
|
|
821
|
-
|
|
820
|
+
}, o(e), { options: x.value }), ce({ _: 2 }, [
|
|
821
|
+
Y(E(), (u) => ({
|
|
822
822
|
name: u,
|
|
823
|
-
fn:
|
|
824
|
-
p(b.$slots, `${t.t}-${o(
|
|
823
|
+
fn: y((N) => [
|
|
824
|
+
p(b.$slots, `${t.t}-${o(a)}-${u}`, { data: N })
|
|
825
825
|
])
|
|
826
826
|
}))
|
|
827
|
-
]), 1040, ["modelValue", "options"])) : o(d) == o(
|
|
828
|
-
default:
|
|
829
|
-
|
|
830
|
-
default:
|
|
827
|
+
]), 1040, ["modelValue", "options"])) : o(d) == o(be).IMAGE ? (n(), S(H, Qe(F({ key: 16 }, o(e))), ce({
|
|
828
|
+
default: y(() => [
|
|
829
|
+
Z(O, { type: "primary" }, {
|
|
830
|
+
default: y(() => w[21] || (w[21] = [
|
|
831
831
|
we("点击上传")
|
|
832
832
|
])),
|
|
833
833
|
_: 1
|
|
@@ -835,86 +835,100 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
835
835
|
]),
|
|
836
836
|
_: 2
|
|
837
837
|
}, [
|
|
838
|
-
|
|
838
|
+
Y(E(), (u, N) => ({
|
|
839
839
|
name: u,
|
|
840
|
-
fn:
|
|
841
|
-
p(b.$slots, `${t.t}-${o(
|
|
840
|
+
fn: y((se) => [
|
|
841
|
+
p(b.$slots, `${t.t}-${o(a)}-${u}`, { data: se })
|
|
842
842
|
])
|
|
843
843
|
}))
|
|
844
|
-
]), 1040)) : o(d) == o(
|
|
844
|
+
]), 1040)) : o(d) == o(be).AUTOCOMPLETE ? (n(), S(X, F({
|
|
845
845
|
key: 17,
|
|
846
846
|
modelValue: c.value,
|
|
847
847
|
"onUpdate:modelValue": w[16] || (w[16] = (u) => c.value = u)
|
|
848
848
|
}, o(e), {
|
|
849
|
-
placeholder: o(
|
|
849
|
+
placeholder: o(U)[o(a)].label
|
|
850
850
|
}), ce({ _: 2 }, [
|
|
851
|
-
|
|
851
|
+
Y(E(), (u, N) => ({
|
|
852
852
|
name: u,
|
|
853
|
-
fn:
|
|
854
|
-
p(b.$slots, `${t.t}-${o(
|
|
853
|
+
fn: y((se) => [
|
|
854
|
+
p(b.$slots, `${t.t}-${o(a)}-${u}`, { data: se })
|
|
855
855
|
])
|
|
856
856
|
}))
|
|
857
|
-
]), 1040, ["modelValue", "placeholder"])) : o(d) == o(
|
|
857
|
+
]), 1040, ["modelValue", "placeholder"])) : o(d) == o(be).INPUTNUMBER ? (n(), S(ue, F({
|
|
858
858
|
key: 18,
|
|
859
859
|
modelValue: c.value,
|
|
860
860
|
"onUpdate:modelValue": w[17] || (w[17] = (u) => c.value = u),
|
|
861
861
|
min: 0,
|
|
862
862
|
max: 1e8,
|
|
863
|
-
placeholder: o(
|
|
863
|
+
placeholder: o(U)[o(a)].label
|
|
864
864
|
}, o(e)), ce({ _: 2 }, [
|
|
865
|
-
|
|
865
|
+
Y(E(), (u, N) => ({
|
|
866
866
|
name: u,
|
|
867
|
-
fn:
|
|
868
|
-
p(b.$slots, `${t.t}-${o(
|
|
867
|
+
fn: y((se) => [
|
|
868
|
+
p(b.$slots, `${t.t}-${o(a)}-${u}`, { data: se })
|
|
869
869
|
])
|
|
870
870
|
}))
|
|
871
|
-
]), 1040, ["modelValue", "placeholder"])) : o(d) == o(
|
|
872
|
-
|
|
871
|
+
]), 1040, ["modelValue", "placeholder"])) : o(d) == o(be).MONEY ? (n(), q("div", Rt, [
|
|
872
|
+
Z(de, F({
|
|
873
873
|
modelValue: c.value,
|
|
874
874
|
"onUpdate:modelValue": w[18] || (w[18] = (u) => c.value = u),
|
|
875
|
-
placeholder: o(
|
|
876
|
-
type: o(
|
|
877
|
-
maxlength: ((
|
|
875
|
+
placeholder: o(U)[o(a)].label,
|
|
876
|
+
type: o(be).NUMBER,
|
|
877
|
+
maxlength: ((Fe = o(e)) == null ? void 0 : Fe.max) || 25
|
|
878
878
|
}, { ...o(e), type: o(d) }), ce({
|
|
879
|
-
suffix:
|
|
880
|
-
|
|
881
|
-
title: o(
|
|
879
|
+
suffix: y(() => [
|
|
880
|
+
J("div", {
|
|
881
|
+
title: o(rt)(c.value),
|
|
882
882
|
style: { "font-size": "10px", display: "block", width: "80px", "text-align": "right", overflow: "hidden", "text-overflow": "ellipsis" }
|
|
883
|
-
}, Ee(o(
|
|
883
|
+
}, Ee(o(rt)(c.value)), 9, Ht)
|
|
884
884
|
]),
|
|
885
885
|
_: 2
|
|
886
886
|
}, [
|
|
887
|
-
|
|
887
|
+
Y(E(), (u, N) => ({
|
|
888
888
|
name: u,
|
|
889
|
-
fn:
|
|
890
|
-
p(b.$slots, `${t.t}-${o(
|
|
889
|
+
fn: y((se) => [
|
|
890
|
+
p(b.$slots, `${t.t}-${o(a)}-${u}`, { data: se })
|
|
891
891
|
])
|
|
892
892
|
}))
|
|
893
893
|
]), 1040, ["modelValue", "placeholder", "type", "maxlength"])
|
|
894
894
|
])) : (o(d) === "primary" || o(d) === "success" || o(d) === "warning" || o(d) == "danger" || o(d) === "info" || o(d) == "default") && o(e).isLink === !0 ? (n(), q("div", Nt, [
|
|
895
|
-
|
|
895
|
+
Z(he, F(o(e), {
|
|
896
896
|
innerHTML: o(e).innerHtml || c.value
|
|
897
897
|
}), null, 16, ["innerHTML"])
|
|
898
898
|
])) : (o(d) === "primary" || o(d) === "success" || o(d) === "warning" || o(d) == "danger" || o(d) === "info") && o(e).isTag === !0 ? (n(), q("div", Pt, [
|
|
899
|
-
|
|
899
|
+
Array.isArray(o(e).innerHtml) && o(e).innerHtml.length > 1 ? (n(!0), q(P, { key: 0 }, Y(o(e).innerHtml, (u, N) => (n(), q(P, { key: N }, [
|
|
900
|
+
typeof u == "object" ? (n(), S(ve, F({
|
|
901
|
+
key: 0,
|
|
902
|
+
ref_for: !0
|
|
903
|
+
}, u, {
|
|
904
|
+
innerHTML: u == null ? void 0 : u.value,
|
|
905
|
+
style: { "margin-right": "3px" }
|
|
906
|
+
}), null, 16, ["innerHTML"])) : (n(), S(ve, F({
|
|
907
|
+
key: 1,
|
|
908
|
+
ref_for: !0
|
|
909
|
+
}, o(e), {
|
|
910
|
+
innerHTML: u,
|
|
911
|
+
style: { "margin-right": "3px" }
|
|
912
|
+
}), null, 16, ["innerHTML"]))
|
|
913
|
+
], 64))), 128)) : (n(), S(ve, F({ key: 1 }, o(e), {
|
|
900
914
|
innerHTML: o(e).innerHtml || c.value
|
|
901
|
-
}), null, 16, ["innerHTML"])
|
|
902
|
-
])) : o(d) == "div" ? (n(), q("div",
|
|
915
|
+
}), null, 16, ["innerHTML"]))
|
|
916
|
+
])) : o(d) == "div" ? (n(), q("div", F({ key: 22 }, o(e), {
|
|
903
917
|
innerHTML: o(e).innerHtml || c.value
|
|
904
|
-
}), null, 16,
|
|
918
|
+
}), null, 16, zt)) : o(d) == "span" ? (n(), q("span", F({ key: 23 }, o(e), {
|
|
905
919
|
innerHTML: o(e).innerHtml || c.value
|
|
906
|
-
}), null, 16,
|
|
920
|
+
}), null, 16, Wt)) : (n(), S(de, F({
|
|
907
921
|
key: 24,
|
|
908
922
|
modelValue: c.value,
|
|
909
923
|
"onUpdate:modelValue": w[19] || (w[19] = (u) => c.value = u),
|
|
910
|
-
placeholder: o(
|
|
924
|
+
placeholder: o(U)[o(a)].label,
|
|
911
925
|
maxlength: ((De = o(e)) == null ? void 0 : De.max) || 25,
|
|
912
926
|
clearable: !0
|
|
913
927
|
}, { ...o(e), type: o(d) }), ce({ _: 2 }, [
|
|
914
|
-
|
|
928
|
+
Y(E(), (u, N) => ({
|
|
915
929
|
name: u,
|
|
916
|
-
fn:
|
|
917
|
-
p(b.$slots, `${t.t}-${o(
|
|
930
|
+
fn: y((se) => [
|
|
931
|
+
p(b.$slots, `${t.t}-${o(a)}-${u}`, { data: se })
|
|
918
932
|
])
|
|
919
933
|
}))
|
|
920
934
|
]), 1040, ["modelValue", "placeholder", "maxlength"]))
|
|
@@ -933,7 +947,7 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
933
947
|
emits: /* @__PURE__ */ Be(["submit", "reset"], ["update:modelValue"]),
|
|
934
948
|
setup(f, { emit: c }) {
|
|
935
949
|
var ne, ie, fe, pe;
|
|
936
|
-
const t = Ie(f, "modelValue"), e = c,
|
|
950
|
+
const t = Ie(f, "modelValue"), e = c, a = ye(null), d = at("options"), U = {
|
|
937
951
|
inline: !0,
|
|
938
952
|
type: "hidden",
|
|
939
953
|
"scroll-to-error": !0,
|
|
@@ -971,11 +985,11 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
971
985
|
hidden: !1,
|
|
972
986
|
plain: !0,
|
|
973
987
|
click: () => {
|
|
974
|
-
if (!
|
|
988
|
+
if (!a.value) return;
|
|
975
989
|
let m = !0;
|
|
976
|
-
e("reset", (
|
|
977
|
-
m =
|
|
978
|
-
}), m &&
|
|
990
|
+
e("reset", (V) => {
|
|
991
|
+
m = V;
|
|
992
|
+
}), m && a.value.resetFields();
|
|
979
993
|
}
|
|
980
994
|
},
|
|
981
995
|
slots: {},
|
|
@@ -984,34 +998,34 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
984
998
|
editable: !1
|
|
985
999
|
}
|
|
986
1000
|
};
|
|
987
|
-
t.value.form =
|
|
988
|
-
|
|
1001
|
+
t.value.form = Ve(
|
|
1002
|
+
U,
|
|
989
1003
|
d == null ? void 0 : d.form,
|
|
990
1004
|
(ie = t.value) == null ? void 0 : ie.form
|
|
991
1005
|
);
|
|
992
|
-
const
|
|
1006
|
+
const T = async (m, V) => {
|
|
993
1007
|
let C = 5;
|
|
994
1008
|
for (; C > 0; ) {
|
|
995
|
-
if (await
|
|
996
|
-
|
|
997
|
-
|
|
1009
|
+
if (await yt(), a.value) {
|
|
1010
|
+
a.value.validate((h, I) => {
|
|
1011
|
+
h ? e("submit", m, V) : console.log("表单验证不通过!", I);
|
|
998
1012
|
});
|
|
999
1013
|
return;
|
|
1000
1014
|
}
|
|
1001
|
-
C--, await new Promise((
|
|
1015
|
+
C--, await new Promise((h) => setTimeout(h, 50));
|
|
1002
1016
|
}
|
|
1003
1017
|
console.error("表单实例获取失败,请检查组件状态");
|
|
1004
1018
|
};
|
|
1005
|
-
t.value.form.submit.click =
|
|
1006
|
-
const
|
|
1019
|
+
t.value.form.submit.click = T;
|
|
1020
|
+
const x = {
|
|
1007
1021
|
type: "hidden",
|
|
1008
1022
|
labelPosition: "right",
|
|
1009
1023
|
style: {
|
|
1010
1024
|
width: "100%"
|
|
1011
1025
|
}
|
|
1012
1026
|
};
|
|
1013
|
-
t.value.formItems =
|
|
1014
|
-
|
|
1027
|
+
t.value.formItems = Ve(
|
|
1028
|
+
x,
|
|
1015
1029
|
d == null ? void 0 : d.formItems,
|
|
1016
1030
|
(fe = t == null ? void 0 : t.value) == null ? void 0 : fe.formItems
|
|
1017
1031
|
);
|
|
@@ -1019,17 +1033,17 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1019
1033
|
span: 12,
|
|
1020
1034
|
offset: 0
|
|
1021
1035
|
};
|
|
1022
|
-
t.value.form.cols =
|
|
1036
|
+
t.value.form.cols = Ve(
|
|
1023
1037
|
E,
|
|
1024
1038
|
(pe = d == null ? void 0 : d.form) == null ? void 0 : pe.cols,
|
|
1025
1039
|
t.value.form.cols
|
|
1026
1040
|
);
|
|
1027
1041
|
const D = (m) => {
|
|
1028
|
-
let
|
|
1042
|
+
let V = [];
|
|
1029
1043
|
if (m.rules)
|
|
1030
|
-
|
|
1044
|
+
V = m.rules;
|
|
1031
1045
|
else {
|
|
1032
|
-
const
|
|
1046
|
+
const h = { ...{
|
|
1033
1047
|
required: void 0,
|
|
1034
1048
|
max: void 0,
|
|
1035
1049
|
min: void 0,
|
|
@@ -1038,66 +1052,66 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1038
1052
|
pattern: void 0,
|
|
1039
1053
|
validate: void 0
|
|
1040
1054
|
}, ...m };
|
|
1041
|
-
|
|
1042
|
-
validator: (I, ee,
|
|
1043
|
-
ee && m.type == "number" && (ee <
|
|
1055
|
+
h.required && V.push({ required: !0, message: `${h.label}不能为空!`, trigger: "blur" }), h.max && h.min && V.push({
|
|
1056
|
+
validator: (I, ee, ae) => {
|
|
1057
|
+
ee && m.type == "number" && (ee < h.min || ee > h.max) ? ae(new Error(`${h.label} 必须在 ${h.min} 和 ${h.max} 之间!`)) : ee && m.type !== "number" && (ee.toString().length < h.min || ee.toString().length > h.max) ? ae(new Error(`字符长度必须在 ${h.min} 和 ${h.max} 之间!`)) : ae();
|
|
1044
1058
|
}
|
|
1045
|
-
}),
|
|
1046
|
-
validator: (I, ee,
|
|
1047
|
-
ee && ee >
|
|
1059
|
+
}), h.max && !h.min && m.type == "number" && V.push({
|
|
1060
|
+
validator: (I, ee, ae) => {
|
|
1061
|
+
ee && ee > h.max ? ae(new Error(`${h.label}不能大于${h.max}!`)) : ae();
|
|
1048
1062
|
}
|
|
1049
|
-
}),
|
|
1050
|
-
validator: (I, ee,
|
|
1051
|
-
ee && ee <
|
|
1063
|
+
}), h.min && !h.max && m.type == "number" && V.push({
|
|
1064
|
+
validator: (I, ee, ae) => {
|
|
1065
|
+
ee && ee < h.min ? ae(new Error(`${h.label}不能小于${h.min}!`)) : ae();
|
|
1052
1066
|
}
|
|
1053
|
-
}),
|
|
1054
|
-
validator: (I, ee,
|
|
1067
|
+
}), h.type == "email" && V.push({ type: "email", message: "不是一个正确的邮箱地址!" }), h.type == "url" && V.push({ type: "url", message: "不是一个合正确的URL!" }), h.pattern && V.push({ pattern: h == null ? void 0 : h.pattern, message: (h == null ? void 0 : h.message) || "格式不正确!" }), h.validate && V.push({
|
|
1068
|
+
validator: (I, ee, ae) => h.validate(I, ee, ae)
|
|
1055
1069
|
});
|
|
1056
1070
|
}
|
|
1057
|
-
return
|
|
1058
|
-
},
|
|
1059
|
-
var I, ee,
|
|
1060
|
-
const C =
|
|
1071
|
+
return V;
|
|
1072
|
+
}, z = (m, V = !1) => {
|
|
1073
|
+
var I, ee, ae, A, $;
|
|
1074
|
+
const C = V ? m : m == null ? void 0 : m.item, h = typeof (C == null ? void 0 : C.editor) == "function" ? C.editor(b.value, (I = t.value.form) == null ? void 0 : I.modalState) : (C == null ? void 0 : C.editor) || {};
|
|
1061
1075
|
if (((ee = t.value.form) == null ? void 0 : ee.modalState) === "edit") {
|
|
1062
|
-
const g = typeof (C == null ? void 0 : C.editor) == "object" ? (
|
|
1063
|
-
return { ...
|
|
1076
|
+
const g = typeof (C == null ? void 0 : C.editor) == "object" ? (ae = C.editor) == null ? void 0 : ae.ep : typeof (C == null ? void 0 : C.editor) == "function" ? h == null ? void 0 : h.ep : {};
|
|
1077
|
+
return { ...h, ...g };
|
|
1064
1078
|
}
|
|
1065
|
-
if (((
|
|
1066
|
-
const g = typeof (C == null ? void 0 : C.editor) == "object" ? ($ = C.editor) == null ? void 0 : $.ap : typeof (C == null ? void 0 : C.editor) == "function" ?
|
|
1067
|
-
return { ...
|
|
1079
|
+
if (((A = t.value.form) == null ? void 0 : A.modalState) === "add") {
|
|
1080
|
+
const g = typeof (C == null ? void 0 : C.editor) == "object" ? ($ = C.editor) == null ? void 0 : $.ap : typeof (C == null ? void 0 : C.editor) == "function" ? h == null ? void 0 : h.ap : {};
|
|
1081
|
+
return { ...h, ...g };
|
|
1068
1082
|
}
|
|
1069
|
-
return
|
|
1083
|
+
return h;
|
|
1070
1084
|
}, te = (m) => {
|
|
1071
|
-
var C,
|
|
1072
|
-
const
|
|
1073
|
-
return ((
|
|
1085
|
+
var C, h, I, ee, ae;
|
|
1086
|
+
const V = typeof m.editor == "function" ? m.editor(b.value, (C = t.value.form) == null ? void 0 : C.modalState) : m.editor;
|
|
1087
|
+
return ((h = t.value.form) == null ? void 0 : h.modalState) === "edit" ? ((I = V == null ? void 0 : V.ep) == null ? void 0 : I.type) ?? (V == null ? void 0 : V.type) ?? m.type : ((ee = t.value.form) == null ? void 0 : ee.modalState) === "add" ? ((ae = V == null ? void 0 : V.ap) == null ? void 0 : ae.type) ?? (V == null ? void 0 : V.type) ?? m.type : (V == null ? void 0 : V.type) ?? m.type;
|
|
1074
1088
|
};
|
|
1075
1089
|
Ne(() => {
|
|
1076
|
-
|
|
1090
|
+
R();
|
|
1077
1091
|
}), Dt(() => {
|
|
1078
|
-
|
|
1092
|
+
a.value = null;
|
|
1079
1093
|
});
|
|
1080
|
-
const
|
|
1081
|
-
for (const [m,
|
|
1082
|
-
t.value[m].formItem = { ...t.value[m].formItem, ...
|
|
1083
|
-
},
|
|
1084
|
-
var C,
|
|
1085
|
-
const
|
|
1086
|
-
return t.value.form.modalState === "edit" ? ((
|
|
1094
|
+
const R = () => {
|
|
1095
|
+
for (const [m, V] of Object.entries(M.value))
|
|
1096
|
+
t.value[m].formItem = { ...t.value[m].formItem, ...V.formItem }, t.value[m].formItem.style = { ...t.value[m].formItem.style, ...V.formItem.style };
|
|
1097
|
+
}, M = Ye(() => Object.fromEntries(Object.entries(t.value).filter((m) => m[1].type != "hidden").filter((m) => !["table", "tableColumns", "query", "queryItems"].includes(m[0])).filter((m) => m[1].editor !== !1).filter((m) => m[1].type !== "control").filter((m) => {
|
|
1098
|
+
var C, h, I;
|
|
1099
|
+
const V = typeof m[1].editor == "function" ? m[1].editor(b.value, (C = t.value.form) == null ? void 0 : C.modalState) : m[1].editor;
|
|
1100
|
+
return t.value.form.modalState === "edit" ? ((h = V == null ? void 0 : V.ep) == null ? void 0 : h.editor) !== !1 : t.value.form.modalState === "add" ? ((I = V == null ? void 0 : V.ap) == null ? void 0 : I.editor) !== !1 : !0;
|
|
1087
1101
|
}).map((m) => [m[0], m[1]]))), b = Ye(() => Object.fromEntries(Object.entries(t.value).filter((m) => m[1].type != "hidden").filter((m) => m[1].type != "control").map((m) => [m[0], m[1].value]))), w = Ye(() => {
|
|
1088
1102
|
const m = /* @__PURE__ */ new Map();
|
|
1089
|
-
return Object.entries(
|
|
1103
|
+
return Object.entries(M.value).forEach(([V, C]) => {
|
|
1090
1104
|
if (C.groupName) {
|
|
1091
|
-
const
|
|
1092
|
-
m.has(
|
|
1093
|
-
groupName:
|
|
1105
|
+
const h = C.groupName;
|
|
1106
|
+
m.has(h) || m.set(h, {
|
|
1107
|
+
groupName: h,
|
|
1094
1108
|
items: []
|
|
1095
|
-
}), m.get(
|
|
1109
|
+
}), m.get(h).items.push({ key: V, item: C });
|
|
1096
1110
|
}
|
|
1097
|
-
}), m.forEach((
|
|
1098
|
-
|
|
1111
|
+
}), m.forEach((V) => {
|
|
1112
|
+
V.tabPane = Ve(...V.items.map(({ item: C }) => C.tabPane || {}));
|
|
1099
1113
|
}), Array.from(m.values());
|
|
1100
|
-
}),
|
|
1114
|
+
}), re = [
|
|
1101
1115
|
{
|
|
1102
1116
|
name: "f-submit",
|
|
1103
1117
|
label: t.value.form.submit.label,
|
|
@@ -1120,56 +1134,57 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1120
1134
|
originalOrder: 1
|
|
1121
1135
|
// 添加原始顺序标识
|
|
1122
1136
|
}
|
|
1123
|
-
], K = Ye(() =>
|
|
1124
|
-
return (m,
|
|
1125
|
-
const C =
|
|
1126
|
-
return n(),
|
|
1137
|
+
], K = Ye(() => re.filter((m) => !m.hidden).sort((m, V) => m.sort - V.sort || m.originalOrder - V.originalOrder));
|
|
1138
|
+
return (m, V) => {
|
|
1139
|
+
const C = L("el-form-item"), h = L("el-col"), I = L("el-tab-pane"), ee = L("el-tabs"), ae = L("el-button"), A = L("el-form");
|
|
1140
|
+
return n(), S(A, F({
|
|
1127
1141
|
ref_key: "gform",
|
|
1128
|
-
ref:
|
|
1142
|
+
ref: a,
|
|
1129
1143
|
model: t.value,
|
|
1130
1144
|
style: { width: "98%", padding: 0, margin: 0, "box-sizing": "border-box" }
|
|
1131
1145
|
}, o(ke)(t.value.form, ($) => !["footer", "submit", "reset", "slots", "type", "sort"].includes($)), { class: "g-form-container" }), {
|
|
1132
|
-
default:
|
|
1146
|
+
default: y(() => [
|
|
1133
1147
|
w.value.length > 0 ? p(m.$slots, "default", { key: 0 }, () => {
|
|
1134
1148
|
var $, g, _;
|
|
1135
1149
|
return [
|
|
1136
|
-
|
|
1150
|
+
Z(ee, F({
|
|
1137
1151
|
class: "demo-tabs",
|
|
1138
1152
|
modelValue: w.value[0].groupName,
|
|
1139
|
-
"onUpdate:modelValue":
|
|
1153
|
+
"onUpdate:modelValue": V[0] || (V[0] = (s) => w.value[0].groupName = s),
|
|
1140
1154
|
style: { width: "100%" }
|
|
1141
1155
|
}, t.value.form.tabs), {
|
|
1142
|
-
default:
|
|
1143
|
-
(n(!0), q(
|
|
1156
|
+
default: y(() => [
|
|
1157
|
+
(n(!0), q(P, null, Y(w.value, (s) => (n(), S(I, F({
|
|
1144
1158
|
key: s.groupName,
|
|
1145
1159
|
label: s.groupName,
|
|
1146
1160
|
name: s.groupName,
|
|
1147
1161
|
style: { width: "100%", display: "flex", "flex-wrap": "wrap" },
|
|
1148
1162
|
ref_for: !0
|
|
1149
1163
|
}, s.tabPane), {
|
|
1150
|
-
default:
|
|
1151
|
-
(n(!0), q(
|
|
1164
|
+
default: y(() => [
|
|
1165
|
+
(n(!0), q(P, null, Y(s.items, (i, O) => (n(), S(h, F({ ref_for: !0 }, { ...t.value.form.cols, ...i == null ? void 0 : i.item.col }, {
|
|
1152
1166
|
key: i.key,
|
|
1153
1167
|
style: { width: "100%" }
|
|
1154
1168
|
}), {
|
|
1155
|
-
default:
|
|
1156
|
-
var H,
|
|
1169
|
+
default: y(() => {
|
|
1170
|
+
var H, X;
|
|
1157
1171
|
return [
|
|
1158
|
-
|
|
1172
|
+
Z(C, F({
|
|
1159
1173
|
label: i == null ? void 0 : i.item.label,
|
|
1160
1174
|
prop: `${i.key}.value`,
|
|
1161
1175
|
rules: D(i == null ? void 0 : i.item),
|
|
1162
1176
|
ref_for: !0
|
|
1163
|
-
}, { ...(H = t.value) == null ? void 0 : H.formItems, ...(
|
|
1164
|
-
default:
|
|
1177
|
+
}, { ...(H = t.value) == null ? void 0 : H.formItems, ...(X = i == null ? void 0 : i.item) == null ? void 0 : X.formItem }, { style: { width: "100%" } }), {
|
|
1178
|
+
default: y(() => [
|
|
1165
1179
|
p(m.$slots, "f-" + i.key, {
|
|
1166
1180
|
item: i == null ? void 0 : i.item,
|
|
1181
|
+
formInfo: b.value,
|
|
1167
1182
|
model: t.value
|
|
1168
1183
|
}, () => [
|
|
1169
|
-
(n(),
|
|
1184
|
+
(n(), S(Xe, {
|
|
1170
1185
|
modelValue: t.value[i.key].value,
|
|
1171
1186
|
"onUpdate:modelValue": (ue) => t.value[i.key].value = ue,
|
|
1172
|
-
item:
|
|
1187
|
+
item: z(i),
|
|
1173
1188
|
ctrlKey: i.key,
|
|
1174
1189
|
ctrlType: te(i == null ? void 0 : i.item),
|
|
1175
1190
|
model: t.value,
|
|
@@ -1178,9 +1193,9 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1178
1193
|
t: "f",
|
|
1179
1194
|
formInfo: b.value
|
|
1180
1195
|
}, ce({ _: 2 }, [
|
|
1181
|
-
|
|
1196
|
+
Y(m.$slots, (ue, de) => ({
|
|
1182
1197
|
name: de,
|
|
1183
|
-
fn:
|
|
1198
|
+
fn: y((he) => [
|
|
1184
1199
|
p(m.$slots, de, {
|
|
1185
1200
|
data: he,
|
|
1186
1201
|
item: i.item,
|
|
@@ -1203,18 +1218,18 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1203
1218
|
]),
|
|
1204
1219
|
_: 3
|
|
1205
1220
|
}, 16, ["modelValue"]),
|
|
1206
|
-
(_ = (g = ($ = t.value) == null ? void 0 : $.form) == null ? void 0 : g.footer) != null && _.hidden ?
|
|
1207
|
-
|
|
1208
|
-
style:
|
|
1221
|
+
(_ = (g = ($ = t.value) == null ? void 0 : $.form) == null ? void 0 : g.footer) != null && _.hidden ? $e("", !0) : p(m.$slots, "f-footer", { key: 0 }, () => [
|
|
1222
|
+
J("div", {
|
|
1223
|
+
style: Oe(t.value.form.footer.style)
|
|
1209
1224
|
}, [
|
|
1210
1225
|
p(m.$slots, "f-footer-left"),
|
|
1211
|
-
(n(!0), q(
|
|
1226
|
+
(n(!0), q(P, null, Y(K.value, (s) => (n(), q(P, null, [
|
|
1212
1227
|
p(m.$slots, s.name + "-left"),
|
|
1213
1228
|
p(m.$slots, s.name, {}, () => [
|
|
1214
|
-
|
|
1229
|
+
Z(ae, F({ ref_for: !0 }, s.info, {
|
|
1215
1230
|
onClick: ct((i) => s.click(b.value, t.value), ["stop"])
|
|
1216
1231
|
}), {
|
|
1217
|
-
default:
|
|
1232
|
+
default: y(() => [
|
|
1218
1233
|
we(Ee(s == null ? void 0 : s.label), 1)
|
|
1219
1234
|
]),
|
|
1220
1235
|
_: 2
|
|
@@ -1229,20 +1244,20 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1229
1244
|
}) : p(m.$slots, "default", { key: 1 }, () => {
|
|
1230
1245
|
var $, g, _;
|
|
1231
1246
|
return [
|
|
1232
|
-
(n(!0), q(
|
|
1247
|
+
(n(!0), q(P, null, Y(M.value, (s, i) => (n(), S(h, F({ ref_for: !0 }, { ...t.value.form.cols, ...s.col }, {
|
|
1233
1248
|
key: i,
|
|
1234
1249
|
style: { width: "100%" }
|
|
1235
1250
|
}), {
|
|
1236
|
-
default:
|
|
1237
|
-
var
|
|
1251
|
+
default: y(() => {
|
|
1252
|
+
var O;
|
|
1238
1253
|
return [
|
|
1239
|
-
|
|
1254
|
+
Z(C, F({
|
|
1240
1255
|
label: s.label,
|
|
1241
1256
|
prop: `${i}.value`,
|
|
1242
1257
|
rules: D(s),
|
|
1243
1258
|
ref_for: !0
|
|
1244
|
-
}, { ...(
|
|
1245
|
-
label:
|
|
1259
|
+
}, { ...(O = t.value) == null ? void 0 : O.formItems, ...s == null ? void 0 : s.formItem }, { style: { width: "100%" } }), {
|
|
1260
|
+
label: y((H) => [
|
|
1246
1261
|
p(m.$slots, `f-${i}-label`, {
|
|
1247
1262
|
data: H,
|
|
1248
1263
|
item: s,
|
|
@@ -1251,15 +1266,16 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1251
1266
|
we(Ee(s.label), 1)
|
|
1252
1267
|
])
|
|
1253
1268
|
]),
|
|
1254
|
-
default:
|
|
1269
|
+
default: y(() => [
|
|
1255
1270
|
p(m.$slots, "f-" + i, {
|
|
1256
1271
|
item: s,
|
|
1272
|
+
formInfo: b.value,
|
|
1257
1273
|
model: t.value
|
|
1258
1274
|
}, () => [
|
|
1259
|
-
(n(),
|
|
1275
|
+
(n(), S(Xe, {
|
|
1260
1276
|
modelValue: t.value[i].value,
|
|
1261
1277
|
"onUpdate:modelValue": (H) => t.value[i].value = H,
|
|
1262
|
-
item:
|
|
1278
|
+
item: z(s, !0),
|
|
1263
1279
|
ctrlKey: i,
|
|
1264
1280
|
ctrlType: te(s),
|
|
1265
1281
|
key: i,
|
|
@@ -1268,10 +1284,10 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1268
1284
|
t: "f",
|
|
1269
1285
|
formInfo: b.value
|
|
1270
1286
|
}, ce({ _: 2 }, [
|
|
1271
|
-
|
|
1272
|
-
name:
|
|
1273
|
-
fn:
|
|
1274
|
-
p(m.$slots,
|
|
1287
|
+
Y(m.$slots, (H, X) => ({
|
|
1288
|
+
name: X,
|
|
1289
|
+
fn: y((ue) => [
|
|
1290
|
+
p(m.$slots, X, {
|
|
1275
1291
|
data: ue,
|
|
1276
1292
|
item: s,
|
|
1277
1293
|
model: t.value
|
|
@@ -1287,18 +1303,18 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1287
1303
|
}),
|
|
1288
1304
|
_: 2
|
|
1289
1305
|
}, 1040))), 128)),
|
|
1290
|
-
(_ = (g = ($ = t.value) == null ? void 0 : $.form) == null ? void 0 : g.footer) != null && _.hidden ?
|
|
1291
|
-
|
|
1292
|
-
style:
|
|
1306
|
+
(_ = (g = ($ = t.value) == null ? void 0 : $.form) == null ? void 0 : g.footer) != null && _.hidden ? $e("", !0) : p(m.$slots, "f-footer", { key: 0 }, () => [
|
|
1307
|
+
J("div", {
|
|
1308
|
+
style: Oe(t.value.form.footer.style)
|
|
1293
1309
|
}, [
|
|
1294
1310
|
p(m.$slots, "f-footer-left"),
|
|
1295
|
-
(n(!0), q(
|
|
1311
|
+
(n(!0), q(P, null, Y(K.value, (s) => (n(), q(P, null, [
|
|
1296
1312
|
p(m.$slots, s.name + "-left"),
|
|
1297
1313
|
p(m.$slots, s.name, {}, () => [
|
|
1298
|
-
|
|
1314
|
+
Z(ae, F({ ref_for: !0 }, s.info, {
|
|
1299
1315
|
onClick: ct((i) => s.click(b.value, t.value), ["stop"])
|
|
1300
1316
|
}), {
|
|
1301
|
-
default:
|
|
1317
|
+
default: y(() => [
|
|
1302
1318
|
we(Ee(s == null ? void 0 : s.label), 1)
|
|
1303
1319
|
]),
|
|
1304
1320
|
_: 2
|
|
@@ -1326,43 +1342,44 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1326
1342
|
}),
|
|
1327
1343
|
emits: ["update:modelValue", "update:info"],
|
|
1328
1344
|
setup(f) {
|
|
1329
|
-
const c = Ie(f, "modelValue"), t = f, e = Ie(f, "info"),
|
|
1330
|
-
const
|
|
1331
|
-
return (
|
|
1345
|
+
const c = Ie(f, "modelValue"), t = f, e = Ie(f, "info"), a = (T) => Ye(() => Object.fromEntries(Object.entries(c.value).filter((x) => x[1].search && x[1].search.more === T).map((x) => [x[0], x[1]]))).value, d = (T) => typeof T.search == "function" ? T.search(e.value) : T.search || {}, U = (T) => {
|
|
1346
|
+
const x = d(T);
|
|
1347
|
+
return (x == null ? void 0 : x.type) || T.type;
|
|
1332
1348
|
};
|
|
1333
|
-
return (
|
|
1334
|
-
const E =
|
|
1335
|
-
return n(!0), q(
|
|
1336
|
-
key:
|
|
1349
|
+
return (T, x) => {
|
|
1350
|
+
const E = L("el-form-item");
|
|
1351
|
+
return n(!0), q(P, null, Y(a(t.more), (D, z) => p(T.$slots, `q-${z}`, {
|
|
1352
|
+
key: z,
|
|
1337
1353
|
item: D,
|
|
1354
|
+
queryModel: e.value,
|
|
1338
1355
|
model: c.value
|
|
1339
1356
|
}, () => [
|
|
1340
|
-
|
|
1357
|
+
Z(E, F({
|
|
1341
1358
|
label: D.label,
|
|
1342
1359
|
ref_for: !0
|
|
1343
1360
|
}, { ...c.value.queryItems, ...d(D) }), {
|
|
1344
|
-
label:
|
|
1345
|
-
p(
|
|
1361
|
+
label: y(() => [
|
|
1362
|
+
p(T.$slots, `q-${z}-label`, {
|
|
1346
1363
|
item: D,
|
|
1347
1364
|
model: c.value
|
|
1348
1365
|
})
|
|
1349
1366
|
]),
|
|
1350
|
-
default:
|
|
1351
|
-
|
|
1352
|
-
modelValue: e.value[
|
|
1353
|
-
"onUpdate:modelValue": (te) => e.value[
|
|
1367
|
+
default: y(() => [
|
|
1368
|
+
Z(Xe, {
|
|
1369
|
+
modelValue: e.value[z],
|
|
1370
|
+
"onUpdate:modelValue": (te) => e.value[z] = te,
|
|
1354
1371
|
item: { ...D == null ? void 0 : D.editor, ...d(D) },
|
|
1355
|
-
ctrlKey:
|
|
1356
|
-
ctrlType:
|
|
1372
|
+
ctrlKey: z,
|
|
1373
|
+
ctrlType: U(D),
|
|
1357
1374
|
model: c.value,
|
|
1358
1375
|
t: "q",
|
|
1359
1376
|
formInfo: e.value
|
|
1360
1377
|
}, ce({ _: 2 }, [
|
|
1361
|
-
|
|
1378
|
+
Y(Object.keys(T.$slots), (te) => ({
|
|
1362
1379
|
name: te,
|
|
1363
|
-
fn:
|
|
1364
|
-
p(
|
|
1365
|
-
data:
|
|
1380
|
+
fn: y((R) => [
|
|
1381
|
+
p(T.$slots, te, {
|
|
1382
|
+
data: R,
|
|
1366
1383
|
item: D,
|
|
1367
1384
|
model: c.value
|
|
1368
1385
|
})
|
|
@@ -1377,8 +1394,8 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1377
1394
|
}
|
|
1378
1395
|
}, Ue = (f, c) => {
|
|
1379
1396
|
const t = f.__vccOpts || f;
|
|
1380
|
-
for (const [e,
|
|
1381
|
-
t[e] =
|
|
1397
|
+
for (const [e, a] of c)
|
|
1398
|
+
t[e] = a;
|
|
1382
1399
|
return t;
|
|
1383
1400
|
}, Gt = {
|
|
1384
1401
|
key: 0,
|
|
@@ -1391,9 +1408,9 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1391
1408
|
},
|
|
1392
1409
|
emits: /* @__PURE__ */ Be(["query", "reset"], ["update:modelValue"]),
|
|
1393
1410
|
setup(f, { emit: c }) {
|
|
1394
|
-
const t = Ie(f, "modelValue"), e = c,
|
|
1395
|
-
let
|
|
1396
|
-
const
|
|
1411
|
+
const t = Ie(f, "modelValue"), e = c, a = at("options"), d = ye(!1);
|
|
1412
|
+
let U = Object.fromEntries(Object.entries(t.value).filter((M) => M[1].search).map(([M, b]) => [M, b.value]));
|
|
1413
|
+
const T = ye(U), x = {
|
|
1397
1414
|
hidden: !1,
|
|
1398
1415
|
type: "hidden",
|
|
1399
1416
|
labelWidth: 100,
|
|
@@ -1402,7 +1419,7 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1402
1419
|
style: { display: "flex", flex: 1, "flex-wrap": "wrap" },
|
|
1403
1420
|
container: {
|
|
1404
1421
|
inline: !1,
|
|
1405
|
-
style: { flexDirection: "column" }
|
|
1422
|
+
style: { flexDirection: "column", paddingBottom: "0px", paddingTop: "18px", boxSizing: "border-box" }
|
|
1406
1423
|
},
|
|
1407
1424
|
more: {
|
|
1408
1425
|
mode: 1,
|
|
@@ -1419,7 +1436,7 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1419
1436
|
hidden: !1,
|
|
1420
1437
|
plain: !1,
|
|
1421
1438
|
click: () => {
|
|
1422
|
-
|
|
1439
|
+
T.value = ye(U), e("reset", T.value);
|
|
1423
1440
|
}
|
|
1424
1441
|
},
|
|
1425
1442
|
query: {
|
|
@@ -1427,7 +1444,7 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1427
1444
|
type: "primary",
|
|
1428
1445
|
label: "查询",
|
|
1429
1446
|
click: () => {
|
|
1430
|
-
e("query",
|
|
1447
|
+
e("query", T.value), d.value = !1;
|
|
1431
1448
|
}
|
|
1432
1449
|
},
|
|
1433
1450
|
btns: {
|
|
@@ -1435,11 +1452,13 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1435
1452
|
style: {
|
|
1436
1453
|
display: "flex",
|
|
1437
1454
|
flexWrap: "wrap",
|
|
1438
|
-
justifyContent: "flex-end"
|
|
1455
|
+
justifyContent: "flex-end",
|
|
1456
|
+
paddingBottom: "18px",
|
|
1457
|
+
boxSizing: "border-box"
|
|
1439
1458
|
}
|
|
1440
1459
|
}
|
|
1441
1460
|
};
|
|
1442
|
-
t.value.query =
|
|
1461
|
+
t.value.query = Ve(x, a == null ? void 0 : a.query, t.value.query);
|
|
1443
1462
|
const E = {
|
|
1444
1463
|
2: {
|
|
1445
1464
|
title: "更多查询",
|
|
@@ -1457,7 +1476,7 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1457
1476
|
trigger: "click"
|
|
1458
1477
|
}
|
|
1459
1478
|
};
|
|
1460
|
-
t.value.query.more.dialog =
|
|
1479
|
+
t.value.query.more.dialog = Ve(
|
|
1461
1480
|
E[t.value.query.more.mode] || {},
|
|
1462
1481
|
t.value.query.more.dialog
|
|
1463
1482
|
);
|
|
@@ -1468,25 +1487,25 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1468
1487
|
width: "280px"
|
|
1469
1488
|
}
|
|
1470
1489
|
};
|
|
1471
|
-
t.value.queryItems =
|
|
1472
|
-
const
|
|
1473
|
-
const w = Object.keys(
|
|
1490
|
+
t.value.queryItems = Ve(D, a == null ? void 0 : a.queryItems, t.value.queryItems);
|
|
1491
|
+
const z = (M, b) => {
|
|
1492
|
+
const w = Object.keys(M.slots).filter((re) => re !== "default").reduce((re, K) => (re[K] = (ne) => M.slots[K]({
|
|
1474
1493
|
model: t.value
|
|
1475
1494
|
// 传递当前模型数据
|
|
1476
|
-
}),
|
|
1495
|
+
}), re), {});
|
|
1477
1496
|
return qe(mt, {
|
|
1478
1497
|
modelValue: t.value,
|
|
1479
|
-
"onUpdate:modelValue": (
|
|
1480
|
-
info:
|
|
1481
|
-
"onUpdate:info": (
|
|
1498
|
+
"onUpdate:modelValue": (re) => t.value = re,
|
|
1499
|
+
info: T.value,
|
|
1500
|
+
"onUpdate:info": (re) => T.value = re,
|
|
1482
1501
|
more: b
|
|
1483
1502
|
}, w);
|
|
1484
|
-
}, te =
|
|
1485
|
-
var w,
|
|
1486
|
-
const
|
|
1503
|
+
}, te = ht(), R = () => {
|
|
1504
|
+
var w, re, K, ne, ie, fe, pe, m, V;
|
|
1505
|
+
const M = [
|
|
1487
1506
|
{
|
|
1488
1507
|
key: "query",
|
|
1489
|
-
hidden: (K = (
|
|
1508
|
+
hidden: (K = (re = (w = t.value) == null ? void 0 : w.query) == null ? void 0 : re.query) == null ? void 0 : K.hidden,
|
|
1490
1509
|
component: _e,
|
|
1491
1510
|
props: {
|
|
1492
1511
|
...t.value.query.query,
|
|
@@ -1508,7 +1527,7 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1508
1527
|
},
|
|
1509
1528
|
{
|
|
1510
1529
|
key: "more",
|
|
1511
|
-
hidden: (
|
|
1530
|
+
hidden: (V = (m = (pe = t.value) == null ? void 0 : pe.query) == null ? void 0 : m.more) == null ? void 0 : V.hidden,
|
|
1512
1531
|
component: t.value.query.more.mode === 3 ? Ke : _e,
|
|
1513
1532
|
props: t.value.query.more.mode === 3 ? { ...t.value.query.more.dialog } : {
|
|
1514
1533
|
...t.value.query.more,
|
|
@@ -1516,136 +1535,115 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1516
1535
|
},
|
|
1517
1536
|
label: t.value.query.more.label,
|
|
1518
1537
|
sort: t.value.query.more.sort || 0,
|
|
1519
|
-
content: t.value.query.more.mode === 3 ? () => qe(
|
|
1538
|
+
content: t.value.query.more.mode === 3 ? () => qe(We, {
|
|
1520
1539
|
class: "query-form",
|
|
1521
1540
|
...ke(t.value.query, (C) => !["query", "more", "reset"].includes(C))
|
|
1522
|
-
}, () =>
|
|
1541
|
+
}, () => z({ slots: te }, !0)) : null
|
|
1523
1542
|
}
|
|
1524
1543
|
];
|
|
1525
|
-
return
|
|
1544
|
+
return M.sort((C, h) => C.sort - h.sort), M.filter((C) => !C.hidden).map((C) => C.key === "more" && C.component === Ke ? qe(Ke, C.props, {
|
|
1526
1545
|
reference: () => qe(_e, t.value.query.more, () => C.label),
|
|
1527
1546
|
default: C.content
|
|
1528
1547
|
}) : (C.props.slot = "query-" + C.key, C.label ? qe(C.component, C.props, () => C.label) : qe(C.component, C.props)));
|
|
1529
1548
|
};
|
|
1530
|
-
return (
|
|
1531
|
-
var K, ne, ie, fe, pe, m,
|
|
1532
|
-
const w =
|
|
1533
|
-
return n(), q(
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
(n(),
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
_: 3
|
|
1557
|
-
})) : (n(), q(G, { key: 1 }, [
|
|
1558
|
-
(he = (de = (ue = t.value) == null ? void 0 : ue.query) == null ? void 0 : de.btns) != null && he.group ? (n(), O(o(Ge), { key: 0 }, {
|
|
1559
|
-
default: h(() => [
|
|
1560
|
-
(n(!0), q(G, null, j(L(), ($e) => p(V.$slots, $e.props.slot, {}, () => [
|
|
1561
|
-
(n(), O(xe($e)))
|
|
1562
|
-
], !0)), 256))
|
|
1549
|
+
return (M, b) => {
|
|
1550
|
+
var K, ne, ie, fe, pe, m, V, C, h, I, ee, ae, A, $, g, _, s;
|
|
1551
|
+
const w = L("el-form-item"), re = L("el-drawer");
|
|
1552
|
+
return n(), q(P, null, [
|
|
1553
|
+
J("div", {
|
|
1554
|
+
class: "g-query-container",
|
|
1555
|
+
style: Oe((ne = (K = t.value.query) == null ? void 0 : K.container) == null ? void 0 : ne.style)
|
|
1556
|
+
}, [
|
|
1557
|
+
Z(o(We), Qe(ft(o(ke)(t.value.query, (i) => !["query", "more", "reset", "btns"].includes(i)))), {
|
|
1558
|
+
default: y(() => {
|
|
1559
|
+
var i, O;
|
|
1560
|
+
return [
|
|
1561
|
+
(n(), S(Ae(z({ slots: M.$slots }, void 0)))),
|
|
1562
|
+
((O = (i = t.value.query) == null ? void 0 : i.container) == null ? void 0 : O.inline) === !0 ? (n(), S(w, { key: 0 }, {
|
|
1563
|
+
default: y(() => {
|
|
1564
|
+
var H, X, ue, de, he;
|
|
1565
|
+
return [
|
|
1566
|
+
J("div", {
|
|
1567
|
+
style: Oe((X = (H = t.value.query) == null ? void 0 : H.btns) == null ? void 0 : X.style)
|
|
1568
|
+
}, [
|
|
1569
|
+
t.value.query.group ? (n(), S(o(Ge), { key: 0 }, {
|
|
1570
|
+
default: y(() => [
|
|
1571
|
+
(n(!0), q(P, null, Y(R(), (ve) => p(M.$slots, ve.props.slot, {}, () => [
|
|
1572
|
+
(n(), S(Ae(ve)))
|
|
1573
|
+
], !0)), 256)),
|
|
1574
|
+
p(M.$slots, "q-btns", {}, void 0, !0)
|
|
1563
1575
|
]),
|
|
1564
1576
|
_: 3
|
|
1565
|
-
})) : (n(
|
|
1566
|
-
(n(),
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
(n(!0), q(G, null, j(L(), (i) => p(V.$slots, i.props.slot, {}, () => [
|
|
1586
|
-
(n(), O(xe(i)))
|
|
1587
|
-
], !0)), 256)),
|
|
1588
|
-
p(V.$slots, "q-btns", {}, void 0, !0)
|
|
1589
|
-
]),
|
|
1577
|
+
})) : (n(), q(P, { key: 1 }, [
|
|
1578
|
+
(he = (de = (ue = t.value) == null ? void 0 : ue.query) == null ? void 0 : de.btns) != null && he.group ? (n(), S(o(Ge), { key: 0 }, {
|
|
1579
|
+
default: y(() => [
|
|
1580
|
+
(n(!0), q(P, null, Y(R(), (ve) => p(M.$slots, ve.props.slot, {}, () => [
|
|
1581
|
+
(n(), S(Ae(ve)))
|
|
1582
|
+
], !0)), 256))
|
|
1583
|
+
]),
|
|
1584
|
+
_: 3
|
|
1585
|
+
})) : (n(!0), q(P, { key: 1 }, Y(R(), (ve) => p(M.$slots, ve.props.slot, {}, () => [
|
|
1586
|
+
(n(), S(Ae(ve)))
|
|
1587
|
+
], !0)), 256)),
|
|
1588
|
+
p(M.$slots, "q-btns", {}, void 0, !0)
|
|
1589
|
+
], 64))
|
|
1590
|
+
], 4)
|
|
1591
|
+
];
|
|
1592
|
+
}),
|
|
1593
|
+
_: 3
|
|
1594
|
+
})) : $e("", !0)
|
|
1595
|
+
];
|
|
1596
|
+
}),
|
|
1590
1597
|
_: 3
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1598
|
+
}, 16),
|
|
1599
|
+
((pe = (fe = (ie = t.value) == null ? void 0 : ie.query) == null ? void 0 : fe.container) == null ? void 0 : pe.inline) === !1 ? (n(), q("div", {
|
|
1600
|
+
key: 0,
|
|
1601
|
+
style: Oe((V = (m = t.value.query) == null ? void 0 : m.btns) == null ? void 0 : V.style)
|
|
1602
|
+
}, [
|
|
1603
|
+
t.value.query.group ? (n(), S(o(Ge), { key: 0 }, {
|
|
1604
|
+
default: y(() => [
|
|
1605
|
+
(n(!0), q(P, null, Y(R(), (i) => p(M.$slots, i.props.slot, {}, () => [
|
|
1606
|
+
(n(), S(Ae(i)))
|
|
1607
|
+
], !0)), 256)),
|
|
1608
|
+
p(M.$slots, "q-btns", {}, void 0, !0)
|
|
1597
1609
|
]),
|
|
1598
1610
|
_: 3
|
|
1599
|
-
})) : (n(
|
|
1600
|
-
(n(),
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
(n(), O(xe(N({ slots: V.$slots }, !0))))
|
|
1617
|
-
]),
|
|
1618
|
-
_: 1
|
|
1619
|
-
}, 16)), [
|
|
1620
|
-
[Ft, d.value]
|
|
1621
|
-
]) : be("", !0)
|
|
1622
|
-
])
|
|
1623
|
-
])) : be("", !0)
|
|
1624
|
-
];
|
|
1625
|
-
}),
|
|
1626
|
-
_: 1
|
|
1627
|
-
}),
|
|
1628
|
-
d.value && !((re = (ee = (I = t.value) == null ? void 0 : I.query) == null ? void 0 : ee.more) != null && re.hidden) && t.value.query.more.mode == 2 ? (n(), O(ae, S({
|
|
1629
|
-
key: 1,
|
|
1611
|
+
})) : (n(), q(P, { key: 1 }, [
|
|
1612
|
+
(h = (C = t.value.query) == null ? void 0 : C.btns) != null && h.group ? (n(), S(o(Ge), { key: 0 }, {
|
|
1613
|
+
default: y(() => [
|
|
1614
|
+
(n(!0), q(P, null, Y(R(), (i) => p(M.$slots, i.props.slot, {}, () => [
|
|
1615
|
+
(n(), S(Ae(i)))
|
|
1616
|
+
], !0)), 256))
|
|
1617
|
+
]),
|
|
1618
|
+
_: 3
|
|
1619
|
+
})) : (n(!0), q(P, { key: 1 }, Y(R(), (i) => p(M.$slots, i.props.slot, {}, () => [
|
|
1620
|
+
(n(), S(Ae(i)))
|
|
1621
|
+
], !0)), 256)),
|
|
1622
|
+
p(M.$slots, "q-btns", {}, void 0, !0)
|
|
1623
|
+
], 64))
|
|
1624
|
+
], 4)) : $e("", !0)
|
|
1625
|
+
], 4),
|
|
1626
|
+
d.value && !((ae = (ee = (I = t.value) == null ? void 0 : I.query) == null ? void 0 : ee.more) != null && ae.hidden) && t.value.query.more.mode == 2 ? (n(), S(re, F({
|
|
1627
|
+
key: 0,
|
|
1630
1628
|
modelValue: d.value,
|
|
1631
1629
|
"onUpdate:modelValue": b[4] || (b[4] = (i) => d.value = i),
|
|
1632
1630
|
title: "更多查询",
|
|
1633
1631
|
"show-close": !1
|
|
1634
1632
|
}, t.value.query.more.dialog), ce({
|
|
1635
|
-
default:
|
|
1636
|
-
|
|
1637
|
-
default:
|
|
1638
|
-
|
|
1633
|
+
default: y(() => [
|
|
1634
|
+
Z(o(We), F(o(ke)(t.value.query, (i) => !["query", "more", "reset"].includes(i)), { style: { width: "98%" } }), {
|
|
1635
|
+
default: y(() => [
|
|
1636
|
+
Z(mt, {
|
|
1639
1637
|
modelValue: t.value,
|
|
1640
1638
|
"onUpdate:modelValue": b[0] || (b[0] = (i) => t.value = i),
|
|
1641
|
-
info:
|
|
1642
|
-
"onUpdate:info": b[1] || (b[1] = (i) =>
|
|
1639
|
+
info: T.value,
|
|
1640
|
+
"onUpdate:info": b[1] || (b[1] = (i) => T.value = i),
|
|
1643
1641
|
more: !0
|
|
1644
1642
|
}, ce({ _: 2 }, [
|
|
1645
|
-
|
|
1646
|
-
name:
|
|
1647
|
-
fn:
|
|
1648
|
-
p(
|
|
1643
|
+
Y(M.$slots, (i, O, H) => ({
|
|
1644
|
+
name: O,
|
|
1645
|
+
fn: y((X) => [
|
|
1646
|
+
p(M.$slots, O, { model: t.value }, void 0, !0)
|
|
1649
1647
|
])
|
|
1650
1648
|
}))
|
|
1651
1649
|
]), 1032, ["modelValue", "info"])
|
|
@@ -1655,22 +1653,22 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1655
1653
|
]),
|
|
1656
1654
|
_: 2
|
|
1657
1655
|
}, [
|
|
1658
|
-
(s = (_ = (g = ($ = (
|
|
1656
|
+
(s = (_ = (g = ($ = (A = t.value) == null ? void 0 : A.query) == null ? void 0 : $.more) == null ? void 0 : g.dialog) == null ? void 0 : _.footer) != null && s.hidden ? void 0 : {
|
|
1659
1657
|
name: "footer",
|
|
1660
|
-
fn:
|
|
1661
|
-
|
|
1662
|
-
|
|
1658
|
+
fn: y(() => [
|
|
1659
|
+
J("div", Qe(ft(t.value.query.more.dialog.footer)), [
|
|
1660
|
+
Z(o(_e), F(t.value.query.query, {
|
|
1663
1661
|
onClick: b[2] || (b[2] = (i) => t.value.query.query.click())
|
|
1664
1662
|
}), {
|
|
1665
|
-
default:
|
|
1663
|
+
default: y(() => [
|
|
1666
1664
|
we(Ee(t.value.query.query.label), 1)
|
|
1667
1665
|
]),
|
|
1668
1666
|
_: 1
|
|
1669
1667
|
}, 16),
|
|
1670
|
-
|
|
1668
|
+
Z(o(_e), F(t.value.query.reset, {
|
|
1671
1669
|
onClick: b[3] || (b[3] = (i) => t.value.query.reset.click())
|
|
1672
1670
|
}), {
|
|
1673
|
-
default:
|
|
1671
|
+
default: y(() => [
|
|
1674
1672
|
we(Ee(t.value.query.reset.label), 1)
|
|
1675
1673
|
]),
|
|
1676
1674
|
_: 1
|
|
@@ -1679,14 +1677,38 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1679
1677
|
]),
|
|
1680
1678
|
key: "0"
|
|
1681
1679
|
}
|
|
1682
|
-
]), 1040, ["modelValue"])) :
|
|
1683
|
-
|
|
1680
|
+
]), 1040, ["modelValue"])) : $e("", !0),
|
|
1681
|
+
Z(Mt, {
|
|
1682
|
+
duration: 300,
|
|
1683
|
+
name: "nested",
|
|
1684
|
+
style: { padding: "10px" }
|
|
1685
|
+
}, {
|
|
1686
|
+
default: y(() => {
|
|
1687
|
+
var i, O, H;
|
|
1688
|
+
return [
|
|
1689
|
+
d.value && !((H = (O = (i = t.value) == null ? void 0 : i.query) == null ? void 0 : O.more) != null && H.hidden) && t.value.query.more.mode == 1 ? (n(), q("div", Gt, [
|
|
1690
|
+
J("div", Qt, [
|
|
1691
|
+
t.value.query.more.mode == 1 ? Vt((n(), S(o(We), Qe(F({ key: 0 }, o(ke)(t.value.query, (X) => !["query", "more", "reset"].includes(X)))), {
|
|
1692
|
+
default: y(() => [
|
|
1693
|
+
(n(), S(Ae(z({ slots: M.$slots }, !0))))
|
|
1694
|
+
]),
|
|
1695
|
+
_: 1
|
|
1696
|
+
}, 16)), [
|
|
1697
|
+
[Tt, d.value]
|
|
1698
|
+
]) : $e("", !0)
|
|
1699
|
+
])
|
|
1700
|
+
])) : $e("", !0)
|
|
1701
|
+
];
|
|
1702
|
+
}),
|
|
1703
|
+
_: 1
|
|
1704
|
+
})
|
|
1705
|
+
], 64);
|
|
1684
1706
|
};
|
|
1685
1707
|
}
|
|
1686
|
-
}, Jt = /* @__PURE__ */ Ue(Xt, [["__scopeId", "data-v-
|
|
1708
|
+
}, Jt = /* @__PURE__ */ Ue(Xt, [["__scopeId", "data-v-2a0af9cc"]]), Zt = { style: { padding: "0", margin: "0", "box-sizing": "border-box" } }, Kt = { style: { padding: "10px", "box-sizing": "border-box" } }, el = { style: { margin: "10px" } }, tl = {
|
|
1687
1709
|
style: { display: "flex", "flex-wrap": "wrap" },
|
|
1688
1710
|
id: "excelSortEl"
|
|
1689
|
-
}, ll = ["textContent"], ol = { style: { width: "100%", display: "flex", padding: "10px", "box-sizing": "border-box", "justify-content": "center", "border-top": "1px solid #dcdfe6" } },
|
|
1711
|
+
}, ll = ["textContent"], ol = { style: { width: "100%", display: "flex", padding: "10px", "box-sizing": "border-box", "justify-content": "center", "border-top": "1px solid #dcdfe6" } }, rl = {
|
|
1690
1712
|
__name: "check-excel-item",
|
|
1691
1713
|
props: {
|
|
1692
1714
|
items: Array,
|
|
@@ -1694,75 +1716,75 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1694
1716
|
},
|
|
1695
1717
|
emits: ["excel"],
|
|
1696
1718
|
setup(f, { emit: c }) {
|
|
1697
|
-
const t = f, e = c,
|
|
1698
|
-
|
|
1699
|
-
|
|
1719
|
+
const t = f, e = c, a = ye(t.items), d = () => {
|
|
1720
|
+
a.value.forEach((x) => {
|
|
1721
|
+
x.value = !0;
|
|
1700
1722
|
});
|
|
1701
|
-
},
|
|
1702
|
-
|
|
1703
|
-
|
|
1723
|
+
}, U = () => {
|
|
1724
|
+
a.value.forEach((x) => {
|
|
1725
|
+
x.value = !1;
|
|
1704
1726
|
});
|
|
1705
|
-
},
|
|
1706
|
-
e("excel",
|
|
1707
|
-
if (!
|
|
1727
|
+
}, T = () => {
|
|
1728
|
+
e("excel", a.value, (x, E = "excel.xls") => {
|
|
1729
|
+
if (!x) {
|
|
1708
1730
|
console.error("下载链接无效");
|
|
1709
1731
|
return;
|
|
1710
1732
|
}
|
|
1711
1733
|
try {
|
|
1712
1734
|
const D = document.createElement("a");
|
|
1713
|
-
D.href =
|
|
1735
|
+
D.href = x, D.download = E, D.style.display = "none", document.body.appendChild(D), D.click(), document.body.removeChild(D);
|
|
1714
1736
|
} catch (D) {
|
|
1715
1737
|
console.error("下载文件时出现错误:", D);
|
|
1716
1738
|
}
|
|
1717
1739
|
});
|
|
1718
1740
|
};
|
|
1719
1741
|
return Ne(() => {
|
|
1720
|
-
const
|
|
1742
|
+
const x = new bt(document.getElementById("excelSortEl"), {
|
|
1721
1743
|
animation: 150,
|
|
1722
1744
|
onEnd: () => {
|
|
1723
|
-
let D =
|
|
1745
|
+
let D = x.toArray();
|
|
1724
1746
|
console.log(D);
|
|
1725
1747
|
}
|
|
1726
|
-
}), E =
|
|
1727
|
-
|
|
1748
|
+
}), E = x;
|
|
1749
|
+
Ft(() => {
|
|
1728
1750
|
E && E.destroy();
|
|
1729
1751
|
});
|
|
1730
|
-
}), (
|
|
1731
|
-
const D =
|
|
1752
|
+
}), (x, E) => {
|
|
1753
|
+
const D = L("el-divider"), z = L("el-alert"), te = L("el-checkbox"), R = L("el-button");
|
|
1732
1754
|
return n(), q("div", Zt, [
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1755
|
+
J("div", Kt, [
|
|
1756
|
+
J("div", el, [
|
|
1757
|
+
J("a", {
|
|
1736
1758
|
onClick: d,
|
|
1737
1759
|
style: { cursor: "pointer" }
|
|
1738
1760
|
}, "全选"),
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
onClick:
|
|
1761
|
+
Z(D, { direction: "vertical" }),
|
|
1762
|
+
J("a", {
|
|
1763
|
+
onClick: U,
|
|
1742
1764
|
style: { cursor: "pointer" }
|
|
1743
1765
|
}, "全不选")
|
|
1744
1766
|
]),
|
|
1745
|
-
|
|
1767
|
+
Z(z, {
|
|
1746
1768
|
title: "拖动列标题可以改变表格列的生成顺序 !",
|
|
1747
1769
|
type: "warning",
|
|
1748
1770
|
"show-icon": "",
|
|
1749
1771
|
closable: !1,
|
|
1750
1772
|
style: { "margin-bottom": "10px" }
|
|
1751
1773
|
}),
|
|
1752
|
-
E[0] || (E[0] =
|
|
1753
|
-
|
|
1754
|
-
(n(!0), q(
|
|
1774
|
+
E[0] || (E[0] = J("div", { style: { margin: "1px 0" } }, null, -1)),
|
|
1775
|
+
J("div", tl, [
|
|
1776
|
+
(n(!0), q(P, null, Y(a.value, (M) => (n(), S(te, {
|
|
1755
1777
|
class: "check-box-hover",
|
|
1756
1778
|
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" },
|
|
1757
|
-
"data-id":
|
|
1758
|
-
modelValue:
|
|
1759
|
-
"onUpdate:modelValue": (b) =>
|
|
1760
|
-
key:
|
|
1761
|
-
title:
|
|
1779
|
+
"data-id": M.key,
|
|
1780
|
+
modelValue: M.value,
|
|
1781
|
+
"onUpdate:modelValue": (b) => M.value = b,
|
|
1782
|
+
key: M.key,
|
|
1783
|
+
title: M.label
|
|
1762
1784
|
}, {
|
|
1763
|
-
default:
|
|
1764
|
-
|
|
1765
|
-
textContent: Ee(
|
|
1785
|
+
default: y(() => [
|
|
1786
|
+
J("span", {
|
|
1787
|
+
textContent: Ee(M.label),
|
|
1766
1788
|
style: { display: "block", "text-overflow": "ellipsis", width: "95px", overflow: "hidden" }
|
|
1767
1789
|
}, null, 8, ll)
|
|
1768
1790
|
]),
|
|
@@ -1770,13 +1792,13 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1770
1792
|
}, 1032, ["data-id", "modelValue", "onUpdate:modelValue", "title"]))), 128))
|
|
1771
1793
|
])
|
|
1772
1794
|
]),
|
|
1773
|
-
|
|
1774
|
-
|
|
1795
|
+
J("div", ol, [
|
|
1796
|
+
Z(R, {
|
|
1775
1797
|
type: "primary",
|
|
1776
|
-
onClick:
|
|
1777
|
-
disabled:
|
|
1798
|
+
onClick: T,
|
|
1799
|
+
disabled: a.value.filter((M) => M.value).length < 1
|
|
1778
1800
|
}, {
|
|
1779
|
-
default:
|
|
1801
|
+
default: y(() => [
|
|
1780
1802
|
we(Ee(t.commitText), 1)
|
|
1781
1803
|
]),
|
|
1782
1804
|
_: 1
|
|
@@ -1785,36 +1807,36 @@ const et = /* @__PURE__ */ Ut(jt), Rt = {
|
|
|
1785
1807
|
]);
|
|
1786
1808
|
};
|
|
1787
1809
|
}
|
|
1788
|
-
},
|
|
1789
|
-
|
|
1810
|
+
}, al = /* @__PURE__ */ Ue(rl, [["__scopeId", "data-v-51dfb7ef"]]), xe = new Bt("gyc");
|
|
1811
|
+
xe.version(1).stores({
|
|
1790
1812
|
tableInfo: "++id,[user+page+key],user,page,key,showCol,width,sort",
|
|
1791
1813
|
tableList: "++id,name"
|
|
1792
1814
|
});
|
|
1793
1815
|
async function He(f, c, t, e = {}) {
|
|
1794
|
-
if (await
|
|
1795
|
-
let d = await
|
|
1796
|
-
return await
|
|
1816
|
+
if (await xe.tableInfo.where({ user: f, page: c, key: t }).count() > 0) {
|
|
1817
|
+
let d = await xe.tableInfo.where({ user: f, page: c, key: t }).first();
|
|
1818
|
+
return await xe.tableInfo.put({ ...d, ...e }), "update success";
|
|
1797
1819
|
} else {
|
|
1798
1820
|
let d = { showCol: !0, width: "auto", sort: 0, ...e };
|
|
1799
|
-
return await
|
|
1821
|
+
return await xe.tableInfo.add({ user: f, page: c, key: t, ...d }), "add success";
|
|
1800
1822
|
}
|
|
1801
1823
|
}
|
|
1802
1824
|
async function nl(f, c) {
|
|
1803
|
-
return await
|
|
1825
|
+
return await xe.tableInfo.where({ user: f, page: c }).toArray();
|
|
1804
1826
|
}
|
|
1805
1827
|
async function ul(f, c) {
|
|
1806
1828
|
try {
|
|
1807
|
-
const t = await
|
|
1829
|
+
const t = await xe.tableInfo.where({ user: f, page: c }).delete();
|
|
1808
1830
|
return console.log("删除了" + t + "条数据"), t;
|
|
1809
1831
|
} catch (t) {
|
|
1810
1832
|
throw console.error("删除表格项设置信息时出错:", t), t;
|
|
1811
1833
|
}
|
|
1812
1834
|
}
|
|
1813
1835
|
async function sl(f) {
|
|
1814
|
-
return await
|
|
1836
|
+
return await xe.tableList.where({ name: f }).first();
|
|
1815
1837
|
}
|
|
1816
1838
|
async function il(f) {
|
|
1817
|
-
return typeof f == "string" && (f = { name: f }), await
|
|
1839
|
+
return typeof f == "string" && (f = { name: f }), await xe.tableList.add(f), "add success";
|
|
1818
1840
|
}
|
|
1819
1841
|
const dl = {
|
|
1820
1842
|
style: { margin: "10px" },
|
|
@@ -1835,13 +1857,13 @@ const dl = {
|
|
|
1835
1857
|
}),
|
|
1836
1858
|
emits: ["update:modelValue"],
|
|
1837
1859
|
setup(f) {
|
|
1838
|
-
const c = f, t =
|
|
1860
|
+
const c = f, t = ye([]), e = Ie(f, "modelValue"), a = async (E, D) => {
|
|
1839
1861
|
E ? e.value[D].showCol = !0 : e.value[D].showCol = !1;
|
|
1840
1862
|
try {
|
|
1841
|
-
const
|
|
1842
|
-
console.log(
|
|
1843
|
-
} catch (
|
|
1844
|
-
console.error("列显示状态保存信息时出错:",
|
|
1863
|
+
const z = await He(e.value.table.user, c.name, D, { showCol: E });
|
|
1864
|
+
console.log(z);
|
|
1865
|
+
} catch (z) {
|
|
1866
|
+
console.error("列显示状态保存信息时出错:", z), Te({
|
|
1845
1867
|
type: "error",
|
|
1846
1868
|
message: "列显示状态保存信息失败!"
|
|
1847
1869
|
});
|
|
@@ -1855,14 +1877,14 @@ const dl = {
|
|
|
1855
1877
|
//
|
|
1856
1878
|
sort: !0,
|
|
1857
1879
|
onEnd: () => {
|
|
1858
|
-
D.toArray().forEach(async (te,
|
|
1859
|
-
e.value[te].sort =
|
|
1860
|
-
let
|
|
1880
|
+
D.toArray().forEach(async (te, R) => {
|
|
1881
|
+
e.value[te].sort = R;
|
|
1882
|
+
let M = e.value[te].width || "auto";
|
|
1861
1883
|
try {
|
|
1862
|
-
const b = await He(e.value.table.user, c.name, te, { sort:
|
|
1884
|
+
const b = await He(e.value.table.user, c.name, te, { sort: R, width: M });
|
|
1863
1885
|
console.log(b);
|
|
1864
1886
|
} catch (b) {
|
|
1865
|
-
console.error("列排序和宽度保存信息时出错:", b),
|
|
1887
|
+
console.error("列排序和宽度保存信息时出错:", b), Te({
|
|
1866
1888
|
type: "error",
|
|
1867
1889
|
message: "列排序和宽度保存信息失败!"
|
|
1868
1890
|
});
|
|
@@ -1871,7 +1893,7 @@ const dl = {
|
|
|
1871
1893
|
}
|
|
1872
1894
|
});
|
|
1873
1895
|
}
|
|
1874
|
-
},
|
|
1896
|
+
}, U = async () => {
|
|
1875
1897
|
try {
|
|
1876
1898
|
for (const E of t.value) {
|
|
1877
1899
|
E.showCol = !0, e.value[E.value].showCol = !0;
|
|
@@ -1883,30 +1905,30 @@ const dl = {
|
|
|
1883
1905
|
console.log(D);
|
|
1884
1906
|
}
|
|
1885
1907
|
} catch (E) {
|
|
1886
|
-
console.error("全选列保存信息时出错:", E),
|
|
1908
|
+
console.error("全选列保存信息时出错:", E), Te({
|
|
1887
1909
|
type: "error",
|
|
1888
1910
|
message: "全选列保存信息失败!"
|
|
1889
1911
|
});
|
|
1890
1912
|
}
|
|
1891
|
-
},
|
|
1913
|
+
}, T = async () => {
|
|
1892
1914
|
try {
|
|
1893
1915
|
const E = t.value.filter((D) => !D.alwaysShow);
|
|
1894
1916
|
for (const D of E) {
|
|
1895
1917
|
D.showCol = !1, e.value[D.value].showCol = !1;
|
|
1896
|
-
const
|
|
1918
|
+
const z = await He(e.value.table.user, c.name, D.value, {
|
|
1897
1919
|
showCol: !1,
|
|
1898
1920
|
width: D.width,
|
|
1899
1921
|
sort: D.sort
|
|
1900
1922
|
});
|
|
1901
|
-
console.log(
|
|
1923
|
+
console.log(z);
|
|
1902
1924
|
}
|
|
1903
1925
|
} catch (E) {
|
|
1904
|
-
console.error("清除列保存信息时出错:", E),
|
|
1926
|
+
console.error("清除列保存信息时出错:", E), Te({
|
|
1905
1927
|
type: "error",
|
|
1906
1928
|
message: "清除列保存信息失败!"
|
|
1907
1929
|
});
|
|
1908
1930
|
}
|
|
1909
|
-
},
|
|
1931
|
+
}, x = () => {
|
|
1910
1932
|
vt.confirm("确定要复位吗?", "提示", {
|
|
1911
1933
|
confirmButtonText: "确定",
|
|
1912
1934
|
cancelButtonText: "取消",
|
|
@@ -1915,7 +1937,7 @@ const dl = {
|
|
|
1915
1937
|
ul(e.value.table.user, c.name).then((E) => {
|
|
1916
1938
|
console.log(E), window.location.reload();
|
|
1917
1939
|
}).catch((E) => {
|
|
1918
|
-
console.error("复位操作出错:", E),
|
|
1940
|
+
console.error("复位操作出错:", E), Te({
|
|
1919
1941
|
type: "info",
|
|
1920
1942
|
message: "复位失败!"
|
|
1921
1943
|
});
|
|
@@ -1932,39 +1954,39 @@ const dl = {
|
|
|
1932
1954
|
width: D.width || "auto"
|
|
1933
1955
|
})).sort((E, D) => E.sort - D.sort), d();
|
|
1934
1956
|
}), (E, D) => {
|
|
1935
|
-
const
|
|
1957
|
+
const z = L("el-divider"), te = L("el-alert"), R = L("el-checkbox");
|
|
1936
1958
|
return n(), q("div", null, [
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1959
|
+
J("div", dl, [
|
|
1960
|
+
J("a", { onClick: U }, "全选"),
|
|
1961
|
+
Z(z, { direction: "vertical" }),
|
|
1962
|
+
J("a", { onClick: T }, "全不选"),
|
|
1963
|
+
Z(z, { direction: "vertical" }),
|
|
1964
|
+
J("a", { onClick: x }, "复位")
|
|
1943
1965
|
]),
|
|
1944
|
-
|
|
1966
|
+
Z(te, {
|
|
1945
1967
|
title: "拖动表格列标题可以改变表格列显示顺序 !",
|
|
1946
1968
|
type: "warning",
|
|
1947
1969
|
"show-icon": "",
|
|
1948
1970
|
closable: !1,
|
|
1949
1971
|
style: { "margin-bottom": "10px" }
|
|
1950
1972
|
}),
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
(n(!0), q(
|
|
1954
|
-
modelValue:
|
|
1955
|
-
"onUpdate:modelValue": (b) =>
|
|
1956
|
-
"data-id":
|
|
1957
|
-
class: gt(["check-box-hover",
|
|
1958
|
-
onChange: (b) =>
|
|
1973
|
+
J("div", null, [
|
|
1974
|
+
J("div", cl, [
|
|
1975
|
+
(n(!0), q(P, null, Y(t.value, (M) => (n(), S(R, {
|
|
1976
|
+
modelValue: M.showCol,
|
|
1977
|
+
"onUpdate:modelValue": (b) => M.showCol = b,
|
|
1978
|
+
"data-id": M.value,
|
|
1979
|
+
class: gt(["check-box-hover", M.value == "control" ? "filtered" : ""]),
|
|
1980
|
+
onChange: (b) => a(b, M.value),
|
|
1959
1981
|
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" },
|
|
1960
|
-
value:
|
|
1961
|
-
title:
|
|
1962
|
-
disabled:
|
|
1963
|
-
key:
|
|
1982
|
+
value: M.value,
|
|
1983
|
+
title: M.label,
|
|
1984
|
+
disabled: M.alwaysShow,
|
|
1985
|
+
key: M.value
|
|
1964
1986
|
}, {
|
|
1965
|
-
default:
|
|
1966
|
-
|
|
1967
|
-
textContent: Ee(
|
|
1987
|
+
default: y(() => [
|
|
1988
|
+
J("span", {
|
|
1989
|
+
textContent: Ee(M.label),
|
|
1968
1990
|
style: { display: "block", "text-overflow": "ellipsis", width: "95px", overflow: "hidden" }
|
|
1969
1991
|
}, null, 8, fl)
|
|
1970
1992
|
]),
|
|
@@ -1975,13 +1997,13 @@ const dl = {
|
|
|
1975
1997
|
]);
|
|
1976
1998
|
};
|
|
1977
1999
|
}
|
|
1978
|
-
}, pl = /* @__PURE__ */ Ue(ml, [["__scopeId", "data-v-c423ede0"]]), vl = { class: "g-table-container" },
|
|
2000
|
+
}, pl = /* @__PURE__ */ Ue(ml, [["__scopeId", "data-v-c423ede0"]]), vl = { class: "g-table-container" }, yl = {
|
|
1979
2001
|
key: 0,
|
|
1980
2002
|
class: "table-query-container"
|
|
1981
|
-
},
|
|
2003
|
+
}, hl = { class: "table-container" }, gl = ["src"], bl = ["innerHTML"], $l = { key: 0 }, El = { style: { display: "flex", "margin-top": "-2px" } }, wl = { style: { display: "flex", flex: "1" } }, _l = {
|
|
1982
2004
|
style: { display: "flex", "justify-content": "center", width: "100%", height: "100%" },
|
|
1983
2005
|
id: "table-form"
|
|
1984
|
-
}, kl = { key: 1 }, Cl = { style: { display: "flex" } }, Dl = { style: { display: "flex", flex: "1" } },
|
|
2006
|
+
}, kl = { key: 1 }, Cl = { style: { display: "flex" } }, Dl = { style: { display: "flex", flex: "1" } }, Ml = /* @__PURE__ */ Object.assign({
|
|
1985
2007
|
name: "g-table",
|
|
1986
2008
|
inheritAttrs: !1
|
|
1987
2009
|
}, {
|
|
@@ -1995,10 +2017,10 @@ const dl = {
|
|
|
1995
2017
|
}),
|
|
1996
2018
|
emits: /* @__PURE__ */ Be(["load", "open", "delete", "submit", "reset", "download", "row-save"], ["update:modelValue"]),
|
|
1997
2019
|
setup(f, { emit: c }) {
|
|
1998
|
-
var Ce,
|
|
1999
|
-
const t = c, e = Ie(f, "modelValue"),
|
|
2000
|
-
d.value = Object.fromEntries(
|
|
2001
|
-
const
|
|
2020
|
+
var Ce, Fe, De, u, N, se, Me;
|
|
2021
|
+
const t = c, e = Ie(f, "modelValue"), a = at("options"), d = ye({}), U = Object.entries(e.value).filter(([l, r]) => (r == null ? void 0 : r.search) !== void 0).map(([l, r]) => [l, r.value]);
|
|
2022
|
+
d.value = Object.fromEntries(U);
|
|
2023
|
+
const T = ye(!1), x = ["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"], E = ye([]), D = f, z = nt(), te = ye({}), R = ye([]), M = {
|
|
2002
2024
|
autoWatch: !1,
|
|
2003
2025
|
data: [],
|
|
2004
2026
|
border: !0,
|
|
@@ -2007,30 +2029,30 @@ const dl = {
|
|
|
2007
2029
|
fit: !1,
|
|
2008
2030
|
type: "hidden",
|
|
2009
2031
|
load: () => {
|
|
2010
|
-
let { currentPage: l, pageSize:
|
|
2032
|
+
let { currentPage: l, pageSize: r } = e.value.table.page;
|
|
2011
2033
|
try {
|
|
2012
|
-
t("load", { currentPage: l, pageSize:
|
|
2034
|
+
t("load", { currentPage: l, pageSize: r, ...d.value }, (v, B, { fields: G = [], sums: Q = {} } = {}) => {
|
|
2013
2035
|
var me, Se;
|
|
2014
2036
|
if (!Array.isArray(v)) {
|
|
2015
|
-
console.error("从 load 事件回调中接收到的数据不是数组格式。"),
|
|
2037
|
+
console.error("从 load 事件回调中接收到的数据不是数组格式。"), Te.error("数据加载失败,请检查数据格式。");
|
|
2016
2038
|
return;
|
|
2017
2039
|
}
|
|
2018
2040
|
if (typeof B != "number") {
|
|
2019
|
-
console.error("从 load 事件回调中接收到的 total 不是数字格式。"),
|
|
2041
|
+
console.error("从 load 事件回调中接收到的 total 不是数字格式。"), Te.error("数据加载失败,请检查数据格式。");
|
|
2020
2042
|
return;
|
|
2021
2043
|
}
|
|
2022
|
-
e.value.table.data = v, ((Se = (me = e.value.control) == null ? void 0 : me.add) == null ? void 0 : Se.inline) === !0 && e.value.table.data.unshift(ie), e.value.table.page.total = B,
|
|
2044
|
+
e.value.table.data = v, ((Se = (me = e.value.control) == null ? void 0 : me.add) == null ? void 0 : Se.inline) === !0 && e.value.table.data.unshift(ie), e.value.table.page.total = B, R.value = G, te.value = Q, de();
|
|
2023
2045
|
});
|
|
2024
2046
|
} catch (v) {
|
|
2025
|
-
console.error("触发 load 事件时出现错误:", v),
|
|
2047
|
+
console.error("触发 load 事件时出现错误:", v), Te.error("数据加载时出现错误,请稍后重试。");
|
|
2026
2048
|
}
|
|
2027
2049
|
},
|
|
2028
|
-
onHeaderDragend: (l,
|
|
2050
|
+
onHeaderDragend: (l, r, v) => {
|
|
2029
2051
|
var B;
|
|
2030
2052
|
He((B = e.value.table) == null ? void 0 : B.user, D.name, v.property, { width: l });
|
|
2031
2053
|
},
|
|
2032
|
-
onRowDblclick: (l,
|
|
2033
|
-
e.value.table.dblclickType == "edit" ? C(l,
|
|
2054
|
+
onRowDblclick: (l, r, v) => {
|
|
2055
|
+
e.value.table.dblclickType == "edit" ? C(l, r, v, e) : e.value.table.dblclickType == "view" && I(l, r, v, e);
|
|
2034
2056
|
},
|
|
2035
2057
|
style: { "min-height": "100px", backgroundColor: "var(--el-bg-color)" },
|
|
2036
2058
|
page: {
|
|
@@ -2054,15 +2076,15 @@ const dl = {
|
|
|
2054
2076
|
}
|
|
2055
2077
|
},
|
|
2056
2078
|
dblclickType: "edit",
|
|
2057
|
-
"summary-method": ({ columns: l, data:
|
|
2058
|
-
onSortChange: ({ column: l, prop:
|
|
2079
|
+
"summary-method": ({ columns: l, data: r }, v) => v,
|
|
2080
|
+
onSortChange: ({ column: l, prop: r, order: v }, B) => {
|
|
2059
2081
|
}
|
|
2060
2082
|
};
|
|
2061
|
-
e.value.table =
|
|
2062
|
-
|
|
2063
|
-
|
|
2083
|
+
e.value.table = Ve(
|
|
2084
|
+
M,
|
|
2085
|
+
a == null ? void 0 : a.table,
|
|
2064
2086
|
e.value.table,
|
|
2065
|
-
|
|
2087
|
+
z
|
|
2066
2088
|
// 继承父组件的属性
|
|
2067
2089
|
);
|
|
2068
2090
|
const b = {
|
|
@@ -2070,7 +2092,7 @@ const dl = {
|
|
|
2070
2092
|
label: "操作",
|
|
2071
2093
|
width: 250,
|
|
2072
2094
|
fixed: "right",
|
|
2073
|
-
style: { ...(
|
|
2095
|
+
style: { ...(Fe = (Ce = e.value) == null ? void 0 : Ce.control) == null ? void 0 : Fe.style },
|
|
2074
2096
|
validate: (l) => !0,
|
|
2075
2097
|
add: {
|
|
2076
2098
|
label: "新增",
|
|
@@ -2086,25 +2108,25 @@ const dl = {
|
|
|
2086
2108
|
text: !0,
|
|
2087
2109
|
type: "success",
|
|
2088
2110
|
mode: "dialog",
|
|
2089
|
-
auth: (l,
|
|
2111
|
+
auth: (l, r, v) => !1
|
|
2090
2112
|
},
|
|
2091
2113
|
edit: {
|
|
2092
2114
|
label: "编辑",
|
|
2093
2115
|
text: !0,
|
|
2094
2116
|
type: "primary",
|
|
2095
2117
|
mode: "dialog",
|
|
2096
|
-
auth: (l,
|
|
2097
|
-
var B,
|
|
2098
|
-
return ((Q = (
|
|
2118
|
+
auth: (l, r, v) => {
|
|
2119
|
+
var B, G, Q;
|
|
2120
|
+
return ((Q = (G = (B = e.value) == null ? void 0 : B.control) == null ? void 0 : G.add) == null ? void 0 : Q.inline) === !1;
|
|
2099
2121
|
}
|
|
2100
2122
|
},
|
|
2101
2123
|
delete: {
|
|
2102
2124
|
text: !0,
|
|
2103
2125
|
label: "删除",
|
|
2104
2126
|
type: "danger",
|
|
2105
|
-
auth: (l,
|
|
2106
|
-
var B,
|
|
2107
|
-
return !(((Q = (
|
|
2127
|
+
auth: (l, r, v) => {
|
|
2128
|
+
var B, G, Q;
|
|
2129
|
+
return !(((Q = (G = (B = e.value) == null ? void 0 : B.control) == null ? void 0 : G.add) == null ? void 0 : Q.inline) === !0 && v === 0);
|
|
2108
2130
|
},
|
|
2109
2131
|
dialog: {
|
|
2110
2132
|
message: "此操作将永久删除该文件, 是否继续?",
|
|
@@ -2134,37 +2156,37 @@ const dl = {
|
|
|
2134
2156
|
sort: -1,
|
|
2135
2157
|
addLabel: "新增",
|
|
2136
2158
|
auth: () => {
|
|
2137
|
-
var l,
|
|
2138
|
-
return ((v = (
|
|
2159
|
+
var l, r, v;
|
|
2160
|
+
return ((v = (r = (l = e.value) == null ? void 0 : l.control) == null ? void 0 : r.add) == null ? void 0 : v.inline) === !0;
|
|
2139
2161
|
}
|
|
2140
2162
|
}
|
|
2141
2163
|
};
|
|
2142
|
-
e.value.control =
|
|
2164
|
+
e.value.control = Ve(
|
|
2143
2165
|
b,
|
|
2144
|
-
|
|
2166
|
+
a == null ? void 0 : a.control,
|
|
2145
2167
|
(De = e.value) == null ? void 0 : De.control
|
|
2146
2168
|
);
|
|
2147
2169
|
const w = {
|
|
2148
2170
|
type: "hidden",
|
|
2149
2171
|
minWidth: 120,
|
|
2150
2172
|
align: "center",
|
|
2151
|
-
formatter: (l,
|
|
2173
|
+
formatter: (l, r, v, B) => v
|
|
2152
2174
|
};
|
|
2153
|
-
e.value.tableColumns =
|
|
2175
|
+
e.value.tableColumns = Ve(
|
|
2154
2176
|
w,
|
|
2155
|
-
|
|
2177
|
+
a == null ? void 0 : a.tableColumns,
|
|
2156
2178
|
(u = e.value) == null ? void 0 : u.tableColumns
|
|
2157
2179
|
);
|
|
2158
|
-
const
|
|
2180
|
+
const re = {
|
|
2159
2181
|
type: "hidden",
|
|
2160
2182
|
disabled: void 0,
|
|
2161
2183
|
footer: { hidden: !1 },
|
|
2162
2184
|
modalState: void 0
|
|
2163
2185
|
};
|
|
2164
|
-
e.value.form =
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
(
|
|
2186
|
+
e.value.form = Ve(
|
|
2187
|
+
re,
|
|
2188
|
+
a == null ? void 0 : a.form,
|
|
2189
|
+
(N = e.value) == null ? void 0 : N.form
|
|
2168
2190
|
);
|
|
2169
2191
|
const K = {
|
|
2170
2192
|
type: "hidden",
|
|
@@ -2173,9 +2195,9 @@ const dl = {
|
|
|
2173
2195
|
width: "100%"
|
|
2174
2196
|
}
|
|
2175
2197
|
};
|
|
2176
|
-
e.value.formItems =
|
|
2198
|
+
e.value.formItems = Ve(
|
|
2177
2199
|
K,
|
|
2178
|
-
|
|
2200
|
+
a == null ? void 0 : a.formItems,
|
|
2179
2201
|
(se = e == null ? void 0 : e.value) == null ? void 0 : se.formItems
|
|
2180
2202
|
);
|
|
2181
2203
|
const ne = {
|
|
@@ -2186,89 +2208,89 @@ const dl = {
|
|
|
2186
2208
|
size: 700,
|
|
2187
2209
|
fullScreen: !1
|
|
2188
2210
|
};
|
|
2189
|
-
e.value.dialog =
|
|
2211
|
+
e.value.dialog = Ve(
|
|
2190
2212
|
ne,
|
|
2191
|
-
|
|
2192
|
-
(
|
|
2213
|
+
a == null ? void 0 : a.dialog,
|
|
2214
|
+
(Me = e.value) == null ? void 0 : Me.dialog
|
|
2193
2215
|
);
|
|
2194
|
-
const ie = Object.fromEntries(Object.entries(ke(e.value, (l,
|
|
2195
|
-
let v =
|
|
2196
|
-
if (l.decimals && !isNaN(parseFloat(
|
|
2197
|
-
const
|
|
2216
|
+
const ie = Object.fromEntries(Object.entries(ke(e.value, (l, r) => r.type != "control" && r.editor !== !1 && r.type != "hidden")).map(([l, r]) => [l, r.value])), fe = (l, r) => {
|
|
2217
|
+
let v = r;
|
|
2218
|
+
if (l.decimals && !isNaN(parseFloat(r)) && (typeof l.decimals == "number" ? v = parseFloat(v).toFixed(l.decimals) : typeof l.decimals == "object" && l.decimals.num && (l.decimals.pad ? v = parseFloat(v).toFixed(l.decimals.num) : v = parseFloat(parseFloat(v).toFixed(l.decimals.num)).toString())), ["date", "datetime", "time", "time-select"].includes(l.type) && et(r).isValid()) {
|
|
2219
|
+
const G = {
|
|
2198
2220
|
date: "YYYY-MM-DD",
|
|
2199
2221
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
2200
2222
|
time: "HH:mm:ss"
|
|
2201
2223
|
};
|
|
2202
|
-
v = l.format ? et(v).format(l.format) : et(v).format(
|
|
2224
|
+
v = l.format ? et(v).format(l.format) : et(v).format(G[l.type]);
|
|
2203
2225
|
}
|
|
2204
|
-
return l.type === "money" && (l.align = l.align || "right", l.width = l.width || 130, v = `<span title="${
|
|
2226
|
+
return l.type === "money" && (l.align = l.align || "right", l.width = l.width || 130, v = `<span title="${rt(parseFloat(v))}">${Rl(parseFloat(v))}</span>`), l.prefix && v && (v = `<span>${l.prefix}${v}</span>`), l.suffix && v && (v = `${v}<span>${l.suffix}</span>`), v;
|
|
2205
2227
|
}, pe = (l) => {
|
|
2206
2228
|
d.value = l.value;
|
|
2207
2229
|
}, m = (l) => {
|
|
2208
2230
|
d.value = l, e.value.table.load();
|
|
2209
|
-
},
|
|
2210
|
-
var
|
|
2211
|
-
e.value.form.modalState = "add", (
|
|
2231
|
+
}, V = (l) => {
|
|
2232
|
+
var r, v;
|
|
2233
|
+
e.value.form.modalState = "add", (r = e.value.control) != null && r.validate("add", { m: l }) && ((v = e.value.control.add) != null && v.click ? e.value.control.add.click(l) : e.value.control.add.inline === !0 ? (console.log(ie), e.value.table.data.unshift(ie), t("open", "row-add", { initFormData: ie })) : (e.value.form.disabled = !1, e.value.dialog.mode = e.value.control.add.mode, e.value.dialog.title = e.value.control.add.label, Object.keys(ie).forEach((B) => {
|
|
2212
2234
|
e.value[B] && (e.value[B].value = ie[B]);
|
|
2213
|
-
}),
|
|
2214
|
-
}, C = (l,
|
|
2215
|
-
var
|
|
2216
|
-
e.value.form.modalState = "edit", (
|
|
2235
|
+
}), T.value = !0, t("open", "add", { m: l })));
|
|
2236
|
+
}, C = (l, r, v, B) => {
|
|
2237
|
+
var G, Q;
|
|
2238
|
+
e.value.form.modalState = "edit", (G = e.value.control) != null && G.validate("edit", { row: l, column: r, $index: v, m: B }) && ((Q = e.value.control.edit) != null && Q.click ? e.value.control.edit.click(l, r, v, B) : (e.value.form.disabled = !1, e.value.dialog.mode = e.value.control.edit.mode, e.value.dialog.title = e.value.control.edit.label, Object.keys(l).forEach((me) => {
|
|
2217
2239
|
e.value[me] && (e.value[me].value = l[me]);
|
|
2218
|
-
}),
|
|
2219
|
-
},
|
|
2220
|
-
var
|
|
2221
|
-
if ((
|
|
2240
|
+
}), T.value = !0, t("open", "edit", { m: B, row: l, column: r, $index: v })));
|
|
2241
|
+
}, h = (l, r, v, B) => {
|
|
2242
|
+
var G, Q;
|
|
2243
|
+
if ((G = e.value.control) != null && G.validate("delete", { row: l, column: r, $index: v, m: B }))
|
|
2222
2244
|
if ((Q = e.value.control.delete) != null && Q.click)
|
|
2223
|
-
e.value.control.delete.click(l,
|
|
2245
|
+
e.value.control.delete.click(l, r, v, B);
|
|
2224
2246
|
else {
|
|
2225
2247
|
let { message: me, title: Se, options: Pe } = e.value.control.delete.dialog;
|
|
2226
2248
|
vt.confirm(me, Se, Pe).then(() => {
|
|
2227
|
-
t("delete", { row: l, column:
|
|
2228
|
-
|
|
2249
|
+
t("delete", { row: l, column: r, $index: v }, (ze) => {
|
|
2250
|
+
ze && (e.value.table.data.splice(v, 1), e.value.table.page.total--);
|
|
2229
2251
|
});
|
|
2230
2252
|
}).catch(() => {
|
|
2231
2253
|
});
|
|
2232
2254
|
}
|
|
2233
|
-
}, I = (l,
|
|
2234
|
-
var
|
|
2235
|
-
e.value.form.modalState = void 0, (
|
|
2255
|
+
}, I = (l, r, v, B) => {
|
|
2256
|
+
var G, Q;
|
|
2257
|
+
e.value.form.modalState = void 0, (G = e.value.control) != null && G.validate("view", { row: l, column: r, $index: v, m: B }) && ((Q = e.value.control.view) != null && Q.click ? e.value.control.view.click(l, r, v, B) : (e.value.form.disabled = !0, e.value.dialog.mode = e.value.control.view.mode, e.value.dialog.title = e.value.control.view.label, Object.keys(l).forEach((me) => {
|
|
2236
2258
|
e.value[me] && (e.value[me].value = l[me]);
|
|
2237
|
-
}),
|
|
2238
|
-
}, ee = (l,
|
|
2239
|
-
var
|
|
2240
|
-
(
|
|
2259
|
+
}), T.value = !0, t("open", "view", { m: B, row: l, column: r, $index: v })));
|
|
2260
|
+
}, ee = (l, r, v, B) => {
|
|
2261
|
+
var G;
|
|
2262
|
+
(G = e.value.control.save) != null && G.click ? e.value.control.save.click(l, r, v, B) : t("row-save", { row: l, column: r, $index: v, data: e.value.table.data }, (Q) => {
|
|
2241
2263
|
Q && e.value.table.load();
|
|
2242
2264
|
});
|
|
2243
|
-
},
|
|
2244
|
-
t("submit", e.value.form.modalState, l,
|
|
2245
|
-
v && (
|
|
2265
|
+
}, ae = (l, r) => {
|
|
2266
|
+
t("submit", e.value.form.modalState, l, r, (v) => {
|
|
2267
|
+
v && (T.value = !1, r.table.load());
|
|
2246
2268
|
});
|
|
2247
|
-
},
|
|
2269
|
+
}, A = (l) => {
|
|
2248
2270
|
t("reset", l);
|
|
2249
|
-
}, $ = (l,
|
|
2271
|
+
}, $ = (l, r) => {
|
|
2250
2272
|
var v;
|
|
2251
2273
|
if ((v = l.control.download) != null && v.click)
|
|
2252
|
-
l.control.download.click(l,
|
|
2274
|
+
l.control.download.click(l, r);
|
|
2253
2275
|
else {
|
|
2254
2276
|
let B = ot({
|
|
2255
2277
|
title: l.control.download.label,
|
|
2256
2278
|
size: 480,
|
|
2257
2279
|
width: 600,
|
|
2258
2280
|
slots: {
|
|
2259
|
-
default: () => qe(
|
|
2260
|
-
items:
|
|
2281
|
+
default: () => qe(al, {
|
|
2282
|
+
items: r,
|
|
2261
2283
|
commitText: l.control.download.excelLabel,
|
|
2262
|
-
onExcel: (
|
|
2263
|
-
t("download",
|
|
2284
|
+
onExcel: (G, Q) => {
|
|
2285
|
+
t("download", G, Q), B();
|
|
2264
2286
|
}
|
|
2265
2287
|
})
|
|
2266
2288
|
}
|
|
2267
2289
|
}, l.control.download.mode);
|
|
2268
2290
|
}
|
|
2269
2291
|
}, g = (l) => {
|
|
2270
|
-
var
|
|
2271
|
-
(
|
|
2292
|
+
var r;
|
|
2293
|
+
(r = l.control.setting) != null && r.click ? l.control.setting.click(l) : ot({
|
|
2272
2294
|
title: l.control.setting.label,
|
|
2273
2295
|
size: 470,
|
|
2274
2296
|
width: 600,
|
|
@@ -2280,162 +2302,162 @@ const dl = {
|
|
|
2280
2302
|
}
|
|
2281
2303
|
}, l.control.setting.mode);
|
|
2282
2304
|
}, _ = e.value.control, s = [
|
|
2283
|
-
{ type: "add", func:
|
|
2305
|
+
{ type: "add", func: V },
|
|
2284
2306
|
{ type: "download", func: $ },
|
|
2285
2307
|
{ type: "setting", func: g },
|
|
2286
2308
|
{ type: "view", func: I },
|
|
2287
2309
|
{ type: "edit", func: C },
|
|
2288
|
-
{ type: "delete", func:
|
|
2310
|
+
{ type: "delete", func: h },
|
|
2289
2311
|
{ type: "save", func: ee }
|
|
2290
|
-
], i = (l) => s.filter((
|
|
2291
|
-
var B,
|
|
2312
|
+
], i = (l) => s.filter((r) => l.includes(r.type)).map(({ type: r, func: v }) => {
|
|
2313
|
+
var B, G, Q;
|
|
2292
2314
|
return {
|
|
2293
|
-
name: `control-${
|
|
2294
|
-
attr: _ == null ? void 0 : _[
|
|
2315
|
+
name: `control-${r}`,
|
|
2316
|
+
attr: _ == null ? void 0 : _[r],
|
|
2295
2317
|
func: v,
|
|
2296
|
-
label: (B = _ == null ? void 0 : _[
|
|
2297
|
-
sort: ((
|
|
2298
|
-
groupName: ((Q = _ == null ? void 0 : _[
|
|
2318
|
+
label: (B = _ == null ? void 0 : _[r]) == null ? void 0 : B.label,
|
|
2319
|
+
sort: ((G = _ == null ? void 0 : _[r]) == null ? void 0 : G.sort) || 0,
|
|
2320
|
+
groupName: ((Q = _ == null ? void 0 : _[r]) == null ? void 0 : Q.groupName) || "default"
|
|
2299
2321
|
};
|
|
2300
|
-
}).sort((
|
|
2322
|
+
}).sort((r, v) => r.sort - v.sort), O = (l) => i(l).reduce((r, v) => {
|
|
2301
2323
|
const B = v.groupName || "default";
|
|
2302
|
-
return
|
|
2324
|
+
return r[B] || (r[B] = []), r[B].push(v), r;
|
|
2303
2325
|
}, {}), H = Ye(() => Object.fromEntries(
|
|
2304
|
-
Object.entries(e.value).filter(([l,
|
|
2305
|
-
)),
|
|
2306
|
-
const v = (B,
|
|
2326
|
+
Object.entries(e.value).filter(([l, r]) => r.type !== "hidden").filter(([l, r]) => r.visible !== !1).filter(([l, r]) => r.showCol !== !1).map(([l, r]) => (r.sort = typeof r.sort == "number" ? r.sort : 0, [l, r])).sort((l, r) => l[1].sort - r[1].sort)
|
|
2327
|
+
)), X = ye({}), ue = (l, r) => {
|
|
2328
|
+
const v = (B, G) => {
|
|
2307
2329
|
for (const Q of B) {
|
|
2308
|
-
if (Q.value ==
|
|
2330
|
+
if (Q.value == G) return Q.label;
|
|
2309
2331
|
if (Q.children) {
|
|
2310
|
-
const me = v(Q.children,
|
|
2332
|
+
const me = v(Q.children, G);
|
|
2311
2333
|
if (me) return me;
|
|
2312
2334
|
}
|
|
2313
2335
|
}
|
|
2314
2336
|
return null;
|
|
2315
2337
|
};
|
|
2316
2338
|
if (l.getDicts) {
|
|
2317
|
-
const B =
|
|
2318
|
-
return
|
|
2319
|
-
|
|
2339
|
+
const B = r.toString();
|
|
2340
|
+
return X.value[B] ? (l.options = X.value[B], l.formatter || (l.formatter = (G, Q, me, Se) => l.options && v(l.options, me) || me), Promise.resolve()) : l.getDicts(e.value.table.data).then((G) => {
|
|
2341
|
+
X.value[B] = G, l.options = G, l.formatter || (l.formatter = (Q, me, Se, Pe) => l.options && v(l.options, Se) || Se);
|
|
2320
2342
|
});
|
|
2321
2343
|
}
|
|
2322
2344
|
return Promise.resolve();
|
|
2323
2345
|
}, de = () => {
|
|
2324
2346
|
const l = [];
|
|
2325
|
-
Object.keys(e.value).forEach((
|
|
2326
|
-
if (e.value[
|
|
2327
|
-
const v = ue(e.value[
|
|
2347
|
+
Object.keys(e.value).forEach((r) => {
|
|
2348
|
+
if (e.value[r].getDicts) {
|
|
2349
|
+
const v = ue(e.value[r], r).then(() => {
|
|
2328
2350
|
e.value.table.data.forEach((B) => {
|
|
2329
|
-
var
|
|
2330
|
-
if (e.value[
|
|
2331
|
-
const Q = B[
|
|
2332
|
-
B[
|
|
2351
|
+
var G;
|
|
2352
|
+
if (e.value[r].getDicts && ((G = e.value[r]) == null ? void 0 : G.forceString) !== !1) {
|
|
2353
|
+
const Q = B[r];
|
|
2354
|
+
B[r] = Q != null ? Q.toString() : Q;
|
|
2333
2355
|
}
|
|
2334
2356
|
});
|
|
2335
2357
|
}).catch((B) => {
|
|
2336
|
-
console.error(`加载字典${
|
|
2358
|
+
console.error(`加载字典${r}出错:`, B);
|
|
2337
2359
|
});
|
|
2338
2360
|
l.push(v);
|
|
2339
2361
|
}
|
|
2340
|
-
}), Promise.all(l).catch((
|
|
2341
|
-
console.error("字典加载过程中发生错误:",
|
|
2362
|
+
}), Promise.all(l).catch((r) => {
|
|
2363
|
+
console.error("字典加载过程中发生错误:", r);
|
|
2342
2364
|
});
|
|
2343
|
-
}, he = (l,
|
|
2344
|
-
var
|
|
2345
|
-
return l.table ? (
|
|
2346
|
-
},
|
|
2365
|
+
}, he = (l, r, v, B) => {
|
|
2366
|
+
var G, Q;
|
|
2367
|
+
return l.table ? (G = l.table(r, v, B)) != null && G.auth ? (Q = l.table(r, v, B)) == null ? void 0 : Q.auth(r, v, B) : !0 : !1;
|
|
2368
|
+
}, ve = (l, r) => l.name === "control-save" && r === 0 && e.value.control.add.inline === !0 ? l.attr.addLabel : l.label;
|
|
2347
2369
|
return St(() => {
|
|
2348
2370
|
e.value.table.autoWatch && e.value.table.load();
|
|
2349
2371
|
}), Ne(async () => {
|
|
2350
2372
|
var l;
|
|
2351
|
-
if (E.value = Object.values(e.value).filter((
|
|
2352
|
-
|
|
2373
|
+
if (E.value = Object.values(e.value).filter((r) => r.type !== "hidden").filter((r) => r.type !== "control").filter((r) => r.visible !== !1).map((r) => ({ key: r.key || "", label: r.label, value: !0 })), !((l = e.value.table) != null && l.user)) {
|
|
2374
|
+
Te.error("必须给使用此表格的用户一个名字!");
|
|
2353
2375
|
return;
|
|
2354
2376
|
}
|
|
2355
2377
|
if (!D.name) {
|
|
2356
|
-
|
|
2378
|
+
Te.error("必须给表格一个唯一的name属性");
|
|
2357
2379
|
return;
|
|
2358
2380
|
}
|
|
2359
2381
|
try {
|
|
2360
|
-
let
|
|
2361
|
-
if (
|
|
2362
|
-
if (D.name !==
|
|
2363
|
-
|
|
2382
|
+
let r = await sl(D.name);
|
|
2383
|
+
if (r) {
|
|
2384
|
+
if (D.name !== r.name) {
|
|
2385
|
+
Te.error("此表格已经存在,请换一个名字!");
|
|
2364
2386
|
return;
|
|
2365
2387
|
}
|
|
2366
2388
|
} else
|
|
2367
2389
|
await il({ name: D.name });
|
|
2368
|
-
} catch (
|
|
2369
|
-
console.error("检查表格名称时出现错误:",
|
|
2390
|
+
} catch (r) {
|
|
2391
|
+
console.error("检查表格名称时出现错误:", r), Te.error("检查表格名称时出现错误,请稍后重试。");
|
|
2370
2392
|
}
|
|
2371
2393
|
try {
|
|
2372
|
-
const
|
|
2373
|
-
|
|
2394
|
+
const r = await nl(e.value.table.user, D.name);
|
|
2395
|
+
r && r.forEach((v) => {
|
|
2374
2396
|
e.value[v.key] && (e.value[v.key].width = v.width, e.value[v.key].showCol = v.showCol, e.value[v.key].sort = v.sort);
|
|
2375
2397
|
});
|
|
2376
|
-
} catch (
|
|
2377
|
-
console.error("Error fetching table column settings:",
|
|
2398
|
+
} catch (r) {
|
|
2399
|
+
console.error("Error fetching table column settings:", r);
|
|
2378
2400
|
}
|
|
2379
2401
|
e.value.table.autoWatch || e.value.table.load();
|
|
2380
|
-
}), (l,
|
|
2381
|
-
var
|
|
2382
|
-
const v =
|
|
2383
|
-
return n(), q(
|
|
2384
|
-
|
|
2385
|
-
((ut = (
|
|
2402
|
+
}), (l, r) => {
|
|
2403
|
+
var ze, ut, st, it, dt;
|
|
2404
|
+
const v = L("el-button-group"), B = L("el-table-column"), G = L("el-table"), Q = L("el-pagination"), me = L("el-icon"), Se = L("el-dialog"), Pe = L("el-drawer");
|
|
2405
|
+
return n(), q(P, null, [
|
|
2406
|
+
J("div", vl, [
|
|
2407
|
+
((ut = (ze = e.value) == null ? void 0 : ze.query) == null ? void 0 : ut.hidden) != !0 ? (n(), q("div", yl, [
|
|
2386
2408
|
p(l.$slots, "query", {}, () => [
|
|
2387
|
-
|
|
2409
|
+
Z(Jt, {
|
|
2388
2410
|
modelValue: e.value,
|
|
2389
|
-
"onUpdate:modelValue":
|
|
2411
|
+
"onUpdate:modelValue": r[0] || (r[0] = (j) => e.value = j),
|
|
2390
2412
|
onQuery: m,
|
|
2391
2413
|
onReset: pe
|
|
2392
2414
|
}, ce({
|
|
2393
|
-
"q-btns":
|
|
2415
|
+
"q-btns": y(() => [
|
|
2394
2416
|
p(l.$slots, "q-btns", {}, () => [
|
|
2395
|
-
(n(!0), q(
|
|
2396
|
-
le == "default" ? (n(!0), q(
|
|
2417
|
+
(n(!0), q(P, null, Y(O(["add", "download", "setting"]), (j, le) => (n(), q(P, null, [
|
|
2418
|
+
le == "default" ? (n(!0), q(P, { key: 0 }, Y(j, (k) => (n(), q(P, null, [
|
|
2397
2419
|
p(l.$slots, k.name + "-left", {}, void 0, !0),
|
|
2398
2420
|
(k.name === "control-add" ? k.attr.auth() && k.attr.inline === !1 : k.attr.auth()) ? p(l.$slots, k.name, { key: 0 }, () => [
|
|
2399
|
-
k.label ? (n(),
|
|
2421
|
+
k.label ? (n(), S(o(_e), F({
|
|
2400
2422
|
key: 0,
|
|
2401
2423
|
ref_for: !0
|
|
2402
2424
|
}, k.attr, {
|
|
2403
2425
|
onClick: (W) => k.func(e.value, E.value)
|
|
2404
2426
|
}), {
|
|
2405
|
-
default:
|
|
2427
|
+
default: y(() => [
|
|
2406
2428
|
we(Ee(k.label), 1)
|
|
2407
2429
|
]),
|
|
2408
2430
|
_: 2
|
|
2409
|
-
}, 1040, ["onClick"])) : (n(),
|
|
2431
|
+
}, 1040, ["onClick"])) : (n(), S(o(_e), F({
|
|
2410
2432
|
key: 1,
|
|
2411
2433
|
ref_for: !0
|
|
2412
2434
|
}, k.attr, {
|
|
2413
2435
|
onClick: (W) => k.func(e.value, E.value)
|
|
2414
2436
|
}), null, 16, ["onClick"]))
|
|
2415
|
-
], !0) :
|
|
2437
|
+
], !0) : $e("", !0),
|
|
2416
2438
|
p(l.$slots, k.name + "-right", {}, void 0, !0)
|
|
2417
|
-
], 64))), 256)) : (n(),
|
|
2418
|
-
default:
|
|
2419
|
-
(n(!0), q(
|
|
2439
|
+
], 64))), 256)) : (n(), S(v, { key: 1 }, {
|
|
2440
|
+
default: y(() => [
|
|
2441
|
+
(n(!0), q(P, null, Y(j, (k) => (n(), q(P, null, [
|
|
2420
2442
|
p(l.$slots, k.name + "-left", {}, void 0, !0),
|
|
2421
2443
|
(k.name === "control-add" ? k.attr.auth() && k.attr.inline === !1 : k.attr.auth()) ? p(l.$slots, k.name, { key: 0 }, () => [
|
|
2422
|
-
k.label ? (n(),
|
|
2444
|
+
k.label ? (n(), S(o(_e), F({
|
|
2423
2445
|
key: 0,
|
|
2424
2446
|
ref_for: !0
|
|
2425
2447
|
}, k.attr, {
|
|
2426
2448
|
onClick: (W) => k.func(e.value, E.value)
|
|
2427
2449
|
}), {
|
|
2428
|
-
default:
|
|
2450
|
+
default: y(() => [
|
|
2429
2451
|
we(Ee(k.label), 1)
|
|
2430
2452
|
]),
|
|
2431
2453
|
_: 2
|
|
2432
|
-
}, 1040, ["onClick"])) : (n(),
|
|
2454
|
+
}, 1040, ["onClick"])) : (n(), S(o(_e), F({
|
|
2433
2455
|
key: 1,
|
|
2434
2456
|
ref_for: !0
|
|
2435
2457
|
}, k.attr, {
|
|
2436
2458
|
onClick: (W) => k.func(e.value, E.value)
|
|
2437
2459
|
}), null, 16, ["onClick"]))
|
|
2438
|
-
], !0) :
|
|
2460
|
+
], !0) : $e("", !0),
|
|
2439
2461
|
p(l.$slots, k.name + "-right", {}, void 0, !0)
|
|
2440
2462
|
], 64))), 256))
|
|
2441
2463
|
]),
|
|
@@ -2446,73 +2468,73 @@ const dl = {
|
|
|
2446
2468
|
]),
|
|
2447
2469
|
_: 2
|
|
2448
2470
|
}, [
|
|
2449
|
-
|
|
2471
|
+
Y(l.$slots, (j, le, k) => ({
|
|
2450
2472
|
name: le,
|
|
2451
|
-
fn:
|
|
2473
|
+
fn: y((W) => [
|
|
2452
2474
|
p(l.$slots, le, { model: e.value }, void 0, !0)
|
|
2453
2475
|
])
|
|
2454
2476
|
}))
|
|
2455
2477
|
]), 1032, ["modelValue"])
|
|
2456
2478
|
], !0)
|
|
2457
|
-
])) :
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
"summary-method": (
|
|
2461
|
-
onSortChange:
|
|
2479
|
+
])) : $e("", !0),
|
|
2480
|
+
J("div", hl, [
|
|
2481
|
+
Z(G, F({ ...l.$attrs, ...o(ke)(e.value.table, (j) => !["dblclickType", "page"].includes(j)) }, {
|
|
2482
|
+
"summary-method": (j) => e.value.table["summary-method"](j, { fields: R.value, sums: te.value }),
|
|
2483
|
+
onSortChange: r[1] || (r[1] = (j) => {
|
|
2462
2484
|
var le, k;
|
|
2463
|
-
e.value.table.onSortChange(
|
|
2485
|
+
e.value.table.onSortChange(j, d.value), ((le = j == null ? void 0 : j.column) == null ? void 0 : le.sortable) === "custom" && ((k = e.value.table) == null || k.load());
|
|
2464
2486
|
})
|
|
2465
2487
|
}), {
|
|
2466
|
-
append:
|
|
2488
|
+
append: y(() => [
|
|
2467
2489
|
p(l.$slots, "append", {}, void 0, !0)
|
|
2468
2490
|
]),
|
|
2469
|
-
empty:
|
|
2491
|
+
empty: y(() => [
|
|
2470
2492
|
p(l.$slots, "empty", {}, void 0, !0)
|
|
2471
2493
|
]),
|
|
2472
|
-
default:
|
|
2494
|
+
default: y(() => [
|
|
2473
2495
|
p(l.$slots, "default", {}, () => [
|
|
2474
|
-
(n(!0), q(
|
|
2496
|
+
(n(!0), q(P, null, Y(H.value, (j, le) => (n(), S(B, F({
|
|
2475
2497
|
prop: le,
|
|
2476
2498
|
key: le,
|
|
2477
2499
|
ref_for: !0
|
|
2478
|
-
}, { ...e.value.tableColumns, ...o(ke)(
|
|
2479
|
-
header:
|
|
2500
|
+
}, { ...e.value.tableColumns, ...o(ke)(j, (k) => x.includes(k)) }, { "header-align": "center" }), ce({
|
|
2501
|
+
header: y(({ column: k, $index: W }) => [
|
|
2480
2502
|
le == "control" ? p(l.$slots, `${le}-header`, {
|
|
2481
2503
|
key: 0,
|
|
2482
2504
|
column: k,
|
|
2483
2505
|
$index: W
|
|
2484
2506
|
}, () => [
|
|
2485
|
-
|
|
2507
|
+
r[10] || (r[10] = J("span", null, "操作", -1))
|
|
2486
2508
|
], !0) : p(l.$slots, `${le}-header`, {
|
|
2487
2509
|
key: 1,
|
|
2488
2510
|
column: k,
|
|
2489
2511
|
$index: W
|
|
2490
2512
|
}, void 0, !0)
|
|
2491
2513
|
]),
|
|
2492
|
-
"filter-icon":
|
|
2514
|
+
"filter-icon": y((k) => [
|
|
2493
2515
|
p(l.$slots, `${le}-filter-icon`, { data: k }, void 0, !0)
|
|
2494
2516
|
]),
|
|
2495
2517
|
_: 2
|
|
2496
2518
|
}, [
|
|
2497
|
-
|
|
2519
|
+
j.type === "image" ? {
|
|
2498
2520
|
name: "default",
|
|
2499
|
-
fn:
|
|
2521
|
+
fn: y(({ row: k, column: W, $index: oe }) => [
|
|
2500
2522
|
p(l.$slots, `${le}`, {
|
|
2501
2523
|
row: k,
|
|
2502
2524
|
column: W,
|
|
2503
2525
|
$index: oe
|
|
2504
2526
|
}, () => [
|
|
2505
|
-
|
|
2527
|
+
J("img", F({
|
|
2506
2528
|
style: { width: "80px", height: "80px", "object-fit": "cover", "border-radius": "3px" },
|
|
2507
|
-
src:
|
|
2529
|
+
src: j.value,
|
|
2508
2530
|
ref_for: !0
|
|
2509
|
-
},
|
|
2531
|
+
}, j), null, 16, gl)
|
|
2510
2532
|
], !0)
|
|
2511
2533
|
]),
|
|
2512
2534
|
key: "0"
|
|
2513
|
-
} :
|
|
2535
|
+
} : j.type === "expand" ? {
|
|
2514
2536
|
name: "default",
|
|
2515
|
-
fn:
|
|
2537
|
+
fn: y(({ row: k, column: W, $index: oe }) => [
|
|
2516
2538
|
p(l.$slots, `${le}`, {
|
|
2517
2539
|
row: k,
|
|
2518
2540
|
column: W,
|
|
@@ -2520,14 +2542,14 @@ const dl = {
|
|
|
2520
2542
|
}, void 0, !0)
|
|
2521
2543
|
]),
|
|
2522
2544
|
key: "1"
|
|
2523
|
-
} :
|
|
2545
|
+
} : j.type == "control" ? {
|
|
2524
2546
|
name: "default",
|
|
2525
|
-
fn:
|
|
2526
|
-
var je,
|
|
2547
|
+
fn: y(({ row: k, column: W, $index: oe }) => {
|
|
2548
|
+
var je, Le;
|
|
2527
2549
|
return [
|
|
2528
|
-
|
|
2550
|
+
J("div", {
|
|
2529
2551
|
class: gt(["control", (je = e.value.control) == null ? void 0 : je.class]),
|
|
2530
|
-
style:
|
|
2552
|
+
style: Oe((Le = e.value.control) == null ? void 0 : Le.style)
|
|
2531
2553
|
}, [
|
|
2532
2554
|
p(l.$slots, "control", {}, () => [
|
|
2533
2555
|
p(l.$slots, "control-left", {
|
|
@@ -2535,73 +2557,73 @@ const dl = {
|
|
|
2535
2557
|
column: W,
|
|
2536
2558
|
$index: oe
|
|
2537
2559
|
}, void 0, !0),
|
|
2538
|
-
(n(!0), q(
|
|
2539
|
-
Je == "default" ? (n(!0), q(
|
|
2540
|
-
p(l.$slots,
|
|
2560
|
+
(n(!0), q(P, null, Y(O(["view", "edit", "delete", "save"]), (Re, Je) => (n(), q(P, null, [
|
|
2561
|
+
Je == "default" ? (n(!0), q(P, { key: 0 }, Y(Re, (ge) => (n(), q(P, null, [
|
|
2562
|
+
p(l.$slots, ge.name + "-left", {
|
|
2541
2563
|
row: k,
|
|
2542
2564
|
column: W,
|
|
2543
2565
|
$index: oe
|
|
2544
2566
|
}, void 0, !0),
|
|
2545
|
-
|
|
2567
|
+
ge.attr.auth(k, W, oe) ? p(l.$slots, ge.name, {
|
|
2546
2568
|
key: 0,
|
|
2547
2569
|
row: k,
|
|
2548
2570
|
column: W,
|
|
2549
2571
|
$index: oe
|
|
2550
2572
|
}, () => [
|
|
2551
|
-
|
|
2573
|
+
ge.label ? (n(), S(o(_e), F({
|
|
2552
2574
|
key: 0,
|
|
2553
2575
|
ref_for: !0
|
|
2554
|
-
},
|
|
2555
|
-
onClick: (Ze) =>
|
|
2576
|
+
}, ge.attr, {
|
|
2577
|
+
onClick: (Ze) => ge.func(k, W, oe, e.value)
|
|
2556
2578
|
}), {
|
|
2557
|
-
default:
|
|
2558
|
-
we(Ee(
|
|
2579
|
+
default: y(() => [
|
|
2580
|
+
we(Ee(ve(ge, oe)), 1)
|
|
2559
2581
|
]),
|
|
2560
2582
|
_: 2
|
|
2561
|
-
}, 1040, ["onClick"])) : (n(),
|
|
2583
|
+
}, 1040, ["onClick"])) : (n(), S(o(_e), F({
|
|
2562
2584
|
key: 1,
|
|
2563
2585
|
ref_for: !0
|
|
2564
|
-
},
|
|
2565
|
-
onClick: (Ze) =>
|
|
2586
|
+
}, ge.attr, {
|
|
2587
|
+
onClick: (Ze) => ge.func(k, W, oe, e.value)
|
|
2566
2588
|
}), null, 16, ["onClick"]))
|
|
2567
|
-
], !0) :
|
|
2568
|
-
p(l.$slots,
|
|
2589
|
+
], !0) : $e("", !0),
|
|
2590
|
+
p(l.$slots, ge.name + "-right", {
|
|
2569
2591
|
row: k,
|
|
2570
2592
|
column: W,
|
|
2571
2593
|
$index: oe
|
|
2572
2594
|
}, void 0, !0)
|
|
2573
|
-
], 64))), 256)) : (n(),
|
|
2574
|
-
default:
|
|
2575
|
-
(n(!0), q(
|
|
2576
|
-
p(l.$slots,
|
|
2595
|
+
], 64))), 256)) : (n(), S(v, { key: 1 }, {
|
|
2596
|
+
default: y(() => [
|
|
2597
|
+
(n(!0), q(P, null, Y(Re, (ge) => (n(), q(P, null, [
|
|
2598
|
+
p(l.$slots, ge.name + "-left", {
|
|
2577
2599
|
row: k,
|
|
2578
2600
|
column: W,
|
|
2579
2601
|
$index: oe
|
|
2580
2602
|
}, void 0, !0),
|
|
2581
|
-
|
|
2603
|
+
ge.attr.auth(k, W, oe) ? p(l.$slots, ge.name, {
|
|
2582
2604
|
key: 0,
|
|
2583
2605
|
row: k,
|
|
2584
2606
|
column: W,
|
|
2585
2607
|
$index: oe
|
|
2586
2608
|
}, () => [
|
|
2587
|
-
|
|
2609
|
+
ge.label ? (n(), S(o(_e), F({
|
|
2588
2610
|
key: 0,
|
|
2589
2611
|
ref_for: !0
|
|
2590
|
-
},
|
|
2591
|
-
onClick: (Ze) =>
|
|
2612
|
+
}, ge.attr, {
|
|
2613
|
+
onClick: (Ze) => ge.func(k, W, oe, e.value)
|
|
2592
2614
|
}), {
|
|
2593
|
-
default:
|
|
2594
|
-
we(Ee(
|
|
2615
|
+
default: y(() => [
|
|
2616
|
+
we(Ee(ve(ge, oe)), 1)
|
|
2595
2617
|
]),
|
|
2596
2618
|
_: 2
|
|
2597
|
-
}, 1040, ["onClick"])) : (n(),
|
|
2619
|
+
}, 1040, ["onClick"])) : (n(), S(o(_e), F({
|
|
2598
2620
|
key: 1,
|
|
2599
2621
|
ref_for: !0
|
|
2600
|
-
},
|
|
2601
|
-
onClick: (Ze) =>
|
|
2622
|
+
}, ge.attr, {
|
|
2623
|
+
onClick: (Ze) => ge.func(k, W, oe, e.value)
|
|
2602
2624
|
}), null, 16, ["onClick"]))
|
|
2603
|
-
], !0) :
|
|
2604
|
-
p(l.$slots,
|
|
2625
|
+
], !0) : $e("", !0),
|
|
2626
|
+
p(l.$slots, ge.name + "-right", {
|
|
2605
2627
|
row: k,
|
|
2606
2628
|
column: W,
|
|
2607
2629
|
$index: oe
|
|
@@ -2621,10 +2643,10 @@ const dl = {
|
|
|
2621
2643
|
];
|
|
2622
2644
|
}),
|
|
2623
2645
|
key: "2"
|
|
2624
|
-
} :
|
|
2646
|
+
} : j.type != "selection" && j.type != "index" ? {
|
|
2625
2647
|
name: "default",
|
|
2626
|
-
fn:
|
|
2627
|
-
he(
|
|
2648
|
+
fn: y(({ row: k, column: W, $index: oe }) => [
|
|
2649
|
+
he(j, k, W, oe) && oe != -1 ? p(l.$slots, `${le}`, {
|
|
2628
2650
|
key: 0,
|
|
2629
2651
|
row: k,
|
|
2630
2652
|
column: W,
|
|
@@ -2632,24 +2654,24 @@ const dl = {
|
|
|
2632
2654
|
}, () => {
|
|
2633
2655
|
var je;
|
|
2634
2656
|
return [
|
|
2635
|
-
(n(),
|
|
2657
|
+
(n(), S(Xe, {
|
|
2636
2658
|
modelValue: k[le],
|
|
2637
|
-
"onUpdate:modelValue": (
|
|
2638
|
-
item:
|
|
2659
|
+
"onUpdate:modelValue": (Le) => k[le] = Le,
|
|
2660
|
+
item: j == null ? void 0 : j.table(k, W, oe),
|
|
2639
2661
|
ctrlKey: le,
|
|
2640
2662
|
key: le + "-" + oe,
|
|
2641
|
-
ctrlType: (je =
|
|
2663
|
+
ctrlType: (je = j.table(k, W, oe)) != null && je.type ? j.table(k, W, oe).type : j.type,
|
|
2642
2664
|
model: e.value,
|
|
2643
2665
|
class: "g-ctrl-container",
|
|
2644
2666
|
t: "t",
|
|
2645
2667
|
formInfo: k
|
|
2646
2668
|
}, ce({ _: 2 }, [
|
|
2647
|
-
|
|
2648
|
-
name:
|
|
2649
|
-
fn:
|
|
2650
|
-
p(l.$slots,
|
|
2669
|
+
Y(l.$slots, (Le, Re) => ({
|
|
2670
|
+
name: Re,
|
|
2671
|
+
fn: y((Je) => [
|
|
2672
|
+
p(l.$slots, Re, {
|
|
2651
2673
|
data: Je,
|
|
2652
|
-
item:
|
|
2674
|
+
item: j,
|
|
2653
2675
|
model: e.value
|
|
2654
2676
|
}, void 0, !0)
|
|
2655
2677
|
])
|
|
@@ -2662,8 +2684,8 @@ const dl = {
|
|
|
2662
2684
|
column: W,
|
|
2663
2685
|
$index: oe
|
|
2664
2686
|
}, () => [
|
|
2665
|
-
|
|
2666
|
-
innerHTML: fe(
|
|
2687
|
+
J("div", {
|
|
2688
|
+
innerHTML: fe(j, W.formatter(k, W, k[le], oe))
|
|
2667
2689
|
}, null, 8, bl)
|
|
2668
2690
|
], !0)
|
|
2669
2691
|
]),
|
|
@@ -2674,14 +2696,14 @@ const dl = {
|
|
|
2674
2696
|
]),
|
|
2675
2697
|
_: 3
|
|
2676
2698
|
}, 16, ["summary-method"]),
|
|
2677
|
-
(dt = (it = (st = e.value) == null ? void 0 : st.table) == null ? void 0 : it.page) != null && dt.hidden ?
|
|
2678
|
-
|
|
2699
|
+
(dt = (it = (st = e.value) == null ? void 0 : st.table) == null ? void 0 : it.page) != null && dt.hidden ? $e("", !0) : p(l.$slots, "page", { key: 0 }, () => [
|
|
2700
|
+
Z(Q, F({
|
|
2679
2701
|
"page-size": e.value.table.page.pageSize,
|
|
2680
|
-
"onUpdate:pageSize":
|
|
2702
|
+
"onUpdate:pageSize": r[2] || (r[2] = (j) => e.value.table.page.pageSize = j),
|
|
2681
2703
|
"current-page": e.value.table.page.currentPage,
|
|
2682
|
-
"onUpdate:currentPage":
|
|
2704
|
+
"onUpdate:currentPage": r[3] || (r[3] = (j) => e.value.table.page.currentPage = j)
|
|
2683
2705
|
}, e.value.table.page), {
|
|
2684
|
-
default:
|
|
2706
|
+
default: y(() => [
|
|
2685
2707
|
p(l.$slots, "table-page", {}, void 0, !0)
|
|
2686
2708
|
]),
|
|
2687
2709
|
_: 3
|
|
@@ -2689,66 +2711,66 @@ const dl = {
|
|
|
2689
2711
|
], !0)
|
|
2690
2712
|
])
|
|
2691
2713
|
]),
|
|
2692
|
-
e.value.dialog.mode == "dialog" &&
|
|
2693
|
-
|
|
2694
|
-
modelValue:
|
|
2695
|
-
"onUpdate:modelValue":
|
|
2714
|
+
e.value.dialog.mode == "dialog" && T.value ? (n(), q("div", $l, [
|
|
2715
|
+
Z(Se, F({
|
|
2716
|
+
modelValue: T.value,
|
|
2717
|
+
"onUpdate:modelValue": r[7] || (r[7] = (j) => T.value = j),
|
|
2696
2718
|
fullscreen: e.value.dialog.fullScreen
|
|
2697
|
-
}, o(ke)(e.value.dialog, (
|
|
2719
|
+
}, o(ke)(e.value.dialog, (j) => !["size"].includes(j)), {
|
|
2698
2720
|
width: o(wt)(e.value.dialog.width) + 35
|
|
2699
2721
|
}), {
|
|
2700
|
-
header:
|
|
2701
|
-
var
|
|
2722
|
+
header: y(() => {
|
|
2723
|
+
var j, le, k, W;
|
|
2702
2724
|
return [
|
|
2703
|
-
|
|
2704
|
-
|
|
2725
|
+
J("div", El, [
|
|
2726
|
+
J("div", wl, [
|
|
2705
2727
|
p(l.$slots, "f-header", {}, () => [
|
|
2706
|
-
|
|
2728
|
+
J("div", null, Ee(e.value.dialog.title), 1)
|
|
2707
2729
|
], !0)
|
|
2708
2730
|
]),
|
|
2709
|
-
((le = (
|
|
2731
|
+
((le = (j = e.value) == null ? void 0 : j.dialog) == null ? void 0 : le.fullScreen) === !1 ? (n(), q("div", {
|
|
2710
2732
|
key: 0,
|
|
2711
|
-
onClick:
|
|
2733
|
+
onClick: r[4] || (r[4] = (oe) => {
|
|
2712
2734
|
e.value.dialog.fullScreen = !0;
|
|
2713
2735
|
}),
|
|
2714
2736
|
class: "max"
|
|
2715
2737
|
}, [
|
|
2716
|
-
|
|
2717
|
-
default:
|
|
2718
|
-
|
|
2738
|
+
Z(me, null, {
|
|
2739
|
+
default: y(() => [
|
|
2740
|
+
Z(o(Ot))
|
|
2719
2741
|
]),
|
|
2720
2742
|
_: 1
|
|
2721
2743
|
})
|
|
2722
|
-
])) :
|
|
2744
|
+
])) : $e("", !0),
|
|
2723
2745
|
((W = (k = e.value) == null ? void 0 : k.dialog) == null ? void 0 : W.fullScreen) === !0 ? (n(), q("div", {
|
|
2724
2746
|
key: 1,
|
|
2725
|
-
onClick:
|
|
2747
|
+
onClick: r[5] || (r[5] = (oe) => {
|
|
2726
2748
|
e.value.dialog.fullScreen = !1;
|
|
2727
2749
|
}),
|
|
2728
2750
|
class: "max"
|
|
2729
2751
|
}, [
|
|
2730
|
-
|
|
2731
|
-
default:
|
|
2732
|
-
|
|
2752
|
+
Z(me, null, {
|
|
2753
|
+
default: y(() => [
|
|
2754
|
+
Z(o(At))
|
|
2733
2755
|
]),
|
|
2734
2756
|
_: 1
|
|
2735
2757
|
})
|
|
2736
|
-
])) :
|
|
2758
|
+
])) : $e("", !0)
|
|
2737
2759
|
])
|
|
2738
2760
|
];
|
|
2739
2761
|
}),
|
|
2740
|
-
default:
|
|
2741
|
-
|
|
2762
|
+
default: y(() => [
|
|
2763
|
+
J("div", _l, [
|
|
2742
2764
|
p(l.$slots, "table-dialog-form", { model: e.value }, () => [
|
|
2743
|
-
|
|
2765
|
+
Z(tt, {
|
|
2744
2766
|
modelValue: e.value,
|
|
2745
|
-
"onUpdate:modelValue":
|
|
2746
|
-
onSubmit:
|
|
2747
|
-
onReset:
|
|
2767
|
+
"onUpdate:modelValue": r[6] || (r[6] = (j) => e.value = j),
|
|
2768
|
+
onSubmit: ae,
|
|
2769
|
+
onReset: A
|
|
2748
2770
|
}, ce({ _: 2 }, [
|
|
2749
|
-
|
|
2771
|
+
Y(l.$slots, (j, le, k) => ({
|
|
2750
2772
|
name: le,
|
|
2751
|
-
fn:
|
|
2773
|
+
fn: y((W) => [
|
|
2752
2774
|
p(l.$slots, le, { model: W }, void 0, !0)
|
|
2753
2775
|
])
|
|
2754
2776
|
}))
|
|
@@ -2758,32 +2780,32 @@ const dl = {
|
|
|
2758
2780
|
]),
|
|
2759
2781
|
_: 3
|
|
2760
2782
|
}, 16, ["modelValue", "fullscreen", "width"])
|
|
2761
|
-
])) :
|
|
2762
|
-
e.value.dialog.mode == "drawer" &&
|
|
2763
|
-
|
|
2764
|
-
modelValue:
|
|
2765
|
-
"onUpdate:modelValue":
|
|
2766
|
-
}, o(ke)(e.value.dialog, (
|
|
2767
|
-
header:
|
|
2768
|
-
|
|
2769
|
-
|
|
2783
|
+
])) : $e("", !0),
|
|
2784
|
+
e.value.dialog.mode == "drawer" && T.value ? (n(), q("div", kl, [
|
|
2785
|
+
Z(Pe, F({
|
|
2786
|
+
modelValue: T.value,
|
|
2787
|
+
"onUpdate:modelValue": r[9] || (r[9] = (j) => T.value = j)
|
|
2788
|
+
}, o(ke)(e.value.dialog, (j) => !["width"].includes(j))), {
|
|
2789
|
+
header: y(() => [
|
|
2790
|
+
J("div", Cl, [
|
|
2791
|
+
J("div", Dl, [
|
|
2770
2792
|
p(l.$slots, "f-header", {}, () => [
|
|
2771
|
-
|
|
2793
|
+
J("div", null, Ee(e.value.dialog.title), 1)
|
|
2772
2794
|
], !0)
|
|
2773
2795
|
])
|
|
2774
2796
|
])
|
|
2775
2797
|
]),
|
|
2776
|
-
default:
|
|
2798
|
+
default: y(() => [
|
|
2777
2799
|
p(l.$slots, "table-drawer-form", { model: e.value }, () => [
|
|
2778
|
-
|
|
2800
|
+
Z(tt, {
|
|
2779
2801
|
modelValue: e.value,
|
|
2780
|
-
"onUpdate:modelValue":
|
|
2781
|
-
onSubmit:
|
|
2782
|
-
onReset:
|
|
2802
|
+
"onUpdate:modelValue": r[8] || (r[8] = (j) => e.value = j),
|
|
2803
|
+
onSubmit: ae,
|
|
2804
|
+
onReset: A
|
|
2783
2805
|
}, ce({ _: 2 }, [
|
|
2784
|
-
|
|
2806
|
+
Y(l.$slots, (j, le, k) => ({
|
|
2785
2807
|
name: le,
|
|
2786
|
-
fn:
|
|
2808
|
+
fn: y((W) => [
|
|
2787
2809
|
p(l.$slots, le, { model: W }, void 0, !0)
|
|
2788
2810
|
])
|
|
2789
2811
|
}))
|
|
@@ -2792,11 +2814,11 @@ const dl = {
|
|
|
2792
2814
|
]),
|
|
2793
2815
|
_: 3
|
|
2794
2816
|
}, 16, ["modelValue"])
|
|
2795
|
-
])) :
|
|
2817
|
+
])) : $e("", !0)
|
|
2796
2818
|
], 64);
|
|
2797
2819
|
};
|
|
2798
2820
|
}
|
|
2799
|
-
}),
|
|
2821
|
+
}), Vl = /* @__PURE__ */ Ue(Ml, [["__scopeId", "data-v-243728e0"]]), Tl = { class: "g-tree-table" }, Fl = { class: "g-tree-container" }, Sl = { class: "g-tree-table-container" }, ql = /* @__PURE__ */ Object.assign({
|
|
2800
2822
|
name: "g-tree-table",
|
|
2801
2823
|
inheritAttrs: !1
|
|
2802
2824
|
}, {
|
|
@@ -2807,70 +2829,70 @@ const dl = {
|
|
|
2807
2829
|
},
|
|
2808
2830
|
emits: /* @__PURE__ */ Be(["load"], ["update:modelValue"]),
|
|
2809
2831
|
setup(f, { emit: c }) {
|
|
2810
|
-
const t = c, e = Ie(f, "modelValue"),
|
|
2811
|
-
var w,
|
|
2812
|
-
if (!
|
|
2813
|
-
const b = ((
|
|
2814
|
-
return
|
|
2815
|
-
},
|
|
2816
|
-
t("load",
|
|
2817
|
-
}, te = (
|
|
2818
|
-
|
|
2832
|
+
const t = c, e = Ie(f, "modelValue"), a = nt(), d = ye((a == null ? void 0 : a.width) || "180px"), U = ye((a == null ? void 0 : a.search) === void 0 ? !0 : a == null ? void 0 : a.search), T = ye({}), x = ye(""), E = ye(null), D = (R, M) => {
|
|
2833
|
+
var w, re;
|
|
2834
|
+
if (!R) return !0;
|
|
2835
|
+
const b = ((re = (w = a.tree) == null ? void 0 : w.props) == null ? void 0 : re.label) || "label";
|
|
2836
|
+
return M[b].includes(R);
|
|
2837
|
+
}, z = (R, M) => {
|
|
2838
|
+
t("load", T.value, R, M);
|
|
2839
|
+
}, te = (R) => {
|
|
2840
|
+
T.value = R, e.value.table.load();
|
|
2819
2841
|
};
|
|
2820
|
-
return qt(
|
|
2821
|
-
E.value.filter(
|
|
2822
|
-
}), (
|
|
2823
|
-
const b =
|
|
2824
|
-
return n(), q("div",
|
|
2825
|
-
|
|
2842
|
+
return qt(x, (R) => {
|
|
2843
|
+
E.value.filter(R);
|
|
2844
|
+
}), (R, M) => {
|
|
2845
|
+
const b = L("el-input"), w = L("el-tree"), re = L("g-table");
|
|
2846
|
+
return n(), q("div", Tl, [
|
|
2847
|
+
J("div", {
|
|
2826
2848
|
class: "g-tree-left",
|
|
2827
|
-
style:
|
|
2849
|
+
style: Oe({ width: d.value })
|
|
2828
2850
|
}, [
|
|
2829
|
-
|
|
2851
|
+
U.value ? (n(), S(b, {
|
|
2830
2852
|
key: 0,
|
|
2831
|
-
modelValue:
|
|
2832
|
-
"onUpdate:modelValue":
|
|
2853
|
+
modelValue: x.value,
|
|
2854
|
+
"onUpdate:modelValue": M[0] || (M[0] = (K) => x.value = K),
|
|
2833
2855
|
style: { width: "100%", padding: "0 10px", "box-sizing": "border-box" },
|
|
2834
2856
|
placeholder: "输入节点查询",
|
|
2835
2857
|
clearable: ""
|
|
2836
|
-
}, null, 8, ["modelValue"])) :
|
|
2837
|
-
|
|
2838
|
-
|
|
2858
|
+
}, null, 8, ["modelValue"])) : $e("", !0),
|
|
2859
|
+
J("div", Fl, [
|
|
2860
|
+
Z(w, F({
|
|
2839
2861
|
style: { width: d.value },
|
|
2840
2862
|
"filter-node-method": D,
|
|
2841
2863
|
"expand-on-click-node": !1,
|
|
2842
2864
|
ref_key: "treeRef",
|
|
2843
2865
|
ref: E,
|
|
2844
2866
|
onNodeClick: te
|
|
2845
|
-
},
|
|
2846
|
-
default:
|
|
2847
|
-
p(
|
|
2867
|
+
}, R.$attrs.tree), ce({
|
|
2868
|
+
default: y(({ node: K, data: ne }) => [
|
|
2869
|
+
p(R.$slots, "tree", {
|
|
2848
2870
|
node: K,
|
|
2849
2871
|
data: ne
|
|
2850
2872
|
}, () => [
|
|
2851
|
-
|
|
2873
|
+
J("span", null, Ee(K.label), 1)
|
|
2852
2874
|
], !0)
|
|
2853
2875
|
]),
|
|
2854
2876
|
_: 2
|
|
2855
2877
|
}, [
|
|
2856
|
-
|
|
2878
|
+
Y(R.$slots, (K, ne, ie) => ({
|
|
2857
2879
|
name: ne,
|
|
2858
|
-
fn:
|
|
2859
|
-
p(
|
|
2880
|
+
fn: y((fe) => [
|
|
2881
|
+
p(R.$slots, ne, { data: fe }, void 0, !0)
|
|
2860
2882
|
])
|
|
2861
2883
|
}))
|
|
2862
2884
|
]), 1040, ["style"])
|
|
2863
2885
|
])
|
|
2864
2886
|
], 4),
|
|
2865
|
-
|
|
2866
|
-
|
|
2887
|
+
J("div", Sl, [
|
|
2888
|
+
Z(re, F({
|
|
2867
2889
|
modelValue: e.value,
|
|
2868
|
-
"onUpdate:modelValue":
|
|
2869
|
-
},
|
|
2870
|
-
|
|
2890
|
+
"onUpdate:modelValue": M[1] || (M[1] = (K) => e.value = K)
|
|
2891
|
+
}, R.$attrs, { onLoad: z }), ce({ _: 2 }, [
|
|
2892
|
+
Y(R.$slots, (K, ne, ie) => ({
|
|
2871
2893
|
name: ne,
|
|
2872
|
-
fn:
|
|
2873
|
-
p(
|
|
2894
|
+
fn: y((fe) => [
|
|
2895
|
+
p(R.$slots, ne, { data: fe }, void 0, !0)
|
|
2874
2896
|
])
|
|
2875
2897
|
}))
|
|
2876
2898
|
]), 1040, ["modelValue"])
|
|
@@ -2878,10 +2900,10 @@ const dl = {
|
|
|
2878
2900
|
]);
|
|
2879
2901
|
};
|
|
2880
2902
|
}
|
|
2881
|
-
}),
|
|
2903
|
+
}), xl = /* @__PURE__ */ Ue(ql, [["__scopeId", "data-v-5fb88c8a"]]), Ol = {
|
|
2882
2904
|
key: 0,
|
|
2883
2905
|
class: "op-group"
|
|
2884
|
-
},
|
|
2906
|
+
}, Al = {
|
|
2885
2907
|
key: 1,
|
|
2886
2908
|
class: "op-items"
|
|
2887
2909
|
}, Bl = ["title"], pt = "100px", Il = /* @__PURE__ */ Object.assign({ name: "g-select-option" }, {
|
|
@@ -2906,28 +2928,28 @@ const dl = {
|
|
|
2906
2928
|
},
|
|
2907
2929
|
setup(f) {
|
|
2908
2930
|
const c = f;
|
|
2909
|
-
return (t, e) => c.title ? (n(), q("div",
|
|
2910
|
-
(n(!0), q(
|
|
2911
|
-
style:
|
|
2912
|
-
key:
|
|
2931
|
+
return (t, e) => c.title ? (n(), q("div", Ol, [
|
|
2932
|
+
(n(!0), q(P, null, Y(c.columns, (a) => (n(), q("span", {
|
|
2933
|
+
style: Oe({ width: (a == null ? void 0 : a.width) || pt, ...a == null ? void 0 : a.titleStyle, textAlign: (a == null ? void 0 : a.align) || "center" }),
|
|
2934
|
+
key: a.key
|
|
2913
2935
|
}, [
|
|
2914
|
-
p(t.$slots, `${f.t}-title-${
|
|
2915
|
-
we(Ee(
|
|
2936
|
+
p(t.$slots, `${f.t}-title-${a.key}`, { col: a }, () => [
|
|
2937
|
+
we(Ee(a.label), 1)
|
|
2916
2938
|
], !0)
|
|
2917
2939
|
], 4))), 128))
|
|
2918
|
-
])) : (n(), q("div",
|
|
2919
|
-
(n(!0), q(
|
|
2920
|
-
style:
|
|
2921
|
-
key:
|
|
2922
|
-
title: f.data[
|
|
2940
|
+
])) : (n(), q("div", Al, [
|
|
2941
|
+
(n(!0), q(P, null, Y(c.columns, (a) => (n(), q("span", {
|
|
2942
|
+
style: Oe({ width: (a == null ? void 0 : a.width) || pt, textAlign: (a == null ? void 0 : a.align) || "center", ...a == null ? void 0 : a.style }),
|
|
2943
|
+
key: a.key,
|
|
2944
|
+
title: f.data[a.key]
|
|
2923
2945
|
}, [
|
|
2924
|
-
p(t.$slots, `${f.t}-option-${
|
|
2925
|
-
we(Ee(f.data[
|
|
2946
|
+
p(t.$slots, `${f.t}-option-${a.key}`, { col: a }, () => [
|
|
2947
|
+
we(Ee(f.data[a.key]), 1)
|
|
2926
2948
|
], !0)
|
|
2927
2949
|
], 12, Bl))), 128))
|
|
2928
2950
|
]));
|
|
2929
2951
|
}
|
|
2930
|
-
}), Yl = /* @__PURE__ */ Ue(Il, [["__scopeId", "data-v-ba0fcda6"]]), Ul = Object.freeze({}), Et = [
|
|
2952
|
+
}), Yl = /* @__PURE__ */ Ue(Il, [["__scopeId", "data-v-ba0fcda6"]]), Ul = Object.freeze({}), Et = [Vl, tt, xl, Yl];
|
|
2931
2953
|
let lt = {};
|
|
2932
2954
|
const Gl = {
|
|
2933
2955
|
install: (f, c = {}) => {
|
|
@@ -2941,34 +2963,34 @@ const Gl = {
|
|
|
2941
2963
|
const t = document.createElement("div");
|
|
2942
2964
|
let e = () => {
|
|
2943
2965
|
};
|
|
2944
|
-
const
|
|
2945
|
-
if (!
|
|
2966
|
+
const a = jl(c);
|
|
2967
|
+
if (!a) return () => {
|
|
2946
2968
|
};
|
|
2947
|
-
const d =
|
|
2969
|
+
const d = ye(!0), U = xt({
|
|
2948
2970
|
setup() {
|
|
2949
2971
|
return e = () => {
|
|
2950
2972
|
d.value = !1, setTimeout(() => {
|
|
2951
|
-
|
|
2973
|
+
U.unmount(), t.remove();
|
|
2952
2974
|
}, 300);
|
|
2953
2975
|
}, () => {
|
|
2954
|
-
var
|
|
2955
|
-
return qe(
|
|
2976
|
+
var T, x, E;
|
|
2977
|
+
return qe(a, {
|
|
2956
2978
|
modelValue: d.value,
|
|
2957
2979
|
"onUpdate:modelValue": (D) => d.value = D,
|
|
2958
2980
|
...f,
|
|
2959
2981
|
appendToBody: !0,
|
|
2960
2982
|
destroyOnClose: !0
|
|
2961
2983
|
}, {
|
|
2962
|
-
default: (
|
|
2963
|
-
header: (
|
|
2984
|
+
default: (T = f.slots) == null ? void 0 : T.default,
|
|
2985
|
+
header: (x = f.slots) == null ? void 0 : x.header,
|
|
2964
2986
|
footer: (E = f.slots) == null ? void 0 : E.footer
|
|
2965
2987
|
});
|
|
2966
2988
|
};
|
|
2967
2989
|
}
|
|
2968
2990
|
});
|
|
2969
|
-
return Et.forEach((
|
|
2970
|
-
|
|
2971
|
-
}),
|
|
2991
|
+
return Et.forEach((T) => {
|
|
2992
|
+
U.component(T.name, T);
|
|
2993
|
+
}), U.provide("options", lt), U.use(_t, { locale: It }), document.body.appendChild(t), U.mount(t), e;
|
|
2972
2994
|
};
|
|
2973
2995
|
function wt(f, c = window.innerWidth) {
|
|
2974
2996
|
if (typeof f == "number")
|
|
@@ -2986,19 +3008,19 @@ function wt(f, c = window.innerWidth) {
|
|
|
2986
3008
|
return c * parseFloat(f) / 100;
|
|
2987
3009
|
}
|
|
2988
3010
|
if (f.startsWith("calc(") && f.endsWith(")")) {
|
|
2989
|
-
let d = function(
|
|
2990
|
-
if (/[0-9+\-*/().\s]+$/.test(
|
|
2991
|
-
return new Function("return " +
|
|
3011
|
+
let d = function(T) {
|
|
3012
|
+
if (/[0-9+\-*/().\s]+$/.test(T))
|
|
3013
|
+
return new Function("return " + T)();
|
|
2992
3014
|
throw new Error("Invalid calc expression");
|
|
2993
3015
|
};
|
|
2994
|
-
const
|
|
2995
|
-
return d(
|
|
3016
|
+
const a = f.slice(5, -1).trim();
|
|
3017
|
+
return d(a.replace(/([0-9.]+)([a-z%]+)/g, (T, x, E) => wt(x + E, c)));
|
|
2996
3018
|
}
|
|
2997
3019
|
throw new Error("Unsupported unit in value: " + f);
|
|
2998
3020
|
}
|
|
2999
|
-
const
|
|
3000
|
-
const c = {}, t = (e,
|
|
3001
|
-
e[d] = typeof
|
|
3021
|
+
const Ve = (...f) => {
|
|
3022
|
+
const c = {}, t = (e, a) => (Object.keys(a).forEach((d) => {
|
|
3023
|
+
e[d] = typeof a[d] == "object" && !Array.isArray(a[d]) ? t(e[d] || {}, a[d]) : a[d];
|
|
3002
3024
|
}), e);
|
|
3003
3025
|
return f.forEach((e = {}) => t(c, e)), c;
|
|
3004
3026
|
};
|
|
@@ -3008,44 +3030,44 @@ function ke(f, c = (t, e) => c(t, e)) {
|
|
|
3008
3030
|
f.hasOwnProperty(e) && c(e, f[e]) && (t[e] = f[e]);
|
|
3009
3031
|
return t;
|
|
3010
3032
|
}
|
|
3011
|
-
function
|
|
3033
|
+
function Ll(f, c, t = "value", e = "label", a = "children") {
|
|
3012
3034
|
for (const d of f) {
|
|
3013
3035
|
if (d[t] === c)
|
|
3014
3036
|
return d[e];
|
|
3015
|
-
if (d[
|
|
3016
|
-
const
|
|
3017
|
-
if (
|
|
3018
|
-
return
|
|
3037
|
+
if (d[a] && d[a].length > 0) {
|
|
3038
|
+
const U = Ll(d[a], c, t, e, a);
|
|
3039
|
+
if (U)
|
|
3040
|
+
return U;
|
|
3019
3041
|
}
|
|
3020
3042
|
}
|
|
3021
3043
|
return null;
|
|
3022
3044
|
}
|
|
3023
|
-
function
|
|
3045
|
+
function rt(f) {
|
|
3024
3046
|
if (!f || isNaN(f)) return "零";
|
|
3025
3047
|
const c = ["角", "分"], t = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], e = [
|
|
3026
3048
|
["元", "万", "亿"],
|
|
3027
3049
|
["", "拾", "佰", "仟"]
|
|
3028
|
-
],
|
|
3050
|
+
], a = f < 0 ? "欠" : "";
|
|
3029
3051
|
f = Math.abs(f);
|
|
3030
3052
|
let d = "";
|
|
3031
|
-
for (let
|
|
3032
|
-
d += (t[Math.floor(f * 10 * Math.pow(10,
|
|
3053
|
+
for (let U = 0; U < c.length; U++)
|
|
3054
|
+
d += (t[Math.floor(f * 10 * Math.pow(10, U)) % 10] + c[U]).replace(/零./, "");
|
|
3033
3055
|
d = d || "整", f = Math.floor(f);
|
|
3034
|
-
for (let
|
|
3035
|
-
let
|
|
3036
|
-
for (let
|
|
3037
|
-
|
|
3038
|
-
d =
|
|
3056
|
+
for (let U = 0; U < e[0].length && f > 0; U++) {
|
|
3057
|
+
let T = "";
|
|
3058
|
+
for (let x = 0; x < e[1].length && f > 0; x++)
|
|
3059
|
+
T = t[f % 10] + e[1][x] + T, f = Math.floor(f / 10);
|
|
3060
|
+
d = T.replace(/(零.)*零$/, "").replace(/^$/, "零") + e[0][U] + d;
|
|
3039
3061
|
}
|
|
3040
|
-
return
|
|
3062
|
+
return a + d.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整");
|
|
3041
3063
|
}
|
|
3042
|
-
function
|
|
3064
|
+
function Rl(f) {
|
|
3043
3065
|
if (typeof f != "number" || isNaN(f) || !isFinite(f))
|
|
3044
3066
|
return "0.00";
|
|
3045
3067
|
const c = f.toFixed(2), [t, e] = c.split(".");
|
|
3046
3068
|
return `${t.replace(/\B(?=(\d{3})+(?!\d))/g, ",")}.${e}`;
|
|
3047
3069
|
}
|
|
3048
|
-
const
|
|
3070
|
+
const be = {
|
|
3049
3071
|
RADIO: "radio",
|
|
3050
3072
|
RADIOBUTTON: "radio-button",
|
|
3051
3073
|
CHECKBOX: "checkbox",
|
|
@@ -3075,13 +3097,13 @@ const ge = {
|
|
|
3075
3097
|
TEL: "tel"
|
|
3076
3098
|
};
|
|
3077
3099
|
export {
|
|
3078
|
-
|
|
3100
|
+
be as CT,
|
|
3079
3101
|
wt as convertToPx,
|
|
3080
3102
|
Gl as default,
|
|
3081
3103
|
ke as filterObject,
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3104
|
+
Ll as findTreeLabelByValue,
|
|
3105
|
+
Rl as formatAmount,
|
|
3106
|
+
Ve as mergeObjects,
|
|
3107
|
+
rt as moneyToChinese,
|
|
3086
3108
|
ot as openModal
|
|
3087
3109
|
};
|