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