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