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