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