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