vue-2024-ui 0.0.88 → 0.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +350 -341
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _t, { ElForm as Qe, ElButtonGroup as Xe, ElButton as Ve, ElPopover as lt, ElMessage as Fe, ElMessageBox as ht, ElDialog as Ct, ElDrawer as Dt } from "element-plus";
|
|
2
|
-
import { mergeModels as Ye, useModel as Ue, ref as me, nextTick as Ze, onMounted as ze, resolveComponent as j, openBlock as r, createElementBlock as q, unref as L, createBlock as S, mergeProps as F, withCtx as v, renderSlot as p, Fragment as P, renderList as I, createTextVNode as _e, toDisplayString as Ee, createSlots as ve, createVNode as Z, createCommentVNode as be, normalizeProps as Je, createElementVNode as J, useSlots as gt, inject as st, useAttrs as it, onUnmounted as Vt, computed as je, normalizeStyle as Ae, withModifiers as mt, guardReactiveProps as pt, resolveDynamicComponent as Ie, Transition as Mt, withDirectives as Tt, vShow as Ft, h as
|
|
2
|
+
import { mergeModels as Ye, useModel as Ue, ref as me, nextTick as Ze, onMounted as ze, resolveComponent as j, openBlock as r, createElementBlock as q, unref as L, createBlock as S, mergeProps as F, withCtx as v, renderSlot as p, Fragment as P, renderList as I, createTextVNode as _e, toDisplayString as Ee, createSlots as ve, createVNode as Z, createCommentVNode as be, normalizeProps as Je, createElementVNode as J, useSlots as gt, inject as st, useAttrs as it, onUnmounted as Vt, computed as je, normalizeStyle as Ae, withModifiers as mt, guardReactiveProps as pt, resolveDynamicComponent as Ie, Transition as Mt, withDirectives as Tt, vShow as Ft, h as xe, onBeforeUnmount as St, normalizeClass as bt, watchEffect as qt, watch as xt, createApp as Ot } from "vue";
|
|
3
3
|
import { FullScreen as At, Remove as Bt } from "@element-plus/icons-vue";
|
|
4
4
|
import $t from "sortablejs";
|
|
5
5
|
import { Dexie as It } from "dexie";
|
|
@@ -189,98 +189,98 @@ var Et = { exports: {} };
|
|
|
189
189
|
(function(t, e) {
|
|
190
190
|
f.exports = e();
|
|
191
191
|
})(Ut, function() {
|
|
192
|
-
var t = 1e3, e = 6e4, o = 36e5, s = "millisecond",
|
|
193
|
-
var
|
|
194
|
-
return "[" +
|
|
195
|
-
} }, se = function(
|
|
196
|
-
var M = String(
|
|
197
|
-
return !M || M.length >=
|
|
198
|
-
}, ie = { s: se, z: function(
|
|
199
|
-
var
|
|
200
|
-
return (
|
|
201
|
-
}, m: function
|
|
202
|
-
if (
|
|
203
|
-
var M = 12 * (h.year() -
|
|
204
|
-
return +(-(M + (h - u) / (i ? u -
|
|
205
|
-
}, a: function(
|
|
206
|
-
return
|
|
207
|
-
}, p: function(
|
|
208
|
-
return { M: z, y: R, w: _, d: $, D: E, h: T, m: D, s:
|
|
209
|
-
}, u: function(
|
|
210
|
-
return
|
|
211
|
-
} },
|
|
212
|
-
fe[
|
|
213
|
-
var d = "$isDayjsObject", C = function(
|
|
214
|
-
return
|
|
215
|
-
}, k = function
|
|
192
|
+
var t = 1e3, e = 6e4, o = 36e5, s = "millisecond", O = "second", D = "minute", T = "hour", $ = "day", _ = "week", z = "month", re = "quarter", R = "year", E = "date", H = "Invalid Date", V = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, g = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, K = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(B) {
|
|
193
|
+
var b = ["th", "st", "nd", "rd"], h = B % 100;
|
|
194
|
+
return "[" + B + (b[(h - 20) % 10] || b[h] || b[0]) + "]";
|
|
195
|
+
} }, se = function(B, b, h) {
|
|
196
|
+
var M = String(B);
|
|
197
|
+
return !M || M.length >= b ? B : "" + Array(b + 1 - M.length).join(h) + B;
|
|
198
|
+
}, ie = { s: se, z: function(B) {
|
|
199
|
+
var b = -B.utcOffset(), h = Math.abs(b), M = Math.floor(h / 60), u = h % 60;
|
|
200
|
+
return (b <= 0 ? "+" : "-") + se(M, 2, "0") + ":" + se(u, 2, "0");
|
|
201
|
+
}, m: function B(b, h) {
|
|
202
|
+
if (b.date() < h.date()) return -B(h, b);
|
|
203
|
+
var M = 12 * (h.year() - b.year()) + (h.month() - b.month()), u = b.clone().add(M, z), i = h - u < 0, A = b.clone().add(M + (i ? -1 : 1), z);
|
|
204
|
+
return +(-(M + (h - u) / (i ? u - A : A - u)) || 0);
|
|
205
|
+
}, a: function(B) {
|
|
206
|
+
return B < 0 ? Math.ceil(B) || 0 : Math.floor(B);
|
|
207
|
+
}, p: function(B) {
|
|
208
|
+
return { M: z, y: R, w: _, d: $, D: E, h: T, m: D, s: O, ms: s, Q: re }[B] || String(B || "").toLowerCase().replace(/s$/, "");
|
|
209
|
+
}, u: function(B) {
|
|
210
|
+
return B === void 0;
|
|
211
|
+
} }, te = "en", fe = {};
|
|
212
|
+
fe[te] = K;
|
|
213
|
+
var d = "$isDayjsObject", C = function(B) {
|
|
214
|
+
return B instanceof le || !(!B || !B[d]);
|
|
215
|
+
}, k = function B(b, h, M) {
|
|
216
216
|
var u;
|
|
217
|
-
if (!
|
|
218
|
-
if (typeof
|
|
219
|
-
var i =
|
|
217
|
+
if (!b) return te;
|
|
218
|
+
if (typeof b == "string") {
|
|
219
|
+
var i = b.toLowerCase();
|
|
220
220
|
fe[i] && (u = i), h && (fe[i] = h, u = i);
|
|
221
|
-
var
|
|
222
|
-
if (!u &&
|
|
221
|
+
var A = b.split("-");
|
|
222
|
+
if (!u && A.length > 1) return B(A[0]);
|
|
223
223
|
} else {
|
|
224
|
-
var N =
|
|
225
|
-
fe[N] =
|
|
224
|
+
var N = b.name;
|
|
225
|
+
fe[N] = b, u = N;
|
|
226
226
|
}
|
|
227
|
-
return !M && u && (
|
|
228
|
-
}, y = function(
|
|
229
|
-
if (C(
|
|
230
|
-
var h = typeof
|
|
231
|
-
return h.date =
|
|
227
|
+
return !M && u && (te = u), u || !M && te;
|
|
228
|
+
}, y = function(B, b) {
|
|
229
|
+
if (C(B)) return B.clone();
|
|
230
|
+
var h = typeof b == "object" ? b : {};
|
|
231
|
+
return h.date = B, h.args = arguments, new le(h);
|
|
232
232
|
}, Y = ie;
|
|
233
|
-
Y.l = k, Y.i = C, Y.w = function(
|
|
234
|
-
return y(
|
|
233
|
+
Y.l = k, Y.i = C, Y.w = function(B, b) {
|
|
234
|
+
return y(B, { locale: b.$L, utc: b.$u, x: b.$x, $offset: b.$offset });
|
|
235
235
|
};
|
|
236
|
-
var
|
|
237
|
-
function
|
|
236
|
+
var le = function() {
|
|
237
|
+
function B(h) {
|
|
238
238
|
this.$L = k(h.locale, null, !0), this.parse(h), this.$x = this.$x || h.x || {}, this[d] = !0;
|
|
239
239
|
}
|
|
240
|
-
var
|
|
241
|
-
return
|
|
240
|
+
var b = B.prototype;
|
|
241
|
+
return b.parse = function(h) {
|
|
242
242
|
this.$d = function(M) {
|
|
243
243
|
var u = M.date, i = M.utc;
|
|
244
244
|
if (u === null) return /* @__PURE__ */ new Date(NaN);
|
|
245
245
|
if (Y.u(u)) return /* @__PURE__ */ new Date();
|
|
246
246
|
if (u instanceof Date) return new Date(u);
|
|
247
247
|
if (typeof u == "string" && !/Z$/i.test(u)) {
|
|
248
|
-
var
|
|
249
|
-
if (
|
|
250
|
-
var N =
|
|
251
|
-
return i ? new Date(Date.UTC(
|
|
248
|
+
var A = u.match(V);
|
|
249
|
+
if (A) {
|
|
250
|
+
var N = A[2] - 1 || 0, ee = (A[7] || "0").substring(0, 3);
|
|
251
|
+
return i ? new Date(Date.UTC(A[1], N, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, ee)) : new Date(A[1], N, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, ee);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
return new Date(u);
|
|
255
255
|
}(h), this.init();
|
|
256
|
-
},
|
|
256
|
+
}, b.init = function() {
|
|
257
257
|
var h = this.$d;
|
|
258
258
|
this.$y = h.getFullYear(), this.$M = h.getMonth(), this.$D = h.getDate(), this.$W = h.getDay(), this.$H = h.getHours(), this.$m = h.getMinutes(), this.$s = h.getSeconds(), this.$ms = h.getMilliseconds();
|
|
259
|
-
},
|
|
259
|
+
}, b.$utils = function() {
|
|
260
260
|
return Y;
|
|
261
|
-
},
|
|
261
|
+
}, b.isValid = function() {
|
|
262
262
|
return this.$d.toString() !== H;
|
|
263
|
-
},
|
|
263
|
+
}, b.isSame = function(h, M) {
|
|
264
264
|
var u = y(h);
|
|
265
265
|
return this.startOf(M) <= u && u <= this.endOf(M);
|
|
266
|
-
},
|
|
266
|
+
}, b.isAfter = function(h, M) {
|
|
267
267
|
return y(h) < this.startOf(M);
|
|
268
|
-
},
|
|
268
|
+
}, b.isBefore = function(h, M) {
|
|
269
269
|
return this.endOf(M) < y(h);
|
|
270
|
-
},
|
|
270
|
+
}, b.$g = function(h, M, u) {
|
|
271
271
|
return Y.u(h) ? this[M] : this.set(u, h);
|
|
272
|
-
},
|
|
272
|
+
}, b.unix = function() {
|
|
273
273
|
return Math.floor(this.valueOf() / 1e3);
|
|
274
|
-
},
|
|
274
|
+
}, b.valueOf = function() {
|
|
275
275
|
return this.$d.getTime();
|
|
276
|
-
},
|
|
277
|
-
var u = this, i = !!Y.u(M) || M,
|
|
276
|
+
}, b.startOf = function(h, M) {
|
|
277
|
+
var u = this, i = !!Y.u(M) || M, A = Y.p(h), N = function(Me, $e) {
|
|
278
278
|
var n = Y.w(u.$u ? Date.UTC(u.$y, $e, Me) : new Date(u.$y, $e, Me), u);
|
|
279
279
|
return i ? n : n.endOf($);
|
|
280
280
|
}, ee = function(Me, $e) {
|
|
281
281
|
return Y.w(u.toDate()[Me].apply(u.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice($e)), u);
|
|
282
282
|
}, ue = this.$W, pe = this.$M, he = this.$D, we = "set" + (this.$u ? "UTC" : "");
|
|
283
|
-
switch (
|
|
283
|
+
switch (A) {
|
|
284
284
|
case R:
|
|
285
285
|
return i ? N(1, 0) : N(31, 11);
|
|
286
286
|
case z:
|
|
@@ -295,43 +295,43 @@ var Et = { exports: {} };
|
|
|
295
295
|
return ee(we + "Minutes", 1);
|
|
296
296
|
case D:
|
|
297
297
|
return ee(we + "Seconds", 2);
|
|
298
|
-
case
|
|
298
|
+
case O:
|
|
299
299
|
return ee(we + "Milliseconds", 3);
|
|
300
300
|
default:
|
|
301
301
|
return this.clone();
|
|
302
302
|
}
|
|
303
|
-
},
|
|
303
|
+
}, b.endOf = function(h) {
|
|
304
304
|
return this.startOf(h, !1);
|
|
305
|
-
},
|
|
306
|
-
var u, i = Y.p(h),
|
|
305
|
+
}, b.$set = function(h, M) {
|
|
306
|
+
var u, i = Y.p(h), A = "set" + (this.$u ? "UTC" : ""), N = (u = {}, u[$] = A + "Date", u[E] = A + "Date", u[z] = A + "Month", u[R] = A + "FullYear", u[T] = A + "Hours", u[D] = A + "Minutes", u[O] = A + "Seconds", u[s] = A + "Milliseconds", u)[i], ee = i === $ ? this.$D + (M - this.$W) : M;
|
|
307
307
|
if (i === z || i === R) {
|
|
308
308
|
var ue = this.clone().set(E, 1);
|
|
309
309
|
ue.$d[N](ee), ue.init(), this.$d = ue.set(E, Math.min(this.$D, ue.daysInMonth())).$d;
|
|
310
310
|
} else N && this.$d[N](ee);
|
|
311
311
|
return this.init(), this;
|
|
312
|
-
},
|
|
312
|
+
}, b.set = function(h, M) {
|
|
313
313
|
return this.clone().$set(h, M);
|
|
314
|
-
},
|
|
314
|
+
}, b.get = function(h) {
|
|
315
315
|
return this[Y.p(h)]();
|
|
316
|
-
},
|
|
316
|
+
}, b.add = function(h, M) {
|
|
317
317
|
var u, i = this;
|
|
318
318
|
h = Number(h);
|
|
319
|
-
var
|
|
319
|
+
var A = Y.p(M), N = function(pe) {
|
|
320
320
|
var he = y(i);
|
|
321
321
|
return Y.w(he.date(he.date() + Math.round(pe * h)), i);
|
|
322
322
|
};
|
|
323
|
-
if (
|
|
324
|
-
if (
|
|
325
|
-
if (
|
|
326
|
-
if (
|
|
327
|
-
var ee = (u = {}, u[D] = e, u[T] = o, u[
|
|
323
|
+
if (A === z) return this.set(z, this.$M + h);
|
|
324
|
+
if (A === R) return this.set(R, this.$y + h);
|
|
325
|
+
if (A === $) return N(1);
|
|
326
|
+
if (A === _) return N(7);
|
|
327
|
+
var ee = (u = {}, u[D] = e, u[T] = o, u[O] = t, u)[A] || 1, ue = this.$d.getTime() + h * ee;
|
|
328
328
|
return Y.w(ue, this);
|
|
329
|
-
},
|
|
329
|
+
}, b.subtract = function(h, M) {
|
|
330
330
|
return this.add(-1 * h, M);
|
|
331
|
-
},
|
|
331
|
+
}, b.format = function(h) {
|
|
332
332
|
var M = this, u = this.$locale();
|
|
333
333
|
if (!this.isValid()) return u.invalidDate || H;
|
|
334
|
-
var i = h || "YYYY-MM-DDTHH:mm:ssZ",
|
|
334
|
+
var i = h || "YYYY-MM-DDTHH:mm:ssZ", A = Y.z(this), N = this.$H, ee = this.$m, ue = this.$M, pe = u.weekdays, he = u.months, we = u.meridiem, Ce = function($e, n, G, ce) {
|
|
335
335
|
return $e && ($e[n] || $e(M, i)) || G[n].slice(0, ce);
|
|
336
336
|
}, Se = function($e) {
|
|
337
337
|
return Y.s(N % 12 || 12, $e, "0");
|
|
@@ -339,7 +339,7 @@ var Et = { exports: {} };
|
|
|
339
339
|
var ce = $e < 12 ? "AM" : "PM";
|
|
340
340
|
return G ? ce.toLowerCase() : ce;
|
|
341
341
|
};
|
|
342
|
-
return i.replace(
|
|
342
|
+
return i.replace(g, function($e, n) {
|
|
343
343
|
return n || function(G) {
|
|
344
344
|
switch (G) {
|
|
345
345
|
case "YY":
|
|
@@ -389,16 +389,16 @@ var Et = { exports: {} };
|
|
|
389
389
|
case "SSS":
|
|
390
390
|
return Y.s(M.$ms, 3, "0");
|
|
391
391
|
case "Z":
|
|
392
|
-
return
|
|
392
|
+
return A;
|
|
393
393
|
}
|
|
394
394
|
return null;
|
|
395
|
-
}($e) ||
|
|
395
|
+
}($e) || A.replace(":", "");
|
|
396
396
|
});
|
|
397
|
-
},
|
|
397
|
+
}, b.utcOffset = function() {
|
|
398
398
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
399
|
-
},
|
|
400
|
-
var i,
|
|
401
|
-
return Y.m(
|
|
399
|
+
}, b.diff = function(h, M, u) {
|
|
400
|
+
var i, A = this, N = Y.p(M), ee = y(h), ue = (ee.utcOffset() - this.utcOffset()) * e, pe = this - ee, he = function() {
|
|
401
|
+
return Y.m(A, ee);
|
|
402
402
|
};
|
|
403
403
|
switch (N) {
|
|
404
404
|
case R:
|
|
@@ -422,42 +422,42 @@ var Et = { exports: {} };
|
|
|
422
422
|
case D:
|
|
423
423
|
i = pe / e;
|
|
424
424
|
break;
|
|
425
|
-
case
|
|
425
|
+
case O:
|
|
426
426
|
i = pe / t;
|
|
427
427
|
break;
|
|
428
428
|
default:
|
|
429
429
|
i = pe;
|
|
430
430
|
}
|
|
431
431
|
return u ? i : Y.a(i);
|
|
432
|
-
},
|
|
432
|
+
}, b.daysInMonth = function() {
|
|
433
433
|
return this.endOf(z).$D;
|
|
434
|
-
},
|
|
434
|
+
}, b.$locale = function() {
|
|
435
435
|
return fe[this.$L];
|
|
436
|
-
},
|
|
436
|
+
}, b.locale = function(h, M) {
|
|
437
437
|
if (!h) return this.$L;
|
|
438
438
|
var u = this.clone(), i = k(h, M, !0);
|
|
439
439
|
return i && (u.$L = i), u;
|
|
440
|
-
},
|
|
440
|
+
}, b.clone = function() {
|
|
441
441
|
return Y.w(this.$d, this);
|
|
442
|
-
},
|
|
442
|
+
}, b.toDate = function() {
|
|
443
443
|
return new Date(this.valueOf());
|
|
444
|
-
},
|
|
444
|
+
}, b.toJSON = function() {
|
|
445
445
|
return this.isValid() ? this.toISOString() : null;
|
|
446
|
-
},
|
|
446
|
+
}, b.toISOString = function() {
|
|
447
447
|
return this.$d.toISOString();
|
|
448
|
-
},
|
|
448
|
+
}, b.toString = function() {
|
|
449
449
|
return this.$d.toUTCString();
|
|
450
|
-
},
|
|
451
|
-
}(), de =
|
|
452
|
-
return y.prototype = de, [["$ms", s], ["$s",
|
|
453
|
-
de[
|
|
454
|
-
return this.$g(
|
|
450
|
+
}, B;
|
|
451
|
+
}(), de = le.prototype;
|
|
452
|
+
return y.prototype = de, [["$ms", s], ["$s", O], ["$m", D], ["$H", T], ["$W", $], ["$M", z], ["$y", R], ["$D", E]].forEach(function(B) {
|
|
453
|
+
de[B[1]] = function(b) {
|
|
454
|
+
return this.$g(b, B[0], B[1]);
|
|
455
455
|
};
|
|
456
|
-
}), y.extend = function(
|
|
457
|
-
return
|
|
458
|
-
}, y.locale = k, y.isDayjs = C, y.unix = function(
|
|
459
|
-
return y(1e3 *
|
|
460
|
-
}, y.en = fe[
|
|
456
|
+
}), y.extend = function(B, b) {
|
|
457
|
+
return B.$i || (B(b, le, y), B.$i = !0), y;
|
|
458
|
+
}, y.locale = k, y.isDayjs = C, y.unix = function(B) {
|
|
459
|
+
return y(1e3 * B);
|
|
460
|
+
}, y.en = fe[te], y.Ls = fe, y.p = {}, y;
|
|
461
461
|
});
|
|
462
462
|
})(Et);
|
|
463
463
|
var Lt = Et.exports;
|
|
@@ -475,7 +475,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
475
475
|
}),
|
|
476
476
|
emits: ["update:modelValue"],
|
|
477
477
|
setup(f) {
|
|
478
|
-
const c = Ue(f, "modelValue"), t = f, e = me(t.item || {}), o = me(t.ctrlKey), s = me(t.ctrlType),
|
|
478
|
+
const c = Ue(f, "modelValue"), t = f, e = me(t.item || {}), o = me(t.ctrlKey), s = me(t.ctrlType), O = me(t.model), D = me([]), T = me([]), $ = () => Object.keys(gt()).filter((V) => V.startsWith(`${t.t}-${o}-`)).map((V) => V.replace(`${t.t}-${o}-`, "")), _ = (V) => [
|
|
479
479
|
"year",
|
|
480
480
|
"years",
|
|
481
481
|
"month",
|
|
@@ -507,21 +507,21 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
507
507
|
remote: !!(e.value && e.value["remote-method"]),
|
|
508
508
|
...e.value
|
|
509
509
|
}), R = me((V) => {
|
|
510
|
-
e.value["remote-method"](V, (
|
|
510
|
+
e.value["remote-method"](V, (g) => {
|
|
511
511
|
Ze(() => {
|
|
512
|
-
T.value =
|
|
512
|
+
T.value = g;
|
|
513
513
|
});
|
|
514
514
|
});
|
|
515
515
|
}), E = async (V = "options") => {
|
|
516
|
-
var
|
|
516
|
+
var g;
|
|
517
517
|
try {
|
|
518
|
-
const K = await ((
|
|
518
|
+
const K = await ((g = e.value) == null ? void 0 : g.getDicts(t.formInfo));
|
|
519
519
|
if (typeof K == "string")
|
|
520
520
|
T.value = [{ label: K, value: c.value }];
|
|
521
521
|
else {
|
|
522
|
-
const se = K == null ? void 0 : K.map((ie,
|
|
522
|
+
const se = K == null ? void 0 : K.map((ie, te) => ({
|
|
523
523
|
...ie,
|
|
524
|
-
value: ie.value ?? ie.label ??
|
|
524
|
+
value: ie.value ?? ie.label ?? te,
|
|
525
525
|
label: ie.label || "未知选项"
|
|
526
526
|
}));
|
|
527
527
|
T.value = se || [];
|
|
@@ -530,32 +530,34 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
530
530
|
throw console.error("获取选项失败:", K), K;
|
|
531
531
|
}
|
|
532
532
|
}, H = () => {
|
|
533
|
-
var V,
|
|
534
|
-
e.value.noSearch !== !0 && ((
|
|
533
|
+
var V, g;
|
|
534
|
+
e.value.noSearch !== !0 && ((g = (V = O.value) == null ? void 0 : V.table) == null || g.load());
|
|
535
535
|
};
|
|
536
536
|
return ze(async () => {
|
|
537
537
|
var K, se;
|
|
538
|
-
e.value && e.value["remote-method"] && (re.value["remote-method"] = R), (se = (K =
|
|
539
|
-
const V = (ie,
|
|
540
|
-
typeof e.value.getDicts == "function" && E(
|
|
541
|
-
console.error(`Failed to load ${
|
|
538
|
+
e.value && e.value["remote-method"] && (re.value["remote-method"] = R), (se = (K = O.value[o.value]) == null ? void 0 : K.options) != null && se.length && (T.value = O.value[o.value].options);
|
|
539
|
+
const V = (ie, te = "options", fe = O.value[o.value]) => {
|
|
540
|
+
typeof e.value.getDicts == "function" && E(te).catch((d) => {
|
|
541
|
+
console.error(`Failed to load ${te} for ${ie}:`, d);
|
|
542
542
|
});
|
|
543
543
|
};
|
|
544
544
|
if (["radio", "radio-button", "checkbox-group", "checkbox-group-button", "select", "cascader"].includes(s.value) && V(s.value), s.value === ye.TREESELECT && await (async () => {
|
|
545
545
|
try {
|
|
546
546
|
typeof e.value.getDicts == "function" ? D.value = await e.value.getDicts(t.formInfo) : D.value = T.value;
|
|
547
|
-
} catch (
|
|
548
|
-
console.error("Failed to load data for tree-select:",
|
|
547
|
+
} catch (te) {
|
|
548
|
+
console.error("Failed to load data for tree-select:", te);
|
|
549
549
|
}
|
|
550
550
|
})(), t.t == "q") {
|
|
551
551
|
let ie = e.value.type || s.value;
|
|
552
|
-
(ie === void 0 || s.value === "input" || ie == ye.NUMBER || ie == ye.EMAIL || ie == "url") && e.value.onKeyup == null && (e.value.onKeyup = (
|
|
552
|
+
(ie === void 0 || s.value === "input" || ie == ye.NUMBER || ie == ye.EMAIL || ie == "url" || ie == "text") && e.value.onKeyup == null && (e.value.onKeyup = (te) => {
|
|
553
553
|
var fe, d;
|
|
554
|
-
|
|
554
|
+
console.log(te.key), (te.keyCode === 13 || te.key === "Enter") && ((d = (fe = O.value) == null ? void 0 : fe.table) == null || d.load());
|
|
555
555
|
}), [
|
|
556
556
|
"radio",
|
|
557
|
+
"switch",
|
|
557
558
|
"checkbox",
|
|
558
559
|
"checkbox-group",
|
|
560
|
+
"checkbox-group-button",
|
|
559
561
|
"rate",
|
|
560
562
|
"year",
|
|
561
563
|
"yearrange",
|
|
@@ -566,19 +568,19 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
566
568
|
"datetime",
|
|
567
569
|
"datetimerange",
|
|
568
570
|
"week"
|
|
569
|
-
].includes(ie) && e.value.onChange === void 0 && (e.value.onChange = (
|
|
571
|
+
].includes(ie) && e.value.onChange === void 0 && (e.value.onChange = (te) => {
|
|
570
572
|
var fe, d;
|
|
571
|
-
(d = (fe =
|
|
573
|
+
(d = (fe = O.value) == null ? void 0 : fe.table) == null || d.load();
|
|
572
574
|
});
|
|
573
575
|
}
|
|
574
|
-
}), (V,
|
|
576
|
+
}), (V, g) => {
|
|
575
577
|
var Se, Me, $e;
|
|
576
|
-
const K = j("el-radio"), se = j("el-radio-group"), ie = j("el-radio-button"),
|
|
578
|
+
const K = j("el-radio"), se = j("el-radio-group"), ie = j("el-radio-button"), te = j("el-checkbox"), fe = j("el-checkbox-group"), d = j("el-checkbox-button"), C = j("g-select-option"), k = j("el-option"), y = j("el-select"), Y = j("el-tree-select"), le = j("el-time-picker"), de = j("el-time-select"), B = j("el-date-picker"), b = j("el-color-picker"), h = j("el-rate"), M = j("el-slider"), u = j("el-switch"), i = j("el-transfer"), A = j("el-cascader"), N = j("el-button"), ee = j("el-upload"), ue = j("el-autocomplete"), pe = j("el-input-number"), he = j("el-input"), we = j("el-link"), Ce = j("el-tag");
|
|
577
579
|
return r(), q("div", Rt, [
|
|
578
580
|
s.value == L(ye).RADIO ? (r(), S(se, F({
|
|
579
581
|
key: 0,
|
|
580
582
|
modelValue: c.value,
|
|
581
|
-
"onUpdate:modelValue":
|
|
583
|
+
"onUpdate:modelValue": g[0] || (g[0] = (n) => c.value = n)
|
|
582
584
|
}, e.value), {
|
|
583
585
|
default: v(() => [
|
|
584
586
|
p(V.$slots, `${t.t}-${o.value}`, { data: e.value }, () => [
|
|
@@ -594,7 +596,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
594
596
|
}, 16, ["modelValue"])) : s.value == L(ye).RADIOBUTTON ? (r(), S(se, F({
|
|
595
597
|
key: 1,
|
|
596
598
|
modelValue: c.value,
|
|
597
|
-
"onUpdate:modelValue":
|
|
599
|
+
"onUpdate:modelValue": g[1] || (g[1] = (n) => c.value = n)
|
|
598
600
|
}, e.value), {
|
|
599
601
|
default: v(() => [
|
|
600
602
|
p(V.$slots, `${t.t}-${o.value}`, { data: e.value }, () => [
|
|
@@ -607,25 +609,25 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
607
609
|
])
|
|
608
610
|
]),
|
|
609
611
|
_: 3
|
|
610
|
-
}, 16, ["modelValue"])) : s.value == L(ye).CHECKBOX ? (r(), S(
|
|
612
|
+
}, 16, ["modelValue"])) : s.value == L(ye).CHECKBOX ? (r(), S(te, F({
|
|
611
613
|
key: 2,
|
|
612
614
|
modelValue: c.value,
|
|
613
|
-
"onUpdate:modelValue":
|
|
615
|
+
"onUpdate:modelValue": g[2] || (g[2] = (n) => c.value = n)
|
|
614
616
|
}, e.value), {
|
|
615
617
|
default: v(() => [
|
|
616
618
|
p(V.$slots, `${t.t}-${o.value}`, { data: e.value }, () => [
|
|
617
|
-
|
|
619
|
+
g[22] || (g[22] = _e(Ee(" ")))
|
|
618
620
|
])
|
|
619
621
|
]),
|
|
620
622
|
_: 3
|
|
621
623
|
}, 16, ["modelValue"])) : s.value == L(ye).CHECKBOXGROUP ? (r(), S(fe, F({
|
|
622
624
|
key: 3,
|
|
623
625
|
modelValue: c.value,
|
|
624
|
-
"onUpdate:modelValue":
|
|
626
|
+
"onUpdate:modelValue": g[3] || (g[3] = (n) => c.value = n)
|
|
625
627
|
}, e.value), {
|
|
626
628
|
default: v(() => [
|
|
627
629
|
p(V.$slots, `${t.t}-${o.value}`, { data: e.value }, () => [
|
|
628
|
-
(r(!0), q(P, null, I(T.value, (n) => (r(), S(
|
|
630
|
+
(r(!0), q(P, null, I(T.value, (n) => (r(), S(te, F({ ref_for: !0 }, n), {
|
|
629
631
|
default: v(() => [
|
|
630
632
|
p(V.$slots, `${t.t}-${o.value}-options`, { option: n }, () => [
|
|
631
633
|
_e(Ee(n.label), 1)
|
|
@@ -639,7 +641,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
639
641
|
}, 16, ["modelValue"])) : s.value == L(ye).CHECKBOXGROUPBUTTON ? (r(), S(fe, F({
|
|
640
642
|
key: 4,
|
|
641
643
|
modelValue: c.value,
|
|
642
|
-
"onUpdate:modelValue":
|
|
644
|
+
"onUpdate:modelValue": g[4] || (g[4] = (n) => c.value = n)
|
|
643
645
|
}, e.value), {
|
|
644
646
|
default: v(() => [
|
|
645
647
|
p(V.$slots, `${t.t}-${o.value}`, { data: e.value }, () => [
|
|
@@ -655,8 +657,12 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
655
657
|
}, 16, ["modelValue"])) : s.value === L(ye).SELECT ? (r(), S(y, F({
|
|
656
658
|
key: 5,
|
|
657
659
|
modelValue: c.value,
|
|
658
|
-
"onUpdate:modelValue":
|
|
659
|
-
placeholder:
|
|
660
|
+
"onUpdate:modelValue": g[5] || (g[5] = (n) => c.value = n),
|
|
661
|
+
placeholder: O.value[o.value].label,
|
|
662
|
+
clearable: !0,
|
|
663
|
+
onClear: g[6] || (g[6] = () => {
|
|
664
|
+
t.t == "q" && O.value.table.load();
|
|
665
|
+
})
|
|
660
666
|
}, re.value), ve({
|
|
661
667
|
default: v(() => [
|
|
662
668
|
p(V.$slots, `${t.t}-${o.value}`, { options: T.value }, () => [
|
|
@@ -772,8 +778,8 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
772
778
|
]), 1040, ["modelValue", "placeholder"])) : s.value == L(ye).TREESELECT ? (r(), S(Y, F({
|
|
773
779
|
key: 6,
|
|
774
780
|
modelValue: c.value,
|
|
775
|
-
"onUpdate:modelValue":
|
|
776
|
-
placeholder:
|
|
781
|
+
"onUpdate:modelValue": g[7] || (g[7] = (n) => c.value = n),
|
|
782
|
+
placeholder: O.value[o.value].label
|
|
777
783
|
}, e.value, { data: D.value }), ve({ _: 2 }, [
|
|
778
784
|
I($(), (n) => ({
|
|
779
785
|
name: n,
|
|
@@ -781,27 +787,27 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
781
787
|
p(V.$slots, `${t.t}-${o.value}-${n}`, { data: G })
|
|
782
788
|
])
|
|
783
789
|
}))
|
|
784
|
-
]), 1040, ["modelValue", "placeholder", "data"])) : s.value == L(ye).TIME ? (r(), S(
|
|
790
|
+
]), 1040, ["modelValue", "placeholder", "data"])) : s.value == L(ye).TIME ? (r(), S(le, F({
|
|
785
791
|
key: 7,
|
|
786
792
|
modelValue: c.value,
|
|
787
|
-
"onUpdate:modelValue":
|
|
793
|
+
"onUpdate:modelValue": g[8] || (g[8] = (n) => c.value = n),
|
|
788
794
|
"arrow-control": ""
|
|
789
795
|
}, e.value, {
|
|
790
|
-
placeholder:
|
|
796
|
+
placeholder: O.value[o.value].label
|
|
791
797
|
}), null, 16, ["modelValue", "placeholder"])) : s.value == L(ye).TIMESELECT ? (r(), S(de, F({
|
|
792
798
|
key: 8,
|
|
793
799
|
modelValue: c.value,
|
|
794
|
-
"onUpdate:modelValue":
|
|
800
|
+
"onUpdate:modelValue": g[9] || (g[9] = (n) => c.value = n),
|
|
795
801
|
start: "06:30",
|
|
796
802
|
step: "00:15",
|
|
797
803
|
end: "23:30",
|
|
798
|
-
placeholder:
|
|
799
|
-
}, e.value), null, 16, ["modelValue", "placeholder"])) : _(s.value) ? (r(), S(
|
|
804
|
+
placeholder: O.value[o.value].label
|
|
805
|
+
}, e.value), null, 16, ["modelValue", "placeholder"])) : _(s.value) ? (r(), S(B, F({
|
|
800
806
|
key: 9,
|
|
801
807
|
modelValue: c.value,
|
|
802
|
-
"onUpdate:modelValue":
|
|
808
|
+
"onUpdate:modelValue": g[10] || (g[10] = (n) => c.value = n),
|
|
803
809
|
type: s.value,
|
|
804
|
-
placeholder:
|
|
810
|
+
placeholder: O.value[o.value].label,
|
|
805
811
|
"value-format": z(s.value)
|
|
806
812
|
}, e.value), ve({ _: 2 }, [
|
|
807
813
|
I($(), (n) => ({
|
|
@@ -810,22 +816,22 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
810
816
|
p(V.$slots, `${t.t}-${o.value}-${n}`, { data: G })
|
|
811
817
|
])
|
|
812
818
|
}))
|
|
813
|
-
]), 1040, ["modelValue", "type", "placeholder", "value-format"])) : s.value == L(ye).COLOR ? (r(), S(
|
|
819
|
+
]), 1040, ["modelValue", "type", "placeholder", "value-format"])) : s.value == L(ye).COLOR ? (r(), S(b, F({
|
|
814
820
|
key: 10,
|
|
815
821
|
modelValue: c.value,
|
|
816
|
-
"onUpdate:modelValue":
|
|
822
|
+
"onUpdate:modelValue": g[11] || (g[11] = (n) => c.value = n)
|
|
817
823
|
}, e.value), null, 16, ["modelValue"])) : s.value == L(ye).RATE ? (r(), S(h, F({
|
|
818
824
|
key: 11,
|
|
819
825
|
modelValue: c.value,
|
|
820
|
-
"onUpdate:modelValue":
|
|
826
|
+
"onUpdate:modelValue": g[12] || (g[12] = (n) => c.value = n)
|
|
821
827
|
}, e.value), null, 16, ["modelValue"])) : s.value == L(ye).SLIDER ? (r(), S(M, F({
|
|
822
828
|
key: 12,
|
|
823
829
|
modelValue: c.value,
|
|
824
|
-
"onUpdate:modelValue":
|
|
830
|
+
"onUpdate:modelValue": g[13] || (g[13] = (n) => c.value = n)
|
|
825
831
|
}, e.value), null, 16, ["modelValue"])) : s.value == L(ye).SWITCH ? (r(), S(u, F({
|
|
826
832
|
key: 13,
|
|
827
833
|
modelValue: c.value,
|
|
828
|
-
"onUpdate:modelValue":
|
|
834
|
+
"onUpdate:modelValue": g[14] || (g[14] = (n) => c.value = n)
|
|
829
835
|
}, e.value), ve({ _: 2 }, [
|
|
830
836
|
I($(), (n) => ({
|
|
831
837
|
name: n,
|
|
@@ -836,7 +842,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
836
842
|
]), 1040, ["modelValue"])) : s.value == L(ye).TRANSFER ? (r(), S(i, F({
|
|
837
843
|
key: 14,
|
|
838
844
|
modelValue: c.value,
|
|
839
|
-
"onUpdate:modelValue":
|
|
845
|
+
"onUpdate:modelValue": g[15] || (g[15] = (n) => c.value = n)
|
|
840
846
|
}, e.value), ve({ _: 2 }, [
|
|
841
847
|
I($(), (n) => ({
|
|
842
848
|
name: n,
|
|
@@ -844,10 +850,10 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
844
850
|
p(V.$slots, `${t.t}-${o.value}-${n}`, { data: G })
|
|
845
851
|
])
|
|
846
852
|
}))
|
|
847
|
-
]), 1040, ["modelValue"])) : s.value == L(ye).CASCADER ? (r(), S(
|
|
853
|
+
]), 1040, ["modelValue"])) : s.value == L(ye).CASCADER ? (r(), S(A, F({
|
|
848
854
|
key: 15,
|
|
849
855
|
modelValue: c.value,
|
|
850
|
-
"onUpdate:modelValue":
|
|
856
|
+
"onUpdate:modelValue": g[16] || (g[16] = (n) => c.value = n)
|
|
851
857
|
}, e.value, { options: T.value }), ve({ _: 2 }, [
|
|
852
858
|
I($(), (n) => ({
|
|
853
859
|
name: n,
|
|
@@ -858,7 +864,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
858
864
|
]), 1040, ["modelValue", "options"])) : s.value == L(ye).IMAGE ? (r(), S(ee, Je(F({ key: 16 }, e.value)), ve({
|
|
859
865
|
default: v(() => [
|
|
860
866
|
Z(N, { type: "primary" }, {
|
|
861
|
-
default: v(() =>
|
|
867
|
+
default: v(() => g[23] || (g[23] = [
|
|
862
868
|
_e("点击上传")
|
|
863
869
|
])),
|
|
864
870
|
_: 1
|
|
@@ -875,9 +881,9 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
875
881
|
]), 1040)) : s.value == L(ye).AUTOCOMPLETE ? (r(), S(ue, F({
|
|
876
882
|
key: 17,
|
|
877
883
|
modelValue: c.value,
|
|
878
|
-
"onUpdate:modelValue":
|
|
884
|
+
"onUpdate:modelValue": g[17] || (g[17] = (n) => c.value = n)
|
|
879
885
|
}, e.value, {
|
|
880
|
-
placeholder:
|
|
886
|
+
placeholder: O.value[o.value].label
|
|
881
887
|
}), ve({ _: 2 }, [
|
|
882
888
|
I($(), (n, G) => ({
|
|
883
889
|
name: n,
|
|
@@ -888,10 +894,10 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
888
894
|
]), 1040, ["modelValue", "placeholder"])) : s.value == L(ye).INPUTNUMBER ? (r(), S(pe, F({
|
|
889
895
|
key: 18,
|
|
890
896
|
modelValue: c.value,
|
|
891
|
-
"onUpdate:modelValue":
|
|
897
|
+
"onUpdate:modelValue": g[18] || (g[18] = (n) => c.value = n),
|
|
892
898
|
min: 0,
|
|
893
899
|
max: 1e8,
|
|
894
|
-
placeholder:
|
|
900
|
+
placeholder: O.value[o.value].label
|
|
895
901
|
}, e.value), ve({ _: 2 }, [
|
|
896
902
|
I($(), (n, G) => ({
|
|
897
903
|
name: n,
|
|
@@ -902,8 +908,8 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
902
908
|
]), 1040, ["modelValue", "placeholder"])) : s.value == L(ye).MONEY ? (r(), q("div", Ht, [
|
|
903
909
|
Z(he, F({
|
|
904
910
|
modelValue: c.value,
|
|
905
|
-
"onUpdate:modelValue":
|
|
906
|
-
placeholder:
|
|
911
|
+
"onUpdate:modelValue": g[19] || (g[19] = (n) => c.value = n),
|
|
912
|
+
placeholder: O.value[o.value].label,
|
|
907
913
|
type: L(ye).NUMBER,
|
|
908
914
|
maxlength: ((Me = e.value) == null ? void 0 : Me.max) || 25
|
|
909
915
|
}, { ...e.value, type: s.value }), ve({
|
|
@@ -951,10 +957,13 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
951
957
|
}), null, 16, Gt)) : (r(), S(he, F({
|
|
952
958
|
key: 24,
|
|
953
959
|
modelValue: c.value,
|
|
954
|
-
"onUpdate:modelValue":
|
|
955
|
-
placeholder:
|
|
960
|
+
"onUpdate:modelValue": g[20] || (g[20] = (n) => c.value = n),
|
|
961
|
+
placeholder: O.value[o.value].label,
|
|
956
962
|
maxlength: (($e = e.value) == null ? void 0 : $e.max) || 25,
|
|
957
|
-
clearable: !0
|
|
963
|
+
clearable: !0,
|
|
964
|
+
onClear: g[21] || (g[21] = () => {
|
|
965
|
+
t.t == "q" && O.value.table.load();
|
|
966
|
+
})
|
|
958
967
|
}, { ...e.value, type: s.value }), ve({ _: 2 }, [
|
|
959
968
|
I($(), (n, G) => ({
|
|
960
969
|
name: n,
|
|
@@ -977,8 +986,8 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
977
986
|
},
|
|
978
987
|
emits: /* @__PURE__ */ Ye(["submit", "reset"], ["update:modelValue"]),
|
|
979
988
|
setup(f, { emit: c }) {
|
|
980
|
-
var se, ie,
|
|
981
|
-
const t = Ue(f, "modelValue"), e = c, o = me(null), s = st("options"),
|
|
989
|
+
var se, ie, te, fe;
|
|
990
|
+
const t = Ue(f, "modelValue"), e = c, o = me(null), s = st("options"), O = {
|
|
982
991
|
inline: !0,
|
|
983
992
|
type: "hidden",
|
|
984
993
|
"scroll-to-error": !0,
|
|
@@ -1030,7 +1039,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1030
1039
|
}
|
|
1031
1040
|
};
|
|
1032
1041
|
t.value.form = Te(
|
|
1033
|
-
|
|
1042
|
+
O,
|
|
1034
1043
|
s == null ? void 0 : s.form,
|
|
1035
1044
|
(ie = t.value) == null ? void 0 : ie.form
|
|
1036
1045
|
);
|
|
@@ -1058,7 +1067,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1058
1067
|
t.value.formItems = Te(
|
|
1059
1068
|
T,
|
|
1060
1069
|
s == null ? void 0 : s.formItems,
|
|
1061
|
-
(
|
|
1070
|
+
(te = t == null ? void 0 : t.value) == null ? void 0 : te.formItems
|
|
1062
1071
|
);
|
|
1063
1072
|
const $ = {
|
|
1064
1073
|
span: 12,
|
|
@@ -1084,38 +1093,38 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1084
1093
|
validate: void 0
|
|
1085
1094
|
}, ...d };
|
|
1086
1095
|
y.required && C.push({ required: !0, message: `${y.label}不能为空!`, trigger: "blur" }), y.max && y.min && C.push({
|
|
1087
|
-
validator: (Y,
|
|
1088
|
-
|
|
1096
|
+
validator: (Y, le, de) => {
|
|
1097
|
+
le && d.type == "number" && (le < y.min || le > y.max) ? de(new Error(`${y.label} 必须在 ${y.min} 和 ${y.max} 之间!`)) : le && d.type !== "number" && (le.toString().length < y.min || le.toString().length > y.max) ? de(new Error(`字符长度必须在 ${y.min} 和 ${y.max} 之间!`)) : de();
|
|
1089
1098
|
}
|
|
1090
1099
|
}), y.max && !y.min && d.type == "number" && C.push({
|
|
1091
|
-
validator: (Y,
|
|
1092
|
-
|
|
1100
|
+
validator: (Y, le, de) => {
|
|
1101
|
+
le && le > y.max ? de(new Error(`${y.label}不能大于${y.max}!`)) : de();
|
|
1093
1102
|
}
|
|
1094
1103
|
}), y.min && !y.max && d.type == "number" && C.push({
|
|
1095
|
-
validator: (Y,
|
|
1096
|
-
|
|
1104
|
+
validator: (Y, le, de) => {
|
|
1105
|
+
le && le < y.min ? de(new Error(`${y.label}不能小于${y.min}!`)) : de();
|
|
1097
1106
|
}
|
|
1098
1107
|
}), y.type == "email" && C.push({ type: "email", message: "不是一个正确的邮箱地址!" }), y.type == "url" && C.push({ type: "url", message: "不是一个合正确的URL!" }), y.pattern && C.push({ pattern: y == null ? void 0 : y.pattern, message: (y == null ? void 0 : y.message) || "格式不正确!" }), y.validate && C.push({
|
|
1099
|
-
validator: (Y,
|
|
1108
|
+
validator: (Y, le, de) => y.validate(Y, le, de)
|
|
1100
1109
|
});
|
|
1101
1110
|
}
|
|
1102
1111
|
return C;
|
|
1103
1112
|
}, z = (d, C = !1) => {
|
|
1104
|
-
var Y,
|
|
1113
|
+
var Y, le, de, B, b;
|
|
1105
1114
|
const k = C ? d : d == null ? void 0 : d.item, y = typeof (k == null ? void 0 : k.editor) == "function" ? k.editor(H.value, (Y = t.value.form) == null ? void 0 : Y.modalState) : (k == null ? void 0 : k.editor) || {};
|
|
1106
|
-
if (((
|
|
1115
|
+
if (((le = t.value.form) == null ? void 0 : le.modalState) === "edit") {
|
|
1107
1116
|
const h = typeof (k == null ? void 0 : k.editor) == "object" ? (de = k.editor) == null ? void 0 : de.ep : typeof (k == null ? void 0 : k.editor) == "function" ? y == null ? void 0 : y.ep : {};
|
|
1108
1117
|
return { ...y, ...h };
|
|
1109
1118
|
}
|
|
1110
|
-
if (((
|
|
1111
|
-
const h = typeof (k == null ? void 0 : k.editor) == "object" ? (
|
|
1119
|
+
if (((B = t.value.form) == null ? void 0 : B.modalState) === "add") {
|
|
1120
|
+
const h = typeof (k == null ? void 0 : k.editor) == "object" ? (b = k.editor) == null ? void 0 : b.ap : typeof (k == null ? void 0 : k.editor) == "function" ? y == null ? void 0 : y.ap : {};
|
|
1112
1121
|
return { ...y, ...h };
|
|
1113
1122
|
}
|
|
1114
1123
|
return y;
|
|
1115
1124
|
}, re = (d) => {
|
|
1116
|
-
var k, y, Y,
|
|
1125
|
+
var k, y, Y, le, de;
|
|
1117
1126
|
const C = typeof d.editor == "function" ? d.editor(H.value, (k = t.value.form) == null ? void 0 : k.modalState) : d.editor;
|
|
1118
|
-
return ((y = t.value.form) == null ? void 0 : y.modalState) === "edit" ? ((Y = C == null ? void 0 : C.ep) == null ? void 0 : Y.type) ?? (C == null ? void 0 : C.type) ?? d.type : ((
|
|
1127
|
+
return ((y = t.value.form) == null ? void 0 : y.modalState) === "edit" ? ((Y = C == null ? void 0 : C.ep) == null ? void 0 : Y.type) ?? (C == null ? void 0 : C.type) ?? d.type : ((le = t.value.form) == null ? void 0 : le.modalState) === "add" ? ((de = C == null ? void 0 : C.ap) == null ? void 0 : de.type) ?? (C == null ? void 0 : C.type) ?? d.type : (C == null ? void 0 : C.type) ?? d.type;
|
|
1119
1128
|
};
|
|
1120
1129
|
ze(() => {
|
|
1121
1130
|
R();
|
|
@@ -1142,7 +1151,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1142
1151
|
}), d.forEach((C) => {
|
|
1143
1152
|
C.tabPane = Te(...C.items.map(({ item: k }) => k.tabPane || {}));
|
|
1144
1153
|
}), Array.from(d.values());
|
|
1145
|
-
}),
|
|
1154
|
+
}), g = [
|
|
1146
1155
|
{
|
|
1147
1156
|
name: "f-submit",
|
|
1148
1157
|
label: t.value.form.submit.label,
|
|
@@ -1165,20 +1174,20 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1165
1174
|
originalOrder: 1
|
|
1166
1175
|
// 添加原始顺序标识
|
|
1167
1176
|
}
|
|
1168
|
-
], K = je(() =>
|
|
1177
|
+
], K = je(() => g.filter((d) => !d.hidden).sort((d, C) => d.sort - C.sort || d.originalOrder - C.originalOrder));
|
|
1169
1178
|
return (d, C) => {
|
|
1170
|
-
const k = j("el-form-item"), y = j("el-col"), Y = j("el-tab-pane"),
|
|
1171
|
-
return r(), S(
|
|
1179
|
+
const k = j("el-form-item"), y = j("el-col"), Y = j("el-tab-pane"), le = j("el-tabs"), de = j("el-button"), B = j("el-form");
|
|
1180
|
+
return r(), S(B, F({
|
|
1172
1181
|
ref_key: "gform",
|
|
1173
1182
|
ref: o,
|
|
1174
1183
|
model: t.value,
|
|
1175
1184
|
style: { width: "98%", padding: 0, margin: 0, "box-sizing": "border-box" }
|
|
1176
|
-
}, L(ke)(t.value.form, (
|
|
1185
|
+
}, L(ke)(t.value.form, (b) => !["footer", "submit", "reset", "slots", "type", "sort"].includes(b)), { class: "g-form-container" }), {
|
|
1177
1186
|
default: v(() => [
|
|
1178
1187
|
V.value.length > 0 ? p(d.$slots, "default", { key: 0 }, () => {
|
|
1179
|
-
var
|
|
1188
|
+
var b, h, M;
|
|
1180
1189
|
return [
|
|
1181
|
-
Z(
|
|
1190
|
+
Z(le, F({
|
|
1182
1191
|
class: "demo-tabs",
|
|
1183
1192
|
modelValue: V.value[0].groupName,
|
|
1184
1193
|
"onUpdate:modelValue": C[0] || (C[0] = (u) => V.value[0].groupName = u),
|
|
@@ -1193,7 +1202,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1193
1202
|
ref_for: !0
|
|
1194
1203
|
}, u.tabPane), {
|
|
1195
1204
|
default: v(() => [
|
|
1196
|
-
(r(!0), q(P, null, I(u.items, (i,
|
|
1205
|
+
(r(!0), q(P, null, I(u.items, (i, A) => (r(), S(y, F({ ref_for: !0 }, { ...t.value.form.cols, ...i == null ? void 0 : i.item.col }, {
|
|
1197
1206
|
key: i.key,
|
|
1198
1207
|
style: { width: "100%" }
|
|
1199
1208
|
}), {
|
|
@@ -1249,7 +1258,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1249
1258
|
]),
|
|
1250
1259
|
_: 3
|
|
1251
1260
|
}, 16, ["modelValue"]),
|
|
1252
|
-
(M = (h = (
|
|
1261
|
+
(M = (h = (b = t.value) == null ? void 0 : b.form) == null ? void 0 : h.footer) != null && M.hidden ? be("", !0) : p(d.$slots, "f-footer", { key: 0 }, () => [
|
|
1253
1262
|
J("div", {
|
|
1254
1263
|
style: Ae(t.value.form.footer.style)
|
|
1255
1264
|
}, [
|
|
@@ -1273,21 +1282,21 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1273
1282
|
])
|
|
1274
1283
|
];
|
|
1275
1284
|
}) : p(d.$slots, "default", { key: 1 }, () => {
|
|
1276
|
-
var
|
|
1285
|
+
var b, h, M;
|
|
1277
1286
|
return [
|
|
1278
1287
|
(r(!0), q(P, null, I(E.value, (u, i) => (r(), S(y, F({ ref_for: !0 }, { ...t.value.form.cols, ...u.col }, {
|
|
1279
1288
|
key: i,
|
|
1280
1289
|
style: { width: "100%" }
|
|
1281
1290
|
}), {
|
|
1282
1291
|
default: v(() => {
|
|
1283
|
-
var
|
|
1292
|
+
var A;
|
|
1284
1293
|
return [
|
|
1285
1294
|
Z(k, F({
|
|
1286
1295
|
label: u.label,
|
|
1287
1296
|
prop: `${i}.value`,
|
|
1288
1297
|
rules: _(u),
|
|
1289
1298
|
ref_for: !0
|
|
1290
|
-
}, { ...(
|
|
1299
|
+
}, { ...(A = t.value) == null ? void 0 : A.formItems, ...u == null ? void 0 : u.formItem }, { style: { width: "100%" } }), {
|
|
1291
1300
|
label: v((N) => [
|
|
1292
1301
|
p(d.$slots, `f-${i}-label`, {
|
|
1293
1302
|
data: N,
|
|
@@ -1334,7 +1343,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1334
1343
|
}),
|
|
1335
1344
|
_: 2
|
|
1336
1345
|
}, 1040))), 128)),
|
|
1337
|
-
(M = (h = (
|
|
1346
|
+
(M = (h = (b = t.value) == null ? void 0 : b.form) == null ? void 0 : h.footer) != null && M.hidden ? be("", !0) : p(d.$slots, "f-footer", { key: 0 }, () => [
|
|
1338
1347
|
J("div", {
|
|
1339
1348
|
style: Ae(t.value.form.footer.style)
|
|
1340
1349
|
}, [
|
|
@@ -1373,7 +1382,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1373
1382
|
}),
|
|
1374
1383
|
emits: ["update:modelValue", "update:info"],
|
|
1375
1384
|
setup(f) {
|
|
1376
|
-
const c = Ue(f, "modelValue"), t = f, e = Ue(f, "info"), o = (D) => je(() => Object.fromEntries(Object.entries(c.value).filter((T) => typeof T[1].search == "function" ? T[1].search && T[1].search(e.value, c.value.table).more === D : T[1].search && T[1].search.more === D).map((T) => [T[0], T[1]]))).value, s = (D) => typeof D.search == "function" ? D.search(e.value, c.value.table) : D.search || {},
|
|
1385
|
+
const c = Ue(f, "modelValue"), t = f, e = Ue(f, "info"), o = (D) => je(() => Object.fromEntries(Object.entries(c.value).filter((T) => typeof T[1].search == "function" ? T[1].search && T[1].search(e.value, c.value.table).more === D : T[1].search && T[1].search.more === D).map((T) => [T[0], T[1]]))).value, s = (D) => typeof D.search == "function" ? D.search(e.value, c.value.table) : D.search || {}, O = (D) => {
|
|
1377
1386
|
const T = s(D);
|
|
1378
1387
|
return (T == null ? void 0 : T.type) || D.type;
|
|
1379
1388
|
};
|
|
@@ -1401,7 +1410,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1401
1410
|
"onUpdate:modelValue": (re) => e.value[z] = re,
|
|
1402
1411
|
item: { ..._ == null ? void 0 : _.editor, ...s(_) },
|
|
1403
1412
|
ctrlKey: z,
|
|
1404
|
-
ctrlType:
|
|
1413
|
+
ctrlType: O(_),
|
|
1405
1414
|
model: c.value,
|
|
1406
1415
|
t: "q",
|
|
1407
1416
|
formInfo: e.value
|
|
@@ -1440,8 +1449,8 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1440
1449
|
emits: /* @__PURE__ */ Ye(["query", "reset"], ["update:modelValue"]),
|
|
1441
1450
|
setup(f, { emit: c }) {
|
|
1442
1451
|
const t = Ue(f, "modelValue"), e = c, o = st("options"), s = me(!1);
|
|
1443
|
-
let
|
|
1444
|
-
const D = me(
|
|
1452
|
+
let O = Object.fromEntries(Object.entries(t.value).filter((E) => E[1].search).map(([E, H]) => [E, H.value]));
|
|
1453
|
+
const D = me(O), T = {
|
|
1445
1454
|
hidden: !1,
|
|
1446
1455
|
type: "hidden",
|
|
1447
1456
|
labelWidth: 100,
|
|
@@ -1467,7 +1476,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1467
1476
|
hidden: !1,
|
|
1468
1477
|
plain: !1,
|
|
1469
1478
|
click: () => {
|
|
1470
|
-
D.value = me(
|
|
1479
|
+
D.value = me(O), e("reset", D.value);
|
|
1471
1480
|
}
|
|
1472
1481
|
},
|
|
1473
1482
|
query: {
|
|
@@ -1520,23 +1529,23 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1520
1529
|
};
|
|
1521
1530
|
t.value.queryItems = Te(_, o == null ? void 0 : o.queryItems, t.value.queryItems);
|
|
1522
1531
|
const z = (E, H) => {
|
|
1523
|
-
const V = Object.keys(E.slots).filter((
|
|
1532
|
+
const V = Object.keys(E.slots).filter((g) => g !== "default").reduce((g, K) => (g[K] = (se) => E.slots[K]({
|
|
1524
1533
|
model: t.value
|
|
1525
1534
|
// 传递当前模型数据
|
|
1526
|
-
}),
|
|
1527
|
-
return
|
|
1535
|
+
}), g), {});
|
|
1536
|
+
return xe(vt, {
|
|
1528
1537
|
modelValue: t.value,
|
|
1529
|
-
"onUpdate:modelValue": (
|
|
1538
|
+
"onUpdate:modelValue": (g) => t.value = g,
|
|
1530
1539
|
info: D.value,
|
|
1531
|
-
"onUpdate:info": (
|
|
1540
|
+
"onUpdate:info": (g) => D.value = g,
|
|
1532
1541
|
more: H
|
|
1533
1542
|
}, V);
|
|
1534
1543
|
}, re = gt(), R = () => {
|
|
1535
|
-
var V,
|
|
1544
|
+
var V, g, K, se, ie, te, fe, d, C;
|
|
1536
1545
|
const E = [
|
|
1537
1546
|
{
|
|
1538
1547
|
key: "query",
|
|
1539
|
-
hidden: (K = (
|
|
1548
|
+
hidden: (K = (g = (V = t.value) == null ? void 0 : V.query) == null ? void 0 : g.query) == null ? void 0 : K.hidden,
|
|
1540
1549
|
component: Ve,
|
|
1541
1550
|
props: {
|
|
1542
1551
|
...t.value.query.query,
|
|
@@ -1547,7 +1556,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1547
1556
|
},
|
|
1548
1557
|
{
|
|
1549
1558
|
key: "reset",
|
|
1550
|
-
hidden: (
|
|
1559
|
+
hidden: (te = (ie = (se = t.value) == null ? void 0 : se.query) == null ? void 0 : ie.reset) == null ? void 0 : te.hidden,
|
|
1551
1560
|
component: Ve,
|
|
1552
1561
|
props: {
|
|
1553
1562
|
...t.value.query.reset,
|
|
@@ -1566,20 +1575,20 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1566
1575
|
},
|
|
1567
1576
|
label: t.value.query.more.label,
|
|
1568
1577
|
sort: t.value.query.more.sort || 0,
|
|
1569
|
-
content: t.value.query.more.mode === 3 ? () =>
|
|
1578
|
+
content: t.value.query.more.mode === 3 ? () => xe(Qe, {
|
|
1570
1579
|
class: "query-form",
|
|
1571
1580
|
...ke(t.value.query, (k) => !["query", "more", "reset"].includes(k))
|
|
1572
1581
|
}, () => z({ slots: re }, !0)) : null
|
|
1573
1582
|
}
|
|
1574
1583
|
];
|
|
1575
|
-
return E.sort((k, y) => k.sort - y.sort), E.filter((k) => !k.hidden).map((k) => k.key === "more" && k.component === lt ?
|
|
1576
|
-
reference: () =>
|
|
1584
|
+
return E.sort((k, y) => k.sort - y.sort), E.filter((k) => !k.hidden).map((k) => k.key === "more" && k.component === lt ? xe(lt, k.props, {
|
|
1585
|
+
reference: () => xe(Ve, t.value.query.more, () => k.label),
|
|
1577
1586
|
default: k.content
|
|
1578
|
-
}) : (k.props.slot = "query-" + k.key, k.label ?
|
|
1587
|
+
}) : (k.props.slot = "query-" + k.key, k.label ? xe(k.component, k.props, () => k.label) : xe(k.component, k.props)));
|
|
1579
1588
|
};
|
|
1580
1589
|
return (E, H) => {
|
|
1581
|
-
var K, se, ie,
|
|
1582
|
-
const V = j("el-form-item"),
|
|
1590
|
+
var K, se, ie, te, fe, d, C, k, y, Y, le, de, B, b, h, M, u;
|
|
1591
|
+
const V = j("el-form-item"), g = j("el-drawer");
|
|
1583
1592
|
return r(), q(P, null, [
|
|
1584
1593
|
J("div", {
|
|
1585
1594
|
class: "g-query-container",
|
|
@@ -1587,10 +1596,10 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1587
1596
|
}, [
|
|
1588
1597
|
Z(L(Qe), Je(pt(L(ke)(t.value.query, (i) => !["query", "more", "reset", "btns"].includes(i)))), {
|
|
1589
1598
|
default: v(() => {
|
|
1590
|
-
var i,
|
|
1599
|
+
var i, A;
|
|
1591
1600
|
return [
|
|
1592
1601
|
(r(), S(Ie(z({ slots: E.$slots }, void 0)))),
|
|
1593
|
-
((
|
|
1602
|
+
((A = (i = t.value.query) == null ? void 0 : i.container) == null ? void 0 : A.inline) === !0 ? (r(), S(V, { key: 0 }, {
|
|
1594
1603
|
default: v(() => {
|
|
1595
1604
|
var N, ee, ue, pe, he;
|
|
1596
1605
|
return [
|
|
@@ -1627,7 +1636,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1627
1636
|
}),
|
|
1628
1637
|
_: 3
|
|
1629
1638
|
}, 16),
|
|
1630
|
-
((fe = (
|
|
1639
|
+
((fe = (te = (ie = t.value) == null ? void 0 : ie.query) == null ? void 0 : te.container) == null ? void 0 : fe.inline) === !1 ? (r(), q("div", {
|
|
1631
1640
|
key: 0,
|
|
1632
1641
|
style: Ae((C = (d = t.value.query) == null ? void 0 : d.btns) == null ? void 0 : C.style)
|
|
1633
1642
|
}, [
|
|
@@ -1654,7 +1663,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1654
1663
|
], 64))
|
|
1655
1664
|
], 4)) : be("", !0)
|
|
1656
1665
|
], 4),
|
|
1657
|
-
s.value && !((de = (
|
|
1666
|
+
s.value && !((de = (le = (Y = t.value) == null ? void 0 : Y.query) == null ? void 0 : le.more) != null && de.hidden) && t.value.query.more.mode == 2 ? (r(), S(g, F({
|
|
1658
1667
|
key: 0,
|
|
1659
1668
|
modelValue: s.value,
|
|
1660
1669
|
"onUpdate:modelValue": H[4] || (H[4] = (i) => s.value = i),
|
|
@@ -1671,10 +1680,10 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1671
1680
|
"onUpdate:info": H[1] || (H[1] = (i) => D.value = i),
|
|
1672
1681
|
more: !0
|
|
1673
1682
|
}, ve({ _: 2 }, [
|
|
1674
|
-
I(E.$slots, (i,
|
|
1675
|
-
name:
|
|
1683
|
+
I(E.$slots, (i, A, N) => ({
|
|
1684
|
+
name: A,
|
|
1676
1685
|
fn: v((ee) => [
|
|
1677
|
-
p(E.$slots,
|
|
1686
|
+
p(E.$slots, A, { model: t.value }, void 0, !0)
|
|
1678
1687
|
])
|
|
1679
1688
|
}))
|
|
1680
1689
|
]), 1032, ["modelValue", "info"])
|
|
@@ -1684,7 +1693,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1684
1693
|
]),
|
|
1685
1694
|
_: 2
|
|
1686
1695
|
}, [
|
|
1687
|
-
(u = (M = (h = (
|
|
1696
|
+
(u = (M = (h = (b = (B = t.value) == null ? void 0 : B.query) == null ? void 0 : b.more) == null ? void 0 : h.dialog) == null ? void 0 : M.footer) != null && u.hidden ? void 0 : {
|
|
1688
1697
|
name: "footer",
|
|
1689
1698
|
fn: v(() => [
|
|
1690
1699
|
J("div", Je(pt(t.value.query.more.dialog.footer)), [
|
|
@@ -1715,9 +1724,9 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1715
1724
|
style: { padding: "10px" }
|
|
1716
1725
|
}, {
|
|
1717
1726
|
default: v(() => {
|
|
1718
|
-
var i,
|
|
1727
|
+
var i, A, N;
|
|
1719
1728
|
return [
|
|
1720
|
-
s.value && !((N = (
|
|
1729
|
+
s.value && !((N = (A = (i = t.value) == null ? void 0 : i.query) == null ? void 0 : A.more) != null && N.hidden) && t.value.query.more.mode == 1 ? (r(), q("div", Qt, [
|
|
1721
1730
|
J("div", Xt, [
|
|
1722
1731
|
t.value.query.more.mode == 1 ? Tt((r(), S(L(Qe), Je(F({ key: 0 }, L(ke)(t.value.query, (ee) => !["query", "more", "reset"].includes(ee)))), {
|
|
1723
1732
|
default: v(() => [
|
|
@@ -1751,7 +1760,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1751
1760
|
o.value.forEach((T) => {
|
|
1752
1761
|
T.value = !0;
|
|
1753
1762
|
});
|
|
1754
|
-
},
|
|
1763
|
+
}, O = () => {
|
|
1755
1764
|
o.value.forEach((T) => {
|
|
1756
1765
|
T.value = !1;
|
|
1757
1766
|
});
|
|
@@ -1791,7 +1800,7 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1791
1800
|
}, "全选"),
|
|
1792
1801
|
Z(_, { direction: "vertical" }),
|
|
1793
1802
|
J("a", {
|
|
1794
|
-
onClick:
|
|
1803
|
+
onClick: O,
|
|
1795
1804
|
style: { cursor: "pointer" }
|
|
1796
1805
|
}, "全不选")
|
|
1797
1806
|
]),
|
|
@@ -1838,36 +1847,36 @@ const at = /* @__PURE__ */ jt(Lt), Rt = {
|
|
|
1838
1847
|
]);
|
|
1839
1848
|
};
|
|
1840
1849
|
}
|
|
1841
|
-
}, ul = /* @__PURE__ */ Le(rl, [["__scopeId", "data-v-51dfb7ef"]]),
|
|
1842
|
-
|
|
1850
|
+
}, ul = /* @__PURE__ */ Le(rl, [["__scopeId", "data-v-51dfb7ef"]]), Oe = new It("gyc");
|
|
1851
|
+
Oe.version(1).stores({
|
|
1843
1852
|
tableInfo: "++id,[user+page+key],user,page,key,showCol,width,sort",
|
|
1844
1853
|
tableList: "++id,name"
|
|
1845
1854
|
});
|
|
1846
1855
|
async function Pe(f, c, t, e = {}) {
|
|
1847
|
-
if (await
|
|
1848
|
-
let s = await
|
|
1849
|
-
return await
|
|
1856
|
+
if (await Oe.tableInfo.where({ user: f, page: c, key: t }).count() > 0) {
|
|
1857
|
+
let s = await Oe.tableInfo.where({ user: f, page: c, key: t }).first();
|
|
1858
|
+
return await Oe.tableInfo.put({ ...s, ...e }), "update success";
|
|
1850
1859
|
} else {
|
|
1851
1860
|
let s = { showCol: !0, width: "auto", sort: 0, ...e };
|
|
1852
|
-
return await
|
|
1861
|
+
return await Oe.tableInfo.add({ user: f, page: c, key: t, ...s }), "add success";
|
|
1853
1862
|
}
|
|
1854
1863
|
}
|
|
1855
1864
|
async function nl(f, c) {
|
|
1856
|
-
return await
|
|
1865
|
+
return await Oe.tableInfo.where({ user: f, page: c }).toArray();
|
|
1857
1866
|
}
|
|
1858
1867
|
async function sl(f, c) {
|
|
1859
1868
|
try {
|
|
1860
|
-
const t = await
|
|
1869
|
+
const t = await Oe.tableInfo.where({ user: f, page: c }).delete();
|
|
1861
1870
|
return console.log("删除了" + t + "条数据"), t;
|
|
1862
1871
|
} catch (t) {
|
|
1863
1872
|
throw console.error("删除表格项设置信息时出错:", t), t;
|
|
1864
1873
|
}
|
|
1865
1874
|
}
|
|
1866
1875
|
async function il(f) {
|
|
1867
|
-
return await
|
|
1876
|
+
return await Oe.tableList.where({ name: f }).first();
|
|
1868
1877
|
}
|
|
1869
1878
|
async function dl(f) {
|
|
1870
|
-
return typeof f == "string" && (f = { name: f }), await
|
|
1879
|
+
return typeof f == "string" && (f = { name: f }), await Oe.tableList.add(f), "add success";
|
|
1871
1880
|
}
|
|
1872
1881
|
const cl = {
|
|
1873
1882
|
style: { margin: "10px" },
|
|
@@ -1924,7 +1933,7 @@ const cl = {
|
|
|
1924
1933
|
}
|
|
1925
1934
|
});
|
|
1926
1935
|
}
|
|
1927
|
-
},
|
|
1936
|
+
}, O = async () => {
|
|
1928
1937
|
try {
|
|
1929
1938
|
for (const $ of t.value) {
|
|
1930
1939
|
$.showCol = !0, e.value[$.value].showCol = !0;
|
|
@@ -1988,7 +1997,7 @@ const cl = {
|
|
|
1988
1997
|
const z = j("el-divider"), re = j("el-alert"), R = j("el-checkbox");
|
|
1989
1998
|
return r(), q("div", null, [
|
|
1990
1999
|
J("div", cl, [
|
|
1991
|
-
J("a", { onClick:
|
|
2000
|
+
J("a", { onClick: O }, "全选"),
|
|
1992
2001
|
Z(z, { direction: "vertical" }),
|
|
1993
2002
|
J("a", { onClick: D }, "全不选"),
|
|
1994
2003
|
Z(z, { direction: "vertical" }),
|
|
@@ -2049,8 +2058,8 @@ const cl = {
|
|
|
2049
2058
|
emits: /* @__PURE__ */ Ye(["load", "open", "delete", "submit", "reset", "download", "row-save"], ["update:modelValue"]),
|
|
2050
2059
|
setup(f, { emit: c }) {
|
|
2051
2060
|
var Se, Me, $e, n, G, ce, Be;
|
|
2052
|
-
const t = c, e = Ue(f, "modelValue"), o = st("options"), s = me({}),
|
|
2053
|
-
s.value = Object.fromEntries(
|
|
2061
|
+
const t = c, e = Ue(f, "modelValue"), o = st("options"), s = me({}), O = Object.entries(e.value).filter(([l, a]) => (a == null ? void 0 : a.search) !== void 0).map(([l, a]) => [l, a.value]);
|
|
2062
|
+
s.value = Object.fromEntries(O);
|
|
2054
2063
|
const D = me(!1), T = ["type", "index", "label", "column-key", "prop", "width", "min-width", "fixed", "render-header", "sortable", "sort-method", "sort-by", "sort-orders", "resizable", "formatter", "show-overflow-tooltip", "align", "header-align", "class-name", "label-class-name", "selectable", "reserve-selection", "filters", "filter-placement", "filter-class-name", "filter-multiple", "filter-method", "filtered-value"], $ = me([]), _ = f, z = it(), re = me({}), R = me([]), E = me(null), H = me(""), V = {
|
|
2055
2064
|
autoWatch: !1,
|
|
2056
2065
|
data: [],
|
|
@@ -2062,28 +2071,28 @@ const cl = {
|
|
|
2062
2071
|
load: () => {
|
|
2063
2072
|
let { currentPage: l, pageSize: a } = e.value.table.page;
|
|
2064
2073
|
try {
|
|
2065
|
-
t("load", { currentPage: l, pageSize: a, ...s.value }, (m,
|
|
2066
|
-
var
|
|
2074
|
+
t("load", { currentPage: l, pageSize: a, ...s.value }, (m, x, { fields: Q = [], sums: X = {} } = {}) => {
|
|
2075
|
+
var ae, De;
|
|
2067
2076
|
if (!Array.isArray(m)) {
|
|
2068
2077
|
console.error("从 load 事件回调中接收到的数据不是数组格式。"), Fe.error("数据加载失败,请检查数据格式。");
|
|
2069
2078
|
return;
|
|
2070
2079
|
}
|
|
2071
|
-
if (typeof
|
|
2080
|
+
if (typeof x != "number") {
|
|
2072
2081
|
console.error("从 load 事件回调中接收到的 total 不是数字格式。"), Fe.error("数据加载失败,请检查数据格式。");
|
|
2073
2082
|
return;
|
|
2074
2083
|
}
|
|
2075
|
-
e.value.table.data = m, ((De = (
|
|
2084
|
+
e.value.table.data = m, ((De = (ae = e.value.control) == null ? void 0 : ae.add) == null ? void 0 : De.inline) === !0 && e.value.table.data.unshift(E.value), e.value.table.page.total = x, R.value = Q, re.value = X, he(), H.value = Math.random().toString(36).substring(2);
|
|
2076
2085
|
}, E.value);
|
|
2077
2086
|
} catch (m) {
|
|
2078
2087
|
console.error("触发 load 事件时出现错误:", m), Fe.error("数据加载时出现错误,请稍后重试。");
|
|
2079
2088
|
}
|
|
2080
2089
|
},
|
|
2081
2090
|
onHeaderDragend: (l, a, m) => {
|
|
2082
|
-
var
|
|
2083
|
-
Pe((
|
|
2091
|
+
var x;
|
|
2092
|
+
Pe((x = e.value.table) == null ? void 0 : x.user, _.name, m.property, { width: l });
|
|
2084
2093
|
},
|
|
2085
2094
|
onRowDblclick: (l, a, m) => {
|
|
2086
|
-
e.value.table.dblclickType == "edit" ? y(l, a, m, e) : e.value.table.dblclickType == "view" &&
|
|
2095
|
+
e.value.table.dblclickType == "edit" ? y(l, a, m, e) : e.value.table.dblclickType == "view" && le(l, a, m, e);
|
|
2087
2096
|
},
|
|
2088
2097
|
style: { "min-height": "100px", backgroundColor: "var(--el-bg-color)" },
|
|
2089
2098
|
page: {
|
|
@@ -2108,7 +2117,7 @@ const cl = {
|
|
|
2108
2117
|
},
|
|
2109
2118
|
dblclickType: "edit",
|
|
2110
2119
|
"summary-method": ({ columns: l, data: a }, m) => m,
|
|
2111
|
-
onSortChange: ({ column: l, prop: a, order: m },
|
|
2120
|
+
onSortChange: ({ column: l, prop: a, order: m }, x) => {
|
|
2112
2121
|
}
|
|
2113
2122
|
};
|
|
2114
2123
|
e.value.table = Te(
|
|
@@ -2118,7 +2127,7 @@ const cl = {
|
|
|
2118
2127
|
z
|
|
2119
2128
|
// 继承父组件的属性
|
|
2120
2129
|
);
|
|
2121
|
-
const
|
|
2130
|
+
const g = {
|
|
2122
2131
|
type: "control",
|
|
2123
2132
|
label: "操作",
|
|
2124
2133
|
width: 250,
|
|
@@ -2146,8 +2155,8 @@ const cl = {
|
|
|
2146
2155
|
type: "primary",
|
|
2147
2156
|
mode: "dialog",
|
|
2148
2157
|
auth: (l, a, m) => {
|
|
2149
|
-
var
|
|
2150
|
-
return ((X = (Q = (
|
|
2158
|
+
var x, Q, X;
|
|
2159
|
+
return ((X = (Q = (x = e.value) == null ? void 0 : x.control) == null ? void 0 : Q.add) == null ? void 0 : X.inline) === !1;
|
|
2151
2160
|
}
|
|
2152
2161
|
},
|
|
2153
2162
|
delete: {
|
|
@@ -2155,8 +2164,8 @@ const cl = {
|
|
|
2155
2164
|
label: "删除",
|
|
2156
2165
|
type: "danger",
|
|
2157
2166
|
auth: (l, a, m) => {
|
|
2158
|
-
var
|
|
2159
|
-
return !(((X = (Q = (
|
|
2167
|
+
var x, Q, X;
|
|
2168
|
+
return !(((X = (Q = (x = e.value) == null ? void 0 : x.control) == null ? void 0 : Q.add) == null ? void 0 : X.inline) === !0 && m === 0);
|
|
2160
2169
|
},
|
|
2161
2170
|
dialog: {
|
|
2162
2171
|
message: "此操作将永久删除该文件, 是否继续?",
|
|
@@ -2192,7 +2201,7 @@ const cl = {
|
|
|
2192
2201
|
}
|
|
2193
2202
|
};
|
|
2194
2203
|
e.value.control = Te(
|
|
2195
|
-
|
|
2204
|
+
g,
|
|
2196
2205
|
o == null ? void 0 : o.control,
|
|
2197
2206
|
($e = e.value) == null ? void 0 : $e.control
|
|
2198
2207
|
);
|
|
@@ -2200,7 +2209,7 @@ const cl = {
|
|
|
2200
2209
|
type: "hidden",
|
|
2201
2210
|
minWidth: 120,
|
|
2202
2211
|
align: "center",
|
|
2203
|
-
formatter: (l, a, m,
|
|
2212
|
+
formatter: (l, a, m, x) => m
|
|
2204
2213
|
};
|
|
2205
2214
|
e.value.tableColumns = Te(
|
|
2206
2215
|
K,
|
|
@@ -2230,7 +2239,7 @@ const cl = {
|
|
|
2230
2239
|
o == null ? void 0 : o.formItems,
|
|
2231
2240
|
(ce = e == null ? void 0 : e.value) == null ? void 0 : ce.formItems
|
|
2232
2241
|
);
|
|
2233
|
-
const
|
|
2242
|
+
const te = {
|
|
2234
2243
|
title: "编辑",
|
|
2235
2244
|
mode: "drawer",
|
|
2236
2245
|
type: "hidden",
|
|
@@ -2239,7 +2248,7 @@ const cl = {
|
|
|
2239
2248
|
fullScreen: !1
|
|
2240
2249
|
};
|
|
2241
2250
|
e.value.dialog = Te(
|
|
2242
|
-
|
|
2251
|
+
te,
|
|
2243
2252
|
o == null ? void 0 : o.dialog,
|
|
2244
2253
|
(Be = e.value) == null ? void 0 : Be.dialog
|
|
2245
2254
|
);
|
|
@@ -2263,84 +2272,84 @@ const cl = {
|
|
|
2263
2272
|
e.value.form.modalState = "add";
|
|
2264
2273
|
try {
|
|
2265
2274
|
if (!await ((a = e.value.control) == null ? void 0 : a.validate("add", { m: l }))) return;
|
|
2266
|
-
} catch (
|
|
2267
|
-
console.error("验证失败:",
|
|
2275
|
+
} catch (x) {
|
|
2276
|
+
console.error("验证失败:", x);
|
|
2268
2277
|
return;
|
|
2269
2278
|
}
|
|
2270
|
-
(m = e.value.control.add) != null && m.click ? e.value.control.add.click(l) : e.value.control.add.inline === !0 ? (e.value.table.data.unshift(E.value), t("open", "row-add", { initFormData: E.value })) : (e.value.form.disabled = !1, e.value.dialog.mode = e.value.control.add.mode, e.value.dialog.title = e.value.control.add.label, Object.keys(E.value).forEach((
|
|
2271
|
-
e.value[
|
|
2279
|
+
(m = e.value.control.add) != null && m.click ? e.value.control.add.click(l) : e.value.control.add.inline === !0 ? (e.value.table.data.unshift(E.value), t("open", "row-add", { initFormData: E.value })) : (e.value.form.disabled = !1, e.value.dialog.mode = e.value.control.add.mode, e.value.dialog.title = e.value.control.add.label, Object.keys(E.value).forEach((x) => {
|
|
2280
|
+
e.value[x] && (e.value[x].value = E.value[x]);
|
|
2272
2281
|
}), D.value = !0, t("open", "add", { m: l }));
|
|
2273
|
-
}, y = async (l, a, m,
|
|
2282
|
+
}, y = async (l, a, m, x) => {
|
|
2274
2283
|
var Q, X;
|
|
2275
2284
|
e.value.form.modalState = "edit";
|
|
2276
2285
|
try {
|
|
2277
|
-
if (!await ((Q = e.value.control) == null ? void 0 : Q.validate("edit", { row: l, column: a, $index: m, m:
|
|
2278
|
-
} catch (
|
|
2279
|
-
console.error("验证失败:",
|
|
2286
|
+
if (!await ((Q = e.value.control) == null ? void 0 : Q.validate("edit", { row: l, column: a, $index: m, m: x }))) return;
|
|
2287
|
+
} catch (ae) {
|
|
2288
|
+
console.error("验证失败:", ae);
|
|
2280
2289
|
return;
|
|
2281
2290
|
}
|
|
2282
|
-
(X = e.value.control.edit) != null && X.click ? e.value.control.edit.click(l, a, m,
|
|
2283
|
-
e.value[
|
|
2284
|
-
}), D.value = !0, t("open", "edit", { m:
|
|
2285
|
-
}, Y = async (l, a, m,
|
|
2291
|
+
(X = e.value.control.edit) != null && X.click ? e.value.control.edit.click(l, a, m, x) : (e.value.form.disabled = !1, e.value.dialog.mode = e.value.control.edit.mode, e.value.dialog.title = e.value.control.edit.label, Object.keys(l).forEach((ae) => {
|
|
2292
|
+
e.value[ae] && (e.value[ae].value = l[ae]);
|
|
2293
|
+
}), D.value = !0, t("open", "edit", { m: x, row: l, column: a, $index: m }));
|
|
2294
|
+
}, Y = async (l, a, m, x) => {
|
|
2286
2295
|
var Q, X;
|
|
2287
2296
|
try {
|
|
2288
|
-
if (!await ((Q = e.value.control) == null ? void 0 : Q.validate("delete", { row: l, column: a, $index: m, m:
|
|
2289
|
-
} catch (
|
|
2290
|
-
console.error("验证失败:",
|
|
2297
|
+
if (!await ((Q = e.value.control) == null ? void 0 : Q.validate("delete", { row: l, column: a, $index: m, m: x }))) return;
|
|
2298
|
+
} catch (ae) {
|
|
2299
|
+
console.error("验证失败:", ae);
|
|
2291
2300
|
return;
|
|
2292
2301
|
}
|
|
2293
2302
|
if ((X = e.value.control.delete) != null && X.click)
|
|
2294
|
-
e.value.control.delete.click(l, a, m,
|
|
2303
|
+
e.value.control.delete.click(l, a, m, x);
|
|
2295
2304
|
else {
|
|
2296
|
-
let { message:
|
|
2297
|
-
ht.confirm(
|
|
2305
|
+
let { message: ae, title: De, options: qe } = e.value.control.delete.dialog;
|
|
2306
|
+
ht.confirm(ae, De, qe).then(() => {
|
|
2298
2307
|
t("delete", { row: l, column: a, $index: m }, (We = !0, Ge = !1) => {
|
|
2299
2308
|
We && (e.value.table.data.splice(m, 1), e.value.table.page.total--), Ge && e.value.table.load();
|
|
2300
2309
|
});
|
|
2301
2310
|
}).catch(() => {
|
|
2302
2311
|
});
|
|
2303
2312
|
}
|
|
2304
|
-
},
|
|
2313
|
+
}, le = async (l, a, m, x) => {
|
|
2305
2314
|
var Q, X;
|
|
2306
2315
|
e.value.form.modalState = void 0;
|
|
2307
2316
|
try {
|
|
2308
|
-
if (!await ((Q = e.value.control) == null ? void 0 : Q.validate("view", { row: l, column: a, $index: m, m:
|
|
2309
|
-
} catch (
|
|
2310
|
-
console.error("验证失败:",
|
|
2317
|
+
if (!await ((Q = e.value.control) == null ? void 0 : Q.validate("view", { row: l, column: a, $index: m, m: x }))) return;
|
|
2318
|
+
} catch (ae) {
|
|
2319
|
+
console.error("验证失败:", ae);
|
|
2311
2320
|
return;
|
|
2312
2321
|
}
|
|
2313
|
-
(X = e.value.control.view) != null && X.click ? e.value.control.view.click(l, a, m,
|
|
2314
|
-
e.value[
|
|
2315
|
-
}), D.value = !0, t("open", "view", { m:
|
|
2316
|
-
}, de = (l, a, m,
|
|
2322
|
+
(X = e.value.control.view) != null && X.click ? e.value.control.view.click(l, a, m, x) : (e.value.form.disabled = !0, e.value.dialog.mode = e.value.control.view.mode, e.value.dialog.title = e.value.control.view.label, Object.keys(l).forEach((ae) => {
|
|
2323
|
+
e.value[ae] && (e.value[ae].value = l[ae]);
|
|
2324
|
+
}), D.value = !0, t("open", "view", { m: x, row: l, column: a, $index: m }));
|
|
2325
|
+
}, de = (l, a, m, x) => {
|
|
2317
2326
|
var Q;
|
|
2318
|
-
(Q = e.value.control.save) != null && Q.click ? e.value.control.save.click(l, a, m,
|
|
2319
|
-
X && (e.value.table.load(), console.log("load")),
|
|
2327
|
+
(Q = e.value.control.save) != null && Q.click ? e.value.control.save.click(l, a, m, x) : t("row-save", { row: l, column: a, $index: m, data: e.value.table.data }, (X = !0, ae = !0) => {
|
|
2328
|
+
X && (e.value.table.load(), console.log("load")), ae && Ze(() => {
|
|
2320
2329
|
E.value = Object.assign({}, Object.fromEntries(Object.entries(ke(e.value, (De, qe) => qe.type != "control" && qe.editor !== !1 && qe.type != "hidden")).map(([De, qe]) => [De, qe.value])));
|
|
2321
2330
|
});
|
|
2322
2331
|
});
|
|
2323
|
-
},
|
|
2332
|
+
}, B = (l, a) => {
|
|
2324
2333
|
t("submit", e.value.form.modalState, l, a, (m) => {
|
|
2325
2334
|
m && (D.value = !1, a.table.load());
|
|
2326
2335
|
});
|
|
2327
|
-
},
|
|
2336
|
+
}, b = (l) => {
|
|
2328
2337
|
t("reset", l);
|
|
2329
2338
|
}, h = (l, a) => {
|
|
2330
2339
|
var m;
|
|
2331
2340
|
if ((m = l.control.download) != null && m.click)
|
|
2332
2341
|
l.control.download.click(l, a);
|
|
2333
2342
|
else {
|
|
2334
|
-
let
|
|
2343
|
+
let x = ut({
|
|
2335
2344
|
title: l.control.download.label,
|
|
2336
2345
|
size: 480,
|
|
2337
2346
|
width: 600,
|
|
2338
2347
|
slots: {
|
|
2339
|
-
default: () =>
|
|
2348
|
+
default: () => xe(ul, {
|
|
2340
2349
|
items: a,
|
|
2341
2350
|
commitText: l.control.download.excelLabel,
|
|
2342
2351
|
onExcel: (Q, X) => {
|
|
2343
|
-
t("download", Q, X),
|
|
2352
|
+
t("download", Q, X), x();
|
|
2344
2353
|
}
|
|
2345
2354
|
})
|
|
2346
2355
|
}
|
|
@@ -2353,7 +2362,7 @@ const cl = {
|
|
|
2353
2362
|
size: 470,
|
|
2354
2363
|
width: 600,
|
|
2355
2364
|
slots: {
|
|
2356
|
-
default: () =>
|
|
2365
|
+
default: () => xe(vl, {
|
|
2357
2366
|
modelValue: l,
|
|
2358
2367
|
name: _.name
|
|
2359
2368
|
})
|
|
@@ -2363,40 +2372,40 @@ const cl = {
|
|
|
2363
2372
|
{ type: "add", func: k },
|
|
2364
2373
|
{ type: "download", func: h },
|
|
2365
2374
|
{ type: "setting", func: M },
|
|
2366
|
-
{ type: "view", func:
|
|
2375
|
+
{ type: "view", func: le },
|
|
2367
2376
|
{ type: "edit", func: y },
|
|
2368
2377
|
{ type: "delete", func: Y },
|
|
2369
2378
|
{ type: "save", func: de }
|
|
2370
|
-
],
|
|
2371
|
-
var
|
|
2379
|
+
], A = (l) => i.filter((a) => l.includes(a.type)).map(({ type: a, func: m }) => {
|
|
2380
|
+
var x, Q, X;
|
|
2372
2381
|
return {
|
|
2373
2382
|
name: `control-${a}`,
|
|
2374
2383
|
attr: u == null ? void 0 : u[a],
|
|
2375
2384
|
func: m,
|
|
2376
|
-
label: (
|
|
2385
|
+
label: (x = u == null ? void 0 : u[a]) == null ? void 0 : x.label,
|
|
2377
2386
|
sort: ((Q = u == null ? void 0 : u[a]) == null ? void 0 : Q.sort) || 0,
|
|
2378
2387
|
groupName: ((X = u == null ? void 0 : u[a]) == null ? void 0 : X.groupName) || "default"
|
|
2379
2388
|
};
|
|
2380
|
-
}).sort((a, m) => a.sort - m.sort), N = (l) =>
|
|
2381
|
-
const
|
|
2382
|
-
return a[
|
|
2389
|
+
}).sort((a, m) => a.sort - m.sort), N = (l) => A(l).reduce((a, m) => {
|
|
2390
|
+
const x = m.groupName || "default";
|
|
2391
|
+
return a[x] || (a[x] = []), a[x].push(m), a;
|
|
2383
2392
|
}, {}), ee = je(() => Object.fromEntries(
|
|
2384
2393
|
Object.entries(e.value).filter(([l, a]) => a.type !== "hidden").filter(([l, a]) => a.visible !== !1).filter(([l, a]) => a.showCol !== !1).map(([l, a]) => (a.sort = typeof a.sort == "number" ? a.sort : 0, [l, a])).sort((l, a) => l[1].sort - a[1].sort)
|
|
2385
2394
|
)), ue = me({}), pe = (l, a) => {
|
|
2386
|
-
const m = (
|
|
2387
|
-
for (const X of
|
|
2395
|
+
const m = (x, Q) => {
|
|
2396
|
+
for (const X of x) {
|
|
2388
2397
|
if (X.value == Q) return X.label;
|
|
2389
2398
|
if (X.children) {
|
|
2390
|
-
const
|
|
2391
|
-
if (
|
|
2399
|
+
const ae = m(X.children, Q);
|
|
2400
|
+
if (ae) return ae;
|
|
2392
2401
|
}
|
|
2393
2402
|
}
|
|
2394
2403
|
return null;
|
|
2395
2404
|
};
|
|
2396
2405
|
if (l.getDicts) {
|
|
2397
|
-
const
|
|
2398
|
-
return ue.value[
|
|
2399
|
-
ue.value[
|
|
2406
|
+
const x = a.toString();
|
|
2407
|
+
return ue.value[x] ? (l.options = ue.value[x], l.formatter || (l.formatter = (Q, X, ae, De) => l.options && m(l.options, ae) || ae), Promise.resolve()) : l.getDicts(e.value.table.data).then((Q) => {
|
|
2408
|
+
ue.value[x] = Q, l.options = Q, l.formatter || (l.formatter = (X, ae, De, qe) => l.options && m(l.options, De) || De);
|
|
2400
2409
|
});
|
|
2401
2410
|
}
|
|
2402
2411
|
return Promise.resolve();
|
|
@@ -2405,24 +2414,24 @@ const cl = {
|
|
|
2405
2414
|
Object.keys(e.value).forEach((a) => {
|
|
2406
2415
|
if (e.value[a].getDicts) {
|
|
2407
2416
|
const m = pe(e.value[a], a).then(() => {
|
|
2408
|
-
e.value.table.data.forEach((
|
|
2417
|
+
e.value.table.data.forEach((x) => {
|
|
2409
2418
|
var Q;
|
|
2410
2419
|
if (e.value[a].getDicts && ((Q = e.value[a]) == null ? void 0 : Q.forceString) !== !1) {
|
|
2411
|
-
const X =
|
|
2412
|
-
|
|
2420
|
+
const X = x[a];
|
|
2421
|
+
x[a] = X != null ? X.toString() : X;
|
|
2413
2422
|
}
|
|
2414
2423
|
});
|
|
2415
|
-
}).catch((
|
|
2416
|
-
console.error(`加载字典${a}出错:`,
|
|
2424
|
+
}).catch((x) => {
|
|
2425
|
+
console.error(`加载字典${a}出错:`, x);
|
|
2417
2426
|
});
|
|
2418
2427
|
l.push(m);
|
|
2419
2428
|
}
|
|
2420
2429
|
}), Promise.all(l).catch((a) => {
|
|
2421
2430
|
console.error("字典加载过程中发生错误:", a);
|
|
2422
2431
|
});
|
|
2423
|
-
}, we = (l, a, m,
|
|
2432
|
+
}, we = (l, a, m, x) => {
|
|
2424
2433
|
var Q, X;
|
|
2425
|
-
return l.table ? (Q = l.table(a, m,
|
|
2434
|
+
return l.table ? (Q = l.table(a, m, x)) != null && Q.auth ? (X = l.table(a, m, x)) == null ? void 0 : X.auth(a, m, x) : !0 : !1;
|
|
2426
2435
|
}, Ce = (l, a) => l.name === "control-save" && a === 0 && e.value.control.add.inline === !0 ? l.attr.addLabel : l.label;
|
|
2427
2436
|
return qt(() => {
|
|
2428
2437
|
e.value.table.autoWatch && e.value.table.load();
|
|
@@ -2463,7 +2472,7 @@ const cl = {
|
|
|
2463
2472
|
e.value.table.autoWatch || e.value.table.load();
|
|
2464
2473
|
}), (l, a) => {
|
|
2465
2474
|
var We, Ge, dt, ct, ft;
|
|
2466
|
-
const m = j("el-button-group"),
|
|
2475
|
+
const m = j("el-button-group"), x = j("el-table-column"), Q = j("el-table"), X = j("el-pagination"), ae = j("el-icon"), De = j("el-dialog"), qe = j("el-drawer");
|
|
2467
2476
|
return r(), q(P, null, [
|
|
2468
2477
|
J("div", yl, [
|
|
2469
2478
|
((Ge = (We = e.value) == null ? void 0 : We.query) == null ? void 0 : Ge.hidden) != !0 ? (r(), q("div", hl, [
|
|
@@ -2555,7 +2564,7 @@ const cl = {
|
|
|
2555
2564
|
]),
|
|
2556
2565
|
default: v(() => [
|
|
2557
2566
|
p(l.$slots, "default", {}, () => [
|
|
2558
|
-
(r(!0), q(P, null, I(ee.value, (U, oe) => (r(), S(
|
|
2567
|
+
(r(!0), q(P, null, I(ee.value, (U, oe) => (r(), S(x, F({
|
|
2559
2568
|
prop: oe,
|
|
2560
2569
|
key: oe,
|
|
2561
2570
|
ref_for: !0
|
|
@@ -2797,7 +2806,7 @@ const cl = {
|
|
|
2797
2806
|
}),
|
|
2798
2807
|
class: "max"
|
|
2799
2808
|
}, [
|
|
2800
|
-
Z(
|
|
2809
|
+
Z(ae, null, {
|
|
2801
2810
|
default: v(() => [
|
|
2802
2811
|
Z(L(At))
|
|
2803
2812
|
]),
|
|
@@ -2811,7 +2820,7 @@ const cl = {
|
|
|
2811
2820
|
}),
|
|
2812
2821
|
class: "max"
|
|
2813
2822
|
}, [
|
|
2814
|
-
Z(
|
|
2823
|
+
Z(ae, null, {
|
|
2815
2824
|
default: v(() => [
|
|
2816
2825
|
Z(L(Bt))
|
|
2817
2826
|
]),
|
|
@@ -2827,8 +2836,8 @@ const cl = {
|
|
|
2827
2836
|
Z(ot, {
|
|
2828
2837
|
modelValue: e.value,
|
|
2829
2838
|
"onUpdate:modelValue": a[6] || (a[6] = (U) => e.value = U),
|
|
2830
|
-
onSubmit:
|
|
2831
|
-
onReset:
|
|
2839
|
+
onSubmit: B,
|
|
2840
|
+
onReset: b
|
|
2832
2841
|
}, ve({ _: 2 }, [
|
|
2833
2842
|
I(l.$slots, (U, oe, w) => ({
|
|
2834
2843
|
name: oe,
|
|
@@ -2862,8 +2871,8 @@ const cl = {
|
|
|
2862
2871
|
Z(ot, {
|
|
2863
2872
|
modelValue: e.value,
|
|
2864
2873
|
"onUpdate:modelValue": a[8] || (a[8] = (U) => e.value = U),
|
|
2865
|
-
onSubmit:
|
|
2866
|
-
onReset:
|
|
2874
|
+
onSubmit: B,
|
|
2875
|
+
onReset: b
|
|
2867
2876
|
}, ve({ _: 2 }, [
|
|
2868
2877
|
I(l.$slots, (U, oe, w) => ({
|
|
2869
2878
|
name: oe,
|
|
@@ -2880,7 +2889,7 @@ const cl = {
|
|
|
2880
2889
|
], 64);
|
|
2881
2890
|
};
|
|
2882
2891
|
}
|
|
2883
|
-
}), Tl = /* @__PURE__ */ Le(Ml, [["__scopeId", "data-v-c7d51f42"]]), Fl = { class: "g-tree-table" }, Sl = { class: "g-tree-container" }, ql = { class: "g-tree-table-container" },
|
|
2892
|
+
}), Tl = /* @__PURE__ */ Le(Ml, [["__scopeId", "data-v-c7d51f42"]]), Fl = { class: "g-tree-table" }, Sl = { class: "g-tree-container" }, ql = { class: "g-tree-table-container" }, xl = /* @__PURE__ */ Object.assign({
|
|
2884
2893
|
name: "g-tree-table",
|
|
2885
2894
|
inheritAttrs: !1
|
|
2886
2895
|
}, {
|
|
@@ -2891,26 +2900,26 @@ const cl = {
|
|
|
2891
2900
|
},
|
|
2892
2901
|
emits: /* @__PURE__ */ Ye(["load"], ["update:modelValue"]),
|
|
2893
2902
|
setup(f, { emit: c }) {
|
|
2894
|
-
const t = c, e = Ue(f, "modelValue"), o = it(), s = me((o == null ? void 0 : o.width) || "180px"),
|
|
2895
|
-
var V,
|
|
2903
|
+
const t = c, e = Ue(f, "modelValue"), o = it(), s = me((o == null ? void 0 : o.width) || "180px"), O = me((o == null ? void 0 : o.search) === void 0 ? !0 : o == null ? void 0 : o.search), D = me({}), T = me(""), $ = me(null), _ = (R, E) => {
|
|
2904
|
+
var V, g;
|
|
2896
2905
|
if (!R) return !0;
|
|
2897
|
-
const H = ((
|
|
2906
|
+
const H = ((g = (V = o.tree) == null ? void 0 : V.props) == null ? void 0 : g.label) || "label";
|
|
2898
2907
|
return E[H].includes(R);
|
|
2899
2908
|
}, z = (R, E) => {
|
|
2900
2909
|
t("load", D.value, R, E);
|
|
2901
2910
|
}, re = (R) => {
|
|
2902
2911
|
D.value = R, e.value.table.load();
|
|
2903
2912
|
};
|
|
2904
|
-
return
|
|
2913
|
+
return xt(T, (R) => {
|
|
2905
2914
|
$.value.filter(R);
|
|
2906
2915
|
}), (R, E) => {
|
|
2907
|
-
const H = j("el-input"), V = j("el-tree"),
|
|
2916
|
+
const H = j("el-input"), V = j("el-tree"), g = j("g-table");
|
|
2908
2917
|
return r(), q("div", Fl, [
|
|
2909
2918
|
J("div", {
|
|
2910
2919
|
class: "g-tree-left",
|
|
2911
2920
|
style: Ae({ width: s.value })
|
|
2912
2921
|
}, [
|
|
2913
|
-
|
|
2922
|
+
O.value ? (r(), S(H, {
|
|
2914
2923
|
key: 0,
|
|
2915
2924
|
modelValue: T.value,
|
|
2916
2925
|
"onUpdate:modelValue": E[0] || (E[0] = (K) => T.value = K),
|
|
@@ -2939,22 +2948,22 @@ const cl = {
|
|
|
2939
2948
|
}, [
|
|
2940
2949
|
I(R.$slots, (K, se, ie) => ({
|
|
2941
2950
|
name: se,
|
|
2942
|
-
fn: v((
|
|
2943
|
-
p(R.$slots, se, { data:
|
|
2951
|
+
fn: v((te) => [
|
|
2952
|
+
p(R.$slots, se, { data: te }, void 0, !0)
|
|
2944
2953
|
])
|
|
2945
2954
|
}))
|
|
2946
2955
|
]), 1040, ["style"])
|
|
2947
2956
|
])
|
|
2948
2957
|
], 4),
|
|
2949
2958
|
J("div", ql, [
|
|
2950
|
-
Z(
|
|
2959
|
+
Z(g, F({
|
|
2951
2960
|
modelValue: e.value,
|
|
2952
2961
|
"onUpdate:modelValue": E[1] || (E[1] = (K) => e.value = K)
|
|
2953
2962
|
}, R.$attrs, { onLoad: z }), ve({ _: 2 }, [
|
|
2954
2963
|
I(R.$slots, (K, se, ie) => ({
|
|
2955
2964
|
name: se,
|
|
2956
|
-
fn: v((
|
|
2957
|
-
p(R.$slots, se, { data:
|
|
2965
|
+
fn: v((te) => [
|
|
2966
|
+
p(R.$slots, se, { data: te }, void 0, !0)
|
|
2958
2967
|
])
|
|
2959
2968
|
}))
|
|
2960
2969
|
]), 1040, ["modelValue"])
|
|
@@ -2962,7 +2971,7 @@ const cl = {
|
|
|
2962
2971
|
]);
|
|
2963
2972
|
};
|
|
2964
2973
|
}
|
|
2965
|
-
}),
|
|
2974
|
+
}), Ol = /* @__PURE__ */ Le(xl, [["__scopeId", "data-v-5fb88c8a"]]), Al = {
|
|
2966
2975
|
key: 0,
|
|
2967
2976
|
class: "op-group"
|
|
2968
2977
|
}, Bl = {
|
|
@@ -3012,7 +3021,7 @@ const cl = {
|
|
|
3012
3021
|
], 12, Il))), 128))
|
|
3013
3022
|
]));
|
|
3014
3023
|
}
|
|
3015
|
-
}), Ul = /* @__PURE__ */ Le(Yl, [["__scopeId", "data-v-c0ac6b77"]]), jl = Object.freeze({}), wt = [Tl, ot,
|
|
3024
|
+
}), Ul = /* @__PURE__ */ Le(Yl, [["__scopeId", "data-v-c0ac6b77"]]), jl = Object.freeze({}), wt = [Tl, ot, Ol, Ul];
|
|
3016
3025
|
let rt = {};
|
|
3017
3026
|
const Ql = {
|
|
3018
3027
|
install: (f, c = {}) => {
|
|
@@ -3029,15 +3038,15 @@ const Ql = {
|
|
|
3029
3038
|
const o = Ll(c);
|
|
3030
3039
|
if (!o) return () => {
|
|
3031
3040
|
};
|
|
3032
|
-
const s = me(!0),
|
|
3041
|
+
const s = me(!0), O = Ot({
|
|
3033
3042
|
setup() {
|
|
3034
3043
|
return e = () => {
|
|
3035
3044
|
s.value = !1, setTimeout(() => {
|
|
3036
|
-
|
|
3045
|
+
O.unmount(), t.remove();
|
|
3037
3046
|
}, 300);
|
|
3038
3047
|
}, () => {
|
|
3039
3048
|
var D, T, $;
|
|
3040
|
-
return
|
|
3049
|
+
return xe(o, {
|
|
3041
3050
|
modelValue: s.value,
|
|
3042
3051
|
"onUpdate:modelValue": (_) => s.value = _,
|
|
3043
3052
|
...f,
|
|
@@ -3052,8 +3061,8 @@ const Ql = {
|
|
|
3052
3061
|
}
|
|
3053
3062
|
});
|
|
3054
3063
|
return wt.forEach((D) => {
|
|
3055
|
-
|
|
3056
|
-
}),
|
|
3064
|
+
O.component(D.name, D);
|
|
3065
|
+
}), O.provide("options", rt), O.use(_t, { locale: Yt }), document.body.appendChild(t), O.mount(t), e;
|
|
3057
3066
|
};
|
|
3058
3067
|
function kt(f, c = window.innerWidth) {
|
|
3059
3068
|
if (typeof f == "number")
|
|
@@ -3098,9 +3107,9 @@ function Rl(f, c, t = "value", e = "label", o = "children") {
|
|
|
3098
3107
|
if (s[t] === c)
|
|
3099
3108
|
return s[e];
|
|
3100
3109
|
if (s[o] && s[o].length > 0) {
|
|
3101
|
-
const
|
|
3102
|
-
if (
|
|
3103
|
-
return
|
|
3110
|
+
const O = Rl(s[o], c, t, e, o);
|
|
3111
|
+
if (O)
|
|
3112
|
+
return O;
|
|
3104
3113
|
}
|
|
3105
3114
|
}
|
|
3106
3115
|
return null;
|
|
@@ -3113,14 +3122,14 @@ function nt(f) {
|
|
|
3113
3122
|
], o = f < 0 ? "欠" : "";
|
|
3114
3123
|
f = Math.abs(f);
|
|
3115
3124
|
let s = "";
|
|
3116
|
-
for (let
|
|
3117
|
-
s += (t[Math.floor(f * 10 * Math.pow(10,
|
|
3125
|
+
for (let O = 0; O < c.length; O++)
|
|
3126
|
+
s += (t[Math.floor(f * 10 * Math.pow(10, O)) % 10] + c[O]).replace(/零./, "");
|
|
3118
3127
|
s = s || "整", f = Math.floor(f);
|
|
3119
|
-
for (let
|
|
3128
|
+
for (let O = 0; O < e[0].length && f > 0; O++) {
|
|
3120
3129
|
let D = "";
|
|
3121
3130
|
for (let T = 0; T < e[1].length && f > 0; T++)
|
|
3122
3131
|
D = t[f % 10] + e[1][T] + D, f = Math.floor(f / 10);
|
|
3123
|
-
s = D.replace(/(零.)*零$/, "").replace(/^$/, "零") + e[0][
|
|
3132
|
+
s = D.replace(/(零.)*零$/, "").replace(/^$/, "零") + e[0][O] + s;
|
|
3124
3133
|
}
|
|
3125
3134
|
return o + s.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整");
|
|
3126
3135
|
}
|