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