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