@sunny-base-web/ui 0.8.48 → 0.8.50
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/entry/form/config.d.ts.map +1 -1
- package/dist/entry/form/types.d.ts +24 -0
- package/dist/entry/form/types.d.ts.map +1 -1
- package/dist/feedback/export-modal-light/SunnyExportModalLight.d.ts.map +1 -1
- package/dist/feedback/export-modal-light/types.d.ts +2 -2
- package/dist/feedback/export-modal-light/types.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +788 -787
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { getCurrentInstance as co, inject as yn, defineComponent as te, computed as N, openBlock as F, createElementBlock as Y, normalizeStyle as je, normalizeClass as fe, createElementVNode as B, useAttrs as sr, ref as Z, createBlock as ee, unref as m, mergeProps as ae, withModifiers as Ve, withCtx as L, renderSlot as ie, createTextVNode as we, toDisplayString as Q, createVNode as j, createCommentVNode as se, reactive as uo, h as We, shallowRef as Ft, onErrorCaptured as $i, markRaw as Pi, createStaticVNode as _i, watch as be, onUnmounted as fo, Fragment as Oe, renderList as Pe, resolveDynamicComponent as er, normalizeProps as
|
|
1
|
+
import { getCurrentInstance as co, inject as yn, defineComponent as te, computed as N, openBlock as F, createElementBlock as Y, normalizeStyle as je, normalizeClass as fe, createElementVNode as B, useAttrs as sr, ref as Z, createBlock as ee, unref as m, mergeProps as ae, withModifiers as Ve, withCtx as L, renderSlot as ie, createTextVNode as we, toDisplayString as Q, createVNode as j, createCommentVNode as se, reactive as uo, h as We, shallowRef as Ft, onErrorCaptured as $i, markRaw as Pi, createStaticVNode as _i, watch as be, onUnmounted as fo, Fragment as Oe, renderList as Pe, resolveDynamicComponent as er, normalizeProps as Ie, defineAsyncComponent as Ti, withDirectives as cn, vShow as tr, resolveComponent as Te, createSlots as qe, guardReactiveProps as tt, isRef as St, toRaw as ut, provide as gn, useSlots as kt, nextTick as et, onMounted as $t, onBeforeUnmount as po, withKeys as mo, isReactive as Ai, vModelText as Ei } from "vue";
|
|
2
2
|
import { Modal as Nt, Button as He, Tooltip as ir, Upload as un, TimePicker as Hr, DatePicker as nr, Switch as dn, Radio as qr, Checkbox as fn, Select as it, TreeSelect as Ri, Cascader as Mi, Slider as Oi, Rate as Vi, RangePicker as ho, RadioGroup as ji, CheckboxGroup as Fi, Textarea as vo, InputNumber as ht, InputPassword as Ni, Input as bn, Progress as Di, Message as ue, Option as Ct, MonthPicker as Bi, Popover as Li, WeekPicker as zi, YearPicker as Ii, Tree as Ui, Dropdown as Wi, Doption as Hi, Pagination as qi, Form as yo, FormItem as pn } from "@arco-design/web-vue";
|
|
3
3
|
import { useI18n as Gi, $t as ve } from "@sunny-base-web/locales";
|
|
4
|
-
import { cn as Dt, isString as jt, isHttpUrl as Ji, isObject as De, isFunction as
|
|
4
|
+
import { cn as Dt, isString as jt, isHttpUrl as Ji, isObject as De, isFunction as ze, cloneDeep as on, transformToString as go, transformToObjectArray as bo, is as Yi, isBoolean as zn, get as Gr, isEqual as Ki, set as Qi } from "@sunny-base-web/utils";
|
|
5
5
|
import { patterns as sm, startProgress as im, stopProgress as lm } from "@sunny-base-web/utils";
|
|
6
6
|
import { IconifyIcon as Zi, IconDefault as Xi } from "@sunny-base-web/icons";
|
|
7
7
|
import { ScrollAreaRoot as el, ScrollAreaViewport as tl, ScrollAreaCorner as nl, ScrollAreaScrollbar as rl, ScrollAreaThumb as ol } from "reka-ui";
|
|
8
|
-
import
|
|
8
|
+
import st from "axios";
|
|
9
9
|
import { defineRule as wo, useForm as So, useFormValues as Co, Field as al, useFormContext as sl } from "vee-validate";
|
|
10
10
|
import { useStore as il } from "@tanstack/vue-store";
|
|
11
11
|
import { set as Jr, cloneDeep as rr, isArray as or, hasIn as ll, get as cl, debounce as ul, toString as dl } from "lodash-es";
|
|
@@ -818,19 +818,19 @@ const fc = Object.assign(Xn, {
|
|
|
818
818
|
setup(e, { expose: n, emit: t }) {
|
|
819
819
|
const { t: r } = Gi(), o = e, i = t, l = sr(), u = Z(!1), d = N({
|
|
820
820
|
get: () => o.modelValue,
|
|
821
|
-
set: (
|
|
821
|
+
set: (S) => i("update:modelValue", S)
|
|
822
822
|
}), y = N(() => o.helpMessage || r("common.modal.helpTip")), b = Z(!1), p = () => {
|
|
823
823
|
b.value = !b.value, i("fullscreen-change", b.value);
|
|
824
824
|
}, h = async () => {
|
|
825
|
-
const
|
|
826
|
-
typeof
|
|
827
|
-
}, g = h,
|
|
828
|
-
const
|
|
829
|
-
if (typeof
|
|
825
|
+
const S = o.onBeforeCancel;
|
|
826
|
+
typeof S == "function" && await S() === !1 || (b.value = !1, d.value = !1, i("close"));
|
|
827
|
+
}, g = h, k = async () => {
|
|
828
|
+
const S = o.onBeforeOk;
|
|
829
|
+
if (typeof S == "function")
|
|
830
830
|
try {
|
|
831
|
-
u.value = !0, await
|
|
832
|
-
} catch (
|
|
833
|
-
console.error(
|
|
831
|
+
u.value = !0, await S() !== !1 && (b.value = !1, i("ok"), d.value = !1);
|
|
832
|
+
} catch ($) {
|
|
833
|
+
console.error($);
|
|
834
834
|
} finally {
|
|
835
835
|
u.value = !1;
|
|
836
836
|
}
|
|
@@ -839,9 +839,9 @@ const fc = Object.assign(Xn, {
|
|
|
839
839
|
};
|
|
840
840
|
return n({
|
|
841
841
|
toggleMaximize: p
|
|
842
|
-
}), (
|
|
842
|
+
}), (S, $) => (F(), ee(m(Nt), ae({
|
|
843
843
|
visible: d.value,
|
|
844
|
-
"onUpdate:visible":
|
|
844
|
+
"onUpdate:visible": $[2] || ($[2] = (V) => d.value = V),
|
|
845
845
|
title: e.title,
|
|
846
846
|
width: e.width,
|
|
847
847
|
top: e.top,
|
|
@@ -850,20 +850,20 @@ const fc = Object.assign(Xn, {
|
|
|
850
850
|
"esc-to-close": e.closeOnEsc,
|
|
851
851
|
fullscreen: b.value,
|
|
852
852
|
closable: !1
|
|
853
|
-
},
|
|
853
|
+
}, S.$attrs, {
|
|
854
854
|
"modal-class": "sunny-modal",
|
|
855
|
-
onClick:
|
|
855
|
+
onClick: $[3] || ($[3] = Ve(() => {
|
|
856
856
|
}, ["stop"])),
|
|
857
|
-
onMousedown:
|
|
857
|
+
onMousedown: $[4] || ($[4] = Ve(() => {
|
|
858
858
|
}, ["stop"]))
|
|
859
859
|
}), {
|
|
860
860
|
title: L(() => [
|
|
861
861
|
B("div", {
|
|
862
862
|
class: "sunny-modal__header",
|
|
863
|
-
onDblclick:
|
|
863
|
+
onDblclick: $[1] || ($[1] = (V) => o.fullscreen && p())
|
|
864
864
|
}, [
|
|
865
865
|
B("div", pc, [
|
|
866
|
-
ie(
|
|
866
|
+
ie(S.$slots, "title", {}, () => [
|
|
867
867
|
we(Q(e.title), 1)
|
|
868
868
|
])
|
|
869
869
|
]),
|
|
@@ -876,7 +876,7 @@ const fc = Object.assign(Xn, {
|
|
|
876
876
|
B("button", {
|
|
877
877
|
type: "button",
|
|
878
878
|
class: "sunny-modal__action-btn sunny-modal__action-btn--help",
|
|
879
|
-
onClick:
|
|
879
|
+
onClick: $[0] || ($[0] = Ve(() => {
|
|
880
880
|
}, ["stop"]))
|
|
881
881
|
}, [
|
|
882
882
|
j(m($o))
|
|
@@ -903,8 +903,8 @@ const fc = Object.assign(Xn, {
|
|
|
903
903
|
], 32)
|
|
904
904
|
]),
|
|
905
905
|
footer: L(() => [
|
|
906
|
-
|
|
907
|
-
ie(
|
|
906
|
+
S.$slots.footer ? ie(S.$slots, "footer", { key: 0 }) : (F(), Y("div", hc, [
|
|
907
|
+
ie(S.$slots, "insertFooter"),
|
|
908
908
|
m(l).hideCancel ? se("", !0) : (F(), ee(m(He), ae({
|
|
909
909
|
key: 0,
|
|
910
910
|
size: "mini"
|
|
@@ -917,13 +917,13 @@ const fc = Object.assign(Xn, {
|
|
|
917
917
|
]),
|
|
918
918
|
_: 1
|
|
919
919
|
}, 16, ["onClick"])),
|
|
920
|
-
ie(
|
|
920
|
+
ie(S.$slots, "centerFooter"),
|
|
921
921
|
m(l).hideOk ? se("", !0) : (F(), ee(m(He), ae({
|
|
922
922
|
key: 1,
|
|
923
923
|
type: "primary",
|
|
924
924
|
size: "mini",
|
|
925
925
|
loading: u.value || m(l).okLoading || m(l).confirmLoading
|
|
926
|
-
}, m(l).okButtonProps, { onClick:
|
|
926
|
+
}, m(l).okButtonProps, { onClick: k }), {
|
|
927
927
|
icon: L(() => [
|
|
928
928
|
j(m(ko))
|
|
929
929
|
]),
|
|
@@ -932,11 +932,11 @@ const fc = Object.assign(Xn, {
|
|
|
932
932
|
]),
|
|
933
933
|
_: 1
|
|
934
934
|
}, 16, ["loading"])),
|
|
935
|
-
ie(
|
|
935
|
+
ie(S.$slots, "appendFooter")
|
|
936
936
|
]))
|
|
937
937
|
]),
|
|
938
938
|
default: L(() => [
|
|
939
|
-
ie(
|
|
939
|
+
ie(S.$slots, "default")
|
|
940
940
|
]),
|
|
941
941
|
_: 3
|
|
942
942
|
}, 16, ["visible", "title", "width", "top", "z-index", "mask-closable", "esc-to-close", "fullscreen"]));
|
|
@@ -1232,14 +1232,14 @@ const Rc = ["aria-live", "aria-busy"], Mc = ["aria-label"], Oc = {
|
|
|
1232
1232
|
setup(e) {
|
|
1233
1233
|
const n = e, t = N(() => jt(n.icon) && Ji(n.icon)), r = N(() => {
|
|
1234
1234
|
const { icon: o } = n;
|
|
1235
|
-
return !jt(o) && (De(o) ||
|
|
1235
|
+
return !jt(o) && (De(o) || ze(o));
|
|
1236
1236
|
});
|
|
1237
|
-
return (o, i) => r.value ? (F(), ee(er(e.icon),
|
|
1237
|
+
return (o, i) => r.value ? (F(), ee(er(e.icon), Ie(ae({ key: 0 }, o.$attrs)), null, 16)) : t.value ? (F(), Y("img", ae({
|
|
1238
1238
|
key: 1,
|
|
1239
1239
|
src: e.icon
|
|
1240
1240
|
}, o.$attrs), null, 16, Dc)) : e.icon ? (F(), ee(m(Zi), ae({ key: 2 }, o.$attrs, {
|
|
1241
1241
|
icon: e.icon
|
|
1242
|
-
}), null, 16, ["icon"])) : e.fallback ? (F(), ee(m(Xi),
|
|
1242
|
+
}), null, 16, ["icon"])) : e.fallback ? (F(), ee(m(Xi), Ie(ae({ key: 3 }, o.$attrs)), null, 16)) : se("", !0);
|
|
1243
1243
|
}
|
|
1244
1244
|
}), Bc = /* @__PURE__ */ te({
|
|
1245
1245
|
name: "SunnyScrollArea",
|
|
@@ -1329,16 +1329,16 @@ const Rc = ["aria-live", "aria-busy"], Mc = ["aria-label"], Oc = {
|
|
|
1329
1329
|
"left-shadow": !u.value && b.value,
|
|
1330
1330
|
"right-shadow": !i.value && p.value
|
|
1331
1331
|
}));
|
|
1332
|
-
function g(
|
|
1333
|
-
const
|
|
1334
|
-
o.value =
|
|
1332
|
+
function g(k) {
|
|
1333
|
+
const S = k.target, $ = S?.scrollTop ?? 0, V = S?.scrollLeft ?? 0, R = S?.clientHeight ?? 0, x = S?.clientWidth ?? 0, O = S?.scrollHeight ?? 0, P = S?.scrollWidth ?? 0;
|
|
1334
|
+
o.value = $ <= 0, u.value = V <= 0, l.value = Math.abs($) + R >= O - Yr, i.value = Math.abs(V) + x >= P - Yr, r("scrollAt", {
|
|
1335
1335
|
bottom: l.value,
|
|
1336
1336
|
left: u.value,
|
|
1337
1337
|
right: i.value,
|
|
1338
1338
|
top: o.value
|
|
1339
1339
|
});
|
|
1340
1340
|
}
|
|
1341
|
-
return (
|
|
1341
|
+
return (k, S) => (F(), ee(m(Bc), {
|
|
1342
1342
|
class: fe([[m(Dt)(t.class), h.value], "sunny-scrollbar relative"]),
|
|
1343
1343
|
"on-scroll": g
|
|
1344
1344
|
}, {
|
|
@@ -1350,7 +1350,7 @@ const Rc = ["aria-live", "aria-busy"], Mc = ["aria-label"], Oc = {
|
|
|
1350
1350
|
"border-t border-border": e.shadowBorder && !o.value
|
|
1351
1351
|
}, "scrollbar-top-shadow pointer-events-none absolute top-0 z-10 h-12 w-full opacity-0 transition-opacity duration-300 ease-in-out will-change-[opacity]"])
|
|
1352
1352
|
}, null, 2)) : se("", !0),
|
|
1353
|
-
ie(
|
|
1353
|
+
ie(k.$slots, "default", {}, void 0, !0),
|
|
1354
1354
|
y.value ? (F(), Y("div", {
|
|
1355
1355
|
key: 1,
|
|
1356
1356
|
class: fe([{
|
|
@@ -1398,7 +1398,7 @@ const Ic = {
|
|
|
1398
1398
|
SunnyTimePicker: Hr,
|
|
1399
1399
|
SunnyUpload: un,
|
|
1400
1400
|
SunnyBusinessSearch: zc
|
|
1401
|
-
},
|
|
1401
|
+
}, Be = {};
|
|
1402
1402
|
function Up(e) {
|
|
1403
1403
|
const { config: n, defineRules: t } = e, {
|
|
1404
1404
|
// 全局禁用状态,默认不禁用
|
|
@@ -1421,9 +1421,11 @@ function Up(e) {
|
|
|
1421
1421
|
// ✅ 提取 permissionOptionsAdapter
|
|
1422
1422
|
uploadConfig: p,
|
|
1423
1423
|
// ✅ 提取 uploadConfig
|
|
1424
|
-
|
|
1424
|
+
exportAdapter: h,
|
|
1425
|
+
// ✅ 提取 exportAdapter
|
|
1426
|
+
apiPrefix: g
|
|
1425
1427
|
} = n || {};
|
|
1426
|
-
if (Object.assign(
|
|
1428
|
+
if (Object.assign(Be, {
|
|
1427
1429
|
disabled: r,
|
|
1428
1430
|
// ✅ 新增:全局禁用配置
|
|
1429
1431
|
disabledOnChangeListener: o,
|
|
@@ -1437,10 +1439,12 @@ function Up(e) {
|
|
|
1437
1439
|
// ✅ 添加 permissionOptionsAdapter 到全局配置
|
|
1438
1440
|
uploadConfig: p,
|
|
1439
1441
|
// ✅ 添加 uploadConfig 到全局配置
|
|
1440
|
-
|
|
1442
|
+
exportAdapter: h,
|
|
1443
|
+
// ✅ 添加 exportAdapter 到全局配置
|
|
1444
|
+
apiPrefix: g
|
|
1441
1445
|
}), t)
|
|
1442
|
-
for (const
|
|
1443
|
-
wo(
|
|
1446
|
+
for (const k of Object.keys(t))
|
|
1447
|
+
wo(k, t[k]);
|
|
1444
1448
|
}
|
|
1445
1449
|
const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-700 mb-2" }, Hc = { class: "flex flex-wrap items-center text-sm mb-3 select-none" }, qc = { class: "cursor-pointer text-blue-600 hover:text-blue-700 flex items-center mr-4 transition-colors" }, Gc = { class: "text-xs text-blue-600" }, Jc = { class: "text-xs text-gray-400" }, Yc = { class: "border border-dashed border-gray-300 rounded-lg p-4 transition-all duration-300" }, Kc = { class: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, Qc = { class: "flex-1 min-w-0 pr-8" }, Zc = ["title"], Xc = { class: "flex items-center text-xs text-gray-500" }, eu = { class: "mr-3 min-w-[3em]" }, tu = { class: "ml-2 w-8 text-right" }, Kr = 1024, Wp = /* @__PURE__ */ te({
|
|
1446
1450
|
__name: "index",
|
|
@@ -1462,7 +1466,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1462
1466
|
emits: ["update:modelValue", "change"],
|
|
1463
1467
|
setup(e, { emit: n }) {
|
|
1464
1468
|
const t = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], r = e, o = n, i = Z(!0), l = Z(!1), u = Z([]), d = Z(!1), y = N(() => {
|
|
1465
|
-
const T =
|
|
1469
|
+
const T = Be.uploadConfig || {};
|
|
1466
1470
|
return {
|
|
1467
1471
|
// 合并 action(优先级:props > 全局配置)
|
|
1468
1472
|
action: r.action || T.action || "",
|
|
@@ -1488,16 +1492,16 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1488
1492
|
be(() => r.modelValue, (T) => {
|
|
1489
1493
|
try {
|
|
1490
1494
|
u.value = JSON.parse(T || "[]");
|
|
1491
|
-
} catch (
|
|
1492
|
-
console.warn("Failed to parse modelValue:",
|
|
1495
|
+
} catch (w) {
|
|
1496
|
+
console.warn("Failed to parse modelValue:", w), u.value = [];
|
|
1493
1497
|
}
|
|
1494
1498
|
}, { immediate: !0, deep: !0 });
|
|
1495
1499
|
const h = (T) => T, g = (T) => {
|
|
1496
1500
|
if (T === 0) return "0 B";
|
|
1497
|
-
const
|
|
1498
|
-
return (T / Math.pow(Kr,
|
|
1499
|
-
},
|
|
1500
|
-
const
|
|
1501
|
+
const w = Math.floor(Math.log(T) / Math.log(Kr));
|
|
1502
|
+
return (T / Math.pow(Kr, w)).toPrecision(3) + " " + t[w];
|
|
1503
|
+
}, k = (T) => {
|
|
1504
|
+
const w = T.type || "", E = (T.name || "").split(".").pop()?.toLowerCase() || "", D = {
|
|
1501
1505
|
"vscode-icons:file-type-excel": ["xls", "xlsx", "csv"],
|
|
1502
1506
|
"vscode-icons:file-type-powerpoint": ["ppt", "pptx"],
|
|
1503
1507
|
"vscode-icons:file-type-text": ["txt"],
|
|
@@ -1506,41 +1510,41 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1506
1510
|
"vscode-icons:file-type-pdf": ["pdf"]
|
|
1507
1511
|
};
|
|
1508
1512
|
for (const [G, U] of Object.entries(D))
|
|
1509
|
-
if (U.includes(
|
|
1513
|
+
if (U.includes(E) || U.some((W) => w.includes(W)))
|
|
1510
1514
|
return G;
|
|
1511
|
-
return
|
|
1512
|
-
},
|
|
1515
|
+
return w.includes("excel") || w.includes("spreadsheet") ? "vscode-icons:file-type-excel" : w.includes("powerpoint") || w.includes("presentation") ? "vscode-icons:file-type-powerpoint" : w.includes("text/plain") ? "vscode-icons:file-type-text" : w.includes("word") || w.includes("document") ? "vscode-icons:file-type-word" : w.includes("zip") || w.includes("compressed") ? "vscode-icons:file-type-zip" : w.includes("pdf") ? "vscode-icons:file-type-pdf" : "vscode-icons:default-file";
|
|
1516
|
+
}, S = () => {
|
|
1513
1517
|
const T = JSON.stringify(u.value);
|
|
1514
1518
|
o("update:modelValue", T), o("change", T);
|
|
1515
|
-
},
|
|
1516
|
-
if (
|
|
1519
|
+
}, $ = (T, w) => {
|
|
1520
|
+
if (w.status !== "init") return;
|
|
1517
1521
|
const v = y.value;
|
|
1518
1522
|
if (u.value.length >= v.limit) {
|
|
1519
1523
|
ue.error(`最多上传${v.limit}个文件`);
|
|
1520
1524
|
return;
|
|
1521
1525
|
}
|
|
1522
|
-
const
|
|
1523
|
-
if (
|
|
1524
|
-
ue.error(`文件最大限制${g(
|
|
1526
|
+
const E = v.maxSize * 1024 * 1024;
|
|
1527
|
+
if (w.file.size > E) {
|
|
1528
|
+
ue.error(`文件最大限制${g(E)}`);
|
|
1525
1529
|
return;
|
|
1526
1530
|
}
|
|
1527
1531
|
u.value.push({
|
|
1528
|
-
uid:
|
|
1529
|
-
name:
|
|
1530
|
-
size:
|
|
1531
|
-
type:
|
|
1532
|
-
file:
|
|
1532
|
+
uid: w.uid,
|
|
1533
|
+
name: w.name,
|
|
1534
|
+
size: w.file?.size,
|
|
1535
|
+
type: w.file?.type,
|
|
1536
|
+
file: w.file,
|
|
1533
1537
|
percentage: 0,
|
|
1534
1538
|
checked: !1
|
|
1535
1539
|
});
|
|
1536
1540
|
}, V = async () => {
|
|
1537
1541
|
if (u.value.length === 0) return;
|
|
1538
|
-
const T = y.value,
|
|
1539
|
-
for (const v of
|
|
1540
|
-
const
|
|
1541
|
-
|
|
1542
|
+
const T = y.value, w = u.value.filter((v) => !v.url);
|
|
1543
|
+
for (const v of w) {
|
|
1544
|
+
const E = new FormData();
|
|
1545
|
+
E.append("fileName", v.file), E.append("encryptFile", l.value ? "1" : "0"), T.storeType && E.append("storeType", T.storeType), T.s3FileDir && E.append("s3FileDir", T.s3FileDir), T.preSigned && E.append("preSigned", T.preSigned), T.preSignedExpire && E.append("preSignedExpire", T.preSignedExpire);
|
|
1542
1546
|
try {
|
|
1543
|
-
const D = await
|
|
1547
|
+
const D = await st.post(T.action, E, {
|
|
1544
1548
|
onUploadProgress: (U) => {
|
|
1545
1549
|
if (U.total) {
|
|
1546
1550
|
const W = Math.floor(U.loaded / U.total * 100);
|
|
@@ -1548,54 +1552,54 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1548
1552
|
}
|
|
1549
1553
|
}
|
|
1550
1554
|
}), { data: G } = D;
|
|
1551
|
-
G.code === 200 ? (Object.assign(v, G.result), ue.success(G.message || "上传成功")) : (ue.error(G.message || "上传失败"),
|
|
1555
|
+
G.code === 200 ? (Object.assign(v, G.result), ue.success(G.message || "上传成功")) : (ue.error(G.message || "上传失败"), R(v.uid));
|
|
1552
1556
|
} catch {
|
|
1553
|
-
ue.error("上传失败"),
|
|
1557
|
+
ue.error("上传失败"), R(v.uid);
|
|
1554
1558
|
}
|
|
1555
1559
|
}
|
|
1556
|
-
|
|
1557
|
-
},
|
|
1558
|
-
const
|
|
1559
|
-
|
|
1560
|
-
},
|
|
1560
|
+
S();
|
|
1561
|
+
}, R = (T) => {
|
|
1562
|
+
const w = u.value.findIndex((v) => v.uid === T);
|
|
1563
|
+
w > -1 && u.value.splice(w, 1);
|
|
1564
|
+
}, x = (T, w) => {
|
|
1561
1565
|
const v = y.value;
|
|
1562
1566
|
T.url ? Nt.confirm({
|
|
1563
1567
|
title: h("提示"),
|
|
1564
1568
|
content: h("是否删除该文件?"),
|
|
1565
1569
|
onOk: () => {
|
|
1566
|
-
|
|
1570
|
+
st.post(v.delAction, {
|
|
1567
1571
|
filePathList: [T.url],
|
|
1568
1572
|
storeType: v.storeType
|
|
1569
|
-
}).then((
|
|
1570
|
-
const { data: D } =
|
|
1571
|
-
ue[D.success ? "success" : "error"](D.message), D.code === 200 && (u.value.splice(
|
|
1573
|
+
}).then((E) => {
|
|
1574
|
+
const { data: D } = E;
|
|
1575
|
+
ue[D.success ? "success" : "error"](D.message), D.code === 200 && (u.value.splice(w, 1), S());
|
|
1572
1576
|
});
|
|
1573
1577
|
}
|
|
1574
|
-
}) : (u.value.splice(
|
|
1578
|
+
}) : (u.value.splice(w, 1), S());
|
|
1575
1579
|
}, O = () => {
|
|
1576
|
-
const T = u.value.every((
|
|
1577
|
-
u.value.forEach((
|
|
1580
|
+
const T = u.value.every((w) => w.checked);
|
|
1581
|
+
u.value.forEach((w) => w.checked = !T);
|
|
1578
1582
|
}, P = () => {
|
|
1579
|
-
const T = y.value,
|
|
1580
|
-
|
|
1583
|
+
const T = y.value, w = u.value.filter((v) => v.checked);
|
|
1584
|
+
w.length !== 0 && Nt.confirm({
|
|
1581
1585
|
title: h("提示"),
|
|
1582
1586
|
content: h("是否删除选中的文件?"),
|
|
1583
1587
|
onOk: () => {
|
|
1584
1588
|
d.value = !0;
|
|
1585
|
-
const v =
|
|
1586
|
-
v.length > 0 ?
|
|
1589
|
+
const v = w.map((E) => E.url).filter(Boolean);
|
|
1590
|
+
v.length > 0 ? st.post(T.delAction, {
|
|
1587
1591
|
filePathList: v,
|
|
1588
1592
|
storeType: T.storeType
|
|
1589
|
-
}).then((
|
|
1590
|
-
const { data: D } =
|
|
1591
|
-
ue[D.success ? "success" : "error"](D.message), D.code === 200 && (u.value = u.value.filter((G) => !G.checked),
|
|
1593
|
+
}).then((E) => {
|
|
1594
|
+
const { data: D } = E;
|
|
1595
|
+
ue[D.success ? "success" : "error"](D.message), D.code === 200 && (u.value = u.value.filter((G) => !G.checked), S());
|
|
1592
1596
|
}).finally(() => {
|
|
1593
1597
|
d.value = !1;
|
|
1594
|
-
}) : (u.value = u.value.filter((
|
|
1598
|
+
}) : (u.value = u.value.filter((E) => !E.checked), S(), d.value = !1);
|
|
1595
1599
|
}
|
|
1596
1600
|
});
|
|
1597
1601
|
};
|
|
1598
|
-
return (T,
|
|
1602
|
+
return (T, w) => (F(), Y("div", Uc, [
|
|
1599
1603
|
B("div", Wc, Q(h("附件")), 1),
|
|
1600
1604
|
cn(B("div", Hc, [
|
|
1601
1605
|
j(m(un), {
|
|
@@ -1603,7 +1607,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1603
1607
|
"auto-upload": !1,
|
|
1604
1608
|
multiple: "",
|
|
1605
1609
|
accept: y.value.accept,
|
|
1606
|
-
onChange:
|
|
1610
|
+
onChange: $
|
|
1607
1611
|
}, {
|
|
1608
1612
|
"upload-button": L(() => [
|
|
1609
1613
|
B("span", qc, [
|
|
@@ -1615,7 +1619,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1615
1619
|
}, 8, ["accept"]),
|
|
1616
1620
|
B("span", {
|
|
1617
1621
|
class: fe(["flex items-center mr-4 transition-colors", b.value ? "text-gray-300 cursor-not-allowed" : "cursor-pointer text-gray-600 hover:text-gray-800"]),
|
|
1618
|
-
onClick:
|
|
1622
|
+
onClick: w[0] || (w[0] = (v) => !b.value && V())
|
|
1619
1623
|
}, [
|
|
1620
1624
|
j(m(Ql), { class: "mr-1 w-4 h-4" }),
|
|
1621
1625
|
we(" " + Q(h("上传附件")), 1)
|
|
@@ -1631,7 +1635,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1631
1635
|
e.showEncrypt ? (F(), ee(m(fn), {
|
|
1632
1636
|
key: 0,
|
|
1633
1637
|
modelValue: l.value,
|
|
1634
|
-
"onUpdate:modelValue":
|
|
1638
|
+
"onUpdate:modelValue": w[1] || (w[1] = (v) => l.value = v),
|
|
1635
1639
|
class: "mr-4"
|
|
1636
1640
|
}, {
|
|
1637
1641
|
default: L(() => [
|
|
@@ -1642,19 +1646,19 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1642
1646
|
B("span", Jc, " (" + Q(h("单个文件最大")) + Q(y.value.maxSize) + "MB," + Q(h("最多上传")) + Q(y.value.limit) + Q(h("个")) + ") ", 1),
|
|
1643
1647
|
B("span", {
|
|
1644
1648
|
class: "ml-auto cursor-pointer text-blue-600 text-xs hover:text-blue-700 transition-colors",
|
|
1645
|
-
onClick:
|
|
1649
|
+
onClick: w[2] || (w[2] = (v) => i.value = !i.value)
|
|
1646
1650
|
}, Q(i.value ? h("隐藏") : h("展开")), 1)
|
|
1647
1651
|
], 512), [
|
|
1648
1652
|
[tr, !e.readonly]
|
|
1649
1653
|
]),
|
|
1650
1654
|
cn(B("div", Yc, [
|
|
1651
1655
|
B("div", Kc, [
|
|
1652
|
-
(F(!0), Y(Oe, null, Pe(u.value, (v,
|
|
1653
|
-
key: v.uid ||
|
|
1656
|
+
(F(!0), Y(Oe, null, Pe(u.value, (v, E) => (F(), Y("div", {
|
|
1657
|
+
key: v.uid || E,
|
|
1654
1658
|
class: "bg-gray-50 hover:bg-gray-100 rounded p-3 relative flex items-center border border-transparent hover:border-gray-200 transition-colors group"
|
|
1655
1659
|
}, [
|
|
1656
1660
|
j(m(To), {
|
|
1657
|
-
icon:
|
|
1661
|
+
icon: k(v),
|
|
1658
1662
|
class: "w-10 h-10 mr-3 flex-shrink-0"
|
|
1659
1663
|
}, null, 8, ["icon"]),
|
|
1660
1664
|
B("div", Qc, [
|
|
@@ -1683,7 +1687,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1683
1687
|
e.readonly ? se("", !0) : (F(), ee(m(Po), {
|
|
1684
1688
|
key: 1,
|
|
1685
1689
|
class: "absolute bottom-3 right-3 w-4 h-4 cursor-pointer text-gray-400 hover:text-red-500 transition-colors",
|
|
1686
|
-
onClick: (D) =>
|
|
1690
|
+
onClick: (D) => x(v, E)
|
|
1687
1691
|
}, null, 8, ["onClick"]))
|
|
1688
1692
|
]))), 128))
|
|
1689
1693
|
])
|
|
@@ -1748,7 +1752,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1748
1752
|
emits: ["update:modelValue", "change"],
|
|
1749
1753
|
setup(e, { emit: n }) {
|
|
1750
1754
|
const t = e, r = N(() => {
|
|
1751
|
-
const d =
|
|
1755
|
+
const d = Be.uploadConfig || {};
|
|
1752
1756
|
return {
|
|
1753
1757
|
// 合并 action(优先级:props > 全局配置)
|
|
1754
1758
|
action: t.action || d.action,
|
|
@@ -1771,39 +1775,39 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1771
1775
|
"[SunnySimpleUpload] Missing required config: delAction. Please provide via props or configure globally using setupBusinessForm()."
|
|
1772
1776
|
);
|
|
1773
1777
|
const o = N(() => JSON.parse(t.modelValue || "[]")), i = n, l = (d) => {
|
|
1774
|
-
const { onProgress: y, onError: b, onSuccess: p, fileItem: h, name: g } = d,
|
|
1775
|
-
if (
|
|
1776
|
-
ue.error(`最多只能上传 ${
|
|
1778
|
+
const { onProgress: y, onError: b, onSuccess: p, fileItem: h, name: g } = d, k = r.value;
|
|
1779
|
+
if (k.limit && o.value.length >= k.limit) {
|
|
1780
|
+
ue.error(`最多只能上传 ${k.limit} 个文件`), b();
|
|
1777
1781
|
return;
|
|
1778
1782
|
}
|
|
1779
|
-
if (
|
|
1780
|
-
ue.error(`文件大小不能超过 ${
|
|
1783
|
+
if (k.maxSize && h.file.size > k.maxSize * 1024 * 1024) {
|
|
1784
|
+
ue.error(`文件大小不能超过 ${k.maxSize} MB`), b();
|
|
1781
1785
|
return;
|
|
1782
1786
|
}
|
|
1783
|
-
var
|
|
1784
|
-
|
|
1785
|
-
|
|
1787
|
+
var S = new FormData();
|
|
1788
|
+
S.append("fileName", h.file), S.append("encryptFile", k.encryptFile === !0 ? "1" : "0"), S.append("storeType", k.storeType), k.s3FileDir && S.append("s3FileDir", k.s3FileDir), k.preSigned && S.append("preSigned", k.preSigned === !0 ? "1" : "0"), k.preSignedExpire && S.append("preSignedExpire", String(k.preSignedExpire)), st.post(
|
|
1789
|
+
k.action,
|
|
1786
1790
|
// ✅ 使用合并后的 action
|
|
1787
|
-
|
|
1791
|
+
S,
|
|
1788
1792
|
{
|
|
1789
|
-
onUploadProgress: (
|
|
1790
|
-
const V = Math.floor(
|
|
1793
|
+
onUploadProgress: ($) => {
|
|
1794
|
+
const V = Math.floor($.loaded / $.total * 100);
|
|
1791
1795
|
y(V);
|
|
1792
1796
|
}
|
|
1793
1797
|
}
|
|
1794
|
-
).then((
|
|
1795
|
-
if (
|
|
1796
|
-
ue.success(
|
|
1798
|
+
).then(($) => {
|
|
1799
|
+
if ($.data.code === 200) {
|
|
1800
|
+
ue.success($.data.message || "上传成功"), p($.data.result);
|
|
1797
1801
|
const V = [...o.value, h];
|
|
1798
1802
|
i("update:modelValue", JSON.stringify(V)), i("change", JSON.stringify(V));
|
|
1799
1803
|
} else
|
|
1800
|
-
ue.error(
|
|
1804
|
+
ue.error($.data.message || "上传失败"), b();
|
|
1801
1805
|
}).catch(() => {
|
|
1802
1806
|
b();
|
|
1803
1807
|
});
|
|
1804
1808
|
}, u = (d) => {
|
|
1805
1809
|
const y = r.value;
|
|
1806
|
-
|
|
1810
|
+
st.post(
|
|
1807
1811
|
y.delAction,
|
|
1808
1812
|
// ✅ 使用合并后的 delAction
|
|
1809
1813
|
{
|
|
@@ -1847,7 +1851,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1847
1851
|
loading: !1,
|
|
1848
1852
|
color: g.status === "error" ? "red" : "green",
|
|
1849
1853
|
closable: "",
|
|
1850
|
-
onClose: (
|
|
1854
|
+
onClose: (k) => u(g)
|
|
1851
1855
|
}, {
|
|
1852
1856
|
default: L(() => [
|
|
1853
1857
|
we(Q(g.name), 1)
|
|
@@ -1944,21 +1948,21 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1944
1948
|
r("update:modelValue", p), r("change", p);
|
|
1945
1949
|
}, d = (p) => {
|
|
1946
1950
|
if (p === !0) {
|
|
1947
|
-
const g = o.value.map((
|
|
1948
|
-
const V = t.options.find((
|
|
1951
|
+
const g = o.value.map(($) => $.value), k = t.modelValue.filter(($) => {
|
|
1952
|
+
const V = t.options.find((R) => R.value === $);
|
|
1949
1953
|
return V && V.disabled;
|
|
1950
|
-
}),
|
|
1951
|
-
r("update:modelValue",
|
|
1954
|
+
}), S = Array.from(/* @__PURE__ */ new Set([...k, ...g]));
|
|
1955
|
+
r("update:modelValue", S), r("change", S);
|
|
1952
1956
|
} else {
|
|
1953
|
-
const g = t.modelValue.filter((
|
|
1954
|
-
const
|
|
1955
|
-
return
|
|
1957
|
+
const g = t.modelValue.filter((k) => {
|
|
1958
|
+
const S = t.options.find(($) => $.value === k);
|
|
1959
|
+
return S && S.disabled;
|
|
1956
1960
|
});
|
|
1957
1961
|
r("update:modelValue", g), r("change", g);
|
|
1958
1962
|
}
|
|
1959
1963
|
}, y = () => {
|
|
1960
1964
|
const p = t.modelValue.filter((h) => {
|
|
1961
|
-
const g = t.options.find((
|
|
1965
|
+
const g = t.options.find((k) => k.value === h);
|
|
1962
1966
|
return g && g.disabled;
|
|
1963
1967
|
});
|
|
1964
1968
|
r("update:modelValue", p), r("change", p);
|
|
@@ -1967,37 +1971,37 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
1967
1971
|
if (!h) return;
|
|
1968
1972
|
const g = h.getData("text");
|
|
1969
1973
|
if (!g) return;
|
|
1970
|
-
const
|
|
1971
|
-
if (
|
|
1972
|
-
const
|
|
1973
|
-
let
|
|
1974
|
-
const V = (
|
|
1975
|
-
const
|
|
1976
|
-
return !
|
|
1974
|
+
const k = g.split(/\r?\n/).map((R) => R.trim()).filter((R) => R);
|
|
1975
|
+
if (k.length === 0) return;
|
|
1976
|
+
const S = [];
|
|
1977
|
+
let $ = 0;
|
|
1978
|
+
const V = (R) => {
|
|
1979
|
+
const x = R.cMeta;
|
|
1980
|
+
return !x || Object.keys(x).length === 0 ? !0 : !t.filterModel || Object.keys(t.filterModel).length === 0 ? !1 : Object.entries(x).every(([O, P]) => {
|
|
1977
1981
|
const T = t.filterModel[O];
|
|
1978
1982
|
return T == null ? !1 : String(T) === String(P);
|
|
1979
1983
|
});
|
|
1980
1984
|
};
|
|
1981
|
-
if (
|
|
1985
|
+
if (k.forEach((R) => {
|
|
1982
1986
|
if (t.matchStrategy === "value" || t.matchStrategy === "both") {
|
|
1983
|
-
const
|
|
1984
|
-
if (
|
|
1985
|
-
|
|
1987
|
+
const x = t.options.find((O) => String(O.value) === R);
|
|
1988
|
+
if (x && !x.disabled && V(x)) {
|
|
1989
|
+
S.push(x.value), $++;
|
|
1986
1990
|
return;
|
|
1987
1991
|
}
|
|
1988
1992
|
}
|
|
1989
1993
|
if (t.matchStrategy === "label" || t.matchStrategy === "both") {
|
|
1990
|
-
const
|
|
1991
|
-
|
|
1994
|
+
const x = t.options.find((O) => O.label === R);
|
|
1995
|
+
x && !x.disabled && V(x) && (S.push(x.value), $++);
|
|
1992
1996
|
}
|
|
1993
|
-
}),
|
|
1997
|
+
}), S.length > 0) {
|
|
1994
1998
|
p.preventDefault();
|
|
1995
|
-
const
|
|
1996
|
-
r("update:modelValue",
|
|
1999
|
+
const R = Array.from(/* @__PURE__ */ new Set([...t.modelValue, ...S]));
|
|
2000
|
+
r("update:modelValue", R), r("change", R), ue.success(`成功识别并选中 ${$} 项 (Matched ${$} items)`);
|
|
1997
2001
|
}
|
|
1998
2002
|
};
|
|
1999
2003
|
return (p, h) => {
|
|
2000
|
-
const g = Te("a-checkbox"),
|
|
2004
|
+
const g = Te("a-checkbox"), k = Te("a-tooltip");
|
|
2001
2005
|
return F(), ee(m(au), ae(p.$attrs, {
|
|
2002
2006
|
"model-value": e.modelValue,
|
|
2003
2007
|
options: e.options,
|
|
@@ -2021,7 +2025,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
2021
2025
|
_: 1
|
|
2022
2026
|
}, 8, ["model-value", "indeterminate"]),
|
|
2023
2027
|
B("div", iu, [
|
|
2024
|
-
j(
|
|
2028
|
+
j(k, { content: "清除所有选中项" }, {
|
|
2025
2029
|
default: L(() => [
|
|
2026
2030
|
B("div", {
|
|
2027
2031
|
class: "w-6 h-6 flex items-center justify-center rounded cursor-pointer text-[var(--color-text-3)] hover:bg-[var(--color-fill-3)] transition-all",
|
|
@@ -2033,7 +2037,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
2033
2037
|
_: 1
|
|
2034
2038
|
}),
|
|
2035
2039
|
h[1] || (h[1] = B("div", { class: "w-[1px] h-3 bg-[var(--color-neutral-3)] mx-1" }, null, -1)),
|
|
2036
|
-
j(
|
|
2040
|
+
j(k, {
|
|
2037
2041
|
content: "支持从 Excel 或文本编辑器(↓列数据)复制多行数据,粘贴至搜索框即可自动匹配并选中。",
|
|
2038
2042
|
position: "left"
|
|
2039
2043
|
}, {
|
|
@@ -2049,10 +2053,10 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
2049
2053
|
]),
|
|
2050
2054
|
_: 2
|
|
2051
2055
|
}, [
|
|
2052
|
-
Pe(p.$slots, (
|
|
2053
|
-
name:
|
|
2056
|
+
Pe(p.$slots, (S, $) => ({
|
|
2057
|
+
name: $,
|
|
2054
2058
|
fn: L((V) => [
|
|
2055
|
-
ie(p.$slots,
|
|
2059
|
+
ie(p.$slots, $, Ie(tt(V || {})))
|
|
2056
2060
|
])
|
|
2057
2061
|
}))
|
|
2058
2062
|
]), 1040, ["model-value", "options", "filter-model"]);
|
|
@@ -2096,16 +2100,16 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
2096
2100
|
"End"
|
|
2097
2101
|
].includes(h.key) || h.preventDefault();
|
|
2098
2102
|
}, y = (h, g) => {
|
|
2099
|
-
const
|
|
2100
|
-
|
|
2103
|
+
const k = [...t.modelValue];
|
|
2104
|
+
k.splice(g, 1), r("update:modelValue", k), r("change", k);
|
|
2101
2105
|
}, b = () => {
|
|
2102
2106
|
r("update:modelValue", []), r("change", []), r("clear");
|
|
2103
2107
|
}, p = () => {
|
|
2104
2108
|
t.disabled || r("search");
|
|
2105
2109
|
};
|
|
2106
2110
|
return (h, g) => {
|
|
2107
|
-
const
|
|
2108
|
-
return F(), ee(
|
|
2111
|
+
const k = Te("a-input-tag"), S = Te("a-tag"), $ = Te("a-popover");
|
|
2112
|
+
return F(), ee($, {
|
|
2109
2113
|
"popup-visible": u.value,
|
|
2110
2114
|
"onUpdate:popupVisible": g[1] || (g[1] = (V) => u.value = V),
|
|
2111
2115
|
trigger: "focus",
|
|
@@ -2119,11 +2123,11 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
2119
2123
|
onMousedown: g[0] || (g[0] = Ve(() => {
|
|
2120
2124
|
}, ["prevent"]))
|
|
2121
2125
|
}, [
|
|
2122
|
-
(F(!0), Y(Oe, null, Pe(l.value, (V,
|
|
2126
|
+
(F(!0), Y(Oe, null, Pe(l.value, (V, R) => (F(), ee(S, {
|
|
2123
2127
|
key: V.value,
|
|
2124
2128
|
closable: !e.disabled,
|
|
2125
2129
|
size: "small",
|
|
2126
|
-
onClose: (
|
|
2130
|
+
onClose: (x) => y(V, R)
|
|
2127
2131
|
}, {
|
|
2128
2132
|
default: L(() => [
|
|
2129
2133
|
we(Q(V.label), 1)
|
|
@@ -2133,7 +2137,7 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
2133
2137
|
], 32)) : se("", !0)
|
|
2134
2138
|
]),
|
|
2135
2139
|
default: L(() => [
|
|
2136
|
-
j(
|
|
2140
|
+
j(k, ae({ ref: "inputTagRef" }, h.$attrs, {
|
|
2137
2141
|
"model-value": l.value,
|
|
2138
2142
|
"input-value": "",
|
|
2139
2143
|
disabled: e.disabled,
|
|
@@ -2158,10 +2162,10 @@ const Uc = { class: "sunny-file-upload" }, Wc = { class: "font-bold text-gray-70
|
|
|
2158
2162
|
]),
|
|
2159
2163
|
_: 2
|
|
2160
2164
|
}, [
|
|
2161
|
-
Pe(h.$slots, (V,
|
|
2162
|
-
name:
|
|
2163
|
-
fn: L((
|
|
2164
|
-
ie(h.$slots,
|
|
2165
|
+
Pe(h.$slots, (V, R) => ({
|
|
2166
|
+
name: R,
|
|
2167
|
+
fn: L((x) => [
|
|
2168
|
+
ie(h.$slots, R, Ie(tt(x || {})))
|
|
2165
2169
|
])
|
|
2166
2170
|
}))
|
|
2167
2171
|
]), 1040, ["model-value", "disabled", "placeholder", "max-tag-count"])
|
|
@@ -2213,7 +2217,7 @@ class uu {
|
|
|
2213
2217
|
}
|
|
2214
2218
|
function Qr(e, n = "YYYY-MM-DD") {
|
|
2215
2219
|
if (!e) return e;
|
|
2216
|
-
if (
|
|
2220
|
+
if (ze(e.format))
|
|
2217
2221
|
return e.format(n);
|
|
2218
2222
|
if (e instanceof Date) {
|
|
2219
2223
|
const t = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), o = String(e.getDate()).padStart(2, "0"), i = String(e.getHours()).padStart(2, "0"), l = String(e.getMinutes()).padStart(2, "0"), u = String(e.getSeconds()).padStart(2, "0");
|
|
@@ -2488,7 +2492,7 @@ class mu {
|
|
|
2488
2492
|
* Update state
|
|
2489
2493
|
*/
|
|
2490
2494
|
setState(n) {
|
|
2491
|
-
|
|
2495
|
+
ze(n) ? this.store.setState((t) => an(t, n(t))) : this.store.setState((t) => an(t, n));
|
|
2492
2496
|
}
|
|
2493
2497
|
/**
|
|
2494
2498
|
* 设置表单值
|
|
@@ -2757,7 +2761,7 @@ class mu {
|
|
|
2757
2761
|
const [d, y] = t[o];
|
|
2758
2762
|
if (u === null)
|
|
2759
2763
|
t[i] = d, t[l] = y;
|
|
2760
|
-
else if (
|
|
2764
|
+
else if (ze(u))
|
|
2761
2765
|
t[i] = u(d, o), t[l] = u(y, o);
|
|
2762
2766
|
else {
|
|
2763
2767
|
const [b, p] = Array.isArray(u) ? u : [u, u];
|
|
@@ -2861,34 +2865,34 @@ function Cu(e) {
|
|
|
2861
2865
|
const o = N(() => n.value), i = N(() => e()), l = N(() => {
|
|
2862
2866
|
const h = i.value;
|
|
2863
2867
|
if (!h) return !0;
|
|
2864
|
-
const { if: g } = h,
|
|
2865
|
-
return
|
|
2868
|
+
const { if: g } = h, k = o.value;
|
|
2869
|
+
return ze(g) ? !!g(k, r) : zn(g) ? g : !0;
|
|
2866
2870
|
}), u = N(() => {
|
|
2867
2871
|
const h = i.value;
|
|
2868
2872
|
if (!h) return !0;
|
|
2869
|
-
const { show: g } = h,
|
|
2870
|
-
return
|
|
2873
|
+
const { show: g } = h, k = o.value;
|
|
2874
|
+
return ze(g) ? !!g(k, r) : zn(g) ? g : !0;
|
|
2871
2875
|
}), d = N(() => {
|
|
2872
2876
|
const h = i.value;
|
|
2873
2877
|
if (!h) return !1;
|
|
2874
|
-
const { disabled: g } = h,
|
|
2875
|
-
return
|
|
2878
|
+
const { disabled: g } = h, k = o.value;
|
|
2879
|
+
return ze(g) ? !!g(k, r) : zn(g) ? g : !1;
|
|
2876
2880
|
}), y = N(() => {
|
|
2877
2881
|
const h = i.value;
|
|
2878
2882
|
if (!h) return !1;
|
|
2879
|
-
const { required: g } = h,
|
|
2880
|
-
return
|
|
2883
|
+
const { required: g } = h, k = o.value;
|
|
2884
|
+
return ze(g) ? !!g(k, r) : !1;
|
|
2881
2885
|
}), b = N(() => {
|
|
2882
2886
|
const h = i.value;
|
|
2883
2887
|
if (!h) return {};
|
|
2884
|
-
const { componentProps: g } = h,
|
|
2885
|
-
return
|
|
2888
|
+
const { componentProps: g } = h, k = o.value;
|
|
2889
|
+
return ze(g) ? g(k, r) || {} : {};
|
|
2886
2890
|
}), p = N(() => {
|
|
2887
2891
|
const h = i.value;
|
|
2888
2892
|
if (!h) return;
|
|
2889
|
-
const { rules: g } = h,
|
|
2890
|
-
if (
|
|
2891
|
-
return g(
|
|
2893
|
+
const { rules: g } = h, k = o.value;
|
|
2894
|
+
if (ze(g))
|
|
2895
|
+
return g(k, r);
|
|
2892
2896
|
});
|
|
2893
2897
|
return {
|
|
2894
2898
|
dynamicComponentProps: b,
|
|
@@ -2905,7 +2909,7 @@ const xu = /* @__PURE__ */ te({
|
|
|
2905
2909
|
schema: {}
|
|
2906
2910
|
},
|
|
2907
2911
|
setup(e) {
|
|
2908
|
-
const n = e, t = Co(), r = ur(), o = N(() =>
|
|
2912
|
+
const n = e, t = Co(), r = ur(), o = N(() => Be.disabled ?? !1), { isVertical: i } = Mo(), l = r.form, u = bu(), {
|
|
2909
2913
|
dynamicComponentProps: d,
|
|
2910
2914
|
// 动态组件属性
|
|
2911
2915
|
dynamicRules: y,
|
|
@@ -2918,14 +2922,14 @@ const xu = /* @__PURE__ */ te({
|
|
|
2918
2922
|
// 是否必填
|
|
2919
2923
|
isShow: g
|
|
2920
2924
|
// 是否显示 (v-show)
|
|
2921
|
-
} = Cu(() => n.schema.dependencies),
|
|
2925
|
+
} = Cu(() => n.schema.dependencies), k = N(() => {
|
|
2922
2926
|
const { component: U } = n.schema;
|
|
2923
2927
|
return jt(U) && Ic[U] || U;
|
|
2924
|
-
}),
|
|
2928
|
+
}), S = N(() => {
|
|
2925
2929
|
const { component: U } = n.schema;
|
|
2926
2930
|
return U === "Slot";
|
|
2927
|
-
}),
|
|
2928
|
-
if (!
|
|
2931
|
+
}), $ = N(() => {
|
|
2932
|
+
if (!S.value || !u) return !1;
|
|
2929
2933
|
const U = n.schema.fieldName;
|
|
2930
2934
|
return U ? !!u[U] : !1;
|
|
2931
2935
|
}), V = (U, W) => {
|
|
@@ -2941,16 +2945,16 @@ const xu = /* @__PURE__ */ te({
|
|
|
2941
2945
|
// 更新字段值的函数
|
|
2942
2946
|
setValue: pe,
|
|
2943
2947
|
// 是否禁用
|
|
2944
|
-
disabled:
|
|
2948
|
+
disabled: E.value,
|
|
2945
2949
|
// 验证错误信息
|
|
2946
2950
|
errorMessage: W,
|
|
2947
2951
|
// 原始 field 对象 (包含 onInput, onChange 等)
|
|
2948
2952
|
field: U,
|
|
2949
2953
|
// 组件属性
|
|
2950
|
-
componentProps:
|
|
2954
|
+
componentProps: w.value
|
|
2951
2955
|
};
|
|
2952
2956
|
return q(Ae);
|
|
2953
|
-
},
|
|
2957
|
+
}, R = te({
|
|
2954
2958
|
name: "FieldSlotRenderer",
|
|
2955
2959
|
props: {
|
|
2956
2960
|
field: { type: Object, required: !0 },
|
|
@@ -2959,8 +2963,8 @@ const xu = /* @__PURE__ */ te({
|
|
|
2959
2963
|
setup(U) {
|
|
2960
2964
|
return () => V(U.field, U.errorMessage);
|
|
2961
2965
|
}
|
|
2962
|
-
}),
|
|
2963
|
-
if (!
|
|
2966
|
+
}), x = N(() => n.schema.hidden ? !1 : p.value && g.value), O = N(() => y.value || n.schema.rules), P = N(() => {
|
|
2967
|
+
if (!x.value)
|
|
2964
2968
|
return !1;
|
|
2965
2969
|
if (!O.value)
|
|
2966
2970
|
return h.value;
|
|
@@ -2976,7 +2980,7 @@ const xu = /* @__PURE__ */ te({
|
|
|
2976
2980
|
}
|
|
2977
2981
|
return !W;
|
|
2978
2982
|
}), T = N(() => {
|
|
2979
|
-
if (!
|
|
2983
|
+
if (!x.value)
|
|
2980
2984
|
return null;
|
|
2981
2985
|
let U = ut(O.value);
|
|
2982
2986
|
if (!U)
|
|
@@ -2988,18 +2992,18 @@ const xu = /* @__PURE__ */ te({
|
|
|
2988
2992
|
J && (U = J);
|
|
2989
2993
|
}
|
|
2990
2994
|
return hl(U);
|
|
2991
|
-
}),
|
|
2992
|
-
const { componentProps: U, commonComponentProps: W } = n.schema, J =
|
|
2995
|
+
}), w = N(() => {
|
|
2996
|
+
const { componentProps: U, commonComponentProps: W } = n.schema, J = ze(U) ? U(t.value, l) : U;
|
|
2993
2997
|
return {
|
|
2994
2998
|
...W,
|
|
2995
2999
|
...J,
|
|
2996
3000
|
...d.value
|
|
2997
3001
|
};
|
|
2998
3002
|
}), v = (U) => {
|
|
2999
|
-
const W =
|
|
3000
|
-
|
|
3003
|
+
const W = w.value, J = (pe, Ae) => (...ce) => {
|
|
3004
|
+
ze(pe) && pe(...ce), Ae(...ce);
|
|
3001
3005
|
}, q = (pe) => {
|
|
3002
|
-
|
|
3006
|
+
ze(W?.onInput) && W.onInput(pe), U.onInput(pe);
|
|
3003
3007
|
};
|
|
3004
3008
|
return {
|
|
3005
3009
|
...W,
|
|
@@ -3014,16 +3018,16 @@ const xu = /* @__PURE__ */ te({
|
|
|
3014
3018
|
};
|
|
3015
3019
|
};
|
|
3016
3020
|
be(
|
|
3017
|
-
() =>
|
|
3021
|
+
() => w.value?.autofocus,
|
|
3018
3022
|
(U) => {
|
|
3019
3023
|
U === !0 && et(() => {
|
|
3020
3024
|
});
|
|
3021
3025
|
},
|
|
3022
3026
|
{ immediate: !0 }
|
|
3023
3027
|
);
|
|
3024
|
-
const
|
|
3028
|
+
const E = N(() => b.value || // 1. 依赖禁用(最高优先级)
|
|
3025
3029
|
n.schema.disabled || // 2. Schema 禁用
|
|
3026
|
-
|
|
3030
|
+
w.value?.disabled || // 3. Props 禁用
|
|
3027
3031
|
n.schema.formDisabled || // 4. 表单级禁用(来自 commonConfig.disabled)
|
|
3028
3032
|
o.value), D = N(() => {
|
|
3029
3033
|
if (!(i.value || !n.schema.labelWidth))
|
|
@@ -3047,7 +3051,7 @@ const xu = /* @__PURE__ */ te({
|
|
|
3047
3051
|
});
|
|
3048
3052
|
return (U, W) => {
|
|
3049
3053
|
const J = Te("a-form-item");
|
|
3050
|
-
return
|
|
3054
|
+
return x.value && e.schema.fieldName ? (F(), ee(m(al), {
|
|
3051
3055
|
key: 0,
|
|
3052
3056
|
name: e.schema.fieldName,
|
|
3053
3057
|
rules: T.value,
|
|
@@ -3063,11 +3067,11 @@ const xu = /* @__PURE__ */ te({
|
|
|
3063
3067
|
"wrapper-col-props": D.value
|
|
3064
3068
|
}, e.schema.formFieldProps), {
|
|
3065
3069
|
default: L(() => [
|
|
3066
|
-
|
|
3070
|
+
$.value ? (F(), ee(er(m(R)), {
|
|
3067
3071
|
key: 0,
|
|
3068
3072
|
field: q,
|
|
3069
3073
|
"error-message": pe
|
|
3070
|
-
}, null, 8, ["field", "error-message"])) : (F(), ee(er(
|
|
3074
|
+
}, null, 8, ["field", "error-message"])) : (F(), ee(er(k.value), ae({ key: 1 }, v(q), { disabled: E.value }), null, 16, ["disabled"]))
|
|
3071
3075
|
]),
|
|
3072
3076
|
_: 2
|
|
3073
3077
|
}, 1040, ["label", "help", "validate-status", "required", "label-col-props", "wrapper-col-props"])
|
|
@@ -3104,23 +3108,23 @@ const xu = /* @__PURE__ */ te({
|
|
|
3104
3108
|
async function b(g) {
|
|
3105
3109
|
if (r.formApi) {
|
|
3106
3110
|
g?.preventDefault(), g?.stopPropagation();
|
|
3107
|
-
const
|
|
3108
|
-
if (!
|
|
3111
|
+
const k = m(i), { valid: S } = await r.formApi.validate();
|
|
3112
|
+
if (!S)
|
|
3109
3113
|
return;
|
|
3110
|
-
const
|
|
3111
|
-
await
|
|
3114
|
+
const $ = ut(await r.formApi.getValues()) ?? {};
|
|
3115
|
+
await k.handleSubmit?.($);
|
|
3112
3116
|
}
|
|
3113
3117
|
}
|
|
3114
3118
|
async function p(g) {
|
|
3115
3119
|
g?.preventDefault(), g?.stopPropagation();
|
|
3116
|
-
const
|
|
3120
|
+
const k = m(i);
|
|
3117
3121
|
if (r.formApi) {
|
|
3118
|
-
const
|
|
3119
|
-
|
|
3122
|
+
const S = ut(await r.formApi.getValues()) ?? {};
|
|
3123
|
+
k.handleReset ? await k.handleReset(S) : r.formApi.resetForm();
|
|
3120
3124
|
} else if (l)
|
|
3121
|
-
if (
|
|
3122
|
-
const
|
|
3123
|
-
await
|
|
3125
|
+
if (k.handleReset) {
|
|
3126
|
+
const S = l.values;
|
|
3127
|
+
await k.handleReset(S);
|
|
3124
3128
|
} else
|
|
3125
3129
|
l.resetForm();
|
|
3126
3130
|
o("reset");
|
|
@@ -3132,7 +3136,7 @@ const xu = /* @__PURE__ */ te({
|
|
|
3132
3136
|
}
|
|
3133
3137
|
);
|
|
3134
3138
|
const h = N(() => {
|
|
3135
|
-
const g = m(i),
|
|
3139
|
+
const g = m(i), k = g.actionPosition || "right", S = [
|
|
3136
3140
|
"flex",
|
|
3137
3141
|
"items-center",
|
|
3138
3142
|
"gap-3",
|
|
@@ -3143,26 +3147,26 @@ const xu = /* @__PURE__ */ te({
|
|
|
3143
3147
|
// 用户自定义类名
|
|
3144
3148
|
g.actionWrapperClass
|
|
3145
3149
|
];
|
|
3146
|
-
switch (
|
|
3150
|
+
switch (k) {
|
|
3147
3151
|
case "center": {
|
|
3148
|
-
|
|
3152
|
+
S.push("justify-center");
|
|
3149
3153
|
break;
|
|
3150
3154
|
}
|
|
3151
3155
|
case "left": {
|
|
3152
|
-
|
|
3156
|
+
S.push("justify-start");
|
|
3153
3157
|
break;
|
|
3154
3158
|
}
|
|
3155
3159
|
default: {
|
|
3156
|
-
|
|
3160
|
+
S.push("justify-end");
|
|
3157
3161
|
break;
|
|
3158
3162
|
}
|
|
3159
3163
|
}
|
|
3160
|
-
return
|
|
3164
|
+
return S.join(" ");
|
|
3161
3165
|
});
|
|
3162
3166
|
return n({
|
|
3163
3167
|
handleReset: p,
|
|
3164
3168
|
handleSubmit: b
|
|
3165
|
-
}), (g,
|
|
3169
|
+
}), (g, k) => (F(), Y("div", {
|
|
3166
3170
|
class: fe(h.value)
|
|
3167
3171
|
}, [
|
|
3168
3172
|
m(m(i)).actionButtonsReverse ? se("", !0) : (F(), Y(Oe, { key: 0 }, [
|
|
@@ -3225,14 +3229,14 @@ const xu = /* @__PURE__ */ te({
|
|
|
3225
3229
|
api: r.searchPlanConfig.api,
|
|
3226
3230
|
onSearch: r.searchPlanConfig.onSearch,
|
|
3227
3231
|
onDefaultPlanLoaded: r.searchPlanConfig.onDefaultPlanLoaded,
|
|
3228
|
-
"onUpdate:currentSearchPlan":
|
|
3229
|
-
"onUpdate:searchPlanList":
|
|
3232
|
+
"onUpdate:currentSearchPlan": k[0] || (k[0] = (S) => r.searchPlanConfig?.onUpdateCurrentSearchPlan && r.searchPlanConfig.onUpdateCurrentSearchPlan(S)),
|
|
3233
|
+
"onUpdate:searchPlanList": k[1] || (k[1] = (S) => r.searchPlanConfig?.onUpdateSearchPlanList && r.searchPlanConfig.onUpdateSearchPlanList(S))
|
|
3230
3234
|
}, {
|
|
3231
|
-
trigger: L(({ open:
|
|
3235
|
+
trigger: L(({ open: S }) => [
|
|
3232
3236
|
B("button", {
|
|
3233
3237
|
type: "button",
|
|
3234
3238
|
class: "px-3 py-1.5 border border-[var(--color-border-2)] rounded bg-white text-sm transition-all hover:border-[rgb(var(--primary-6))] hover:text-[rgb(var(--primary-6))] disabled:cursor-not-allowed disabled:opacity-60 mr-2",
|
|
3235
|
-
onClick:
|
|
3239
|
+
onClick: S,
|
|
3236
3240
|
title: "查询方案"
|
|
3237
3241
|
}, [
|
|
3238
3242
|
j(m(To), {
|
|
@@ -3247,7 +3251,7 @@ const xu = /* @__PURE__ */ te({
|
|
|
3247
3251
|
m(m(i)).showCollapseButton ? (F(), Y("div", {
|
|
3248
3252
|
key: 3,
|
|
3249
3253
|
class: "cursor-pointer text-[rgb(var(--primary-6))] hover:opacity-80 transition-opacity select-none flex items-center gap-0.5",
|
|
3250
|
-
onClick:
|
|
3254
|
+
onClick: k[2] || (k[2] = (S) => u.value = !u.value)
|
|
3251
3255
|
}, [
|
|
3252
3256
|
u.value ? (F(), ee(m(_l), {
|
|
3253
3257
|
key: 0,
|
|
@@ -3295,9 +3299,9 @@ function $u(e) {
|
|
|
3295
3299
|
if (u) {
|
|
3296
3300
|
const b = ["xxl", "xl", "lg", "md", "sm", "xs"], p = b.indexOf(y);
|
|
3297
3301
|
for (let h = p; h < b.length; h++) {
|
|
3298
|
-
const g = b[h],
|
|
3299
|
-
if (
|
|
3300
|
-
return typeof
|
|
3302
|
+
const g = b[h], k = u[g];
|
|
3303
|
+
if (k !== void 0)
|
|
3304
|
+
return typeof k == "object" ? k.span ?? 24 : k;
|
|
3301
3305
|
}
|
|
3302
3306
|
if (u.span !== void 0)
|
|
3303
3307
|
return u.span;
|
|
@@ -3317,25 +3321,25 @@ const Pu = { class: "h-full flex flex-col justify-end" }, Fo = /* @__PURE__ */ t
|
|
|
3317
3321
|
const r = e, o = t, i = kt(), l = wu(), u = uo({ ...l.value });
|
|
3318
3322
|
be(
|
|
3319
3323
|
() => l.value,
|
|
3320
|
-
(
|
|
3321
|
-
Object.assign(u,
|
|
3324
|
+
(w) => {
|
|
3325
|
+
Object.assign(u, w);
|
|
3322
3326
|
},
|
|
3323
3327
|
{ deep: !0 }
|
|
3324
3328
|
// 深度监听,确保对象内部属性变化也能捕获
|
|
3325
3329
|
), vu(u), gu(i);
|
|
3326
3330
|
const { spans: d, actionSpan: y } = $u(u), b = N(() => {
|
|
3327
3331
|
const {
|
|
3328
|
-
commonConfig:
|
|
3332
|
+
commonConfig: w = {},
|
|
3329
3333
|
labelWidth: v,
|
|
3330
|
-
schema:
|
|
3334
|
+
schema: E = []
|
|
3331
3335
|
} = u, {
|
|
3332
3336
|
componentProps: D = {},
|
|
3333
3337
|
formFieldProps: G = {},
|
|
3334
3338
|
disabled: U,
|
|
3335
3339
|
// ✅ 新增:提取表单级 disabled
|
|
3336
3340
|
...W
|
|
3337
|
-
} =
|
|
3338
|
-
return v !== void 0 && Object.assign(J, { labelWidth: v }),
|
|
3341
|
+
} = w, J = { ...W };
|
|
3342
|
+
return v !== void 0 && Object.assign(J, { labelWidth: v }), E.map((q) => ({
|
|
3339
3343
|
// 合并策略:全局配置 (Global) < 表单项自身配置 (Item)
|
|
3340
3344
|
...J,
|
|
3341
3345
|
...q,
|
|
@@ -3358,10 +3362,10 @@ const Pu = { class: "h-full flex flex-col justify-end" }, Fo = /* @__PURE__ */ t
|
|
|
3358
3362
|
}), p = N(() => u.layout === "inline"), h = r.form || So({
|
|
3359
3363
|
// 提取默认值构建初始状态,并合并外部传入的 values
|
|
3360
3364
|
initialValues: {
|
|
3361
|
-
...b.value.reduce((
|
|
3365
|
+
...b.value.reduce((w, v) => (v.fieldName && (w[v.fieldName] = v.defaultValue), w), {}),
|
|
3362
3366
|
...u.values || {}
|
|
3363
3367
|
}
|
|
3364
|
-
}), { handleSubmit: g, resetForm:
|
|
3368
|
+
}), { handleSubmit: g, resetForm: k, setValues: S, values: $, validate: V, errors: R, meta: x } = h;
|
|
3365
3369
|
u.form = h, n({
|
|
3366
3370
|
/**
|
|
3367
3371
|
* 验证表单
|
|
@@ -3369,7 +3373,7 @@ const Pu = { class: "h-full flex flex-col justify-end" }, Fo = /* @__PURE__ */ t
|
|
|
3369
3373
|
*/
|
|
3370
3374
|
validate: async () => ({
|
|
3371
3375
|
valid: (await V()).valid,
|
|
3372
|
-
errors:
|
|
3376
|
+
errors: R.value
|
|
3373
3377
|
}),
|
|
3374
3378
|
/**
|
|
3375
3379
|
* 获取 handleSubmit 方法(用于外部触发表单提交)
|
|
@@ -3378,24 +3382,24 @@ const Pu = { class: "h-full flex flex-col justify-end" }, Fo = /* @__PURE__ */ t
|
|
|
3378
3382
|
}), $t(() => {
|
|
3379
3383
|
r.formApi && r.formApi.mount({
|
|
3380
3384
|
handleSubmit: g,
|
|
3381
|
-
resetForm:
|
|
3382
|
-
setValues:
|
|
3383
|
-
values:
|
|
3385
|
+
resetForm: k,
|
|
3386
|
+
setValues: S,
|
|
3387
|
+
values: $,
|
|
3384
3388
|
validate: V,
|
|
3385
|
-
errors:
|
|
3386
|
-
meta:
|
|
3389
|
+
errors: R,
|
|
3390
|
+
meta: x
|
|
3387
3391
|
});
|
|
3388
3392
|
});
|
|
3389
|
-
const O = g((
|
|
3390
|
-
o("submit",
|
|
3391
|
-
}), P = (
|
|
3392
|
-
u.collapsed =
|
|
3393
|
+
const O = g((w) => {
|
|
3394
|
+
o("submit", w), u.handleSubmit && u.handleSubmit(w);
|
|
3395
|
+
}), P = (w) => {
|
|
3396
|
+
u.collapsed = w, u.handleCollapsedChange?.(w), r.formApi && r.formApi.setState({ collapsed: w });
|
|
3393
3397
|
}, T = N(() => {
|
|
3394
|
-
const { compact:
|
|
3398
|
+
const { compact: w, gridProps: v } = u, E = w ? 8 : 16, D = v?.xGap ?? v?.["x-gap"] ?? E, G = v?.yGap ?? v?.["y-gap"] ?? E;
|
|
3395
3399
|
return { x: D, y: G };
|
|
3396
3400
|
});
|
|
3397
|
-
return (
|
|
3398
|
-
const
|
|
3401
|
+
return (w, v) => {
|
|
3402
|
+
const E = Te("a-col"), D = Te("a-row"), G = Te("a-form");
|
|
3399
3403
|
return F(), ee(G, {
|
|
3400
3404
|
model: {},
|
|
3401
3405
|
layout: m(l).layout || "horizontal",
|
|
@@ -3413,7 +3417,7 @@ const Pu = { class: "h-full flex flex-col justify-end" }, Fo = /* @__PURE__ */ t
|
|
|
3413
3417
|
(F(!0), Y(Oe, null, Pe(b.value, (U, W) => (F(), Y(Oe, {
|
|
3414
3418
|
key: U.fieldName || W
|
|
3415
3419
|
}, [
|
|
3416
|
-
U.fieldName && !U.hidden && (!u.collapsed || W < 24 / (m(d)[U.fieldName] ?? 24) * (u.collapsedRows ?? 1) - 1) ? (F(), ee(
|
|
3420
|
+
U.fieldName && !U.hidden && (!u.collapsed || W < 24 / (m(d)[U.fieldName] ?? 24) * (u.collapsedRows ?? 1) - 1) ? (F(), ee(E, {
|
|
3417
3421
|
key: 0,
|
|
3418
3422
|
span: m(d)[U.fieldName] ?? (p.value ? void 0 : 24)
|
|
3419
3423
|
}, {
|
|
@@ -3423,14 +3427,14 @@ const Pu = { class: "h-full flex flex-col justify-end" }, Fo = /* @__PURE__ */ t
|
|
|
3423
3427
|
_: 2
|
|
3424
3428
|
}, 1032, ["span"])) : se("", !0)
|
|
3425
3429
|
], 64))), 128)),
|
|
3426
|
-
u.showDefaultActions || m(i).actions ? (F(), ee(
|
|
3430
|
+
u.showDefaultActions || m(i).actions ? (F(), ee(E, {
|
|
3427
3431
|
key: 0,
|
|
3428
3432
|
span: m(y),
|
|
3429
3433
|
style: je(p.value ? { marginLeft: "16px" } : { flex: 1, textAlign: "right" })
|
|
3430
3434
|
}, {
|
|
3431
3435
|
default: L(() => [
|
|
3432
3436
|
B("div", Pu, [
|
|
3433
|
-
m(i).actions ? ie(
|
|
3437
|
+
m(i).actions ? ie(w.$slots, "actions", {
|
|
3434
3438
|
key: 0,
|
|
3435
3439
|
collapsed: u.collapsed,
|
|
3436
3440
|
formApi: r.formApi
|
|
@@ -3444,28 +3448,28 @@ const Pu = { class: "h-full flex flex-col justify-end" }, Fo = /* @__PURE__ */ t
|
|
|
3444
3448
|
m(i)["submit-before"] ? {
|
|
3445
3449
|
name: "submit-before",
|
|
3446
3450
|
fn: L(() => [
|
|
3447
|
-
ie(
|
|
3451
|
+
ie(w.$slots, "submit-before")
|
|
3448
3452
|
]),
|
|
3449
3453
|
key: "0"
|
|
3450
3454
|
} : void 0,
|
|
3451
3455
|
m(i)["reset-before"] ? {
|
|
3452
3456
|
name: "reset-before",
|
|
3453
3457
|
fn: L(() => [
|
|
3454
|
-
ie(
|
|
3458
|
+
ie(w.$slots, "reset-before")
|
|
3455
3459
|
]),
|
|
3456
3460
|
key: "1"
|
|
3457
3461
|
} : void 0,
|
|
3458
3462
|
m(i)["expand-before"] ? {
|
|
3459
3463
|
name: "expand-before",
|
|
3460
3464
|
fn: L(() => [
|
|
3461
|
-
ie(
|
|
3465
|
+
ie(w.$slots, "expand-before")
|
|
3462
3466
|
]),
|
|
3463
3467
|
key: "2"
|
|
3464
3468
|
} : void 0,
|
|
3465
3469
|
m(i)["expand-after"] ? {
|
|
3466
3470
|
name: "expand-after",
|
|
3467
3471
|
fn: L(() => [
|
|
3468
|
-
ie(
|
|
3472
|
+
ie(w.$slots, "expand-after")
|
|
3469
3473
|
]),
|
|
3470
3474
|
key: "3"
|
|
3471
3475
|
} : void 0
|
|
@@ -3538,8 +3542,8 @@ const Pu = { class: "h-full flex flex-col justify-end" }, Fo = /* @__PURE__ */ t
|
|
|
3538
3542
|
if (p.length === 0) return;
|
|
3539
3543
|
const h = [];
|
|
3540
3544
|
for (const g of p) {
|
|
3541
|
-
const
|
|
3542
|
-
Ki(
|
|
3545
|
+
const k = Gr(b, g), S = Gr(u, g);
|
|
3546
|
+
Ki(k, S) || (h.push(g), Qi(u, g, k));
|
|
3543
3547
|
}
|
|
3544
3548
|
if (h.length > 0) {
|
|
3545
3549
|
const g = await n.formApi.getValues();
|
|
@@ -3572,7 +3576,7 @@ const Pu = { class: "h-full flex flex-col justify-end" }, Fo = /* @__PURE__ */ t
|
|
|
3572
3576
|
Pe(m(i), (h) => ({
|
|
3573
3577
|
name: h,
|
|
3574
3578
|
fn: L((g) => [
|
|
3575
|
-
ie(b.$slots, h,
|
|
3579
|
+
ie(b.$slots, h, Ie(tt(g)))
|
|
3576
3580
|
])
|
|
3577
3581
|
}))
|
|
3578
3582
|
]), 1040, ["form", "form-api"])
|
|
@@ -3704,10 +3708,10 @@ const Tu = /* @__PURE__ */ te({
|
|
|
3704
3708
|
]),
|
|
3705
3709
|
_: 2
|
|
3706
3710
|
}, [
|
|
3707
|
-
Pe(m(i), (g,
|
|
3708
|
-
name:
|
|
3709
|
-
fn: L((
|
|
3710
|
-
ie(p.$slots,
|
|
3711
|
+
Pe(m(i), (g, k) => ({
|
|
3712
|
+
name: k,
|
|
3713
|
+
fn: L((S) => [
|
|
3714
|
+
ie(p.$slots, k, Ie(tt(S)))
|
|
3711
3715
|
])
|
|
3712
3716
|
}))
|
|
3713
3717
|
]), 1536)
|
|
@@ -3862,7 +3866,7 @@ const Eu = /* @__PURE__ */ te({
|
|
|
3862
3866
|
Pe(r.$slots, (l, u) => ({
|
|
3863
3867
|
name: u,
|
|
3864
3868
|
fn: L((d) => [
|
|
3865
|
-
ie(r.$slots, u,
|
|
3869
|
+
ie(r.$slots, u, Ie(tt(d || {})))
|
|
3866
3870
|
])
|
|
3867
3871
|
}))
|
|
3868
3872
|
]), 1040)
|
|
@@ -4306,14 +4310,14 @@ class Gu {
|
|
|
4306
4310
|
}
|
|
4307
4311
|
function Ju(e, n) {
|
|
4308
4312
|
let t = null, r = null, o = null, i = null, l = null, u = !1, d = !1;
|
|
4309
|
-
const y = (
|
|
4310
|
-
if (!
|
|
4311
|
-
let
|
|
4312
|
-
for (;
|
|
4313
|
-
const V = window.getComputedStyle(
|
|
4313
|
+
const y = (S) => {
|
|
4314
|
+
if (!S) return window;
|
|
4315
|
+
let $ = S.parentElement;
|
|
4316
|
+
for (; $; ) {
|
|
4317
|
+
const V = window.getComputedStyle($);
|
|
4314
4318
|
if (/(auto|scroll)/.test(V.overflow + V.overflowY + V.overflowX))
|
|
4315
|
-
return
|
|
4316
|
-
|
|
4319
|
+
return $;
|
|
4320
|
+
$ = $.parentElement;
|
|
4317
4321
|
}
|
|
4318
4322
|
return window;
|
|
4319
4323
|
}, b = () => {
|
|
@@ -4328,36 +4332,36 @@ function Ju(e, n) {
|
|
|
4328
4332
|
}));
|
|
4329
4333
|
}, g = () => {
|
|
4330
4334
|
!e.value || i || (i = document.createElement("div"), i.className = "vxe-table--sticky-scrollbar", i.style.position = "fixed", i.style.bottom = "0", i.style.overflowX = "auto", i.style.overflowY = "hidden", i.style.zIndex = "101", i.style.display = "none", l = document.createElement("div"), i.appendChild(l), i.addEventListener("scroll", h), document.body.appendChild(i), o = e.value.$el.querySelector(".vxe-table--body-wrapper"), o && o.addEventListener("scroll", p));
|
|
4331
|
-
},
|
|
4335
|
+
}, k = () => {
|
|
4332
4336
|
if (!e.value || !t) return;
|
|
4333
4337
|
if (!n.sticky) {
|
|
4334
4338
|
b();
|
|
4335
4339
|
return;
|
|
4336
4340
|
}
|
|
4337
|
-
const
|
|
4338
|
-
let
|
|
4339
|
-
if (
|
|
4340
|
-
const P = Math.max(0,
|
|
4341
|
-
|
|
4341
|
+
const S = e.value.$el, $ = S.getBoundingClientRect(), V = t.getBoundingClientRect(), R = y(S);
|
|
4342
|
+
let x = { top: 0, bottom: window.innerHeight };
|
|
4343
|
+
if (R !== window && R instanceof HTMLElement && (x = R.getBoundingClientRect()), x.bottom > 0 && x.top < window.innerHeight && $.top < x.top && $.bottom > V.height) {
|
|
4344
|
+
const P = Math.max(0, x.top);
|
|
4345
|
+
$.bottom - V.height > P ? (!t.classList.contains("is-sticky") || t.style.top !== `${P}px` || t.style.left !== `${$.left}px`) && (t.style.position = "fixed", t.style.top = `${P}px`, t.style.left = `${$.left}px`, t.style.width = `${$.width}px`, t.style.zIndex = "100", t.classList.add("is-sticky"), r || (r = document.createElement("div"), t.parentNode?.insertBefore(r, t)), r.style.height = `${V.height}px`) : b();
|
|
4342
4346
|
} else
|
|
4343
4347
|
t.classList.contains("is-sticky") && (t.style.position = "", t.style.top = "", t.style.left = "", t.style.width = "", t.classList.remove("is-sticky"), r && r.parentNode && (r.parentNode.removeChild(r), r = null));
|
|
4344
4348
|
if ((!i || !o) && g(), i && o && l) {
|
|
4345
4349
|
const P = o.scrollWidth, T = o.clientWidth;
|
|
4346
4350
|
if (P > T) {
|
|
4347
|
-
const
|
|
4348
|
-
|
|
4351
|
+
const w = window.innerHeight;
|
|
4352
|
+
$.bottom > w && $.top < w ? (i.style.display = "block", i.style.width = `${$.width}px`, i.style.left = `${$.left}px`, l.style.width = `${P}px`, Math.abs(i.scrollLeft - o.scrollLeft) > 1 && (i.scrollLeft = o.scrollLeft)) : i.style.display = "none";
|
|
4349
4353
|
} else
|
|
4350
4354
|
i.style.display = "none";
|
|
4351
4355
|
}
|
|
4352
4356
|
};
|
|
4353
4357
|
be(() => n.sticky, () => {
|
|
4354
|
-
|
|
4358
|
+
k();
|
|
4355
4359
|
}), $t(() => {
|
|
4356
4360
|
setTimeout(() => {
|
|
4357
|
-
e.value && (t = e.value.$el.querySelector(".vxe-table--header-wrapper"), t && (window.addEventListener("scroll",
|
|
4361
|
+
e.value && (t = e.value.$el.querySelector(".vxe-table--header-wrapper"), t && (window.addEventListener("scroll", k, !0), window.addEventListener("resize", k)), g());
|
|
4358
4362
|
}, 100);
|
|
4359
4363
|
}), po(() => {
|
|
4360
|
-
window.removeEventListener("scroll",
|
|
4364
|
+
window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k), r && r.parentNode && r.parentNode.removeChild(r), i && i.parentNode && i.parentNode.removeChild(i), o && o.removeEventListener("scroll", p);
|
|
4361
4365
|
});
|
|
4362
4366
|
}
|
|
4363
4367
|
const Yu = { class: "my-filter-complex" }, Ku = {
|
|
@@ -4389,18 +4393,18 @@ const Yu = { class: "my-filter-complex" }, Ku = {
|
|
|
4389
4393
|
}), u = () => {
|
|
4390
4394
|
const { renderParams: p } = n, h = t.value;
|
|
4391
4395
|
if (p && h) {
|
|
4392
|
-
const { $table: g } = p,
|
|
4393
|
-
g.updateFilterOptionStatus(h,
|
|
4396
|
+
const { $table: g } = p, k = !!h.data;
|
|
4397
|
+
g.updateFilterOptionStatus(h, k);
|
|
4394
4398
|
}
|
|
4395
4399
|
}, d = () => {
|
|
4396
4400
|
const { renderParams: p } = n, h = {};
|
|
4397
4401
|
if (p) {
|
|
4398
4402
|
const { $table: g } = p;
|
|
4399
|
-
g.getColumns().forEach((
|
|
4400
|
-
const { field:
|
|
4401
|
-
if (
|
|
4402
|
-
const
|
|
4403
|
-
|
|
4403
|
+
g.getColumns().forEach((S) => {
|
|
4404
|
+
const { field: $, filters: V } = S;
|
|
4405
|
+
if ($ && V && V.length) {
|
|
4406
|
+
const R = V[0];
|
|
4407
|
+
R.data && (h[$] = R.data);
|
|
4404
4408
|
}
|
|
4405
4409
|
});
|
|
4406
4410
|
}
|
|
@@ -4408,18 +4412,18 @@ const Yu = { class: "my-filter-complex" }, Ku = {
|
|
|
4408
4412
|
}, y = () => {
|
|
4409
4413
|
const { renderParams: p } = n;
|
|
4410
4414
|
if (p) {
|
|
4411
|
-
const { $table: h, $grid: g } = p,
|
|
4412
|
-
|
|
4413
|
-
const
|
|
4414
|
-
g.commitProxy("query",
|
|
4415
|
+
const { $table: h, $grid: g } = p, k = t.value;
|
|
4416
|
+
k && h.updateFilterOptionStatus(k, !!k.data);
|
|
4417
|
+
const S = d();
|
|
4418
|
+
g.commitProxy("query", S), g.closeFilter();
|
|
4415
4419
|
}
|
|
4416
4420
|
}, b = () => {
|
|
4417
4421
|
const { renderParams: p } = n, h = t.value;
|
|
4418
4422
|
if (p && h) {
|
|
4419
|
-
const { $table: g, $grid:
|
|
4423
|
+
const { $table: g, $grid: k } = p;
|
|
4420
4424
|
h.data = "", g.updateFilterOptionStatus(h, !1);
|
|
4421
|
-
const
|
|
4422
|
-
|
|
4425
|
+
const S = d();
|
|
4426
|
+
k.commitProxy("query", S), k.closeFilter();
|
|
4423
4427
|
}
|
|
4424
4428
|
};
|
|
4425
4429
|
return (p, h) => (F(), Y("div", Yu, [
|
|
@@ -4493,7 +4497,7 @@ const Do = /* @__PURE__ */ te({
|
|
|
4493
4497
|
Pe(m(o), (d, y) => ({
|
|
4494
4498
|
name: y,
|
|
4495
4499
|
fn: L((b) => [
|
|
4496
|
-
ie(l.$slots, y,
|
|
4500
|
+
ie(l.$slots, y, Ie(tt(b || {})))
|
|
4497
4501
|
])
|
|
4498
4502
|
}))
|
|
4499
4503
|
]), 1040, ["size"]));
|
|
@@ -4503,38 +4507,38 @@ function Kp(e) {
|
|
|
4503
4507
|
const n = Z(), t = new Gu(n), { gridEvents: r, gridOptions: o } = e, i = o?.showSelectionCount, l = o?.gridTip, u = Z(0), d = () => {
|
|
4504
4508
|
const h = n.value?.getGrid?.() || n.value;
|
|
4505
4509
|
if (!h) return;
|
|
4506
|
-
const g = h.getCheckboxRecords?.() || [],
|
|
4507
|
-
u.value = g.length +
|
|
4510
|
+
const g = h.getCheckboxRecords?.() || [], k = h.getCheckboxReserveRecords?.() || [];
|
|
4511
|
+
u.value = g.length + k.length;
|
|
4508
4512
|
}, y = () => {
|
|
4509
4513
|
const h = n.value?.getGrid?.() || n.value;
|
|
4510
|
-
h && (h.clearCheckboxRow(), (h.getCheckboxReserveRecords?.() || []).forEach((
|
|
4511
|
-
h.setCheckboxRow(
|
|
4514
|
+
h && (h.clearCheckboxRow(), (h.getCheckboxReserveRecords?.() || []).forEach((k) => {
|
|
4515
|
+
h.setCheckboxRow(k, !1);
|
|
4512
4516
|
}), u.value = 0);
|
|
4513
|
-
}, b = Object.entries(r || {}).reduce((h, [g,
|
|
4514
|
-
const
|
|
4515
|
-
return h[
|
|
4517
|
+
}, b = Object.entries(r || {}).reduce((h, [g, k]) => {
|
|
4518
|
+
const S = `on${g.charAt(0).toUpperCase() + g.slice(1)}`;
|
|
4519
|
+
return h[S] = k, h;
|
|
4516
4520
|
}, {});
|
|
4517
4521
|
return [te(
|
|
4518
|
-
(h, { attrs: g, slots:
|
|
4519
|
-
const
|
|
4522
|
+
(h, { attrs: g, slots: k }) => () => {
|
|
4523
|
+
const S = u.value, $ = (i || l) && o?.toolbarConfig ? {
|
|
4520
4524
|
...o.toolbarConfig,
|
|
4521
4525
|
slots: {
|
|
4522
4526
|
...o.toolbarConfig.slots,
|
|
4523
4527
|
toolSuffix: (V) => {
|
|
4524
|
-
const
|
|
4525
|
-
|
|
4528
|
+
const R = [];
|
|
4529
|
+
S > 0 && R.push(
|
|
4526
4530
|
We("span", {
|
|
4527
4531
|
class: "inline-flex items-center gap-1 self-center mr-2 px-2 py-0.5 rounded text-xs text-[rgb(var(--primary-6))] whitespace-nowrap select-none",
|
|
4528
4532
|
style: "background-color: rgba(var(--primary-6), 0.08)"
|
|
4529
4533
|
}, [
|
|
4530
|
-
We("span", { class: "leading-5" }, `已选 ${
|
|
4534
|
+
We("span", { class: "leading-5" }, `已选 ${S} 项`),
|
|
4531
4535
|
We("span", {
|
|
4532
4536
|
class: "inline-flex items-center justify-center w-[18px] h-[18px] rounded-full cursor-pointer text-[rgb(var(--primary-6))] transition-all duration-150 hover:bg-[rgba(var(--primary-6),0.15)] active:bg-[rgba(var(--primary-6),0.25)]",
|
|
4533
4537
|
title: "清空",
|
|
4534
4538
|
onClick: y
|
|
4535
4539
|
}, "×")
|
|
4536
4540
|
])
|
|
4537
|
-
), l &&
|
|
4541
|
+
), l && R.push(
|
|
4538
4542
|
We(ir, { content: l, position: "left" }, {
|
|
4539
4543
|
default: () => We(mn, {
|
|
4540
4544
|
circle: !0,
|
|
@@ -4543,8 +4547,8 @@ function Kp(e) {
|
|
|
4543
4547
|
}, { default: () => "!" })
|
|
4544
4548
|
})
|
|
4545
4549
|
);
|
|
4546
|
-
const
|
|
4547
|
-
return
|
|
4550
|
+
const x = o.toolbarConfig.slots?.toolSuffix;
|
|
4551
|
+
return x && R.push(...x(V) || []), R;
|
|
4548
4552
|
}
|
|
4549
4553
|
}
|
|
4550
4554
|
} : o?.toolbarConfig;
|
|
@@ -4553,45 +4557,45 @@ function Kp(e) {
|
|
|
4553
4557
|
...h,
|
|
4554
4558
|
...g,
|
|
4555
4559
|
...o,
|
|
4556
|
-
|
|
4560
|
+
...$ ? { toolbarConfig: $ } : {},
|
|
4557
4561
|
...b,
|
|
4558
4562
|
...i ? { onCheckboxChange: d, onCheckboxAll: d } : {}
|
|
4559
|
-
},
|
|
4563
|
+
}, k);
|
|
4560
4564
|
}
|
|
4561
4565
|
), t];
|
|
4562
4566
|
}
|
|
4563
4567
|
function ed(e) {
|
|
4564
4568
|
const { props: n, emit: t, attrs: r } = e, o = N(() => n.contextMenuActions || n.actions || []), i = N(() => {
|
|
4565
|
-
const
|
|
4569
|
+
const S = r["field-names"], $ = r.fieldNames;
|
|
4566
4570
|
return {
|
|
4567
4571
|
key: "key",
|
|
4568
4572
|
title: "title",
|
|
4569
4573
|
children: "children",
|
|
4570
|
-
...
|
|
4574
|
+
...S || $ || {}
|
|
4571
4575
|
};
|
|
4572
|
-
}), l = (
|
|
4573
|
-
const
|
|
4574
|
-
return
|
|
4575
|
-
}, u = () => r.data || [], d = (
|
|
4576
|
-
const
|
|
4577
|
-
return
|
|
4578
|
-
}, y = (
|
|
4579
|
-
(
|
|
4580
|
-
) : [], p = (
|
|
4576
|
+
}), l = (S) => {
|
|
4577
|
+
const $ = i.value.key || "key";
|
|
4578
|
+
return S[$] ?? S.key;
|
|
4579
|
+
}, u = () => r.data || [], d = (S) => {
|
|
4580
|
+
const $ = l(S);
|
|
4581
|
+
return $ == null ? !1 : u().some((V) => l(V) === $ || V === S);
|
|
4582
|
+
}, y = (S, $, V) => typeof S == "boolean" ? S : typeof S == "function" ? S($) : V, b = (S) => S ? !n.enableRootContextMenu && d(S) ? [] : o.value.filter(
|
|
4583
|
+
($) => y($.visible, S, !0)
|
|
4584
|
+
) : [], p = (S, $) => y(S.disabled, $, !1);
|
|
4581
4585
|
return {
|
|
4582
|
-
canShowContextMenu: (
|
|
4586
|
+
canShowContextMenu: (S) => b(S).length > 0,
|
|
4583
4587
|
getNodeActions: b,
|
|
4584
4588
|
isActionDisabled: p,
|
|
4585
|
-
getNodeTitle: (
|
|
4586
|
-
const
|
|
4587
|
-
return String(
|
|
4589
|
+
getNodeTitle: (S) => {
|
|
4590
|
+
const $ = i.value.title || "title", V = l(S);
|
|
4591
|
+
return String(S?.[$] ?? S?.title ?? V ?? "");
|
|
4588
4592
|
},
|
|
4589
|
-
handleActionClick: async (
|
|
4590
|
-
const V = b(
|
|
4591
|
-
V && (p(V,
|
|
4593
|
+
handleActionClick: async (S, $) => {
|
|
4594
|
+
const V = b($).find((R) => R.key === String(S));
|
|
4595
|
+
V && (p(V, $) || (V.handler && await V.handler($), t("action", {
|
|
4592
4596
|
key: V.key,
|
|
4593
4597
|
action: V,
|
|
4594
|
-
node:
|
|
4598
|
+
node: $
|
|
4595
4599
|
})));
|
|
4596
4600
|
}
|
|
4597
4601
|
};
|
|
@@ -4617,67 +4621,67 @@ const td = { class: "sunny-resource-tree" }, nd = { class: "sunny-resource-tree_
|
|
|
4617
4621
|
props: r,
|
|
4618
4622
|
emit: o,
|
|
4619
4623
|
attrs: i
|
|
4620
|
-
}), g = (
|
|
4621
|
-
h(
|
|
4622
|
-
},
|
|
4624
|
+
}), g = ($, V) => {
|
|
4625
|
+
h($, V);
|
|
4626
|
+
}, k = N(() => Object.keys(l).filter(($) => $ !== "title")), S = ($, ...V) => u.value?.[$]?.(...V);
|
|
4623
4627
|
return n({
|
|
4624
4628
|
getTree: () => u.value,
|
|
4625
|
-
toggleCheck: (
|
|
4626
|
-
scrollIntoView: (
|
|
4627
|
-
getSelectedNodes: () =>
|
|
4628
|
-
getCheckedNodes: (
|
|
4629
|
-
getHalfCheckedNodes: () =>
|
|
4630
|
-
getExpandedNodes: () =>
|
|
4631
|
-
checkAll: (
|
|
4632
|
-
checkNode: (
|
|
4633
|
-
selectAll: (
|
|
4634
|
-
selectNode: (
|
|
4635
|
-
expandAll: (
|
|
4636
|
-
expandNode: (
|
|
4637
|
-
}), (
|
|
4629
|
+
toggleCheck: ($, V) => S("toggleCheck", $, V),
|
|
4630
|
+
scrollIntoView: ($) => S("scrollIntoView", $),
|
|
4631
|
+
getSelectedNodes: () => S("getSelectedNodes"),
|
|
4632
|
+
getCheckedNodes: ($) => S("getCheckedNodes", $),
|
|
4633
|
+
getHalfCheckedNodes: () => S("getHalfCheckedNodes"),
|
|
4634
|
+
getExpandedNodes: () => S("getExpandedNodes"),
|
|
4635
|
+
checkAll: ($) => S("checkAll", $),
|
|
4636
|
+
checkNode: ($, V, R) => S("checkNode", $, V, R),
|
|
4637
|
+
selectAll: ($) => S("selectAll", $),
|
|
4638
|
+
selectNode: ($, V) => S("selectNode", $, V),
|
|
4639
|
+
expandAll: ($) => S("expandAll", $),
|
|
4640
|
+
expandNode: ($, V) => S("expandNode", $, V)
|
|
4641
|
+
}), ($, V) => (F(), Y("div", td, [
|
|
4638
4642
|
j(m(Ui), ae({
|
|
4639
4643
|
ref_key: "treeRef",
|
|
4640
4644
|
ref: u
|
|
4641
|
-
},
|
|
4642
|
-
title: L((
|
|
4643
|
-
m(d)(
|
|
4645
|
+
}, $.$attrs), qe({
|
|
4646
|
+
title: L((R) => [
|
|
4647
|
+
m(d)(R) ? (F(), ee(m(Wi), {
|
|
4644
4648
|
key: 0,
|
|
4645
4649
|
trigger: "contextMenu",
|
|
4646
4650
|
"popup-max-height": !1,
|
|
4647
|
-
onSelect: (
|
|
4651
|
+
onSelect: (x) => g(x, R)
|
|
4648
4652
|
}, {
|
|
4649
4653
|
content: L(() => [
|
|
4650
|
-
(F(!0), Y(Oe, null, Pe(m(y)(
|
|
4651
|
-
key: `${String(
|
|
4652
|
-
value:
|
|
4653
|
-
disabled: m(b)(
|
|
4654
|
+
(F(!0), Y(Oe, null, Pe(m(y)(R), (x) => (F(), ee(m(Hi), {
|
|
4655
|
+
key: `${String(R?.key)}-${x.key}`,
|
|
4656
|
+
value: x.key,
|
|
4657
|
+
disabled: m(b)(x, R)
|
|
4654
4658
|
}, {
|
|
4655
4659
|
default: L(() => [
|
|
4656
4660
|
B("span", {
|
|
4657
|
-
class: fe({ "sunny-resource-tree__danger":
|
|
4658
|
-
}, Q(
|
|
4661
|
+
class: fe({ "sunny-resource-tree__danger": x.danger })
|
|
4662
|
+
}, Q(x.label), 3)
|
|
4659
4663
|
]),
|
|
4660
4664
|
_: 2
|
|
4661
4665
|
}, 1032, ["value", "disabled"]))), 128))
|
|
4662
4666
|
]),
|
|
4663
4667
|
default: L(() => [
|
|
4664
4668
|
B("span", nd, [
|
|
4665
|
-
ie(
|
|
4666
|
-
we(Q(m(p)(
|
|
4669
|
+
ie($.$slots, "title", Ie(tt(R)), () => [
|
|
4670
|
+
we(Q(m(p)(R)), 1)
|
|
4667
4671
|
], !0)
|
|
4668
4672
|
])
|
|
4669
4673
|
]),
|
|
4670
4674
|
_: 2
|
|
4671
|
-
}, 1032, ["onSelect"])) : ie(
|
|
4672
|
-
we(Q(m(p)(
|
|
4675
|
+
}, 1032, ["onSelect"])) : ie($.$slots, "title", Ie(ae({ key: 1 }, R)), () => [
|
|
4676
|
+
we(Q(m(p)(R)), 1)
|
|
4673
4677
|
], !0)
|
|
4674
4678
|
]),
|
|
4675
4679
|
_: 2
|
|
4676
4680
|
}, [
|
|
4677
|
-
Pe(
|
|
4678
|
-
name:
|
|
4679
|
-
fn: L((
|
|
4680
|
-
ie(
|
|
4681
|
+
Pe(k.value, (R) => ({
|
|
4682
|
+
name: R,
|
|
4683
|
+
fn: L((x) => [
|
|
4684
|
+
ie($.$slots, R, Ie(tt(x || {})), void 0, !0)
|
|
4681
4685
|
])
|
|
4682
4686
|
}))
|
|
4683
4687
|
]), 1040)
|
|
@@ -4708,9 +4712,9 @@ function od(e, n) {
|
|
|
4708
4712
|
const v = Zr(e.formSchema);
|
|
4709
4713
|
r.value = { ...v, ...e.defaultModel };
|
|
4710
4714
|
}, h = () => {
|
|
4711
|
-
const v = Zr(e.formSchema),
|
|
4715
|
+
const v = Zr(e.formSchema), E = b(), D = {};
|
|
4712
4716
|
e.defaultModel && Object.entries(e.defaultModel).forEach(([G, U]) => {
|
|
4713
|
-
|
|
4717
|
+
E.has(G) && (D[G] = U);
|
|
4714
4718
|
}), r.value = {
|
|
4715
4719
|
...r.value,
|
|
4716
4720
|
...v,
|
|
@@ -4728,29 +4732,29 @@ function od(e, n) {
|
|
|
4728
4732
|
if (e.searchApi) {
|
|
4729
4733
|
v && (r.value = { ...v }), t.value = !0;
|
|
4730
4734
|
try {
|
|
4731
|
-
const
|
|
4735
|
+
const E = {
|
|
4732
4736
|
pageNo: i.value.current,
|
|
4733
4737
|
pageSize: i.value.pageSize,
|
|
4734
4738
|
...r.value
|
|
4735
4739
|
};
|
|
4736
4740
|
let D;
|
|
4737
|
-
if (typeof e.searchApi == "function" && (D = await e.searchApi(
|
|
4741
|
+
if (typeof e.searchApi == "function" && (D = await e.searchApi(E)), D) {
|
|
4738
4742
|
const G = D.list || D.records || [], U = D.total || D.totalCount || 0;
|
|
4739
4743
|
l.value = G, i.value.total = U;
|
|
4740
4744
|
}
|
|
4741
|
-
} catch (
|
|
4742
|
-
console.error("Search failed:",
|
|
4745
|
+
} catch (E) {
|
|
4746
|
+
console.error("Search failed:", E), ue.error("查询失败");
|
|
4743
4747
|
} finally {
|
|
4744
4748
|
t.value = !1;
|
|
4745
4749
|
}
|
|
4746
4750
|
}
|
|
4747
|
-
},
|
|
4751
|
+
}, k = (v) => {
|
|
4748
4752
|
i.value.current = v, g();
|
|
4749
|
-
},
|
|
4753
|
+
}, S = (v) => {
|
|
4750
4754
|
i.value.pageSize = v, i.value.current = 1, g();
|
|
4751
|
-
},
|
|
4755
|
+
}, $ = (v, E) => {
|
|
4752
4756
|
const D = y(v), G = o.value.findIndex((U) => y(U) === D);
|
|
4753
|
-
|
|
4757
|
+
E ? G === -1 && (e.multiple ? o.value.push(v) : o.value = [v]) : G > -1 && o.value.splice(G, 1);
|
|
4754
4758
|
};
|
|
4755
4759
|
return {
|
|
4756
4760
|
loading: t,
|
|
@@ -4763,22 +4767,22 @@ function od(e, n) {
|
|
|
4763
4767
|
initDefaultValues: p,
|
|
4764
4768
|
resetFormValues: h,
|
|
4765
4769
|
handleSearch: g,
|
|
4766
|
-
handlePageChange:
|
|
4767
|
-
handlePageSizeChange:
|
|
4770
|
+
handlePageChange: k,
|
|
4771
|
+
handlePageSizeChange: S,
|
|
4768
4772
|
handleCheckboxChange: (v) => {
|
|
4769
|
-
const { row:
|
|
4770
|
-
|
|
4773
|
+
const { row: E, checked: D } = v;
|
|
4774
|
+
$(E, D);
|
|
4771
4775
|
},
|
|
4772
4776
|
handleCheckboxAll: (v) => {
|
|
4773
|
-
const { checked:
|
|
4774
|
-
|
|
4777
|
+
const { checked: E, records: D } = v;
|
|
4778
|
+
E ? D.forEach((G) => $(G, !0)) : l.value.forEach((G) => $(G, !1));
|
|
4775
4779
|
},
|
|
4776
4780
|
handleRadioChange: (v) => {
|
|
4777
|
-
const { row:
|
|
4778
|
-
o.value = [
|
|
4781
|
+
const { row: E } = v;
|
|
4782
|
+
o.value = [E];
|
|
4779
4783
|
},
|
|
4780
4784
|
removeRow: (v) => {
|
|
4781
|
-
|
|
4785
|
+
$(v, !1);
|
|
4782
4786
|
},
|
|
4783
4787
|
handleOk: () => {
|
|
4784
4788
|
n("update:modelValue", o.value), n("confirm", o.value), n("update:visible", !1);
|
|
@@ -4786,7 +4790,7 @@ function od(e, n) {
|
|
|
4786
4790
|
handleCancel: () => {
|
|
4787
4791
|
o.value = [], n("update:modelValue", []), n("cancel"), n("update:visible", !1);
|
|
4788
4792
|
},
|
|
4789
|
-
toggleRowSelection:
|
|
4793
|
+
toggleRowSelection: $,
|
|
4790
4794
|
reset: () => {
|
|
4791
4795
|
l.value = [], o.value = [], i.value.current = 1, i.value.total = 0, n("update:modelValue", []);
|
|
4792
4796
|
}
|
|
@@ -4830,18 +4834,18 @@ const ad = { class: "flex flex-col h-full" }, sd = { class: "mb-4 border-b borde
|
|
|
4830
4834
|
selectedRows: p,
|
|
4831
4835
|
pagination: h,
|
|
4832
4836
|
tableData: g,
|
|
4833
|
-
actualFieldNames:
|
|
4834
|
-
actualRowKey:
|
|
4835
|
-
initDefaultValues:
|
|
4837
|
+
actualFieldNames: k,
|
|
4838
|
+
actualRowKey: S,
|
|
4839
|
+
initDefaultValues: $,
|
|
4836
4840
|
resetFormValues: V,
|
|
4837
|
-
handleSearch:
|
|
4838
|
-
handlePageChange:
|
|
4841
|
+
handleSearch: R,
|
|
4842
|
+
handlePageChange: x,
|
|
4839
4843
|
handlePageSizeChange: O,
|
|
4840
4844
|
handleCheckboxChange: P,
|
|
4841
4845
|
handleCheckboxAll: T,
|
|
4842
|
-
handleRadioChange:
|
|
4846
|
+
handleRadioChange: w,
|
|
4843
4847
|
removeRow: v,
|
|
4844
|
-
handleOk:
|
|
4848
|
+
handleOk: E,
|
|
4845
4849
|
handleCancel: D,
|
|
4846
4850
|
toggleRowSelection: G,
|
|
4847
4851
|
reset: U
|
|
@@ -4853,15 +4857,15 @@ const ad = { class: "flex flex-col h-full" }, sd = { class: "mb-4 border-b borde
|
|
|
4853
4857
|
h.value.current = 1, V(), await et(), await J();
|
|
4854
4858
|
}, J = async () => {
|
|
4855
4859
|
if (!d.value)
|
|
4856
|
-
return
|
|
4860
|
+
return R(), !0;
|
|
4857
4861
|
try {
|
|
4858
4862
|
const { valid: ce } = await d.value.validate();
|
|
4859
|
-
return ce ? (
|
|
4863
|
+
return ce ? (R(), !0) : !1;
|
|
4860
4864
|
} catch (ce) {
|
|
4861
4865
|
return console.error("Form validation failed:", ce), !1;
|
|
4862
4866
|
}
|
|
4863
4867
|
}, q = async (ce) => {
|
|
4864
|
-
h.value.current = 1, o.clearOnSearch && (p.value = []),
|
|
4868
|
+
h.value.current = 1, o.clearOnSearch && (p.value = []), R(ce);
|
|
4865
4869
|
}, pe = N(() => ({
|
|
4866
4870
|
border: !0,
|
|
4867
4871
|
stripe: !0,
|
|
@@ -4871,7 +4875,7 @@ const ad = { class: "flex flex-col h-full" }, sd = { class: "mb-4 border-b borde
|
|
|
4871
4875
|
autoResize: !0,
|
|
4872
4876
|
// 自动监听父容器变化
|
|
4873
4877
|
columnConfig: { resizable: !0 },
|
|
4874
|
-
rowConfig: { isCurrent: !0, isHover: !0, keyField:
|
|
4878
|
+
rowConfig: { isCurrent: !0, isHover: !0, keyField: S.value },
|
|
4875
4879
|
checkboxConfig: {
|
|
4876
4880
|
trigger: "row",
|
|
4877
4881
|
highlight: !0,
|
|
@@ -4892,7 +4896,7 @@ const ad = { class: "flex flex-col h-full" }, sd = { class: "mb-4 border-b borde
|
|
|
4892
4896
|
if (ce && g.value.length > 0) {
|
|
4893
4897
|
ce.clearCheckboxRow();
|
|
4894
4898
|
const me = g.value.filter(
|
|
4895
|
-
(ne) => p.value.some((Ne) => Ne[
|
|
4899
|
+
(ne) => p.value.some((Ne) => Ne[S.value] === ne[S.value])
|
|
4896
4900
|
);
|
|
4897
4901
|
me.length > 0 && ce.setCheckboxRow(me, !0);
|
|
4898
4902
|
}
|
|
@@ -4901,10 +4905,10 @@ const ad = { class: "flex flex-col h-full" }, sd = { class: "mb-4 border-b borde
|
|
|
4901
4905
|
);
|
|
4902
4906
|
const Ae = ({ row: ce }) => {
|
|
4903
4907
|
if (!o.multiple)
|
|
4904
|
-
p.value = [ce],
|
|
4908
|
+
p.value = [ce], E();
|
|
4905
4909
|
else {
|
|
4906
4910
|
const me = p.value.some(
|
|
4907
|
-
(ne) => ne[
|
|
4911
|
+
(ne) => ne[S.value] === ce[S.value]
|
|
4908
4912
|
);
|
|
4909
4913
|
G(ce, !me);
|
|
4910
4914
|
}
|
|
@@ -4912,7 +4916,7 @@ const ad = { class: "flex flex-col h-full" }, sd = { class: "mb-4 border-b borde
|
|
|
4912
4916
|
return be(
|
|
4913
4917
|
() => o.visible,
|
|
4914
4918
|
(ce) => {
|
|
4915
|
-
ce && (
|
|
4919
|
+
ce && ($(), o.resetOnOpen && (g.value = [], h.value.total = 0, et(() => {
|
|
4916
4920
|
J();
|
|
4917
4921
|
})));
|
|
4918
4922
|
},
|
|
@@ -4928,7 +4932,7 @@ const ad = { class: "flex flex-col h-full" }, sd = { class: "mb-4 border-b borde
|
|
|
4928
4932
|
"help-message": o.helpMessage,
|
|
4929
4933
|
onCancel: m(D),
|
|
4930
4934
|
onClose: m(D),
|
|
4931
|
-
onOk: m(
|
|
4935
|
+
onOk: m(E)
|
|
4932
4936
|
}, {
|
|
4933
4937
|
footer: L(() => [
|
|
4934
4938
|
B("div", hd, [
|
|
@@ -4941,7 +4945,7 @@ const ad = { class: "flex flex-col h-full" }, sd = { class: "mb-4 border-b borde
|
|
|
4941
4945
|
"show-page-size": "",
|
|
4942
4946
|
"page-size-options": [20, 50, 100, 200],
|
|
4943
4947
|
size: "mini",
|
|
4944
|
-
onChange: m(
|
|
4948
|
+
onChange: m(x),
|
|
4945
4949
|
onPageSizeChange: m(O)
|
|
4946
4950
|
}, null, 8, ["current", "page-size", "total", "onChange", "onPageSizeChange"]),
|
|
4947
4951
|
B("div", vd, [
|
|
@@ -4956,7 +4960,7 @@ const ad = { class: "flex flex-col h-full" }, sd = { class: "mb-4 border-b borde
|
|
|
4956
4960
|
}, 8, ["onClick"]),
|
|
4957
4961
|
j(m(He), {
|
|
4958
4962
|
type: "primary",
|
|
4959
|
-
onClick: m(
|
|
4963
|
+
onClick: m(E)
|
|
4960
4964
|
}, {
|
|
4961
4965
|
icon: L(() => [
|
|
4962
4966
|
j(m(ko))
|
|
@@ -4989,7 +4993,7 @@ const ad = { class: "flex flex-col h-full" }, sd = { class: "mb-4 border-b borde
|
|
|
4989
4993
|
Pe(m(r), (ne, Ne) => ({
|
|
4990
4994
|
name: Ne,
|
|
4991
4995
|
fn: L((Fe) => [
|
|
4992
|
-
ie(ce.$slots, Ne,
|
|
4996
|
+
ie(ce.$slots, Ne, Ie(tt(Fe)), void 0, !0)
|
|
4993
4997
|
])
|
|
4994
4998
|
}))
|
|
4995
4999
|
]), 1032, ["values", "schema", "common-config"])
|
|
@@ -5008,7 +5012,7 @@ const ad = { class: "flex flex-col h-full" }, sd = { class: "mb-4 border-b borde
|
|
|
5008
5012
|
}, pe.value, {
|
|
5009
5013
|
onCheckboxChange: m(P),
|
|
5010
5014
|
onCheckboxAll: m(T),
|
|
5011
|
-
onRadioChange: m(
|
|
5015
|
+
onRadioChange: m(w),
|
|
5012
5016
|
onCellDblclick: Ae,
|
|
5013
5017
|
size: "mini"
|
|
5014
5018
|
}), null, 16, ["columns", "data", "loading", "onCheckboxChange", "onCheckboxAll", "onRadioChange"])
|
|
@@ -5024,15 +5028,15 @@ const ad = { class: "flex flex-col h-full" }, sd = { class: "mb-4 border-b borde
|
|
|
5024
5028
|
]),
|
|
5025
5029
|
B("div", ud, [
|
|
5026
5030
|
m(p).length ? (F(!0), Y(Oe, { key: 0 }, Pe(m(p), (ne) => (F(), Y("div", {
|
|
5027
|
-
key: ne[m(
|
|
5031
|
+
key: ne[m(S)],
|
|
5028
5032
|
class: "relative group px-2 py-1 mb-1 bg-white border border-gray-200 rounded hover:shadow-sm transition-all h-[42px] flex flex-col justify-center"
|
|
5029
5033
|
}, [
|
|
5030
5034
|
j(m(ir), {
|
|
5031
|
-
content: `${ne[m(
|
|
5035
|
+
content: `${ne[m(k).desc]}`
|
|
5032
5036
|
}, {
|
|
5033
5037
|
default: L(() => [
|
|
5034
|
-
B("div", dd, Q(ne[m(
|
|
5035
|
-
B("div", fd, Q(ne[m(
|
|
5038
|
+
B("div", dd, Q(ne[m(k).value] || "-"), 1),
|
|
5039
|
+
B("div", fd, Q(ne[m(k).label] || " "), 1)
|
|
5036
5040
|
]),
|
|
5037
5041
|
_: 2
|
|
5038
5042
|
}, 1032, ["content"]),
|
|
@@ -5068,7 +5072,7 @@ function wd(e, n) {
|
|
|
5068
5072
|
set: (h) => {
|
|
5069
5073
|
n("update:modelValue", h), n("change", h);
|
|
5070
5074
|
}
|
|
5071
|
-
}), l = () =>
|
|
5075
|
+
}), l = () => Be.businessSearchAdapter, u = (h) => async (g) => {
|
|
5072
5076
|
if (!h?.search)
|
|
5073
5077
|
return console.warn("[SunnyBusinessSearch] No search adapter configured."), { records: [], total: 0 };
|
|
5074
5078
|
try {
|
|
@@ -5076,8 +5080,8 @@ function wd(e, n) {
|
|
|
5076
5080
|
...g,
|
|
5077
5081
|
cNum: e.cNum
|
|
5078
5082
|
});
|
|
5079
|
-
} catch (
|
|
5080
|
-
throw console.error("[SunnyBusinessSearch] Search failed:",
|
|
5083
|
+
} catch (k) {
|
|
5084
|
+
throw console.error("[SunnyBusinessSearch] Search failed:", k), k;
|
|
5081
5085
|
}
|
|
5082
5086
|
}, d = async () => {
|
|
5083
5087
|
if (!e.cNum) return;
|
|
@@ -5157,7 +5161,7 @@ const Sd = { class: "sunny-business-search w-full" }, Cd = /* @__PURE__ */ te({
|
|
|
5157
5161
|
let p = t.modalProps?.multiple;
|
|
5158
5162
|
p === void 0 && (p = t.multiple), p === void 0 && t.cSelectionMode && (p = t.cSelectionMode !== "single"), p = p ?? i.value.multiple ?? !0;
|
|
5159
5163
|
let g = [...t.modalProps.tableColumns || i.value.tableColumns || []];
|
|
5160
|
-
return !g.some((
|
|
5164
|
+
return !g.some((S) => S.type === "checkbox" || S.type === "radio") && g.length > 0 && (p ? g.unshift({ type: "checkbox", width: 50, fixed: "left", align: "center" }) : g.unshift({ type: "radio", width: 50, fixed: "left", align: "center" })), {
|
|
5161
5165
|
...i.value,
|
|
5162
5166
|
multiple: p,
|
|
5163
5167
|
fieldNames: y.value,
|
|
@@ -5178,10 +5182,10 @@ const Sd = { class: "sunny-business-search w-full" }, Cd = /* @__PURE__ */ te({
|
|
|
5178
5182
|
"onUpdate:modelValue": h[0] || (h[0] = (g) => l.value = g),
|
|
5179
5183
|
onSearch: m(u)
|
|
5180
5184
|
}), qe({ _: 2 }, [
|
|
5181
|
-
Pe(p.$slots, (g,
|
|
5182
|
-
name:
|
|
5183
|
-
fn: L((
|
|
5184
|
-
ie(p.$slots,
|
|
5185
|
+
Pe(p.$slots, (g, k) => ({
|
|
5186
|
+
name: k,
|
|
5187
|
+
fn: L((S) => [
|
|
5188
|
+
ie(p.$slots, k, Ie(tt(S || {})))
|
|
5185
5189
|
])
|
|
5186
5190
|
}))
|
|
5187
5191
|
]), 1040, ["model-value", "placeholder", "disabled", "max-tag-count", "field-names", "onSearch"]),
|
|
@@ -5208,23 +5212,23 @@ function xd(e, n, t, r, o = Lo) {
|
|
|
5208
5212
|
return;
|
|
5209
5213
|
}
|
|
5210
5214
|
u.value = !1;
|
|
5211
|
-
let
|
|
5215
|
+
let R = t?.value || e.model;
|
|
5212
5216
|
if (r)
|
|
5213
5217
|
try {
|
|
5214
5218
|
const P = await r.getValues();
|
|
5215
|
-
P && (
|
|
5219
|
+
P && (R = P);
|
|
5216
5220
|
} catch {
|
|
5217
5221
|
}
|
|
5218
|
-
const
|
|
5219
|
-
if (Object.keys(
|
|
5220
|
-
const T =
|
|
5222
|
+
const x = { ...R };
|
|
5223
|
+
if (Object.keys(x).forEach((P) => {
|
|
5224
|
+
const T = x[P];
|
|
5221
5225
|
Array.isArray(T) && (e.formConfig?.some(
|
|
5222
5226
|
(v) => v.fieldName === P && v.component && (v.component.name === "SunnyBusinessSearch" || v.component === "SunnyBusinessSearch")
|
|
5223
|
-
) ?
|
|
5224
|
-
let
|
|
5225
|
-
return typeof v == "object" && v !== null && (
|
|
5227
|
+
) ? x[P] = JSON.stringify(T) : x[P] = T.map((v) => {
|
|
5228
|
+
let E = v;
|
|
5229
|
+
return typeof v == "object" && v !== null && (E = v.value !== void 0 ? v.value : v.ID !== void 0 ? v.ID : v.id !== void 0 ? v.id : v), typeof E == "string" ? E : String(E);
|
|
5226
5230
|
}));
|
|
5227
|
-
}), !Object.values(
|
|
5231
|
+
}), !Object.values(x).some((P) => Array.isArray(P) ? P.length > 0 : P !== "" && P !== void 0 && P !== null)) {
|
|
5228
5232
|
ue.error("请输入查询条件");
|
|
5229
5233
|
return;
|
|
5230
5234
|
}
|
|
@@ -5236,15 +5240,15 @@ function xd(e, n, t, r, o = Lo) {
|
|
|
5236
5240
|
cSearchplanname: P,
|
|
5237
5241
|
...e.nResourceid && { nResourceid: e.nResourceid }
|
|
5238
5242
|
},
|
|
5239
|
-
colMap:
|
|
5243
|
+
colMap: x
|
|
5240
5244
|
});
|
|
5241
5245
|
if (T.message && ue.success(T.message), e.resourceId) {
|
|
5242
|
-
const
|
|
5243
|
-
n("update:searchPlanList",
|
|
5244
|
-
const v =
|
|
5246
|
+
const w = await h(e.resourceId);
|
|
5247
|
+
n("update:searchPlanList", w);
|
|
5248
|
+
const v = w.find((E) => E.CSEARCHPLANNAME === P);
|
|
5245
5249
|
v && await p(v);
|
|
5246
5250
|
}
|
|
5247
|
-
n("add", P, { ...
|
|
5251
|
+
n("add", P, { ...x }), l.value = "";
|
|
5248
5252
|
} catch (P) {
|
|
5249
5253
|
n("error", P);
|
|
5250
5254
|
}
|
|
@@ -5254,23 +5258,23 @@ function xd(e, n, t, r, o = Lo) {
|
|
|
5254
5258
|
return;
|
|
5255
5259
|
}
|
|
5256
5260
|
u.value = !1;
|
|
5257
|
-
let
|
|
5261
|
+
let R = t?.value || e.model;
|
|
5258
5262
|
if (r)
|
|
5259
5263
|
try {
|
|
5260
5264
|
const P = await r.getValues();
|
|
5261
|
-
P && (
|
|
5265
|
+
P && (R = P);
|
|
5262
5266
|
} catch {
|
|
5263
5267
|
}
|
|
5264
|
-
const
|
|
5265
|
-
if (Object.keys(
|
|
5266
|
-
const T =
|
|
5268
|
+
const x = { ...R };
|
|
5269
|
+
if (Object.keys(x).forEach((P) => {
|
|
5270
|
+
const T = x[P];
|
|
5267
5271
|
Array.isArray(T) && (e.formConfig?.some(
|
|
5268
5272
|
(v) => v.fieldName === P && v.component && (v.component.name === "SunnyBusinessSearch" || v.component === "SunnyBusinessSearch")
|
|
5269
|
-
) ?
|
|
5270
|
-
let
|
|
5271
|
-
return typeof v == "object" && v !== null && (
|
|
5273
|
+
) ? x[P] = JSON.stringify(T) : x[P] = T.map((v) => {
|
|
5274
|
+
let E = v;
|
|
5275
|
+
return typeof v == "object" && v !== null && (E = v.value !== void 0 ? v.value : v.ID !== void 0 ? v.ID : v.id !== void 0 ? v.id : v), typeof E == "string" ? E : String(E);
|
|
5272
5276
|
}));
|
|
5273
|
-
}), !Object.values(
|
|
5277
|
+
}), !Object.values(x).some((P) => Array.isArray(P) ? P.length > 0 : P !== "" && P !== void 0 && P !== null)) {
|
|
5274
5278
|
ue.error("请输入查询条件");
|
|
5275
5279
|
return;
|
|
5276
5280
|
}
|
|
@@ -5281,50 +5285,50 @@ function xd(e, n, t, r, o = Lo) {
|
|
|
5281
5285
|
...e.nResourceid && { nResourceid: e.nResourceid },
|
|
5282
5286
|
...l.value.trim() && { cSearchplanname: l.value.trim() }
|
|
5283
5287
|
},
|
|
5284
|
-
colMap:
|
|
5288
|
+
colMap: x
|
|
5285
5289
|
});
|
|
5286
5290
|
if (P.message && ue.success(P.message), e.resourceId) {
|
|
5287
5291
|
const T = await h(e.resourceId);
|
|
5288
5292
|
n("update:searchPlanList", T);
|
|
5289
|
-
const
|
|
5290
|
-
|
|
5293
|
+
const w = T.find((v) => v.ID === e.currentSearchPlan?.ID);
|
|
5294
|
+
w && await p(w);
|
|
5291
5295
|
}
|
|
5292
|
-
n("update", e.currentSearchPlan?.ID, l.value.trim() || e.currentSearchPlan?.CSEARCHPLANNAME, { ...
|
|
5296
|
+
n("update", e.currentSearchPlan?.ID, l.value.trim() || e.currentSearchPlan?.CSEARCHPLANNAME, { ...x }), l.value = "";
|
|
5293
5297
|
} catch (P) {
|
|
5294
5298
|
n("error", P);
|
|
5295
5299
|
}
|
|
5296
|
-
}, b = async (
|
|
5300
|
+
}, b = async (R) => {
|
|
5297
5301
|
try {
|
|
5298
|
-
const
|
|
5299
|
-
if (n("delete",
|
|
5302
|
+
const x = await o.del({ id: R.ID });
|
|
5303
|
+
if (n("delete", R.ID), e.currentSearchPlan && e.currentSearchPlan.ID === R.ID && n("update:currentSearchPlan", void 0), x.message && ue.success(x.message), e.resourceId) {
|
|
5300
5304
|
const O = await h(e.resourceId);
|
|
5301
5305
|
n("update:searchPlanList", O);
|
|
5302
5306
|
}
|
|
5303
|
-
} catch (
|
|
5304
|
-
n("error",
|
|
5307
|
+
} catch (x) {
|
|
5308
|
+
n("error", x);
|
|
5305
5309
|
}
|
|
5306
|
-
}, p = async (
|
|
5307
|
-
n("update:currentSearchPlan",
|
|
5310
|
+
}, p = async (R) => {
|
|
5311
|
+
n("update:currentSearchPlan", R);
|
|
5308
5312
|
try {
|
|
5309
|
-
const
|
|
5313
|
+
const x = {
|
|
5310
5314
|
...e.nResourceid && { nResourceid: e.nResourceid },
|
|
5311
|
-
nPlanId:
|
|
5315
|
+
nPlanId: R.ID
|
|
5312
5316
|
};
|
|
5313
|
-
let P = (await o.findSearchPlanColsByPlanId(
|
|
5317
|
+
let P = (await o.findSearchPlanColsByPlanId(x)).result || {};
|
|
5314
5318
|
if (Object.keys(P).forEach((T) => {
|
|
5315
|
-
let
|
|
5319
|
+
let w = P[T];
|
|
5316
5320
|
try {
|
|
5317
5321
|
if (e.formConfig?.some(
|
|
5318
|
-
(
|
|
5322
|
+
(E) => E.fieldName === T && E.component && (E.component.name === "SunnyBusinessSearch" || E.component === "SunnyBusinessSearch")
|
|
5319
5323
|
)) {
|
|
5320
|
-
if (typeof
|
|
5324
|
+
if (typeof w == "string")
|
|
5321
5325
|
try {
|
|
5322
|
-
|
|
5326
|
+
w = JSON.parse(w);
|
|
5323
5327
|
} catch {
|
|
5324
5328
|
}
|
|
5325
|
-
if (Array.isArray(
|
|
5329
|
+
if (Array.isArray(w) && w.every((D) => typeof D == "string") && w.length > 0)
|
|
5326
5330
|
try {
|
|
5327
|
-
const D =
|
|
5331
|
+
const D = w.join(""), G = [];
|
|
5328
5332
|
let U = "", W = 0;
|
|
5329
5333
|
for (let J = 0; J < D.length; J++) {
|
|
5330
5334
|
const q = D[J];
|
|
@@ -5338,10 +5342,10 @@ function xd(e, n, t, r, o = Lo) {
|
|
|
5338
5342
|
U = "";
|
|
5339
5343
|
}
|
|
5340
5344
|
}
|
|
5341
|
-
G.length > 0 ?
|
|
5345
|
+
G.length > 0 ? w = G : w = JSON.parse(D);
|
|
5342
5346
|
} catch {
|
|
5343
5347
|
try {
|
|
5344
|
-
const D =
|
|
5348
|
+
const D = w.join(""), G = [];
|
|
5345
5349
|
D.split("}{").map((W, J) => J === 0 ? W + "}" : J === D.split("}{").length - 1 ? "{" + W : "{" + W + "}").forEach((W) => {
|
|
5346
5350
|
if (W.trim()) {
|
|
5347
5351
|
const J = W.match(/"([^"]+)"\s*:\s*("[^"]*"|\d+)/g) || [], q = {};
|
|
@@ -5351,28 +5355,28 @@ function xd(e, n, t, r, o = Lo) {
|
|
|
5351
5355
|
ne.startsWith('"') && ne.endsWith('"') ? ne = ne.substring(1, ne.length - 1) : isNaN(Number(ne)) || (ne = Number(ne)), q[me] = ne;
|
|
5352
5356
|
}), Object.keys(q).length > 0 && G.push(q);
|
|
5353
5357
|
}
|
|
5354
|
-
}), G.length > 0 && (
|
|
5358
|
+
}), G.length > 0 && (w = G);
|
|
5355
5359
|
} catch {
|
|
5356
5360
|
}
|
|
5357
5361
|
}
|
|
5358
5362
|
} else {
|
|
5359
|
-
if (typeof
|
|
5363
|
+
if (typeof w == "string" && (w.startsWith("[") || w.includes(",")))
|
|
5360
5364
|
try {
|
|
5361
|
-
|
|
5365
|
+
w = JSON.parse(w);
|
|
5362
5366
|
} catch {
|
|
5363
|
-
|
|
5367
|
+
w.includes(",") && (w = w.split(",").map((E) => E.trim()));
|
|
5364
5368
|
}
|
|
5365
|
-
Array.isArray(
|
|
5366
|
-
const D = typeof
|
|
5369
|
+
Array.isArray(w) && (w = w.map((E) => {
|
|
5370
|
+
const D = typeof E == "string" ? E.trim() : E;
|
|
5367
5371
|
return String(D);
|
|
5368
5372
|
}));
|
|
5369
5373
|
}
|
|
5370
|
-
P[T] =
|
|
5374
|
+
P[T] = w;
|
|
5371
5375
|
} catch {
|
|
5372
5376
|
}
|
|
5373
5377
|
}), e.formConfig?.forEach((T) => {
|
|
5374
|
-
const
|
|
5375
|
-
let v = P[
|
|
5378
|
+
const w = T.fieldName;
|
|
5379
|
+
let v = P[w];
|
|
5376
5380
|
if (v != null && T.component && (T.component.name === "SunnyBusinessSearch" || T.component === "SunnyBusinessSearch")) {
|
|
5377
5381
|
if (typeof v == "string")
|
|
5378
5382
|
try {
|
|
@@ -5386,7 +5390,7 @@ function xd(e, n, t, r, o = Lo) {
|
|
|
5386
5390
|
v = JSON.parse(D);
|
|
5387
5391
|
} catch {
|
|
5388
5392
|
}
|
|
5389
|
-
Array.isArray(v) ? P[
|
|
5393
|
+
Array.isArray(v) ? P[w] = v.map((D) => typeof D == "object" && D !== null ? D : { value: D }) : typeof v == "object" && v !== null ? P[w] = [v] : P[w] = v;
|
|
5390
5394
|
}
|
|
5391
5395
|
}
|
|
5392
5396
|
}), t && (t.value = { ...P }), r)
|
|
@@ -5394,18 +5398,18 @@ function xd(e, n, t, r, o = Lo) {
|
|
|
5394
5398
|
await r.setValues(P);
|
|
5395
5399
|
} catch {
|
|
5396
5400
|
}
|
|
5397
|
-
n("select",
|
|
5398
|
-
} catch (
|
|
5399
|
-
n("error",
|
|
5401
|
+
n("select", R);
|
|
5402
|
+
} catch (x) {
|
|
5403
|
+
n("error", x);
|
|
5400
5404
|
}
|
|
5401
|
-
}, h = async (
|
|
5405
|
+
}, h = async (R) => {
|
|
5402
5406
|
try {
|
|
5403
|
-
const
|
|
5407
|
+
const x = {
|
|
5404
5408
|
...e.nResourceid && { nResourceid: e.nResourceid }
|
|
5405
5409
|
};
|
|
5406
|
-
return (await o.findAllByResourceid(
|
|
5407
|
-
} catch (
|
|
5408
|
-
return n("error",
|
|
5410
|
+
return (await o.findAllByResourceid(x)).result?.searchplanList || [];
|
|
5411
|
+
} catch (x) {
|
|
5412
|
+
return n("error", x), [];
|
|
5409
5413
|
}
|
|
5410
5414
|
};
|
|
5411
5415
|
return {
|
|
@@ -5423,31 +5427,31 @@ function xd(e, n, t, r, o = Lo) {
|
|
|
5423
5427
|
} catch {
|
|
5424
5428
|
}
|
|
5425
5429
|
if (t) {
|
|
5426
|
-
const
|
|
5427
|
-
Object.keys(
|
|
5428
|
-
|
|
5429
|
-
}), t.value =
|
|
5430
|
+
const R = { ...t.value };
|
|
5431
|
+
Object.keys(R).forEach((x) => {
|
|
5432
|
+
R[x] = "";
|
|
5433
|
+
}), t.value = R;
|
|
5430
5434
|
}
|
|
5431
5435
|
},
|
|
5432
5436
|
handleSearch: async () => {
|
|
5433
|
-
let
|
|
5437
|
+
let R = t?.value || e.model;
|
|
5434
5438
|
if (r)
|
|
5435
5439
|
try {
|
|
5436
|
-
const
|
|
5437
|
-
|
|
5440
|
+
const x = await r.getValues();
|
|
5441
|
+
x && (R = x);
|
|
5438
5442
|
} catch {
|
|
5439
5443
|
}
|
|
5440
|
-
n("search", { ...
|
|
5444
|
+
n("search", { ...R }), i.value = !1;
|
|
5441
5445
|
},
|
|
5442
5446
|
handleClose: () => {
|
|
5443
5447
|
i.value = !1, l.value = "", u.value = !1;
|
|
5444
5448
|
},
|
|
5445
5449
|
handleOpen: async () => {
|
|
5446
5450
|
if (i.value = !0, l.value = "", u.value = !1, t) {
|
|
5447
|
-
const
|
|
5448
|
-
Object.keys(
|
|
5449
|
-
|
|
5450
|
-
}), t.value =
|
|
5451
|
+
const R = { ...t.value };
|
|
5452
|
+
Object.keys(R).forEach((x) => {
|
|
5453
|
+
R[x] = "";
|
|
5454
|
+
}), t.value = R;
|
|
5451
5455
|
}
|
|
5452
5456
|
if (r)
|
|
5453
5457
|
try {
|
|
@@ -5456,49 +5460,49 @@ function xd(e, n, t, r, o = Lo) {
|
|
|
5456
5460
|
}
|
|
5457
5461
|
if (e.resourceId)
|
|
5458
5462
|
try {
|
|
5459
|
-
const
|
|
5460
|
-
if (n("update:searchPlanList",
|
|
5461
|
-
n("update:currentSearchPlan",
|
|
5462
|
-
const
|
|
5463
|
+
const R = await h(e.resourceId);
|
|
5464
|
+
if (n("update:searchPlanList", R), R.length > 0) {
|
|
5465
|
+
n("update:currentSearchPlan", R[0]);
|
|
5466
|
+
const x = {
|
|
5463
5467
|
...e.nResourceid && { nResourceid: e.nResourceid },
|
|
5464
|
-
nPlanId:
|
|
5468
|
+
nPlanId: R[0].ID
|
|
5465
5469
|
};
|
|
5466
|
-
let P = (await o.findSearchPlanColsByPlanId(
|
|
5470
|
+
let P = (await o.findSearchPlanColsByPlanId(x)).result || {};
|
|
5467
5471
|
if (Object.keys(P).forEach((T) => {
|
|
5468
|
-
let
|
|
5472
|
+
let w = P[T];
|
|
5469
5473
|
try {
|
|
5470
5474
|
if (e.formConfig?.some(
|
|
5471
|
-
(
|
|
5475
|
+
(E) => E.fieldName === T && E.component && (E.component.name === "SunnyBusinessSearch" || E.component === "SunnyBusinessSearch")
|
|
5472
5476
|
)) {
|
|
5473
|
-
if (typeof
|
|
5477
|
+
if (typeof w == "string")
|
|
5474
5478
|
try {
|
|
5475
|
-
|
|
5479
|
+
w = JSON.parse(w);
|
|
5476
5480
|
} catch {
|
|
5477
5481
|
}
|
|
5478
|
-
if (Array.isArray(
|
|
5482
|
+
if (Array.isArray(w) && w.every((D) => typeof D == "string") && w.length > 0)
|
|
5479
5483
|
try {
|
|
5480
|
-
const D =
|
|
5481
|
-
|
|
5484
|
+
const D = w.join("");
|
|
5485
|
+
w = JSON.parse(D);
|
|
5482
5486
|
} catch {
|
|
5483
5487
|
}
|
|
5484
5488
|
} else {
|
|
5485
|
-
if (typeof
|
|
5489
|
+
if (typeof w == "string" && (w.startsWith("[") || w.includes(",")))
|
|
5486
5490
|
try {
|
|
5487
|
-
|
|
5491
|
+
w = JSON.parse(w);
|
|
5488
5492
|
} catch {
|
|
5489
|
-
|
|
5493
|
+
w.includes(",") && (w = w.split(",").map((E) => E.trim()));
|
|
5490
5494
|
}
|
|
5491
|
-
Array.isArray(
|
|
5492
|
-
const D = typeof
|
|
5495
|
+
Array.isArray(w) && (w = w.map((E) => {
|
|
5496
|
+
const D = typeof E == "string" ? E.trim() : E;
|
|
5493
5497
|
return String(D);
|
|
5494
5498
|
}));
|
|
5495
5499
|
}
|
|
5496
|
-
P[T] =
|
|
5500
|
+
P[T] = w;
|
|
5497
5501
|
} catch {
|
|
5498
5502
|
}
|
|
5499
5503
|
}), e.formConfig?.forEach((T) => {
|
|
5500
|
-
const
|
|
5501
|
-
let v = P[
|
|
5504
|
+
const w = T.fieldName;
|
|
5505
|
+
let v = P[w];
|
|
5502
5506
|
if (v != null && T.component && (T.component.name === "SunnyBusinessSearch" || T.component === "SunnyBusinessSearch")) {
|
|
5503
5507
|
if (typeof v == "string")
|
|
5504
5508
|
try {
|
|
@@ -5539,7 +5543,7 @@ function xd(e, n, t, r, o = Lo) {
|
|
|
5539
5543
|
} catch {
|
|
5540
5544
|
}
|
|
5541
5545
|
}
|
|
5542
|
-
Array.isArray(v) ? P[
|
|
5546
|
+
Array.isArray(v) ? P[w] = v.map((D) => typeof D == "object" && D !== null ? D : { value: D }) : typeof v == "object" && v !== null ? P[w] = [v] : P[w] = v;
|
|
5543
5547
|
}
|
|
5544
5548
|
}
|
|
5545
5549
|
}), t && (t.value = { ...P }), r)
|
|
@@ -5547,7 +5551,7 @@ function xd(e, n, t, r, o = Lo) {
|
|
|
5547
5551
|
await r.setValues(P);
|
|
5548
5552
|
} catch {
|
|
5549
5553
|
}
|
|
5550
|
-
n("select",
|
|
5554
|
+
n("select", R[0]);
|
|
5551
5555
|
}
|
|
5552
5556
|
} catch {
|
|
5553
5557
|
}
|
|
@@ -5555,48 +5559,48 @@ function xd(e, n, t, r, o = Lo) {
|
|
|
5555
5559
|
loadSearchPlans: h,
|
|
5556
5560
|
loadDefaultSearchPlan: async () => {
|
|
5557
5561
|
try {
|
|
5558
|
-
const
|
|
5562
|
+
const R = {
|
|
5559
5563
|
...e.nResourceid && { nResourceid: e.nResourceid }
|
|
5560
|
-
}, O = (await o.findDefSearchPlan(
|
|
5564
|
+
}, O = (await o.findDefSearchPlan(R)).result || [];
|
|
5561
5565
|
if (O.length > 0) {
|
|
5562
5566
|
const P = {};
|
|
5563
5567
|
if (O.forEach((T) => {
|
|
5564
5568
|
T.C_COLNAME && T.C_COLVALUE !== void 0 && (P[T.C_COLNAME] = T.C_COLVALUE);
|
|
5565
5569
|
}), Object.keys(P).forEach((T) => {
|
|
5566
|
-
let
|
|
5570
|
+
let w = P[T];
|
|
5567
5571
|
try {
|
|
5568
5572
|
if (e.formConfig?.some(
|
|
5569
|
-
(
|
|
5573
|
+
(E) => E.fieldName === T && E.component && (E.component.name === "SunnyBusinessSearch" || E.component === "SunnyBusinessSearch")
|
|
5570
5574
|
)) {
|
|
5571
|
-
if (typeof
|
|
5575
|
+
if (typeof w == "string")
|
|
5572
5576
|
try {
|
|
5573
|
-
|
|
5577
|
+
w = JSON.parse(w);
|
|
5574
5578
|
} catch {
|
|
5575
5579
|
}
|
|
5576
|
-
if (Array.isArray(
|
|
5580
|
+
if (Array.isArray(w) && w.every((D) => typeof D == "string") && w.length > 0)
|
|
5577
5581
|
try {
|
|
5578
|
-
const D =
|
|
5579
|
-
|
|
5582
|
+
const D = w.join("");
|
|
5583
|
+
w = JSON.parse(D);
|
|
5580
5584
|
} catch {
|
|
5581
5585
|
}
|
|
5582
5586
|
} else {
|
|
5583
|
-
if (typeof
|
|
5587
|
+
if (typeof w == "string" && (w.startsWith("[") || w.includes(",")))
|
|
5584
5588
|
try {
|
|
5585
|
-
|
|
5589
|
+
w = JSON.parse(w);
|
|
5586
5590
|
} catch {
|
|
5587
|
-
|
|
5591
|
+
w.includes(",") && (w = w.split(",").map((E) => E.trim()));
|
|
5588
5592
|
}
|
|
5589
|
-
Array.isArray(
|
|
5590
|
-
const D = typeof
|
|
5593
|
+
Array.isArray(w) && (w = w.map((E) => {
|
|
5594
|
+
const D = typeof E == "string" ? E.trim() : E;
|
|
5591
5595
|
return String(D);
|
|
5592
5596
|
}));
|
|
5593
5597
|
}
|
|
5594
|
-
P[T] =
|
|
5598
|
+
P[T] = w;
|
|
5595
5599
|
} catch {
|
|
5596
5600
|
}
|
|
5597
5601
|
}), e.formConfig?.forEach((T) => {
|
|
5598
|
-
const
|
|
5599
|
-
let v = P[
|
|
5602
|
+
const w = T.fieldName;
|
|
5603
|
+
let v = P[w];
|
|
5600
5604
|
if (v != null && T.component && (T.component.name === "SunnyBusinessSearch" || T.component === "SunnyBusinessSearch")) {
|
|
5601
5605
|
if (typeof v == "string")
|
|
5602
5606
|
try {
|
|
@@ -5637,7 +5641,7 @@ function xd(e, n, t, r, o = Lo) {
|
|
|
5637
5641
|
} catch {
|
|
5638
5642
|
}
|
|
5639
5643
|
}
|
|
5640
|
-
Array.isArray(v) ? P[
|
|
5644
|
+
Array.isArray(v) ? P[w] = v.map((D) => typeof D == "object" && D !== null ? D : { value: D }) : typeof v == "object" && v !== null ? P[w] = [v] : P[w] = v;
|
|
5641
5645
|
}
|
|
5642
5646
|
}
|
|
5643
5647
|
}), t && (t.value = { ...P }), r)
|
|
@@ -5648,8 +5652,8 @@ function xd(e, n, t, r, o = Lo) {
|
|
|
5648
5652
|
return n("default-plan-loaded", P), P;
|
|
5649
5653
|
}
|
|
5650
5654
|
return n("default-plan-loaded", {}), {};
|
|
5651
|
-
} catch (
|
|
5652
|
-
return n("error",
|
|
5655
|
+
} catch (R) {
|
|
5656
|
+
return n("error", R), n("default-plan-loaded", {}), {};
|
|
5653
5657
|
}
|
|
5654
5658
|
}
|
|
5655
5659
|
};
|
|
@@ -5697,29 +5701,29 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5697
5701
|
handleDelete: p,
|
|
5698
5702
|
handleSelect: h,
|
|
5699
5703
|
handleReset: g,
|
|
5700
|
-
handleSearch:
|
|
5701
|
-
handleClose:
|
|
5702
|
-
handleOpen:
|
|
5704
|
+
handleSearch: k,
|
|
5705
|
+
handleClose: S,
|
|
5706
|
+
handleOpen: $,
|
|
5703
5707
|
loadSearchPlans: V,
|
|
5704
|
-
loadDefaultSearchPlan:
|
|
5708
|
+
loadDefaultSearchPlan: R
|
|
5705
5709
|
} = xd(t, r, i, o, t.api);
|
|
5706
5710
|
$t(async () => {
|
|
5707
5711
|
if (t.resourceId)
|
|
5708
5712
|
try {
|
|
5709
5713
|
const W = await V(t.resourceId);
|
|
5710
|
-
r("update:searchPlanList", W), await
|
|
5714
|
+
r("update:searchPlanList", W), await R();
|
|
5711
5715
|
} catch (W) {
|
|
5712
5716
|
console.error("Failed to initialize search plan:", W);
|
|
5713
5717
|
}
|
|
5714
5718
|
else
|
|
5715
5719
|
try {
|
|
5716
|
-
await
|
|
5720
|
+
await R();
|
|
5717
5721
|
} catch (W) {
|
|
5718
5722
|
console.error("Failed to load default search plan:", W);
|
|
5719
5723
|
}
|
|
5720
5724
|
});
|
|
5721
|
-
const
|
|
5722
|
-
await
|
|
5725
|
+
const x = async () => {
|
|
5726
|
+
await $();
|
|
5723
5727
|
}, O = () => {
|
|
5724
5728
|
console.log("SunnyUseForm mounted"), o && (t.modelValue || t.model) && o.setValues(t.modelValue || t.model).catch((W) => {
|
|
5725
5729
|
console.error("setValues error:", W);
|
|
@@ -5751,16 +5755,16 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5751
5755
|
span: 8
|
|
5752
5756
|
// 一行三列
|
|
5753
5757
|
}
|
|
5754
|
-
}))),
|
|
5758
|
+
}))), w = N(() => t.searchPlanList), v = N(() => t.currentSearchPlan), E = N(() => t.disabled), D = N(() => t.formProps), G = N(() => t.title), U = N(() => t.width);
|
|
5755
5759
|
return (W, J) => (F(), Y("div", kd, [
|
|
5756
5760
|
ie(W.$slots, "trigger", {
|
|
5757
|
-
open:
|
|
5758
|
-
disabled:
|
|
5761
|
+
open: x,
|
|
5762
|
+
disabled: E.value
|
|
5759
5763
|
}, () => [
|
|
5760
5764
|
B("button", {
|
|
5761
5765
|
class: "px-3 py-1.5 border border-[var(--color-border-2)] rounded bg-white text-base transition-all hover:border-[rgb(var(--primary-6))] hover:text-[rgb(var(--primary-6))] disabled:cursor-not-allowed disabled:opacity-60",
|
|
5762
|
-
disabled:
|
|
5763
|
-
onClick:
|
|
5766
|
+
disabled: E.value,
|
|
5767
|
+
onClick: x
|
|
5764
5768
|
}, Q(m(ve)("common.searchPlan.title")), 9, $d)
|
|
5765
5769
|
]),
|
|
5766
5770
|
j(m(cr), ae({
|
|
@@ -5771,8 +5775,8 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5771
5775
|
top: "50px",
|
|
5772
5776
|
"close-on-click-modal": !1
|
|
5773
5777
|
}, P.value, {
|
|
5774
|
-
onCancel: m(
|
|
5775
|
-
onClose: m(
|
|
5778
|
+
onCancel: m(S),
|
|
5779
|
+
onClose: m(S)
|
|
5776
5780
|
}), {
|
|
5777
5781
|
footer: L(() => [
|
|
5778
5782
|
B("div", Hd, [
|
|
@@ -5785,7 +5789,7 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5785
5789
|
B("button", {
|
|
5786
5790
|
class: "px-3 py-1.5 bg-[rgb(var(--primary-6))] border border-[rgb(var(--primary-6))] text-white text-sm rounded hover:bg-[rgb(var(--primary-7))] transition-colors disabled:cursor-not-allowed disabled:opacity-60",
|
|
5787
5791
|
onClick: J[4] || (J[4] = //@ts-ignore
|
|
5788
|
-
(...q) => m(
|
|
5792
|
+
(...q) => m(k) && m(k)(...q)),
|
|
5789
5793
|
disabled: t.loading
|
|
5790
5794
|
}, Q(m(ve)("common.searchPlan.search")), 9, Gd)
|
|
5791
5795
|
])
|
|
@@ -5843,7 +5847,7 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5843
5847
|
J[7] || (J[7] = B("div", { class: "h-px bg-[var(--color-border-2)] my-5" }, null, -1)),
|
|
5844
5848
|
B("h3", Ld, Q(m(ve)("common.searchPlan.savedPlans")), 1),
|
|
5845
5849
|
B("div", zd, [
|
|
5846
|
-
(F(!0), Y(Oe, null, Pe(
|
|
5850
|
+
(F(!0), Y(Oe, null, Pe(w.value, (q, pe) => (F(), Y("div", {
|
|
5847
5851
|
key: q.ID,
|
|
5848
5852
|
class: fe(["flex items-center p-2 mb-1 rounded cursor-pointer transition-all hover:bg-[var(--color-fill-1)] border border-transparent", { "bg-[rgb(var(--primary-1))] border-[rgb(var(--primary-6))]": v.value && (v.value.ID == q.ID || v.value.ID === q.ID) }]),
|
|
5849
5853
|
onClick: (Ae) => m(h)(q),
|
|
@@ -5861,7 +5865,7 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5861
5865
|
disabled: t.loading
|
|
5862
5866
|
}, " × ", 8, Ud)
|
|
5863
5867
|
], 14, Id))), 128)),
|
|
5864
|
-
|
|
5868
|
+
w.value.length === 0 ? (F(), Y("div", Wd, Q(m(ve)("common.searchPlan.noPlans")), 1)) : se("", !0)
|
|
5865
5869
|
])
|
|
5866
5870
|
])
|
|
5867
5871
|
], 2)
|
|
@@ -5909,29 +5913,29 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5909
5913
|
}), g = async () => {
|
|
5910
5914
|
if (o.cNum)
|
|
5911
5915
|
try {
|
|
5912
|
-
const V =
|
|
5916
|
+
const V = Be.customizeSelectAdapter;
|
|
5913
5917
|
if (!V?.query) {
|
|
5914
5918
|
p.value = !0, ue.error("CustomizeSelect adapter not configured");
|
|
5915
5919
|
return;
|
|
5916
5920
|
}
|
|
5917
|
-
const
|
|
5921
|
+
const R = {
|
|
5918
5922
|
cNum: o.cNum,
|
|
5919
5923
|
attrParam: {
|
|
5920
5924
|
...o.attrParam
|
|
5921
5925
|
}
|
|
5922
5926
|
};
|
|
5923
|
-
h.value && (
|
|
5924
|
-
const
|
|
5925
|
-
d.value =
|
|
5927
|
+
h.value && (R.cVal = dl(h.value));
|
|
5928
|
+
const x = await V.query(R);
|
|
5929
|
+
d.value = x.options || [], y.value = x.options || [], x.config && (u.value = Object.assign({}, u.value, x.config)), p.value = !1;
|
|
5926
5930
|
} catch (V) {
|
|
5927
5931
|
p.value = !0, ue.error(V?.message || "加载失败");
|
|
5928
5932
|
}
|
|
5929
|
-
},
|
|
5933
|
+
}, k = (V) => {
|
|
5930
5934
|
i("selectChange", V, l?.proxy);
|
|
5931
|
-
},
|
|
5935
|
+
}, S = ul((V) => {
|
|
5932
5936
|
if (V !== "") {
|
|
5933
5937
|
b.value = !0;
|
|
5934
|
-
const
|
|
5938
|
+
const R = Be.customizeSelectAdapter, x = {
|
|
5935
5939
|
cNum: o.cNum,
|
|
5936
5940
|
attrParam: {
|
|
5937
5941
|
...o.attrParam
|
|
@@ -5939,9 +5943,9 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5939
5943
|
searchCondition: V
|
|
5940
5944
|
};
|
|
5941
5945
|
Promise.resolve().then(async () => {
|
|
5942
|
-
if (!
|
|
5946
|
+
if (!R?.query)
|
|
5943
5947
|
throw new Error("CustomizeSelect adapter not configured");
|
|
5944
|
-
return
|
|
5948
|
+
return R.query(x);
|
|
5945
5949
|
}).then((O) => {
|
|
5946
5950
|
O.config && (u.value = Object.assign({}, u.value, O.config)), d.value = O.options || [], y.value = O.options || [];
|
|
5947
5951
|
}).catch((O) => {
|
|
@@ -5951,8 +5955,8 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5951
5955
|
});
|
|
5952
5956
|
} else
|
|
5953
5957
|
d.value = y.value;
|
|
5954
|
-
}, u.value.nSearchinterval || 700),
|
|
5955
|
-
|
|
5958
|
+
}, u.value.nSearchinterval || 700), $ = () => {
|
|
5959
|
+
S("");
|
|
5956
5960
|
};
|
|
5957
5961
|
return be(
|
|
5958
5962
|
() => o.attrParam,
|
|
@@ -5962,32 +5966,32 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
5962
5966
|
{ deep: !0 }
|
|
5963
5967
|
), $t(() => {
|
|
5964
5968
|
o.defaultQuery && o.defaultQuery === !0 ? g() : o.cNum && o.defaultQuery === !1 && (u.value = Object.assign({}, u.value, o.defaultConfig));
|
|
5965
|
-
}), (V,
|
|
5969
|
+
}), (V, R) => (F(), Y("div", Yd, [
|
|
5966
5970
|
j(m(t), ae({
|
|
5967
5971
|
modelValue: h.value,
|
|
5968
|
-
"onUpdate:modelValue":
|
|
5972
|
+
"onUpdate:modelValue": R[0] || (R[0] = (x) => h.value = x),
|
|
5969
5973
|
"allow-clear": "",
|
|
5970
5974
|
"allow-search": u.value.nType == 1,
|
|
5971
5975
|
loading: b.value,
|
|
5972
5976
|
error: p.value
|
|
5973
5977
|
}, V.$attrs, {
|
|
5974
|
-
onChange:
|
|
5975
|
-
onClear:
|
|
5976
|
-
onSearch: m(
|
|
5978
|
+
onChange: k,
|
|
5979
|
+
onClear: $,
|
|
5980
|
+
onSearch: m(S),
|
|
5977
5981
|
triggerProps: {
|
|
5978
5982
|
contentClass: "customize-select-content"
|
|
5979
5983
|
}
|
|
5980
5984
|
}), {
|
|
5981
5985
|
default: L(() => [
|
|
5982
|
-
(F(!0), Y(Oe, null, Pe(d.value, (
|
|
5983
|
-
key:
|
|
5984
|
-
label:
|
|
5985
|
-
value:
|
|
5986
|
+
(F(!0), Y(Oe, null, Pe(d.value, (x) => (F(), ee(m(r), {
|
|
5987
|
+
key: x[o.fieldNames.value],
|
|
5988
|
+
label: x[o.fieldNames.label],
|
|
5989
|
+
value: x[o.fieldNames.value]
|
|
5986
5990
|
}, {
|
|
5987
5991
|
default: L(() => [
|
|
5988
5992
|
u.value.cLabelslotcol ? (F(), Y("div", Kd, [
|
|
5989
|
-
B("span", null, Q(
|
|
5990
|
-
B("span", Qd, Q(
|
|
5993
|
+
B("span", null, Q(x.cKeyname), 1),
|
|
5994
|
+
B("span", Qd, Q(x.cSlot), 1)
|
|
5991
5995
|
])) : se("", !0)
|
|
5992
5996
|
]),
|
|
5993
5997
|
_: 2
|
|
@@ -6020,71 +6024,71 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
6020
6024
|
], g = async () => {
|
|
6021
6025
|
y.value = !0;
|
|
6022
6026
|
try {
|
|
6023
|
-
const
|
|
6027
|
+
const x = await st.post(`${Be.apiPrefix}${o.exportUrl}/export/openInit`, {
|
|
6024
6028
|
nmodid: o.nmodid,
|
|
6025
6029
|
nButtonid: o.nButtonid
|
|
6026
6030
|
});
|
|
6027
|
-
|
|
6028
|
-
} catch (
|
|
6029
|
-
ue.error(
|
|
6031
|
+
x.data.code === 200 ? (u.value = x.data.result.exportList, d.value = x.data.result.exportUserWebConfig, l.value = !0) : ue.error(x.data.message);
|
|
6032
|
+
} catch (x) {
|
|
6033
|
+
ue.error(x.message);
|
|
6030
6034
|
} finally {
|
|
6031
6035
|
y.value = !1;
|
|
6032
6036
|
}
|
|
6033
|
-
},
|
|
6037
|
+
}, k = () => {
|
|
6034
6038
|
g();
|
|
6035
|
-
},
|
|
6039
|
+
}, S = () => {
|
|
6036
6040
|
l.value = !1, i("close");
|
|
6037
6041
|
};
|
|
6038
6042
|
n({
|
|
6039
|
-
open:
|
|
6040
|
-
close:
|
|
6043
|
+
open: k,
|
|
6044
|
+
close: S
|
|
6041
6045
|
});
|
|
6042
|
-
const
|
|
6046
|
+
const $ = ({ newIndex: x, oldIndex: O }) => {
|
|
6043
6047
|
const P = u.value.splice(O, 1)[0];
|
|
6044
|
-
u.value.splice(
|
|
6048
|
+
u.value.splice(x, 0, P);
|
|
6045
6049
|
}, V = async () => {
|
|
6046
6050
|
b.value = !0;
|
|
6047
6051
|
try {
|
|
6048
6052
|
u.value.forEach((T) => {
|
|
6049
6053
|
T.colType === "spanselect" && isNaN(Number(T.selId));
|
|
6050
6054
|
});
|
|
6051
|
-
const
|
|
6055
|
+
const x = {
|
|
6052
6056
|
conditionMap: o.conditionMap || {},
|
|
6053
6057
|
exportList: u.value,
|
|
6054
6058
|
exportUserWebConfig: d.value,
|
|
6055
6059
|
nmodid: o.nmodid,
|
|
6056
6060
|
nButtonid: o.nButtonid
|
|
6057
|
-
}, O = await
|
|
6058
|
-
`${
|
|
6059
|
-
|
|
6061
|
+
}, O = await st.post(
|
|
6062
|
+
`${Be.apiPrefix}${o.exportUrl}/export/exportExecuteStream`,
|
|
6063
|
+
x,
|
|
6060
6064
|
{
|
|
6061
6065
|
responseType: "blob"
|
|
6062
6066
|
}
|
|
6063
6067
|
), P = new FileReader();
|
|
6064
6068
|
P.onload = function() {
|
|
6065
|
-
const T = O.headers["content-disposition"]?.split("attachment;filename=")[1],
|
|
6066
|
-
v.href = URL.createObjectURL(
|
|
6069
|
+
const T = O.headers["content-disposition"]?.split("attachment;filename=")[1], w = new Blob([O.data]), v = document.createElement("a");
|
|
6070
|
+
v.href = URL.createObjectURL(w), v.download = decodeURI(T || "export.xlsx"), v.click(), URL.revokeObjectURL(v.href), S(), i("export-success", O);
|
|
6067
6071
|
}, P.readAsText(O.data);
|
|
6068
|
-
} catch (
|
|
6069
|
-
ue.error(
|
|
6072
|
+
} catch (x) {
|
|
6073
|
+
ue.error(x.message), i("export-error", x);
|
|
6070
6074
|
} finally {
|
|
6071
6075
|
b.value = !1;
|
|
6072
6076
|
}
|
|
6073
|
-
},
|
|
6074
|
-
|
|
6077
|
+
}, R = () => {
|
|
6078
|
+
S();
|
|
6075
6079
|
};
|
|
6076
|
-
return (
|
|
6077
|
-
const P = Te("vxe-checkbox"), T = Te("vxe-column"),
|
|
6080
|
+
return (x, O) => {
|
|
6081
|
+
const P = Te("vxe-checkbox"), T = Te("vxe-column"), w = Te("vxe-table");
|
|
6078
6082
|
return F(), ee(m(Nt), {
|
|
6079
6083
|
visible: l.value,
|
|
6080
6084
|
"onUpdate:visible": O[2] || (O[2] = (v) => l.value = v),
|
|
6081
6085
|
title: m(r)("common.exportModal.title"),
|
|
6082
6086
|
width: 700,
|
|
6083
6087
|
"mask-closable": !1,
|
|
6084
|
-
onCancel:
|
|
6088
|
+
onCancel: R
|
|
6085
6089
|
}, {
|
|
6086
6090
|
footer: L(() => [
|
|
6087
|
-
j(m(He), { onClick:
|
|
6091
|
+
j(m(He), { onClick: R }, {
|
|
6088
6092
|
default: L(() => [
|
|
6089
6093
|
we(Q(m(r)("common.modal.cancel")), 1)
|
|
6090
6094
|
]),
|
|
@@ -6146,7 +6150,7 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
6146
6150
|
]),
|
|
6147
6151
|
_: 1
|
|
6148
6152
|
}, 8, ["model"]),
|
|
6149
|
-
j(
|
|
6153
|
+
j(w, {
|
|
6150
6154
|
size: "mini",
|
|
6151
6155
|
data: u.value,
|
|
6152
6156
|
border: "",
|
|
@@ -6155,7 +6159,7 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
6155
6159
|
"row-config": {
|
|
6156
6160
|
drag: !0
|
|
6157
6161
|
},
|
|
6158
|
-
onRowDragEnd:
|
|
6162
|
+
onRowDragEnd: $
|
|
6159
6163
|
}, {
|
|
6160
6164
|
default: L(() => [
|
|
6161
6165
|
j(T, {
|
|
@@ -6166,7 +6170,7 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
6166
6170
|
default: L(({ row: v }) => [
|
|
6167
6171
|
j(P, {
|
|
6168
6172
|
modelValue: v.nSfExport,
|
|
6169
|
-
"onUpdate:modelValue": (
|
|
6173
|
+
"onUpdate:modelValue": (E) => v.nSfExport = E,
|
|
6170
6174
|
size: "small",
|
|
6171
6175
|
"checked-value": 1,
|
|
6172
6176
|
"unchecked-value": 0
|
|
@@ -6187,7 +6191,7 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
6187
6191
|
default: L(({ row: v }) => [
|
|
6188
6192
|
j(m(ht), {
|
|
6189
6193
|
modelValue: v.colWidth,
|
|
6190
|
-
"onUpdate:modelValue": (
|
|
6194
|
+
"onUpdate:modelValue": (E) => v.colWidth = E,
|
|
6191
6195
|
size: "small"
|
|
6192
6196
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
6193
6197
|
]),
|
|
@@ -6201,14 +6205,14 @@ const kd = { class: "inline-block" }, $d = ["disabled"], Pd = { class: "p-5 rela
|
|
|
6201
6205
|
default: L(({ row: v }) => [
|
|
6202
6206
|
j(m(it), {
|
|
6203
6207
|
modelValue: v.colDataType,
|
|
6204
|
-
"onUpdate:modelValue": (
|
|
6208
|
+
"onUpdate:modelValue": (E) => v.colDataType = E,
|
|
6205
6209
|
size: "small"
|
|
6206
6210
|
}, {
|
|
6207
6211
|
default: L(() => [
|
|
6208
|
-
(F(), Y(Oe, null, Pe(p, (
|
|
6209
|
-
key:
|
|
6210
|
-
label:
|
|
6211
|
-
value:
|
|
6212
|
+
(F(), Y(Oe, null, Pe(p, (E) => j(m(Ct), {
|
|
6213
|
+
key: E.value,
|
|
6214
|
+
label: E.label,
|
|
6215
|
+
value: E.value
|
|
6212
6216
|
}, null, 8, ["label", "value"])), 64))
|
|
6213
6217
|
]),
|
|
6214
6218
|
_: 1
|
|
@@ -6260,7 +6264,7 @@ function Xd(e) {
|
|
|
6260
6264
|
const t = n.params?.optionlist;
|
|
6261
6265
|
return {
|
|
6262
6266
|
colProp: n.field,
|
|
6263
|
-
colName: n.title || n.field,
|
|
6267
|
+
colName: String(n.title || n.field),
|
|
6264
6268
|
colWidth: n.width ?? n.minWidth,
|
|
6265
6269
|
colDataType: "default",
|
|
6266
6270
|
colType: "spanselect",
|
|
@@ -6296,23 +6300,20 @@ const ef = /* @__PURE__ */ te({
|
|
|
6296
6300
|
closeOnClickModal: !1,
|
|
6297
6301
|
onBeforeOk: async () => {
|
|
6298
6302
|
try {
|
|
6299
|
-
const
|
|
6303
|
+
const S = {
|
|
6300
6304
|
conditionMap: o.conditionMap || {},
|
|
6301
6305
|
exportList: l.value,
|
|
6302
6306
|
exportUserWebConfig: u.value
|
|
6303
|
-
},
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
}, k.readAsText(E.data);
|
|
6314
|
-
} catch (w) {
|
|
6315
|
-
return ue.error(w.message), i("export-error", w), !1;
|
|
6307
|
+
}, $ = Be.apiPrefix, V = o.customExportUrl ? `${o.customExportUrl}` : `${$}${o.exportUrl}/export/exportExecuteStream`, R = Be.exportAdapter;
|
|
6308
|
+
let x;
|
|
6309
|
+
R ? x = await R.export(V, S) : x = await (await import("axios")).default.post(V, S, { responseType: "blob" });
|
|
6310
|
+
const O = new FileReader();
|
|
6311
|
+
O.onload = function() {
|
|
6312
|
+
const P = x.headers["content-disposition"]?.split("attachment;filename=")[1], T = new Blob([x.data]), w = document.createElement("a");
|
|
6313
|
+
w.href = URL.createObjectURL(T), w.download = decodeURI(P || "export.xlsx"), w.click(), URL.revokeObjectURL(w.href), i("export-success", x);
|
|
6314
|
+
}, O.readAsText(x.data);
|
|
6315
|
+
} catch (S) {
|
|
6316
|
+
return ue.error(S.message), i("export-error", S), !1;
|
|
6316
6317
|
}
|
|
6317
6318
|
},
|
|
6318
6319
|
onClose: () => {
|
|
@@ -6327,12 +6328,12 @@ const ef = /* @__PURE__ */ te({
|
|
|
6327
6328
|
p.close();
|
|
6328
6329
|
}
|
|
6329
6330
|
});
|
|
6330
|
-
const
|
|
6331
|
-
const V = l.value.splice(
|
|
6332
|
-
l.value.splice(
|
|
6331
|
+
const k = ({ newIndex: S, oldIndex: $ }) => {
|
|
6332
|
+
const V = l.value.splice($, 1)[0];
|
|
6333
|
+
l.value.splice(S, 0, V);
|
|
6333
6334
|
};
|
|
6334
|
-
return (
|
|
6335
|
-
const V = Te("vxe-checkbox"),
|
|
6335
|
+
return (S, $) => {
|
|
6336
|
+
const V = Te("vxe-checkbox"), R = Te("vxe-column"), x = Te("vxe-table");
|
|
6336
6337
|
return F(), ee(m(b), null, {
|
|
6337
6338
|
default: L(() => [
|
|
6338
6339
|
j(m(yo), {
|
|
@@ -6347,7 +6348,7 @@ const ef = /* @__PURE__ */ te({
|
|
|
6347
6348
|
default: L(() => [
|
|
6348
6349
|
j(m(it), {
|
|
6349
6350
|
modelValue: u.value.nSheetRowNum,
|
|
6350
|
-
"onUpdate:modelValue":
|
|
6351
|
+
"onUpdate:modelValue": $[0] || ($[0] = (O) => u.value.nSheetRowNum = O),
|
|
6351
6352
|
placeholder: u.value.hintSheetRowNum,
|
|
6352
6353
|
"allow-clear": ""
|
|
6353
6354
|
}, {
|
|
@@ -6370,7 +6371,7 @@ const ef = /* @__PURE__ */ te({
|
|
|
6370
6371
|
default: L(() => [
|
|
6371
6372
|
j(m(ht), {
|
|
6372
6373
|
modelValue: u.value.maxExportNumber,
|
|
6373
|
-
"onUpdate:modelValue":
|
|
6374
|
+
"onUpdate:modelValue": $[1] || ($[1] = (O) => u.value.maxExportNumber = O),
|
|
6374
6375
|
placeholder: u.value.hintMaxExportNumber
|
|
6375
6376
|
}, null, 8, ["modelValue", "placeholder"])
|
|
6376
6377
|
]),
|
|
@@ -6379,7 +6380,7 @@ const ef = /* @__PURE__ */ te({
|
|
|
6379
6380
|
]),
|
|
6380
6381
|
_: 1
|
|
6381
6382
|
}, 8, ["model"]),
|
|
6382
|
-
j(
|
|
6383
|
+
j(x, {
|
|
6383
6384
|
size: "mini",
|
|
6384
6385
|
data: l.value,
|
|
6385
6386
|
border: "",
|
|
@@ -6387,10 +6388,10 @@ const ef = /* @__PURE__ */ te({
|
|
|
6387
6388
|
"row-config": {
|
|
6388
6389
|
drag: !0
|
|
6389
6390
|
},
|
|
6390
|
-
onRowDragEnd:
|
|
6391
|
+
onRowDragEnd: k
|
|
6391
6392
|
}, {
|
|
6392
6393
|
default: L(() => [
|
|
6393
|
-
j(
|
|
6394
|
+
j(R, {
|
|
6394
6395
|
title: m(r)("common.exportModal.nSfExport"),
|
|
6395
6396
|
width: "70",
|
|
6396
6397
|
align: "center"
|
|
@@ -6406,12 +6407,12 @@ const ef = /* @__PURE__ */ te({
|
|
|
6406
6407
|
]),
|
|
6407
6408
|
_: 1
|
|
6408
6409
|
}, 8, ["title"]),
|
|
6409
|
-
j(
|
|
6410
|
+
j(R, {
|
|
6410
6411
|
field: "colName",
|
|
6411
6412
|
title: m(r)("common.exportModal.colName"),
|
|
6412
6413
|
align: "center"
|
|
6413
6414
|
}, null, 8, ["title"]),
|
|
6414
|
-
j(
|
|
6415
|
+
j(R, {
|
|
6415
6416
|
title: m(r)("common.exportModal.colWidth"),
|
|
6416
6417
|
width: "100",
|
|
6417
6418
|
align: "center"
|
|
@@ -6425,7 +6426,7 @@ const ef = /* @__PURE__ */ te({
|
|
|
6425
6426
|
]),
|
|
6426
6427
|
_: 1
|
|
6427
6428
|
}, 8, ["title"]),
|
|
6428
|
-
j(
|
|
6429
|
+
j(R, {
|
|
6429
6430
|
title: m(r)("common.exportModal.colDataType"),
|
|
6430
6431
|
width: "120",
|
|
6431
6432
|
align: "center"
|
|
@@ -6448,7 +6449,7 @@ const ef = /* @__PURE__ */ te({
|
|
|
6448
6449
|
]),
|
|
6449
6450
|
_: 1
|
|
6450
6451
|
}, 8, ["title"]),
|
|
6451
|
-
j(
|
|
6452
|
+
j(R, {
|
|
6452
6453
|
title: m(r)("common.exportModal.drag"),
|
|
6453
6454
|
width: "50",
|
|
6454
6455
|
align: "center",
|
|
@@ -6502,15 +6503,15 @@ const tf = { class: "import-modal-body" }, nf = { class: "option-label" }, rf =
|
|
|
6502
6503
|
},
|
|
6503
6504
|
emits: ["upload-success", "upload-error", "download-success", "download-error", "close"],
|
|
6504
6505
|
setup(e, { expose: n, emit: t }) {
|
|
6505
|
-
const { t: r } = lr(), o = e, i = t, l = Z(!1), u = Z([]), d = Z(!1), y = Z(!1), b = Z(), p = (
|
|
6506
|
+
const { t: r } = lr(), o = e, i = t, l = Z(!1), u = Z([]), d = Z(!1), y = Z(!1), b = Z(), p = (x) => u.value.length >= o.limit ? (ue.error(r("common.importModal.maxUploadLimit", { limit: o.limit })), !1) : o.accept.split(",").some((T) => x.name.endsWith(T.replace(".", ""))) ? x.size / 1024 / 1024 < o.maxSize ? !0 : (ue.error(r("common.importModal.maxSize", { maxSize: o.maxSize })), !1) : (ue.error(r("common.importModal.onlySupport", { accept: o.accept })), !1), h = () => {
|
|
6506
6507
|
b.value.submit();
|
|
6507
|
-
}, g = async (
|
|
6508
|
-
const { onProgress: O, onError: P, onSuccess: T, fileItem:
|
|
6508
|
+
}, g = async (x) => {
|
|
6509
|
+
const { onProgress: O, onError: P, onSuccess: T, fileItem: w, name: v } = x;
|
|
6509
6510
|
d.value = !0;
|
|
6510
6511
|
try {
|
|
6511
|
-
const
|
|
6512
|
-
|
|
6513
|
-
const D = y.value ? `${
|
|
6512
|
+
const E = new FormData();
|
|
6513
|
+
E.append("fileName", w.file), E.append("nModid", String(o.nModid)), E.append("nButtonid", String(o.nButtonid)), E.append("usernumb", String(o.usernumb ?? "")), o.params && E.append("paramMap", JSON.stringify(o.params));
|
|
6514
|
+
const D = y.value ? `${Be.apiPrefix}${o.uploadUrl}/upload/fileUploadDecode` : `${Be.apiPrefix}${o.uploadUrl}/upload/fileUpload`, G = await st.post(D, E, {
|
|
6514
6515
|
headers: {
|
|
6515
6516
|
"Content-Type": "multipart/form-data"
|
|
6516
6517
|
}
|
|
@@ -6519,38 +6520,38 @@ const tf = { class: "import-modal-body" }, nf = { class: "option-label" }, rf =
|
|
|
6519
6520
|
content: G.data.message || r("common.importModal.uploadSuccess"),
|
|
6520
6521
|
duration: 5e3
|
|
6521
6522
|
}), T(G.data), i("upload-success", G.data), V()) : (ue.error(G.data.message || r("common.importModal.uploadError")), P(G.data), i("upload-error", G.data));
|
|
6522
|
-
} catch (
|
|
6523
|
-
ue.error(
|
|
6523
|
+
} catch (E) {
|
|
6524
|
+
ue.error(E.message || r("common.importModal.uploadError")), P(E), i("upload-error", E);
|
|
6524
6525
|
} finally {
|
|
6525
6526
|
d.value = !1;
|
|
6526
6527
|
}
|
|
6527
|
-
},
|
|
6528
|
-
|
|
6529
|
-
},
|
|
6528
|
+
}, k = (x) => {
|
|
6529
|
+
x.value = x;
|
|
6530
|
+
}, S = async () => {
|
|
6530
6531
|
try {
|
|
6531
|
-
const
|
|
6532
|
+
const x = await st.post(`${Be.apiPrefix}${o.templateUrl}/export/fileDownload?nModid=${o.nModid}&nButtonid=${o.nButtonid}`, {}, {
|
|
6532
6533
|
responseType: "blob"
|
|
6533
6534
|
}), O = new FileReader();
|
|
6534
6535
|
O.onload = function() {
|
|
6535
|
-
const P =
|
|
6536
|
-
|
|
6537
|
-
}, O.readAsText(
|
|
6538
|
-
} catch (
|
|
6539
|
-
ue.error(
|
|
6536
|
+
const P = x.headers["content-disposition"]?.split("attachment;filename=")[1], T = new Blob([x.data]), w = document.createElement("a");
|
|
6537
|
+
w.href = URL.createObjectURL(T), w.download = decodeURI(P || "template.xlsx"), w.click(), URL.revokeObjectURL(w.href), i("download-success");
|
|
6538
|
+
}, O.readAsText(x.data);
|
|
6539
|
+
} catch (x) {
|
|
6540
|
+
ue.error(x.message || "模板下载失败"), i("download-error", x);
|
|
6540
6541
|
}
|
|
6541
|
-
},
|
|
6542
|
+
}, $ = () => {
|
|
6542
6543
|
l.value = !0, u.value = [], y.value = !1;
|
|
6543
6544
|
}, V = () => {
|
|
6544
6545
|
u.value = [], l.value = !1, i("close");
|
|
6545
6546
|
};
|
|
6546
6547
|
n({
|
|
6547
|
-
open:
|
|
6548
|
+
open: $,
|
|
6548
6549
|
close: V
|
|
6549
6550
|
});
|
|
6550
|
-
const
|
|
6551
|
+
const R = () => {
|
|
6551
6552
|
V();
|
|
6552
6553
|
};
|
|
6553
|
-
return (
|
|
6554
|
+
return (x, O) => {
|
|
6554
6555
|
const P = Te("a-space");
|
|
6555
6556
|
return F(), ee(m(Nt), {
|
|
6556
6557
|
visible: l.value,
|
|
@@ -6559,7 +6560,7 @@ const tf = { class: "import-modal-body" }, nf = { class: "option-label" }, rf =
|
|
|
6559
6560
|
width: 550,
|
|
6560
6561
|
"mask-closable": !1,
|
|
6561
6562
|
footer: !1,
|
|
6562
|
-
onCancel:
|
|
6563
|
+
onCancel: R
|
|
6563
6564
|
}, {
|
|
6564
6565
|
default: L(() => [
|
|
6565
6566
|
B("div", tf, [
|
|
@@ -6571,7 +6572,7 @@ const tf = { class: "import-modal-body" }, nf = { class: "option-label" }, rf =
|
|
|
6571
6572
|
multiple: "",
|
|
6572
6573
|
"custom-request": g,
|
|
6573
6574
|
onBeforeUpload: p,
|
|
6574
|
-
onChange:
|
|
6575
|
+
onChange: k
|
|
6575
6576
|
}, {
|
|
6576
6577
|
"upload-button": L(() => [
|
|
6577
6578
|
j(P, null, {
|
|
@@ -6579,7 +6580,7 @@ const tf = { class: "import-modal-body" }, nf = { class: "option-label" }, rf =
|
|
|
6579
6580
|
j(m(He), {
|
|
6580
6581
|
type: "outline",
|
|
6581
6582
|
disabled: d.value,
|
|
6582
|
-
onClick: Ve(
|
|
6583
|
+
onClick: Ve(S, ["stop"])
|
|
6583
6584
|
}, {
|
|
6584
6585
|
default: L(() => [
|
|
6585
6586
|
we(Q(m(r)("common.importModal.downloadTemplate")), 1)
|
|
@@ -7107,17 +7108,17 @@ var fr = (() => {
|
|
|
7107
7108
|
Object.assign(t, i), i = null, t.arguments && t.arguments, t.thisProgram && (l = t.thisProgram), t.quit && t.quit;
|
|
7108
7109
|
var g;
|
|
7109
7110
|
t.wasmBinary && (g = t.wasmBinary), typeof WebAssembly != "object" && Fe("no native wasm support detected");
|
|
7110
|
-
var
|
|
7111
|
+
var k, S = !1, $, V, R, x, O, P, T, w;
|
|
7111
7112
|
function v() {
|
|
7112
|
-
var a =
|
|
7113
|
-
t.HEAP8 =
|
|
7113
|
+
var a = k.buffer;
|
|
7114
|
+
t.HEAP8 = $ = new Int8Array(a), t.HEAP16 = R = new Int16Array(a), t.HEAPU8 = V = new Uint8Array(a), t.HEAPU16 = x = new Uint16Array(a), t.HEAP32 = O = new Int32Array(a), t.HEAPU32 = P = new Uint32Array(a), t.HEAPF32 = T = new Float32Array(a), t.HEAPF64 = w = new Float64Array(a);
|
|
7114
7115
|
}
|
|
7115
|
-
var
|
|
7116
|
+
var E = [], D = [], G = [];
|
|
7116
7117
|
function U() {
|
|
7117
7118
|
if (t.preRun)
|
|
7118
7119
|
for (typeof t.preRun == "function" && (t.preRun = [t.preRun]); t.preRun.length; )
|
|
7119
7120
|
q(t.preRun.shift());
|
|
7120
|
-
Cn(
|
|
7121
|
+
Cn(E);
|
|
7121
7122
|
}
|
|
7122
7123
|
function W() {
|
|
7123
7124
|
Cn(D);
|
|
@@ -7129,7 +7130,7 @@ var fr = (() => {
|
|
|
7129
7130
|
Cn(G);
|
|
7130
7131
|
}
|
|
7131
7132
|
function q(a) {
|
|
7132
|
-
|
|
7133
|
+
E.unshift(a);
|
|
7133
7134
|
}
|
|
7134
7135
|
function pe(a) {
|
|
7135
7136
|
D.unshift(a);
|
|
@@ -7151,7 +7152,7 @@ var fr = (() => {
|
|
|
7151
7152
|
}
|
|
7152
7153
|
function Fe(a) {
|
|
7153
7154
|
var s;
|
|
7154
|
-
(s = t.onAbort) === null || s === void 0 || s.call(t, a), a = "Aborted(" + a + ")", h(a),
|
|
7155
|
+
(s = t.onAbort) === null || s === void 0 || s.call(t, a), a = "Aborted(" + a + ")", h(a), S = !0, a += ". Build with -sASSERTIONS for more info.";
|
|
7155
7156
|
var c = new WebAssembly.RuntimeError(a);
|
|
7156
7157
|
throw o(c), c;
|
|
7157
7158
|
}
|
|
@@ -7193,7 +7194,7 @@ var fr = (() => {
|
|
|
7193
7194
|
a: ri
|
|
7194
7195
|
};
|
|
7195
7196
|
function s(f, C) {
|
|
7196
|
-
return _e = f.exports,
|
|
7197
|
+
return _e = f.exports, k = _e.ia, v(), kr = _e.ma, pe(_e.ja), Ne(), _e;
|
|
7197
7198
|
}
|
|
7198
7199
|
ne();
|
|
7199
7200
|
function c(f) {
|
|
@@ -7215,10 +7216,10 @@ var fr = (() => {
|
|
|
7215
7216
|
var It = [], Ut = 0, ya = (a) => {
|
|
7216
7217
|
var s = new xn(a);
|
|
7217
7218
|
return s.get_caught() || (s.set_caught(!0), Ut--), s.set_rethrown(!1), It.push(s), Dr(s.excPtr), s.get_exception_ptr();
|
|
7218
|
-
},
|
|
7219
|
+
}, rt = 0, ga = () => {
|
|
7219
7220
|
ye(0, 0);
|
|
7220
7221
|
var a = It.pop();
|
|
7221
|
-
Nr(a.excPtr),
|
|
7222
|
+
Nr(a.excPtr), rt = 0;
|
|
7222
7223
|
};
|
|
7223
7224
|
function xn(a) {
|
|
7224
7225
|
this.excPtr = a, this.ptr = a - 24, this.set_type = function(s) {
|
|
@@ -7230,13 +7231,13 @@ var fr = (() => {
|
|
|
7230
7231
|
}, this.get_destructor = function() {
|
|
7231
7232
|
return P[this.ptr + 8 >> 2];
|
|
7232
7233
|
}, this.set_caught = function(s) {
|
|
7233
|
-
s = s ? 1 : 0,
|
|
7234
|
+
s = s ? 1 : 0, $[this.ptr + 12 >> 0] = s;
|
|
7234
7235
|
}, this.get_caught = function() {
|
|
7235
|
-
return
|
|
7236
|
+
return $[this.ptr + 12 >> 0] != 0;
|
|
7236
7237
|
}, this.set_rethrown = function(s) {
|
|
7237
|
-
s = s ? 1 : 0,
|
|
7238
|
+
s = s ? 1 : 0, $[this.ptr + 13 >> 0] = s;
|
|
7238
7239
|
}, this.get_rethrown = function() {
|
|
7239
|
-
return
|
|
7240
|
+
return $[this.ptr + 13 >> 0] != 0;
|
|
7240
7241
|
}, this.init = function(s, c) {
|
|
7241
7242
|
this.set_adjusted_ptr(0), this.set_type(s), this.set_destructor(c);
|
|
7242
7243
|
}, this.set_adjusted_ptr = function(s) {
|
|
@@ -7252,9 +7253,9 @@ var fr = (() => {
|
|
|
7252
7253
|
};
|
|
7253
7254
|
}
|
|
7254
7255
|
var ba = (a) => {
|
|
7255
|
-
throw
|
|
7256
|
+
throw rt || (rt = a), rt;
|
|
7256
7257
|
}, kn = (a) => {
|
|
7257
|
-
var s =
|
|
7258
|
+
var s = rt;
|
|
7258
7259
|
if (!s)
|
|
7259
7260
|
return Ot(0), 0;
|
|
7260
7261
|
var c = new xn(s);
|
|
@@ -7275,10 +7276,10 @@ var fr = (() => {
|
|
|
7275
7276
|
var a = It.pop();
|
|
7276
7277
|
a || Fe("no exception to throw");
|
|
7277
7278
|
var s = a.excPtr;
|
|
7278
|
-
throw a.get_rethrown() || (It.push(a), a.set_rethrown(!0), a.set_caught(!1), Ut++),
|
|
7279
|
+
throw a.get_rethrown() || (It.push(a), a.set_rethrown(!0), a.set_caught(!1), Ut++), rt = s, rt;
|
|
7279
7280
|
}, ka = (a, s, c) => {
|
|
7280
7281
|
var f = new xn(a);
|
|
7281
|
-
throw f.init(s, c),
|
|
7282
|
+
throw f.init(s, c), rt = a, Ut++, rt;
|
|
7282
7283
|
}, $a = () => Ut, Wt = {}, $n = (a) => {
|
|
7283
7284
|
for (; a.length; ) {
|
|
7284
7285
|
var s = a.pop(), c = a.pop();
|
|
@@ -7583,7 +7584,7 @@ var fr = (() => {
|
|
|
7583
7584
|
c = s.$$.smartPtr;
|
|
7584
7585
|
else {
|
|
7585
7586
|
var C = s.clone();
|
|
7586
|
-
c = this.rawShare(c,
|
|
7587
|
+
c = this.rawShare(c, ot.toHandle(() => C.delete())), a !== null && a.push(this.rawDestructor, c);
|
|
7587
7588
|
}
|
|
7588
7589
|
break;
|
|
7589
7590
|
default:
|
|
@@ -7658,7 +7659,7 @@ var fr = (() => {
|
|
|
7658
7659
|
}, c;
|
|
7659
7660
|
}, $r, Pr = (a) => {
|
|
7660
7661
|
var s = Fr(a), c = Re(s);
|
|
7661
|
-
return
|
|
7662
|
+
return at(s), c;
|
|
7662
7663
|
}, Qt = (a, s) => {
|
|
7663
7664
|
var c = [], f = {};
|
|
7664
7665
|
function C(_) {
|
|
@@ -7809,7 +7810,7 @@ var fr = (() => {
|
|
|
7809
7810
|
}, {
|
|
7810
7811
|
value: !1
|
|
7811
7812
|
}), Ue.reserved = Ue.allocated.length, t.count_emval_handles = os;
|
|
7812
|
-
},
|
|
7813
|
+
}, ot = {
|
|
7813
7814
|
toValue: (a) => (a || de("Cannot use deleted val. handle = " + a), Ue.get(a).value),
|
|
7814
7815
|
toHandle: (a) => {
|
|
7815
7816
|
switch (a) {
|
|
@@ -7832,10 +7833,10 @@ var fr = (() => {
|
|
|
7832
7833
|
s = Re(s), Qe(a, {
|
|
7833
7834
|
name: s,
|
|
7834
7835
|
fromWireType: (c) => {
|
|
7835
|
-
var f =
|
|
7836
|
+
var f = ot.toValue(c);
|
|
7836
7837
|
return Vn(c), f;
|
|
7837
7838
|
},
|
|
7838
|
-
toWireType: (c, f) =>
|
|
7839
|
+
toWireType: (c, f) => ot.toHandle(f),
|
|
7839
7840
|
argPackAdvance: Ze,
|
|
7840
7841
|
readValueFromPointer: Pn,
|
|
7841
7842
|
destructorFunction: null
|
|
@@ -7844,15 +7845,15 @@ var fr = (() => {
|
|
|
7844
7845
|
switch (s) {
|
|
7845
7846
|
case 1:
|
|
7846
7847
|
return c ? function(f) {
|
|
7847
|
-
return this.fromWireType(
|
|
7848
|
+
return this.fromWireType($[f >> 0]);
|
|
7848
7849
|
} : function(f) {
|
|
7849
7850
|
return this.fromWireType(V[f >> 0]);
|
|
7850
7851
|
};
|
|
7851
7852
|
case 2:
|
|
7852
7853
|
return c ? function(f) {
|
|
7853
|
-
return this.fromWireType(
|
|
7854
|
+
return this.fromWireType(R[f >> 1]);
|
|
7854
7855
|
} : function(f) {
|
|
7855
|
-
return this.fromWireType(
|
|
7856
|
+
return this.fromWireType(x[f >> 1]);
|
|
7856
7857
|
};
|
|
7857
7858
|
case 4:
|
|
7858
7859
|
return c ? function(f) {
|
|
@@ -7907,7 +7908,7 @@ var fr = (() => {
|
|
|
7907
7908
|
};
|
|
7908
7909
|
case 8:
|
|
7909
7910
|
return function(c) {
|
|
7910
|
-
return this.fromWireType(
|
|
7911
|
+
return this.fromWireType(w[c >> 3]);
|
|
7911
7912
|
};
|
|
7912
7913
|
default:
|
|
7913
7914
|
throw new TypeError(`invalid float width (${s}): ${a}`);
|
|
@@ -7932,9 +7933,9 @@ var fr = (() => {
|
|
|
7932
7933
|
}, ps = (a, s, c) => {
|
|
7933
7934
|
switch (s) {
|
|
7934
7935
|
case 1:
|
|
7935
|
-
return c ? (f) =>
|
|
7936
|
+
return c ? (f) => $[f >> 0] : (f) => V[f >> 0];
|
|
7936
7937
|
case 2:
|
|
7937
|
-
return c ? (f) =>
|
|
7938
|
+
return c ? (f) => R[f >> 1] : (f) => x[f >> 1];
|
|
7938
7939
|
case 4:
|
|
7939
7940
|
return c ? (f) => O[f >> 2] : (f) => P[f >> 2];
|
|
7940
7941
|
default:
|
|
@@ -7965,7 +7966,7 @@ var fr = (() => {
|
|
|
7965
7966
|
var f = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array], C = f[s];
|
|
7966
7967
|
function _(A) {
|
|
7967
7968
|
var M = P[A >> 2], z = P[A + 4 >> 2];
|
|
7968
|
-
return new C(
|
|
7969
|
+
return new C($.buffer, z, M);
|
|
7969
7970
|
}
|
|
7970
7971
|
c = Re(c), Qe(a, {
|
|
7971
7972
|
name: c,
|
|
@@ -8054,7 +8055,7 @@ var fr = (() => {
|
|
|
8054
8055
|
oe[z] = String.fromCharCode(V[_ + z]);
|
|
8055
8056
|
A = oe.join("");
|
|
8056
8057
|
}
|
|
8057
|
-
return
|
|
8058
|
+
return at(f), A;
|
|
8058
8059
|
},
|
|
8059
8060
|
toWireType(f, C) {
|
|
8060
8061
|
C instanceof ArrayBuffer && (C = new Uint8Array(C));
|
|
@@ -8066,26 +8067,26 @@ var fr = (() => {
|
|
|
8066
8067
|
else if (A)
|
|
8067
8068
|
for (var H = 0; H < _; ++H) {
|
|
8068
8069
|
var K = C.charCodeAt(H);
|
|
8069
|
-
K > 255 && (
|
|
8070
|
+
K > 255 && (at(z), de("String has UTF-16 code units that do not fit in 8 bits")), V[z + H] = K;
|
|
8070
8071
|
}
|
|
8071
8072
|
else
|
|
8072
8073
|
for (var H = 0; H < _; ++H)
|
|
8073
8074
|
V[z + H] = C[H];
|
|
8074
|
-
return f !== null && f.push(
|
|
8075
|
+
return f !== null && f.push(at, M), M;
|
|
8075
8076
|
},
|
|
8076
8077
|
argPackAdvance: Ze,
|
|
8077
8078
|
readValueFromPointer: Cr,
|
|
8078
8079
|
destructorFunction(f) {
|
|
8079
|
-
|
|
8080
|
+
at(f);
|
|
8080
8081
|
}
|
|
8081
8082
|
});
|
|
8082
8083
|
}, Mr = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0, bs = (a, s) => {
|
|
8083
|
-
for (var c = a, f = c >> 1, C = f + s / 2; !(f >= C) &&
|
|
8084
|
+
for (var c = a, f = c >> 1, C = f + s / 2; !(f >= C) && x[f]; )
|
|
8084
8085
|
++f;
|
|
8085
8086
|
if (c = f << 1, c - a > 32 && Mr)
|
|
8086
8087
|
return Mr.decode(V.subarray(a, c));
|
|
8087
8088
|
for (var _ = "", A = 0; !(A >= s / 2); ++A) {
|
|
8088
|
-
var M =
|
|
8089
|
+
var M = R[a + A * 2 >> 1];
|
|
8089
8090
|
if (M == 0)
|
|
8090
8091
|
break;
|
|
8091
8092
|
_ += String.fromCharCode(M);
|
|
@@ -8098,9 +8099,9 @@ var fr = (() => {
|
|
|
8098
8099
|
c -= 2;
|
|
8099
8100
|
for (var C = s, _ = c < a.length * 2 ? c / 2 : a.length, A = 0; A < _; ++A) {
|
|
8100
8101
|
var M = a.charCodeAt(A);
|
|
8101
|
-
|
|
8102
|
+
R[s >> 1] = M, s += 2;
|
|
8102
8103
|
}
|
|
8103
|
-
return
|
|
8104
|
+
return R[s >> 1] = 0, s - C;
|
|
8104
8105
|
}, Ss = (a) => a.length * 2, Cs = (a, s) => {
|
|
8105
8106
|
for (var c = 0, f = ""; !(c >= s / 4); ) {
|
|
8106
8107
|
var C = O[a + c * 4 >> 2];
|
|
@@ -8136,7 +8137,7 @@ var fr = (() => {
|
|
|
8136
8137
|
}, $s = (a, s, c) => {
|
|
8137
8138
|
c = Re(c);
|
|
8138
8139
|
var f, C, _, A, M;
|
|
8139
|
-
s === 2 ? (f = bs, C = ws, A = Ss, _ = () =>
|
|
8140
|
+
s === 2 ? (f = bs, C = ws, A = Ss, _ = () => x, M = 1) : s === 4 && (f = Cs, C = xs, A = ks, _ = () => P, M = 2), Qe(a, {
|
|
8140
8141
|
name: c,
|
|
8141
8142
|
fromWireType: (z) => {
|
|
8142
8143
|
for (var H = P[z >> 2], K = _(), re, oe = z + 4, le = 0; le <= H; ++le) {
|
|
@@ -8146,17 +8147,17 @@ var fr = (() => {
|
|
|
8146
8147
|
re === void 0 ? re = he : (re += "\0", re += he), oe = ge + s;
|
|
8147
8148
|
}
|
|
8148
8149
|
}
|
|
8149
|
-
return
|
|
8150
|
+
return at(z), re;
|
|
8150
8151
|
},
|
|
8151
8152
|
toWireType: (z, H) => {
|
|
8152
8153
|
typeof H != "string" && de(`Cannot pass non-string to C++ string type ${c}`);
|
|
8153
8154
|
var K = A(H), re = Ln(4 + K + s);
|
|
8154
|
-
return P[re >> 2] = K >> M, C(H, re + 4, K + s), z !== null && z.push(
|
|
8155
|
+
return P[re >> 2] = K >> M, C(H, re + 4, K + s), z !== null && z.push(at, re), re;
|
|
8155
8156
|
},
|
|
8156
8157
|
argPackAdvance: Ze,
|
|
8157
8158
|
readValueFromPointer: Pn,
|
|
8158
8159
|
destructorFunction(z) {
|
|
8159
|
-
|
|
8160
|
+
at(z);
|
|
8160
8161
|
}
|
|
8161
8162
|
});
|
|
8162
8163
|
}, Ps = (a, s, c, f, C, _) => {
|
|
@@ -8186,7 +8187,7 @@ var fr = (() => {
|
|
|
8186
8187
|
toWireType: (c, f) => {
|
|
8187
8188
|
}
|
|
8188
8189
|
});
|
|
8189
|
-
}, Dn = [], As = (a, s, c, f) => (a = Dn[a], s =
|
|
8190
|
+
}, Dn = [], As = (a, s, c, f) => (a = Dn[a], s = ot.toValue(s), a(null, s, c, f)), Es = {}, Rs = (a) => {
|
|
8190
8191
|
var s = Es[a];
|
|
8191
8192
|
return s === void 0 ? Re(a) : s;
|
|
8192
8193
|
}, Or = () => {
|
|
@@ -8200,7 +8201,7 @@ var fr = (() => {
|
|
|
8200
8201
|
if (typeof $$$embind_global$$$ == "object" || (typeof global == "object" && a(global) ? $$$embind_global$$$ = global : typeof self == "object" && a(self) && ($$$embind_global$$$ = self), typeof $$$embind_global$$$ == "object"))
|
|
8201
8202
|
return $$$embind_global$$$;
|
|
8202
8203
|
throw Error("unable to get global object.");
|
|
8203
|
-
}, Ms = (a) => a === 0 ?
|
|
8204
|
+
}, Ms = (a) => a === 0 ? ot.toHandle(Or()) : (a = Rs(a), ot.toHandle(Or()[a])), Os = (a) => {
|
|
8204
8205
|
var s = Dn.length;
|
|
8205
8206
|
return Dn.push(a), s;
|
|
8206
8207
|
}, Vs = (a, s) => {
|
|
@@ -8209,7 +8210,7 @@ var fr = (() => {
|
|
|
8209
8210
|
return c;
|
|
8210
8211
|
}, js = Reflect.construct, Fs = (a, s, c) => {
|
|
8211
8212
|
var f = [], C = a.toWireType(f, c);
|
|
8212
|
-
return f.length && (P[s >> 2] =
|
|
8213
|
+
return f.length && (P[s >> 2] = ot.toHandle(f)), C;
|
|
8213
8214
|
}, Ns = (a, s, c) => {
|
|
8214
8215
|
var f = Vs(a, s), C = f.shift();
|
|
8215
8216
|
a--;
|
|
@@ -8226,18 +8227,18 @@ var fr = (() => {
|
|
|
8226
8227
|
}, Ds = (a) => {
|
|
8227
8228
|
a > 4 && (Ue.get(a).refcount += 1);
|
|
8228
8229
|
}, Bs = (a) => {
|
|
8229
|
-
var s =
|
|
8230
|
+
var s = ot.toValue(a);
|
|
8230
8231
|
$n(s), Vn(a);
|
|
8231
8232
|
}, Ls = (a, s) => {
|
|
8232
8233
|
a = jn(a, "_emval_take_value");
|
|
8233
8234
|
var c = a.readValueFromPointer(s);
|
|
8234
|
-
return
|
|
8235
|
+
return ot.toHandle(c);
|
|
8235
8236
|
}, zs = () => {
|
|
8236
8237
|
Fe("");
|
|
8237
8238
|
}, Is = (a, s, c) => V.copyWithin(a, s, s + c), Us = () => 2147483648, Ws = (a) => {
|
|
8238
|
-
var s =
|
|
8239
|
+
var s = k.buffer, c = (a - s.byteLength + 65535) / 65536;
|
|
8239
8240
|
try {
|
|
8240
|
-
return
|
|
8241
|
+
return k.grow(c), v(), 1;
|
|
8241
8242
|
} catch {
|
|
8242
8243
|
}
|
|
8243
8244
|
}, Hs = (a) => {
|
|
@@ -8275,8 +8276,8 @@ var fr = (() => {
|
|
|
8275
8276
|
return Mt.strings;
|
|
8276
8277
|
}, Gs = (a, s) => {
|
|
8277
8278
|
for (var c = 0; c < a.length; ++c)
|
|
8278
|
-
|
|
8279
|
-
|
|
8279
|
+
$[s++ >> 0] = a.charCodeAt(c);
|
|
8280
|
+
$[s >> 0] = 0;
|
|
8280
8281
|
}, Js = (a, s) => {
|
|
8281
8282
|
var c = 0;
|
|
8282
8283
|
return Mt().forEach((f, C) => {
|
|
@@ -8307,7 +8308,7 @@ var fr = (() => {
|
|
|
8307
8308
|
return Ar(a, C, 0, C.length), C;
|
|
8308
8309
|
}
|
|
8309
8310
|
var ei = (a, s) => {
|
|
8310
|
-
|
|
8311
|
+
$.set(a, s);
|
|
8311
8312
|
}, ti = (a, s, c, f) => {
|
|
8312
8313
|
var C = P[f + 40 >> 2], _ = {
|
|
8313
8314
|
tm_sec: O[f >> 2],
|
|
@@ -8529,7 +8530,7 @@ var fr = (() => {
|
|
|
8529
8530
|
y: xi,
|
|
8530
8531
|
ga: Ks,
|
|
8531
8532
|
S: ni
|
|
8532
|
-
}, _e = va(),
|
|
8533
|
+
}, _e = va(), at = t._free = (a) => (at = t._free = _e.ka)(a), Ln = t._malloc = (a) => (Ln = t._malloc = _e.la)(a), Fr = (a) => (Fr = _e.na)(a), ye = (a, s) => (ye = _e.oa)(a, s), Ot = (a) => (Ot = _e.pa)(a), Ce = () => (Ce = _e.qa)(), xe = (a) => (xe = _e.ra)(a), Nr = (a) => (Nr = _e.sa)(a), Dr = (a) => (Dr = _e.ta)(a), Br = (a, s, c) => (Br = _e.ua)(a, s, c), Lr = (a) => (Lr = _e.va)(a);
|
|
8533
8534
|
t.dynCall_viijii = (a, s, c, f, C, _, A) => (t.dynCall_viijii = _e.wa)(a, s, c, f, C, _, A);
|
|
8534
8535
|
var zr = t.dynCall_jiiii = (a, s, c, f, C) => (zr = t.dynCall_jiiii = _e.xa)(a, s, c, f, C);
|
|
8535
8536
|
t.dynCall_iiiiij = (a, s, c, f, C, _, A) => (t.dynCall_iiiiij = _e.ya)(a, s, c, f, C, _, A), t.dynCall_iiiiijj = (a, s, c, f, C, _, A, M, z) => (t.dynCall_iiiiijj = _e.za)(a, s, c, f, C, _, A, M, z), t.dynCall_iiiiiijj = (a, s, c, f, C, _, A, M, z, H) => (t.dynCall_iiiiiijj = _e.Aa)(a, s, c, f, C, _, A, M, z, H);
|
|
@@ -8751,7 +8752,7 @@ var fr = (() => {
|
|
|
8751
8752
|
if (ce > 0 || (U(), ce > 0))
|
|
8752
8753
|
return;
|
|
8753
8754
|
function a() {
|
|
8754
|
-
Xt || (Xt = !0, t.calledRun = !0, !
|
|
8755
|
+
Xt || (Xt = !0, t.calledRun = !0, !S && (W(), r(t), t.onRuntimeInitialized && t.onRuntimeInitialized(), J()));
|
|
8755
8756
|
}
|
|
8756
8757
|
t.setStatus ? (t.setStatus("Running..."), setTimeout(function() {
|
|
8757
8758
|
setTimeout(function() {
|
|
@@ -8846,13 +8847,13 @@ class pr extends EventTarget {
|
|
|
8846
8847
|
topRight: { x: u, y: d },
|
|
8847
8848
|
bottomLeft: { x: y, y: b },
|
|
8848
8849
|
bottomRight: { x: p, y: h }
|
|
8849
|
-
} = o.position, g = Math.min(i, u, y, p),
|
|
8850
|
+
} = o.position, g = Math.min(i, u, y, p), k = Math.min(l, d, b, h), S = Math.max(i, u, y, p), $ = Math.max(l, d, b, h);
|
|
8850
8851
|
return {
|
|
8851
8852
|
boundingBox: new DOMRectReadOnly(
|
|
8852
8853
|
g,
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
|
|
8854
|
+
k,
|
|
8855
|
+
S - g,
|
|
8856
|
+
$ - k
|
|
8856
8857
|
),
|
|
8857
8858
|
rawValue: o.text,
|
|
8858
8859
|
format: lf(o.format),
|
|
@@ -8939,11 +8940,11 @@ const Nf = async (e, {
|
|
|
8939
8940
|
if (u - d < r)
|
|
8940
8941
|
window.requestAnimationFrame(i(l));
|
|
8941
8942
|
else {
|
|
8942
|
-
const p = await ta.detect(e), h = p.some((
|
|
8943
|
+
const p = await ta.detect(e), h = p.some((S) => !y.includes(S.rawValue));
|
|
8943
8944
|
h && n(p);
|
|
8944
8945
|
const g = p.length > 0;
|
|
8945
8946
|
g && t(p), !g && b && t(p);
|
|
8946
|
-
const
|
|
8947
|
+
const k = {
|
|
8947
8948
|
lastScanned: u,
|
|
8948
8949
|
lastScanHadContent: g,
|
|
8949
8950
|
// It can happen that a QR code is constantly in view of the camera but
|
|
@@ -8951,9 +8952,9 @@ const Nf = async (e, {
|
|
|
8951
8952
|
// next frame we detect the code again. We also want to avoid emitting
|
|
8952
8953
|
// a `detect` event in such a case. So we don't reset `contentBefore`,
|
|
8953
8954
|
// if we detect nothing, only if we detect something new.
|
|
8954
|
-
contentBefore: h ? p.map((
|
|
8955
|
+
contentBefore: h ? p.map((S) => S.rawValue) : y
|
|
8955
8956
|
};
|
|
8956
|
-
window.requestAnimationFrame(i(
|
|
8957
|
+
window.requestAnimationFrame(i(k));
|
|
8957
8958
|
}
|
|
8958
8959
|
}
|
|
8959
8960
|
};
|
|
@@ -8971,20 +8972,20 @@ const Nf = async (e, {
|
|
|
8971
8972
|
const t = new pr({ formats: n }), r = await Df(e);
|
|
8972
8973
|
return await t.detect(r);
|
|
8973
8974
|
};
|
|
8974
|
-
var oa = {},
|
|
8975
|
-
Object.defineProperty(
|
|
8975
|
+
var oa = {}, Le = {};
|
|
8976
|
+
Object.defineProperty(Le, "__esModule", {
|
|
8976
8977
|
value: !0
|
|
8977
8978
|
});
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
var Lf =
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
8979
|
+
Le.compactObject = ia;
|
|
8980
|
+
Le.deprecated = Jf;
|
|
8981
|
+
var Lf = Le.detectBrowser = Yf;
|
|
8982
|
+
Le.disableLog = Hf;
|
|
8983
|
+
Le.disableWarnings = qf;
|
|
8984
|
+
Le.extractVersion = ln;
|
|
8985
|
+
Le.filterStats = Kf;
|
|
8986
|
+
Le.log = Gf;
|
|
8987
|
+
Le.walkStats = vn;
|
|
8988
|
+
Le.wrapPeerConnectionEvent = Wf;
|
|
8988
8989
|
function zf(e, n, t) {
|
|
8989
8990
|
return n = If(n), n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
|
|
8990
8991
|
}
|
|
@@ -9115,7 +9116,7 @@ function Kf(e, n, t) {
|
|
|
9115
9116
|
Object.defineProperty(oa, "__esModule", {
|
|
9116
9117
|
value: !0
|
|
9117
9118
|
});
|
|
9118
|
-
var Qf = oa.shimGetUserMedia = ep, Zf = Xf(
|
|
9119
|
+
var Qf = oa.shimGetUserMedia = ep, Zf = Xf(Le);
|
|
9119
9120
|
function la(e) {
|
|
9120
9121
|
if (typeof WeakMap != "function")
|
|
9121
9122
|
return null;
|
|
@@ -9162,16 +9163,16 @@ function ep(e, n) {
|
|
|
9162
9163
|
ideal: d[b]
|
|
9163
9164
|
};
|
|
9164
9165
|
p.exact !== void 0 && typeof p.exact == "number" && (p.min = p.max = p.exact);
|
|
9165
|
-
var h = function(
|
|
9166
|
-
return
|
|
9166
|
+
var h = function(k, S) {
|
|
9167
|
+
return k ? k + S.charAt(0).toUpperCase() + S.slice(1) : S === "deviceId" ? "sourceId" : S;
|
|
9167
9168
|
};
|
|
9168
9169
|
if (p.ideal !== void 0) {
|
|
9169
9170
|
y.optional = y.optional || [];
|
|
9170
9171
|
var g = {};
|
|
9171
9172
|
typeof p.ideal == "number" ? (g[h("min", b)] = p.ideal, y.optional.push(g), g = {}, g[h("max", b)] = p.ideal, y.optional.push(g)) : (g[h("", b)] = p.ideal, y.optional.push(g));
|
|
9172
9173
|
}
|
|
9173
|
-
p.exact !== void 0 && typeof p.exact != "number" ? (y.mandatory = y.mandatory || {}, y.mandatory[h("", b)] = p.exact) : ["min", "max"].forEach(function(
|
|
9174
|
-
p[
|
|
9174
|
+
p.exact !== void 0 && typeof p.exact != "number" ? (y.mandatory = y.mandatory || {}, y.mandatory[h("", b)] = p.exact) : ["min", "max"].forEach(function(k) {
|
|
9175
|
+
p[k] !== void 0 && (y.mandatory = y.mandatory || {}, y.mandatory[h(k, b)] = p[k]);
|
|
9175
9176
|
});
|
|
9176
9177
|
}
|
|
9177
9178
|
}), d.advanced && (y.optional = (y.optional || []).concat(d.advanced)), y;
|
|
@@ -9179,8 +9180,8 @@ function ep(e, n) {
|
|
|
9179
9180
|
if (n.version >= 61)
|
|
9180
9181
|
return y(d);
|
|
9181
9182
|
if (d = JSON.parse(JSON.stringify(d)), d && ct(d.audio) === "object") {
|
|
9182
|
-
var b = function(
|
|
9183
|
-
|
|
9183
|
+
var b = function(k, S, $) {
|
|
9184
|
+
S in k && !($ in k) && (k[$] = k[S], delete k[S]);
|
|
9184
9185
|
};
|
|
9185
9186
|
d = JSON.parse(JSON.stringify(d)), b(d.audio, "autoGainControl", "googAutoGainControl"), b(d.audio, "noiseSuppression", "googNoiseSuppression"), d.audio = r(d.audio);
|
|
9186
9187
|
}
|
|
@@ -9194,19 +9195,19 @@ function ep(e, n) {
|
|
|
9194
9195
|
delete d.video.facingMode;
|
|
9195
9196
|
var g;
|
|
9196
9197
|
if (p.exact === "environment" || p.ideal === "environment" ? g = ["back", "rear"] : (p.exact === "user" || p.ideal === "user") && (g = ["front"]), g)
|
|
9197
|
-
return t.mediaDevices.enumerateDevices().then(function(
|
|
9198
|
-
|
|
9199
|
-
return
|
|
9198
|
+
return t.mediaDevices.enumerateDevices().then(function(k) {
|
|
9199
|
+
k = k.filter(function($) {
|
|
9200
|
+
return $.kind === "videoinput";
|
|
9200
9201
|
});
|
|
9201
|
-
var
|
|
9202
|
+
var S = k.find(function($) {
|
|
9202
9203
|
return g.some(function(V) {
|
|
9203
|
-
return
|
|
9204
|
+
return $.label.toLowerCase().includes(V);
|
|
9204
9205
|
});
|
|
9205
9206
|
});
|
|
9206
|
-
return !
|
|
9207
|
-
exact:
|
|
9207
|
+
return !S && k.length && g.includes("back") && (S = k[k.length - 1]), S && (d.video.deviceId = p.exact ? {
|
|
9208
|
+
exact: S.deviceId
|
|
9208
9209
|
} : {
|
|
9209
|
-
ideal:
|
|
9210
|
+
ideal: S.deviceId
|
|
9210
9211
|
}), d.video = r(d.video), so("chrome: " + JSON.stringify(d)), y(d);
|
|
9211
9212
|
});
|
|
9212
9213
|
}
|
|
@@ -9263,7 +9264,7 @@ var ca = {};
|
|
|
9263
9264
|
Object.defineProperty(ca, "__esModule", {
|
|
9264
9265
|
value: !0
|
|
9265
9266
|
});
|
|
9266
|
-
var tp = ca.shimGetUserMedia = op, np = rp(
|
|
9267
|
+
var tp = ca.shimGetUserMedia = op, np = rp(Le);
|
|
9267
9268
|
function ua(e) {
|
|
9268
9269
|
if (typeof WeakMap != "function")
|
|
9269
9270
|
return null;
|
|
@@ -9321,20 +9322,20 @@ function op(e, n) {
|
|
|
9321
9322
|
}
|
|
9322
9323
|
}
|
|
9323
9324
|
}
|
|
9324
|
-
var
|
|
9325
|
-
Object.defineProperty(
|
|
9325
|
+
var nt = {};
|
|
9326
|
+
Object.defineProperty(nt, "__esModule", {
|
|
9326
9327
|
value: !0
|
|
9327
9328
|
});
|
|
9328
|
-
|
|
9329
|
-
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
var ap =
|
|
9333
|
-
|
|
9334
|
-
|
|
9335
|
-
|
|
9336
|
-
|
|
9337
|
-
var da = sp(
|
|
9329
|
+
nt.shimAudioContext = mp;
|
|
9330
|
+
nt.shimCallbacksAPI = cp;
|
|
9331
|
+
nt.shimConstraints = pa;
|
|
9332
|
+
nt.shimCreateOfferLegacy = pp;
|
|
9333
|
+
var ap = nt.shimGetUserMedia = up;
|
|
9334
|
+
nt.shimLocalStreamsAPI = ip;
|
|
9335
|
+
nt.shimRTCIceServerUrls = dp;
|
|
9336
|
+
nt.shimRemoteStreamsAPI = lp;
|
|
9337
|
+
nt.shimTrackEventTransceiver = fp;
|
|
9338
|
+
var da = sp(Le);
|
|
9338
9339
|
function fa(e) {
|
|
9339
9340
|
if (typeof WeakMap != "function")
|
|
9340
9341
|
return null;
|
|
@@ -9662,14 +9663,14 @@ const gp = /* @__PURE__ */ te({
|
|
|
9662
9663
|
const t = e, r = n, o = Z(t.constraints), i = Z(t.formats);
|
|
9663
9664
|
be(
|
|
9664
9665
|
() => t.constraints,
|
|
9665
|
-
(
|
|
9666
|
-
JSON.stringify(
|
|
9666
|
+
(x, O) => {
|
|
9667
|
+
JSON.stringify(x) !== JSON.stringify(O) && (o.value = x);
|
|
9667
9668
|
},
|
|
9668
9669
|
{ deep: !0 }
|
|
9669
9670
|
), be(
|
|
9670
9671
|
() => t.formats,
|
|
9671
|
-
(
|
|
9672
|
-
JSON.stringify(
|
|
9672
|
+
(x, O) => {
|
|
9673
|
+
JSON.stringify(x) !== JSON.stringify(O) && (i.value = x);
|
|
9673
9674
|
},
|
|
9674
9675
|
{ deep: !0 }
|
|
9675
9676
|
);
|
|
@@ -9686,7 +9687,7 @@ const gp = /* @__PURE__ */ te({
|
|
|
9686
9687
|
}));
|
|
9687
9688
|
be(
|
|
9688
9689
|
p,
|
|
9689
|
-
async (
|
|
9690
|
+
async (x) => {
|
|
9690
9691
|
const O = d.value;
|
|
9691
9692
|
Xe(
|
|
9692
9693
|
O !== void 0,
|
|
@@ -9698,24 +9699,24 @@ const gp = /* @__PURE__ */ te({
|
|
|
9698
9699
|
"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined."
|
|
9699
9700
|
);
|
|
9700
9701
|
const T = P.getContext("2d");
|
|
9701
|
-
if (Xe(T !== null, "if cavnas is defined, canvas 2d context should also be non-null"),
|
|
9702
|
+
if (Xe(T !== null, "if cavnas is defined, canvas 2d context should also be non-null"), x.shouldStream) {
|
|
9702
9703
|
rn(), y.value = !1;
|
|
9703
9704
|
try {
|
|
9704
|
-
const
|
|
9705
|
-
b.value ? (y.value = !0, r("camera-on",
|
|
9706
|
-
} catch (
|
|
9707
|
-
r("error",
|
|
9705
|
+
const w = await yp(O, x);
|
|
9706
|
+
b.value ? (y.value = !0, r("camera-on", w)) : await rn();
|
|
9707
|
+
} catch (w) {
|
|
9708
|
+
r("error", w);
|
|
9708
9709
|
}
|
|
9709
9710
|
} else
|
|
9710
9711
|
P.width = O.videoWidth, P.height = O.videoHeight, T.drawImage(O, 0, 0, O.videoWidth, O.videoHeight), rn(), y.value = !1, r("camera-off");
|
|
9711
9712
|
},
|
|
9712
9713
|
{ deep: !0 }
|
|
9713
|
-
), be(i, (
|
|
9714
|
-
b.value && na(
|
|
9714
|
+
), be(i, (x) => {
|
|
9715
|
+
b.value && na(x);
|
|
9715
9716
|
});
|
|
9716
9717
|
const h = N(() => p.value.shouldStream && y.value);
|
|
9717
|
-
be(h, (
|
|
9718
|
-
if (
|
|
9718
|
+
be(h, (x) => {
|
|
9719
|
+
if (x) {
|
|
9719
9720
|
Xe(
|
|
9720
9721
|
l.value !== void 0,
|
|
9721
9722
|
"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"
|
|
@@ -9730,15 +9731,15 @@ const gp = /* @__PURE__ */ te({
|
|
|
9730
9731
|
), Nf(d.value, {
|
|
9731
9732
|
detectHandler: (P) => r("detect", P),
|
|
9732
9733
|
formats: i.value,
|
|
9733
|
-
locateHandler:
|
|
9734
|
+
locateHandler: k,
|
|
9734
9735
|
minDelay: O()
|
|
9735
9736
|
});
|
|
9736
9737
|
}
|
|
9737
9738
|
});
|
|
9738
|
-
const g = (
|
|
9739
|
-
const O =
|
|
9740
|
-
Xe(O !== null, "canvas 2d context should always be non-null"), O.clearRect(0, 0,
|
|
9741
|
-
},
|
|
9739
|
+
const g = (x) => {
|
|
9740
|
+
const O = x.getContext("2d");
|
|
9741
|
+
Xe(O !== null, "canvas 2d context should always be non-null"), O.clearRect(0, 0, x.width, x.height);
|
|
9742
|
+
}, k = (x) => {
|
|
9742
9743
|
const O = u.value;
|
|
9743
9744
|
Xe(
|
|
9744
9745
|
O !== void 0,
|
|
@@ -9748,16 +9749,16 @@ const gp = /* @__PURE__ */ te({
|
|
|
9748
9749
|
if (Xe(
|
|
9749
9750
|
P !== void 0,
|
|
9750
9751
|
"onLocate handler should only be called when component is mounted. Thus video element is always defined."
|
|
9751
|
-
),
|
|
9752
|
+
), x.length === 0 || t.track === void 0)
|
|
9752
9753
|
g(O);
|
|
9753
9754
|
else {
|
|
9754
|
-
const T = P.offsetWidth,
|
|
9755
|
+
const T = P.offsetWidth, w = P.offsetHeight, v = P.videoWidth, E = P.videoHeight, D = Math.max(T / v, w / E), G = v * D, U = E * D, W = G / v, J = U / E, q = (T - G) / 2, pe = (w - U) / 2, Ae = ({ x: Ne, y: Fe }) => ({
|
|
9755
9756
|
x: Math.floor(Ne * W),
|
|
9756
9757
|
y: Math.floor(Fe * J)
|
|
9757
9758
|
}), ce = ({ x: Ne, y: Fe }) => ({
|
|
9758
9759
|
x: Math.floor(Ne + q),
|
|
9759
9760
|
y: Math.floor(Fe + pe)
|
|
9760
|
-
}), me =
|
|
9761
|
+
}), me = x.map((Ne) => {
|
|
9761
9762
|
const { boundingBox: Fe, cornerPoints: wn } = Ne, { x: Bt, y: lt } = ce(
|
|
9762
9763
|
Ae({
|
|
9763
9764
|
x: Fe.x,
|
|
@@ -9777,7 +9778,7 @@ const gp = /* @__PURE__ */ te({
|
|
|
9777
9778
|
const ne = O.getContext("2d");
|
|
9778
9779
|
Xe(ne !== null, "canvas 2d context should always be non-null"), t.track(me, ne);
|
|
9779
9780
|
}
|
|
9780
|
-
},
|
|
9781
|
+
}, S = {
|
|
9781
9782
|
width: "100%",
|
|
9782
9783
|
height: "100%",
|
|
9783
9784
|
position: "relative",
|
|
@@ -9785,7 +9786,7 @@ const gp = /* @__PURE__ */ te({
|
|
|
9785
9786
|
// If z-index is not defined, elements are stacked in the order they appear in the DOM.
|
|
9786
9787
|
// The first element is at the very bottom and subsequent elements are added on top.
|
|
9787
9788
|
"z-index": "0"
|
|
9788
|
-
},
|
|
9789
|
+
}, $ = {
|
|
9789
9790
|
width: "100%",
|
|
9790
9791
|
height: "100%",
|
|
9791
9792
|
position: "absolute",
|
|
@@ -9795,16 +9796,16 @@ const gp = /* @__PURE__ */ te({
|
|
|
9795
9796
|
width: "100%",
|
|
9796
9797
|
height: "100%",
|
|
9797
9798
|
"object-fit": "cover"
|
|
9798
|
-
},
|
|
9799
|
+
}, R = N(() => h.value ? V : {
|
|
9799
9800
|
...V,
|
|
9800
9801
|
visibility: "hidden",
|
|
9801
9802
|
position: "absolute"
|
|
9802
9803
|
});
|
|
9803
|
-
return (
|
|
9804
|
+
return (x, O) => (F(), Y("div", { style: S }, [
|
|
9804
9805
|
B("video", {
|
|
9805
9806
|
ref_key: "videoRef",
|
|
9806
9807
|
ref: d,
|
|
9807
|
-
style: je(
|
|
9808
|
+
style: je(R.value),
|
|
9808
9809
|
autoplay: "",
|
|
9809
9810
|
muted: "",
|
|
9810
9811
|
playsinline: ""
|
|
@@ -9821,10 +9822,10 @@ const gp = /* @__PURE__ */ te({
|
|
|
9821
9822
|
id: "qrcode-stream-tracking-layer",
|
|
9822
9823
|
ref_key: "trackingLayerRef",
|
|
9823
9824
|
ref: u,
|
|
9824
|
-
style:
|
|
9825
|
+
style: $
|
|
9825
9826
|
}, null, 512),
|
|
9826
|
-
B("div", { style:
|
|
9827
|
-
ie(
|
|
9827
|
+
B("div", { style: $ }, [
|
|
9828
|
+
ie(x.$slots, "default")
|
|
9828
9829
|
])
|
|
9829
9830
|
]));
|
|
9830
9831
|
}
|
|
@@ -9963,7 +9964,7 @@ const gp = /* @__PURE__ */ te({
|
|
|
9963
9964
|
}
|
|
9964
9965
|
});
|
|
9965
9966
|
export {
|
|
9966
|
-
|
|
9967
|
+
Be as DEFAULT_FORM_COMMON_CONFIG,
|
|
9967
9968
|
Jp as EditRender,
|
|
9968
9969
|
Bp as ErrorBoundary,
|
|
9969
9970
|
mu as FormApi,
|