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