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