vue-2024-ui 0.1.7 → 0.1.8
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 +1303 -1263
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import It, { ElForm as
|
|
2
|
-
import { mergeModels as
|
|
3
|
-
import { Plus as Xt, ZoomOut as Gt, Delete as Qt, FullScreen as Zt,
|
|
1
|
+
import It, { ElForm as nt, ElButtonGroup as st, ElButton as ke, ElPopover as ft, ElMessage as Te, ElMessageBox as Ft, ElDialog as Yt, ElDrawer as Ut } from "element-plus";
|
|
2
|
+
import { mergeModels as Le, useModel as Ne, ref as le, nextTick as Qe, onMounted as lt, computed as Xe, resolveComponent as Y, openBlock as i, createElementBlock as x, Fragment as W, createElementVNode as G, createBlock as M, createCommentVNode as ce, unref as j, mergeProps as q, withCtx as y, renderSlot as h, renderList as U, createTextVNode as _e, toDisplayString as he, createSlots as fe, createVNode as J, useSlots as St, inject as gt, useAttrs as bt, onUnmounted as Rt, normalizeStyle as Ae, withModifiers as Ct, normalizeProps as ct, guardReactiveProps as Dt, resolveDynamicComponent as Be, Transition as jt, withDirectives as Lt, vShow as Nt, h as Oe, onBeforeUnmount as zt, normalizeClass as Tt, watchEffect as Pt, watch as Ht, createApp as Wt } from "vue";
|
|
3
|
+
import { Plus as Xt, ZoomOut as Gt, Delete as Qt, FullScreen as Zt, CopyDocument as Jt } from "@element-plus/icons-vue";
|
|
4
4
|
import qt from "sortablejs";
|
|
5
5
|
import { Dexie as Kt } from "dexie";
|
|
6
6
|
var el = {
|
|
@@ -181,167 +181,167 @@ var el = {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
}, tl = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
184
|
-
function ll(
|
|
185
|
-
return
|
|
184
|
+
function ll(f) {
|
|
185
|
+
return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
|
|
186
186
|
}
|
|
187
187
|
var xt = { exports: {} };
|
|
188
|
-
(function(
|
|
189
|
-
(function(
|
|
190
|
-
|
|
188
|
+
(function(f, c) {
|
|
189
|
+
(function(r, t) {
|
|
190
|
+
f.exports = t();
|
|
191
191
|
})(tl, function() {
|
|
192
|
-
var
|
|
193
|
-
var a = ["th", "st", "nd", "rd"],
|
|
194
|
-
return "[" +
|
|
195
|
-
} },
|
|
196
|
-
var g = String(
|
|
197
|
-
return !g || g.length >= a ?
|
|
198
|
-
}, ge = { s:
|
|
199
|
-
var a = -
|
|
200
|
-
return (a <= 0 ? "+" : "-") +
|
|
201
|
-
}, m: function
|
|
202
|
-
if (a.date() <
|
|
203
|
-
var g = 12 * (
|
|
204
|
-
return +(-(g + (
|
|
205
|
-
}, a: function(
|
|
206
|
-
return
|
|
207
|
-
}, p: function(
|
|
208
|
-
return { M: L, y: I, w:
|
|
209
|
-
}, u: function(
|
|
210
|
-
return
|
|
211
|
-
} },
|
|
212
|
-
ie
|
|
213
|
-
var
|
|
214
|
-
return
|
|
215
|
-
}, be = function
|
|
192
|
+
var r = 1e3, t = 6e4, e = 36e5, d = "millisecond", E = "second", T = "minute", S = "hour", k = "day", $ = "week", L = "month", ee = "quarter", I = "year", z = "date", re = "Invalid Date", ae = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, Q = /\[([^\]]+)]|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, me = { 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(v) {
|
|
193
|
+
var a = ["th", "st", "nd", "rd"], p = v % 100;
|
|
194
|
+
return "[" + v + (a[(p - 20) % 10] || a[p] || a[0]) + "]";
|
|
195
|
+
} }, ye = function(v, a, p) {
|
|
196
|
+
var g = String(v);
|
|
197
|
+
return !g || g.length >= a ? v : "" + Array(a + 1 - g.length).join(p) + v;
|
|
198
|
+
}, ge = { s: ye, z: function(v) {
|
|
199
|
+
var a = -v.utcOffset(), p = Math.abs(a), g = Math.floor(p / 60), s = p % 60;
|
|
200
|
+
return (a <= 0 ? "+" : "-") + ye(g, 2, "0") + ":" + ye(s, 2, "0");
|
|
201
|
+
}, m: function v(a, p) {
|
|
202
|
+
if (a.date() < p.date()) return -v(p, a);
|
|
203
|
+
var g = 12 * (p.year() - a.year()) + (p.month() - a.month()), s = a.clone().add(g, L), D = p - s < 0, C = a.clone().add(g + (D ? -1 : 1), L);
|
|
204
|
+
return +(-(g + (p - s) / (D ? s - C : C - s)) || 0);
|
|
205
|
+
}, a: function(v) {
|
|
206
|
+
return v < 0 ? Math.ceil(v) || 0 : Math.floor(v);
|
|
207
|
+
}, p: function(v) {
|
|
208
|
+
return { M: L, y: I, w: $, d: k, D: z, h: S, m: T, s: E, ms: d, Q: ee }[v] || String(v || "").toLowerCase().replace(/s$/, "");
|
|
209
|
+
}, u: function(v) {
|
|
210
|
+
return v === void 0;
|
|
211
|
+
} }, ie = "en", de = {};
|
|
212
|
+
de[ie] = me;
|
|
213
|
+
var ne = "$isDayjsObject", te = function(v) {
|
|
214
|
+
return v instanceof o || !(!v || !v[ne]);
|
|
215
|
+
}, be = function v(a, p, g) {
|
|
216
216
|
var s;
|
|
217
|
-
if (!a) return
|
|
217
|
+
if (!a) return ie;
|
|
218
218
|
if (typeof a == "string") {
|
|
219
|
-
var
|
|
220
|
-
|
|
219
|
+
var D = a.toLowerCase();
|
|
220
|
+
de[D] && (s = D), p && (de[D] = p, s = D);
|
|
221
221
|
var C = a.split("-");
|
|
222
|
-
if (!s && C.length > 1) return
|
|
222
|
+
if (!s && C.length > 1) return v(C[0]);
|
|
223
223
|
} else {
|
|
224
|
-
var
|
|
225
|
-
|
|
224
|
+
var R = a.name;
|
|
225
|
+
de[R] = a, s = R;
|
|
226
226
|
}
|
|
227
|
-
return !g && s && (
|
|
228
|
-
},
|
|
229
|
-
if (
|
|
230
|
-
var
|
|
231
|
-
return
|
|
227
|
+
return !g && s && (ie = s), s || !g && ie;
|
|
228
|
+
}, se = function(v, a) {
|
|
229
|
+
if (te(v)) return v.clone();
|
|
230
|
+
var p = typeof a == "object" ? a : {};
|
|
231
|
+
return p.date = v, p.args = arguments, new o(p);
|
|
232
232
|
}, b = ge;
|
|
233
|
-
b.l = be, b.i =
|
|
234
|
-
return
|
|
233
|
+
b.l = be, b.i = te, b.w = function(v, a) {
|
|
234
|
+
return se(v, { locale: a.$L, utc: a.$u, x: a.$x, $offset: a.$offset });
|
|
235
235
|
};
|
|
236
236
|
var o = function() {
|
|
237
|
-
function p
|
|
238
|
-
this.$L = be(
|
|
237
|
+
function v(p) {
|
|
238
|
+
this.$L = be(p.locale, null, !0), this.parse(p), this.$x = this.$x || p.x || {}, this[ne] = !0;
|
|
239
239
|
}
|
|
240
|
-
var a =
|
|
241
|
-
return a.parse = function(
|
|
240
|
+
var a = v.prototype;
|
|
241
|
+
return a.parse = function(p) {
|
|
242
242
|
this.$d = function(g) {
|
|
243
|
-
var s = g.date,
|
|
243
|
+
var s = g.date, D = g.utc;
|
|
244
244
|
if (s === null) return /* @__PURE__ */ new Date(NaN);
|
|
245
245
|
if (b.u(s)) return /* @__PURE__ */ new Date();
|
|
246
246
|
if (s instanceof Date) return new Date(s);
|
|
247
247
|
if (typeof s == "string" && !/Z$/i.test(s)) {
|
|
248
|
-
var C = s.match(
|
|
248
|
+
var C = s.match(ae);
|
|
249
249
|
if (C) {
|
|
250
|
-
var
|
|
251
|
-
return
|
|
250
|
+
var R = C[2] - 1 || 0, X = (C[7] || "0").substring(0, 3);
|
|
251
|
+
return D ? new Date(Date.UTC(C[1], R, C[3] || 1, C[4] || 0, C[5] || 0, C[6] || 0, X)) : new Date(C[1], R, C[3] || 1, C[4] || 0, C[5] || 0, C[6] || 0, X);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
return new Date(s);
|
|
255
|
-
}(
|
|
255
|
+
}(p), this.init();
|
|
256
256
|
}, a.init = function() {
|
|
257
|
-
var
|
|
258
|
-
this.$y =
|
|
257
|
+
var p = this.$d;
|
|
258
|
+
this.$y = p.getFullYear(), this.$M = p.getMonth(), this.$D = p.getDate(), this.$W = p.getDay(), this.$H = p.getHours(), this.$m = p.getMinutes(), this.$s = p.getSeconds(), this.$ms = p.getMilliseconds();
|
|
259
259
|
}, a.$utils = function() {
|
|
260
260
|
return b;
|
|
261
261
|
}, a.isValid = function() {
|
|
262
|
-
return this.$d.toString() !==
|
|
263
|
-
}, a.isSame = function(
|
|
264
|
-
var s =
|
|
262
|
+
return this.$d.toString() !== re;
|
|
263
|
+
}, a.isSame = function(p, g) {
|
|
264
|
+
var s = se(p);
|
|
265
265
|
return this.startOf(g) <= s && s <= this.endOf(g);
|
|
266
|
-
}, a.isAfter = function(
|
|
267
|
-
return
|
|
268
|
-
}, a.isBefore = function(
|
|
269
|
-
return this.endOf(g) <
|
|
270
|
-
}, a.$g = function(
|
|
271
|
-
return b.u(
|
|
266
|
+
}, a.isAfter = function(p, g) {
|
|
267
|
+
return se(p) < this.startOf(g);
|
|
268
|
+
}, a.isBefore = function(p, g) {
|
|
269
|
+
return this.endOf(g) < se(p);
|
|
270
|
+
}, a.$g = function(p, g, s) {
|
|
271
|
+
return b.u(p) ? this[g] : this.set(s, p);
|
|
272
272
|
}, a.unix = function() {
|
|
273
273
|
return Math.floor(this.valueOf() / 1e3);
|
|
274
274
|
}, a.valueOf = function() {
|
|
275
275
|
return this.$d.getTime();
|
|
276
|
-
}, a.startOf = function(
|
|
277
|
-
var s = this,
|
|
276
|
+
}, a.startOf = function(p, g) {
|
|
277
|
+
var s = this, D = !!b.u(g) || g, C = b.p(p), R = function(Ve, $e) {
|
|
278
278
|
var Me = b.w(s.$u ? Date.UTC(s.$y, $e, Ve) : new Date(s.$y, $e, Ve), s);
|
|
279
|
-
return
|
|
279
|
+
return D ? Me : Me.endOf(k);
|
|
280
280
|
}, X = function(Ve, $e) {
|
|
281
|
-
return b.w(s.toDate()[Ve].apply(s.toDate("s"), (
|
|
282
|
-
}, O = this.$W, A = this.$M,
|
|
281
|
+
return b.w(s.toDate()[Ve].apply(s.toDate("s"), (D ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice($e)), s);
|
|
282
|
+
}, O = this.$W, A = this.$M, ue = this.$D, Ee = "set" + (this.$u ? "UTC" : "");
|
|
283
283
|
switch (C) {
|
|
284
284
|
case I:
|
|
285
|
-
return
|
|
285
|
+
return D ? R(1, 0) : R(31, 11);
|
|
286
286
|
case L:
|
|
287
|
-
return
|
|
288
|
-
case
|
|
287
|
+
return D ? R(1, A) : R(0, A + 1);
|
|
288
|
+
case $:
|
|
289
289
|
var we = this.$locale().weekStart || 0, De = (O < we ? O + 7 : O) - we;
|
|
290
|
-
return
|
|
291
|
-
case
|
|
292
|
-
case
|
|
290
|
+
return R(D ? ue - De : ue + (6 - De), A);
|
|
291
|
+
case k:
|
|
292
|
+
case z:
|
|
293
293
|
return X(Ee + "Hours", 0);
|
|
294
294
|
case S:
|
|
295
295
|
return X(Ee + "Minutes", 1);
|
|
296
296
|
case T:
|
|
297
297
|
return X(Ee + "Seconds", 2);
|
|
298
|
-
case
|
|
298
|
+
case E:
|
|
299
299
|
return X(Ee + "Milliseconds", 3);
|
|
300
300
|
default:
|
|
301
301
|
return this.clone();
|
|
302
302
|
}
|
|
303
|
-
}, a.endOf = function(
|
|
304
|
-
return this.startOf(
|
|
305
|
-
}, a.$set = function(
|
|
306
|
-
var s,
|
|
307
|
-
if (
|
|
308
|
-
var O = this.clone().set(
|
|
309
|
-
O.$d[
|
|
310
|
-
} else
|
|
303
|
+
}, a.endOf = function(p) {
|
|
304
|
+
return this.startOf(p, !1);
|
|
305
|
+
}, a.$set = function(p, g) {
|
|
306
|
+
var s, D = b.p(p), C = "set" + (this.$u ? "UTC" : ""), R = (s = {}, s[k] = C + "Date", s[z] = C + "Date", s[L] = C + "Month", s[I] = C + "FullYear", s[S] = C + "Hours", s[T] = C + "Minutes", s[E] = C + "Seconds", s[d] = C + "Milliseconds", s)[D], X = D === k ? this.$D + (g - this.$W) : g;
|
|
307
|
+
if (D === L || D === I) {
|
|
308
|
+
var O = this.clone().set(z, 1);
|
|
309
|
+
O.$d[R](X), O.init(), this.$d = O.set(z, Math.min(this.$D, O.daysInMonth())).$d;
|
|
310
|
+
} else R && this.$d[R](X);
|
|
311
311
|
return this.init(), this;
|
|
312
|
-
}, a.set = function(
|
|
313
|
-
return this.clone().$set(
|
|
314
|
-
}, a.get = function(
|
|
315
|
-
return this[b.p(
|
|
316
|
-
}, a.add = function(
|
|
317
|
-
var s,
|
|
318
|
-
|
|
319
|
-
var C = b.p(g),
|
|
320
|
-
var
|
|
321
|
-
return b.w(
|
|
312
|
+
}, a.set = function(p, g) {
|
|
313
|
+
return this.clone().$set(p, g);
|
|
314
|
+
}, a.get = function(p) {
|
|
315
|
+
return this[b.p(p)]();
|
|
316
|
+
}, a.add = function(p, g) {
|
|
317
|
+
var s, D = this;
|
|
318
|
+
p = Number(p);
|
|
319
|
+
var C = b.p(g), R = function(A) {
|
|
320
|
+
var ue = se(D);
|
|
321
|
+
return b.w(ue.date(ue.date() + Math.round(A * p)), D);
|
|
322
322
|
};
|
|
323
|
-
if (C === L) return this.set(L, this.$M +
|
|
324
|
-
if (C === I) return this.set(I, this.$y +
|
|
325
|
-
if (C ===
|
|
326
|
-
if (C ===
|
|
327
|
-
var X = (s = {}, s[T] = t, s[S] = e, s[
|
|
323
|
+
if (C === L) return this.set(L, this.$M + p);
|
|
324
|
+
if (C === I) return this.set(I, this.$y + p);
|
|
325
|
+
if (C === k) return R(1);
|
|
326
|
+
if (C === $) return R(7);
|
|
327
|
+
var X = (s = {}, s[T] = t, s[S] = e, s[E] = r, s)[C] || 1, O = this.$d.getTime() + p * X;
|
|
328
328
|
return b.w(O, this);
|
|
329
|
-
}, a.subtract = function(
|
|
330
|
-
return this.add(-1 *
|
|
331
|
-
}, a.format = function(
|
|
329
|
+
}, a.subtract = function(p, g) {
|
|
330
|
+
return this.add(-1 * p, g);
|
|
331
|
+
}, a.format = function(p) {
|
|
332
332
|
var g = this, s = this.$locale();
|
|
333
|
-
if (!this.isValid()) return s.invalidDate ||
|
|
334
|
-
var
|
|
335
|
-
return $e && ($e[Me] || $e(g,
|
|
333
|
+
if (!this.isValid()) return s.invalidDate || re;
|
|
334
|
+
var D = p || "YYYY-MM-DDTHH:mm:ssZ", C = b.z(this), R = this.$H, X = this.$m, O = this.$M, A = s.weekdays, ue = s.months, Ee = s.meridiem, we = function($e, Me, Ie, Ye) {
|
|
335
|
+
return $e && ($e[Me] || $e(g, D)) || Ie[Me].slice(0, Ye);
|
|
336
336
|
}, De = function($e) {
|
|
337
|
-
return b.s(
|
|
338
|
-
}, Ve = Ee || function($e, Me,
|
|
339
|
-
var
|
|
340
|
-
return
|
|
337
|
+
return b.s(R % 12 || 12, $e, "0");
|
|
338
|
+
}, Ve = Ee || function($e, Me, Ie) {
|
|
339
|
+
var Ye = $e < 12 ? "AM" : "PM";
|
|
340
|
+
return Ie ? Ye.toLowerCase() : Ye;
|
|
341
341
|
};
|
|
342
|
-
return
|
|
343
|
-
return Me || function(
|
|
344
|
-
switch (
|
|
342
|
+
return D.replace(Q, function($e, Me) {
|
|
343
|
+
return Me || function(Ie) {
|
|
344
|
+
switch (Ie) {
|
|
345
345
|
case "YY":
|
|
346
346
|
return String(g.$y).slice(-2);
|
|
347
347
|
case "YYYY":
|
|
@@ -351,9 +351,9 @@ var xt = { exports: {} };
|
|
|
351
351
|
case "MM":
|
|
352
352
|
return b.s(O + 1, 2, "0");
|
|
353
353
|
case "MMM":
|
|
354
|
-
return we(s.monthsShort, O,
|
|
354
|
+
return we(s.monthsShort, O, ue, 3);
|
|
355
355
|
case "MMMM":
|
|
356
|
-
return we(
|
|
356
|
+
return we(ue, O);
|
|
357
357
|
case "D":
|
|
358
358
|
return g.$D;
|
|
359
359
|
case "DD":
|
|
@@ -367,17 +367,17 @@ var xt = { exports: {} };
|
|
|
367
367
|
case "dddd":
|
|
368
368
|
return A[g.$W];
|
|
369
369
|
case "H":
|
|
370
|
-
return String(
|
|
370
|
+
return String(R);
|
|
371
371
|
case "HH":
|
|
372
|
-
return b.s(
|
|
372
|
+
return b.s(R, 2, "0");
|
|
373
373
|
case "h":
|
|
374
374
|
return De(1);
|
|
375
375
|
case "hh":
|
|
376
376
|
return De(2);
|
|
377
377
|
case "a":
|
|
378
|
-
return Ve(
|
|
378
|
+
return Ve(R, X, !0);
|
|
379
379
|
case "A":
|
|
380
|
-
return Ve(
|
|
380
|
+
return Ve(R, X, !1);
|
|
381
381
|
case "m":
|
|
382
382
|
return String(X);
|
|
383
383
|
case "mm":
|
|
@@ -396,47 +396,47 @@ var xt = { exports: {} };
|
|
|
396
396
|
});
|
|
397
397
|
}, a.utcOffset = function() {
|
|
398
398
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
399
|
-
}, a.diff = function(
|
|
400
|
-
var
|
|
399
|
+
}, a.diff = function(p, g, s) {
|
|
400
|
+
var D, C = this, R = b.p(g), X = se(p), O = (X.utcOffset() - this.utcOffset()) * t, A = this - X, ue = function() {
|
|
401
401
|
return b.m(C, X);
|
|
402
402
|
};
|
|
403
|
-
switch (
|
|
403
|
+
switch (R) {
|
|
404
404
|
case I:
|
|
405
|
-
|
|
405
|
+
D = ue() / 12;
|
|
406
406
|
break;
|
|
407
407
|
case L:
|
|
408
|
-
|
|
408
|
+
D = ue();
|
|
409
409
|
break;
|
|
410
|
-
case
|
|
411
|
-
|
|
410
|
+
case ee:
|
|
411
|
+
D = ue() / 3;
|
|
412
412
|
break;
|
|
413
|
-
case
|
|
414
|
-
|
|
413
|
+
case $:
|
|
414
|
+
D = (A - O) / 6048e5;
|
|
415
415
|
break;
|
|
416
|
-
case
|
|
417
|
-
|
|
416
|
+
case k:
|
|
417
|
+
D = (A - O) / 864e5;
|
|
418
418
|
break;
|
|
419
419
|
case S:
|
|
420
|
-
|
|
420
|
+
D = A / e;
|
|
421
421
|
break;
|
|
422
422
|
case T:
|
|
423
|
-
|
|
423
|
+
D = A / t;
|
|
424
424
|
break;
|
|
425
|
-
case
|
|
426
|
-
|
|
425
|
+
case E:
|
|
426
|
+
D = A / r;
|
|
427
427
|
break;
|
|
428
428
|
default:
|
|
429
|
-
|
|
429
|
+
D = A;
|
|
430
430
|
}
|
|
431
|
-
return s ?
|
|
431
|
+
return s ? D : b.a(D);
|
|
432
432
|
}, a.daysInMonth = function() {
|
|
433
433
|
return this.endOf(L).$D;
|
|
434
434
|
}, a.$locale = function() {
|
|
435
|
-
return
|
|
436
|
-
}, a.locale = function(
|
|
437
|
-
if (!
|
|
438
|
-
var s = this.clone(),
|
|
439
|
-
return
|
|
435
|
+
return de[this.$L];
|
|
436
|
+
}, a.locale = function(p, g) {
|
|
437
|
+
if (!p) return this.$L;
|
|
438
|
+
var s = this.clone(), D = be(p, g, !0);
|
|
439
|
+
return D && (s.$L = D), s;
|
|
440
440
|
}, a.clone = function() {
|
|
441
441
|
return b.w(this.$d, this);
|
|
442
442
|
}, a.toDate = function() {
|
|
@@ -447,25 +447,25 @@ var xt = { exports: {} };
|
|
|
447
447
|
return this.$d.toISOString();
|
|
448
448
|
}, a.toString = function() {
|
|
449
449
|
return this.$d.toUTCString();
|
|
450
|
-
},
|
|
450
|
+
}, v;
|
|
451
451
|
}(), _ = o.prototype;
|
|
452
|
-
return
|
|
453
|
-
_[
|
|
454
|
-
return this.$g(a,
|
|
452
|
+
return se.prototype = _, [["$ms", d], ["$s", E], ["$m", T], ["$H", S], ["$W", k], ["$M", L], ["$y", I], ["$D", z]].forEach(function(v) {
|
|
453
|
+
_[v[1]] = function(a) {
|
|
454
|
+
return this.$g(a, v[0], v[1]);
|
|
455
455
|
};
|
|
456
|
-
}),
|
|
457
|
-
return
|
|
458
|
-
},
|
|
459
|
-
return
|
|
460
|
-
},
|
|
456
|
+
}), se.extend = function(v, a) {
|
|
457
|
+
return v.$i || (v(a, o, se), v.$i = !0), se;
|
|
458
|
+
}, se.locale = be, se.isDayjs = te, se.unix = function(v) {
|
|
459
|
+
return se(1e3 * v);
|
|
460
|
+
}, se.en = de[ie], se.Ls = de, se.p = {}, se;
|
|
461
461
|
});
|
|
462
462
|
})(xt);
|
|
463
463
|
var al = xt.exports;
|
|
464
|
-
const
|
|
465
|
-
const
|
|
464
|
+
const mt = /* @__PURE__ */ ll(al), Ge = (f, c) => {
|
|
465
|
+
const r = f.__vccOpts || f;
|
|
466
466
|
for (const [t, e] of c)
|
|
467
|
-
|
|
468
|
-
return
|
|
467
|
+
r[t] = e;
|
|
468
|
+
return r;
|
|
469
469
|
}, ol = {
|
|
470
470
|
style: { display: "flex", width: "100%" },
|
|
471
471
|
class: "g-ctrl-container"
|
|
@@ -474,19 +474,19 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
474
474
|
style: { position: "relative" }
|
|
475
475
|
}, nl = ["title"], sl = { key: 20 }, il = { key: 21 }, dl = ["innerHTML"], fl = ["innerHTML"], cl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
476
476
|
__name: "g-ctrl",
|
|
477
|
-
props: /* @__PURE__ */
|
|
477
|
+
props: /* @__PURE__ */ Le(["t", "ctrlKey", "item", "model", "ctrlType", "formInfo"], {
|
|
478
478
|
modelValue: { required: !0 },
|
|
479
479
|
modelModifiers: {}
|
|
480
480
|
}),
|
|
481
481
|
emits: ["update:modelValue"],
|
|
482
|
-
setup(
|
|
483
|
-
var be,
|
|
484
|
-
const c =
|
|
482
|
+
setup(f) {
|
|
483
|
+
var be, se;
|
|
484
|
+
const c = Ne(f, "modelValue"), r = f, t = le(r.item || {}), e = le(r.ctrlKey), d = le(r.ctrlType), E = le(r.model), T = le([]), S = le([]), k = le(!1), $ = le(!1), L = () => Object.keys(St()).filter((b) => b.startsWith(`${r.t}-${e}-`)).map((b) => b.replace(`${r.t}-${e}-`, "")), ee = le({
|
|
485
485
|
multiple: !1,
|
|
486
486
|
"show-file-list": !1,
|
|
487
487
|
"file-list": [],
|
|
488
|
-
showDel: (be = t.value) != null && be.showDel ? (
|
|
489
|
-
}), I =
|
|
488
|
+
showDel: (be = t.value) != null && be.showDel ? (se = t.value) == null ? void 0 : se.showDel : r.t !== "t"
|
|
489
|
+
}), I = le(t.value.innerHtml), z = (b) => [
|
|
490
490
|
"year",
|
|
491
491
|
"years",
|
|
492
492
|
"month",
|
|
@@ -499,7 +499,7 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
499
499
|
"daterange",
|
|
500
500
|
"monthrange",
|
|
501
501
|
"yearrange"
|
|
502
|
-
].includes(b),
|
|
502
|
+
].includes(b), re = (b) => ({
|
|
503
503
|
year: "YYYY",
|
|
504
504
|
years: "YYYY",
|
|
505
505
|
month: "YYYY-MM",
|
|
@@ -513,62 +513,62 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
513
513
|
daterange: "YYYY-MM-DD",
|
|
514
514
|
monthrange: "YYYY-MM",
|
|
515
515
|
yearrange: "YYYY"
|
|
516
|
-
})[b] || "YYYY-MM-DD",
|
|
516
|
+
})[b] || "YYYY-MM-DD", ae = le({
|
|
517
517
|
filterable: !0,
|
|
518
518
|
remote: !!(t.value && t.value["remote-method"]),
|
|
519
519
|
...t.value
|
|
520
|
-
}),
|
|
520
|
+
}), Q = le((b) => {
|
|
521
521
|
t.value["remote-method"](b, (o) => {
|
|
522
|
-
|
|
522
|
+
Qe(() => {
|
|
523
523
|
S.value = o;
|
|
524
524
|
});
|
|
525
525
|
});
|
|
526
526
|
}), me = async (b = "options") => {
|
|
527
527
|
var o;
|
|
528
528
|
try {
|
|
529
|
-
const _ = await ((o = t.value) == null ? void 0 : o.getDicts(
|
|
529
|
+
const _ = await ((o = t.value) == null ? void 0 : o.getDicts(r.formInfo));
|
|
530
530
|
if (typeof _ == "string")
|
|
531
531
|
S.value = [{ label: _, value: c.value }];
|
|
532
532
|
else {
|
|
533
|
-
const
|
|
533
|
+
const v = _ == null ? void 0 : _.map((a, p) => ({
|
|
534
534
|
...a,
|
|
535
|
-
value: a.value ?? a.label ??
|
|
535
|
+
value: a.value ?? a.label ?? p,
|
|
536
536
|
label: a.label || "未知选项"
|
|
537
537
|
}));
|
|
538
|
-
S.value =
|
|
538
|
+
S.value = v || [];
|
|
539
539
|
}
|
|
540
540
|
} catch (_) {
|
|
541
541
|
throw console.error("获取选项失败:", _), _;
|
|
542
542
|
}
|
|
543
|
-
},
|
|
543
|
+
}, ye = () => {
|
|
544
544
|
var b, o;
|
|
545
|
-
t.value.noSearch !== !0 &&
|
|
545
|
+
t.value.noSearch !== !0 && r.t === "q" && ((o = (b = E.value) == null ? void 0 : b.table) == null || o.load());
|
|
546
546
|
}, ge = (b) => {
|
|
547
547
|
b.preventDefault(), b.stopPropagation(), c.value = "";
|
|
548
|
-
}, se = (b) => {
|
|
549
|
-
M.value = !0;
|
|
550
548
|
}, ie = (b) => {
|
|
551
|
-
|
|
552
|
-
},
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
549
|
+
k.value = !0;
|
|
550
|
+
}, de = (b) => {
|
|
551
|
+
b.preventDefault(), b.stopPropagation(), k.value = !0;
|
|
552
|
+
}, ne = le(null);
|
|
553
|
+
lt(async () => {
|
|
554
|
+
var _, v, a, p, g;
|
|
555
|
+
t.value && t.value["remote-method"] && (ae.value["remote-method"] = Q), (v = (_ = E.value[e.value]) == null ? void 0 : _.options) != null && v.length && (S.value = E.value[e.value].options);
|
|
556
|
+
const b = (s, D = "options", C = E.value[e.value]) => {
|
|
557
|
+
typeof t.value.getDicts == "function" && me(D).catch((R) => {
|
|
558
|
+
console.error(`Failed to load ${D} for ${s}:`, R);
|
|
559
559
|
});
|
|
560
560
|
};
|
|
561
561
|
if (["radio", "radio-button", "checkbox-group", "checkbox-group-button", "select", "cascader"].includes(d.value) && b(d.value), d.value === pe.TREESELECT && await (async () => {
|
|
562
562
|
try {
|
|
563
|
-
typeof t.value.getDicts == "function" ? T.value = await t.value.getDicts(
|
|
564
|
-
} catch (
|
|
565
|
-
console.error("Failed to load data for tree-select:",
|
|
563
|
+
typeof t.value.getDicts == "function" ? T.value = await t.value.getDicts(r.formInfo) : T.value = S.value;
|
|
564
|
+
} catch (D) {
|
|
565
|
+
console.error("Failed to load data for tree-select:", D);
|
|
566
566
|
}
|
|
567
|
-
})(),
|
|
567
|
+
})(), r.t == "q") {
|
|
568
568
|
let s = t.value.type || d.value;
|
|
569
|
-
(s === void 0 || d.value === "input" || s == pe.NUMBER || s == pe.EMAIL || s == "url" || s == "text") && t.value.onKeyup == null && (t.value.onKeyup = (
|
|
570
|
-
var C,
|
|
571
|
-
console.log(
|
|
569
|
+
(s === void 0 || d.value === "input" || s == pe.NUMBER || s == pe.EMAIL || s == "url" || s == "text") && t.value.onKeyup == null && (t.value.onKeyup = (D) => {
|
|
570
|
+
var C, R;
|
|
571
|
+
console.log(D.key), (D.keyCode === 13 || D.key === "Enter") && ((R = (C = E.value) == null ? void 0 : C.table) == null || R.load());
|
|
572
572
|
}), [
|
|
573
573
|
"radio",
|
|
574
574
|
"switch",
|
|
@@ -585,84 +585,84 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
585
585
|
"datetime",
|
|
586
586
|
"datetimerange",
|
|
587
587
|
"week"
|
|
588
|
-
].includes(s) && t.value.onChange === void 0 && (t.value.onChange = (
|
|
589
|
-
var C,
|
|
590
|
-
(
|
|
588
|
+
].includes(s) && t.value.onChange === void 0 && (t.value.onChange = (D) => {
|
|
589
|
+
var C, R;
|
|
590
|
+
(R = (C = E.value) == null ? void 0 : C.table) == null || R.load();
|
|
591
591
|
});
|
|
592
592
|
}
|
|
593
|
-
d.value == "image" && (t.value.width && ((a =
|
|
593
|
+
d.value == "image" && (t.value.width && ((a = ne.value) != null && a.$el) && ne.value.$el.style.setProperty("--up-width", typeof t.value.width == "number" ? t.value.width + "px" : t.value.width), t.value.height && ((p = ne.value) != null && p.$el) && ne.value.$el.style.setProperty("--up-height", typeof t.value.height == "number" ? t.value.height + "px" : t.value.height), t.value.fontSize && ((g = ne.value) != null && g.$el) && ne.value.$el.style.setProperty("--up-font-size", typeof t.value.fontSize == "number" ? t.value.fontSize + "px" : t.value.fontSize));
|
|
594
594
|
});
|
|
595
|
-
const
|
|
595
|
+
const te = Xe(() => {
|
|
596
596
|
var b;
|
|
597
597
|
return t.value["file-list"] && t.value["file-list"].length ? (b = t.value["file-list"]) == null ? void 0 : b.map((o) => o == null ? void 0 : o.url) : [c.value];
|
|
598
598
|
});
|
|
599
599
|
return (b, o) => {
|
|
600
|
-
var
|
|
601
|
-
const _ = Y("el-image-viewer"),
|
|
600
|
+
var m, F, P;
|
|
601
|
+
const _ = Y("el-image-viewer"), v = Y("el-radio"), a = Y("el-radio-group"), p = Y("el-radio-button"), g = Y("el-checkbox"), s = Y("el-checkbox-group"), D = Y("el-checkbox-button"), C = Y("g-select-option"), R = Y("el-option"), X = Y("el-select"), O = Y("el-tree-select"), A = Y("el-time-picker"), ue = Y("el-time-select"), Ee = Y("el-date-picker"), we = Y("el-color-picker"), De = Y("el-rate"), Ve = Y("el-slider"), $e = Y("el-switch"), Me = Y("el-transfer"), Ie = Y("el-cascader"), Ye = Y("el-icon"), at = Y("el-image"), Ze = Y("el-tooltip"), ot = Y("el-upload"), rt = Y("el-autocomplete"), ut = Y("el-input-number"), Je = Y("el-input"), l = Y("el-link"), u = Y("el-tag");
|
|
602
602
|
return i(), x(W, null, [
|
|
603
|
-
|
|
604
|
-
|
|
603
|
+
G("div", null, [
|
|
604
|
+
k.value ? (i(), M(_, {
|
|
605
605
|
key: 0,
|
|
606
606
|
teleported: !0,
|
|
607
|
-
"url-list":
|
|
608
|
-
onClose: o[0] || (o[0] = (n) =>
|
|
607
|
+
"url-list": te.value,
|
|
608
|
+
onClose: o[0] || (o[0] = (n) => k.value = !1)
|
|
609
609
|
}, null, 8, ["url-list"])) : ce("", !0)
|
|
610
610
|
]),
|
|
611
|
-
|
|
612
|
-
d.value ==
|
|
611
|
+
G("div", ol, [
|
|
612
|
+
d.value == j(pe).RADIO ? (i(), M(a, q({
|
|
613
613
|
key: 0,
|
|
614
614
|
modelValue: c.value,
|
|
615
615
|
"onUpdate:modelValue": o[1] || (o[1] = (n) => c.value = n)
|
|
616
616
|
}, t.value), {
|
|
617
617
|
default: y(() => [
|
|
618
|
-
h(b.$slots, `${
|
|
619
|
-
(i(!0), x(W, null,
|
|
618
|
+
h(b.$slots, `${r.t}-${e.value}`, { data: t.value }, () => [
|
|
619
|
+
(i(!0), x(W, null, U(S.value, (n) => (i(), M(v, q({ ref_for: !0 }, n), {
|
|
620
620
|
default: y(() => [
|
|
621
|
-
h(b.$slots, `${
|
|
621
|
+
h(b.$slots, `${r.t}-${e.value}-options`, { option: n }, void 0, !0)
|
|
622
622
|
]),
|
|
623
623
|
_: 2
|
|
624
624
|
}, 1040))), 256))
|
|
625
625
|
], !0)
|
|
626
626
|
]),
|
|
627
627
|
_: 3
|
|
628
|
-
}, 16, ["modelValue"])) : d.value ==
|
|
628
|
+
}, 16, ["modelValue"])) : d.value == j(pe).RADIOBUTTON ? (i(), M(a, q({
|
|
629
629
|
key: 1,
|
|
630
630
|
modelValue: c.value,
|
|
631
631
|
"onUpdate:modelValue": o[2] || (o[2] = (n) => c.value = n)
|
|
632
632
|
}, t.value), {
|
|
633
633
|
default: y(() => [
|
|
634
|
-
h(b.$slots, `${
|
|
635
|
-
(i(!0), x(W, null,
|
|
634
|
+
h(b.$slots, `${r.t}-${e.value}`, { data: t.value }, () => [
|
|
635
|
+
(i(!0), x(W, null, U(S.value, (n) => (i(), M(p, q({ ref_for: !0 }, n), {
|
|
636
636
|
default: y(() => [
|
|
637
|
-
h(b.$slots, `${
|
|
637
|
+
h(b.$slots, `${r.t}-${e.value}-options`, { option: n }, void 0, !0)
|
|
638
638
|
]),
|
|
639
639
|
_: 2
|
|
640
640
|
}, 1040))), 256))
|
|
641
641
|
], !0)
|
|
642
642
|
]),
|
|
643
643
|
_: 3
|
|
644
|
-
}, 16, ["modelValue"])) : d.value ==
|
|
644
|
+
}, 16, ["modelValue"])) : d.value == j(pe).CHECKBOX ? (i(), M(g, q({
|
|
645
645
|
key: 2,
|
|
646
646
|
modelValue: c.value,
|
|
647
647
|
"onUpdate:modelValue": o[3] || (o[3] = (n) => c.value = n)
|
|
648
648
|
}, t.value), {
|
|
649
649
|
default: y(() => [
|
|
650
|
-
h(b.$slots, `${
|
|
651
|
-
o[27] || (o[27] = _e(
|
|
650
|
+
h(b.$slots, `${r.t}-${e.value}`, { data: t.value }, () => [
|
|
651
|
+
o[27] || (o[27] = _e(he(" ")))
|
|
652
652
|
], !0)
|
|
653
653
|
]),
|
|
654
654
|
_: 3
|
|
655
|
-
}, 16, ["modelValue"])) : d.value ==
|
|
655
|
+
}, 16, ["modelValue"])) : d.value == j(pe).CHECKBOXGROUP ? (i(), M(s, q({
|
|
656
656
|
key: 3,
|
|
657
657
|
modelValue: c.value,
|
|
658
658
|
"onUpdate:modelValue": o[4] || (o[4] = (n) => c.value = n)
|
|
659
659
|
}, t.value), {
|
|
660
660
|
default: y(() => [
|
|
661
|
-
h(b.$slots, `${
|
|
662
|
-
(i(!0), x(W, null,
|
|
661
|
+
h(b.$slots, `${r.t}-${e.value}`, { data: t.value }, () => [
|
|
662
|
+
(i(!0), x(W, null, U(S.value, (n) => (i(), M(g, q({ ref_for: !0 }, n), {
|
|
663
663
|
default: y(() => [
|
|
664
|
-
h(b.$slots, `${
|
|
665
|
-
_e(
|
|
664
|
+
h(b.$slots, `${r.t}-${e.value}-options`, { option: n }, () => [
|
|
665
|
+
_e(he(n.label), 1)
|
|
666
666
|
], !0)
|
|
667
667
|
]),
|
|
668
668
|
_: 2
|
|
@@ -670,62 +670,62 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
670
670
|
], !0)
|
|
671
671
|
]),
|
|
672
672
|
_: 3
|
|
673
|
-
}, 16, ["modelValue"])) : d.value ==
|
|
673
|
+
}, 16, ["modelValue"])) : d.value == j(pe).CHECKBOXGROUPBUTTON ? (i(), M(s, q({
|
|
674
674
|
key: 4,
|
|
675
675
|
modelValue: c.value,
|
|
676
676
|
"onUpdate:modelValue": o[5] || (o[5] = (n) => c.value = n)
|
|
677
677
|
}, t.value), {
|
|
678
678
|
default: y(() => [
|
|
679
|
-
h(b.$slots, `${
|
|
680
|
-
(i(!0), x(W, null,
|
|
679
|
+
h(b.$slots, `${r.t}-${e.value}`, { data: t.value }, () => [
|
|
680
|
+
(i(!0), x(W, null, U(S.value, (n) => (i(), M(D, q({ ref_for: !0 }, n), {
|
|
681
681
|
default: y(() => [
|
|
682
|
-
h(b.$slots, `${
|
|
682
|
+
h(b.$slots, `${r.t}-${e.value}-options`, { option: n }, void 0, !0)
|
|
683
683
|
]),
|
|
684
684
|
_: 2
|
|
685
685
|
}, 1040))), 256))
|
|
686
686
|
], !0)
|
|
687
687
|
]),
|
|
688
688
|
_: 3
|
|
689
|
-
}, 16, ["modelValue"])) : d.value ===
|
|
689
|
+
}, 16, ["modelValue"])) : d.value === j(pe).SELECT ? (i(), M(X, q({
|
|
690
690
|
key: 5,
|
|
691
691
|
modelValue: c.value,
|
|
692
692
|
"onUpdate:modelValue": o[6] || (o[6] = (n) => c.value = n),
|
|
693
|
-
placeholder:
|
|
693
|
+
placeholder: E.value[e.value].label,
|
|
694
694
|
clearable: !0,
|
|
695
695
|
onClear: o[7] || (o[7] = () => {
|
|
696
|
-
|
|
696
|
+
r.t == "q" && E.value.table.load();
|
|
697
697
|
})
|
|
698
|
-
},
|
|
698
|
+
}, ae.value), fe({
|
|
699
699
|
default: y(() => [
|
|
700
|
-
h(b.$slots, `${
|
|
701
|
-
(i(!0), x(W, null,
|
|
700
|
+
h(b.$slots, `${r.t}-${e.value}`, { options: S.value }, () => [
|
|
701
|
+
(i(!0), x(W, null, U(S.value, (n) => (i(), x(W, {
|
|
702
702
|
key: n.value
|
|
703
703
|
}, [
|
|
704
|
-
|
|
705
|
-
onClick: (
|
|
706
|
-
|
|
704
|
+
J(R, q({ ref_for: !0 }, j(Ce)(n, (V) => V != "children"), {
|
|
705
|
+
onClick: (V) => {
|
|
706
|
+
ae.value.change && ae.value.change(n), ye();
|
|
707
707
|
}
|
|
708
708
|
}), {
|
|
709
709
|
default: y(() => {
|
|
710
|
-
var
|
|
710
|
+
var V;
|
|
711
711
|
return [
|
|
712
|
-
(
|
|
712
|
+
(V = t.value) != null && V.columns ? h(b.$slots, `${r.t}-${e.value}-options`, {
|
|
713
713
|
key: 0,
|
|
714
714
|
option: n
|
|
715
715
|
}, () => {
|
|
716
|
-
var
|
|
716
|
+
var K;
|
|
717
717
|
return [
|
|
718
|
-
|
|
719
|
-
columns: (
|
|
718
|
+
J(C, {
|
|
719
|
+
columns: (K = t.value) == null ? void 0 : K.columns,
|
|
720
720
|
data: n,
|
|
721
|
-
t:
|
|
721
|
+
t: r.t
|
|
722
722
|
}, fe({ _: 2 }, [
|
|
723
|
-
|
|
724
|
-
name:
|
|
725
|
-
fn: y((
|
|
726
|
-
h(b.$slots,
|
|
723
|
+
U(b.$slots, (ve, qe) => ({
|
|
724
|
+
name: qe,
|
|
725
|
+
fn: y((xe) => [
|
|
726
|
+
h(b.$slots, qe, {
|
|
727
727
|
option: n,
|
|
728
|
-
data:
|
|
728
|
+
data: xe
|
|
729
729
|
}, void 0, !0)
|
|
730
730
|
])
|
|
731
731
|
}))
|
|
@@ -736,35 +736,35 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
736
736
|
}),
|
|
737
737
|
_: 2
|
|
738
738
|
}, 1040, ["onClick"]),
|
|
739
|
-
n.children && n.children.length ? (i(!0), x(W, { key: 0 },
|
|
739
|
+
n.children && n.children.length ? (i(!0), x(W, { key: 0 }, U(n.children, (V) => (i(), M(R, q({
|
|
740
740
|
style: { "margin-left": "20px" },
|
|
741
|
-
key:
|
|
741
|
+
key: V.value,
|
|
742
742
|
ref_for: !0
|
|
743
|
-
},
|
|
744
|
-
onClick: (
|
|
745
|
-
|
|
743
|
+
}, j(Ce)(V, (K) => K != "children"), {
|
|
744
|
+
onClick: (K) => {
|
|
745
|
+
ae.value.change && ae.value.change(V), ye();
|
|
746
746
|
}
|
|
747
747
|
}), {
|
|
748
748
|
default: y(() => {
|
|
749
|
-
var
|
|
749
|
+
var K;
|
|
750
750
|
return [
|
|
751
|
-
(
|
|
751
|
+
(K = t.value) != null && K.columns ? h(b.$slots, `${r.t}-${e.value}-options`, {
|
|
752
752
|
key: 0,
|
|
753
|
-
option:
|
|
753
|
+
option: V
|
|
754
754
|
}, () => {
|
|
755
|
-
var
|
|
755
|
+
var ve;
|
|
756
756
|
return [
|
|
757
|
-
|
|
758
|
-
columns: (
|
|
759
|
-
data:
|
|
760
|
-
t:
|
|
757
|
+
J(C, {
|
|
758
|
+
columns: (ve = t.value) == null ? void 0 : ve.columns,
|
|
759
|
+
data: V,
|
|
760
|
+
t: r.t
|
|
761
761
|
}, fe({ _: 2 }, [
|
|
762
|
-
|
|
763
|
-
name:
|
|
764
|
-
fn: y((
|
|
765
|
-
h(b.$slots,
|
|
766
|
-
option:
|
|
767
|
-
data:
|
|
762
|
+
U(b.$slots, (qe, xe) => ({
|
|
763
|
+
name: xe,
|
|
764
|
+
fn: y((ze) => [
|
|
765
|
+
h(b.$slots, xe, {
|
|
766
|
+
option: V,
|
|
767
|
+
data: ze
|
|
768
768
|
}, void 0, !0)
|
|
769
769
|
])
|
|
770
770
|
}))
|
|
@@ -780,20 +780,20 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
780
780
|
]),
|
|
781
781
|
_: 2
|
|
782
782
|
}, [
|
|
783
|
-
(
|
|
783
|
+
(m = t.value) != null && m.columns ? {
|
|
784
784
|
name: "header",
|
|
785
785
|
fn: y(() => {
|
|
786
786
|
var n;
|
|
787
787
|
return [
|
|
788
|
-
|
|
788
|
+
J(C, {
|
|
789
789
|
columns: (n = t.value) == null ? void 0 : n.columns,
|
|
790
790
|
title: !0,
|
|
791
|
-
t:
|
|
791
|
+
t: r.t
|
|
792
792
|
}, fe({ _: 2 }, [
|
|
793
|
-
|
|
794
|
-
name:
|
|
795
|
-
fn: y((
|
|
796
|
-
h(b.$slots,
|
|
793
|
+
U(b.$slots, (V, K) => ({
|
|
794
|
+
name: K,
|
|
795
|
+
fn: y((ve) => [
|
|
796
|
+
h(b.$slots, K, { data: ve }, void 0, !0)
|
|
797
797
|
])
|
|
798
798
|
}))
|
|
799
799
|
]), 1032, ["columns", "t"])
|
|
@@ -801,157 +801,157 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
801
801
|
}),
|
|
802
802
|
key: "0"
|
|
803
803
|
} : void 0,
|
|
804
|
-
|
|
804
|
+
U(L(), (n) => ({
|
|
805
805
|
name: n,
|
|
806
|
-
fn: y((
|
|
807
|
-
h(b.$slots, `${
|
|
806
|
+
fn: y((V) => [
|
|
807
|
+
h(b.$slots, `${r.t}-${e.value}-${n}`, { data: V }, void 0, !0)
|
|
808
808
|
])
|
|
809
809
|
}))
|
|
810
|
-
]), 1040, ["modelValue", "placeholder"])) : d.value ==
|
|
810
|
+
]), 1040, ["modelValue", "placeholder"])) : d.value == j(pe).TREESELECT ? (i(), M(O, q({
|
|
811
811
|
key: 6,
|
|
812
812
|
modelValue: c.value,
|
|
813
813
|
"onUpdate:modelValue": o[8] || (o[8] = (n) => c.value = n),
|
|
814
|
-
placeholder:
|
|
814
|
+
placeholder: E.value[e.value].label
|
|
815
815
|
}, t.value, { data: T.value }), fe({ _: 2 }, [
|
|
816
|
-
|
|
816
|
+
U(L(), (n) => ({
|
|
817
817
|
name: n,
|
|
818
|
-
fn: y((
|
|
819
|
-
h(b.$slots, `${
|
|
818
|
+
fn: y((V) => [
|
|
819
|
+
h(b.$slots, `${r.t}-${e.value}-${n}`, { data: V }, void 0, !0)
|
|
820
820
|
])
|
|
821
821
|
}))
|
|
822
|
-
]), 1040, ["modelValue", "placeholder", "data"])) : d.value ==
|
|
822
|
+
]), 1040, ["modelValue", "placeholder", "data"])) : d.value == j(pe).TIME ? (i(), M(A, q({
|
|
823
823
|
key: 7,
|
|
824
824
|
modelValue: c.value,
|
|
825
825
|
"onUpdate:modelValue": o[9] || (o[9] = (n) => c.value = n),
|
|
826
826
|
"arrow-control": ""
|
|
827
827
|
}, t.value, {
|
|
828
|
-
placeholder:
|
|
829
|
-
}), null, 16, ["modelValue", "placeholder"])) : d.value ==
|
|
828
|
+
placeholder: E.value[e.value].label
|
|
829
|
+
}), null, 16, ["modelValue", "placeholder"])) : d.value == j(pe).TIMESELECT ? (i(), M(ue, q({
|
|
830
830
|
key: 8,
|
|
831
831
|
modelValue: c.value,
|
|
832
832
|
"onUpdate:modelValue": o[10] || (o[10] = (n) => c.value = n),
|
|
833
833
|
start: "06:30",
|
|
834
834
|
step: "00:15",
|
|
835
835
|
end: "23:30",
|
|
836
|
-
placeholder:
|
|
837
|
-
}, t.value), null, 16, ["modelValue", "placeholder"])) :
|
|
836
|
+
placeholder: E.value[e.value].label
|
|
837
|
+
}, t.value), null, 16, ["modelValue", "placeholder"])) : z(d.value) ? (i(), M(Ee, q({
|
|
838
838
|
key: 9,
|
|
839
839
|
modelValue: c.value,
|
|
840
840
|
"onUpdate:modelValue": o[11] || (o[11] = (n) => c.value = n),
|
|
841
841
|
type: d.value,
|
|
842
|
-
placeholder:
|
|
843
|
-
"value-format":
|
|
842
|
+
placeholder: E.value[e.value].label,
|
|
843
|
+
"value-format": re(d.value)
|
|
844
844
|
}, t.value), fe({ _: 2 }, [
|
|
845
|
-
|
|
845
|
+
U(L(), (n) => ({
|
|
846
846
|
name: n,
|
|
847
|
-
fn: y((
|
|
848
|
-
h(b.$slots, `${
|
|
847
|
+
fn: y((V) => [
|
|
848
|
+
h(b.$slots, `${r.t}-${e.value}-${n}`, { data: V }, void 0, !0)
|
|
849
849
|
])
|
|
850
850
|
}))
|
|
851
|
-
]), 1040, ["modelValue", "type", "placeholder", "value-format"])) : d.value ==
|
|
851
|
+
]), 1040, ["modelValue", "type", "placeholder", "value-format"])) : d.value == j(pe).COLOR ? (i(), M(we, q({
|
|
852
852
|
key: 10,
|
|
853
853
|
modelValue: c.value,
|
|
854
854
|
"onUpdate:modelValue": o[12] || (o[12] = (n) => c.value = n)
|
|
855
|
-
}, t.value), null, 16, ["modelValue"])) : d.value ==
|
|
855
|
+
}, t.value), null, 16, ["modelValue"])) : d.value == j(pe).RATE ? (i(), M(De, q({
|
|
856
856
|
key: 11,
|
|
857
857
|
modelValue: c.value,
|
|
858
858
|
"onUpdate:modelValue": o[13] || (o[13] = (n) => c.value = n)
|
|
859
|
-
}, t.value), null, 16, ["modelValue"])) : d.value ==
|
|
859
|
+
}, t.value), null, 16, ["modelValue"])) : d.value == j(pe).SLIDER ? (i(), M(Ve, q({
|
|
860
860
|
key: 12,
|
|
861
861
|
modelValue: c.value,
|
|
862
862
|
"onUpdate:modelValue": o[14] || (o[14] = (n) => c.value = n)
|
|
863
|
-
}, t.value), null, 16, ["modelValue"])) : d.value ==
|
|
863
|
+
}, t.value), null, 16, ["modelValue"])) : d.value == j(pe).SWITCH ? (i(), M($e, q({
|
|
864
864
|
key: 13,
|
|
865
865
|
modelValue: c.value,
|
|
866
866
|
"onUpdate:modelValue": o[15] || (o[15] = (n) => c.value = n)
|
|
867
867
|
}, t.value), fe({ _: 2 }, [
|
|
868
|
-
|
|
868
|
+
U(L(), (n) => ({
|
|
869
869
|
name: n,
|
|
870
|
-
fn: y((
|
|
871
|
-
h(b.$slots, `${
|
|
870
|
+
fn: y((V) => [
|
|
871
|
+
h(b.$slots, `${r.t}-${e.value}-${n}`, { data: V }, void 0, !0)
|
|
872
872
|
])
|
|
873
873
|
}))
|
|
874
|
-
]), 1040, ["modelValue"])) : d.value ==
|
|
874
|
+
]), 1040, ["modelValue"])) : d.value == j(pe).TRANSFER ? (i(), M(Me, q({
|
|
875
875
|
key: 14,
|
|
876
876
|
modelValue: c.value,
|
|
877
877
|
"onUpdate:modelValue": o[16] || (o[16] = (n) => c.value = n)
|
|
878
878
|
}, t.value), fe({ _: 2 }, [
|
|
879
|
-
|
|
879
|
+
U(L(), (n) => ({
|
|
880
880
|
name: n,
|
|
881
|
-
fn: y((
|
|
882
|
-
h(b.$slots, `${
|
|
881
|
+
fn: y((V) => [
|
|
882
|
+
h(b.$slots, `${r.t}-${e.value}-${n}`, { data: V }, void 0, !0)
|
|
883
883
|
])
|
|
884
884
|
}))
|
|
885
|
-
]), 1040, ["modelValue"])) : d.value ==
|
|
885
|
+
]), 1040, ["modelValue"])) : d.value == j(pe).CASCADER ? (i(), M(Ie, q({
|
|
886
886
|
key: 15,
|
|
887
887
|
modelValue: c.value,
|
|
888
888
|
"onUpdate:modelValue": o[17] || (o[17] = (n) => c.value = n)
|
|
889
889
|
}, t.value, { options: S.value }), fe({ _: 2 }, [
|
|
890
|
-
|
|
890
|
+
U(L(), (n) => ({
|
|
891
891
|
name: n,
|
|
892
|
-
fn: y((
|
|
893
|
-
h(b.$slots, `${
|
|
892
|
+
fn: y((V) => [
|
|
893
|
+
h(b.$slots, `${r.t}-${e.value}-${n}`, { data: V }, void 0, !0)
|
|
894
894
|
])
|
|
895
895
|
}))
|
|
896
|
-
]), 1040, ["modelValue", "options"])) : d.value ==
|
|
896
|
+
]), 1040, ["modelValue", "options"])) : d.value == j(pe).IMAGE ? (i(), M(ot, q({
|
|
897
897
|
key: 16,
|
|
898
898
|
"file-list": t.value["file-list"],
|
|
899
899
|
"onUpdate:fileList": o[21] || (o[21] = (n) => t.value["file-list"] = n),
|
|
900
900
|
"list-type": "picture-card",
|
|
901
901
|
class: "custom-upload",
|
|
902
|
-
"on-preview":
|
|
903
|
-
}, { ...
|
|
902
|
+
"on-preview": ie
|
|
903
|
+
}, { ...ee.value, ...t.value }, {
|
|
904
904
|
ref_key: "uploadRef",
|
|
905
|
-
ref:
|
|
905
|
+
ref: ne
|
|
906
906
|
}), fe({
|
|
907
907
|
default: y(() => {
|
|
908
908
|
var n;
|
|
909
909
|
return [
|
|
910
910
|
c.value ? (i(), x("div", {
|
|
911
911
|
key: 1,
|
|
912
|
-
onClick: o[20] || (o[20] = (
|
|
912
|
+
onClick: o[20] || (o[20] = (V) => V.stopPropagation()),
|
|
913
913
|
style: { display: "flex", width: "var(--up-width)", height: "var(--up-height)", position: "relative", "align-items": "center", "justify-content": "center", "box-sizing": "border-box" }
|
|
914
914
|
}, [
|
|
915
|
-
|
|
916
|
-
|
|
915
|
+
G("div", rl, [
|
|
916
|
+
J(at, q({
|
|
917
917
|
style: { width: "var(--up-width)", height: "var(--up-height)" },
|
|
918
918
|
src: c.value
|
|
919
919
|
}, { fit: "cover", lazy: !0, ...(n = t.value) == null ? void 0 : n.img }), fe({ _: 2 }, [
|
|
920
|
-
|
|
921
|
-
name:
|
|
922
|
-
fn: y((
|
|
923
|
-
h(b.$slots, `${
|
|
920
|
+
U(L(), (V, K) => ({
|
|
921
|
+
name: V,
|
|
922
|
+
fn: y((ve) => [
|
|
923
|
+
h(b.$slots, `${r.t}-${e.value}-${V}`, { data: ve }, void 0, !0)
|
|
924
924
|
])
|
|
925
925
|
}))
|
|
926
926
|
]), 1040, ["src"])
|
|
927
927
|
]),
|
|
928
|
-
|
|
928
|
+
G("div", {
|
|
929
929
|
style: { display: "flex", width: "var(--up-width)", height: "var(--up-height)", position: "absolute", "align-items": "center", "justify-content": "center" },
|
|
930
|
-
onMouseenter: o[18] || (o[18] = (
|
|
931
|
-
onMouseleave: o[19] || (o[19] = (
|
|
930
|
+
onMouseenter: o[18] || (o[18] = (V) => $.value = !0),
|
|
931
|
+
onMouseleave: o[19] || (o[19] = (V) => $.value = !1),
|
|
932
932
|
class: "up-view"
|
|
933
933
|
}, [
|
|
934
|
-
|
|
934
|
+
$.value ? (i(), M(Ze, {
|
|
935
935
|
key: 0,
|
|
936
936
|
content: "查看大图",
|
|
937
937
|
placement: "top"
|
|
938
938
|
}, {
|
|
939
939
|
default: y(() => [
|
|
940
|
-
|
|
940
|
+
J(j(Gt), {
|
|
941
941
|
style: { width: "1.5em", height: "1.5em", "margin-right": "12px" },
|
|
942
942
|
color: "white",
|
|
943
|
-
onClick:
|
|
943
|
+
onClick: de
|
|
944
944
|
})
|
|
945
945
|
]),
|
|
946
946
|
_: 1
|
|
947
947
|
})) : ce("", !0),
|
|
948
|
-
|
|
948
|
+
ee.value.showDel && $.value ? (i(), M(Ze, {
|
|
949
949
|
key: 1,
|
|
950
950
|
content: "删除",
|
|
951
951
|
placement: "top"
|
|
952
952
|
}, {
|
|
953
953
|
default: y(() => [
|
|
954
|
-
|
|
954
|
+
J(j(Qt), {
|
|
955
955
|
style: { width: "1.5em", height: "1.5em" },
|
|
956
956
|
color: "white",
|
|
957
957
|
onClick: ge
|
|
@@ -960,9 +960,9 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
960
960
|
_: 1
|
|
961
961
|
})) : ce("", !0)
|
|
962
962
|
], 32)
|
|
963
|
-
])) : (i(),
|
|
963
|
+
])) : (i(), M(Ye, { key: 0 }, {
|
|
964
964
|
default: y(() => [
|
|
965
|
-
|
|
965
|
+
J(j(Xt))
|
|
966
966
|
]),
|
|
967
967
|
_: 1
|
|
968
968
|
}))
|
|
@@ -970,103 +970,103 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
970
970
|
}),
|
|
971
971
|
_: 2
|
|
972
972
|
}, [
|
|
973
|
-
|
|
973
|
+
U(L(), (n, V) => ({
|
|
974
974
|
name: n,
|
|
975
|
-
fn: y((
|
|
976
|
-
h(b.$slots, `${
|
|
975
|
+
fn: y((K) => [
|
|
976
|
+
h(b.$slots, `${r.t}-${e.value}-${n}`, { data: K }, void 0, !0)
|
|
977
977
|
])
|
|
978
978
|
}))
|
|
979
|
-
]), 1040, ["file-list"])) : d.value ==
|
|
979
|
+
]), 1040, ["file-list"])) : d.value == j(pe).AUTOCOMPLETE ? (i(), M(rt, q({
|
|
980
980
|
key: 17,
|
|
981
981
|
modelValue: c.value,
|
|
982
982
|
"onUpdate:modelValue": o[22] || (o[22] = (n) => c.value = n)
|
|
983
983
|
}, t.value, {
|
|
984
|
-
placeholder:
|
|
984
|
+
placeholder: E.value[e.value].label
|
|
985
985
|
}), fe({ _: 2 }, [
|
|
986
|
-
|
|
986
|
+
U(L(), (n, V) => ({
|
|
987
987
|
name: n,
|
|
988
|
-
fn: y((
|
|
989
|
-
h(b.$slots, `${
|
|
988
|
+
fn: y((K) => [
|
|
989
|
+
h(b.$slots, `${r.t}-${e.value}-${n}`, { data: K }, void 0, !0)
|
|
990
990
|
])
|
|
991
991
|
}))
|
|
992
|
-
]), 1040, ["modelValue", "placeholder"])) : d.value ==
|
|
992
|
+
]), 1040, ["modelValue", "placeholder"])) : d.value == j(pe).INPUTNUMBER ? (i(), M(ut, q({
|
|
993
993
|
key: 18,
|
|
994
994
|
modelValue: c.value,
|
|
995
995
|
"onUpdate:modelValue": o[23] || (o[23] = (n) => c.value = n),
|
|
996
996
|
min: 0,
|
|
997
997
|
max: 1e8,
|
|
998
|
-
placeholder:
|
|
998
|
+
placeholder: E.value[e.value].label
|
|
999
999
|
}, t.value), fe({ _: 2 }, [
|
|
1000
|
-
|
|
1000
|
+
U(L(), (n, V) => ({
|
|
1001
1001
|
name: n,
|
|
1002
|
-
fn: y((
|
|
1003
|
-
h(b.$slots, `${
|
|
1002
|
+
fn: y((K) => [
|
|
1003
|
+
h(b.$slots, `${r.t}-${e.value}-${n}`, { data: K }, void 0, !0)
|
|
1004
1004
|
])
|
|
1005
1005
|
}))
|
|
1006
|
-
]), 1040, ["modelValue", "placeholder"])) : d.value ==
|
|
1007
|
-
|
|
1006
|
+
]), 1040, ["modelValue", "placeholder"])) : d.value == j(pe).MONEY ? (i(), x("div", ul, [
|
|
1007
|
+
J(Je, q({
|
|
1008
1008
|
modelValue: c.value,
|
|
1009
1009
|
"onUpdate:modelValue": o[24] || (o[24] = (n) => c.value = n),
|
|
1010
|
-
placeholder:
|
|
1011
|
-
type:
|
|
1012
|
-
maxlength: ((
|
|
1010
|
+
placeholder: E.value[e.value].label,
|
|
1011
|
+
type: j(pe).NUMBER,
|
|
1012
|
+
maxlength: ((F = t.value) == null ? void 0 : F.max) || 25
|
|
1013
1013
|
}, { ...t.value, type: d.value }), fe({
|
|
1014
1014
|
suffix: y(() => [
|
|
1015
|
-
|
|
1016
|
-
title:
|
|
1015
|
+
G("div", {
|
|
1016
|
+
title: j(yt)(c.value),
|
|
1017
1017
|
style: { "font-size": "10px", display: "block", width: "80px", "text-align": "right", overflow: "hidden", "text-overflow": "ellipsis" }
|
|
1018
|
-
},
|
|
1018
|
+
}, he(j(yt)(c.value)), 9, nl)
|
|
1019
1019
|
]),
|
|
1020
1020
|
_: 2
|
|
1021
1021
|
}, [
|
|
1022
|
-
|
|
1022
|
+
U(L(), (n, V) => ({
|
|
1023
1023
|
name: n,
|
|
1024
|
-
fn: y((
|
|
1025
|
-
h(b.$slots, `${
|
|
1024
|
+
fn: y((K) => [
|
|
1025
|
+
h(b.$slots, `${r.t}-${e.value}-${n}`, { data: K }, void 0, !0)
|
|
1026
1026
|
])
|
|
1027
1027
|
}))
|
|
1028
1028
|
]), 1040, ["modelValue", "placeholder", "type", "maxlength"])
|
|
1029
1029
|
])) : (d.value === "primary" || d.value === "success" || d.value === "warning" || d.value == "danger" || d.value === "info" || d.value == "default") && t.value.isLink === !0 ? (i(), x("div", sl, [
|
|
1030
|
-
|
|
1030
|
+
J(l, q(t.value, {
|
|
1031
1031
|
innerHTML: I.value || c.value
|
|
1032
1032
|
}), null, 16, ["innerHTML"])
|
|
1033
1033
|
])) : (d.value === "primary" || d.value === "success" || d.value === "warning" || d.value == "danger" || d.value === "info") && t.value.isTag === !0 ? (i(), x("div", il, [
|
|
1034
|
-
Array.isArray(I.value) && I.value.length > 0 ? (i(!0), x(W, { key: 0 },
|
|
1035
|
-
typeof n == "object" ? (i(),
|
|
1034
|
+
Array.isArray(I.value) && I.value.length > 0 ? (i(!0), x(W, { key: 0 }, U(I.value, (n, V) => (i(), x(W, { key: V }, [
|
|
1035
|
+
typeof n == "object" ? (i(), M(u, q({
|
|
1036
1036
|
key: 0,
|
|
1037
1037
|
ref_for: !0
|
|
1038
1038
|
}, n, {
|
|
1039
1039
|
innerHTML: n == null ? void 0 : n.value,
|
|
1040
1040
|
style: { "margin-right": "3px" }
|
|
1041
|
-
}), null, 16, ["innerHTML"])) : (i(),
|
|
1041
|
+
}), null, 16, ["innerHTML"])) : (i(), M(u, q({
|
|
1042
1042
|
key: 1,
|
|
1043
1043
|
ref_for: !0
|
|
1044
1044
|
}, t.value, {
|
|
1045
1045
|
innerHTML: n,
|
|
1046
1046
|
style: { "margin-right": "3px" }
|
|
1047
1047
|
}), null, 16, ["innerHTML"]))
|
|
1048
|
-
], 64))), 128)) : (i(),
|
|
1048
|
+
], 64))), 128)) : (i(), M(u, q({ key: 1 }, t.value, {
|
|
1049
1049
|
innerHTML: I.value || c.value
|
|
1050
1050
|
}), null, 16, ["innerHTML"]))
|
|
1051
1051
|
])) : d.value == "div" ? (i(), x("div", q({ key: 22 }, t.value, {
|
|
1052
1052
|
innerHTML: I.value || c.value
|
|
1053
1053
|
}), null, 16, dl)) : d.value == "span" ? (i(), x("span", q({ key: 23 }, t.value, {
|
|
1054
1054
|
innerHTML: I.value || c.value
|
|
1055
|
-
}), null, 16, fl)) : (i(),
|
|
1055
|
+
}), null, 16, fl)) : (i(), M(Je, q({
|
|
1056
1056
|
key: 24,
|
|
1057
1057
|
modelValue: c.value,
|
|
1058
1058
|
"onUpdate:modelValue": o[25] || (o[25] = (n) => c.value = n),
|
|
1059
|
-
placeholder:
|
|
1060
|
-
maxlength: ((
|
|
1059
|
+
placeholder: E.value[e.value].label,
|
|
1060
|
+
maxlength: ((P = t.value) == null ? void 0 : P.max) || 25,
|
|
1061
1061
|
clearable: !0,
|
|
1062
1062
|
onClear: o[26] || (o[26] = () => {
|
|
1063
|
-
|
|
1063
|
+
r.t == "q" && E.value.table.load();
|
|
1064
1064
|
})
|
|
1065
1065
|
}, { ...t.value, type: d.value }), fe({ _: 2 }, [
|
|
1066
|
-
|
|
1066
|
+
U(L(), (n, V) => ({
|
|
1067
1067
|
name: n,
|
|
1068
|
-
fn: y((
|
|
1069
|
-
h(b.$slots, `${
|
|
1068
|
+
fn: y((K) => [
|
|
1069
|
+
h(b.$slots, `${r.t}-${e.value}-${n}`, { data: K }, void 0, !0)
|
|
1070
1070
|
])
|
|
1071
1071
|
}))
|
|
1072
1072
|
]), 1040, ["modelValue", "placeholder", "maxlength"]))
|
|
@@ -1074,19 +1074,19 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1074
1074
|
], 64);
|
|
1075
1075
|
};
|
|
1076
1076
|
}
|
|
1077
|
-
}),
|
|
1077
|
+
}), dt = /* @__PURE__ */ Ge(cl, [["__scopeId", "data-v-a78297fa"]]), vt = /* @__PURE__ */ Object.assign({
|
|
1078
1078
|
name: "g-form",
|
|
1079
1079
|
inheritAttrs: !1
|
|
1080
1080
|
}, {
|
|
1081
1081
|
__name: "g-form",
|
|
1082
|
-
props: /* @__PURE__ */
|
|
1082
|
+
props: /* @__PURE__ */ Le(["editForm"], {
|
|
1083
1083
|
modelValue: { required: !0 },
|
|
1084
1084
|
modelModifiers: {}
|
|
1085
1085
|
}),
|
|
1086
|
-
emits: /* @__PURE__ */
|
|
1087
|
-
setup(
|
|
1088
|
-
var
|
|
1089
|
-
const t =
|
|
1086
|
+
emits: /* @__PURE__ */ Le(["submit", "reset"], ["update:modelValue"]),
|
|
1087
|
+
setup(f, { expose: c, emit: r }) {
|
|
1088
|
+
var te, be, se, b;
|
|
1089
|
+
const t = Ne(f, "modelValue"), e = r, d = le(null), E = gt("options"), T = le({}), S = le(""), k = f, $ = {
|
|
1090
1090
|
inline: !0,
|
|
1091
1091
|
type: "hidden",
|
|
1092
1092
|
"scroll-to-error": !0,
|
|
@@ -1096,7 +1096,7 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1096
1096
|
style: {
|
|
1097
1097
|
display: "flex",
|
|
1098
1098
|
flexWrap: "wrap",
|
|
1099
|
-
...(
|
|
1099
|
+
...(te = bt()) == null ? void 0 : te.style
|
|
1100
1100
|
},
|
|
1101
1101
|
// 表单底部属性
|
|
1102
1102
|
footer: {
|
|
@@ -1130,42 +1130,42 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1130
1130
|
editable: !1
|
|
1131
1131
|
}
|
|
1132
1132
|
};
|
|
1133
|
-
t.value.form =
|
|
1134
|
-
|
|
1135
|
-
|
|
1133
|
+
t.value.form = Fe(
|
|
1134
|
+
$,
|
|
1135
|
+
E == null ? void 0 : E.form,
|
|
1136
1136
|
(be = t.value) == null ? void 0 : be.form
|
|
1137
1137
|
);
|
|
1138
1138
|
const L = async (o, _) => {
|
|
1139
|
-
let
|
|
1140
|
-
for (;
|
|
1141
|
-
if (await
|
|
1142
|
-
d.value.validate((a,
|
|
1143
|
-
a ? e("submit", o, _) : console.log("表单验证不通过!",
|
|
1139
|
+
let v = 5;
|
|
1140
|
+
for (; v > 0; ) {
|
|
1141
|
+
if (await Qe(), d.value) {
|
|
1142
|
+
d.value.validate((a, p) => {
|
|
1143
|
+
a ? e("submit", o, _) : console.log("表单验证不通过!", p);
|
|
1144
1144
|
});
|
|
1145
1145
|
return;
|
|
1146
1146
|
}
|
|
1147
|
-
|
|
1147
|
+
v--, await new Promise((a) => setTimeout(a, 50));
|
|
1148
1148
|
}
|
|
1149
1149
|
console.error("表单实例获取失败,请检查组件状态");
|
|
1150
|
-
},
|
|
1150
|
+
}, ee = async () => {
|
|
1151
1151
|
let o = 5;
|
|
1152
1152
|
for (; o > 0; ) {
|
|
1153
|
-
if (await
|
|
1154
|
-
o--, await new Promise((
|
|
1153
|
+
if (await Qe(), !d.value) {
|
|
1154
|
+
o--, await new Promise((v) => setTimeout(v, 50));
|
|
1155
1155
|
continue;
|
|
1156
1156
|
}
|
|
1157
1157
|
let _ = !0;
|
|
1158
|
-
if (e("reset", (
|
|
1159
|
-
_ =
|
|
1158
|
+
if (e("reset", (v) => {
|
|
1159
|
+
_ = v;
|
|
1160
1160
|
}), _) {
|
|
1161
1161
|
d.value.resetFields();
|
|
1162
1162
|
return;
|
|
1163
1163
|
}
|
|
1164
|
-
o--, await new Promise((
|
|
1164
|
+
o--, await new Promise((v) => setTimeout(v, 50));
|
|
1165
1165
|
}
|
|
1166
1166
|
console.error("表单实例获取失败,请检查组件状态");
|
|
1167
1167
|
};
|
|
1168
|
-
t.value.form.submit.click = L, t.value.form.reset.click =
|
|
1168
|
+
t.value.form.submit.click = L, t.value.form.reset.click = ee;
|
|
1169
1169
|
const I = {
|
|
1170
1170
|
type: "hidden",
|
|
1171
1171
|
labelPosition: "right",
|
|
@@ -1173,21 +1173,21 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1173
1173
|
width: "100%"
|
|
1174
1174
|
}
|
|
1175
1175
|
};
|
|
1176
|
-
t.value.formItems =
|
|
1176
|
+
t.value.formItems = Fe(
|
|
1177
1177
|
I,
|
|
1178
|
-
|
|
1179
|
-
(
|
|
1178
|
+
E == null ? void 0 : E.formItems,
|
|
1179
|
+
(se = t == null ? void 0 : t.value) == null ? void 0 : se.formItems
|
|
1180
1180
|
);
|
|
1181
|
-
const
|
|
1181
|
+
const z = {
|
|
1182
1182
|
span: 12,
|
|
1183
1183
|
offset: 0
|
|
1184
1184
|
};
|
|
1185
|
-
t.value.form.cols =
|
|
1186
|
-
|
|
1187
|
-
(b =
|
|
1185
|
+
t.value.form.cols = Fe(
|
|
1186
|
+
z,
|
|
1187
|
+
(b = E == null ? void 0 : E.form) == null ? void 0 : b.cols,
|
|
1188
1188
|
t.value.form.cols
|
|
1189
1189
|
);
|
|
1190
|
-
const
|
|
1190
|
+
const re = (o) => {
|
|
1191
1191
|
let _ = [];
|
|
1192
1192
|
if (o.rules)
|
|
1193
1193
|
_ = o.rules;
|
|
@@ -1202,70 +1202,70 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1202
1202
|
validate: void 0
|
|
1203
1203
|
}, ...o };
|
|
1204
1204
|
a.required && _.push({ required: !0, message: `${a.label}不能为空!`, trigger: "blur" }), a.max !== void 0 && a.max !== null && a.max !== "" && (a.min === void 0 || a.min === null || a.min === "") && _.push({
|
|
1205
|
-
validator: (
|
|
1205
|
+
validator: (p, g, s) => {
|
|
1206
1206
|
if (g == null || g === "") return s();
|
|
1207
1207
|
a.type !== "number" && a.type !== "input-number" ? ((g == null ? void 0 : g.toString()) || "").length > Number(a.max) ? s(new Error(`${a.label}长度不能超过${a.max}个字符!`)) : s() : Number(g) > Number(a.max) ? s(new Error(`${a.label}不能大于${a.max}!`)) : s();
|
|
1208
1208
|
}
|
|
1209
1209
|
}), a.min !== void 0 && a.min !== null && a.min !== "" && (a.max === void 0 || a.max === null || a.max === "") && _.push({
|
|
1210
|
-
validator: (
|
|
1210
|
+
validator: (p, g, s) => {
|
|
1211
1211
|
if (g == null || g === "") return s();
|
|
1212
1212
|
a.type !== "number" && a.type !== "input-number" ? Number(a.min) < 1 ? s(new Error(`${a.label}长度最小值${a.min}设置错误!`)) : g.toString().length < Number(a.min) ? s(new Error(`${a.label}长度不能少于${a.min}个字符!`)) : s() : Number(g) < Number(a.min) ? s(new Error(`${a.label}不能小于${a.min}!`)) : s();
|
|
1213
1213
|
}
|
|
1214
1214
|
}), a.min !== void 0 && a.min !== null && a.min !== "" && a.max !== void 0 && a.max !== null && a.max !== "" && _.push({
|
|
1215
|
-
validator: (
|
|
1215
|
+
validator: (p, g, s) => {
|
|
1216
1216
|
if (g == null || g === "") return s();
|
|
1217
|
-
const
|
|
1218
|
-
a.type !== "number" && a.type !== "input-number" ? Number(a.min) < 1 ? s(new Error(`${a.label}长度最小值${a.min}设置错误!`)) : g.toString().length <
|
|
1217
|
+
const D = Number(a.min), C = Number(a.max);
|
|
1218
|
+
a.type !== "number" && a.type !== "input-number" ? Number(a.min) < 1 ? s(new Error(`${a.label}长度最小值${a.min}设置错误!`)) : g.toString().length < D || g.toString().length > C ? s(new Error(`${a.label}长度必须在${D}-${C}个字符之间!`)) : s() : Number(g) < D || g > C ? s(new Error(`${a.label}必须在${D}-${C}之间!`)) : s();
|
|
1219
1219
|
}
|
|
1220
1220
|
}), a.type == "email" && _.push({ type: "email", message: "不是一个正确的邮箱地址!" }), a.type == "url" && _.push({ type: "url", message: "不是一个合正确的URL!" }), a.pattern && _.push({ pattern: a == null ? void 0 : a.pattern, message: (a == null ? void 0 : a.message) || "格式不正确!" }), a.validate && _.push({
|
|
1221
|
-
validator: (
|
|
1221
|
+
validator: (p, g, s) => a.validate(p, g, s)
|
|
1222
1222
|
});
|
|
1223
1223
|
}
|
|
1224
1224
|
return _;
|
|
1225
|
-
},
|
|
1226
|
-
var
|
|
1227
|
-
const
|
|
1225
|
+
}, ae = (o, _ = !1) => {
|
|
1226
|
+
var p, g, s, D, C;
|
|
1227
|
+
const v = _ ? o : o == null ? void 0 : o.item, a = typeof (v == null ? void 0 : v.editor) == "function" ? v.editor(T.value, (p = t.value.form) == null ? void 0 : p.modalState) : (v == null ? void 0 : v.editor) || {};
|
|
1228
1228
|
if (((g = t.value.form) == null ? void 0 : g.modalState) === "edit") {
|
|
1229
|
-
const
|
|
1230
|
-
return { ...a, ...
|
|
1229
|
+
const R = typeof (v == null ? void 0 : v.editor) == "object" ? (s = v.editor) == null ? void 0 : s.ep : typeof (v == null ? void 0 : v.editor) == "function" ? a == null ? void 0 : a.ep : {};
|
|
1230
|
+
return { ...a, ...R };
|
|
1231
1231
|
}
|
|
1232
|
-
if (((
|
|
1233
|
-
const
|
|
1234
|
-
return { ...a, ...
|
|
1232
|
+
if (((D = t.value.form) == null ? void 0 : D.modalState) === "add") {
|
|
1233
|
+
const R = typeof (v == null ? void 0 : v.editor) == "object" ? (C = v.editor) == null ? void 0 : C.ap : typeof (v == null ? void 0 : v.editor) == "function" ? a == null ? void 0 : a.ap : {};
|
|
1234
|
+
return { ...a, ...R };
|
|
1235
1235
|
}
|
|
1236
1236
|
return a;
|
|
1237
|
-
},
|
|
1238
|
-
var
|
|
1239
|
-
const _ = typeof o.editor == "function" ? o.editor(T.value, (
|
|
1240
|
-
return ((a = t.value.form) == null ? void 0 : a.modalState) === "edit" ? ((
|
|
1237
|
+
}, Q = (o) => {
|
|
1238
|
+
var v, a, p, g, s;
|
|
1239
|
+
const _ = typeof o.editor == "function" ? o.editor(T.value, (v = t.value.form) == null ? void 0 : v.modalState) : o.editor;
|
|
1240
|
+
return ((a = t.value.form) == null ? void 0 : a.modalState) === "edit" ? ((p = _ == null ? void 0 : _.ep) == null ? void 0 : p.type) ?? (_ == null ? void 0 : _.type) ?? o.type : ((g = t.value.form) == null ? void 0 : g.modalState) === "add" ? ((s = _ == null ? void 0 : _.ap) == null ? void 0 : s.type) ?? (_ == null ? void 0 : _.type) ?? o.type : (_ == null ? void 0 : _.type) ?? o.type;
|
|
1241
1241
|
};
|
|
1242
|
-
|
|
1243
|
-
me(),
|
|
1242
|
+
lt(() => {
|
|
1243
|
+
me(), k != null && k.editForm ? T.value = k.editForm : T.value = ge.value;
|
|
1244
1244
|
}), Rt(() => {
|
|
1245
1245
|
d.value = null;
|
|
1246
1246
|
});
|
|
1247
1247
|
const me = () => {
|
|
1248
1248
|
S.value = Math.random().toString(36).substring(2);
|
|
1249
|
-
for (const [o, _] of Object.entries(
|
|
1249
|
+
for (const [o, _] of Object.entries(ye.value))
|
|
1250
1250
|
t.value[o].formItem = { ...t.value[o].formItem, ..._.formItem }, t.value[o].formItem.style = { ...t.value[o].formItem.style, ..._.formItem.style };
|
|
1251
|
-
},
|
|
1252
|
-
var
|
|
1253
|
-
const _ = typeof o[1].editor == "function" ? o[1].editor(T.value, (
|
|
1254
|
-
return t.value.form.modalState === "edit" ? ((a = _ == null ? void 0 : _.ep) == null ? void 0 : a.editor) !== !1 : t.value.form.modalState === "add" ? ((
|
|
1255
|
-
}).map((o) => [o[0], o[1]]))), ge =
|
|
1251
|
+
}, ye = Xe(() => Object.fromEntries(Object.entries(t.value).filter((o) => o[1].type != "hidden").filter((o) => o[1].edit !== !1).filter((o) => !["table", "tableColumns", "query", "queryItems"].includes(o[0])).filter((o) => o[1].editor !== !1).filter((o) => o[1].type !== "control").filter((o) => {
|
|
1252
|
+
var v, a, p;
|
|
1253
|
+
const _ = typeof o[1].editor == "function" ? o[1].editor(T.value, (v = t.value.form) == null ? void 0 : v.modalState) : o[1].editor;
|
|
1254
|
+
return t.value.form.modalState === "edit" ? ((a = _ == null ? void 0 : _.ep) == null ? void 0 : a.editor) !== !1 : t.value.form.modalState === "add" ? ((p = _ == null ? void 0 : _.ap) == null ? void 0 : p.editor) !== !1 : !0;
|
|
1255
|
+
}).map((o) => [o[0], o[1]]))), ge = Xe(() => Object.fromEntries(Object.entries(t.value).filter((o) => o[1].type != "hidden").filter((o) => o[1].type != "control").map((o) => [o[0], o[1].value]))), ie = Xe(() => {
|
|
1256
1256
|
const o = /* @__PURE__ */ new Map();
|
|
1257
|
-
return Object.entries(
|
|
1258
|
-
if (
|
|
1259
|
-
const a =
|
|
1257
|
+
return Object.entries(ye.value).forEach(([_, v]) => {
|
|
1258
|
+
if (v.groupName) {
|
|
1259
|
+
const a = v.groupName;
|
|
1260
1260
|
o.has(a) || o.set(a, {
|
|
1261
1261
|
groupName: a,
|
|
1262
1262
|
items: []
|
|
1263
|
-
}), o.get(a).items.push({ key: _, item:
|
|
1263
|
+
}), o.get(a).items.push({ key: _, item: v });
|
|
1264
1264
|
}
|
|
1265
1265
|
}), o.forEach((_) => {
|
|
1266
|
-
_.tabPane =
|
|
1266
|
+
_.tabPane = Fe(..._.items.map(({ item: v }) => v.tabPane || {}));
|
|
1267
1267
|
}), Array.from(o.values());
|
|
1268
|
-
}),
|
|
1268
|
+
}), de = [
|
|
1269
1269
|
{
|
|
1270
1270
|
name: "f-submit",
|
|
1271
1271
|
label: t.value.form.submit.label,
|
|
@@ -1288,30 +1288,30 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1288
1288
|
originalOrder: 1
|
|
1289
1289
|
// 添加原始顺序标识
|
|
1290
1290
|
}
|
|
1291
|
-
],
|
|
1291
|
+
], ne = Xe(() => de.filter((o) => !o.hidden).sort((o, _) => o.sort - _.sort || o.originalOrder - _.originalOrder));
|
|
1292
1292
|
return c({
|
|
1293
1293
|
submitClickHandler: L,
|
|
1294
|
-
resetClickHandler:
|
|
1294
|
+
resetClickHandler: ee
|
|
1295
1295
|
}), (o, _) => {
|
|
1296
|
-
const
|
|
1297
|
-
return i(),
|
|
1296
|
+
const v = Y("el-form-item"), a = Y("el-col"), p = Y("el-tab-pane"), g = Y("el-tabs"), s = Y("el-button"), D = Y("el-form");
|
|
1297
|
+
return i(), M(D, q({
|
|
1298
1298
|
ref_key: "gform",
|
|
1299
1299
|
ref: d,
|
|
1300
1300
|
model: T.value,
|
|
1301
1301
|
style: { width: "98%", padding: 0, margin: 0, "box-sizing": "border-box" }
|
|
1302
|
-
},
|
|
1302
|
+
}, j(Ce)(t.value.form, (C) => !["footer", "submit", "reset", "slots", "type", "sort"].includes(C)), { class: "g-form-container" }), {
|
|
1303
1303
|
default: y(() => [
|
|
1304
|
-
|
|
1305
|
-
var C,
|
|
1304
|
+
ie.value.length > 0 ? h(o.$slots, "default", { key: 0 }, () => {
|
|
1305
|
+
var C, R, X;
|
|
1306
1306
|
return [
|
|
1307
|
-
|
|
1307
|
+
J(g, q({
|
|
1308
1308
|
class: "demo-tabs",
|
|
1309
|
-
modelValue:
|
|
1310
|
-
"onUpdate:modelValue": _[0] || (_[0] = (O) =>
|
|
1309
|
+
modelValue: ie.value[0].groupName,
|
|
1310
|
+
"onUpdate:modelValue": _[0] || (_[0] = (O) => ie.value[0].groupName = O),
|
|
1311
1311
|
style: { width: "100%" }
|
|
1312
1312
|
}, t.value.form.tabs), {
|
|
1313
1313
|
default: y(() => [
|
|
1314
|
-
(i(!0), x(W, null,
|
|
1314
|
+
(i(!0), x(W, null, U(ie.value, (O) => (i(), M(p, q({
|
|
1315
1315
|
key: O.groupName,
|
|
1316
1316
|
label: O.groupName,
|
|
1317
1317
|
name: O.groupName,
|
|
@@ -1319,17 +1319,17 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1319
1319
|
ref_for: !0
|
|
1320
1320
|
}, O.tabPane), {
|
|
1321
1321
|
default: y(() => [
|
|
1322
|
-
(i(!0), x(W, null,
|
|
1322
|
+
(i(!0), x(W, null, U(O.items, (A, ue) => (i(), M(a, q({ ref_for: !0 }, { ...t.value.form.cols, ...A == null ? void 0 : A.item.col }, {
|
|
1323
1323
|
key: A.key,
|
|
1324
1324
|
style: { width: "100%" }
|
|
1325
1325
|
}), {
|
|
1326
1326
|
default: y(() => {
|
|
1327
1327
|
var Ee, we;
|
|
1328
1328
|
return [
|
|
1329
|
-
|
|
1329
|
+
J(v, q({
|
|
1330
1330
|
label: A == null ? void 0 : A.item.label,
|
|
1331
1331
|
prop: A.key,
|
|
1332
|
-
rules:
|
|
1332
|
+
rules: re(A == null ? void 0 : A.item),
|
|
1333
1333
|
ref_for: !0
|
|
1334
1334
|
}, { ...(Ee = t.value) == null ? void 0 : Ee.formItems, ...(we = A == null ? void 0 : A.item) == null ? void 0 : we.formItem }, { style: { width: "100%" } }), {
|
|
1335
1335
|
default: y(() => [
|
|
@@ -1338,19 +1338,19 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1338
1338
|
formInfo: T.value,
|
|
1339
1339
|
model: t.value
|
|
1340
1340
|
}, () => [
|
|
1341
|
-
(i(),
|
|
1341
|
+
(i(), M(dt, {
|
|
1342
1342
|
modelValue: T.value[A.key],
|
|
1343
1343
|
"onUpdate:modelValue": (De) => T.value[A.key] = De,
|
|
1344
|
-
item:
|
|
1344
|
+
item: ae(A),
|
|
1345
1345
|
ctrlKey: A.key,
|
|
1346
|
-
ctrlType:
|
|
1346
|
+
ctrlType: Q(A == null ? void 0 : A.item),
|
|
1347
1347
|
model: t.value,
|
|
1348
1348
|
key: `${A.key}-${S.value}`,
|
|
1349
1349
|
class: "g-ctrl-container",
|
|
1350
1350
|
t: "f",
|
|
1351
1351
|
formInfo: T.value
|
|
1352
1352
|
}, fe({ _: 2 }, [
|
|
1353
|
-
|
|
1353
|
+
U(o.$slots, (De, Ve) => ({
|
|
1354
1354
|
name: Ve,
|
|
1355
1355
|
fn: y(($e) => [
|
|
1356
1356
|
h(o.$slots, Ve, {
|
|
@@ -1375,19 +1375,19 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1375
1375
|
]),
|
|
1376
1376
|
_: 3
|
|
1377
1377
|
}, 16, ["modelValue"]),
|
|
1378
|
-
(X = (
|
|
1379
|
-
|
|
1380
|
-
style:
|
|
1378
|
+
(X = (R = (C = t.value) == null ? void 0 : C.form) == null ? void 0 : R.footer) != null && X.hidden ? ce("", !0) : h(o.$slots, "f-footer", { key: 0 }, () => [
|
|
1379
|
+
G("div", {
|
|
1380
|
+
style: Ae(t.value.form.footer.style)
|
|
1381
1381
|
}, [
|
|
1382
1382
|
h(o.$slots, "f-footer-left"),
|
|
1383
|
-
(i(!0), x(W, null,
|
|
1383
|
+
(i(!0), x(W, null, U(ne.value, (O) => (i(), x(W, null, [
|
|
1384
1384
|
h(o.$slots, O.name + "-left"),
|
|
1385
1385
|
h(o.$slots, O.name, {}, () => [
|
|
1386
|
-
|
|
1386
|
+
J(s, q({ ref_for: !0 }, O.info, {
|
|
1387
1387
|
onClick: Ct((A) => O.click(T.value, t.value), ["stop"])
|
|
1388
1388
|
}), {
|
|
1389
1389
|
default: y(() => [
|
|
1390
|
-
_e(
|
|
1390
|
+
_e(he(O == null ? void 0 : O.label), 1)
|
|
1391
1391
|
]),
|
|
1392
1392
|
_: 2
|
|
1393
1393
|
}, 1040, ["onClick"])
|
|
@@ -1399,28 +1399,28 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1399
1399
|
])
|
|
1400
1400
|
];
|
|
1401
1401
|
}) : h(o.$slots, "default", { key: 1 }, () => {
|
|
1402
|
-
var C,
|
|
1402
|
+
var C, R, X;
|
|
1403
1403
|
return [
|
|
1404
|
-
(i(!0), x(W, null,
|
|
1404
|
+
(i(!0), x(W, null, U(ye.value, (O, A) => (i(), M(a, q({ ref_for: !0 }, { ...t.value.form.cols, ...O.col }, {
|
|
1405
1405
|
key: A,
|
|
1406
1406
|
style: { width: "100%" }
|
|
1407
1407
|
}), {
|
|
1408
1408
|
default: y(() => {
|
|
1409
|
-
var
|
|
1409
|
+
var ue;
|
|
1410
1410
|
return [
|
|
1411
|
-
|
|
1411
|
+
J(v, q({
|
|
1412
1412
|
label: O.label,
|
|
1413
1413
|
prop: A,
|
|
1414
|
-
rules:
|
|
1414
|
+
rules: re(O),
|
|
1415
1415
|
ref_for: !0
|
|
1416
|
-
}, { ...(
|
|
1416
|
+
}, { ...(ue = t.value) == null ? void 0 : ue.formItems, ...O == null ? void 0 : O.formItem }, { style: { width: "100%" } }), {
|
|
1417
1417
|
label: y((Ee) => [
|
|
1418
1418
|
h(o.$slots, `f-${A}-label`, {
|
|
1419
1419
|
data: Ee,
|
|
1420
1420
|
item: O,
|
|
1421
1421
|
model: t.value
|
|
1422
1422
|
}, () => [
|
|
1423
|
-
_e(
|
|
1423
|
+
_e(he(O.label), 1)
|
|
1424
1424
|
])
|
|
1425
1425
|
]),
|
|
1426
1426
|
default: y(() => [
|
|
@@ -1429,19 +1429,19 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1429
1429
|
formInfo: T.value,
|
|
1430
1430
|
model: t.value
|
|
1431
1431
|
}, () => [
|
|
1432
|
-
(i(),
|
|
1432
|
+
(i(), M(dt, {
|
|
1433
1433
|
modelValue: T.value[A],
|
|
1434
1434
|
"onUpdate:modelValue": (Ee) => T.value[A] = Ee,
|
|
1435
|
-
item:
|
|
1435
|
+
item: ae(O, !0),
|
|
1436
1436
|
ctrlKey: A,
|
|
1437
|
-
ctrlType:
|
|
1437
|
+
ctrlType: Q(O),
|
|
1438
1438
|
key: `${A}-${S.value}`,
|
|
1439
1439
|
model: t.value,
|
|
1440
1440
|
class: "g-ctrl-container",
|
|
1441
1441
|
t: "f",
|
|
1442
1442
|
formInfo: T.value
|
|
1443
1443
|
}, fe({ _: 2 }, [
|
|
1444
|
-
|
|
1444
|
+
U(o.$slots, (Ee, we) => ({
|
|
1445
1445
|
name: we,
|
|
1446
1446
|
fn: y((De) => [
|
|
1447
1447
|
h(o.$slots, we, {
|
|
@@ -1460,19 +1460,19 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1460
1460
|
}),
|
|
1461
1461
|
_: 2
|
|
1462
1462
|
}, 1040))), 128)),
|
|
1463
|
-
(X = (
|
|
1464
|
-
|
|
1465
|
-
style:
|
|
1463
|
+
(X = (R = (C = t.value) == null ? void 0 : C.form) == null ? void 0 : R.footer) != null && X.hidden ? ce("", !0) : h(o.$slots, "f-footer", { key: 0 }, () => [
|
|
1464
|
+
G("div", {
|
|
1465
|
+
style: Ae(t.value.form.footer.style)
|
|
1466
1466
|
}, [
|
|
1467
1467
|
h(o.$slots, "f-footer-left"),
|
|
1468
|
-
(i(!0), x(W, null,
|
|
1468
|
+
(i(!0), x(W, null, U(ne.value, (O) => (i(), x(W, null, [
|
|
1469
1469
|
h(o.$slots, O.name + "-left"),
|
|
1470
1470
|
h(o.$slots, O.name, {}, () => [
|
|
1471
|
-
|
|
1471
|
+
J(s, q({ ref_for: !0 }, O.info, {
|
|
1472
1472
|
onClick: Ct((A) => O.click(T.value, t.value), ["stop"])
|
|
1473
1473
|
}), {
|
|
1474
1474
|
default: y(() => [
|
|
1475
|
-
_e(
|
|
1475
|
+
_e(he(O == null ? void 0 : O.label), 1)
|
|
1476
1476
|
]),
|
|
1477
1477
|
_: 2
|
|
1478
1478
|
}, 1040, ["onClick"])
|
|
@@ -1491,56 +1491,56 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1491
1491
|
}
|
|
1492
1492
|
}), Vt = {
|
|
1493
1493
|
__name: "g-query-item",
|
|
1494
|
-
props: /* @__PURE__ */
|
|
1494
|
+
props: /* @__PURE__ */ Le(["more"], {
|
|
1495
1495
|
modelValue: { required: !0 },
|
|
1496
1496
|
modelModifiers: {},
|
|
1497
1497
|
info: { required: !0 },
|
|
1498
1498
|
infoModifiers: {}
|
|
1499
1499
|
}),
|
|
1500
1500
|
emits: ["update:modelValue", "update:info"],
|
|
1501
|
-
setup(
|
|
1502
|
-
const c =
|
|
1503
|
-
var
|
|
1504
|
-
return typeof S[1].search == "function" ? S[1].search && ((
|
|
1505
|
-
}).map((S) => [S[0], S[1]]))).value, d = (T) => typeof T.search == "function" ? T.search(t.value, c.value.table) : T.search || {},
|
|
1501
|
+
setup(f) {
|
|
1502
|
+
const c = Ne(f, "modelValue"), r = f, t = Ne(f, "info"), e = (T) => Xe(() => Object.fromEntries(Object.entries(c.value).filter((S) => {
|
|
1503
|
+
var k;
|
|
1504
|
+
return typeof S[1].search == "function" ? S[1].search && ((k = S[1].search(t.value, c.value.table)) == null ? void 0 : k.more) === T : S[1].search && S[1].search.more === T;
|
|
1505
|
+
}).map((S) => [S[0], S[1]]))).value, d = (T) => typeof T.search == "function" ? T.search(t.value, c.value.table) : T.search || {}, E = (T) => {
|
|
1506
1506
|
const S = d(T);
|
|
1507
1507
|
return (S == null ? void 0 : S.type) || T.type;
|
|
1508
1508
|
};
|
|
1509
1509
|
return (T, S) => {
|
|
1510
|
-
const
|
|
1511
|
-
return i(!0), x(W, null,
|
|
1510
|
+
const k = Y("el-form-item");
|
|
1511
|
+
return i(!0), x(W, null, U(e(r.more), ($, L) => h(T.$slots, `q-${L}`, {
|
|
1512
1512
|
key: L,
|
|
1513
|
-
item:
|
|
1513
|
+
item: $,
|
|
1514
1514
|
queryModel: t.value,
|
|
1515
1515
|
model: c.value
|
|
1516
1516
|
}, () => [
|
|
1517
|
-
|
|
1518
|
-
label:
|
|
1517
|
+
J(k, q({
|
|
1518
|
+
label: $.label,
|
|
1519
1519
|
ref_for: !0
|
|
1520
|
-
}, { ...c.value.queryItems, ...d(
|
|
1520
|
+
}, { ...c.value.queryItems, ...d($) }), {
|
|
1521
1521
|
label: y(() => [
|
|
1522
1522
|
h(T.$slots, `q-${L}-label`, {
|
|
1523
|
-
item:
|
|
1523
|
+
item: $,
|
|
1524
1524
|
model: c.value
|
|
1525
1525
|
})
|
|
1526
1526
|
]),
|
|
1527
1527
|
default: y(() => [
|
|
1528
|
-
|
|
1528
|
+
J(dt, {
|
|
1529
1529
|
modelValue: t.value[L],
|
|
1530
|
-
"onUpdate:modelValue": (
|
|
1531
|
-
item: {
|
|
1530
|
+
"onUpdate:modelValue": (ee) => t.value[L] = ee,
|
|
1531
|
+
item: { ...$ == null ? void 0 : $.editor, ...d($) },
|
|
1532
1532
|
ctrlKey: L,
|
|
1533
|
-
ctrlType:
|
|
1533
|
+
ctrlType: E($),
|
|
1534
1534
|
model: c.value,
|
|
1535
1535
|
t: "q",
|
|
1536
1536
|
formInfo: t.value
|
|
1537
1537
|
}, fe({ _: 2 }, [
|
|
1538
|
-
|
|
1539
|
-
name:
|
|
1538
|
+
U(Object.keys(T.$slots), (ee) => ({
|
|
1539
|
+
name: ee,
|
|
1540
1540
|
fn: y((I) => [
|
|
1541
|
-
h(T.$slots,
|
|
1541
|
+
h(T.$slots, ee, {
|
|
1542
1542
|
data: I,
|
|
1543
|
-
item:
|
|
1543
|
+
item: $,
|
|
1544
1544
|
model: c.value
|
|
1545
1545
|
})
|
|
1546
1546
|
])
|
|
@@ -1555,7 +1555,7 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1555
1555
|
}, ml = {
|
|
1556
1556
|
key: 0,
|
|
1557
1557
|
class: "outer"
|
|
1558
|
-
},
|
|
1558
|
+
}, vl = { class: "inner" }, pl = {
|
|
1559
1559
|
__name: "g-query",
|
|
1560
1560
|
props: {
|
|
1561
1561
|
modelValue: { required: !0 },
|
|
@@ -1563,9 +1563,9 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1563
1563
|
info: { required: !0 },
|
|
1564
1564
|
infoModifiers: {}
|
|
1565
1565
|
},
|
|
1566
|
-
emits: /* @__PURE__ */
|
|
1567
|
-
setup(
|
|
1568
|
-
const
|
|
1566
|
+
emits: /* @__PURE__ */ Le(["query", "reset"], ["update:modelValue", "update:info"]),
|
|
1567
|
+
setup(f, { emit: c }) {
|
|
1568
|
+
const r = Ne(f, "modelValue"), t = c, e = gt("options"), d = le(!1), E = Ne(f, "info"), T = {
|
|
1569
1569
|
hidden: !1,
|
|
1570
1570
|
type: "hidden",
|
|
1571
1571
|
labelWidth: 100,
|
|
@@ -1591,7 +1591,7 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1591
1591
|
hidden: !1,
|
|
1592
1592
|
plain: !1,
|
|
1593
1593
|
click: () => {
|
|
1594
|
-
t("reset",
|
|
1594
|
+
t("reset", E.value);
|
|
1595
1595
|
}
|
|
1596
1596
|
},
|
|
1597
1597
|
query: {
|
|
@@ -1599,7 +1599,7 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1599
1599
|
type: "primary",
|
|
1600
1600
|
label: "查询",
|
|
1601
1601
|
click: () => {
|
|
1602
|
-
t("query",
|
|
1602
|
+
t("query", E.value), console.log(E.value), d.value = !1;
|
|
1603
1603
|
}
|
|
1604
1604
|
},
|
|
1605
1605
|
btns: {
|
|
@@ -1613,7 +1613,7 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1613
1613
|
}
|
|
1614
1614
|
}
|
|
1615
1615
|
};
|
|
1616
|
-
|
|
1616
|
+
r.value.query = Fe(T, e == null ? void 0 : e.query, r.value.query);
|
|
1617
1617
|
const S = {
|
|
1618
1618
|
2: {
|
|
1619
1619
|
title: "更多查询",
|
|
@@ -1631,114 +1631,114 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1631
1631
|
trigger: "click"
|
|
1632
1632
|
}
|
|
1633
1633
|
};
|
|
1634
|
-
|
|
1635
|
-
S[
|
|
1636
|
-
|
|
1634
|
+
r.value.query.more.dialog = Fe(
|
|
1635
|
+
S[r.value.query.more.mode] || {},
|
|
1636
|
+
r.value.query.more.dialog
|
|
1637
1637
|
);
|
|
1638
|
-
const
|
|
1638
|
+
const k = {
|
|
1639
1639
|
type: "hidden",
|
|
1640
1640
|
labelPosition: "right",
|
|
1641
1641
|
style: {
|
|
1642
1642
|
width: "280px"
|
|
1643
1643
|
}
|
|
1644
1644
|
};
|
|
1645
|
-
|
|
1646
|
-
const
|
|
1647
|
-
const
|
|
1648
|
-
model:
|
|
1645
|
+
r.value.queryItems = Fe(k, e == null ? void 0 : e.queryItems, r.value.queryItems);
|
|
1646
|
+
const $ = (I, z) => {
|
|
1647
|
+
const re = Object.keys(I.slots).filter((ae) => ae !== "default").reduce((ae, Q) => (ae[Q] = (me) => I.slots[Q]({
|
|
1648
|
+
model: r.value
|
|
1649
1649
|
// 传递当前模型数据
|
|
1650
|
-
}),
|
|
1651
|
-
return
|
|
1652
|
-
modelValue:
|
|
1653
|
-
"onUpdate:modelValue": (
|
|
1654
|
-
info:
|
|
1655
|
-
"onUpdate:info": (
|
|
1656
|
-
more:
|
|
1657
|
-
},
|
|
1658
|
-
}, L =
|
|
1659
|
-
var
|
|
1650
|
+
}), ae), {});
|
|
1651
|
+
return Oe(Vt, {
|
|
1652
|
+
modelValue: r.value,
|
|
1653
|
+
"onUpdate:modelValue": (ae) => r.value = ae,
|
|
1654
|
+
info: E.value,
|
|
1655
|
+
"onUpdate:info": (ae) => E.value = ae,
|
|
1656
|
+
more: z
|
|
1657
|
+
}, re);
|
|
1658
|
+
}, L = St(), ee = () => {
|
|
1659
|
+
var re, ae, Q, me, ye, ge, ie, de, ne;
|
|
1660
1660
|
const I = [
|
|
1661
1661
|
{
|
|
1662
1662
|
key: "query",
|
|
1663
|
-
hidden: (
|
|
1663
|
+
hidden: (Q = (ae = (re = r.value) == null ? void 0 : re.query) == null ? void 0 : ae.query) == null ? void 0 : Q.hidden,
|
|
1664
1664
|
component: ke,
|
|
1665
1665
|
props: {
|
|
1666
|
-
...
|
|
1667
|
-
onClick:
|
|
1666
|
+
...r.value.query.query,
|
|
1667
|
+
onClick: r.value.query.query.click
|
|
1668
1668
|
},
|
|
1669
|
-
label:
|
|
1670
|
-
sort:
|
|
1669
|
+
label: r.value.query.query.label,
|
|
1670
|
+
sort: r.value.query.query.sort || 0
|
|
1671
1671
|
},
|
|
1672
1672
|
{
|
|
1673
1673
|
key: "reset",
|
|
1674
|
-
hidden: (ge = (
|
|
1674
|
+
hidden: (ge = (ye = (me = r.value) == null ? void 0 : me.query) == null ? void 0 : ye.reset) == null ? void 0 : ge.hidden,
|
|
1675
1675
|
component: ke,
|
|
1676
1676
|
props: {
|
|
1677
|
-
...
|
|
1678
|
-
onClick:
|
|
1677
|
+
...r.value.query.reset,
|
|
1678
|
+
onClick: r.value.query.reset.click
|
|
1679
1679
|
},
|
|
1680
|
-
label:
|
|
1681
|
-
sort:
|
|
1680
|
+
label: r.value.query.reset.label,
|
|
1681
|
+
sort: r.value.query.reset.sort || 0
|
|
1682
1682
|
},
|
|
1683
1683
|
{
|
|
1684
1684
|
key: "more",
|
|
1685
|
-
hidden: (
|
|
1686
|
-
component:
|
|
1687
|
-
props:
|
|
1688
|
-
...
|
|
1689
|
-
onClick:
|
|
1685
|
+
hidden: (ne = (de = (ie = r.value) == null ? void 0 : ie.query) == null ? void 0 : de.more) == null ? void 0 : ne.hidden,
|
|
1686
|
+
component: r.value.query.more.mode === 3 ? ft : ke,
|
|
1687
|
+
props: r.value.query.more.mode === 3 ? { ...r.value.query.more.dialog } : {
|
|
1688
|
+
...r.value.query.more,
|
|
1689
|
+
onClick: r.value.query.more.click
|
|
1690
1690
|
},
|
|
1691
|
-
label:
|
|
1692
|
-
sort:
|
|
1693
|
-
content:
|
|
1691
|
+
label: r.value.query.more.label,
|
|
1692
|
+
sort: r.value.query.more.sort || 0,
|
|
1693
|
+
content: r.value.query.more.mode === 3 ? () => Oe(nt, {
|
|
1694
1694
|
class: "query-form",
|
|
1695
|
-
...Ce(
|
|
1696
|
-
}, () =>
|
|
1695
|
+
...Ce(r.value.query, (te) => !["query", "more", "reset"].includes(te))
|
|
1696
|
+
}, () => $({ slots: L }, !0)) : null
|
|
1697
1697
|
}
|
|
1698
1698
|
];
|
|
1699
|
-
return I.sort((
|
|
1700
|
-
reference: () =>
|
|
1701
|
-
default:
|
|
1702
|
-
}) : (
|
|
1699
|
+
return I.sort((te, be) => te.sort - be.sort), I.filter((te) => !te.hidden).map((te) => te.key === "more" && te.component === ft ? Oe(ft, te.props, {
|
|
1700
|
+
reference: () => Oe(ke, r.value.query.more, () => te.label),
|
|
1701
|
+
default: te.content
|
|
1702
|
+
}) : (te.props.slot = "query-" + te.key, te.label ? Oe(te.component, te.props, () => te.label) : Oe(te.component, te.props)));
|
|
1703
1703
|
};
|
|
1704
|
-
return (I,
|
|
1705
|
-
var
|
|
1706
|
-
const
|
|
1704
|
+
return (I, z) => {
|
|
1705
|
+
var Q, me, ye, ge, ie, de, ne, te, be, se, b, o, _, v, a, p, g;
|
|
1706
|
+
const re = Y("el-form-item"), ae = Y("el-drawer");
|
|
1707
1707
|
return i(), x(W, null, [
|
|
1708
|
-
|
|
1708
|
+
G("div", {
|
|
1709
1709
|
class: "g-query-container",
|
|
1710
|
-
style:
|
|
1710
|
+
style: Ae((me = (Q = r.value.query) == null ? void 0 : Q.container) == null ? void 0 : me.style)
|
|
1711
1711
|
}, [
|
|
1712
|
-
|
|
1712
|
+
J(j(nt), ct(Dt(j(Ce)(r.value.query, (s) => !["query", "more", "reset", "btns"].includes(s)))), {
|
|
1713
1713
|
default: y(() => {
|
|
1714
|
-
var s,
|
|
1714
|
+
var s, D;
|
|
1715
1715
|
return [
|
|
1716
|
-
(i(),
|
|
1717
|
-
((
|
|
1716
|
+
(i(), M(Be($({ slots: I.$slots }, void 0)))),
|
|
1717
|
+
((D = (s = r.value.query) == null ? void 0 : s.container) == null ? void 0 : D.inline) === !0 ? (i(), M(re, { key: 0 }, {
|
|
1718
1718
|
default: y(() => {
|
|
1719
|
-
var C,
|
|
1719
|
+
var C, R, X, O, A;
|
|
1720
1720
|
return [
|
|
1721
|
-
|
|
1722
|
-
style:
|
|
1721
|
+
G("div", {
|
|
1722
|
+
style: Ae((R = (C = r.value.query) == null ? void 0 : C.btns) == null ? void 0 : R.style)
|
|
1723
1723
|
}, [
|
|
1724
|
-
|
|
1724
|
+
r.value.query.group ? (i(), M(j(st), { key: 0 }, {
|
|
1725
1725
|
default: y(() => [
|
|
1726
|
-
(i(!0), x(W, null,
|
|
1727
|
-
(i(),
|
|
1726
|
+
(i(!0), x(W, null, U(ee(), (ue) => h(I.$slots, ue.props.slot, {}, () => [
|
|
1727
|
+
(i(), M(Be(ue)))
|
|
1728
1728
|
], !0)), 256)),
|
|
1729
1729
|
h(I.$slots, "q-btns", {}, void 0, !0)
|
|
1730
1730
|
]),
|
|
1731
1731
|
_: 3
|
|
1732
1732
|
})) : (i(), x(W, { key: 1 }, [
|
|
1733
|
-
(A = (O = (X =
|
|
1733
|
+
(A = (O = (X = r.value) == null ? void 0 : X.query) == null ? void 0 : O.btns) != null && A.group ? (i(), M(j(st), { key: 0 }, {
|
|
1734
1734
|
default: y(() => [
|
|
1735
|
-
(i(!0), x(W, null,
|
|
1736
|
-
(i(),
|
|
1735
|
+
(i(!0), x(W, null, U(ee(), (ue) => h(I.$slots, ue.props.slot, {}, () => [
|
|
1736
|
+
(i(), M(Be(ue)))
|
|
1737
1737
|
], !0)), 256))
|
|
1738
1738
|
]),
|
|
1739
1739
|
_: 3
|
|
1740
|
-
})) : (i(!0), x(W, { key: 1 },
|
|
1741
|
-
(i(),
|
|
1740
|
+
})) : (i(!0), x(W, { key: 1 }, U(ee(), (ue) => h(I.$slots, ue.props.slot, {}, () => [
|
|
1741
|
+
(i(), M(Be(ue)))
|
|
1742
1742
|
], !0)), 256)),
|
|
1743
1743
|
h(I.$slots, "q-btns", {}, void 0, !0)
|
|
1744
1744
|
], 64))
|
|
@@ -1751,54 +1751,54 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1751
1751
|
}),
|
|
1752
1752
|
_: 3
|
|
1753
1753
|
}, 16),
|
|
1754
|
-
((
|
|
1754
|
+
((ie = (ge = (ye = r.value) == null ? void 0 : ye.query) == null ? void 0 : ge.container) == null ? void 0 : ie.inline) === !1 ? (i(), x("div", {
|
|
1755
1755
|
key: 0,
|
|
1756
|
-
style:
|
|
1756
|
+
style: Ae((ne = (de = r.value.query) == null ? void 0 : de.btns) == null ? void 0 : ne.style)
|
|
1757
1757
|
}, [
|
|
1758
|
-
|
|
1758
|
+
r.value.query.group ? (i(), M(j(st), { key: 0 }, {
|
|
1759
1759
|
default: y(() => [
|
|
1760
|
-
(i(!0), x(W, null,
|
|
1761
|
-
(i(),
|
|
1760
|
+
(i(!0), x(W, null, U(ee(), (s) => h(I.$slots, s.props.slot, {}, () => [
|
|
1761
|
+
(i(), M(Be(s)))
|
|
1762
1762
|
], !0)), 256)),
|
|
1763
1763
|
h(I.$slots, "q-btns", {}, void 0, !0)
|
|
1764
1764
|
]),
|
|
1765
1765
|
_: 3
|
|
1766
1766
|
})) : (i(), x(W, { key: 1 }, [
|
|
1767
|
-
(be = (
|
|
1767
|
+
(be = (te = r.value.query) == null ? void 0 : te.btns) != null && be.group ? (i(), M(j(st), { key: 0 }, {
|
|
1768
1768
|
default: y(() => [
|
|
1769
|
-
(i(!0), x(W, null,
|
|
1770
|
-
(i(),
|
|
1769
|
+
(i(!0), x(W, null, U(ee(), (s) => h(I.$slots, s.props.slot, {}, () => [
|
|
1770
|
+
(i(), M(Be(s)))
|
|
1771
1771
|
], !0)), 256))
|
|
1772
1772
|
]),
|
|
1773
1773
|
_: 3
|
|
1774
|
-
})) : (i(!0), x(W, { key: 1 },
|
|
1775
|
-
(i(),
|
|
1774
|
+
})) : (i(!0), x(W, { key: 1 }, U(ee(), (s) => h(I.$slots, s.props.slot, {}, () => [
|
|
1775
|
+
(i(), M(Be(s)))
|
|
1776
1776
|
], !0)), 256)),
|
|
1777
1777
|
h(I.$slots, "q-btns", {}, void 0, !0)
|
|
1778
1778
|
], 64))
|
|
1779
1779
|
], 4)) : ce("", !0)
|
|
1780
1780
|
], 4),
|
|
1781
|
-
d.value && !((o = (b = (
|
|
1781
|
+
d.value && !((o = (b = (se = r.value) == null ? void 0 : se.query) == null ? void 0 : b.more) != null && o.hidden) && r.value.query.more.mode == 2 ? (i(), M(ae, q({
|
|
1782
1782
|
key: 0,
|
|
1783
1783
|
modelValue: d.value,
|
|
1784
|
-
"onUpdate:modelValue":
|
|
1784
|
+
"onUpdate:modelValue": z[4] || (z[4] = (s) => d.value = s),
|
|
1785
1785
|
title: "更多查询",
|
|
1786
1786
|
"show-close": !1
|
|
1787
|
-
},
|
|
1787
|
+
}, r.value.query.more.dialog), fe({
|
|
1788
1788
|
default: y(() => [
|
|
1789
|
-
|
|
1789
|
+
J(j(nt), q(j(Ce)(r.value.query, (s) => !["query", "more", "reset"].includes(s)), { style: { width: "98%" } }), {
|
|
1790
1790
|
default: y(() => [
|
|
1791
|
-
|
|
1792
|
-
modelValue:
|
|
1793
|
-
"onUpdate:modelValue":
|
|
1794
|
-
info:
|
|
1795
|
-
"onUpdate:info":
|
|
1791
|
+
J(Vt, {
|
|
1792
|
+
modelValue: r.value,
|
|
1793
|
+
"onUpdate:modelValue": z[0] || (z[0] = (s) => r.value = s),
|
|
1794
|
+
info: E.value,
|
|
1795
|
+
"onUpdate:info": z[1] || (z[1] = (s) => E.value = s),
|
|
1796
1796
|
more: !0
|
|
1797
1797
|
}, fe({ _: 2 }, [
|
|
1798
|
-
|
|
1799
|
-
name:
|
|
1800
|
-
fn: y((
|
|
1801
|
-
h(I.$slots,
|
|
1798
|
+
U(I.$slots, (s, D, C) => ({
|
|
1799
|
+
name: D,
|
|
1800
|
+
fn: y((R) => [
|
|
1801
|
+
h(I.$slots, D, { model: r.value }, void 0, !0)
|
|
1802
1802
|
])
|
|
1803
1803
|
}))
|
|
1804
1804
|
]), 1032, ["modelValue", "info"])
|
|
@@ -1808,23 +1808,23 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1808
1808
|
]),
|
|
1809
1809
|
_: 2
|
|
1810
1810
|
}, [
|
|
1811
|
-
(g = (
|
|
1811
|
+
(g = (p = (a = (v = (_ = r.value) == null ? void 0 : _.query) == null ? void 0 : v.more) == null ? void 0 : a.dialog) == null ? void 0 : p.footer) != null && g.hidden ? void 0 : {
|
|
1812
1812
|
name: "footer",
|
|
1813
1813
|
fn: y(() => [
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
onClick:
|
|
1814
|
+
G("div", ct(Dt(r.value.query.more.dialog.footer)), [
|
|
1815
|
+
J(j(ke), q(r.value.query.query, {
|
|
1816
|
+
onClick: z[2] || (z[2] = (s) => r.value.query.query.click())
|
|
1817
1817
|
}), {
|
|
1818
1818
|
default: y(() => [
|
|
1819
|
-
_e(
|
|
1819
|
+
_e(he(r.value.query.query.label), 1)
|
|
1820
1820
|
]),
|
|
1821
1821
|
_: 1
|
|
1822
1822
|
}, 16),
|
|
1823
|
-
|
|
1824
|
-
onClick:
|
|
1823
|
+
J(j(ke), q(r.value.query.reset, {
|
|
1824
|
+
onClick: z[3] || (z[3] = (s) => r.value.query.reset.click())
|
|
1825
1825
|
}), {
|
|
1826
1826
|
default: y(() => [
|
|
1827
|
-
_e(
|
|
1827
|
+
_e(he(r.value.query.reset.label), 1)
|
|
1828
1828
|
]),
|
|
1829
1829
|
_: 1
|
|
1830
1830
|
}, 16)
|
|
@@ -1833,19 +1833,19 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1833
1833
|
key: "0"
|
|
1834
1834
|
}
|
|
1835
1835
|
]), 1040, ["modelValue"])) : ce("", !0),
|
|
1836
|
-
|
|
1836
|
+
J(jt, {
|
|
1837
1837
|
duration: 300,
|
|
1838
1838
|
name: "nested",
|
|
1839
1839
|
style: { padding: "10px" }
|
|
1840
1840
|
}, {
|
|
1841
1841
|
default: y(() => {
|
|
1842
|
-
var s,
|
|
1842
|
+
var s, D, C;
|
|
1843
1843
|
return [
|
|
1844
|
-
d.value && !((C = (
|
|
1845
|
-
|
|
1846
|
-
|
|
1844
|
+
d.value && !((C = (D = (s = r.value) == null ? void 0 : s.query) == null ? void 0 : D.more) != null && C.hidden) && r.value.query.more.mode == 1 ? (i(), x("div", ml, [
|
|
1845
|
+
G("div", vl, [
|
|
1846
|
+
r.value.query.more.mode == 1 ? Lt((i(), M(j(nt), ct(q({ key: 0 }, j(Ce)(r.value.query, (R) => !["query", "more", "reset"].includes(R)))), {
|
|
1847
1847
|
default: y(() => [
|
|
1848
|
-
(i(),
|
|
1848
|
+
(i(), M(Be($({ slots: I.$slots }, !0))))
|
|
1849
1849
|
]),
|
|
1850
1850
|
_: 1
|
|
1851
1851
|
}, 16)), [
|
|
@@ -1860,7 +1860,7 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1860
1860
|
], 64);
|
|
1861
1861
|
};
|
|
1862
1862
|
}
|
|
1863
|
-
}, hl = /* @__PURE__ */
|
|
1863
|
+
}, hl = /* @__PURE__ */ Ge(pl, [["__scopeId", "data-v-80ccf765"]]), yl = { style: { padding: "0", margin: "0", "box-sizing": "border-box" } }, gl = { style: { padding: "10px", "box-sizing": "border-box" } }, bl = { style: { margin: "10px" } }, $l = {
|
|
1864
1864
|
style: { display: "flex", "flex-wrap": "wrap" },
|
|
1865
1865
|
id: "excelSortEl"
|
|
1866
1866
|
}, wl = ["textContent"], El = { style: { width: "100%", display: "flex", padding: "10px", "box-sizing": "border-box", "justify-content": "center", "border-top": "1px solid #dcdfe6" } }, kl = {
|
|
@@ -1870,76 +1870,76 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1870
1870
|
commitText: String
|
|
1871
1871
|
},
|
|
1872
1872
|
emits: ["excel"],
|
|
1873
|
-
setup(
|
|
1874
|
-
const
|
|
1873
|
+
setup(f, { emit: c }) {
|
|
1874
|
+
const r = f, t = c, e = le(r.items), d = () => {
|
|
1875
1875
|
e.value.forEach((S) => {
|
|
1876
1876
|
S.value = !0;
|
|
1877
1877
|
});
|
|
1878
|
-
},
|
|
1878
|
+
}, E = () => {
|
|
1879
1879
|
e.value.forEach((S) => {
|
|
1880
1880
|
S.value = !1;
|
|
1881
1881
|
});
|
|
1882
1882
|
}, T = () => {
|
|
1883
|
-
t("excel", e.value, (S,
|
|
1883
|
+
t("excel", e.value, (S, k = "excel.xls") => {
|
|
1884
1884
|
if (!S) {
|
|
1885
1885
|
console.error("下载链接无效");
|
|
1886
1886
|
return;
|
|
1887
1887
|
}
|
|
1888
1888
|
try {
|
|
1889
|
-
const
|
|
1890
|
-
|
|
1891
|
-
} catch (
|
|
1892
|
-
console.error("下载文件时出现错误:",
|
|
1889
|
+
const $ = document.createElement("a");
|
|
1890
|
+
$.href = S, $.download = k, $.style.display = "none", document.body.appendChild($), $.click(), document.body.removeChild($);
|
|
1891
|
+
} catch ($) {
|
|
1892
|
+
console.error("下载文件时出现错误:", $);
|
|
1893
1893
|
}
|
|
1894
1894
|
});
|
|
1895
1895
|
};
|
|
1896
|
-
return
|
|
1896
|
+
return lt(() => {
|
|
1897
1897
|
const S = new qt(document.getElementById("excelSortEl"), {
|
|
1898
1898
|
animation: 150,
|
|
1899
1899
|
onEnd: () => {
|
|
1900
|
-
let
|
|
1901
|
-
console.log(
|
|
1900
|
+
let $ = S.toArray();
|
|
1901
|
+
console.log($);
|
|
1902
1902
|
}
|
|
1903
|
-
}),
|
|
1904
|
-
|
|
1905
|
-
|
|
1903
|
+
}), k = S;
|
|
1904
|
+
zt(() => {
|
|
1905
|
+
k && k.destroy();
|
|
1906
1906
|
});
|
|
1907
|
-
}), (S,
|
|
1908
|
-
const
|
|
1907
|
+
}), (S, k) => {
|
|
1908
|
+
const $ = Y("el-divider"), L = Y("el-alert"), ee = Y("el-checkbox"), I = Y("el-button");
|
|
1909
1909
|
return i(), x("div", yl, [
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1910
|
+
G("div", gl, [
|
|
1911
|
+
G("div", bl, [
|
|
1912
|
+
G("a", {
|
|
1913
1913
|
onClick: d,
|
|
1914
1914
|
style: { cursor: "pointer" }
|
|
1915
1915
|
}, "全选"),
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
onClick:
|
|
1916
|
+
J($, { direction: "vertical" }),
|
|
1917
|
+
G("a", {
|
|
1918
|
+
onClick: E,
|
|
1919
1919
|
style: { cursor: "pointer" }
|
|
1920
1920
|
}, "全不选")
|
|
1921
1921
|
]),
|
|
1922
|
-
|
|
1922
|
+
J(L, {
|
|
1923
1923
|
title: "拖动列标题可以改变表格列的生成顺序 !",
|
|
1924
1924
|
type: "warning",
|
|
1925
1925
|
"show-icon": "",
|
|
1926
1926
|
closable: !1,
|
|
1927
1927
|
style: { "margin-bottom": "10px" }
|
|
1928
1928
|
}),
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
(i(!0), x(W, null,
|
|
1929
|
+
k[0] || (k[0] = G("div", { style: { margin: "1px 0" } }, null, -1)),
|
|
1930
|
+
G("div", $l, [
|
|
1931
|
+
(i(!0), x(W, null, U(e.value, (z) => (i(), M(ee, {
|
|
1932
1932
|
class: "check-box-hover",
|
|
1933
1933
|
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" },
|
|
1934
|
-
"data-id":
|
|
1935
|
-
modelValue:
|
|
1936
|
-
"onUpdate:modelValue": (
|
|
1937
|
-
key:
|
|
1938
|
-
title:
|
|
1934
|
+
"data-id": z.key,
|
|
1935
|
+
modelValue: z.value,
|
|
1936
|
+
"onUpdate:modelValue": (re) => z.value = re,
|
|
1937
|
+
key: z.key,
|
|
1938
|
+
title: z.label
|
|
1939
1939
|
}, {
|
|
1940
1940
|
default: y(() => [
|
|
1941
|
-
|
|
1942
|
-
textContent:
|
|
1941
|
+
G("span", {
|
|
1942
|
+
textContent: he(z.label),
|
|
1943
1943
|
style: { display: "block", "text-overflow": "ellipsis", width: "95px", overflow: "hidden" }
|
|
1944
1944
|
}, null, 8, wl)
|
|
1945
1945
|
]),
|
|
@@ -1947,14 +1947,14 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1947
1947
|
}, 1032, ["data-id", "modelValue", "onUpdate:modelValue", "title"]))), 128))
|
|
1948
1948
|
])
|
|
1949
1949
|
]),
|
|
1950
|
-
|
|
1951
|
-
|
|
1950
|
+
G("div", El, [
|
|
1951
|
+
J(I, {
|
|
1952
1952
|
type: "primary",
|
|
1953
1953
|
onClick: T,
|
|
1954
|
-
disabled: e.value.filter((
|
|
1954
|
+
disabled: e.value.filter((z) => z.value).length < 1
|
|
1955
1955
|
}, {
|
|
1956
1956
|
default: y(() => [
|
|
1957
|
-
_e(
|
|
1957
|
+
_e(he(r.commitText), 1)
|
|
1958
1958
|
]),
|
|
1959
1959
|
_: 1
|
|
1960
1960
|
}, 8, ["disabled"])
|
|
@@ -1962,46 +1962,46 @@ const ft = /* @__PURE__ */ ll(al), Le = (m, c) => {
|
|
|
1962
1962
|
]);
|
|
1963
1963
|
};
|
|
1964
1964
|
}
|
|
1965
|
-
}, _l = /* @__PURE__ */
|
|
1966
|
-
|
|
1965
|
+
}, _l = /* @__PURE__ */ Ge(kl, [["__scopeId", "data-v-51dfb7ef"]]), je = new Kt("gyc");
|
|
1966
|
+
je.version(1).stores({
|
|
1967
1967
|
tableInfo: "++id,[user+page+key],user,page,key,showCol,width,sort",
|
|
1968
1968
|
tableList: "++id,name"
|
|
1969
1969
|
});
|
|
1970
|
-
async function
|
|
1971
|
-
if (await
|
|
1972
|
-
let d = await
|
|
1973
|
-
return await
|
|
1970
|
+
async function tt(f, c, r, t = {}) {
|
|
1971
|
+
if (await je.tableInfo.where({ user: f, page: c, key: r }).count() > 0) {
|
|
1972
|
+
let d = await je.tableInfo.where({ user: f, page: c, key: r }).first();
|
|
1973
|
+
return await je.tableInfo.put({ ...d, ...t }), "update success";
|
|
1974
1974
|
} else {
|
|
1975
1975
|
let d = { showCol: !0, width: "auto", sort: 0, ...t };
|
|
1976
|
-
return await
|
|
1976
|
+
return await je.tableInfo.add({ user: f, page: c, key: r, ...d }), "add success";
|
|
1977
1977
|
}
|
|
1978
1978
|
}
|
|
1979
|
-
async function Cl(
|
|
1980
|
-
return await
|
|
1979
|
+
async function Cl(f, c) {
|
|
1980
|
+
return await je.tableInfo.where({ user: f, page: c }).toArray();
|
|
1981
1981
|
}
|
|
1982
|
-
async function Dl(
|
|
1982
|
+
async function Dl(f, c) {
|
|
1983
1983
|
try {
|
|
1984
|
-
const
|
|
1985
|
-
return console.log("删除了" +
|
|
1986
|
-
} catch (
|
|
1987
|
-
throw console.error("删除表格项设置信息时出错:",
|
|
1984
|
+
const r = await je.tableInfo.where({ user: f, page: c }).delete();
|
|
1985
|
+
return console.log("删除了" + r + "条数据"), r;
|
|
1986
|
+
} catch (r) {
|
|
1987
|
+
throw console.error("删除表格项设置信息时出错:", r), r;
|
|
1988
1988
|
}
|
|
1989
1989
|
}
|
|
1990
|
-
async function Vl(
|
|
1991
|
-
return await
|
|
1990
|
+
async function Vl(f) {
|
|
1991
|
+
return await je.tableList.where({ name: f }).first();
|
|
1992
1992
|
}
|
|
1993
|
-
async function Ml(
|
|
1994
|
-
return typeof
|
|
1993
|
+
async function Ml(f) {
|
|
1994
|
+
return typeof f == "string" && (f = { name: f }), await je.tableList.add(f), "add success";
|
|
1995
1995
|
}
|
|
1996
1996
|
const Fl = {
|
|
1997
1997
|
style: { margin: "10px" },
|
|
1998
1998
|
class: "allcheck"
|
|
1999
|
-
},
|
|
1999
|
+
}, Sl = {
|
|
2000
2000
|
id: "cols",
|
|
2001
2001
|
style: { display: "flex", "flex-wrap": "wrap", margin: "0 !important", padding: "0 !important" }
|
|
2002
|
-
},
|
|
2002
|
+
}, Tl = ["textContent"], ql = {
|
|
2003
2003
|
__name: "columns-setting",
|
|
2004
|
-
props: /* @__PURE__ */
|
|
2004
|
+
props: /* @__PURE__ */ Le({
|
|
2005
2005
|
name: {
|
|
2006
2006
|
type: String,
|
|
2007
2007
|
required: !0
|
|
@@ -2011,35 +2011,35 @@ const Fl = {
|
|
|
2011
2011
|
modelModifiers: {}
|
|
2012
2012
|
}),
|
|
2013
2013
|
emits: ["update:modelValue"],
|
|
2014
|
-
setup(
|
|
2015
|
-
const c =
|
|
2016
|
-
|
|
2014
|
+
setup(f) {
|
|
2015
|
+
const c = f, r = le([]), t = Ne(f, "modelValue"), e = async (k, $) => {
|
|
2016
|
+
k ? t.value[$].showCol = !0 : t.value[$].showCol = !1;
|
|
2017
2017
|
try {
|
|
2018
|
-
const L = await
|
|
2018
|
+
const L = await tt(t.value.table.user, c.name, $, { showCol: k });
|
|
2019
2019
|
console.log(L);
|
|
2020
2020
|
} catch (L) {
|
|
2021
|
-
console.error("列显示状态保存信息时出错:", L),
|
|
2021
|
+
console.error("列显示状态保存信息时出错:", L), Te({
|
|
2022
2022
|
type: "error",
|
|
2023
2023
|
message: "列显示状态保存信息失败!"
|
|
2024
2024
|
});
|
|
2025
2025
|
}
|
|
2026
2026
|
}, d = () => {
|
|
2027
|
-
const
|
|
2028
|
-
if (
|
|
2029
|
-
let
|
|
2027
|
+
const k = document.getElementById("cols");
|
|
2028
|
+
if (k) {
|
|
2029
|
+
let $ = qt.create(k, {
|
|
2030
2030
|
animation: 150,
|
|
2031
2031
|
filter: ".filtered",
|
|
2032
2032
|
//
|
|
2033
2033
|
sort: !0,
|
|
2034
2034
|
onEnd: () => {
|
|
2035
|
-
|
|
2036
|
-
t.value[
|
|
2037
|
-
let
|
|
2035
|
+
$.toArray().forEach(async (ee, I) => {
|
|
2036
|
+
t.value[ee].sort = I;
|
|
2037
|
+
let z = t.value[ee].width || "auto";
|
|
2038
2038
|
try {
|
|
2039
|
-
const
|
|
2040
|
-
console.log(
|
|
2041
|
-
} catch (
|
|
2042
|
-
console.error("列排序和宽度保存信息时出错:",
|
|
2039
|
+
const re = await tt(t.value.table.user, c.name, ee, { sort: I, width: z });
|
|
2040
|
+
console.log(re);
|
|
2041
|
+
} catch (re) {
|
|
2042
|
+
console.error("列排序和宽度保存信息时出错:", re), Te({
|
|
2043
2043
|
type: "error",
|
|
2044
2044
|
message: "列排序和宽度保存信息失败!"
|
|
2045
2045
|
});
|
|
@@ -2048,37 +2048,37 @@ const Fl = {
|
|
|
2048
2048
|
}
|
|
2049
2049
|
});
|
|
2050
2050
|
}
|
|
2051
|
-
},
|
|
2051
|
+
}, E = async () => {
|
|
2052
2052
|
try {
|
|
2053
|
-
for (const
|
|
2054
|
-
|
|
2055
|
-
const
|
|
2053
|
+
for (const k of r.value) {
|
|
2054
|
+
k.showCol = !0, t.value[k.value].showCol = !0;
|
|
2055
|
+
const $ = await tt(t.value.table.user, c.name, k.value, {
|
|
2056
2056
|
showCol: !0,
|
|
2057
|
-
width:
|
|
2058
|
-
sort:
|
|
2057
|
+
width: k.width,
|
|
2058
|
+
sort: k.sort
|
|
2059
2059
|
});
|
|
2060
|
-
console.log(
|
|
2060
|
+
console.log($);
|
|
2061
2061
|
}
|
|
2062
|
-
} catch (
|
|
2063
|
-
console.error("全选列保存信息时出错:",
|
|
2062
|
+
} catch (k) {
|
|
2063
|
+
console.error("全选列保存信息时出错:", k), Te({
|
|
2064
2064
|
type: "error",
|
|
2065
2065
|
message: "全选列保存信息失败!"
|
|
2066
2066
|
});
|
|
2067
2067
|
}
|
|
2068
2068
|
}, T = async () => {
|
|
2069
2069
|
try {
|
|
2070
|
-
const
|
|
2071
|
-
for (const
|
|
2072
|
-
|
|
2073
|
-
const L = await
|
|
2070
|
+
const k = r.value.filter(($) => !$.alwaysShow);
|
|
2071
|
+
for (const $ of k) {
|
|
2072
|
+
$.showCol = !1, t.value[$.value].showCol = !1;
|
|
2073
|
+
const L = await tt(t.value.table.user, c.name, $.value, {
|
|
2074
2074
|
showCol: !1,
|
|
2075
|
-
width:
|
|
2076
|
-
sort:
|
|
2075
|
+
width: $.width,
|
|
2076
|
+
sort: $.sort
|
|
2077
2077
|
});
|
|
2078
2078
|
console.log(L);
|
|
2079
2079
|
}
|
|
2080
|
-
} catch (
|
|
2081
|
-
console.error("清除列保存信息时出错:",
|
|
2080
|
+
} catch (k) {
|
|
2081
|
+
console.error("清除列保存信息时出错:", k), Te({
|
|
2082
2082
|
type: "error",
|
|
2083
2083
|
message: "清除列保存信息失败!"
|
|
2084
2084
|
});
|
|
@@ -2089,61 +2089,61 @@ const Fl = {
|
|
|
2089
2089
|
cancelButtonText: "取消",
|
|
2090
2090
|
type: "warning"
|
|
2091
2091
|
}).then(() => {
|
|
2092
|
-
Dl(t.value.table.user, c.name).then((
|
|
2093
|
-
console.log(
|
|
2094
|
-
}).catch((
|
|
2095
|
-
console.error("复位操作出错:",
|
|
2092
|
+
Dl(t.value.table.user, c.name).then((k) => {
|
|
2093
|
+
console.log(k), window.location.reload();
|
|
2094
|
+
}).catch((k) => {
|
|
2095
|
+
console.error("复位操作出错:", k), Te({
|
|
2096
2096
|
type: "info",
|
|
2097
2097
|
message: "复位失败!"
|
|
2098
2098
|
});
|
|
2099
2099
|
});
|
|
2100
2100
|
});
|
|
2101
2101
|
};
|
|
2102
|
-
return
|
|
2103
|
-
|
|
2104
|
-
label:
|
|
2105
|
-
value:
|
|
2106
|
-
alwaysShow:
|
|
2107
|
-
showCol:
|
|
2108
|
-
sort:
|
|
2109
|
-
width:
|
|
2110
|
-
})).sort((
|
|
2111
|
-
}), (
|
|
2112
|
-
const L = Y("el-divider"),
|
|
2102
|
+
return lt(async () => {
|
|
2103
|
+
r.value = Object.entries(t.value).filter(([, k]) => k.visible !== !1).filter(([, k]) => k.type != "hidden").map(([k, $]) => ({
|
|
2104
|
+
label: $.label,
|
|
2105
|
+
value: k,
|
|
2106
|
+
alwaysShow: $.alwaysShow,
|
|
2107
|
+
showCol: $.showCol !== !1,
|
|
2108
|
+
sort: $.sort || 0,
|
|
2109
|
+
width: $.width || "auto"
|
|
2110
|
+
})).sort((k, $) => k.sort - $.sort), d();
|
|
2111
|
+
}), (k, $) => {
|
|
2112
|
+
const L = Y("el-divider"), ee = Y("el-alert"), I = Y("el-checkbox");
|
|
2113
2113
|
return i(), x("div", null, [
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2114
|
+
G("div", Fl, [
|
|
2115
|
+
G("a", { onClick: E }, "全选"),
|
|
2116
|
+
J(L, { direction: "vertical" }),
|
|
2117
|
+
G("a", { onClick: T }, "全不选"),
|
|
2118
|
+
J(L, { direction: "vertical" }),
|
|
2119
|
+
G("a", { onClick: S }, "复位")
|
|
2120
2120
|
]),
|
|
2121
|
-
|
|
2121
|
+
J(ee, {
|
|
2122
2122
|
title: "拖动表格列标题可以改变表格列显示顺序 !",
|
|
2123
2123
|
type: "warning",
|
|
2124
2124
|
"show-icon": "",
|
|
2125
2125
|
closable: !1,
|
|
2126
2126
|
style: { "margin-bottom": "10px" }
|
|
2127
2127
|
}),
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
(i(!0), x(W, null,
|
|
2131
|
-
modelValue:
|
|
2132
|
-
"onUpdate:modelValue": (
|
|
2133
|
-
"data-id":
|
|
2134
|
-
class:
|
|
2135
|
-
onChange: (
|
|
2128
|
+
G("div", null, [
|
|
2129
|
+
G("div", Sl, [
|
|
2130
|
+
(i(!0), x(W, null, U(r.value, (z) => (i(), M(I, {
|
|
2131
|
+
modelValue: z.showCol,
|
|
2132
|
+
"onUpdate:modelValue": (re) => z.showCol = re,
|
|
2133
|
+
"data-id": z.value,
|
|
2134
|
+
class: Tt(["check-box-hover", z.value == "control" ? "filtered" : ""]),
|
|
2135
|
+
onChange: (re) => e(re, z.value),
|
|
2136
2136
|
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" },
|
|
2137
|
-
value:
|
|
2138
|
-
title:
|
|
2139
|
-
disabled:
|
|
2140
|
-
key:
|
|
2137
|
+
value: z.value,
|
|
2138
|
+
title: z.label,
|
|
2139
|
+
disabled: z.alwaysShow,
|
|
2140
|
+
key: z.value
|
|
2141
2141
|
}, {
|
|
2142
2142
|
default: y(() => [
|
|
2143
|
-
|
|
2144
|
-
textContent:
|
|
2143
|
+
G("span", {
|
|
2144
|
+
textContent: he(z.label),
|
|
2145
2145
|
style: { display: "block", "text-overflow": "ellipsis", width: "95px", overflow: "hidden" }
|
|
2146
|
-
}, null, 8,
|
|
2146
|
+
}, null, 8, Tl)
|
|
2147
2147
|
]),
|
|
2148
2148
|
_: 2
|
|
2149
2149
|
}, 1032, ["modelValue", "onUpdate:modelValue", "data-id", "class", "onChange", "value", "title", "disabled"]))), 128))
|
|
@@ -2152,30 +2152,30 @@ const Fl = {
|
|
|
2152
2152
|
]);
|
|
2153
2153
|
};
|
|
2154
2154
|
}
|
|
2155
|
-
}, xl = /* @__PURE__ */
|
|
2155
|
+
}, xl = /* @__PURE__ */ Ge(ql, [["__scopeId", "data-v-c423ede0"]]), Ol = { class: "g-table-container" }, Al = {
|
|
2156
2156
|
key: 0,
|
|
2157
2157
|
class: "table-query-container"
|
|
2158
2158
|
}, Bl = { class: "table-container" }, Il = ["innerHTML"], Yl = { key: 0 }, Ul = { style: { display: "flex", "margin-top": "-2px" } }, Rl = { style: { display: "flex", flex: "1" } }, jl = {
|
|
2159
2159
|
style: { display: "flex", "justify-content": "center", width: "100%", height: "100%" },
|
|
2160
2160
|
id: "table-form"
|
|
2161
|
-
}, Ll = { key: 1 }, Nl = { style: { display: "flex" } },
|
|
2161
|
+
}, Ll = { key: 1 }, Nl = { style: { display: "flex" } }, zl = { style: { display: "flex", flex: "1" } }, Pl = /* @__PURE__ */ Object.assign({
|
|
2162
2162
|
name: "g-table",
|
|
2163
2163
|
inheritAttrs: !1
|
|
2164
2164
|
}, {
|
|
2165
2165
|
__name: "g-table",
|
|
2166
|
-
props: /* @__PURE__ */
|
|
2166
|
+
props: /* @__PURE__ */ Le({
|
|
2167
2167
|
name: String,
|
|
2168
2168
|
require: !0
|
|
2169
2169
|
}, {
|
|
2170
2170
|
modelValue: { required: !0 },
|
|
2171
2171
|
modelModifiers: {}
|
|
2172
2172
|
}),
|
|
2173
|
-
emits: /* @__PURE__ */
|
|
2174
|
-
setup(
|
|
2175
|
-
var
|
|
2176
|
-
const t =
|
|
2177
|
-
|
|
2178
|
-
const
|
|
2173
|
+
emits: /* @__PURE__ */ Le(["load", "open", "delete", "submit", "reset", "download", "row-save"], ["update:modelValue"]),
|
|
2174
|
+
setup(f, { expose: c, emit: r }) {
|
|
2175
|
+
var Ye, at, Ze, ot, rt, ut, Je;
|
|
2176
|
+
const t = r, e = Ne(f, "modelValue"), d = gt("options"), E = le({}), T = le(null), S = le(null), k = Object.entries(e.value).filter(([l, u]) => (u == null ? void 0 : u.search) !== void 0).map(([l, u]) => [l, u.value]);
|
|
2177
|
+
E.value = Object.fromEntries(k);
|
|
2178
|
+
const $ = le(!1), L = ["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"], ee = le([]), I = f, z = bt(), re = le({}), ae = le([]), Q = le(null), me = le(""), ye = {
|
|
2179
2179
|
autoWatch: !1,
|
|
2180
2180
|
data: [],
|
|
2181
2181
|
border: !0,
|
|
@@ -2184,30 +2184,30 @@ const Fl = {
|
|
|
2184
2184
|
fit: !1,
|
|
2185
2185
|
type: "hidden",
|
|
2186
2186
|
load: () => {
|
|
2187
|
-
let { currentPage: l, pageSize:
|
|
2187
|
+
let { currentPage: l, pageSize: u } = e.value.table.page;
|
|
2188
2188
|
try {
|
|
2189
|
-
t("load", { currentPage: l, pageSize:
|
|
2190
|
-
var
|
|
2191
|
-
if (!Array.isArray(
|
|
2192
|
-
console.error("从 load 事件回调中接收到的数据不是数组格式。"),
|
|
2189
|
+
t("load", { currentPage: l, pageSize: u, ...E.value }, (m, F, { fields: P = [], sums: n = {} } = {}) => {
|
|
2190
|
+
var V, K;
|
|
2191
|
+
if (!Array.isArray(m)) {
|
|
2192
|
+
console.error("从 load 事件回调中接收到的数据不是数组格式。"), Te.error("数据加载失败,请检查数据格式。");
|
|
2193
2193
|
return;
|
|
2194
2194
|
}
|
|
2195
|
-
if (typeof
|
|
2196
|
-
console.error("从 load 事件回调中接收到的 total 不是数字格式。"),
|
|
2195
|
+
if (typeof F != "number") {
|
|
2196
|
+
console.error("从 load 事件回调中接收到的 total 不是数字格式。"), Te.error("数据加载失败,请检查数据格式。");
|
|
2197
2197
|
return;
|
|
2198
2198
|
}
|
|
2199
|
-
e.value.table.data =
|
|
2200
|
-
},
|
|
2201
|
-
} catch (
|
|
2202
|
-
console.error("触发 load 事件时出现错误:",
|
|
2199
|
+
e.value.table.data = m, ((K = (V = e.value.control) == null ? void 0 : V.add) == null ? void 0 : K.inline) === !0 && e.value.table.data.unshift(Q.value), e.value.table.page.total = F, ae.value = P, re.value = n, Ve(), me.value = Math.random().toString(36).substring(2);
|
|
2200
|
+
}, Q.value);
|
|
2201
|
+
} catch (m) {
|
|
2202
|
+
console.error("触发 load 事件时出现错误:", m), Te.error("数据加载时出现错误,请稍后重试。");
|
|
2203
2203
|
}
|
|
2204
2204
|
},
|
|
2205
|
-
onHeaderDragend: (l,
|
|
2206
|
-
var
|
|
2207
|
-
|
|
2205
|
+
onHeaderDragend: (l, u, m) => {
|
|
2206
|
+
var F;
|
|
2207
|
+
tt((F = e.value.table) == null ? void 0 : F.user, I.name, m.property, { width: l });
|
|
2208
2208
|
},
|
|
2209
|
-
onRowDblclick: (l,
|
|
2210
|
-
e.value.table.dblclickType == "edit" ?
|
|
2209
|
+
onRowDblclick: (l, u, m) => {
|
|
2210
|
+
e.value.table.dblclickType == "edit" ? v(l, u, m, e) : e.value.table.dblclickType == "view" && p(l, u, m, e);
|
|
2211
2211
|
},
|
|
2212
2212
|
style: { "min-height": "100px", backgroundColor: "var(--el-bg-color)" },
|
|
2213
2213
|
page: {
|
|
@@ -2231,15 +2231,15 @@ const Fl = {
|
|
|
2231
2231
|
}
|
|
2232
2232
|
},
|
|
2233
2233
|
dblclickType: "edit",
|
|
2234
|
-
"summary-method": ({ columns: l, data:
|
|
2235
|
-
onSortChange: ({ column: l, prop:
|
|
2234
|
+
"summary-method": ({ columns: l, data: u }, m) => m,
|
|
2235
|
+
onSortChange: ({ column: l, prop: u, order: m }, F) => {
|
|
2236
2236
|
}
|
|
2237
2237
|
};
|
|
2238
|
-
e.value.table =
|
|
2239
|
-
|
|
2238
|
+
e.value.table = Fe(
|
|
2239
|
+
ye,
|
|
2240
2240
|
d == null ? void 0 : d.table,
|
|
2241
2241
|
e.value.table,
|
|
2242
|
-
|
|
2242
|
+
z
|
|
2243
2243
|
// 继承父组件的属性
|
|
2244
2244
|
);
|
|
2245
2245
|
const ge = {
|
|
@@ -2247,7 +2247,7 @@ const Fl = {
|
|
|
2247
2247
|
label: "操作",
|
|
2248
2248
|
width: 250,
|
|
2249
2249
|
fixed: "right",
|
|
2250
|
-
style: { ...(
|
|
2250
|
+
style: { ...(at = (Ye = e.value) == null ? void 0 : Ye.control) == null ? void 0 : at.style },
|
|
2251
2251
|
validate: async (l) => await !0,
|
|
2252
2252
|
add: {
|
|
2253
2253
|
label: "新增",
|
|
@@ -2262,25 +2262,25 @@ const Fl = {
|
|
|
2262
2262
|
text: !0,
|
|
2263
2263
|
type: "success",
|
|
2264
2264
|
mode: "dialog",
|
|
2265
|
-
auth: (l,
|
|
2265
|
+
auth: (l, u, m) => !1
|
|
2266
2266
|
},
|
|
2267
2267
|
edit: {
|
|
2268
2268
|
label: "编辑",
|
|
2269
2269
|
text: !0,
|
|
2270
2270
|
type: "primary",
|
|
2271
2271
|
mode: "dialog",
|
|
2272
|
-
auth: (l,
|
|
2273
|
-
var
|
|
2274
|
-
return ((
|
|
2272
|
+
auth: (l, u, m) => {
|
|
2273
|
+
var F, P, n;
|
|
2274
|
+
return ((n = (P = (F = e.value) == null ? void 0 : F.control) == null ? void 0 : P.add) == null ? void 0 : n.inline) === !1;
|
|
2275
2275
|
}
|
|
2276
2276
|
},
|
|
2277
2277
|
delete: {
|
|
2278
2278
|
text: !0,
|
|
2279
2279
|
label: "删除",
|
|
2280
2280
|
type: "danger",
|
|
2281
|
-
auth: (l,
|
|
2282
|
-
var
|
|
2283
|
-
return !(((
|
|
2281
|
+
auth: (l, u, m) => {
|
|
2282
|
+
var F, P, n;
|
|
2283
|
+
return !(((n = (P = (F = e.value) == null ? void 0 : F.control) == null ? void 0 : P.add) == null ? void 0 : n.inline) === !0 && m === 0);
|
|
2284
2284
|
},
|
|
2285
2285
|
dialog: {
|
|
2286
2286
|
message: "此操作将永久删除该文件, 是否继续?",
|
|
@@ -2310,69 +2310,69 @@ const Fl = {
|
|
|
2310
2310
|
sort: -1,
|
|
2311
2311
|
addLabel: "新增",
|
|
2312
2312
|
auth: () => {
|
|
2313
|
-
var l,
|
|
2314
|
-
return ((
|
|
2313
|
+
var l, u, m;
|
|
2314
|
+
return ((m = (u = (l = e.value) == null ? void 0 : l.control) == null ? void 0 : u.add) == null ? void 0 : m.inline) === !0;
|
|
2315
2315
|
}
|
|
2316
2316
|
},
|
|
2317
|
-
dropdown: (l,
|
|
2317
|
+
dropdown: (l, u, m, F) => ({
|
|
2318
2318
|
label: "编辑",
|
|
2319
2319
|
operate: "edit",
|
|
2320
2320
|
"split-button": !0,
|
|
2321
2321
|
type: "primary",
|
|
2322
2322
|
size: "small",
|
|
2323
|
-
auth: () => !(
|
|
2323
|
+
auth: () => !(F.control.add.inline === !0 && m == 0),
|
|
2324
2324
|
onClick: () => {
|
|
2325
|
-
var
|
|
2326
|
-
let
|
|
2327
|
-
|
|
2325
|
+
var n;
|
|
2326
|
+
let P = (n = ie(l, u, m, F)) == null ? void 0 : n.operate;
|
|
2327
|
+
P === "edit" ? v(l, u, m, F) : P === "delete" ? a(l, u, m, F) : P === "view" && p(l, u, m, F);
|
|
2328
2328
|
},
|
|
2329
2329
|
"button-props": { round: !0, plain: !0 }
|
|
2330
2330
|
})
|
|
2331
2331
|
};
|
|
2332
|
-
e.value.control =
|
|
2332
|
+
e.value.control = Fe(
|
|
2333
2333
|
ge,
|
|
2334
2334
|
d == null ? void 0 : d.control,
|
|
2335
|
-
(
|
|
2335
|
+
(Ze = e.value) == null ? void 0 : Ze.control
|
|
2336
2336
|
);
|
|
2337
|
-
const
|
|
2338
|
-
var
|
|
2339
|
-
if (!l || !
|
|
2337
|
+
const ie = (l, u, m, F) => {
|
|
2338
|
+
var K, ve, qe, xe, ze, Ke;
|
|
2339
|
+
if (!l || !u || m == null)
|
|
2340
2340
|
return console.warn("mergeDropdown: 缺少必要的参数(row, column或index)"), {};
|
|
2341
|
-
const
|
|
2342
|
-
return
|
|
2343
|
-
},
|
|
2341
|
+
const P = ((K = ge.dropdown) == null ? void 0 : K.call(ge, l, u, m, F)) || {}, n = ((qe = (ve = d == null ? void 0 : d.control) == null ? void 0 : ve.dropdown) == null ? void 0 : qe.call(ve, l, u, m, F)) || {}, V = ((Ke = (ze = (xe = e.value) == null ? void 0 : xe.control) == null ? void 0 : ze.dropdown) == null ? void 0 : Ke.call(ze, l, u, m, F)) || {};
|
|
2342
|
+
return Fe(P, n, V) || {};
|
|
2343
|
+
}, de = {
|
|
2344
2344
|
type: "hidden",
|
|
2345
2345
|
minWidth: 120,
|
|
2346
2346
|
align: "center",
|
|
2347
|
-
formatter: (l,
|
|
2347
|
+
formatter: (l, u, m, F) => m
|
|
2348
2348
|
};
|
|
2349
|
-
e.value.tableColumns =
|
|
2350
|
-
|
|
2349
|
+
e.value.tableColumns = Fe(
|
|
2350
|
+
de,
|
|
2351
2351
|
d == null ? void 0 : d.tableColumns,
|
|
2352
|
-
(
|
|
2352
|
+
(ot = e.value) == null ? void 0 : ot.tableColumns
|
|
2353
2353
|
);
|
|
2354
|
-
const
|
|
2354
|
+
const ne = {
|
|
2355
2355
|
type: "hidden",
|
|
2356
2356
|
disabled: void 0,
|
|
2357
2357
|
footer: { hidden: !1 },
|
|
2358
2358
|
modalState: void 0
|
|
2359
2359
|
};
|
|
2360
|
-
e.value.form =
|
|
2361
|
-
|
|
2360
|
+
e.value.form = Fe(
|
|
2361
|
+
ne,
|
|
2362
2362
|
d == null ? void 0 : d.form,
|
|
2363
|
-
(
|
|
2363
|
+
(rt = e.value) == null ? void 0 : rt.form
|
|
2364
2364
|
);
|
|
2365
|
-
const
|
|
2365
|
+
const te = {
|
|
2366
2366
|
type: "hidden",
|
|
2367
2367
|
labelPosition: "right",
|
|
2368
2368
|
style: {
|
|
2369
2369
|
width: "100%"
|
|
2370
2370
|
}
|
|
2371
2371
|
};
|
|
2372
|
-
e.value.formItems =
|
|
2373
|
-
|
|
2372
|
+
e.value.formItems = Fe(
|
|
2373
|
+
te,
|
|
2374
2374
|
d == null ? void 0 : d.formItems,
|
|
2375
|
-
(
|
|
2375
|
+
(ut = e == null ? void 0 : e.value) == null ? void 0 : ut.formItems
|
|
2376
2376
|
);
|
|
2377
2377
|
const be = {
|
|
2378
2378
|
title: "编辑",
|
|
@@ -2383,130 +2383,133 @@ const Fl = {
|
|
|
2383
2383
|
fullScreen: !1,
|
|
2384
2384
|
"close-on-click-modal": !1,
|
|
2385
2385
|
draggable: !0,
|
|
2386
|
-
overflow: !0
|
|
2386
|
+
overflow: !0,
|
|
2387
|
+
max: {
|
|
2388
|
+
style: {},
|
|
2389
|
+
icon: () => Oe(Zt)
|
|
2390
|
+
},
|
|
2391
|
+
min: {
|
|
2392
|
+
style: {},
|
|
2393
|
+
icon: () => Oe(Jt)
|
|
2394
|
+
// 最小化图标
|
|
2395
|
+
}
|
|
2387
2396
|
};
|
|
2388
|
-
e.value.dialog =
|
|
2397
|
+
e.value.dialog = Fe(
|
|
2389
2398
|
be,
|
|
2390
2399
|
d == null ? void 0 : d.dialog,
|
|
2391
|
-
(
|
|
2400
|
+
(Je = e.value) == null ? void 0 : Je.dialog
|
|
2392
2401
|
);
|
|
2393
|
-
const
|
|
2394
|
-
let
|
|
2395
|
-
if (l.decimals && !isNaN(parseFloat(
|
|
2396
|
-
const
|
|
2402
|
+
const se = (l, u) => {
|
|
2403
|
+
let m = u;
|
|
2404
|
+
if (l.decimals && !isNaN(parseFloat(u)) && (typeof l.decimals == "number" ? m = parseFloat(m).toFixed(l.decimals) : typeof l.decimals == "object" && l.decimals.num && (l.decimals.pad ? m = parseFloat(m).toFixed(l.decimals.num) : m = parseFloat(parseFloat(m).toFixed(l.decimals.num)).toString())), ["date", "datetime", "time", "time-select"].includes(l.type) && mt(u).isValid()) {
|
|
2405
|
+
const P = {
|
|
2397
2406
|
date: "YYYY-MM-DD",
|
|
2398
2407
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
2399
2408
|
time: "HH:mm:ss"
|
|
2400
2409
|
};
|
|
2401
|
-
|
|
2410
|
+
m = l.format ? mt(m).format(l.format) : mt(m).format(P[l.type]);
|
|
2402
2411
|
}
|
|
2403
|
-
return l.type === "money" && (l.align = l.align || "right", l.width = l.width || 130,
|
|
2412
|
+
return l.type === "money" && (l.align = l.align || "right", l.width = l.width || 130, m = `<span title="${yt(parseFloat(m))}">${ua(parseFloat(m))}</span>`), l.prefix && m && (m = `<span>${l.prefix}${m}</span>`), l.suffix && m && (m = `${m}<span>${l.suffix}</span>`), m;
|
|
2404
2413
|
}, b = (l) => {
|
|
2405
|
-
|
|
2414
|
+
E.value = Object.fromEntries(k), e.value.table.load();
|
|
2406
2415
|
}, o = (l) => {
|
|
2407
|
-
|
|
2416
|
+
E.value = l, e.value.table.load();
|
|
2408
2417
|
}, _ = async (l) => {
|
|
2409
|
-
var
|
|
2418
|
+
var u, m;
|
|
2410
2419
|
e.value.form.modalState = "add";
|
|
2411
2420
|
try {
|
|
2412
|
-
if (!await ((
|
|
2413
|
-
} catch (
|
|
2414
|
-
console.error("验证失败:",
|
|
2421
|
+
if (!await ((u = e.value.control) == null ? void 0 : u.validate("add", { m: l }))) return;
|
|
2422
|
+
} catch (F) {
|
|
2423
|
+
console.error("验证失败:", F);
|
|
2415
2424
|
return;
|
|
2416
2425
|
}
|
|
2417
|
-
(
|
|
2418
|
-
e.value[
|
|
2419
|
-
}),
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
}, p = async (l, r, f, D) => {
|
|
2423
|
-
var n, $;
|
|
2426
|
+
(m = e.value.control.add) != null && m.click ? e.value.control.add.click(l) : e.value.control.add.inline === !0 ? (e.value.table.data.unshift(Q.value), t("open", "row-add", { initFormData: Q.value })) : (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(Q.value).forEach((F) => {
|
|
2427
|
+
e.value[F] && (e.value[F].value = Q.value[F]);
|
|
2428
|
+
}), $.value = !0, t("open", "add", { m: l }), it());
|
|
2429
|
+
}, v = async (l, u, m, F) => {
|
|
2430
|
+
var P, n;
|
|
2424
2431
|
e.value.form.modalState = "edit";
|
|
2425
2432
|
try {
|
|
2426
|
-
if (!await ((
|
|
2427
|
-
} catch (
|
|
2428
|
-
console.error("验证失败:",
|
|
2433
|
+
if (!await ((P = e.value.control) == null ? void 0 : P.validate("edit", { row: l, column: u, $index: m, m: F }))) return;
|
|
2434
|
+
} catch (V) {
|
|
2435
|
+
console.error("验证失败:", V);
|
|
2429
2436
|
return;
|
|
2430
2437
|
}
|
|
2431
|
-
(
|
|
2432
|
-
e.value[
|
|
2433
|
-
}),
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
}, a = async (l, r, f, D) => {
|
|
2437
|
-
var n, $;
|
|
2438
|
+
(n = e.value.control.edit) != null && n.click ? e.value.control.edit.click(l, u, m, F) : (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((V) => {
|
|
2439
|
+
e.value[V] && (e.value[V].value = l[V]);
|
|
2440
|
+
}), $.value = !0, t("open", "edit", { m: F, row: l, column: u, $index: m }), it());
|
|
2441
|
+
}, a = async (l, u, m, F) => {
|
|
2442
|
+
var P, n;
|
|
2438
2443
|
try {
|
|
2439
|
-
if (!await ((
|
|
2440
|
-
} catch (
|
|
2441
|
-
console.error("验证失败:",
|
|
2444
|
+
if (!await ((P = e.value.control) == null ? void 0 : P.validate("delete", { row: l, column: u, $index: m, m: F }))) return;
|
|
2445
|
+
} catch (V) {
|
|
2446
|
+
console.error("验证失败:", V);
|
|
2442
2447
|
return;
|
|
2443
2448
|
}
|
|
2444
|
-
if ((
|
|
2445
|
-
e.value.control.delete.click(l,
|
|
2449
|
+
if ((n = e.value.control.delete) != null && n.click)
|
|
2450
|
+
e.value.control.delete.click(l, u, m, F);
|
|
2446
2451
|
else {
|
|
2447
|
-
let { message:
|
|
2448
|
-
Ft.confirm(
|
|
2449
|
-
t("delete", { row: l, column:
|
|
2450
|
-
|
|
2452
|
+
let { message: V, title: K, options: ve } = e.value.control.delete.dialog;
|
|
2453
|
+
Ft.confirm(V, K, ve).then(() => {
|
|
2454
|
+
t("delete", { row: l, column: u, $index: m }, (qe = !0, xe = !1) => {
|
|
2455
|
+
qe && (e.value.table.data.splice(m, 1), e.value.table.page.total--), xe && e.value.table.load();
|
|
2451
2456
|
});
|
|
2452
2457
|
}).catch(() => {
|
|
2453
2458
|
});
|
|
2454
2459
|
}
|
|
2455
|
-
},
|
|
2456
|
-
var
|
|
2460
|
+
}, p = async (l, u, m, F) => {
|
|
2461
|
+
var P, n;
|
|
2457
2462
|
e.value.form.modalState = void 0;
|
|
2458
2463
|
try {
|
|
2459
|
-
if (!await ((
|
|
2460
|
-
} catch (
|
|
2461
|
-
console.error("验证失败:",
|
|
2464
|
+
if (!await ((P = e.value.control) == null ? void 0 : P.validate("view", { row: l, column: u, $index: m, m: F }))) return;
|
|
2465
|
+
} catch (V) {
|
|
2466
|
+
console.error("验证失败:", V);
|
|
2462
2467
|
return;
|
|
2463
2468
|
}
|
|
2464
|
-
(
|
|
2465
|
-
e.value[
|
|
2466
|
-
}),
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
$ && (e.value.table.load(), console.log("load")), B && We(() => {
|
|
2473
|
-
Z.value = Object.assign({}, Object.fromEntries(Object.entries(Ce(e.value, (de, ye) => ye.type != "control" && ye.editor !== !1 && ye.type != "hidden")).map(([de, ye]) => [de, ye.value])));
|
|
2469
|
+
(n = e.value.control.view) != null && n.click ? e.value.control.view.click(l, u, m, F) : (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((V) => {
|
|
2470
|
+
e.value[V] && (e.value[V].value = l[V]);
|
|
2471
|
+
}), $.value = !0, t("open", "view", { m: F, row: l, column: u, $index: m }), it());
|
|
2472
|
+
}, g = (l, u, m, F) => {
|
|
2473
|
+
var P;
|
|
2474
|
+
(P = e.value.control.save) != null && P.click ? e.value.control.save.click(l, u, m, F) : t("row-save", { row: l, column: u, $index: m, data: e.value.table.data }, (n = !0, V = !0) => {
|
|
2475
|
+
n && (e.value.table.load(), console.log("load")), V && Qe(() => {
|
|
2476
|
+
Q.value = Object.assign({}, Object.fromEntries(Object.entries(Ce(e.value, (K, ve) => ve.type != "control" && ve.editor !== !1 && ve.type != "hidden")).map(([K, ve]) => [K, ve.value])));
|
|
2474
2477
|
});
|
|
2475
2478
|
});
|
|
2476
|
-
}, s = (l,
|
|
2477
|
-
t("submit", e.value.form.modalState, l,
|
|
2478
|
-
|
|
2479
|
+
}, s = (l, u) => {
|
|
2480
|
+
t("submit", e.value.form.modalState, l, u, (m) => {
|
|
2481
|
+
m && ($.value = !1, u.table.load());
|
|
2479
2482
|
});
|
|
2480
|
-
},
|
|
2483
|
+
}, D = (l) => {
|
|
2481
2484
|
t("reset", l);
|
|
2482
|
-
}, C = (l,
|
|
2483
|
-
var
|
|
2484
|
-
if ((
|
|
2485
|
-
l.control.download.click(l,
|
|
2485
|
+
}, C = (l, u) => {
|
|
2486
|
+
var m;
|
|
2487
|
+
if ((m = l.control.download) != null && m.click)
|
|
2488
|
+
l.control.download.click(l, u);
|
|
2486
2489
|
else {
|
|
2487
|
-
let
|
|
2490
|
+
let F = ht({
|
|
2488
2491
|
title: l.control.download.label,
|
|
2489
2492
|
size: 480,
|
|
2490
2493
|
width: 600,
|
|
2491
2494
|
slots: {
|
|
2492
|
-
default: () =>
|
|
2493
|
-
items:
|
|
2495
|
+
default: () => Oe(_l, {
|
|
2496
|
+
items: u,
|
|
2494
2497
|
commitText: l.control.download.excelLabel,
|
|
2495
|
-
onExcel: (
|
|
2496
|
-
t("download",
|
|
2498
|
+
onExcel: (P, n) => {
|
|
2499
|
+
t("download", P, n), F();
|
|
2497
2500
|
}
|
|
2498
2501
|
})
|
|
2499
2502
|
}
|
|
2500
2503
|
}, l.control.download.mode);
|
|
2501
2504
|
}
|
|
2502
|
-
},
|
|
2503
|
-
var
|
|
2504
|
-
(
|
|
2505
|
+
}, R = (l) => {
|
|
2506
|
+
var u;
|
|
2507
|
+
(u = l.control.setting) != null && u.click ? l.control.setting.click(l) : ht({
|
|
2505
2508
|
title: l.control.setting.label,
|
|
2506
2509
|
size: 470,
|
|
2507
2510
|
width: 600,
|
|
2508
2511
|
slots: {
|
|
2509
|
-
default: () =>
|
|
2512
|
+
default: () => Oe(xl, {
|
|
2510
2513
|
modelValue: l,
|
|
2511
2514
|
name: I.name
|
|
2512
2515
|
})
|
|
@@ -2515,205 +2518,186 @@ const Fl = {
|
|
|
2515
2518
|
}, X = e.value.control, O = [
|
|
2516
2519
|
{ type: "add", func: _ },
|
|
2517
2520
|
{ type: "download", func: C },
|
|
2518
|
-
{ type: "setting", func:
|
|
2519
|
-
{ type: "view", func:
|
|
2520
|
-
{ type: "edit", func:
|
|
2521
|
+
{ type: "setting", func: R },
|
|
2522
|
+
{ type: "view", func: p },
|
|
2523
|
+
{ type: "edit", func: v },
|
|
2521
2524
|
{ type: "delete", func: a },
|
|
2522
2525
|
{ type: "save", func: g }
|
|
2523
|
-
], A = (l) => O.filter((
|
|
2524
|
-
var
|
|
2526
|
+
], A = (l) => O.filter((u) => l.includes(u.type)).map(({ type: u, func: m }) => {
|
|
2527
|
+
var F, P, n;
|
|
2525
2528
|
return {
|
|
2526
|
-
name: `control-${
|
|
2527
|
-
attr: X == null ? void 0 : X[
|
|
2528
|
-
func:
|
|
2529
|
-
label: (
|
|
2530
|
-
sort: ((
|
|
2531
|
-
groupName: ((
|
|
2529
|
+
name: `control-${u}`,
|
|
2530
|
+
attr: X == null ? void 0 : X[u],
|
|
2531
|
+
func: m,
|
|
2532
|
+
label: (F = X == null ? void 0 : X[u]) == null ? void 0 : F.label,
|
|
2533
|
+
sort: ((P = X == null ? void 0 : X[u]) == null ? void 0 : P.sort) || 0,
|
|
2534
|
+
groupName: ((n = X == null ? void 0 : X[u]) == null ? void 0 : n.groupName) || "default"
|
|
2532
2535
|
};
|
|
2533
|
-
}).sort((
|
|
2534
|
-
const
|
|
2535
|
-
return
|
|
2536
|
-
}, {}), Ee =
|
|
2537
|
-
Object.entries(e.value).filter(([l,
|
|
2538
|
-
)), we =
|
|
2539
|
-
const
|
|
2540
|
-
for (const
|
|
2541
|
-
if (
|
|
2542
|
-
if (
|
|
2543
|
-
const
|
|
2544
|
-
if (
|
|
2536
|
+
}).sort((u, m) => u.sort - m.sort), ue = (l) => A(l).reduce((u, m) => {
|
|
2537
|
+
const F = m.groupName || "default";
|
|
2538
|
+
return u[F] || (u[F] = []), u[F].push(m), u;
|
|
2539
|
+
}, {}), Ee = Xe(() => Object.fromEntries(
|
|
2540
|
+
Object.entries(e.value).filter(([l, u]) => u.type !== "hidden").filter(([l, u]) => u.visible !== !1).filter(([l, u]) => u.showCol !== !1).map(([l, u]) => (u.sort = typeof u.sort == "number" ? u.sort : 0, [l, u])).sort((l, u) => l[1].sort - u[1].sort)
|
|
2541
|
+
)), we = le({}), De = (l, u) => {
|
|
2542
|
+
const m = (F, P) => {
|
|
2543
|
+
for (const n of F) {
|
|
2544
|
+
if (n.value == P) return n.label;
|
|
2545
|
+
if (n.children) {
|
|
2546
|
+
const V = m(n.children, P);
|
|
2547
|
+
if (V) return V;
|
|
2545
2548
|
}
|
|
2546
2549
|
}
|
|
2547
2550
|
return null;
|
|
2548
2551
|
};
|
|
2549
2552
|
if (l.getDicts) {
|
|
2550
|
-
const
|
|
2551
|
-
return we.value[
|
|
2552
|
-
we.value[
|
|
2553
|
+
const F = u.toString();
|
|
2554
|
+
return we.value[F] ? (l.options = we.value[F], l.formatter || (l.formatter = (P, n, V, K) => l.options && m(l.options, V) || V), Promise.resolve()) : l.getDicts(e.value.table.data).then((P) => {
|
|
2555
|
+
we.value[F] = P, l.options = P, l.formatter || (l.formatter = (n, V, K, ve) => l.options && m(l.options, K) || K);
|
|
2553
2556
|
});
|
|
2554
2557
|
}
|
|
2555
2558
|
return Promise.resolve();
|
|
2556
2559
|
}, Ve = () => {
|
|
2557
2560
|
const l = [];
|
|
2558
|
-
Object.keys(e.value).forEach((
|
|
2559
|
-
if (e.value[
|
|
2560
|
-
const
|
|
2561
|
-
e.value.table.data.forEach((
|
|
2562
|
-
var
|
|
2563
|
-
if (e.value[
|
|
2564
|
-
const
|
|
2565
|
-
|
|
2561
|
+
Object.keys(e.value).forEach((u) => {
|
|
2562
|
+
if (e.value[u].getDicts) {
|
|
2563
|
+
const m = De(e.value[u], u).then(() => {
|
|
2564
|
+
e.value.table.data.forEach((F) => {
|
|
2565
|
+
var P;
|
|
2566
|
+
if (e.value[u].getDicts && ((P = e.value[u]) == null ? void 0 : P.forceString) !== !1) {
|
|
2567
|
+
const n = F[u];
|
|
2568
|
+
F[u] = n != null ? n.toString() : n;
|
|
2566
2569
|
}
|
|
2567
2570
|
});
|
|
2568
|
-
}).catch((
|
|
2569
|
-
console.error(`加载字典${
|
|
2571
|
+
}).catch((F) => {
|
|
2572
|
+
console.error(`加载字典${u}出错:`, F);
|
|
2570
2573
|
});
|
|
2571
|
-
l.push(
|
|
2574
|
+
l.push(m);
|
|
2572
2575
|
}
|
|
2573
|
-
}), Promise.all(l).catch((
|
|
2574
|
-
console.error("字典加载过程中发生错误:",
|
|
2576
|
+
}), Promise.all(l).catch((u) => {
|
|
2577
|
+
console.error("字典加载过程中发生错误:", u);
|
|
2575
2578
|
});
|
|
2576
|
-
}, $e = (l,
|
|
2577
|
-
var
|
|
2578
|
-
return l.table ? (
|
|
2579
|
-
}, Me = (l,
|
|
2579
|
+
}, $e = (l, u, m, F) => {
|
|
2580
|
+
var P, n;
|
|
2581
|
+
return l.table ? (P = l.table(u, m, F)) != null && P.auth ? (n = l.table(u, m, F)) == null ? void 0 : n.auth(u, m, F) : !0 : !1;
|
|
2582
|
+
}, Me = (l, u) => l.name === "control-save" && u === 0 && e.value.control.add.inline === !0 ? l.attr.addLabel : l.label, Ie = () => {
|
|
2580
2583
|
if (e.value.dialog.mode == "drawer")
|
|
2581
2584
|
S.value.handleClose();
|
|
2582
2585
|
else if (e.value.dialog.mode == "dialog")
|
|
2583
2586
|
try {
|
|
2584
2587
|
T.value.handleClose();
|
|
2585
2588
|
} catch {
|
|
2586
|
-
|
|
2589
|
+
$.value = !1;
|
|
2587
2590
|
}
|
|
2588
2591
|
else
|
|
2589
|
-
|
|
2590
|
-
}, qe = () => {
|
|
2591
|
-
We(() => {
|
|
2592
|
-
if (!T.value) return;
|
|
2593
|
-
const l = document.querySelector(".el-dialog__wrapper");
|
|
2594
|
-
if (!l) return;
|
|
2595
|
-
const r = l.querySelector(".el-dialog");
|
|
2596
|
-
if (!r || r.querySelector(".dialog-resize-handle")) return;
|
|
2597
|
-
const f = document.createElement("div");
|
|
2598
|
-
f.className = "dialog-resize-handle", r.appendChild(f), f.onmousedown = (D) => {
|
|
2599
|
-
D.preventDefault();
|
|
2600
|
-
const n = D.clientX, $ = D.clientY, B = parseInt(document.defaultView.getComputedStyle(r).width), de = parseInt(document.defaultView.getComputedStyle(r).height);
|
|
2601
|
-
document.onmousemove = (ye) => {
|
|
2602
|
-
const Fe = B + ye.clientX - n, xe = de + ye.clientY - $;
|
|
2603
|
-
r.style.width = `${Math.max(300, Fe)}px`, r.style.height = `${Math.max(200, xe)}px`;
|
|
2604
|
-
}, document.onmouseup = () => {
|
|
2605
|
-
document.onmousemove = null, document.onmouseup = null;
|
|
2606
|
-
};
|
|
2607
|
-
};
|
|
2608
|
-
});
|
|
2592
|
+
$.value = !1;
|
|
2609
2593
|
};
|
|
2610
|
-
return
|
|
2594
|
+
return Pt(() => {
|
|
2611
2595
|
e.value.table.autoWatch && e.value.table.load();
|
|
2612
|
-
}),
|
|
2596
|
+
}), lt(async () => {
|
|
2613
2597
|
var l;
|
|
2614
|
-
if (
|
|
2615
|
-
|
|
2616
|
-
Object.entries(Ce(e.value, (
|
|
2598
|
+
if (ee.value = Object.values(e.value).filter((u) => u.type !== "hidden").filter((u) => u.type !== "control").filter((u) => u.visible !== !1).map((u) => ({ key: u.key || "", label: u.label, value: !0 })), Qe(() => {
|
|
2599
|
+
Q.value = Object.assign({}, Object.fromEntries(
|
|
2600
|
+
Object.entries(Ce(e.value, (u, m) => m.type != "control" && m.editor !== !1 && m.type != "hidden")).map(([u, m]) => [u, m.value])
|
|
2617
2601
|
));
|
|
2618
2602
|
}), !((l = e.value.table) != null && l.user)) {
|
|
2619
|
-
|
|
2603
|
+
Te.error("必须给使用此表格的用户一个名字!");
|
|
2620
2604
|
return;
|
|
2621
2605
|
}
|
|
2622
2606
|
if (!I.name) {
|
|
2623
|
-
|
|
2607
|
+
Te.error("必须给表格一个唯一的name属性");
|
|
2624
2608
|
return;
|
|
2625
2609
|
}
|
|
2626
2610
|
try {
|
|
2627
|
-
let
|
|
2628
|
-
if (
|
|
2629
|
-
if (I.name !==
|
|
2630
|
-
|
|
2611
|
+
let u = await Vl(I.name);
|
|
2612
|
+
if (u) {
|
|
2613
|
+
if (I.name !== u.name) {
|
|
2614
|
+
Te.error("此表格已经存在,请换一个名字!");
|
|
2631
2615
|
return;
|
|
2632
2616
|
}
|
|
2633
2617
|
} else
|
|
2634
2618
|
await Ml({ name: I.name });
|
|
2635
|
-
} catch (
|
|
2636
|
-
console.error("检查表格名称时出现错误:",
|
|
2619
|
+
} catch (u) {
|
|
2620
|
+
console.error("检查表格名称时出现错误:", u), Te.error("检查表格名称时出现错误,请稍后重试。");
|
|
2637
2621
|
}
|
|
2638
2622
|
try {
|
|
2639
|
-
const
|
|
2640
|
-
|
|
2641
|
-
e.value[
|
|
2623
|
+
const u = await Cl(e.value.table.user, I.name);
|
|
2624
|
+
u && u.forEach((m) => {
|
|
2625
|
+
e.value[m.key] && (e.value[m.key].width = m.width, e.value[m.key].showCol = m.showCol, e.value[m.key].sort = m.sort);
|
|
2642
2626
|
});
|
|
2643
|
-
} catch (
|
|
2644
|
-
console.error("Error fetching table column settings:",
|
|
2627
|
+
} catch (u) {
|
|
2628
|
+
console.error("Error fetching table column settings:", u);
|
|
2645
2629
|
}
|
|
2646
2630
|
e.value.table.autoWatch || e.value.table.load();
|
|
2647
2631
|
}), c({
|
|
2648
2632
|
addRow: _,
|
|
2649
|
-
editRow:
|
|
2633
|
+
editRow: v,
|
|
2650
2634
|
deleteRow: a,
|
|
2651
|
-
readForm:
|
|
2635
|
+
readForm: p,
|
|
2652
2636
|
saveRowData: g,
|
|
2653
|
-
closeDialog:
|
|
2654
|
-
}), (l,
|
|
2655
|
-
var
|
|
2656
|
-
const
|
|
2637
|
+
closeDialog: Ie
|
|
2638
|
+
}), (l, u) => {
|
|
2639
|
+
var Ke, $t, wt, Et, kt;
|
|
2640
|
+
const m = Y("el-button-group"), F = Y("el-dropdown-item"), P = Y("el-dropdown-menu"), n = Y("el-dropdown"), V = Y("el-table-column"), K = Y("el-table"), ve = Y("el-pagination"), qe = Y("el-icon"), xe = Y("el-dialog"), ze = Y("el-drawer");
|
|
2657
2641
|
return i(), x(W, null, [
|
|
2658
|
-
|
|
2659
|
-
((
|
|
2642
|
+
G("div", Ol, [
|
|
2643
|
+
(($t = (Ke = e.value) == null ? void 0 : Ke.query) == null ? void 0 : $t.hidden) != !0 ? (i(), x("div", Al, [
|
|
2660
2644
|
h(l.$slots, "query", {}, () => [
|
|
2661
|
-
|
|
2645
|
+
J(hl, {
|
|
2662
2646
|
modelValue: e.value,
|
|
2663
|
-
"onUpdate:modelValue":
|
|
2664
|
-
info:
|
|
2665
|
-
"onUpdate:info":
|
|
2647
|
+
"onUpdate:modelValue": u[0] || (u[0] = (N) => e.value = N),
|
|
2648
|
+
info: E.value,
|
|
2649
|
+
"onUpdate:info": u[1] || (u[1] = (N) => E.value = N),
|
|
2666
2650
|
onQuery: o,
|
|
2667
2651
|
onReset: b
|
|
2668
2652
|
}, fe({
|
|
2669
2653
|
"q-btns": y(() => [
|
|
2670
2654
|
h(l.$slots, "q-btns", {}, () => [
|
|
2671
|
-
(i(!0), x(W, null,
|
|
2672
|
-
|
|
2655
|
+
(i(!0), x(W, null, U(ue(["add", "download", "setting"]), (N, oe) => (i(), x(W, null, [
|
|
2656
|
+
oe == "default" ? (i(!0), x(W, { key: 0 }, U(N, (w) => (i(), x(W, null, [
|
|
2673
2657
|
h(l.$slots, w.name + "-left", {}, void 0, !0),
|
|
2674
2658
|
(w.name === "control-add" ? w.attr.auth() && w.attr.inline === !1 : w.attr.auth()) ? h(l.$slots, w.name, { key: 0 }, () => [
|
|
2675
|
-
w.label ? (i(),
|
|
2659
|
+
w.label ? (i(), M(j(ke), q({
|
|
2676
2660
|
key: 0,
|
|
2677
2661
|
title: w.label,
|
|
2678
2662
|
ref_for: !0
|
|
2679
2663
|
}, w.attr, {
|
|
2680
|
-
onClick: (
|
|
2664
|
+
onClick: (H) => w.func(e.value, ee.value)
|
|
2681
2665
|
}), {
|
|
2682
2666
|
default: y(() => [
|
|
2683
|
-
_e(
|
|
2667
|
+
_e(he(w.label), 1)
|
|
2684
2668
|
]),
|
|
2685
2669
|
_: 2
|
|
2686
|
-
}, 1040, ["title", "onClick"])) : (i(),
|
|
2670
|
+
}, 1040, ["title", "onClick"])) : (i(), M(j(ke), q({
|
|
2687
2671
|
key: 1,
|
|
2688
2672
|
title: w.label,
|
|
2689
2673
|
ref_for: !0
|
|
2690
2674
|
}, w.attr, {
|
|
2691
|
-
onClick: (
|
|
2675
|
+
onClick: (H) => w.func(e.value, ee.value)
|
|
2692
2676
|
}), null, 16, ["title", "onClick"]))
|
|
2693
2677
|
], !0) : ce("", !0),
|
|
2694
2678
|
h(l.$slots, w.name + "-right", {}, void 0, !0)
|
|
2695
|
-
], 64))), 256)) : (i(),
|
|
2679
|
+
], 64))), 256)) : (i(), M(m, { key: 1 }, {
|
|
2696
2680
|
default: y(() => [
|
|
2697
|
-
(i(!0), x(W, null,
|
|
2681
|
+
(i(!0), x(W, null, U(N, (w) => (i(), x(W, null, [
|
|
2698
2682
|
h(l.$slots, w.name + "-left", {}, void 0, !0),
|
|
2699
2683
|
(w.name === "control-add" ? w.attr.auth() && w.attr.inline === !1 : w.attr.auth()) ? h(l.$slots, w.name, { key: 0 }, () => [
|
|
2700
|
-
w.label ? (i(),
|
|
2684
|
+
w.label ? (i(), M(j(ke), q({
|
|
2701
2685
|
key: 0,
|
|
2702
2686
|
title: w.label,
|
|
2703
2687
|
ref_for: !0
|
|
2704
2688
|
}, w.attr, {
|
|
2705
|
-
onClick: (
|
|
2689
|
+
onClick: (H) => w.func(e.value, ee.value)
|
|
2706
2690
|
}), {
|
|
2707
2691
|
default: y(() => [
|
|
2708
|
-
_e(
|
|
2692
|
+
_e(he(w.label), 1)
|
|
2709
2693
|
]),
|
|
2710
2694
|
_: 2
|
|
2711
|
-
}, 1040, ["title", "onClick"])) : (i(),
|
|
2695
|
+
}, 1040, ["title", "onClick"])) : (i(), M(j(ke), q({
|
|
2712
2696
|
key: 1,
|
|
2713
2697
|
title: w.label,
|
|
2714
2698
|
ref_for: !0
|
|
2715
2699
|
}, w.attr, {
|
|
2716
|
-
onClick: (
|
|
2700
|
+
onClick: (H) => w.func(e.value, ee.value)
|
|
2717
2701
|
}), null, 16, ["title", "onClick"]))
|
|
2718
2702
|
], !0) : ce("", !0),
|
|
2719
2703
|
h(l.$slots, w.name + "-right", {}, void 0, !0)
|
|
@@ -2726,21 +2710,21 @@ const Fl = {
|
|
|
2726
2710
|
]),
|
|
2727
2711
|
_: 2
|
|
2728
2712
|
}, [
|
|
2729
|
-
|
|
2730
|
-
name:
|
|
2731
|
-
fn: y((
|
|
2732
|
-
h(l.$slots,
|
|
2713
|
+
U(l.$slots, (N, oe, w) => ({
|
|
2714
|
+
name: oe,
|
|
2715
|
+
fn: y((H) => [
|
|
2716
|
+
h(l.$slots, oe, { model: e.value }, void 0, !0)
|
|
2733
2717
|
])
|
|
2734
2718
|
}))
|
|
2735
2719
|
]), 1032, ["modelValue", "info"])
|
|
2736
2720
|
], !0)
|
|
2737
2721
|
])) : ce("", !0),
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
"summary-method": (N) => e.value.table["summary-method"](N, { fields:
|
|
2741
|
-
onSortChange:
|
|
2742
|
-
var
|
|
2743
|
-
e.value.table.onSortChange(N,
|
|
2722
|
+
G("div", Bl, [
|
|
2723
|
+
J(K, q({ ...l.$attrs, ...j(Ce)(e.value.table, (N) => !["dblclickType", "page"].includes(N)) }, {
|
|
2724
|
+
"summary-method": (N) => e.value.table["summary-method"](N, { fields: ae.value, sums: re.value }),
|
|
2725
|
+
onSortChange: u[2] || (u[2] = (N) => {
|
|
2726
|
+
var oe, w;
|
|
2727
|
+
e.value.table.onSortChange(N, E.value), ((oe = N == null ? void 0 : N.column) == null ? void 0 : oe.sortable) === "custom" && ((w = e.value.table) == null || w.load());
|
|
2744
2728
|
})
|
|
2745
2729
|
}), {
|
|
2746
2730
|
append: y(() => [
|
|
@@ -2751,146 +2735,146 @@ const Fl = {
|
|
|
2751
2735
|
]),
|
|
2752
2736
|
default: y(() => [
|
|
2753
2737
|
h(l.$slots, "default", {}, () => [
|
|
2754
|
-
(i(!0), x(W, null,
|
|
2755
|
-
prop:
|
|
2756
|
-
key:
|
|
2738
|
+
(i(!0), x(W, null, U(Ee.value, (N, oe) => (i(), M(V, q({
|
|
2739
|
+
prop: oe,
|
|
2740
|
+
key: oe,
|
|
2757
2741
|
ref_for: !0
|
|
2758
|
-
}, { ...e.value.tableColumns, ...
|
|
2759
|
-
header: y(({ column: w, $index:
|
|
2760
|
-
|
|
2742
|
+
}, { ...e.value.tableColumns, ...j(Ce)(N, (w) => L.includes(w)) }, { "header-align": "center" }), fe({
|
|
2743
|
+
header: y(({ column: w, $index: H }) => [
|
|
2744
|
+
oe == "control" ? h(l.$slots, `${oe}-header`, {
|
|
2761
2745
|
key: 0,
|
|
2762
2746
|
column: w,
|
|
2763
|
-
$index:
|
|
2747
|
+
$index: H
|
|
2764
2748
|
}, () => [
|
|
2765
|
-
|
|
2766
|
-
], !0) : h(l.$slots, `${
|
|
2749
|
+
G("span", null, he(w.label), 1)
|
|
2750
|
+
], !0) : h(l.$slots, `${oe}-header`, {
|
|
2767
2751
|
key: 1,
|
|
2768
2752
|
column: w,
|
|
2769
|
-
$index:
|
|
2753
|
+
$index: H
|
|
2770
2754
|
}, void 0, !0)
|
|
2771
2755
|
]),
|
|
2772
2756
|
"filter-icon": y((w) => [
|
|
2773
|
-
h(l.$slots, `${
|
|
2757
|
+
h(l.$slots, `${oe}-filter-icon`, { data: w }, void 0, !0)
|
|
2774
2758
|
]),
|
|
2775
2759
|
_: 2
|
|
2776
2760
|
}, [
|
|
2777
2761
|
N.type === "expand" ? {
|
|
2778
2762
|
name: "default",
|
|
2779
|
-
fn: y(({ row: w, column:
|
|
2780
|
-
h(l.$slots, `${
|
|
2763
|
+
fn: y(({ row: w, column: H, $index: Z }) => [
|
|
2764
|
+
h(l.$slots, `${oe}`, {
|
|
2781
2765
|
row: w,
|
|
2782
|
-
column:
|
|
2783
|
-
$index:
|
|
2766
|
+
column: H,
|
|
2767
|
+
$index: Z
|
|
2784
2768
|
}, void 0, !0)
|
|
2785
2769
|
]),
|
|
2786
2770
|
key: "0"
|
|
2787
2771
|
} : N.type == "control" ? {
|
|
2788
2772
|
name: "default",
|
|
2789
|
-
fn: y(({ row: w, column:
|
|
2790
|
-
var
|
|
2773
|
+
fn: y(({ row: w, column: H, $index: Z }) => {
|
|
2774
|
+
var Pe, He;
|
|
2791
2775
|
return [
|
|
2792
|
-
|
|
2793
|
-
class:
|
|
2794
|
-
style:
|
|
2776
|
+
G("div", {
|
|
2777
|
+
class: Tt(["control", (Pe = e.value.control) == null ? void 0 : Pe.class]),
|
|
2778
|
+
style: Ae((He = e.value.control) == null ? void 0 : He.style)
|
|
2795
2779
|
}, [
|
|
2796
2780
|
h(l.$slots, "control", {}, () => [
|
|
2797
2781
|
h(l.$slots, "control-left", {
|
|
2798
2782
|
row: w,
|
|
2799
|
-
column:
|
|
2800
|
-
$index:
|
|
2783
|
+
column: H,
|
|
2784
|
+
$index: Z
|
|
2801
2785
|
}, void 0, !0),
|
|
2802
|
-
(i(!0), x(W, null,
|
|
2803
|
-
var
|
|
2786
|
+
(i(!0), x(W, null, U(ue(["view", "edit", "delete", "save"]), (Ue, Re) => {
|
|
2787
|
+
var et;
|
|
2804
2788
|
return i(), x(W, null, [
|
|
2805
|
-
|
|
2806
|
-
h(l.$slots,
|
|
2789
|
+
Re == "default" ? (i(!0), x(W, { key: 0 }, U(Ue, (B) => (i(), x(W, null, [
|
|
2790
|
+
h(l.$slots, B.name + "-left", {
|
|
2807
2791
|
row: w,
|
|
2808
|
-
column:
|
|
2809
|
-
$index:
|
|
2792
|
+
column: H,
|
|
2793
|
+
$index: Z
|
|
2810
2794
|
}, void 0, !0),
|
|
2811
|
-
|
|
2795
|
+
B.attr.auth(w, H, Z) ? h(l.$slots, B.name, {
|
|
2812
2796
|
key: 0,
|
|
2813
2797
|
row: w,
|
|
2814
|
-
column:
|
|
2815
|
-
$index:
|
|
2798
|
+
column: H,
|
|
2799
|
+
$index: Z
|
|
2816
2800
|
}, () => [
|
|
2817
|
-
|
|
2801
|
+
B.label ? (i(), M(j(ke), q({
|
|
2818
2802
|
key: 0,
|
|
2819
|
-
title:
|
|
2803
|
+
title: B.label,
|
|
2820
2804
|
ref_for: !0
|
|
2821
|
-
},
|
|
2822
|
-
onClick: (
|
|
2805
|
+
}, B.attr, {
|
|
2806
|
+
onClick: (Se) => B.func(w, H, Z, e.value)
|
|
2823
2807
|
}), {
|
|
2824
2808
|
default: y(() => [
|
|
2825
|
-
_e(
|
|
2809
|
+
_e(he(Me(B, Z)), 1)
|
|
2826
2810
|
]),
|
|
2827
2811
|
_: 2
|
|
2828
|
-
}, 1040, ["title", "onClick"])) : (i(),
|
|
2812
|
+
}, 1040, ["title", "onClick"])) : (i(), M(j(ke), q({
|
|
2829
2813
|
key: 1,
|
|
2830
|
-
title:
|
|
2814
|
+
title: B.label,
|
|
2831
2815
|
ref_for: !0
|
|
2832
|
-
},
|
|
2833
|
-
onClick: (
|
|
2816
|
+
}, B.attr, {
|
|
2817
|
+
onClick: (Se) => B.func(w, H, Z, e.value)
|
|
2834
2818
|
}), null, 16, ["title", "onClick"]))
|
|
2835
2819
|
], !0) : ce("", !0),
|
|
2836
|
-
h(l.$slots,
|
|
2820
|
+
h(l.$slots, B.name + "-right", {
|
|
2837
2821
|
row: w,
|
|
2838
|
-
column:
|
|
2839
|
-
$index:
|
|
2822
|
+
column: H,
|
|
2823
|
+
$index: Z
|
|
2840
2824
|
}, void 0, !0)
|
|
2841
|
-
], 64))), 256)) :
|
|
2825
|
+
], 64))), 256)) : Re != null && Re.startsWith("dropdown") && ((et = ie(w, H, Z, e.value)) != null && et.auth()) ? (i(), M(n, q({
|
|
2842
2826
|
key: 1,
|
|
2843
2827
|
ref_for: !0
|
|
2844
|
-
},
|
|
2828
|
+
}, ie(w, H, Z, e.value)), {
|
|
2845
2829
|
dropdown: y(() => [
|
|
2846
|
-
|
|
2830
|
+
J(P, null, {
|
|
2847
2831
|
default: y(() => [
|
|
2848
|
-
(i(!0), x(W, null,
|
|
2849
|
-
var
|
|
2832
|
+
(i(!0), x(W, null, U(Ue, (B) => {
|
|
2833
|
+
var Se, We, _t;
|
|
2850
2834
|
return i(), x(W, null, [
|
|
2851
|
-
l.$slots[
|
|
2835
|
+
l.$slots[B.name + "-left"] ? h(l.$slots, B.name + "-left", {
|
|
2852
2836
|
key: 0,
|
|
2853
2837
|
row: w,
|
|
2854
|
-
column:
|
|
2855
|
-
$index:
|
|
2838
|
+
column: H,
|
|
2839
|
+
$index: Z
|
|
2856
2840
|
}, void 0, !0) : ce("", !0),
|
|
2857
|
-
|
|
2841
|
+
B.attr.auth(w, H, Z) ? (i(), M(F, q({
|
|
2858
2842
|
key: 1,
|
|
2859
2843
|
ref_for: !0
|
|
2860
|
-
}, { command: (
|
|
2844
|
+
}, { command: (Se = B == null ? void 0 : B.attr) == null ? void 0 : Se.command, divided: (We = B == null ? void 0 : B.attr) == null ? void 0 : We.divided, disabled: (_t = B == null ? void 0 : B.attr) == null ? void 0 : _t.disabled }), {
|
|
2861
2845
|
default: y(() => [
|
|
2862
|
-
h(l.$slots,
|
|
2846
|
+
h(l.$slots, B.name, {
|
|
2863
2847
|
row: w,
|
|
2864
|
-
column:
|
|
2865
|
-
$index:
|
|
2848
|
+
column: H,
|
|
2849
|
+
$index: Z
|
|
2866
2850
|
}, () => [
|
|
2867
|
-
|
|
2851
|
+
B.label ? (i(), M(j(ke), q({
|
|
2868
2852
|
key: 0,
|
|
2869
|
-
title:
|
|
2853
|
+
title: B.label,
|
|
2870
2854
|
ref_for: !0
|
|
2871
|
-
},
|
|
2872
|
-
onClick: (Bt) =>
|
|
2855
|
+
}, B.attr, {
|
|
2856
|
+
onClick: (Bt) => B.func(w, H, Z, e.value)
|
|
2873
2857
|
}), {
|
|
2874
2858
|
default: y(() => [
|
|
2875
|
-
_e(
|
|
2859
|
+
_e(he(Me(B, Z)), 1)
|
|
2876
2860
|
]),
|
|
2877
2861
|
_: 2
|
|
2878
|
-
}, 1040, ["title", "onClick"])) : (i(),
|
|
2862
|
+
}, 1040, ["title", "onClick"])) : (i(), M(j(ke), q({
|
|
2879
2863
|
key: 1,
|
|
2880
|
-
title:
|
|
2864
|
+
title: B.label,
|
|
2881
2865
|
ref_for: !0
|
|
2882
|
-
},
|
|
2883
|
-
onClick: (Bt) =>
|
|
2866
|
+
}, B.attr, {
|
|
2867
|
+
onClick: (Bt) => B.func(w, H, Z, e.value)
|
|
2884
2868
|
}), null, 16, ["title", "onClick"]))
|
|
2885
2869
|
], !0)
|
|
2886
2870
|
]),
|
|
2887
2871
|
_: 2
|
|
2888
2872
|
}, 1040)) : ce("", !0),
|
|
2889
|
-
l.$slots[
|
|
2873
|
+
l.$slots[B.name + "-right"] ? h(l.$slots, B.name + "-right", {
|
|
2890
2874
|
key: 2,
|
|
2891
2875
|
row: w,
|
|
2892
|
-
column:
|
|
2893
|
-
$index:
|
|
2876
|
+
column: H,
|
|
2877
|
+
$index: Z
|
|
2894
2878
|
}, void 0, !0) : ce("", !0)
|
|
2895
2879
|
], 64);
|
|
2896
2880
|
}), 256))
|
|
@@ -2899,49 +2883,49 @@ const Fl = {
|
|
|
2899
2883
|
}, 1024)
|
|
2900
2884
|
]),
|
|
2901
2885
|
default: y(() => {
|
|
2902
|
-
var
|
|
2886
|
+
var B;
|
|
2903
2887
|
return [
|
|
2904
|
-
_e(
|
|
2888
|
+
_e(he((B = ie(w, H, Z, e.value)) == null ? void 0 : B.label) + " ", 1)
|
|
2905
2889
|
];
|
|
2906
2890
|
}),
|
|
2907
2891
|
_: 2
|
|
2908
|
-
}, 1040)) : (i(),
|
|
2892
|
+
}, 1040)) : (i(), M(m, { key: 2 }, {
|
|
2909
2893
|
default: y(() => [
|
|
2910
|
-
(i(!0), x(W, null,
|
|
2911
|
-
h(l.$slots,
|
|
2894
|
+
(i(!0), x(W, null, U(Ue, (B) => (i(), x(W, null, [
|
|
2895
|
+
h(l.$slots, B.name + "-left", {
|
|
2912
2896
|
row: w,
|
|
2913
|
-
column:
|
|
2914
|
-
$index:
|
|
2897
|
+
column: H,
|
|
2898
|
+
$index: Z
|
|
2915
2899
|
}, void 0, !0),
|
|
2916
|
-
|
|
2900
|
+
B.attr.auth(w, H, Z) ? h(l.$slots, B.name, {
|
|
2917
2901
|
key: 0,
|
|
2918
2902
|
row: w,
|
|
2919
|
-
column:
|
|
2920
|
-
$index:
|
|
2903
|
+
column: H,
|
|
2904
|
+
$index: Z
|
|
2921
2905
|
}, () => [
|
|
2922
|
-
|
|
2906
|
+
B.label ? (i(), M(j(ke), q({
|
|
2923
2907
|
key: 0,
|
|
2924
|
-
title:
|
|
2908
|
+
title: B.label,
|
|
2925
2909
|
ref_for: !0
|
|
2926
|
-
},
|
|
2927
|
-
onClick: (
|
|
2910
|
+
}, B.attr, {
|
|
2911
|
+
onClick: (Se) => B.func(w, H, Z, e.value)
|
|
2928
2912
|
}), {
|
|
2929
2913
|
default: y(() => [
|
|
2930
|
-
_e(
|
|
2914
|
+
_e(he(Me(B, Z)), 1)
|
|
2931
2915
|
]),
|
|
2932
2916
|
_: 2
|
|
2933
|
-
}, 1040, ["title", "onClick"])) : (i(),
|
|
2917
|
+
}, 1040, ["title", "onClick"])) : (i(), M(j(ke), q({
|
|
2934
2918
|
key: 1,
|
|
2935
|
-
title:
|
|
2919
|
+
title: B.label,
|
|
2936
2920
|
ref_for: !0
|
|
2937
|
-
},
|
|
2938
|
-
onClick: (
|
|
2921
|
+
}, B.attr, {
|
|
2922
|
+
onClick: (Se) => B.func(w, H, Z, e.value)
|
|
2939
2923
|
}), null, 16, ["title", "onClick"]))
|
|
2940
2924
|
], !0) : ce("", !0),
|
|
2941
|
-
h(l.$slots,
|
|
2925
|
+
h(l.$slots, B.name + "-right", {
|
|
2942
2926
|
row: w,
|
|
2943
|
-
column:
|
|
2944
|
-
$index:
|
|
2927
|
+
column: H,
|
|
2928
|
+
$index: Z
|
|
2945
2929
|
}, void 0, !0)
|
|
2946
2930
|
], 64))), 256))
|
|
2947
2931
|
]),
|
|
@@ -2951,8 +2935,8 @@ const Fl = {
|
|
|
2951
2935
|
}), 256)),
|
|
2952
2936
|
h(l.$slots, "control-right", {
|
|
2953
2937
|
row: w,
|
|
2954
|
-
column:
|
|
2955
|
-
$index:
|
|
2938
|
+
column: H,
|
|
2939
|
+
$index: Z
|
|
2956
2940
|
}, void 0, !0)
|
|
2957
2941
|
], !0)
|
|
2958
2942
|
], 6)
|
|
@@ -2961,32 +2945,32 @@ const Fl = {
|
|
|
2961
2945
|
key: "1"
|
|
2962
2946
|
} : N.type != "selection" && N.type != "index" ? {
|
|
2963
2947
|
name: "default",
|
|
2964
|
-
fn: y(({ row: w, column:
|
|
2965
|
-
$e(N, w,
|
|
2948
|
+
fn: y(({ row: w, column: H, $index: Z }) => [
|
|
2949
|
+
$e(N, w, H, Z) && Z != -1 ? h(l.$slots, `${oe}`, {
|
|
2966
2950
|
key: 0,
|
|
2967
2951
|
row: w,
|
|
2968
|
-
column:
|
|
2969
|
-
$index:
|
|
2952
|
+
column: H,
|
|
2953
|
+
$index: Z
|
|
2970
2954
|
}, () => {
|
|
2971
|
-
var
|
|
2955
|
+
var Pe;
|
|
2972
2956
|
return [
|
|
2973
|
-
(i(),
|
|
2974
|
-
modelValue: w[
|
|
2975
|
-
"onUpdate:modelValue": (
|
|
2976
|
-
item: N == null ? void 0 : N.table(w,
|
|
2977
|
-
ctrlKey:
|
|
2978
|
-
key: `${
|
|
2979
|
-
ctrlType: (
|
|
2957
|
+
(i(), M(dt, {
|
|
2958
|
+
modelValue: w[oe],
|
|
2959
|
+
"onUpdate:modelValue": (He) => w[oe] = He,
|
|
2960
|
+
item: N == null ? void 0 : N.table(w, H, Z),
|
|
2961
|
+
ctrlKey: oe,
|
|
2962
|
+
key: `${oe}-${Z} -${me.value}`,
|
|
2963
|
+
ctrlType: (Pe = N.table(w, H, Z)) != null && Pe.type ? N.table(w, H, Z).type : N.type,
|
|
2980
2964
|
model: e.value,
|
|
2981
2965
|
class: "g-ctrl-container",
|
|
2982
2966
|
t: "t",
|
|
2983
2967
|
formInfo: w
|
|
2984
2968
|
}, fe({ _: 2 }, [
|
|
2985
|
-
|
|
2986
|
-
name:
|
|
2987
|
-
fn: y((
|
|
2988
|
-
h(l.$slots,
|
|
2989
|
-
data:
|
|
2969
|
+
U(l.$slots, (He, Ue) => ({
|
|
2970
|
+
name: Ue,
|
|
2971
|
+
fn: y((Re) => [
|
|
2972
|
+
h(l.$slots, Ue, {
|
|
2973
|
+
data: Re,
|
|
2990
2974
|
item: N,
|
|
2991
2975
|
model: e.value
|
|
2992
2976
|
}, void 0, !0)
|
|
@@ -2994,14 +2978,14 @@ const Fl = {
|
|
|
2994
2978
|
}))
|
|
2995
2979
|
]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model", "formInfo"]))
|
|
2996
2980
|
];
|
|
2997
|
-
}, !0) : h(l.$slots, `${
|
|
2981
|
+
}, !0) : h(l.$slots, `${oe}`, {
|
|
2998
2982
|
key: 1,
|
|
2999
2983
|
row: w,
|
|
3000
|
-
column:
|
|
3001
|
-
$index:
|
|
2984
|
+
column: H,
|
|
2985
|
+
$index: Z
|
|
3002
2986
|
}, () => [
|
|
3003
|
-
|
|
3004
|
-
innerHTML:
|
|
2987
|
+
G("div", {
|
|
2988
|
+
innerHTML: se(N, H.formatter(w, H, w[oe], Z))
|
|
3005
2989
|
}, null, 8, Il)
|
|
3006
2990
|
], !0)
|
|
3007
2991
|
]),
|
|
@@ -3012,12 +2996,12 @@ const Fl = {
|
|
|
3012
2996
|
]),
|
|
3013
2997
|
_: 3
|
|
3014
2998
|
}, 16, ["summary-method"]),
|
|
3015
|
-
(
|
|
3016
|
-
|
|
2999
|
+
(kt = (Et = (wt = e.value) == null ? void 0 : wt.table) == null ? void 0 : Et.page) != null && kt.hidden ? ce("", !0) : h(l.$slots, "page", { key: 0 }, () => [
|
|
3000
|
+
J(ve, q({
|
|
3017
3001
|
"page-size": e.value.table.page.pageSize,
|
|
3018
|
-
"onUpdate:pageSize":
|
|
3002
|
+
"onUpdate:pageSize": u[3] || (u[3] = (N) => e.value.table.page.pageSize = N),
|
|
3019
3003
|
"current-page": e.value.table.page.currentPage,
|
|
3020
|
-
"onUpdate:currentPage":
|
|
3004
|
+
"onUpdate:currentPage": u[4] || (u[4] = (N) => e.value.table.page.currentPage = N)
|
|
3021
3005
|
}, e.value.table.page), {
|
|
3022
3006
|
default: y(() => [
|
|
3023
3007
|
h(l.$slots, "table-page", {}, void 0, !0)
|
|
@@ -3027,70 +3011,78 @@ const Fl = {
|
|
|
3027
3011
|
], !0)
|
|
3028
3012
|
])
|
|
3029
3013
|
]),
|
|
3030
|
-
e.value.dialog.mode == "dialog" &&
|
|
3031
|
-
|
|
3014
|
+
e.value.dialog.mode == "dialog" && $.value ? (i(), x("div", Yl, [
|
|
3015
|
+
J(xe, q({
|
|
3032
3016
|
ref_key: "dialogRef",
|
|
3033
3017
|
ref: T,
|
|
3034
3018
|
id: "dialogRef",
|
|
3035
|
-
modelValue:
|
|
3036
|
-
"onUpdate:modelValue":
|
|
3019
|
+
modelValue: $.value,
|
|
3020
|
+
"onUpdate:modelValue": u[8] || (u[8] = (N) => $.value = N),
|
|
3037
3021
|
fullscreen: e.value.dialog.fullScreen
|
|
3038
|
-
},
|
|
3039
|
-
width:
|
|
3022
|
+
}, j(Ce)(e.value.dialog, (N) => !["size", "max", "min"].includes(N)), {
|
|
3023
|
+
width: j(At)(e.value.dialog.width) + 35
|
|
3040
3024
|
}), {
|
|
3041
3025
|
header: y(() => {
|
|
3042
|
-
var N,
|
|
3026
|
+
var N, oe, w, H, Z, Pe, He, Ue, Re, et;
|
|
3043
3027
|
return [
|
|
3044
|
-
|
|
3045
|
-
|
|
3028
|
+
G("div", Ul, [
|
|
3029
|
+
G("div", Rl, [
|
|
3046
3030
|
h(l.$slots, "f-header", {}, () => [
|
|
3047
|
-
|
|
3031
|
+
G("div", null, he(e.value.dialog.title), 1)
|
|
3048
3032
|
], !0)
|
|
3049
3033
|
]),
|
|
3050
|
-
((
|
|
3034
|
+
((oe = (N = e.value) == null ? void 0 : N.dialog) == null ? void 0 : oe.fullScreen) === !1 ? (i(), x("div", {
|
|
3051
3035
|
key: 0,
|
|
3052
|
-
|
|
3036
|
+
style: Ae((Z = (H = (w = e.value) == null ? void 0 : w.dialog) == null ? void 0 : H.max) == null ? void 0 : Z.style),
|
|
3037
|
+
onClick: u[5] || (u[5] = (B) => {
|
|
3053
3038
|
e.value.dialog.fullScreen = !0;
|
|
3054
3039
|
}),
|
|
3055
3040
|
class: "max"
|
|
3056
3041
|
}, [
|
|
3057
|
-
|
|
3058
|
-
default: y(() =>
|
|
3059
|
-
|
|
3060
|
-
|
|
3042
|
+
J(qe, null, {
|
|
3043
|
+
default: y(() => {
|
|
3044
|
+
var B, Se, We;
|
|
3045
|
+
return [
|
|
3046
|
+
(i(), M(Be((We = (Se = (B = e.value) == null ? void 0 : B.dialog) == null ? void 0 : Se.max) == null ? void 0 : We.icon)))
|
|
3047
|
+
];
|
|
3048
|
+
}),
|
|
3061
3049
|
_: 1
|
|
3062
3050
|
})
|
|
3063
|
-
])) : ce("", !0),
|
|
3064
|
-
((
|
|
3051
|
+
], 4)) : ce("", !0),
|
|
3052
|
+
((He = (Pe = e.value) == null ? void 0 : Pe.dialog) == null ? void 0 : He.fullScreen) === !0 ? (i(), x("div", {
|
|
3065
3053
|
key: 1,
|
|
3066
|
-
|
|
3054
|
+
style: Ae((et = (Re = (Ue = e.value) == null ? void 0 : Ue.dialog) == null ? void 0 : Re.min) == null ? void 0 : et.style),
|
|
3055
|
+
onClick: u[6] || (u[6] = (B) => {
|
|
3067
3056
|
e.value.dialog.fullScreen = !1;
|
|
3068
3057
|
}),
|
|
3069
3058
|
class: "max"
|
|
3070
3059
|
}, [
|
|
3071
|
-
|
|
3072
|
-
default: y(() =>
|
|
3073
|
-
|
|
3074
|
-
|
|
3060
|
+
J(qe, null, {
|
|
3061
|
+
default: y(() => {
|
|
3062
|
+
var B, Se, We;
|
|
3063
|
+
return [
|
|
3064
|
+
(i(), M(Be((We = (Se = (B = e.value) == null ? void 0 : B.dialog) == null ? void 0 : Se.min) == null ? void 0 : We.icon)))
|
|
3065
|
+
];
|
|
3066
|
+
}),
|
|
3075
3067
|
_: 1
|
|
3076
3068
|
})
|
|
3077
|
-
])) : ce("", !0)
|
|
3069
|
+
], 4)) : ce("", !0)
|
|
3078
3070
|
])
|
|
3079
3071
|
];
|
|
3080
3072
|
}),
|
|
3081
3073
|
default: y(() => [
|
|
3082
|
-
|
|
3074
|
+
G("div", jl, [
|
|
3083
3075
|
h(l.$slots, "table-dialog-form", { model: e.value }, () => [
|
|
3084
|
-
|
|
3076
|
+
J(vt, {
|
|
3085
3077
|
modelValue: e.value,
|
|
3086
|
-
"onUpdate:modelValue":
|
|
3078
|
+
"onUpdate:modelValue": u[7] || (u[7] = (N) => e.value = N),
|
|
3087
3079
|
onSubmit: s,
|
|
3088
|
-
onReset:
|
|
3080
|
+
onReset: D
|
|
3089
3081
|
}, fe({ _: 2 }, [
|
|
3090
|
-
|
|
3091
|
-
name:
|
|
3092
|
-
fn: y((
|
|
3093
|
-
h(l.$slots,
|
|
3082
|
+
U(l.$slots, (N, oe, w) => ({
|
|
3083
|
+
name: oe,
|
|
3084
|
+
fn: y((H) => [
|
|
3085
|
+
h(l.$slots, oe, { model: H }, void 0, !0)
|
|
3094
3086
|
])
|
|
3095
3087
|
}))
|
|
3096
3088
|
]), 1032, ["modelValue"])
|
|
@@ -3100,34 +3092,34 @@ const Fl = {
|
|
|
3100
3092
|
_: 3
|
|
3101
3093
|
}, 16, ["modelValue", "fullscreen", "width"])
|
|
3102
3094
|
])) : ce("", !0),
|
|
3103
|
-
e.value.dialog.mode == "drawer" &&
|
|
3104
|
-
|
|
3095
|
+
e.value.dialog.mode == "drawer" && $.value ? (i(), x("div", Ll, [
|
|
3096
|
+
J(ze, q({
|
|
3105
3097
|
ref_key: "drawerRef",
|
|
3106
3098
|
ref: S,
|
|
3107
|
-
modelValue:
|
|
3108
|
-
"onUpdate:modelValue":
|
|
3109
|
-
},
|
|
3099
|
+
modelValue: $.value,
|
|
3100
|
+
"onUpdate:modelValue": u[10] || (u[10] = (N) => $.value = N)
|
|
3101
|
+
}, j(Ce)(e.value.dialog, (N) => !["width"].includes(N))), {
|
|
3110
3102
|
header: y(() => [
|
|
3111
|
-
|
|
3112
|
-
|
|
3103
|
+
G("div", Nl, [
|
|
3104
|
+
G("div", zl, [
|
|
3113
3105
|
h(l.$slots, "f-header", {}, () => [
|
|
3114
|
-
|
|
3106
|
+
G("div", null, he(e.value.dialog.title), 1)
|
|
3115
3107
|
], !0)
|
|
3116
3108
|
])
|
|
3117
3109
|
])
|
|
3118
3110
|
]),
|
|
3119
3111
|
default: y(() => [
|
|
3120
3112
|
h(l.$slots, "table-drawer-form", { model: e.value }, () => [
|
|
3121
|
-
|
|
3113
|
+
J(vt, {
|
|
3122
3114
|
modelValue: e.value,
|
|
3123
|
-
"onUpdate:modelValue":
|
|
3115
|
+
"onUpdate:modelValue": u[9] || (u[9] = (N) => e.value = N),
|
|
3124
3116
|
onSubmit: s,
|
|
3125
|
-
onReset:
|
|
3117
|
+
onReset: D
|
|
3126
3118
|
}, fe({ _: 2 }, [
|
|
3127
|
-
|
|
3128
|
-
name:
|
|
3129
|
-
fn: y((
|
|
3130
|
-
h(l.$slots,
|
|
3119
|
+
U(l.$slots, (N, oe, w) => ({
|
|
3120
|
+
name: oe,
|
|
3121
|
+
fn: y((H) => [
|
|
3122
|
+
h(l.$slots, oe, { model: H }, void 0, !0)
|
|
3131
3123
|
])
|
|
3132
3124
|
}))
|
|
3133
3125
|
]), 1032, ["modelValue"])
|
|
@@ -3139,7 +3131,7 @@ const Fl = {
|
|
|
3139
3131
|
], 64);
|
|
3140
3132
|
};
|
|
3141
3133
|
}
|
|
3142
|
-
}),
|
|
3134
|
+
}), Hl = /* @__PURE__ */ Ge(Pl, [["__scopeId", "data-v-1bad9962"]]), Wl = { class: "g-tree-table" }, Xl = { class: "g-tree-container" }, Gl = { class: "g-tree-table-container" }, Ql = /* @__PURE__ */ Object.assign({
|
|
3143
3135
|
name: "g-tree-table",
|
|
3144
3136
|
inheritAttrs: !1
|
|
3145
3137
|
}, {
|
|
@@ -3148,75 +3140,75 @@ const Fl = {
|
|
|
3148
3140
|
modelValue: { required: !0 },
|
|
3149
3141
|
modelModifiers: {}
|
|
3150
3142
|
},
|
|
3151
|
-
emits: /* @__PURE__ */
|
|
3152
|
-
setup(
|
|
3153
|
-
var I,
|
|
3154
|
-
const
|
|
3155
|
-
typeof ((I = e == null ? void 0 : e.tree) == null ? void 0 : I.width) == "number" ? `${e.tree.width}px` : ((
|
|
3156
|
-
),
|
|
3157
|
-
var ge,
|
|
3158
|
-
if (!
|
|
3159
|
-
const
|
|
3160
|
-
return me[
|
|
3161
|
-
}, L = (
|
|
3162
|
-
|
|
3163
|
-
},
|
|
3164
|
-
T.value =
|
|
3143
|
+
emits: /* @__PURE__ */ Le(["load"], ["update:modelValue"]),
|
|
3144
|
+
setup(f, { emit: c }) {
|
|
3145
|
+
var I, z, re, ae;
|
|
3146
|
+
const r = c, t = Ne(f, "modelValue"), e = bt(), d = le(
|
|
3147
|
+
typeof ((I = e == null ? void 0 : e.tree) == null ? void 0 : I.width) == "number" ? `${e.tree.width}px` : ((z = e == null ? void 0 : e.tree) == null ? void 0 : z.width) || "180px"
|
|
3148
|
+
), E = le(((re = e == null ? void 0 : e.tree) == null ? void 0 : re.search) === void 0 ? !0 : (ae = e == null ? void 0 : e.tree) == null ? void 0 : ae.search), T = le({}), S = le(""), k = le(null), $ = (Q, me) => {
|
|
3149
|
+
var ge, ie;
|
|
3150
|
+
if (!Q) return !0;
|
|
3151
|
+
const ye = ((ie = (ge = e.tree) == null ? void 0 : ge.props) == null ? void 0 : ie.label) || "label";
|
|
3152
|
+
return me[ye].includes(Q);
|
|
3153
|
+
}, L = (Q, me) => {
|
|
3154
|
+
r("load", T.value, Q, me);
|
|
3155
|
+
}, ee = (Q) => {
|
|
3156
|
+
T.value = Q, t.value.table.load();
|
|
3165
3157
|
};
|
|
3166
|
-
return
|
|
3167
|
-
|
|
3168
|
-
}), (
|
|
3169
|
-
const
|
|
3158
|
+
return Ht(S, (Q) => {
|
|
3159
|
+
k.value.filter(Q);
|
|
3160
|
+
}), (Q, me) => {
|
|
3161
|
+
const ye = Y("el-input"), ge = Y("el-tree"), ie = Y("g-table");
|
|
3170
3162
|
return i(), x("div", Wl, [
|
|
3171
|
-
|
|
3163
|
+
G("div", {
|
|
3172
3164
|
class: "g-tree-left",
|
|
3173
|
-
style:
|
|
3165
|
+
style: Ae({ width: d.value })
|
|
3174
3166
|
}, [
|
|
3175
|
-
|
|
3167
|
+
E.value ? (i(), M(ye, {
|
|
3176
3168
|
key: 0,
|
|
3177
3169
|
modelValue: S.value,
|
|
3178
|
-
"onUpdate:modelValue": me[0] || (me[0] = (
|
|
3170
|
+
"onUpdate:modelValue": me[0] || (me[0] = (de) => S.value = de),
|
|
3179
3171
|
style: { width: "100%", padding: "0 10px", "box-sizing": "border-box" },
|
|
3180
3172
|
placeholder: "输入节点查询",
|
|
3181
3173
|
clearable: ""
|
|
3182
3174
|
}, null, 8, ["modelValue"])) : ce("", !0),
|
|
3183
|
-
|
|
3184
|
-
|
|
3175
|
+
G("div", Xl, [
|
|
3176
|
+
J(ge, q({
|
|
3185
3177
|
style: { width: d.value },
|
|
3186
|
-
"filter-node-method":
|
|
3178
|
+
"filter-node-method": $,
|
|
3187
3179
|
"expand-on-click-node": !1,
|
|
3188
3180
|
ref_key: "treeRef",
|
|
3189
|
-
ref:
|
|
3190
|
-
onNodeClick:
|
|
3191
|
-
},
|
|
3192
|
-
default: y(({ node:
|
|
3193
|
-
h(
|
|
3194
|
-
node:
|
|
3195
|
-
data:
|
|
3181
|
+
ref: k,
|
|
3182
|
+
onNodeClick: ee
|
|
3183
|
+
}, Q.$attrs.tree), fe({
|
|
3184
|
+
default: y(({ node: de, data: ne }) => [
|
|
3185
|
+
h(Q.$slots, "tree", {
|
|
3186
|
+
node: de,
|
|
3187
|
+
data: ne
|
|
3196
3188
|
}, () => [
|
|
3197
|
-
|
|
3189
|
+
G("span", null, he(de.label), 1)
|
|
3198
3190
|
], !0)
|
|
3199
3191
|
]),
|
|
3200
3192
|
_: 2
|
|
3201
3193
|
}, [
|
|
3202
|
-
|
|
3203
|
-
name:
|
|
3194
|
+
U(Q.$slots, (de, ne, te) => ({
|
|
3195
|
+
name: ne,
|
|
3204
3196
|
fn: y((be) => [
|
|
3205
|
-
h(
|
|
3197
|
+
h(Q.$slots, ne, { data: be }, void 0, !0)
|
|
3206
3198
|
])
|
|
3207
3199
|
}))
|
|
3208
3200
|
]), 1040, ["style"])
|
|
3209
3201
|
])
|
|
3210
3202
|
], 4),
|
|
3211
|
-
|
|
3212
|
-
|
|
3203
|
+
G("div", Gl, [
|
|
3204
|
+
J(ie, q({
|
|
3213
3205
|
modelValue: t.value,
|
|
3214
|
-
"onUpdate:modelValue": me[1] || (me[1] = (
|
|
3215
|
-
},
|
|
3216
|
-
|
|
3217
|
-
name:
|
|
3206
|
+
"onUpdate:modelValue": me[1] || (me[1] = (de) => t.value = de)
|
|
3207
|
+
}, Q.$attrs, { onLoad: L }), fe({ _: 2 }, [
|
|
3208
|
+
U(Q.$slots, (de, ne, te) => ({
|
|
3209
|
+
name: ne,
|
|
3218
3210
|
fn: y((be) => [
|
|
3219
|
-
h(
|
|
3211
|
+
h(Q.$slots, ne, { data: be }, void 0, !0)
|
|
3220
3212
|
])
|
|
3221
3213
|
}))
|
|
3222
3214
|
]), 1040, ["modelValue"])
|
|
@@ -3224,7 +3216,7 @@ const Fl = {
|
|
|
3224
3216
|
]);
|
|
3225
3217
|
};
|
|
3226
3218
|
}
|
|
3227
|
-
}), Zl = /* @__PURE__ */
|
|
3219
|
+
}), Zl = /* @__PURE__ */ Ge(Ql, [["__scopeId", "data-v-2d8b16ed"]]), Jl = {
|
|
3228
3220
|
key: 0,
|
|
3229
3221
|
class: "op-group"
|
|
3230
3222
|
}, Kl = {
|
|
@@ -3251,149 +3243,152 @@ const Fl = {
|
|
|
3251
3243
|
default: ""
|
|
3252
3244
|
}
|
|
3253
3245
|
},
|
|
3254
|
-
setup(
|
|
3255
|
-
const c =
|
|
3256
|
-
return (
|
|
3257
|
-
(i(!0), x(W, null,
|
|
3258
|
-
style:
|
|
3246
|
+
setup(f) {
|
|
3247
|
+
const c = f;
|
|
3248
|
+
return (r, t) => c.title ? (i(), x("div", Jl, [
|
|
3249
|
+
(i(!0), x(W, null, U(c.columns, (e) => (i(), x("span", {
|
|
3250
|
+
style: Ae({ width: (e == null ? void 0 : e.width) || Mt, ...e == null ? void 0 : e.titleStyle, textAlign: (e == null ? void 0 : e.align) || "center" }),
|
|
3259
3251
|
key: e.key
|
|
3260
3252
|
}, [
|
|
3261
|
-
h(
|
|
3262
|
-
_e(
|
|
3253
|
+
h(r.$slots, `${f.t}-title-${e.key}`, { col: e }, () => [
|
|
3254
|
+
_e(he(e.label), 1)
|
|
3263
3255
|
], !0)
|
|
3264
3256
|
], 4))), 128))
|
|
3265
3257
|
])) : (i(), x("div", Kl, [
|
|
3266
|
-
(i(!0), x(W, null,
|
|
3267
|
-
style:
|
|
3258
|
+
(i(!0), x(W, null, U(c.columns, (e) => (i(), x("span", {
|
|
3259
|
+
style: Ae({ width: (e == null ? void 0 : e.width) || Mt, textAlign: (e == null ? void 0 : e.align) || "center", ...e == null ? void 0 : e.style }),
|
|
3268
3260
|
key: e.key,
|
|
3269
|
-
title:
|
|
3261
|
+
title: f.data[e.key]
|
|
3270
3262
|
}, [
|
|
3271
|
-
h(
|
|
3272
|
-
_e(
|
|
3263
|
+
h(r.$slots, `${f.t}-option-${e.key}`, { col: e }, () => [
|
|
3264
|
+
_e(he(f.data[e.key] ?? "-"), 1)
|
|
3273
3265
|
], !0)
|
|
3274
3266
|
], 12, ea))), 128))
|
|
3275
3267
|
]));
|
|
3276
3268
|
}
|
|
3277
|
-
}), la = /* @__PURE__ */
|
|
3278
|
-
let
|
|
3279
|
-
const
|
|
3280
|
-
install: (
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
}),
|
|
3269
|
+
}), la = /* @__PURE__ */ Ge(ta, [["__scopeId", "data-v-c0ac6b77"]]), aa = Object.freeze({}), Ot = [Hl, vt, Zl, la];
|
|
3270
|
+
let pt = {};
|
|
3271
|
+
const pa = {
|
|
3272
|
+
install: (f, c = {}) => {
|
|
3273
|
+
pt = Object.freeze({ ...aa, ...c }), Ot.forEach((r) => {
|
|
3274
|
+
f.component(r.name, r);
|
|
3275
|
+
}), f.provide("options", pt), f.config.globalProperties.$openModal = ht;
|
|
3284
3276
|
}
|
|
3285
|
-
}, oa = (
|
|
3277
|
+
}, oa = (f) => ({ dialog: Yt, drawer: Ut })[f] || null, ht = (f = {}, c = "dialog") => {
|
|
3286
3278
|
if (typeof document > "u") return () => {
|
|
3287
3279
|
};
|
|
3288
|
-
const
|
|
3280
|
+
const r = document.createElement("div");
|
|
3289
3281
|
let t = () => {
|
|
3290
3282
|
};
|
|
3291
3283
|
const e = oa(c);
|
|
3292
3284
|
if (!e) return () => {
|
|
3293
3285
|
};
|
|
3294
|
-
const d =
|
|
3286
|
+
const d = le(!0), E = Wt({
|
|
3295
3287
|
setup() {
|
|
3296
3288
|
return t = () => {
|
|
3297
3289
|
d.value = !1, setTimeout(() => {
|
|
3298
|
-
|
|
3290
|
+
E.unmount(), r.remove();
|
|
3299
3291
|
}, 300);
|
|
3300
3292
|
}, () => {
|
|
3301
|
-
var T, S,
|
|
3302
|
-
return
|
|
3293
|
+
var T, S, k;
|
|
3294
|
+
return Oe(e, {
|
|
3303
3295
|
modelValue: d.value,
|
|
3304
|
-
"onUpdate:modelValue": (
|
|
3296
|
+
"onUpdate:modelValue": ($) => d.value = $,
|
|
3305
3297
|
appendToBody: !0,
|
|
3306
3298
|
draggable: !0,
|
|
3307
3299
|
overflow: !0,
|
|
3308
3300
|
destroyOnClose: !0,
|
|
3309
3301
|
"close-on-click-modal": !1,
|
|
3310
|
-
...
|
|
3302
|
+
...f
|
|
3311
3303
|
}, {
|
|
3312
|
-
default: (T =
|
|
3313
|
-
header: (S =
|
|
3314
|
-
footer: (
|
|
3304
|
+
default: (T = f.slots) == null ? void 0 : T.default,
|
|
3305
|
+
header: (S = f.slots) == null ? void 0 : S.header,
|
|
3306
|
+
footer: (k = f.slots) == null ? void 0 : k.footer
|
|
3315
3307
|
});
|
|
3316
3308
|
};
|
|
3309
|
+
},
|
|
3310
|
+
mounted: () => {
|
|
3311
|
+
it();
|
|
3317
3312
|
}
|
|
3318
3313
|
});
|
|
3319
3314
|
return Ot.forEach((T) => {
|
|
3320
|
-
|
|
3321
|
-
}),
|
|
3315
|
+
E.component(T.name, T);
|
|
3316
|
+
}), E.provide("options", pt), E.use(It, { locale: el }), document.body.appendChild(r), E.mount(r), t;
|
|
3322
3317
|
};
|
|
3323
|
-
function At(
|
|
3324
|
-
if (typeof
|
|
3325
|
-
return
|
|
3326
|
-
if (
|
|
3327
|
-
return parseFloat(
|
|
3328
|
-
const
|
|
3329
|
-
if (
|
|
3330
|
-
return
|
|
3331
|
-
if (
|
|
3332
|
-
return t * parseFloat(
|
|
3333
|
-
if (
|
|
3318
|
+
function At(f, c = window.innerWidth) {
|
|
3319
|
+
if (typeof f == "number")
|
|
3320
|
+
return f;
|
|
3321
|
+
if (f.endsWith("px"))
|
|
3322
|
+
return parseFloat(f);
|
|
3323
|
+
const r = window.innerHeight, t = window.innerWidth;
|
|
3324
|
+
if (f.endsWith("vh"))
|
|
3325
|
+
return r * parseFloat(f) / 100;
|
|
3326
|
+
if (f.endsWith("vw"))
|
|
3327
|
+
return t * parseFloat(f) / 100;
|
|
3328
|
+
if (f.endsWith("%")) {
|
|
3334
3329
|
if (typeof c != "number")
|
|
3335
3330
|
throw new Error("Reference size is required to convert % to px");
|
|
3336
|
-
return c * parseFloat(
|
|
3331
|
+
return c * parseFloat(f) / 100;
|
|
3337
3332
|
}
|
|
3338
|
-
if (
|
|
3333
|
+
if (f.startsWith("calc(") && f.endsWith(")")) {
|
|
3339
3334
|
let d = function(T) {
|
|
3340
3335
|
if (/[0-9+\-*/().\s]+$/.test(T))
|
|
3341
3336
|
return new Function("return " + T)();
|
|
3342
3337
|
throw new Error("Invalid calc expression");
|
|
3343
3338
|
};
|
|
3344
|
-
const e =
|
|
3345
|
-
return d(e.replace(/([0-9.]+)([a-z%]+)/g, (T, S,
|
|
3339
|
+
const e = f.slice(5, -1).trim();
|
|
3340
|
+
return d(e.replace(/([0-9.]+)([a-z%]+)/g, (T, S, k) => At(S + k, c)));
|
|
3346
3341
|
}
|
|
3347
|
-
throw new Error("Unsupported unit in value: " +
|
|
3342
|
+
throw new Error("Unsupported unit in value: " + f);
|
|
3348
3343
|
}
|
|
3349
|
-
const
|
|
3350
|
-
const c = {},
|
|
3351
|
-
t[d] = typeof e[d] == "object" && !Array.isArray(e[d]) ?
|
|
3344
|
+
const Fe = (...f) => {
|
|
3345
|
+
const c = {}, r = (t, e) => (Object.keys(e).forEach((d) => {
|
|
3346
|
+
t[d] = typeof e[d] == "object" && !Array.isArray(e[d]) ? r(t[d] || {}, e[d]) : e[d];
|
|
3352
3347
|
}), t);
|
|
3353
|
-
return
|
|
3348
|
+
return f.forEach((t = {}) => r(c, t)), c;
|
|
3354
3349
|
};
|
|
3355
|
-
function Ce(
|
|
3356
|
-
const
|
|
3357
|
-
for (const t in
|
|
3358
|
-
|
|
3359
|
-
return
|
|
3350
|
+
function Ce(f, c = (r, t) => c(r, t)) {
|
|
3351
|
+
const r = {};
|
|
3352
|
+
for (const t in f)
|
|
3353
|
+
f.hasOwnProperty(t) && c(t, f[t]) && (r[t] = f[t]);
|
|
3354
|
+
return r;
|
|
3360
3355
|
}
|
|
3361
|
-
function ra(
|
|
3362
|
-
for (const d of
|
|
3363
|
-
if (d[
|
|
3356
|
+
function ra(f, c, r = "value", t = "label", e = "children") {
|
|
3357
|
+
for (const d of f) {
|
|
3358
|
+
if (d[r] === c)
|
|
3364
3359
|
return d[t];
|
|
3365
3360
|
if (d[e] && d[e].length > 0) {
|
|
3366
|
-
const
|
|
3367
|
-
if (
|
|
3368
|
-
return
|
|
3361
|
+
const E = ra(d[e], c, r, t, e);
|
|
3362
|
+
if (E)
|
|
3363
|
+
return E;
|
|
3369
3364
|
}
|
|
3370
3365
|
}
|
|
3371
3366
|
return null;
|
|
3372
3367
|
}
|
|
3373
|
-
function
|
|
3374
|
-
if (!
|
|
3375
|
-
const c = ["角", "分"],
|
|
3368
|
+
function yt(f) {
|
|
3369
|
+
if (!f || isNaN(f)) return "零";
|
|
3370
|
+
const c = ["角", "分"], r = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], t = [
|
|
3376
3371
|
["元", "万", "亿"],
|
|
3377
3372
|
["", "拾", "佰", "仟"]
|
|
3378
|
-
], e =
|
|
3379
|
-
|
|
3373
|
+
], e = f < 0 ? "欠" : "";
|
|
3374
|
+
f = Math.abs(f);
|
|
3380
3375
|
let d = "";
|
|
3381
|
-
for (let
|
|
3382
|
-
d += (
|
|
3383
|
-
d = d || "整",
|
|
3384
|
-
for (let
|
|
3376
|
+
for (let E = 0; E < c.length; E++)
|
|
3377
|
+
d += (r[Math.floor(f * 10 * Math.pow(10, E)) % 10] + c[E]).replace(/零./, "");
|
|
3378
|
+
d = d || "整", f = Math.floor(f);
|
|
3379
|
+
for (let E = 0; E < t[0].length && f > 0; E++) {
|
|
3385
3380
|
let T = "";
|
|
3386
|
-
for (let S = 0; S < t[1].length &&
|
|
3387
|
-
T =
|
|
3388
|
-
d = T.replace(/(零.)*零$/, "").replace(/^$/, "零") + t[0][
|
|
3381
|
+
for (let S = 0; S < t[1].length && f > 0; S++)
|
|
3382
|
+
T = r[f % 10] + t[1][S] + T, f = Math.floor(f / 10);
|
|
3383
|
+
d = T.replace(/(零.)*零$/, "").replace(/^$/, "零") + t[0][E] + d;
|
|
3389
3384
|
}
|
|
3390
3385
|
return e + d.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整");
|
|
3391
3386
|
}
|
|
3392
|
-
function ua(
|
|
3393
|
-
if (typeof
|
|
3387
|
+
function ua(f) {
|
|
3388
|
+
if (typeof f != "number" || isNaN(f) || !isFinite(f))
|
|
3394
3389
|
return "0.00";
|
|
3395
|
-
const c =
|
|
3396
|
-
return `${
|
|
3390
|
+
const c = f.toFixed(2), [r, t] = c.split(".");
|
|
3391
|
+
return `${r.replace(/\B(?=(\d{3})+(?!\d))/g, ",")}.${t}`;
|
|
3397
3392
|
}
|
|
3398
3393
|
const pe = {
|
|
3399
3394
|
RADIO: "radio",
|
|
@@ -3423,15 +3418,60 @@ const pe = {
|
|
|
3423
3418
|
PASSWORD: "password",
|
|
3424
3419
|
TEXTAREA: "textarea",
|
|
3425
3420
|
TEL: "tel"
|
|
3421
|
+
}, it = () => {
|
|
3422
|
+
Qe(() => {
|
|
3423
|
+
const f = document.querySelector(".el-dialog");
|
|
3424
|
+
if (!f) {
|
|
3425
|
+
console.warn("未找到对话框元素");
|
|
3426
|
+
return;
|
|
3427
|
+
}
|
|
3428
|
+
if (f.querySelector(".dialog-resize-handle"))
|
|
3429
|
+
return;
|
|
3430
|
+
const c = na();
|
|
3431
|
+
f.appendChild(c), sa(f), ia(f, c);
|
|
3432
|
+
});
|
|
3433
|
+
}, na = () => {
|
|
3434
|
+
const f = document.createElement("div");
|
|
3435
|
+
return Object.assign(f.style, {
|
|
3436
|
+
position: "absolute",
|
|
3437
|
+
right: "0",
|
|
3438
|
+
bottom: "0",
|
|
3439
|
+
width: "12px",
|
|
3440
|
+
height: "12px",
|
|
3441
|
+
background: "transparent",
|
|
3442
|
+
cursor: "nwse-resize",
|
|
3443
|
+
zIndex: "999999999999"
|
|
3444
|
+
}), f.className = "dialog-resize-handle", f;
|
|
3445
|
+
}, sa = (f) => {
|
|
3446
|
+
Object.assign(f.style, {
|
|
3447
|
+
transition: "none",
|
|
3448
|
+
minWidth: "300px",
|
|
3449
|
+
minHeight: "200px",
|
|
3450
|
+
resize: "none"
|
|
3451
|
+
// 防止与原生resize冲突
|
|
3452
|
+
});
|
|
3453
|
+
}, ia = (f, c) => {
|
|
3454
|
+
let r = !1, t, e, d, E;
|
|
3455
|
+
const T = ($) => {
|
|
3456
|
+
$.preventDefault(), r = !0, t = $.clientX, e = $.clientY, d = parseInt(document.defaultView.getComputedStyle(f).width), E = parseInt(document.defaultView.getComputedStyle(f).height), document.addEventListener("mousemove", S), document.addEventListener("mouseup", k);
|
|
3457
|
+
}, S = ($) => {
|
|
3458
|
+
if (!r) return;
|
|
3459
|
+
const L = Math.max(300, d + $.clientX - t), ee = Math.max(200, E + $.clientY - e);
|
|
3460
|
+
f.style.width = `${L}px`, f.style.height = `${ee}px`;
|
|
3461
|
+
}, k = () => {
|
|
3462
|
+
r = !1, document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", k);
|
|
3463
|
+
};
|
|
3464
|
+
c.addEventListener("mousedown", T);
|
|
3426
3465
|
};
|
|
3427
3466
|
export {
|
|
3428
3467
|
pe as CT,
|
|
3468
|
+
it as bindResize,
|
|
3429
3469
|
At as convertToPx,
|
|
3430
|
-
|
|
3470
|
+
pa as default,
|
|
3431
3471
|
Ce as filterObject,
|
|
3432
3472
|
ra as findTreeLabelByValue,
|
|
3433
3473
|
ua as formatAmount,
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3474
|
+
Fe as mergeObjects,
|
|
3475
|
+
yt as moneyToChinese,
|
|
3476
|
+
ht as openModal
|
|
3437
3477
|
};
|