@unizhen/ui 0.1.134 → 0.1.136
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/lib/ui.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { Fragment as e, Transition as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createSlots as s, createTextVNode as c, createVNode as l, defineAsyncComponent as u, defineComponent as d, h as f, inject as p, markRaw as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, onUnmounted as b, openBlock as x, provide as S, reactive as C, ref as w, renderList as T, renderSlot as E, resolveComponent as D, resolveDirective as O, resolveDynamicComponent as k, toDisplayString as A, useId as ee, vShow as j, watch as M, watchEffect as N, withCtx as P, withDirectives as F, withKeys as te, withModifiers as I } from "vue";
|
|
2
|
-
import { NButton as L, NButtonGroup as R, NCascader as ne, NCheckbox as
|
|
3
|
-
import { createI18n as
|
|
4
|
-
import
|
|
5
|
-
import { createRouter as
|
|
6
|
-
import { cloneDeep as
|
|
7
|
-
import
|
|
8
|
-
import { VueDraggable as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { UzNumberFlow as
|
|
12
|
-
import
|
|
13
|
-
import { OEM as
|
|
2
|
+
import { NButton as L, NButtonGroup as R, NCascader as ne, NCheckbox as z, NCheckboxGroup as re, NColorPicker as B, NConfigProvider as ie, NDataTable as ae, NDatePicker as oe, NDivider as se, NDrawer as ce, NDrawerContent as le, NDropdown as ue, NEllipsis as de, NFlex as V, NForm as fe, NFormItem as pe, NGrid as me, NGridItem as he, NIcon as H, NImage as ge, NImageGroup as _e, NInput as ve, NInputGroup as ye, NInputGroupLabel as be, NInputNumber as xe, NModal as Se, NPagination as Ce, NPopconfirm as we, NPopover as Te, NRadio as Ee, NRadioGroup as De, NSelect as Oe, NSkeleton as ke, NSpace as Ae, NSpin as je, NSwitch as Me, NTabPane as Ne, NTabs as Pe, NTimePicker as Fe, NTooltip as Ie, NUpload as Le, NUploadDragger as Re, createDiscreteApi as ze, darkTheme as U, dateZhCN as Be, useNotification as Ve, zhCN as He } from "naive-ui";
|
|
3
|
+
import { createI18n as Ue, useI18n as W } from "vue-i18n";
|
|
4
|
+
import We from "axios";
|
|
5
|
+
import { createRouter as Ge, createWebHistory as Ke, useRoute as qe, useRouter as Je } from "vue-router";
|
|
6
|
+
import { cloneDeep as G, compact as Ye, debounce as Xe, throttle as Ze } from "lodash-es";
|
|
7
|
+
import Qe from "dayjs";
|
|
8
|
+
import { VueDraggable as $e } from "vue-draggable-plus";
|
|
9
|
+
import et from "json5";
|
|
10
|
+
import tt from "sortablejs";
|
|
11
|
+
import { UzNumberFlow as nt } from "@unizhen/number";
|
|
12
|
+
import rt from "jsqr";
|
|
13
|
+
import { OEM as it, PSM as at, createWorker as ot } from "tesseract.js";
|
|
14
14
|
//#region \0rolldown/runtime.js
|
|
15
|
-
var
|
|
15
|
+
var st = Object.defineProperty, ct = (e, t) => {
|
|
16
16
|
let n = {};
|
|
17
|
-
for (var r in e)
|
|
17
|
+
for (var r in e) st(n, r, {
|
|
18
18
|
get: e[r],
|
|
19
19
|
enumerable: !0
|
|
20
20
|
});
|
|
21
|
-
return t ||
|
|
22
|
-
},
|
|
21
|
+
return t || st(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
22
|
+
}, lt = d({
|
|
23
23
|
name: "UzActionButton",
|
|
24
24
|
props: {
|
|
25
25
|
data: {
|
|
@@ -49,33 +49,33 @@ var ct = Object.defineProperty, lt = (e, t) => {
|
|
|
49
49
|
hProps: e.hProps
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
}),
|
|
53
|
-
function
|
|
54
|
-
|
|
52
|
+
}), ut = window.localStorage;
|
|
53
|
+
function dt(e, t) {
|
|
54
|
+
ut.setItem(e, JSON.stringify(t));
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
let t =
|
|
56
|
+
function ft(e) {
|
|
57
|
+
let t = ut.getItem(e);
|
|
58
58
|
if (t) return JSON.parse(t);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
60
|
+
function pt(e) {
|
|
61
|
+
ut.removeItem(e);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function mt() {
|
|
64
64
|
return Date.parse(String(/* @__PURE__ */ new Date()));
|
|
65
65
|
}
|
|
66
|
-
var
|
|
66
|
+
var ht = "local-", gt = class {
|
|
67
67
|
namespace;
|
|
68
68
|
mapKey;
|
|
69
69
|
map;
|
|
70
70
|
constructor(e = "") {
|
|
71
|
-
this.namespace = e, this.mapKey =
|
|
71
|
+
this.namespace = e, this.mapKey = ht + this.namespace, this.map = ft(this.mapKey) || {};
|
|
72
72
|
}
|
|
73
73
|
set(e, t, n = 0) {
|
|
74
74
|
let r = this.getReallyKey(e), i = {
|
|
75
75
|
expires: n,
|
|
76
|
-
time:
|
|
76
|
+
time: mt()
|
|
77
77
|
};
|
|
78
|
-
|
|
78
|
+
dt(r, t), this.map[e] = i, dt(this.mapKey, this.map);
|
|
79
79
|
}
|
|
80
80
|
getReallyKey(e) {
|
|
81
81
|
return this.namespace + "-" + e;
|
|
@@ -83,9 +83,9 @@ var gt = "local-", _t = class {
|
|
|
83
83
|
get(e, t) {
|
|
84
84
|
let n = this.getReallyKey(e), r = this.map[e];
|
|
85
85
|
if (r) {
|
|
86
|
-
let i =
|
|
86
|
+
let i = ft(n);
|
|
87
87
|
if (r.expires > 0) {
|
|
88
|
-
if (
|
|
88
|
+
if (mt() - r.time <= r.expires) return i === !1 || i ? i : t;
|
|
89
89
|
this.delete(e);
|
|
90
90
|
} else return i === !1 || i ? i : t;
|
|
91
91
|
}
|
|
@@ -93,7 +93,7 @@ var gt = "local-", _t = class {
|
|
|
93
93
|
}
|
|
94
94
|
delete(e) {
|
|
95
95
|
let t = this.getReallyKey(e);
|
|
96
|
-
delete this.map[e],
|
|
96
|
+
delete this.map[e], dt(this.mapKey, this.map), pt(t);
|
|
97
97
|
}
|
|
98
98
|
deleteByPrefix(e) {
|
|
99
99
|
for (let t in this.map) t.indexOf(e) > -1 && this.delete(t);
|
|
@@ -101,7 +101,7 @@ var gt = "local-", _t = class {
|
|
|
101
101
|
deleteAll() {
|
|
102
102
|
for (let e in this.map) this.delete(e);
|
|
103
103
|
}
|
|
104
|
-
},
|
|
104
|
+
}, K = Ue({
|
|
105
105
|
legacy: !1,
|
|
106
106
|
locale: "zh-CN",
|
|
107
107
|
messages: {
|
|
@@ -351,17 +351,17 @@ var gt = "local-", _t = class {
|
|
|
351
351
|
},
|
|
352
352
|
"fr-FR": {}
|
|
353
353
|
}
|
|
354
|
-
}),
|
|
354
|
+
}), _t = new gt("uz"), vt = new Intl.Collator("zh-Hans-u-co-pinyin"), yt = [..."阿八嚓哒妸发旮哈讥咔垃妈拏噢妑七呥仨他屲夕丫帀"], bt = [..."ABCDEFGHJKLMNOPQRSTWXYZ"], { notification: xt, dialog: St } = ze(["notification", "dialog"], {
|
|
355
355
|
configProviderProps: { themeOverrides: { common: { borderRadius: "12px" } } },
|
|
356
356
|
notificationProviderProps: { placement: "bottom-right" }
|
|
357
|
-
}),
|
|
358
|
-
function
|
|
359
|
-
console.log(e),
|
|
357
|
+
}), Ct = xt, wt = St;
|
|
358
|
+
function q(e) {
|
|
359
|
+
console.log(e), xt.error({
|
|
360
360
|
content: e.message,
|
|
361
361
|
duration: 3e3
|
|
362
362
|
});
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function J(e, t, n = "1 Day") {
|
|
365
365
|
if (typeof n == "string") {
|
|
366
366
|
let e = 0, t = n.split(" ");
|
|
367
367
|
switch (t[1]) {
|
|
@@ -378,18 +378,18 @@ function q(e, t, n = "1 Day") {
|
|
|
378
378
|
}
|
|
379
379
|
n = Number(t[0]) * e;
|
|
380
380
|
}
|
|
381
|
-
|
|
381
|
+
_t.set(e, t, n);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
384
|
-
return
|
|
383
|
+
function Y(e, t) {
|
|
384
|
+
return _t.get(e, t);
|
|
385
385
|
}
|
|
386
|
-
var
|
|
387
|
-
|
|
388
|
-
},
|
|
389
|
-
|
|
390
|
-
},
|
|
391
|
-
|
|
392
|
-
},
|
|
386
|
+
var Tt = (e) => {
|
|
387
|
+
_t.delete(e);
|
|
388
|
+
}, Et = (e) => {
|
|
389
|
+
_t.deleteByPrefix(e);
|
|
390
|
+
}, Dt = () => {
|
|
391
|
+
_t.deleteAll();
|
|
392
|
+
}, Ot = (e = 0) => {
|
|
393
393
|
let t = document.documentElement, n = document.querySelectorAll(".uz-table-m-content");
|
|
394
394
|
t && (t.scrollTop = e, setTimeout(() => {
|
|
395
395
|
t.scrollTop = e;
|
|
@@ -397,7 +397,7 @@ var Et = (e) => {
|
|
|
397
397
|
t.scrollTop = e;
|
|
398
398
|
});
|
|
399
399
|
};
|
|
400
|
-
function
|
|
400
|
+
function kt(e) {
|
|
401
401
|
if (!e.records) {
|
|
402
402
|
let t = e;
|
|
403
403
|
return {
|
|
@@ -414,7 +414,7 @@ function At(e) {
|
|
|
414
414
|
showQuickJumper: !0,
|
|
415
415
|
showSizePicker: !0,
|
|
416
416
|
pageSlot: 8,
|
|
417
|
-
prefix: () => f("div", {}, { default: () =>
|
|
417
|
+
prefix: () => f("div", {}, { default: () => K.global.t("Common.totalRecords", { count: t.length }) })
|
|
418
418
|
},
|
|
419
419
|
records: t
|
|
420
420
|
};
|
|
@@ -436,12 +436,12 @@ function At(e) {
|
|
|
436
436
|
showQuickJumper: !0,
|
|
437
437
|
showSizePicker: !0,
|
|
438
438
|
pageSlot: 8,
|
|
439
|
-
prefix: () => f("div", {}, { default: () => e.query.pageCount ?
|
|
439
|
+
prefix: () => f("div", {}, { default: () => e.query.pageCount ? K.global.t("Common.totalRecords", { count: e.query.pageCount }) : null })
|
|
440
440
|
},
|
|
441
441
|
records: e.records
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
|
-
var
|
|
444
|
+
var At = (e, t = "yyyy-MM-dd") => {
|
|
445
445
|
if (!e) return "";
|
|
446
446
|
typeof e == "string" && (e = e.replace(/年/g, "-").replace(/月/g, "-").replace(/日/g, ""));
|
|
447
447
|
let n = new Date(e);
|
|
@@ -459,9 +459,9 @@ var jt = (e, t = "yyyy-MM-dd") => {
|
|
|
459
459
|
RegExp.$1.length !== 1 && (n = ("00" + r[e]).substr(("" + r[e]).length)), t = t.replace(RegExp.$1, n);
|
|
460
460
|
}
|
|
461
461
|
return t;
|
|
462
|
-
},
|
|
463
|
-
document.title = `${e} - ${
|
|
464
|
-
},
|
|
462
|
+
}, jt = (e) => {
|
|
463
|
+
document.title = `${e} - ${X.title}`;
|
|
464
|
+
}, Mt = (e, t = 500) => {
|
|
465
465
|
let n = e, r, i = !1, a = function(...e) {
|
|
466
466
|
i ? (n.apply(a, e), i = !1) : r ||= setTimeout(function() {
|
|
467
467
|
r && clearTimeout(r), r = void 0, n.apply(a, e);
|
|
@@ -469,10 +469,10 @@ var jt = (e, t = "yyyy-MM-dd") => {
|
|
|
469
469
|
};
|
|
470
470
|
return a;
|
|
471
471
|
};
|
|
472
|
-
function
|
|
472
|
+
function Nt(e, t) {
|
|
473
473
|
e.requestFullscreen ? (t && (e.onfullscreenchange = t), e.requestFullscreen()) : e.mozRequestFullScreen ? (t && (e.onmozfullscreenchange = t), e.mozRequestFullScreen()) : e.webkitRequestFullscreen ? (t && (e.onwebkitfullscreenchange = t), e.webkitRequestFullscreen()) : e.msRequestFullscreen && (t && (e.onmsfullscreenchange = t), e.msRequestFullscreen());
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Pt(e, t = 0) {
|
|
476
476
|
let n = [
|
|
477
477
|
"",
|
|
478
478
|
"k",
|
|
@@ -482,20 +482,20 @@ function Ft(e, t = 0) {
|
|
|
482
482
|
], r = Math.floor(Math.log10(Math.abs(e)) / 3), i = Math.max(0, Math.min(r, n.length - 1)), a = n[i];
|
|
483
483
|
return a ? (e / 10 ** (i * 3)).toFixed(t) + a : (e / 10 ** (i * 3)).toFixed(0);
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function Ft(e) {
|
|
486
486
|
if (/^[a-z0-9]$/i.test(e)) return e.toLowerCase();
|
|
487
487
|
if (!/^[\u4e00-\u9fff]$/.test(e)) return "";
|
|
488
|
-
for (let t =
|
|
488
|
+
for (let t = yt.length - 1; t >= 0; --t) if (vt.compare(e, yt[t]) >= 0) return bt[t].toLowerCase();
|
|
489
489
|
return "";
|
|
490
490
|
}
|
|
491
|
-
function
|
|
492
|
-
return [...String(e)].map(
|
|
491
|
+
function It(e) {
|
|
492
|
+
return [...String(e)].map(Ft).join("");
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function Lt(e, t) {
|
|
495
495
|
let n = String(t).trim().toLowerCase();
|
|
496
|
-
return n === "" || e.toLowerCase().includes(n) ||
|
|
496
|
+
return n === "" || e.toLowerCase().includes(n) || It(e).includes(n);
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function Rt(e, t) {
|
|
499
499
|
e.forEach((e) => {
|
|
500
500
|
let n = t.find((t) => t.key === e.key);
|
|
501
501
|
n && (e.hide = n.hide, e.show = n.show, e.width = n.width);
|
|
@@ -508,8 +508,8 @@ function zt(e, t) {
|
|
|
508
508
|
}
|
|
509
509
|
//#endregion
|
|
510
510
|
//#region components/store/common.ts
|
|
511
|
-
var
|
|
512
|
-
title:
|
|
511
|
+
var X = C({
|
|
512
|
+
title: K.global.t("App.title"),
|
|
513
513
|
needUpdate: !1,
|
|
514
514
|
theme: !1,
|
|
515
515
|
isMobile: !1,
|
|
@@ -518,39 +518,39 @@ var Y = C({
|
|
|
518
518
|
icons: void 0,
|
|
519
519
|
iconDefault: ""
|
|
520
520
|
});
|
|
521
|
+
function zt(e) {
|
|
522
|
+
X.icons = e.icons, X.iconDefault = e.iconDefault;
|
|
523
|
+
}
|
|
521
524
|
function Bt(e) {
|
|
522
|
-
|
|
525
|
+
X.language = e;
|
|
523
526
|
}
|
|
524
527
|
function Vt(e) {
|
|
525
|
-
Y.language = e;
|
|
526
|
-
}
|
|
527
|
-
function Ht(e) {
|
|
528
528
|
let t;
|
|
529
|
-
t = e || (
|
|
529
|
+
t = e || (X.lang === "zh-CN" ? "en-US" : "zh-CN"), J("lang", t, 0), X.lang = t;
|
|
530
530
|
let n = document.body;
|
|
531
|
-
n.dataset.lang = t,
|
|
531
|
+
n.dataset.lang = t, K.global.locale.value = t;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function Ht(e) {
|
|
534
534
|
let t = document.body;
|
|
535
535
|
t.classList.add("remove-all-transition");
|
|
536
536
|
let n = document.querySelector("meta[name=theme-color]");
|
|
537
|
-
e ? t.dataset.theme = "dark" : t.dataset.theme = "", n && (e ? n.setAttribute("content", "#2b2b2d") : n.setAttribute("content", "#ffffff")),
|
|
537
|
+
e ? t.dataset.theme = "dark" : t.dataset.theme = "", n && (e ? n.setAttribute("content", "#2b2b2d") : n.setAttribute("content", "#ffffff")), X.theme = e, setTimeout(() => {
|
|
538
538
|
t.classList.remove("remove-all-transition");
|
|
539
539
|
}, 0);
|
|
540
540
|
}
|
|
541
|
-
function
|
|
542
|
-
|
|
541
|
+
function Ut(e) {
|
|
542
|
+
X.needUpdate = e;
|
|
543
543
|
}
|
|
544
|
-
function
|
|
545
|
-
|
|
544
|
+
function Wt(e) {
|
|
545
|
+
X.title = e;
|
|
546
546
|
}
|
|
547
|
-
var
|
|
548
|
-
|
|
547
|
+
var Gt = () => {
|
|
548
|
+
X.isMobile = window.screen.availWidth < 769;
|
|
549
549
|
};
|
|
550
|
-
window.addEventListener("resize",
|
|
550
|
+
window.addEventListener("resize", Gt), Gt();
|
|
551
551
|
//#endregion
|
|
552
552
|
//#region components/icon/index.vue
|
|
553
|
-
var
|
|
553
|
+
var Kt = d({
|
|
554
554
|
name: "UzIcon",
|
|
555
555
|
props: { icon: {
|
|
556
556
|
required: !0,
|
|
@@ -561,8 +561,8 @@ var qt = d({
|
|
|
561
561
|
let t = w(!0), n = w(), r = (e) => {
|
|
562
562
|
if (t.value = !1, e && typeof e == "string") {
|
|
563
563
|
try {
|
|
564
|
-
let t =
|
|
565
|
-
Object.keys(t).length > 0 && (t[e] ? n.value = t[e] : t[
|
|
564
|
+
let t = X.icons;
|
|
565
|
+
Object.keys(t).length > 0 && (t[e] ? n.value = t[e] : t[X.iconDefault] && (n.value = t[X.iconDefault]));
|
|
566
566
|
} catch {}
|
|
567
567
|
h(() => {
|
|
568
568
|
t.value = !0;
|
|
@@ -573,21 +573,21 @@ var qt = d({
|
|
|
573
573
|
r(e);
|
|
574
574
|
}), () => t.value ? n.value && n.value.render(null, []) : null;
|
|
575
575
|
}
|
|
576
|
-
}),
|
|
577
|
-
function
|
|
578
|
-
return
|
|
579
|
-
history:
|
|
576
|
+
}), qt;
|
|
577
|
+
function Jt(e, t = "/") {
|
|
578
|
+
return qt = Ge({
|
|
579
|
+
history: Ke(t),
|
|
580
580
|
routes: e,
|
|
581
581
|
scrollBehavior: () => ({
|
|
582
582
|
left: 0,
|
|
583
583
|
top: 0
|
|
584
584
|
})
|
|
585
|
-
}),
|
|
585
|
+
}), qt;
|
|
586
586
|
}
|
|
587
587
|
//#endregion
|
|
588
588
|
//#region components/monitor.ts
|
|
589
|
-
var
|
|
590
|
-
let e =
|
|
589
|
+
var Yt = 500, Xt = 300, Zt = [], Qt = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakSet(), tn, nn, rn, an, on, sn, cn = !1, ln = () => typeof navigator > "u" ? "" : navigator.userAgent.toLocaleUpperCase(), un = () => {
|
|
590
|
+
let e = ln(), t = /ANDROID ([\d.]+)/.exec(e);
|
|
591
591
|
if (t) return `Android ${t[1]}`;
|
|
592
592
|
let n = /(?:IPHONE|IPAD).*OS ([\d_]+)/.exec(e);
|
|
593
593
|
if (n) return `${e.includes("IPAD") ? "iPad" : "iPhone"} ${n[1].replace(/_/g, ".")}`;
|
|
@@ -602,8 +602,8 @@ var Xt = 500, Zt = 300, Qt = [], $t = /* @__PURE__ */ new WeakMap(), en = /* @__
|
|
|
602
602
|
}[r[1]] ?? `Windows NT ${r[1]}`;
|
|
603
603
|
let i = /MAC OS X ([\d_]+)/.exec(e);
|
|
604
604
|
return i ? `macOS ${i[1].replace(/_/g, ".")}` : "Other Platform";
|
|
605
|
-
},
|
|
606
|
-
let e =
|
|
605
|
+
}, dn = () => {
|
|
606
|
+
let e = ln();
|
|
607
607
|
for (let [t, n] of [
|
|
608
608
|
[/EDG(?:A|IOS)?\/([\d.]+)/, "Edge"],
|
|
609
609
|
[/OPR\/([\d.]+)/, "Opera"],
|
|
@@ -618,7 +618,7 @@ var Xt = 500, Zt = 300, Qt = [], $t = /* @__PURE__ */ new WeakMap(), en = /* @__
|
|
|
618
618
|
if (r) return `${n} ${r[1]}`;
|
|
619
619
|
}
|
|
620
620
|
return "Others";
|
|
621
|
-
},
|
|
621
|
+
}, fn = (e, t) => e.length > t ? `${e.slice(0, t)}…` : e, pn = (e) => e.replace(/([?&](?:access[_-]?token|refresh[_-]?token|token|authorization|password|passwd|secret|api[_-]?key|cookie|session)=)[^&#\s]*/gi, "$1[REDACTED]").replace(/("(?:access[_-]?token|refresh[_-]?token|token|authorization|password|passwd|secret|api[_-]?key|cookie|session)"\s*:\s*)"[^"]*"/gi, "$1\"[REDACTED]\"").replace(/(\b(?:access[_-]?token|refresh[_-]?token|token|authorization|password|passwd|secret|api[_-]?key|cookie|session)\s*[=:]\s*)[^\s,;]+/gi, "$1[REDACTED]"), mn = (e) => {
|
|
622
622
|
let t = /* @__PURE__ */ new WeakSet();
|
|
623
623
|
try {
|
|
624
624
|
return JSON.stringify(e, (e, n) => {
|
|
@@ -632,7 +632,7 @@ var Xt = 500, Zt = 300, Qt = [], $t = /* @__PURE__ */ new WeakMap(), en = /* @__
|
|
|
632
632
|
} catch {
|
|
633
633
|
return String(e);
|
|
634
634
|
}
|
|
635
|
-
},
|
|
635
|
+
}, hn = (e) => e instanceof Error ? fn(pn(`${e.name && e.name !== "Error" ? `${e.name}: ` : ""}${e.message || "Unknown error"}`), Yt) : fn(pn((typeof e == "string" ? e : mn(e)).trim() || "Unknown error"), Yt), gn = (e) => {
|
|
636
636
|
let t = String(e || "");
|
|
637
637
|
if (!t) return "";
|
|
638
638
|
try {
|
|
@@ -641,7 +641,7 @@ var Xt = 500, Zt = 300, Qt = [], $t = /* @__PURE__ */ new WeakMap(), en = /* @__
|
|
|
641
641
|
} catch {
|
|
642
642
|
return t.split(/[?#]/, 1)[0];
|
|
643
643
|
}
|
|
644
|
-
},
|
|
644
|
+
}, _n = (e, t) => {
|
|
645
645
|
let n = [];
|
|
646
646
|
try {
|
|
647
647
|
let t = new URL(e, location.href).searchParams.toString();
|
|
@@ -658,8 +658,8 @@ var Xt = 500, Zt = 300, Qt = [], $t = /* @__PURE__ */ new WeakMap(), en = /* @__
|
|
|
658
658
|
}), n.push(e.join("&"));
|
|
659
659
|
} else typeof Blob < "u" && t instanceof Blob ? n.push(`[Blob:${t.type || "unknown"},${t.size}B]`) : typeof ArrayBuffer < "u" && (t instanceof ArrayBuffer || ArrayBuffer.isView(t)) && n.push("[Binary data]");
|
|
660
660
|
}
|
|
661
|
-
return pn(
|
|
662
|
-
},
|
|
661
|
+
return fn(pn(n.filter(Boolean).join(" | ")), Xt);
|
|
662
|
+
}, vn = (e) => {
|
|
663
663
|
let t;
|
|
664
664
|
if (typeof TextEncoder < "u") {
|
|
665
665
|
let n = new TextEncoder().encode(e);
|
|
@@ -674,8 +674,8 @@ var Xt = 500, Zt = 300, Qt = [], $t = /* @__PURE__ */ new WeakMap(), en = /* @__
|
|
|
674
674
|
t = n.map((e) => String.fromCharCode(e)).join("");
|
|
675
675
|
}
|
|
676
676
|
return window.btoa(t);
|
|
677
|
-
},
|
|
678
|
-
let n =
|
|
677
|
+
}, yn = (e, t) => {
|
|
678
|
+
let n = vn(t), r = () => {
|
|
679
679
|
let t = new XMLHttpRequest();
|
|
680
680
|
t.open("POST", e, !0), t.setRequestHeader("Content-Type", "text/plain;charset=UTF-8"), t.send(n);
|
|
681
681
|
}, i = () => {
|
|
@@ -685,7 +685,7 @@ var Xt = 500, Zt = 300, Qt = [], $t = /* @__PURE__ */ new WeakMap(), en = /* @__
|
|
|
685
685
|
try {
|
|
686
686
|
r();
|
|
687
687
|
} catch {}
|
|
688
|
-
}, a =
|
|
688
|
+
}, a = rn ?? window.fetch;
|
|
689
689
|
typeof a == "function" ? a.call(window, e, {
|
|
690
690
|
method: "POST",
|
|
691
691
|
body: n,
|
|
@@ -695,87 +695,87 @@ var Xt = 500, Zt = 300, Qt = [], $t = /* @__PURE__ */ new WeakMap(), en = /* @__
|
|
|
695
695
|
}).then((e) => {
|
|
696
696
|
e.ok || i();
|
|
697
697
|
}).catch(i) : i();
|
|
698
|
-
},
|
|
699
|
-
if (!
|
|
700
|
-
|
|
698
|
+
}, bn = (e, t) => (n, r, i) => {
|
|
699
|
+
if (!cn) {
|
|
700
|
+
cn = !0;
|
|
701
701
|
try {
|
|
702
|
-
let a =
|
|
703
|
-
a && a.toLocaleLowerCase().indexOf("resizeobserver") === -1 &&
|
|
702
|
+
let a = hn(i);
|
|
703
|
+
a && a.toLocaleLowerCase().indexOf("resizeobserver") === -1 && yn(e, mn({
|
|
704
704
|
type: n,
|
|
705
705
|
time: Date.now(),
|
|
706
|
-
url:
|
|
707
|
-
browser:
|
|
708
|
-
platform:
|
|
706
|
+
url: gn(r) || gn(location.href),
|
|
707
|
+
browser: dn(),
|
|
708
|
+
platform: un(),
|
|
709
709
|
message: `[${n}] [${window.document.title}] [${a}]`,
|
|
710
710
|
info: t ? t() : ""
|
|
711
711
|
}));
|
|
712
712
|
} catch {} finally {
|
|
713
|
-
|
|
713
|
+
cn = !1;
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
|
-
},
|
|
717
|
-
for (let r of
|
|
716
|
+
}, xn = (e, t, n) => {
|
|
717
|
+
for (let r of Zt) r.report(e, t, n);
|
|
718
|
+
}, Sn = (e) => {
|
|
719
|
+
let t = gn(e);
|
|
720
|
+
return Zt.some((e) => e.endpoint === t);
|
|
718
721
|
}, Cn = (e) => {
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
tn.has(e) || (tn.add(e), e.addEventListener("error", () => {
|
|
723
|
-
let t = en.get(e);
|
|
724
|
-
t && !Cn(t.url) && Sn(3, t.url, `${t.method} network error`);
|
|
722
|
+
en.has(e) || (en.add(e), e.addEventListener("error", () => {
|
|
723
|
+
let t = $t.get(e);
|
|
724
|
+
t && !Sn(t.url) && xn(3, t.url, `${t.method} network error`);
|
|
725
725
|
}), e.addEventListener("timeout", () => {
|
|
726
|
-
let t =
|
|
727
|
-
t && !
|
|
726
|
+
let t = $t.get(e);
|
|
727
|
+
t && !Sn(t.url) && xn(3, t.url, `${t.method} timeout`);
|
|
728
728
|
}), e.addEventListener("loadend", () => {
|
|
729
|
-
let t =
|
|
730
|
-
if (!t || e.status < 400 ||
|
|
729
|
+
let t = $t.get(e);
|
|
730
|
+
if (!t || e.status < 400 || Sn(t.url)) return;
|
|
731
731
|
let n = Date.now() - t.startTime;
|
|
732
|
-
|
|
732
|
+
xn(3, t.url, `${t.method} ${e.status} (${n}ms)`);
|
|
733
733
|
}));
|
|
734
|
-
},
|
|
735
|
-
|
|
736
|
-
|
|
734
|
+
}, wn = () => {
|
|
735
|
+
tn || nn || an || on || typeof XMLHttpRequest > "u" || (tn = XMLHttpRequest.prototype.open, nn = XMLHttpRequest.prototype.send, an = function(e, t, ...n) {
|
|
736
|
+
$t.set(this, {
|
|
737
737
|
method: String(e).toUpperCase(),
|
|
738
738
|
url: String(t),
|
|
739
739
|
startTime: Date.now()
|
|
740
|
-
}),
|
|
741
|
-
}, XMLHttpRequest.prototype.open =
|
|
742
|
-
let t =
|
|
743
|
-
t && (t.startTime = Date.now()),
|
|
744
|
-
}, XMLHttpRequest.prototype.send =
|
|
740
|
+
}), Cn(this), tn?.call(this, e, t, n[0] ?? !0, n[1] ?? null, n[2] ?? null);
|
|
741
|
+
}, XMLHttpRequest.prototype.open = an, on = function(e) {
|
|
742
|
+
let t = $t.get(this);
|
|
743
|
+
t && (t.startTime = Date.now()), nn?.call(this, e ?? null);
|
|
744
|
+
}, XMLHttpRequest.prototype.send = on);
|
|
745
|
+
}, Tn = () => {
|
|
746
|
+
tn && XMLHttpRequest.prototype.open === an && (XMLHttpRequest.prototype.open = tn, tn = void 0, an = void 0), nn && XMLHttpRequest.prototype.send === on && (XMLHttpRequest.prototype.send = nn, nn = void 0, on = void 0);
|
|
745
747
|
}, En = () => {
|
|
746
|
-
|
|
747
|
-
}, Dn = () => {
|
|
748
|
-
if (an || typeof window.fetch != "function") return;
|
|
748
|
+
if (rn || typeof window.fetch != "function") return;
|
|
749
749
|
let e = window.fetch;
|
|
750
|
-
|
|
751
|
-
let r = typeof Request < "u" && t instanceof Request, i = r ? t.url : String(t), a = String(n?.method || r && t.method || "GET").toUpperCase(), o =
|
|
750
|
+
rn = e, sn = async function(t, n) {
|
|
751
|
+
let r = typeof Request < "u" && t instanceof Request, i = r ? t.url : String(t), a = String(n?.method || r && t.method || "GET").toUpperCase(), o = _n(i, n?.body), s = o ? ` | Params: ${o}` : "", c = Date.now();
|
|
752
752
|
try {
|
|
753
753
|
let r = await e.call(this, t, n);
|
|
754
|
-
return !r.ok && !
|
|
754
|
+
return !r.ok && !Sn(i) && xn(3, i, `${a} ${r.status} (${Date.now() - c}ms)${s}`), r;
|
|
755
755
|
} catch (e) {
|
|
756
|
-
throw
|
|
756
|
+
throw Sn(i) || xn(3, i, `${a} network error: ${hn(e)}${s}`), e;
|
|
757
757
|
}
|
|
758
|
-
}, window.fetch =
|
|
759
|
-
},
|
|
760
|
-
|
|
758
|
+
}, window.fetch = sn;
|
|
759
|
+
}, Dn = () => {
|
|
760
|
+
rn && window.fetch === sn && (window.fetch = rn, rn = void 0, sn = void 0);
|
|
761
|
+
}, On = (e) => {
|
|
762
|
+
xn(1, e.filename || location.href, e.error || e.message);
|
|
761
763
|
}, kn = (e) => {
|
|
762
|
-
|
|
763
|
-
}, An = (
|
|
764
|
-
|
|
764
|
+
xn(1, location.href, `Promise: ${hn(e.reason)}`);
|
|
765
|
+
}, An = () => {
|
|
766
|
+
Zt.length === 1 && (wn(), En(), window.addEventListener("error", On), window.addEventListener("unhandledrejection", kn));
|
|
765
767
|
}, jn = () => {
|
|
766
|
-
|
|
767
|
-
}, Mn = () => {
|
|
768
|
-
Qt.length > 0 || (En(), On(), window.removeEventListener("error", kn), window.removeEventListener("unhandledrejection", An));
|
|
768
|
+
Zt.length > 0 || (Tn(), Dn(), window.removeEventListener("error", On), window.removeEventListener("unhandledrejection", kn));
|
|
769
769
|
};
|
|
770
|
-
function
|
|
770
|
+
function Mn(e, t, n) {
|
|
771
771
|
if (!t || typeof window > "u" || typeof navigator > "u") return;
|
|
772
|
-
let r =
|
|
772
|
+
let r = Qt.get(e);
|
|
773
773
|
if (r) return r;
|
|
774
|
-
let i =
|
|
775
|
-
endpoint:
|
|
774
|
+
let i = bn(t, n), a = {
|
|
775
|
+
endpoint: gn(t),
|
|
776
776
|
report: i
|
|
777
777
|
};
|
|
778
|
-
|
|
778
|
+
Zt.push(a), An();
|
|
779
779
|
let o = e.config.errorHandler, s = (e, t, n) => {
|
|
780
780
|
i(2, location.href, e), o?.(e, t, n);
|
|
781
781
|
};
|
|
@@ -783,14 +783,14 @@ function Nn(e, t, n) {
|
|
|
783
783
|
let c = !1, l = () => {
|
|
784
784
|
if (c) return;
|
|
785
785
|
c = !0, e.config.errorHandler === s && (e.config.errorHandler = o);
|
|
786
|
-
let t =
|
|
787
|
-
t >= 0 &&
|
|
786
|
+
let t = Zt.indexOf(a);
|
|
787
|
+
t >= 0 && Zt.splice(t, 1), Qt.delete(e), jn();
|
|
788
788
|
};
|
|
789
|
-
return
|
|
789
|
+
return Qt.set(e, l), e.onUnmount(l), l;
|
|
790
790
|
}
|
|
791
|
-
var
|
|
792
|
-
|
|
793
|
-
},
|
|
791
|
+
var Nn = (e, t, n) => {
|
|
792
|
+
xn(e, t, n);
|
|
793
|
+
}, Pn = /* @__PURE__ */ new Map(), Fn = Object.prototype.hasOwnProperty, In = 300, Ln = (e) => {
|
|
794
794
|
if (e == null) return "";
|
|
795
795
|
let t;
|
|
796
796
|
if (typeof e == "string") t = e;
|
|
@@ -817,16 +817,16 @@ var zn = (e) => {
|
|
|
817
817
|
return e && e.groups && e.groups.fileName;
|
|
818
818
|
}
|
|
819
819
|
return "";
|
|
820
|
-
}, Bn =
|
|
820
|
+
}, Bn = We.create({
|
|
821
821
|
timeout: 3e5,
|
|
822
822
|
responseType: "json",
|
|
823
823
|
headers: { "Content-Type": "application/json" }
|
|
824
824
|
});
|
|
825
825
|
Bn.defaults.timeout = 3e5;
|
|
826
|
-
var Vn =
|
|
826
|
+
var Vn = We.CancelToken.source();
|
|
827
827
|
Bn.interceptors.request.use((e) => {
|
|
828
|
-
e.cancelToken = Vn.token, e.headers.Language =
|
|
829
|
-
let t =
|
|
828
|
+
e.cancelToken = Vn.token, e.headers.Language = X.lang, e.headers.Platform = X.isMobile ? "mobile" : "pc";
|
|
829
|
+
let t = Y("token", !1);
|
|
830
830
|
if (e.headers && t && (e.headers.token = t), e.method?.toLocaleUpperCase() === "GET") {
|
|
831
831
|
let t = Rn(e.data);
|
|
832
832
|
t && (e.url = `${e.url}?${t}`);
|
|
@@ -834,7 +834,7 @@ Bn.interceptors.request.use((e) => {
|
|
|
834
834
|
return e.method?.toLocaleUpperCase() === "POST" && (e.data = e.data), e;
|
|
835
835
|
}, (e) => Promise.reject(e)), Bn.interceptors.response.use((e) => {
|
|
836
836
|
let t = e.data;
|
|
837
|
-
if (t.code === 401) return
|
|
837
|
+
if (t.code === 401) return Tt("token"), qt.replace("/login"), Promise.reject(!1);
|
|
838
838
|
if (e.config.responseType === "blob" || e.config.responseType === "text" || e.config.responseType === "arraybuffer") {
|
|
839
839
|
let t = zn(e.headers);
|
|
840
840
|
return Promise.resolve({
|
|
@@ -847,52 +847,52 @@ Bn.interceptors.request.use((e) => {
|
|
|
847
847
|
return Promise.resolve(e);
|
|
848
848
|
}
|
|
849
849
|
{
|
|
850
|
-
|
|
850
|
+
Ct.destroyAll();
|
|
851
851
|
let n = t.message, r = Ln(e.config.data ?? e.config.params);
|
|
852
|
-
return
|
|
853
|
-
content: n ||
|
|
852
|
+
return Nn(3, e.config.url || location.href, `Fetch ${t.code ?? "error"}: ${n || "Unknown error"}${r ? ` | Params: ${r}` : ""}`), Ct.error({
|
|
853
|
+
content: n || K.global.t("Notice.error"),
|
|
854
854
|
duration: 3e3
|
|
855
855
|
}), Promise.reject(n);
|
|
856
856
|
}
|
|
857
|
-
}, (e) => e ? (
|
|
858
|
-
content:
|
|
857
|
+
}, (e) => e ? (Ct.destroyAll(), e.code === "ERR_NETWORK" ? (Ct.error({
|
|
858
|
+
content: K.global.t("Notice.network"),
|
|
859
859
|
duration: 3e3
|
|
860
|
-
}), Promise.reject("Notice.network")) : e.response ? (e.response.status === 401 && (
|
|
861
|
-
content:
|
|
860
|
+
}), Promise.reject("Notice.network")) : e.response ? (e.response.status === 401 && (Tt("token"), window.location.href = "/mom/login"), Ct.error({
|
|
861
|
+
content: K.global.t("Notice.error"),
|
|
862
862
|
duration: 3e3
|
|
863
|
-
}), Promise.reject(
|
|
863
|
+
}), Promise.reject(K.global.t("Notice.error"))) : Promise.reject(e)) : Promise.reject(K.global.t("Notice.error")));
|
|
864
864
|
var Hn = "/apiserver/", Un = () => {
|
|
865
|
-
Vn.cancel(), Vn =
|
|
865
|
+
Vn.cancel(), Vn = We.CancelToken.source();
|
|
866
866
|
}, Wn = (e, t, n = "json", r = 3e5) => {
|
|
867
867
|
let i = JSON.stringify({
|
|
868
868
|
fetchUri: e,
|
|
869
869
|
...t
|
|
870
870
|
});
|
|
871
|
-
if (
|
|
871
|
+
if (Pn.has(i)) return Pn.get(i);
|
|
872
872
|
let a = Bn({
|
|
873
873
|
url: `${Hn}${e}`,
|
|
874
874
|
method: "GET",
|
|
875
875
|
data: t,
|
|
876
876
|
responseType: n,
|
|
877
877
|
timeout: r
|
|
878
|
-
}).then((e) => (
|
|
879
|
-
|
|
878
|
+
}).then((e) => (Pn.delete(i), e)).catch(() => {
|
|
879
|
+
Pn.delete(i);
|
|
880
880
|
});
|
|
881
|
-
return
|
|
881
|
+
return Pn.set(i, a), a;
|
|
882
882
|
}, Z = (e, t = {}, n = "json", r = 3e5) => {
|
|
883
883
|
let i = JSON.stringify({
|
|
884
884
|
fetchUri: e,
|
|
885
885
|
...t
|
|
886
886
|
});
|
|
887
|
-
if (
|
|
887
|
+
if (Pn.has(i)) return Pn.get(i);
|
|
888
888
|
let a = Bn({
|
|
889
889
|
url: `${Hn}${e}`,
|
|
890
890
|
method: "POST",
|
|
891
891
|
data: t,
|
|
892
892
|
responseType: n,
|
|
893
893
|
timeout: r
|
|
894
|
-
}).then((e) => (
|
|
895
|
-
return
|
|
894
|
+
}).then((e) => (Pn.delete(i), Promise.resolve(e))).catch((e) => (Pn.delete(i), Promise.reject(e)));
|
|
895
|
+
return Pn.set(i, a), a;
|
|
896
896
|
}, Gn = (e, t = {}, n = "blob", r = 3e5) => Bn({
|
|
897
897
|
url: `${Hn}${e}`,
|
|
898
898
|
method: "POST",
|
|
@@ -914,7 +914,7 @@ var Hn = "/apiserver/", Un = () => {
|
|
|
914
914
|
}), nr = (e) => Gn("excel/template", { tableKey: e }, "arraybuffer"), rr = (e) => Z("excel/record/query", {
|
|
915
915
|
recordType: "import",
|
|
916
916
|
tableKey: e
|
|
917
|
-
}), ir = (e) => Z("excel/exportData", e), ar = (e, t) => f(
|
|
917
|
+
}), ir = (e) => Z("excel/exportData", e), ar = (e, t) => f(Ie, { style: { "max-width": "300px" } }, {
|
|
918
918
|
trigger: () => e,
|
|
919
919
|
default: () => typeof t == "function" ? t() : t
|
|
920
920
|
}), or = (e, t, n, r) => {
|
|
@@ -927,9 +927,9 @@ var Hn = "/apiserver/", Un = () => {
|
|
|
927
927
|
}), (e) => Zn({
|
|
928
928
|
tableId: r,
|
|
929
929
|
...e
|
|
930
|
-
}),
|
|
930
|
+
}), Ct, Z);
|
|
931
931
|
} catch (e) {
|
|
932
|
-
|
|
932
|
+
q(e);
|
|
933
933
|
}
|
|
934
934
|
}, sr = (e, t, n, r, i) => {
|
|
935
935
|
let a = {
|
|
@@ -950,14 +950,14 @@ var Hn = "/apiserver/", Un = () => {
|
|
|
950
950
|
}
|
|
951
951
|
e.onClick && typeof e.onClick == "function" && (a.onClick = e.onClick.bind(void 0, t, n, r));
|
|
952
952
|
}
|
|
953
|
-
return e.icon && (o.icon = () => f(
|
|
953
|
+
return e.icon && (o.icon = () => f(H, {}, { default: () => f(Kt, { icon: e.icon }, { default: () => null }) })), f(L, a, o);
|
|
954
954
|
}, cr = (e, t, n, r, i) => {
|
|
955
955
|
let a = { placement: "left" };
|
|
956
956
|
if (typeof t.onClick == "string") {
|
|
957
957
|
let e = t.onClick;
|
|
958
958
|
a["on-positive-click"] = () => or(e, n, r, i);
|
|
959
959
|
} else t.onClick && (a["on-positive-click"] = t.onClick.bind(void 0, n, r, i));
|
|
960
|
-
return f(
|
|
960
|
+
return f(we, a, {
|
|
961
961
|
default: () => f("span", { style: { "max-width": "300px" } }, { default: () => typeof t.confirmText == "function" ? t.confirmText() : t.confirmText }),
|
|
962
962
|
trigger: () => e
|
|
963
963
|
});
|
|
@@ -974,7 +974,7 @@ var Hn = "/apiserver/", Un = () => {
|
|
|
974
974
|
...a,
|
|
975
975
|
tooltipText: void 0
|
|
976
976
|
}, t, n, r, i)), s < e.children.length - 1 && o.push(f("div", { class: "uz-action-split" }, { default: () => "" }));
|
|
977
|
-
}), a.push(f(
|
|
977
|
+
}), a.push(f(Te, { trigger: "click" }, {
|
|
978
978
|
trigger: () => sr({
|
|
979
979
|
type: "normal",
|
|
980
980
|
key: e.key,
|
|
@@ -984,7 +984,7 @@ var Hn = "/apiserver/", Un = () => {
|
|
|
984
984
|
disabled: typeof e.disabled == "function" ? e.disabled(t) : e.disabled,
|
|
985
985
|
loading: e.loading
|
|
986
986
|
}, t, n, r, i),
|
|
987
|
-
default: () => f(
|
|
987
|
+
default: () => f(V, {
|
|
988
988
|
vertical: !0,
|
|
989
989
|
size: 12
|
|
990
990
|
}, { default: () => o })
|
|
@@ -1096,7 +1096,7 @@ var Hn = "/apiserver/", Un = () => {
|
|
|
1096
1096
|
name: "UzBack",
|
|
1097
1097
|
components: {
|
|
1098
1098
|
NButton: L,
|
|
1099
|
-
NIcon:
|
|
1099
|
+
NIcon: H
|
|
1100
1100
|
},
|
|
1101
1101
|
props: {
|
|
1102
1102
|
to: {
|
|
@@ -1109,7 +1109,7 @@ var Hn = "/apiserver/", Un = () => {
|
|
|
1109
1109
|
}
|
|
1110
1110
|
},
|
|
1111
1111
|
setup(e) {
|
|
1112
|
-
let { t } =
|
|
1112
|
+
let { t } = W(), n = Je();
|
|
1113
1113
|
return {
|
|
1114
1114
|
t,
|
|
1115
1115
|
back: () => {
|
|
@@ -1141,19 +1141,19 @@ function br(e, t, n, i, a, s) {
|
|
|
1141
1141
|
var xr = /*#__PURE__*/ Q(yr, [["render", br]]), Sr = d({
|
|
1142
1142
|
name: "UzFormItem",
|
|
1143
1143
|
components: {
|
|
1144
|
-
NIcon:
|
|
1145
|
-
NInput:
|
|
1146
|
-
NSelect:
|
|
1147
|
-
NInputNumber:
|
|
1148
|
-
NDatePicker:
|
|
1149
|
-
NTimePicker:
|
|
1150
|
-
NSwitch:
|
|
1151
|
-
NColorPicker:
|
|
1152
|
-
NCheckbox:
|
|
1153
|
-
NCheckboxGroup:
|
|
1144
|
+
NIcon: H,
|
|
1145
|
+
NInput: ve,
|
|
1146
|
+
NSelect: Oe,
|
|
1147
|
+
NInputNumber: xe,
|
|
1148
|
+
NDatePicker: oe,
|
|
1149
|
+
NTimePicker: Fe,
|
|
1150
|
+
NSwitch: Me,
|
|
1151
|
+
NColorPicker: B,
|
|
1152
|
+
NCheckbox: z,
|
|
1153
|
+
NCheckboxGroup: re,
|
|
1154
1154
|
NCascader: ne,
|
|
1155
|
-
NTooltip:
|
|
1156
|
-
NDropdown:
|
|
1155
|
+
NTooltip: Ie,
|
|
1156
|
+
NDropdown: ue
|
|
1157
1157
|
},
|
|
1158
1158
|
props: {
|
|
1159
1159
|
item: {
|
|
@@ -1186,10 +1186,10 @@ var xr = /*#__PURE__*/ Q(yr, [["render", br]]), Sr = d({
|
|
|
1186
1186
|
setup(e) {
|
|
1187
1187
|
let t = p("userStore"), r = p("mainFormValue"), i = w(!1), a = w([]);
|
|
1188
1188
|
return {
|
|
1189
|
-
isMobile: n(() =>
|
|
1189
|
+
isMobile: n(() => X.isMobile),
|
|
1190
1190
|
showDropdown: i,
|
|
1191
1191
|
dropdownOptions: a,
|
|
1192
|
-
dayjs:
|
|
1192
|
+
dayjs: Qe,
|
|
1193
1193
|
updateValue: async (t, n, i) => {
|
|
1194
1194
|
if (t.form.updateValue) {
|
|
1195
1195
|
let a = { ...e.formValue };
|
|
@@ -1201,10 +1201,10 @@ var xr = /*#__PURE__*/ Q(yr, [["render", br]]), Sr = d({
|
|
|
1201
1201
|
e.formValue[n] = t[n];
|
|
1202
1202
|
});
|
|
1203
1203
|
} catch (e) {
|
|
1204
|
-
|
|
1204
|
+
q(e);
|
|
1205
1205
|
}
|
|
1206
1206
|
} catch (e) {
|
|
1207
|
-
|
|
1207
|
+
q(e);
|
|
1208
1208
|
}
|
|
1209
1209
|
else t.form.updateValue(n, a, i, Z);
|
|
1210
1210
|
}
|
|
@@ -1291,7 +1291,7 @@ var xr = /*#__PURE__*/ Q(yr, [["render", br]]), Sr = d({
|
|
|
1291
1291
|
}
|
|
1292
1292
|
},
|
|
1293
1293
|
handleFocus: (t) => {
|
|
1294
|
-
let n =
|
|
1294
|
+
let n = G(e.item.params.options);
|
|
1295
1295
|
if (n) {
|
|
1296
1296
|
if (e.formValue && e.formValue[t]) {
|
|
1297
1297
|
let r = e.formValue[t].toLocaleLowerCase();
|
|
@@ -1316,7 +1316,7 @@ var xr = /*#__PURE__*/ Q(yr, [["render", br]]), Sr = d({
|
|
|
1316
1316
|
checkNumberMax: (t) => {
|
|
1317
1317
|
if (e.status !== 2) return t.params.maxKey ? Number(e.formValue[t.params.maxKey]) : t.params.max;
|
|
1318
1318
|
},
|
|
1319
|
-
selectFilter: (e, t) =>
|
|
1319
|
+
selectFilter: (e, t) => Lt(t.label, e)
|
|
1320
1320
|
};
|
|
1321
1321
|
}
|
|
1322
1322
|
}), Cr = { class: "uz-flex uz-flex-wrap uz-gap-2" };
|
|
@@ -1697,11 +1697,11 @@ function wr(t, n, i, u, d, f) {
|
|
|
1697
1697
|
var Tr = /*#__PURE__*/ Q(Sr, [["render", wr]]), Er = d({
|
|
1698
1698
|
name: "UzForm",
|
|
1699
1699
|
components: {
|
|
1700
|
-
NForm:
|
|
1701
|
-
NFormItem:
|
|
1702
|
-
NDivider:
|
|
1700
|
+
NForm: fe,
|
|
1701
|
+
NFormItem: pe,
|
|
1702
|
+
NDivider: se,
|
|
1703
1703
|
NButton: L,
|
|
1704
|
-
NIcon:
|
|
1704
|
+
NIcon: H,
|
|
1705
1705
|
UzFormItem: Tr
|
|
1706
1706
|
},
|
|
1707
1707
|
props: {
|
|
@@ -1749,7 +1749,7 @@ var Tr = /*#__PURE__*/ Q(Sr, [["render", wr]]), Er = d({
|
|
|
1749
1749
|
}).observe(e);
|
|
1750
1750
|
} } },
|
|
1751
1751
|
setup(e, { expose: t }) {
|
|
1752
|
-
let { t: r } =
|
|
1752
|
+
let { t: r } = W(), i = p("userStore"), a = n(() => X.isMobile), o = w(), s = w(), c = w({}), l = w([]), u = w([]), d = w([]), f = w();
|
|
1753
1753
|
S("mainFormValue", {
|
|
1754
1754
|
value: () => c.value,
|
|
1755
1755
|
setValue: (e) => {
|
|
@@ -1779,15 +1779,15 @@ var Tr = /*#__PURE__*/ Q(Sr, [["render", wr]]), Er = d({
|
|
|
1779
1779
|
}, h = (e, t) => {
|
|
1780
1780
|
switch (e) {
|
|
1781
1781
|
case "datetime":
|
|
1782
|
-
case "datetimerange": return
|
|
1782
|
+
case "datetimerange": return At(t, "yyyy-MM-dd hh:mm:ss");
|
|
1783
1783
|
case "month":
|
|
1784
|
-
case "monthrange": return
|
|
1784
|
+
case "monthrange": return At(t, "yyyy-MM");
|
|
1785
1785
|
case "year":
|
|
1786
|
-
case "yearrange": return
|
|
1787
|
-
default: return
|
|
1786
|
+
case "yearrange": return At(t, "yyyy");
|
|
1787
|
+
default: return At(t);
|
|
1788
1788
|
}
|
|
1789
1789
|
}, g = (e, t = !1) => {
|
|
1790
|
-
let n =
|
|
1790
|
+
let n = Qe(e).startOf("day").diff(Qe().startOf("day"), "day");
|
|
1791
1791
|
return n >= 0 ? t ? "success" : r("Common.remainingDays", { days: n }) : t ? "error" : r("Common.overdueDays", { days: Math.abs(n) });
|
|
1792
1792
|
}, _ = (e) => (d.value = [], e.forEach((e) => {
|
|
1793
1793
|
if (e.form.defaultValue && !c.value[e.key]) {
|
|
@@ -1803,7 +1803,7 @@ var Tr = /*#__PURE__*/ Q(Sr, [["render", wr]]), Er = d({
|
|
|
1803
1803
|
if (e.params.type.indexOf("range") > -1) switch (e.form.defaultValue) {
|
|
1804
1804
|
case "now":
|
|
1805
1805
|
{
|
|
1806
|
-
let t =
|
|
1806
|
+
let t = Qe().startOf("day").valueOf(), n = Qe().endOf("day").valueOf();
|
|
1807
1807
|
c.value[e.key] = [t, n], c.value[`${e.key}StartStr`] = h(e.params.type, t), c.value[`${e.key}EndStr`] = h(e.params.type, n);
|
|
1808
1808
|
}
|
|
1809
1809
|
break;
|
|
@@ -1840,7 +1840,7 @@ var Tr = /*#__PURE__*/ Q(Sr, [["render", wr]]), Er = d({
|
|
|
1840
1840
|
c.value[e.key] = [];
|
|
1841
1841
|
}
|
|
1842
1842
|
}), e), v = (t) => {
|
|
1843
|
-
t ||=
|
|
1843
|
+
t ||= G(e.items), t && Array.isArray(t) && t.length > 0 ? l.value = _(t) : l.value = [];
|
|
1844
1844
|
}, y = () => new Promise(async (e) => {
|
|
1845
1845
|
let t = 0;
|
|
1846
1846
|
for await (let e of u.value) await e.validate().catch(() => {
|
|
@@ -1854,7 +1854,7 @@ var Tr = /*#__PURE__*/ Q(Sr, [["render", wr]]), Er = d({
|
|
|
1854
1854
|
s.value?.validate(async (r) => {
|
|
1855
1855
|
if (r) t();
|
|
1856
1856
|
else if (n === 0) {
|
|
1857
|
-
let t =
|
|
1857
|
+
let t = G(c.value);
|
|
1858
1858
|
d.value.forEach((e) => {
|
|
1859
1859
|
t[e] = JSON.stringify(t[e]);
|
|
1860
1860
|
}), Object.keys(t).forEach((e) => {
|
|
@@ -2015,13 +2015,13 @@ function Or(t, n, s, u, d, f) {
|
|
|
2015
2015
|
var kr = /*#__PURE__*/ Q(Er, [["render", Or]]), Ar = d({
|
|
2016
2016
|
name: "UzDraggableForm",
|
|
2017
2017
|
components: {
|
|
2018
|
-
NForm:
|
|
2019
|
-
NFormItem:
|
|
2018
|
+
NForm: fe,
|
|
2019
|
+
NFormItem: pe,
|
|
2020
2020
|
NButton: L,
|
|
2021
|
-
NIcon:
|
|
2022
|
-
NDivider:
|
|
2021
|
+
NIcon: H,
|
|
2022
|
+
NDivider: se,
|
|
2023
2023
|
UzFormItem: Tr,
|
|
2024
|
-
VueDraggable:
|
|
2024
|
+
VueDraggable: $e
|
|
2025
2025
|
},
|
|
2026
2026
|
props: {
|
|
2027
2027
|
items: {
|
|
@@ -2065,7 +2065,7 @@ var kr = /*#__PURE__*/ Q(Er, [["render", Or]]), Ar = d({
|
|
|
2065
2065
|
"on-change"
|
|
2066
2066
|
],
|
|
2067
2067
|
setup(e, { expose: t, emit: n }) {
|
|
2068
|
-
let { t: r } =
|
|
2068
|
+
let { t: r } = W(), i = p("userStore"), a = w(), o = w({}), s = w([]), c = w([-1, -1]), l = (e, t, r) => {
|
|
2069
2069
|
c.value = [t, r ?? -1], n("on-select", e);
|
|
2070
2070
|
}, u = (e) => {
|
|
2071
2071
|
e && (c.value[1] === -1 ? s.value.splice(c.value[0], 1, e) : s.value[c.value[0]].params.children.splice(c.value[1], 1, e), m()), h();
|
|
@@ -2091,11 +2091,11 @@ var kr = /*#__PURE__*/ Q(Er, [["render", Or]]), Ar = d({
|
|
|
2091
2091
|
}
|
|
2092
2092
|
}), e), f = () => {
|
|
2093
2093
|
if (e.items && Array.isArray(e.items)) {
|
|
2094
|
-
let t =
|
|
2094
|
+
let t = G(e.items);
|
|
2095
2095
|
s.value = d(t);
|
|
2096
2096
|
}
|
|
2097
2097
|
}, m = () => {
|
|
2098
|
-
n("on-change",
|
|
2098
|
+
n("on-change", G(s.value)), h();
|
|
2099
2099
|
}, h = () => {
|
|
2100
2100
|
c.value = [-1, -1], n("on-select", void 0);
|
|
2101
2101
|
};
|
|
@@ -2302,15 +2302,15 @@ function Nr(t, n, s, u, d, f) {
|
|
|
2302
2302
|
var Pr = /*#__PURE__*/ Q(Ar, [["render", Nr]]), Fr = d({
|
|
2303
2303
|
name: "UzFormItemUpload",
|
|
2304
2304
|
components: {
|
|
2305
|
-
NUpload:
|
|
2305
|
+
NUpload: Le,
|
|
2306
2306
|
NButton: L,
|
|
2307
|
-
NIcon:
|
|
2308
|
-
NImage:
|
|
2309
|
-
NPopover:
|
|
2310
|
-
NPopconfirm:
|
|
2311
|
-
NUploadDragger:
|
|
2312
|
-
NInputGroup:
|
|
2313
|
-
NSpin:
|
|
2307
|
+
NIcon: H,
|
|
2308
|
+
NImage: ge,
|
|
2309
|
+
NPopover: Te,
|
|
2310
|
+
NPopconfirm: we,
|
|
2311
|
+
NUploadDragger: Re,
|
|
2312
|
+
NInputGroup: ye,
|
|
2313
|
+
NSpin: je
|
|
2314
2314
|
},
|
|
2315
2315
|
props: {
|
|
2316
2316
|
value: {
|
|
@@ -2334,8 +2334,8 @@ var Pr = /*#__PURE__*/ Q(Ar, [["render", Nr]]), Fr = d({
|
|
|
2334
2334
|
},
|
|
2335
2335
|
emits: ["update:value"],
|
|
2336
2336
|
setup(e, { emit: t }) {
|
|
2337
|
-
let { t: n } =
|
|
2338
|
-
t("update:value",
|
|
2337
|
+
let { t: n } = W(), r = Ve(), i = w(!1), a = w([]), o = () => {
|
|
2338
|
+
t("update:value", et.stringify(a.value.map((e) => e.url)));
|
|
2339
2339
|
}, s = (e) => new Promise((t, s) => {
|
|
2340
2340
|
if (e.file.file) {
|
|
2341
2341
|
if (i.value = !0, e.file.file.size > 10485760) r.error({
|
|
@@ -2376,10 +2376,10 @@ var Pr = /*#__PURE__*/ Q(Ar, [["render", Nr]]), Fr = d({
|
|
|
2376
2376
|
}, l = (e) => {
|
|
2377
2377
|
a.value.splice(e, 1), o();
|
|
2378
2378
|
}, u = () => {
|
|
2379
|
-
let t =
|
|
2379
|
+
let t = G(e.value);
|
|
2380
2380
|
if (!t) a.value = [];
|
|
2381
2381
|
else if (typeof t == "string") try {
|
|
2382
|
-
t =
|
|
2382
|
+
t = et.parse(t), a.value = t.map((e, t) => {
|
|
2383
2383
|
let n = decodeURIComponent(e), r = n.lastIndexOf("/"), i = n.substring(r + 1);
|
|
2384
2384
|
return {
|
|
2385
2385
|
id: String(t + 1),
|
|
@@ -2499,10 +2499,10 @@ function zr(t, n, s, u, d, f) {
|
|
|
2499
2499
|
var Br = /*#__PURE__*/ Q(Fr, [["render", zr], ["__scopeId", "data-v-3f4cdb7e"]]), Vr = d({
|
|
2500
2500
|
name: "UzFormItemImage",
|
|
2501
2501
|
components: {
|
|
2502
|
-
NImageGroup:
|
|
2503
|
-
NImage:
|
|
2504
|
-
NIcon:
|
|
2505
|
-
NPopover:
|
|
2502
|
+
NImageGroup: _e,
|
|
2503
|
+
NImage: ge,
|
|
2504
|
+
NIcon: H,
|
|
2505
|
+
NPopover: Te
|
|
2506
2506
|
},
|
|
2507
2507
|
props: { value: {
|
|
2508
2508
|
required: !0,
|
|
@@ -2513,7 +2513,7 @@ var Br = /*#__PURE__*/ Q(Fr, [["render", zr], ["__scopeId", "data-v-3f4cdb7e"]])
|
|
|
2513
2513
|
let t = w([]);
|
|
2514
2514
|
return N(() => {
|
|
2515
2515
|
try {
|
|
2516
|
-
e.value ? t.value =
|
|
2516
|
+
e.value ? t.value = et.parse(e.value) : t.value = [];
|
|
2517
2517
|
} catch {
|
|
2518
2518
|
t.value = [];
|
|
2519
2519
|
}
|
|
@@ -2578,7 +2578,7 @@ function Ur(t, n, i, s, u, d) {
|
|
|
2578
2578
|
}
|
|
2579
2579
|
var Wr = /*#__PURE__*/ Q(Vr, [["render", Ur]]), Gr = d({
|
|
2580
2580
|
name: "UzFormItemTimesPicker",
|
|
2581
|
-
components: { NSelect:
|
|
2581
|
+
components: { NSelect: Oe },
|
|
2582
2582
|
props: {
|
|
2583
2583
|
value: {
|
|
2584
2584
|
required: !0,
|
|
@@ -2592,7 +2592,7 @@ var Wr = /*#__PURE__*/ Q(Vr, [["render", Ur]]), Gr = d({
|
|
|
2592
2592
|
},
|
|
2593
2593
|
emits: ["update:value"],
|
|
2594
2594
|
setup(e, { emit: t, expose: n }) {
|
|
2595
|
-
let { t: r } =
|
|
2595
|
+
let { t: r } = W(), i = w([]), a = w("00"), o = w("00"), s = w("00"), c = () => {
|
|
2596
2596
|
a.value = "00", o.value = "00", s.value = "00", t("update:value", "00:00:00");
|
|
2597
2597
|
}, l = () => {
|
|
2598
2598
|
let e = [];
|
|
@@ -2682,7 +2682,7 @@ var Jr = /*#__PURE__*/ Q(Gr, [["render", qr], ["__scopeId", "data-v-ee9b84d6"]])
|
|
|
2682
2682
|
//#endregion
|
|
2683
2683
|
//#region components/hooks/useDebounceFn.ts
|
|
2684
2684
|
function Yr(e, t = 1e3) {
|
|
2685
|
-
let n =
|
|
2685
|
+
let n = Xe(e, t);
|
|
2686
2686
|
return {
|
|
2687
2687
|
run: n,
|
|
2688
2688
|
cancel: n.cancel,
|
|
@@ -2727,7 +2727,7 @@ var Xr = (e, t) => e.map((e, n) => {
|
|
|
2727
2727
|
}), s = async () => {
|
|
2728
2728
|
await h();
|
|
2729
2729
|
let n = r.value?.$el?.querySelector(".n-data-table-tbody");
|
|
2730
|
-
n && a.value?.el !== n && (a.value?.destroy(), a.value =
|
|
2730
|
+
n && a.value?.el !== n && (a.value?.destroy(), a.value = tt.create(n, {
|
|
2731
2731
|
animation: 150,
|
|
2732
2732
|
handle: ".uz-bom-drag-handle",
|
|
2733
2733
|
onMove: ({ dragged: e, related: t }) => {
|
|
@@ -2752,7 +2752,7 @@ var Xr = (e, t) => e.map((e, n) => {
|
|
|
2752
2752
|
align: "center",
|
|
2753
2753
|
render: (e) => o.value.get(e.code) ? f("span", {
|
|
2754
2754
|
class: "uz-bom-drag-handle uz-cursor-pointer uz-select-none",
|
|
2755
|
-
"aria-label":
|
|
2755
|
+
"aria-label": K.global.t("BOM.dragSort")
|
|
2756
2756
|
}, "⠿") : null
|
|
2757
2757
|
},
|
|
2758
2758
|
getSortableRowProps: (e) => ({
|
|
@@ -2838,7 +2838,7 @@ var di = () => new Promise((e) => {
|
|
|
2838
2838
|
let r = t.match(ci);
|
|
2839
2839
|
if (r && t.indexOf("return") === -1) {
|
|
2840
2840
|
let t = r[0].split(":");
|
|
2841
|
-
if (t[0] === "date") return (t) =>
|
|
2841
|
+
if (t[0] === "date") return (t) => At(t[e], r[0].replace("date:", "") || "YYYY-MM-DD");
|
|
2842
2842
|
if (t[0] === "city") return (t) => t[`${e}Str`];
|
|
2843
2843
|
if (t[0] === "modules" && n && Object.keys(n).length > 0) {
|
|
2844
2844
|
let e = r[0].replace("modules:", ""), t = Object.keys(n).find((t) => t.includes(e));
|
|
@@ -2852,7 +2852,7 @@ var di = () => new Promise((e) => {
|
|
|
2852
2852
|
let e = Function("rowData", "rowIndex", "h", t);
|
|
2853
2853
|
return (t, n) => e(t, n, f);
|
|
2854
2854
|
} catch (e) {
|
|
2855
|
-
|
|
2855
|
+
q(e);
|
|
2856
2856
|
}
|
|
2857
2857
|
}
|
|
2858
2858
|
return t && typeof t == "function" ? (e, n) => t(e, n, f) : "";
|
|
@@ -2861,8 +2861,8 @@ var di = () => new Promise((e) => {
|
|
|
2861
2861
|
let r = [], i = t.id;
|
|
2862
2862
|
return e.input === "select" && (e.params.labelKeys || e.search.labelKeys) ? ((e.params.labelKeys || e.search.labelKeys || "").split(",").forEach((e) => {
|
|
2863
2863
|
r.push(t[e]);
|
|
2864
|
-
}), r =
|
|
2865
|
-
label: t?.is_disabled === "1" ? `${r}-${
|
|
2864
|
+
}), r = Ye(r).join("-")) : r = t[n[1]], e.input === "select" && e.params.valueKey && (i = t[e.params.valueKey]), {
|
|
2865
|
+
label: t?.is_disabled === "1" ? `${r}-${K.global.t("Common.disabled")}` : r,
|
|
2866
2866
|
value: i,
|
|
2867
2867
|
disabled: !e.params._search && t?.is_disabled === "1",
|
|
2868
2868
|
params: t
|
|
@@ -2875,14 +2875,14 @@ function hi() {
|
|
|
2875
2875
|
}
|
|
2876
2876
|
async function gi(e, t = !1) {
|
|
2877
2877
|
let n = e.split("."), r = !1;
|
|
2878
|
-
return n.length > 1 && (mi.has(n[0]) && !t ? r =
|
|
2878
|
+
return n.length > 1 && (mi.has(n[0]) && !t ? r = G(mi.get(n[0])) : (r = await Xn({ tableId: n[0] }), mi.set(n[0], r))), {
|
|
2879
2879
|
sourceData: r,
|
|
2880
2880
|
n
|
|
2881
2881
|
};
|
|
2882
2882
|
}
|
|
2883
2883
|
async function _i(e) {
|
|
2884
2884
|
return new Promise((t, n) => {
|
|
2885
|
-
let r =
|
|
2885
|
+
let r = Y(`dynamicTable_${e}`, !1);
|
|
2886
2886
|
r && mi.has(`dynamicTable_${e}`) ? t(r) : Yn(e, r ? r.createTime : null).then((n) => {
|
|
2887
2887
|
if (n) {
|
|
2888
2888
|
let r = {
|
|
@@ -2890,7 +2890,7 @@ async function _i(e) {
|
|
|
2890
2890
|
tableTitle: n.tableTitle,
|
|
2891
2891
|
viewJson: n.viewJson
|
|
2892
2892
|
};
|
|
2893
|
-
|
|
2893
|
+
J(`dynamicTable_${e}`, r, 0), mi.set(`dynamicTable_${e}`, !0), Et("tables_"), t(n);
|
|
2894
2894
|
} else mi.set(`dynamicTable_${e}`, !0), t(r);
|
|
2895
2895
|
}).catch(() => {
|
|
2896
2896
|
n();
|
|
@@ -2899,7 +2899,7 @@ async function _i(e) {
|
|
|
2899
2899
|
}
|
|
2900
2900
|
var vi = (e) => e.map((e) => {
|
|
2901
2901
|
let t = {};
|
|
2902
|
-
return t.z = e.params.placeholder, e.input === "group" ? t.n = e.params.children : t.c = +!!e.params.clearable, e.input === "input" && (e.params.type && (t.t = e.params.type), e.params.minlength && (t.i = e.params.minlength), e.params.maxlength && (t.a = e.params.maxlength), e.params.rows && (t.r = e.params.rows), e.params.prefix && (t.e = e.params.prefix), e.params.suffix && (t.s = e.params.suffix)), e.input === "auto" && (t.o = e.params.options, e.params.prefix && (t.e = e.params.prefix), e.params.suffix && (t.s = e.params.suffix)), e.input === "number" && (t.b = +!!e.params.showButton, e.params.min && (t.i = e.params.min), e.params.max && (t.a = e.params.max), e.params.minKey && (t.x = e.params.minKey), e.params.maxKey && (t.y = e.params.maxKey), e.params.step && (t.t = e.params.step), e.params.precision && (t.p = e.params.precision), e.params.prefix && (t.e = e.params.prefix), e.params.suffix && (t.s = e.params.suffix)), e.input === "date" && (t.y = e.params.type, e.params.format && (t.f = e.params.format), e.params.isDateDisabled && (t.d = e.params.isDateDisabled), e.params.timePickerProps && (t.t = e.params.timePickerProps)), e.input === "select" && (t.o = e.params.options, t.y = e.params.immediately, t.f = +!!e.params.filterable, t.m = +!!e.params.multiple, t.t = +!!e.params.tag, t.l = (e.params.labelKeys || "").replace(/\s*/g, ""), t.v = (e.params.valueKey || "").replace(/\s*/g, ""), t.r = e.params.renderLabel, t.g = e.params.renderTag), e.input === "cascader" && (t.o = e.params.options, t.y = e.params.immediately, t.f = +!!e.params.filterable, t.m = +!!e.params.multiple), e.input === "checkbox" && (t.o = e.params.options), e.input === "time" && (t.f = e.params.format), e.input === "upload" && (t.s = +!!e.params.small, t.a = e.params.accept, t.m = e.params.max), e.input === "switch" && (t.h = e.params.checked, t.u = e.params.unchecked), e.input === "divider" && (t.p = e.params.placement), e.input === "filling" && (t.k = e.params.parentKey), e.input === "subTable" && (t.i = +!!e.params.init, t.q = +!!e.params.quest, t.k = e.params.searchKey, t.l = e.params.link, t.c = e.params.columns, t.a = e.params.actions, t.b = +!!e.params.addButton, t.g = +!!e.params.draggable, t.h = +!!e.params.childActions, t.x = +!!e.params.expandable, t.n = +!!e.params.showActions, t.d = +!!e.params.showDelete, e.params.optionsType && (t.t = e.params.optionsType), e.params.optionsSource && (t.u = e.params.optionsSource), e.params.options && (t.o = e.params.options), e.params.summary && (t.s = e.params.summary), e.params.merge && (t.m = e.params.merge), e.params.deleteFn && (t.f = e.params.deleteFn)), {
|
|
2902
|
+
return t.z = e.params.placeholder, e.input === "group" ? t.n = e.params.children : t.c = +!!e.params.clearable, e.input === "input" && (e.params.type && (t.t = e.params.type), e.params.minlength && (t.i = e.params.minlength), e.params.maxlength && (t.a = e.params.maxlength), e.params.rows && (t.r = e.params.rows), e.params.prefix && (t.e = e.params.prefix), e.params.suffix && (t.s = e.params.suffix)), e.input === "auto" && (t.o = e.params.options, e.params.prefix && (t.e = e.params.prefix), e.params.suffix && (t.s = e.params.suffix)), e.input === "number" && (t.b = +!!e.params.showButton, e.params.min && (t.i = e.params.min), e.params.max && (t.a = e.params.max), e.params.minKey && (t.x = e.params.minKey), e.params.maxKey && (t.y = e.params.maxKey), e.params.step && (t.t = e.params.step), e.params.precision && (t.p = e.params.precision), e.params.prefix && (t.e = e.params.prefix), e.params.suffix && (t.s = e.params.suffix)), e.input === "date" && (t.y = e.params.type, e.params.format && (t.f = e.params.format), e.params.isDateDisabled && (t.d = e.params.isDateDisabled), e.params.timePickerProps && (t.t = e.params.timePickerProps)), e.input === "select" && (t.o = e.params.options, t.y = e.params.immediately, t.f = +!!e.params.filterable, t.m = +!!e.params.multiple, t.t = +!!e.params.tag, t.l = (e.params.labelKeys || "").replace(/\s*/g, ""), t.v = (e.params.valueKey || "").replace(/\s*/g, ""), t.r = e.params.renderLabel, t.g = e.params.renderTag), e.input === "cascader" && (t.o = e.params.options, t.y = e.params.immediately, t.f = +!!e.params.filterable, t.m = +!!e.params.multiple), e.input === "checkbox" && (t.o = e.params.options), e.input === "time" && (t.f = e.params.format), e.input === "upload" && (t.s = +!!e.params.small, t.a = e.params.accept, t.m = e.params.max), e.input === "switch" && (t.h = e.params.checked, t.u = e.params.unchecked), e.input === "divider" && (t.p = e.params.placement), e.input === "filling" && (t.k = e.params.parentKey), e.input === "bom" && (t.x = +!!e.params.expandable), e.input === "subTable" && (t.i = +!!e.params.init, t.q = +!!e.params.quest, t.k = e.params.searchKey, t.l = e.params.link, t.c = e.params.columns, t.a = e.params.actions, t.b = +!!e.params.addButton, t.g = +!!e.params.draggable, t.h = +!!e.params.childActions, t.x = +!!e.params.expandable, t.n = +!!e.params.showActions, t.d = +!!e.params.showDelete, e.params.optionsType && (t.t = e.params.optionsType), e.params.optionsSource && (t.u = e.params.optionsSource), e.params.options && (t.o = e.params.options), e.params.summary && (t.s = e.params.summary), e.params.merge && (t.m = e.params.merge), e.params.deleteFn && (t.f = e.params.deleteFn)), {
|
|
2903
2903
|
i: e.input,
|
|
2904
2904
|
l: e.label ? encodeURIComponent(e.label) : "",
|
|
2905
2905
|
k: e.key.replace(/\s*/g, ""),
|
|
@@ -2974,7 +2974,7 @@ var vi = (e) => e.map((e) => {
|
|
|
2974
2974
|
};
|
|
2975
2975
|
}), yi = (e) => !e[0] || e[0] && e[0].input ? e : e.map((e) => {
|
|
2976
2976
|
let t = {};
|
|
2977
|
-
return t.placeholder = e.p.z, e.i === "group" ? t.children = e.p.n : t.clearable = !!e.p.c, e.i === "input" && (e.p.t && (t.type = e.p.t), e.p.i && (t.minlength = e.p.i), e.p.a && (t.maxlength = e.p.a), e.p.r && (t.rows = e.p.r), e.p.e && (t.prefix = e.p.e), e.p.s && (t.suffix = e.p.s)), e.i === "auto" && (t.options = e.p.o, e.p.e && (t.prefix = e.p.e), e.p.s && (t.suffix = e.p.s)), e.i === "number" && (t.showButton = !!e.p.b, e.p.i && (t.min = e.p.i), e.p.a && (t.max = e.p.a), e.p.x && (t.minKey = e.p.x), e.p.y && (t.maxKey = e.p.y), e.p.t && (t.step = e.p.t), e.p.p && (t.precision = e.p.p), e.p.e && (t.prefix = e.p.e), e.p.s && (t.suffix = e.p.s)), e.i === "date" && (t.type = e.p.y, e.p.f && (t.format = e.p.f), e.p.d && (t.isDateDisabled = e.p.d), e.p.t && (t.timePickerProps = e.p.t)), e.i === "select" && (t.options = e.p.o, t.immediately = e.p.y, t.filterable = !!e.p.f, t.multiple = !!e.p.m, t.tag = !!e.p.t, t.labelKeys = e.p.l, t.valueKey = e.p.v, t.renderLabel = e.p.r, t.renderTag = e.p.g), e.i === "cascader" && (t.options = e.p.o, t.immediately = e.p.y, t.filterable = !!e.p.f, t.multiple = !!e.p.m), e.i === "checkbox" && (t.options = e.p.o), e.i === "time" && (t.format = e.p.f), e.i === "upload" && (t.small = !!e.p.s, t.accept = e.p.a, t.max = e.p.m), e.i === "switch" && (t.checked = e.p.h, t.unchecked = e.p.u), e.i === "divider" && (t.placement = e.p.p), e.i === "filling" && (t.parentKey = e.p.k), e.i === "subTable" && (t.init = !!e.p.i, t.quest = !!e.p.q, t.searchKey = e.p.k, t.link = e.p.l, t.columns = e.p.c, t.actions = e.p.a, t.addButton = !!e.p.b, t.draggable = !!e.p.g, t.childActions = !!e.p.h, t.showActions = !!e.p.n, t.showDelete = !!(e.p.d ?? !0), t.expandable = !!e.p.x, e.p.t && (t.optionsType = e.p.t), e.p.u && (t.optionsSource = e.p.u), e.p.o && (t.options = e.p.o), e.p.s && (t.summary = e.p.s), e.p.m && (t.merge = e.p.m), e.p.f && (t.deleteFn = e.p.f)), {
|
|
2977
|
+
return t.placeholder = e.p.z, e.i === "group" ? t.children = e.p.n : t.clearable = !!e.p.c, e.i === "input" && (e.p.t && (t.type = e.p.t), e.p.i && (t.minlength = e.p.i), e.p.a && (t.maxlength = e.p.a), e.p.r && (t.rows = e.p.r), e.p.e && (t.prefix = e.p.e), e.p.s && (t.suffix = e.p.s)), e.i === "auto" && (t.options = e.p.o, e.p.e && (t.prefix = e.p.e), e.p.s && (t.suffix = e.p.s)), e.i === "number" && (t.showButton = !!e.p.b, e.p.i && (t.min = e.p.i), e.p.a && (t.max = e.p.a), e.p.x && (t.minKey = e.p.x), e.p.y && (t.maxKey = e.p.y), e.p.t && (t.step = e.p.t), e.p.p && (t.precision = e.p.p), e.p.e && (t.prefix = e.p.e), e.p.s && (t.suffix = e.p.s)), e.i === "date" && (t.type = e.p.y, e.p.f && (t.format = e.p.f), e.p.d && (t.isDateDisabled = e.p.d), e.p.t && (t.timePickerProps = e.p.t)), e.i === "select" && (t.options = e.p.o, t.immediately = e.p.y, t.filterable = !!e.p.f, t.multiple = !!e.p.m, t.tag = !!e.p.t, t.labelKeys = e.p.l, t.valueKey = e.p.v, t.renderLabel = e.p.r, t.renderTag = e.p.g), e.i === "cascader" && (t.options = e.p.o, t.immediately = e.p.y, t.filterable = !!e.p.f, t.multiple = !!e.p.m), e.i === "checkbox" && (t.options = e.p.o), e.i === "time" && (t.format = e.p.f), e.i === "upload" && (t.small = !!e.p.s, t.accept = e.p.a, t.max = e.p.m), e.i === "switch" && (t.checked = e.p.h, t.unchecked = e.p.u), e.i === "divider" && (t.placement = e.p.p), e.i === "filling" && (t.parentKey = e.p.k), e.i === "bom" && (t.expandable = !!e.p.x), e.i === "subTable" && (t.init = !!e.p.i, t.quest = !!e.p.q, t.searchKey = e.p.k, t.link = e.p.l, t.columns = e.p.c, t.actions = e.p.a, t.addButton = !!e.p.b, t.draggable = !!e.p.g, t.childActions = !!e.p.h, t.showActions = !!e.p.n, t.showDelete = !!(e.p.d ?? !0), t.expandable = !!e.p.x, e.p.t && (t.optionsType = e.p.t), e.p.u && (t.optionsSource = e.p.u), e.p.o && (t.options = e.p.o), e.p.s && (t.summary = e.p.s), e.p.m && (t.merge = e.p.m), e.p.f && (t.deleteFn = e.p.f)), {
|
|
2978
2978
|
input: e.i,
|
|
2979
2979
|
label: e.l ? decodeURIComponent(e.l) : "",
|
|
2980
2980
|
key: e.k,
|
|
@@ -3099,11 +3099,11 @@ var vi = (e) => e.map((e) => {
|
|
|
3099
3099
|
drawerHeight: e.h,
|
|
3100
3100
|
placement: e.l,
|
|
3101
3101
|
summary: e.r
|
|
3102
|
-
}), Object.assign({}, li,
|
|
3102
|
+
}), Object.assign({}, li, G(t));
|
|
3103
3103
|
};
|
|
3104
3104
|
function wi(e, t, n, r) {
|
|
3105
3105
|
let i = async (i, a) => {
|
|
3106
|
-
let o = [], s = {}, c = {}, l = {}, u = [], d = [], f =
|
|
3106
|
+
let o = [], s = {}, c = {}, l = {}, u = [], d = [], f = G(e), p = [];
|
|
3107
3107
|
for (let e of f) e.input === "group" ? p.push(...e.params.children) : p.push(e);
|
|
3108
3108
|
for (let e of p) {
|
|
3109
3109
|
if (e.source && (e.input === "select" || e.input === "cascader")) {
|
|
@@ -3126,12 +3126,12 @@ function wi(e, t, n, r) {
|
|
|
3126
3126
|
params: {}
|
|
3127
3127
|
});
|
|
3128
3128
|
n.push({
|
|
3129
|
-
label:
|
|
3129
|
+
label: K.global.t("Common.loading"),
|
|
3130
3130
|
value: "loading",
|
|
3131
3131
|
disabled: !0
|
|
3132
3132
|
});
|
|
3133
3133
|
} else n = [{
|
|
3134
|
-
label:
|
|
3134
|
+
label: K.global.t("Common.loading"),
|
|
3135
3135
|
value: "loading",
|
|
3136
3136
|
disabled: !0
|
|
3137
3137
|
}];
|
|
@@ -3169,19 +3169,19 @@ function wi(e, t, n, r) {
|
|
|
3169
3169
|
d[n] || (d[n] = {}), u[n] && u[n][e.params.parentKey] && u[n][e.params.parentKey][e.key] ? (d[n][e.key] = u[n][e.params.parentKey][e.key], u[n][e.params.parentKey][`${e.key}Str`] && (d[n][`${e.key}Str`] = u[n][e.params.parentKey][`${e.key}Str`])) : (d[n][e.key] = t[e.key] || null, d[n][`${e.key}Str`] = t[`${e.key}Str`] || null);
|
|
3170
3170
|
}) : c[e.params.parentKey] && c[e.params.parentKey][e.key] ? (l[e.key] = c[e.params.parentKey][e.key], c[e.params.parentKey][`${e.key}Str`] && (l[`${e.key}Str`] = c[e.params.parentKey][`${e.key}Str`])) : (l[e.key] = null, l[`${e.key}Str`] = null);
|
|
3171
3171
|
} catch (e) {
|
|
3172
|
-
|
|
3172
|
+
q(e);
|
|
3173
3173
|
}
|
|
3174
3174
|
if (e.input !== "divider" && e.form.rule && e.form.rule.validator && typeof e.form.rule.validator == "string") try {
|
|
3175
3175
|
let t = e.form.rule.validator, r = Function("rule", "value", "index", "formValues", t);
|
|
3176
3176
|
e.form.rule.validator = (e, t) => r(e, t, null, n);
|
|
3177
3177
|
} catch (e) {
|
|
3178
|
-
|
|
3178
|
+
q(e);
|
|
3179
3179
|
}
|
|
3180
3180
|
if (e.input === "date" && e.params.isDateDisabled && typeof e.params.isDateDisabled == "string") try {
|
|
3181
3181
|
let t = e.params.isDateDisabled, n = Function("ts", "detail", t);
|
|
3182
3182
|
e.params.isDateDisabled = (e, t) => n(e, t);
|
|
3183
3183
|
} catch (e) {
|
|
3184
|
-
|
|
3184
|
+
q(e);
|
|
3185
3185
|
}
|
|
3186
3186
|
if (e.input === "cascader" && e.table.render === "[city]") {
|
|
3187
3187
|
let t = await di();
|
|
@@ -3192,7 +3192,7 @@ function wi(e, t, n, r) {
|
|
|
3192
3192
|
a();
|
|
3193
3193
|
});
|
|
3194
3194
|
if (t) try {
|
|
3195
|
-
let n =
|
|
3195
|
+
let n = et.parse(t.viewJson);
|
|
3196
3196
|
n.suffix && (e._suffix = vr(n.suffix));
|
|
3197
3197
|
let r = yi(n.table);
|
|
3198
3198
|
r.forEach((e) => {
|
|
@@ -3204,7 +3204,7 @@ function wi(e, t, n, r) {
|
|
|
3204
3204
|
a();
|
|
3205
3205
|
});
|
|
3206
3206
|
if (t) try {
|
|
3207
|
-
let n =
|
|
3207
|
+
let n = et.parse(t.viewJson), r = yi(n.table);
|
|
3208
3208
|
r.forEach((e) => {
|
|
3209
3209
|
e.table.sorter = !1;
|
|
3210
3210
|
}), e.params.columns = r, e.params.actions = n.action;
|
|
@@ -3246,7 +3246,7 @@ async function Ti(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3246
3246
|
key: "",
|
|
3247
3247
|
link: "",
|
|
3248
3248
|
merge: ""
|
|
3249
|
-
}, d = [], p =
|
|
3249
|
+
}, d = [], p = G(e), m = [], h = [];
|
|
3250
3250
|
for (let e of p) e.input === "group" ? (m.push(...e.params.children), h.push({
|
|
3251
3251
|
title: e.label,
|
|
3252
3252
|
key: e.key,
|
|
@@ -3264,7 +3264,7 @@ async function Ti(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3264
3264
|
} else s.params.options = pi(s, t, n);
|
|
3265
3265
|
}
|
|
3266
3266
|
} else s.params.options = [{
|
|
3267
|
-
label:
|
|
3267
|
+
label: K.global.t("Common.loading"),
|
|
3268
3268
|
value: "loading",
|
|
3269
3269
|
disabled: !0
|
|
3270
3270
|
}], s.params._async = !0, s.params._fetch = !1, s.params._asyncFn = async () => {
|
|
@@ -3298,20 +3298,20 @@ async function Ti(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3298
3298
|
"line-clamp": s.table.clamp ?? 0
|
|
3299
3299
|
} : !1,
|
|
3300
3300
|
render: s.table.render ? await fi(s.key, s.table.render, i) : void 0,
|
|
3301
|
-
show:
|
|
3301
|
+
show: X.isMobile ? s.table.mobile ?? !1 : s.table.show ?? !0,
|
|
3302
3302
|
pin: !!s.table.fixed,
|
|
3303
3303
|
fixTemp: s.table.fixed
|
|
3304
3304
|
};
|
|
3305
3305
|
if (p.resizable && (p.minWidth = 80), t) {
|
|
3306
3306
|
if (!p.form.edit.show) p = null;
|
|
3307
3307
|
else {
|
|
3308
|
-
if (p.ellipsis = !1, p.resizable = !0,
|
|
3308
|
+
if (p.ellipsis = !1, p.resizable = !0, X.isMobile && (p.show = s.table.mobile), s.table.show && (n === 0 && (p.show = s.form.create.show), n === 1 && (p.show = s.form.edit.show), n === 2 && (p.show = s.form.show)), o && (s.form.rule.validator = () => !0), o === !1 && s.form.rule?.required && typeof s.form.rule.validator == "string") {
|
|
3309
3309
|
delete s.form.rule.message;
|
|
3310
3310
|
let e = s.form.rule.validator, t = Function("rule", "value", "index", "formValues", e);
|
|
3311
3311
|
s.form.rule.validator === "" ? s.form.rule.validator = (e, t) => r()[e.index].delete || t ? !0 : Error(s.form.rule.message) : s.form.rule.validator = (e, n) => r()[e.index].delete ? !0 : t(e, n, e.index, () => r());
|
|
3312
3312
|
}
|
|
3313
3313
|
p.render = function(e, t) {
|
|
3314
|
-
return f(
|
|
3314
|
+
return f(pe, {
|
|
3315
3315
|
showLabel: !1,
|
|
3316
3316
|
showFeedback: !1,
|
|
3317
3317
|
path: `child[${t}].${s.key}`,
|
|
@@ -3351,7 +3351,7 @@ async function Ti(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3351
3351
|
};
|
|
3352
3352
|
}
|
|
3353
3353
|
if (s.search.multiple && (s.params.multiple = !0, s.search.defaultValue && (s.search.defaultValue = ui(s.search.defaultValue))), s.search.show) {
|
|
3354
|
-
let e =
|
|
3354
|
+
let e = G(s);
|
|
3355
3355
|
e.params._async && (e.params._search = !0, e.params._asyncFn = async () => {
|
|
3356
3356
|
let { sourceData: t, n } = await gi(e.source || e.search.source);
|
|
3357
3357
|
if (t && Array.isArray(t)) {
|
|
@@ -3377,7 +3377,11 @@ async function Ti(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3377
3377
|
});
|
|
3378
3378
|
}
|
|
3379
3379
|
}
|
|
3380
|
-
s.input === "
|
|
3380
|
+
s.input === "bom" && s.params.expandable && (u = {
|
|
3381
|
+
key: s.key,
|
|
3382
|
+
link: "",
|
|
3383
|
+
merge: ""
|
|
3384
|
+
}), s.input === "subTable" && s.params.link && !s.params.quest && (l.push(s.params.link), s.params.expandable && (u = {
|
|
3381
3385
|
key: s.key,
|
|
3382
3386
|
link: s.params.link,
|
|
3383
3387
|
merge: s.params.merge
|
|
@@ -3421,8 +3425,8 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3421
3425
|
], Oi = d({
|
|
3422
3426
|
name: "UzBom",
|
|
3423
3427
|
components: {
|
|
3424
|
-
NDataTable:
|
|
3425
|
-
NForm:
|
|
3428
|
+
NDataTable: ae,
|
|
3429
|
+
NForm: fe
|
|
3426
3430
|
},
|
|
3427
3431
|
props: {
|
|
3428
3432
|
value: {
|
|
@@ -3445,11 +3449,14 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3445
3449
|
},
|
|
3446
3450
|
emits: ["update:value"],
|
|
3447
3451
|
setup(e, { emit: t, expose: r }) {
|
|
3448
|
-
let i = p("mainFormValue"), { t: a } =
|
|
3452
|
+
let i = p("mainFormValue"), { t: a } = W(), o = w(null), s = w([]), c = () => {
|
|
3453
|
+
let e = i?.value?.()?.ticket_counts;
|
|
3454
|
+
return e == null || e === "" ? 1 : e;
|
|
3455
|
+
}, l = (e, t, n) => n ? `${n}-${t + 1}` : String(e.operation_no || e.product_no || e.code || t + 1), u = (e, t = 1, n, r) => (e ?? []).map((e, t) => ({
|
|
3449
3456
|
row: e,
|
|
3450
3457
|
index: t
|
|
3451
3458
|
})).sort((e, t) => (typeof e.row.sort_index == "number" && Number.isFinite(e.row.sort_index) ? e.row.sort_index : Number.isFinite(e.row.sort) ? e.row.sort : e.index) - (typeof t.row.sort_index == "number" && Number.isFinite(t.row.sort_index) ? t.row.sort_index : Number.isFinite(t.row.sort) ? t.row.sort : t.index)).map(({ row: e }, i) => {
|
|
3452
|
-
let a = l(e, i, n), o = e.children, s = ti(e), d = t === 1 ? c(
|
|
3459
|
+
let a = l(e, i, n), o = e.children, s = ti(e), d = t === 1 ? c() : ni(s, r);
|
|
3453
3460
|
return {
|
|
3454
3461
|
...e,
|
|
3455
3462
|
required_quantity: s,
|
|
@@ -3485,45 +3492,49 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3485
3492
|
(n.length !== m.value.length || n.some((e, t) => e !== m.value[t])) && (m.value = n);
|
|
3486
3493
|
}, { run: T, flush: E, cancel: D } = Yr(() => {
|
|
3487
3494
|
b(d.value), C();
|
|
3488
|
-
}, 200), O = /* @__PURE__ */ new WeakMap(), k = (e,
|
|
3489
|
-
let
|
|
3490
|
-
|
|
3491
|
-
let
|
|
3492
|
-
if (
|
|
3493
|
-
let
|
|
3495
|
+
}, 200), O = /* @__PURE__ */ new WeakMap(), k = (e, n) => {
|
|
3496
|
+
let r = O.get(e);
|
|
3497
|
+
r || (r = /* @__PURE__ */ new Map(), O.set(e, r));
|
|
3498
|
+
let i = r.get(n.key);
|
|
3499
|
+
if (i) return i;
|
|
3500
|
+
let a = new Proxy(e, {
|
|
3494
3501
|
get(e, t, n) {
|
|
3495
3502
|
return t === "required_quantity" ? ti(e) : Reflect.get(e, t, n);
|
|
3496
3503
|
},
|
|
3497
|
-
set(e,
|
|
3498
|
-
let
|
|
3499
|
-
if (
|
|
3500
|
-
let
|
|
3501
|
-
|
|
3504
|
+
set(e, r, i) {
|
|
3505
|
+
let a = Reflect.get(e, r) !== i, o = Reflect.set(e, r, i);
|
|
3506
|
+
if (a && (r === "quantity" || r === "lossRate") && Reflect.set(e, "required_quantity", ti(e)), a && (r === "quantity" || r === "lossRate" || r === "counts") && d.value.forEach((e) => ri(Array.isArray(e.children) ? e.children : [], e.counts)), a && r === n.key && Ei(n)) {
|
|
3507
|
+
let t = si(n.params?.options, i);
|
|
3508
|
+
t !== void 0 && (Reflect.set(e, "operation_no", t), Number(e.level) === 1 && Reflect.set(e, "code", t)), (t !== void 0 || r === "product_no") && (T(), t !== void 0 && E());
|
|
3502
3509
|
}
|
|
3503
|
-
return a;
|
|
3510
|
+
return a && o && t("update:value", d.value), o;
|
|
3504
3511
|
}
|
|
3505
3512
|
});
|
|
3506
|
-
return
|
|
3513
|
+
return r.set(n.key, a), a;
|
|
3507
3514
|
}, A = () => {
|
|
3508
|
-
let e = /* @__PURE__ */ new Set(), t = (n) => {
|
|
3509
|
-
|
|
3510
|
-
e.add(_(
|
|
3511
|
-
let
|
|
3512
|
-
Array.isArray(
|
|
3515
|
+
let e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), n = (r) => {
|
|
3516
|
+
r.forEach((r) => {
|
|
3517
|
+
e.add(_(r)), t.add(r.code);
|
|
3518
|
+
let i = r.children;
|
|
3519
|
+
Array.isArray(i) && n(i);
|
|
3513
3520
|
});
|
|
3514
3521
|
};
|
|
3515
|
-
|
|
3516
|
-
let
|
|
3522
|
+
n(d.value);
|
|
3523
|
+
let r;
|
|
3517
3524
|
do
|
|
3518
|
-
|
|
3519
|
-
while (e.has(
|
|
3525
|
+
r = crypto.randomUUID();
|
|
3526
|
+
while (e.has(r));
|
|
3527
|
+
let i;
|
|
3528
|
+
do
|
|
3529
|
+
i = `NEW-${String(g).padStart(4, "0")}`, g += 1;
|
|
3530
|
+
while (t.has(i));
|
|
3520
3531
|
return {
|
|
3521
|
-
key:
|
|
3532
|
+
key: r,
|
|
3522
3533
|
level: 1,
|
|
3523
|
-
code:
|
|
3534
|
+
code: i,
|
|
3524
3535
|
sort: 0,
|
|
3525
3536
|
sort_index: 0,
|
|
3526
|
-
product_no:
|
|
3537
|
+
product_no: i,
|
|
3527
3538
|
product_name: "",
|
|
3528
3539
|
status: 0,
|
|
3529
3540
|
procurement: "0",
|
|
@@ -3570,8 +3581,8 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3570
3581
|
} : r), e;
|
|
3571
3582
|
}, []);
|
|
3572
3583
|
j(n(d.value));
|
|
3573
|
-
},
|
|
3574
|
-
title: () => f(
|
|
3584
|
+
}, z = {
|
|
3585
|
+
title: () => f(ue, {
|
|
3575
3586
|
trigger: "click",
|
|
3576
3587
|
options: [{
|
|
3577
3588
|
label: a("Common.expand"),
|
|
@@ -3593,7 +3604,7 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3593
3604
|
fixed: "left",
|
|
3594
3605
|
tree: !0,
|
|
3595
3606
|
ellipsis: { tooltip: !0 }
|
|
3596
|
-
},
|
|
3607
|
+
}, re = {
|
|
3597
3608
|
title: a("Common.action"),
|
|
3598
3609
|
key: "actions",
|
|
3599
3610
|
width: 240,
|
|
@@ -3628,12 +3639,12 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3628
3639
|
secondary: !0
|
|
3629
3640
|
}
|
|
3630
3641
|
})
|
|
3631
|
-
},
|
|
3642
|
+
}, B = n(() => Number(e.status) === 2 ? s.value.filter((e) => e.key !== "actions") : s.value), ie = n(() => B.value.reduce((e, t) => {
|
|
3632
3643
|
let n = "width" in t ? Number(t.width) : 120;
|
|
3633
3644
|
return e + (Number.isFinite(n) ? n : 120);
|
|
3634
|
-
}, 0)),
|
|
3645
|
+
}, 0)), ae = (e) => {
|
|
3635
3646
|
S(e);
|
|
3636
|
-
},
|
|
3647
|
+
}, oe = (e) => {
|
|
3637
3648
|
let t = Math.trunc(Number(e.level));
|
|
3638
3649
|
if (!Number.isFinite(t) || t < 1) return null;
|
|
3639
3650
|
let n = (t - 1) % 4 + 1, r = Math.floor((t - 1) / 4);
|
|
@@ -3641,22 +3652,35 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3641
3652
|
color: Di[n - 1],
|
|
3642
3653
|
strength: `${Math.min(10 + r * 5, 40)}%`
|
|
3643
3654
|
};
|
|
3655
|
+
}, se = (e) => {
|
|
3656
|
+
let t = oe(e);
|
|
3657
|
+
return {
|
|
3658
|
+
...P(e),
|
|
3659
|
+
...t ? { style: `--uz-bom-level-color: ${t.color}; --uz-bom-level-strength: ${t.strength}` } : {}
|
|
3660
|
+
};
|
|
3661
|
+
}, ce = (t) => {
|
|
3662
|
+
if (!t.form.display) switch (e.status) {
|
|
3663
|
+
case 0: return t.form.create && t.form.create.show;
|
|
3664
|
+
case 1: return t.form.edit && t.form.edit.show;
|
|
3665
|
+
case 2: return t.form.show;
|
|
3666
|
+
}
|
|
3644
3667
|
};
|
|
3645
|
-
return M(() => i?.value?.()?.ticket_counts, (
|
|
3646
|
-
|
|
3668
|
+
return M(() => i?.value?.()?.ticket_counts, () => {
|
|
3669
|
+
let e = c();
|
|
3670
|
+
d.value.forEach((t) => {
|
|
3647
3671
|
t.counts = e, ri(Array.isArray(t.children) ? t.children : [], e);
|
|
3648
|
-
});
|
|
3649
|
-
}), M(() => e.value, (e) => {
|
|
3650
|
-
e !== d.value && (D(), d.value = ee(e),
|
|
3672
|
+
}), t("update:value", d.value);
|
|
3673
|
+
}, { immediate: !0 }), M(() => e.value, (e) => {
|
|
3674
|
+
e !== d.value && (D(), d.value = ee(e), t("update:value", d.value));
|
|
3651
3675
|
}), M(d, () => C(), { immediate: !0 }), y(async () => {
|
|
3652
3676
|
e.value?.length || t("update:value", d.value);
|
|
3653
3677
|
let n = await Jn("bom_col");
|
|
3654
|
-
n =
|
|
3655
|
-
let { tableColumns: r } = await Ti(n), i = r.filter((e) => e
|
|
3678
|
+
n = et.parse(n.viewJson), n = yi(n.table);
|
|
3679
|
+
let { tableColumns: r } = await Ti(n), i = r.filter((e) => ce(e)).map((t) => ({
|
|
3656
3680
|
title: t.title,
|
|
3657
3681
|
key: t.key,
|
|
3658
3682
|
width: t.width ?? 120,
|
|
3659
|
-
render: (n, r) => f(
|
|
3683
|
+
render: (n, r) => f(pe, {
|
|
3660
3684
|
showLabel: !1,
|
|
3661
3685
|
showFeedback: !1,
|
|
3662
3686
|
path: `child[${r}].${t.key}`,
|
|
@@ -3674,9 +3698,9 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3674
3698
|
}));
|
|
3675
3699
|
s.value = [
|
|
3676
3700
|
N,
|
|
3677
|
-
|
|
3701
|
+
z,
|
|
3678
3702
|
...i,
|
|
3679
|
-
|
|
3703
|
+
re
|
|
3680
3704
|
];
|
|
3681
3705
|
}), r({ validate: async () => (await o.value?.validate(), d.value) }), v(D), {
|
|
3682
3706
|
t: a,
|
|
@@ -3684,18 +3708,12 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3684
3708
|
innerData: d,
|
|
3685
3709
|
tableRef: F,
|
|
3686
3710
|
tableVersion: te,
|
|
3687
|
-
displayedTableCols:
|
|
3688
|
-
displayedScrollX:
|
|
3711
|
+
displayedTableCols: B,
|
|
3712
|
+
displayedScrollX: ie,
|
|
3689
3713
|
innerExpandedRowKeys: m,
|
|
3690
3714
|
getRowKey: _,
|
|
3691
|
-
getRowProps:
|
|
3692
|
-
|
|
3693
|
-
return {
|
|
3694
|
-
...P(e),
|
|
3695
|
-
...t ? { style: `--uz-bom-level-color: ${t.color}; --uz-bom-level-strength: ${t.strength}` } : {}
|
|
3696
|
-
};
|
|
3697
|
-
},
|
|
3698
|
-
handleExpandedRowKeysChange: oe
|
|
3715
|
+
getRowProps: se,
|
|
3716
|
+
handleExpandedRowKeysChange: ae
|
|
3699
3717
|
};
|
|
3700
3718
|
}
|
|
3701
3719
|
}), ki = { class: "uz-bom uz-flex-1 uz-w-full" }, Ai = { class: "uz-flex uz-flex-col uz-justify-between" }, ji = { class: "uz-com-title" }, Mi = {
|
|
@@ -3790,7 +3808,7 @@ var Pi = /*#__PURE__*/ Q(Oi, [["render", Ni]]), Fi = 46, Ii = 8, Li = 2 * Math.P
|
|
|
3790
3808
|
return "0,0,0";
|
|
3791
3809
|
}, $i = d({
|
|
3792
3810
|
name: "UzCircle",
|
|
3793
|
-
components: { UzNumberFlow:
|
|
3811
|
+
components: { UzNumberFlow: nt },
|
|
3794
3812
|
props: {
|
|
3795
3813
|
circle: {
|
|
3796
3814
|
required: !0,
|
|
@@ -4056,7 +4074,7 @@ var va = /*#__PURE__*/ Q($i, [["render", _a]]), ya = d({
|
|
|
4056
4074
|
name: "UzCamera",
|
|
4057
4075
|
components: {
|
|
4058
4076
|
NButton: L,
|
|
4059
|
-
NModal:
|
|
4077
|
+
NModal: Se
|
|
4060
4078
|
},
|
|
4061
4079
|
props: {
|
|
4062
4080
|
mode: {
|
|
@@ -4078,7 +4096,7 @@ var va = /*#__PURE__*/ Q($i, [["render", _a]]), ya = d({
|
|
|
4078
4096
|
},
|
|
4079
4097
|
emits: ["on-update:value"],
|
|
4080
4098
|
setup(e, { emit: t }) {
|
|
4081
|
-
let { t: n } =
|
|
4099
|
+
let { t: n } = W(), r = w(), i = w(!1), a = w(!1), o = Ve(), s = null, c = null, l = (e, t) => {
|
|
4082
4100
|
s.beginPath(), s.moveTo(e.x, e.y), s.lineTo(t.x, t.y), s.lineWidth = 2, s.strokeStyle = "green", s.stroke();
|
|
4083
4101
|
}, u = () => {
|
|
4084
4102
|
a.value && requestAnimationFrame(d);
|
|
@@ -4088,7 +4106,7 @@ var va = /*#__PURE__*/ Q($i, [["render", _a]]), ya = d({
|
|
|
4088
4106
|
c.width = i, c.height = d, s.drawImage(r.value, 0, 0, i, d);
|
|
4089
4107
|
let e = s.getImageData(0, 0, i, d);
|
|
4090
4108
|
try {
|
|
4091
|
-
let n =
|
|
4109
|
+
let n = rt(e.data, i, d);
|
|
4092
4110
|
if (n) {
|
|
4093
4111
|
let { location: e, data: r } = n;
|
|
4094
4112
|
r && (l(e.topLeftCorner, e.topRightCorner), l(e.topRightCorner, e.bottomRightCorner), l(e.bottomRightCorner, e.bottomLeftCorner), l(e.bottomLeftCorner, e.topLeftCorner), t("on-update:value", r));
|
|
@@ -4111,7 +4129,7 @@ var va = /*#__PURE__*/ Q($i, [["render", _a]]), ya = d({
|
|
|
4111
4129
|
try {
|
|
4112
4130
|
e.getCapabilities().focusDistance && await e.applyConstraints({ advanced: [{ autoFocus: "continuous" }] });
|
|
4113
4131
|
} catch (e) {
|
|
4114
|
-
|
|
4132
|
+
q(e);
|
|
4115
4133
|
}
|
|
4116
4134
|
}, g = () => {
|
|
4117
4135
|
i.value = !0, h(async () => {
|
|
@@ -4206,14 +4224,14 @@ function wa(t, n, s, l, u, d) {
|
|
|
4206
4224
|
var Ta = /*#__PURE__*/ Q(ya, [["render", wa]]), Ea = /* @__PURE__ */ new WeakMap(), Da = d({
|
|
4207
4225
|
name: "UzSearchBar",
|
|
4208
4226
|
components: {
|
|
4209
|
-
NIcon:
|
|
4227
|
+
NIcon: H,
|
|
4210
4228
|
NButton: L,
|
|
4211
4229
|
NButtonGroup: R,
|
|
4212
|
-
NGrid:
|
|
4213
|
-
NGridItem:
|
|
4214
|
-
NInputGroup:
|
|
4215
|
-
NInputGroupLabel:
|
|
4216
|
-
NPopover:
|
|
4230
|
+
NGrid: me,
|
|
4231
|
+
NGridItem: he,
|
|
4232
|
+
NInputGroup: ye,
|
|
4233
|
+
NInputGroupLabel: be,
|
|
4234
|
+
NPopover: Te,
|
|
4217
4235
|
UzFormItem: Tr
|
|
4218
4236
|
},
|
|
4219
4237
|
props: {
|
|
@@ -4260,9 +4278,9 @@ var Ta = /*#__PURE__*/ Q(ya, [["render", wa]]), Ea = /* @__PURE__ */ new WeakMap
|
|
|
4260
4278
|
} },
|
|
4261
4279
|
emits: ["update:loading", "on-update:value"],
|
|
4262
4280
|
setup(e, { emit: t }) {
|
|
4263
|
-
let { t: n } =
|
|
4281
|
+
let { t: n } = W(), r = qe(), i = w(), a = w([]), o = w(), s = w(!0), c = w(!1), l = w(!1), u = w(0), d = w(0), f = w(0), p = w(1), m = w(""), h = w([]), g = w(!1), _ = (e) => Array.isArray(e) && e.length > 0 || e ? e : !1, v = (n = !1) => {
|
|
4264
4282
|
if (e.loading) return;
|
|
4265
|
-
let r =
|
|
4283
|
+
let r = G(i.value);
|
|
4266
4284
|
!n && r.query && (r.query.page = 1);
|
|
4267
4285
|
let o = [];
|
|
4268
4286
|
a.value.forEach((e) => {
|
|
@@ -4281,7 +4299,7 @@ var Ta = /*#__PURE__*/ Q(ya, [["render", wa]]), Ea = /* @__PURE__ */ new WeakMap
|
|
|
4281
4299
|
}
|
|
4282
4300
|
}), t("update:loading", !0), t("on-update:value", o);
|
|
4283
4301
|
}, y = () => {
|
|
4284
|
-
e.loading || (i.value =
|
|
4302
|
+
e.loading || (i.value = G(o.value), v());
|
|
4285
4303
|
}, b = () => {
|
|
4286
4304
|
s.value = !s.value;
|
|
4287
4305
|
}, x = (e) => g.value ? i.value && Array.isArray(i.value[m.value]) && i.value[m.value].includes(e.value) ? "primary" : "default" : i.value[m.value] === e.value ? "primary" : "default", S = (t) => {
|
|
@@ -4294,7 +4312,7 @@ var Ta = /*#__PURE__*/ Q(ya, [["render", wa]]), Ea = /* @__PURE__ */ new WeakMap
|
|
|
4294
4312
|
if (e.params.type.indexOf("range") > -1) switch (e.search.defaultValue) {
|
|
4295
4313
|
case "now":
|
|
4296
4314
|
{
|
|
4297
|
-
let t =
|
|
4315
|
+
let t = Qe().startOf("day").valueOf(), r = Qe().endOf("day").valueOf();
|
|
4298
4316
|
n[e.key] = [t, r];
|
|
4299
4317
|
}
|
|
4300
4318
|
break;
|
|
@@ -4318,9 +4336,9 @@ var Ta = /*#__PURE__*/ Q(ya, [["render", wa]]), Ea = /* @__PURE__ */ new WeakMap
|
|
|
4318
4336
|
};
|
|
4319
4337
|
}, C = (t) => {
|
|
4320
4338
|
if (h.value = [], t && t.length > 0) {
|
|
4321
|
-
let { data: n, values: s } = S(
|
|
4339
|
+
let { data: n, values: s } = S(G(t)), c = {}, l = e.id || r.params.id;
|
|
4322
4340
|
if (e.cache && l) {
|
|
4323
|
-
let e =
|
|
4341
|
+
let e = Y(`tables_${l}`, !1);
|
|
4324
4342
|
e && e.params.forEach((e) => {
|
|
4325
4343
|
if (e.str) {
|
|
4326
4344
|
let t = n.find((t) => t.key === e.key);
|
|
@@ -4332,10 +4350,10 @@ var Ta = /*#__PURE__*/ Q(ya, [["render", wa]]), Ea = /* @__PURE__ */ new WeakMap
|
|
|
4332
4350
|
c[e.key] = e.value;
|
|
4333
4351
|
});
|
|
4334
4352
|
}
|
|
4335
|
-
a.value = n, i.value =
|
|
4353
|
+
a.value = n, i.value = G({
|
|
4336
4354
|
...s,
|
|
4337
4355
|
...c
|
|
4338
|
-
}), o.value =
|
|
4356
|
+
}), o.value = G(s);
|
|
4339
4357
|
}
|
|
4340
4358
|
v(!0);
|
|
4341
4359
|
};
|
|
@@ -4525,14 +4543,14 @@ function Pa(n, s, u, d, f, p) {
|
|
|
4525
4543
|
var Fa = /*#__PURE__*/ Q(Da, [["render", Pa]]), Ia = d({
|
|
4526
4544
|
name: "UzSearchMobileBar",
|
|
4527
4545
|
components: {
|
|
4528
|
-
NIcon:
|
|
4546
|
+
NIcon: H,
|
|
4529
4547
|
NButton: L,
|
|
4530
|
-
NDrawer:
|
|
4531
|
-
NDrawerContent:
|
|
4532
|
-
NGrid:
|
|
4533
|
-
NGridItem:
|
|
4534
|
-
NInputGroup:
|
|
4535
|
-
NInputGroupLabel:
|
|
4548
|
+
NDrawer: ce,
|
|
4549
|
+
NDrawerContent: le,
|
|
4550
|
+
NGrid: me,
|
|
4551
|
+
NGridItem: he,
|
|
4552
|
+
NInputGroup: ye,
|
|
4553
|
+
NInputGroupLabel: be,
|
|
4536
4554
|
UzFormItem: Tr
|
|
4537
4555
|
},
|
|
4538
4556
|
props: {
|
|
@@ -4556,9 +4574,9 @@ var Fa = /*#__PURE__*/ Q(Da, [["render", Pa]]), Ia = d({
|
|
|
4556
4574
|
},
|
|
4557
4575
|
emits: ["update:loading", "on-update:value"],
|
|
4558
4576
|
setup(e, { emit: t }) {
|
|
4559
|
-
let { t: n } =
|
|
4577
|
+
let { t: n } = W(), r = qe(), i = w([]), a = w(!1), o = w(), s = w(), c = (e) => Array.isArray(e) && e.length > 0 || e ? e : !1, l = (n = !1) => {
|
|
4560
4578
|
if (e.loading) return;
|
|
4561
|
-
let r =
|
|
4579
|
+
let r = G(o.value);
|
|
4562
4580
|
!n && r.query && (r.query.page = 1);
|
|
4563
4581
|
let s = [];
|
|
4564
4582
|
i.value.forEach((e) => {
|
|
@@ -4577,7 +4595,7 @@ var Fa = /*#__PURE__*/ Q(Da, [["render", Pa]]), Ia = d({
|
|
|
4577
4595
|
}
|
|
4578
4596
|
}), a.value = !1, t("update:loading", !0), t("on-update:value", s);
|
|
4579
4597
|
}, u = () => {
|
|
4580
|
-
e.loading || (o.value =
|
|
4598
|
+
e.loading || (o.value = G(s.value), l());
|
|
4581
4599
|
}, d = (e) => {
|
|
4582
4600
|
let t = {};
|
|
4583
4601
|
for (let n of e) n.input === "input" && n.params.type === "textarea" && (n.params.type = "text"), n.search.show = n.search.show ?? !0, n.defaultValue ? t[n.key] = n.defaultValue : (t[n.key] = "", (n.input === "number" || n.input === "date" || n.input === "time") && (t[n.key] = null), n.input === "cascader" && (n.params.multiple ? t[n.key] = [] : t[n.key] = null), n.input === "select" && (n.params.multiple ? t[n.key] = [] : t[n.key] = null));
|
|
@@ -4587,17 +4605,17 @@ var Fa = /*#__PURE__*/ Q(Da, [["render", Pa]]), Ia = d({
|
|
|
4587
4605
|
};
|
|
4588
4606
|
}, f = (t) => {
|
|
4589
4607
|
if (t && t.length > 0) {
|
|
4590
|
-
let { data: n, values: a } = d(
|
|
4608
|
+
let { data: n, values: a } = d(G(t)), c = {}, l = e.id || r.params.id;
|
|
4591
4609
|
if (e.cache && l) {
|
|
4592
|
-
let e =
|
|
4610
|
+
let e = Y(`tables_${l}`, !1);
|
|
4593
4611
|
e && e.params.forEach((e) => {
|
|
4594
4612
|
c[e.key] = e.value;
|
|
4595
4613
|
});
|
|
4596
4614
|
}
|
|
4597
|
-
i.value = n, o.value =
|
|
4615
|
+
i.value = n, o.value = G({
|
|
4598
4616
|
...a,
|
|
4599
4617
|
...c
|
|
4600
|
-
}), s.value =
|
|
4618
|
+
}), s.value = G(a);
|
|
4601
4619
|
}
|
|
4602
4620
|
l(!0);
|
|
4603
4621
|
};
|
|
@@ -4699,8 +4717,8 @@ var Va = /*#__PURE__*/ Q(Ia, [["render", Ba]]), Ha = d({
|
|
|
4699
4717
|
name: "UzSpin",
|
|
4700
4718
|
components: {
|
|
4701
4719
|
NButton: L,
|
|
4702
|
-
NSpin:
|
|
4703
|
-
NEllipsis:
|
|
4720
|
+
NSpin: je,
|
|
4721
|
+
NEllipsis: de
|
|
4704
4722
|
},
|
|
4705
4723
|
emits: ["update:value"],
|
|
4706
4724
|
props: {
|
|
@@ -4718,7 +4736,7 @@ var Va = /*#__PURE__*/ Q(Ia, [["render", Ba]]), Ha = d({
|
|
|
4718
4736
|
}
|
|
4719
4737
|
},
|
|
4720
4738
|
setup(e, { emit: t }) {
|
|
4721
|
-
let { t: n } =
|
|
4739
|
+
let { t: n } = W(), r = w(), i = w(5), a = () => {
|
|
4722
4740
|
t("update:value", !1);
|
|
4723
4741
|
}, o = () => {
|
|
4724
4742
|
clearInterval(r.value);
|
|
@@ -4773,8 +4791,8 @@ function Ua(e, t, n, i, a, s) {
|
|
|
4773
4791
|
var Wa = /*#__PURE__*/ Q(Ha, [["render", Ua]]), Ga = d({
|
|
4774
4792
|
name: "UzTableExpand",
|
|
4775
4793
|
components: {
|
|
4776
|
-
NDataTable:
|
|
4777
|
-
NForm:
|
|
4794
|
+
NDataTable: ae,
|
|
4795
|
+
NForm: fe
|
|
4778
4796
|
},
|
|
4779
4797
|
props: {
|
|
4780
4798
|
data: {
|
|
@@ -4794,10 +4812,10 @@ var Wa = /*#__PURE__*/ Q(Ha, [["render", Ua]]), Ga = d({
|
|
|
4794
4812
|
let t = e.data.merge, n = Function("formValue", "mainFormValue", "POST", t);
|
|
4795
4813
|
r.value = await n(e.value[`sub_${e.data.key}`], { value: () => e.value }, Z);
|
|
4796
4814
|
} catch (e) {
|
|
4797
|
-
|
|
4815
|
+
q(e);
|
|
4798
4816
|
}
|
|
4799
4817
|
_i(e.data.link).then(async (e) => {
|
|
4800
|
-
let { tableColumns: r } = await Ti(yi(
|
|
4818
|
+
let { tableColumns: r } = await Ti(yi(et.parse(e.viewJson).table), !0, 2, () => {}, {}, !1, !0), a = 0, o = r.map((e) => ({
|
|
4801
4819
|
...e,
|
|
4802
4820
|
sorter: !1,
|
|
4803
4821
|
resizable: !1
|
|
@@ -4838,7 +4856,7 @@ function Ka(e, t, n, i, a, o) {
|
|
|
4838
4856
|
]);
|
|
4839
4857
|
}
|
|
4840
4858
|
var qa = /*#__PURE__*/ Q(Ga, [["render", Ka]]), Ja = d({
|
|
4841
|
-
components: { NSkeleton:
|
|
4859
|
+
components: { NSkeleton: ke },
|
|
4842
4860
|
setup() {
|
|
4843
4861
|
return {};
|
|
4844
4862
|
}
|
|
@@ -4884,13 +4902,13 @@ function Qa(e, t, n, r, i, s) {
|
|
|
4884
4902
|
var $a = d({
|
|
4885
4903
|
name: "UzTable",
|
|
4886
4904
|
components: {
|
|
4887
|
-
NDataTable:
|
|
4888
|
-
NPopover:
|
|
4905
|
+
NDataTable: ae,
|
|
4906
|
+
NPopover: Te,
|
|
4889
4907
|
NButton: L,
|
|
4890
|
-
NIcon:
|
|
4891
|
-
NCheckbox:
|
|
4892
|
-
NSpin:
|
|
4893
|
-
VueDraggable:
|
|
4908
|
+
NIcon: H,
|
|
4909
|
+
NCheckbox: z,
|
|
4910
|
+
NSpin: je,
|
|
4911
|
+
VueDraggable: $e,
|
|
4894
4912
|
UzSpin: Wa,
|
|
4895
4913
|
TableExpand: qa,
|
|
4896
4914
|
SkeletonLoading: /* @__PURE__ */ Q(Ja, [["render", Qa]])
|
|
@@ -5021,7 +5039,7 @@ var $a = d({
|
|
|
5021
5039
|
value: () => null,
|
|
5022
5040
|
setValue: () => null
|
|
5023
5041
|
});
|
|
5024
|
-
let a = p("userStore"), o =
|
|
5042
|
+
let a = p("userStore"), o = qe(), { t: s } = W(), c = Ve(), l = n(() => X.isMobile), u = w(), d = w(), m = w(), g = w(!!i.header), _ = w(!1), v = w(!1), b = w(""), x = w(), C = w([]), T = n(() => C.value.filter((e) => e.show)), E = w([]), D = w(void 0), O = w([]), k = w({
|
|
5025
5043
|
params: [],
|
|
5026
5044
|
query: {
|
|
5027
5045
|
page: 1,
|
|
@@ -5034,32 +5052,32 @@ var $a = d({
|
|
|
5034
5052
|
when_drawer_open: "",
|
|
5035
5053
|
when_before_save: "",
|
|
5036
5054
|
when_after_save: ""
|
|
5037
|
-
}), R = w(Ci()), ne = w(""),
|
|
5055
|
+
}), R = w(Ci()), ne = w(""), z = w(!1), re = w([]), B = w([]), ie = p("modules"), ae = (e) => e.id, oe = (e, n) => {
|
|
5038
5056
|
t("update:rowKeys", {
|
|
5039
5057
|
keys: e,
|
|
5040
|
-
rows:
|
|
5058
|
+
rows: G(n)
|
|
5041
5059
|
});
|
|
5042
|
-
},
|
|
5043
|
-
if (
|
|
5044
|
-
let e =
|
|
5045
|
-
|
|
5060
|
+
}, se = (e, n, r) => {
|
|
5061
|
+
if (re.value = e, r.action === "check" && B.value.push(r.row), r.action === "uncheck") {
|
|
5062
|
+
let e = B.value.findIndex((e) => e.id === r.row?.id);
|
|
5063
|
+
B.value.splice(e, 1);
|
|
5046
5064
|
}
|
|
5047
5065
|
r.action === "checkAll" && n.forEach((e) => {
|
|
5048
|
-
e &&
|
|
5049
|
-
}), r.action === "uncheckAll" && (
|
|
5050
|
-
keys:
|
|
5051
|
-
rows:
|
|
5066
|
+
e && B.value.push(e);
|
|
5067
|
+
}), r.action === "uncheckAll" && (B.value = [], re.value = []), t("update:rowKeys", {
|
|
5068
|
+
keys: G(re.value),
|
|
5069
|
+
rows: G(B.value)
|
|
5052
5070
|
});
|
|
5053
|
-
},
|
|
5071
|
+
}, ce = (e) => {
|
|
5054
5072
|
O.value = e;
|
|
5055
|
-
},
|
|
5073
|
+
}, le = n(() => {
|
|
5056
5074
|
let t = e.summary || R.value.summary;
|
|
5057
5075
|
if (t && typeof t == "string") {
|
|
5058
5076
|
let e = Function("pageData", "h", t);
|
|
5059
5077
|
return (t) => e(t, f);
|
|
5060
5078
|
}
|
|
5061
5079
|
return t && typeof t == "function" ? t : () => [];
|
|
5062
|
-
}),
|
|
5080
|
+
}), ue = (t) => {
|
|
5063
5081
|
let n = e.id || o.params.id, r;
|
|
5064
5082
|
if (e.fetch) r = e.fetch({
|
|
5065
5083
|
...t,
|
|
@@ -5073,7 +5091,7 @@ var $a = d({
|
|
|
5073
5091
|
tableId: n
|
|
5074
5092
|
});
|
|
5075
5093
|
return r;
|
|
5076
|
-
},
|
|
5094
|
+
}, de = (t) => {
|
|
5077
5095
|
let n = e.id || o.params.id, r;
|
|
5078
5096
|
if (e.fetch) r = e.fetch({
|
|
5079
5097
|
id: t.id,
|
|
@@ -5087,44 +5105,44 @@ var $a = d({
|
|
|
5087
5105
|
tableId: n
|
|
5088
5106
|
});
|
|
5089
5107
|
return r;
|
|
5090
|
-
},
|
|
5108
|
+
}, V = (n = !1) => {
|
|
5091
5109
|
let r = e.id || o.params.id;
|
|
5092
5110
|
e.enableLoading && (_.value = !0, t("update:loading", !0));
|
|
5093
|
-
let i =
|
|
5111
|
+
let i = G(k.value);
|
|
5094
5112
|
n && delete i.orderby, I.value.fetch ? tr([I.value.fetch], "", i).then((e) => {
|
|
5095
|
-
let n =
|
|
5096
|
-
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1), R.value.cache && r &&
|
|
5113
|
+
let n = kt(e);
|
|
5114
|
+
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1), R.value.cache && r && J(`tables_${r}`, k.value);
|
|
5097
5115
|
}).catch(() => {
|
|
5098
5116
|
_.value = !1, v.value = !0, t("update:loading", !1);
|
|
5099
|
-
}) :
|
|
5100
|
-
let n =
|
|
5101
|
-
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1), R.value.cache && r &&
|
|
5117
|
+
}) : ue(i).then((e) => {
|
|
5118
|
+
let n = kt(e);
|
|
5119
|
+
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1), R.value.cache && r && J(`tables_${r}`, k.value);
|
|
5102
5120
|
}).catch(() => {
|
|
5103
5121
|
_.value = !1, v.value = !0, t("update:loading", !1);
|
|
5104
5122
|
});
|
|
5105
|
-
},
|
|
5106
|
-
k.value.query.page = e, u.value && (u.value.scrollTop = 0),
|
|
5107
|
-
},
|
|
5123
|
+
}, fe = (e) => {
|
|
5124
|
+
k.value.query.page = e, u.value && (u.value.scrollTop = 0), Ot(), V();
|
|
5125
|
+
}, pe = () => {
|
|
5108
5126
|
let e = k.value.query.page + 1;
|
|
5109
|
-
e > k.value.query.pageMax && (e = 1), k.value.query.page = e, u.value && (u.value.scrollTop = 0),
|
|
5127
|
+
e > k.value.query.pageMax && (e = 1), k.value.query.page = e, u.value && (u.value.scrollTop = 0), V();
|
|
5128
|
+
}, me = (e) => {
|
|
5129
|
+
k.value.query.pageSize = e, k.value.query.page = 1, Ot(), V();
|
|
5110
5130
|
}, he = (e) => {
|
|
5111
|
-
k.value.
|
|
5112
|
-
},
|
|
5113
|
-
e && e.order ? k.value.orderby = `${e.columnKey} ${e.order.replace("end", "")}` : delete k.value.orderby, B();
|
|
5114
|
-
}, V = () => {
|
|
5131
|
+
e && e.order ? k.value.orderby = `${e.columnKey} ${e.order.replace("end", "")}` : delete k.value.orderby, V();
|
|
5132
|
+
}, H = () => {
|
|
5115
5133
|
if (typeof e.addFetch == "function") return e.addFetch();
|
|
5116
5134
|
m.value?.addAndEdit(e.id || o.params.id, async () => {
|
|
5117
|
-
let { form: e } = await
|
|
5135
|
+
let { form: e } = await be();
|
|
5118
5136
|
return {
|
|
5119
5137
|
form: e,
|
|
5120
5138
|
data: {}
|
|
5121
5139
|
};
|
|
5122
|
-
}, R.value, I.value, 0,
|
|
5140
|
+
}, R.value, I.value, 0, je);
|
|
5141
|
+
}, ge = (e) => {
|
|
5142
|
+
e.show = !e.show, Ae();
|
|
5123
5143
|
}, _e = (e) => {
|
|
5124
|
-
|
|
5125
|
-
}, ve = (
|
|
5126
|
-
k.value.params = e, B();
|
|
5127
|
-
}, ye = () => [{
|
|
5144
|
+
k.value.params = e, V();
|
|
5145
|
+
}, ve = () => [{
|
|
5128
5146
|
title: s("Table.createdByTime"),
|
|
5129
5147
|
key: "createTime",
|
|
5130
5148
|
resizable: !0,
|
|
@@ -5132,7 +5150,7 @@ var $a = d({
|
|
|
5132
5150
|
show: !0,
|
|
5133
5151
|
ellipsis: !1,
|
|
5134
5152
|
width: 180,
|
|
5135
|
-
render: (e) => [f("div", {}, { default: () => e.createBy }), f("div", {}, { default: () =>
|
|
5153
|
+
render: (e) => [f("div", {}, { default: () => e.createBy }), f("div", {}, { default: () => At(e.createTime, "yyyy-MM-dd hh:mm:ss") })]
|
|
5136
5154
|
}, {
|
|
5137
5155
|
title: s("Table.updatedByTime"),
|
|
5138
5156
|
key: "updateTime",
|
|
@@ -5141,64 +5159,64 @@ var $a = d({
|
|
|
5141
5159
|
show: !0,
|
|
5142
5160
|
ellipsis: !0,
|
|
5143
5161
|
width: 180,
|
|
5144
|
-
render: (e) => [f("div", {}, { default: () => e.updateBy }), f("div", {}, { default: () =>
|
|
5145
|
-
}],
|
|
5162
|
+
render: (e) => [f("div", {}, { default: () => e.updateBy }), f("div", {}, { default: () => At(e.updateTime, "yyyy-MM-dd hh:mm:ss") })]
|
|
5163
|
+
}], ye = (t) => a?.remainingDays < 0 && t === "add" ? !0 : !e.ruleFetch || !N.value || N.value && N.value[0] === "*" ? !1 : !N.value?.includes(t), be = async (e) => {
|
|
5146
5164
|
let { form: t, fillingDefaultValue: n, formDefaultValue: r } = await wi(P.value, e, () => m.value?.getFormValues());
|
|
5147
5165
|
return x.value = t, {
|
|
5148
5166
|
form: t,
|
|
5149
5167
|
fillingDefaultValue: n,
|
|
5150
5168
|
formDefaultValue: r
|
|
5151
5169
|
};
|
|
5152
|
-
},
|
|
5153
|
-
|
|
5170
|
+
}, xe = async (e) => new Promise((t, n) => {
|
|
5171
|
+
de(e).then((e) => {
|
|
5154
5172
|
t(e && e[0]);
|
|
5155
5173
|
}).catch(() => {
|
|
5156
5174
|
n();
|
|
5157
5175
|
});
|
|
5158
|
-
}),
|
|
5159
|
-
let n = await
|
|
5176
|
+
}), Se = async (e, t) => {
|
|
5177
|
+
let n = await xe(e).catch(() => {}), { form: r, fillingDefaultValue: i } = await be(n || {}), a = {
|
|
5160
5178
|
...n,
|
|
5161
5179
|
...i
|
|
5162
5180
|
};
|
|
5163
5181
|
if (t && typeof t == "string") try {
|
|
5164
5182
|
a = await Function("rowData", "POST", "fnNotification", t)(a, Z, c).catch(() => null);
|
|
5165
5183
|
} catch (e) {
|
|
5166
|
-
|
|
5184
|
+
q(e);
|
|
5167
5185
|
}
|
|
5168
5186
|
let o = I.value.when_drawer_open;
|
|
5169
5187
|
if (o && typeof o == "string") try {
|
|
5170
5188
|
a = await Function("data", "POST", o)(a, Z).catch((e) => {
|
|
5171
|
-
|
|
5189
|
+
q(e);
|
|
5172
5190
|
});
|
|
5173
5191
|
} catch (e) {
|
|
5174
|
-
|
|
5192
|
+
q(e);
|
|
5175
5193
|
}
|
|
5176
5194
|
return {
|
|
5177
5195
|
form: r,
|
|
5178
5196
|
data: a
|
|
5179
5197
|
};
|
|
5180
|
-
},
|
|
5181
|
-
let i =
|
|
5198
|
+
}, Ce = (n, r) => {
|
|
5199
|
+
let i = G(n.onClick), a = e.id || o.params.id;
|
|
5182
5200
|
if (n.disabled) {
|
|
5183
5201
|
if (typeof n.disabled == "string") {
|
|
5184
5202
|
let e = Function("rowData", "rowIndex", n.disabled);
|
|
5185
|
-
n.disabled = (t, r) => e(t, r) ||
|
|
5203
|
+
n.disabled = (t, r) => e(t, r) || ye(n.key);
|
|
5186
5204
|
} else if (typeof n.disabled == "function") {
|
|
5187
|
-
let e =
|
|
5188
|
-
n.disabled = (t, r) => e.disabled(t, r) ||
|
|
5205
|
+
let e = G(n);
|
|
5206
|
+
n.disabled = (t, r) => e.disabled(t, r) || ye(n.key);
|
|
5189
5207
|
}
|
|
5190
|
-
} else n.disabled = () =>
|
|
5208
|
+
} else n.disabled = () => ye(n.key);
|
|
5191
5209
|
if (n.loading = _.value, n.type !== "group" && n.optionsType) n.onClick = async (e) => {
|
|
5192
|
-
|
|
5210
|
+
xe(e).then((r) => {
|
|
5193
5211
|
if (n.optionsType === "drawer:insider") {
|
|
5194
5212
|
if (i) try {
|
|
5195
5213
|
Function("rowData", "POST", "fnNotification", i)(r, Z, c).then((e) => {
|
|
5196
5214
|
m.value?.link(n.optionsSource || "", void 0, e);
|
|
5197
5215
|
}).catch((e) => {
|
|
5198
|
-
|
|
5216
|
+
q(e);
|
|
5199
5217
|
});
|
|
5200
5218
|
} catch (e) {
|
|
5201
|
-
|
|
5219
|
+
q(e);
|
|
5202
5220
|
}
|
|
5203
5221
|
} else t("update:suffixes", {
|
|
5204
5222
|
title: n.buttonText,
|
|
@@ -5215,17 +5233,17 @@ var $a = d({
|
|
|
5215
5233
|
}).catch(() => null);
|
|
5216
5234
|
};
|
|
5217
5235
|
else if (n.type !== "group" && n.action === "detailInside") {
|
|
5218
|
-
let t =
|
|
5236
|
+
let t = G(n.onClick);
|
|
5219
5237
|
n.onClick = (n) => {
|
|
5220
|
-
m.value?.addAndEdit(e.id || o.params.id, () =>
|
|
5238
|
+
m.value?.addAndEdit(e.id || o.params.id, () => Se(n, t), R.value, I.value, 2, je);
|
|
5221
5239
|
};
|
|
5222
5240
|
} else if (n.type !== "group" && n.action === "editInside") {
|
|
5223
|
-
let t =
|
|
5241
|
+
let t = G(n.onClick);
|
|
5224
5242
|
n.onClick = (n) => {
|
|
5225
|
-
m.value?.addAndEdit(e.id || o.params.id, () =>
|
|
5243
|
+
m.value?.addAndEdit(e.id || o.params.id, () => Se(n, t), R.value, I.value, 1, je);
|
|
5226
5244
|
};
|
|
5227
5245
|
} else if (n.type !== "group" && n.action === "deleteInside") {
|
|
5228
|
-
let t =
|
|
5246
|
+
let t = G(n.onClick);
|
|
5229
5247
|
n.onClick = (n) => {
|
|
5230
5248
|
let i;
|
|
5231
5249
|
i = e.deleteFetch ? e.deleteFetch({
|
|
@@ -5239,14 +5257,14 @@ var $a = d({
|
|
|
5239
5257
|
}), i.then(() => {
|
|
5240
5258
|
if (t) try {
|
|
5241
5259
|
Function("rowData", "fnNotification", "POST", t)(n, c, Z).then(() => {
|
|
5242
|
-
|
|
5260
|
+
V();
|
|
5243
5261
|
}).catch(() => null);
|
|
5244
5262
|
} catch (e) {
|
|
5245
|
-
|
|
5263
|
+
q(e);
|
|
5246
5264
|
}
|
|
5247
|
-
else
|
|
5265
|
+
else V();
|
|
5248
5266
|
}).catch((e) => {
|
|
5249
|
-
|
|
5267
|
+
q(e);
|
|
5250
5268
|
});
|
|
5251
5269
|
};
|
|
5252
5270
|
} else if (n.type !== "group" && n.action === "disabledInside") n.onClick = (t) => {
|
|
@@ -5255,7 +5273,7 @@ var $a = d({
|
|
|
5255
5273
|
...t,
|
|
5256
5274
|
is_disabled: "1"
|
|
5257
5275
|
}).then(() => {
|
|
5258
|
-
|
|
5276
|
+
V();
|
|
5259
5277
|
}).catch(() => null);
|
|
5260
5278
|
};
|
|
5261
5279
|
else if (n.type !== "group" && n.action === "enabledInside") n.onClick = (t) => {
|
|
@@ -5264,13 +5282,13 @@ var $a = d({
|
|
|
5264
5282
|
...t,
|
|
5265
5283
|
is_disabled: "0"
|
|
5266
5284
|
}).then(() => {
|
|
5267
|
-
|
|
5285
|
+
V();
|
|
5268
5286
|
}).catch(() => null);
|
|
5269
5287
|
};
|
|
5270
5288
|
else if (n.type !== "group" && n.action) {
|
|
5271
|
-
let e =
|
|
5289
|
+
let e = G(n.onClick);
|
|
5272
5290
|
n.onClick = (t) => {
|
|
5273
|
-
|
|
5291
|
+
de(t).then((t) => {
|
|
5274
5292
|
let r = t && t[0];
|
|
5275
5293
|
tr([n.action], r.id, r).then((t) => {
|
|
5276
5294
|
if (e && typeof e == "string") try {
|
|
@@ -5278,34 +5296,34 @@ var $a = d({
|
|
|
5278
5296
|
c.success({
|
|
5279
5297
|
content: e,
|
|
5280
5298
|
duration: 3e3
|
|
5281
|
-
}),
|
|
5299
|
+
}), V();
|
|
5282
5300
|
}).catch((e) => {
|
|
5283
|
-
|
|
5301
|
+
q(e);
|
|
5284
5302
|
});
|
|
5285
5303
|
} catch (e) {
|
|
5286
|
-
|
|
5304
|
+
q(e);
|
|
5287
5305
|
}
|
|
5288
5306
|
else e && typeof e == "function" ? e(r, t, () => {
|
|
5289
5307
|
c.success({
|
|
5290
5308
|
content: () => s("Notice.success"),
|
|
5291
5309
|
duration: 3e3
|
|
5292
|
-
}),
|
|
5310
|
+
}), V();
|
|
5293
5311
|
}) : (c.success({
|
|
5294
5312
|
content: () => s("Notice.success"),
|
|
5295
5313
|
duration: 3e3
|
|
5296
|
-
}),
|
|
5314
|
+
}), V());
|
|
5297
5315
|
}).catch(() => {
|
|
5298
5316
|
c.error({
|
|
5299
5317
|
content: () => s("Notice.failed"),
|
|
5300
5318
|
duration: 3e3
|
|
5301
|
-
}),
|
|
5319
|
+
}), V();
|
|
5302
5320
|
});
|
|
5303
5321
|
}).catch(() => null);
|
|
5304
5322
|
};
|
|
5305
5323
|
}
|
|
5306
|
-
},
|
|
5307
|
-
|
|
5308
|
-
let { tableColumns: n, search: r, subTableIds: i, subTableExpand: a } = await Ti(P.value, e.child, 0, () => ({}),
|
|
5324
|
+
}, we = async () => {
|
|
5325
|
+
z.value = !1, hi();
|
|
5326
|
+
let { tableColumns: n, search: r, subTableIds: i, subTableExpand: a } = await Ti(P.value, e.child, 0, () => ({}), ie);
|
|
5309
5327
|
!l.value && R.value.index && n.unshift({
|
|
5310
5328
|
title: "#",
|
|
5311
5329
|
key: "index",
|
|
@@ -5331,11 +5349,11 @@ var $a = d({
|
|
|
5331
5349
|
options: ["all", "none"]
|
|
5332
5350
|
});
|
|
5333
5351
|
let c = e.id || o.params.id;
|
|
5334
|
-
if (!l.value && R.value.commonTime && n.push(...
|
|
5335
|
-
let e =
|
|
5352
|
+
if (!l.value && R.value.commonTime && n.push(...ve()), e.enableAction === !0 && F.value && F.value.length > 0) {
|
|
5353
|
+
let e = G(F.value);
|
|
5336
5354
|
for (let t of e) t.type === "group" ? t.children.forEach((e) => {
|
|
5337
|
-
|
|
5338
|
-
}) :
|
|
5355
|
+
Ce(e, i);
|
|
5356
|
+
}) : Ce(t, i);
|
|
5339
5357
|
let t = {
|
|
5340
5358
|
title: () => s("Common.action"),
|
|
5341
5359
|
key: "action",
|
|
@@ -5350,7 +5368,7 @@ var $a = d({
|
|
|
5350
5368
|
return ur({
|
|
5351
5369
|
buttons: e,
|
|
5352
5370
|
rowData: t,
|
|
5353
|
-
callback:
|
|
5371
|
+
callback: V,
|
|
5354
5372
|
tableId: c
|
|
5355
5373
|
});
|
|
5356
5374
|
}
|
|
@@ -5359,10 +5377,10 @@ var $a = d({
|
|
|
5359
5377
|
}
|
|
5360
5378
|
let u = n;
|
|
5361
5379
|
if (c) {
|
|
5362
|
-
let e =
|
|
5380
|
+
let e = Y(`tables_filter_${c}`, !1);
|
|
5363
5381
|
if (e) try {
|
|
5364
5382
|
let t = await $n(c);
|
|
5365
|
-
t && (e = JSON.parse(t), u =
|
|
5383
|
+
t && (e = JSON.parse(t), u = Rt(n, e));
|
|
5366
5384
|
} catch {}
|
|
5367
5385
|
}
|
|
5368
5386
|
a.link && u.unshift({
|
|
@@ -5373,7 +5391,7 @@ var $a = d({
|
|
|
5373
5391
|
fixed: "left",
|
|
5374
5392
|
filter: "default",
|
|
5375
5393
|
filterOptionValue: null,
|
|
5376
|
-
renderFilterMenu: () => f("div", { class: "uz-table-filter" }, [f(L, { onClick:
|
|
5394
|
+
renderFilterMenu: () => f("div", { class: "uz-table-filter" }, [f(L, { onClick: Re }, { default: () => s("Common.expand") }), f(L, { onClick: ze }, { default: () => s("Common.contract") })]),
|
|
5377
5395
|
renderExpand: (e) => f(qa, {
|
|
5378
5396
|
data: a,
|
|
5379
5397
|
value: e
|
|
@@ -5383,23 +5401,23 @@ var $a = d({
|
|
|
5383
5401
|
u.forEach((e) => {
|
|
5384
5402
|
e.show && (d += Number(e.width || 140));
|
|
5385
5403
|
}), C.value = u, A.value = r, D.value = d;
|
|
5386
|
-
},
|
|
5404
|
+
}, Te = (e) => typeof e == "number" ? `${e}px` : e, Ee = () => {
|
|
5387
5405
|
if (e.height) {
|
|
5388
|
-
let t =
|
|
5406
|
+
let t = Te(e.height);
|
|
5389
5407
|
ee.value = t, j.value = t;
|
|
5390
5408
|
}
|
|
5391
|
-
},
|
|
5409
|
+
}, De = (t) => {
|
|
5392
5410
|
let n = e.id || o.params.id;
|
|
5393
5411
|
if (n) {
|
|
5394
5412
|
let e = 0;
|
|
5395
5413
|
C.value.forEach((t) => {
|
|
5396
5414
|
t.show && (e += Number(t.width || 140));
|
|
5397
|
-
}), D.value = e,
|
|
5415
|
+
}), D.value = e, J(`tables_filter_${n}`, t.filter((e) => e.key)), er({
|
|
5398
5416
|
table_id: n,
|
|
5399
5417
|
data: JSON.stringify(t)
|
|
5400
5418
|
}).catch(() => null);
|
|
5401
5419
|
}
|
|
5402
|
-
}, { run:
|
|
5420
|
+
}, { run: Oe } = Yr(De), { run: ke } = Yr((e, t) => {
|
|
5403
5421
|
let n = [];
|
|
5404
5422
|
C.value.forEach((r) => {
|
|
5405
5423
|
r.key !== "action" && r.key !== "index" && r.type !== "expand" && n.push({
|
|
@@ -5409,8 +5427,8 @@ var $a = d({
|
|
|
5409
5427
|
fixed: r.fixed,
|
|
5410
5428
|
width: r.key === t ? Number(e.toFixed(0)) : r.width
|
|
5411
5429
|
});
|
|
5412
|
-
}),
|
|
5413
|
-
}),
|
|
5430
|
+
}), De(n);
|
|
5431
|
+
}), Ae = () => {
|
|
5414
5432
|
let e = [];
|
|
5415
5433
|
C.value.forEach((t) => {
|
|
5416
5434
|
t.key !== "action" && t.key !== "index" && t.type !== "expand" && e.push({
|
|
@@ -5420,8 +5438,8 @@ var $a = d({
|
|
|
5420
5438
|
fixed: t.fixed,
|
|
5421
5439
|
width: t.width
|
|
5422
5440
|
});
|
|
5423
|
-
}),
|
|
5424
|
-
},
|
|
5441
|
+
}), Oe(e);
|
|
5442
|
+
}, je = (t, n, r) => {
|
|
5425
5443
|
let i, a = e.id || o.params.id;
|
|
5426
5444
|
i = e.formFetch ? e.formFetch({
|
|
5427
5445
|
tableId: a,
|
|
@@ -5429,12 +5447,23 @@ var $a = d({
|
|
|
5429
5447
|
}) : Zn({
|
|
5430
5448
|
tableId: a,
|
|
5431
5449
|
...t
|
|
5432
|
-
}), i.then(() => {
|
|
5433
|
-
|
|
5450
|
+
}), i.then((e) => {
|
|
5451
|
+
if (I.value.when_after_save) try {
|
|
5452
|
+
let r = I.value.when_after_save;
|
|
5453
|
+
Function("data", "POST", "res", r)(t, Z, e).then(() => {
|
|
5454
|
+
V(), n();
|
|
5455
|
+
}).catch(() => {
|
|
5456
|
+
ne.value = s("Notice.network"), z.value = !0;
|
|
5457
|
+
});
|
|
5458
|
+
} catch {
|
|
5459
|
+
ne.value = s("Notice.network"), z.value = !0;
|
|
5460
|
+
return;
|
|
5461
|
+
}
|
|
5462
|
+
else V(), n();
|
|
5434
5463
|
}).catch((e) => {
|
|
5435
5464
|
r(e);
|
|
5436
5465
|
});
|
|
5437
|
-
},
|
|
5466
|
+
}, Me = () => {
|
|
5438
5467
|
b.value = "", P.value = [], F.value = [], te.value = [], I.value = {
|
|
5439
5468
|
fetch: null,
|
|
5440
5469
|
fetchFn: "",
|
|
@@ -5442,15 +5471,15 @@ var $a = d({
|
|
|
5442
5471
|
when_before_save: "",
|
|
5443
5472
|
when_after_save: ""
|
|
5444
5473
|
}, R.value = Ci();
|
|
5445
|
-
},
|
|
5446
|
-
let n =
|
|
5474
|
+
}, Ne = (t) => {
|
|
5475
|
+
let n = et.parse(t.viewJson);
|
|
5447
5476
|
b.value = t.tableTitle, P.value = yi(n.table), F.value = vr(e.actions || n.action);
|
|
5448
5477
|
let r = vr(n.suffix || []);
|
|
5449
|
-
te.value = r.filter((e) => e.main).map((e) => (
|
|
5478
|
+
te.value = r.filter((e) => e.main).map((e) => (Fe(e), e)), I.value = xi(n.trigger);
|
|
5450
5479
|
let i = Ci(e.options ?? n.option);
|
|
5451
|
-
t.tableTitle && i.title &&
|
|
5452
|
-
},
|
|
5453
|
-
v.value = !1,
|
|
5480
|
+
t.tableTitle && i.title && jt(t.tableTitle), R.value = i;
|
|
5481
|
+
}, Pe = async () => {
|
|
5482
|
+
v.value = !1, Me();
|
|
5454
5483
|
let t = e.id || o.params.id;
|
|
5455
5484
|
if (k.value = {
|
|
5456
5485
|
params: [],
|
|
@@ -5462,17 +5491,17 @@ var $a = d({
|
|
|
5462
5491
|
}, E.value = [], e.ruleFetch) try {
|
|
5463
5492
|
N.value = await e.ruleFetch(t);
|
|
5464
5493
|
} catch {
|
|
5465
|
-
ne.value = s("Notice.network"),
|
|
5494
|
+
ne.value = s("Notice.network"), z.value = !0;
|
|
5466
5495
|
return;
|
|
5467
5496
|
}
|
|
5468
|
-
|
|
5469
|
-
|
|
5497
|
+
Ee(), e.columns ? (P.value = e.columns || [], F.value = e.actions || [], te.value = e.suffixes || [], R.value = Ci(e.options), await we()) : await _i(t).then(async (e) => {
|
|
5498
|
+
Ne(e), await we();
|
|
5470
5499
|
}).catch((e) => {
|
|
5471
|
-
ne.value = e?.message || s("Notice.network"),
|
|
5500
|
+
ne.value = e?.message || s("Notice.network"), z.value = !0;
|
|
5472
5501
|
});
|
|
5473
|
-
},
|
|
5502
|
+
}, Fe = (e) => {
|
|
5474
5503
|
if (e.type !== "group" && e.optionsType) {
|
|
5475
|
-
let n =
|
|
5504
|
+
let n = G(e.onClick);
|
|
5476
5505
|
e.onClick = () => {
|
|
5477
5506
|
t("update:suffixes", {
|
|
5478
5507
|
isTop: !0,
|
|
@@ -5482,58 +5511,58 @@ var $a = d({
|
|
|
5482
5511
|
open: e.optionsType,
|
|
5483
5512
|
onClick: n,
|
|
5484
5513
|
optionsSource: e.optionsSource,
|
|
5485
|
-
mainFormValue: () =>
|
|
5514
|
+
mainFormValue: () => B.value,
|
|
5486
5515
|
tableData: () => E.value,
|
|
5487
5516
|
children: null,
|
|
5488
5517
|
callback: null
|
|
5489
5518
|
});
|
|
5490
5519
|
};
|
|
5491
5520
|
} else if (e.type !== "group") {
|
|
5492
|
-
let t =
|
|
5521
|
+
let t = G(e.onClick);
|
|
5493
5522
|
e.onClick = async () => {
|
|
5494
5523
|
if (t && typeof t == "string") try {
|
|
5495
5524
|
let e = Function("rowData", "POST", "fnNotification", t);
|
|
5496
|
-
await e(
|
|
5525
|
+
await e(B.value, Z, c, e), V();
|
|
5497
5526
|
} catch (e) {
|
|
5498
|
-
|
|
5527
|
+
q(e);
|
|
5499
5528
|
}
|
|
5500
5529
|
};
|
|
5501
5530
|
}
|
|
5502
|
-
},
|
|
5531
|
+
}, Ie = () => {
|
|
5503
5532
|
if (_.value) return;
|
|
5504
5533
|
_.value = !0;
|
|
5505
5534
|
let t = e.id || o.params.id;
|
|
5506
|
-
t && (
|
|
5535
|
+
t && (Tt(`tables_filter_${t}`), er({
|
|
5507
5536
|
table_id: t,
|
|
5508
5537
|
data: null
|
|
5509
5538
|
}).catch(() => null).finally(() => {
|
|
5510
|
-
|
|
5539
|
+
we(), _.value = !1;
|
|
5511
5540
|
}));
|
|
5512
|
-
},
|
|
5513
|
-
|
|
5514
|
-
},
|
|
5541
|
+
}, Le = (e, t, n) => {
|
|
5542
|
+
ke(e, n.key);
|
|
5543
|
+
}, Re = () => {
|
|
5515
5544
|
O.value = E.value.map((e) => e.id);
|
|
5516
|
-
},
|
|
5545
|
+
}, ze = () => {
|
|
5517
5546
|
O.value = [];
|
|
5518
5547
|
};
|
|
5519
5548
|
return r({
|
|
5520
|
-
rebuild:
|
|
5521
|
-
init:
|
|
5522
|
-
nextPage:
|
|
5549
|
+
rebuild: Pe,
|
|
5550
|
+
init: V,
|
|
5551
|
+
nextPage: pe
|
|
5523
5552
|
}), y(async () => {
|
|
5524
|
-
await
|
|
5553
|
+
await Pe(), h(() => {
|
|
5525
5554
|
d.value?.scrollTo({
|
|
5526
5555
|
left: 0,
|
|
5527
5556
|
right: 0
|
|
5528
5557
|
});
|
|
5529
5558
|
});
|
|
5530
5559
|
}), M(() => e.height, () => {
|
|
5531
|
-
|
|
5560
|
+
Ee();
|
|
5532
5561
|
}), M([() => o.params.id, () => e.id], async () => {
|
|
5533
|
-
|
|
5562
|
+
Ot(), await Pe();
|
|
5534
5563
|
}), M(() => e.defaultCheckedRowKeys, (e) => {
|
|
5535
|
-
let t = e || [], n =
|
|
5536
|
-
|
|
5564
|
+
let t = e || [], n = B.value.filter((e) => t.includes(e.id));
|
|
5565
|
+
re.value = t, B.value = n;
|
|
5537
5566
|
}, { deep: !0 }), {
|
|
5538
5567
|
t: s,
|
|
5539
5568
|
loading: _,
|
|
@@ -5552,33 +5581,33 @@ var $a = d({
|
|
|
5552
5581
|
spinMsg: ne,
|
|
5553
5582
|
tableScrollX: D,
|
|
5554
5583
|
suffixes: te,
|
|
5555
|
-
spinError:
|
|
5584
|
+
spinError: z,
|
|
5556
5585
|
isMobile: l,
|
|
5557
5586
|
mRef: u,
|
|
5558
|
-
checkRowKeys:
|
|
5587
|
+
checkRowKeys: re,
|
|
5559
5588
|
route: o,
|
|
5560
|
-
rowKey:
|
|
5561
|
-
pageChange:
|
|
5562
|
-
pageSizeChange:
|
|
5563
|
-
pageSorter:
|
|
5564
|
-
showChange:
|
|
5565
|
-
submit:
|
|
5566
|
-
handleAdd:
|
|
5567
|
-
handleColumnChange:
|
|
5568
|
-
handleCheckRowKeys:
|
|
5569
|
-
handleExpandedRowKeys:
|
|
5570
|
-
checkRole:
|
|
5571
|
-
rebuild:
|
|
5572
|
-
summaryFn:
|
|
5573
|
-
handleMobileCheckRowKeys:
|
|
5574
|
-
isTypeofNumber:
|
|
5575
|
-
resetFilter:
|
|
5576
|
-
handleColumnResize:
|
|
5589
|
+
rowKey: ae,
|
|
5590
|
+
pageChange: fe,
|
|
5591
|
+
pageSizeChange: me,
|
|
5592
|
+
pageSorter: he,
|
|
5593
|
+
showChange: ge,
|
|
5594
|
+
submit: _e,
|
|
5595
|
+
handleAdd: H,
|
|
5596
|
+
handleColumnChange: Ae,
|
|
5597
|
+
handleCheckRowKeys: se,
|
|
5598
|
+
handleExpandedRowKeys: ce,
|
|
5599
|
+
checkRole: ye,
|
|
5600
|
+
rebuild: Pe,
|
|
5601
|
+
summaryFn: le,
|
|
5602
|
+
handleMobileCheckRowKeys: oe,
|
|
5603
|
+
isTypeofNumber: Te,
|
|
5604
|
+
resetFilter: Ie,
|
|
5605
|
+
handleColumnResize: Le,
|
|
5577
5606
|
expandedRowKeys: O,
|
|
5578
|
-
handleExpandAll:
|
|
5579
|
-
handleContractAll:
|
|
5607
|
+
handleExpandAll: Re,
|
|
5608
|
+
handleContractAll: ze,
|
|
5580
5609
|
doPortChange: () => {
|
|
5581
|
-
|
|
5610
|
+
V();
|
|
5582
5611
|
}
|
|
5583
5612
|
};
|
|
5584
5613
|
}
|
|
@@ -5853,13 +5882,13 @@ function ao(t, n, u, d, f, p) {
|
|
|
5853
5882
|
var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
5854
5883
|
name: "UzTableChild",
|
|
5855
5884
|
components: {
|
|
5856
|
-
UzIcon:
|
|
5857
|
-
NSpin:
|
|
5885
|
+
UzIcon: Kt,
|
|
5886
|
+
NSpin: je,
|
|
5858
5887
|
NButton: L,
|
|
5859
|
-
NIcon:
|
|
5860
|
-
NDataTable:
|
|
5861
|
-
NForm:
|
|
5862
|
-
NDivider:
|
|
5888
|
+
NIcon: H,
|
|
5889
|
+
NDataTable: ae,
|
|
5890
|
+
NForm: fe,
|
|
5891
|
+
NDivider: se
|
|
5863
5892
|
},
|
|
5864
5893
|
props: {
|
|
5865
5894
|
value: {
|
|
@@ -5878,13 +5907,13 @@ var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
|
5878
5907
|
},
|
|
5879
5908
|
emits: ["update:value"],
|
|
5880
5909
|
setup(e, { emit: t, expose: r }) {
|
|
5881
|
-
let i = p("emitSuffix"), a = p("modules"), o = p("mainFormValue"), s = p("childFormReload"), c = n(() => s ? s() : 0), { t: l } =
|
|
5882
|
-
let { formDefaultValue: r, fillingDefaultArray: i } = await wi(
|
|
5910
|
+
let i = p("emitSuffix"), a = p("modules"), o = p("mainFormValue"), s = p("childFormReload"), c = n(() => s ? s() : 0), { t: l } = W(), u = w(), d = w(), m = w(), g = w(!1), _ = w(!0), y = w([]), b = w({ child: [] }), x = w(""), S = w({}), C = w([]), T = w(void 0), E = async (t, n) => {
|
|
5911
|
+
let { formDefaultValue: r, fillingDefaultArray: i } = await wi(G(n ?? e.item.params.columns), t, void 0, !0);
|
|
5883
5912
|
return S.value = r, i;
|
|
5884
5913
|
}, D = async (t) => {
|
|
5885
5914
|
if (g.value) return;
|
|
5886
5915
|
g.value = !0;
|
|
5887
|
-
let n = await E(t), r =
|
|
5916
|
+
let n = await E(t), r = G(t).map((e, t) => ({
|
|
5888
5917
|
...e,
|
|
5889
5918
|
...n[t]
|
|
5890
5919
|
}));
|
|
@@ -5900,7 +5929,7 @@ var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
|
5900
5929
|
let t = e.item.params.merge;
|
|
5901
5930
|
r = await Function("formValue", "mainFormValue", "POST", t)(r, o, Z);
|
|
5902
5931
|
} catch (e) {
|
|
5903
|
-
|
|
5932
|
+
q(e);
|
|
5904
5933
|
}
|
|
5905
5934
|
b.value.child = r, g.value = !1, h(() => {
|
|
5906
5935
|
F();
|
|
@@ -5910,7 +5939,7 @@ var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
|
5910
5939
|
});
|
|
5911
5940
|
}, O = (e) => e.delete ? "uz-table-child-delete" : "", k = async (t, n = !1) => {
|
|
5912
5941
|
e.item._suffix && (C.value = e.item._suffix.filter((e) => e.sub)), await E(e.value, t);
|
|
5913
|
-
let { tableColumns: r, tableWidth: i } = await Ti(
|
|
5942
|
+
let { tableColumns: r, tableWidth: i } = await Ti(G(t ?? e.item.params.columns), !0, e.status, () => b.value.child, a, n), s = i;
|
|
5914
5943
|
r.unshift({
|
|
5915
5944
|
title: " ",
|
|
5916
5945
|
key: "index",
|
|
@@ -5929,7 +5958,7 @@ var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
|
5929
5958
|
hide: !0,
|
|
5930
5959
|
show: !0,
|
|
5931
5960
|
render() {
|
|
5932
|
-
return f("div", { class: "flex justify-center" }, f(
|
|
5961
|
+
return f("div", { class: "flex justify-center" }, f(H, {}, { default: () => f(Kt, { icon: "List" }) }));
|
|
5933
5962
|
}
|
|
5934
5963
|
}), s += 40), e.status !== 2 && e.item.params.showActions && r.push({
|
|
5935
5964
|
title: () => l("Common.action"),
|
|
@@ -5972,12 +6001,12 @@ var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
|
5972
6001
|
let n = e.item.params.summary;
|
|
5973
6002
|
return Function("pageData", "h", n)(t, f);
|
|
5974
6003
|
} catch (e) {
|
|
5975
|
-
|
|
6004
|
+
q(e);
|
|
5976
6005
|
}
|
|
5977
6006
|
}
|
|
5978
6007
|
return [];
|
|
5979
6008
|
}, ee = async () => {
|
|
5980
|
-
x.value = "", b.value.child.push(
|
|
6009
|
+
x.value = "", b.value.child.push(G(S.value)), h(() => {
|
|
5981
6010
|
F();
|
|
5982
6011
|
});
|
|
5983
6012
|
}, j = async () => {
|
|
@@ -6008,7 +6037,7 @@ var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
|
6008
6037
|
}
|
|
6009
6038
|
});
|
|
6010
6039
|
} catch (e) {
|
|
6011
|
-
|
|
6040
|
+
q(e);
|
|
6012
6041
|
}
|
|
6013
6042
|
}, N = () => {
|
|
6014
6043
|
m.value?.restoreValidation();
|
|
@@ -6020,11 +6049,11 @@ var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
|
6020
6049
|
})), F = () => {
|
|
6021
6050
|
if (e.item.params.draggable && e.status !== 2 && u.value && !d.value) {
|
|
6022
6051
|
let e = u.value.$el.querySelector(".n-data-table-tbody");
|
|
6023
|
-
e && (d.value =
|
|
6052
|
+
e && (d.value = tt.create(e, {
|
|
6024
6053
|
handle: ".uz-drag-handle",
|
|
6025
6054
|
onEnd: ({ oldIndex: e, newIndex: t }) => {
|
|
6026
6055
|
d.value?.destroy(), d.value = null, _.value = !1;
|
|
6027
|
-
let n =
|
|
6056
|
+
let n = G(b.value.child), r = n.splice(e, 1)[0];
|
|
6028
6057
|
n.splice(t, 0, r), n = n.map((e, t) => ({
|
|
6029
6058
|
...e,
|
|
6030
6059
|
sort_index: t
|
|
@@ -6194,7 +6223,7 @@ function ho(t, n, u, d, f, p) {
|
|
|
6194
6223
|
}
|
|
6195
6224
|
var go = /*#__PURE__*/ Q(so, [["render", ho]]), _o = d({
|
|
6196
6225
|
name: "UzTableQuestChild",
|
|
6197
|
-
components: { NDataTable:
|
|
6226
|
+
components: { NDataTable: ae },
|
|
6198
6227
|
props: {
|
|
6199
6228
|
formValue: {
|
|
6200
6229
|
type: Object,
|
|
@@ -6208,7 +6237,7 @@ var go = /*#__PURE__*/ Q(so, [["render", ho]]), _o = d({
|
|
|
6208
6237
|
},
|
|
6209
6238
|
emits: ["update:value"],
|
|
6210
6239
|
setup(e) {
|
|
6211
|
-
let t = p("modules"), { t: n } =
|
|
6240
|
+
let t = p("modules"), { t: n } = W(), r = w(), i = w(!1), a = w([]), o = w([]), s = w(void 0), c = (t) => {
|
|
6212
6241
|
if (i.value = !0, e.item.params.link) {
|
|
6213
6242
|
let n = [];
|
|
6214
6243
|
e.item.params.columns.forEach((e) => {
|
|
@@ -6220,7 +6249,7 @@ var go = /*#__PURE__*/ Q(so, [["render", ho]]), _o = d({
|
|
|
6220
6249
|
}), o.value = t, i.value = !1;
|
|
6221
6250
|
}
|
|
6222
6251
|
}, l = async (i) => {
|
|
6223
|
-
let { tableColumns: c, tableWidth: l } = await Ti(
|
|
6252
|
+
let { tableColumns: c, tableWidth: l } = await Ti(G(i ?? e.item.params.columns), !0, 2, () => o.value, t), u = l;
|
|
6224
6253
|
c.unshift({
|
|
6225
6254
|
title: " ",
|
|
6226
6255
|
key: "index",
|
|
@@ -6286,7 +6315,7 @@ var go = /*#__PURE__*/ Q(so, [["render", ho]]), _o = d({
|
|
|
6286
6315
|
let n = e.item.params.summary;
|
|
6287
6316
|
return Function("pageData", "h", n)(t, f);
|
|
6288
6317
|
} catch (e) {
|
|
6289
|
-
|
|
6318
|
+
q(e);
|
|
6290
6319
|
}
|
|
6291
6320
|
}
|
|
6292
6321
|
return [];
|
|
@@ -6324,16 +6353,16 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6324
6353
|
name: "UzTableDrawer",
|
|
6325
6354
|
components: {
|
|
6326
6355
|
NButton: L,
|
|
6327
|
-
NDrawerContent:
|
|
6328
|
-
NDrawer:
|
|
6329
|
-
NSkeleton:
|
|
6330
|
-
NSpin:
|
|
6331
|
-
NPopover:
|
|
6332
|
-
NModal:
|
|
6356
|
+
NDrawerContent: le,
|
|
6357
|
+
NDrawer: ce,
|
|
6358
|
+
NSkeleton: ke,
|
|
6359
|
+
NSpin: je,
|
|
6360
|
+
NPopover: Te,
|
|
6361
|
+
NModal: Se
|
|
6333
6362
|
},
|
|
6334
6363
|
emits: ["update:show", "on-submit"],
|
|
6335
6364
|
setup(e, { emit: t, expose: r }) {
|
|
6336
|
-
let { t: i } =
|
|
6365
|
+
let { t: i } = W(), a = n(() => X.isMobile), o = w(), s = w(""), c = w(0), l = w({}), u = w({
|
|
6337
6366
|
link: "",
|
|
6338
6367
|
linkFn: ""
|
|
6339
6368
|
}), d = w(!1), f = w({
|
|
@@ -6362,7 +6391,7 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6362
6391
|
}), x = w(!1), S = w(), C = () => {
|
|
6363
6392
|
o.value?.restoreValidation(), l.value = {}, m.value = !1, p.value = !1, d.value = !1, t("update:show", !1);
|
|
6364
6393
|
}, T = () => {
|
|
6365
|
-
c.value === 2 ? C() :
|
|
6394
|
+
c.value === 2 ? C() : wt.info({
|
|
6366
6395
|
title: i("Common.hint"),
|
|
6367
6396
|
content: i("Table.closeConfirm"),
|
|
6368
6397
|
positiveText: i("Common.confirm"),
|
|
@@ -6378,10 +6407,10 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6378
6407
|
Function("formValues", "POST", t)(e, Z).then((e) => {
|
|
6379
6408
|
l.value = e;
|
|
6380
6409
|
}).catch((e) => {
|
|
6381
|
-
|
|
6410
|
+
q(e);
|
|
6382
6411
|
});
|
|
6383
6412
|
} catch (e) {
|
|
6384
|
-
|
|
6413
|
+
q(e);
|
|
6385
6414
|
}
|
|
6386
6415
|
else l.value = e;
|
|
6387
6416
|
};
|
|
@@ -6395,11 +6424,11 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6395
6424
|
let r = e.split(".")[0];
|
|
6396
6425
|
_i(r).then((e) => {
|
|
6397
6426
|
h(async () => {
|
|
6398
|
-
let t =
|
|
6427
|
+
let t = et.parse(e.viewJson);
|
|
6399
6428
|
f.value = Ci(t.option), d.value = !0;
|
|
6400
6429
|
let { form: i } = await wi(yi(t.table), n);
|
|
6401
6430
|
b.value = t.trigger, n && E(n);
|
|
6402
|
-
let a =
|
|
6431
|
+
let a = Y(`tables_cache_link_${r}`, !1);
|
|
6403
6432
|
a && (l.value = a), h(() => {
|
|
6404
6433
|
y.value = i, g.value = !1;
|
|
6405
6434
|
});
|
|
@@ -6411,7 +6440,7 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6411
6440
|
},
|
|
6412
6441
|
addAndEdit: async (e, t, n, r, i = 0, a) => {
|
|
6413
6442
|
s.value = e, g.value = !0, c.value = i, f.value = n, b.value = r, d.value = !0, t().then(({ form: t, data: n }) => {
|
|
6414
|
-
let r =
|
|
6443
|
+
let r = Y(`tables_cache_${e}`, !1);
|
|
6415
6444
|
r && i === 0 ? l.value = r : l.value = n, y.value = t, S.value = a, g.value = !1;
|
|
6416
6445
|
}).catch(() => null);
|
|
6417
6446
|
},
|
|
@@ -6445,19 +6474,8 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6445
6474
|
v.value = 1, _.value = e.message;
|
|
6446
6475
|
return;
|
|
6447
6476
|
}
|
|
6448
|
-
if (S.value) S.value(e, (
|
|
6449
|
-
|
|
6450
|
-
let n = b.value.when_after_save;
|
|
6451
|
-
Function("data", "POST", "res", n)(e, Z, t).then(() => {
|
|
6452
|
-
C();
|
|
6453
|
-
}).catch((e) => {
|
|
6454
|
-
v.value = 1, _.value = e.message;
|
|
6455
|
-
});
|
|
6456
|
-
} catch (e) {
|
|
6457
|
-
v.value = 1, _.value = e.message;
|
|
6458
|
-
return;
|
|
6459
|
-
}
|
|
6460
|
-
else C();
|
|
6477
|
+
if (S.value) S.value(e, () => {
|
|
6478
|
+
Tt(`tables_cache_${s.value}`), C();
|
|
6461
6479
|
}, (e) => {
|
|
6462
6480
|
v.value = 1, _.value = e;
|
|
6463
6481
|
});
|
|
@@ -6467,29 +6485,18 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6467
6485
|
tableId: n,
|
|
6468
6486
|
...e
|
|
6469
6487
|
}).then(() => {
|
|
6470
|
-
hi(), Xn({ tableId: n }).then((
|
|
6471
|
-
let
|
|
6488
|
+
hi(), Xn({ tableId: n }).then((e) => {
|
|
6489
|
+
let r = u.value.link.split("."), i;
|
|
6472
6490
|
if (u.value.linkFn) {
|
|
6473
|
-
let
|
|
6474
|
-
|
|
6475
|
-
} else
|
|
6476
|
-
label: e[
|
|
6491
|
+
let t = u.value.linkFn;
|
|
6492
|
+
i = Function("sourceData", t)(e);
|
|
6493
|
+
} else i = e.map((e) => ({
|
|
6494
|
+
label: e[r[1]],
|
|
6477
6495
|
value: e.id,
|
|
6478
6496
|
disabled: e?.status === "0",
|
|
6479
6497
|
params: e
|
|
6480
6498
|
}));
|
|
6481
|
-
|
|
6482
|
-
let t = b.value.when_after_save;
|
|
6483
|
-
Function("data", "POST", "res", t)(e, Z, r).then(() => {
|
|
6484
|
-
C();
|
|
6485
|
-
}).catch((e) => {
|
|
6486
|
-
v.value = 1, _.value = e.message;
|
|
6487
|
-
});
|
|
6488
|
-
} catch (e) {
|
|
6489
|
-
v.value = 1, _.value = e.message;
|
|
6490
|
-
return;
|
|
6491
|
-
}
|
|
6492
|
-
else C();
|
|
6499
|
+
m.value = !1, Tt(`tables_cache_link_${n}`), t("on-submit", i), C();
|
|
6493
6500
|
}).catch((e) => {
|
|
6494
6501
|
v.value = 1, _.value = e;
|
|
6495
6502
|
});
|
|
@@ -6503,10 +6510,10 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6503
6510
|
},
|
|
6504
6511
|
doCacheToStore: () => {
|
|
6505
6512
|
let e = o.value?.getValues();
|
|
6506
|
-
if (S.value)
|
|
6513
|
+
if (S.value) J(`tables_cache_${s.value}`, e, "1 Hours"), C();
|
|
6507
6514
|
else {
|
|
6508
6515
|
let t = u.value.link.split(".")[0];
|
|
6509
|
-
|
|
6516
|
+
J(`tables_cache_link_${t}`, e, "1 Hours"), C();
|
|
6510
6517
|
}
|
|
6511
6518
|
}
|
|
6512
6519
|
};
|
|
@@ -6722,11 +6729,11 @@ function No(t, n, s, c, l, u) {
|
|
|
6722
6729
|
var Po = d({
|
|
6723
6730
|
name: "UzTableMobile",
|
|
6724
6731
|
components: {
|
|
6725
|
-
NCheckbox:
|
|
6726
|
-
NRadio:
|
|
6727
|
-
NPagination:
|
|
6728
|
-
NCheckboxGroup:
|
|
6729
|
-
NRadioGroup:
|
|
6732
|
+
NCheckbox: z,
|
|
6733
|
+
NRadio: Ee,
|
|
6734
|
+
NPagination: Ce,
|
|
6735
|
+
NCheckboxGroup: re,
|
|
6736
|
+
NRadioGroup: De,
|
|
6730
6737
|
UzTableMobileList: /* @__PURE__ */ Q(Ao, [["render", No], ["__scopeId", "data-v-84c394fe"]])
|
|
6731
6738
|
},
|
|
6732
6739
|
props: {
|
|
@@ -6904,14 +6911,14 @@ function Ro(t, n, o, s, c, u) {
|
|
|
6904
6911
|
var zo = /*#__PURE__*/ Q(Po, [["render", Ro], ["__scopeId", "data-v-70b54e3b"]]), Bo = d({
|
|
6905
6912
|
name: "UzTableFile",
|
|
6906
6913
|
components: {
|
|
6907
|
-
UzIcon:
|
|
6908
|
-
NDropdown:
|
|
6914
|
+
UzIcon: Kt,
|
|
6915
|
+
NDropdown: ue,
|
|
6909
6916
|
NButton: L,
|
|
6910
|
-
NModal:
|
|
6911
|
-
NUpload:
|
|
6912
|
-
NSpace:
|
|
6913
|
-
NIcon:
|
|
6914
|
-
NDataTable:
|
|
6917
|
+
NModal: Se,
|
|
6918
|
+
NUpload: Le,
|
|
6919
|
+
NSpace: Ae,
|
|
6920
|
+
NIcon: H,
|
|
6921
|
+
NDataTable: ae
|
|
6915
6922
|
},
|
|
6916
6923
|
props: {
|
|
6917
6924
|
query: {
|
|
@@ -6927,14 +6934,14 @@ var zo = /*#__PURE__*/ Q(Po, [["render", Ro], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
6927
6934
|
},
|
|
6928
6935
|
emits: ["on-update:change"],
|
|
6929
6936
|
setup(e, { emit: t }) {
|
|
6930
|
-
let { t: n } =
|
|
6937
|
+
let { t: n } = W(), r = qe(), i = Ve(), a = w(!1), o = w(!1), s = w(!1), c = w([]), l = w(new FormData()), u = w([{
|
|
6931
6938
|
label: n("Common.import"),
|
|
6932
6939
|
key: "import",
|
|
6933
|
-
icon: () => f(
|
|
6940
|
+
icon: () => f(H, null, { default: () => f(Kt, { icon: "CloudUpload" }) })
|
|
6934
6941
|
}, {
|
|
6935
6942
|
label: n("Common.export"),
|
|
6936
6943
|
key: "export",
|
|
6937
|
-
icon: () => f(
|
|
6944
|
+
icon: () => f(H, null, { default: () => f(Kt, { icon: "CloudDownload" }) })
|
|
6938
6945
|
}]), d = w([
|
|
6939
6946
|
{
|
|
6940
6947
|
title: n("Common.fileName"),
|
|
@@ -7010,7 +7017,7 @@ var zo = /*#__PURE__*/ Q(Po, [["render", Ro], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
7010
7017
|
rawFileName: c,
|
|
7011
7018
|
dropOption: u,
|
|
7012
7019
|
dropSelect: (t) => {
|
|
7013
|
-
t === "import" ? (a.value = !0, v()) : t === "export" &&
|
|
7020
|
+
t === "import" ? (a.value = !0, v()) : t === "export" && wt.info({
|
|
7014
7021
|
title: n("Common.hint"),
|
|
7015
7022
|
content: n("File.exportConfirm"),
|
|
7016
7023
|
positiveText: n("Common.confirm"),
|
|
@@ -7157,7 +7164,7 @@ function Jo(t, n, i, s, u, d) {
|
|
|
7157
7164
|
}
|
|
7158
7165
|
var Yo = /*#__PURE__*/ Q(Bo, [["render", Jo], ["__scopeId", "data-v-d8e581ec"]]), $ = C({
|
|
7159
7166
|
page: {
|
|
7160
|
-
label:
|
|
7167
|
+
label: K.global.t("Common.home"),
|
|
7161
7168
|
key: "/",
|
|
7162
7169
|
path: "/",
|
|
7163
7170
|
closable: !1
|
|
@@ -7173,7 +7180,7 @@ function Xo(e) {
|
|
|
7173
7180
|
path: e.key,
|
|
7174
7181
|
closable: !1
|
|
7175
7182
|
};
|
|
7176
|
-
let t =
|
|
7183
|
+
let t = Y($.cache, !1);
|
|
7177
7184
|
t ? ($.active = t.active, t.thumbnail && ($.thumbnail = t.thumbnail)) : $.thumbnail = [{
|
|
7178
7185
|
label: e.label,
|
|
7179
7186
|
key: e.key,
|
|
@@ -7182,53 +7189,53 @@ function Xo(e) {
|
|
|
7182
7189
|
}];
|
|
7183
7190
|
}
|
|
7184
7191
|
function Zo(e) {
|
|
7185
|
-
$.active = e,
|
|
7192
|
+
$.active = e, qt.push(e), J($.cache, $, 0);
|
|
7186
7193
|
}
|
|
7187
7194
|
function Qo(e, t) {
|
|
7188
7195
|
let n = $.thumbnail.find((t) => t.key === e);
|
|
7189
|
-
n && (n.key = t, $.active = t,
|
|
7196
|
+
n && (n.key = t, $.active = t, J($.cache, $, 0));
|
|
7190
7197
|
}
|
|
7191
7198
|
function $o(e) {
|
|
7192
7199
|
let t = $.thumbnail.find((t) => t.path === e.key);
|
|
7193
|
-
t ? ($.active = t.key,
|
|
7200
|
+
t ? ($.active = t.key, J($.cache, $, 0), qt.push(t.key)) : ($.active = e.key, $.thumbnail.push({
|
|
7194
7201
|
...e,
|
|
7195
7202
|
path: e.key,
|
|
7196
7203
|
closable: !0
|
|
7197
|
-
}),
|
|
7204
|
+
}), qt.push(e.key));
|
|
7198
7205
|
}
|
|
7199
7206
|
function es(e) {
|
|
7200
7207
|
let t = $.thumbnail.findIndex((t) => t.key === e);
|
|
7201
7208
|
if ($.thumbnail.splice(t, 1), $.active === e) {
|
|
7202
7209
|
let e = $.thumbnail[t - 1]?.key || "";
|
|
7203
|
-
$.active = e,
|
|
7210
|
+
$.active = e, qt.push(e);
|
|
7204
7211
|
}
|
|
7205
|
-
|
|
7212
|
+
J($.cache, $, 0);
|
|
7206
7213
|
}
|
|
7207
7214
|
function ts() {
|
|
7208
|
-
$.active = $.page.path, $.thumbnail = [$.page],
|
|
7215
|
+
$.active = $.page.path, $.thumbnail = [$.page], qt.push($.page.path), J($.cache, $, 0);
|
|
7209
7216
|
}
|
|
7210
7217
|
//#endregion
|
|
7211
7218
|
//#region components/thumbnail/index.vue?vue&type=script&lang.ts
|
|
7212
7219
|
var ns = d({
|
|
7213
7220
|
name: "UzThumbnail",
|
|
7214
7221
|
components: {
|
|
7215
|
-
NTabs:
|
|
7216
|
-
NTabPane:
|
|
7222
|
+
NTabs: Pe,
|
|
7223
|
+
NTabPane: Ne,
|
|
7217
7224
|
NButton: L,
|
|
7218
|
-
NIcon:
|
|
7219
|
-
NPopconfirm:
|
|
7220
|
-
NFlex:
|
|
7225
|
+
NIcon: H,
|
|
7226
|
+
NPopconfirm: we,
|
|
7227
|
+
NFlex: V
|
|
7221
7228
|
},
|
|
7222
7229
|
props: { option: {
|
|
7223
7230
|
type: Object,
|
|
7224
7231
|
default: () => ({
|
|
7225
|
-
label:
|
|
7232
|
+
label: K.global.t("Common.home"),
|
|
7226
7233
|
key: "/",
|
|
7227
7234
|
cache: "thumbnailStore"
|
|
7228
7235
|
})
|
|
7229
7236
|
} },
|
|
7230
7237
|
setup(e, { slots: t }) {
|
|
7231
|
-
let { t: n } =
|
|
7238
|
+
let { t: n } = W(), r = w(!!t.prefix), i = qe();
|
|
7232
7239
|
return y(() => {
|
|
7233
7240
|
Xo(e.option), $.active !== i.path && Qo(i.path, i.fullPath);
|
|
7234
7241
|
}), M(() => i, (e) => {
|
|
@@ -7303,7 +7310,7 @@ function rs(t, n, i, o, u, d) {
|
|
|
7303
7310
|
]);
|
|
7304
7311
|
}
|
|
7305
7312
|
var is = /*#__PURE__*/ Q(ns, [["render", rs]]), as = "#007AFF", os = "#0A84FF", ss = "#FF9500", cs = "#FF9F0A", ls = "#28CD41", us = "#32D74B", ds = "#FFCC00", fs = "#FFD60A", ps = "#FF3B30", ms = "#FF453A";
|
|
7306
|
-
|
|
7313
|
+
U.common.cardColor = "#32323b", U.common.primaryColor = "#0A84FF", U.common.primaryColorHover = os, U.common.infoColor = "#FF9F0A", U.common.infoColorHover = cs, U.common.successColor = "#32D74B", U.common.successColorHover = us, U.common.warningColor = "#FFD60A", U.common.successColorHover = fs, U.common.errorColor = "#FF453A", U.common.errorColorHover = ms, U.common.borderRadius = "var(--borderRadius)", U.common.inputColor = "rgba(var(--input))", U.common.borderColor = "rgba(var(--border), 0.7)", U.DataTable.tdColor = "#2d2d31", U.Scrollbar.width = "8px", U.Scrollbar.height = "8px", U.Scrollbar.borderRadius = "8px", U.Scrollbar.color = "#686873";
|
|
7307
7314
|
var hs = {
|
|
7308
7315
|
common: {
|
|
7309
7316
|
inputColor: "rgba(var(--input))",
|
|
@@ -7342,14 +7349,14 @@ var hs = {
|
|
|
7342
7349
|
borderRadius: "8px",
|
|
7343
7350
|
color: "#c0c0c0"
|
|
7344
7351
|
}
|
|
7345
|
-
}, gs =
|
|
7352
|
+
}, gs = U, _s = d({
|
|
7346
7353
|
name: "UzWrap",
|
|
7347
|
-
components: { NConfigProvider:
|
|
7354
|
+
components: { NConfigProvider: ie },
|
|
7348
7355
|
setup() {
|
|
7349
7356
|
return {
|
|
7350
|
-
zhCN:
|
|
7351
|
-
dateZhCN:
|
|
7352
|
-
commonStore:
|
|
7357
|
+
zhCN: He,
|
|
7358
|
+
dateZhCN: Be,
|
|
7359
|
+
commonStore: X,
|
|
7353
7360
|
lightTheme: hs,
|
|
7354
7361
|
darkTheme: gs
|
|
7355
7362
|
};
|
|
@@ -7454,15 +7461,15 @@ var Ss = d({
|
|
|
7454
7461
|
name: "UzOcr",
|
|
7455
7462
|
components: {
|
|
7456
7463
|
NButton: L,
|
|
7457
|
-
NUpload:
|
|
7458
|
-
NSelect:
|
|
7459
|
-
NSwitch:
|
|
7460
|
-
NTabs:
|
|
7461
|
-
NTabPane:
|
|
7462
|
-
NSpace:
|
|
7464
|
+
NUpload: Le,
|
|
7465
|
+
NSelect: Oe,
|
|
7466
|
+
NSwitch: Me,
|
|
7467
|
+
NTabs: Pe,
|
|
7468
|
+
NTabPane: Ne,
|
|
7469
|
+
NSpace: Ae
|
|
7463
7470
|
},
|
|
7464
7471
|
setup() {
|
|
7465
|
-
let { t: e } =
|
|
7472
|
+
let { t: e } = W(), t = w(!1), r = w(e("OCR.scan")), i = w([]), a = w(null), o = w(!0), s = w(3), c = w(!0), l = w(!0), u = w(!0), d = w(128), f = w(""), p = w(""), m = w(128), h = w("processed"), g = n(() => [
|
|
7466
7473
|
{
|
|
7467
7474
|
label: e("OCR.scaleNone"),
|
|
7468
7475
|
value: 1
|
|
@@ -7475,12 +7482,12 @@ var Ss = d({
|
|
|
7475
7482
|
label: e("OCR.scale3x"),
|
|
7476
7483
|
value: 3
|
|
7477
7484
|
}
|
|
7478
|
-
]), _ = async () => (a.value ||= await
|
|
7485
|
+
]), _ = async () => (a.value ||= await ot(["eng", "chi_sim"], it.LSTM_ONLY, {
|
|
7479
7486
|
workerPath: "https://unizhen-1369980751.cos.ap-shanghai.myqcloud.com/tesseract/worker.min.js",
|
|
7480
7487
|
corePath: "https://unizhen-1369980751.cos.ap-shanghai.myqcloud.com/tesseract/tesseract-core-simd-lstm.wasm.js"
|
|
7481
7488
|
}), a.value.setParameters({
|
|
7482
|
-
tessedit_pageseg_mode:
|
|
7483
|
-
tessedit_ocr_engine_mode:
|
|
7489
|
+
tessedit_pageseg_mode: at.SINGLE_COLUMN,
|
|
7490
|
+
tessedit_ocr_engine_mode: it.LSTM_ONLY,
|
|
7484
7491
|
user_defined_dpi: "300",
|
|
7485
7492
|
preserve_interword_spaces: "1",
|
|
7486
7493
|
textord_tabfind_vertical_spaces: "0",
|
|
@@ -7518,7 +7525,7 @@ var Ss = d({
|
|
|
7518
7525
|
let { data: { text: n } } = await t.recognize(e);
|
|
7519
7526
|
return n;
|
|
7520
7527
|
} catch (e) {
|
|
7521
|
-
throw
|
|
7528
|
+
throw q(e), e;
|
|
7522
7529
|
}
|
|
7523
7530
|
}, b = async (n) => {
|
|
7524
7531
|
t.value = !0, r.value = e("OCR.analysis");
|
|
@@ -7690,8 +7697,8 @@ function Js(e, t, n, s, u, d) {
|
|
|
7690
7697
|
size: "small"
|
|
7691
7698
|
}, null, 8, ["value"])])])) : i("", !0)])]), o("div", Hs, [o("div", Us, [o("span", Ws, A(e.t("OCR.result", { count: e.text.length })), 1)]), e.text.length ? (x(), a("div", qs, A(e.fullText), 1)) : (x(), a("div", Gs, [t[5] ||= o("div", { class: "uz-empty-icon" }, "📝", -1), o("div", Ks, A(e.ocrLoading ? e.t("OCR.reading") : e.t("OCR.empty")), 1)]))])]);
|
|
7692
7699
|
}
|
|
7693
|
-
var Ys = /*#__PURE__*/ Q(Ss, [["render", Js], ["__scopeId", "data-v-1e757396"]]), Xs = /* @__PURE__ */
|
|
7694
|
-
UzActionButton: () =>
|
|
7700
|
+
var Ys = /*#__PURE__*/ Q(Ss, [["render", Js], ["__scopeId", "data-v-1e757396"]]), Xs = /* @__PURE__ */ ct({
|
|
7701
|
+
UzActionButton: () => lt,
|
|
7695
7702
|
UzBack: () => xr,
|
|
7696
7703
|
UzBom: () => Pi,
|
|
7697
7704
|
UzCamera: () => Ta,
|
|
@@ -7702,7 +7709,7 @@ var Ys = /*#__PURE__*/ Q(Ss, [["render", Js], ["__scopeId", "data-v-1e757396"]])
|
|
|
7702
7709
|
UzFormItemImage: () => Wr,
|
|
7703
7710
|
UzFormItemTimesPicker: () => Jr,
|
|
7704
7711
|
UzFormItemUpload: () => Br,
|
|
7705
|
-
UzIcon: () =>
|
|
7712
|
+
UzIcon: () => Kt,
|
|
7706
7713
|
UzOcr: () => Ys,
|
|
7707
7714
|
UzSearchBar: () => Fa,
|
|
7708
7715
|
UzSearchMobileBar: () => Va,
|
|
@@ -7715,7 +7722,7 @@ var Ys = /*#__PURE__*/ Q(Ss, [["render", Js], ["__scopeId", "data-v-1e757396"]])
|
|
|
7715
7722
|
UzTableQuestChild: () => So,
|
|
7716
7723
|
UzThumbnail: () => is,
|
|
7717
7724
|
UzWrap: () => ys,
|
|
7718
|
-
commonStore: () =>
|
|
7725
|
+
commonStore: () => X,
|
|
7719
7726
|
fnActionReduction: () => vr,
|
|
7720
7727
|
fnActionSimplify: () => _r,
|
|
7721
7728
|
fnAddThumbnail: () => $o,
|
|
@@ -7727,14 +7734,14 @@ var Ys = /*#__PURE__*/ Q(Ss, [["render", Js], ["__scopeId", "data-v-1e757396"]])
|
|
|
7727
7734
|
fnPrepareFormData: () => wi,
|
|
7728
7735
|
fnPrepareTableData: () => Ti,
|
|
7729
7736
|
fnRenderAction: () => ur,
|
|
7730
|
-
fnSetLang: () =>
|
|
7731
|
-
fnSetTheme: () =>
|
|
7737
|
+
fnSetLang: () => Vt,
|
|
7738
|
+
fnSetTheme: () => Ht,
|
|
7732
7739
|
fnSetThumbnail: () => Zo,
|
|
7733
7740
|
fnTableReduction: () => yi,
|
|
7734
7741
|
fnTableSimplify: () => vi,
|
|
7735
7742
|
fnTriggersReduction: () => xi,
|
|
7736
7743
|
fnTriggersSimplify: () => bi,
|
|
7737
|
-
i18n: () =>
|
|
7744
|
+
i18n: () => K
|
|
7738
7745
|
}), Zs = 3840, Qs = 2160, $s = C({ scale: 1 });
|
|
7739
7746
|
function ec(e, t) {
|
|
7740
7747
|
Zs = e, Qs = t;
|
|
@@ -7751,7 +7758,7 @@ function tc() {
|
|
|
7751
7758
|
$s.scale = e;
|
|
7752
7759
|
}
|
|
7753
7760
|
function nc() {
|
|
7754
|
-
let e =
|
|
7761
|
+
let e = Xe(tc, 200);
|
|
7755
7762
|
return e(), window.addEventListener("resize", e), () => {
|
|
7756
7763
|
Zs = 3840, Qs = 2160, window.removeEventListener("resize", e);
|
|
7757
7764
|
};
|
|
@@ -7759,7 +7766,7 @@ function nc() {
|
|
|
7759
7766
|
//#endregion
|
|
7760
7767
|
//#region components/hooks/useThrottleFn.ts
|
|
7761
7768
|
function rc(e, t = 1e3) {
|
|
7762
|
-
let r = w(e), i = n(() =>
|
|
7769
|
+
let r = w(e), i = n(() => Ze((...e) => r.value([...e]), t));
|
|
7763
7770
|
return b(() => {
|
|
7764
7771
|
i.value.cancel();
|
|
7765
7772
|
}), {
|
|
@@ -7771,8 +7778,8 @@ function rc(e, t = 1e3) {
|
|
|
7771
7778
|
//#endregion
|
|
7772
7779
|
//#region components/hooks/useLocalStorage.ts
|
|
7773
7780
|
function ic(e, t) {
|
|
7774
|
-
return [w(
|
|
7775
|
-
n === void 0 ?
|
|
7781
|
+
return [w(Y(e, t?.defaultValue)), (n) => {
|
|
7782
|
+
n === void 0 ? Tt(e) : J(e, n, t?.expired || "1 Day");
|
|
7776
7783
|
}];
|
|
7777
7784
|
}
|
|
7778
7785
|
//#endregion
|
|
@@ -7798,7 +7805,7 @@ function ac(e, t, n) {
|
|
|
7798
7805
|
});
|
|
7799
7806
|
e = await Promise.race([n, t()]);
|
|
7800
7807
|
}
|
|
7801
|
-
h(!1, "success"), m(e),
|
|
7808
|
+
h(!1, "success"), m(e), J(r, e, 0);
|
|
7802
7809
|
} catch (e) {
|
|
7803
7810
|
g(e), h(!1, "error"), u.value > 0 && (--u.value, setTimeout(() => {
|
|
7804
7811
|
p();
|
|
@@ -7822,7 +7829,7 @@ function ac(e, t, n) {
|
|
|
7822
7829
|
}, n?.pollingInterval));
|
|
7823
7830
|
};
|
|
7824
7831
|
if (n?.retry && n.pollingInterval === void 0 && (u.value = n.retry.retryCount || 3, d.value = n.retry.retryInterval || 8e3), n?.initialData && m(n.initialData()), n === void 0 || n.initialData === void 0 || n.cache === void 0 || n.cache === !0) try {
|
|
7825
|
-
let e =
|
|
7832
|
+
let e = Y(r, !1);
|
|
7826
7833
|
e && m(e);
|
|
7827
7834
|
} catch {
|
|
7828
7835
|
m(!1);
|
|
@@ -7843,7 +7850,7 @@ function ac(e, t, n) {
|
|
|
7843
7850
|
}
|
|
7844
7851
|
//#endregion
|
|
7845
7852
|
//#region package.json
|
|
7846
|
-
var oc = "0.1.
|
|
7853
|
+
var oc = "0.1.136", sc;
|
|
7847
7854
|
async function cc() {
|
|
7848
7855
|
let e = await fetch(`${window.location.protocol}//${window.location.host}`, {
|
|
7849
7856
|
method: "HEAD",
|
|
@@ -7853,7 +7860,7 @@ async function cc() {
|
|
|
7853
7860
|
}
|
|
7854
7861
|
async function lc() {
|
|
7855
7862
|
let e = await cc();
|
|
7856
|
-
sc !== e &&
|
|
7863
|
+
sc !== e && Ut(!0);
|
|
7857
7864
|
}
|
|
7858
7865
|
async function uc() {
|
|
7859
7866
|
sc = await cc(), window.versionMonitor && clearInterval(window.versionMonitor), window.versionMonitor = setInterval(() => {
|
|
@@ -7874,11 +7881,11 @@ function dc({ components: e = [] } = {}) {
|
|
|
7874
7881
|
n(r, t, e);
|
|
7875
7882
|
});
|
|
7876
7883
|
}), i)) {
|
|
7877
|
-
let { title: e, monitor: t = !1, monitorInfo: n, version: a = !0, language: o = !1, local: s = "zh-CN", icons: c = void 0, iconDefault: l = "" } = i, u =
|
|
7878
|
-
|
|
7884
|
+
let { title: e, monitor: t = !1, monitorInfo: n, version: a = !0, language: o = !1, local: s = "zh-CN", icons: c = void 0, iconDefault: l = "" } = i, u = Y("theme", !1), d = Y("lang", s);
|
|
7885
|
+
Bt(o), Vt(d), Wt(e || K.global.t("App.title")), Ht(u), zt({
|
|
7879
7886
|
icons: c,
|
|
7880
7887
|
iconDefault: l
|
|
7881
|
-
}),
|
|
7888
|
+
}), K.global.locale.value = d, a && uc(), t && Mn(r, t, n);
|
|
7882
7889
|
}
|
|
7883
7890
|
}
|
|
7884
7891
|
return {
|
|
@@ -7890,4 +7897,4 @@ function dc({ components: e = [] } = {}) {
|
|
|
7890
7897
|
//#region components/preset.ts
|
|
7891
7898
|
var fc = dc({ components: Object.keys(Xs).map((e) => Xs[e]) }), pc = fc.install;
|
|
7892
7899
|
//#endregion
|
|
7893
|
-
export { Gn as BLOB, Kn as CUSTOM, qn as FILE, Wn as GET, Z as POST,
|
|
7900
|
+
export { Gn as BLOB, Kn as CUSTOM, qn as FILE, Wn as GET, Z as POST, lt as UzActionButton, xr as UzBack, Pi as UzBom, Ta as UzCamera, va as UzCircle, Pr as UzDraggableForm, kr as UzForm, Tr as UzFormItem, Wr as UzFormItemImage, Jr as UzFormItemTimesPicker, Br as UzFormItemUpload, Kt as UzIcon, Ys as UzOcr, Fa as UzSearchBar, Va as UzSearchMobileBar, Wa as UzSpin, oo as UzTable, go as UzTableChild, ko as UzTableDrawer, Yo as UzTableFile, zo as UzTableMobile, So as UzTableQuestChild, is as UzThumbnail, ys as UzWrap, X as commonStore, dc as create, gs as darkTheme, fc as default, vr as fnActionReduction, _r as fnActionSimplify, $o as fnAddThumbnail, Un as fnCancelFetch, ts as fnClearAllThumbnail, tc as fnComputedScale, Jt as fnCreateRouter, Tt as fnDelStorage, Dt as fnDelStorageAll, Et as fnDelStorageByPrefix, es as fnDeleteThumbnail, wt as fnDialog, q as fnErrorLog, Lt as fnFilterByPinyinInitials, At as fnFormatTime, Pt as fnFormatUnits, Nt as fnFullScreen, Y as fnGetStorage, _i as fnGetTableData, nc as fnListenerScale, Ct as fnNotification, Ci as fnOptionReduction, Si as fnOptionSimplify, kt as fnPageModel2Naive, wi as fnPrepareFormData, Ti as fnPrepareTableData, ur as fnRenderAction, Ot as fnScrollTop, Vt as fnSetLang, ec as fnSetNormalWidthAndHeight, J as fnSetStorage, Ht as fnSetTheme, Zo as fnSetThumbnail, yi as fnTableReduction, vi as fnTableSimplify, Mt as fnThrottle, jt as fnTitle, xi as fnTriggersReduction, bi as fnTriggersSimplify, K as i18n, pc as install, hs as lightTheme, Rt as mergeColumns, qt as router, $s as scaleStore, Yr as useDebounceFn, ic as useLocalStorage, ac as useQuery, rc as useThrottleFn };
|