@a2simcode/ui 0.0.266 → 0.0.269
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/simcode-ui.es.js
CHANGED
|
@@ -1421,7 +1421,7 @@ var oh = /* @__PURE__ */ vn(((e, t) => {
|
|
|
1421
1421
|
]);
|
|
1422
1422
|
},
|
|
1423
1423
|
_doProcessBlock: function(h, p) {
|
|
1424
|
-
for (var g = this._hash.words, b = g[0], x = g[1], w = g[2], m = g[3], y = g[4], C = g[5], v = g[6], _ = g[7], S = b.high, R = b.low, j = x.high, T = x.low, H = w.high, B = w.low, A = m.high, M = m.low, E = y.high, D = y.low, J = C.high, ae = C.low, ge = v.high, Z = v.low, Q = _.high, K = _.low, I = S, Re = R, Ue = j, me = T, We = H, et = B, Ct = A, ie = M, ke = E,
|
|
1424
|
+
for (var g = this._hash.words, b = g[0], x = g[1], w = g[2], m = g[3], y = g[4], C = g[5], v = g[6], _ = g[7], S = b.high, R = b.low, j = x.high, T = x.low, H = w.high, B = w.low, A = m.high, M = m.low, E = y.high, D = y.low, J = C.high, ae = C.low, ge = v.high, Z = v.low, Q = _.high, K = _.low, I = S, Re = R, Ue = j, me = T, We = H, et = B, Ct = A, ie = M, ke = E, ze = D, U = J, Se = ae, xe = ge, Be = Z, rt = Q, Fe = K, Ye = 0; Ye < 80; Ye++) {
|
|
1425
1425
|
var ht, Dt, qt = f[Ye];
|
|
1426
1426
|
if (Ye < 16)
|
|
1427
1427
|
Dt = qt.high = h[p + Ye * 2] | 0, ht = qt.low = h[p + Ye * 2 + 1] | 0;
|
|
@@ -1429,10 +1429,10 @@ var oh = /* @__PURE__ */ vn(((e, t) => {
|
|
|
1429
1429
|
var mn = f[Ye - 15], $t = mn.high, mt = mn.low, Rt = ($t >>> 1 | mt << 31) ^ ($t >>> 8 | mt << 24) ^ $t >>> 7, jt = (mt >>> 1 | $t << 31) ^ (mt >>> 8 | $t << 24) ^ (mt >>> 7 | $t << 25), on = f[Ye - 2], Kt = on.high, Et = on.low, un = (Kt >>> 19 | Et << 13) ^ (Kt << 3 | Et >>> 29) ^ Kt >>> 6, q = (Et >>> 19 | Kt << 13) ^ (Et << 3 | Kt >>> 29) ^ (Et >>> 6 | Kt << 26), be = f[Ye - 7], re = be.high, se = be.low, Ce = f[Ye - 16], Oe = Ce.high, Ve = Ce.low;
|
|
1430
1430
|
ht = jt + se, Dt = Rt + re + (ht >>> 0 < jt >>> 0 ? 1 : 0), ht = ht + q, Dt = Dt + un + (ht >>> 0 < q >>> 0 ? 1 : 0), ht = ht + Ve, Dt = Dt + Oe + (ht >>> 0 < Ve >>> 0 ? 1 : 0), qt.high = Dt, qt.low = ht;
|
|
1431
1431
|
}
|
|
1432
|
-
var ut = ke & U ^ ~ke & xe, Bt =
|
|
1433
|
-
rt = xe, Fe =
|
|
1432
|
+
var ut = ke & U ^ ~ke & xe, Bt = ze & Se ^ ~ze & Be, bt = I & Ue ^ I & We ^ Ue & We, Hn = Re & me ^ Re & et ^ me & et, Jn = (I >>> 28 | Re << 4) ^ (I << 30 | Re >>> 2) ^ (I << 25 | Re >>> 7), eo = (Re >>> 28 | I << 4) ^ (Re << 30 | I >>> 2) ^ (Re << 25 | I >>> 7), To = (ke >>> 14 | ze << 18) ^ (ke >>> 18 | ze << 14) ^ (ke << 23 | ze >>> 9), to = (ze >>> 14 | ke << 18) ^ (ze >>> 18 | ke << 14) ^ (ze << 23 | ke >>> 9), dn = d[Ye], Ea = dn.high, oa = dn.low, Xt = Fe + to, de = rt + To + (Xt >>> 0 < Fe >>> 0 ? 1 : 0), Xt = Xt + Bt, de = de + ut + (Xt >>> 0 < Bt >>> 0 ? 1 : 0), Xt = Xt + oa, de = de + Ea + (Xt >>> 0 < oa >>> 0 ? 1 : 0), Xt = Xt + ht, de = de + Dt + (Xt >>> 0 < ht >>> 0 ? 1 : 0), he = eo + Hn, De = Jn + bt + (he >>> 0 < eo >>> 0 ? 1 : 0);
|
|
1433
|
+
rt = xe, Fe = Be, xe = U, Be = Se, U = ke, Se = ze, ze = ie + Xt | 0, ke = Ct + de + (ze >>> 0 < ie >>> 0 ? 1 : 0) | 0, Ct = We, ie = et, We = Ue, et = me, Ue = I, me = Re, Re = Xt + he | 0, I = de + De + (Re >>> 0 < Xt >>> 0 ? 1 : 0) | 0;
|
|
1434
1434
|
}
|
|
1435
|
-
R = b.low = R + Re, b.high = S + I + (R >>> 0 < Re >>> 0 ? 1 : 0), T = x.low = T + me, x.high = j + Ue + (T >>> 0 < me >>> 0 ? 1 : 0), B = w.low = B + et, w.high = H + We + (B >>> 0 < et >>> 0 ? 1 : 0), M = m.low = M + ie, m.high = A + Ct + (M >>> 0 < ie >>> 0 ? 1 : 0), D = y.low = D +
|
|
1435
|
+
R = b.low = R + Re, b.high = S + I + (R >>> 0 < Re >>> 0 ? 1 : 0), T = x.low = T + me, x.high = j + Ue + (T >>> 0 < me >>> 0 ? 1 : 0), B = w.low = B + et, w.high = H + We + (B >>> 0 < et >>> 0 ? 1 : 0), M = m.low = M + ie, m.high = A + Ct + (M >>> 0 < ie >>> 0 ? 1 : 0), D = y.low = D + ze, y.high = E + ke + (D >>> 0 < ze >>> 0 ? 1 : 0), ae = C.low = ae + Se, C.high = J + U + (ae >>> 0 < Se >>> 0 ? 1 : 0), Z = v.low = Z + Be, v.high = ge + xe + (Z >>> 0 < Be >>> 0 ? 1 : 0), K = _.low = K + Fe, _.high = Q + rt + (K >>> 0 < Fe >>> 0 ? 1 : 0);
|
|
1436
1436
|
},
|
|
1437
1437
|
_doFinalize: function() {
|
|
1438
1438
|
var h = this._data, p = h.words, g = this._nDataBytes * 8, b = h.sigBytes * 8;
|
|
@@ -5412,16 +5412,16 @@ var Fp = class {
|
|
|
5412
5412
|
const Se = T.value;
|
|
5413
5413
|
if (v ? U = v[Se] : s ? U = s[Se] : U = n.modelValue, U === void 0 && D.value === "j-tabs") {
|
|
5414
5414
|
if (A.value?.defaultValue) return A.value.defaultValue;
|
|
5415
|
-
const xe = n.children.findIndex((
|
|
5415
|
+
const xe = n.children.findIndex((Be) => Be.config?.active);
|
|
5416
5416
|
return xe > -1 ? "_tab" + xe : "_tab0";
|
|
5417
5417
|
}
|
|
5418
5418
|
if (U === void 0 && D.value === "j-collapse") {
|
|
5419
5419
|
if (A.value?.defaultValue) return A.value.defaultValue;
|
|
5420
|
-
const xe = n.children.map((
|
|
5421
|
-
item:
|
|
5420
|
+
const xe = n.children.map((Be, rt) => ({
|
|
5421
|
+
item: Be,
|
|
5422
5422
|
index: rt
|
|
5423
|
-
})).filter(({ item:
|
|
5424
|
-
return A.value?.accordion ? xe.length > 0 ? "_collapse" + xe[0].index : "" : xe.map(({ index:
|
|
5423
|
+
})).filter(({ item: Be }) => Be.config?.active);
|
|
5424
|
+
return A.value?.accordion ? xe.length > 0 ? "_collapse" + xe[0].index : "" : xe.map(({ index: Be }) => "_collapse" + Be);
|
|
5425
5425
|
}
|
|
5426
5426
|
return j.value ? U ? U.split(",") : [] : U;
|
|
5427
5427
|
},
|
|
@@ -5465,7 +5465,7 @@ var Fp = class {
|
|
|
5465
5465
|
if (!Se) return;
|
|
5466
5466
|
if (Object.prototype.hasOwnProperty.call(Se, U)) return Se[U];
|
|
5467
5467
|
if (Se.parentRow) return ae(U, Se.parentRow);
|
|
5468
|
-
const xe = n.children?.find((
|
|
5468
|
+
const xe = n.children?.find((Be) => Be.id === U);
|
|
5469
5469
|
if (xe && xe.config?.field) return ae(xe.config.field, Se);
|
|
5470
5470
|
}, ge = (U) => {
|
|
5471
5471
|
if (U)
|
|
@@ -5480,8 +5480,8 @@ var Fp = class {
|
|
|
5480
5480
|
Object.keys(xe).forEach((Fe) => {
|
|
5481
5481
|
Se[Fe] = xe[Fe];
|
|
5482
5482
|
});
|
|
5483
|
-
let
|
|
5484
|
-
|
|
5483
|
+
let Be = K.value.dataType;
|
|
5484
|
+
Be == "dataView" && K.value.isPage && (Be = "dataViewPages"), Be === "dataViewPages" ? U.params = Se : U = {
|
|
5485
5485
|
...U,
|
|
5486
5486
|
...Se
|
|
5487
5487
|
};
|
|
@@ -5489,7 +5489,7 @@ var Fp = class {
|
|
|
5489
5489
|
type: D.value,
|
|
5490
5490
|
config: {
|
|
5491
5491
|
...K.value,
|
|
5492
|
-
dataType:
|
|
5492
|
+
dataType: Be
|
|
5493
5493
|
},
|
|
5494
5494
|
formData: S.value,
|
|
5495
5495
|
row: v,
|
|
@@ -5498,11 +5498,11 @@ var Fp = class {
|
|
|
5498
5498
|
});
|
|
5499
5499
|
return K.value.dataType === "dataItem" && K.value.isPage && (rt = Wf(U.pagination, rt)), rt;
|
|
5500
5500
|
}, Q = (U) => {
|
|
5501
|
-
const Se = U.config?.parentTableId, xe = Se && U.id && U.id.startsWith(Se + ".") ? U.id.slice(Se.length + 1) : U.id,
|
|
5501
|
+
const Se = U.config?.parentTableId, xe = Se && U.id && U.id.startsWith(Se + ".") ? U.id.slice(Se.length + 1) : U.id, Be = U.type === "j-layer-form" || U.type === "j-layerform", rt = U.children?.map(Q) || [], Fe = Be && U.config?.schema === void 0 ? {
|
|
5502
5502
|
...U.config,
|
|
5503
5503
|
schema: rt
|
|
5504
5504
|
} : U.config;
|
|
5505
|
-
return
|
|
5505
|
+
return Be ? {
|
|
5506
5506
|
...U,
|
|
5507
5507
|
id: xe,
|
|
5508
5508
|
children: void 0,
|
|
@@ -5533,18 +5533,18 @@ var Fp = class {
|
|
|
5533
5533
|
config: on
|
|
5534
5534
|
};
|
|
5535
5535
|
}
|
|
5536
|
-
const { id:
|
|
5537
|
-
Rt.dataType !== "options" && $t !== "j-tag" && delete Rt.options, Rt.label = Fe ?? rt ??
|
|
5536
|
+
const { id: Be, name: rt, label: Fe, valueKey: Ye, width: ht, align: Dt, frozen: qt, hide: mn, type: $t, ...mt } = xe, Rt = { ...mt };
|
|
5537
|
+
Rt.dataType !== "options" && $t !== "j-tag" && delete Rt.options, Rt.label = Fe ?? rt ?? Be, Ye != null && (Rt.valueKey = Ye), ht != null && (Rt.width = ht), Dt && (Rt.align = Dt), qt && qt !== "none" && (Rt.frozen = qt), Rt.readonly = !0, Se && (Rt.filter = { isSearchKeyword: !0 });
|
|
5538
5538
|
const jt = {
|
|
5539
|
-
id:
|
|
5539
|
+
id: Be,
|
|
5540
5540
|
config: Rt
|
|
5541
5541
|
};
|
|
5542
5542
|
return $t && $t !== "text" && (jt.type = $t), jt;
|
|
5543
5543
|
}).filter((xe) => xe.config?.label), Re = (U) => U.map((Se) => {
|
|
5544
|
-
const { id: xe, type:
|
|
5544
|
+
const { id: xe, type: Be, label: rt, dateType: Fe, dateFormat: Ye, dataType: ht, options: Dt, dataCode: qt, labelKey: mn, valueKey: $t, paramsSetting: mt } = Se;
|
|
5545
5545
|
let Rt = {
|
|
5546
5546
|
id: xe,
|
|
5547
|
-
type:
|
|
5547
|
+
type: Be || "j-input"
|
|
5548
5548
|
}, jt = {};
|
|
5549
5549
|
if (Se.type === "j-date")
|
|
5550
5550
|
jt.type = Fe, jt.format = Ye;
|
|
@@ -5566,29 +5566,29 @@ var Fp = class {
|
|
|
5566
5566
|
if (D.value === "j-layer-form" || D.value === "j-input-rows" || D.value === "j-input-cards") return {};
|
|
5567
5567
|
const U = {};
|
|
5568
5568
|
return n.children.forEach((Se, xe) => {
|
|
5569
|
-
let
|
|
5570
|
-
D.value === "j-tabs" && (
|
|
5569
|
+
let Be = Se;
|
|
5570
|
+
D.value === "j-tabs" && (Be = {
|
|
5571
5571
|
...Se,
|
|
5572
5572
|
type: "el-tab-pane",
|
|
5573
5573
|
config: {
|
|
5574
5574
|
...Se.config || {},
|
|
5575
5575
|
name: "_tab" + xe
|
|
5576
5576
|
}
|
|
5577
|
-
}, c == "form" && (
|
|
5577
|
+
}, c == "form" && (Be.config.needRow = Be.config.needRow !== !1, Be.config.needFormItem = Be.config.needFormItem !== !1)), D.value === "j-collapse" && (Be = {
|
|
5578
5578
|
...Se,
|
|
5579
5579
|
type: "el-collapse-item",
|
|
5580
5580
|
config: {
|
|
5581
5581
|
...Se.config || {},
|
|
5582
5582
|
name: "_collapse" + xe
|
|
5583
5583
|
}
|
|
5584
|
-
}, c == "form" && (
|
|
5584
|
+
}, c == "form" && (Be.config.needRow = Be.config.needRow !== !1, Be.config.needFormItem = Be.config.needFormItem !== !1)), Be.slot ? (U[Be.slot] = U[Be.slot] || [], U[Be.slot].push(Be)) : (U.default = U.default || [], U.default.push(Be));
|
|
5585
5585
|
}), U;
|
|
5586
5586
|
}), me = ({ data: U, row: Se, config: xe }) => {
|
|
5587
5587
|
if (U && ["j-input-layer", "j-button-layer"].includes(D.value)) {
|
|
5588
|
-
const
|
|
5588
|
+
const Be = xe.parentTableId && Se ? Se : s, rt = K.value?.isMultiSelect;
|
|
5589
5589
|
K.value.columns.forEach((Fe) => {
|
|
5590
5590
|
const Ye = Fe.config?.valueKey;
|
|
5591
|
-
!Ye || !Fe.id || (
|
|
5591
|
+
!Ye || !Fe.id || (Be[Ye] = rt ? U.map((ht) => ht[Fe.id]).join(",") : U[Fe.id]);
|
|
5592
5592
|
});
|
|
5593
5593
|
}
|
|
5594
5594
|
}, We = (U) => {
|
|
@@ -5609,17 +5609,17 @@ var Fp = class {
|
|
|
5609
5609
|
console.warn(`方法 ${U} 不存在或不是函数`);
|
|
5610
5610
|
}, ke = () => {
|
|
5611
5611
|
Ct.value?.(), Ct.value = void 0;
|
|
5612
|
-
},
|
|
5612
|
+
}, ze = () => {
|
|
5613
5613
|
ke(), !(!g || !n.id || !et.value) && (Ct.value = g(n.id, ie));
|
|
5614
5614
|
};
|
|
5615
5615
|
return st([() => n.id, () => et.value], () => {
|
|
5616
|
-
|
|
5616
|
+
ze();
|
|
5617
5617
|
}, { immediate: !0 }), Nt(() => {
|
|
5618
5618
|
n.id && h && h(n.id), n.id && x && x(n.id);
|
|
5619
5619
|
}), Go(() => {
|
|
5620
5620
|
ke();
|
|
5621
5621
|
}), (U, Se) => {
|
|
5622
|
-
const xe = V("JComp"),
|
|
5622
|
+
const xe = V("JComp"), Be = V("el-row");
|
|
5623
5623
|
return K.value.display != !1 && R.value ? (k(), N(Fa(D.value), Qe({
|
|
5624
5624
|
key: 0,
|
|
5625
5625
|
ref_key: "compRef",
|
|
@@ -5641,7 +5641,7 @@ var Fp = class {
|
|
|
5641
5641
|
onChange: We
|
|
5642
5642
|
}), qn({ _: 2 }, [$e(Ue.value, (rt, Fe) => ({
|
|
5643
5643
|
name: Fe,
|
|
5644
|
-
fn: X(() => [K.value.needRow === !0 || K.value.needRow?.[Fe] === !0 ? (k(), N(
|
|
5644
|
+
fn: X(() => [K.value.needRow === !0 || K.value.needRow?.[Fe] === !0 ? (k(), N(Be, {
|
|
5645
5645
|
key: 0,
|
|
5646
5646
|
gutter: p.value
|
|
5647
5647
|
}, {
|
|
@@ -6102,31 +6102,31 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6102
6102
|
} : $, ie = ($) => {
|
|
6103
6103
|
const { Group: F, Text: Y } = nt.CustomLayout, ne = o.actionsMaxCount, W = $.filter((ve) => ve.config?.display !== !1), oe = W.length > ne, le = oe ? W.slice(0, ne - 1) : W;
|
|
6104
6104
|
let ye = 0;
|
|
6105
|
-
if (le.forEach((ve,
|
|
6106
|
-
const
|
|
6107
|
-
ye +=
|
|
6105
|
+
if (le.forEach((ve, fe) => {
|
|
6106
|
+
const Pe = Mn(ve.config?.label || ve.label || "") || 0;
|
|
6107
|
+
ye += Pe + (fe === 0 ? 24 : 12);
|
|
6108
6108
|
}), oe) {
|
|
6109
6109
|
const ve = (Mn("更多") || 0) + 12;
|
|
6110
6110
|
ye += ve;
|
|
6111
6111
|
}
|
|
6112
|
-
const
|
|
6112
|
+
const pe = Math.max(80, ye) + "px";
|
|
6113
6113
|
return {
|
|
6114
6114
|
field: "__actions__",
|
|
6115
6115
|
title: o.actionsLabel,
|
|
6116
|
-
width:
|
|
6117
|
-
maxWidth:
|
|
6118
|
-
minWidth:
|
|
6116
|
+
width: pe,
|
|
6117
|
+
maxWidth: pe,
|
|
6118
|
+
minWidth: pe,
|
|
6119
6119
|
disableColumnResize: !0,
|
|
6120
6120
|
disableSelect: !0,
|
|
6121
6121
|
customLayout: (ve) => {
|
|
6122
|
-
const { table:
|
|
6122
|
+
const { table: fe, row: Pe, col: Le } = ve, Me = fe.getCellOriginRecord(Le, Pe), tt = fe.getRecordIndexByCell(Le, Pe), qe = W.map((Ie) => {
|
|
6123
6123
|
const dt = et({
|
|
6124
6124
|
action: Ie,
|
|
6125
6125
|
record: Me,
|
|
6126
6126
|
recordIndex: tt,
|
|
6127
6127
|
col: Le,
|
|
6128
|
-
row:
|
|
6129
|
-
table:
|
|
6128
|
+
row: Pe,
|
|
6129
|
+
table: fe
|
|
6130
6130
|
});
|
|
6131
6131
|
return {
|
|
6132
6132
|
action: Ct(Ie, { disabled: dt.disabled }),
|
|
@@ -6159,9 +6159,9 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6159
6159
|
openLayer: h
|
|
6160
6160
|
});
|
|
6161
6161
|
}), hn.addEventListener("mouseenter", (wn) => {
|
|
6162
|
-
at || (wn.target.setAttribute("fill", Et(Ot, -20)),
|
|
6162
|
+
at || (wn.target.setAttribute("fill", Et(Ot, -20)), fe.scenegraph.stage.renderNextFrame());
|
|
6163
6163
|
}), hn.addEventListener("mouseleave", (wn) => {
|
|
6164
|
-
at || (wn.target.setAttribute("fill", Ot),
|
|
6164
|
+
at || (wn.target.setAttribute("fill", Ot), fe.scenegraph.stage.renderNextFrame());
|
|
6165
6165
|
}), St.add(hn);
|
|
6166
6166
|
}), Ke && pt.length > 0) {
|
|
6167
6167
|
const Ie = "#1677ff", dt = new Y({
|
|
@@ -6177,11 +6177,11 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6177
6177
|
cursor: "pointer"
|
|
6178
6178
|
});
|
|
6179
6179
|
dt.addEventListener("mouseenter", (at) => {
|
|
6180
|
-
at.target.setAttribute("fill", Et(Ie, -20)),
|
|
6180
|
+
at.target.setAttribute("fill", Et(Ie, -20)), fe.scenegraph.stage.renderNextFrame();
|
|
6181
6181
|
const Ot = m.value?.getBoundingClientRect();
|
|
6182
6182
|
Ot && Z(pt, Me, tt, at.canvasX + Ot.left - 64, at.canvasY + Ot.top + 8), ge = !0, I();
|
|
6183
6183
|
}), dt.addEventListener("mouseleave", (at) => {
|
|
6184
|
-
at.target.setAttribute("fill", Ie),
|
|
6184
|
+
at.target.setAttribute("fill", Ie), fe.scenegraph.stage.renderNextFrame(), ge = !1, K();
|
|
6185
6185
|
}), St.add(dt);
|
|
6186
6186
|
}
|
|
6187
6187
|
return {
|
|
@@ -6194,12 +6194,12 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6194
6194
|
const { dataValue: Y, table: ne, col: W, row: oe, value: le } = $, ye = $.rect ?? ne?.getCellRect?.(W, oe) ?? {
|
|
6195
6195
|
width: 0,
|
|
6196
6196
|
height: 0
|
|
6197
|
-
},
|
|
6197
|
+
}, pe = ne?.getBodyField?.(W, oe), ve = ne?.options?.columns || [], fe = (pe ? mt(ve, pe) : null)?.style?.textAlign || "left", Pe = 8, Le = Math.max(0, ye.width - Pe * 2);
|
|
6198
6198
|
let Me = le ?? Y;
|
|
6199
6199
|
Me == null && (Me = "");
|
|
6200
|
-
const tt =
|
|
6201
|
-
let qe =
|
|
6202
|
-
return
|
|
6200
|
+
const tt = Be(typeof Me == "object" ? JSON.stringify(Me) : String(Me), Le);
|
|
6201
|
+
let qe = Pe, Ae = "left";
|
|
6202
|
+
return fe === "center" ? (qe = ye.width / 2, Ae = "center") : fe === "right" && (qe = Math.max(Pe, ye.width - Pe), Ae = "right"), {
|
|
6203
6203
|
elements: [{
|
|
6204
6204
|
type: "text",
|
|
6205
6205
|
text: tt,
|
|
@@ -6212,11 +6212,11 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6212
6212
|
}],
|
|
6213
6213
|
expectedHeight: Tn
|
|
6214
6214
|
};
|
|
6215
|
-
},
|
|
6216
|
-
const { dataValue: Y, rect: ne, table: W, col: oe, row: le } = $, ye = W?.options?.columns || [],
|
|
6217
|
-
let
|
|
6218
|
-
(Object.prototype.hasOwnProperty.call(
|
|
6219
|
-
const Me = La(
|
|
6215
|
+
}, ze = ($, F) => {
|
|
6216
|
+
const { dataValue: Y, rect: ne, table: W, col: oe, row: le } = $, ye = W?.options?.columns || [], pe = W?.getBodyField?.(oe, le), ve = pe ? mt(ye, pe) : null, fe = F || ve?._compConfig || {};
|
|
6217
|
+
let Pe = "mdi:toggle-switch", Le = "#165dff";
|
|
6218
|
+
(Object.prototype.hasOwnProperty.call(fe, "inactiveValue") && fe.inactiveValue !== void 0 ? String(Y) === String(fe.inactiveValue) : !Y) && (Pe = "mdi:toggle-switch-off", Le = "#e5e6eb");
|
|
6219
|
+
const Me = La(Pe), tt = Me?.body?.replace(/currentColor/g, Le), qe = [], Ae = 8, Ke = 40;
|
|
6220
6220
|
let Xe = Ae;
|
|
6221
6221
|
return ve?.style?.textAlign === "center" ? Xe = Math.max(Ae, (ne.width - Ke) / 2) : ve?.style?.textAlign === "right" && (Xe = Math.max(Ae, ne.width - Ke - Ae)), qe.push({
|
|
6222
6222
|
type: "icon",
|
|
@@ -6230,14 +6230,14 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6230
6230
|
expectedHeight: Tn
|
|
6231
6231
|
};
|
|
6232
6232
|
}, U = ($, F) => {
|
|
6233
|
-
const { dataValue: Y, rect: ne } = $, W = Number(Y) || 0, oe = 5, le = 20, ye = 4,
|
|
6233
|
+
const { dataValue: Y, rect: ne } = $, W = Number(Y) || 0, oe = 5, le = 20, ye = 4, pe = 8, ve = (ne.height - le) / 2, fe = [], Pe = La("mdi:star"), Le = La("mdi:star-half-full"), Me = La("mdi:star-outline"), tt = "#f7ba2a", qe = "#e5e6eb";
|
|
6234
6234
|
for (let Ae = 0; Ae < oe; Ae++) {
|
|
6235
|
-
const Ke =
|
|
6235
|
+
const Ke = pe + Ae * (le + ye), Xe = ve;
|
|
6236
6236
|
if (W >= Ae + 1) {
|
|
6237
|
-
const pt =
|
|
6238
|
-
|
|
6237
|
+
const pt = Pe?.body?.replace(/currentColor/g, tt);
|
|
6238
|
+
fe.push({
|
|
6239
6239
|
type: "icon",
|
|
6240
|
-
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="${le}" height="${le}" viewBox="0 0 ${
|
|
6240
|
+
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="${le}" height="${le}" viewBox="0 0 ${Pe?.width} ${Pe?.height}">${pt}</svg>`,
|
|
6241
6241
|
x: Ke,
|
|
6242
6242
|
y: Xe,
|
|
6243
6243
|
width: le,
|
|
@@ -6245,7 +6245,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6245
6245
|
});
|
|
6246
6246
|
} else if (W > Ae && W < Ae + 1) {
|
|
6247
6247
|
const pt = Le?.body?.replace(/currentColor/g, tt);
|
|
6248
|
-
|
|
6248
|
+
fe.push({
|
|
6249
6249
|
type: "icon",
|
|
6250
6250
|
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="${le}" height="${le}" viewBox="0 0 ${Le?.width} ${Le?.height}">${pt}</svg>`,
|
|
6251
6251
|
x: Ke,
|
|
@@ -6255,7 +6255,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6255
6255
|
});
|
|
6256
6256
|
} else {
|
|
6257
6257
|
const pt = Me?.body?.replace(/currentColor/g, qe);
|
|
6258
|
-
|
|
6258
|
+
fe.push({
|
|
6259
6259
|
type: "icon",
|
|
6260
6260
|
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="${le}" height="${le}" viewBox="0 0 ${Me?.width} ${Me?.height}">${pt}</svg>`,
|
|
6261
6261
|
x: Ke,
|
|
@@ -6266,17 +6266,17 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6266
6266
|
}
|
|
6267
6267
|
}
|
|
6268
6268
|
return {
|
|
6269
|
-
elements:
|
|
6269
|
+
elements: fe,
|
|
6270
6270
|
expectedHeight: Tn
|
|
6271
6271
|
};
|
|
6272
6272
|
}, Se = ($, F) => {
|
|
6273
|
-
const { dataValue: Y, rect: ne, table: W, col: oe, row: le } = $, ye = W.getBodyField(oe, le),
|
|
6274
|
-
config:
|
|
6275
|
-
getCompConfig:
|
|
6273
|
+
const { dataValue: Y, rect: ne, table: W, col: oe, row: le } = $, ye = W.getBodyField(oe, le), pe = mt(W.options?.columns || [], ye), ve = W.getCellOriginRecord?.(oe, le) || W.getRecordByCell?.(oe, le) || {}, fe = F || _n({
|
|
6274
|
+
config: pe?._compConfig,
|
|
6275
|
+
getCompConfig: pe?._getCompConfig,
|
|
6276
6276
|
formData: r || {},
|
|
6277
6277
|
getTableData: dn,
|
|
6278
6278
|
row: ve
|
|
6279
|
-
}) || {},
|
|
6279
|
+
}) || {}, Pe = Number(fe.min) || 0, Le = Number(fe.max) || 100, Me = Number(Y) || 0, tt = Le - Pe, qe = tt === 0 ? 0 : Math.max(0, Math.min(100, (Me - Pe) / tt * 100)), Ae = 4, Ke = 8, Xe = 8, pt = (ne.height - Ae) / 2, St = String(Me), Ie = Mn(St) || 0, dt = Ke, at = pt, Ot = ne.width - Ke * 2 - Ie - Xe, hn = Ot * qe / 100, wn = [], ia = (tn, rn, Ft) => {
|
|
6280
6280
|
const ct = Math.min(Ft, rn / 2, tn / 2);
|
|
6281
6281
|
return `M ${ct} 0 L ${tn - ct} 0 Q ${tn} 0 ${tn} ${ct} L ${tn} ${rn - ct} Q ${tn} ${rn} ${tn - ct} ${rn} L ${ct} ${rn} Q 0 ${rn} 0 ${rn - ct} L 0 ${ct} Q 0 0 ${ct} 0 Z`;
|
|
6282
6282
|
}, _t = (tn, rn, Ft) => {
|
|
@@ -6315,7 +6315,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6315
6315
|
elements: wn,
|
|
6316
6316
|
expectedHeight: Tn
|
|
6317
6317
|
};
|
|
6318
|
-
}, xe = ($) => String($).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"),
|
|
6318
|
+
}, xe = ($) => String($).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), Be = ($, F) => {
|
|
6319
6319
|
if (!$) return "";
|
|
6320
6320
|
if ((Mn($) || 0) <= F) return $;
|
|
6321
6321
|
const Y = "...", ne = Mn(Y) || 0;
|
|
@@ -6332,13 +6332,13 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6332
6332
|
elements: [],
|
|
6333
6333
|
expectedHeight: Tn
|
|
6334
6334
|
};
|
|
6335
|
-
const ye = W.getBodyField(oe, le),
|
|
6336
|
-
config:
|
|
6337
|
-
getCompConfig:
|
|
6335
|
+
const ye = W.getBodyField(oe, le), pe = mt(W.options?.columns || [], ye), ve = W.getCellOriginRecord?.(oe, le) || W.getRecordByCell?.(oe, le) || {}, fe = F || _n({
|
|
6336
|
+
config: pe?._compConfig,
|
|
6337
|
+
getCompConfig: pe?._getCompConfig,
|
|
6338
6338
|
formData: r || {},
|
|
6339
6339
|
getTableData: dn,
|
|
6340
6340
|
row: ve
|
|
6341
|
-
}) || {},
|
|
6341
|
+
}) || {}, Pe = Number(fe.size) || 16, Le = fe.color, Me = (ne.width - Pe) / 2, tt = (ne.height - Pe) / 2;
|
|
6342
6342
|
let qe = String(Y).trim();
|
|
6343
6343
|
if (!qe) return {
|
|
6344
6344
|
elements: [],
|
|
@@ -6353,13 +6353,13 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6353
6353
|
const St = Ke.match(/\bwidth\s*=\s*["']?([0-9.]+)[^"']*["']?/i)?.[1], Ie = Ke.match(/\bheight\s*=\s*["']?([0-9.]+)[^"']*["']?/i)?.[1];
|
|
6354
6354
|
pt = St && Ie ? `0 0 ${St} ${Ie}` : "0 0 24 24";
|
|
6355
6355
|
}
|
|
6356
|
-
qe = `<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
6357
|
-
} else qe = `<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
6356
|
+
qe = `<svg xmlns="http://www.w3.org/2000/svg" width="${Pe}" height="${Pe}" viewBox="${pt}">${Xe}</svg>`;
|
|
6357
|
+
} else qe = `<svg xmlns="http://www.w3.org/2000/svg" width="${Pe}" height="${Pe}" viewBox="0 0 24 24"></svg>`;
|
|
6358
6358
|
} else {
|
|
6359
6359
|
const Ae = La(qe);
|
|
6360
6360
|
if (Ae) {
|
|
6361
6361
|
const { body: Ke, width: Xe, height: pt } = Ae;
|
|
6362
|
-
qe = `<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
6362
|
+
qe = `<svg xmlns="http://www.w3.org/2000/svg" width="${Pe}" height="${Pe}" viewBox="0 0 ${Xe} ${pt}">${Ke}</svg>`;
|
|
6363
6363
|
}
|
|
6364
6364
|
}
|
|
6365
6365
|
return Le && (qe = qe.replace(/currentColor/g, Le)), {
|
|
@@ -6368,27 +6368,27 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6368
6368
|
svg: qe,
|
|
6369
6369
|
x: Me,
|
|
6370
6370
|
y: tt,
|
|
6371
|
-
width:
|
|
6372
|
-
height:
|
|
6371
|
+
width: Pe,
|
|
6372
|
+
height: Pe
|
|
6373
6373
|
}],
|
|
6374
|
-
expectedHeight: Math.max(Tn,
|
|
6374
|
+
expectedHeight: Math.max(Tn, Pe)
|
|
6375
6375
|
};
|
|
6376
6376
|
}, Fe = ($, F) => {
|
|
6377
|
-
const { dataValue: Y, rect: ne, table: W, col: oe, row: le, value: ye } = $,
|
|
6377
|
+
const { dataValue: Y, rect: ne, table: W, col: oe, row: le, value: ye } = $, pe = W.getBodyField(oe, le), ve = mt(W.options?.columns || [], pe), fe = W.getCellOriginRecord?.(oe, le) || W.getRecordByCell?.(oe, le) || {}, Pe = F || _n({
|
|
6378
6378
|
config: ve?._compConfig,
|
|
6379
6379
|
getCompConfig: ve?._getCompConfig,
|
|
6380
6380
|
formData: r || {},
|
|
6381
6381
|
getTableData: dn,
|
|
6382
|
-
row:
|
|
6382
|
+
row: fe
|
|
6383
6383
|
}) || {}, Le = ve?.style?.textAlign || "left", Me = ((ve._fieldFormat ? ye : Y) || "") + "", tt = u({
|
|
6384
|
-
config:
|
|
6385
|
-
row:
|
|
6384
|
+
config: Pe,
|
|
6385
|
+
row: fe,
|
|
6386
6386
|
value: Me
|
|
6387
6387
|
});
|
|
6388
|
-
if (tt.length === 0 &&
|
|
6388
|
+
if (tt.length === 0 && Pe.tagDefaultColor && Me.split(",").forEach((Ft) => {
|
|
6389
6389
|
tt.push({
|
|
6390
6390
|
label: Ft,
|
|
6391
|
-
color:
|
|
6391
|
+
color: Pe.tagDefaultColor
|
|
6392
6392
|
});
|
|
6393
6393
|
}), tt.length === 0) return {
|
|
6394
6394
|
elements: [],
|
|
@@ -6397,10 +6397,10 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6397
6397
|
const qe = 14, Ae = 28, Ke = 2, Xe = 12, pt = 8, St = 6;
|
|
6398
6398
|
let Ie = 8, dt = Math.max(0, ne.width - Ie * 2), at = Math.max(0, dt - Xe * 2);
|
|
6399
6399
|
const Ot = [], hn = (Ft) => {
|
|
6400
|
-
const ct = Mn(
|
|
6400
|
+
const ct = Mn(Be(Ft, at)) || 0;
|
|
6401
6401
|
return Math.min(dt, ct + Xe * 2);
|
|
6402
6402
|
}, wn = (Ft, ct, Ln, In, zn) => {
|
|
6403
|
-
const Ma =
|
|
6403
|
+
const Ma = Be(Ln, at), Aa = xe(Ma), vi = Mn(Ma) || 0, oo = Math.min(dt, vi + Xe * 2), Td = In || "#f2f3f5", jd = zn || "#1d2129", Md = Ae / 2 + qe * 0.35, Ad = `<svg xmlns="http://www.w3.org/2000/svg" width="${oo}" height="${Ae}" viewBox="0 0 ${oo} ${Ae}"><rect x="0" y="0" width="${oo}" height="${Ae}" rx="${Ke}" ry="${Ke}" fill="${Td}"/><text x="${oo / 2}" y="${Md}" text-anchor="middle" font-size="${qe}" fill="${jd}">${Aa}</text></svg>`;
|
|
6404
6404
|
return Ot.push({
|
|
6405
6405
|
type: "icon",
|
|
6406
6406
|
svg: Ad,
|
|
@@ -6457,12 +6457,12 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6457
6457
|
$ = $.replace("#", ""), $.length === 3 && ($ = $.split("").map((W) => W + W).join(""));
|
|
6458
6458
|
const F = parseInt($.substring(0, 2), 16), Y = parseInt($.substring(2, 4), 16), ne = parseInt($.substring(4, 6), 16);
|
|
6459
6459
|
if ((F * 299 + Y * 587 + ne * 114) / 1e3 >= 128) {
|
|
6460
|
-
const W = F / 255, oe = Y / 255, le = ne / 255, ye = Math.max(W, oe, le),
|
|
6461
|
-
let ve = 0,
|
|
6462
|
-
const
|
|
6463
|
-
if (ye !==
|
|
6464
|
-
const Xe = ye -
|
|
6465
|
-
switch (
|
|
6460
|
+
const W = F / 255, oe = Y / 255, le = ne / 255, ye = Math.max(W, oe, le), pe = Math.min(W, oe, le);
|
|
6461
|
+
let ve = 0, fe = 0;
|
|
6462
|
+
const Pe = (ye + pe) / 2;
|
|
6463
|
+
if (ye !== pe) {
|
|
6464
|
+
const Xe = ye - pe;
|
|
6465
|
+
switch (fe = Pe > 0.5 ? Xe / (2 - ye - pe) : Xe / (ye + pe), ye) {
|
|
6466
6466
|
case W:
|
|
6467
6467
|
ve = (oe - le) / Xe + (oe < le ? 6 : 0);
|
|
6468
6468
|
break;
|
|
@@ -6475,7 +6475,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6475
6475
|
}
|
|
6476
6476
|
ve /= 6;
|
|
6477
6477
|
}
|
|
6478
|
-
const Le = 0.3, Me =
|
|
6478
|
+
const Le = 0.3, Me = fe;
|
|
6479
6479
|
let tt, qe, Ae;
|
|
6480
6480
|
if (Me === 0) tt = qe = Ae = Le;
|
|
6481
6481
|
else {
|
|
@@ -6487,7 +6487,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6487
6487
|
}
|
|
6488
6488
|
return "#ffffff";
|
|
6489
6489
|
}, ht = ($) => {
|
|
6490
|
-
const { table: F, row: Y, col: ne, rect: W, value: oe } = $, { Group: le, Text: ye } = nt.CustomLayout,
|
|
6490
|
+
const { table: F, row: Y, col: ne, rect: W, value: oe } = $, { Group: le, Text: ye } = nt.CustomLayout, pe = F.getBodyField(ne, Y), ve = mt(F.options?.columns || [], pe), fe = ve?._compConfig || {}, Pe = new le({
|
|
6491
6491
|
height: W.height,
|
|
6492
6492
|
width: W.width,
|
|
6493
6493
|
display: "flex",
|
|
@@ -6506,9 +6506,9 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6506
6506
|
]
|
|
6507
6507
|
});
|
|
6508
6508
|
return Me.addEventListener("click", () => {
|
|
6509
|
-
if (
|
|
6509
|
+
if (fe.click) {
|
|
6510
6510
|
const tt = F.getCellOriginRecord(ne, Y);
|
|
6511
|
-
|
|
6511
|
+
fe.click({
|
|
6512
6512
|
row: tt,
|
|
6513
6513
|
column: ve,
|
|
6514
6514
|
openLayer: h
|
|
@@ -6518,23 +6518,23 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6518
6518
|
tt.target.setAttribute("fill", Et(Le, -20)), F.scenegraph.stage.renderNextFrame();
|
|
6519
6519
|
}), Me.addEventListener("mouseleave", (tt) => {
|
|
6520
6520
|
tt.target.setAttribute("fill", Le), F.scenegraph.stage.renderNextFrame();
|
|
6521
|
-
}),
|
|
6522
|
-
rootContainer:
|
|
6521
|
+
}), Pe.add(Me), {
|
|
6522
|
+
rootContainer: Pe,
|
|
6523
6523
|
renderDefault: !1
|
|
6524
6524
|
};
|
|
6525
6525
|
}, Dt = ($, F) => F ? "#c9cdd4" : $ === "danger" ? "#f53f3f" : $ === "warning" ? "#ff7d00" : $ === "success" ? "#00b42a" : "#165dff", qt = ($) => {
|
|
6526
|
-
const { table: F, row: Y, col: ne, rect: W } = $, { Group: oe, Text: le } = nt.CustomLayout, ye = F.getBodyField(ne, Y),
|
|
6527
|
-
config:
|
|
6528
|
-
getCompConfig:
|
|
6526
|
+
const { table: F, row: Y, col: ne, rect: W } = $, { Group: oe, Text: le } = nt.CustomLayout, ye = F.getBodyField(ne, Y), pe = mt(F.options?.columns || [], ye), ve = F.getCellOriginRecord?.(ne, Y) || F.getRecordByCell?.(ne, Y) || {}, fe = _n({
|
|
6527
|
+
config: pe?._compConfig,
|
|
6528
|
+
getCompConfig: pe?._getCompConfig,
|
|
6529
6529
|
formData: r || {},
|
|
6530
6530
|
getTableData: dn,
|
|
6531
6531
|
row: ve
|
|
6532
|
-
}) || {},
|
|
6532
|
+
}) || {}, Pe = Array.isArray(fe.schema) ? fe.schema : [], Le = String(fe.buttonLabel || fe.layerLabel || pe?.title || "设置"), Me = fe.disabled === !0 || Pe.length === 0, tt = Dt(fe.status, Me), qe = new oe({
|
|
6533
6533
|
height: W.height,
|
|
6534
6534
|
width: W.width,
|
|
6535
6535
|
display: "flex",
|
|
6536
6536
|
alignItems: "center",
|
|
6537
|
-
justifyContent:
|
|
6537
|
+
justifyContent: pe?.style?.textAlign === "center" ? "center" : pe?.style?.textAlign === "right" ? "flex-end" : "flex-start"
|
|
6538
6538
|
}), Ae = new le({
|
|
6539
6539
|
text: Le,
|
|
6540
6540
|
fontSize: 14,
|
|
@@ -6549,17 +6549,17 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6549
6549
|
});
|
|
6550
6550
|
return Ae.addEventListener("click", () => {
|
|
6551
6551
|
if (Me) return;
|
|
6552
|
-
const Ke = Number(
|
|
6552
|
+
const Ke = Number(fe.layerWidth), Xe = Number(fe.layerHeight);
|
|
6553
6553
|
h({
|
|
6554
|
-
title: c(
|
|
6554
|
+
title: c(fe.layerLabel || Le || "设置"),
|
|
6555
6555
|
name: qp,
|
|
6556
6556
|
width: Number.isFinite(Ke) ? Ke : 600,
|
|
6557
6557
|
height: Number.isFinite(Xe) ? Xe : 400,
|
|
6558
6558
|
hasBtns: !1,
|
|
6559
6559
|
hasSaveBtn: !1,
|
|
6560
6560
|
config: {
|
|
6561
|
-
schema:
|
|
6562
|
-
formConfig:
|
|
6561
|
+
schema: Pe,
|
|
6562
|
+
formConfig: fe.formConfig || {},
|
|
6563
6563
|
rowData: ve
|
|
6564
6564
|
}
|
|
6565
6565
|
});
|
|
@@ -6572,9 +6572,9 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6572
6572
|
renderDefault: !1
|
|
6573
6573
|
};
|
|
6574
6574
|
}, mn = ($) => {
|
|
6575
|
-
const { table: F, row: Y, col: ne, rect: W } = $, { height: oe, width: le } = W ?? F.getCellRect(ne, Y), { Group: ye, CheckBox:
|
|
6576
|
-
const dt =
|
|
6577
|
-
|
|
6575
|
+
const { table: F, row: Y, col: ne, rect: W } = $, { height: oe, width: le } = W ?? F.getCellRect(ne, Y), { Group: ye, CheckBox: pe } = nt.CustomLayout, ve = F.getBodyField(ne, Y), fe = mt(F.options?.columns || [], ve), Pe = F.getCellOriginRecord(ne, Y) || {}, Le = fe?.style?.textAlign === "right" ? "flex-end" : fe?.style?.textAlign === "center" ? "center" : "flex-start", Me = fe?.style?.textAlign === "right" ? "flex-end" : fe?.style?.textAlign === "center" ? "center" : "flex-start", tt = (St, Ie) => {
|
|
6576
|
+
const dt = Pe?.[ve];
|
|
6577
|
+
Pe[ve] = (Array.isArray(dt) ? dt : []).map((at, Ot) => Ot !== St ? at : at && typeof at == "object" ? {
|
|
6578
6578
|
...at,
|
|
6579
6579
|
...Ie
|
|
6580
6580
|
} : { ...Ie });
|
|
@@ -6588,7 +6588,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6588
6588
|
alignItems: Le,
|
|
6589
6589
|
justifyContent: "center",
|
|
6590
6590
|
flexWrap: "nowrap"
|
|
6591
|
-
}), Ke =
|
|
6591
|
+
}), Ke = Pe?.[ve];
|
|
6592
6592
|
if (!Array.isArray(Ke)) return {
|
|
6593
6593
|
rootContainer: Ae,
|
|
6594
6594
|
renderDefault: !1
|
|
@@ -6609,7 +6609,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6609
6609
|
});
|
|
6610
6610
|
Ae.add(pt);
|
|
6611
6611
|
for (let St = 0; St < Xe.length; St++) {
|
|
6612
|
-
const Ie = Xe[St], dt = Ie && typeof Ie == "object" ? Ie.label ?? Ie.value ?? "" : Ie ?? "", at = new
|
|
6612
|
+
const Ie = Xe[St], dt = Ie && typeof Ie == "object" ? Ie.label ?? Ie.value ?? "" : Ie ?? "", at = new pe({
|
|
6613
6613
|
text: {
|
|
6614
6614
|
text: String(dt),
|
|
6615
6615
|
fontSize: 12
|
|
@@ -6661,7 +6661,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6661
6661
|
formData: r || {},
|
|
6662
6662
|
getTableData: dn,
|
|
6663
6663
|
row: le
|
|
6664
|
-
}),
|
|
6664
|
+
}), pe = il({
|
|
6665
6665
|
type: oe._compType,
|
|
6666
6666
|
getCompType: oe._getCompType,
|
|
6667
6667
|
config: ye,
|
|
@@ -6669,16 +6669,16 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6669
6669
|
getTableData: dn,
|
|
6670
6670
|
row: le
|
|
6671
6671
|
});
|
|
6672
|
-
le._compTypeByRender = le._compTypeByRender || {}, le._compTypeByRender[W] =
|
|
6672
|
+
le._compTypeByRender = le._compTypeByRender || {}, le._compTypeByRender[W] = pe;
|
|
6673
6673
|
const ve = {
|
|
6674
6674
|
text: ke,
|
|
6675
|
-
"j-switch":
|
|
6675
|
+
"j-switch": ze,
|
|
6676
6676
|
"j-rate": U,
|
|
6677
6677
|
"j-slider": Se,
|
|
6678
6678
|
"j-tag": Fe,
|
|
6679
6679
|
"j-input-tag": Fe,
|
|
6680
6680
|
"j-icon": rt
|
|
6681
|
-
}[
|
|
6681
|
+
}[pe] || ke;
|
|
6682
6682
|
return ve ? ve($, ye) : {
|
|
6683
6683
|
elements: [],
|
|
6684
6684
|
expectedHeight: Tn
|
|
@@ -6687,8 +6687,8 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6687
6687
|
const W = ne.getBodyField(F, Y), oe = mt(ne.options?.columns || [], W);
|
|
6688
6688
|
if (oe._fieldFormat) return oe._fieldFormat($, F, Y, ne);
|
|
6689
6689
|
if (oe._compType === "dateTime") {
|
|
6690
|
-
const
|
|
6691
|
-
return rl($[W],
|
|
6690
|
+
const pe = oe._compConfig?.format || "YYYY-MM-DD HH:mm:ss";
|
|
6691
|
+
return rl($[W], pe);
|
|
6692
6692
|
}
|
|
6693
6693
|
const le = Qf($[W], s, {
|
|
6694
6694
|
type: oe._compType,
|
|
@@ -6715,9 +6715,9 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6715
6715
|
const Kt = ($) => {
|
|
6716
6716
|
const F = new Set(o.columnFilter || []), Y = (W, oe, le) => !(W.config?.display === !1 || F.has(W.id)), ne = (W, oe, le = 0) => {
|
|
6717
6717
|
const ye = [];
|
|
6718
|
-
return W.forEach((
|
|
6719
|
-
if (!Y(
|
|
6720
|
-
const { id: ve, type:
|
|
6718
|
+
return W.forEach((pe) => {
|
|
6719
|
+
if (!Y(pe, oe, le)) return;
|
|
6720
|
+
const { id: ve, type: fe, config: Pe, getCompConfig: Le, getCompType: Me, children: tt, customLayout: qe } = pe, { label: Ae, width: Ke, minWidth: Xe, maxWidth: pt, align: St, headerAlign: Ie, fieldFormat: dt, editor: at, frozen: Ot, mergeCell: hn, ...wn } = Pe || {}, ia = Ie ?? St, _t = {
|
|
6721
6721
|
field: ve,
|
|
6722
6722
|
title: Ae,
|
|
6723
6723
|
width: Ke,
|
|
@@ -6727,15 +6727,15 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6727
6727
|
style: { textAlign: St },
|
|
6728
6728
|
_customLayout: qe,
|
|
6729
6729
|
_fieldFormat: dt,
|
|
6730
|
-
_compType:
|
|
6730
|
+
_compType: fe,
|
|
6731
6731
|
_compConfig: { ...wn },
|
|
6732
6732
|
_getCompConfig: Le,
|
|
6733
6733
|
_getCompType: Me,
|
|
6734
6734
|
frozen: Ot,
|
|
6735
6735
|
mergeCell: hn
|
|
6736
|
-
}, ra = typeof Me == "function", Ta = Jc(
|
|
6737
|
-
if ((Ta || ra) && (_t.editor = Ta || "j-comp-editor", S = !0), ra ? _t.customRender = Rt : (
|
|
6738
|
-
const ja = ne(tt,
|
|
6736
|
+
}, ra = typeof Me == "function", Ta = Jc(fe);
|
|
6737
|
+
if ((Ta || ra) && (_t.editor = Ta || "j-comp-editor", S = !0), ra ? _t.customRender = Rt : (fe === "j-switch" && (_t.customRender = ze), fe === "j-rate" && (_t.customRender = U), fe === "j-slider" && (_t.customRender = Se), (fe === "j-tag" || fe === "j-input-tag") && (_t.customRender = Fe), fe === "j-icon" && (_t.customRender = rt)), fe === "link" && (_t.customLayout = ht), (fe === "j-layerform" || fe === "j-layer-form") && (_t.customLayout = qt), fe === "checkbox" && (_t.customLayout = mn), fe === "j-switch" && (_t.minWidth = _t.minWidth || Ke, _t.maxWidth = _t.maxWidth || Ke), qe && (_t.customLayout = $t), _t.fieldFormat = jt, tt && tt.length > 0) {
|
|
6738
|
+
const ja = ne(tt, pe, le + 1);
|
|
6739
6739
|
if (ja.length === 0) return;
|
|
6740
6740
|
_t.columns = ja;
|
|
6741
6741
|
}
|
|
@@ -6748,13 +6748,13 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6748
6748
|
return `#${(W << 16 | oe << 8 | le).toString(16).padStart(6, "0")}`;
|
|
6749
6749
|
}, un = () => {
|
|
6750
6750
|
let $ = j;
|
|
6751
|
-
o.isPage && ($ =
|
|
6751
|
+
o.isPage && ($ = de.value + j);
|
|
6752
6752
|
let F = Mn(String($)) || 0;
|
|
6753
6753
|
return o.subColumns && o.subColumns.length > 0 && (F = F + 32), Math.max(45, F + 18);
|
|
6754
6754
|
}, q = ($) => {
|
|
6755
6755
|
let F = (Y, ne, W, oe) => {
|
|
6756
6756
|
const le = oe.getRecordIndexByCell(ne, W);
|
|
6757
|
-
return o.isPage && !$ ?
|
|
6757
|
+
return o.isPage && !$ ? de.value + le + 1 : le + 1;
|
|
6758
6758
|
};
|
|
6759
6759
|
return $ && (F = (Y, ne, W, oe) => oe.getRecordIndexByCell(ne, W) + 1), {
|
|
6760
6760
|
field: "__sequence__",
|
|
@@ -6826,8 +6826,8 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6826
6826
|
}
|
|
6827
6827
|
const ne = Oe(Y.columns), W = [], oe = [], le = [];
|
|
6828
6828
|
if (ne.forEach((ye) => {
|
|
6829
|
-
const
|
|
6830
|
-
|
|
6829
|
+
const pe = Ce(ye);
|
|
6830
|
+
pe === "left" ? W.push(ye) : pe === "right" ? oe.push(ye) : le.push(ye);
|
|
6831
6831
|
}), (W.length > 0 ? 1 : 0) + (oe.length > 0 ? 1 : 0) + (le.length > 0 ? 1 : 0) <= 1) {
|
|
6832
6832
|
Y.columns = ne, F.push(Y);
|
|
6833
6833
|
return;
|
|
@@ -6859,15 +6859,15 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6859
6859
|
const W = {};
|
|
6860
6860
|
let oe = Kt($);
|
|
6861
6861
|
oe.length === 0 && (oe = [se()]), oe = Oe(oe);
|
|
6862
|
-
const le = [], ye = [],
|
|
6862
|
+
const le = [], ye = [], pe = [];
|
|
6863
6863
|
oe.forEach((Le) => {
|
|
6864
6864
|
const Me = Ce(Le);
|
|
6865
|
-
Me === "left" ? le.push(Le) : Me === "right" ? ye.push(Le) :
|
|
6865
|
+
Me === "left" ? le.push(Le) : Me === "right" ? ye.push(Le) : pe.push(Le);
|
|
6866
6866
|
});
|
|
6867
|
-
const ve = Ve(le),
|
|
6868
|
-
_ += ve.left, v +=
|
|
6867
|
+
const ve = Ve(le), fe = Ve(ye);
|
|
6868
|
+
_ += ve.left, v += fe.right, oe = [
|
|
6869
6869
|
...le,
|
|
6870
|
-
...
|
|
6870
|
+
...pe,
|
|
6871
6871
|
...ye
|
|
6872
6872
|
], F && (oe.unshift(q(ne)), _++), Y.length > 0 && (oe.push(ie(Y)), v++), S && (W.editCellTrigger = "click", W.keyboardOptions = {
|
|
6873
6873
|
copySelected: !0,
|
|
@@ -6875,12 +6875,12 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6875
6875
|
pasteValueToCell: !0,
|
|
6876
6876
|
selectAllOnCtrlA: !0
|
|
6877
6877
|
});
|
|
6878
|
-
const
|
|
6878
|
+
const Pe = (Le) => {
|
|
6879
6879
|
for (const Me of Le)
|
|
6880
|
-
if (Me?._compType === "checkbox" || Me?.customRender === Rt || Me?.customRender === Fe || Array.isArray(Me?.columns) &&
|
|
6880
|
+
if (Me?._compType === "checkbox" || Me?.customRender === Rt || Me?.customRender === Fe || Array.isArray(Me?.columns) && Pe(Me.columns)) return !0;
|
|
6881
6881
|
return !1;
|
|
6882
6882
|
};
|
|
6883
|
-
return
|
|
6883
|
+
return Pe(oe) && !(o.subColumns && o.subColumns.length > 0) && (W.defaultRowHeight = "auto", W.defaultHeaderRowHeight = 40), {
|
|
6884
6884
|
columns: oe,
|
|
6885
6885
|
option: W
|
|
6886
6886
|
};
|
|
@@ -6943,30 +6943,30 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
6943
6943
|
}
|
|
6944
6944
|
}
|
|
6945
6945
|
}), y.on("click_cell", (W) => {
|
|
6946
|
-
const { col: oe, row: le, cellType: ye, originData:
|
|
6946
|
+
const { col: oe, row: le, cellType: ye, originData: pe } = W, ve = pe || { children: y.records };
|
|
6947
6947
|
if (Ne.value) {
|
|
6948
6948
|
if (ye === "checkbox" && oe == 0) {
|
|
6949
6949
|
if (ve.__checkState = W.target.attribute.checked, le === 0 && ve.__checkState === !1) {
|
|
6950
|
-
const
|
|
6950
|
+
const Pe = (Le) => {
|
|
6951
6951
|
!Array.isArray(Le) || Le.length === 0 || Le.forEach((Me) => {
|
|
6952
|
-
Me && (Me.__checkState = !1, Array.isArray(Me.children) && Me.children.length > 0 &&
|
|
6952
|
+
Me && (Me.__checkState = !1, Array.isArray(Me.children) && Me.children.length > 0 && Pe(Me.children));
|
|
6953
6953
|
});
|
|
6954
6954
|
};
|
|
6955
|
-
|
|
6955
|
+
Pe(ve.children);
|
|
6956
6956
|
}
|
|
6957
|
-
const
|
|
6958
|
-
|
|
6957
|
+
const fe = De();
|
|
6958
|
+
fe.length == 0 && y.setCellCheckboxState(0, 0, !1), R.value = fe.length, i("selectionChanged", {
|
|
6959
6959
|
isMultiple: !0,
|
|
6960
|
-
selections:
|
|
6960
|
+
selections: fe,
|
|
6961
6961
|
record: ve,
|
|
6962
6962
|
checked: ve.__checkState
|
|
6963
6963
|
}), y.renderWithRecreateCells();
|
|
6964
6964
|
}
|
|
6965
6965
|
} else setTimeout(() => {
|
|
6966
|
-
const
|
|
6967
|
-
R.value =
|
|
6966
|
+
const fe = De();
|
|
6967
|
+
R.value = fe.length, i("selectionChanged", {
|
|
6968
6968
|
isMultiple: !1,
|
|
6969
|
-
selections:
|
|
6969
|
+
selections: fe,
|
|
6970
6970
|
record: ve,
|
|
6971
6971
|
checked: !0
|
|
6972
6972
|
});
|
|
@@ -7007,7 +7007,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
7007
7007
|
}
|
|
7008
7008
|
if (o.selectStateKey && o.isMultiple) {
|
|
7009
7009
|
const Y = $.filter((ne) => ne[o.selectStateKey] && !Ht(ne));
|
|
7010
|
-
|
|
7010
|
+
ue(Y), R.value = Y.length, i("selectRecordsChanged", Y), i("selectionChanged", {
|
|
7011
7011
|
isMultiple: !0,
|
|
7012
7012
|
selections: Y,
|
|
7013
7013
|
record: { children: y.records },
|
|
@@ -7036,12 +7036,12 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
7036
7036
|
set($) {
|
|
7037
7037
|
oa.value = $, i("update:pageSize", $);
|
|
7038
7038
|
}
|
|
7039
|
-
}),
|
|
7039
|
+
}), de = P(() => (Ea.value - 1) * Xt.value), he = ($, F) => {
|
|
7040
7040
|
i("loadPageData", {
|
|
7041
7041
|
rows: F,
|
|
7042
7042
|
page: $
|
|
7043
7043
|
});
|
|
7044
|
-
},
|
|
7044
|
+
}, De = () => {
|
|
7045
7045
|
if (!y) return [];
|
|
7046
7046
|
if (!Ne.value) {
|
|
7047
7047
|
const $ = y.getSelectedCellInfos();
|
|
@@ -7054,60 +7054,60 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
7054
7054
|
if (y.stateManager && y.stateManager.checkedState) {
|
|
7055
7055
|
const $ = [], F = /* @__PURE__ */ new Set(), Y = (ye) => {
|
|
7056
7056
|
if (!ye || Ht(ye)) return;
|
|
7057
|
-
const
|
|
7058
|
-
if (
|
|
7059
|
-
if (F.has(
|
|
7060
|
-
F.add(
|
|
7057
|
+
const pe = He(ye);
|
|
7058
|
+
if (pe) {
|
|
7059
|
+
if (F.has(pe)) return;
|
|
7060
|
+
F.add(pe);
|
|
7061
7061
|
const ve = {};
|
|
7062
7062
|
ye.__checkState = !0, Di(ve, ye, ["children"]), $.push(ve);
|
|
7063
7063
|
} else console.warn("key is empty");
|
|
7064
7064
|
}, ne = (ye) => {
|
|
7065
|
-
const
|
|
7066
|
-
!Array.isArray(
|
|
7065
|
+
const pe = ye?.children;
|
|
7066
|
+
!Array.isArray(pe) || pe.length === 0 || pe.forEach((ve) => {
|
|
7067
7067
|
Y(ve), ne(ve);
|
|
7068
7068
|
});
|
|
7069
|
-
}, W = y.stateManager.checkedState, oe = y.records, le = (ye,
|
|
7070
|
-
const
|
|
7071
|
-
return ye <
|
|
7069
|
+
}, W = y.stateManager.checkedState, oe = y.records, le = (ye, pe, ve) => {
|
|
7070
|
+
const fe = ve[pe[ye]];
|
|
7071
|
+
return ye < pe.length - 1 && fe?.children && fe.children.length > 0 ? le(ye + 1, pe, fe.children || []) : fe;
|
|
7072
7072
|
};
|
|
7073
|
-
return W.forEach((ye,
|
|
7073
|
+
return W.forEach((ye, pe) => {
|
|
7074
7074
|
const ve = ye?._checkState;
|
|
7075
7075
|
if (ve === "indeterminate" || ve === !0) {
|
|
7076
|
-
const
|
|
7077
|
-
Y(
|
|
7076
|
+
const fe = le(0, (pe + "").split(",").map(Number), oe);
|
|
7077
|
+
Y(fe), ve === !0 && ne(fe);
|
|
7078
7078
|
}
|
|
7079
7079
|
}), $;
|
|
7080
7080
|
}
|
|
7081
7081
|
return [];
|
|
7082
|
-
},
|
|
7082
|
+
}, He = ($) => o.editConfig.isRemoveBtn ? $._i : o.rowKey ? o.rowKey.split(",").map((F) => $[F.trim()]).join("::") : "", ue = ($) => {
|
|
7083
7083
|
if (y)
|
|
7084
7084
|
if (Ne.value || y.clearSelected(), o.rowKey) {
|
|
7085
|
-
const F = new Set($.map(
|
|
7085
|
+
const F = new Set($.map(He)), Y = "__checkState";
|
|
7086
7086
|
if (!Ne.value) {
|
|
7087
7087
|
const ye = y.records;
|
|
7088
|
-
for (let
|
|
7089
|
-
const ve = ye[
|
|
7090
|
-
if (!F.has(
|
|
7091
|
-
const
|
|
7092
|
-
y.selectRow(
|
|
7088
|
+
for (let pe = 0; pe < ye.length; pe++) {
|
|
7089
|
+
const ve = ye[pe];
|
|
7090
|
+
if (!F.has(He(ve))) continue;
|
|
7091
|
+
const fe = y.getTableIndexByRecordIndex(pe);
|
|
7092
|
+
y.selectRow(fe);
|
|
7093
7093
|
break;
|
|
7094
7094
|
}
|
|
7095
7095
|
return;
|
|
7096
7096
|
}
|
|
7097
7097
|
const ne = (ye) => {
|
|
7098
|
-
ye.forEach((
|
|
7099
|
-
if (Array.isArray(
|
|
7100
|
-
ne(
|
|
7101
|
-
const ve =
|
|
7102
|
-
ve.length === 0 ?
|
|
7098
|
+
ye.forEach((pe) => {
|
|
7099
|
+
if (Array.isArray(pe?.children) && pe.children.length > 0) {
|
|
7100
|
+
ne(pe.children);
|
|
7101
|
+
const ve = pe.children.filter((Le) => !Ht(Le)), fe = ve.filter((Le) => Le?.[Y] === !0), Pe = ve.filter((Le) => Le?.[Y] === !1);
|
|
7102
|
+
ve.length === 0 ? pe[Y] = !1 : fe.length == ve.length ? pe[Y] = !0 : Pe.length == ve.length ? pe[Y] = !1 : pe[Y] = "indeterminate", pe[Y] === "indeterminate" && (pe.hierarchyState = "expand");
|
|
7103
7103
|
} else {
|
|
7104
|
-
const ve = F.has(
|
|
7105
|
-
|
|
7104
|
+
const ve = F.has(He(pe));
|
|
7105
|
+
pe[Y] = !!(!Ht(pe) && ve);
|
|
7106
7106
|
}
|
|
7107
7107
|
});
|
|
7108
7108
|
}, W = y.records;
|
|
7109
7109
|
o.isTree ? ne(W) : W.forEach((ye) => {
|
|
7110
|
-
ye[Y] = !Ht(ye) && F.has(
|
|
7110
|
+
ye[Y] = !Ht(ye) && F.has(He(ye));
|
|
7111
7111
|
});
|
|
7112
7112
|
const oe = Bt();
|
|
7113
7113
|
oe.records = W, y.updateOption(oe, {
|
|
@@ -7122,9 +7122,9 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
7122
7122
|
i("rowChange", $), y.renderWithRecreateCells();
|
|
7123
7123
|
}, Pt = ($) => {
|
|
7124
7124
|
if (!y) return;
|
|
7125
|
-
const F =
|
|
7125
|
+
const F = De();
|
|
7126
7126
|
if (F.length > 0) {
|
|
7127
|
-
|
|
7127
|
+
ue(F);
|
|
7128
7128
|
return;
|
|
7129
7129
|
}
|
|
7130
7130
|
const Y = Bt();
|
|
@@ -7176,7 +7176,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
7176
7176
|
});
|
|
7177
7177
|
}, jo = P(() => R.value > 0), gi = () => {
|
|
7178
7178
|
if (!y) return;
|
|
7179
|
-
const $ =
|
|
7179
|
+
const $ = De();
|
|
7180
7180
|
$.length !== 0 && Ld.confirm(`确定要删除选中的 ${$.length} 条记录吗?`, "删除确认", {
|
|
7181
7181
|
confirmButtonText: "确定",
|
|
7182
7182
|
cancelButtonText: "取消",
|
|
@@ -7230,8 +7230,8 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
7230
7230
|
getInstance: To,
|
|
7231
7231
|
setRecords: to,
|
|
7232
7232
|
getRecords: dn,
|
|
7233
|
-
getSelection:
|
|
7234
|
-
setSelection:
|
|
7233
|
+
getSelection: De,
|
|
7234
|
+
setSelection: ue,
|
|
7235
7235
|
renderTable: en
|
|
7236
7236
|
}), ($, F) => {
|
|
7237
7237
|
const Y = V("j-button"), ne = V("el-space"), W = V("el-pagination");
|
|
@@ -7507,9 +7507,9 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
7507
7507
|
return;
|
|
7508
7508
|
}
|
|
7509
7509
|
b.value.onmousedown = (ie) => {
|
|
7510
|
-
const { clientX: ke } = ie, { clientY:
|
|
7511
|
-
p._left = p.left, p._top = p.top, m.value || (m.value = et), w.value || (w.value = me), ke > U + 10 && ke < U + me - 10 &&
|
|
7512
|
-
xe.preventDefault(), ke > U && ke < U + 10 && (ke > xe.clientX && (w.value = me + (ke - xe.clientX), p.left = p._left - (ke - xe.clientX)), ke < xe.clientX && w.value > a.minWidth && (w.value = me - (xe.clientX - ke), p.left = p._left + xe.clientX - ke)), ke > U + me - 10 && ke < U + me && (ke > xe.clientX && w.value > a.minWidth && (w.value = me - (ke - xe.clientX)), ke < xe.clientX && typeof document < "u" && document.body && C.value + p.left + w.value < document.body.clientWidth && (w.value = me + (xe.clientX - ke))),
|
|
7510
|
+
const { clientX: ke } = ie, { clientY: ze } = ie, U = p.left + C.value, Se = p.top + v.value;
|
|
7511
|
+
p._left = p.left, p._top = p.top, m.value || (m.value = et), w.value || (w.value = me), ke > U + 10 && ke < U + me - 10 && ze > Se + 5 && ze < Se + 47 || (typeof document < "u" && (document.onmousemove = function(xe) {
|
|
7512
|
+
xe.preventDefault(), ke > U && ke < U + 10 && (ke > xe.clientX && (w.value = me + (ke - xe.clientX), p.left = p._left - (ke - xe.clientX)), ke < xe.clientX && w.value > a.minWidth && (w.value = me - (xe.clientX - ke), p.left = p._left + xe.clientX - ke)), ke > U + me - 10 && ke < U + me && (ke > xe.clientX && w.value > a.minWidth && (w.value = me - (ke - xe.clientX)), ke < xe.clientX && typeof document < "u" && document.body && C.value + p.left + w.value < document.body.clientWidth && (w.value = me + (xe.clientX - ke))), ze > Se && ze < Se + 5 && (ze > xe.clientY && (m.value = et + ze - xe.clientY, p.top = p._top - (ze - xe.clientY)), ze < xe.clientY && m.value > a.minHeight && (m.value = et - (xe.clientY - ze), p.top = p._top + xe.clientY - ze)), Ct + ze > Se + et + 38 && Ct + ze < Se + et + 48 && (ze > xe.clientY && m.value > a.minHeight && (m.value = et - (ze - xe.clientY)), ze < xe.clientY && typeof window < "u" && v.value + p.top + m.value + 48 < window.innerHeight && (m.value = et + xe.clientY - ze));
|
|
7513
7513
|
}), typeof document < "u" && (document.onmouseup = function() {
|
|
7514
7514
|
typeof document < "u" && (document.onmousemove = null, document.onmouseup = null);
|
|
7515
7515
|
}));
|
|
@@ -8926,7 +8926,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
8926
8926
|
return "";
|
|
8927
8927
|
}, S = (ie, ke) => {
|
|
8928
8928
|
if (ke && ke.indexOf("image") > -1) return "file-image";
|
|
8929
|
-
const
|
|
8929
|
+
const ze = _(ie);
|
|
8930
8930
|
return [
|
|
8931
8931
|
"webp",
|
|
8932
8932
|
"bmp",
|
|
@@ -8936,7 +8936,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
8936
8936
|
"tif",
|
|
8937
8937
|
"gif",
|
|
8938
8938
|
"svg"
|
|
8939
|
-
].includes(
|
|
8939
|
+
].includes(ze) ? "file-image" : v[ze] || "file-ufo";
|
|
8940
8940
|
}, R = (ie) => {
|
|
8941
8941
|
ie.status = n.autoUpload ? "uploading" : "unUpload", ie.uploadSize = 0, ie.percentage = 0, ie.icon = S(ie.name, ie.type), u || (ie.icon = "file-text"), ie.id = ie.uid, ie.url = window.URL.createObjectURL(ie), ie.date = mi(), ie.param = w.value;
|
|
8942
8942
|
}, j = (ie) => {
|
|
@@ -8944,8 +8944,8 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
8944
8944
|
file: ie,
|
|
8945
8945
|
list: m.value
|
|
8946
8946
|
});
|
|
8947
|
-
}, T = (ie, ke,
|
|
8948
|
-
ie.percent =
|
|
8947
|
+
}, T = (ie, ke, ze) => {
|
|
8948
|
+
ie.percent = ze, ie.percentage = ze, ie.uploadSize = ke, y();
|
|
8949
8949
|
}, H = (ie) => {
|
|
8950
8950
|
ie.status = "done", ie.id += "1", ie.uid += "1", y(), a("success", {
|
|
8951
8951
|
file: ie,
|
|
@@ -9033,8 +9033,8 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
9033
9033
|
}, We = (ie) => {
|
|
9034
9034
|
const ke = ie.response?.fileId || ie.id;
|
|
9035
9035
|
if (!c) return "";
|
|
9036
|
-
const
|
|
9037
|
-
return `${c}/data/file/preview/${Sh.createAesEncryption({ key: "jcode" }).encrypt(
|
|
9036
|
+
const ze = mi(/* @__PURE__ */ new Date(), "YYYY-MM-DD HH:mm:ss") + "|" + ke;
|
|
9037
|
+
return `${c}/data/file/preview/${Sh.createAesEncryption({ key: "jcode" }).encrypt(ze).replace(/\//g, "|")}?token=${s?.value}&&projectId=${d?.value.j_Id}`;
|
|
9038
9038
|
}, et = () => {
|
|
9039
9039
|
Re.isDown === !1 && o && o("无权限下载!"), Yg(`${c}/data/file/${Re.response?.fileId || Re.id}?token=${s?.value}`);
|
|
9040
9040
|
}, Ct = () => {
|
|
@@ -9042,7 +9042,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
9042
9042
|
return o && o(`当前限制选择${n.limit}个文件`), !1;
|
|
9043
9043
|
};
|
|
9044
9044
|
return (ie, ke) => {
|
|
9045
|
-
const
|
|
9045
|
+
const ze = V("j-icon"), U = V("el-popover"), Se = V("j-button"), xe = V("el-upload"), Be = V("el-text"), rt = V("j-dialog-full"), Fe = go("loading");
|
|
9046
9046
|
return k(), L("div", Xg, [
|
|
9047
9047
|
ee(xe, {
|
|
9048
9048
|
action: "",
|
|
@@ -9061,7 +9061,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
9061
9061
|
"on-preview": me,
|
|
9062
9062
|
"on-exceed": Ct
|
|
9063
9063
|
}, {
|
|
9064
|
-
default: X(() => [e.isUploadImg && !e.isLayer && !e.readonly ? (k(), L("div", Zg, [ee(
|
|
9064
|
+
default: X(() => [e.isUploadImg && !e.isLayer && !e.readonly ? (k(), L("div", Zg, [ee(ze, { icon: "mdi:add" }), O("div", Qg, Ee(G(l)(e.placeholder)), 1)])) : e.isLayer && e.showFileList && m.value.length > 0 && !K.value ? (k(), N(U, {
|
|
9065
9065
|
key: 1,
|
|
9066
9066
|
placement: "bottom",
|
|
9067
9067
|
title: e.isUploadImg ? G(l)("图片列表") : G(l)("文件列表")
|
|
@@ -9103,7 +9103,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
9103
9103
|
"multiple",
|
|
9104
9104
|
"file-list"
|
|
9105
9105
|
]),
|
|
9106
|
-
e.isTip ? (k(), L("div", ev, [ee(
|
|
9106
|
+
e.isTip ? (k(), L("div", ev, [ee(Be, null, {
|
|
9107
9107
|
default: X(() => [Fn(Ee(`${G(l)("只能上传不超过{0}的{1}文件", `${e.maxSize}${e.sizeType}`, `${p.value || ""}`)}${b.value}`), 1)]),
|
|
9108
9108
|
_: 1
|
|
9109
9109
|
})])) : te("", !0),
|
|
@@ -12597,57 +12597,57 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
12597
12597
|
i.isMultiple && !i.rowKey && console.warn("rowKey is required when isMultiple is true");
|
|
12598
12598
|
const l = z(), c = z(), s = z([]), d = z(0), f = z(1), u = z(i.pageSize || 100), h = z(0), p = P(() => h.value > 0), g = z([]), b = z(!1), x = P(() => i.batchButtons && i.batchButtons.length > 0), w = P(() => g.value.length > 0), m = P(() => x.value && w.value && i.isMultiple || b.value), y = P(() => !!i.loadData), C = P(() => !!i.loadData && i.isPage && !m.value), v = P(() => i.viewMode === "card"), _ = P(() => b.value ? g.value : s.value);
|
|
12599
12599
|
x.value && !i.isMultiple && console.warn("batchButtons is only valid when isMultiple is true");
|
|
12600
|
-
const S = (
|
|
12601
|
-
if (!he || he.length === 0) return
|
|
12602
|
-
...
|
|
12603
|
-
children: R(
|
|
12604
|
-
} :
|
|
12605
|
-
const
|
|
12606
|
-
return he.forEach((
|
|
12607
|
-
const wt =
|
|
12600
|
+
const S = (de) => i.rowKey ? i.rowKey.split(",").map((he) => de[he.trim()]).join("::") : "", R = (de, he) => {
|
|
12601
|
+
if (!he || he.length === 0) return de.filter((ue) => ue.config?.display !== !1).map((ue) => ue.children && ue.children.length > 0 ? {
|
|
12602
|
+
...ue,
|
|
12603
|
+
children: R(ue.children)
|
|
12604
|
+
} : ue);
|
|
12605
|
+
const De = new Map(de.map((ue) => [ue.id, ue])), He = [];
|
|
12606
|
+
return he.forEach((ue) => {
|
|
12607
|
+
const wt = De.get(ue.id);
|
|
12608
12608
|
if (wt) {
|
|
12609
|
-
if (
|
|
12609
|
+
if (ue.display) {
|
|
12610
12610
|
let Pt = wt;
|
|
12611
12611
|
wt.children && wt.children.length > 0 && (Pt = {
|
|
12612
12612
|
...wt,
|
|
12613
|
-
children: R(wt.children,
|
|
12614
|
-
}),
|
|
12613
|
+
children: R(wt.children, ue.children)
|
|
12614
|
+
}), He.push(Pt);
|
|
12615
12615
|
}
|
|
12616
|
-
|
|
12616
|
+
De.delete(ue.id);
|
|
12617
12617
|
}
|
|
12618
|
-
}),
|
|
12619
|
-
if (
|
|
12620
|
-
let wt =
|
|
12621
|
-
|
|
12622
|
-
...
|
|
12623
|
-
children: R(
|
|
12624
|
-
}),
|
|
12618
|
+
}), de.forEach((ue) => {
|
|
12619
|
+
if (De.has(ue.id) && ue.config?.display !== !1) {
|
|
12620
|
+
let wt = ue;
|
|
12621
|
+
ue.children && ue.children.length > 0 && (wt = {
|
|
12622
|
+
...ue,
|
|
12623
|
+
children: R(ue.children)
|
|
12624
|
+
}), He.push(wt);
|
|
12625
12625
|
}
|
|
12626
|
-
}),
|
|
12627
|
-
}, j = P(() => R(i.columns, Se.value)), T = P(() => Xf(i.columns, (
|
|
12626
|
+
}), He;
|
|
12627
|
+
}, j = P(() => R(i.columns, Se.value)), T = P(() => Xf(i.columns, (de) => de.config.label)), H = z(""), B = P(() => T.value.some((de) => de.config?.filter?.isSearchKeyword)), A = z(), M = z(!0), E = z([]), D = P(() => M.value ? "搜索全部" : `搜索范围:${T.value.filter((de) => E.value.includes(de.id)).map((de) => de.config?.label).join("、")}`), J = () => {
|
|
12628
12628
|
A.value.init();
|
|
12629
|
-
}, ae = z(), ge = z(!1), Z = z(!1), Q = z(!1), K = z([]), I = z("and"), Re = z(), Ue = z(!1), me = z([]), We = z(), et = (
|
|
12630
|
-
const he = new Map(T.value.map((
|
|
12631
|
-
return
|
|
12632
|
-
const [
|
|
12629
|
+
}, ae = z(), ge = z(!1), Z = z(!1), Q = z(!1), K = z([]), I = z("and"), Re = z(), Ue = z(!1), me = z([]), We = z(), et = (de) => {
|
|
12630
|
+
const he = new Map(T.value.map((De) => [De.id, De.config?.label || De.id]));
|
|
12631
|
+
return de.split(",").map((De) => De.trim()).filter(Boolean).map((De) => {
|
|
12632
|
+
const [He, ue] = De.split(/\s+/), wt = (ue || "ASC").toUpperCase() === "DESC" ? "DESC" : "ASC";
|
|
12633
12633
|
return {
|
|
12634
|
-
label: he.get(
|
|
12635
|
-
value:
|
|
12634
|
+
label: he.get(He) || He,
|
|
12635
|
+
value: He,
|
|
12636
12636
|
sord: wt
|
|
12637
12637
|
};
|
|
12638
|
-
}).filter((
|
|
12638
|
+
}).filter((De) => De.value);
|
|
12639
12639
|
};
|
|
12640
|
-
st([() => i.sort, () => T.value], ([
|
|
12641
|
-
const he = (
|
|
12640
|
+
st([() => i.sort, () => T.value], ([de]) => {
|
|
12641
|
+
const he = (de || "").trim();
|
|
12642
12642
|
if (he) {
|
|
12643
12643
|
if (he !== We.value) {
|
|
12644
12644
|
me.value = et(he), We.value = he;
|
|
12645
12645
|
return;
|
|
12646
12646
|
}
|
|
12647
|
-
const
|
|
12648
|
-
me.value = me.value.map((
|
|
12649
|
-
...
|
|
12650
|
-
label:
|
|
12647
|
+
const De = new Map(T.value.map((He) => [He.id, He.config?.label || He.id]));
|
|
12648
|
+
me.value = me.value.map((He) => ({
|
|
12649
|
+
...He,
|
|
12650
|
+
label: De.get(He.value) || He.label || He.value
|
|
12651
12651
|
}));
|
|
12652
12652
|
return;
|
|
12653
12653
|
}
|
|
@@ -12655,14 +12655,14 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
12655
12655
|
}, { immediate: !0 });
|
|
12656
12656
|
const Ct = () => {
|
|
12657
12657
|
Re.value.init(me.value);
|
|
12658
|
-
}, ie = (
|
|
12659
|
-
me.value =
|
|
12658
|
+
}, ie = (de) => {
|
|
12659
|
+
me.value = de, Ue.value = !1, un();
|
|
12660
12660
|
}, ke = () => {
|
|
12661
12661
|
me.value = [], un();
|
|
12662
|
-
},
|
|
12663
|
-
|
|
12664
|
-
}, rt = (
|
|
12665
|
-
Se.value =
|
|
12662
|
+
}, ze = z(), U = z(!1), Se = z(), xe = P(() => Se.value != null), Be = () => {
|
|
12663
|
+
ze.value?.init();
|
|
12664
|
+
}, rt = (de) => {
|
|
12665
|
+
Se.value = de, U.value = !1;
|
|
12666
12666
|
}, Fe = z(!1), Ye = () => {
|
|
12667
12667
|
Fe.value = !Fe.value;
|
|
12668
12668
|
}, ht = () => {
|
|
@@ -12676,7 +12676,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
12676
12676
|
b.value = !b.value, !v.value && (b.value ? l.value?.setRecords(g.value) : l.value?.setRecords(s.value), l.value?.setSelection?.(g.value));
|
|
12677
12677
|
}, qt = P(() => {
|
|
12678
12678
|
if (g.value.length > 0 && i.isMultiple) {
|
|
12679
|
-
const
|
|
12679
|
+
const de = [
|
|
12680
12680
|
{
|
|
12681
12681
|
id: "selection_count",
|
|
12682
12682
|
label: `已选${g.value.length}条`,
|
|
@@ -12694,19 +12694,19 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
12694
12694
|
config: { type: "text" },
|
|
12695
12695
|
click: ht
|
|
12696
12696
|
}
|
|
12697
|
-
], he = i.batchButtons.map((
|
|
12698
|
-
...
|
|
12697
|
+
], he = i.batchButtons.map((De) => ({
|
|
12698
|
+
...De,
|
|
12699
12699
|
click: () => {
|
|
12700
|
-
|
|
12700
|
+
De.click && De.click({
|
|
12701
12701
|
data: g.value,
|
|
12702
12702
|
openLayer: o
|
|
12703
12703
|
});
|
|
12704
12704
|
}
|
|
12705
12705
|
}));
|
|
12706
|
-
return [...
|
|
12706
|
+
return [...de, ...he];
|
|
12707
12707
|
}
|
|
12708
12708
|
return i.buttons;
|
|
12709
|
-
}), mn = P(() => qt.value.filter((
|
|
12709
|
+
}), mn = P(() => qt.value.filter((de) => de.config?.display !== !1)), $t = z(null), mt = z(0), Rt = () => {
|
|
12710
12710
|
mt.value = $t.value?.clientWidth || 0;
|
|
12711
12711
|
};
|
|
12712
12712
|
let jt;
|
|
@@ -12722,11 +12722,11 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
12722
12722
|
It(Rt);
|
|
12723
12723
|
});
|
|
12724
12724
|
const on = P(() => {
|
|
12725
|
-
const
|
|
12726
|
-
if (
|
|
12725
|
+
const de = mn.value;
|
|
12726
|
+
if (de.length === 0) return [];
|
|
12727
12727
|
const he = mt.value;
|
|
12728
|
-
if (he <= 0) return
|
|
12729
|
-
const
|
|
12728
|
+
if (he <= 0) return de;
|
|
12729
|
+
const De = Math.max(0, he - 4), He = (Ht, sn) => Ht.groupId || `__auto_${sn}`, ue = (Ht) => {
|
|
12730
12730
|
if (Ht.config?.notLabel === !0 || !Ht.label) return 28;
|
|
12731
12731
|
const sn = 24, En = Mn(Ht.label || "") || 0, bn = Ht.config?.icon ? 18 : 0;
|
|
12732
12732
|
return Math.ceil(En + sn + bn + 2);
|
|
@@ -12734,10 +12734,10 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
12734
12734
|
if (((Ht) => {
|
|
12735
12735
|
let sn = 0, En = null;
|
|
12736
12736
|
return Ht.forEach((bn, jo) => {
|
|
12737
|
-
const gi =
|
|
12738
|
-
En !== null && (sn += gi === En ? -1 : 8), sn +=
|
|
12737
|
+
const gi = He(bn, jo);
|
|
12738
|
+
En !== null && (sn += gi === En ? -1 : 8), sn += ue(bn), En = gi;
|
|
12739
12739
|
}), sn;
|
|
12740
|
-
})(
|
|
12740
|
+
})(de) <= De) return de;
|
|
12741
12741
|
const Pt = {
|
|
12742
12742
|
id: "__table_panel_more__",
|
|
12743
12743
|
label: "",
|
|
@@ -12748,17 +12748,17 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
12748
12748
|
children: []
|
|
12749
12749
|
}, en = 28, fn = [];
|
|
12750
12750
|
let no = 0, On = null;
|
|
12751
|
-
for (let Ht = 0; Ht <
|
|
12752
|
-
const sn =
|
|
12751
|
+
for (let Ht = 0; Ht < de.length; Ht++) {
|
|
12752
|
+
const sn = de[Ht], En = He(sn, Ht);
|
|
12753
12753
|
let bn = no;
|
|
12754
|
-
On !== null && (bn += En === On ? -1 : 8), bn +=
|
|
12755
|
-
const jo =
|
|
12756
|
-
if (bn + jo <=
|
|
12754
|
+
On !== null && (bn += En === On ? -1 : 8), bn += ue(sn);
|
|
12755
|
+
const jo = de.length - (Ht + 1) > 0 ? (bn > 0 ? 8 : 0) + en : 0;
|
|
12756
|
+
if (bn + jo <= De)
|
|
12757
12757
|
fn.push(sn), no = bn, On = En;
|
|
12758
12758
|
else break;
|
|
12759
12759
|
}
|
|
12760
|
-
const ao =
|
|
12761
|
-
if (ao.length === 0) return
|
|
12760
|
+
const ao = de.slice(fn.length);
|
|
12761
|
+
if (ao.length === 0) return de;
|
|
12762
12762
|
const Ne = {
|
|
12763
12763
|
...Pt,
|
|
12764
12764
|
children: ao
|
|
@@ -12766,34 +12766,34 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
12766
12766
|
return fn.length === 0 ? [Ne] : [...fn, Ne];
|
|
12767
12767
|
});
|
|
12768
12768
|
let Kt;
|
|
12769
|
-
const Et = async (
|
|
12769
|
+
const Et = async (de) => {
|
|
12770
12770
|
h.value++;
|
|
12771
12771
|
const he = {};
|
|
12772
|
-
|
|
12772
|
+
de && (Kt = de), Kt && (he.query = Kt);
|
|
12773
12773
|
try {
|
|
12774
|
-
const
|
|
12775
|
-
|
|
12776
|
-
field:
|
|
12777
|
-
method:
|
|
12778
|
-
value:
|
|
12779
|
-
type:
|
|
12780
|
-
})),
|
|
12781
|
-
const
|
|
12774
|
+
const De = {};
|
|
12775
|
+
De.rel = I.value, De.cond = (ae.value?.getSearchFields?.() || K.value).filter((ue) => ue.value !== void 0 && ue.value !== null && ue.value !== "" || ["empty", "not_empty"].includes(ue.method)).map((ue) => ({
|
|
12776
|
+
field: ue.field,
|
|
12777
|
+
method: ue.method,
|
|
12778
|
+
value: ue.value,
|
|
12779
|
+
type: ue.type
|
|
12780
|
+
})), De.cond.length > 0 ? Q.value = !0 : Q.value = !1, he.filter = De;
|
|
12781
|
+
const He = me.value.map((ue) => ue.value + " " + ue.sord).join(",");
|
|
12782
12782
|
if (H.value && (he.keyword = {
|
|
12783
12783
|
value: H.value,
|
|
12784
|
-
fields: M.value ? T.value.filter((
|
|
12784
|
+
fields: M.value ? T.value.filter((ue) => ue.config?.filter?.isSearchKeyword).map((ue) => ue.id) : G(E)
|
|
12785
12785
|
}), he.fixedFilter = ae.value?.getFixedSearchData?.() || {}, i.loadData) {
|
|
12786
12786
|
if (i.isPage) {
|
|
12787
12787
|
he.pagination = {
|
|
12788
12788
|
rows: G(u),
|
|
12789
12789
|
page: f.value,
|
|
12790
|
-
sort:
|
|
12790
|
+
sort: He || i.sort || i.rowKey
|
|
12791
12791
|
};
|
|
12792
|
-
const
|
|
12793
|
-
s.value =
|
|
12792
|
+
const ue = await i.loadData(he) || {};
|
|
12793
|
+
s.value = ue.rows || [], d.value = ue.records || 0;
|
|
12794
12794
|
} else
|
|
12795
|
-
he.sort =
|
|
12796
|
-
l.value?.setRecords(_.value), x.value ? (g.value = [], b.value = !1, c.value?.clearSelection?.()) : i.rowKey && g.value.length > 0 && (l.value?.setSelection?.(g.value), c.value?.selections && (c.value.selections.value = g.value.map((
|
|
12795
|
+
he.sort = He, s.value = await i.loadData(he) || [], d.value = s.value.length;
|
|
12796
|
+
l.value?.setRecords(_.value), x.value ? (g.value = [], b.value = !1, c.value?.clearSelection?.()) : i.rowKey && g.value.length > 0 && (l.value?.setSelection?.(g.value), c.value?.selections && (c.value.selections.value = g.value.map((ue) => S(ue)).filter(Boolean)));
|
|
12797
12797
|
} else
|
|
12798
12798
|
s.value = i.modelValue || [], d.value = s.value.length, l.value?.setRecords(_.value);
|
|
12799
12799
|
} finally {
|
|
@@ -12802,8 +12802,8 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
12802
12802
|
};
|
|
12803
12803
|
st(() => i.modelValue, async () => {
|
|
12804
12804
|
await Et();
|
|
12805
|
-
}), st(() => v.value, async (
|
|
12806
|
-
if (await It(), !
|
|
12805
|
+
}), st(() => v.value, async (de) => {
|
|
12806
|
+
if (await It(), !de) {
|
|
12807
12807
|
l.value?.setSelection?.(g.value);
|
|
12808
12808
|
return;
|
|
12809
12809
|
}
|
|
@@ -12811,121 +12811,122 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
12811
12811
|
});
|
|
12812
12812
|
const un = async () => {
|
|
12813
12813
|
i.loadData && (f.value = 1, await Et());
|
|
12814
|
-
}, q = ({ rows:
|
|
12815
|
-
u.value =
|
|
12816
|
-
}, be = (
|
|
12814
|
+
}, q = ({ rows: de, page: he }) => {
|
|
12815
|
+
u.value = de, f.value = he, Et();
|
|
12816
|
+
}, be = (de) => {
|
|
12817
12817
|
q({
|
|
12818
12818
|
rows: G(u),
|
|
12819
|
-
page:
|
|
12819
|
+
page: de
|
|
12820
12820
|
});
|
|
12821
|
-
}, re = (
|
|
12821
|
+
}, re = (de) => {
|
|
12822
12822
|
q({
|
|
12823
|
-
rows:
|
|
12823
|
+
rows: de,
|
|
12824
12824
|
page: 1
|
|
12825
12825
|
});
|
|
12826
12826
|
}, se = async () => {
|
|
12827
12827
|
g.value = [], b.value = !1, f.value = 1, Kt = void 0, await Et();
|
|
12828
|
-
}, Ce = async (
|
|
12829
|
-
g.value = [], b.value = !1, await Et(
|
|
12828
|
+
}, Ce = async (de) => {
|
|
12829
|
+
g.value = [], b.value = !1, await Et(de);
|
|
12830
12830
|
}, Oe = async () => {
|
|
12831
12831
|
await se();
|
|
12832
|
-
}, Ve = (
|
|
12833
|
-
r("ready",
|
|
12834
|
-
}, ut = ({ selections:
|
|
12835
|
-
let
|
|
12832
|
+
}, Ve = (de) => {
|
|
12833
|
+
r("ready", de);
|
|
12834
|
+
}, ut = ({ selections: de, record: he, checked: De, isMultiple: He }) => {
|
|
12835
|
+
let ue = [];
|
|
12836
12836
|
if (!i.isMultiple) {
|
|
12837
|
-
g.value =
|
|
12838
|
-
selections:
|
|
12837
|
+
g.value = de, r("select", {
|
|
12838
|
+
selections: de,
|
|
12839
12839
|
record: he,
|
|
12840
|
-
checked:
|
|
12841
|
-
isMultiple:
|
|
12840
|
+
checked: De,
|
|
12841
|
+
isMultiple: He
|
|
12842
12842
|
});
|
|
12843
12843
|
return;
|
|
12844
12844
|
}
|
|
12845
|
-
if (x.value)
|
|
12846
|
-
else if (!i.rowKey)
|
|
12845
|
+
if (x.value) ue = de;
|
|
12846
|
+
else if (!i.rowKey) ue = de;
|
|
12847
12847
|
else {
|
|
12848
|
-
const wt = new Map(
|
|
12848
|
+
const wt = new Map(de.map((en) => [S(en), en])), Pt = new Map(g.value.map((en) => [S(en), en]));
|
|
12849
12849
|
s.value.forEach((en) => {
|
|
12850
12850
|
const fn = S(en);
|
|
12851
12851
|
wt.has(fn) ? Pt.set(fn, wt.get(fn)) : Pt.delete(fn);
|
|
12852
|
-
}),
|
|
12852
|
+
}), ue = Array.from(Pt.values());
|
|
12853
12853
|
}
|
|
12854
|
-
g.value =
|
|
12855
|
-
selections:
|
|
12854
|
+
g.value = ue, r("select", {
|
|
12855
|
+
selections: ue,
|
|
12856
12856
|
record: he,
|
|
12857
|
-
checked:
|
|
12858
|
-
isMultiple:
|
|
12859
|
-
}), b.value &&
|
|
12860
|
-
}, Bt = (
|
|
12861
|
-
g.value =
|
|
12862
|
-
}, bt = (
|
|
12863
|
-
g.value = [
|
|
12864
|
-
selections: [
|
|
12865
|
-
record:
|
|
12857
|
+
checked: De,
|
|
12858
|
+
isMultiple: He
|
|
12859
|
+
}), b.value && ue.length === 0 ? (b.value = !1, l.value && l.value.setRecords(s.value)) : b.value && ue.length > 0 && l.value && (l.value.setRecords(ue), l.value.setSelection?.(ue));
|
|
12860
|
+
}, Bt = (de) => {
|
|
12861
|
+
g.value = de;
|
|
12862
|
+
}, bt = (de) => {
|
|
12863
|
+
g.value = [de], r("select", {
|
|
12864
|
+
selections: [de],
|
|
12865
|
+
record: de,
|
|
12866
12866
|
checked: !0,
|
|
12867
12867
|
isMultiple: !1
|
|
12868
12868
|
});
|
|
12869
12869
|
}, Hn = () => {
|
|
12870
|
-
const
|
|
12871
|
-
if (
|
|
12872
|
-
|
|
12873
|
-
|
|
12874
|
-
|
|
12875
|
-
|
|
12876
|
-
|
|
12870
|
+
const de = g.value || [], he = !v.value && l.value?.getSelection?.() || [];
|
|
12871
|
+
if (he.length === 0) return de;
|
|
12872
|
+
if (!i.rowKey || de.length === 0) return he;
|
|
12873
|
+
const De = new Map(he.map((ue) => [S(ue), ue])), He = de.map((ue) => De.get(S(ue)) || ue);
|
|
12874
|
+
return g.value = He, He;
|
|
12875
|
+
}, Jn = (de) => {
|
|
12876
|
+
if (g.value = de, v.value) {
|
|
12877
|
+
c.value?.selections && (c.value.selections.value = (de || []).map((he) => S(he)).filter(Boolean));
|
|
12877
12878
|
return;
|
|
12878
12879
|
}
|
|
12879
|
-
l.value?.setSelection?.(
|
|
12880
|
+
l.value?.setSelection?.(de);
|
|
12880
12881
|
}, eo = () => v.value ? c.value : l.value, To = P(() => i.pageSizes || [
|
|
12881
12882
|
100,
|
|
12882
12883
|
200,
|
|
12883
12884
|
500,
|
|
12884
12885
|
1e3
|
|
12885
|
-
]), to = P(() => !!i.rowKey && !i.isMultiple), dn = P(() => !!i.rowKey && i.isMultiple), Ea = ({ buttons:
|
|
12886
|
+
]), to = P(() => !!i.rowKey && !i.isMultiple), dn = P(() => !!i.rowKey && i.isMultiple), Ea = ({ buttons: de, row: he }) => {
|
|
12886
12887
|
if (!i.actionFilter) return;
|
|
12887
|
-
const
|
|
12888
|
-
|
|
12889
|
-
const
|
|
12890
|
-
action:
|
|
12888
|
+
const De = s.value.findIndex((He) => S(He) === S(he));
|
|
12889
|
+
de.forEach((He) => {
|
|
12890
|
+
const ue = i.actionFilter?.({
|
|
12891
|
+
action: He,
|
|
12891
12892
|
record: he,
|
|
12892
|
-
recordIndex:
|
|
12893
|
+
recordIndex: De,
|
|
12893
12894
|
col: -1,
|
|
12894
|
-
row:
|
|
12895
|
+
row: De,
|
|
12895
12896
|
table: l.value
|
|
12896
12897
|
});
|
|
12897
|
-
if (
|
|
12898
|
-
|
|
12898
|
+
if (ue === !1) {
|
|
12899
|
+
He.config = He.config || {}, He.config.display = !1;
|
|
12899
12900
|
return;
|
|
12900
12901
|
}
|
|
12901
|
-
|
|
12902
|
+
ue && typeof ue == "object" && (ue.display !== void 0 && (He.config = He.config || {}, He.config.display = ue.display), ue.disabled !== void 0 && (He.config = He.config || {}, He.config.disabled = ue.disabled));
|
|
12902
12903
|
});
|
|
12903
|
-
}, oa = ({ selections:
|
|
12904
|
+
}, oa = ({ selections: de, rows: he }) => {
|
|
12904
12905
|
if (!i.isMultiple) {
|
|
12905
|
-
const
|
|
12906
|
-
g.value =
|
|
12907
|
-
selections:
|
|
12908
|
-
record:
|
|
12909
|
-
checked: !!
|
|
12906
|
+
const He = he[0], ue = He ? [He] : [];
|
|
12907
|
+
g.value = ue, r("select", {
|
|
12908
|
+
selections: ue,
|
|
12909
|
+
record: He || {},
|
|
12910
|
+
checked: !!He,
|
|
12910
12911
|
isMultiple: !1
|
|
12911
12912
|
});
|
|
12912
12913
|
return;
|
|
12913
12914
|
}
|
|
12914
|
-
let
|
|
12915
|
-
if (x.value || !i.rowKey)
|
|
12915
|
+
let De = [];
|
|
12916
|
+
if (x.value || !i.rowKey) De = he;
|
|
12916
12917
|
else {
|
|
12917
|
-
const
|
|
12918
|
+
const He = new Set(de), ue = new Map(g.value.map((wt) => [S(wt), wt]));
|
|
12918
12919
|
s.value.forEach((wt) => {
|
|
12919
12920
|
const Pt = S(wt);
|
|
12920
|
-
Pt && (
|
|
12921
|
-
}),
|
|
12921
|
+
Pt && (He.has(Pt) ? ue.set(Pt, wt) : ue.delete(Pt));
|
|
12922
|
+
}), De = Array.from(ue.values());
|
|
12922
12923
|
}
|
|
12923
|
-
g.value =
|
|
12924
|
-
selections:
|
|
12924
|
+
g.value = De, r("select", {
|
|
12925
|
+
selections: De,
|
|
12925
12926
|
record: he[0] || {},
|
|
12926
|
-
checked:
|
|
12927
|
+
checked: De.length > 0,
|
|
12927
12928
|
isMultiple: !0
|
|
12928
|
-
}), b.value &&
|
|
12929
|
+
}), b.value && De.length === 0 && (b.value = !1);
|
|
12929
12930
|
};
|
|
12930
12931
|
return Nt(async () => {
|
|
12931
12932
|
i.immediate && await Ce();
|
|
@@ -12938,8 +12939,8 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
12938
12939
|
ht();
|
|
12939
12940
|
},
|
|
12940
12941
|
getTableRef: eo
|
|
12941
|
-
}), (
|
|
12942
|
-
const
|
|
12942
|
+
}), (de, he) => {
|
|
12943
|
+
const De = V("j-buttons"), He = V("j-icon"), ue = V("el-popover"), wt = V("el-tooltip"), Pt = V("el-input"), en = V("j-button"), fn = V("el-pagination"), no = V("j-card-list"), On = V("j-table"), ao = go("loading");
|
|
12943
12944
|
return k(), L("div", { class: Ze(["j-table-panel-wrapper", {
|
|
12944
12945
|
fullscreen: Fe.value,
|
|
12945
12946
|
"no-padding": e.noPadding || Fe.value
|
|
@@ -12947,7 +12948,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
12947
12948
|
ref_key: "topLeftRef",
|
|
12948
12949
|
ref: $t,
|
|
12949
12950
|
class: "j-table-panel-top-left"
|
|
12950
|
-
}, [ee(
|
|
12951
|
+
}, [ee(De, { list: on.value }, null, 8, ["list"])], 512), O("div", Qm, [
|
|
12951
12952
|
y.value && B.value && !m.value ? (k(), L("div", eb, [ee(Pt, {
|
|
12952
12953
|
modelValue: H.value,
|
|
12953
12954
|
"onUpdate:modelValue": he[2] || (he[2] = (Ne) => H.value = Ne),
|
|
@@ -12958,12 +12959,12 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
12958
12959
|
onKeyup: Er(un, ["enter"]),
|
|
12959
12960
|
onClear: un
|
|
12960
12961
|
}, {
|
|
12961
|
-
prefix: X(() => [ee(
|
|
12962
|
+
prefix: X(() => [ee(He, { icon: "mdi:search" })]),
|
|
12962
12963
|
suffix: X(() => [ee(wt, {
|
|
12963
12964
|
placement: "bottom",
|
|
12964
12965
|
content: D.value
|
|
12965
12966
|
}, {
|
|
12966
|
-
default: X(() => [O("div", null, [ee(
|
|
12967
|
+
default: X(() => [O("div", null, [ee(ue, {
|
|
12967
12968
|
placement: "bottom-end",
|
|
12968
12969
|
"popper-style": "padding: 0",
|
|
12969
12970
|
width: 200,
|
|
@@ -12972,7 +12973,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
12972
12973
|
onShow: J,
|
|
12973
12974
|
onHide: un
|
|
12974
12975
|
}, {
|
|
12975
|
-
reference: X(() => [ee(
|
|
12976
|
+
reference: X(() => [ee(He, {
|
|
12976
12977
|
icon: "mdi:keyboard-arrow-down",
|
|
12977
12978
|
style: { cursor: "pointer" }
|
|
12978
12979
|
})]),
|
|
@@ -12995,7 +12996,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
12995
12996
|
}, 8, ["content"])]),
|
|
12996
12997
|
_: 1
|
|
12997
12998
|
}, 8, ["modelValue", "placeholder"])])) : te("", !0),
|
|
12998
|
-
y.value && e.showFilterButton && !ge.value && !m.value ? (k(), N(
|
|
12999
|
+
y.value && e.showFilterButton && !ge.value && !m.value ? (k(), N(ue, {
|
|
12999
13000
|
key: 1,
|
|
13000
13001
|
visible: Z.value,
|
|
13001
13002
|
"onUpdate:visible": he[6] || (he[6] = (Ne) => Z.value = Ne),
|
|
@@ -13038,7 +13039,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
13038
13039
|
placement: "bottom",
|
|
13039
13040
|
content: G(a)("排序")
|
|
13040
13041
|
}, {
|
|
13041
|
-
default: X(() => [O("div", null, [ee(
|
|
13042
|
+
default: X(() => [O("div", null, [ee(ue, {
|
|
13042
13043
|
visible: Ue.value,
|
|
13043
13044
|
"onUpdate:visible": he[7] || (he[7] = (Ne) => Ue.value = Ne),
|
|
13044
13045
|
placement: "bottom",
|
|
@@ -13068,14 +13069,14 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
13068
13069
|
placement: "bottom",
|
|
13069
13070
|
content: G(a)("显示字段")
|
|
13070
13071
|
}, {
|
|
13071
|
-
default: X(() => [O("div", null, [ee(
|
|
13072
|
+
default: X(() => [O("div", null, [ee(ue, {
|
|
13072
13073
|
visible: U.value,
|
|
13073
13074
|
"onUpdate:visible": he[8] || (he[8] = (Ne) => U.value = Ne),
|
|
13074
13075
|
placement: "bottom",
|
|
13075
13076
|
"popper-style": "padding: 0",
|
|
13076
13077
|
width: 400,
|
|
13077
13078
|
trigger: "click",
|
|
13078
|
-
onShow:
|
|
13079
|
+
onShow: Be
|
|
13079
13080
|
}, {
|
|
13080
13081
|
reference: X(() => [ee(en, {
|
|
13081
13082
|
class: Ze({ active: xe.value }),
|
|
@@ -13084,7 +13085,7 @@ var Jp = /* @__PURE__ */ _e({
|
|
|
13084
13085
|
}, null, 8, ["class"])]),
|
|
13085
13086
|
default: X(() => [ee(qm, {
|
|
13086
13087
|
ref_key: "columnPanelRef",
|
|
13087
|
-
ref:
|
|
13088
|
+
ref: ze,
|
|
13088
13089
|
columns: e.columns,
|
|
13089
13090
|
"column-config": Se.value,
|
|
13090
13091
|
onSave: rt
|
|
@@ -13917,7 +13918,7 @@ var qc = ({ data: e, actions: t, utils: n, inputParams: a, notRunActions: o }) =
|
|
|
13917
13918
|
"parentRow",
|
|
13918
13919
|
"_i",
|
|
13919
13920
|
"_compTypeByRender"
|
|
13920
|
-
]),
|
|
13921
|
+
]), ze = (q, be = !1) => {
|
|
13921
13922
|
const re = {};
|
|
13922
13923
|
return Object.keys(q).forEach((se) => {
|
|
13923
13924
|
if (ke.has(se)) return;
|
|
@@ -13928,12 +13929,12 @@ var qc = ({ data: e, actions: t, utils: n, inputParams: a, notRunActions: o }) =
|
|
|
13928
13929
|
else if (I(se)) {
|
|
13929
13930
|
const ut = [];
|
|
13930
13931
|
q[se].forEach((Bt) => {
|
|
13931
|
-
ut.push(
|
|
13932
|
+
ut.push(ze(Bt, !0));
|
|
13932
13933
|
}), re[Oe || se] = ut;
|
|
13933
13934
|
} else Oe && Ve ? (re[Oe] = re[Oe] || {}, re[Oe][Ve] = q[se]) : Ve && (re[Ve] = q[se]);
|
|
13934
13935
|
} else be ? se !== "_X_ROW_KEY" && se !== "_isHover" && (re[se] = q[se]) : T[se] ? (re[T[se]] = re[T[se]] || {}, re[T[se]][se.replace(`${T[se]}_`, "")] = q[se]) : re[se] = q[se];
|
|
13935
13936
|
}), re;
|
|
13936
|
-
}, U = (q = !0) => q ?
|
|
13937
|
+
}, U = (q = !0) => q ? ze(v) : v, Se = (q, be, re, se) => {
|
|
13937
13938
|
let Ce = R[q];
|
|
13938
13939
|
if (Ce == null) {
|
|
13939
13940
|
const Ve = q.split(".");
|
|
@@ -13977,9 +13978,9 @@ var qc = ({ data: e, actions: t, utils: n, inputParams: a, notRunActions: o }) =
|
|
|
13977
13978
|
rules: [],
|
|
13978
13979
|
myGridtableId: ""
|
|
13979
13980
|
};
|
|
13980
|
-
}, { validateForm:
|
|
13981
|
+
}, { validateForm: Be } = Tb(v, xe), rt = async () => {
|
|
13981
13982
|
_.value = {};
|
|
13982
|
-
const q = await
|
|
13983
|
+
const q = await Be();
|
|
13983
13984
|
return Object.keys(q).length > 0 ? (_.value = q, g(`${h(R[Object.keys(q)[0]]?.config?.label)}:${h(q[Object.keys(q)[0]].msg)}`), !1) : !0;
|
|
13984
13985
|
}, Fe = () => {
|
|
13985
13986
|
_.value = {}, Z(), Fo(v), Object.keys(B || {}).forEach((q) => {
|
|
@@ -14009,7 +14010,7 @@ var qc = ({ data: e, actions: t, utils: n, inputParams: a, notRunActions: o }) =
|
|
|
14009
14010
|
if (I(re.id || "")) {
|
|
14010
14011
|
const se = [];
|
|
14011
14012
|
return v[re.id || ""].forEach((Ce) => {
|
|
14012
|
-
se.push(
|
|
14013
|
+
se.push(ze(Ce, !0));
|
|
14013
14014
|
}), se;
|
|
14014
14015
|
}
|
|
14015
14016
|
return v[re.id || ""];
|