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