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