vue-2024-ui 0.0.71 → 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 +1088 -1086
- 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
|
-
} },
|
|
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
|
-
case
|
|
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,203 +383,198 @@ var bt = { 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
|
-
case
|
|
426
|
-
d =
|
|
425
|
+
case T:
|
|
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"](
|
|
482
|
+
}), L = me(($) => {
|
|
483
|
+
e["remote-method"]($, (u) => {
|
|
484
484
|
yt(() => {
|
|
485
|
-
|
|
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["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
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
}, { deep: !0 }), (E, u) => {
|
|
526
|
-
var oe, ue, pe;
|
|
527
|
-
const R = j("el-radio"), te = j("el-radio-group"), le = j("el-radio-button"), X = j("el-checkbox"), ie = j("el-checkbox-group"), Ee = j("el-checkbox-button"), fe = j("g-select-option"), me = j("el-option"), m = j("el-select"), D = j("el-tree-select"), _ = j("el-time-picker"), b = j("el-time-select"), B = j("el-date-picker"), J = j("el-color-picker"), re = j("el-rate"), x = j("el-slider"), g = j("el-switch"), $ = j("el-transfer"), V = j("el-cascader"), i = j("el-button"), d = j("el-upload"), S = j("el-autocomplete"), P = j("el-input-number"), Y = j("el-input");
|
|
528
|
-
return n(), A("div", Ut, [
|
|
529
|
-
o(y) == o(ce).RADIO ? (n(), T(te, 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({
|
|
530
525
|
key: 0,
|
|
531
526
|
modelValue: f.value,
|
|
532
527
|
"onUpdate:modelValue": u[0] || (u[0] = (s) => f.value = s)
|
|
533
528
|
}, o(e)), {
|
|
534
529
|
default: h(() => [
|
|
535
|
-
|
|
536
|
-
(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), {
|
|
537
532
|
default: h(() => [
|
|
538
|
-
|
|
533
|
+
m($.$slots, `${t.t}-${o(r)}-options`, { option: s })
|
|
539
534
|
]),
|
|
540
535
|
_: 2
|
|
541
536
|
}, 1040))), 256))
|
|
542
537
|
])
|
|
543
538
|
]),
|
|
544
539
|
_: 3
|
|
545
|
-
}, 16, ["modelValue"])) : o(
|
|
540
|
+
}, 16, ["modelValue"])) : o(v) == o(ce).RADIOBUTTON ? (n(), F(te, M({
|
|
546
541
|
key: 1,
|
|
547
542
|
modelValue: f.value,
|
|
548
543
|
"onUpdate:modelValue": u[1] || (u[1] = (s) => f.value = s)
|
|
549
544
|
}, o(e)), {
|
|
550
545
|
default: h(() => [
|
|
551
|
-
|
|
552
|
-
(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), {
|
|
553
548
|
default: h(() => [
|
|
554
|
-
|
|
549
|
+
m($.$slots, `${t.t}-${o(r)}-options`, { option: s })
|
|
555
550
|
]),
|
|
556
551
|
_: 2
|
|
557
552
|
}, 1040))), 256))
|
|
558
553
|
])
|
|
559
554
|
]),
|
|
560
555
|
_: 3
|
|
561
|
-
}, 16, ["modelValue"])) : o(
|
|
556
|
+
}, 16, ["modelValue"])) : o(v) == o(ce).CHECKBOX ? (n(), F(K, M({
|
|
562
557
|
key: 2,
|
|
563
558
|
modelValue: f.value,
|
|
564
559
|
"onUpdate:modelValue": u[2] || (u[2] = (s) => f.value = s)
|
|
565
560
|
}, o(e)), {
|
|
566
561
|
default: h(() => [
|
|
567
|
-
|
|
568
|
-
u[21] || (u[21] =
|
|
562
|
+
m($.$slots, `${t.t}-${o(r)}`, { data: o(e) }, () => [
|
|
563
|
+
u[21] || (u[21] = Ce($e(" ")))
|
|
569
564
|
])
|
|
570
565
|
]),
|
|
571
566
|
_: 3
|
|
572
|
-
}, 16, ["modelValue"])) : o(
|
|
567
|
+
}, 16, ["modelValue"])) : o(v) == o(ce).CHECKBOXGROUP ? (n(), F(se, M({
|
|
573
568
|
key: 3,
|
|
574
569
|
modelValue: f.value,
|
|
575
570
|
"onUpdate:modelValue": u[3] || (u[3] = (s) => f.value = s)
|
|
576
571
|
}, o(e)), {
|
|
577
572
|
default: h(() => [
|
|
578
|
-
|
|
579
|
-
(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), {
|
|
580
575
|
default: h(() => [
|
|
581
|
-
|
|
582
|
-
|
|
576
|
+
m($.$slots, `${t.t}-${o(r)}-options`, { option: s }, () => [
|
|
577
|
+
Ce($e(s.label), 1)
|
|
583
578
|
])
|
|
584
579
|
]),
|
|
585
580
|
_: 2
|
|
@@ -587,56 +582,56 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
587
582
|
])
|
|
588
583
|
]),
|
|
589
584
|
_: 3
|
|
590
|
-
}, 16, ["modelValue"])) : o(
|
|
585
|
+
}, 16, ["modelValue"])) : o(v) == o(ce).CHECKBOXGROUPBUTTON ? (n(), F(se, M({
|
|
591
586
|
key: 4,
|
|
592
587
|
modelValue: f.value,
|
|
593
588
|
"onUpdate:modelValue": u[4] || (u[4] = (s) => f.value = s)
|
|
594
589
|
}, o(e)), {
|
|
595
590
|
default: h(() => [
|
|
596
|
-
|
|
597
|
-
(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), {
|
|
598
593
|
default: h(() => [
|
|
599
|
-
|
|
594
|
+
m($.$slots, `${t.t}-${o(r)}-options`, { option: s })
|
|
600
595
|
]),
|
|
601
596
|
_: 2
|
|
602
597
|
}, 1040))), 256))
|
|
603
598
|
])
|
|
604
599
|
]),
|
|
605
600
|
_: 3
|
|
606
|
-
}, 16, ["modelValue"])) : o(
|
|
601
|
+
}, 16, ["modelValue"])) : o(v) === o(ce).SELECT ? (n(), F(p, M({
|
|
607
602
|
key: 5,
|
|
608
603
|
modelValue: f.value,
|
|
609
604
|
"onUpdate:modelValue": u[5] || (u[5] = (s) => f.value = s),
|
|
610
|
-
placeholder: o(
|
|
611
|
-
}, k), de({
|
|
605
|
+
placeholder: o(T)[o(r)].label
|
|
606
|
+
}, k.value), de({
|
|
612
607
|
default: h(() => [
|
|
613
|
-
|
|
614
|
-
(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, {
|
|
615
610
|
key: s.value
|
|
616
611
|
}, [
|
|
617
|
-
Q(
|
|
618
|
-
onClick: (W) => k.change && k.change(s)
|
|
612
|
+
Q(he, M({ ref_for: !0 }, s, {
|
|
613
|
+
onClick: (W) => k.value.change && k.value.change(s)
|
|
619
614
|
}), {
|
|
620
615
|
default: h(() => {
|
|
621
616
|
var W;
|
|
622
617
|
return [
|
|
623
|
-
(W = o(e)) != null && W.columns ?
|
|
618
|
+
(W = o(e)) != null && W.columns ? m($.$slots, `${t.t}-${o(r)}-options`, {
|
|
624
619
|
key: 0,
|
|
625
620
|
option: s
|
|
626
621
|
}, () => {
|
|
627
|
-
var
|
|
622
|
+
var ue;
|
|
628
623
|
return [
|
|
629
624
|
Q(fe, {
|
|
630
|
-
columns: (
|
|
625
|
+
columns: (ue = o(e)) == null ? void 0 : ue.columns,
|
|
631
626
|
data: s,
|
|
632
627
|
t: t.t
|
|
633
628
|
}, de({ _: 2 }, [
|
|
634
|
-
I(
|
|
635
|
-
name:
|
|
636
|
-
fn: h((
|
|
637
|
-
|
|
629
|
+
I($.$slots, (we, ge) => ({
|
|
630
|
+
name: ge,
|
|
631
|
+
fn: h((ke) => [
|
|
632
|
+
m($.$slots, ge, {
|
|
638
633
|
option: s,
|
|
639
|
-
data:
|
|
634
|
+
data: ke
|
|
640
635
|
})
|
|
641
636
|
])
|
|
642
637
|
}))
|
|
@@ -647,16 +642,16 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
647
642
|
}),
|
|
648
643
|
_: 2
|
|
649
644
|
}, 1040, ["onClick"]),
|
|
650
|
-
s.children && s.children.length ? (n(!0), A(H, { key: 0 }, I(s.children, (W) => (n(),
|
|
645
|
+
s.children && s.children.length ? (n(!0), A(H, { key: 0 }, I(s.children, (W) => (n(), F(he, M({
|
|
651
646
|
key: W.value,
|
|
652
647
|
ref_for: !0
|
|
653
648
|
}, W, {
|
|
654
|
-
onClick: (
|
|
649
|
+
onClick: (ue) => k.value.change && k.value.change(W)
|
|
655
650
|
}), {
|
|
656
651
|
default: h(() => {
|
|
657
|
-
var
|
|
652
|
+
var ue;
|
|
658
653
|
return [
|
|
659
|
-
(
|
|
654
|
+
(ue = o(e)) != null && ue.columns ? m($.$slots, `${t.t}-${o(r)}-options`, {
|
|
660
655
|
key: 0,
|
|
661
656
|
option: W
|
|
662
657
|
}, () => {
|
|
@@ -667,12 +662,12 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
667
662
|
data: W,
|
|
668
663
|
t: t.t
|
|
669
664
|
}, de({ _: 2 }, [
|
|
670
|
-
I(
|
|
671
|
-
name:
|
|
672
|
-
fn: h((
|
|
673
|
-
|
|
665
|
+
I($.$slots, (ge, ke) => ({
|
|
666
|
+
name: ke,
|
|
667
|
+
fn: h((Te) => [
|
|
668
|
+
m($.$slots, ke, {
|
|
674
669
|
option: W,
|
|
675
|
-
data:
|
|
670
|
+
data: Te
|
|
676
671
|
})
|
|
677
672
|
])
|
|
678
673
|
}))
|
|
@@ -688,7 +683,7 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
688
683
|
]),
|
|
689
684
|
_: 2
|
|
690
685
|
}, [
|
|
691
|
-
(
|
|
686
|
+
(re = o(e)) != null && re.columns ? {
|
|
692
687
|
name: "header",
|
|
693
688
|
fn: h(() => {
|
|
694
689
|
var s;
|
|
@@ -698,10 +693,10 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
698
693
|
title: !0,
|
|
699
694
|
t: t.t
|
|
700
695
|
}, de({ _: 2 }, [
|
|
701
|
-
I(
|
|
702
|
-
name:
|
|
696
|
+
I($.$slots, (W, ue) => ({
|
|
697
|
+
name: ue,
|
|
703
698
|
fn: h((we) => [
|
|
704
|
-
|
|
699
|
+
m($.$slots, ue, { data: we })
|
|
705
700
|
])
|
|
706
701
|
}))
|
|
707
702
|
]), 1032, ["columns", "t"])
|
|
@@ -712,77 +707,77 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
712
707
|
I(w(), (s) => ({
|
|
713
708
|
name: s,
|
|
714
709
|
fn: h((W) => [
|
|
715
|
-
|
|
710
|
+
m($.$slots, `${t.t}-${o(r)}-${s}`, { data: W })
|
|
716
711
|
])
|
|
717
712
|
}))
|
|
718
|
-
]), 1040, ["modelValue", "placeholder"])) : o(
|
|
713
|
+
]), 1040, ["modelValue", "placeholder"])) : o(v) == o(ce).TREESELECT ? (n(), F(V, M({
|
|
719
714
|
key: 6,
|
|
720
715
|
modelValue: f.value,
|
|
721
716
|
"onUpdate:modelValue": u[6] || (u[6] = (s) => f.value = s),
|
|
722
|
-
placeholder: o(
|
|
723
|
-
}, o(e), { data:
|
|
717
|
+
placeholder: o(T)[o(r)].label
|
|
718
|
+
}, o(e), { data: S.value }), de({ _: 2 }, [
|
|
724
719
|
I(w(), (s) => ({
|
|
725
720
|
name: s,
|
|
726
721
|
fn: h((W) => [
|
|
727
|
-
|
|
722
|
+
m($.$slots, `${t.t}-${o(r)}-${s}`, { data: W })
|
|
728
723
|
])
|
|
729
724
|
}))
|
|
730
|
-
]), 1040, ["modelValue", "placeholder", "data"])) : o(
|
|
725
|
+
]), 1040, ["modelValue", "placeholder", "data"])) : o(v) == o(ce).TIME ? (n(), F(C, M({
|
|
731
726
|
key: 7,
|
|
732
727
|
modelValue: f.value,
|
|
733
728
|
"onUpdate:modelValue": u[7] || (u[7] = (s) => f.value = s),
|
|
734
729
|
"arrow-control": ""
|
|
735
730
|
}, o(e), {
|
|
736
|
-
placeholder: o(
|
|
737
|
-
}), null, 16, ["modelValue", "placeholder"])) : o(
|
|
731
|
+
placeholder: o(T)[o(r)].label
|
|
732
|
+
}), null, 16, ["modelValue", "placeholder"])) : o(v) == o(ce).TIMESELECT ? (n(), F(g, M({
|
|
738
733
|
key: 8,
|
|
739
734
|
modelValue: f.value,
|
|
740
735
|
"onUpdate:modelValue": u[8] || (u[8] = (s) => f.value = s),
|
|
741
736
|
start: "06:30",
|
|
742
737
|
step: "00:15",
|
|
743
738
|
end: "23:30",
|
|
744
|
-
placeholder: o(
|
|
745
|
-
}, o(e)), null, 16, ["modelValue", "placeholder"])) : o(
|
|
739
|
+
placeholder: o(T)[o(r)].label
|
|
740
|
+
}, o(e)), null, 16, ["modelValue", "placeholder"])) : o(v) == o(ce).DATE ? (n(), F(B, M({
|
|
746
741
|
key: 9,
|
|
747
742
|
modelValue: f.value,
|
|
748
743
|
"onUpdate:modelValue": u[9] || (u[9] = (s) => f.value = s),
|
|
749
744
|
type: "date",
|
|
750
|
-
placeholder: o(
|
|
745
|
+
placeholder: o(T)[o(r)].label,
|
|
751
746
|
"value-format": "YYYY-MM-DD"
|
|
752
747
|
}, o(e)), de({ _: 2 }, [
|
|
753
748
|
I(w(), (s) => ({
|
|
754
749
|
name: s,
|
|
755
750
|
fn: h((W) => [
|
|
756
|
-
|
|
751
|
+
m($.$slots, `${t.t}-${o(r)}-${s}`, { data: W })
|
|
757
752
|
])
|
|
758
753
|
}))
|
|
759
|
-
]), 1040, ["modelValue", "placeholder"])) : o(
|
|
754
|
+
]), 1040, ["modelValue", "placeholder"])) : o(v) == o(ce).DATETIME ? (n(), F(B, M({
|
|
760
755
|
key: 10,
|
|
761
756
|
modelValue: f.value,
|
|
762
757
|
"onUpdate:modelValue": u[10] || (u[10] = (s) => f.value = s),
|
|
763
758
|
type: o(ce).DATETIME,
|
|
764
|
-
placeholder: o(
|
|
759
|
+
placeholder: o(T)[o(r)].label,
|
|
765
760
|
"value-format": "YYYY-MM-DD HH:mm:ss"
|
|
766
761
|
}, o(e)), de({ _: 2 }, [
|
|
767
762
|
I(w(), (s) => ({
|
|
768
763
|
name: s,
|
|
769
764
|
fn: h((W) => [
|
|
770
|
-
|
|
765
|
+
m($.$slots, `${t.t}-${o(r)}-${s}`, { data: W })
|
|
771
766
|
])
|
|
772
767
|
}))
|
|
773
|
-
]), 1040, ["modelValue", "type", "placeholder"])) : o(
|
|
768
|
+
]), 1040, ["modelValue", "type", "placeholder"])) : o(v) == o(ce).COLOR ? (n(), F(J, M({
|
|
774
769
|
key: 11,
|
|
775
770
|
modelValue: f.value,
|
|
776
771
|
"onUpdate:modelValue": u[11] || (u[11] = (s) => f.value = s)
|
|
777
|
-
}, o(e)), null, 16, ["modelValue"])) : o(
|
|
772
|
+
}, o(e)), null, 16, ["modelValue"])) : o(v) == o(ce).RATE ? (n(), F(oe, M({
|
|
778
773
|
key: 12,
|
|
779
774
|
modelValue: f.value,
|
|
780
775
|
"onUpdate:modelValue": u[12] || (u[12] = (s) => f.value = s)
|
|
781
|
-
}, o(e)), null, 16, ["modelValue"])) : o(
|
|
776
|
+
}, o(e)), null, 16, ["modelValue"])) : o(v) == o(ce).SLIDER ? (n(), F(x, M({
|
|
782
777
|
key: 13,
|
|
783
778
|
modelValue: f.value,
|
|
784
779
|
"onUpdate:modelValue": u[13] || (u[13] = (s) => f.value = s)
|
|
785
|
-
}, o(e)), null, 16, ["modelValue"])) : o(
|
|
780
|
+
}, o(e)), null, 16, ["modelValue"])) : o(v) == o(ce).SWITCH ? (n(), F(E, M({
|
|
786
781
|
key: 14,
|
|
787
782
|
modelValue: f.value,
|
|
788
783
|
"onUpdate:modelValue": u[14] || (u[14] = (s) => f.value = s)
|
|
@@ -790,10 +785,10 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
790
785
|
I(w(), (s) => ({
|
|
791
786
|
name: s,
|
|
792
787
|
fn: h((W) => [
|
|
793
|
-
|
|
788
|
+
m($.$slots, `${t.t}-${o(r)}-${s}`, { data: W })
|
|
794
789
|
])
|
|
795
790
|
}))
|
|
796
|
-
]), 1040, ["modelValue"])) : o(
|
|
791
|
+
]), 1040, ["modelValue"])) : o(v) == o(ce).TRANSFER ? (n(), F(b, M({
|
|
797
792
|
key: 15,
|
|
798
793
|
modelValue: f.value,
|
|
799
794
|
"onUpdate:modelValue": u[15] || (u[15] = (s) => f.value = s)
|
|
@@ -801,25 +796,25 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
801
796
|
I(w(), (s) => ({
|
|
802
797
|
name: s,
|
|
803
798
|
fn: h((W) => [
|
|
804
|
-
|
|
799
|
+
m($.$slots, `${t.t}-${o(r)}-${s}`, { data: W })
|
|
805
800
|
])
|
|
806
801
|
}))
|
|
807
|
-
]), 1040, ["modelValue"])) : o(
|
|
802
|
+
]), 1040, ["modelValue"])) : o(v) == o(ce).CASCADER ? (n(), F(_, M({
|
|
808
803
|
key: 16,
|
|
809
804
|
modelValue: f.value,
|
|
810
805
|
"onUpdate:modelValue": u[16] || (u[16] = (s) => f.value = s)
|
|
811
|
-
}, o(e), { options:
|
|
806
|
+
}, o(e), { options: q.value }), de({ _: 2 }, [
|
|
812
807
|
I(w(), (s) => ({
|
|
813
808
|
name: s,
|
|
814
809
|
fn: h((W) => [
|
|
815
|
-
|
|
810
|
+
m($.$slots, `${t.t}-${o(r)}-${s}`, { data: W })
|
|
816
811
|
])
|
|
817
812
|
}))
|
|
818
|
-
]), 1040, ["modelValue", "options"])) : o(
|
|
813
|
+
]), 1040, ["modelValue", "options"])) : o(v) == o(ce).IMAGE ? (n(), F(d, Ge(M({ key: 17 }, o(e))), de({
|
|
819
814
|
default: h(() => [
|
|
820
815
|
Q(i, { type: "primary" }, {
|
|
821
816
|
default: h(() => u[22] || (u[22] = [
|
|
822
|
-
|
|
817
|
+
Ce("点击上传")
|
|
823
818
|
])),
|
|
824
819
|
_: 1
|
|
825
820
|
})
|
|
@@ -828,79 +823,79 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
828
823
|
}, [
|
|
829
824
|
I(w(), (s, W) => ({
|
|
830
825
|
name: s,
|
|
831
|
-
fn: h((
|
|
832
|
-
|
|
826
|
+
fn: h((ue) => [
|
|
827
|
+
m($.$slots, `${t.t}-${o(r)}-${s}`, { data: ue })
|
|
833
828
|
])
|
|
834
829
|
}))
|
|
835
|
-
]), 1040)) : o(
|
|
830
|
+
]), 1040)) : o(v) == o(ce).AUTOCOMPLETE ? (n(), F(O, M({
|
|
836
831
|
key: 18,
|
|
837
832
|
modelValue: f.value,
|
|
838
833
|
"onUpdate:modelValue": u[17] || (u[17] = (s) => f.value = s)
|
|
839
834
|
}, o(e), {
|
|
840
|
-
placeholder: o(
|
|
835
|
+
placeholder: o(T)[o(r)].label
|
|
841
836
|
}), de({ _: 2 }, [
|
|
842
837
|
I(w(), (s, W) => ({
|
|
843
838
|
name: s,
|
|
844
|
-
fn: h((
|
|
845
|
-
|
|
839
|
+
fn: h((ue) => [
|
|
840
|
+
m($.$slots, `${t.t}-${o(r)}-${s}`, { data: ue })
|
|
846
841
|
])
|
|
847
842
|
}))
|
|
848
|
-
]), 1040, ["modelValue", "placeholder"])) : o(
|
|
843
|
+
]), 1040, ["modelValue", "placeholder"])) : o(v) == o(ce).INPUTNUMBER ? (n(), F(P, M({
|
|
849
844
|
key: 19,
|
|
850
845
|
modelValue: f.value,
|
|
851
846
|
"onUpdate:modelValue": u[18] || (u[18] = (s) => f.value = s),
|
|
852
847
|
min: 0,
|
|
853
848
|
max: 1e8,
|
|
854
|
-
placeholder: o(
|
|
849
|
+
placeholder: o(T)[o(r)].label
|
|
855
850
|
}, o(e)), de({ _: 2 }, [
|
|
856
851
|
I(w(), (s, W) => ({
|
|
857
852
|
name: s,
|
|
858
|
-
fn: h((
|
|
859
|
-
|
|
853
|
+
fn: h((ue) => [
|
|
854
|
+
m($.$slots, `${t.t}-${o(r)}-${s}`, { data: ue })
|
|
860
855
|
])
|
|
861
856
|
}))
|
|
862
|
-
]), 1040, ["modelValue", "placeholder"])) : o(
|
|
863
|
-
Q(Y,
|
|
857
|
+
]), 1040, ["modelValue", "placeholder"])) : o(v) == o(ce).MONEY ? (n(), A("div", Nt, [
|
|
858
|
+
Q(Y, M({
|
|
864
859
|
modelValue: f.value,
|
|
865
860
|
"onUpdate:modelValue": u[19] || (u[19] = (s) => f.value = s),
|
|
866
|
-
placeholder: o(
|
|
861
|
+
placeholder: o(T)[o(r)].label,
|
|
867
862
|
type: o(ce).NUMBER,
|
|
868
|
-
maxlength: ((
|
|
869
|
-
}, { ...o(e), type: o(
|
|
863
|
+
maxlength: ((ie = o(e)) == null ? void 0 : ie.max) || 25
|
|
864
|
+
}, { ...o(e), type: o(v) }), de({
|
|
870
865
|
suffix: h(() => [
|
|
871
866
|
G("div", {
|
|
872
|
-
title: o(
|
|
867
|
+
title: o(ot)(f.value),
|
|
873
868
|
style: { "font-size": "10px", display: "block", width: "80px", "text-align": "right", overflow: "hidden", "text-overflow": "ellipsis" }
|
|
874
|
-
},
|
|
869
|
+
}, $e(o(ot)(f.value)), 9, Pt)
|
|
875
870
|
]),
|
|
876
871
|
_: 2
|
|
877
872
|
}, [
|
|
878
873
|
I(w(), (s, W) => ({
|
|
879
874
|
name: s,
|
|
880
|
-
fn: h((
|
|
881
|
-
|
|
875
|
+
fn: h((ue) => [
|
|
876
|
+
m($.$slots, `${t.t}-${o(r)}-${s}`, { data: ue })
|
|
882
877
|
])
|
|
883
878
|
}))
|
|
884
879
|
]), 1040, ["modelValue", "placeholder", "type", "maxlength"])
|
|
885
|
-
])) : (n(),
|
|
880
|
+
])) : (n(), F(Y, M({
|
|
886
881
|
key: 21,
|
|
887
882
|
modelValue: f.value,
|
|
888
883
|
"onUpdate:modelValue": u[20] || (u[20] = (s) => f.value = s),
|
|
889
|
-
placeholder: o(
|
|
884
|
+
placeholder: o(T)[o(r)].label,
|
|
890
885
|
maxlength: ((pe = o(e)) == null ? void 0 : pe.max) || 25,
|
|
891
886
|
clearable: !0
|
|
892
|
-
}, { ...o(e), type: o(
|
|
887
|
+
}, { ...o(e), type: o(v) }), de({ _: 2 }, [
|
|
893
888
|
I(w(), (s, W) => ({
|
|
894
889
|
name: s,
|
|
895
|
-
fn: h((
|
|
896
|
-
|
|
890
|
+
fn: h((ue) => [
|
|
891
|
+
m($.$slots, `${t.t}-${o(r)}-${s}`, { data: ue })
|
|
897
892
|
])
|
|
898
893
|
}))
|
|
899
894
|
]), 1040, ["modelValue", "placeholder", "maxlength"]))
|
|
900
895
|
]);
|
|
901
896
|
};
|
|
902
897
|
}
|
|
903
|
-
}),
|
|
898
|
+
}), et = /* @__PURE__ */ Object.assign({
|
|
904
899
|
name: "g-form",
|
|
905
900
|
inheritAttrs: !1
|
|
906
901
|
}, {
|
|
@@ -909,10 +904,10 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
909
904
|
modelValue: { required: !0 },
|
|
910
905
|
modelModifiers: {}
|
|
911
906
|
},
|
|
912
|
-
emits: /* @__PURE__ */
|
|
907
|
+
emits: /* @__PURE__ */ xe(["submit", "reset"], ["update:modelValue"]),
|
|
913
908
|
setup(c, { emit: f }) {
|
|
914
|
-
var
|
|
915
|
-
const t =
|
|
909
|
+
var se, ye, fe, he;
|
|
910
|
+
const t = Be(c, "modelValue"), e = f, r = me(null), v = rt("options"), T = {
|
|
916
911
|
inline: !0,
|
|
917
912
|
type: "hidden",
|
|
918
913
|
"scroll-to-error": !0,
|
|
@@ -922,7 +917,7 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
922
917
|
style: {
|
|
923
918
|
display: "flex",
|
|
924
919
|
flexWrap: "wrap",
|
|
925
|
-
...(
|
|
920
|
+
...(se = at()) == null ? void 0 : se.style
|
|
926
921
|
},
|
|
927
922
|
// 表单底部属性
|
|
928
923
|
footer: {
|
|
@@ -951,10 +946,10 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
951
946
|
plain: !0,
|
|
952
947
|
click: () => {
|
|
953
948
|
if (!r.value) return;
|
|
954
|
-
let
|
|
955
|
-
e("reset", (
|
|
956
|
-
|
|
957
|
-
}),
|
|
949
|
+
let p = !0;
|
|
950
|
+
e("reset", (V) => {
|
|
951
|
+
p = V;
|
|
952
|
+
}), p && r.value.resetFields();
|
|
958
953
|
}
|
|
959
954
|
},
|
|
960
955
|
slots: {},
|
|
@@ -963,52 +958,52 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
963
958
|
editable: !1
|
|
964
959
|
}
|
|
965
960
|
};
|
|
966
|
-
t.value.form =
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
(
|
|
961
|
+
t.value.form = De(
|
|
962
|
+
T,
|
|
963
|
+
v == null ? void 0 : v.form,
|
|
964
|
+
(ye = t.value) == null ? void 0 : ye.form
|
|
970
965
|
);
|
|
971
|
-
const
|
|
972
|
-
let
|
|
973
|
-
for (;
|
|
966
|
+
const S = async (p, V) => {
|
|
967
|
+
let C = 5;
|
|
968
|
+
for (; C > 0; ) {
|
|
974
969
|
if (await yt(), r.value) {
|
|
975
|
-
r.value.validate((
|
|
976
|
-
|
|
970
|
+
r.value.validate((g, B) => {
|
|
971
|
+
g ? e("submit", p, V) : console.log("表单验证不通过!", B);
|
|
977
972
|
});
|
|
978
973
|
return;
|
|
979
974
|
}
|
|
980
|
-
|
|
975
|
+
C--, await new Promise((g) => setTimeout(g, 50));
|
|
981
976
|
}
|
|
982
977
|
console.error("表单实例获取失败,请检查组件状态");
|
|
983
978
|
};
|
|
984
|
-
t.value.form.submit.click =
|
|
985
|
-
const
|
|
979
|
+
t.value.form.submit.click = S;
|
|
980
|
+
const q = {
|
|
986
981
|
type: "hidden",
|
|
987
982
|
labelPosition: "right",
|
|
988
983
|
style: {
|
|
989
984
|
width: "100%"
|
|
990
985
|
}
|
|
991
986
|
};
|
|
992
|
-
t.value.formItems =
|
|
993
|
-
|
|
994
|
-
|
|
987
|
+
t.value.formItems = De(
|
|
988
|
+
q,
|
|
989
|
+
v == null ? void 0 : v.formItems,
|
|
995
990
|
(fe = t == null ? void 0 : t.value) == null ? void 0 : fe.formItems
|
|
996
991
|
);
|
|
997
992
|
const w = {
|
|
998
993
|
span: 12,
|
|
999
994
|
offset: 0
|
|
1000
995
|
};
|
|
1001
|
-
t.value.form.cols =
|
|
996
|
+
t.value.form.cols = De(
|
|
1002
997
|
w,
|
|
1003
|
-
(
|
|
998
|
+
(he = v == null ? void 0 : v.form) == null ? void 0 : he.cols,
|
|
1004
999
|
t.value.form.cols
|
|
1005
1000
|
);
|
|
1006
|
-
const k = (
|
|
1007
|
-
let
|
|
1008
|
-
if (
|
|
1009
|
-
|
|
1001
|
+
const k = (p) => {
|
|
1002
|
+
let V = [];
|
|
1003
|
+
if (p.rules)
|
|
1004
|
+
V = p.rules;
|
|
1010
1005
|
else {
|
|
1011
|
-
const
|
|
1006
|
+
const g = { ...{
|
|
1012
1007
|
required: void 0,
|
|
1013
1008
|
max: void 0,
|
|
1014
1009
|
min: void 0,
|
|
@@ -1016,73 +1011,73 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1016
1011
|
url: void 0,
|
|
1017
1012
|
pattern: void 0,
|
|
1018
1013
|
validate: void 0
|
|
1019
|
-
}, ...
|
|
1020
|
-
|
|
1021
|
-
validator: (B, J,
|
|
1022
|
-
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();
|
|
1023
1018
|
}
|
|
1024
|
-
}),
|
|
1025
|
-
validator: (B, J,
|
|
1026
|
-
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();
|
|
1027
1022
|
}
|
|
1028
|
-
}),
|
|
1029
|
-
validator: (B, J,
|
|
1030
|
-
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();
|
|
1031
1026
|
}
|
|
1032
|
-
}),
|
|
1033
|
-
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)
|
|
1034
1029
|
});
|
|
1035
1030
|
}
|
|
1036
|
-
return
|
|
1037
|
-
}, L = (
|
|
1038
|
-
var B, J,
|
|
1039
|
-
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) || {};
|
|
1040
1035
|
if (((J = t.value.form) == null ? void 0 : J.modalState) === "edit") {
|
|
1041
|
-
const
|
|
1042
|
-
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 };
|
|
1043
1038
|
}
|
|
1044
1039
|
if (((x = t.value.form) == null ? void 0 : x.modalState) === "add") {
|
|
1045
|
-
const
|
|
1046
|
-
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 };
|
|
1047
1042
|
}
|
|
1048
|
-
return
|
|
1049
|
-
},
|
|
1050
|
-
var
|
|
1051
|
-
const
|
|
1052
|
-
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;
|
|
1053
1048
|
};
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
}),
|
|
1049
|
+
Le(() => {
|
|
1050
|
+
$();
|
|
1051
|
+
}), Dt(() => {
|
|
1057
1052
|
r.value = null;
|
|
1058
1053
|
});
|
|
1059
|
-
const
|
|
1060
|
-
for (const [
|
|
1061
|
-
t.value[
|
|
1062
|
-
}, u =
|
|
1063
|
-
var
|
|
1064
|
-
const
|
|
1065
|
-
return t.value.form.modalState === "edit" ? ((
|
|
1066
|
-
}).map((
|
|
1067
|
-
const
|
|
1068
|
-
return Object.entries(u.value).forEach(([
|
|
1069
|
-
if (
|
|
1070
|
-
const
|
|
1071
|
-
|
|
1072
|
-
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,
|
|
1073
1068
|
items: []
|
|
1074
|
-
}),
|
|
1069
|
+
}), p.get(g).items.push({ key: V, item: C });
|
|
1075
1070
|
}
|
|
1076
|
-
}),
|
|
1077
|
-
|
|
1078
|
-
}), Array.from(
|
|
1071
|
+
}), p.forEach((V) => {
|
|
1072
|
+
V.tabPane = De(...V.items.map(({ item: C }) => C.tabPane || {}));
|
|
1073
|
+
}), Array.from(p.values());
|
|
1079
1074
|
}), le = [
|
|
1080
1075
|
{
|
|
1081
1076
|
name: "f-submit",
|
|
1082
1077
|
label: t.value.form.submit.label,
|
|
1083
1078
|
click: t.value.form.submit.click,
|
|
1084
1079
|
hidden: t.value.form.submit.hidden,
|
|
1085
|
-
info:
|
|
1080
|
+
info: Fe(t.value.form.submit, (p) => !["click"].includes(p)),
|
|
1086
1081
|
sort: t.value.form.submit.sort ?? 1,
|
|
1087
1082
|
// 使用空值合并运算符
|
|
1088
1083
|
originalOrder: 0
|
|
@@ -1092,34 +1087,34 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1092
1087
|
name: "f-reset",
|
|
1093
1088
|
label: t.value.form.reset.label,
|
|
1094
1089
|
click: t.value.form.reset.click,
|
|
1095
|
-
info:
|
|
1090
|
+
info: Fe(t.value.form.reset, (p) => !["click"].includes(p)),
|
|
1096
1091
|
hidden: t.value.form.reset.hidden,
|
|
1097
1092
|
sort: t.value.form.reset.sort ?? 2,
|
|
1098
1093
|
// 使用空值合并运算符
|
|
1099
1094
|
originalOrder: 1
|
|
1100
1095
|
// 添加原始顺序标识
|
|
1101
1096
|
}
|
|
1102
|
-
],
|
|
1103
|
-
return (
|
|
1104
|
-
const
|
|
1105
|
-
return n(),
|
|
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({
|
|
1106
1101
|
ref_key: "gform",
|
|
1107
1102
|
ref: r,
|
|
1108
1103
|
model: t.value,
|
|
1109
1104
|
style: { width: "98%", padding: 0, margin: 0, "box-sizing": "border-box" }
|
|
1110
|
-
}, o(
|
|
1105
|
+
}, o(Fe)(t.value.form, (E) => !["footer", "submit", "reset", "slots", "type", "sort"].includes(E)), { class: "g-form-container" }), {
|
|
1111
1106
|
default: h(() => [
|
|
1112
|
-
te.value.length > 0 ? p
|
|
1113
|
-
var
|
|
1107
|
+
te.value.length > 0 ? m(p.$slots, "default", { key: 0 }, () => {
|
|
1108
|
+
var E, b, _;
|
|
1114
1109
|
return [
|
|
1115
|
-
Q(J,
|
|
1110
|
+
Q(J, M({
|
|
1116
1111
|
class: "demo-tabs",
|
|
1117
1112
|
modelValue: te.value[0].groupName,
|
|
1118
|
-
"onUpdate:modelValue":
|
|
1113
|
+
"onUpdate:modelValue": V[0] || (V[0] = (i) => te.value[0].groupName = i),
|
|
1119
1114
|
style: { width: "100%" }
|
|
1120
1115
|
}, t.value.form.tabs), {
|
|
1121
1116
|
default: h(() => [
|
|
1122
|
-
(n(!0), A(H, null, I(te.value, (i) => (n(),
|
|
1117
|
+
(n(!0), A(H, null, I(te.value, (i) => (n(), F(B, M({
|
|
1123
1118
|
key: i.groupName,
|
|
1124
1119
|
label: i.groupName,
|
|
1125
1120
|
name: i.groupName,
|
|
@@ -1127,40 +1122,40 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1127
1122
|
ref_for: !0
|
|
1128
1123
|
}, i.tabPane), {
|
|
1129
1124
|
default: h(() => [
|
|
1130
|
-
(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 }, {
|
|
1131
1126
|
key: d.key,
|
|
1132
1127
|
style: { width: "100%" }
|
|
1133
1128
|
}), {
|
|
1134
1129
|
default: h(() => {
|
|
1135
1130
|
var P, Y;
|
|
1136
1131
|
return [
|
|
1137
|
-
Q(
|
|
1132
|
+
Q(C, M({
|
|
1138
1133
|
label: d == null ? void 0 : d.item.label,
|
|
1139
1134
|
prop: `${d.key}.value`,
|
|
1140
1135
|
rules: k(d == null ? void 0 : d.item),
|
|
1141
1136
|
ref_for: !0
|
|
1142
1137
|
}, { ...(P = t.value) == null ? void 0 : P.formItems, ...(Y = d == null ? void 0 : d.item) == null ? void 0 : Y.formItem }, { style: { width: "100%" } }), {
|
|
1143
1138
|
default: h(() => [
|
|
1144
|
-
p
|
|
1139
|
+
m(p.$slots, "f-" + d.key, {
|
|
1145
1140
|
item: d == null ? void 0 : d.item,
|
|
1146
1141
|
model: t.value
|
|
1147
1142
|
}, () => [
|
|
1148
|
-
(n(),
|
|
1143
|
+
(n(), F(Qe, {
|
|
1149
1144
|
modelValue: t.value[d.key].value,
|
|
1150
|
-
"onUpdate:modelValue": (
|
|
1145
|
+
"onUpdate:modelValue": (re) => t.value[d.key].value = re,
|
|
1151
1146
|
item: L(d),
|
|
1152
1147
|
ctrlKey: d.key,
|
|
1153
|
-
ctrlType:
|
|
1148
|
+
ctrlType: ne(d == null ? void 0 : d.item),
|
|
1154
1149
|
model: t.value,
|
|
1155
1150
|
key: d.key,
|
|
1156
1151
|
class: "g-ctrl-container",
|
|
1157
1152
|
t: "f",
|
|
1158
|
-
formInfo:
|
|
1153
|
+
formInfo: N.value
|
|
1159
1154
|
}, de({ _: 2 }, [
|
|
1160
|
-
I(
|
|
1161
|
-
name:
|
|
1155
|
+
I(p.$slots, (re, ie) => ({
|
|
1156
|
+
name: ie,
|
|
1162
1157
|
fn: h((pe) => [
|
|
1163
|
-
p
|
|
1158
|
+
m(p.$slots, ie, {
|
|
1164
1159
|
data: pe,
|
|
1165
1160
|
item: d.item,
|
|
1166
1161
|
model: t.value
|
|
@@ -1182,76 +1177,76 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1182
1177
|
]),
|
|
1183
1178
|
_: 3
|
|
1184
1179
|
}, 16, ["modelValue"]),
|
|
1185
|
-
(
|
|
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 }, () => [
|
|
1186
1181
|
G("div", {
|
|
1187
|
-
style:
|
|
1182
|
+
style: Me(t.value.form.footer.style)
|
|
1188
1183
|
}, [
|
|
1189
|
-
p
|
|
1190
|
-
(n(!0), A(H, null, I(
|
|
1191
|
-
p
|
|
1192
|
-
p
|
|
1193
|
-
Q(
|
|
1194
|
-
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"])
|
|
1195
1190
|
}), {
|
|
1196
1191
|
default: h(() => [
|
|
1197
|
-
|
|
1192
|
+
Ce($e(i == null ? void 0 : i.label), 1)
|
|
1198
1193
|
]),
|
|
1199
1194
|
_: 2
|
|
1200
1195
|
}, 1040, ["onClick"])
|
|
1201
1196
|
]),
|
|
1202
|
-
p
|
|
1197
|
+
m(p.$slots, i.name + "-right")
|
|
1203
1198
|
], 64))), 256)),
|
|
1204
|
-
p
|
|
1199
|
+
m(p.$slots, "f-footer-right")
|
|
1205
1200
|
], 4)
|
|
1206
1201
|
])
|
|
1207
1202
|
];
|
|
1208
|
-
}) : p
|
|
1209
|
-
var
|
|
1203
|
+
}) : m(p.$slots, "default", { key: 1 }, () => {
|
|
1204
|
+
var E, b, _;
|
|
1210
1205
|
return [
|
|
1211
|
-
(n(!0), A(H, null, I(u.value, (i, d) => (n(),
|
|
1206
|
+
(n(!0), A(H, null, I(u.value, (i, d) => (n(), F(g, M({ ref_for: !0 }, { ...t.value.form.cols, ...i.col }, {
|
|
1212
1207
|
key: d,
|
|
1213
1208
|
style: { width: "100%" }
|
|
1214
1209
|
}), {
|
|
1215
1210
|
default: h(() => {
|
|
1216
|
-
var
|
|
1211
|
+
var O;
|
|
1217
1212
|
return [
|
|
1218
|
-
Q(
|
|
1213
|
+
Q(C, M({
|
|
1219
1214
|
label: i.label,
|
|
1220
1215
|
prop: `${d}.value`,
|
|
1221
1216
|
rules: k(i),
|
|
1222
1217
|
ref_for: !0
|
|
1223
|
-
}, { ...(
|
|
1218
|
+
}, { ...(O = t.value) == null ? void 0 : O.formItems, ...i == null ? void 0 : i.formItem }, { style: { width: "100%" } }), {
|
|
1224
1219
|
label: h((P) => [
|
|
1225
|
-
p
|
|
1220
|
+
m(p.$slots, `f-${d}-label`, {
|
|
1226
1221
|
data: P,
|
|
1227
1222
|
item: i,
|
|
1228
1223
|
model: t.value
|
|
1229
1224
|
}, () => [
|
|
1230
|
-
|
|
1225
|
+
Ce($e(i.label), 1)
|
|
1231
1226
|
])
|
|
1232
1227
|
]),
|
|
1233
1228
|
default: h(() => [
|
|
1234
|
-
p
|
|
1229
|
+
m(p.$slots, "f-" + d, {
|
|
1235
1230
|
item: i,
|
|
1236
1231
|
model: t.value
|
|
1237
1232
|
}, () => [
|
|
1238
|
-
(n(),
|
|
1233
|
+
(n(), F(Qe, {
|
|
1239
1234
|
modelValue: t.value[d].value,
|
|
1240
1235
|
"onUpdate:modelValue": (P) => t.value[d].value = P,
|
|
1241
1236
|
item: L(i, !0),
|
|
1242
1237
|
ctrlKey: d,
|
|
1243
|
-
ctrlType:
|
|
1238
|
+
ctrlType: ne(i),
|
|
1244
1239
|
key: d,
|
|
1245
1240
|
model: t.value,
|
|
1246
1241
|
class: "g-ctrl-container",
|
|
1247
1242
|
t: "f",
|
|
1248
|
-
formInfo:
|
|
1243
|
+
formInfo: N.value
|
|
1249
1244
|
}, de({ _: 2 }, [
|
|
1250
|
-
I(
|
|
1245
|
+
I(p.$slots, (P, Y) => ({
|
|
1251
1246
|
name: Y,
|
|
1252
|
-
fn: h((
|
|
1253
|
-
p
|
|
1254
|
-
data:
|
|
1247
|
+
fn: h((re) => [
|
|
1248
|
+
m(p.$slots, Y, {
|
|
1249
|
+
data: re,
|
|
1255
1250
|
item: i,
|
|
1256
1251
|
model: t.value
|
|
1257
1252
|
})
|
|
@@ -1266,26 +1261,26 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1266
1261
|
}),
|
|
1267
1262
|
_: 2
|
|
1268
1263
|
}, 1040))), 128)),
|
|
1269
|
-
(
|
|
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 }, () => [
|
|
1270
1265
|
G("div", {
|
|
1271
|
-
style:
|
|
1266
|
+
style: Me(t.value.form.footer.style)
|
|
1272
1267
|
}, [
|
|
1273
|
-
p
|
|
1274
|
-
(n(!0), A(H, null, I(
|
|
1275
|
-
p
|
|
1276
|
-
p
|
|
1277
|
-
Q(
|
|
1278
|
-
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"])
|
|
1279
1274
|
}), {
|
|
1280
1275
|
default: h(() => [
|
|
1281
|
-
|
|
1276
|
+
Ce($e(i == null ? void 0 : i.label), 1)
|
|
1282
1277
|
]),
|
|
1283
1278
|
_: 2
|
|
1284
1279
|
}, 1040, ["onClick"])
|
|
1285
1280
|
]),
|
|
1286
|
-
p
|
|
1281
|
+
m(p.$slots, i.name + "-right")
|
|
1287
1282
|
], 64))), 256)),
|
|
1288
|
-
p
|
|
1283
|
+
m(p.$slots, "f-footer-right")
|
|
1289
1284
|
], 4)
|
|
1290
1285
|
])
|
|
1291
1286
|
];
|
|
@@ -1295,9 +1290,9 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1295
1290
|
}, 16, ["model"]);
|
|
1296
1291
|
};
|
|
1297
1292
|
}
|
|
1298
|
-
}),
|
|
1293
|
+
}), mt = {
|
|
1299
1294
|
__name: "g-query-item",
|
|
1300
|
-
props: /* @__PURE__ */
|
|
1295
|
+
props: /* @__PURE__ */ xe(["more"], {
|
|
1301
1296
|
modelValue: { required: !0 },
|
|
1302
1297
|
modelModifiers: {},
|
|
1303
1298
|
info: { required: !0 },
|
|
@@ -1305,43 +1300,43 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1305
1300
|
}),
|
|
1306
1301
|
emits: ["update:modelValue", "update:info"],
|
|
1307
1302
|
setup(c) {
|
|
1308
|
-
const f =
|
|
1309
|
-
const
|
|
1310
|
-
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;
|
|
1311
1306
|
};
|
|
1312
|
-
return (
|
|
1313
|
-
const w =
|
|
1314
|
-
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}`, {
|
|
1315
1310
|
key: L,
|
|
1316
1311
|
item: k,
|
|
1317
1312
|
model: f.value
|
|
1318
1313
|
}, () => [
|
|
1319
|
-
Q(w,
|
|
1314
|
+
Q(w, M({
|
|
1320
1315
|
label: k.label,
|
|
1321
1316
|
ref_for: !0
|
|
1322
|
-
}, { ...f.value.queryItems, ...
|
|
1317
|
+
}, { ...f.value.queryItems, ...v(k) }), {
|
|
1323
1318
|
label: h(() => [
|
|
1324
|
-
|
|
1319
|
+
m(S.$slots, `q-${L}-label`, {
|
|
1325
1320
|
item: k,
|
|
1326
1321
|
model: f.value
|
|
1327
1322
|
})
|
|
1328
1323
|
]),
|
|
1329
1324
|
default: h(() => [
|
|
1330
|
-
Q(
|
|
1325
|
+
Q(Qe, {
|
|
1331
1326
|
modelValue: e.value[L],
|
|
1332
|
-
"onUpdate:modelValue": (
|
|
1333
|
-
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) },
|
|
1334
1329
|
ctrlKey: L,
|
|
1335
|
-
ctrlType:
|
|
1330
|
+
ctrlType: T(k),
|
|
1336
1331
|
model: f.value,
|
|
1337
1332
|
t: "q",
|
|
1338
1333
|
formInfo: e.value
|
|
1339
1334
|
}, de({ _: 2 }, [
|
|
1340
|
-
I(Object.keys(
|
|
1341
|
-
name:
|
|
1342
|
-
fn: h((
|
|
1343
|
-
|
|
1344
|
-
data:
|
|
1335
|
+
I(Object.keys(S.$slots), (ne) => ({
|
|
1336
|
+
name: ne,
|
|
1337
|
+
fn: h(($) => [
|
|
1338
|
+
m(S.$slots, ne, {
|
|
1339
|
+
data: $,
|
|
1345
1340
|
item: k,
|
|
1346
1341
|
model: f.value
|
|
1347
1342
|
})
|
|
@@ -1354,25 +1349,25 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1354
1349
|
])), 128);
|
|
1355
1350
|
};
|
|
1356
1351
|
}
|
|
1357
|
-
},
|
|
1352
|
+
}, Ue = (c, f) => {
|
|
1358
1353
|
const t = c.__vccOpts || c;
|
|
1359
1354
|
for (const [e, r] of f)
|
|
1360
1355
|
t[e] = r;
|
|
1361
1356
|
return t;
|
|
1362
|
-
},
|
|
1357
|
+
}, Lt = {
|
|
1363
1358
|
key: 0,
|
|
1364
1359
|
class: "outer"
|
|
1365
|
-
},
|
|
1360
|
+
}, zt = { class: "inner" }, Ht = {
|
|
1366
1361
|
__name: "g-query",
|
|
1367
1362
|
props: {
|
|
1368
1363
|
modelValue: { required: !0 },
|
|
1369
1364
|
modelModifiers: {}
|
|
1370
1365
|
},
|
|
1371
|
-
emits: /* @__PURE__ */
|
|
1366
|
+
emits: /* @__PURE__ */ xe(["query", "reset"], ["update:modelValue"]),
|
|
1372
1367
|
setup(c, { emit: f }) {
|
|
1373
|
-
const t =
|
|
1374
|
-
let
|
|
1375
|
-
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 = {
|
|
1376
1371
|
hidden: !1,
|
|
1377
1372
|
type: "hidden",
|
|
1378
1373
|
labelWidth: 100,
|
|
@@ -1389,7 +1384,7 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1389
1384
|
type: "primary",
|
|
1390
1385
|
label: "更多",
|
|
1391
1386
|
click: () => {
|
|
1392
|
-
|
|
1387
|
+
v.value = !v.value;
|
|
1393
1388
|
}
|
|
1394
1389
|
},
|
|
1395
1390
|
reset: {
|
|
@@ -1398,7 +1393,7 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1398
1393
|
hidden: !1,
|
|
1399
1394
|
plain: !1,
|
|
1400
1395
|
click: () => {
|
|
1401
|
-
|
|
1396
|
+
S.value = me(T), e("reset", S.value);
|
|
1402
1397
|
}
|
|
1403
1398
|
},
|
|
1404
1399
|
query: {
|
|
@@ -1406,7 +1401,7 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1406
1401
|
type: "primary",
|
|
1407
1402
|
label: "查询",
|
|
1408
1403
|
click: () => {
|
|
1409
|
-
e("query",
|
|
1404
|
+
e("query", S.value), v.value = !1;
|
|
1410
1405
|
}
|
|
1411
1406
|
},
|
|
1412
1407
|
btns: {
|
|
@@ -1418,7 +1413,7 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1418
1413
|
}
|
|
1419
1414
|
}
|
|
1420
1415
|
};
|
|
1421
|
-
t.value.query =
|
|
1416
|
+
t.value.query = De(q, r == null ? void 0 : r.query, t.value.query);
|
|
1422
1417
|
const w = {
|
|
1423
1418
|
2: {
|
|
1424
1419
|
title: "更多查询",
|
|
@@ -1436,7 +1431,7 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1436
1431
|
trigger: "click"
|
|
1437
1432
|
}
|
|
1438
1433
|
};
|
|
1439
|
-
t.value.query.more.dialog =
|
|
1434
|
+
t.value.query.more.dialog = De(
|
|
1440
1435
|
w[t.value.query.more.mode] || {},
|
|
1441
1436
|
t.value.query.more.dialog
|
|
1442
1437
|
);
|
|
@@ -1447,26 +1442,26 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1447
1442
|
width: "280px"
|
|
1448
1443
|
}
|
|
1449
1444
|
};
|
|
1450
|
-
t.value.queryItems =
|
|
1451
|
-
const L = (u,
|
|
1452
|
-
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]({
|
|
1453
1448
|
model: t.value
|
|
1454
1449
|
// 传递当前模型数据
|
|
1455
1450
|
}), le), {});
|
|
1456
|
-
return
|
|
1451
|
+
return Se(mt, {
|
|
1457
1452
|
modelValue: t.value,
|
|
1458
1453
|
"onUpdate:modelValue": (le) => t.value = le,
|
|
1459
|
-
info:
|
|
1460
|
-
"onUpdate:info": (le) =>
|
|
1461
|
-
more:
|
|
1454
|
+
info: S.value,
|
|
1455
|
+
"onUpdate:info": (le) => S.value = le,
|
|
1456
|
+
more: N
|
|
1462
1457
|
}, te);
|
|
1463
|
-
},
|
|
1464
|
-
var te, le,
|
|
1458
|
+
}, ne = ht(), $ = () => {
|
|
1459
|
+
var te, le, K, se, ye, fe, he, p, V;
|
|
1465
1460
|
const u = [
|
|
1466
1461
|
{
|
|
1467
1462
|
key: "query",
|
|
1468
|
-
hidden: (
|
|
1469
|
-
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,
|
|
1470
1465
|
props: {
|
|
1471
1466
|
...t.value.query.query,
|
|
1472
1467
|
onClick: t.value.query.query.click
|
|
@@ -1476,8 +1471,8 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1476
1471
|
},
|
|
1477
1472
|
{
|
|
1478
1473
|
key: "reset",
|
|
1479
|
-
hidden: (fe = (
|
|
1480
|
-
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,
|
|
1481
1476
|
props: {
|
|
1482
1477
|
...t.value.query.reset,
|
|
1483
1478
|
onClick: t.value.query.reset.click
|
|
@@ -1487,64 +1482,64 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1487
1482
|
},
|
|
1488
1483
|
{
|
|
1489
1484
|
key: "more",
|
|
1490
|
-
hidden: (
|
|
1491
|
-
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,
|
|
1492
1487
|
props: t.value.query.more.mode === 3 ? { ...t.value.query.more.dialog } : {
|
|
1493
1488
|
...t.value.query.more,
|
|
1494
1489
|
onClick: t.value.query.more.click
|
|
1495
1490
|
},
|
|
1496
1491
|
label: t.value.query.more.label,
|
|
1497
1492
|
sort: t.value.query.more.sort || 0,
|
|
1498
|
-
content: t.value.query.more.mode === 3 ? () =>
|
|
1493
|
+
content: t.value.query.more.mode === 3 ? () => Se(We, {
|
|
1499
1494
|
class: "query-form",
|
|
1500
|
-
...
|
|
1501
|
-
}, () => L({ slots:
|
|
1495
|
+
...Fe(t.value.query, (C) => !["query", "more", "reset"].includes(C))
|
|
1496
|
+
}, () => L({ slots: ne }, !0)) : null
|
|
1502
1497
|
}
|
|
1503
1498
|
];
|
|
1504
|
-
return u.sort((
|
|
1505
|
-
reference: () =>
|
|
1506
|
-
default:
|
|
1507
|
-
}) : (
|
|
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)));
|
|
1508
1503
|
};
|
|
1509
|
-
return (u,
|
|
1510
|
-
var
|
|
1511
|
-
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");
|
|
1512
1507
|
return n(), A("div", {
|
|
1513
1508
|
class: "g-query-container",
|
|
1514
|
-
style:
|
|
1509
|
+
style: Me((se = (K = t.value.query) == null ? void 0 : K.container) == null ? void 0 : se.style)
|
|
1515
1510
|
}, [
|
|
1516
|
-
Q(o(
|
|
1511
|
+
Q(o(We), Ge(ft(o(Fe)(t.value.query, (d) => !["query", "more", "reset", "btns"].includes(d)))), {
|
|
1517
1512
|
default: h(() => {
|
|
1518
|
-
var d,
|
|
1513
|
+
var d, O;
|
|
1519
1514
|
return [
|
|
1520
|
-
(n(),
|
|
1521
|
-
((
|
|
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 }, {
|
|
1522
1517
|
default: h(() => {
|
|
1523
|
-
var P, Y,
|
|
1518
|
+
var P, Y, re, ie, pe;
|
|
1524
1519
|
return [
|
|
1525
1520
|
G("div", {
|
|
1526
|
-
style:
|
|
1521
|
+
style: Me((Y = (P = t.value.query) == null ? void 0 : P.btns) == null ? void 0 : Y.style)
|
|
1527
1522
|
}, [
|
|
1528
|
-
t.value.query.group ? (n(),
|
|
1523
|
+
t.value.query.group ? (n(), F(o(Ye), { key: 0 }, {
|
|
1529
1524
|
default: h(() => [
|
|
1530
|
-
(n(!0), A(H, null, I(
|
|
1531
|
-
(n(),
|
|
1525
|
+
(n(!0), A(H, null, I($(), (s) => m(u.$slots, s.props.slot, {}, () => [
|
|
1526
|
+
(n(), F(Ae(s)))
|
|
1532
1527
|
], !0)), 256)),
|
|
1533
|
-
|
|
1528
|
+
m(u.$slots, "q-btns", {}, void 0, !0)
|
|
1534
1529
|
]),
|
|
1535
1530
|
_: 3
|
|
1536
1531
|
})) : (n(), A(H, { key: 1 }, [
|
|
1537
|
-
(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 }, {
|
|
1538
1533
|
default: h(() => [
|
|
1539
|
-
(n(!0), A(H, null, I(
|
|
1540
|
-
(n(),
|
|
1534
|
+
(n(!0), A(H, null, I($(), (s) => m(u.$slots, s.props.slot, {}, () => [
|
|
1535
|
+
(n(), F(Ae(s)))
|
|
1541
1536
|
], !0)), 256))
|
|
1542
1537
|
]),
|
|
1543
1538
|
_: 3
|
|
1544
|
-
})) : (n(!0), A(H, { key: 1 }, I(
|
|
1545
|
-
(n(),
|
|
1539
|
+
})) : (n(!0), A(H, { key: 1 }, I($(), (s) => m(u.$slots, s.props.slot, {}, () => [
|
|
1540
|
+
(n(), F(Ae(s)))
|
|
1546
1541
|
], !0)), 256)),
|
|
1547
|
-
|
|
1542
|
+
m(u.$slots, "q-btns", {}, void 0, !0)
|
|
1548
1543
|
], 64))
|
|
1549
1544
|
], 4)
|
|
1550
1545
|
];
|
|
@@ -1555,48 +1550,48 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1555
1550
|
}),
|
|
1556
1551
|
_: 3
|
|
1557
1552
|
}, 16),
|
|
1558
|
-
((
|
|
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", {
|
|
1559
1554
|
key: 0,
|
|
1560
|
-
style:
|
|
1555
|
+
style: Me((V = (p = t.value.query) == null ? void 0 : p.btns) == null ? void 0 : V.style)
|
|
1561
1556
|
}, [
|
|
1562
|
-
t.value.query.group ? (n(),
|
|
1557
|
+
t.value.query.group ? (n(), F(o(Ye), { key: 0 }, {
|
|
1563
1558
|
default: h(() => [
|
|
1564
|
-
(n(!0), A(H, null, I(
|
|
1565
|
-
(n(),
|
|
1559
|
+
(n(!0), A(H, null, I($(), (d) => m(u.$slots, d.props.slot, {}, () => [
|
|
1560
|
+
(n(), F(Ae(d)))
|
|
1566
1561
|
], !0)), 256)),
|
|
1567
|
-
|
|
1562
|
+
m(u.$slots, "q-btns", {}, void 0, !0)
|
|
1568
1563
|
]),
|
|
1569
1564
|
_: 3
|
|
1570
1565
|
})) : (n(), A(H, { key: 1 }, [
|
|
1571
|
-
(
|
|
1566
|
+
(g = (C = t.value.query) == null ? void 0 : C.btns) != null && g.group ? (n(), F(o(Ye), { key: 0 }, {
|
|
1572
1567
|
default: h(() => [
|
|
1573
|
-
(n(!0), A(H, null, I(
|
|
1574
|
-
(n(),
|
|
1568
|
+
(n(!0), A(H, null, I($(), (d) => m(u.$slots, d.props.slot, {}, () => [
|
|
1569
|
+
(n(), F(Ae(d)))
|
|
1575
1570
|
], !0)), 256))
|
|
1576
1571
|
]),
|
|
1577
1572
|
_: 3
|
|
1578
|
-
})) : (n(!0), A(H, { key: 1 }, I(
|
|
1579
|
-
(n(),
|
|
1573
|
+
})) : (n(!0), A(H, { key: 1 }, I($(), (d) => m(u.$slots, d.props.slot, {}, () => [
|
|
1574
|
+
(n(), F(Ae(d)))
|
|
1580
1575
|
], !0)), 256)),
|
|
1581
|
-
|
|
1576
|
+
m(u.$slots, "q-btns", {}, void 0, !0)
|
|
1582
1577
|
], 64))
|
|
1583
1578
|
], 4)) : ve("", !0),
|
|
1584
|
-
Q(
|
|
1579
|
+
Q(Vt, {
|
|
1585
1580
|
duration: 300,
|
|
1586
1581
|
name: "nested"
|
|
1587
1582
|
}, {
|
|
1588
1583
|
default: h(() => {
|
|
1589
|
-
var d,
|
|
1584
|
+
var d, O, P;
|
|
1590
1585
|
return [
|
|
1591
|
-
|
|
1592
|
-
G("div",
|
|
1593
|
-
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)))), {
|
|
1594
1589
|
default: h(() => [
|
|
1595
|
-
(n(),
|
|
1590
|
+
(n(), F(Ae(L({ slots: u.$slots }, !0))))
|
|
1596
1591
|
]),
|
|
1597
1592
|
_: 1
|
|
1598
1593
|
}, 16)), [
|
|
1599
|
-
[
|
|
1594
|
+
[Tt, v.value]
|
|
1600
1595
|
]) : ve("", !0)
|
|
1601
1596
|
])
|
|
1602
1597
|
])) : ve("", !0)
|
|
@@ -1604,27 +1599,27 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1604
1599
|
}),
|
|
1605
1600
|
_: 1
|
|
1606
1601
|
}),
|
|
1607
|
-
|
|
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({
|
|
1608
1603
|
key: 1,
|
|
1609
|
-
modelValue:
|
|
1610
|
-
"onUpdate:modelValue":
|
|
1604
|
+
modelValue: v.value,
|
|
1605
|
+
"onUpdate:modelValue": N[4] || (N[4] = (d) => v.value = d),
|
|
1611
1606
|
title: "更多查询",
|
|
1612
1607
|
"show-close": !1
|
|
1613
1608
|
}, t.value.query.more.dialog), de({
|
|
1614
1609
|
default: h(() => [
|
|
1615
|
-
Q(o(
|
|
1610
|
+
Q(o(We), M(o(Fe)(t.value.query, (d) => !["query", "more", "reset"].includes(d)), { style: { width: "98%" } }), {
|
|
1616
1611
|
default: h(() => [
|
|
1617
|
-
Q(
|
|
1612
|
+
Q(mt, {
|
|
1618
1613
|
modelValue: t.value,
|
|
1619
|
-
"onUpdate:modelValue":
|
|
1620
|
-
info:
|
|
1621
|
-
"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),
|
|
1622
1617
|
more: !0
|
|
1623
1618
|
}, de({ _: 2 }, [
|
|
1624
|
-
I(u.$slots, (d,
|
|
1625
|
-
name:
|
|
1619
|
+
I(u.$slots, (d, O, P) => ({
|
|
1620
|
+
name: O,
|
|
1626
1621
|
fn: h((Y) => [
|
|
1627
|
-
|
|
1622
|
+
m(u.$slots, O, { model: t.value }, void 0, !0)
|
|
1628
1623
|
])
|
|
1629
1624
|
}))
|
|
1630
1625
|
]), 1032, ["modelValue", "info"])
|
|
@@ -1634,23 +1629,23 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1634
1629
|
]),
|
|
1635
1630
|
_: 2
|
|
1636
1631
|
}, [
|
|
1637
|
-
(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 : {
|
|
1638
1633
|
name: "footer",
|
|
1639
1634
|
fn: h(() => [
|
|
1640
|
-
G("div",
|
|
1641
|
-
Q(o(
|
|
1642
|
-
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())
|
|
1643
1638
|
}), {
|
|
1644
1639
|
default: h(() => [
|
|
1645
|
-
|
|
1640
|
+
Ce($e(t.value.query.query.label), 1)
|
|
1646
1641
|
]),
|
|
1647
1642
|
_: 1
|
|
1648
1643
|
}, 16),
|
|
1649
|
-
Q(o(
|
|
1650
|
-
onClick:
|
|
1644
|
+
Q(o(_e), M(t.value.query.reset, {
|
|
1645
|
+
onClick: N[3] || (N[3] = (d) => t.value.query.reset.click())
|
|
1651
1646
|
}), {
|
|
1652
1647
|
default: h(() => [
|
|
1653
|
-
|
|
1648
|
+
Ce($e(t.value.query.reset.label), 1)
|
|
1654
1649
|
]),
|
|
1655
1650
|
_: 1
|
|
1656
1651
|
}, 16)
|
|
@@ -1662,10 +1657,10 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1662
1657
|
], 4);
|
|
1663
1658
|
};
|
|
1664
1659
|
}
|
|
1665
|
-
},
|
|
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 = {
|
|
1666
1661
|
style: { display: "flex", "flex-wrap": "wrap" },
|
|
1667
1662
|
id: "excelSortEl"
|
|
1668
|
-
},
|
|
1663
|
+
}, Jt = ["textContent"], Zt = { style: { width: "100%", display: "flex", padding: "10px", "box-sizing": "border-box", "justify-content": "center", "border-top": "1px solid #dcdfe6" } }, Kt = {
|
|
1669
1664
|
__name: "check-excel-item",
|
|
1670
1665
|
props: {
|
|
1671
1666
|
items: Array,
|
|
@@ -1673,51 +1668,51 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1673
1668
|
},
|
|
1674
1669
|
emits: ["excel"],
|
|
1675
1670
|
setup(c, { emit: f }) {
|
|
1676
|
-
const t = c, e = f, r =
|
|
1677
|
-
r.value.forEach((
|
|
1678
|
-
|
|
1671
|
+
const t = c, e = f, r = me(t.items), v = () => {
|
|
1672
|
+
r.value.forEach((q) => {
|
|
1673
|
+
q.value = !0;
|
|
1679
1674
|
});
|
|
1680
|
-
},
|
|
1681
|
-
r.value.forEach((
|
|
1682
|
-
|
|
1675
|
+
}, T = () => {
|
|
1676
|
+
r.value.forEach((q) => {
|
|
1677
|
+
q.value = !1;
|
|
1683
1678
|
});
|
|
1684
|
-
},
|
|
1685
|
-
e("excel", r.value, (
|
|
1686
|
-
if (!
|
|
1679
|
+
}, S = () => {
|
|
1680
|
+
e("excel", r.value, (q, w = "excel.xls") => {
|
|
1681
|
+
if (!q) {
|
|
1687
1682
|
console.error("下载链接无效");
|
|
1688
1683
|
return;
|
|
1689
1684
|
}
|
|
1690
1685
|
try {
|
|
1691
1686
|
const k = document.createElement("a");
|
|
1692
|
-
k.href =
|
|
1687
|
+
k.href = q, k.download = w, k.style.display = "none", document.body.appendChild(k), k.click(), document.body.removeChild(k);
|
|
1693
1688
|
} catch (k) {
|
|
1694
1689
|
console.error("下载文件时出现错误:", k);
|
|
1695
1690
|
}
|
|
1696
1691
|
});
|
|
1697
1692
|
};
|
|
1698
|
-
return
|
|
1699
|
-
const
|
|
1693
|
+
return Le(() => {
|
|
1694
|
+
const q = new bt(document.getElementById("excelSortEl"), {
|
|
1700
1695
|
animation: 150,
|
|
1701
1696
|
onEnd: () => {
|
|
1702
|
-
let k =
|
|
1697
|
+
let k = q.toArray();
|
|
1703
1698
|
console.log(k);
|
|
1704
1699
|
}
|
|
1705
|
-
}), w =
|
|
1706
|
-
|
|
1700
|
+
}), w = q;
|
|
1701
|
+
St(() => {
|
|
1707
1702
|
w && w.destroy();
|
|
1708
1703
|
});
|
|
1709
|
-
}), (
|
|
1710
|
-
const k =
|
|
1711
|
-
return n(), A("div",
|
|
1712
|
-
G("div",
|
|
1713
|
-
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, [
|
|
1714
1709
|
G("a", {
|
|
1715
|
-
onClick:
|
|
1710
|
+
onClick: v,
|
|
1716
1711
|
style: { cursor: "pointer" }
|
|
1717
1712
|
}, "全选"),
|
|
1718
1713
|
Q(k, { direction: "vertical" }),
|
|
1719
1714
|
G("a", {
|
|
1720
|
-
onClick:
|
|
1715
|
+
onClick: T,
|
|
1721
1716
|
style: { cursor: "pointer" }
|
|
1722
1717
|
}, "全不选")
|
|
1723
1718
|
]),
|
|
@@ -1729,34 +1724,34 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1729
1724
|
style: { "margin-bottom": "10px" }
|
|
1730
1725
|
}),
|
|
1731
1726
|
w[0] || (w[0] = G("div", { style: { margin: "1px 0" } }, null, -1)),
|
|
1732
|
-
G("div",
|
|
1733
|
-
(n(!0), A(H, null, I(r.value, (u) => (n(),
|
|
1727
|
+
G("div", Xt, [
|
|
1728
|
+
(n(!0), A(H, null, I(r.value, (u) => (n(), F(ne, {
|
|
1734
1729
|
class: "check-box-hover",
|
|
1735
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" },
|
|
1736
1731
|
"data-id": u.key,
|
|
1737
1732
|
modelValue: u.value,
|
|
1738
|
-
"onUpdate:modelValue": (
|
|
1733
|
+
"onUpdate:modelValue": (N) => u.value = N,
|
|
1739
1734
|
key: u.key,
|
|
1740
1735
|
title: u.label
|
|
1741
1736
|
}, {
|
|
1742
1737
|
default: h(() => [
|
|
1743
1738
|
G("span", {
|
|
1744
|
-
textContent:
|
|
1739
|
+
textContent: $e(u.label),
|
|
1745
1740
|
style: { display: "block", "text-overflow": "ellipsis", width: "95px", overflow: "hidden" }
|
|
1746
|
-
}, null, 8,
|
|
1741
|
+
}, null, 8, Jt)
|
|
1747
1742
|
]),
|
|
1748
1743
|
_: 2
|
|
1749
1744
|
}, 1032, ["data-id", "modelValue", "onUpdate:modelValue", "title"]))), 128))
|
|
1750
1745
|
])
|
|
1751
1746
|
]),
|
|
1752
|
-
G("div",
|
|
1753
|
-
Q(
|
|
1747
|
+
G("div", Zt, [
|
|
1748
|
+
Q($, {
|
|
1754
1749
|
type: "primary",
|
|
1755
|
-
onClick:
|
|
1750
|
+
onClick: S,
|
|
1756
1751
|
disabled: r.value.filter((u) => u.value).length < 1
|
|
1757
1752
|
}, {
|
|
1758
1753
|
default: h(() => [
|
|
1759
|
-
|
|
1754
|
+
Ce($e(t.commitText), 1)
|
|
1760
1755
|
]),
|
|
1761
1756
|
_: 1
|
|
1762
1757
|
}, 8, ["disabled"])
|
|
@@ -1764,46 +1759,46 @@ const Je = /* @__PURE__ */ Bt(It), Ut = {
|
|
|
1764
1759
|
]);
|
|
1765
1760
|
};
|
|
1766
1761
|
}
|
|
1767
|
-
},
|
|
1768
|
-
|
|
1762
|
+
}, el = /* @__PURE__ */ Ue(Kt, [["__scopeId", "data-v-51dfb7ef"]]), qe = new xt("gyc");
|
|
1763
|
+
qe.version(1).stores({
|
|
1769
1764
|
tableInfo: "++id,[user+page+key],user,page,key,showCol,width,sort",
|
|
1770
1765
|
tableList: "++id,name"
|
|
1771
1766
|
});
|
|
1772
|
-
async function
|
|
1773
|
-
if (await
|
|
1774
|
-
let
|
|
1775
|
-
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";
|
|
1776
1771
|
} else {
|
|
1777
|
-
let
|
|
1778
|
-
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";
|
|
1779
1774
|
}
|
|
1780
1775
|
}
|
|
1781
|
-
async function
|
|
1782
|
-
return await
|
|
1776
|
+
async function tl(c, f) {
|
|
1777
|
+
return await qe.tableInfo.where({ user: c, page: f }).toArray();
|
|
1783
1778
|
}
|
|
1784
|
-
async function
|
|
1779
|
+
async function ll(c, f) {
|
|
1785
1780
|
try {
|
|
1786
|
-
const t = await
|
|
1781
|
+
const t = await qe.tableInfo.where({ user: c, page: f }).delete();
|
|
1787
1782
|
return console.log("删除了" + t + "条数据"), t;
|
|
1788
1783
|
} catch (t) {
|
|
1789
1784
|
throw console.error("删除表格项设置信息时出错:", t), t;
|
|
1790
1785
|
}
|
|
1791
1786
|
}
|
|
1792
|
-
async function
|
|
1793
|
-
return await
|
|
1787
|
+
async function ol(c) {
|
|
1788
|
+
return await qe.tableList.where({ name: c }).first();
|
|
1794
1789
|
}
|
|
1795
|
-
async function
|
|
1796
|
-
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";
|
|
1797
1792
|
}
|
|
1798
|
-
const
|
|
1793
|
+
const al = {
|
|
1799
1794
|
style: { margin: "10px" },
|
|
1800
1795
|
class: "allcheck"
|
|
1801
|
-
},
|
|
1796
|
+
}, ul = {
|
|
1802
1797
|
id: "cols",
|
|
1803
1798
|
style: { display: "flex", "flex-wrap": "wrap", margin: "0 !important", padding: "0 !important" }
|
|
1804
|
-
},
|
|
1799
|
+
}, nl = ["textContent"], sl = {
|
|
1805
1800
|
__name: "columns-setting",
|
|
1806
|
-
props: /* @__PURE__ */
|
|
1801
|
+
props: /* @__PURE__ */ xe({
|
|
1807
1802
|
name: {
|
|
1808
1803
|
type: String,
|
|
1809
1804
|
required: !0
|
|
@@ -1814,34 +1809,34 @@ const ol = {
|
|
|
1814
1809
|
}),
|
|
1815
1810
|
emits: ["update:modelValue"],
|
|
1816
1811
|
setup(c) {
|
|
1817
|
-
const f = c, t =
|
|
1812
|
+
const f = c, t = me([]), e = Be(c, "modelValue"), r = async (w, k) => {
|
|
1818
1813
|
w ? e.value[k].showCol = !0 : e.value[k].showCol = !1;
|
|
1819
1814
|
try {
|
|
1820
|
-
const L = await
|
|
1815
|
+
const L = await Pe(e.value.table.user, f.name, k, { showCol: w });
|
|
1821
1816
|
console.log(L);
|
|
1822
1817
|
} catch (L) {
|
|
1823
|
-
console.error("列显示状态保存信息时出错:", L),
|
|
1818
|
+
console.error("列显示状态保存信息时出错:", L), Ve({
|
|
1824
1819
|
type: "error",
|
|
1825
1820
|
message: "列显示状态保存信息失败!"
|
|
1826
1821
|
});
|
|
1827
1822
|
}
|
|
1828
|
-
},
|
|
1823
|
+
}, v = () => {
|
|
1829
1824
|
const w = document.getElementById("cols");
|
|
1830
1825
|
if (w) {
|
|
1831
|
-
let k =
|
|
1826
|
+
let k = bt.create(w, {
|
|
1832
1827
|
animation: 150,
|
|
1833
1828
|
filter: ".filtered",
|
|
1834
1829
|
//
|
|
1835
1830
|
sort: !0,
|
|
1836
1831
|
onEnd: () => {
|
|
1837
|
-
k.toArray().forEach(async (
|
|
1838
|
-
e.value[
|
|
1839
|
-
let u = e.value[
|
|
1832
|
+
k.toArray().forEach(async (ne, $) => {
|
|
1833
|
+
e.value[ne].sort = $;
|
|
1834
|
+
let u = e.value[ne].width || "auto";
|
|
1840
1835
|
try {
|
|
1841
|
-
const
|
|
1842
|
-
console.log(
|
|
1843
|
-
} catch (
|
|
1844
|
-
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({
|
|
1845
1840
|
type: "error",
|
|
1846
1841
|
message: "列排序和宽度保存信息失败!"
|
|
1847
1842
|
});
|
|
@@ -1850,11 +1845,11 @@ const ol = {
|
|
|
1850
1845
|
}
|
|
1851
1846
|
});
|
|
1852
1847
|
}
|
|
1853
|
-
},
|
|
1848
|
+
}, T = async () => {
|
|
1854
1849
|
try {
|
|
1855
1850
|
for (const w of t.value) {
|
|
1856
1851
|
w.showCol = !0, e.value[w.value].showCol = !0;
|
|
1857
|
-
const k = await
|
|
1852
|
+
const k = await Pe(e.value.table.user, f.name, w.value, {
|
|
1858
1853
|
showCol: !0,
|
|
1859
1854
|
width: w.width,
|
|
1860
1855
|
sort: w.sort
|
|
@@ -1862,17 +1857,17 @@ const ol = {
|
|
|
1862
1857
|
console.log(k);
|
|
1863
1858
|
}
|
|
1864
1859
|
} catch (w) {
|
|
1865
|
-
console.error("全选列保存信息时出错:", w),
|
|
1860
|
+
console.error("全选列保存信息时出错:", w), Ve({
|
|
1866
1861
|
type: "error",
|
|
1867
1862
|
message: "全选列保存信息失败!"
|
|
1868
1863
|
});
|
|
1869
1864
|
}
|
|
1870
|
-
},
|
|
1865
|
+
}, S = async () => {
|
|
1871
1866
|
try {
|
|
1872
1867
|
const w = t.value.filter((k) => !k.alwaysShow);
|
|
1873
1868
|
for (const k of w) {
|
|
1874
1869
|
k.showCol = !1, e.value[k.value].showCol = !1;
|
|
1875
|
-
const L = await
|
|
1870
|
+
const L = await Pe(e.value.table.user, f.name, k.value, {
|
|
1876
1871
|
showCol: !1,
|
|
1877
1872
|
width: k.width,
|
|
1878
1873
|
sort: k.sort
|
|
@@ -1880,28 +1875,28 @@ const ol = {
|
|
|
1880
1875
|
console.log(L);
|
|
1881
1876
|
}
|
|
1882
1877
|
} catch (w) {
|
|
1883
|
-
console.error("清除列保存信息时出错:", w),
|
|
1878
|
+
console.error("清除列保存信息时出错:", w), Ve({
|
|
1884
1879
|
type: "error",
|
|
1885
1880
|
message: "清除列保存信息失败!"
|
|
1886
1881
|
});
|
|
1887
1882
|
}
|
|
1888
|
-
},
|
|
1889
|
-
|
|
1883
|
+
}, q = () => {
|
|
1884
|
+
vt.confirm("确定要复位吗?", "提示", {
|
|
1890
1885
|
confirmButtonText: "确定",
|
|
1891
1886
|
cancelButtonText: "取消",
|
|
1892
1887
|
type: "warning"
|
|
1893
1888
|
}).then(() => {
|
|
1894
|
-
|
|
1889
|
+
ll(e.value.table.user, f.name).then((w) => {
|
|
1895
1890
|
console.log(w), window.location.reload();
|
|
1896
1891
|
}).catch((w) => {
|
|
1897
|
-
console.error("复位操作出错:", w),
|
|
1892
|
+
console.error("复位操作出错:", w), Ve({
|
|
1898
1893
|
type: "info",
|
|
1899
1894
|
message: "复位失败!"
|
|
1900
1895
|
});
|
|
1901
1896
|
});
|
|
1902
1897
|
});
|
|
1903
1898
|
};
|
|
1904
|
-
return
|
|
1899
|
+
return Le(async () => {
|
|
1905
1900
|
t.value = Object.entries(e.value).filter(([, w]) => w.visible !== !1).filter(([, w]) => w.type != "hidden").map(([w, k]) => ({
|
|
1906
1901
|
label: k.label,
|
|
1907
1902
|
value: w,
|
|
@@ -1909,18 +1904,18 @@ const ol = {
|
|
|
1909
1904
|
showCol: k.showCol !== !1,
|
|
1910
1905
|
sort: k.sort || 0,
|
|
1911
1906
|
width: k.width || "auto"
|
|
1912
|
-
})).sort((w, k) => w.sort - k.sort),
|
|
1907
|
+
})).sort((w, k) => w.sort - k.sort), v();
|
|
1913
1908
|
}), (w, k) => {
|
|
1914
|
-
const L =
|
|
1909
|
+
const L = R("el-divider"), ne = R("el-alert"), $ = R("el-checkbox");
|
|
1915
1910
|
return n(), A("div", null, [
|
|
1916
|
-
G("div",
|
|
1917
|
-
G("a", { onClick:
|
|
1911
|
+
G("div", al, [
|
|
1912
|
+
G("a", { onClick: T }, "全选"),
|
|
1918
1913
|
Q(L, { direction: "vertical" }),
|
|
1919
|
-
G("a", { onClick:
|
|
1914
|
+
G("a", { onClick: S }, "全不选"),
|
|
1920
1915
|
Q(L, { direction: "vertical" }),
|
|
1921
|
-
G("a", { onClick:
|
|
1916
|
+
G("a", { onClick: q }, "复位")
|
|
1922
1917
|
]),
|
|
1923
|
-
Q(
|
|
1918
|
+
Q(ne, {
|
|
1924
1919
|
title: "拖动表格列标题可以改变表格列显示顺序 !",
|
|
1925
1920
|
type: "warning",
|
|
1926
1921
|
"show-icon": "",
|
|
@@ -1928,13 +1923,13 @@ const ol = {
|
|
|
1928
1923
|
style: { "margin-bottom": "10px" }
|
|
1929
1924
|
}),
|
|
1930
1925
|
G("div", null, [
|
|
1931
|
-
G("div",
|
|
1932
|
-
(n(!0), A(H, null, I(t.value, (u) => (n(),
|
|
1926
|
+
G("div", ul, [
|
|
1927
|
+
(n(!0), A(H, null, I(t.value, (u) => (n(), F($, {
|
|
1933
1928
|
modelValue: u.showCol,
|
|
1934
|
-
"onUpdate:modelValue": (
|
|
1929
|
+
"onUpdate:modelValue": (N) => u.showCol = N,
|
|
1935
1930
|
"data-id": u.value,
|
|
1936
|
-
class:
|
|
1937
|
-
onChange: (
|
|
1931
|
+
class: gt(["check-box-hover", u.value == "control" ? "filtered" : ""]),
|
|
1932
|
+
onChange: (N) => r(N, u.value),
|
|
1938
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" },
|
|
1939
1934
|
value: u.value,
|
|
1940
1935
|
title: u.label,
|
|
@@ -1943,9 +1938,9 @@ const ol = {
|
|
|
1943
1938
|
}, {
|
|
1944
1939
|
default: h(() => [
|
|
1945
1940
|
G("span", {
|
|
1946
|
-
textContent:
|
|
1941
|
+
textContent: $e(u.label),
|
|
1947
1942
|
style: { display: "block", "text-overflow": "ellipsis", width: "95px", overflow: "hidden" }
|
|
1948
|
-
}, null, 8,
|
|
1943
|
+
}, null, 8, nl)
|
|
1949
1944
|
]),
|
|
1950
1945
|
_: 2
|
|
1951
1946
|
}, 1032, ["modelValue", "onUpdate:modelValue", "data-id", "class", "onChange", "value", "title", "disabled"]))), 128))
|
|
@@ -1954,34 +1949,34 @@ const ol = {
|
|
|
1954
1949
|
]);
|
|
1955
1950
|
};
|
|
1956
1951
|
}
|
|
1957
|
-
},
|
|
1952
|
+
}, il = /* @__PURE__ */ Ue(sl, [["__scopeId", "data-v-c423ede0"]]), dl = { class: "g-table-container" }, fl = {
|
|
1958
1953
|
key: 0,
|
|
1959
1954
|
class: "table-query-container"
|
|
1960
|
-
},
|
|
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 = {
|
|
1961
1956
|
style: { display: "flex", "justify-content": "center", width: "100%", height: "100%" },
|
|
1962
1957
|
id: "table-form"
|
|
1963
|
-
},
|
|
1958
|
+
}, bl = { key: 1 }, $l = { style: { display: "flex" } }, El = { style: { display: "flex", flex: "1" } }, wl = /* @__PURE__ */ Object.assign({
|
|
1964
1959
|
name: "g-table",
|
|
1965
1960
|
inheritAttrs: !1
|
|
1966
1961
|
}, {
|
|
1967
1962
|
__name: "g-table",
|
|
1968
|
-
props: /* @__PURE__ */
|
|
1963
|
+
props: /* @__PURE__ */ xe({
|
|
1969
1964
|
name: String,
|
|
1970
1965
|
require: !0
|
|
1971
1966
|
}, {
|
|
1972
1967
|
modelValue: { required: !0 },
|
|
1973
1968
|
modelModifiers: {}
|
|
1974
1969
|
}),
|
|
1975
|
-
emits: /* @__PURE__ */
|
|
1970
|
+
emits: /* @__PURE__ */ xe(["load", "open", "delete", "submit", "reset", "download", "row-save"], ["update:modelValue"]),
|
|
1976
1971
|
setup(c, { emit: f }) {
|
|
1977
|
-
var
|
|
1978
|
-
const t = f, e =
|
|
1979
|
-
|
|
1972
|
+
var s, W, ue, we, ge, ke, Te;
|
|
1973
|
+
const t = f, e = Be(c, "modelValue"), r = rt("options"), v = me({});
|
|
1974
|
+
ct(() => {
|
|
1980
1975
|
if (!e.value) return;
|
|
1981
|
-
const l = Object.entries(e.value).filter(([a,
|
|
1982
|
-
|
|
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);
|
|
1983
1978
|
});
|
|
1984
|
-
const
|
|
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 = {
|
|
1985
1980
|
autoWatch: !1,
|
|
1986
1981
|
data: [],
|
|
1987
1982
|
border: !0,
|
|
@@ -1992,27 +1987,27 @@ const ol = {
|
|
|
1992
1987
|
load: () => {
|
|
1993
1988
|
let { currentPage: l, pageSize: a } = e.value.table.page;
|
|
1994
1989
|
try {
|
|
1995
|
-
t("load", { currentPage: l, pageSize: a, ...
|
|
1996
|
-
if (!Array.isArray(
|
|
1997
|
-
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("数据加载失败,请检查数据格式。");
|
|
1998
1993
|
return;
|
|
1999
1994
|
}
|
|
2000
1995
|
if (typeof U != "number") {
|
|
2001
|
-
console.error("从 load 事件回调中接收到的 total 不是数字格式。"),
|
|
1996
|
+
console.error("从 load 事件回调中接收到的 total 不是数字格式。"), Ve.error("数据加载失败,请检查数据格式。");
|
|
2002
1997
|
return;
|
|
2003
1998
|
}
|
|
2004
|
-
e.value.table.data =
|
|
1999
|
+
e.value.table.data = y, e.value.table.page.total = U, $.value = X, ne.value = Z, ie();
|
|
2005
2000
|
});
|
|
2006
|
-
} catch (
|
|
2007
|
-
console.error("触发 load 事件时出现错误:",
|
|
2001
|
+
} catch (y) {
|
|
2002
|
+
console.error("触发 load 事件时出现错误:", y), Ve.error("数据加载时出现错误,请稍后重试。");
|
|
2008
2003
|
}
|
|
2009
2004
|
},
|
|
2010
|
-
onHeaderDragend: (l, a,
|
|
2005
|
+
onHeaderDragend: (l, a, y) => {
|
|
2011
2006
|
var U;
|
|
2012
|
-
|
|
2007
|
+
Pe((U = e.value.table) == null ? void 0 : U.user, k.name, y.property, { width: l });
|
|
2013
2008
|
},
|
|
2014
|
-
onRowDblclick: (l, a,
|
|
2015
|
-
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);
|
|
2016
2011
|
},
|
|
2017
2012
|
style: { "min-height": "100px", backgroundColor: "var(--el-bg-color)" },
|
|
2018
2013
|
page: {
|
|
@@ -2029,21 +2024,25 @@ const ol = {
|
|
|
2029
2024
|
},
|
|
2030
2025
|
hidden: !1
|
|
2031
2026
|
},
|
|
2032
|
-
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
|
+
}
|
|
2033
2032
|
};
|
|
2034
|
-
e.value.table =
|
|
2035
|
-
|
|
2033
|
+
e.value.table = De(
|
|
2034
|
+
u,
|
|
2036
2035
|
r == null ? void 0 : r.table,
|
|
2037
2036
|
e.value.table,
|
|
2038
2037
|
L
|
|
2039
2038
|
// 继承父组件的属性
|
|
2040
2039
|
);
|
|
2041
|
-
const
|
|
2040
|
+
const N = {
|
|
2042
2041
|
type: "control",
|
|
2043
2042
|
label: "操作",
|
|
2044
2043
|
width: 250,
|
|
2045
2044
|
fixed: "right",
|
|
2046
|
-
style: { ...(
|
|
2045
|
+
style: { ...(W = (s = e.value) == null ? void 0 : s.control) == null ? void 0 : W.style },
|
|
2047
2046
|
validate: (l) => !0,
|
|
2048
2047
|
add: {
|
|
2049
2048
|
label: "新增",
|
|
@@ -2058,20 +2057,20 @@ const ol = {
|
|
|
2058
2057
|
text: !0,
|
|
2059
2058
|
type: "success",
|
|
2060
2059
|
mode: "dialog",
|
|
2061
|
-
auth: (l, a,
|
|
2060
|
+
auth: (l, a, y) => !1
|
|
2062
2061
|
},
|
|
2063
2062
|
edit: {
|
|
2064
2063
|
label: "编辑",
|
|
2065
2064
|
text: !0,
|
|
2066
2065
|
type: "primary",
|
|
2067
2066
|
mode: "dialog",
|
|
2068
|
-
auth: (l, a,
|
|
2067
|
+
auth: (l, a, y) => !0
|
|
2069
2068
|
},
|
|
2070
2069
|
delete: {
|
|
2071
2070
|
text: !0,
|
|
2072
2071
|
label: "删除",
|
|
2073
2072
|
type: "danger",
|
|
2074
|
-
auth: (l, a,
|
|
2073
|
+
auth: (l, a, y) => !0,
|
|
2075
2074
|
dialog: {
|
|
2076
2075
|
message: "此操作将永久删除该文件, 是否继续?",
|
|
2077
2076
|
title: "提示",
|
|
@@ -2101,46 +2100,46 @@ const ol = {
|
|
|
2101
2100
|
auth: () => !1
|
|
2102
2101
|
}
|
|
2103
2102
|
};
|
|
2104
|
-
e.value.control =
|
|
2105
|
-
|
|
2103
|
+
e.value.control = De(
|
|
2104
|
+
N,
|
|
2106
2105
|
r == null ? void 0 : r.control,
|
|
2107
|
-
(
|
|
2106
|
+
(ue = e.value) == null ? void 0 : ue.control
|
|
2108
2107
|
);
|
|
2109
|
-
const
|
|
2108
|
+
const te = {
|
|
2110
2109
|
type: "hidden",
|
|
2111
2110
|
minWidth: 120,
|
|
2112
2111
|
align: "center",
|
|
2113
|
-
formatter: (l, a,
|
|
2112
|
+
formatter: (l, a, y, U) => y
|
|
2114
2113
|
};
|
|
2115
|
-
e.value.tableColumns =
|
|
2116
|
-
|
|
2114
|
+
e.value.tableColumns = De(
|
|
2115
|
+
te,
|
|
2117
2116
|
r == null ? void 0 : r.tableColumns,
|
|
2118
|
-
(
|
|
2117
|
+
(we = e.value) == null ? void 0 : we.tableColumns
|
|
2119
2118
|
);
|
|
2120
|
-
const
|
|
2119
|
+
const le = {
|
|
2121
2120
|
type: "hidden",
|
|
2122
2121
|
disabled: void 0,
|
|
2123
2122
|
footer: { hidden: !1 },
|
|
2124
2123
|
modalState: void 0
|
|
2125
2124
|
};
|
|
2126
|
-
e.value.form =
|
|
2127
|
-
|
|
2125
|
+
e.value.form = De(
|
|
2126
|
+
le,
|
|
2128
2127
|
r == null ? void 0 : r.form,
|
|
2129
|
-
(
|
|
2128
|
+
(ge = e.value) == null ? void 0 : ge.form
|
|
2130
2129
|
);
|
|
2131
|
-
const
|
|
2130
|
+
const K = {
|
|
2132
2131
|
type: "hidden",
|
|
2133
2132
|
labelPosition: "right",
|
|
2134
2133
|
style: {
|
|
2135
2134
|
width: "100%"
|
|
2136
2135
|
}
|
|
2137
2136
|
};
|
|
2138
|
-
e.value.formItems =
|
|
2139
|
-
|
|
2137
|
+
e.value.formItems = De(
|
|
2138
|
+
K,
|
|
2140
2139
|
r == null ? void 0 : r.formItems,
|
|
2141
|
-
(
|
|
2140
|
+
(ke = e == null ? void 0 : e.value) == null ? void 0 : ke.formItems
|
|
2142
2141
|
);
|
|
2143
|
-
const
|
|
2142
|
+
const se = {
|
|
2144
2143
|
title: "编辑",
|
|
2145
2144
|
mode: "drawer",
|
|
2146
2145
|
type: "hidden",
|
|
@@ -2148,257 +2147,257 @@ const ol = {
|
|
|
2148
2147
|
size: 700,
|
|
2149
2148
|
fullScreen: !1
|
|
2150
2149
|
};
|
|
2151
|
-
e.value.dialog =
|
|
2152
|
-
|
|
2150
|
+
e.value.dialog = De(
|
|
2151
|
+
se,
|
|
2153
2152
|
r == null ? void 0 : r.dialog,
|
|
2154
|
-
(
|
|
2153
|
+
(Te = e.value) == null ? void 0 : Te.dialog
|
|
2155
2154
|
);
|
|
2156
|
-
const
|
|
2157
|
-
let
|
|
2158
|
-
if (l.decimals && !isNaN(a) && (typeof l.decimals == "number" ?
|
|
2159
|
-
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 = {
|
|
2160
2159
|
date: "YYYY-MM-DD",
|
|
2161
2160
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
2162
2161
|
time: "HH:mm:ss"
|
|
2163
2162
|
};
|
|
2164
|
-
|
|
2163
|
+
y = l.format ? Ke(y).format(l.format) : Ke(y).format(X[l.type]);
|
|
2165
2164
|
}
|
|
2166
|
-
return l.type === "money" && (l.align = l.align || "right", l.width = l.width || 130,
|
|
2167
|
-
},
|
|
2168
|
-
|
|
2169
|
-
},
|
|
2170
|
-
|
|
2171
|
-
},
|
|
2172
|
-
var a,
|
|
2173
|
-
e.value.form.modalState = "add", (a = e.value.control) != null && a.validate("add", { m: l }) && ((
|
|
2174
|
-
e.value[U] && (e.value[U].value =
|
|
2175
|
-
}),
|
|
2176
|
-
},
|
|
2177
|
-
var
|
|
2178
|
-
e.value.form.modalState = "edit", (
|
|
2179
|
-
e.value[
|
|
2180
|
-
}),
|
|
2181
|
-
},
|
|
2182
|
-
var
|
|
2183
|
-
if ((
|
|
2184
|
-
if ((
|
|
2185
|
-
e.value.control.delete.click(l, a,
|
|
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]);
|
|
2174
|
+
}), T.value = !0, t("open", "add", { m: l })));
|
|
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);
|
|
2186
2185
|
else {
|
|
2187
|
-
let { message:
|
|
2188
|
-
|
|
2189
|
-
t("delete", { row: l, column: a, $index:
|
|
2190
|
-
|
|
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--);
|
|
2191
2190
|
});
|
|
2192
2191
|
}).catch(() => {
|
|
2193
2192
|
});
|
|
2194
2193
|
}
|
|
2195
|
-
},
|
|
2196
|
-
var
|
|
2197
|
-
e.value.form.modalState = void 0, (
|
|
2198
|
-
e.value[
|
|
2199
|
-
}),
|
|
2200
|
-
},
|
|
2201
|
-
var
|
|
2202
|
-
(
|
|
2203
|
-
|
|
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);
|
|
2204
2203
|
});
|
|
2205
|
-
},
|
|
2206
|
-
t("submit", e.value.form.modalState, l, a, (
|
|
2207
|
-
|
|
2204
|
+
}, oe = (l, a) => {
|
|
2205
|
+
t("submit", e.value.form.modalState, l, a, (y) => {
|
|
2206
|
+
y && (T.value = !1, a.table.load());
|
|
2208
2207
|
});
|
|
2209
|
-
},
|
|
2208
|
+
}, x = (l) => {
|
|
2210
2209
|
t("reset", l);
|
|
2211
|
-
},
|
|
2212
|
-
var
|
|
2213
|
-
if ((
|
|
2210
|
+
}, E = (l, a) => {
|
|
2211
|
+
var y;
|
|
2212
|
+
if ((y = l.control.download) != null && y.click)
|
|
2214
2213
|
l.control.download.click(l, a);
|
|
2215
2214
|
else {
|
|
2216
|
-
let U =
|
|
2215
|
+
let U = lt({
|
|
2217
2216
|
title: l.control.download.label,
|
|
2218
2217
|
size: 480,
|
|
2219
2218
|
width: 600,
|
|
2220
2219
|
slots: {
|
|
2221
|
-
default: () =>
|
|
2220
|
+
default: () => Se(el, {
|
|
2222
2221
|
items: a,
|
|
2223
2222
|
commitText: l.control.download.excelLabel,
|
|
2224
|
-
onExcel: (
|
|
2225
|
-
t("download",
|
|
2223
|
+
onExcel: (X, Z) => {
|
|
2224
|
+
t("download", X, Z), U();
|
|
2226
2225
|
}
|
|
2227
2226
|
})
|
|
2228
2227
|
}
|
|
2229
2228
|
}, l.control.download.mode);
|
|
2230
2229
|
}
|
|
2231
|
-
},
|
|
2230
|
+
}, b = (l) => {
|
|
2232
2231
|
var a;
|
|
2233
|
-
(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({
|
|
2234
2233
|
title: l.control.setting.label,
|
|
2235
2234
|
size: 470,
|
|
2236
2235
|
width: 600,
|
|
2237
2236
|
slots: {
|
|
2238
|
-
default: () =>
|
|
2237
|
+
default: () => Se(il, {
|
|
2239
2238
|
modelValue: l,
|
|
2240
2239
|
name: k.name
|
|
2241
2240
|
})
|
|
2242
2241
|
}
|
|
2243
2242
|
}, l.control.setting.mode);
|
|
2244
|
-
},
|
|
2245
|
-
{ type: "add", func:
|
|
2246
|
-
{ type: "download", func:
|
|
2247
|
-
{ type: "setting", func:
|
|
2248
|
-
{ type: "view", func:
|
|
2249
|
-
{ type: "edit", func:
|
|
2250
|
-
{ type: "delete", func:
|
|
2251
|
-
{ type: "save", func:
|
|
2252
|
-
],
|
|
2253
|
-
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;
|
|
2254
2253
|
return {
|
|
2255
2254
|
name: `control-${a}`,
|
|
2256
|
-
attr:
|
|
2257
|
-
func:
|
|
2258
|
-
label: (U =
|
|
2259
|
-
sort: ((
|
|
2260
|
-
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"
|
|
2261
2260
|
};
|
|
2262
|
-
}).sort((a,
|
|
2263
|
-
const U =
|
|
2264
|
-
return a[U] || (a[U] = []), a[U].push(
|
|
2265
|
-
}, {}),
|
|
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(
|
|
2266
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)
|
|
2267
|
-
)),
|
|
2268
|
-
const
|
|
2269
|
-
for (const
|
|
2270
|
-
if (
|
|
2271
|
-
if (
|
|
2272
|
-
const
|
|
2273
|
-
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;
|
|
2274
2273
|
}
|
|
2275
2274
|
}
|
|
2276
2275
|
return null;
|
|
2277
2276
|
};
|
|
2278
2277
|
if (l.getDicts) {
|
|
2279
2278
|
const U = a.toString();
|
|
2280
|
-
return
|
|
2281
|
-
|
|
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);
|
|
2282
2281
|
});
|
|
2283
2282
|
}
|
|
2284
2283
|
return Promise.resolve();
|
|
2285
|
-
},
|
|
2284
|
+
}, ie = () => {
|
|
2286
2285
|
const l = [];
|
|
2287
2286
|
Object.keys(e.value).forEach((a) => {
|
|
2288
2287
|
if (e.value[a].getDicts) {
|
|
2289
|
-
const
|
|
2288
|
+
const y = re(e.value[a], a).then(() => {
|
|
2290
2289
|
e.value.table.data.forEach((U) => {
|
|
2291
|
-
var
|
|
2292
|
-
if (e.value[a].getDicts && ((
|
|
2293
|
-
const
|
|
2294
|
-
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;
|
|
2295
2294
|
}
|
|
2296
2295
|
});
|
|
2297
2296
|
}).catch((U) => {
|
|
2298
2297
|
console.error(`加载字典${a}出错:`, U);
|
|
2299
2298
|
});
|
|
2300
|
-
l.push(
|
|
2299
|
+
l.push(y);
|
|
2301
2300
|
}
|
|
2302
2301
|
}), Promise.all(l).catch((a) => {
|
|
2303
2302
|
console.error("字典加载过程中发生错误:", a);
|
|
2304
2303
|
});
|
|
2305
|
-
},
|
|
2306
|
-
var
|
|
2307
|
-
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;
|
|
2308
2307
|
};
|
|
2309
|
-
return
|
|
2308
|
+
return ct(() => {
|
|
2310
2309
|
e.value.table.autoWatch && e.value.table.load();
|
|
2311
|
-
}),
|
|
2310
|
+
}), Le(async () => {
|
|
2312
2311
|
var l;
|
|
2313
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)) {
|
|
2314
|
-
|
|
2313
|
+
Ve.error("必须给使用此表格的用户一个名字!");
|
|
2315
2314
|
return;
|
|
2316
2315
|
}
|
|
2317
2316
|
if (!k.name) {
|
|
2318
|
-
|
|
2317
|
+
Ve.error("必须给表格一个唯一的name属性");
|
|
2319
2318
|
return;
|
|
2320
2319
|
}
|
|
2321
2320
|
try {
|
|
2322
|
-
let a = await
|
|
2321
|
+
let a = await ol(k.name);
|
|
2323
2322
|
if (a) {
|
|
2324
2323
|
if (k.name !== a.name) {
|
|
2325
|
-
|
|
2324
|
+
Ve.error("此表格已经存在,请换一个名字!");
|
|
2326
2325
|
return;
|
|
2327
2326
|
}
|
|
2328
2327
|
} else
|
|
2329
|
-
await
|
|
2328
|
+
await rl({ name: k.name });
|
|
2330
2329
|
} catch (a) {
|
|
2331
|
-
console.error("检查表格名称时出现错误:", a),
|
|
2330
|
+
console.error("检查表格名称时出现错误:", a), Ve.error("检查表格名称时出现错误,请稍后重试。");
|
|
2332
2331
|
}
|
|
2333
2332
|
try {
|
|
2334
|
-
const a = await
|
|
2335
|
-
a && a.forEach((
|
|
2336
|
-
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);
|
|
2337
2336
|
});
|
|
2338
2337
|
} catch (a) {
|
|
2339
2338
|
console.error("Error fetching table column settings:", a);
|
|
2340
2339
|
}
|
|
2341
2340
|
e.value.table.autoWatch || e.value.table.load();
|
|
2342
2341
|
}), (l, a) => {
|
|
2343
|
-
var
|
|
2344
|
-
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");
|
|
2345
2344
|
return n(), A(H, null, [
|
|
2346
|
-
G("div",
|
|
2347
|
-
((
|
|
2348
|
-
|
|
2349
|
-
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, {
|
|
2350
2349
|
modelValue: e.value,
|
|
2351
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
2352
|
-
onQuery:
|
|
2353
|
-
onReset:
|
|
2350
|
+
"onUpdate:modelValue": a[0] || (a[0] = (j) => e.value = j),
|
|
2351
|
+
onQuery: p,
|
|
2352
|
+
onReset: he
|
|
2354
2353
|
}, de({
|
|
2355
2354
|
"q-btns": h(() => [
|
|
2356
|
-
|
|
2357
|
-
(n(!0), A(H, null, I(
|
|
2358
|
-
ae == "default" ? (n(!0), A(H, { key: 0 }, I(
|
|
2359
|
-
|
|
2360
|
-
(
|
|
2361
|
-
|
|
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({
|
|
2362
2361
|
key: 0,
|
|
2363
2362
|
ref_for: !0
|
|
2364
|
-
},
|
|
2365
|
-
onClick: (z) =>
|
|
2363
|
+
}, D.attr, {
|
|
2364
|
+
onClick: (z) => D.func(e.value, w.value)
|
|
2366
2365
|
}), {
|
|
2367
2366
|
default: h(() => [
|
|
2368
|
-
|
|
2367
|
+
Ce($e(D.label), 1)
|
|
2369
2368
|
]),
|
|
2370
2369
|
_: 2
|
|
2371
|
-
}, 1040, ["onClick"])) : (n(),
|
|
2370
|
+
}, 1040, ["onClick"])) : (n(), F(o(_e), M({
|
|
2372
2371
|
key: 1,
|
|
2373
2372
|
ref_for: !0
|
|
2374
|
-
},
|
|
2375
|
-
onClick: (z) =>
|
|
2373
|
+
}, D.attr, {
|
|
2374
|
+
onClick: (z) => D.func(e.value, w.value)
|
|
2376
2375
|
}), null, 16, ["onClick"]))
|
|
2377
2376
|
], !0) : ve("", !0),
|
|
2378
|
-
|
|
2379
|
-
], 64))), 256)) : (n(),
|
|
2377
|
+
m(l.$slots, D.name + "-right", {}, void 0, !0)
|
|
2378
|
+
], 64))), 256)) : (n(), F(y, { key: 1 }, {
|
|
2380
2379
|
default: h(() => [
|
|
2381
|
-
(n(!0), A(H, null, I(
|
|
2382
|
-
|
|
2383
|
-
(
|
|
2384
|
-
|
|
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({
|
|
2385
2384
|
key: 0,
|
|
2386
2385
|
ref_for: !0
|
|
2387
|
-
},
|
|
2388
|
-
onClick: (z) =>
|
|
2386
|
+
}, D.attr, {
|
|
2387
|
+
onClick: (z) => D.func(e.value, w.value)
|
|
2389
2388
|
}), {
|
|
2390
2389
|
default: h(() => [
|
|
2391
|
-
|
|
2390
|
+
Ce($e(D.label), 1)
|
|
2392
2391
|
]),
|
|
2393
2392
|
_: 2
|
|
2394
|
-
}, 1040, ["onClick"])) : (n(),
|
|
2393
|
+
}, 1040, ["onClick"])) : (n(), F(o(_e), M({
|
|
2395
2394
|
key: 1,
|
|
2396
2395
|
ref_for: !0
|
|
2397
|
-
},
|
|
2398
|
-
onClick: (z) =>
|
|
2396
|
+
}, D.attr, {
|
|
2397
|
+
onClick: (z) => D.func(e.value, w.value)
|
|
2399
2398
|
}), null, 16, ["onClick"]))
|
|
2400
2399
|
], !0) : ve("", !0),
|
|
2401
|
-
|
|
2400
|
+
m(l.$slots, D.name + "-right", {}, void 0, !0)
|
|
2402
2401
|
], 64))), 256))
|
|
2403
2402
|
]),
|
|
2404
2403
|
_: 2
|
|
@@ -2408,179 +2407,182 @@ const ol = {
|
|
|
2408
2407
|
]),
|
|
2409
2408
|
_: 2
|
|
2410
2409
|
}, [
|
|
2411
|
-
I(l.$slots, (
|
|
2410
|
+
I(l.$slots, (j, ae, D) => ({
|
|
2412
2411
|
name: ae,
|
|
2413
2412
|
fn: h((z) => [
|
|
2414
|
-
|
|
2413
|
+
m(l.$slots, ae, { model: e.value }, void 0, !0)
|
|
2415
2414
|
])
|
|
2416
2415
|
}))
|
|
2417
2416
|
]), 1032, ["modelValue"])
|
|
2418
2417
|
], !0)
|
|
2419
2418
|
])) : ve("", !0),
|
|
2420
|
-
G("div",
|
|
2421
|
-
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
|
+
}), {
|
|
2422
2424
|
append: h(() => [
|
|
2423
|
-
|
|
2425
|
+
m(l.$slots, "append", {}, void 0, !0)
|
|
2424
2426
|
]),
|
|
2425
2427
|
empty: h(() => [
|
|
2426
|
-
|
|
2428
|
+
m(l.$slots, "empty", {}, void 0, !0)
|
|
2427
2429
|
]),
|
|
2428
2430
|
default: h(() => [
|
|
2429
|
-
|
|
2430
|
-
(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({
|
|
2431
2433
|
prop: ae,
|
|
2432
2434
|
key: ae,
|
|
2433
2435
|
ref_for: !0
|
|
2434
|
-
}, { ...e.value.tableColumns, ...o(
|
|
2435
|
-
header: h(({ column:
|
|
2436
|
-
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`, {
|
|
2437
2439
|
key: 0,
|
|
2438
|
-
column:
|
|
2440
|
+
column: D,
|
|
2439
2441
|
$index: z
|
|
2440
2442
|
}, () => [
|
|
2441
|
-
a[
|
|
2442
|
-
e.value.control.add.inline === !0 && !
|
|
2443
|
-
e.value.control.add.label ? (n(),
|
|
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({
|
|
2444
2446
|
key: 0,
|
|
2445
2447
|
title: "新增",
|
|
2446
2448
|
size: "small",
|
|
2447
2449
|
ref_for: !0
|
|
2448
2450
|
}, e.value.control.add, {
|
|
2449
|
-
onClick: a[1] || (a[1] = (ee) =>
|
|
2451
|
+
onClick: a[1] || (a[1] = (ee) => V(e.value))
|
|
2450
2452
|
}), {
|
|
2451
2453
|
default: h(() => [
|
|
2452
|
-
|
|
2454
|
+
Ce($e(e.value.control.add.label), 1)
|
|
2453
2455
|
]),
|
|
2454
2456
|
_: 1
|
|
2455
|
-
}, 16)) : (n(),
|
|
2457
|
+
}, 16)) : (n(), F(o(_e), M({
|
|
2456
2458
|
key: 1,
|
|
2457
2459
|
title: "新增",
|
|
2458
2460
|
size: "small",
|
|
2459
2461
|
ref_for: !0
|
|
2460
2462
|
}, e.value.control.add, {
|
|
2461
|
-
onClick: a[2] || (a[2] = (ee) =>
|
|
2463
|
+
onClick: a[2] || (a[2] = (ee) => V(e.value))
|
|
2462
2464
|
}), null, 16))
|
|
2463
2465
|
], 64)) : ve("", !0)
|
|
2464
|
-
], !0) :
|
|
2466
|
+
], !0) : m(l.$slots, `${ae}-header`, {
|
|
2465
2467
|
key: 1,
|
|
2466
|
-
column:
|
|
2468
|
+
column: D,
|
|
2467
2469
|
$index: z
|
|
2468
2470
|
}, void 0, !0)
|
|
2469
2471
|
]),
|
|
2470
|
-
"filter-icon": h((
|
|
2471
|
-
|
|
2472
|
+
"filter-icon": h((D) => [
|
|
2473
|
+
m(l.$slots, `${ae}-filter-icon`, { data: D }, void 0, !0)
|
|
2472
2474
|
]),
|
|
2473
2475
|
_: 2
|
|
2474
2476
|
}, [
|
|
2475
|
-
|
|
2477
|
+
j.type === "image" ? {
|
|
2476
2478
|
name: "default",
|
|
2477
|
-
fn: h(({ row:
|
|
2478
|
-
|
|
2479
|
-
row:
|
|
2479
|
+
fn: h(({ row: D, column: z, $index: ee }) => [
|
|
2480
|
+
m(l.$slots, `${ae}`, {
|
|
2481
|
+
row: D,
|
|
2480
2482
|
column: z,
|
|
2481
2483
|
$index: ee
|
|
2482
2484
|
}, () => [
|
|
2483
|
-
G("img",
|
|
2485
|
+
G("img", M({
|
|
2484
2486
|
style: { width: "80px", height: "80px", "object-fit": "cover", "border-radius": "3px" },
|
|
2485
|
-
src:
|
|
2487
|
+
src: j.value,
|
|
2486
2488
|
ref_for: !0
|
|
2487
|
-
},
|
|
2489
|
+
}, j), null, 16, ml)
|
|
2488
2490
|
], !0)
|
|
2489
2491
|
]),
|
|
2490
2492
|
key: "0"
|
|
2491
|
-
} :
|
|
2493
|
+
} : j.type === "expand" ? {
|
|
2492
2494
|
name: "default",
|
|
2493
|
-
fn: h(({ row:
|
|
2494
|
-
|
|
2495
|
-
row:
|
|
2495
|
+
fn: h(({ row: D, column: z, $index: ee }) => [
|
|
2496
|
+
m(l.$slots, `${ae}`, {
|
|
2497
|
+
row: D,
|
|
2496
2498
|
column: z,
|
|
2497
2499
|
$index: ee
|
|
2498
2500
|
}, void 0, !0)
|
|
2499
2501
|
]),
|
|
2500
2502
|
key: "1"
|
|
2501
|
-
} :
|
|
2503
|
+
} : j.type == "control" ? {
|
|
2502
2504
|
name: "default",
|
|
2503
|
-
fn: h(({ row:
|
|
2504
|
-
var
|
|
2505
|
+
fn: h(({ row: D, column: z, $index: ee }) => {
|
|
2506
|
+
var je, Re;
|
|
2505
2507
|
return [
|
|
2506
2508
|
G("div", {
|
|
2507
|
-
class:
|
|
2508
|
-
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)
|
|
2509
2511
|
}, [
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
row:
|
|
2512
|
+
m(l.$slots, "control", {}, () => [
|
|
2513
|
+
m(l.$slots, "control-left", {
|
|
2514
|
+
row: D,
|
|
2513
2515
|
column: z,
|
|
2514
2516
|
$index: ee
|
|
2515
2517
|
}, void 0, !0),
|
|
2516
|
-
(n(!0), A(H, null, I(
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
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,
|
|
2520
2522
|
column: z,
|
|
2521
2523
|
$index: ee
|
|
2522
2524
|
}, void 0, !0),
|
|
2523
|
-
|
|
2525
|
+
be.attr.auth(D, z, ee) ? m(l.$slots, be.name, {
|
|
2524
2526
|
key: 0,
|
|
2525
|
-
row:
|
|
2527
|
+
row: D,
|
|
2526
2528
|
column: z,
|
|
2527
2529
|
$index: ee
|
|
2528
2530
|
}, () => [
|
|
2529
|
-
|
|
2531
|
+
be.label ? (n(), F(o(_e), M({
|
|
2530
2532
|
key: 0,
|
|
2531
2533
|
ref_for: !0
|
|
2532
|
-
},
|
|
2533
|
-
onClick: (
|
|
2534
|
+
}, be.attr, {
|
|
2535
|
+
onClick: (Je) => be.func(D, z, ee, e.value)
|
|
2534
2536
|
}), {
|
|
2535
2537
|
default: h(() => [
|
|
2536
|
-
|
|
2538
|
+
Ce($e(be.label), 1)
|
|
2537
2539
|
]),
|
|
2538
2540
|
_: 2
|
|
2539
|
-
}, 1040, ["onClick"])) : (n(),
|
|
2541
|
+
}, 1040, ["onClick"])) : (n(), F(o(_e), M({
|
|
2540
2542
|
key: 1,
|
|
2541
2543
|
ref_for: !0
|
|
2542
|
-
},
|
|
2543
|
-
onClick: (
|
|
2544
|
+
}, be.attr, {
|
|
2545
|
+
onClick: (Je) => be.func(D, z, ee, e.value)
|
|
2544
2546
|
}), null, 16, ["onClick"]))
|
|
2545
2547
|
], !0) : ve("", !0),
|
|
2546
|
-
|
|
2547
|
-
row:
|
|
2548
|
+
m(l.$slots, be.name + "-right", {
|
|
2549
|
+
row: D,
|
|
2548
2550
|
column: z,
|
|
2549
2551
|
$index: ee
|
|
2550
2552
|
}, void 0, !0)
|
|
2551
|
-
], 64))), 256)) : (n(),
|
|
2553
|
+
], 64))), 256)) : (n(), F(y, { key: 1 }, {
|
|
2552
2554
|
default: h(() => [
|
|
2553
|
-
(n(!0), A(H, null, I(
|
|
2554
|
-
|
|
2555
|
-
row:
|
|
2555
|
+
(n(!0), A(H, null, I(Ne, (be) => (n(), A(H, null, [
|
|
2556
|
+
m(l.$slots, be.name + "-left", {
|
|
2557
|
+
row: D,
|
|
2556
2558
|
column: z,
|
|
2557
2559
|
$index: ee
|
|
2558
2560
|
}, void 0, !0),
|
|
2559
|
-
|
|
2561
|
+
be.attr.auth(D, z, ee) ? m(l.$slots, be.name, {
|
|
2560
2562
|
key: 0,
|
|
2561
|
-
row:
|
|
2563
|
+
row: D,
|
|
2562
2564
|
column: z,
|
|
2563
2565
|
$index: ee
|
|
2564
2566
|
}, () => [
|
|
2565
|
-
|
|
2567
|
+
be.label ? (n(), F(o(_e), M({
|
|
2566
2568
|
key: 0,
|
|
2567
2569
|
ref_for: !0
|
|
2568
|
-
},
|
|
2569
|
-
onClick: (
|
|
2570
|
+
}, be.attr, {
|
|
2571
|
+
onClick: (Je) => be.func(D, z, ee, e.value)
|
|
2570
2572
|
}), {
|
|
2571
2573
|
default: h(() => [
|
|
2572
|
-
|
|
2574
|
+
Ce($e(be.label), 1)
|
|
2573
2575
|
]),
|
|
2574
2576
|
_: 2
|
|
2575
|
-
}, 1040, ["onClick"])) : (n(),
|
|
2577
|
+
}, 1040, ["onClick"])) : (n(), F(o(_e), M({
|
|
2576
2578
|
key: 1,
|
|
2577
2579
|
ref_for: !0
|
|
2578
|
-
},
|
|
2579
|
-
onClick: (
|
|
2580
|
+
}, be.attr, {
|
|
2581
|
+
onClick: (Je) => be.func(D, z, ee, e.value)
|
|
2580
2582
|
}), null, 16, ["onClick"]))
|
|
2581
2583
|
], !0) : ve("", !0),
|
|
2582
|
-
|
|
2583
|
-
row:
|
|
2584
|
+
m(l.$slots, be.name + "-right", {
|
|
2585
|
+
row: D,
|
|
2584
2586
|
column: z,
|
|
2585
2587
|
$index: ee
|
|
2586
2588
|
}, void 0, !0)
|
|
@@ -2589,8 +2591,8 @@ const ol = {
|
|
|
2589
2591
|
_: 2
|
|
2590
2592
|
}, 1024))
|
|
2591
2593
|
], 64))), 256)),
|
|
2592
|
-
|
|
2593
|
-
row:
|
|
2594
|
+
m(l.$slots, "control-right", {
|
|
2595
|
+
row: D,
|
|
2594
2596
|
column: z,
|
|
2595
2597
|
$index: ee
|
|
2596
2598
|
}, void 0, !0)
|
|
@@ -2599,50 +2601,50 @@ const ol = {
|
|
|
2599
2601
|
];
|
|
2600
2602
|
}),
|
|
2601
2603
|
key: "2"
|
|
2602
|
-
} :
|
|
2604
|
+
} : j.type != "selection" && j.type != "index" ? {
|
|
2603
2605
|
name: "default",
|
|
2604
|
-
fn: h(({ row:
|
|
2605
|
-
|
|
2606
|
+
fn: h(({ row: D, column: z, $index: ee }) => [
|
|
2607
|
+
pe(j, D, z, ee) && ee != -1 ? m(l.$slots, `${ae}`, {
|
|
2606
2608
|
key: 0,
|
|
2607
|
-
row:
|
|
2609
|
+
row: D,
|
|
2608
2610
|
column: z,
|
|
2609
2611
|
$index: ee
|
|
2610
2612
|
}, () => {
|
|
2611
|
-
var
|
|
2613
|
+
var je;
|
|
2612
2614
|
return [
|
|
2613
|
-
(n(),
|
|
2614
|
-
modelValue:
|
|
2615
|
-
"onUpdate:modelValue": (
|
|
2616
|
-
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),
|
|
2617
2619
|
ctrlKey: ae,
|
|
2618
2620
|
key: ae + "-" + ee,
|
|
2619
|
-
ctrlType: (
|
|
2621
|
+
ctrlType: (je = j.table(D, z, ee, S.value)) != null && je.type ? j.table(D, z, ee, S.value).type : j.type,
|
|
2620
2622
|
model: e.value,
|
|
2621
2623
|
class: "g-ctrl-container",
|
|
2622
2624
|
t: "t",
|
|
2623
|
-
formInfo:
|
|
2625
|
+
formInfo: D
|
|
2624
2626
|
}, de({ _: 2 }, [
|
|
2625
|
-
I(l.$slots, (
|
|
2626
|
-
name:
|
|
2627
|
-
fn: h((
|
|
2628
|
-
|
|
2629
|
-
data:
|
|
2630
|
-
item:
|
|
2627
|
+
I(l.$slots, (Re, Ne) => ({
|
|
2628
|
+
name: Ne,
|
|
2629
|
+
fn: h((Xe) => [
|
|
2630
|
+
m(l.$slots, Ne, {
|
|
2631
|
+
data: Xe,
|
|
2632
|
+
item: j,
|
|
2631
2633
|
model: e.value
|
|
2632
2634
|
}, void 0, !0)
|
|
2633
2635
|
])
|
|
2634
2636
|
}))
|
|
2635
2637
|
]), 1032, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model", "formInfo"]))
|
|
2636
2638
|
];
|
|
2637
|
-
}, !0) :
|
|
2639
|
+
}, !0) : m(l.$slots, `${ae}`, {
|
|
2638
2640
|
key: 1,
|
|
2639
|
-
row:
|
|
2641
|
+
row: D,
|
|
2640
2642
|
column: z,
|
|
2641
2643
|
$index: ee
|
|
2642
2644
|
}, () => [
|
|
2643
2645
|
G("div", {
|
|
2644
|
-
innerHTML:
|
|
2645
|
-
}, null, 8,
|
|
2646
|
+
innerHTML: fe(j, z.formatter(D, z, D[ae], ee))
|
|
2647
|
+
}, null, 8, pl)
|
|
2646
2648
|
], !0)
|
|
2647
2649
|
]),
|
|
2648
2650
|
key: "3"
|
|
@@ -2651,63 +2653,63 @@ const ol = {
|
|
|
2651
2653
|
], !0)
|
|
2652
2654
|
]),
|
|
2653
2655
|
_: 3
|
|
2654
|
-
}, 16),
|
|
2655
|
-
(
|
|
2656
|
-
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({
|
|
2657
2659
|
"page-size": e.value.table.page.pageSize,
|
|
2658
|
-
"onUpdate:pageSize": a[
|
|
2660
|
+
"onUpdate:pageSize": a[4] || (a[4] = (j) => e.value.table.page.pageSize = j),
|
|
2659
2661
|
"current-page": e.value.table.page.currentPage,
|
|
2660
|
-
"onUpdate:currentPage": a[
|
|
2662
|
+
"onUpdate:currentPage": a[5] || (a[5] = (j) => e.value.table.page.currentPage = j)
|
|
2661
2663
|
}, e.value.table.page), {
|
|
2662
2664
|
default: h(() => [
|
|
2663
|
-
|
|
2665
|
+
m(l.$slots, "table-page", {}, void 0, !0)
|
|
2664
2666
|
]),
|
|
2665
2667
|
_: 3
|
|
2666
2668
|
}, 16, ["page-size", "current-page"])
|
|
2667
2669
|
], !0)
|
|
2668
2670
|
])
|
|
2669
2671
|
]),
|
|
2670
|
-
e.value.dialog.mode == "dialog" &&
|
|
2671
|
-
Q(
|
|
2672
|
-
modelValue:
|
|
2673
|
-
"onUpdate:modelValue": a[
|
|
2672
|
+
e.value.dialog.mode == "dialog" && T.value ? (n(), A("div", vl, [
|
|
2673
|
+
Q(Oe, M({
|
|
2674
|
+
modelValue: T.value,
|
|
2675
|
+
"onUpdate:modelValue": a[9] || (a[9] = (j) => T.value = j),
|
|
2674
2676
|
fullscreen: e.value.dialog.fullScreen
|
|
2675
|
-
}, o(
|
|
2676
|
-
width: o(
|
|
2677
|
+
}, o(Fe)(e.value.dialog, (j) => !["size"].includes(j)), {
|
|
2678
|
+
width: o(wt)(e.value.dialog.width) + 35
|
|
2677
2679
|
}), {
|
|
2678
2680
|
header: h(() => {
|
|
2679
|
-
var
|
|
2681
|
+
var j, ae, D, z;
|
|
2680
2682
|
return [
|
|
2681
|
-
G("div",
|
|
2682
|
-
G("div",
|
|
2683
|
-
|
|
2684
|
-
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)
|
|
2685
2687
|
], !0)
|
|
2686
2688
|
]),
|
|
2687
|
-
((ae = (
|
|
2689
|
+
((ae = (j = e.value) == null ? void 0 : j.dialog) == null ? void 0 : ae.fullScreen) === !1 ? (n(), A("div", {
|
|
2688
2690
|
key: 0,
|
|
2689
|
-
onClick: a[
|
|
2691
|
+
onClick: a[6] || (a[6] = (ee) => {
|
|
2690
2692
|
e.value.dialog.fullScreen = !0;
|
|
2691
2693
|
}),
|
|
2692
2694
|
class: "max"
|
|
2693
2695
|
}, [
|
|
2694
|
-
Q(
|
|
2696
|
+
Q(Ee, null, {
|
|
2695
2697
|
default: h(() => [
|
|
2696
|
-
Q(o(
|
|
2698
|
+
Q(o(Ot))
|
|
2697
2699
|
]),
|
|
2698
2700
|
_: 1
|
|
2699
2701
|
})
|
|
2700
2702
|
])) : ve("", !0),
|
|
2701
|
-
((z = (
|
|
2703
|
+
((z = (D = e.value) == null ? void 0 : D.dialog) == null ? void 0 : z.fullScreen) === !0 ? (n(), A("div", {
|
|
2702
2704
|
key: 1,
|
|
2703
|
-
onClick: a[
|
|
2705
|
+
onClick: a[7] || (a[7] = (ee) => {
|
|
2704
2706
|
e.value.dialog.fullScreen = !1;
|
|
2705
2707
|
}),
|
|
2706
2708
|
class: "max"
|
|
2707
2709
|
}, [
|
|
2708
|
-
Q(
|
|
2710
|
+
Q(Ee, null, {
|
|
2709
2711
|
default: h(() => [
|
|
2710
|
-
Q(o(
|
|
2712
|
+
Q(o(At))
|
|
2711
2713
|
]),
|
|
2712
2714
|
_: 1
|
|
2713
2715
|
})
|
|
@@ -2716,18 +2718,18 @@ const ol = {
|
|
|
2716
2718
|
];
|
|
2717
2719
|
}),
|
|
2718
2720
|
default: h(() => [
|
|
2719
|
-
G("div",
|
|
2720
|
-
|
|
2721
|
-
Q(
|
|
2721
|
+
G("div", gl, [
|
|
2722
|
+
m(l.$slots, "table-dialog-form", { model: e.value }, () => [
|
|
2723
|
+
Q(et, {
|
|
2722
2724
|
modelValue: e.value,
|
|
2723
|
-
"onUpdate:modelValue": a[
|
|
2724
|
-
onSubmit:
|
|
2725
|
-
onReset:
|
|
2725
|
+
"onUpdate:modelValue": a[8] || (a[8] = (j) => e.value = j),
|
|
2726
|
+
onSubmit: oe,
|
|
2727
|
+
onReset: x
|
|
2726
2728
|
}, de({ _: 2 }, [
|
|
2727
|
-
I(l.$slots, (
|
|
2729
|
+
I(l.$slots, (j, ae, D) => ({
|
|
2728
2730
|
name: ae,
|
|
2729
2731
|
fn: h((z) => [
|
|
2730
|
-
|
|
2732
|
+
m(l.$slots, ae, { model: z }, void 0, !0)
|
|
2731
2733
|
])
|
|
2732
2734
|
}))
|
|
2733
2735
|
]), 1032, ["modelValue"])
|
|
@@ -2737,32 +2739,32 @@ const ol = {
|
|
|
2737
2739
|
_: 3
|
|
2738
2740
|
}, 16, ["modelValue", "fullscreen", "width"])
|
|
2739
2741
|
])) : ve("", !0),
|
|
2740
|
-
e.value.dialog.mode == "drawer" &&
|
|
2741
|
-
Q(
|
|
2742
|
-
modelValue:
|
|
2743
|
-
"onUpdate:modelValue": a[
|
|
2744
|
-
}, o(
|
|
2742
|
+
e.value.dialog.mode == "drawer" && T.value ? (n(), A("div", bl, [
|
|
2743
|
+
Q(ze, M({
|
|
2744
|
+
modelValue: T.value,
|
|
2745
|
+
"onUpdate:modelValue": a[11] || (a[11] = (j) => T.value = j)
|
|
2746
|
+
}, o(Fe)(e.value.dialog, (j) => !["width"].includes(j))), {
|
|
2745
2747
|
header: h(() => [
|
|
2746
|
-
G("div",
|
|
2747
|
-
G("div",
|
|
2748
|
-
|
|
2749
|
-
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)
|
|
2750
2752
|
], !0)
|
|
2751
2753
|
])
|
|
2752
2754
|
])
|
|
2753
2755
|
]),
|
|
2754
2756
|
default: h(() => [
|
|
2755
|
-
|
|
2756
|
-
Q(
|
|
2757
|
+
m(l.$slots, "table-drawer-form", { model: e.value }, () => [
|
|
2758
|
+
Q(et, {
|
|
2757
2759
|
modelValue: e.value,
|
|
2758
|
-
"onUpdate:modelValue": a[
|
|
2759
|
-
onSubmit:
|
|
2760
|
-
onReset:
|
|
2760
|
+
"onUpdate:modelValue": a[10] || (a[10] = (j) => e.value = j),
|
|
2761
|
+
onSubmit: oe,
|
|
2762
|
+
onReset: x
|
|
2761
2763
|
}, de({ _: 2 }, [
|
|
2762
|
-
I(l.$slots, (
|
|
2764
|
+
I(l.$slots, (j, ae, D) => ({
|
|
2763
2765
|
name: ae,
|
|
2764
2766
|
fn: h((z) => [
|
|
2765
|
-
|
|
2767
|
+
m(l.$slots, ae, { model: z }, void 0, !0)
|
|
2766
2768
|
])
|
|
2767
2769
|
}))
|
|
2768
2770
|
]), 1032, ["modelValue"])
|
|
@@ -2774,7 +2776,7 @@ const ol = {
|
|
|
2774
2776
|
], 64);
|
|
2775
2777
|
};
|
|
2776
2778
|
}
|
|
2777
|
-
}),
|
|
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({
|
|
2778
2780
|
name: "g-tree-table",
|
|
2779
2781
|
inheritAttrs: !1
|
|
2780
2782
|
}, {
|
|
@@ -2783,72 +2785,72 @@ const ol = {
|
|
|
2783
2785
|
modelValue: { required: !0 },
|
|
2784
2786
|
modelModifiers: {}
|
|
2785
2787
|
},
|
|
2786
|
-
emits: /* @__PURE__ */
|
|
2788
|
+
emits: /* @__PURE__ */ xe(["load"], ["update:modelValue"]),
|
|
2787
2789
|
setup(c, { emit: f }) {
|
|
2788
|
-
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) => {
|
|
2789
2791
|
var te, le;
|
|
2790
|
-
if (
|
|
2791
|
-
const
|
|
2792
|
-
return u[
|
|
2793
|
-
}, L = (
|
|
2794
|
-
t("load",
|
|
2795
|
-
},
|
|
2796
|
-
|
|
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();
|
|
2797
2799
|
};
|
|
2798
|
-
return
|
|
2799
|
-
w.value.filter(
|
|
2800
|
-
}), (
|
|
2801
|
-
const
|
|
2802
|
-
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, [
|
|
2803
2805
|
G("div", {
|
|
2804
2806
|
class: "g-tree-left",
|
|
2805
|
-
style:
|
|
2807
|
+
style: Me({ width: v.value })
|
|
2806
2808
|
}, [
|
|
2807
|
-
|
|
2809
|
+
T.value ? (n(), F(N, {
|
|
2808
2810
|
key: 0,
|
|
2809
|
-
modelValue:
|
|
2810
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
2811
|
+
modelValue: q.value,
|
|
2812
|
+
"onUpdate:modelValue": u[0] || (u[0] = (K) => q.value = K),
|
|
2811
2813
|
style: { width: "100%", padding: "0 10px", "box-sizing": "border-box" },
|
|
2812
2814
|
placeholder: "输入节点查询",
|
|
2813
2815
|
clearable: ""
|
|
2814
2816
|
}, null, 8, ["modelValue"])) : ve("", !0),
|
|
2815
|
-
G("div",
|
|
2816
|
-
Q(te,
|
|
2817
|
-
style: { width:
|
|
2817
|
+
G("div", Cl, [
|
|
2818
|
+
Q(te, M({
|
|
2819
|
+
style: { width: v.value },
|
|
2818
2820
|
"filter-node-method": k,
|
|
2819
2821
|
"expand-on-click-node": !1,
|
|
2820
2822
|
ref_key: "treeRef",
|
|
2821
2823
|
ref: w,
|
|
2822
|
-
onNodeClick:
|
|
2823
|
-
},
|
|
2824
|
-
default: h(({ node:
|
|
2825
|
-
|
|
2826
|
-
node:
|
|
2827
|
-
data:
|
|
2824
|
+
onNodeClick: ne
|
|
2825
|
+
}, $.$attrs.tree), de({
|
|
2826
|
+
default: h(({ node: K, data: se }) => [
|
|
2827
|
+
m($.$slots, "tree", {
|
|
2828
|
+
node: K,
|
|
2829
|
+
data: se
|
|
2828
2830
|
}, () => [
|
|
2829
|
-
G("span", null,
|
|
2831
|
+
G("span", null, $e(K.label), 1)
|
|
2830
2832
|
], !0)
|
|
2831
2833
|
]),
|
|
2832
2834
|
_: 2
|
|
2833
2835
|
}, [
|
|
2834
|
-
I(
|
|
2835
|
-
name:
|
|
2836
|
+
I($.$slots, (K, se, ye) => ({
|
|
2837
|
+
name: se,
|
|
2836
2838
|
fn: h((fe) => [
|
|
2837
|
-
|
|
2839
|
+
m($.$slots, se, { data: fe }, void 0, !0)
|
|
2838
2840
|
])
|
|
2839
2841
|
}))
|
|
2840
2842
|
]), 1040, ["style"])
|
|
2841
2843
|
])
|
|
2842
2844
|
], 4),
|
|
2843
|
-
G("div",
|
|
2844
|
-
Q(le,
|
|
2845
|
+
G("div", Dl, [
|
|
2846
|
+
Q(le, M({
|
|
2845
2847
|
modelValue: e.value,
|
|
2846
|
-
"onUpdate:modelValue": u[1] || (u[1] = (
|
|
2847
|
-
},
|
|
2848
|
-
I(
|
|
2849
|
-
name:
|
|
2848
|
+
"onUpdate:modelValue": u[1] || (u[1] = (K) => e.value = K)
|
|
2849
|
+
}, $.$attrs, { onLoad: L }), de({ _: 2 }, [
|
|
2850
|
+
I($.$slots, (K, se, ye) => ({
|
|
2851
|
+
name: se,
|
|
2850
2852
|
fn: h((fe) => [
|
|
2851
|
-
|
|
2853
|
+
m($.$slots, se, { data: fe }, void 0, !0)
|
|
2852
2854
|
])
|
|
2853
2855
|
}))
|
|
2854
2856
|
]), 1040, ["modelValue"])
|
|
@@ -2856,13 +2858,13 @@ const ol = {
|
|
|
2856
2858
|
]);
|
|
2857
2859
|
};
|
|
2858
2860
|
}
|
|
2859
|
-
}),
|
|
2861
|
+
}), Fl = /* @__PURE__ */ Ue(Vl, [["__scopeId", "data-v-5fb88c8a"]]), Tl = {
|
|
2860
2862
|
key: 0,
|
|
2861
2863
|
class: "op-group"
|
|
2862
|
-
},
|
|
2864
|
+
}, Sl = {
|
|
2863
2865
|
key: 1,
|
|
2864
2866
|
class: "op-items"
|
|
2865
|
-
},
|
|
2867
|
+
}, ql = ["title"], pt = "100px", Ml = /* @__PURE__ */ Object.assign({ name: "g-select-option" }, {
|
|
2866
2868
|
__name: "g-select-option",
|
|
2867
2869
|
props: {
|
|
2868
2870
|
columns: {
|
|
@@ -2884,71 +2886,71 @@ const ol = {
|
|
|
2884
2886
|
},
|
|
2885
2887
|
setup(c) {
|
|
2886
2888
|
const f = c;
|
|
2887
|
-
return (t, e) => f.title ? (n(), A("div",
|
|
2889
|
+
return (t, e) => f.title ? (n(), A("div", Tl, [
|
|
2888
2890
|
(n(!0), A(H, null, I(f.columns, (r) => (n(), A("span", {
|
|
2889
|
-
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" }),
|
|
2890
2892
|
key: r.key
|
|
2891
2893
|
}, [
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
+
m(t.$slots, `${c.t}-title-${r.key}`, { col: r }, () => [
|
|
2895
|
+
Ce($e(r.label), 1)
|
|
2894
2896
|
], !0)
|
|
2895
2897
|
], 4))), 128))
|
|
2896
|
-
])) : (n(), A("div",
|
|
2898
|
+
])) : (n(), A("div", Sl, [
|
|
2897
2899
|
(n(!0), A(H, null, I(f.columns, (r) => (n(), A("span", {
|
|
2898
|
-
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 }),
|
|
2899
2901
|
key: r.key,
|
|
2900
2902
|
title: c.data[r.key]
|
|
2901
2903
|
}, [
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
+
m(t.$slots, `${c.t}-option-${r.key}`, { col: r }, () => [
|
|
2905
|
+
Ce($e(c.data[r.key]), 1)
|
|
2904
2906
|
], !0)
|
|
2905
|
-
], 12,
|
|
2907
|
+
], 12, ql))), 128))
|
|
2906
2908
|
]));
|
|
2907
2909
|
}
|
|
2908
|
-
}),
|
|
2909
|
-
let
|
|
2910
|
-
const
|
|
2910
|
+
}), Ol = /* @__PURE__ */ Ue(Ml, [["__scopeId", "data-v-ba0fcda6"]]), Al = Object.freeze({}), Et = [kl, et, Fl, Ol];
|
|
2911
|
+
let tt = {};
|
|
2912
|
+
const Ll = {
|
|
2911
2913
|
install: (c, f = {}) => {
|
|
2912
|
-
|
|
2914
|
+
tt = Object.freeze({ ...Al, ...f }), Et.forEach((t) => {
|
|
2913
2915
|
c.component(t.name, t);
|
|
2914
|
-
}), c.provide("options",
|
|
2916
|
+
}), c.provide("options", tt), c.config.globalProperties.$openModal = lt;
|
|
2915
2917
|
}
|
|
2916
|
-
},
|
|
2918
|
+
}, xl = (c) => ({ dialog: _t, drawer: Ct })[c] || null, lt = (c = {}, f = "dialog") => {
|
|
2917
2919
|
if (typeof document > "u") return () => {
|
|
2918
2920
|
};
|
|
2919
2921
|
const t = document.createElement("div");
|
|
2920
2922
|
let e = () => {
|
|
2921
2923
|
};
|
|
2922
|
-
const r =
|
|
2924
|
+
const r = xl(f);
|
|
2923
2925
|
if (!r) return () => {
|
|
2924
2926
|
};
|
|
2925
|
-
const
|
|
2927
|
+
const v = me(!0), T = Mt({
|
|
2926
2928
|
setup() {
|
|
2927
2929
|
return e = () => {
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
+
v.value = !1, setTimeout(() => {
|
|
2931
|
+
T.unmount(), t.remove();
|
|
2930
2932
|
}, 300);
|
|
2931
2933
|
}, () => {
|
|
2932
|
-
var
|
|
2933
|
-
return
|
|
2934
|
-
modelValue:
|
|
2935
|
-
"onUpdate:modelValue": (k) =>
|
|
2934
|
+
var S, q, w;
|
|
2935
|
+
return Se(r, {
|
|
2936
|
+
modelValue: v.value,
|
|
2937
|
+
"onUpdate:modelValue": (k) => v.value = k,
|
|
2936
2938
|
...c,
|
|
2937
2939
|
appendToBody: !0,
|
|
2938
2940
|
destroyOnClose: !0
|
|
2939
2941
|
}, {
|
|
2940
|
-
default: (
|
|
2941
|
-
header: (
|
|
2942
|
+
default: (S = c.slots) == null ? void 0 : S.default,
|
|
2943
|
+
header: (q = c.slots) == null ? void 0 : q.header,
|
|
2942
2944
|
footer: (w = c.slots) == null ? void 0 : w.footer
|
|
2943
2945
|
});
|
|
2944
2946
|
};
|
|
2945
2947
|
}
|
|
2946
2948
|
});
|
|
2947
|
-
return
|
|
2948
|
-
|
|
2949
|
-
}),
|
|
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;
|
|
2950
2952
|
};
|
|
2951
|
-
function
|
|
2953
|
+
function wt(c, f = window.innerWidth) {
|
|
2952
2954
|
if (typeof c == "number")
|
|
2953
2955
|
return c;
|
|
2954
2956
|
if (c.endsWith("px"))
|
|
@@ -2964,60 +2966,60 @@ function Et(c, f = window.innerWidth) {
|
|
|
2964
2966
|
return f * parseFloat(c) / 100;
|
|
2965
2967
|
}
|
|
2966
2968
|
if (c.startsWith("calc(") && c.endsWith(")")) {
|
|
2967
|
-
let
|
|
2968
|
-
if (/[0-9+\-*/().\s]+$/.test(
|
|
2969
|
-
return new Function("return " +
|
|
2969
|
+
let v = function(S) {
|
|
2970
|
+
if (/[0-9+\-*/().\s]+$/.test(S))
|
|
2971
|
+
return new Function("return " + S)();
|
|
2970
2972
|
throw new Error("Invalid calc expression");
|
|
2971
2973
|
};
|
|
2972
2974
|
const r = c.slice(5, -1).trim();
|
|
2973
|
-
return
|
|
2975
|
+
return v(r.replace(/([0-9.]+)([a-z%]+)/g, (S, q, w) => wt(q + w, f)));
|
|
2974
2976
|
}
|
|
2975
2977
|
throw new Error("Unsupported unit in value: " + c);
|
|
2976
2978
|
}
|
|
2977
|
-
const
|
|
2978
|
-
const f = {}, t = (e, r) => (Object.keys(r).forEach((
|
|
2979
|
-
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];
|
|
2980
2982
|
}), e);
|
|
2981
2983
|
return c.forEach((e = {}) => t(f, e)), f;
|
|
2982
2984
|
};
|
|
2983
|
-
function
|
|
2985
|
+
function Fe(c, f = (t, e) => f(t, e)) {
|
|
2984
2986
|
const t = {};
|
|
2985
2987
|
for (const e in c)
|
|
2986
2988
|
c.hasOwnProperty(e) && f(e, c[e]) && (t[e] = c[e]);
|
|
2987
2989
|
return t;
|
|
2988
2990
|
}
|
|
2989
|
-
function
|
|
2990
|
-
for (const
|
|
2991
|
-
if (
|
|
2992
|
-
return
|
|
2993
|
-
if (
|
|
2994
|
-
const
|
|
2995
|
-
if (
|
|
2996
|
-
return
|
|
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);
|
|
2997
|
+
if (T)
|
|
2998
|
+
return T;
|
|
2997
2999
|
}
|
|
2998
3000
|
}
|
|
2999
3001
|
return null;
|
|
3000
3002
|
}
|
|
3001
|
-
function
|
|
3003
|
+
function ot(c) {
|
|
3002
3004
|
if (!c || isNaN(c)) return "零";
|
|
3003
3005
|
const f = ["角", "分"], t = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], e = [
|
|
3004
3006
|
["元", "万", "亿"],
|
|
3005
3007
|
["", "拾", "佰", "仟"]
|
|
3006
3008
|
], r = c < 0 ? "欠" : "";
|
|
3007
3009
|
c = Math.abs(c);
|
|
3008
|
-
let
|
|
3009
|
-
for (let
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
for (let
|
|
3013
|
-
let
|
|
3014
|
-
for (let
|
|
3015
|
-
|
|
3016
|
-
|
|
3010
|
+
let v = "";
|
|
3011
|
+
for (let T = 0; T < f.length; T++)
|
|
3012
|
+
v += (t[Math.floor(c * 10 * Math.pow(10, T)) % 10] + f[T]).replace(/零./, "");
|
|
3013
|
+
v = v || "整", c = Math.floor(c);
|
|
3014
|
+
for (let T = 0; T < e[0].length && c > 0; T++) {
|
|
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;
|
|
3017
3019
|
}
|
|
3018
|
-
return r +
|
|
3020
|
+
return r + v.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整");
|
|
3019
3021
|
}
|
|
3020
|
-
function
|
|
3022
|
+
function Il(c) {
|
|
3021
3023
|
if (typeof c != "number")
|
|
3022
3024
|
return "0.00";
|
|
3023
3025
|
const f = c.toFixed(2), [t, e] = f.split(".");
|
|
@@ -3054,12 +3056,12 @@ const ce = {
|
|
|
3054
3056
|
};
|
|
3055
3057
|
export {
|
|
3056
3058
|
ce as CT,
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
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
|
|
3065
3067
|
};
|