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