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