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