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