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