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