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