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