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