@yidun/antd-super-table 0.1.12 → 0.1.13
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/README.md +4 -0
- package/dist/index.js +1035 -1030
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
var un = Object.defineProperty;
|
|
3
3
|
var dn = (t, e, o) => e in t ? un(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
4
4
|
var Me = (t, e, o) => dn(t, typeof e != "symbol" ? e + "" : e, o);
|
|
5
|
-
import { h as G, defineComponent as
|
|
6
|
-
import Cn, { theme as _n, Form as En, RangePicker as
|
|
7
|
-
import { DownOutlined as Ut, HolderOutlined as
|
|
8
|
-
import { slice as Ot, isFunction as
|
|
5
|
+
import { h as G, defineComponent as he, computed as O, resolveComponent as T, createElementBlock as Y, openBlock as w, normalizeClass as b, unref as g, createCommentVNode as R, Fragment as Te, renderList as mt, normalizeStyle as re, renderSlot as ge, createBlock as U, withCtx as C, createVNode as E, createTextVNode as X, toDisplayString as me, createElementVNode as V, withMemo as jt, resolveDynamicComponent as Qe, normalizeProps as ut, mergeProps as ue, ref as le, watchEffect as xt, watch as $e, useAttrs as pn, createSlots as Ge, reactive as Xe, toRaw as Ce, createApp as fn, onBeforeUnmount as mn, getCurrentInstance as hn, markRaw as yn, shallowRef as gn, onMounted as bn, nextTick as vn } from "vue";
|
|
6
|
+
import Cn, { theme as _n, Form as En, RangePicker as Sn, DatePicker as wn, TreeSelect as xn, Cascader as In, Select as $n, InputNumber as kn, Input as An, Empty as On, ConfigProvider as Tn, message as dt } from "ant-design-vue";
|
|
7
|
+
import { DownOutlined as Ut, HolderOutlined as Pe, EyeOutlined as Pn, SettingOutlined as Ln, VerticalAlignBottomOutlined as It, PushpinOutlined as $t, VerticalAlignTopOutlined as kt, MinusCircleOutlined as At, PlusOutlined as zt, InfoCircleOutlined as ht, UpOutlined as Fn, PlusCircleFilled as Bn, SettingFilled as Dn, FilterFilled as Mn, ReloadOutlined as Rn, InfoCircleFilled as Nn } from "@ant-design/icons-vue";
|
|
8
|
+
import { slice as Ot, isFunction as ke, get as Ze, castArray as Fe, debounce as vt, pick as Ae, omit as qt, set as je, cloneDeep as pt, sortBy as Je, unionBy as Tt, uniqueId as jn, merge as Un } from "lodash-es";
|
|
9
9
|
import { useLocalStorage as zn, useStorage as qn } from "@vueuse/core";
|
|
10
10
|
import Ue from "dayjs";
|
|
11
11
|
import Hn from "sortablejs";
|
|
@@ -81,7 +81,7 @@ const Wn = {
|
|
|
81
81
|
timePickerLocale: et({}, Yt)
|
|
82
82
|
};
|
|
83
83
|
yt.lang.ok = "确定";
|
|
84
|
-
const
|
|
84
|
+
const fe = "${label}不是一个有效的${type}", Vt = {
|
|
85
85
|
locale: "zh-cn",
|
|
86
86
|
Pagination: Vn,
|
|
87
87
|
DatePicker: yt,
|
|
@@ -169,19 +169,19 @@ const he = "${label}不是一个有效的${type}", Vt = {
|
|
|
169
169
|
invalid: "${label}是一个无效日期"
|
|
170
170
|
},
|
|
171
171
|
types: {
|
|
172
|
-
string:
|
|
173
|
-
method:
|
|
174
|
-
array:
|
|
175
|
-
object:
|
|
176
|
-
number:
|
|
177
|
-
date:
|
|
178
|
-
boolean:
|
|
179
|
-
integer:
|
|
180
|
-
float:
|
|
181
|
-
regexp:
|
|
182
|
-
email:
|
|
183
|
-
url:
|
|
184
|
-
hex:
|
|
172
|
+
string: fe,
|
|
173
|
+
method: fe,
|
|
174
|
+
array: fe,
|
|
175
|
+
object: fe,
|
|
176
|
+
number: fe,
|
|
177
|
+
date: fe,
|
|
178
|
+
boolean: fe,
|
|
179
|
+
integer: fe,
|
|
180
|
+
float: fe,
|
|
181
|
+
regexp: fe,
|
|
182
|
+
email: fe,
|
|
183
|
+
url: fe,
|
|
184
|
+
hex: fe
|
|
185
185
|
},
|
|
186
186
|
string: {
|
|
187
187
|
len: "${label}须为${len}个字符",
|
|
@@ -227,17 +227,17 @@ function Kn() {
|
|
|
227
227
|
var r = n(o), a = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(i, c) {
|
|
228
228
|
return c === "W" ? i + "周" : i + "日";
|
|
229
229
|
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(i, c) {
|
|
230
|
-
var
|
|
231
|
-
return
|
|
230
|
+
var p = 100 * i + c;
|
|
231
|
+
return p < 600 ? "凌晨" : p < 900 ? "早上" : p < 1100 ? "上午" : p < 1300 ? "中午" : p < 1800 ? "下午" : "晚上";
|
|
232
232
|
} };
|
|
233
233
|
return r.default.locale(a, null, !0), a;
|
|
234
234
|
});
|
|
235
235
|
}(Ke)), Ke.exports;
|
|
236
236
|
}
|
|
237
237
|
Kn();
|
|
238
|
-
const { defaultAlgorithm: Qn, defaultSeed: Xn } = _n,
|
|
239
|
-
var
|
|
240
|
-
const Wt = Object.values(
|
|
238
|
+
const { defaultAlgorithm: Qn, defaultSeed: Xn } = _n, se = Qn(Xn);
|
|
239
|
+
var be = /* @__PURE__ */ ((t) => (t.order = "_order", t.orderInScene = "_orderInScene", t.defaultValue = "_defaultValue", t.selected = "_selected", t))(be || {});
|
|
240
|
+
const Wt = Object.values(be), Q = {
|
|
241
241
|
/** 文本(默认)*/
|
|
242
242
|
text: "text",
|
|
243
243
|
/** 链接 */
|
|
@@ -273,7 +273,7 @@ const Wt = Object.values(ve), Q = {
|
|
|
273
273
|
rangePicker: "rangePicker",
|
|
274
274
|
/** 自定义组件 */
|
|
275
275
|
component: "component"
|
|
276
|
-
},
|
|
276
|
+
}, ce = {
|
|
277
277
|
/** 新增 */
|
|
278
278
|
create: "create",
|
|
279
279
|
/** 更新 */
|
|
@@ -351,7 +351,7 @@ class Jn {
|
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
class
|
|
354
|
+
class d {
|
|
355
355
|
/**
|
|
356
356
|
* @returns {string}
|
|
357
357
|
*/
|
|
@@ -362,7 +362,7 @@ class u {
|
|
|
362
362
|
* @returns {string}
|
|
363
363
|
*/
|
|
364
364
|
static toString() {
|
|
365
|
-
return "JavaScript Expression Parser (JSEP) v" +
|
|
365
|
+
return "JavaScript Expression Parser (JSEP) v" + d.version;
|
|
366
366
|
}
|
|
367
367
|
// ==================== CONFIG ================================
|
|
368
368
|
/**
|
|
@@ -371,7 +371,7 @@ class u {
|
|
|
371
371
|
* @returns {Jsep}
|
|
372
372
|
*/
|
|
373
373
|
static addUnaryOp(e) {
|
|
374
|
-
return
|
|
374
|
+
return d.max_unop_len = Math.max(e.length, d.max_unop_len), d.unary_ops[e] = 1, d;
|
|
375
375
|
}
|
|
376
376
|
/**
|
|
377
377
|
* @method jsep.addBinaryOp
|
|
@@ -381,7 +381,7 @@ class u {
|
|
|
381
381
|
* @returns {Jsep}
|
|
382
382
|
*/
|
|
383
383
|
static addBinaryOp(e, o, n) {
|
|
384
|
-
return
|
|
384
|
+
return d.max_binop_len = Math.max(e.length, d.max_binop_len), d.binary_ops[e] = o, n ? d.right_associative.add(e) : d.right_associative.delete(e), d;
|
|
385
385
|
}
|
|
386
386
|
/**
|
|
387
387
|
* @method addIdentifierChar
|
|
@@ -389,7 +389,7 @@ class u {
|
|
|
389
389
|
* @returns {Jsep}
|
|
390
390
|
*/
|
|
391
391
|
static addIdentifierChar(e) {
|
|
392
|
-
return
|
|
392
|
+
return d.additional_identifier_chars.add(e), d;
|
|
393
393
|
}
|
|
394
394
|
/**
|
|
395
395
|
* @method addLiteral
|
|
@@ -398,7 +398,7 @@ class u {
|
|
|
398
398
|
* @returns {Jsep}
|
|
399
399
|
*/
|
|
400
400
|
static addLiteral(e, o) {
|
|
401
|
-
return
|
|
401
|
+
return d.literals[e] = o, d;
|
|
402
402
|
}
|
|
403
403
|
/**
|
|
404
404
|
* @method removeUnaryOp
|
|
@@ -406,14 +406,14 @@ class u {
|
|
|
406
406
|
* @returns {Jsep}
|
|
407
407
|
*/
|
|
408
408
|
static removeUnaryOp(e) {
|
|
409
|
-
return delete
|
|
409
|
+
return delete d.unary_ops[e], e.length === d.max_unop_len && (d.max_unop_len = d.getMaxKeyLen(d.unary_ops)), d;
|
|
410
410
|
}
|
|
411
411
|
/**
|
|
412
412
|
* @method removeAllUnaryOps
|
|
413
413
|
* @returns {Jsep}
|
|
414
414
|
*/
|
|
415
415
|
static removeAllUnaryOps() {
|
|
416
|
-
return
|
|
416
|
+
return d.unary_ops = {}, d.max_unop_len = 0, d;
|
|
417
417
|
}
|
|
418
418
|
/**
|
|
419
419
|
* @method removeIdentifierChar
|
|
@@ -421,7 +421,7 @@ class u {
|
|
|
421
421
|
* @returns {Jsep}
|
|
422
422
|
*/
|
|
423
423
|
static removeIdentifierChar(e) {
|
|
424
|
-
return
|
|
424
|
+
return d.additional_identifier_chars.delete(e), d;
|
|
425
425
|
}
|
|
426
426
|
/**
|
|
427
427
|
* @method removeBinaryOp
|
|
@@ -429,14 +429,14 @@ class u {
|
|
|
429
429
|
* @returns {Jsep}
|
|
430
430
|
*/
|
|
431
431
|
static removeBinaryOp(e) {
|
|
432
|
-
return delete
|
|
432
|
+
return delete d.binary_ops[e], e.length === d.max_binop_len && (d.max_binop_len = d.getMaxKeyLen(d.binary_ops)), d.right_associative.delete(e), d;
|
|
433
433
|
}
|
|
434
434
|
/**
|
|
435
435
|
* @method removeAllBinaryOps
|
|
436
436
|
* @returns {Jsep}
|
|
437
437
|
*/
|
|
438
438
|
static removeAllBinaryOps() {
|
|
439
|
-
return
|
|
439
|
+
return d.binary_ops = {}, d.max_binop_len = 0, d;
|
|
440
440
|
}
|
|
441
441
|
/**
|
|
442
442
|
* @method removeLiteral
|
|
@@ -444,14 +444,14 @@ class u {
|
|
|
444
444
|
* @returns {Jsep}
|
|
445
445
|
*/
|
|
446
446
|
static removeLiteral(e) {
|
|
447
|
-
return delete
|
|
447
|
+
return delete d.literals[e], d;
|
|
448
448
|
}
|
|
449
449
|
/**
|
|
450
450
|
* @method removeAllLiterals
|
|
451
451
|
* @returns {Jsep}
|
|
452
452
|
*/
|
|
453
453
|
static removeAllLiterals() {
|
|
454
|
-
return
|
|
454
|
+
return d.literals = {}, d;
|
|
455
455
|
}
|
|
456
456
|
// ==================== END CONFIG ============================
|
|
457
457
|
/**
|
|
@@ -478,7 +478,7 @@ class u {
|
|
|
478
478
|
* @returns {jsep.Expression}
|
|
479
479
|
*/
|
|
480
480
|
static parse(e) {
|
|
481
|
-
return new
|
|
481
|
+
return new d(e).parse();
|
|
482
482
|
}
|
|
483
483
|
/**
|
|
484
484
|
* Get the longest key length of any object
|
|
@@ -502,7 +502,7 @@ class u {
|
|
|
502
502
|
* @returns {number}
|
|
503
503
|
*/
|
|
504
504
|
static binaryPrecedence(e) {
|
|
505
|
-
return
|
|
505
|
+
return d.binary_ops[e] || 0;
|
|
506
506
|
}
|
|
507
507
|
/**
|
|
508
508
|
* Looks for start of identifier
|
|
@@ -512,15 +512,15 @@ class u {
|
|
|
512
512
|
static isIdentifierStart(e) {
|
|
513
513
|
return e >= 65 && e <= 90 || // A...Z
|
|
514
514
|
e >= 97 && e <= 122 || // a...z
|
|
515
|
-
e >= 128 && !
|
|
516
|
-
|
|
515
|
+
e >= 128 && !d.binary_ops[String.fromCharCode(e)] || // any non-ASCII that is not an operator
|
|
516
|
+
d.additional_identifier_chars.has(String.fromCharCode(e));
|
|
517
517
|
}
|
|
518
518
|
/**
|
|
519
519
|
* @param {number} ch
|
|
520
520
|
* @returns {boolean}
|
|
521
521
|
*/
|
|
522
522
|
static isIdentifierPart(e) {
|
|
523
|
-
return
|
|
523
|
+
return d.isIdentifierStart(e) || d.isDecimalDigit(e);
|
|
524
524
|
}
|
|
525
525
|
/**
|
|
526
526
|
* throw error at index of the expression
|
|
@@ -538,12 +538,12 @@ class u {
|
|
|
538
538
|
* @returns {?jsep.Expression}
|
|
539
539
|
*/
|
|
540
540
|
runHook(e, o) {
|
|
541
|
-
if (
|
|
541
|
+
if (d.hooks[e]) {
|
|
542
542
|
const n = {
|
|
543
543
|
context: this,
|
|
544
544
|
node: o
|
|
545
545
|
};
|
|
546
|
-
return
|
|
546
|
+
return d.hooks.run(e, n), n.node;
|
|
547
547
|
}
|
|
548
548
|
return o;
|
|
549
549
|
}
|
|
@@ -553,11 +553,11 @@ class u {
|
|
|
553
553
|
* @returns {?jsep.Expression}
|
|
554
554
|
*/
|
|
555
555
|
searchHook(e) {
|
|
556
|
-
if (
|
|
556
|
+
if (d.hooks[e]) {
|
|
557
557
|
const o = {
|
|
558
558
|
context: this
|
|
559
559
|
};
|
|
560
|
-
return
|
|
560
|
+
return d.hooks[e].find(function(n) {
|
|
561
561
|
return n.call(o.context, o), o.node;
|
|
562
562
|
}), o.node;
|
|
563
563
|
}
|
|
@@ -567,7 +567,7 @@ class u {
|
|
|
567
567
|
*/
|
|
568
568
|
gobbleSpaces() {
|
|
569
569
|
let e = this.code;
|
|
570
|
-
for (; e ===
|
|
570
|
+
for (; e === d.SPACE_CODE || e === d.TAB_CODE || e === d.LF_CODE || e === d.CR_CODE; )
|
|
571
571
|
e = this.expr.charCodeAt(++this.index);
|
|
572
572
|
this.runHook("gobble-spaces");
|
|
573
573
|
}
|
|
@@ -578,7 +578,7 @@ class u {
|
|
|
578
578
|
parse() {
|
|
579
579
|
this.runHook("before-all");
|
|
580
580
|
const e = this.gobbleExpressions(), o = e.length === 1 ? e[0] : {
|
|
581
|
-
type:
|
|
581
|
+
type: d.COMPOUND,
|
|
582
582
|
body: e
|
|
583
583
|
};
|
|
584
584
|
return this.runHook("after-all", o);
|
|
@@ -591,7 +591,7 @@ class u {
|
|
|
591
591
|
gobbleExpressions(e) {
|
|
592
592
|
let o = [], n, r;
|
|
593
593
|
for (; this.index < this.expr.length; )
|
|
594
|
-
if (n = this.code, n ===
|
|
594
|
+
if (n = this.code, n === d.SEMCOL_CODE || n === d.COMMA_CODE)
|
|
595
595
|
this.index++;
|
|
596
596
|
else if (r = this.gobbleExpression())
|
|
597
597
|
o.push(r);
|
|
@@ -619,9 +619,9 @@ class u {
|
|
|
619
619
|
*/
|
|
620
620
|
gobbleBinaryOp() {
|
|
621
621
|
this.gobbleSpaces();
|
|
622
|
-
let e = this.expr.substr(this.index,
|
|
622
|
+
let e = this.expr.substr(this.index, d.max_binop_len), o = e.length;
|
|
623
623
|
for (; o > 0; ) {
|
|
624
|
-
if (
|
|
624
|
+
if (d.binary_ops.hasOwnProperty(e) && (!d.isIdentifierStart(this.code) || this.index + e.length < this.expr.length && !d.isIdentifierPart(this.expr.charCodeAt(this.index + e.length))))
|
|
625
625
|
return this.index += o, e;
|
|
626
626
|
e = e.substr(0, --o);
|
|
627
627
|
}
|
|
@@ -633,40 +633,40 @@ class u {
|
|
|
633
633
|
* @returns {?jsep.BinaryExpression}
|
|
634
634
|
*/
|
|
635
635
|
gobbleBinaryExpression() {
|
|
636
|
-
let e, o, n, r, a, i, c,
|
|
636
|
+
let e, o, n, r, a, i, c, p, h;
|
|
637
637
|
if (i = this.gobbleToken(), !i || (o = this.gobbleBinaryOp(), !o))
|
|
638
638
|
return i;
|
|
639
639
|
for (a = {
|
|
640
640
|
value: o,
|
|
641
|
-
prec:
|
|
642
|
-
right_a:
|
|
641
|
+
prec: d.binaryPrecedence(o),
|
|
642
|
+
right_a: d.right_associative.has(o)
|
|
643
643
|
}, c = this.gobbleToken(), c || this.throwError("Expected expression after " + o), r = [i, a, c]; o = this.gobbleBinaryOp(); ) {
|
|
644
|
-
if (n =
|
|
644
|
+
if (n = d.binaryPrecedence(o), n === 0) {
|
|
645
645
|
this.index -= o.length;
|
|
646
646
|
break;
|
|
647
647
|
}
|
|
648
648
|
a = {
|
|
649
649
|
value: o,
|
|
650
650
|
prec: n,
|
|
651
|
-
right_a:
|
|
651
|
+
right_a: d.right_associative.has(o)
|
|
652
652
|
}, h = o;
|
|
653
|
-
const
|
|
654
|
-
for (; r.length > 2 &&
|
|
653
|
+
const S = (v) => a.right_a && v.right_a ? n > v.prec : n <= v.prec;
|
|
654
|
+
for (; r.length > 2 && S(r[r.length - 2]); )
|
|
655
655
|
c = r.pop(), o = r.pop().value, i = r.pop(), e = {
|
|
656
|
-
type:
|
|
656
|
+
type: d.BINARY_EXP,
|
|
657
657
|
operator: o,
|
|
658
658
|
left: i,
|
|
659
659
|
right: c
|
|
660
660
|
}, r.push(e);
|
|
661
661
|
e = this.gobbleToken(), e || this.throwError("Expected expression after " + h), r.push(a, e);
|
|
662
662
|
}
|
|
663
|
-
for (
|
|
663
|
+
for (p = r.length - 1, e = r[p]; p > 1; )
|
|
664
664
|
e = {
|
|
665
|
-
type:
|
|
666
|
-
operator: r[
|
|
667
|
-
left: r[
|
|
665
|
+
type: d.BINARY_EXP,
|
|
666
|
+
operator: r[p - 1].value,
|
|
667
|
+
left: r[p - 2],
|
|
668
668
|
right: e
|
|
669
|
-
},
|
|
669
|
+
}, p -= 2;
|
|
670
670
|
return e;
|
|
671
671
|
}
|
|
672
672
|
/**
|
|
@@ -678,19 +678,19 @@ class u {
|
|
|
678
678
|
let e, o, n, r;
|
|
679
679
|
if (this.gobbleSpaces(), r = this.searchHook("gobble-token"), r)
|
|
680
680
|
return this.runHook("after-token", r);
|
|
681
|
-
if (e = this.code,
|
|
681
|
+
if (e = this.code, d.isDecimalDigit(e) || e === d.PERIOD_CODE)
|
|
682
682
|
return this.gobbleNumericLiteral();
|
|
683
|
-
if (e ===
|
|
683
|
+
if (e === d.SQUOTE_CODE || e === d.DQUOTE_CODE)
|
|
684
684
|
r = this.gobbleStringLiteral();
|
|
685
|
-
else if (e ===
|
|
685
|
+
else if (e === d.OBRACK_CODE)
|
|
686
686
|
r = this.gobbleArray();
|
|
687
687
|
else {
|
|
688
|
-
for (o = this.expr.substr(this.index,
|
|
689
|
-
if (
|
|
688
|
+
for (o = this.expr.substr(this.index, d.max_unop_len), n = o.length; n > 0; ) {
|
|
689
|
+
if (d.unary_ops.hasOwnProperty(o) && (!d.isIdentifierStart(this.code) || this.index + o.length < this.expr.length && !d.isIdentifierPart(this.expr.charCodeAt(this.index + o.length)))) {
|
|
690
690
|
this.index += n;
|
|
691
691
|
const a = this.gobbleToken();
|
|
692
692
|
return a || this.throwError("missing unaryOp argument"), this.runHook("after-token", {
|
|
693
|
-
type:
|
|
693
|
+
type: d.UNARY_EXP,
|
|
694
694
|
operator: o,
|
|
695
695
|
argument: a,
|
|
696
696
|
prefix: !0
|
|
@@ -698,13 +698,13 @@ class u {
|
|
|
698
698
|
}
|
|
699
699
|
o = o.substr(0, --n);
|
|
700
700
|
}
|
|
701
|
-
|
|
702
|
-
type:
|
|
703
|
-
value:
|
|
701
|
+
d.isIdentifierStart(e) ? (r = this.gobbleIdentifier(), d.literals.hasOwnProperty(r.name) ? r = {
|
|
702
|
+
type: d.LITERAL,
|
|
703
|
+
value: d.literals[r.name],
|
|
704
704
|
raw: r.name
|
|
705
|
-
} : r.name ===
|
|
706
|
-
type:
|
|
707
|
-
})) : e ===
|
|
705
|
+
} : r.name === d.this_str && (r = {
|
|
706
|
+
type: d.THIS_EXP
|
|
707
|
+
})) : e === d.OPAREN_CODE && (r = this.gobbleGroup());
|
|
708
708
|
}
|
|
709
709
|
return r ? (r = this.gobbleTokenProperty(r), this.runHook("after-token", r)) : this.runHook("after-token", !1);
|
|
710
710
|
}
|
|
@@ -719,24 +719,24 @@ class u {
|
|
|
719
719
|
gobbleTokenProperty(e) {
|
|
720
720
|
this.gobbleSpaces();
|
|
721
721
|
let o = this.code;
|
|
722
|
-
for (; o ===
|
|
722
|
+
for (; o === d.PERIOD_CODE || o === d.OBRACK_CODE || o === d.OPAREN_CODE || o === d.QUMARK_CODE; ) {
|
|
723
723
|
let n;
|
|
724
|
-
if (o ===
|
|
725
|
-
if (this.expr.charCodeAt(this.index + 1) !==
|
|
724
|
+
if (o === d.QUMARK_CODE) {
|
|
725
|
+
if (this.expr.charCodeAt(this.index + 1) !== d.PERIOD_CODE)
|
|
726
726
|
break;
|
|
727
727
|
n = !0, this.index += 2, this.gobbleSpaces(), o = this.code;
|
|
728
728
|
}
|
|
729
|
-
this.index++, o ===
|
|
730
|
-
type:
|
|
729
|
+
this.index++, o === d.OBRACK_CODE ? (e = {
|
|
730
|
+
type: d.MEMBER_EXP,
|
|
731
731
|
computed: !0,
|
|
732
732
|
object: e,
|
|
733
733
|
property: this.gobbleExpression()
|
|
734
|
-
}, e.property || this.throwError('Unexpected "' + this.char + '"'), this.gobbleSpaces(), o = this.code, o !==
|
|
735
|
-
type:
|
|
736
|
-
arguments: this.gobbleArguments(
|
|
734
|
+
}, e.property || this.throwError('Unexpected "' + this.char + '"'), this.gobbleSpaces(), o = this.code, o !== d.CBRACK_CODE && this.throwError("Unclosed ["), this.index++) : o === d.OPAREN_CODE ? e = {
|
|
735
|
+
type: d.CALL_EXP,
|
|
736
|
+
arguments: this.gobbleArguments(d.CPAREN_CODE),
|
|
737
737
|
callee: e
|
|
738
|
-
} : (o ===
|
|
739
|
-
type:
|
|
738
|
+
} : (o === d.PERIOD_CODE || n) && (n && this.index--, this.gobbleSpaces(), e = {
|
|
739
|
+
type: d.MEMBER_EXP,
|
|
740
740
|
computed: !1,
|
|
741
741
|
object: e,
|
|
742
742
|
property: this.gobbleIdentifier()
|
|
@@ -751,18 +751,18 @@ class u {
|
|
|
751
751
|
*/
|
|
752
752
|
gobbleNumericLiteral() {
|
|
753
753
|
let e = "", o, n;
|
|
754
|
-
for (;
|
|
754
|
+
for (; d.isDecimalDigit(this.code); )
|
|
755
755
|
e += this.expr.charAt(this.index++);
|
|
756
|
-
if (this.code ===
|
|
757
|
-
for (e += this.expr.charAt(this.index++);
|
|
756
|
+
if (this.code === d.PERIOD_CODE)
|
|
757
|
+
for (e += this.expr.charAt(this.index++); d.isDecimalDigit(this.code); )
|
|
758
758
|
e += this.expr.charAt(this.index++);
|
|
759
759
|
if (o = this.char, o === "e" || o === "E") {
|
|
760
|
-
for (e += this.expr.charAt(this.index++), o = this.char, (o === "+" || o === "-") && (e += this.expr.charAt(this.index++));
|
|
760
|
+
for (e += this.expr.charAt(this.index++), o = this.char, (o === "+" || o === "-") && (e += this.expr.charAt(this.index++)); d.isDecimalDigit(this.code); )
|
|
761
761
|
e += this.expr.charAt(this.index++);
|
|
762
|
-
|
|
762
|
+
d.isDecimalDigit(this.expr.charCodeAt(this.index - 1)) || this.throwError("Expected exponent (" + e + this.char + ")");
|
|
763
763
|
}
|
|
764
|
-
return n = this.code,
|
|
765
|
-
type:
|
|
764
|
+
return n = this.code, d.isIdentifierStart(n) ? this.throwError("Variable names cannot start with a number (" + e + this.char + ")") : (n === d.PERIOD_CODE || e.length === 1 && e.charCodeAt(0) === d.PERIOD_CODE) && this.throwError("Unexpected period"), {
|
|
765
|
+
type: d.LITERAL,
|
|
766
766
|
value: parseFloat(e),
|
|
767
767
|
raw: e
|
|
768
768
|
};
|
|
@@ -809,7 +809,7 @@ class u {
|
|
|
809
809
|
e += a;
|
|
810
810
|
}
|
|
811
811
|
return r || this.throwError('Unclosed quote after "' + e + '"'), {
|
|
812
|
-
type:
|
|
812
|
+
type: d.LITERAL,
|
|
813
813
|
value: e,
|
|
814
814
|
raw: this.expr.substring(o, this.index)
|
|
815
815
|
};
|
|
@@ -823,10 +823,10 @@ class u {
|
|
|
823
823
|
*/
|
|
824
824
|
gobbleIdentifier() {
|
|
825
825
|
let e = this.code, o = this.index;
|
|
826
|
-
for (
|
|
826
|
+
for (d.isIdentifierStart(e) ? this.index++ : this.throwError("Unexpected " + this.char); this.index < this.expr.length && (e = this.code, d.isIdentifierPart(e)); )
|
|
827
827
|
this.index++;
|
|
828
828
|
return {
|
|
829
|
-
type:
|
|
829
|
+
type: d.IDENTIFIER,
|
|
830
830
|
name: this.expr.slice(o, this.index)
|
|
831
831
|
};
|
|
832
832
|
}
|
|
@@ -846,13 +846,13 @@ class u {
|
|
|
846
846
|
this.gobbleSpaces();
|
|
847
847
|
let a = this.code;
|
|
848
848
|
if (a === e) {
|
|
849
|
-
n = !0, this.index++, e ===
|
|
849
|
+
n = !0, this.index++, e === d.CPAREN_CODE && r && r >= o.length && this.throwError("Unexpected token " + String.fromCharCode(e));
|
|
850
850
|
break;
|
|
851
|
-
} else if (a ===
|
|
851
|
+
} else if (a === d.COMMA_CODE) {
|
|
852
852
|
if (this.index++, r++, r !== o.length) {
|
|
853
|
-
if (e ===
|
|
853
|
+
if (e === d.CPAREN_CODE)
|
|
854
854
|
this.throwError("Unexpected token ,");
|
|
855
|
-
else if (e ===
|
|
855
|
+
else if (e === d.CBRACK_CODE)
|
|
856
856
|
for (let i = o.length; i < r; i++)
|
|
857
857
|
o.push(null);
|
|
858
858
|
}
|
|
@@ -860,7 +860,7 @@ class u {
|
|
|
860
860
|
this.throwError("Expected comma");
|
|
861
861
|
else {
|
|
862
862
|
const i = this.gobbleExpression();
|
|
863
|
-
(!i || i.type ===
|
|
863
|
+
(!i || i.type === d.COMPOUND) && this.throwError("Expected comma"), o.push(i);
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
866
|
return n || this.throwError("Expected " + String.fromCharCode(e)), o;
|
|
@@ -876,10 +876,10 @@ class u {
|
|
|
876
876
|
*/
|
|
877
877
|
gobbleGroup() {
|
|
878
878
|
this.index++;
|
|
879
|
-
let e = this.gobbleExpressions(
|
|
880
|
-
if (this.code ===
|
|
879
|
+
let e = this.gobbleExpressions(d.CPAREN_CODE);
|
|
880
|
+
if (this.code === d.CPAREN_CODE)
|
|
881
881
|
return this.index++, e.length === 1 ? e[0] : e.length ? {
|
|
882
|
-
type:
|
|
882
|
+
type: d.SEQUENCE_EXP,
|
|
883
883
|
expressions: e
|
|
884
884
|
} : !1;
|
|
885
885
|
this.throwError("Unclosed (");
|
|
@@ -892,15 +892,15 @@ class u {
|
|
|
892
892
|
*/
|
|
893
893
|
gobbleArray() {
|
|
894
894
|
return this.index++, {
|
|
895
|
-
type:
|
|
896
|
-
elements: this.gobbleArguments(
|
|
895
|
+
type: d.ARRAY_EXP,
|
|
896
|
+
elements: this.gobbleArguments(d.CBRACK_CODE)
|
|
897
897
|
};
|
|
898
898
|
}
|
|
899
899
|
}
|
|
900
900
|
const eo = new Zn();
|
|
901
|
-
Object.assign(
|
|
901
|
+
Object.assign(d, {
|
|
902
902
|
hooks: eo,
|
|
903
|
-
plugins: new Jn(
|
|
903
|
+
plugins: new Jn(d),
|
|
904
904
|
// Node Types
|
|
905
905
|
// ----------
|
|
906
906
|
// This is the full set of types that any JSEP node can be.
|
|
@@ -994,14 +994,14 @@ Object.assign(u, {
|
|
|
994
994
|
// Except for `this`, which is special. This could be changed to something like `'self'` as well
|
|
995
995
|
this_str: "this"
|
|
996
996
|
});
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
const
|
|
997
|
+
d.max_unop_len = d.getMaxKeyLen(d.unary_ops);
|
|
998
|
+
d.max_binop_len = d.getMaxKeyLen(d.binary_ops);
|
|
999
|
+
const we = (t) => new d(t).parse(), to = Object.getOwnPropertyNames(class {
|
|
1000
1000
|
});
|
|
1001
|
-
Object.getOwnPropertyNames(
|
|
1002
|
-
|
|
1001
|
+
Object.getOwnPropertyNames(d).filter((t) => !to.includes(t) && we[t] === void 0).forEach((t) => {
|
|
1002
|
+
we[t] = d[t];
|
|
1003
1003
|
});
|
|
1004
|
-
|
|
1004
|
+
we.Jsep = d;
|
|
1005
1005
|
const no = "ConditionalExpression";
|
|
1006
1006
|
var oo = {
|
|
1007
1007
|
name: "ternary",
|
|
@@ -1030,7 +1030,7 @@ var oo = {
|
|
|
1030
1030
|
});
|
|
1031
1031
|
}
|
|
1032
1032
|
};
|
|
1033
|
-
|
|
1033
|
+
we.plugins.register(oo);
|
|
1034
1034
|
const Lt = 47, ro = 92;
|
|
1035
1035
|
var lo = {
|
|
1036
1036
|
name: "regex",
|
|
@@ -1044,8 +1044,8 @@ var lo = {
|
|
|
1044
1044
|
const a = this.expr.slice(n, this.index);
|
|
1045
1045
|
let i = "";
|
|
1046
1046
|
for (; ++this.index < this.expr.length; ) {
|
|
1047
|
-
const
|
|
1048
|
-
if (
|
|
1047
|
+
const p = this.code;
|
|
1048
|
+
if (p >= 97 && p <= 122 || p >= 65 && p <= 90 || p >= 48 && p <= 57)
|
|
1049
1049
|
i += this.char;
|
|
1050
1050
|
else
|
|
1051
1051
|
break;
|
|
@@ -1053,8 +1053,8 @@ var lo = {
|
|
|
1053
1053
|
let c;
|
|
1054
1054
|
try {
|
|
1055
1055
|
c = new RegExp(a, i);
|
|
1056
|
-
} catch (
|
|
1057
|
-
this.throwError(
|
|
1056
|
+
} catch (p) {
|
|
1057
|
+
this.throwError(p.message);
|
|
1058
1058
|
}
|
|
1059
1059
|
return o.node = {
|
|
1060
1060
|
type: t.LITERAL,
|
|
@@ -1069,10 +1069,10 @@ var lo = {
|
|
|
1069
1069
|
});
|
|
1070
1070
|
}
|
|
1071
1071
|
};
|
|
1072
|
-
const
|
|
1072
|
+
const ft = 43, ao = 45, Le = {
|
|
1073
1073
|
name: "assignment",
|
|
1074
1074
|
assignmentOperators: /* @__PURE__ */ new Set(["=", "*=", "**=", "/=", "%=", "+=", "-=", "<<=", ">>=", ">>>=", "&=", "^=", "|=", "||=", "&&=", "??="]),
|
|
1075
|
-
updateOperators: [
|
|
1075
|
+
updateOperators: [ft, ao],
|
|
1076
1076
|
assignmentPrecedence: 0.9,
|
|
1077
1077
|
init(t) {
|
|
1078
1078
|
const e = [t.IDENTIFIER, t.MEMBER_EXP];
|
|
@@ -1080,7 +1080,7 @@ const mt = 43, ao = 45, Le = {
|
|
|
1080
1080
|
const a = this.code;
|
|
1081
1081
|
Le.updateOperators.some((i) => i === a && i === this.expr.charCodeAt(this.index + 1)) && (this.index += 2, r.node = {
|
|
1082
1082
|
type: "UpdateExpression",
|
|
1083
|
-
operator: a ===
|
|
1083
|
+
operator: a === ft ? "++" : "--",
|
|
1084
1084
|
argument: this.gobbleTokenProperty(this.gobbleIdentifier()),
|
|
1085
1085
|
prefix: !0
|
|
1086
1086
|
}, (!r.node.argument || !e.includes(r.node.argument.type)) && this.throwError(`Unexpected ${r.node.operator}`));
|
|
@@ -1089,7 +1089,7 @@ const mt = 43, ao = 45, Le = {
|
|
|
1089
1089
|
const a = this.code;
|
|
1090
1090
|
Le.updateOperators.some((i) => i === a && i === this.expr.charCodeAt(this.index + 1)) && (e.includes(r.node.type) || this.throwError(`Unexpected ${r.node.operator}`), this.index += 2, r.node = {
|
|
1091
1091
|
type: "UpdateExpression",
|
|
1092
|
-
operator: a ===
|
|
1092
|
+
operator: a === ft ? "++" : "--",
|
|
1093
1093
|
argument: r.node,
|
|
1094
1094
|
prefix: !1
|
|
1095
1095
|
});
|
|
@@ -1104,10 +1104,10 @@ const mt = 43, ao = 45, Le = {
|
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
1106
|
};
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1107
|
+
we.plugins.register(lo, Le);
|
|
1108
|
+
we.addUnaryOp("typeof");
|
|
1109
|
+
we.addLiteral("null", null);
|
|
1110
|
+
we.addLiteral("undefined", void 0);
|
|
1111
1111
|
const so = /* @__PURE__ */ new Set(["constructor", "__proto__", "__defineGetter__", "__defineSetter__"]), W = {
|
|
1112
1112
|
/**
|
|
1113
1113
|
* @param {jsep.Expression} ast
|
|
@@ -1231,7 +1231,7 @@ class io {
|
|
|
1231
1231
|
* @param {string} expr Expression to evaluate
|
|
1232
1232
|
*/
|
|
1233
1233
|
constructor(e) {
|
|
1234
|
-
this.code = e, this.ast =
|
|
1234
|
+
this.code = e, this.ast = we(this.code);
|
|
1235
1235
|
}
|
|
1236
1236
|
/**
|
|
1237
1237
|
* @param {object} context Object whose items will be added
|
|
@@ -1243,7 +1243,7 @@ class io {
|
|
|
1243
1243
|
return W.evalAst(this.ast, o);
|
|
1244
1244
|
}
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1246
|
+
function Ie(t, e) {
|
|
1247
1247
|
return t = t.slice(), t.push(e), t;
|
|
1248
1248
|
}
|
|
1249
1249
|
function bt(t, e) {
|
|
@@ -1297,14 +1297,14 @@ H.prototype.evaluate = function(t, e, o, n) {
|
|
|
1297
1297
|
}
|
|
1298
1298
|
if (r = r || null, a = a || null, Array.isArray(t) && (t = H.toPathString(t)), !t && t !== "" || !e)
|
|
1299
1299
|
return;
|
|
1300
|
-
const
|
|
1301
|
-
|
|
1302
|
-
const h = this._trace(
|
|
1303
|
-
return
|
|
1300
|
+
const p = H.toPathArray(t);
|
|
1301
|
+
p[0] === "$" && p.length > 1 && p.shift(), this._hasParentSelector = null;
|
|
1302
|
+
const h = this._trace(p, e, ["$"], r, a, o).filter(function(S) {
|
|
1303
|
+
return S && !S.isParentSelector;
|
|
1304
1304
|
});
|
|
1305
|
-
return h.length ? !c && h.length === 1 && !h[0].hasArrExpr ? this._getPreferredOutput(h[0]) : h.reduce((
|
|
1306
|
-
const
|
|
1307
|
-
return i && Array.isArray(
|
|
1305
|
+
return h.length ? !c && h.length === 1 && !h[0].hasArrExpr ? this._getPreferredOutput(h[0]) : h.reduce((S, v) => {
|
|
1306
|
+
const f = this._getPreferredOutput(v);
|
|
1307
|
+
return i && Array.isArray(f) ? S = S.concat(f) : S.push(f), S;
|
|
1308
1308
|
}, []) : c ? [] : void 0;
|
|
1309
1309
|
};
|
|
1310
1310
|
H.prototype._getPreferredOutput = function(t) {
|
|
@@ -1333,63 +1333,63 @@ H.prototype._handleCallback = function(t, e, o) {
|
|
|
1333
1333
|
}
|
|
1334
1334
|
};
|
|
1335
1335
|
H.prototype._trace = function(t, e, o, n, r, a, i, c) {
|
|
1336
|
-
let
|
|
1336
|
+
let p;
|
|
1337
1337
|
if (!t.length)
|
|
1338
|
-
return
|
|
1338
|
+
return p = {
|
|
1339
1339
|
path: o,
|
|
1340
1340
|
value: e,
|
|
1341
1341
|
parent: n,
|
|
1342
1342
|
parentProperty: r,
|
|
1343
1343
|
hasArrExpr: i
|
|
1344
|
-
}, this._handleCallback(
|
|
1345
|
-
const h = t[0],
|
|
1346
|
-
function
|
|
1344
|
+
}, this._handleCallback(p, a, "value"), p;
|
|
1345
|
+
const h = t[0], S = t.slice(1), v = [];
|
|
1346
|
+
function f(y) {
|
|
1347
1347
|
Array.isArray(y) ? y.forEach((I) => {
|
|
1348
1348
|
v.push(I);
|
|
1349
1349
|
}) : v.push(y);
|
|
1350
1350
|
}
|
|
1351
1351
|
if ((typeof h != "string" || c) && e && Object.hasOwn(e, h))
|
|
1352
|
-
|
|
1352
|
+
f(this._trace(S, e[h], Ie(o, h), e, h, a, i));
|
|
1353
1353
|
else if (h === "*")
|
|
1354
1354
|
this._walk(e, (y) => {
|
|
1355
|
-
|
|
1355
|
+
f(this._trace(S, e[y], Ie(o, y), e, y, a, !0, !0));
|
|
1356
1356
|
});
|
|
1357
1357
|
else if (h === "..")
|
|
1358
|
-
|
|
1359
|
-
typeof e[y] == "object" &&
|
|
1358
|
+
f(this._trace(S, e, o, n, r, a, i)), this._walk(e, (y) => {
|
|
1359
|
+
typeof e[y] == "object" && f(this._trace(t.slice(), e[y], Ie(o, y), e, y, a, !0));
|
|
1360
1360
|
});
|
|
1361
1361
|
else {
|
|
1362
1362
|
if (h === "^")
|
|
1363
1363
|
return this._hasParentSelector = !0, {
|
|
1364
1364
|
path: o.slice(0, -1),
|
|
1365
|
-
expr:
|
|
1365
|
+
expr: S,
|
|
1366
1366
|
isParentSelector: !0
|
|
1367
1367
|
};
|
|
1368
1368
|
if (h === "~")
|
|
1369
|
-
return
|
|
1370
|
-
path:
|
|
1369
|
+
return p = {
|
|
1370
|
+
path: Ie(o, h),
|
|
1371
1371
|
value: r,
|
|
1372
1372
|
parent: n,
|
|
1373
1373
|
parentProperty: null
|
|
1374
|
-
}, this._handleCallback(
|
|
1374
|
+
}, this._handleCallback(p, a, "property"), p;
|
|
1375
1375
|
if (h === "$")
|
|
1376
|
-
|
|
1376
|
+
f(this._trace(S, e, o, null, null, a, i));
|
|
1377
1377
|
else if (/^(-?\d*):(-?\d*):?(\d*)$/u.test(h))
|
|
1378
|
-
|
|
1378
|
+
f(this._slice(h, S, e, o, n, r, a));
|
|
1379
1379
|
else if (h.indexOf("?(") === 0) {
|
|
1380
1380
|
if (this.currEval === !1)
|
|
1381
1381
|
throw new Error("Eval [?(expr)] prevented in JSONPath expression.");
|
|
1382
1382
|
const y = h.replace(/^\?\((.*?)\)$/u, "$1"), I = /@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(y);
|
|
1383
|
-
I ? this._walk(e, (
|
|
1384
|
-
const
|
|
1385
|
-
this._trace(
|
|
1386
|
-
}) : this._walk(e, (
|
|
1387
|
-
this._eval(y, e[
|
|
1383
|
+
I ? this._walk(e, (L) => {
|
|
1384
|
+
const A = [I[2]], B = I[1] ? e[L][I[1]] : e[L];
|
|
1385
|
+
this._trace(A, B, o, n, r, a, !0).length > 0 && f(this._trace(S, e[L], Ie(o, L), e, L, a, !0));
|
|
1386
|
+
}) : this._walk(e, (L) => {
|
|
1387
|
+
this._eval(y, e[L], L, o, n, r) && f(this._trace(S, e[L], Ie(o, L), e, L, a, !0));
|
|
1388
1388
|
});
|
|
1389
1389
|
} else if (h[0] === "(") {
|
|
1390
1390
|
if (this.currEval === !1)
|
|
1391
1391
|
throw new Error("Eval [(expr)] prevented in JSONPath expression.");
|
|
1392
|
-
|
|
1392
|
+
f(this._trace(bt(this._eval(h, e, o.at(-1), o.slice(0, -1), n, r), S), e, o, n, r, a, i));
|
|
1393
1393
|
} else if (h[0] === "@") {
|
|
1394
1394
|
let y = !1;
|
|
1395
1395
|
const I = h.slice(1, -2);
|
|
@@ -1429,33 +1429,33 @@ H.prototype._trace = function(t, e, o, n, r, a, i, c) {
|
|
|
1429
1429
|
throw new TypeError("Unknown value type " + I);
|
|
1430
1430
|
}
|
|
1431
1431
|
if (y)
|
|
1432
|
-
return
|
|
1432
|
+
return p = {
|
|
1433
1433
|
path: o,
|
|
1434
1434
|
value: e,
|
|
1435
1435
|
parent: n,
|
|
1436
1436
|
parentProperty: r
|
|
1437
|
-
}, this._handleCallback(
|
|
1437
|
+
}, this._handleCallback(p, a, "value"), p;
|
|
1438
1438
|
} else if (h[0] === "`" && e && Object.hasOwn(e, h.slice(1))) {
|
|
1439
1439
|
const y = h.slice(1);
|
|
1440
|
-
|
|
1440
|
+
f(this._trace(S, e[y], Ie(o, y), e, y, a, i, !0));
|
|
1441
1441
|
} else if (h.includes(",")) {
|
|
1442
1442
|
const y = h.split(",");
|
|
1443
1443
|
for (const I of y)
|
|
1444
|
-
|
|
1445
|
-
} else !c && e && Object.hasOwn(e, h) &&
|
|
1444
|
+
f(this._trace(bt(I, S), e, o, n, r, a, !0));
|
|
1445
|
+
} else !c && e && Object.hasOwn(e, h) && f(this._trace(S, e[h], Ie(o, h), e, h, a, i, !0));
|
|
1446
1446
|
}
|
|
1447
1447
|
if (this._hasParentSelector)
|
|
1448
1448
|
for (let y = 0; y < v.length; y++) {
|
|
1449
1449
|
const I = v[y];
|
|
1450
1450
|
if (I && I.isParentSelector) {
|
|
1451
|
-
const
|
|
1452
|
-
if (Array.isArray(
|
|
1453
|
-
v[y] =
|
|
1454
|
-
const
|
|
1455
|
-
for (let B = 1; B <
|
|
1456
|
-
y++, v.splice(y, 0,
|
|
1451
|
+
const L = this._trace(I.expr, e, I.path, n, r, a, i);
|
|
1452
|
+
if (Array.isArray(L)) {
|
|
1453
|
+
v[y] = L[0];
|
|
1454
|
+
const A = L.length;
|
|
1455
|
+
for (let B = 1; B < A; B++)
|
|
1456
|
+
y++, v.splice(y, 0, L[B]);
|
|
1457
1457
|
} else
|
|
1458
|
-
v[y] =
|
|
1458
|
+
v[y] = L;
|
|
1459
1459
|
}
|
|
1460
1460
|
}
|
|
1461
1461
|
return v;
|
|
@@ -1472,15 +1472,15 @@ H.prototype._walk = function(t, e) {
|
|
|
1472
1472
|
H.prototype._slice = function(t, e, o, n, r, a, i) {
|
|
1473
1473
|
if (!Array.isArray(o))
|
|
1474
1474
|
return;
|
|
1475
|
-
const c = o.length,
|
|
1476
|
-
let
|
|
1477
|
-
|
|
1478
|
-
const
|
|
1479
|
-
for (let y =
|
|
1480
|
-
this._trace(bt(y, e), o, n, r, a, i, !0).forEach((
|
|
1481
|
-
|
|
1475
|
+
const c = o.length, p = t.split(":"), h = p[2] && Number.parseInt(p[2]) || 1;
|
|
1476
|
+
let S = p[0] && Number.parseInt(p[0]) || 0, v = p[1] && Number.parseInt(p[1]) || c;
|
|
1477
|
+
S = S < 0 ? Math.max(0, S + c) : Math.min(c, S), v = v < 0 ? Math.max(0, v + c) : Math.min(c, v);
|
|
1478
|
+
const f = [];
|
|
1479
|
+
for (let y = S; y < v; y += h)
|
|
1480
|
+
this._trace(bt(y, e), o, n, r, a, i, !0).forEach((L) => {
|
|
1481
|
+
f.push(L);
|
|
1482
1482
|
});
|
|
1483
|
-
return
|
|
1483
|
+
return f;
|
|
1484
1484
|
};
|
|
1485
1485
|
H.prototype._eval = function(t, e, o, n, r, a) {
|
|
1486
1486
|
this.currSandbox._$_parentProperty = a, this.currSandbox._$_parent = r, this.currSandbox._$_property = o, this.currSandbox._$_root = this.json, this.currSandbox._$_v = e;
|
|
@@ -1488,27 +1488,27 @@ H.prototype._eval = function(t, e, o, n, r, a) {
|
|
|
1488
1488
|
i && (this.currSandbox._$_path = H.toPathString(n.concat([o])));
|
|
1489
1489
|
const c = this.currEval + "Script:" + t;
|
|
1490
1490
|
if (!H.cache[c]) {
|
|
1491
|
-
let
|
|
1492
|
-
if (i && (
|
|
1493
|
-
H.cache[c] = new this.safeVm.Script(
|
|
1491
|
+
let p = t.replaceAll("@parentProperty", "_$_parentProperty").replaceAll("@parent", "_$_parent").replaceAll("@property", "_$_property").replaceAll("@root", "_$_root").replaceAll(/@([.\s)[])/gu, "_$_v$1");
|
|
1492
|
+
if (i && (p = p.replaceAll("@path", "_$_path")), this.currEval === "safe" || this.currEval === !0 || this.currEval === void 0)
|
|
1493
|
+
H.cache[c] = new this.safeVm.Script(p);
|
|
1494
1494
|
else if (this.currEval === "native")
|
|
1495
|
-
H.cache[c] = new this.vm.Script(
|
|
1495
|
+
H.cache[c] = new this.vm.Script(p);
|
|
1496
1496
|
else if (typeof this.currEval == "function" && this.currEval.prototype && Object.hasOwn(this.currEval.prototype, "runInNewContext")) {
|
|
1497
1497
|
const h = this.currEval;
|
|
1498
|
-
H.cache[c] = new h(
|
|
1498
|
+
H.cache[c] = new h(p);
|
|
1499
1499
|
} else if (typeof this.currEval == "function")
|
|
1500
1500
|
H.cache[c] = {
|
|
1501
|
-
runInNewContext: (h) => this.currEval(
|
|
1501
|
+
runInNewContext: (h) => this.currEval(p, h)
|
|
1502
1502
|
};
|
|
1503
1503
|
else
|
|
1504
1504
|
throw new TypeError(`Unknown "eval" property "${this.currEval}"`);
|
|
1505
1505
|
}
|
|
1506
1506
|
try {
|
|
1507
1507
|
return H.cache[c].runInNewContext(this.currSandbox);
|
|
1508
|
-
} catch (
|
|
1508
|
+
} catch (p) {
|
|
1509
1509
|
if (this.ignoreEvalErrors)
|
|
1510
1510
|
return !1;
|
|
1511
|
-
throw new Error("jsonPath: " +
|
|
1511
|
+
throw new Error("jsonPath: " + p.message + ": " + t);
|
|
1512
1512
|
}
|
|
1513
1513
|
};
|
|
1514
1514
|
H.cache = {};
|
|
@@ -1571,25 +1571,25 @@ class po {
|
|
|
1571
1571
|
const n = Object.keys(e), r = [];
|
|
1572
1572
|
uo(n, r, (h) => typeof e[h] == "function");
|
|
1573
1573
|
const a = n.map((h) => e[h]);
|
|
1574
|
-
o = r.reduce((h,
|
|
1575
|
-
let v = e[
|
|
1576
|
-
return /function/u.test(v) || (v = "function " + v), "var " +
|
|
1574
|
+
o = r.reduce((h, S) => {
|
|
1575
|
+
let v = e[S].toString();
|
|
1576
|
+
return /function/u.test(v) || (v = "function " + v), "var " + S + "=" + v + ";" + h;
|
|
1577
1577
|
}, "") + o, !/(['"])use strict\1/u.test(o) && !n.includes("arguments") && (o = "var arguments = undefined;" + o), o = o.replace(/;\s*$/u, "");
|
|
1578
|
-
const c = o.lastIndexOf(";"),
|
|
1579
|
-
return new Function(...n,
|
|
1578
|
+
const c = o.lastIndexOf(";"), p = c !== -1 ? o.slice(0, c + 1) + " return " + o.slice(c + 1) : " return " + o;
|
|
1579
|
+
return new Function(...n, p)(...a);
|
|
1580
1580
|
}
|
|
1581
1581
|
}
|
|
1582
1582
|
H.prototype.vm = {
|
|
1583
1583
|
Script: po
|
|
1584
1584
|
};
|
|
1585
|
-
const
|
|
1585
|
+
const Se = (t) => Object.prototype.toString.call(t).slice(8, -1).toLowerCase(), Ft = (t) => (mo(t), t.map((e, o) => ({
|
|
1586
1586
|
...e,
|
|
1587
1587
|
props: e.props ?? {},
|
|
1588
1588
|
visible: e.visible ?? !0,
|
|
1589
1589
|
_order: o,
|
|
1590
1590
|
_defaultValue: e.value
|
|
1591
1591
|
}))), Bt = (t) => (ho(t), t.map((e, o) => {
|
|
1592
|
-
const { content: n, width: r = 120, visible: a = !0, resizable: i = !0, ellipsis: c = !0, component:
|
|
1592
|
+
const { content: n, width: r = 120, visible: a = !0, resizable: i = !0, ellipsis: c = !0, component: p } = e;
|
|
1593
1593
|
return {
|
|
1594
1594
|
...e,
|
|
1595
1595
|
dataIndex: typeof n == "string" ? n : void 0,
|
|
@@ -1597,10 +1597,10 @@ const we = (t) => Object.prototype.toString.call(t).slice(8, -1).toLowerCase(),
|
|
|
1597
1597
|
visible: a,
|
|
1598
1598
|
resizable: i,
|
|
1599
1599
|
ellipsis: c,
|
|
1600
|
-
component:
|
|
1600
|
+
component: p ? G(p) : void 0,
|
|
1601
1601
|
index: o
|
|
1602
1602
|
};
|
|
1603
|
-
})),
|
|
1603
|
+
})), fo = (t, e, o) => t.sort((n, r) => o.indexOf(n.code) - o.indexOf(r.code)).map((n) => {
|
|
1604
1604
|
const r = go(n.value ?? "", null);
|
|
1605
1605
|
if (r)
|
|
1606
1606
|
return {
|
|
@@ -1618,17 +1618,17 @@ const we = (t) => Object.prototype.toString.call(t).slice(8, -1).toLowerCase(),
|
|
|
1618
1618
|
}).filter(Boolean)
|
|
1619
1619
|
};
|
|
1620
1620
|
}).filter(Boolean);
|
|
1621
|
-
function
|
|
1621
|
+
function Oe(...t) {
|
|
1622
1622
|
console.log("%c[pro-table]:", "color: #f00; padding: 2px 4px; font-weight: bold; font-size: 14px;", ...t);
|
|
1623
1623
|
}
|
|
1624
|
-
const
|
|
1624
|
+
const mo = (t) => {
|
|
1625
1625
|
t.forEach((e) => {
|
|
1626
1626
|
new Ht({
|
|
1627
1627
|
type: [
|
|
1628
1628
|
{ required: !0 },
|
|
1629
1629
|
{
|
|
1630
1630
|
validator(n, r, a) {
|
|
1631
|
-
return ["string", "function"].includes(
|
|
1631
|
+
return ["string", "function"].includes(Se(r)) ? a() : a(new Error("type must be string or function"));
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
1634
|
],
|
|
@@ -1636,7 +1636,7 @@ const fo = (t) => {
|
|
|
1636
1636
|
label: [{ required: !0 }, { type: "string" }],
|
|
1637
1637
|
tooltip: {
|
|
1638
1638
|
validator(n, r, a) {
|
|
1639
|
-
return r !== void 0 && !["string", "number"].includes(
|
|
1639
|
+
return r !== void 0 && !["string", "number"].includes(Se(r)) ? a(new Error("tooltip must be string or number")) : a();
|
|
1640
1640
|
}
|
|
1641
1641
|
},
|
|
1642
1642
|
showLabel: {
|
|
@@ -1647,7 +1647,7 @@ const fo = (t) => {
|
|
|
1647
1647
|
required: e.type === "component"
|
|
1648
1648
|
},
|
|
1649
1649
|
props: {
|
|
1650
|
-
validator: (n, r, a) => r && !["object", "function"].includes(
|
|
1650
|
+
validator: (n, r, a) => r && !["object", "function"].includes(Se(r)) ? a(new Error("props must be object or function")) : a()
|
|
1651
1651
|
}
|
|
1652
1652
|
}).validate(e, (n) => {
|
|
1653
1653
|
n && console.error(`[pro-table]: defineFormItems error, [${n[0].message}]`, {
|
|
@@ -1663,24 +1663,24 @@ const fo = (t) => {
|
|
|
1663
1663
|
type: [
|
|
1664
1664
|
{
|
|
1665
1665
|
validator(n, r, a) {
|
|
1666
|
-
return r ? ["string", "function"].includes(
|
|
1666
|
+
return r ? ["string", "function"].includes(Se(r)) ? Se(r) === "string" && !Object.keys(Q).includes(r) ? a(new Error(`type must be one of ${Object.keys(Q).join(", ")}`)) : a() : a(new Error("type must be string or function")) : a();
|
|
1667
1667
|
}
|
|
1668
1668
|
}
|
|
1669
1669
|
],
|
|
1670
1670
|
title: [{ required: !0 }, { type: "string" }],
|
|
1671
1671
|
titleTooltip: {
|
|
1672
1672
|
validator(n, r, a) {
|
|
1673
|
-
return r && !["string", "function"].includes(
|
|
1673
|
+
return r && !["string", "function"].includes(Se(r)) ? a(new Error("titleTooltip must be string or function")) : a();
|
|
1674
1674
|
}
|
|
1675
1675
|
},
|
|
1676
1676
|
content: {
|
|
1677
1677
|
validator(n, r, a) {
|
|
1678
|
-
return r && !["string", "function"].includes(
|
|
1678
|
+
return r && !["string", "function"].includes(Se(r)) ? a(new Error("content must be string or function")) : a();
|
|
1679
1679
|
}
|
|
1680
1680
|
},
|
|
1681
1681
|
tooltip: {
|
|
1682
1682
|
validator(n, r, a) {
|
|
1683
|
-
return r && !["string", "boolean", "function"].includes(
|
|
1683
|
+
return r && !["string", "boolean", "function"].includes(Se(r)) ? a(new Error("tooltip must be string, boolean, or function")) : a();
|
|
1684
1684
|
}
|
|
1685
1685
|
},
|
|
1686
1686
|
component: {
|
|
@@ -1690,7 +1690,7 @@ const fo = (t) => {
|
|
|
1690
1690
|
ellipsis: { type: "boolean" },
|
|
1691
1691
|
props: {
|
|
1692
1692
|
validator(n, r, a) {
|
|
1693
|
-
return r && !["object", "function"].includes(
|
|
1693
|
+
return r && !["object", "function"].includes(Se(r)) ? a(new Error("props must be object or function")) : a();
|
|
1694
1694
|
}
|
|
1695
1695
|
}
|
|
1696
1696
|
}).validate(e, (n) => {
|
|
@@ -1705,8 +1705,8 @@ const fo = (t) => {
|
|
|
1705
1705
|
const n = document.createElement("canvas").getContext("2d");
|
|
1706
1706
|
return n ? (n.font = [
|
|
1707
1707
|
400,
|
|
1708
|
-
`${
|
|
1709
|
-
|
|
1708
|
+
`${se.fontSize}px`,
|
|
1709
|
+
se.fontFamily
|
|
1710
1710
|
].join(" "), Math.ceil(n.measureText(t).width)) : 0;
|
|
1711
1711
|
}, go = (t, e) => {
|
|
1712
1712
|
if (t === "" || t === null)
|
|
@@ -1714,7 +1714,7 @@ const fo = (t) => {
|
|
|
1714
1714
|
try {
|
|
1715
1715
|
return JSON.parse(t);
|
|
1716
1716
|
} catch (o) {
|
|
1717
|
-
return
|
|
1717
|
+
return Oe(`[pro-table]: parseJsonSafe error, ${o}`, {
|
|
1718
1718
|
jsonString: t,
|
|
1719
1719
|
defaultVal: e
|
|
1720
1720
|
}), e;
|
|
@@ -1727,7 +1727,7 @@ const fo = (t) => {
|
|
|
1727
1727
|
}, Gt = (t) => {
|
|
1728
1728
|
const e = bo(t);
|
|
1729
1729
|
return Yn(e, "1b671a64-40d5-491e-99b0-da01ff1f3341").replace(/-/g, "");
|
|
1730
|
-
}, vo = /* @__PURE__ */
|
|
1730
|
+
}, vo = /* @__PURE__ */ he({
|
|
1731
1731
|
__name: "EllipsisElement",
|
|
1732
1732
|
props: {
|
|
1733
1733
|
/**
|
|
@@ -1794,20 +1794,20 @@ const fo = (t) => {
|
|
|
1794
1794
|
}
|
|
1795
1795
|
},
|
|
1796
1796
|
setup(t) {
|
|
1797
|
-
const e = t, o =
|
|
1797
|
+
const e = t, o = O(() => e.list.map((c) => Se(c) === "object" ? c : { label: c }).map((c, p) => ({ ...c, index: p, __key: c.key ?? `${p}-${String(c.label)}` }))), n = O(() => Ot(o.value, 0, e.maxCount)), r = O(
|
|
1798
1798
|
() => Ot(o.value, e.maxCount, o.value.length)
|
|
1799
|
-
), a =
|
|
1799
|
+
), a = O(() => r.value.map(({ index: c, disabled: p, label: h, onClick: S }) => ({
|
|
1800
1800
|
key: c + e.maxCount,
|
|
1801
1801
|
label: h,
|
|
1802
|
-
disabled:
|
|
1803
|
-
onClick: () =>
|
|
1804
|
-
}))), i =
|
|
1805
|
-
const c = {}, { maxCount:
|
|
1806
|
-
return
|
|
1802
|
+
disabled: p,
|
|
1803
|
+
onClick: () => S == null ? void 0 : S(e.record)
|
|
1804
|
+
}))), i = O(() => {
|
|
1805
|
+
const c = {}, { maxCount: p, cellWidth: h, type: S } = e;
|
|
1806
|
+
return S === Q.text && (c.flex = 1), S === Q.link && n.value.length > 1 && (c.maxWidth = `${((h - 50) / h / p * 100).toFixed(2)}%`), c;
|
|
1807
1807
|
});
|
|
1808
|
-
return (c,
|
|
1809
|
-
const h =
|
|
1810
|
-
return
|
|
1808
|
+
return (c, p) => {
|
|
1809
|
+
const h = T("a-tag"), S = T("a-popover"), v = T("a-button"), f = T("a-menu"), y = T("a-dropdown");
|
|
1810
|
+
return w(), Y("div", {
|
|
1811
1811
|
class: b([
|
|
1812
1812
|
c.$style.ellipsisElement,
|
|
1813
1813
|
{
|
|
@@ -1815,18 +1815,18 @@ const fo = (t) => {
|
|
|
1815
1815
|
}
|
|
1816
1816
|
])
|
|
1817
1817
|
}, [
|
|
1818
|
-
(
|
|
1818
|
+
(w(!0), Y(Te, null, mt(n.value, (I, L) => (w(), Y("div", {
|
|
1819
1819
|
key: I.__key,
|
|
1820
1820
|
class: b(c.$style.elementItem),
|
|
1821
|
-
style:
|
|
1821
|
+
style: re(i.value)
|
|
1822
1822
|
}, [
|
|
1823
|
-
|
|
1823
|
+
ge(c.$slots, "default", {
|
|
1824
1824
|
item: I,
|
|
1825
|
-
index:
|
|
1825
|
+
index: L
|
|
1826
1826
|
})
|
|
1827
1827
|
], 6))), 128)),
|
|
1828
|
-
r.value.length ? (
|
|
1829
|
-
t.displayType === "popover" ? (
|
|
1828
|
+
r.value.length ? (w(), Y(Te, { key: 0 }, [
|
|
1829
|
+
t.displayType === "popover" ? (w(), U(S, {
|
|
1830
1830
|
key: 0,
|
|
1831
1831
|
trigger: t.trigger,
|
|
1832
1832
|
"overlay-style": { maxWidth: "500px" },
|
|
@@ -1836,10 +1836,10 @@ const fo = (t) => {
|
|
|
1836
1836
|
V("div", {
|
|
1837
1837
|
class: b(c.$style.ellipsisList)
|
|
1838
1838
|
}, [
|
|
1839
|
-
(
|
|
1839
|
+
(w(!0), Y(Te, null, mt(r.value, (I, L) => ge(c.$slots, "default", {
|
|
1840
1840
|
key: I.__key,
|
|
1841
1841
|
item: I,
|
|
1842
|
-
index:
|
|
1842
|
+
index: L + t.maxCount,
|
|
1843
1843
|
inPopover: !0
|
|
1844
1844
|
})), 128))
|
|
1845
1845
|
], 2)
|
|
@@ -1856,20 +1856,20 @@ const fo = (t) => {
|
|
|
1856
1856
|
])
|
|
1857
1857
|
}, {
|
|
1858
1858
|
default: C(() => [
|
|
1859
|
-
X(
|
|
1859
|
+
X(me(`+${r.value.length}...`), 1)
|
|
1860
1860
|
]),
|
|
1861
1861
|
_: 1
|
|
1862
1862
|
}, 8, ["class"])
|
|
1863
1863
|
]),
|
|
1864
1864
|
_: 3
|
|
1865
|
-
}, 8, ["trigger"])) :
|
|
1866
|
-
t.displayType === "dropdown" ? (
|
|
1865
|
+
}, 8, ["trigger"])) : R("", !0),
|
|
1866
|
+
t.displayType === "dropdown" ? (w(), U(y, {
|
|
1867
1867
|
key: 1,
|
|
1868
1868
|
"destroy-on-close": "",
|
|
1869
1869
|
trigger: t.trigger
|
|
1870
1870
|
}, {
|
|
1871
1871
|
overlay: C(() => [
|
|
1872
|
-
E(
|
|
1872
|
+
E(f, { items: a.value }, null, 8, ["items"])
|
|
1873
1873
|
]),
|
|
1874
1874
|
default: C(() => [
|
|
1875
1875
|
E(v, {
|
|
@@ -1877,34 +1877,34 @@ const fo = (t) => {
|
|
|
1877
1877
|
size: "small"
|
|
1878
1878
|
}, {
|
|
1879
1879
|
default: C(() => [
|
|
1880
|
-
|
|
1880
|
+
p[0] || (p[0] = X(" 更多 ")),
|
|
1881
1881
|
E(g(Ut))
|
|
1882
1882
|
]),
|
|
1883
1883
|
_: 1
|
|
1884
1884
|
})
|
|
1885
1885
|
]),
|
|
1886
1886
|
_: 1
|
|
1887
|
-
}, 8, ["trigger"])) :
|
|
1888
|
-
], 64)) :
|
|
1887
|
+
}, 8, ["trigger"])) : R("", !0)
|
|
1888
|
+
], 64)) : R("", !0)
|
|
1889
1889
|
], 2);
|
|
1890
1890
|
};
|
|
1891
1891
|
}
|
|
1892
|
-
}), Co = "_ellipsisElement_6fog1_1", _o = "_elementItem_6fog1_6", Eo = "_ellipsisElementHasGap_6fog1_10",
|
|
1892
|
+
}), Co = "_ellipsisElement_6fog1_1", _o = "_elementItem_6fog1_6", Eo = "_ellipsisElementHasGap_6fog1_10", So = "_flexWrap_6fog1_14", wo = "_ellipsisTag_6fog1_18", xo = "_imageEllipsisTag_6fog1_22", Io = "_ellipsisList_6fog1_29", $o = {
|
|
1893
1893
|
ellipsisElement: Co,
|
|
1894
1894
|
elementItem: _o,
|
|
1895
1895
|
ellipsisElementHasGap: Eo,
|
|
1896
|
-
flexWrap:
|
|
1897
|
-
ellipsisTag:
|
|
1896
|
+
flexWrap: So,
|
|
1897
|
+
ellipsisTag: wo,
|
|
1898
1898
|
imageEllipsisTag: xo,
|
|
1899
1899
|
ellipsisList: Io
|
|
1900
|
-
},
|
|
1900
|
+
}, _e = (t, e) => {
|
|
1901
1901
|
const o = t.__vccOpts || t;
|
|
1902
1902
|
for (const [n, r] of e)
|
|
1903
1903
|
o[n] = r;
|
|
1904
1904
|
return o;
|
|
1905
1905
|
}, ko = {
|
|
1906
1906
|
$style: $o
|
|
1907
|
-
}, Ao = /* @__PURE__ */
|
|
1907
|
+
}, Ao = /* @__PURE__ */ _e(vo, [["__cssModules", ko]]), Oo = { key: 1 }, To = /* @__PURE__ */ he({
|
|
1908
1908
|
__name: "TableCellContent",
|
|
1909
1909
|
props: {
|
|
1910
1910
|
/**
|
|
@@ -1944,59 +1944,59 @@ const fo = (t) => {
|
|
|
1944
1944
|
}
|
|
1945
1945
|
},
|
|
1946
1946
|
setup(t) {
|
|
1947
|
-
const e = t, o = /* @__PURE__ */ new Map(), n =
|
|
1948
|
-
const { index: y, record: I, column:
|
|
1949
|
-
return
|
|
1950
|
-
}), r =
|
|
1951
|
-
const { index: y, record: I, column:
|
|
1952
|
-
if (
|
|
1953
|
-
return
|
|
1954
|
-
if (typeof
|
|
1955
|
-
if (
|
|
1956
|
-
let B = o.get(
|
|
1957
|
-
B || (B = /* @__PURE__ */ new WeakMap(), o.set(
|
|
1958
|
-
const
|
|
1959
|
-
if (
|
|
1960
|
-
const
|
|
1961
|
-
return B.set(I,
|
|
1947
|
+
const e = t, o = /* @__PURE__ */ new Map(), n = O(() => {
|
|
1948
|
+
const { index: y, record: I, column: L } = e, A = (L == null ? void 0 : L.type) ?? Q.text;
|
|
1949
|
+
return ke(A) ? A(I, y) : A;
|
|
1950
|
+
}), r = O(() => {
|
|
1951
|
+
const { index: y, record: I, column: L } = e, A = L.content;
|
|
1952
|
+
if (ke(A))
|
|
1953
|
+
return A(I, y);
|
|
1954
|
+
if (typeof A == "string") {
|
|
1955
|
+
if (A.startsWith("$")) {
|
|
1956
|
+
let B = o.get(A);
|
|
1957
|
+
B || (B = /* @__PURE__ */ new WeakMap(), o.set(A, B));
|
|
1958
|
+
const z = B.get(I);
|
|
1959
|
+
if (z !== void 0) return z;
|
|
1960
|
+
const q = H({ path: A, json: I });
|
|
1961
|
+
return B.set(I, q), q;
|
|
1962
1962
|
}
|
|
1963
|
-
return Ze(I,
|
|
1963
|
+
return Ze(I, A, "");
|
|
1964
1964
|
}
|
|
1965
1965
|
return "";
|
|
1966
|
-
}), a =
|
|
1967
|
-
const { index: y, record: I, column:
|
|
1966
|
+
}), a = O(() => Fe(r.value)), i = O(() => {
|
|
1967
|
+
const { index: y, record: I, column: L } = e;
|
|
1968
1968
|
if (n.value === Q.component) {
|
|
1969
|
-
const { props:
|
|
1970
|
-
return
|
|
1971
|
-
...
|
|
1969
|
+
const { props: A = {} } = L;
|
|
1970
|
+
return ke(A) ? A(I, y) : {
|
|
1971
|
+
...A,
|
|
1972
1972
|
index: y,
|
|
1973
1973
|
record: I
|
|
1974
1974
|
};
|
|
1975
1975
|
}
|
|
1976
1976
|
return {};
|
|
1977
|
-
}), c =
|
|
1978
|
-
const { index: y, record: I, column:
|
|
1979
|
-
if (!
|
|
1980
|
-
if (
|
|
1981
|
-
return
|
|
1977
|
+
}), c = O(() => {
|
|
1978
|
+
const { index: y, record: I, column: L } = e, A = L.tooltip ?? [Q.text, Q.link].includes(n.value);
|
|
1979
|
+
if (!A) return "";
|
|
1980
|
+
if (ke(A))
|
|
1981
|
+
return A(I, y);
|
|
1982
1982
|
const B = a.value[0];
|
|
1983
1983
|
return (B == null ? void 0 : B.label) || B;
|
|
1984
|
-
}),
|
|
1984
|
+
}), p = O(() => !(["", void 0, null].includes(r.value) && ![Q.component, Q.sort].includes(n.value))), h = (y) => typeof y == "string" && /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(y), S = (y) => e.hasRouter && !h(y), v = (y) => S(y) ? "router-link" : "a", f = (y, I) => S(y) ? { to: y, target: I ?? "_blank" } : { href: y, target: I ?? "_blank" };
|
|
1985
1985
|
return (y, I) => {
|
|
1986
|
-
var
|
|
1987
|
-
const
|
|
1988
|
-
return
|
|
1986
|
+
var q;
|
|
1987
|
+
const L = T("a-button"), A = T("a-typography-text"), B = T("a-tag"), z = T("a-image");
|
|
1988
|
+
return p.value ? (w(), Y("div", {
|
|
1989
1989
|
key: 0,
|
|
1990
1990
|
class: b(y.$style.tableCellContent)
|
|
1991
1991
|
}, [
|
|
1992
|
-
n.value === g(Q).sort ? (
|
|
1992
|
+
n.value === g(Q).sort ? (w(), U(L, {
|
|
1993
1993
|
key: 0,
|
|
1994
1994
|
type: "text",
|
|
1995
1995
|
size: "small",
|
|
1996
|
-
icon: G(g(
|
|
1996
|
+
icon: G(g(Pe)),
|
|
1997
1997
|
class: b([y.$style.draggableIcon, "super-table-column-draggable-handle"])
|
|
1998
|
-
}, null, 8, ["icon", "class"])) :
|
|
1999
|
-
n.value === g(Q).component ? (
|
|
1998
|
+
}, null, 8, ["icon", "class"])) : R("", !0),
|
|
1999
|
+
n.value === g(Q).component ? (w(), U(Qe(t.column.component), ut(ue({ key: 1 }, i.value)), null, 16)) : jt([(q = t.column) == null ? void 0 : q.key, t.index, a.value], () => (w(), U(Ao, {
|
|
2000
2000
|
key: 2,
|
|
2001
2001
|
list: a.value,
|
|
2002
2002
|
"max-count": n.value === g(Q).text ? 1 : t.column.maxCount,
|
|
@@ -2005,68 +2005,68 @@ const fo = (t) => {
|
|
|
2005
2005
|
"cell-width": t.column.width,
|
|
2006
2006
|
"display-type": [g(Q).button].includes(n.value) ? "dropdown" : "popover"
|
|
2007
2007
|
}, {
|
|
2008
|
-
default: C(({ item:
|
|
2009
|
-
n.value === g(Q).text ? (
|
|
2010
|
-
|
|
2008
|
+
default: C(({ item: F, index: u, inPopover: P }) => [
|
|
2009
|
+
n.value === g(Q).text ? (w(), Y(Te, { key: 0 }, [
|
|
2010
|
+
u === 0 ? (w(), U(A, {
|
|
2011
2011
|
key: 0,
|
|
2012
2012
|
ellipsis: { tooltip: c.value },
|
|
2013
|
-
content: String(
|
|
2013
|
+
content: String(F.label),
|
|
2014
2014
|
class: b(y.$style.antTypographyEllipsis)
|
|
2015
|
-
}, null, 8, ["ellipsis", "content", "class"])) : (
|
|
2015
|
+
}, null, 8, ["ellipsis", "content", "class"])) : (w(), Y("div", {
|
|
2016
2016
|
key: 1,
|
|
2017
2017
|
class: b(y.$style.textListItem)
|
|
2018
|
-
},
|
|
2019
|
-
], 64)) :
|
|
2020
|
-
n.value === g(Q).link ? (
|
|
2018
|
+
}, me(F.label), 3))
|
|
2019
|
+
], 64)) : R("", !0),
|
|
2020
|
+
n.value === g(Q).link ? (w(), U(Qe(v(F.to)), ut(ue({ key: 1 }, f(F.to, F.target))), {
|
|
2021
2021
|
default: C(() => [
|
|
2022
|
-
t.column.ellipsis ? (
|
|
2022
|
+
t.column.ellipsis ? (w(), U(A, {
|
|
2023
2023
|
key: 0,
|
|
2024
|
-
ellipsis: { tooltip:
|
|
2025
|
-
content: String(
|
|
2026
|
-
style:
|
|
2024
|
+
ellipsis: { tooltip: F.label },
|
|
2025
|
+
content: String(F.label),
|
|
2026
|
+
style: re({ color: g(se).colorPrimary }),
|
|
2027
2027
|
class: b(y.$style.antTypographyEllipsis)
|
|
2028
|
-
}, null, 8, ["ellipsis", "content", "style", "class"])) : (
|
|
2028
|
+
}, null, 8, ["ellipsis", "content", "style", "class"])) : (w(), Y("span", Oo, me(F.label), 1))
|
|
2029
2029
|
]),
|
|
2030
2030
|
_: 2
|
|
2031
|
-
}, 1040)) :
|
|
2032
|
-
n.value === g(Q).tag ? (
|
|
2031
|
+
}, 1040)) : R("", !0),
|
|
2032
|
+
n.value === g(Q).tag ? (w(), U(B, ut(ue({ key: 2 }, F)), {
|
|
2033
2033
|
default: C(() => [
|
|
2034
|
-
X(
|
|
2034
|
+
X(me(F.label), 1)
|
|
2035
2035
|
]),
|
|
2036
2036
|
_: 2
|
|
2037
|
-
}, 1040)) :
|
|
2038
|
-
n.value === g(Q).button ? (
|
|
2037
|
+
}, 1040)) : R("", !0),
|
|
2038
|
+
n.value === g(Q).button ? (w(), U(L, ue({
|
|
2039
2039
|
key: 3,
|
|
2040
2040
|
type: "link",
|
|
2041
2041
|
size: "small",
|
|
2042
|
-
disabled:
|
|
2043
|
-
},
|
|
2042
|
+
disabled: F.disabled
|
|
2043
|
+
}, F.buttonProps, {
|
|
2044
2044
|
onClick: (D) => {
|
|
2045
|
-
var
|
|
2046
|
-
return (
|
|
2045
|
+
var oe;
|
|
2046
|
+
return (oe = F.onClick) == null ? void 0 : oe.call(F, t.record, t.index);
|
|
2047
2047
|
}
|
|
2048
2048
|
}), {
|
|
2049
2049
|
default: C(() => [
|
|
2050
|
-
X(
|
|
2050
|
+
X(me(F.label), 1)
|
|
2051
2051
|
]),
|
|
2052
2052
|
_: 2
|
|
2053
|
-
}, 1040, ["disabled", "onClick"])) :
|
|
2054
|
-
n.value === g(Q).image ? (
|
|
2053
|
+
}, 1040, ["disabled", "onClick"])) : R("", !0),
|
|
2054
|
+
n.value === g(Q).image ? (w(), U(z, {
|
|
2055
2055
|
key: 4,
|
|
2056
|
-
width:
|
|
2057
|
-
height:
|
|
2058
|
-
src:
|
|
2056
|
+
width: P ? 100 : 32,
|
|
2057
|
+
height: P ? 100 : 32,
|
|
2058
|
+
src: F.label,
|
|
2059
2059
|
style: { objectFit: "cover" }
|
|
2060
2060
|
}, {
|
|
2061
2061
|
previewMask: C(() => [
|
|
2062
2062
|
E(g(Pn))
|
|
2063
2063
|
]),
|
|
2064
2064
|
_: 2
|
|
2065
|
-
}, 1032, ["width", "height", "src"])) :
|
|
2065
|
+
}, 1032, ["width", "height", "src"])) : R("", !0)
|
|
2066
2066
|
]),
|
|
2067
2067
|
_: 1
|
|
2068
2068
|
}, 8, ["list", "max-count", "record", "type", "cell-width", "display-type"])), I, 0)
|
|
2069
|
-
], 2)) :
|
|
2069
|
+
], 2)) : R("", !0);
|
|
2070
2070
|
};
|
|
2071
2071
|
}
|
|
2072
2072
|
}), Po = "_tableCellContent_1chn7_1", Lo = "_antTypographyEllipsis_1chn7_1", Fo = "_draggableIcon_1chn7_4", Bo = "_textListItem_1chn7_8", Do = {
|
|
@@ -2076,7 +2076,7 @@ const fo = (t) => {
|
|
|
2076
2076
|
textListItem: Bo
|
|
2077
2077
|
}, Mo = {
|
|
2078
2078
|
$style: Do
|
|
2079
|
-
}, Ro = /* @__PURE__ */
|
|
2079
|
+
}, Ro = /* @__PURE__ */ _e(To, [["__cssModules", Mo]]), No = he({
|
|
2080
2080
|
name: "VNodes",
|
|
2081
2081
|
props: {
|
|
2082
2082
|
vnodes: {
|
|
@@ -2087,7 +2087,7 @@ const fo = (t) => {
|
|
|
2087
2087
|
render() {
|
|
2088
2088
|
return this.vnodes;
|
|
2089
2089
|
}
|
|
2090
|
-
}), jo = /* @__PURE__ */
|
|
2090
|
+
}), jo = /* @__PURE__ */ he({
|
|
2091
2091
|
__name: "TableConfig",
|
|
2092
2092
|
props: {
|
|
2093
2093
|
/**
|
|
@@ -2102,59 +2102,59 @@ const fo = (t) => {
|
|
|
2102
2102
|
},
|
|
2103
2103
|
emits: ["change"],
|
|
2104
2104
|
setup(t, { emit: e }) {
|
|
2105
|
-
const o =
|
|
2106
|
-
i.value = a.value.filter((
|
|
2105
|
+
const o = le(!1), n = t, r = e, a = le([]), i = le([]), c = le([]), p = le([]), h = le(""), S = le(""), v = () => {
|
|
2106
|
+
i.value = a.value.filter((u) => u.fixed === "left"), c.value = a.value.filter((u) => !u.fixed), p.value = a.value.filter((u) => u.fixed === "right");
|
|
2107
2107
|
};
|
|
2108
2108
|
xt(() => {
|
|
2109
2109
|
a.value = n.columns, v();
|
|
2110
2110
|
});
|
|
2111
|
-
const
|
|
2111
|
+
const f = ({ title: u }) => {
|
|
2112
2112
|
var D;
|
|
2113
|
-
const
|
|
2114
|
-
return
|
|
2115
|
-
}, y =
|
|
2116
|
-
|
|
2117
|
-
}, 300),
|
|
2113
|
+
const P = (D = S.value) == null ? void 0 : D.trim();
|
|
2114
|
+
return P ? u.toLocaleLowerCase().includes(P.toLocaleLowerCase()) : !0;
|
|
2115
|
+
}, y = O(() => a.value.every((u) => !f(u))), I = vt((u) => {
|
|
2116
|
+
S.value = u.target.value;
|
|
2117
|
+
}, 300), L = () => {
|
|
2118
2118
|
a.value = [
|
|
2119
2119
|
...i.value,
|
|
2120
2120
|
...c.value,
|
|
2121
|
-
...
|
|
2121
|
+
...p.value
|
|
2122
2122
|
];
|
|
2123
|
-
},
|
|
2124
|
-
|
|
2123
|
+
}, A = () => {
|
|
2124
|
+
L(), r(
|
|
2125
2125
|
"change",
|
|
2126
|
-
a.value.map((
|
|
2126
|
+
a.value.map((u) => Ae(u, gt))
|
|
2127
2127
|
);
|
|
2128
|
-
}, B =
|
|
2128
|
+
}, B = O({
|
|
2129
2129
|
get() {
|
|
2130
|
-
return a.value.every((
|
|
2130
|
+
return a.value.every((u) => u.visible);
|
|
2131
2131
|
},
|
|
2132
|
-
set(
|
|
2133
|
-
a.value.forEach((
|
|
2134
|
-
|
|
2135
|
-
}),
|
|
2132
|
+
set(u) {
|
|
2133
|
+
a.value.forEach((P) => {
|
|
2134
|
+
P.visible = u;
|
|
2135
|
+
}), A();
|
|
2136
2136
|
}
|
|
2137
|
-
}),
|
|
2138
|
-
const
|
|
2139
|
-
return
|
|
2140
|
-
}),
|
|
2137
|
+
}), z = O(() => {
|
|
2138
|
+
const u = a.value.filter((P) => P.visible).length;
|
|
2139
|
+
return u > 0 && u < a.value.length;
|
|
2140
|
+
}), q = () => {
|
|
2141
2141
|
r("change", []);
|
|
2142
|
-
},
|
|
2143
|
-
|
|
2142
|
+
}, F = (u, P) => {
|
|
2143
|
+
u.fixed = P, v(), L(), A();
|
|
2144
2144
|
};
|
|
2145
2145
|
return xt(() => {
|
|
2146
|
-
o.value || (h.value = "",
|
|
2147
|
-
}), (
|
|
2148
|
-
const D =
|
|
2149
|
-
return
|
|
2146
|
+
o.value || (h.value = "", S.value = "");
|
|
2147
|
+
}), (u, P) => {
|
|
2148
|
+
const D = T("a-button"), oe = T("a-checkbox"), xe = T("a-input"), Ee = T("a-typography-text"), te = T("a-tooltip"), ye = T("a-popover"), Be = T("a-config-provider");
|
|
2149
|
+
return w(), U(Be, { theme: {
|
|
2150
2150
|
token: {
|
|
2151
2151
|
borderRadius: 2
|
|
2152
2152
|
}
|
|
2153
2153
|
} }, {
|
|
2154
2154
|
default: C(() => [
|
|
2155
|
-
E(
|
|
2155
|
+
E(ye, {
|
|
2156
2156
|
open: o.value,
|
|
2157
|
-
"onUpdate:open":
|
|
2157
|
+
"onUpdate:open": P[2] || (P[2] = (M) => o.value = M),
|
|
2158
2158
|
placement: "bottomRight",
|
|
2159
2159
|
trigger: "click",
|
|
2160
2160
|
"overlay-inner-style": { padding: 0 },
|
|
@@ -2162,17 +2162,17 @@ const fo = (t) => {
|
|
|
2162
2162
|
}, {
|
|
2163
2163
|
content: C(() => [
|
|
2164
2164
|
V("div", {
|
|
2165
|
-
class: b(
|
|
2165
|
+
class: b(u.$style.tableConfig)
|
|
2166
2166
|
}, [
|
|
2167
2167
|
V("div", {
|
|
2168
|
-
class: b(
|
|
2168
|
+
class: b(u.$style.tableConfigActions)
|
|
2169
2169
|
}, [
|
|
2170
|
-
E(
|
|
2170
|
+
E(oe, {
|
|
2171
2171
|
checked: B.value,
|
|
2172
|
-
"onUpdate:checked":
|
|
2173
|
-
indeterminate:
|
|
2172
|
+
"onUpdate:checked": P[0] || (P[0] = (M) => B.value = M),
|
|
2173
|
+
indeterminate: z.value
|
|
2174
2174
|
}, {
|
|
2175
|
-
default: C(() =>
|
|
2175
|
+
default: C(() => P[3] || (P[3] = [
|
|
2176
2176
|
X(" 全选 ")
|
|
2177
2177
|
])),
|
|
2178
2178
|
_: 1
|
|
@@ -2180,254 +2180,254 @@ const fo = (t) => {
|
|
|
2180
2180
|
E(D, {
|
|
2181
2181
|
type: "link",
|
|
2182
2182
|
size: "small",
|
|
2183
|
-
onClick:
|
|
2183
|
+
onClick: q
|
|
2184
2184
|
}, {
|
|
2185
|
-
default: C(() =>
|
|
2185
|
+
default: C(() => P[4] || (P[4] = [
|
|
2186
2186
|
X(" 重置 ")
|
|
2187
2187
|
])),
|
|
2188
2188
|
_: 1
|
|
2189
2189
|
})
|
|
2190
2190
|
], 2),
|
|
2191
2191
|
V("div", {
|
|
2192
|
-
class: b(
|
|
2192
|
+
class: b(u.$style.tableConfigHead)
|
|
2193
2193
|
}, [
|
|
2194
|
-
E(
|
|
2194
|
+
E(xe, {
|
|
2195
2195
|
value: h.value,
|
|
2196
|
-
"onUpdate:value":
|
|
2196
|
+
"onUpdate:value": P[1] || (P[1] = (M) => h.value = M),
|
|
2197
2197
|
placeholder: "搜索标题",
|
|
2198
2198
|
onChange: g(I)
|
|
2199
2199
|
}, null, 8, ["value", "onChange"])
|
|
2200
2200
|
], 2),
|
|
2201
2201
|
V("div", {
|
|
2202
|
-
class: b(
|
|
2202
|
+
class: b(u.$style.tableConfigContent)
|
|
2203
2203
|
}, [
|
|
2204
|
-
i.value.some((
|
|
2204
|
+
i.value.some((M) => f(M)) ? (w(), Y("div", {
|
|
2205
2205
|
key: 0,
|
|
2206
|
-
class: b(
|
|
2206
|
+
class: b(u.$style.columnGroup)
|
|
2207
2207
|
}, [
|
|
2208
2208
|
V("div", {
|
|
2209
|
-
class: b(
|
|
2209
|
+
class: b(u.$style.groupTitle)
|
|
2210
2210
|
}, "固定在左侧", 2),
|
|
2211
2211
|
E(g(Ne), {
|
|
2212
2212
|
list: i.value,
|
|
2213
2213
|
"item-key": "key",
|
|
2214
|
-
class: b(
|
|
2214
|
+
class: b(u.$style.columnList),
|
|
2215
2215
|
handle: ".table-column-draggable-handle",
|
|
2216
2216
|
disabled: i.value.length <= 1,
|
|
2217
|
-
onEnd:
|
|
2217
|
+
onEnd: A
|
|
2218
2218
|
}, {
|
|
2219
|
-
item: C(({ element:
|
|
2220
|
-
|
|
2219
|
+
item: C(({ element: M }) => [
|
|
2220
|
+
f(M) ? (w(), Y("div", {
|
|
2221
2221
|
key: 0,
|
|
2222
|
-
class: b(
|
|
2223
|
-
style:
|
|
2222
|
+
class: b(u.$style.columnItem),
|
|
2223
|
+
style: re({ background: g(se).colorBgContainer })
|
|
2224
2224
|
}, [
|
|
2225
2225
|
E(D, {
|
|
2226
2226
|
type: "text",
|
|
2227
2227
|
size: "small",
|
|
2228
|
-
icon: G(g(
|
|
2229
|
-
style:
|
|
2230
|
-
class: b(["table-column-draggable-handle",
|
|
2228
|
+
icon: G(g(Pe)),
|
|
2229
|
+
style: re({ color: g(se).colorTextQuaternary }),
|
|
2230
|
+
class: b(["table-column-draggable-handle", u.$style.dragIcon])
|
|
2231
2231
|
}, null, 8, ["icon", "style", "class"]),
|
|
2232
|
-
E(
|
|
2233
|
-
checked:
|
|
2234
|
-
"onUpdate:checked": (
|
|
2235
|
-
onChange:
|
|
2232
|
+
E(oe, {
|
|
2233
|
+
checked: M.visible,
|
|
2234
|
+
"onUpdate:checked": (ae) => M.visible = ae,
|
|
2235
|
+
onChange: A
|
|
2236
2236
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
2237
|
-
E(
|
|
2238
|
-
ellipsis: { tooltip:
|
|
2239
|
-
content:
|
|
2240
|
-
class: b([
|
|
2237
|
+
E(Ee, {
|
|
2238
|
+
ellipsis: { tooltip: M.title },
|
|
2239
|
+
content: M.title,
|
|
2240
|
+
class: b([u.$style.columnItemContent, u.$style.dragHandle, "table-column-draggable-handle"]),
|
|
2241
2241
|
onClick: () => {
|
|
2242
|
-
|
|
2242
|
+
M.visible = !M.visible, A();
|
|
2243
2243
|
}
|
|
2244
2244
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
2245
2245
|
V("div", {
|
|
2246
|
-
class: b(
|
|
2246
|
+
class: b(u.$style.fixedActions)
|
|
2247
2247
|
}, [
|
|
2248
|
-
E(
|
|
2248
|
+
E(te, { title: "固定在右侧" }, {
|
|
2249
2249
|
default: C(() => [
|
|
2250
2250
|
E(D, {
|
|
2251
2251
|
type: "text",
|
|
2252
2252
|
size: "small",
|
|
2253
2253
|
icon: G(g(It)),
|
|
2254
|
-
style:
|
|
2255
|
-
onClick: (
|
|
2254
|
+
style: re({ color: g(se).colorTextQuaternary }),
|
|
2255
|
+
onClick: (ae) => F(M, "right")
|
|
2256
2256
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2257
2257
|
]),
|
|
2258
2258
|
_: 2
|
|
2259
2259
|
}, 1024),
|
|
2260
|
-
E(
|
|
2260
|
+
E(te, { title: "取消固定" }, {
|
|
2261
2261
|
default: C(() => [
|
|
2262
2262
|
E(D, {
|
|
2263
2263
|
type: "text",
|
|
2264
2264
|
size: "small",
|
|
2265
2265
|
icon: G(g($t)),
|
|
2266
|
-
style:
|
|
2267
|
-
onClick: (
|
|
2266
|
+
style: re({ color: g(se).colorPrimary }),
|
|
2267
|
+
onClick: (ae) => F(M, !1)
|
|
2268
2268
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2269
2269
|
]),
|
|
2270
2270
|
_: 2
|
|
2271
2271
|
}, 1024)
|
|
2272
2272
|
], 2)
|
|
2273
|
-
], 6)) :
|
|
2273
|
+
], 6)) : R("", !0)
|
|
2274
2274
|
]),
|
|
2275
2275
|
_: 1
|
|
2276
2276
|
}, 8, ["list", "class", "disabled"])
|
|
2277
|
-
], 2)) :
|
|
2278
|
-
c.value.some((
|
|
2277
|
+
], 2)) : R("", !0),
|
|
2278
|
+
c.value.some((M) => f(M)) ? (w(), Y("div", {
|
|
2279
2279
|
key: 1,
|
|
2280
|
-
class: b(
|
|
2280
|
+
class: b(u.$style.columnGroup)
|
|
2281
2281
|
}, [
|
|
2282
2282
|
V("div", {
|
|
2283
|
-
class: b(
|
|
2283
|
+
class: b(u.$style.groupTitle)
|
|
2284
2284
|
}, "不固定", 2),
|
|
2285
2285
|
E(g(Ne), {
|
|
2286
2286
|
list: c.value,
|
|
2287
2287
|
"item-key": "key",
|
|
2288
|
-
class: b(
|
|
2288
|
+
class: b(u.$style.columnList),
|
|
2289
2289
|
handle: ".table-column-draggable-handle",
|
|
2290
2290
|
disabled: c.value.length <= 1,
|
|
2291
|
-
onEnd:
|
|
2291
|
+
onEnd: A
|
|
2292
2292
|
}, {
|
|
2293
|
-
item: C(({ element:
|
|
2294
|
-
|
|
2293
|
+
item: C(({ element: M }) => [
|
|
2294
|
+
f(M) ? (w(), Y("div", {
|
|
2295
2295
|
key: 0,
|
|
2296
|
-
class: b(
|
|
2297
|
-
style:
|
|
2296
|
+
class: b(u.$style.columnItem),
|
|
2297
|
+
style: re({ background: g(se).colorBgContainer })
|
|
2298
2298
|
}, [
|
|
2299
2299
|
E(D, {
|
|
2300
2300
|
type: "text",
|
|
2301
2301
|
size: "small",
|
|
2302
|
-
icon: G(g(
|
|
2303
|
-
style:
|
|
2304
|
-
class: b(["table-column-draggable-handle",
|
|
2302
|
+
icon: G(g(Pe)),
|
|
2303
|
+
style: re({ color: g(se).colorTextQuaternary }),
|
|
2304
|
+
class: b(["table-column-draggable-handle", u.$style.dragIcon])
|
|
2305
2305
|
}, null, 8, ["icon", "style", "class"]),
|
|
2306
|
-
E(
|
|
2307
|
-
checked:
|
|
2308
|
-
"onUpdate:checked": (
|
|
2309
|
-
onChange:
|
|
2306
|
+
E(oe, {
|
|
2307
|
+
checked: M.visible,
|
|
2308
|
+
"onUpdate:checked": (ae) => M.visible = ae,
|
|
2309
|
+
onChange: A
|
|
2310
2310
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
2311
|
-
E(
|
|
2312
|
-
ellipsis: { tooltip:
|
|
2313
|
-
content:
|
|
2314
|
-
class: b([
|
|
2311
|
+
E(Ee, {
|
|
2312
|
+
ellipsis: { tooltip: M.title },
|
|
2313
|
+
content: M.title,
|
|
2314
|
+
class: b([u.$style.columnItemContent, u.$style.dragHandle, "table-column-draggable-handle"]),
|
|
2315
2315
|
onClick: () => {
|
|
2316
|
-
|
|
2316
|
+
M.visible = !M.visible, A();
|
|
2317
2317
|
}
|
|
2318
2318
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
2319
2319
|
V("div", {
|
|
2320
|
-
class: b(
|
|
2320
|
+
class: b(u.$style.fixedActions)
|
|
2321
2321
|
}, [
|
|
2322
|
-
E(
|
|
2322
|
+
E(te, { title: "固定在左侧" }, {
|
|
2323
2323
|
default: C(() => [
|
|
2324
2324
|
E(D, {
|
|
2325
2325
|
type: "text",
|
|
2326
2326
|
size: "small",
|
|
2327
2327
|
icon: G(g(kt)),
|
|
2328
|
-
style:
|
|
2329
|
-
onClick: (
|
|
2328
|
+
style: re({ color: g(se).colorTextQuaternary }),
|
|
2329
|
+
onClick: (ae) => F(M, "left")
|
|
2330
2330
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2331
2331
|
]),
|
|
2332
2332
|
_: 2
|
|
2333
2333
|
}, 1024),
|
|
2334
|
-
E(
|
|
2334
|
+
E(te, { title: "固定在右侧" }, {
|
|
2335
2335
|
default: C(() => [
|
|
2336
2336
|
E(D, {
|
|
2337
2337
|
type: "text",
|
|
2338
2338
|
size: "small",
|
|
2339
2339
|
icon: G(g(It)),
|
|
2340
|
-
style:
|
|
2341
|
-
onClick: (
|
|
2340
|
+
style: re({ color: g(se).colorTextQuaternary }),
|
|
2341
|
+
onClick: (ae) => F(M, "right")
|
|
2342
2342
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2343
2343
|
]),
|
|
2344
2344
|
_: 2
|
|
2345
2345
|
}, 1024)
|
|
2346
2346
|
], 2)
|
|
2347
|
-
], 6)) :
|
|
2347
|
+
], 6)) : R("", !0)
|
|
2348
2348
|
]),
|
|
2349
2349
|
_: 1
|
|
2350
2350
|
}, 8, ["list", "class", "disabled"])
|
|
2351
|
-
], 2)) :
|
|
2352
|
-
|
|
2351
|
+
], 2)) : R("", !0),
|
|
2352
|
+
p.value.some((M) => f(M)) ? (w(), Y("div", {
|
|
2353
2353
|
key: 2,
|
|
2354
|
-
class: b(
|
|
2354
|
+
class: b(u.$style.columnGroup)
|
|
2355
2355
|
}, [
|
|
2356
2356
|
V("div", {
|
|
2357
|
-
class: b(
|
|
2357
|
+
class: b(u.$style.groupTitle)
|
|
2358
2358
|
}, "固定在右侧", 2),
|
|
2359
2359
|
E(g(Ne), {
|
|
2360
|
-
list:
|
|
2360
|
+
list: p.value,
|
|
2361
2361
|
"item-key": "key",
|
|
2362
|
-
class: b(
|
|
2362
|
+
class: b(u.$style.columnList),
|
|
2363
2363
|
handle: ".table-column-draggable-handle",
|
|
2364
|
-
disabled:
|
|
2365
|
-
onEnd:
|
|
2364
|
+
disabled: p.value.length <= 1,
|
|
2365
|
+
onEnd: A
|
|
2366
2366
|
}, {
|
|
2367
|
-
item: C(({ element:
|
|
2368
|
-
|
|
2367
|
+
item: C(({ element: M }) => [
|
|
2368
|
+
f(M) ? (w(), Y("div", {
|
|
2369
2369
|
key: 0,
|
|
2370
|
-
class: b(
|
|
2371
|
-
style:
|
|
2370
|
+
class: b(u.$style.columnItem),
|
|
2371
|
+
style: re({ background: g(se).colorBgContainer })
|
|
2372
2372
|
}, [
|
|
2373
2373
|
E(D, {
|
|
2374
2374
|
type: "text",
|
|
2375
2375
|
size: "small",
|
|
2376
|
-
icon: G(g(
|
|
2377
|
-
style:
|
|
2378
|
-
class: b(["table-column-draggable-handle",
|
|
2376
|
+
icon: G(g(Pe)),
|
|
2377
|
+
style: re({ color: g(se).colorTextQuaternary }),
|
|
2378
|
+
class: b(["table-column-draggable-handle", u.$style.dragIcon])
|
|
2379
2379
|
}, null, 8, ["icon", "style", "class"]),
|
|
2380
|
-
E(
|
|
2381
|
-
checked:
|
|
2382
|
-
"onUpdate:checked": (
|
|
2383
|
-
onChange:
|
|
2380
|
+
E(oe, {
|
|
2381
|
+
checked: M.visible,
|
|
2382
|
+
"onUpdate:checked": (ae) => M.visible = ae,
|
|
2383
|
+
onChange: A
|
|
2384
2384
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
2385
|
-
E(
|
|
2386
|
-
ellipsis: { tooltip:
|
|
2387
|
-
content:
|
|
2388
|
-
class: b([
|
|
2385
|
+
E(Ee, {
|
|
2386
|
+
ellipsis: { tooltip: M.title },
|
|
2387
|
+
content: M.title,
|
|
2388
|
+
class: b([u.$style.columnItemContent, u.$style.dragHandle, "table-column-draggable-handle"]),
|
|
2389
2389
|
onClick: () => {
|
|
2390
|
-
|
|
2390
|
+
M.visible = !M.visible, A();
|
|
2391
2391
|
}
|
|
2392
2392
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
2393
2393
|
V("div", {
|
|
2394
|
-
class: b(
|
|
2394
|
+
class: b(u.$style.fixedActions)
|
|
2395
2395
|
}, [
|
|
2396
|
-
E(
|
|
2396
|
+
E(te, { title: "固定在左侧" }, {
|
|
2397
2397
|
default: C(() => [
|
|
2398
2398
|
E(D, {
|
|
2399
2399
|
type: "text",
|
|
2400
2400
|
size: "small",
|
|
2401
2401
|
icon: G(g(kt)),
|
|
2402
|
-
style:
|
|
2403
|
-
onClick: (
|
|
2402
|
+
style: re({ color: g(se).colorTextQuaternary }),
|
|
2403
|
+
onClick: (ae) => F(M, "left")
|
|
2404
2404
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2405
2405
|
]),
|
|
2406
2406
|
_: 2
|
|
2407
2407
|
}, 1024),
|
|
2408
|
-
E(
|
|
2408
|
+
E(te, { title: "取消固定" }, {
|
|
2409
2409
|
default: C(() => [
|
|
2410
2410
|
E(D, {
|
|
2411
2411
|
type: "text",
|
|
2412
2412
|
size: "small",
|
|
2413
2413
|
icon: G(g($t)),
|
|
2414
|
-
style:
|
|
2415
|
-
onClick: (
|
|
2414
|
+
style: re({ color: g(se).colorPrimary }),
|
|
2415
|
+
onClick: (ae) => F(M, !1)
|
|
2416
2416
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2417
2417
|
]),
|
|
2418
2418
|
_: 2
|
|
2419
2419
|
}, 1024)
|
|
2420
2420
|
], 2)
|
|
2421
|
-
], 6)) :
|
|
2421
|
+
], 6)) : R("", !0)
|
|
2422
2422
|
]),
|
|
2423
2423
|
_: 1
|
|
2424
2424
|
}, 8, ["list", "class", "disabled"])
|
|
2425
|
-
], 2)) :
|
|
2426
|
-
y.value ? (
|
|
2425
|
+
], 2)) : R("", !0),
|
|
2426
|
+
y.value ? (w(), Y("div", {
|
|
2427
2427
|
key: 3,
|
|
2428
|
-
class: b(
|
|
2429
|
-
style:
|
|
2430
|
-
}, " 未找到相关查询项 ", 6)) :
|
|
2428
|
+
class: b(u.$style.emptyText),
|
|
2429
|
+
style: re({ color: g(se).colorTextSecondary })
|
|
2430
|
+
}, " 未找到相关查询项 ", 6)) : R("", !0)
|
|
2431
2431
|
], 2)
|
|
2432
2432
|
], 2)
|
|
2433
2433
|
]),
|
|
@@ -2435,7 +2435,7 @@ const fo = (t) => {
|
|
|
2435
2435
|
E(D, {
|
|
2436
2436
|
type: "text",
|
|
2437
2437
|
icon: G(g(Ln)),
|
|
2438
|
-
class: b(
|
|
2438
|
+
class: b(u.$style.configBtn)
|
|
2439
2439
|
}, null, 8, ["icon", "class"])
|
|
2440
2440
|
]),
|
|
2441
2441
|
_: 1
|
|
@@ -2462,7 +2462,7 @@ const fo = (t) => {
|
|
|
2462
2462
|
emptyText: er
|
|
2463
2463
|
}, nr = {
|
|
2464
2464
|
$style: tr
|
|
2465
|
-
}, or = /* @__PURE__ */
|
|
2465
|
+
}, or = /* @__PURE__ */ _e(jo, [["__cssModules", nr]]), rr = /* @__PURE__ */ he({
|
|
2466
2466
|
__name: "DynamicList",
|
|
2467
2467
|
props: {
|
|
2468
2468
|
/**
|
|
@@ -2538,7 +2538,7 @@ const fo = (t) => {
|
|
|
2538
2538
|
sortButtonProps: {
|
|
2539
2539
|
type: [Object, Function],
|
|
2540
2540
|
default: () => ({
|
|
2541
|
-
icon: G(
|
|
2541
|
+
icon: G(Pe)
|
|
2542
2542
|
})
|
|
2543
2543
|
},
|
|
2544
2544
|
/**
|
|
@@ -2570,22 +2570,22 @@ const fo = (t) => {
|
|
|
2570
2570
|
},
|
|
2571
2571
|
emits: ["update:value", "add", "remove", "change"],
|
|
2572
2572
|
setup(t, { emit: e }) {
|
|
2573
|
-
const o = t, n = e, r = En.useInjectFormItemContext(), a =
|
|
2573
|
+
const o = t, n = e, r = En.useInjectFormItemContext(), a = le(o.value), i = () => {
|
|
2574
2574
|
const h = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
2575
2575
|
return Array.from({ length: 16 }).map(() => h[Math.floor(Math.random() * h.length)]).join("");
|
|
2576
2576
|
}, c = (h) => {
|
|
2577
|
-
var
|
|
2577
|
+
var S;
|
|
2578
2578
|
if (a.value.length < o.maxLength) {
|
|
2579
2579
|
const v = {
|
|
2580
2580
|
id: i(),
|
|
2581
|
-
...((
|
|
2581
|
+
...((S = o.getNewItemData) == null ? void 0 : S.call(o)) ?? {}
|
|
2582
2582
|
};
|
|
2583
2583
|
a.value.splice(h + 1, 0, v), n("add", v, h + 1);
|
|
2584
2584
|
}
|
|
2585
|
-
},
|
|
2585
|
+
}, p = (h) => {
|
|
2586
2586
|
a.value.splice(h, 1), n("remove", h);
|
|
2587
2587
|
};
|
|
2588
|
-
return
|
|
2588
|
+
return $e(
|
|
2589
2589
|
() => a.value,
|
|
2590
2590
|
() => {
|
|
2591
2591
|
n("update:value", g(a.value)), n("change", g(a.value)), r.onFieldChange();
|
|
@@ -2594,7 +2594,7 @@ const fo = (t) => {
|
|
|
2594
2594
|
deep: !0,
|
|
2595
2595
|
immediate: !0
|
|
2596
2596
|
}
|
|
2597
|
-
),
|
|
2597
|
+
), $e(
|
|
2598
2598
|
() => o.value,
|
|
2599
2599
|
() => {
|
|
2600
2600
|
a.value = g(o.value);
|
|
@@ -2603,9 +2603,9 @@ const fo = (t) => {
|
|
|
2603
2603
|
deep: !0,
|
|
2604
2604
|
immediate: !0
|
|
2605
2605
|
}
|
|
2606
|
-
), (h,
|
|
2607
|
-
const v =
|
|
2608
|
-
return
|
|
2606
|
+
), (h, S) => {
|
|
2607
|
+
const v = T("a-button");
|
|
2608
|
+
return w(), Y(Te, null, [
|
|
2609
2609
|
E(g(Ne), {
|
|
2610
2610
|
list: a.value,
|
|
2611
2611
|
"item-key": t.itemKey,
|
|
@@ -2613,59 +2613,59 @@ const fo = (t) => {
|
|
|
2613
2613
|
handle: ".draggable-icon",
|
|
2614
2614
|
class: b([h.$style.dynamicList, t.className])
|
|
2615
2615
|
}, {
|
|
2616
|
-
item: C(({ element:
|
|
2616
|
+
item: C(({ element: f, index: y }) => [
|
|
2617
2617
|
V("div", {
|
|
2618
2618
|
class: b([h.$style.dynamicListItem, t.itemClassName])
|
|
2619
2619
|
}, [
|
|
2620
2620
|
V("div", {
|
|
2621
2621
|
class: b(h.$style.dynamicListItemContent)
|
|
2622
2622
|
}, [
|
|
2623
|
-
|
|
2624
|
-
item:
|
|
2623
|
+
ge(h.$slots, "default", {
|
|
2624
|
+
item: f,
|
|
2625
2625
|
index: y
|
|
2626
2626
|
})
|
|
2627
2627
|
], 2),
|
|
2628
2628
|
V("div", {
|
|
2629
2629
|
class: b(h.$style.actionsIcons)
|
|
2630
2630
|
}, [
|
|
2631
|
-
E(v,
|
|
2631
|
+
E(v, ue({
|
|
2632
2632
|
type: "link",
|
|
2633
2633
|
danger: "",
|
|
2634
2634
|
size: "small",
|
|
2635
2635
|
icon: G(g(At))
|
|
2636
|
-
}, g(
|
|
2637
|
-
onClick: (I) =>
|
|
2636
|
+
}, g(ke)(t.deleteButtonProps) ? t.deleteButtonProps(f, y) : t.deleteButtonProps, {
|
|
2637
|
+
onClick: (I) => p(y)
|
|
2638
2638
|
}), {
|
|
2639
2639
|
default: C(() => [
|
|
2640
|
-
X(
|
|
2640
|
+
X(me(t.deleteButtonText), 1)
|
|
2641
2641
|
]),
|
|
2642
2642
|
_: 2
|
|
2643
2643
|
}, 1040, ["icon", "onClick"]),
|
|
2644
|
-
t.sortable ? (
|
|
2644
|
+
t.sortable ? (w(), U(v, ue({
|
|
2645
2645
|
key: 0,
|
|
2646
2646
|
class: ["draggable-icon", h.$style.dragIcon],
|
|
2647
2647
|
size: "small",
|
|
2648
2648
|
type: "text",
|
|
2649
|
-
icon: G(g(
|
|
2650
|
-
}, g(
|
|
2649
|
+
icon: G(g(Pe))
|
|
2650
|
+
}, g(ke)(t.sortButtonProps) ? t.sortButtonProps(f, y) : t.sortButtonProps), null, 16, ["class", "icon"])) : R("", !0)
|
|
2651
2651
|
], 2)
|
|
2652
2652
|
], 2)
|
|
2653
2653
|
]),
|
|
2654
2654
|
_: 3
|
|
2655
2655
|
}, 8, ["list", "item-key", "disabled", "class"]),
|
|
2656
2656
|
V("div", null, [
|
|
2657
|
-
a.value.length < t.maxLength ? (
|
|
2657
|
+
a.value.length < t.maxLength ? (w(), U(v, ue({
|
|
2658
2658
|
key: 0,
|
|
2659
2659
|
type: "link",
|
|
2660
2660
|
icon: G(g(zt))
|
|
2661
|
-
}, g(
|
|
2662
|
-
onClick:
|
|
2661
|
+
}, g(ke)(t.addButtonProps) ? t.addButtonProps() : t.addButtonProps, {
|
|
2662
|
+
onClick: S[0] || (S[0] = (f) => c(a.value.length - 1))
|
|
2663
2663
|
}), {
|
|
2664
2664
|
default: C(() => [
|
|
2665
|
-
X(
|
|
2665
|
+
X(me(t.addButtonText), 1)
|
|
2666
2666
|
]),
|
|
2667
2667
|
_: 1
|
|
2668
|
-
}, 16, ["icon"])) :
|
|
2668
|
+
}, 16, ["icon"])) : R("", !0)
|
|
2669
2669
|
])
|
|
2670
2670
|
], 64);
|
|
2671
2671
|
};
|
|
@@ -2678,7 +2678,7 @@ const fo = (t) => {
|
|
|
2678
2678
|
dragIcon: cr
|
|
2679
2679
|
}, dr = {
|
|
2680
2680
|
$style: ur
|
|
2681
|
-
}, pr = /* @__PURE__ */
|
|
2681
|
+
}, pr = /* @__PURE__ */ _e(rr, [["__cssModules", dr]]), fr = /* @__PURE__ */ he({
|
|
2682
2682
|
__name: "InputGroup",
|
|
2683
2683
|
props: {
|
|
2684
2684
|
/**
|
|
@@ -2708,26 +2708,26 @@ const fo = (t) => {
|
|
|
2708
2708
|
},
|
|
2709
2709
|
emits: ["update:value", "change"],
|
|
2710
2710
|
setup(t, { emit: e }) {
|
|
2711
|
-
const o = t, n = e, r =
|
|
2711
|
+
const o = t, n = e, r = O({
|
|
2712
2712
|
get() {
|
|
2713
2713
|
return o.value;
|
|
2714
2714
|
},
|
|
2715
2715
|
set(i) {
|
|
2716
2716
|
n("update:value", i), n("change", i);
|
|
2717
2717
|
}
|
|
2718
|
-
}), a =
|
|
2719
|
-
var c,
|
|
2718
|
+
}), a = O(() => {
|
|
2719
|
+
var c, p;
|
|
2720
2720
|
const i = o.inModal ? "30%" : "50%";
|
|
2721
|
-
return ((
|
|
2721
|
+
return ((p = (c = o.formItem.addonSelectProps) == null ? void 0 : c.style) == null ? void 0 : p.width) ?? i;
|
|
2722
2722
|
});
|
|
2723
2723
|
return (i, c) => {
|
|
2724
|
-
const
|
|
2725
|
-
return
|
|
2724
|
+
const p = T("a-select"), h = T("a-input"), S = T("a-input-group");
|
|
2725
|
+
return w(), U(S, {
|
|
2726
2726
|
compact: "",
|
|
2727
2727
|
class: b(i.$style.inputGroup)
|
|
2728
2728
|
}, {
|
|
2729
2729
|
default: C(() => [
|
|
2730
|
-
E(
|
|
2730
|
+
E(p, ue({
|
|
2731
2731
|
value: r.value.select,
|
|
2732
2732
|
"onUpdate:value": c[0] || (c[0] = (v) => r.value.select = v),
|
|
2733
2733
|
style: {
|
|
@@ -2735,24 +2735,24 @@ const fo = (t) => {
|
|
|
2735
2735
|
width: a.value
|
|
2736
2736
|
}
|
|
2737
2737
|
}, g(qt)(t.formItem.addonBeforeProps, ["style"])), null, 16, ["value", "style"]),
|
|
2738
|
-
E(h,
|
|
2738
|
+
E(h, ue({
|
|
2739
2739
|
value: r.value.value,
|
|
2740
2740
|
"onUpdate:value": c[1] || (c[1] = (v) => r.value.value = v),
|
|
2741
2741
|
style: {
|
|
2742
2742
|
...g(Ze)(t.formItem, "props.style", {}),
|
|
2743
2743
|
width: `calc(100% - ${a.value})`
|
|
2744
2744
|
}
|
|
2745
|
-
}, g(
|
|
2745
|
+
}, g(Ae)(t.formItem, ["props"])), null, 16, ["value", "style"])
|
|
2746
2746
|
]),
|
|
2747
2747
|
_: 1
|
|
2748
2748
|
}, 8, ["class"]);
|
|
2749
2749
|
};
|
|
2750
2750
|
}
|
|
2751
|
-
}),
|
|
2752
|
-
inputGroup:
|
|
2751
|
+
}), mr = "_inputGroup_eukv3_1", hr = {
|
|
2752
|
+
inputGroup: mr
|
|
2753
2753
|
}, yr = {
|
|
2754
2754
|
$style: hr
|
|
2755
|
-
}, gr = /* @__PURE__ */
|
|
2755
|
+
}, gr = /* @__PURE__ */ _e(fr, [["__cssModules", yr]]), Ve = null, br = /* @__PURE__ */ he({
|
|
2756
2756
|
__name: "InputNumberRange",
|
|
2757
2757
|
props: {
|
|
2758
2758
|
/**
|
|
@@ -2774,63 +2774,63 @@ const fo = (t) => {
|
|
|
2774
2774
|
},
|
|
2775
2775
|
emits: ["update:value"],
|
|
2776
2776
|
setup(t, { emit: e }) {
|
|
2777
|
-
const o = t, n = e, r =
|
|
2777
|
+
const o = t, n = e, r = O({
|
|
2778
2778
|
get() {
|
|
2779
2779
|
var c;
|
|
2780
2780
|
return ((c = o.value) == null ? void 0 : c[0]) ?? Ve;
|
|
2781
2781
|
},
|
|
2782
2782
|
set(c) {
|
|
2783
|
-
var
|
|
2784
|
-
n("update:value", [c, ((
|
|
2783
|
+
var p;
|
|
2784
|
+
n("update:value", [c, ((p = o.value) == null ? void 0 : p[1]) ?? Ve]);
|
|
2785
2785
|
}
|
|
2786
|
-
}), a =
|
|
2786
|
+
}), a = O({
|
|
2787
2787
|
get() {
|
|
2788
2788
|
var c;
|
|
2789
2789
|
return ((c = o.value) == null ? void 0 : c[1]) ?? Ve;
|
|
2790
2790
|
},
|
|
2791
2791
|
set(c) {
|
|
2792
|
-
var
|
|
2793
|
-
n("update:value", [((
|
|
2792
|
+
var p;
|
|
2793
|
+
n("update:value", [((p = o.value) == null ? void 0 : p[0]) ?? Ve, c]);
|
|
2794
2794
|
}
|
|
2795
|
-
}), i =
|
|
2796
|
-
return (c,
|
|
2797
|
-
var
|
|
2798
|
-
const h =
|
|
2799
|
-
return
|
|
2795
|
+
}), i = O(() => qt(o.formItem.props, ["placeholder"]));
|
|
2796
|
+
return (c, p) => {
|
|
2797
|
+
var S, v, f, y;
|
|
2798
|
+
const h = T("a-input-number");
|
|
2799
|
+
return w(), Y("div", {
|
|
2800
2800
|
class: b([c.$style.inputNumberGroup, "input-number-group"])
|
|
2801
2801
|
}, [
|
|
2802
2802
|
V("div", {
|
|
2803
2803
|
class: b(c.$style.inputNumberGroupContent)
|
|
2804
2804
|
}, [
|
|
2805
|
-
E(h,
|
|
2805
|
+
E(h, ue(i.value, {
|
|
2806
2806
|
value: r.value,
|
|
2807
|
-
"onUpdate:value":
|
|
2807
|
+
"onUpdate:value": p[0] || (p[0] = (I) => r.value = I),
|
|
2808
2808
|
class: [c.$style.inputNumber, c.$style.startInputNumber],
|
|
2809
|
-
placeholder: ((v = g(Fe)((
|
|
2809
|
+
placeholder: ((v = g(Fe)((S = o.formItem.props) == null ? void 0 : S.placeholder)) == null ? void 0 : v[0]) ?? "请输入"
|
|
2810
2810
|
}), null, 16, ["value", "class", "placeholder"]),
|
|
2811
2811
|
V("span", {
|
|
2812
2812
|
class: b(c.$style.divider)
|
|
2813
2813
|
}, "~", 2),
|
|
2814
|
-
E(h,
|
|
2814
|
+
E(h, ue(i.value, {
|
|
2815
2815
|
value: a.value,
|
|
2816
|
-
"onUpdate:value":
|
|
2816
|
+
"onUpdate:value": p[1] || (p[1] = (I) => a.value = I),
|
|
2817
2817
|
class: [c.$style.inputNumber, c.$style.endInputNumber],
|
|
2818
|
-
placeholder: ((y = g(Fe)((
|
|
2818
|
+
placeholder: ((y = g(Fe)((f = o.formItem.props) == null ? void 0 : f.placeholder)) == null ? void 0 : y[1]) ?? "请输入"
|
|
2819
2819
|
}), null, 16, ["value", "class", "placeholder"])
|
|
2820
2820
|
], 2)
|
|
2821
2821
|
], 2);
|
|
2822
2822
|
};
|
|
2823
2823
|
}
|
|
2824
|
-
}), vr = "_inputNumberGroup_149g6_1", Cr = "_inputNumberGroupContent_149g6_4", _r = "_inputNumber_149g6_1", Er = "_startInputNumber_149g6_13",
|
|
2824
|
+
}), vr = "_inputNumberGroup_149g6_1", Cr = "_inputNumberGroupContent_149g6_4", _r = "_inputNumber_149g6_1", Er = "_startInputNumber_149g6_13", Sr = "_endInputNumber_149g6_21", wr = "_divider_149g6_29", xr = {
|
|
2825
2825
|
inputNumberGroup: vr,
|
|
2826
2826
|
inputNumberGroupContent: Cr,
|
|
2827
2827
|
inputNumber: _r,
|
|
2828
2828
|
startInputNumber: Er,
|
|
2829
|
-
endInputNumber:
|
|
2830
|
-
divider:
|
|
2829
|
+
endInputNumber: Sr,
|
|
2830
|
+
divider: wr
|
|
2831
2831
|
}, Ir = {
|
|
2832
2832
|
$style: xr
|
|
2833
|
-
}, $r = /* @__PURE__ */
|
|
2833
|
+
}, $r = /* @__PURE__ */ _e(br, [["__cssModules", Ir]]), kr = 8, Ar = 14, Or = 4, Tr = 8, Pr = /* @__PURE__ */ he({
|
|
2834
2834
|
__name: "FormFieldItem",
|
|
2835
2835
|
props: {
|
|
2836
2836
|
/**
|
|
@@ -2880,37 +2880,42 @@ const fo = (t) => {
|
|
|
2880
2880
|
[ee.select]: $n,
|
|
2881
2881
|
[ee.cascader]: In,
|
|
2882
2882
|
[ee.treeSelect]: xn,
|
|
2883
|
-
[ee.datePicker]:
|
|
2884
|
-
[ee.rangePicker]:
|
|
2885
|
-
}, n = t, r = e, a = pn(), i =
|
|
2883
|
+
[ee.datePicker]: wn,
|
|
2884
|
+
[ee.rangePicker]: Sn
|
|
2885
|
+
}, n = t, r = e, a = pn(), i = O({
|
|
2886
2886
|
get() {
|
|
2887
2887
|
return n.value;
|
|
2888
2888
|
},
|
|
2889
|
-
set(
|
|
2890
|
-
r("update:value",
|
|
2889
|
+
set(u) {
|
|
2890
|
+
r("update:value", u), r("change", u);
|
|
2891
2891
|
}
|
|
2892
|
-
}), c =
|
|
2893
|
-
const
|
|
2894
|
-
return Math.max(
|
|
2895
|
-
}), h =
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2892
|
+
}), c = O(() => !n.inModal && n.formItem.showLabel !== !1), p = O(() => {
|
|
2893
|
+
const u = yo(n.formItem.label);
|
|
2894
|
+
return Math.max(u, 20) + kr * 2 + 2;
|
|
2895
|
+
}), h = O(() => n.formItem.tooltip), S = O(() => h.value !== void 0), v = O(() => n.formItem.addonAfter ?? n.formItem.addonAffter ?? n.formItem.addonAter), f = O(
|
|
2896
|
+
() => n.formItem.type === ee.input
|
|
2897
|
+
), y = O(() => {
|
|
2898
|
+
const u = v.value;
|
|
2899
|
+
return u == null || typeof u != "object" || Array.isArray(u) ? !1 : Object.keys(u).length > 0;
|
|
2900
|
+
}), I = O(() => {
|
|
2901
|
+
var u;
|
|
2902
|
+
return f.value && y.value && ((u = v.value) == null ? void 0 : u.show) !== !1;
|
|
2903
|
+
}), L = O(() => {
|
|
2904
|
+
var u;
|
|
2905
|
+
return ((u = v.value) == null ? void 0 : u.text) ?? "操作";
|
|
2906
|
+
}), A = O(() => S.value ? p.value + Ar + Or + Tr : p.value), B = () => {
|
|
2907
|
+
var u, P;
|
|
2908
|
+
(P = (u = v.value) == null ? void 0 : u.onClick) == null || P.call(u, {
|
|
2904
2909
|
name: n.formItem.name,
|
|
2905
2910
|
value: i.value,
|
|
2906
2911
|
formItem: n.formItem
|
|
2907
2912
|
});
|
|
2908
|
-
},
|
|
2909
|
-
const { type:
|
|
2910
|
-
return
|
|
2911
|
-
}),
|
|
2912
|
-
var
|
|
2913
|
-
const
|
|
2913
|
+
}, z = O(() => {
|
|
2914
|
+
const { type: u, component: P } = n.formItem;
|
|
2915
|
+
return u === "component" ? P : o[u];
|
|
2916
|
+
}), q = O(() => {
|
|
2917
|
+
var oe;
|
|
2918
|
+
const u = n.formItem, P = {
|
|
2914
2919
|
[ee.input]: {
|
|
2915
2920
|
placeholder: "请输入",
|
|
2916
2921
|
clearable: !0
|
|
@@ -2918,13 +2923,13 @@ const fo = (t) => {
|
|
|
2918
2923
|
[ee.inputGroup]: {
|
|
2919
2924
|
placeholder: "请输入",
|
|
2920
2925
|
clearable: !0,
|
|
2921
|
-
formItem:
|
|
2926
|
+
formItem: u
|
|
2922
2927
|
},
|
|
2923
2928
|
[ee.inputNumber]: {
|
|
2924
2929
|
placeholder: "请输入"
|
|
2925
2930
|
},
|
|
2926
2931
|
[ee.inputNumberRange]: {
|
|
2927
|
-
formItem:
|
|
2932
|
+
formItem: u
|
|
2928
2933
|
},
|
|
2929
2934
|
[ee.select]: {
|
|
2930
2935
|
placeholder: "请选择",
|
|
@@ -2935,49 +2940,49 @@ const fo = (t) => {
|
|
|
2935
2940
|
maxTagTextLength: 40,
|
|
2936
2941
|
maxTagCount: "responsive"
|
|
2937
2942
|
}
|
|
2938
|
-
},
|
|
2943
|
+
}, D = {
|
|
2939
2944
|
...a,
|
|
2940
|
-
...
|
|
2941
|
-
|
|
2945
|
+
...P[u.type] ?? {},
|
|
2946
|
+
...u.props ?? {},
|
|
2942
2947
|
style: {
|
|
2943
|
-
...((
|
|
2944
|
-
width:
|
|
2948
|
+
...((oe = u.props) == null ? void 0 : oe.style) ?? {},
|
|
2949
|
+
width: u.type !== ee.component ? "100%" : void 0
|
|
2945
2950
|
},
|
|
2946
2951
|
inModal: n.inModal
|
|
2947
2952
|
};
|
|
2948
|
-
return n.inModal || (c.value && je(
|
|
2949
|
-
}),
|
|
2950
|
-
return (
|
|
2951
|
-
const
|
|
2952
|
-
return
|
|
2953
|
-
class: b(
|
|
2953
|
+
return n.inModal || (c.value && je(D, "style.width", `calc(100% - ${A.value}px)`), u.type === ee.select && je(D, "maxTagCount", "responsive")), D;
|
|
2954
|
+
}), F = O(() => n.formItem.modelPropName ?? "value");
|
|
2955
|
+
return (u, P) => {
|
|
2956
|
+
const D = T("a-tooltip"), oe = T("a-input"), xe = T("a-button"), Ee = T("a-input-group");
|
|
2957
|
+
return w(), Y("div", {
|
|
2958
|
+
class: b(u.$style.formFieldItem)
|
|
2954
2959
|
}, [
|
|
2955
|
-
c.value ? (
|
|
2960
|
+
c.value ? (w(), U(Ee, {
|
|
2956
2961
|
key: 0,
|
|
2957
2962
|
compact: "",
|
|
2958
|
-
class: b([
|
|
2963
|
+
class: b([u.$style.inputGroup, "super-table-input-group"])
|
|
2959
2964
|
}, {
|
|
2960
2965
|
default: C(() => [
|
|
2961
|
-
t.inModal ?
|
|
2966
|
+
t.inModal ? R("", !0) : (w(), U(oe, {
|
|
2962
2967
|
key: 0,
|
|
2963
2968
|
value: t.formItem.label,
|
|
2964
2969
|
disabled: "",
|
|
2965
|
-
style:
|
|
2966
|
-
color: g(
|
|
2967
|
-
width: `${
|
|
2970
|
+
style: re({
|
|
2971
|
+
color: g(se).colorText,
|
|
2972
|
+
width: `${A.value}px`
|
|
2968
2973
|
}),
|
|
2969
|
-
class: b([
|
|
2974
|
+
class: b([u.$style.formFieldItemLabel, "super-table-filter-form-item-label"])
|
|
2970
2975
|
}, Ge({ _: 2 }, [
|
|
2971
|
-
|
|
2976
|
+
S.value ? {
|
|
2972
2977
|
name: "suffix",
|
|
2973
2978
|
fn: C(() => [
|
|
2974
|
-
E(
|
|
2979
|
+
E(D, {
|
|
2975
2980
|
title: h.value,
|
|
2976
2981
|
placement: "top"
|
|
2977
2982
|
}, {
|
|
2978
2983
|
default: C(() => [
|
|
2979
2984
|
E(g(ht), {
|
|
2980
|
-
class: b(
|
|
2985
|
+
class: b(u.$style.formItemTooltipIcon)
|
|
2981
2986
|
}, null, 8, ["class"])
|
|
2982
2987
|
]),
|
|
2983
2988
|
_: 1
|
|
@@ -2986,25 +2991,25 @@ const fo = (t) => {
|
|
|
2986
2991
|
key: "0"
|
|
2987
2992
|
} : void 0
|
|
2988
2993
|
]), 1032, ["value", "style", "class"])),
|
|
2989
|
-
|
|
2994
|
+
z.value ? (w(), U(Qe(z.value), ue({
|
|
2990
2995
|
key: 1,
|
|
2991
|
-
[
|
|
2992
|
-
["onUpdate:" +
|
|
2993
|
-
},
|
|
2994
|
-
|
|
2996
|
+
[F.value]: i.value,
|
|
2997
|
+
["onUpdate:" + F.value]: P[0] || (P[0] = (te) => i.value = te)
|
|
2998
|
+
}, q.value), Ge({ _: 2 }, [
|
|
2999
|
+
I.value ? {
|
|
2995
3000
|
name: "addonAfter",
|
|
2996
3001
|
fn: C(() => {
|
|
2997
|
-
var
|
|
3002
|
+
var te, ye;
|
|
2998
3003
|
return [
|
|
2999
|
-
E(
|
|
3004
|
+
E(xe, {
|
|
3000
3005
|
type: "link",
|
|
3001
3006
|
size: "small",
|
|
3002
|
-
disabled: (
|
|
3003
|
-
class: b([
|
|
3004
|
-
onClick:
|
|
3007
|
+
disabled: (te = v.value) == null ? void 0 : te.disabled,
|
|
3008
|
+
class: b([u.$style.addonAfterButton, (ye = v.value) == null ? void 0 : ye.className]),
|
|
3009
|
+
onClick: B
|
|
3005
3010
|
}, {
|
|
3006
3011
|
default: C(() => [
|
|
3007
|
-
X(
|
|
3012
|
+
X(me(L.value), 1)
|
|
3008
3013
|
]),
|
|
3009
3014
|
_: 1
|
|
3010
3015
|
}, 8, ["disabled", "class"])
|
|
@@ -3012,46 +3017,46 @@ const fo = (t) => {
|
|
|
3012
3017
|
}),
|
|
3013
3018
|
key: "0"
|
|
3014
3019
|
} : void 0
|
|
3015
|
-
]), 1040)) :
|
|
3020
|
+
]), 1040)) : R("", !0)
|
|
3016
3021
|
]),
|
|
3017
3022
|
_: 1
|
|
3018
|
-
}, 8, ["class"])) : (
|
|
3019
|
-
t.formItem.type === g(ee).component && t.formItem.showLabel ? (
|
|
3023
|
+
}, 8, ["class"])) : (w(), Y(Te, { key: 1 }, [
|
|
3024
|
+
t.formItem.type === g(ee).component && t.formItem.showLabel ? (w(), Y("span", {
|
|
3020
3025
|
key: 0,
|
|
3021
|
-
class: b(
|
|
3026
|
+
class: b(u.$style.customItemLabel)
|
|
3022
3027
|
}, [
|
|
3023
|
-
X(
|
|
3024
|
-
h.value !== void 0 ? (
|
|
3028
|
+
X(me(t.formItem.label) + " ", 1),
|
|
3029
|
+
h.value !== void 0 ? (w(), U(D, {
|
|
3025
3030
|
key: 0,
|
|
3026
3031
|
title: h.value,
|
|
3027
3032
|
placement: "top"
|
|
3028
3033
|
}, {
|
|
3029
3034
|
default: C(() => [
|
|
3030
3035
|
E(g(ht), {
|
|
3031
|
-
class: b(
|
|
3036
|
+
class: b(u.$style.formItemTooltipIcon)
|
|
3032
3037
|
}, null, 8, ["class"])
|
|
3033
3038
|
]),
|
|
3034
3039
|
_: 1
|
|
3035
|
-
}, 8, ["title"])) :
|
|
3036
|
-
], 2)) :
|
|
3037
|
-
(
|
|
3038
|
-
[
|
|
3039
|
-
["onUpdate:" +
|
|
3040
|
-
},
|
|
3041
|
-
|
|
3040
|
+
}, 8, ["title"])) : R("", !0)
|
|
3041
|
+
], 2)) : R("", !0),
|
|
3042
|
+
(w(), U(Qe(z.value), ue({
|
|
3043
|
+
[F.value]: i.value,
|
|
3044
|
+
["onUpdate:" + F.value]: P[1] || (P[1] = (te) => i.value = te)
|
|
3045
|
+
}, q.value), Ge({ _: 2 }, [
|
|
3046
|
+
I.value ? {
|
|
3042
3047
|
name: "addonAfter",
|
|
3043
3048
|
fn: C(() => {
|
|
3044
|
-
var
|
|
3049
|
+
var te, ye;
|
|
3045
3050
|
return [
|
|
3046
|
-
E(
|
|
3051
|
+
E(xe, {
|
|
3047
3052
|
type: "link",
|
|
3048
3053
|
size: "small",
|
|
3049
|
-
disabled: (
|
|
3050
|
-
class: b([
|
|
3051
|
-
onClick:
|
|
3054
|
+
disabled: (te = v.value) == null ? void 0 : te.disabled,
|
|
3055
|
+
class: b([u.$style.addonAfterButton, (ye = v.value) == null ? void 0 : ye.className]),
|
|
3056
|
+
onClick: B
|
|
3052
3057
|
}, {
|
|
3053
3058
|
default: C(() => [
|
|
3054
|
-
X(
|
|
3059
|
+
X(me(L.value), 1)
|
|
3055
3060
|
]),
|
|
3056
3061
|
_: 1
|
|
3057
3062
|
}, 8, ["disabled", "class"])
|
|
@@ -3073,7 +3078,7 @@ const fo = (t) => {
|
|
|
3073
3078
|
addonAfterButton: Rr
|
|
3074
3079
|
}, jr = {
|
|
3075
3080
|
$style: Nr
|
|
3076
|
-
}, Kt = /* @__PURE__ */
|
|
3081
|
+
}, Kt = /* @__PURE__ */ _e(Pr, [["__cssModules", jr]]), Ur = /* @__PURE__ */ he({
|
|
3077
3082
|
__name: "SceneConfigModal",
|
|
3078
3083
|
props: {
|
|
3079
3084
|
// 当前编辑的场景
|
|
@@ -3095,7 +3100,7 @@ const fo = (t) => {
|
|
|
3095
3100
|
// 弹窗操作类型 新增、更新、设置查询条件
|
|
3096
3101
|
actionType: {
|
|
3097
3102
|
type: String,
|
|
3098
|
-
default:
|
|
3103
|
+
default: ce.create
|
|
3099
3104
|
},
|
|
3100
3105
|
// 是否允许新增
|
|
3101
3106
|
allowCreateScene: {
|
|
@@ -3116,29 +3121,29 @@ const fo = (t) => {
|
|
|
3116
3121
|
emits: ["cancel", "search", "form-item-change", "update-form-config"],
|
|
3117
3122
|
setup(t, { expose: e, emit: o }) {
|
|
3118
3123
|
var Z, qe;
|
|
3119
|
-
const n = t, r = o, a =
|
|
3120
|
-
Object.values(a.value).filter(({ visible:
|
|
3121
|
-
|
|
3122
|
-
)), c = ["name", "value", "type"],
|
|
3124
|
+
const n = t, r = o, a = le(pt(n.formConfigMap)), i = O(() => Je(
|
|
3125
|
+
Object.values(a.value).filter(({ visible: $ }) => $ !== !1),
|
|
3126
|
+
be.order
|
|
3127
|
+
)), c = ["name", "value", "type"], p = i.value.filter(($) => $._selected).map(($) => Ae($, c)), h = le(!0), S = le(!1), v = le(), f = Xe({
|
|
3123
3128
|
name: ((Z = n.currentScene) == null ? void 0 : Z.name) ?? "",
|
|
3124
|
-
items: n.actionType ===
|
|
3125
|
-
}), y =
|
|
3129
|
+
items: n.actionType === ce.search ? p : pt(((qe = n.currentScene) == null ? void 0 : qe.items) ?? [])
|
|
3130
|
+
}), y = O({
|
|
3126
3131
|
get() {
|
|
3127
|
-
const
|
|
3128
|
-
return
|
|
3132
|
+
const $ = i.value.filter((x) => !x.fixed);
|
|
3133
|
+
return $.length === 0 ? !1 : $.every((x) => f.items.some((N) => N.name === x.name));
|
|
3129
3134
|
},
|
|
3130
|
-
set(
|
|
3131
|
-
if (
|
|
3132
|
-
const x = i.value.map((
|
|
3133
|
-
|
|
3135
|
+
set($) {
|
|
3136
|
+
if ($) {
|
|
3137
|
+
const x = i.value.map((N) => Ae(N, c));
|
|
3138
|
+
f.items = Tt(f.items, x, "name");
|
|
3134
3139
|
} else {
|
|
3135
|
-
const x = i.value.filter((
|
|
3136
|
-
|
|
3140
|
+
const x = i.value.filter((N) => N.fixed).map((N) => N.name);
|
|
3141
|
+
f.items = f.items.filter((N) => x.includes(N.name));
|
|
3137
3142
|
}
|
|
3138
3143
|
}
|
|
3139
|
-
}), I =
|
|
3140
|
-
(
|
|
3141
|
-
).length),
|
|
3144
|
+
}), I = O(() => i.value.filter(
|
|
3145
|
+
($) => f.items.some((x) => x.name === $.name)
|
|
3146
|
+
).length), L = O(() => I.value > 0 && I.value < i.value.length), A = Xe({
|
|
3142
3147
|
name: [
|
|
3143
3148
|
{
|
|
3144
3149
|
required: !0,
|
|
@@ -3157,124 +3162,124 @@ const fo = (t) => {
|
|
|
3157
3162
|
type: "array"
|
|
3158
3163
|
}
|
|
3159
3164
|
]
|
|
3160
|
-
}), B =
|
|
3165
|
+
}), B = O(() => f.items.map(({ name: $ }) => $)), z = ($) => {
|
|
3161
3166
|
var x;
|
|
3162
|
-
return (x = a.value[
|
|
3163
|
-
},
|
|
3164
|
-
const
|
|
3165
|
-
return
|
|
3166
|
-
},
|
|
3167
|
-
[
|
|
3168
|
-
[
|
|
3169
|
-
[
|
|
3170
|
-
})[n.actionType]),
|
|
3171
|
-
const
|
|
3172
|
-
|
|
3173
|
-
},
|
|
3174
|
-
const x = n.formConfigMap[
|
|
3175
|
-
return [x, ...
|
|
3176
|
-
}, D = (
|
|
3177
|
-
const
|
|
3178
|
-
(
|
|
3167
|
+
return (x = a.value[$]) == null ? void 0 : x.tooltip;
|
|
3168
|
+
}, q = () => {
|
|
3169
|
+
const $ = i.value.find((x) => !B.value.includes(x.name));
|
|
3170
|
+
return $ ? Ae(pt($), c) : {};
|
|
3171
|
+
}, F = O(() => ({
|
|
3172
|
+
[ce.create]: "新建场景",
|
|
3173
|
+
[ce.update]: "更新场景",
|
|
3174
|
+
[ce.search]: "高级筛选"
|
|
3175
|
+
})[n.actionType]), u = ($, x) => {
|
|
3176
|
+
const N = n.formConfigMap[x.name];
|
|
3177
|
+
N && (x.type = N.type, x.value = N.value, x.label = N.label, D(x.name, x.value));
|
|
3178
|
+
}, P = ($) => {
|
|
3179
|
+
const x = n.formConfigMap[$], N = f.items.map((ie) => ie.name), ne = i.value.filter((ie) => !N.includes(ie.name));
|
|
3180
|
+
return [x, ...ne];
|
|
3181
|
+
}, D = ($, x) => {
|
|
3182
|
+
const N = f.items.reduce(
|
|
3183
|
+
(ne, ie) => (ne[ie.name] = ie.value, ne),
|
|
3179
3184
|
{}
|
|
3180
3185
|
);
|
|
3181
|
-
r("form-item-change",
|
|
3182
|
-
},
|
|
3183
|
-
D(
|
|
3184
|
-
},
|
|
3185
|
-
var
|
|
3186
|
-
const
|
|
3187
|
-
const
|
|
3188
|
-
return
|
|
3186
|
+
r("form-item-change", $, x, N);
|
|
3187
|
+
}, oe = ({ name: $, value: x }) => {
|
|
3188
|
+
D($, x);
|
|
3189
|
+
}, xe = async () => {
|
|
3190
|
+
var N;
|
|
3191
|
+
const $ = f.items.map((ne, ie) => {
|
|
3192
|
+
const ve = a.value[ne.name];
|
|
3193
|
+
return ve && (ve.value = ne.value, ve[be.orderInScene] = ie, ve[be.selected] = !0), ve;
|
|
3189
3194
|
}).filter(Boolean);
|
|
3190
|
-
if (n.actionType ===
|
|
3191
|
-
r("update-form-config",
|
|
3195
|
+
if (n.actionType === ce.search && !S.value) {
|
|
3196
|
+
r("update-form-config", $), r("search", f.items, $), r("cancel");
|
|
3192
3197
|
return;
|
|
3193
3198
|
}
|
|
3194
|
-
await ((
|
|
3195
|
-
const x =
|
|
3199
|
+
await ((N = v.value) == null ? void 0 : N.validateFields());
|
|
3200
|
+
const x = Ce(f);
|
|
3196
3201
|
n.currentScene ? await n.onUpdate({
|
|
3197
3202
|
...n.currentScene,
|
|
3198
3203
|
...x
|
|
3199
|
-
}) : await n.onCreate(x), r("update-form-config",
|
|
3204
|
+
}) : await n.onCreate(x), r("update-form-config", $), r("cancel");
|
|
3200
3205
|
};
|
|
3201
3206
|
(() => {
|
|
3202
|
-
if (
|
|
3203
|
-
const
|
|
3204
|
-
i.value.filter(({ fixed:
|
|
3207
|
+
if (f.items.length) return;
|
|
3208
|
+
const $ = Tt(
|
|
3209
|
+
i.value.filter(({ fixed: N, selected: ne }) => N || ne),
|
|
3205
3210
|
"name"
|
|
3206
3211
|
);
|
|
3207
|
-
if (
|
|
3208
|
-
|
|
3212
|
+
if ($.length) {
|
|
3213
|
+
f.items = Je($, "_order").map((N) => Ae(N, c));
|
|
3209
3214
|
return;
|
|
3210
3215
|
}
|
|
3211
|
-
const x =
|
|
3212
|
-
x &&
|
|
3216
|
+
const x = q();
|
|
3217
|
+
x && f.items.push(x);
|
|
3213
3218
|
})();
|
|
3214
|
-
const
|
|
3219
|
+
const te = ($) => {
|
|
3215
3220
|
var x;
|
|
3216
3221
|
return {
|
|
3217
|
-
disabled: (x = a.value[
|
|
3222
|
+
disabled: (x = a.value[$.name]) == null ? void 0 : x.fixed
|
|
3218
3223
|
};
|
|
3219
|
-
},
|
|
3224
|
+
}, ye = ($) => a.value[$], Be = ($, x, N) => {
|
|
3220
3225
|
if (Wt.includes(x))
|
|
3221
|
-
return
|
|
3222
|
-
if (!
|
|
3223
|
-
return
|
|
3224
|
-
if (x === "visible" && a.value[
|
|
3225
|
-
return
|
|
3226
|
-
je(a.value, `${
|
|
3227
|
-
},
|
|
3226
|
+
return Oe("setFormItem error,", `form item with prop "${$}" is readonly`);
|
|
3227
|
+
if (!ye($))
|
|
3228
|
+
return Oe("setFormItem error,", `Cannot find form item with name "${$}"`);
|
|
3229
|
+
if (x === "visible" && a.value[$].fixed)
|
|
3230
|
+
return Oe("setFormItem error,", "Cannot change the visible of a fixed form item");
|
|
3231
|
+
je(a.value, `${$}.${x}`, N), a.value[$].visible || (f.items = f.items.filter((ne) => ne.name !== $));
|
|
3232
|
+
}, M = ($) => {
|
|
3228
3233
|
var x;
|
|
3229
|
-
return (x =
|
|
3230
|
-
},
|
|
3231
|
-
const
|
|
3232
|
-
|
|
3233
|
-
}, tt = (
|
|
3234
|
-
Object.entries(
|
|
3235
|
-
|
|
3234
|
+
return (x = f.items.find((N) => N.name === $)) == null ? void 0 : x.value;
|
|
3235
|
+
}, ae = ($, x) => {
|
|
3236
|
+
const N = f.items.find((ne) => ne.name === $);
|
|
3237
|
+
N && (N.value = x);
|
|
3238
|
+
}, tt = ($) => {
|
|
3239
|
+
Object.entries($).forEach(([x, N]) => {
|
|
3240
|
+
ae(x, N);
|
|
3236
3241
|
});
|
|
3237
3242
|
};
|
|
3238
|
-
function ze(
|
|
3239
|
-
return (
|
|
3240
|
-
(
|
|
3241
|
-
const
|
|
3242
|
-
return
|
|
3243
|
+
function ze($) {
|
|
3244
|
+
return ($ ? Fe($) : f.items.map((N) => N.name)).reduce(
|
|
3245
|
+
(N, ne) => {
|
|
3246
|
+
const ie = f.items.find((ve) => ve.name === ne);
|
|
3247
|
+
return ie && (N[ne] = ie.value), N;
|
|
3243
3248
|
},
|
|
3244
3249
|
{}
|
|
3245
3250
|
);
|
|
3246
3251
|
}
|
|
3247
3252
|
return e({
|
|
3248
|
-
getFormItem:
|
|
3253
|
+
getFormItem: ye,
|
|
3249
3254
|
setFormItem: Be,
|
|
3250
3255
|
getFormValues: ze,
|
|
3251
3256
|
setFormValues: tt,
|
|
3252
|
-
getFormValue:
|
|
3253
|
-
setFormValue:
|
|
3254
|
-
}), (
|
|
3255
|
-
const
|
|
3256
|
-
return
|
|
3257
|
+
getFormValue: M,
|
|
3258
|
+
setFormValue: ae
|
|
3259
|
+
}), ($, x) => {
|
|
3260
|
+
const N = T("a-input"), ne = T("a-form-item"), ie = T("a-checkbox"), ve = T("a-space"), nt = T("a-select"), ot = T("a-tooltip"), rt = T("a-form"), lt = T("a-modal");
|
|
3261
|
+
return w(), U(lt, {
|
|
3257
3262
|
open: h.value,
|
|
3258
3263
|
"onUpdate:open": x[4] || (x[4] = (J) => h.value = J),
|
|
3259
|
-
title:
|
|
3264
|
+
title: F.value,
|
|
3260
3265
|
width: 720,
|
|
3261
3266
|
"body-style": {
|
|
3262
3267
|
maxHeight: "70vh",
|
|
3263
3268
|
overflow: "auto"
|
|
3264
3269
|
},
|
|
3265
|
-
onOk:
|
|
3270
|
+
onOk: xe,
|
|
3266
3271
|
onCancel: x[5] || (x[5] = (J) => r("cancel"))
|
|
3267
3272
|
}, {
|
|
3268
3273
|
default: C(() => [
|
|
3269
3274
|
E(rt, {
|
|
3270
3275
|
ref_key: "formRef",
|
|
3271
3276
|
ref: v,
|
|
3272
|
-
model:
|
|
3273
|
-
rules:
|
|
3274
|
-
class: b(
|
|
3277
|
+
model: f,
|
|
3278
|
+
rules: A,
|
|
3279
|
+
class: b($.$style.sceneForm)
|
|
3275
3280
|
}, {
|
|
3276
3281
|
default: C(() => [
|
|
3277
|
-
t.actionType !== g(
|
|
3282
|
+
t.actionType !== g(ce).search || S.value ? (w(), U(ne, {
|
|
3278
3283
|
key: 0,
|
|
3279
3284
|
label: "场景名称",
|
|
3280
3285
|
name: "name",
|
|
@@ -3282,30 +3287,30 @@ const fo = (t) => {
|
|
|
3282
3287
|
"wrapper-col": { span: 12 }
|
|
3283
3288
|
}, {
|
|
3284
3289
|
default: C(() => [
|
|
3285
|
-
E(
|
|
3286
|
-
value:
|
|
3287
|
-
"onUpdate:value": x[0] || (x[0] = (J) =>
|
|
3290
|
+
E(N, {
|
|
3291
|
+
value: f.name,
|
|
3292
|
+
"onUpdate:value": x[0] || (x[0] = (J) => f.name = J),
|
|
3288
3293
|
placeholder: "请输入"
|
|
3289
3294
|
}, null, 8, ["value"])
|
|
3290
3295
|
]),
|
|
3291
3296
|
_: 1
|
|
3292
|
-
})) :
|
|
3293
|
-
E(
|
|
3297
|
+
})) : R("", !0),
|
|
3298
|
+
E(ne, {
|
|
3294
3299
|
name: "items",
|
|
3295
3300
|
"label-col": { span: 24 },
|
|
3296
3301
|
"wrapper-col": { span: 24 }
|
|
3297
3302
|
}, {
|
|
3298
3303
|
label: C(() => [
|
|
3299
|
-
E(
|
|
3304
|
+
E(ve, null, {
|
|
3300
3305
|
default: C(() => [
|
|
3301
3306
|
x[6] || (x[6] = V("span", null, "筛选条件", -1)),
|
|
3302
|
-
E(
|
|
3307
|
+
E(ie, {
|
|
3303
3308
|
checked: y.value,
|
|
3304
3309
|
"onUpdate:checked": x[1] || (x[1] = (J) => y.value = J),
|
|
3305
|
-
indeterminate:
|
|
3310
|
+
indeterminate: L.value
|
|
3306
3311
|
}, {
|
|
3307
3312
|
default: C(() => [
|
|
3308
|
-
X(" 全选 (" +
|
|
3313
|
+
X(" 全选 (" + me(I.value) + "/" + me(i.value.length) + ") ", 1)
|
|
3309
3314
|
]),
|
|
3310
3315
|
_: 1
|
|
3311
3316
|
}, 8, ["checked", "indeterminate"])
|
|
@@ -3315,59 +3320,59 @@ const fo = (t) => {
|
|
|
3315
3320
|
]),
|
|
3316
3321
|
default: C(() => [
|
|
3317
3322
|
E(pr, {
|
|
3318
|
-
value:
|
|
3319
|
-
"onUpdate:value": x[2] || (x[2] = (J) =>
|
|
3323
|
+
value: f.items,
|
|
3324
|
+
"onUpdate:value": x[2] || (x[2] = (J) => f.items = J),
|
|
3320
3325
|
"add-button-text": "添加筛选条件",
|
|
3321
|
-
"get-new-item-data":
|
|
3326
|
+
"get-new-item-data": q,
|
|
3322
3327
|
"max-length": i.value.length,
|
|
3323
|
-
"delete-button-props":
|
|
3324
|
-
sortButtonProps:
|
|
3325
|
-
onAdd:
|
|
3328
|
+
"delete-button-props": te,
|
|
3329
|
+
sortButtonProps: te,
|
|
3330
|
+
onAdd: oe
|
|
3326
3331
|
}, {
|
|
3327
3332
|
default: C(({ item: J }) => {
|
|
3328
3333
|
var De;
|
|
3329
3334
|
return [
|
|
3330
3335
|
V("div", {
|
|
3331
|
-
class: b(
|
|
3336
|
+
class: b($.$style.queryFieldItem)
|
|
3332
3337
|
}, [
|
|
3333
3338
|
E(nt, {
|
|
3334
3339
|
value: J.name,
|
|
3335
|
-
"onUpdate:value": (
|
|
3340
|
+
"onUpdate:value": (de) => J.name = de,
|
|
3336
3341
|
"show-search": "",
|
|
3337
|
-
options:
|
|
3342
|
+
options: P(J.name),
|
|
3338
3343
|
"field-names": { value: "name" },
|
|
3339
3344
|
"option-filter-prop": "label",
|
|
3340
3345
|
placeholder: "请选择要筛选的字段名",
|
|
3341
3346
|
disabled: (De = a.value[J.name]) == null ? void 0 : De.fixed,
|
|
3342
|
-
class: b(
|
|
3343
|
-
onChange: (
|
|
3347
|
+
class: b($.$style.fieldSelect),
|
|
3348
|
+
onChange: (de) => u(de, J)
|
|
3344
3349
|
}, null, 8, ["value", "onUpdate:value", "options", "disabled", "class", "onChange"]),
|
|
3345
|
-
|
|
3350
|
+
z(J.name) !== void 0 ? (w(), U(ot, {
|
|
3346
3351
|
key: 0,
|
|
3347
|
-
title:
|
|
3352
|
+
title: z(J.name),
|
|
3348
3353
|
placement: "top"
|
|
3349
3354
|
}, {
|
|
3350
3355
|
default: C(() => [
|
|
3351
3356
|
E(g(ht), {
|
|
3352
|
-
class: b([
|
|
3357
|
+
class: b([$.$style.fieldTooltipIcon, $.$style.fieldTooltipIconVisible])
|
|
3353
3358
|
}, null, 8, ["class"])
|
|
3354
3359
|
]),
|
|
3355
3360
|
_: 2
|
|
3356
|
-
}, 1032, ["title"])) : (
|
|
3361
|
+
}, 1032, ["title"])) : (w(), Y("span", {
|
|
3357
3362
|
key: 1,
|
|
3358
|
-
class: b(
|
|
3363
|
+
class: b($.$style.fieldTooltipIconPlaceholder)
|
|
3359
3364
|
}, null, 2)),
|
|
3360
3365
|
V("div", {
|
|
3361
|
-
class: b(
|
|
3366
|
+
class: b($.$style.fieldComponent)
|
|
3362
3367
|
}, [
|
|
3363
|
-
J.name ? (
|
|
3368
|
+
J.name ? (w(), U(Kt, {
|
|
3364
3369
|
key: 0,
|
|
3365
3370
|
value: J.value,
|
|
3366
|
-
"onUpdate:value": (
|
|
3371
|
+
"onUpdate:value": (de) => J.value = de,
|
|
3367
3372
|
"in-modal": "",
|
|
3368
3373
|
"form-item": a.value[J.name],
|
|
3369
|
-
onChange: (
|
|
3370
|
-
}, null, 8, ["value", "onUpdate:value", "form-item", "onChange"])) :
|
|
3374
|
+
onChange: (de) => D(J.name, de)
|
|
3375
|
+
}, null, 8, ["value", "onUpdate:value", "form-item", "onChange"])) : R("", !0)
|
|
3371
3376
|
], 2)
|
|
3372
3377
|
], 2)
|
|
3373
3378
|
];
|
|
@@ -3380,16 +3385,16 @@ const fo = (t) => {
|
|
|
3380
3385
|
]),
|
|
3381
3386
|
_: 1
|
|
3382
3387
|
}, 8, ["model", "rules", "class"]),
|
|
3383
|
-
t.actionType === g(
|
|
3388
|
+
t.actionType === g(ce).search && t.allowCreateScene ? (w(), U(ie, {
|
|
3384
3389
|
key: 0,
|
|
3385
|
-
checked:
|
|
3386
|
-
"onUpdate:checked": x[3] || (x[3] = (J) =>
|
|
3390
|
+
checked: S.value,
|
|
3391
|
+
"onUpdate:checked": x[3] || (x[3] = (J) => S.value = J)
|
|
3387
3392
|
}, {
|
|
3388
3393
|
default: C(() => x[7] || (x[7] = [
|
|
3389
3394
|
X(" 保存为场景 ")
|
|
3390
3395
|
])),
|
|
3391
3396
|
_: 1
|
|
3392
|
-
}, 8, ["checked"])) :
|
|
3397
|
+
}, 8, ["checked"])) : R("", !0)
|
|
3393
3398
|
]),
|
|
3394
3399
|
_: 1
|
|
3395
3400
|
}, 8, ["open", "title"]);
|
|
@@ -3405,7 +3410,7 @@ const fo = (t) => {
|
|
|
3405
3410
|
fieldTooltipIconPlaceholder: Gr
|
|
3406
3411
|
}, Qr = {
|
|
3407
3412
|
$style: Kr
|
|
3408
|
-
}, Xr = /* @__PURE__ */
|
|
3413
|
+
}, Xr = /* @__PURE__ */ _e(Ur, [["__cssModules", Qr]]), Zr = /* @__PURE__ */ he({
|
|
3409
3414
|
__name: "SceneListModal",
|
|
3410
3415
|
props: {
|
|
3411
3416
|
/**
|
|
@@ -3446,23 +3451,23 @@ const fo = (t) => {
|
|
|
3446
3451
|
},
|
|
3447
3452
|
emits: ["cancel", "create", "update", "delete", "sort"],
|
|
3448
3453
|
setup(t, { emit: e }) {
|
|
3449
|
-
const o = t, n = e, r =
|
|
3450
|
-
await o.onDelete(v), r.value = r.value.filter((
|
|
3451
|
-
},
|
|
3454
|
+
const o = t, n = e, r = le(o.list), a = le(!0), i = () => n("cancel"), c = async (v) => {
|
|
3455
|
+
await o.onDelete(v), r.value = r.value.filter((f) => f.code !== v);
|
|
3456
|
+
}, p = () => {
|
|
3452
3457
|
i(), n("create");
|
|
3453
3458
|
}, h = (v) => {
|
|
3454
3459
|
i(), n("update", v);
|
|
3455
|
-
},
|
|
3460
|
+
}, S = () => {
|
|
3456
3461
|
n(
|
|
3457
3462
|
"sort",
|
|
3458
3463
|
r.value.map(({ code: v }) => v)
|
|
3459
3464
|
);
|
|
3460
3465
|
};
|
|
3461
|
-
return (v,
|
|
3462
|
-
const y =
|
|
3463
|
-
return
|
|
3466
|
+
return (v, f) => {
|
|
3467
|
+
const y = T("a-col"), I = T("a-row"), L = T("a-typography-text"), A = T("a-button"), B = T("a-popconfirm"), z = T("a-empty"), q = T("a-modal");
|
|
3468
|
+
return w(), U(q, {
|
|
3464
3469
|
open: a.value,
|
|
3465
|
-
"onUpdate:open":
|
|
3470
|
+
"onUpdate:open": f[0] || (f[0] = (F) => a.value = F),
|
|
3466
3471
|
title: "场景管理",
|
|
3467
3472
|
width: 720,
|
|
3468
3473
|
footer: null,
|
|
@@ -3480,7 +3485,7 @@ const fo = (t) => {
|
|
|
3480
3485
|
span: 16,
|
|
3481
3486
|
class: b(v.$style.col)
|
|
3482
3487
|
}, {
|
|
3483
|
-
default: C(() =>
|
|
3488
|
+
default: C(() => f[1] || (f[1] = [
|
|
3484
3489
|
X(" 场景名称 ")
|
|
3485
3490
|
])),
|
|
3486
3491
|
_: 1
|
|
@@ -3489,7 +3494,7 @@ const fo = (t) => {
|
|
|
3489
3494
|
span: 8,
|
|
3490
3495
|
class: b(v.$style.col)
|
|
3491
3496
|
}, {
|
|
3492
|
-
default: C(() =>
|
|
3497
|
+
default: C(() => f[2] || (f[2] = [
|
|
3493
3498
|
X(" 操作 ")
|
|
3494
3499
|
])),
|
|
3495
3500
|
_: 1
|
|
@@ -3497,14 +3502,14 @@ const fo = (t) => {
|
|
|
3497
3502
|
]),
|
|
3498
3503
|
_: 1
|
|
3499
3504
|
}, 8, ["class"]),
|
|
3500
|
-
r.value.length ? (
|
|
3505
|
+
r.value.length ? (w(), U(g(Ne), {
|
|
3501
3506
|
key: 0,
|
|
3502
3507
|
list: r.value,
|
|
3503
3508
|
"item-key": "id",
|
|
3504
3509
|
handle: ".table-column-draggable-icon",
|
|
3505
|
-
onChange:
|
|
3510
|
+
onChange: S
|
|
3506
3511
|
}, {
|
|
3507
|
-
item: C(({ element:
|
|
3512
|
+
item: C(({ element: F }) => [
|
|
3508
3513
|
E(I, {
|
|
3509
3514
|
class: b(v.$style.sceneListItem)
|
|
3510
3515
|
}, {
|
|
@@ -3514,9 +3519,9 @@ const fo = (t) => {
|
|
|
3514
3519
|
class: b(v.$style.col)
|
|
3515
3520
|
}, {
|
|
3516
3521
|
default: C(() => [
|
|
3517
|
-
E(
|
|
3518
|
-
ellipsis: { tooltip:
|
|
3519
|
-
content:
|
|
3522
|
+
E(L, {
|
|
3523
|
+
ellipsis: { tooltip: F.name },
|
|
3524
|
+
content: F.name
|
|
3520
3525
|
}, null, 8, ["ellipsis", "content"])
|
|
3521
3526
|
]),
|
|
3522
3527
|
_: 2
|
|
@@ -3526,27 +3531,27 @@ const fo = (t) => {
|
|
|
3526
3531
|
class: b(v.$style.col)
|
|
3527
3532
|
}, {
|
|
3528
3533
|
default: C(() => [
|
|
3529
|
-
E(
|
|
3534
|
+
E(A, {
|
|
3530
3535
|
type: "link",
|
|
3531
3536
|
size: "small",
|
|
3532
|
-
onClick: (
|
|
3537
|
+
onClick: (u) => h(F)
|
|
3533
3538
|
}, {
|
|
3534
|
-
default: C(() =>
|
|
3539
|
+
default: C(() => f[3] || (f[3] = [
|
|
3535
3540
|
X(" 编辑 ")
|
|
3536
3541
|
])),
|
|
3537
3542
|
_: 2
|
|
3538
3543
|
}, 1032, ["onClick"]),
|
|
3539
3544
|
E(B, {
|
|
3540
3545
|
title: "确定删除?",
|
|
3541
|
-
onConfirm: (
|
|
3546
|
+
onConfirm: (u) => c(F.code)
|
|
3542
3547
|
}, {
|
|
3543
3548
|
default: C(() => [
|
|
3544
|
-
E(
|
|
3549
|
+
E(A, {
|
|
3545
3550
|
type: "link",
|
|
3546
3551
|
size: "small",
|
|
3547
3552
|
danger: ""
|
|
3548
3553
|
}, {
|
|
3549
|
-
default: C(() =>
|
|
3554
|
+
default: C(() => f[4] || (f[4] = [
|
|
3550
3555
|
X(" 删除 ")
|
|
3551
3556
|
])),
|
|
3552
3557
|
_: 1
|
|
@@ -3554,10 +3559,10 @@ const fo = (t) => {
|
|
|
3554
3559
|
]),
|
|
3555
3560
|
_: 2
|
|
3556
3561
|
}, 1032, ["onConfirm"]),
|
|
3557
|
-
E(
|
|
3562
|
+
E(A, {
|
|
3558
3563
|
type: "text",
|
|
3559
3564
|
size: "small",
|
|
3560
|
-
icon: G(g(
|
|
3565
|
+
icon: G(g(Pe)),
|
|
3561
3566
|
class: b(["table-column-draggable-icon", v.$style.dragIcon])
|
|
3562
3567
|
}, null, 8, ["icon", "class"])
|
|
3563
3568
|
]),
|
|
@@ -3568,22 +3573,22 @@ const fo = (t) => {
|
|
|
3568
3573
|
}, 1032, ["class"])
|
|
3569
3574
|
]),
|
|
3570
3575
|
_: 1
|
|
3571
|
-
}, 8, ["list"])) : (
|
|
3576
|
+
}, 8, ["list"])) : (w(), U(z, {
|
|
3572
3577
|
key: 1,
|
|
3573
3578
|
image: g(On).PRESENTED_IMAGE_SIMPLE
|
|
3574
3579
|
}, null, 8, ["image"]))
|
|
3575
3580
|
], 2),
|
|
3576
|
-
t.allowCreateScene ? (
|
|
3581
|
+
t.allowCreateScene ? (w(), U(A, {
|
|
3577
3582
|
key: 0,
|
|
3578
3583
|
type: "link",
|
|
3579
3584
|
icon: G(g(zt)),
|
|
3580
|
-
onClick:
|
|
3585
|
+
onClick: p
|
|
3581
3586
|
}, {
|
|
3582
|
-
default: C(() =>
|
|
3587
|
+
default: C(() => f[5] || (f[5] = [
|
|
3583
3588
|
X(" 新建场景 ")
|
|
3584
3589
|
])),
|
|
3585
3590
|
_: 1
|
|
3586
|
-
}, 8, ["icon"])) :
|
|
3591
|
+
}, 8, ["icon"])) : R("", !0)
|
|
3587
3592
|
]),
|
|
3588
3593
|
_: 1
|
|
3589
3594
|
}, 8, ["open"]);
|
|
@@ -3597,7 +3602,7 @@ const fo = (t) => {
|
|
|
3597
3602
|
dragIcon: ol
|
|
3598
3603
|
}, ll = {
|
|
3599
3604
|
$style: rl
|
|
3600
|
-
}, al = /* @__PURE__ */
|
|
3605
|
+
}, al = /* @__PURE__ */ _e(Zr, [["__cssModules", ll]]), sl = /* @__PURE__ */ he({
|
|
3601
3606
|
__name: "FormSearchParams",
|
|
3602
3607
|
props: {
|
|
3603
3608
|
/**
|
|
@@ -3651,71 +3656,71 @@ const fo = (t) => {
|
|
|
3651
3656
|
const o = t, n = e, r = zn(
|
|
3652
3657
|
`superTable_formSearch_expanded_${o.superTableID}`,
|
|
3653
3658
|
!0
|
|
3654
|
-
), a =
|
|
3655
|
-
Object.values(o.formConfigMap).filter((B) => B[
|
|
3656
|
-
|
|
3657
|
-
)), i =
|
|
3659
|
+
), a = O(() => Je(
|
|
3660
|
+
Object.values(o.formConfigMap).filter((B) => B[be.selected]),
|
|
3661
|
+
be.orderInScene
|
|
3662
|
+
)), i = O(() => {
|
|
3658
3663
|
const B = [];
|
|
3659
|
-
let
|
|
3660
|
-
for (const
|
|
3661
|
-
const
|
|
3662
|
-
if (
|
|
3664
|
+
let z = 0;
|
|
3665
|
+
for (const q of a.value) {
|
|
3666
|
+
const F = (o.formConfigMap[q.name].span ?? 1) * o.formItemColSpan;
|
|
3667
|
+
if (z + F > 24)
|
|
3663
3668
|
break;
|
|
3664
|
-
B.push(
|
|
3669
|
+
B.push(q), z += F;
|
|
3665
3670
|
}
|
|
3666
3671
|
return B;
|
|
3667
|
-
}), c =
|
|
3668
|
-
if (!(!o.enableScene || o.showResetButton || o.showAdvancedFilterButton ||
|
|
3669
|
-
const
|
|
3670
|
-
return
|
|
3671
|
-
}),
|
|
3672
|
-
n("form-item-change", B,
|
|
3673
|
-
}, v = vt(
|
|
3672
|
+
}), c = O(() => r.value ? a.value : i.value), p = O(() => o.showExpandButton && a.value.length > i.value.length), h = O(() => {
|
|
3673
|
+
if (!(!o.enableScene || o.showResetButton || o.showAdvancedFilterButton || p.value)) return 0;
|
|
3674
|
+
const q = 24 - c.value.reduce((u, P) => u + (o.formConfigMap[P.name].span ?? 1) * o.formItemColSpan, 0) % 24, F = o.formItemColSpan;
|
|
3675
|
+
return q >= F ? q : 24;
|
|
3676
|
+
}), S = (B, z) => {
|
|
3677
|
+
n("form-item-change", B, z);
|
|
3678
|
+
}, v = vt(S, 500), f = (B, z) => {
|
|
3674
3679
|
[
|
|
3675
3680
|
ee.input,
|
|
3676
3681
|
ee.inputNumber,
|
|
3677
3682
|
ee.inputGroup,
|
|
3678
3683
|
ee.inputNumberRange
|
|
3679
|
-
].includes(o.formConfigMap[B].type) ? v(B,
|
|
3684
|
+
].includes(o.formConfigMap[B].type) ? v(B, z) : S(B, z);
|
|
3680
3685
|
}, y = () => {
|
|
3681
3686
|
n("search");
|
|
3682
3687
|
}, I = () => {
|
|
3683
3688
|
n("reset");
|
|
3684
|
-
},
|
|
3689
|
+
}, L = () => {
|
|
3685
3690
|
n("advanced-filter");
|
|
3686
|
-
},
|
|
3691
|
+
}, A = () => {
|
|
3687
3692
|
r.value = !r.value;
|
|
3688
3693
|
};
|
|
3689
|
-
return (B,
|
|
3690
|
-
const
|
|
3691
|
-
return c.value.length ? (
|
|
3694
|
+
return (B, z) => {
|
|
3695
|
+
const q = T("a-col"), F = T("a-button"), u = T("a-row");
|
|
3696
|
+
return c.value.length ? (w(), Y("div", {
|
|
3692
3697
|
key: 0,
|
|
3693
3698
|
class: b([
|
|
3694
3699
|
B.$style.searchParamsWrapper,
|
|
3695
3700
|
{
|
|
3696
|
-
[B.$style.hasActions]: !t.enableScene || t.showResetButton || t.showAdvancedFilterButton ||
|
|
3701
|
+
[B.$style.hasActions]: !t.enableScene || t.showResetButton || t.showAdvancedFilterButton || p.value
|
|
3697
3702
|
}
|
|
3698
3703
|
])
|
|
3699
3704
|
}, [
|
|
3700
|
-
E(
|
|
3705
|
+
E(u, {
|
|
3701
3706
|
gutter: [8, 8],
|
|
3702
3707
|
class: b(B.$style.searchParams)
|
|
3703
3708
|
}, {
|
|
3704
3709
|
default: C(() => [
|
|
3705
|
-
(
|
|
3706
|
-
key:
|
|
3707
|
-
span: (t.formConfigMap[
|
|
3710
|
+
(w(!0), Y(Te, null, mt(c.value, (P) => (w(), U(q, {
|
|
3711
|
+
key: P.name,
|
|
3712
|
+
span: (t.formConfigMap[P.name].span ?? 1) * t.formItemColSpan
|
|
3708
3713
|
}, {
|
|
3709
3714
|
default: C(() => [
|
|
3710
3715
|
E(Kt, {
|
|
3711
|
-
value: t.formConfigMap[
|
|
3712
|
-
"form-item": t.formConfigMap[
|
|
3713
|
-
onChange: (D) =>
|
|
3716
|
+
value: t.formConfigMap[P.name].value,
|
|
3717
|
+
"form-item": t.formConfigMap[P.name],
|
|
3718
|
+
onChange: (D) => f(P.name, D)
|
|
3714
3719
|
}, null, 8, ["value", "form-item", "onChange"])
|
|
3715
3720
|
]),
|
|
3716
3721
|
_: 2
|
|
3717
3722
|
}, 1032, ["span"]))), 128)),
|
|
3718
|
-
!t.enableScene || t.showResetButton || t.showAdvancedFilterButton ||
|
|
3723
|
+
!t.enableScene || t.showResetButton || t.showAdvancedFilterButton || p.value ? (w(), U(q, {
|
|
3719
3724
|
key: 0,
|
|
3720
3725
|
span: h.value,
|
|
3721
3726
|
class: b(B.$style.searchActions)
|
|
@@ -3724,56 +3729,56 @@ const fo = (t) => {
|
|
|
3724
3729
|
V("div", {
|
|
3725
3730
|
class: b(B.$style.searchActionsWrapper)
|
|
3726
3731
|
}, [
|
|
3727
|
-
t.showAdvancedFilterButton ? (
|
|
3732
|
+
t.showAdvancedFilterButton ? (w(), U(F, {
|
|
3728
3733
|
key: 0,
|
|
3729
3734
|
type: "primary",
|
|
3730
3735
|
ghost: "",
|
|
3731
|
-
onClick:
|
|
3736
|
+
onClick: L
|
|
3732
3737
|
}, {
|
|
3733
|
-
default: C(() =>
|
|
3738
|
+
default: C(() => z[0] || (z[0] = [
|
|
3734
3739
|
X(" 高级筛选 ")
|
|
3735
3740
|
])),
|
|
3736
3741
|
_: 1
|
|
3737
|
-
})) :
|
|
3738
|
-
!t.enableScene && t.showResetButton ? (
|
|
3742
|
+
})) : R("", !0),
|
|
3743
|
+
!t.enableScene && t.showResetButton ? (w(), U(F, {
|
|
3739
3744
|
key: 1,
|
|
3740
3745
|
onClick: I
|
|
3741
3746
|
}, {
|
|
3742
|
-
default: C(() =>
|
|
3747
|
+
default: C(() => z[1] || (z[1] = [
|
|
3743
3748
|
X(" 重置 ")
|
|
3744
3749
|
])),
|
|
3745
3750
|
_: 1
|
|
3746
|
-
})) :
|
|
3747
|
-
t.enableScene ?
|
|
3751
|
+
})) : R("", !0),
|
|
3752
|
+
t.enableScene ? R("", !0) : (w(), U(F, {
|
|
3748
3753
|
key: 2,
|
|
3749
3754
|
type: "primary",
|
|
3750
3755
|
loading: t.loading,
|
|
3751
3756
|
onClick: y
|
|
3752
3757
|
}, {
|
|
3753
|
-
default: C(() =>
|
|
3758
|
+
default: C(() => z[2] || (z[2] = [
|
|
3754
3759
|
X(" 查询 ")
|
|
3755
3760
|
])),
|
|
3756
3761
|
_: 1
|
|
3757
3762
|
}, 8, ["loading"])),
|
|
3758
|
-
|
|
3763
|
+
p.value ? (w(), U(F, {
|
|
3759
3764
|
key: 3,
|
|
3760
3765
|
type: "link",
|
|
3761
3766
|
icon: g(r) ? G(g(Fn)) : G(g(Ut)),
|
|
3762
|
-
onClick:
|
|
3767
|
+
onClick: A
|
|
3763
3768
|
}, {
|
|
3764
3769
|
default: C(() => [
|
|
3765
|
-
X(
|
|
3770
|
+
X(me(g(r) ? "收起" : "展开"), 1)
|
|
3766
3771
|
]),
|
|
3767
3772
|
_: 1
|
|
3768
|
-
}, 8, ["icon"])) :
|
|
3773
|
+
}, 8, ["icon"])) : R("", !0)
|
|
3769
3774
|
], 2)
|
|
3770
3775
|
]),
|
|
3771
3776
|
_: 1
|
|
3772
|
-
}, 8, ["span", "class"])) :
|
|
3777
|
+
}, 8, ["span", "class"])) : R("", !0)
|
|
3773
3778
|
]),
|
|
3774
3779
|
_: 1
|
|
3775
3780
|
}, 8, ["class"])
|
|
3776
|
-
], 2)) :
|
|
3781
|
+
], 2)) : R("", !0);
|
|
3777
3782
|
};
|
|
3778
3783
|
}
|
|
3779
3784
|
}), il = "_searchParamsWrapper_mo3ie_1", cl = "_hasActions_mo3ie_6", ul = "_searchParams_mo3ie_1", dl = "_searchActionsWrapper_mo3ie_14", pl = {
|
|
@@ -3781,9 +3786,9 @@ const fo = (t) => {
|
|
|
3781
3786
|
hasActions: cl,
|
|
3782
3787
|
searchParams: ul,
|
|
3783
3788
|
searchActionsWrapper: dl
|
|
3784
|
-
},
|
|
3789
|
+
}, fl = {
|
|
3785
3790
|
$style: pl
|
|
3786
|
-
},
|
|
3791
|
+
}, ml = /* @__PURE__ */ _e(sl, [["__cssModules", fl]]);
|
|
3787
3792
|
Ue.locale("zh-cn");
|
|
3788
3793
|
function Dt(t) {
|
|
3789
3794
|
return Array.from(document.body.children).includes(t);
|
|
@@ -3802,7 +3807,7 @@ class hl {
|
|
|
3802
3807
|
}
|
|
3803
3808
|
// 注册dialog
|
|
3804
3809
|
register(e, o) {
|
|
3805
|
-
this.dialogs[e] || (this.dialogs[e] =
|
|
3810
|
+
this.dialogs[e] || (this.dialogs[e] = he(o));
|
|
3806
3811
|
}
|
|
3807
3812
|
// 注销dialog
|
|
3808
3813
|
unregister(e) {
|
|
@@ -3815,9 +3820,9 @@ class hl {
|
|
|
3815
3820
|
console.error(`Dialog "${e}" is not existing, please register it firstly.`);
|
|
3816
3821
|
return;
|
|
3817
3822
|
}
|
|
3818
|
-
const c = document.createElement("div"),
|
|
3819
|
-
c.setAttribute("id",
|
|
3820
|
-
const h =
|
|
3823
|
+
const c = document.createElement("div"), p = `dialog_${jn()}`;
|
|
3824
|
+
c.setAttribute("id", p), document.body.appendChild(c);
|
|
3825
|
+
const h = fn({
|
|
3821
3826
|
data() {
|
|
3822
3827
|
return {
|
|
3823
3828
|
open: !0
|
|
@@ -3827,12 +3832,12 @@ class hl {
|
|
|
3827
3832
|
return G(
|
|
3828
3833
|
Tn,
|
|
3829
3834
|
{
|
|
3830
|
-
key:
|
|
3835
|
+
key: p,
|
|
3831
3836
|
locale: Vt
|
|
3832
3837
|
},
|
|
3833
3838
|
() => [
|
|
3834
3839
|
G(i, {
|
|
3835
|
-
key:
|
|
3840
|
+
key: p,
|
|
3836
3841
|
destroyOnClose: !0,
|
|
3837
3842
|
...n,
|
|
3838
3843
|
open: this.open,
|
|
@@ -3846,8 +3851,8 @@ class hl {
|
|
|
3846
3851
|
}
|
|
3847
3852
|
}).use(Cn);
|
|
3848
3853
|
r == null || r(h);
|
|
3849
|
-
const
|
|
3850
|
-
return a == null || a(
|
|
3854
|
+
const S = h.mount(`#${p}`);
|
|
3855
|
+
return a == null || a(S), S.$watch("open", (v) => {
|
|
3851
3856
|
v || this.destroy();
|
|
3852
3857
|
}), this.currents.push(h), h;
|
|
3853
3858
|
}
|
|
@@ -3880,7 +3885,7 @@ function Mt(t, e) {
|
|
|
3880
3885
|
function a(i) {
|
|
3881
3886
|
Re.open(o, i);
|
|
3882
3887
|
}
|
|
3883
|
-
return
|
|
3888
|
+
return mn(() => {
|
|
3884
3889
|
Re.unregister(o);
|
|
3885
3890
|
}), {
|
|
3886
3891
|
open: n,
|
|
@@ -3940,7 +3945,7 @@ const We = 2e3, yl = (t) => {
|
|
|
3940
3945
|
updateScene: async () => t,
|
|
3941
3946
|
deleteScene: async () => t
|
|
3942
3947
|
};
|
|
3943
|
-
}, gl = ["innerHTML"], bl = /* @__PURE__ */
|
|
3948
|
+
}, gl = ["innerHTML"], bl = /* @__PURE__ */ he({
|
|
3944
3949
|
__name: "SuperTable",
|
|
3945
3950
|
props: {
|
|
3946
3951
|
/**
|
|
@@ -4082,94 +4087,94 @@ const We = 2e3, yl = (t) => {
|
|
|
4082
4087
|
},
|
|
4083
4088
|
emits: ["sort-change", "row-sort-end", "form-item-change", "scene-change", "change", "expand", "expandedRowsChange", "resize-column"],
|
|
4084
4089
|
setup(t, { expose: e, emit: o }) {
|
|
4085
|
-
var
|
|
4090
|
+
var St, wt;
|
|
4086
4091
|
Ue.locale("zh-cn");
|
|
4087
|
-
const n = t, r = o, a =
|
|
4088
|
-
var s,
|
|
4092
|
+
const n = t, r = o, a = le(!1), i = O(() => {
|
|
4093
|
+
var s, m, _;
|
|
4089
4094
|
const l = (s = hn()) == null ? void 0 : s.appContext.app;
|
|
4090
|
-
return !!((_ = (
|
|
4091
|
-
}), c =
|
|
4092
|
-
(l, s) => (l[s.key] =
|
|
4095
|
+
return !!((_ = (m = l == null ? void 0 : l.config) == null ? void 0 : m.globalProperties) != null && _.$router);
|
|
4096
|
+
}), c = le(), { openByConfig: p } = Mt(Xr), { openByConfig: h } = Mt(al), S = Bt(n.columns).reduce(
|
|
4097
|
+
(l, s) => (l[s.key] = Ae(s, gt), l),
|
|
4093
4098
|
{}
|
|
4094
|
-
), v = Gt([location.hostname, location.pathname, n.sceneType].join("")),
|
|
4099
|
+
), v = Gt([location.hostname, location.pathname, n.sceneType].join("")), f = qn(`superTable_${v}`, {
|
|
4095
4100
|
pathname: location.pathname,
|
|
4096
4101
|
sceneCode: null,
|
|
4097
4102
|
sceneSort: [],
|
|
4098
4103
|
sceneList: [],
|
|
4099
|
-
columnConfig:
|
|
4100
|
-
}), y =
|
|
4101
|
-
getScenes: () =>
|
|
4104
|
+
columnConfig: S
|
|
4105
|
+
}), y = O(() => n.enableScene ? n.sceneStorageType === "api" ? n.sceneRequest ? n.sceneRequest : (console.error('SuperTable: sceneStorageType 为 "api" 时,必须提供 sceneRequest 配置'), Rt()) : yl({
|
|
4106
|
+
getScenes: () => f.value.sceneList,
|
|
4102
4107
|
setScenes: (l) => {
|
|
4103
|
-
|
|
4108
|
+
f.value.sceneList = l;
|
|
4104
4109
|
}
|
|
4105
|
-
}) : Rt()), I =
|
|
4110
|
+
}) : Rt()), I = le(!1), L = O(() => Object.keys(n.customQueryParams).length > 0), A = le(!1), B = O(() => {
|
|
4106
4111
|
var l;
|
|
4107
4112
|
return ((l = n.tableProps) == null ? void 0 : l.pagination) === !1;
|
|
4108
|
-
}),
|
|
4113
|
+
}), z = vt(async () => {
|
|
4109
4114
|
try {
|
|
4110
4115
|
Z.loading = !0;
|
|
4111
4116
|
const l = {
|
|
4112
4117
|
...Et(),
|
|
4113
4118
|
...n.customQueryParams
|
|
4114
|
-
}, { total: s, data:
|
|
4119
|
+
}, { total: s, data: m } = await n.request({
|
|
4115
4120
|
params: l,
|
|
4116
4121
|
...B.value ? {} : {
|
|
4117
4122
|
pageSize: Z.pagination.pageSize,
|
|
4118
4123
|
pageNum: Z.pagination.current
|
|
4119
4124
|
}
|
|
4120
4125
|
});
|
|
4121
|
-
Z.dataSource =
|
|
4126
|
+
Z.dataSource = m, B.value || (Z.pagination.total = s);
|
|
4122
4127
|
} catch (l) {
|
|
4123
4128
|
Z.dataSource = [], console.error(l);
|
|
4124
4129
|
} finally {
|
|
4125
4130
|
Z.loading = !1;
|
|
4126
4131
|
}
|
|
4127
|
-
}, n.debounceWait),
|
|
4128
|
-
n.enableScene && !D.loaded || !l && !n.enableScene && !n.autoSearch || (B.value || (Z.pagination.current = 1),
|
|
4129
|
-
},
|
|
4130
|
-
|
|
4131
|
-
},
|
|
4132
|
-
for (const s in
|
|
4133
|
-
const
|
|
4134
|
-
|
|
4132
|
+
}, n.debounceWait), q = (l = !1) => {
|
|
4133
|
+
n.enableScene && !D.loaded || !l && !n.enableScene && !n.autoSearch || (B.value || (Z.pagination.current = 1), z());
|
|
4134
|
+
}, F = () => {
|
|
4135
|
+
q(!0);
|
|
4136
|
+
}, u = le({}), P = (l = []) => {
|
|
4137
|
+
for (const s in u.value) {
|
|
4138
|
+
const m = u.value[s], _ = l.find((k) => k.name === s);
|
|
4139
|
+
m.value = _ ? _.value : m._defaultValue, m[be.selected] = !!_, m[be.orderInScene] = _ ? l.findIndex((k) => k.name === (_ == null ? void 0 : _.name)) : void 0;
|
|
4135
4140
|
}
|
|
4136
|
-
|
|
4141
|
+
q();
|
|
4137
4142
|
}, D = Xe({
|
|
4138
4143
|
list: [],
|
|
4139
4144
|
loading: !1,
|
|
4140
4145
|
submiting: !1,
|
|
4141
4146
|
loaded: !1
|
|
4142
|
-
}),
|
|
4147
|
+
}), oe = O(() => Fe(Ce(n.defaultScene)).filter(Boolean).map(({ name: s = "默认场景", code: m = "default_scene", items: _ }) => ({
|
|
4143
4148
|
name: s,
|
|
4144
|
-
code:
|
|
4149
|
+
code: m,
|
|
4145
4150
|
isCustom: !0,
|
|
4146
|
-
items: _.filter((
|
|
4147
|
-
var
|
|
4151
|
+
items: _.filter((k) => !!u.value[k.name]).map((k) => {
|
|
4152
|
+
var j;
|
|
4148
4153
|
return {
|
|
4149
|
-
name:
|
|
4150
|
-
value:
|
|
4151
|
-
type: (
|
|
4154
|
+
name: k.name,
|
|
4155
|
+
value: k.value ?? u.value[k.name]._defaultValue,
|
|
4156
|
+
type: (j = u.value[k.name]) == null ? void 0 : j.type
|
|
4152
4157
|
};
|
|
4153
4158
|
})
|
|
4154
|
-
}))),
|
|
4155
|
-
const l = Object.values(
|
|
4156
|
-
return Je(
|
|
4159
|
+
}))), xe = O(() => {
|
|
4160
|
+
const l = Object.values(u.value).filter((_) => _.visible !== !1), s = l.filter((_) => _.fixed || _.selected), m = s.length ? s : l;
|
|
4161
|
+
return Je(m, be.order).map((_) => ({
|
|
4157
4162
|
name: _.name,
|
|
4158
4163
|
value: _.value ?? _._defaultValue,
|
|
4159
4164
|
type: _.type
|
|
4160
4165
|
}));
|
|
4161
4166
|
});
|
|
4162
|
-
|
|
4167
|
+
$e(
|
|
4163
4168
|
() => n.formItems,
|
|
4164
4169
|
() => {
|
|
4165
|
-
const l = Ft(
|
|
4166
|
-
Object.keys(
|
|
4167
|
-
s.has(
|
|
4168
|
-
}), l.forEach((
|
|
4169
|
-
const _ = { ...
|
|
4170
|
-
_.component && (_.component = yn(_.component)),
|
|
4170
|
+
const l = Ft(Ce(n.formItems)), s = new Set(l.map((m) => m.name));
|
|
4171
|
+
Object.keys(u.value).forEach((m) => {
|
|
4172
|
+
s.has(m) || (u.value[m][be.selected] = !1);
|
|
4173
|
+
}), l.forEach((m) => {
|
|
4174
|
+
const _ = { ...m };
|
|
4175
|
+
_.component && (_.component = yn(_.component)), u.value[m.name] ? u.value[m.name] = Un(Ce(u.value[m.name]), _) : u.value[m.name] = {
|
|
4171
4176
|
..._,
|
|
4172
|
-
[
|
|
4177
|
+
[be.selected]: !n.enableScene && _.visible !== !1
|
|
4173
4178
|
};
|
|
4174
4179
|
});
|
|
4175
4180
|
},
|
|
@@ -4178,48 +4183,48 @@ const We = 2e3, yl = (t) => {
|
|
|
4178
4183
|
deep: !0
|
|
4179
4184
|
}
|
|
4180
4185
|
);
|
|
4181
|
-
const
|
|
4186
|
+
const Ee = async () => {
|
|
4182
4187
|
try {
|
|
4183
4188
|
D.loading = !0;
|
|
4184
|
-
const { code: l, data: s = [], msg:
|
|
4189
|
+
const { code: l, data: s = [], msg: m } = await y.value.querySceneList({ type: v });
|
|
4185
4190
|
if (l === 2e3) {
|
|
4186
|
-
const _ = D.list.find((
|
|
4187
|
-
if (D.list =
|
|
4188
|
-
const
|
|
4189
|
-
|
|
4191
|
+
const _ = D.list.find((j) => j.code === f.value.sceneCode);
|
|
4192
|
+
if (D.list = fo(s, u.value, f.value.sceneSort), !D.loaded && !f.value.sceneCode && oe.value.length > 0) {
|
|
4193
|
+
const j = oe.value[0];
|
|
4194
|
+
f.value.sceneCode = j.code, P(j.items), D.loaded = !0, z();
|
|
4190
4195
|
return;
|
|
4191
4196
|
}
|
|
4192
|
-
const
|
|
4193
|
-
if (!D.loaded &&
|
|
4194
|
-
|
|
4195
|
-
const
|
|
4197
|
+
const k = D.list.find((j) => j.code === f.value.sceneCode);
|
|
4198
|
+
if (!D.loaded && L.value) {
|
|
4199
|
+
f.value.sceneCode = null, D.loaded = !0;
|
|
4200
|
+
const j = Object.entries(n.customQueryParams).map(([pe, it]) => {
|
|
4196
4201
|
var He;
|
|
4197
4202
|
return {
|
|
4198
|
-
name:
|
|
4203
|
+
name: pe,
|
|
4199
4204
|
value: it,
|
|
4200
|
-
type: (He =
|
|
4205
|
+
type: (He = u.value[pe]) == null ? void 0 : He.type
|
|
4201
4206
|
};
|
|
4202
4207
|
});
|
|
4203
|
-
|
|
4208
|
+
P(j);
|
|
4204
4209
|
return;
|
|
4205
4210
|
}
|
|
4206
|
-
(!D.loaded || _ && _.value !== (
|
|
4211
|
+
(!D.loaded || _ && _.value !== (k == null ? void 0 : k.value)) && P(k == null ? void 0 : k.items), D.loaded = !0;
|
|
4207
4212
|
} else
|
|
4208
|
-
dt.error(
|
|
4213
|
+
dt.error(m);
|
|
4209
4214
|
} finally {
|
|
4210
4215
|
D.loading = !1;
|
|
4211
4216
|
}
|
|
4212
|
-
},
|
|
4217
|
+
}, te = ({ code: l, msg: s }) => l === 2e3 ? (dt.success("操作成功"), Ee(), Promise.resolve(s)) : (dt.error(s), Promise.reject(s)), ye = async ({ name: l, items: s }) => {
|
|
4213
4218
|
try {
|
|
4214
|
-
const
|
|
4219
|
+
const m = await y.value.createScene({
|
|
4215
4220
|
type: v,
|
|
4216
4221
|
name: l,
|
|
4217
4222
|
value: JSON.stringify(s),
|
|
4218
4223
|
asPrivate: !0
|
|
4219
4224
|
});
|
|
4220
|
-
|
|
4221
|
-
} catch (
|
|
4222
|
-
return Promise.reject(
|
|
4225
|
+
f.value.sceneCode = m == null ? void 0 : m.data, te(m);
|
|
4226
|
+
} catch (m) {
|
|
4227
|
+
return Promise.reject(m);
|
|
4223
4228
|
}
|
|
4224
4229
|
}, Be = async (l) => {
|
|
4225
4230
|
try {
|
|
@@ -4228,38 +4233,38 @@ const We = 2e3, yl = (t) => {
|
|
|
4228
4233
|
name: l.name,
|
|
4229
4234
|
value: JSON.stringify(l.items)
|
|
4230
4235
|
});
|
|
4231
|
-
return
|
|
4236
|
+
return te(s);
|
|
4232
4237
|
} catch (s) {
|
|
4233
4238
|
return Promise.reject(s);
|
|
4234
4239
|
}
|
|
4235
|
-
},
|
|
4240
|
+
}, M = async (l) => {
|
|
4236
4241
|
try {
|
|
4237
4242
|
const s = await y.value.deleteScene([l]);
|
|
4238
|
-
s.code === 2e3 && (
|
|
4243
|
+
s.code === 2e3 && (f.value.sceneCode = null, l === f.value.sceneCode && (P([]), f.value.sceneCode = void 0)), te(s);
|
|
4239
4244
|
} catch (s) {
|
|
4240
4245
|
return Promise.reject(s);
|
|
4241
4246
|
}
|
|
4242
|
-
},
|
|
4243
|
-
|
|
4244
|
-
() => [
|
|
4247
|
+
}, ae = O(() => D.list.length < n.maxSceneCount);
|
|
4248
|
+
$e(
|
|
4249
|
+
() => [f.value.sceneCode, D.list],
|
|
4245
4250
|
() => {
|
|
4246
|
-
if (
|
|
4247
|
-
|
|
4251
|
+
if (L.value && !A.value) {
|
|
4252
|
+
A.value = !0;
|
|
4248
4253
|
return;
|
|
4249
4254
|
}
|
|
4250
|
-
const l = [...
|
|
4251
|
-
(s) => s.code ===
|
|
4255
|
+
const l = [...oe.value, ...D.list].find(
|
|
4256
|
+
(s) => s.code === f.value.sceneCode
|
|
4252
4257
|
);
|
|
4253
|
-
|
|
4258
|
+
P((l == null ? void 0 : l.items) ?? []);
|
|
4254
4259
|
}
|
|
4255
4260
|
);
|
|
4256
|
-
const tt =
|
|
4261
|
+
const tt = O(() => `super_table_row_${v}`), ze = gn(), Z = Xe({
|
|
4257
4262
|
...n.tableProps,
|
|
4258
4263
|
dataSource: [],
|
|
4259
4264
|
columns: [],
|
|
4260
4265
|
loading: !1,
|
|
4261
4266
|
rowKey: "id",
|
|
4262
|
-
pagination: typeof ((
|
|
4267
|
+
pagination: typeof ((St = n.tableProps) == null ? void 0 : St.pagination) == "boolean" ? n.tableProps.pagination : {
|
|
4263
4268
|
total: 0,
|
|
4264
4269
|
pageSize: 20,
|
|
4265
4270
|
current: 1,
|
|
@@ -4268,12 +4273,12 @@ const We = 2e3, yl = (t) => {
|
|
|
4268
4273
|
showTotal: (l) => `共${l}条数据`,
|
|
4269
4274
|
...Ze(n.tableProps, "pagination", {}),
|
|
4270
4275
|
onShowSizeChange: (l, s) => {
|
|
4271
|
-
var
|
|
4272
|
-
((
|
|
4276
|
+
var m, _, k, j;
|
|
4277
|
+
((m = n.tableProps) == null ? void 0 : m.pagination) !== !1 && ((j = (k = (_ = n.tableProps) == null ? void 0 : _.pagination) == null ? void 0 : k.onShowSizeChange) == null || j.call(k, 1, s));
|
|
4273
4278
|
},
|
|
4274
4279
|
onChange: (l, s) => {
|
|
4275
|
-
var
|
|
4276
|
-
Z.pagination.current = s !== Z.pagination.pageSize ? 1 : l, Z.pagination.pageSize = s, ((
|
|
4280
|
+
var m, _, k, j;
|
|
4281
|
+
Z.pagination.current = s !== Z.pagination.pageSize ? 1 : l, Z.pagination.pageSize = s, ((m = n.tableProps) == null ? void 0 : m.pagination) !== !1 && ((j = (k = (_ = n.tableProps) == null ? void 0 : _.pagination) == null ? void 0 : k.onChange) == null || j.call(k, l, s)), z();
|
|
4277
4282
|
}
|
|
4278
4283
|
},
|
|
4279
4284
|
tableLayout: "fixed",
|
|
@@ -4281,59 +4286,59 @@ const We = 2e3, yl = (t) => {
|
|
|
4281
4286
|
x: "100%",
|
|
4282
4287
|
y: Math.max(500, window.innerWidth * 0.8),
|
|
4283
4288
|
scrollToFirstRowOnChange: !0,
|
|
4284
|
-
...((
|
|
4289
|
+
...((wt = n.tableProps) == null ? void 0 : wt.scroll) ?? {}
|
|
4285
4290
|
},
|
|
4286
|
-
rowClassName: (l, s,
|
|
4287
|
-
var
|
|
4291
|
+
rowClassName: (l, s, m) => {
|
|
4292
|
+
var j;
|
|
4288
4293
|
let _ = "";
|
|
4289
|
-
const
|
|
4290
|
-
return
|
|
4294
|
+
const k = (j = n.tableProps) == null ? void 0 : j.rowClassName;
|
|
4295
|
+
return ke(k) ? _ = k(l, s, m) : typeof k == "string" && (_ = k), [_, tt.value].join(" ");
|
|
4291
4296
|
}
|
|
4292
|
-
}), qe =
|
|
4297
|
+
}), qe = O(() => {
|
|
4293
4298
|
try {
|
|
4294
|
-
return n.formatDataSource(
|
|
4299
|
+
return n.formatDataSource(Ce(Z.dataSource));
|
|
4295
4300
|
} catch {
|
|
4296
|
-
return
|
|
4301
|
+
return Ce(Z.dataSource);
|
|
4297
4302
|
}
|
|
4298
|
-
}),
|
|
4303
|
+
}), $ = (l) => {
|
|
4299
4304
|
const s = Z.rowKey;
|
|
4300
4305
|
if (typeof s == "string")
|
|
4301
4306
|
return l == null ? void 0 : l[s];
|
|
4302
4307
|
if (typeof s == "function")
|
|
4303
4308
|
return s(l);
|
|
4304
|
-
}, x =
|
|
4305
|
-
const s =
|
|
4309
|
+
}, x = O(() => Bt(n.columns).map((l) => {
|
|
4310
|
+
const s = f.value.columnConfig[l.key], m = { ...l };
|
|
4306
4311
|
return gt.forEach((_) => {
|
|
4307
|
-
_ !== "key" && (s == null ? void 0 : s[_]) !== void 0 && (
|
|
4308
|
-
}),
|
|
4309
|
-
})),
|
|
4312
|
+
_ !== "key" && (s == null ? void 0 : s[_]) !== void 0 && (m[_] = s[_]);
|
|
4313
|
+
}), m;
|
|
4314
|
+
})), N = (l, s) => {
|
|
4310
4315
|
var _;
|
|
4311
|
-
|
|
4312
|
-
...
|
|
4316
|
+
f.value.columnConfig[s.key] = {
|
|
4317
|
+
...f.value.columnConfig[s.key] ?? {},
|
|
4313
4318
|
width: l
|
|
4314
4319
|
}, r("resize-column", l, s);
|
|
4315
|
-
const
|
|
4316
|
-
(_ =
|
|
4317
|
-
},
|
|
4318
|
-
var
|
|
4319
|
-
const
|
|
4320
|
-
r("change", l, s,
|
|
4321
|
-
},
|
|
4322
|
-
var
|
|
4323
|
-
r("expand", l, s), (_ = (
|
|
4320
|
+
const m = n.tableProps;
|
|
4321
|
+
(_ = m == null ? void 0 : m.onResizeColumn) == null || _.call(m, l, s);
|
|
4322
|
+
}, ne = (l) => Array.isArray(l) ? l.map((s) => (s == null ? void 0 : s.field) == null && (s == null ? void 0 : s.columnKey) != null ? { ...s, field: s.columnKey } : s) : (l == null ? void 0 : l.field) == null && (l == null ? void 0 : l.columnKey) != null ? { ...l, field: l.columnKey } : l, ie = (l, s, m, _) => {
|
|
4323
|
+
var j, pe;
|
|
4324
|
+
const k = ne(m);
|
|
4325
|
+
r("change", l, s, k, _), (pe = (j = n.tableProps) == null ? void 0 : j.onChange) == null || pe.call(j, l, s, k, _);
|
|
4326
|
+
}, ve = (l, s) => {
|
|
4327
|
+
var m, _;
|
|
4328
|
+
r("expand", l, s), (_ = (m = n.tableProps) == null ? void 0 : m.onExpand) == null || _.call(m, l, s);
|
|
4324
4329
|
}, nt = (l) => {
|
|
4325
|
-
var s,
|
|
4326
|
-
r("expandedRowsChange", l), (
|
|
4330
|
+
var s, m;
|
|
4331
|
+
r("expandedRowsChange", l), (m = (s = n.tableProps) == null ? void 0 : s.onExpandedRowsChange) == null || m.call(s, l);
|
|
4327
4332
|
}, ot = (l) => {
|
|
4328
|
-
l.length === 0 ?
|
|
4329
|
-
(s,
|
|
4330
|
-
...
|
|
4333
|
+
l.length === 0 ? f.value.columnConfig = {} : f.value.columnConfig = l.reduce(
|
|
4334
|
+
(s, m, _) => (s[m.key] = {
|
|
4335
|
+
...m,
|
|
4331
4336
|
index: _
|
|
4332
4337
|
}, s),
|
|
4333
4338
|
{}
|
|
4334
4339
|
);
|
|
4335
4340
|
};
|
|
4336
|
-
|
|
4341
|
+
$e(
|
|
4337
4342
|
() => [x.value, n.sortable],
|
|
4338
4343
|
() => {
|
|
4339
4344
|
const l = {
|
|
@@ -4342,12 +4347,12 @@ const We = 2e3, yl = (t) => {
|
|
|
4342
4347
|
title: "",
|
|
4343
4348
|
fixed: "left",
|
|
4344
4349
|
width: 60
|
|
4345
|
-
}, s = x.value.filter(({ visible:
|
|
4350
|
+
}, s = x.value.filter(({ visible: j }) => j), m = s.filter((j) => j.fixed === "left").sort((j, pe) => j.index - pe.index), _ = s.filter((j) => !j.fixed).sort((j, pe) => j.index - pe.index), k = s.filter((j) => j.fixed === "right").sort((j, pe) => j.index - pe.index);
|
|
4346
4351
|
Z.columns = [
|
|
4347
4352
|
...n.sortable ? [l] : [],
|
|
4348
|
-
...
|
|
4353
|
+
...m,
|
|
4349
4354
|
..._,
|
|
4350
|
-
...
|
|
4355
|
+
...k
|
|
4351
4356
|
];
|
|
4352
4357
|
},
|
|
4353
4358
|
{
|
|
@@ -4357,10 +4362,10 @@ const We = 2e3, yl = (t) => {
|
|
|
4357
4362
|
);
|
|
4358
4363
|
const rt = () => new Promise((l) => {
|
|
4359
4364
|
const s = () => {
|
|
4360
|
-
var _,
|
|
4361
|
-
const
|
|
4362
|
-
if (
|
|
4363
|
-
l(
|
|
4365
|
+
var _, k;
|
|
4366
|
+
const m = (k = (_ = ze.value) == null ? void 0 : _.$el) == null ? void 0 : k.querySelector(".ant-table-tbody");
|
|
4367
|
+
if (m) {
|
|
4368
|
+
l(m);
|
|
4364
4369
|
return;
|
|
4365
4370
|
}
|
|
4366
4371
|
requestAnimationFrame(s);
|
|
@@ -4372,44 +4377,44 @@ const We = 2e3, yl = (t) => {
|
|
|
4372
4377
|
animation: 150,
|
|
4373
4378
|
handle: ".super-table-column-draggable-handle",
|
|
4374
4379
|
setData: (s) => {
|
|
4375
|
-
const
|
|
4376
|
-
|
|
4380
|
+
const m = new Image();
|
|
4381
|
+
m.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", s.setDragImage(m, 0, 0);
|
|
4377
4382
|
},
|
|
4378
4383
|
onEnd: (s) => {
|
|
4379
|
-
const { oldIndex:
|
|
4380
|
-
if (
|
|
4381
|
-
const
|
|
4382
|
-
|
|
4384
|
+
const { oldIndex: m, newIndex: _ } = s;
|
|
4385
|
+
if (m === void 0 || _ === void 0) return;
|
|
4386
|
+
const k = Ce(Z.dataSource), [j] = k.splice(m, 1);
|
|
4387
|
+
k.splice(_, 0, j), r("row-sort-end", k);
|
|
4383
4388
|
}
|
|
4384
4389
|
});
|
|
4385
4390
|
}, J = (l, s) => {
|
|
4386
|
-
|
|
4391
|
+
u.value[l].value = s, r("form-item-change", l, s, Ce(u.value[l]), at, st), u.value[l].quiet !== !0 && n.enableScene && q();
|
|
4387
4392
|
}, De = () => {
|
|
4388
|
-
for (const l in
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
},
|
|
4393
|
+
for (const l in u.value)
|
|
4394
|
+
u.value[l].value = u.value[l]._defaultValue;
|
|
4395
|
+
q();
|
|
4396
|
+
}, de = (l, s) => {
|
|
4392
4397
|
I.value = !1;
|
|
4393
|
-
let
|
|
4394
|
-
l ===
|
|
4398
|
+
let m = Ce(u.value);
|
|
4399
|
+
l === ce.create && (m = Ft(n.formItems).reduce((_, k) => (_[k.name] = k, _), {})), p({
|
|
4395
4400
|
props: {
|
|
4396
4401
|
ref: c,
|
|
4397
4402
|
currentScene: s,
|
|
4398
4403
|
actionType: l,
|
|
4399
|
-
formConfigMap:
|
|
4400
|
-
onCreate:
|
|
4404
|
+
formConfigMap: m,
|
|
4405
|
+
onCreate: ye,
|
|
4401
4406
|
onUpdate: Be,
|
|
4402
|
-
allowCreateScene: n.enableScene ? g(
|
|
4407
|
+
allowCreateScene: n.enableScene ? g(ae) : !1,
|
|
4403
4408
|
onUpdateFormConfig: (_) => {
|
|
4404
|
-
_.forEach((
|
|
4405
|
-
je(
|
|
4409
|
+
_.forEach((k) => {
|
|
4410
|
+
je(u.value, k.name, k);
|
|
4406
4411
|
});
|
|
4407
4412
|
},
|
|
4408
4413
|
onSearch: (_) => {
|
|
4409
|
-
|
|
4414
|
+
P(_);
|
|
4410
4415
|
},
|
|
4411
|
-
onFormItemChange(_,
|
|
4412
|
-
r("form-item-change", _,
|
|
4416
|
+
onFormItemChange(_, k) {
|
|
4417
|
+
r("form-item-change", _, k, Ce(u.value[_]), at, st);
|
|
4413
4418
|
},
|
|
4414
4419
|
onCancel() {
|
|
4415
4420
|
c.value = void 0;
|
|
@@ -4420,43 +4425,43 @@ const We = 2e3, yl = (t) => {
|
|
|
4420
4425
|
I.value = !1, h({
|
|
4421
4426
|
props: {
|
|
4422
4427
|
list: D.list,
|
|
4423
|
-
allowCreateScene: g(
|
|
4424
|
-
onCreate: () =>
|
|
4425
|
-
onUpdate: (l) =>
|
|
4426
|
-
onDelete: (l) =>
|
|
4428
|
+
allowCreateScene: g(ae),
|
|
4429
|
+
onCreate: () => de(ce.create),
|
|
4430
|
+
onUpdate: (l) => de(ce.update, l),
|
|
4431
|
+
onDelete: (l) => M(l),
|
|
4427
4432
|
onSort: (l) => {
|
|
4428
|
-
|
|
4433
|
+
f.value.sceneSort = l, D.list = D.list.sort((s, m) => l.indexOf(s.code) - l.indexOf(m.code));
|
|
4429
4434
|
}
|
|
4430
4435
|
}
|
|
4431
4436
|
});
|
|
4432
4437
|
}, Xt = async (l) => {
|
|
4433
4438
|
await vn();
|
|
4434
|
-
const s = D.list.find((
|
|
4439
|
+
const s = D.list.find((m) => m.code === l);
|
|
4435
4440
|
r("scene-change", s);
|
|
4436
|
-
}, Ct = (l) =>
|
|
4441
|
+
}, Ct = (l) => u.value[l], Zt = (l, s, m) => {
|
|
4437
4442
|
if (Wt.includes(s))
|
|
4438
|
-
return
|
|
4443
|
+
return Oe("setFormItem error,", `form item with prop "${l}" is readonly`);
|
|
4439
4444
|
if (!Ct(l))
|
|
4440
|
-
return
|
|
4441
|
-
if (s === "visible" &&
|
|
4442
|
-
return
|
|
4443
|
-
je(
|
|
4445
|
+
return Oe("setFormItem error,", `Cannot find form item with name "${l}"`);
|
|
4446
|
+
if (s === "visible" && u.value[l].fixed)
|
|
4447
|
+
return Oe("setFormItem error,", "Cannot change the visible of a fixed form item");
|
|
4448
|
+
je(u.value, `${l}.${s}`, m);
|
|
4444
4449
|
}, _t = (l, s) => {
|
|
4445
|
-
if (!
|
|
4446
|
-
return
|
|
4447
|
-
|
|
4450
|
+
if (!u.value[l])
|
|
4451
|
+
return Oe("setFormValue error,", `Cannot find form item with name "${l}"`);
|
|
4452
|
+
u.value[l].value = s;
|
|
4448
4453
|
}, Jt = (l) => {
|
|
4449
|
-
Object.entries(l).forEach(([s,
|
|
4450
|
-
_t(s,
|
|
4454
|
+
Object.entries(l).forEach(([s, m]) => {
|
|
4455
|
+
_t(s, m);
|
|
4451
4456
|
});
|
|
4452
4457
|
}, en = (l) => {
|
|
4453
4458
|
var s;
|
|
4454
|
-
return (s =
|
|
4459
|
+
return (s = u.value[l]) == null ? void 0 : s.value;
|
|
4455
4460
|
}, Et = (l) => {
|
|
4456
|
-
const s = {},
|
|
4457
|
-
for (const _ in
|
|
4458
|
-
const
|
|
4459
|
-
|
|
4461
|
+
const s = {}, m = l ? Ae(u.value, Fe(l)) : u.value;
|
|
4462
|
+
for (const _ in m) {
|
|
4463
|
+
const k = m[_];
|
|
4464
|
+
k._selected && (s[_] = Ce(k.value));
|
|
4460
4465
|
}
|
|
4461
4466
|
return s;
|
|
4462
4467
|
}, tn = () => Z.dataSource, nn = (l) => {
|
|
@@ -4467,8 +4472,8 @@ const We = 2e3, yl = (t) => {
|
|
|
4467
4472
|
getFormItem(l) {
|
|
4468
4473
|
return c.value ? c.value.getFormItem(l) : Ct(l);
|
|
4469
4474
|
},
|
|
4470
|
-
setFormItem(l, s,
|
|
4471
|
-
c.value ? c.value.setFormItem(l, s,
|
|
4475
|
+
setFormItem(l, s, m) {
|
|
4476
|
+
c.value ? c.value.setFormItem(l, s, m) : Zt(l, s, m);
|
|
4472
4477
|
},
|
|
4473
4478
|
getFormValues(l) {
|
|
4474
4479
|
return c.value ? c.value.getFormValues(l) : Et(l);
|
|
@@ -4486,35 +4491,35 @@ const We = 2e3, yl = (t) => {
|
|
|
4486
4491
|
getTableData: tn,
|
|
4487
4492
|
setTableData: nn,
|
|
4488
4493
|
setTableDataItem: on,
|
|
4489
|
-
onRefresh:
|
|
4494
|
+
onRefresh: q
|
|
4490
4495
|
}, rn = {
|
|
4491
4496
|
...at,
|
|
4492
4497
|
...st,
|
|
4493
|
-
onRefresh:
|
|
4498
|
+
onRefresh: q,
|
|
4494
4499
|
onResetForm: De,
|
|
4495
4500
|
isInitialized: a
|
|
4496
4501
|
};
|
|
4497
|
-
e(rn),
|
|
4502
|
+
e(rn), $e(() => [...n.refreshDeps], () => q(), {
|
|
4498
4503
|
deep: !0,
|
|
4499
4504
|
immediate: !0
|
|
4500
|
-
}),
|
|
4505
|
+
}), $e(
|
|
4501
4506
|
() => n.enableScene,
|
|
4502
4507
|
(l) => {
|
|
4503
4508
|
if (l)
|
|
4504
|
-
|
|
4509
|
+
Ee();
|
|
4505
4510
|
else {
|
|
4506
|
-
const s = n.enableAdvancedFilter ?
|
|
4507
|
-
name:
|
|
4508
|
-
value:
|
|
4509
|
-
type:
|
|
4511
|
+
const s = n.enableAdvancedFilter ? xe.value : Object.values(u.value).filter((m) => m.visible !== !1).map((m) => ({
|
|
4512
|
+
name: m.name,
|
|
4513
|
+
value: m.value ?? m._defaultValue,
|
|
4514
|
+
type: m.type
|
|
4510
4515
|
}));
|
|
4511
|
-
|
|
4516
|
+
P(s);
|
|
4512
4517
|
}
|
|
4513
4518
|
},
|
|
4514
4519
|
{
|
|
4515
4520
|
immediate: !0
|
|
4516
4521
|
}
|
|
4517
|
-
),
|
|
4522
|
+
), $e(
|
|
4518
4523
|
() => n.sortable,
|
|
4519
4524
|
(l) => {
|
|
4520
4525
|
l && lt();
|
|
@@ -4523,7 +4528,7 @@ const We = 2e3, yl = (t) => {
|
|
|
4523
4528
|
immediate: !0
|
|
4524
4529
|
}
|
|
4525
4530
|
), bn(async () => {
|
|
4526
|
-
n.enableScene ? await
|
|
4531
|
+
n.enableScene ? await Ee() : n.autoSearch && z(), a.value = !0;
|
|
4527
4532
|
});
|
|
4528
4533
|
const ln = {
|
|
4529
4534
|
token: {
|
|
@@ -4531,20 +4536,20 @@ const We = 2e3, yl = (t) => {
|
|
|
4531
4536
|
}
|
|
4532
4537
|
};
|
|
4533
4538
|
return (l, s) => {
|
|
4534
|
-
const
|
|
4535
|
-
return
|
|
4539
|
+
const m = T("a-form-item"), _ = T("a-button"), k = T("a-select"), j = T("a-divider"), pe = T("a-space"), it = T("a-form"), He = T("a-typography-text"), an = T("a-tooltip"), sn = T("a-table"), cn = T("a-config-provider");
|
|
4540
|
+
return w(), U(cn, {
|
|
4536
4541
|
locale: g(Vt),
|
|
4537
4542
|
theme: ln
|
|
4538
4543
|
}, {
|
|
4539
4544
|
default: C(() => [
|
|
4540
4545
|
V("div", {
|
|
4541
4546
|
class: b([l.$style.superTable, "antd-super-table"]),
|
|
4542
|
-
style:
|
|
4547
|
+
style: re(t.wrapperStyle)
|
|
4543
4548
|
}, [
|
|
4544
4549
|
V("div", {
|
|
4545
4550
|
class: b(l.$style.querySection)
|
|
4546
4551
|
}, [
|
|
4547
|
-
t.enableScene ? (
|
|
4552
|
+
t.enableScene ? (w(), Y("div", {
|
|
4548
4553
|
key: 0,
|
|
4549
4554
|
class: b(l.$style.sceneHeader)
|
|
4550
4555
|
}, [
|
|
@@ -4556,23 +4561,23 @@ const We = 2e3, yl = (t) => {
|
|
|
4556
4561
|
class: b(l.$style.sceneForm)
|
|
4557
4562
|
}, {
|
|
4558
4563
|
default: C(() => [
|
|
4559
|
-
l.$slots.sceneAddonBefore ? (
|
|
4564
|
+
l.$slots.sceneAddonBefore ? (w(), U(m, { key: 0 }, {
|
|
4560
4565
|
default: C(() => [
|
|
4561
|
-
|
|
4566
|
+
ge(l.$slots, "sceneAddonBefore")
|
|
4562
4567
|
]),
|
|
4563
4568
|
_: 3
|
|
4564
|
-
})) :
|
|
4565
|
-
E(
|
|
4569
|
+
})) : R("", !0),
|
|
4570
|
+
E(m, { label: "场景选择" }, {
|
|
4566
4571
|
default: C(() => [
|
|
4567
|
-
E(
|
|
4568
|
-
value: g(
|
|
4569
|
-
"onUpdate:value": s[1] || (s[1] = (K) => g(
|
|
4572
|
+
E(k, {
|
|
4573
|
+
value: g(f).sceneCode,
|
|
4574
|
+
"onUpdate:value": s[1] || (s[1] = (K) => g(f).sceneCode = K),
|
|
4570
4575
|
class: b(l.$style.sceneSelect),
|
|
4571
4576
|
placeholder: "请选择",
|
|
4572
4577
|
"allow-clear": "",
|
|
4573
4578
|
"show-search": "",
|
|
4574
4579
|
"option-filter-prop": "name",
|
|
4575
|
-
options: [...
|
|
4580
|
+
options: [...oe.value, ...D.list],
|
|
4576
4581
|
"field-names": { value: "code", label: "name" },
|
|
4577
4582
|
open: I.value,
|
|
4578
4583
|
loading: D.loading,
|
|
@@ -4589,8 +4594,8 @@ const We = 2e3, yl = (t) => {
|
|
|
4589
4594
|
block: "",
|
|
4590
4595
|
icon: G(g(Bn)),
|
|
4591
4596
|
class: b(l.$style.sceneOpBtn),
|
|
4592
|
-
disabled: !
|
|
4593
|
-
onClick: s[0] || (s[0] = (Ye) =>
|
|
4597
|
+
disabled: !ae.value,
|
|
4598
|
+
onClick: s[0] || (s[0] = (Ye) => de(g(ce).create))
|
|
4594
4599
|
}, {
|
|
4595
4600
|
default: C(() => s[6] || (s[6] = [
|
|
4596
4601
|
X(" 新建场景 ")
|
|
@@ -4616,61 +4621,61 @@ const We = 2e3, yl = (t) => {
|
|
|
4616
4621
|
]),
|
|
4617
4622
|
_: 1
|
|
4618
4623
|
}),
|
|
4619
|
-
E(
|
|
4624
|
+
E(m, null, {
|
|
4620
4625
|
default: C(() => [
|
|
4621
|
-
E(
|
|
4626
|
+
E(pe, null, {
|
|
4622
4627
|
split: C(() => [
|
|
4623
|
-
E(
|
|
4628
|
+
E(j, { type: "vertical" })
|
|
4624
4629
|
]),
|
|
4625
4630
|
default: C(() => [
|
|
4626
4631
|
E(_, {
|
|
4627
4632
|
type: "primary",
|
|
4628
4633
|
icon: G(g(Mn)),
|
|
4629
|
-
onClick: s[3] || (s[3] = (K) =>
|
|
4634
|
+
onClick: s[3] || (s[3] = (K) => de(g(ce).search))
|
|
4630
4635
|
}, {
|
|
4631
4636
|
default: C(() => s[8] || (s[8] = [
|
|
4632
4637
|
X(" 高级筛选 ")
|
|
4633
4638
|
])),
|
|
4634
4639
|
_: 1
|
|
4635
4640
|
}, 8, ["icon"]),
|
|
4636
|
-
t.showRefreshButton ? (
|
|
4641
|
+
t.showRefreshButton ? (w(), U(_, {
|
|
4637
4642
|
key: 0,
|
|
4638
4643
|
type: "primary",
|
|
4639
4644
|
ghost: "",
|
|
4640
4645
|
icon: G(g(Rn)),
|
|
4641
4646
|
loading: Z.loading,
|
|
4642
|
-
onClick:
|
|
4647
|
+
onClick: F
|
|
4643
4648
|
}, {
|
|
4644
4649
|
default: C(() => s[9] || (s[9] = [
|
|
4645
4650
|
X(" 刷新 ")
|
|
4646
4651
|
])),
|
|
4647
4652
|
_: 1
|
|
4648
|
-
}, 8, ["icon", "loading"])) :
|
|
4653
|
+
}, 8, ["icon", "loading"])) : R("", !0)
|
|
4649
4654
|
]),
|
|
4650
4655
|
_: 1
|
|
4651
4656
|
})
|
|
4652
4657
|
]),
|
|
4653
4658
|
_: 1
|
|
4654
4659
|
}),
|
|
4655
|
-
l.$slots.sceneAddonAfter ? (
|
|
4660
|
+
l.$slots.sceneAddonAfter ? (w(), U(m, { key: 1 }, {
|
|
4656
4661
|
default: C(() => [
|
|
4657
|
-
|
|
4662
|
+
ge(l.$slots, "sceneAddonAfter")
|
|
4658
4663
|
]),
|
|
4659
4664
|
_: 3
|
|
4660
|
-
})) :
|
|
4665
|
+
})) : R("", !0)
|
|
4661
4666
|
]),
|
|
4662
4667
|
_: 3
|
|
4663
4668
|
}, 8, ["class"])
|
|
4664
4669
|
], 2),
|
|
4665
|
-
l.$slots.extra ? (
|
|
4670
|
+
l.$slots.extra ? (w(), Y("div", {
|
|
4666
4671
|
key: 0,
|
|
4667
4672
|
class: b(l.$style.sceneExtra)
|
|
4668
4673
|
}, [
|
|
4669
|
-
|
|
4670
|
-
], 2)) :
|
|
4671
|
-
], 2)) :
|
|
4672
|
-
E(
|
|
4673
|
-
"form-config-map":
|
|
4674
|
+
ge(l.$slots, "extra")
|
|
4675
|
+
], 2)) : R("", !0)
|
|
4676
|
+
], 2)) : R("", !0),
|
|
4677
|
+
E(ml, {
|
|
4678
|
+
"form-config-map": u.value,
|
|
4674
4679
|
"form-item-col-span": t.formItemColSpan,
|
|
4675
4680
|
"enable-scene": t.enableScene,
|
|
4676
4681
|
"show-advanced-filter-button": !t.enableScene && t.enableAdvancedFilter,
|
|
@@ -4679,51 +4684,51 @@ const We = 2e3, yl = (t) => {
|
|
|
4679
4684
|
loading: !!Z.loading,
|
|
4680
4685
|
"super-table-i-d": g(v),
|
|
4681
4686
|
onFormItemChange: J,
|
|
4682
|
-
onSearch:
|
|
4683
|
-
onAdvancedFilter: s[4] || (s[4] = (K) =>
|
|
4687
|
+
onSearch: F,
|
|
4688
|
+
onAdvancedFilter: s[4] || (s[4] = (K) => de(g(ce).search)),
|
|
4684
4689
|
onReset: De
|
|
4685
4690
|
}, null, 8, ["form-config-map", "form-item-col-span", "enable-scene", "show-advanced-filter-button", "show-reset-button", "show-expand-button", "loading", "super-table-i-d"])
|
|
4686
4691
|
], 2),
|
|
4687
4692
|
V("div", {
|
|
4688
4693
|
class: b(l.$style.tableWrapper),
|
|
4689
|
-
style:
|
|
4694
|
+
style: re(t.tableWrapperStyle)
|
|
4690
4695
|
}, [
|
|
4691
|
-
l.$slots.tableHead || l.$slots.toolBarExtra ? (
|
|
4696
|
+
l.$slots.tableHead || l.$slots.toolBarExtra ? (w(), Y("div", {
|
|
4692
4697
|
key: 0,
|
|
4693
4698
|
class: b(l.$style.toolbar)
|
|
4694
4699
|
}, [
|
|
4695
4700
|
V("div", {
|
|
4696
4701
|
class: b(l.$style.tableHeadWrapper)
|
|
4697
4702
|
}, [
|
|
4698
|
-
|
|
4703
|
+
ge(l.$slots, "tableHead")
|
|
4699
4704
|
], 2),
|
|
4700
|
-
l.$slots.toolBarExtra ? (
|
|
4705
|
+
l.$slots.toolBarExtra ? (w(), Y("div", {
|
|
4701
4706
|
key: 0,
|
|
4702
4707
|
class: b(l.$style.actionBtns)
|
|
4703
4708
|
}, [
|
|
4704
|
-
|
|
4705
|
-
], 2)) :
|
|
4706
|
-
], 2)) :
|
|
4709
|
+
ge(l.$slots, "toolBarExtra")
|
|
4710
|
+
], 2)) : R("", !0)
|
|
4711
|
+
], 2)) : R("", !0),
|
|
4707
4712
|
V("div", {
|
|
4708
4713
|
class: b(l.$style.tableContent)
|
|
4709
4714
|
}, [
|
|
4710
|
-
t.enableTableConfig ? (
|
|
4715
|
+
t.enableTableConfig ? (w(), U(or, {
|
|
4711
4716
|
key: 0,
|
|
4712
4717
|
columns: x.value,
|
|
4713
4718
|
onChange: ot
|
|
4714
|
-
}, null, 8, ["columns"])) :
|
|
4715
|
-
E(sn,
|
|
4719
|
+
}, null, 8, ["columns"])) : R("", !0),
|
|
4720
|
+
E(sn, ue({
|
|
4716
4721
|
ref_key: "tableRef",
|
|
4717
4722
|
ref: ze
|
|
4718
4723
|
}, {
|
|
4719
4724
|
...Z,
|
|
4720
4725
|
dataSource: qe.value,
|
|
4721
|
-
onChange:
|
|
4722
|
-
onExpand:
|
|
4726
|
+
onChange: ie,
|
|
4727
|
+
onExpand: ve,
|
|
4723
4728
|
onExpandedRowsChange: nt
|
|
4724
|
-
}, { onResizeColumn:
|
|
4729
|
+
}, { onResizeColumn: N }), Ge({
|
|
4725
4730
|
headerCell: C(({ column: K }) => [
|
|
4726
|
-
K.class !== "ant-table-row-expand-icon-cell" ? (
|
|
4731
|
+
K.class !== "ant-table-row-expand-icon-cell" ? (w(), Y("div", {
|
|
4727
4732
|
key: 0,
|
|
4728
4733
|
class: b(l.$style.headerCell)
|
|
4729
4734
|
}, [
|
|
@@ -4732,7 +4737,7 @@ const We = 2e3, yl = (t) => {
|
|
|
4732
4737
|
content: K.title,
|
|
4733
4738
|
class: b(l.$style.headerCellText)
|
|
4734
4739
|
}, null, 8, ["ellipsis", "content", "class"]),
|
|
4735
|
-
K.titleTooltip ? (
|
|
4740
|
+
K.titleTooltip ? (w(), U(an, { key: 0 }, {
|
|
4736
4741
|
title: C(() => [
|
|
4737
4742
|
V("span", {
|
|
4738
4743
|
innerHTML: K.titleTooltip
|
|
@@ -4740,25 +4745,25 @@ const We = 2e3, yl = (t) => {
|
|
|
4740
4745
|
]),
|
|
4741
4746
|
default: C(() => [
|
|
4742
4747
|
E(g(Nn), {
|
|
4743
|
-
style:
|
|
4748
|
+
style: re({ color: g(se).colorTextQuaternary }),
|
|
4744
4749
|
class: b(l.$style.headerCellTooltipIcon)
|
|
4745
4750
|
}, null, 8, ["style", "class"])
|
|
4746
4751
|
]),
|
|
4747
4752
|
_: 2
|
|
4748
|
-
}, 1024)) :
|
|
4749
|
-
], 2)) :
|
|
4753
|
+
}, 1024)) : R("", !0)
|
|
4754
|
+
], 2)) : R("", !0)
|
|
4750
4755
|
]),
|
|
4751
4756
|
bodyCell: C(({ column: K, record: Ye, index: ct }) => [
|
|
4752
|
-
K != null && K.slotName && l.$slots[K.slotName] ? (
|
|
4757
|
+
K != null && K.slotName && l.$slots[K.slotName] ? (w(), Y("div", {
|
|
4753
4758
|
key: 0,
|
|
4754
4759
|
class: b(l.$style.customSlotCell)
|
|
4755
4760
|
}, [
|
|
4756
|
-
|
|
4761
|
+
ge(l.$slots, K.slotName, {
|
|
4757
4762
|
column: K,
|
|
4758
4763
|
record: Ye,
|
|
4759
4764
|
index: ct
|
|
4760
4765
|
})
|
|
4761
|
-
], 2)) : jt([
|
|
4766
|
+
], 2)) : jt([$(Ye), K == null ? void 0 : K.key, ct], () => (w(), U(Ro, {
|
|
4762
4767
|
key: 1,
|
|
4763
4768
|
column: K,
|
|
4764
4769
|
record: Ye,
|
|
@@ -4767,25 +4772,25 @@ const We = 2e3, yl = (t) => {
|
|
|
4767
4772
|
}, null, 8, ["column", "record", "index", "hasRouter"])), s, 5)
|
|
4768
4773
|
]),
|
|
4769
4774
|
default: C(() => [
|
|
4770
|
-
l.$slots.expandColumnTitle ?
|
|
4775
|
+
l.$slots.expandColumnTitle ? ge(l.$slots, "expandColumnTitle", { key: 0 }) : R("", !0)
|
|
4771
4776
|
]),
|
|
4772
4777
|
_: 2
|
|
4773
4778
|
}, [
|
|
4774
4779
|
l.$slots.expandedRowRender ? {
|
|
4775
4780
|
name: "expandedRowRender",
|
|
4776
4781
|
fn: C(({ record: K }) => [
|
|
4777
|
-
|
|
4782
|
+
ge(l.$slots, "expandedRowRender", { record: K })
|
|
4778
4783
|
]),
|
|
4779
4784
|
key: "0"
|
|
4780
4785
|
} : void 0
|
|
4781
4786
|
]), 1040)
|
|
4782
4787
|
], 2),
|
|
4783
|
-
l.$slots.tableFoot ? (
|
|
4788
|
+
l.$slots.tableFoot ? (w(), Y("div", {
|
|
4784
4789
|
key: 1,
|
|
4785
4790
|
class: b(l.$style.tableFootWrapper)
|
|
4786
4791
|
}, [
|
|
4787
|
-
|
|
4788
|
-
], 2)) :
|
|
4792
|
+
ge(l.$slots, "tableFoot")
|
|
4793
|
+
], 2)) : R("", !0)
|
|
4789
4794
|
], 6)
|
|
4790
4795
|
], 6)
|
|
4791
4796
|
]),
|
|
@@ -4793,13 +4798,13 @@ const We = 2e3, yl = (t) => {
|
|
|
4793
4798
|
}, 8, ["locale"]);
|
|
4794
4799
|
};
|
|
4795
4800
|
}
|
|
4796
|
-
}), vl = "_superTable_1wr7z_1", Cl = "_querySection_1wr7z_1", _l = "_sceneHeader_1wr7z_1", El = "_sceneFormWrapper_1wr7z_7",
|
|
4801
|
+
}), vl = "_superTable_1wr7z_1", Cl = "_querySection_1wr7z_1", _l = "_sceneHeader_1wr7z_1", El = "_sceneFormWrapper_1wr7z_7", Sl = "_sceneForm_1wr7z_7", wl = "_sceneSelect_1wr7z_13", xl = "_sceneExtra_1wr7z_16", Il = "_tableWrapper_1wr7z_19", $l = "_toolbar_1wr7z_23", kl = "_actionBtns_1wr7z_30", Al = "_tableHeadWrapper_1wr7z_35", Ol = "_tableContent_1wr7z_38", Tl = "_headerCell_1wr7z_41", Pl = "_headerCellText_1wr7z_46", Ll = "_headerCellTooltipIcon_1wr7z_49", Fl = "_sceneOpBtnWrapper_1wr7z_53", Bl = "_sceneOpBtn_1wr7z_53", Dl = "_customSlotCell_1wr7z_61", Ml = {
|
|
4797
4802
|
superTable: vl,
|
|
4798
4803
|
querySection: Cl,
|
|
4799
4804
|
sceneHeader: _l,
|
|
4800
4805
|
sceneFormWrapper: El,
|
|
4801
|
-
sceneForm:
|
|
4802
|
-
sceneSelect:
|
|
4806
|
+
sceneForm: Sl,
|
|
4807
|
+
sceneSelect: wl,
|
|
4803
4808
|
sceneExtra: xl,
|
|
4804
4809
|
tableWrapper: Il,
|
|
4805
4810
|
toolbar: $l,
|
|
@@ -4814,7 +4819,7 @@ const We = 2e3, yl = (t) => {
|
|
|
4814
4819
|
customSlotCell: Dl
|
|
4815
4820
|
}, Rl = {
|
|
4816
4821
|
$style: Ml
|
|
4817
|
-
}, Nt = /* @__PURE__ */
|
|
4822
|
+
}, Nt = /* @__PURE__ */ _e(bl, [["__cssModules", Rl]]);
|
|
4818
4823
|
Nt.install = (t) => {
|
|
4819
4824
|
t.component("SuperTable", Nt);
|
|
4820
4825
|
};
|