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