@unizhen/ui 0.1.134 → 0.1.137
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/components/bom/index.vue.d.ts +9 -0
- package/lib/components/form/draggable.vue.d.ts +8 -0
- package/lib/components/form/index.vue.d.ts +8 -0
- package/lib/components/form/interface.d.ts +2 -0
- package/lib/components/table/components/expand.vue.d.ts +1 -0
- package/lib/components/table/factory.d.ts +2 -0
- package/lib/components/table/index.vue.d.ts +1 -0
- package/lib/ui.js +723 -709
- package/package.json +1 -1
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.params.merge && (t.m = e.params.merge)), 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.p.m && (t.merge = e.p.m)), 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: "bom",
|
|
3383
|
+
merge: s.params.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: {
|
|
@@ -3441,15 +3445,22 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3441
3445
|
status: {
|
|
3442
3446
|
type: Number,
|
|
3443
3447
|
default: 1
|
|
3448
|
+
},
|
|
3449
|
+
expand: {
|
|
3450
|
+
type: Boolean,
|
|
3451
|
+
default: !1
|
|
3444
3452
|
}
|
|
3445
3453
|
},
|
|
3446
3454
|
emits: ["update:value"],
|
|
3447
3455
|
setup(e, { emit: t, expose: r }) {
|
|
3448
|
-
let i = p("mainFormValue"), { t: a } =
|
|
3456
|
+
let i = p("mainFormValue"), { t: a } = W(), o = w(null), s = w([]), c = () => {
|
|
3457
|
+
let e = i?.value?.()?.ticket_counts;
|
|
3458
|
+
return e == null || e === "" ? 1 : e;
|
|
3459
|
+
}, 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
3460
|
row: e,
|
|
3450
3461
|
index: t
|
|
3451
3462
|
})).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(
|
|
3463
|
+
let a = l(e, i, n), o = e.children, s = ti(e), d = t === 1 ? c() : ni(s, r);
|
|
3453
3464
|
return {
|
|
3454
3465
|
...e,
|
|
3455
3466
|
required_quantity: s,
|
|
@@ -3485,45 +3496,49 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3485
3496
|
(n.length !== m.value.length || n.some((e, t) => e !== m.value[t])) && (m.value = n);
|
|
3486
3497
|
}, { run: T, flush: E, cancel: D } = Yr(() => {
|
|
3487
3498
|
b(d.value), C();
|
|
3488
|
-
}, 200), O = /* @__PURE__ */ new WeakMap(), k = (e,
|
|
3489
|
-
let
|
|
3490
|
-
|
|
3491
|
-
let
|
|
3492
|
-
if (
|
|
3493
|
-
let
|
|
3499
|
+
}, 200), O = /* @__PURE__ */ new WeakMap(), k = (e, n) => {
|
|
3500
|
+
let r = O.get(e);
|
|
3501
|
+
r || (r = /* @__PURE__ */ new Map(), O.set(e, r));
|
|
3502
|
+
let i = r.get(n.key);
|
|
3503
|
+
if (i) return i;
|
|
3504
|
+
let a = new Proxy(e, {
|
|
3494
3505
|
get(e, t, n) {
|
|
3495
3506
|
return t === "required_quantity" ? ti(e) : Reflect.get(e, t, n);
|
|
3496
3507
|
},
|
|
3497
|
-
set(e,
|
|
3498
|
-
let
|
|
3499
|
-
if (
|
|
3500
|
-
let
|
|
3501
|
-
|
|
3508
|
+
set(e, r, i) {
|
|
3509
|
+
let a = Reflect.get(e, r) !== i, o = Reflect.set(e, r, i);
|
|
3510
|
+
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)) {
|
|
3511
|
+
let t = si(n.params?.options, i);
|
|
3512
|
+
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
3513
|
}
|
|
3503
|
-
return a;
|
|
3514
|
+
return a && o && t("update:value", d.value), o;
|
|
3504
3515
|
}
|
|
3505
3516
|
});
|
|
3506
|
-
return
|
|
3517
|
+
return r.set(n.key, a), a;
|
|
3507
3518
|
}, A = () => {
|
|
3508
|
-
let e = /* @__PURE__ */ new Set(), t = (n) => {
|
|
3509
|
-
|
|
3510
|
-
e.add(_(
|
|
3511
|
-
let
|
|
3512
|
-
Array.isArray(
|
|
3519
|
+
let e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), n = (r) => {
|
|
3520
|
+
r.forEach((r) => {
|
|
3521
|
+
e.add(_(r)), t.add(r.code);
|
|
3522
|
+
let i = r.children;
|
|
3523
|
+
Array.isArray(i) && n(i);
|
|
3513
3524
|
});
|
|
3514
3525
|
};
|
|
3515
|
-
|
|
3516
|
-
let
|
|
3526
|
+
n(d.value);
|
|
3527
|
+
let r;
|
|
3528
|
+
do
|
|
3529
|
+
r = crypto.randomUUID();
|
|
3530
|
+
while (e.has(r));
|
|
3531
|
+
let i;
|
|
3517
3532
|
do
|
|
3518
|
-
|
|
3519
|
-
while (
|
|
3533
|
+
i = `NEW-${String(g).padStart(4, "0")}`, g += 1;
|
|
3534
|
+
while (t.has(i));
|
|
3520
3535
|
return {
|
|
3521
|
-
key:
|
|
3536
|
+
key: r,
|
|
3522
3537
|
level: 1,
|
|
3523
|
-
code:
|
|
3538
|
+
code: i,
|
|
3524
3539
|
sort: 0,
|
|
3525
3540
|
sort_index: 0,
|
|
3526
|
-
product_no:
|
|
3541
|
+
product_no: i,
|
|
3527
3542
|
product_name: "",
|
|
3528
3543
|
status: 0,
|
|
3529
3544
|
procurement: "0",
|
|
@@ -3570,8 +3585,8 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3570
3585
|
} : r), e;
|
|
3571
3586
|
}, []);
|
|
3572
3587
|
j(n(d.value));
|
|
3573
|
-
},
|
|
3574
|
-
title: () => f(
|
|
3588
|
+
}, z = {
|
|
3589
|
+
title: () => f(ue, {
|
|
3575
3590
|
trigger: "click",
|
|
3576
3591
|
options: [{
|
|
3577
3592
|
label: a("Common.expand"),
|
|
@@ -3593,7 +3608,7 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3593
3608
|
fixed: "left",
|
|
3594
3609
|
tree: !0,
|
|
3595
3610
|
ellipsis: { tooltip: !0 }
|
|
3596
|
-
},
|
|
3611
|
+
}, re = {
|
|
3597
3612
|
title: a("Common.action"),
|
|
3598
3613
|
key: "actions",
|
|
3599
3614
|
width: 240,
|
|
@@ -3628,12 +3643,12 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3628
3643
|
secondary: !0
|
|
3629
3644
|
}
|
|
3630
3645
|
})
|
|
3631
|
-
},
|
|
3646
|
+
}, B = n(() => Number(e.status) === 2 ? s.value.filter((e) => e.key !== "actions") : s.value), ie = n(() => B.value.reduce((e, t) => {
|
|
3632
3647
|
let n = "width" in t ? Number(t.width) : 120;
|
|
3633
3648
|
return e + (Number.isFinite(n) ? n : 120);
|
|
3634
|
-
}, 0)),
|
|
3649
|
+
}, 0)), ae = (e) => {
|
|
3635
3650
|
S(e);
|
|
3636
|
-
},
|
|
3651
|
+
}, oe = (e) => {
|
|
3637
3652
|
let t = Math.trunc(Number(e.level));
|
|
3638
3653
|
if (!Number.isFinite(t) || t < 1) return null;
|
|
3639
3654
|
let n = (t - 1) % 4 + 1, r = Math.floor((t - 1) / 4);
|
|
@@ -3641,22 +3656,35 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3641
3656
|
color: Di[n - 1],
|
|
3642
3657
|
strength: `${Math.min(10 + r * 5, 40)}%`
|
|
3643
3658
|
};
|
|
3659
|
+
}, se = (e) => {
|
|
3660
|
+
let t = oe(e);
|
|
3661
|
+
return {
|
|
3662
|
+
...P(e),
|
|
3663
|
+
...t ? { style: `--uz-bom-level-color: ${t.color}; --uz-bom-level-strength: ${t.strength}` } : {}
|
|
3664
|
+
};
|
|
3665
|
+
}, ce = (t) => {
|
|
3666
|
+
if (!t.form.display) switch (e.status) {
|
|
3667
|
+
case 0: return t.form.create && t.form.create.show;
|
|
3668
|
+
case 1: return t.form.edit && t.form.edit.show;
|
|
3669
|
+
case 2: return t.form.show;
|
|
3670
|
+
}
|
|
3644
3671
|
};
|
|
3645
|
-
return M(() => i?.value?.()?.ticket_counts, (
|
|
3646
|
-
|
|
3672
|
+
return M(() => i?.value?.()?.ticket_counts, () => {
|
|
3673
|
+
let e = c();
|
|
3674
|
+
d.value.forEach((t) => {
|
|
3647
3675
|
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),
|
|
3676
|
+
}), t("update:value", d.value);
|
|
3677
|
+
}, { immediate: !0 }), M(() => e.value, (e) => {
|
|
3678
|
+
e !== d.value && (D(), d.value = ee(e), t("update:value", d.value));
|
|
3651
3679
|
}), M(d, () => C(), { immediate: !0 }), y(async () => {
|
|
3652
3680
|
e.value?.length || t("update:value", d.value);
|
|
3653
3681
|
let n = await Jn("bom_col");
|
|
3654
|
-
n =
|
|
3655
|
-
let { tableColumns: r } = await Ti(n), i = r.filter((e) => e
|
|
3682
|
+
n = et.parse(n.viewJson), n = yi(n.table);
|
|
3683
|
+
let { tableColumns: r } = await Ti(n), i = r.filter((e) => ce(e)).map((t) => ({
|
|
3656
3684
|
title: t.title,
|
|
3657
3685
|
key: t.key,
|
|
3658
3686
|
width: t.width ?? 120,
|
|
3659
|
-
render: (n, r) => f(
|
|
3687
|
+
render: (n, r) => f(pe, {
|
|
3660
3688
|
showLabel: !1,
|
|
3661
3689
|
showFeedback: !1,
|
|
3662
3690
|
path: `child[${r}].${t.key}`,
|
|
@@ -3674,9 +3702,9 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3674
3702
|
}));
|
|
3675
3703
|
s.value = [
|
|
3676
3704
|
N,
|
|
3677
|
-
|
|
3705
|
+
z,
|
|
3678
3706
|
...i,
|
|
3679
|
-
|
|
3707
|
+
re
|
|
3680
3708
|
];
|
|
3681
3709
|
}), r({ validate: async () => (await o.value?.validate(), d.value) }), v(D), {
|
|
3682
3710
|
t: a,
|
|
@@ -3684,68 +3712,58 @@ var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.t
|
|
|
3684
3712
|
innerData: d,
|
|
3685
3713
|
tableRef: F,
|
|
3686
3714
|
tableVersion: te,
|
|
3687
|
-
displayedTableCols:
|
|
3688
|
-
displayedScrollX:
|
|
3715
|
+
displayedTableCols: B,
|
|
3716
|
+
displayedScrollX: ie,
|
|
3689
3717
|
innerExpandedRowKeys: m,
|
|
3690
3718
|
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
|
|
3719
|
+
getRowProps: se,
|
|
3720
|
+
handleExpandedRowKeysChange: ae
|
|
3699
3721
|
};
|
|
3700
3722
|
}
|
|
3701
3723
|
}), 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 = {
|
|
3702
3724
|
key: 0,
|
|
3703
3725
|
class: "uz-table-asterisk"
|
|
3704
3726
|
};
|
|
3705
|
-
function Ni(
|
|
3706
|
-
let
|
|
3707
|
-
return x(), a("div", ki, [o("div", Ai, [
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3727
|
+
function Ni(t, n, s, u, d, f) {
|
|
3728
|
+
let p = D("NDataTable"), m = D("NForm");
|
|
3729
|
+
return x(), a("div", ki, [o("div", Ai, [t.expand ? i("", !0) : (x(), a(e, { key: 0 }, [o("div", ji, [c(A(t.item.label) + " ", 1), t.item.form?.rule.required ? (x(), a("span", Mi, " \xA0* ")) : i("", !0)]), n[0] ||= o("div", { class: "uz-br" }, null, -1)], 64)), l(m, {
|
|
3730
|
+
ref: "formRef",
|
|
3731
|
+
model: { child: t.innerData }
|
|
3732
|
+
}, {
|
|
3733
|
+
default: P(() => [(x(), r(p, {
|
|
3734
|
+
key: t.tableVersion,
|
|
3735
|
+
ref: "tableRef",
|
|
3736
|
+
columns: t.displayedTableCols,
|
|
3737
|
+
data: t.innerData,
|
|
3738
|
+
"row-props": t.getRowProps,
|
|
3739
|
+
"row-key": t.getRowKey,
|
|
3740
|
+
"children-key": "children",
|
|
3741
|
+
indent: 0,
|
|
3742
|
+
"expanded-row-keys": t.innerExpandedRowKeys,
|
|
3743
|
+
"min-height": t.height,
|
|
3744
|
+
"max-height": t.height,
|
|
3745
|
+
"scroll-x": t.displayedScrollX,
|
|
3746
|
+
pagination: !1,
|
|
3747
|
+
size: "small",
|
|
3748
|
+
"onUpdate:expandedRowKeys": t.handleExpandedRowKeysChange,
|
|
3749
|
+
"scrollbar-props": { trigger: "none" },
|
|
3750
|
+
remote: ""
|
|
3713
3751
|
}, {
|
|
3714
|
-
|
|
3715
|
-
key: e.tableVersion,
|
|
3716
|
-
ref: "tableRef",
|
|
3717
|
-
columns: e.displayedTableCols,
|
|
3718
|
-
data: e.innerData,
|
|
3719
|
-
"row-props": e.getRowProps,
|
|
3720
|
-
"row-key": e.getRowKey,
|
|
3721
|
-
"children-key": "children",
|
|
3722
|
-
indent: 0,
|
|
3723
|
-
"expanded-row-keys": e.innerExpandedRowKeys,
|
|
3724
|
-
"min-height": e.height,
|
|
3725
|
-
"max-height": e.height,
|
|
3726
|
-
"scroll-x": e.displayedScrollX,
|
|
3727
|
-
pagination: !1,
|
|
3728
|
-
size: "small",
|
|
3729
|
-
"onUpdate:expandedRowKeys": e.handleExpandedRowKeysChange,
|
|
3730
|
-
"scrollbar-props": { trigger: "none" },
|
|
3731
|
-
remote: ""
|
|
3732
|
-
}, {
|
|
3733
|
-
empty: P(() => [E(e.$slots, "empty", {}, () => [c(A(e.t("BOM.empty")), 1)])]),
|
|
3734
|
-
_: 3
|
|
3735
|
-
}, 8, [
|
|
3736
|
-
"columns",
|
|
3737
|
-
"data",
|
|
3738
|
-
"row-props",
|
|
3739
|
-
"row-key",
|
|
3740
|
-
"expanded-row-keys",
|
|
3741
|
-
"min-height",
|
|
3742
|
-
"max-height",
|
|
3743
|
-
"scroll-x",
|
|
3744
|
-
"onUpdate:expandedRowKeys"
|
|
3745
|
-
]))]),
|
|
3752
|
+
empty: P(() => [E(t.$slots, "empty", {}, () => [c(A(t.t("BOM.empty")), 1)])]),
|
|
3746
3753
|
_: 3
|
|
3747
|
-
}, 8, [
|
|
3748
|
-
|
|
3754
|
+
}, 8, [
|
|
3755
|
+
"columns",
|
|
3756
|
+
"data",
|
|
3757
|
+
"row-props",
|
|
3758
|
+
"row-key",
|
|
3759
|
+
"expanded-row-keys",
|
|
3760
|
+
"min-height",
|
|
3761
|
+
"max-height",
|
|
3762
|
+
"scroll-x",
|
|
3763
|
+
"onUpdate:expandedRowKeys"
|
|
3764
|
+
]))]),
|
|
3765
|
+
_: 3
|
|
3766
|
+
}, 8, ["model"])])]);
|
|
3749
3767
|
}
|
|
3750
3768
|
var Pi = /*#__PURE__*/ Q(Oi, [["render", Ni]]), Fi = 46, Ii = 8, Li = 2 * Math.PI * Fi, Ri = Ii, zi = 19, Bi = 69, Vi = 52, Hi = 8, Ui = 135, Wi = 270, Gi = 2 * Math.PI * Vi, Ki = Wi / 360 * Gi, qi = 11, Ji = `rotate(${Ui} 60 ${Bi})`, Yi = (e, t, n, r) => {
|
|
3751
3769
|
let i = r * Math.PI / 180;
|
|
@@ -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: {
|
|
@@ -4788,16 +4806,16 @@ var Wa = /*#__PURE__*/ Q(Ha, [["render", Ua]]), Ga = d({
|
|
|
4788
4806
|
}
|
|
4789
4807
|
},
|
|
4790
4808
|
setup(e) {
|
|
4791
|
-
let t = w(!0), n = w([]), r = w([]), i = w(0);
|
|
4809
|
+
let t = w(!0), n = w([]), r = w([]), i = w(0), a = w(0);
|
|
4792
4810
|
return y(async () => {
|
|
4793
4811
|
if (e.data.merge) try {
|
|
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
|
-
_i(e.data.link).then(async (e) => {
|
|
4800
|
-
let { tableColumns: r } = await Ti(yi(
|
|
4817
|
+
e.data.link === "bom" ? a.value = 1 : _i(e.data.link).then(async (e) => {
|
|
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
|
|
@@ -4805,22 +4823,24 @@ var Wa = /*#__PURE__*/ Q(Ha, [["render", Ua]]), Ga = d({
|
|
|
4805
4823
|
o.forEach((e) => {
|
|
4806
4824
|
a += e.width;
|
|
4807
4825
|
}), n.value = o, i.value = a, t.value = !1;
|
|
4808
|
-
}).catch((
|
|
4826
|
+
}).catch(() => {
|
|
4809
4827
|
t.value = !1;
|
|
4810
4828
|
});
|
|
4811
4829
|
}), {
|
|
4812
4830
|
loading: t,
|
|
4813
4831
|
columns: n,
|
|
4814
4832
|
columnsData: r,
|
|
4815
|
-
tableScrollX: i
|
|
4833
|
+
tableScrollX: i,
|
|
4834
|
+
tableType: a
|
|
4816
4835
|
};
|
|
4817
4836
|
}
|
|
4818
4837
|
});
|
|
4819
4838
|
//#endregion
|
|
4820
4839
|
//#region components/table/components/expand.vue
|
|
4821
4840
|
function Ka(e, t, n, i, a, o) {
|
|
4822
|
-
let s = D("NDataTable");
|
|
4823
|
-
return x(), r(s, {
|
|
4841
|
+
let s = D("NDataTable"), c = D("UzBom");
|
|
4842
|
+
return e.tableType === 0 ? (x(), r(s, {
|
|
4843
|
+
key: 0,
|
|
4824
4844
|
columns: e.columns,
|
|
4825
4845
|
data: e.columnsData,
|
|
4826
4846
|
pagination: !1,
|
|
@@ -4835,10 +4855,15 @@ function Ka(e, t, n, i, a, o) {
|
|
|
4835
4855
|
"data",
|
|
4836
4856
|
"loading",
|
|
4837
4857
|
"scroll-x"
|
|
4838
|
-
])
|
|
4858
|
+
])) : (x(), r(c, {
|
|
4859
|
+
key: 1,
|
|
4860
|
+
value: e.columnsData,
|
|
4861
|
+
status: 2,
|
|
4862
|
+
expand: !0
|
|
4863
|
+
}, null, 8, ["value"]));
|
|
4839
4864
|
}
|
|
4840
4865
|
var qa = /*#__PURE__*/ Q(Ga, [["render", Ka]]), Ja = d({
|
|
4841
|
-
components: { NSkeleton:
|
|
4866
|
+
components: { NSkeleton: ke },
|
|
4842
4867
|
setup() {
|
|
4843
4868
|
return {};
|
|
4844
4869
|
}
|
|
@@ -4884,13 +4909,13 @@ function Qa(e, t, n, r, i, s) {
|
|
|
4884
4909
|
var $a = d({
|
|
4885
4910
|
name: "UzTable",
|
|
4886
4911
|
components: {
|
|
4887
|
-
NDataTable:
|
|
4888
|
-
NPopover:
|
|
4912
|
+
NDataTable: ae,
|
|
4913
|
+
NPopover: Te,
|
|
4889
4914
|
NButton: L,
|
|
4890
|
-
NIcon:
|
|
4891
|
-
NCheckbox:
|
|
4892
|
-
NSpin:
|
|
4893
|
-
VueDraggable:
|
|
4915
|
+
NIcon: H,
|
|
4916
|
+
NCheckbox: z,
|
|
4917
|
+
NSpin: je,
|
|
4918
|
+
VueDraggable: $e,
|
|
4894
4919
|
UzSpin: Wa,
|
|
4895
4920
|
TableExpand: qa,
|
|
4896
4921
|
SkeletonLoading: /* @__PURE__ */ Q(Ja, [["render", Qa]])
|
|
@@ -5021,7 +5046,7 @@ var $a = d({
|
|
|
5021
5046
|
value: () => null,
|
|
5022
5047
|
setValue: () => null
|
|
5023
5048
|
});
|
|
5024
|
-
let a = p("userStore"), o =
|
|
5049
|
+
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
5050
|
params: [],
|
|
5026
5051
|
query: {
|
|
5027
5052
|
page: 1,
|
|
@@ -5034,32 +5059,32 @@ var $a = d({
|
|
|
5034
5059
|
when_drawer_open: "",
|
|
5035
5060
|
when_before_save: "",
|
|
5036
5061
|
when_after_save: ""
|
|
5037
|
-
}), R = w(Ci()), ne = w(""),
|
|
5062
|
+
}), R = w(Ci()), ne = w(""), z = w(!1), re = w([]), B = w([]), ie = p("modules"), ae = (e) => e.id, oe = (e, n) => {
|
|
5038
5063
|
t("update:rowKeys", {
|
|
5039
5064
|
keys: e,
|
|
5040
|
-
rows:
|
|
5065
|
+
rows: G(n)
|
|
5041
5066
|
});
|
|
5042
|
-
},
|
|
5043
|
-
if (
|
|
5044
|
-
let e =
|
|
5045
|
-
|
|
5067
|
+
}, se = (e, n, r) => {
|
|
5068
|
+
if (re.value = e, r.action === "check" && B.value.push(r.row), r.action === "uncheck") {
|
|
5069
|
+
let e = B.value.findIndex((e) => e.id === r.row?.id);
|
|
5070
|
+
B.value.splice(e, 1);
|
|
5046
5071
|
}
|
|
5047
5072
|
r.action === "checkAll" && n.forEach((e) => {
|
|
5048
|
-
e &&
|
|
5049
|
-
}), r.action === "uncheckAll" && (
|
|
5050
|
-
keys:
|
|
5051
|
-
rows:
|
|
5073
|
+
e && B.value.push(e);
|
|
5074
|
+
}), r.action === "uncheckAll" && (B.value = [], re.value = []), t("update:rowKeys", {
|
|
5075
|
+
keys: G(re.value),
|
|
5076
|
+
rows: G(B.value)
|
|
5052
5077
|
});
|
|
5053
|
-
},
|
|
5078
|
+
}, ce = (e) => {
|
|
5054
5079
|
O.value = e;
|
|
5055
|
-
},
|
|
5080
|
+
}, le = n(() => {
|
|
5056
5081
|
let t = e.summary || R.value.summary;
|
|
5057
5082
|
if (t && typeof t == "string") {
|
|
5058
5083
|
let e = Function("pageData", "h", t);
|
|
5059
5084
|
return (t) => e(t, f);
|
|
5060
5085
|
}
|
|
5061
5086
|
return t && typeof t == "function" ? t : () => [];
|
|
5062
|
-
}),
|
|
5087
|
+
}), ue = (t) => {
|
|
5063
5088
|
let n = e.id || o.params.id, r;
|
|
5064
5089
|
if (e.fetch) r = e.fetch({
|
|
5065
5090
|
...t,
|
|
@@ -5073,7 +5098,7 @@ var $a = d({
|
|
|
5073
5098
|
tableId: n
|
|
5074
5099
|
});
|
|
5075
5100
|
return r;
|
|
5076
|
-
},
|
|
5101
|
+
}, de = (t) => {
|
|
5077
5102
|
let n = e.id || o.params.id, r;
|
|
5078
5103
|
if (e.fetch) r = e.fetch({
|
|
5079
5104
|
id: t.id,
|
|
@@ -5087,44 +5112,44 @@ var $a = d({
|
|
|
5087
5112
|
tableId: n
|
|
5088
5113
|
});
|
|
5089
5114
|
return r;
|
|
5090
|
-
},
|
|
5115
|
+
}, V = (n = !1) => {
|
|
5091
5116
|
let r = e.id || o.params.id;
|
|
5092
5117
|
e.enableLoading && (_.value = !0, t("update:loading", !0));
|
|
5093
|
-
let i =
|
|
5118
|
+
let i = G(k.value);
|
|
5094
5119
|
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 &&
|
|
5120
|
+
let n = kt(e);
|
|
5121
|
+
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
5122
|
}).catch(() => {
|
|
5098
5123
|
_.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 &&
|
|
5124
|
+
}) : ue(i).then((e) => {
|
|
5125
|
+
let n = kt(e);
|
|
5126
|
+
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
5127
|
}).catch(() => {
|
|
5103
5128
|
_.value = !1, v.value = !0, t("update:loading", !1);
|
|
5104
5129
|
});
|
|
5105
|
-
},
|
|
5106
|
-
k.value.query.page = e, u.value && (u.value.scrollTop = 0),
|
|
5107
|
-
},
|
|
5130
|
+
}, fe = (e) => {
|
|
5131
|
+
k.value.query.page = e, u.value && (u.value.scrollTop = 0), Ot(), V();
|
|
5132
|
+
}, pe = () => {
|
|
5108
5133
|
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),
|
|
5134
|
+
e > k.value.query.pageMax && (e = 1), k.value.query.page = e, u.value && (u.value.scrollTop = 0), V();
|
|
5135
|
+
}, me = (e) => {
|
|
5136
|
+
k.value.query.pageSize = e, k.value.query.page = 1, Ot(), V();
|
|
5110
5137
|
}, 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 = () => {
|
|
5138
|
+
e && e.order ? k.value.orderby = `${e.columnKey} ${e.order.replace("end", "")}` : delete k.value.orderby, V();
|
|
5139
|
+
}, H = () => {
|
|
5115
5140
|
if (typeof e.addFetch == "function") return e.addFetch();
|
|
5116
5141
|
m.value?.addAndEdit(e.id || o.params.id, async () => {
|
|
5117
|
-
let { form: e } = await
|
|
5142
|
+
let { form: e } = await be();
|
|
5118
5143
|
return {
|
|
5119
5144
|
form: e,
|
|
5120
5145
|
data: {}
|
|
5121
5146
|
};
|
|
5122
|
-
}, R.value, I.value, 0,
|
|
5147
|
+
}, R.value, I.value, 0, je);
|
|
5148
|
+
}, ge = (e) => {
|
|
5149
|
+
e.show = !e.show, Ae();
|
|
5123
5150
|
}, _e = (e) => {
|
|
5124
|
-
|
|
5125
|
-
}, ve = (
|
|
5126
|
-
k.value.params = e, B();
|
|
5127
|
-
}, ye = () => [{
|
|
5151
|
+
k.value.params = e, V();
|
|
5152
|
+
}, ve = () => [{
|
|
5128
5153
|
title: s("Table.createdByTime"),
|
|
5129
5154
|
key: "createTime",
|
|
5130
5155
|
resizable: !0,
|
|
@@ -5132,7 +5157,7 @@ var $a = d({
|
|
|
5132
5157
|
show: !0,
|
|
5133
5158
|
ellipsis: !1,
|
|
5134
5159
|
width: 180,
|
|
5135
|
-
render: (e) => [f("div", {}, { default: () => e.createBy }), f("div", {}, { default: () =>
|
|
5160
|
+
render: (e) => [f("div", {}, { default: () => e.createBy }), f("div", {}, { default: () => At(e.createTime, "yyyy-MM-dd hh:mm:ss") })]
|
|
5136
5161
|
}, {
|
|
5137
5162
|
title: s("Table.updatedByTime"),
|
|
5138
5163
|
key: "updateTime",
|
|
@@ -5141,64 +5166,64 @@ var $a = d({
|
|
|
5141
5166
|
show: !0,
|
|
5142
5167
|
ellipsis: !0,
|
|
5143
5168
|
width: 180,
|
|
5144
|
-
render: (e) => [f("div", {}, { default: () => e.updateBy }), f("div", {}, { default: () =>
|
|
5145
|
-
}],
|
|
5169
|
+
render: (e) => [f("div", {}, { default: () => e.updateBy }), f("div", {}, { default: () => At(e.updateTime, "yyyy-MM-dd hh:mm:ss") })]
|
|
5170
|
+
}], 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
5171
|
let { form: t, fillingDefaultValue: n, formDefaultValue: r } = await wi(P.value, e, () => m.value?.getFormValues());
|
|
5147
5172
|
return x.value = t, {
|
|
5148
5173
|
form: t,
|
|
5149
5174
|
fillingDefaultValue: n,
|
|
5150
5175
|
formDefaultValue: r
|
|
5151
5176
|
};
|
|
5152
|
-
},
|
|
5153
|
-
|
|
5177
|
+
}, xe = async (e) => new Promise((t, n) => {
|
|
5178
|
+
de(e).then((e) => {
|
|
5154
5179
|
t(e && e[0]);
|
|
5155
5180
|
}).catch(() => {
|
|
5156
5181
|
n();
|
|
5157
5182
|
});
|
|
5158
|
-
}),
|
|
5159
|
-
let n = await
|
|
5183
|
+
}), Se = async (e, t) => {
|
|
5184
|
+
let n = await xe(e).catch(() => {}), { form: r, fillingDefaultValue: i } = await be(n || {}), a = {
|
|
5160
5185
|
...n,
|
|
5161
5186
|
...i
|
|
5162
5187
|
};
|
|
5163
5188
|
if (t && typeof t == "string") try {
|
|
5164
5189
|
a = await Function("rowData", "POST", "fnNotification", t)(a, Z, c).catch(() => null);
|
|
5165
5190
|
} catch (e) {
|
|
5166
|
-
|
|
5191
|
+
q(e);
|
|
5167
5192
|
}
|
|
5168
5193
|
let o = I.value.when_drawer_open;
|
|
5169
5194
|
if (o && typeof o == "string") try {
|
|
5170
5195
|
a = await Function("data", "POST", o)(a, Z).catch((e) => {
|
|
5171
|
-
|
|
5196
|
+
q(e);
|
|
5172
5197
|
});
|
|
5173
5198
|
} catch (e) {
|
|
5174
|
-
|
|
5199
|
+
q(e);
|
|
5175
5200
|
}
|
|
5176
5201
|
return {
|
|
5177
5202
|
form: r,
|
|
5178
5203
|
data: a
|
|
5179
5204
|
};
|
|
5180
|
-
},
|
|
5181
|
-
let i =
|
|
5205
|
+
}, Ce = (n, r) => {
|
|
5206
|
+
let i = G(n.onClick), a = e.id || o.params.id;
|
|
5182
5207
|
if (n.disabled) {
|
|
5183
5208
|
if (typeof n.disabled == "string") {
|
|
5184
5209
|
let e = Function("rowData", "rowIndex", n.disabled);
|
|
5185
|
-
n.disabled = (t, r) => e(t, r) ||
|
|
5210
|
+
n.disabled = (t, r) => e(t, r) || ye(n.key);
|
|
5186
5211
|
} else if (typeof n.disabled == "function") {
|
|
5187
|
-
let e =
|
|
5188
|
-
n.disabled = (t, r) => e.disabled(t, r) ||
|
|
5212
|
+
let e = G(n);
|
|
5213
|
+
n.disabled = (t, r) => e.disabled(t, r) || ye(n.key);
|
|
5189
5214
|
}
|
|
5190
|
-
} else n.disabled = () =>
|
|
5215
|
+
} else n.disabled = () => ye(n.key);
|
|
5191
5216
|
if (n.loading = _.value, n.type !== "group" && n.optionsType) n.onClick = async (e) => {
|
|
5192
|
-
|
|
5217
|
+
xe(e).then((r) => {
|
|
5193
5218
|
if (n.optionsType === "drawer:insider") {
|
|
5194
5219
|
if (i) try {
|
|
5195
5220
|
Function("rowData", "POST", "fnNotification", i)(r, Z, c).then((e) => {
|
|
5196
5221
|
m.value?.link(n.optionsSource || "", void 0, e);
|
|
5197
5222
|
}).catch((e) => {
|
|
5198
|
-
|
|
5223
|
+
q(e);
|
|
5199
5224
|
});
|
|
5200
5225
|
} catch (e) {
|
|
5201
|
-
|
|
5226
|
+
q(e);
|
|
5202
5227
|
}
|
|
5203
5228
|
} else t("update:suffixes", {
|
|
5204
5229
|
title: n.buttonText,
|
|
@@ -5215,17 +5240,17 @@ var $a = d({
|
|
|
5215
5240
|
}).catch(() => null);
|
|
5216
5241
|
};
|
|
5217
5242
|
else if (n.type !== "group" && n.action === "detailInside") {
|
|
5218
|
-
let t =
|
|
5243
|
+
let t = G(n.onClick);
|
|
5219
5244
|
n.onClick = (n) => {
|
|
5220
|
-
m.value?.addAndEdit(e.id || o.params.id, () =>
|
|
5245
|
+
m.value?.addAndEdit(e.id || o.params.id, () => Se(n, t), R.value, I.value, 2, je);
|
|
5221
5246
|
};
|
|
5222
5247
|
} else if (n.type !== "group" && n.action === "editInside") {
|
|
5223
|
-
let t =
|
|
5248
|
+
let t = G(n.onClick);
|
|
5224
5249
|
n.onClick = (n) => {
|
|
5225
|
-
m.value?.addAndEdit(e.id || o.params.id, () =>
|
|
5250
|
+
m.value?.addAndEdit(e.id || o.params.id, () => Se(n, t), R.value, I.value, 1, je);
|
|
5226
5251
|
};
|
|
5227
5252
|
} else if (n.type !== "group" && n.action === "deleteInside") {
|
|
5228
|
-
let t =
|
|
5253
|
+
let t = G(n.onClick);
|
|
5229
5254
|
n.onClick = (n) => {
|
|
5230
5255
|
let i;
|
|
5231
5256
|
i = e.deleteFetch ? e.deleteFetch({
|
|
@@ -5239,14 +5264,14 @@ var $a = d({
|
|
|
5239
5264
|
}), i.then(() => {
|
|
5240
5265
|
if (t) try {
|
|
5241
5266
|
Function("rowData", "fnNotification", "POST", t)(n, c, Z).then(() => {
|
|
5242
|
-
|
|
5267
|
+
V();
|
|
5243
5268
|
}).catch(() => null);
|
|
5244
5269
|
} catch (e) {
|
|
5245
|
-
|
|
5270
|
+
q(e);
|
|
5246
5271
|
}
|
|
5247
|
-
else
|
|
5272
|
+
else V();
|
|
5248
5273
|
}).catch((e) => {
|
|
5249
|
-
|
|
5274
|
+
q(e);
|
|
5250
5275
|
});
|
|
5251
5276
|
};
|
|
5252
5277
|
} else if (n.type !== "group" && n.action === "disabledInside") n.onClick = (t) => {
|
|
@@ -5255,7 +5280,7 @@ var $a = d({
|
|
|
5255
5280
|
...t,
|
|
5256
5281
|
is_disabled: "1"
|
|
5257
5282
|
}).then(() => {
|
|
5258
|
-
|
|
5283
|
+
V();
|
|
5259
5284
|
}).catch(() => null);
|
|
5260
5285
|
};
|
|
5261
5286
|
else if (n.type !== "group" && n.action === "enabledInside") n.onClick = (t) => {
|
|
@@ -5264,13 +5289,13 @@ var $a = d({
|
|
|
5264
5289
|
...t,
|
|
5265
5290
|
is_disabled: "0"
|
|
5266
5291
|
}).then(() => {
|
|
5267
|
-
|
|
5292
|
+
V();
|
|
5268
5293
|
}).catch(() => null);
|
|
5269
5294
|
};
|
|
5270
5295
|
else if (n.type !== "group" && n.action) {
|
|
5271
|
-
let e =
|
|
5296
|
+
let e = G(n.onClick);
|
|
5272
5297
|
n.onClick = (t) => {
|
|
5273
|
-
|
|
5298
|
+
de(t).then((t) => {
|
|
5274
5299
|
let r = t && t[0];
|
|
5275
5300
|
tr([n.action], r.id, r).then((t) => {
|
|
5276
5301
|
if (e && typeof e == "string") try {
|
|
@@ -5278,34 +5303,34 @@ var $a = d({
|
|
|
5278
5303
|
c.success({
|
|
5279
5304
|
content: e,
|
|
5280
5305
|
duration: 3e3
|
|
5281
|
-
}),
|
|
5306
|
+
}), V();
|
|
5282
5307
|
}).catch((e) => {
|
|
5283
|
-
|
|
5308
|
+
q(e);
|
|
5284
5309
|
});
|
|
5285
5310
|
} catch (e) {
|
|
5286
|
-
|
|
5311
|
+
q(e);
|
|
5287
5312
|
}
|
|
5288
5313
|
else e && typeof e == "function" ? e(r, t, () => {
|
|
5289
5314
|
c.success({
|
|
5290
5315
|
content: () => s("Notice.success"),
|
|
5291
5316
|
duration: 3e3
|
|
5292
|
-
}),
|
|
5317
|
+
}), V();
|
|
5293
5318
|
}) : (c.success({
|
|
5294
5319
|
content: () => s("Notice.success"),
|
|
5295
5320
|
duration: 3e3
|
|
5296
|
-
}),
|
|
5321
|
+
}), V());
|
|
5297
5322
|
}).catch(() => {
|
|
5298
5323
|
c.error({
|
|
5299
5324
|
content: () => s("Notice.failed"),
|
|
5300
5325
|
duration: 3e3
|
|
5301
|
-
}),
|
|
5326
|
+
}), V();
|
|
5302
5327
|
});
|
|
5303
5328
|
}).catch(() => null);
|
|
5304
5329
|
};
|
|
5305
5330
|
}
|
|
5306
|
-
},
|
|
5307
|
-
|
|
5308
|
-
let { tableColumns: n, search: r, subTableIds: i, subTableExpand: a } = await Ti(P.value, e.child, 0, () => ({}),
|
|
5331
|
+
}, we = async () => {
|
|
5332
|
+
z.value = !1, hi();
|
|
5333
|
+
let { tableColumns: n, search: r, subTableIds: i, subTableExpand: a } = await Ti(P.value, e.child, 0, () => ({}), ie);
|
|
5309
5334
|
!l.value && R.value.index && n.unshift({
|
|
5310
5335
|
title: "#",
|
|
5311
5336
|
key: "index",
|
|
@@ -5331,11 +5356,11 @@ var $a = d({
|
|
|
5331
5356
|
options: ["all", "none"]
|
|
5332
5357
|
});
|
|
5333
5358
|
let c = e.id || o.params.id;
|
|
5334
|
-
if (!l.value && R.value.commonTime && n.push(...
|
|
5335
|
-
let e =
|
|
5359
|
+
if (!l.value && R.value.commonTime && n.push(...ve()), e.enableAction === !0 && F.value && F.value.length > 0) {
|
|
5360
|
+
let e = G(F.value);
|
|
5336
5361
|
for (let t of e) t.type === "group" ? t.children.forEach((e) => {
|
|
5337
|
-
|
|
5338
|
-
}) :
|
|
5362
|
+
Ce(e, i);
|
|
5363
|
+
}) : Ce(t, i);
|
|
5339
5364
|
let t = {
|
|
5340
5365
|
title: () => s("Common.action"),
|
|
5341
5366
|
key: "action",
|
|
@@ -5350,7 +5375,7 @@ var $a = d({
|
|
|
5350
5375
|
return ur({
|
|
5351
5376
|
buttons: e,
|
|
5352
5377
|
rowData: t,
|
|
5353
|
-
callback:
|
|
5378
|
+
callback: V,
|
|
5354
5379
|
tableId: c
|
|
5355
5380
|
});
|
|
5356
5381
|
}
|
|
@@ -5359,10 +5384,10 @@ var $a = d({
|
|
|
5359
5384
|
}
|
|
5360
5385
|
let u = n;
|
|
5361
5386
|
if (c) {
|
|
5362
|
-
let e =
|
|
5387
|
+
let e = Y(`tables_filter_${c}`, !1);
|
|
5363
5388
|
if (e) try {
|
|
5364
5389
|
let t = await $n(c);
|
|
5365
|
-
t && (e = JSON.parse(t), u =
|
|
5390
|
+
t && (e = JSON.parse(t), u = Rt(n, e));
|
|
5366
5391
|
} catch {}
|
|
5367
5392
|
}
|
|
5368
5393
|
a.link && u.unshift({
|
|
@@ -5373,7 +5398,7 @@ var $a = d({
|
|
|
5373
5398
|
fixed: "left",
|
|
5374
5399
|
filter: "default",
|
|
5375
5400
|
filterOptionValue: null,
|
|
5376
|
-
renderFilterMenu: () => f("div", { class: "uz-table-filter" }, [f(L, { onClick:
|
|
5401
|
+
renderFilterMenu: () => f("div", { class: "uz-table-filter" }, [f(L, { onClick: Re }, { default: () => s("Common.expand") }), f(L, { onClick: ze }, { default: () => s("Common.contract") })]),
|
|
5377
5402
|
renderExpand: (e) => f(qa, {
|
|
5378
5403
|
data: a,
|
|
5379
5404
|
value: e
|
|
@@ -5383,23 +5408,23 @@ var $a = d({
|
|
|
5383
5408
|
u.forEach((e) => {
|
|
5384
5409
|
e.show && (d += Number(e.width || 140));
|
|
5385
5410
|
}), C.value = u, A.value = r, D.value = d;
|
|
5386
|
-
},
|
|
5411
|
+
}, Te = (e) => typeof e == "number" ? `${e}px` : e, Ee = () => {
|
|
5387
5412
|
if (e.height) {
|
|
5388
|
-
let t =
|
|
5413
|
+
let t = Te(e.height);
|
|
5389
5414
|
ee.value = t, j.value = t;
|
|
5390
5415
|
}
|
|
5391
|
-
},
|
|
5416
|
+
}, De = (t) => {
|
|
5392
5417
|
let n = e.id || o.params.id;
|
|
5393
5418
|
if (n) {
|
|
5394
5419
|
let e = 0;
|
|
5395
5420
|
C.value.forEach((t) => {
|
|
5396
5421
|
t.show && (e += Number(t.width || 140));
|
|
5397
|
-
}), D.value = e,
|
|
5422
|
+
}), D.value = e, J(`tables_filter_${n}`, t.filter((e) => e.key)), er({
|
|
5398
5423
|
table_id: n,
|
|
5399
5424
|
data: JSON.stringify(t)
|
|
5400
5425
|
}).catch(() => null);
|
|
5401
5426
|
}
|
|
5402
|
-
}, { run:
|
|
5427
|
+
}, { run: Oe } = Yr(De), { run: ke } = Yr((e, t) => {
|
|
5403
5428
|
let n = [];
|
|
5404
5429
|
C.value.forEach((r) => {
|
|
5405
5430
|
r.key !== "action" && r.key !== "index" && r.type !== "expand" && n.push({
|
|
@@ -5409,8 +5434,8 @@ var $a = d({
|
|
|
5409
5434
|
fixed: r.fixed,
|
|
5410
5435
|
width: r.key === t ? Number(e.toFixed(0)) : r.width
|
|
5411
5436
|
});
|
|
5412
|
-
}),
|
|
5413
|
-
}),
|
|
5437
|
+
}), De(n);
|
|
5438
|
+
}), Ae = () => {
|
|
5414
5439
|
let e = [];
|
|
5415
5440
|
C.value.forEach((t) => {
|
|
5416
5441
|
t.key !== "action" && t.key !== "index" && t.type !== "expand" && e.push({
|
|
@@ -5420,8 +5445,8 @@ var $a = d({
|
|
|
5420
5445
|
fixed: t.fixed,
|
|
5421
5446
|
width: t.width
|
|
5422
5447
|
});
|
|
5423
|
-
}),
|
|
5424
|
-
},
|
|
5448
|
+
}), Oe(e);
|
|
5449
|
+
}, je = (t, n, r) => {
|
|
5425
5450
|
let i, a = e.id || o.params.id;
|
|
5426
5451
|
i = e.formFetch ? e.formFetch({
|
|
5427
5452
|
tableId: a,
|
|
@@ -5429,12 +5454,23 @@ var $a = d({
|
|
|
5429
5454
|
}) : Zn({
|
|
5430
5455
|
tableId: a,
|
|
5431
5456
|
...t
|
|
5432
|
-
}), i.then(() => {
|
|
5433
|
-
|
|
5457
|
+
}), i.then((e) => {
|
|
5458
|
+
if (I.value.when_after_save) try {
|
|
5459
|
+
let r = I.value.when_after_save;
|
|
5460
|
+
Function("data", "POST", "res", r)(t, Z, e).then(() => {
|
|
5461
|
+
V(), n();
|
|
5462
|
+
}).catch(() => {
|
|
5463
|
+
ne.value = s("Notice.network"), z.value = !0;
|
|
5464
|
+
});
|
|
5465
|
+
} catch {
|
|
5466
|
+
ne.value = s("Notice.network"), z.value = !0;
|
|
5467
|
+
return;
|
|
5468
|
+
}
|
|
5469
|
+
else V(), n();
|
|
5434
5470
|
}).catch((e) => {
|
|
5435
5471
|
r(e);
|
|
5436
5472
|
});
|
|
5437
|
-
},
|
|
5473
|
+
}, Me = () => {
|
|
5438
5474
|
b.value = "", P.value = [], F.value = [], te.value = [], I.value = {
|
|
5439
5475
|
fetch: null,
|
|
5440
5476
|
fetchFn: "",
|
|
@@ -5442,15 +5478,15 @@ var $a = d({
|
|
|
5442
5478
|
when_before_save: "",
|
|
5443
5479
|
when_after_save: ""
|
|
5444
5480
|
}, R.value = Ci();
|
|
5445
|
-
},
|
|
5446
|
-
let n =
|
|
5481
|
+
}, Ne = (t) => {
|
|
5482
|
+
let n = et.parse(t.viewJson);
|
|
5447
5483
|
b.value = t.tableTitle, P.value = yi(n.table), F.value = vr(e.actions || n.action);
|
|
5448
5484
|
let r = vr(n.suffix || []);
|
|
5449
|
-
te.value = r.filter((e) => e.main).map((e) => (
|
|
5485
|
+
te.value = r.filter((e) => e.main).map((e) => (Fe(e), e)), I.value = xi(n.trigger);
|
|
5450
5486
|
let i = Ci(e.options ?? n.option);
|
|
5451
|
-
t.tableTitle && i.title &&
|
|
5452
|
-
},
|
|
5453
|
-
v.value = !1,
|
|
5487
|
+
t.tableTitle && i.title && jt(t.tableTitle), R.value = i;
|
|
5488
|
+
}, Pe = async () => {
|
|
5489
|
+
v.value = !1, Me();
|
|
5454
5490
|
let t = e.id || o.params.id;
|
|
5455
5491
|
if (k.value = {
|
|
5456
5492
|
params: [],
|
|
@@ -5462,17 +5498,17 @@ var $a = d({
|
|
|
5462
5498
|
}, E.value = [], e.ruleFetch) try {
|
|
5463
5499
|
N.value = await e.ruleFetch(t);
|
|
5464
5500
|
} catch {
|
|
5465
|
-
ne.value = s("Notice.network"),
|
|
5501
|
+
ne.value = s("Notice.network"), z.value = !0;
|
|
5466
5502
|
return;
|
|
5467
5503
|
}
|
|
5468
|
-
|
|
5469
|
-
|
|
5504
|
+
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) => {
|
|
5505
|
+
Ne(e), await we();
|
|
5470
5506
|
}).catch((e) => {
|
|
5471
|
-
ne.value = e?.message || s("Notice.network"),
|
|
5507
|
+
ne.value = e?.message || s("Notice.network"), z.value = !0;
|
|
5472
5508
|
});
|
|
5473
|
-
},
|
|
5509
|
+
}, Fe = (e) => {
|
|
5474
5510
|
if (e.type !== "group" && e.optionsType) {
|
|
5475
|
-
let n =
|
|
5511
|
+
let n = G(e.onClick);
|
|
5476
5512
|
e.onClick = () => {
|
|
5477
5513
|
t("update:suffixes", {
|
|
5478
5514
|
isTop: !0,
|
|
@@ -5482,58 +5518,58 @@ var $a = d({
|
|
|
5482
5518
|
open: e.optionsType,
|
|
5483
5519
|
onClick: n,
|
|
5484
5520
|
optionsSource: e.optionsSource,
|
|
5485
|
-
mainFormValue: () =>
|
|
5521
|
+
mainFormValue: () => B.value,
|
|
5486
5522
|
tableData: () => E.value,
|
|
5487
5523
|
children: null,
|
|
5488
5524
|
callback: null
|
|
5489
5525
|
});
|
|
5490
5526
|
};
|
|
5491
5527
|
} else if (e.type !== "group") {
|
|
5492
|
-
let t =
|
|
5528
|
+
let t = G(e.onClick);
|
|
5493
5529
|
e.onClick = async () => {
|
|
5494
5530
|
if (t && typeof t == "string") try {
|
|
5495
5531
|
let e = Function("rowData", "POST", "fnNotification", t);
|
|
5496
|
-
await e(
|
|
5532
|
+
await e(B.value, Z, c, e), V();
|
|
5497
5533
|
} catch (e) {
|
|
5498
|
-
|
|
5534
|
+
q(e);
|
|
5499
5535
|
}
|
|
5500
5536
|
};
|
|
5501
5537
|
}
|
|
5502
|
-
},
|
|
5538
|
+
}, Ie = () => {
|
|
5503
5539
|
if (_.value) return;
|
|
5504
5540
|
_.value = !0;
|
|
5505
5541
|
let t = e.id || o.params.id;
|
|
5506
|
-
t && (
|
|
5542
|
+
t && (Tt(`tables_filter_${t}`), er({
|
|
5507
5543
|
table_id: t,
|
|
5508
5544
|
data: null
|
|
5509
5545
|
}).catch(() => null).finally(() => {
|
|
5510
|
-
|
|
5546
|
+
we(), _.value = !1;
|
|
5511
5547
|
}));
|
|
5512
|
-
},
|
|
5513
|
-
|
|
5514
|
-
},
|
|
5548
|
+
}, Le = (e, t, n) => {
|
|
5549
|
+
ke(e, n.key);
|
|
5550
|
+
}, Re = () => {
|
|
5515
5551
|
O.value = E.value.map((e) => e.id);
|
|
5516
|
-
},
|
|
5552
|
+
}, ze = () => {
|
|
5517
5553
|
O.value = [];
|
|
5518
5554
|
};
|
|
5519
5555
|
return r({
|
|
5520
|
-
rebuild:
|
|
5521
|
-
init:
|
|
5522
|
-
nextPage:
|
|
5556
|
+
rebuild: Pe,
|
|
5557
|
+
init: V,
|
|
5558
|
+
nextPage: pe
|
|
5523
5559
|
}), y(async () => {
|
|
5524
|
-
await
|
|
5560
|
+
await Pe(), h(() => {
|
|
5525
5561
|
d.value?.scrollTo({
|
|
5526
5562
|
left: 0,
|
|
5527
5563
|
right: 0
|
|
5528
5564
|
});
|
|
5529
5565
|
});
|
|
5530
5566
|
}), M(() => e.height, () => {
|
|
5531
|
-
|
|
5567
|
+
Ee();
|
|
5532
5568
|
}), M([() => o.params.id, () => e.id], async () => {
|
|
5533
|
-
|
|
5569
|
+
Ot(), await Pe();
|
|
5534
5570
|
}), M(() => e.defaultCheckedRowKeys, (e) => {
|
|
5535
|
-
let t = e || [], n =
|
|
5536
|
-
|
|
5571
|
+
let t = e || [], n = B.value.filter((e) => t.includes(e.id));
|
|
5572
|
+
re.value = t, B.value = n;
|
|
5537
5573
|
}, { deep: !0 }), {
|
|
5538
5574
|
t: s,
|
|
5539
5575
|
loading: _,
|
|
@@ -5552,33 +5588,33 @@ var $a = d({
|
|
|
5552
5588
|
spinMsg: ne,
|
|
5553
5589
|
tableScrollX: D,
|
|
5554
5590
|
suffixes: te,
|
|
5555
|
-
spinError:
|
|
5591
|
+
spinError: z,
|
|
5556
5592
|
isMobile: l,
|
|
5557
5593
|
mRef: u,
|
|
5558
|
-
checkRowKeys:
|
|
5594
|
+
checkRowKeys: re,
|
|
5559
5595
|
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:
|
|
5596
|
+
rowKey: ae,
|
|
5597
|
+
pageChange: fe,
|
|
5598
|
+
pageSizeChange: me,
|
|
5599
|
+
pageSorter: he,
|
|
5600
|
+
showChange: ge,
|
|
5601
|
+
submit: _e,
|
|
5602
|
+
handleAdd: H,
|
|
5603
|
+
handleColumnChange: Ae,
|
|
5604
|
+
handleCheckRowKeys: se,
|
|
5605
|
+
handleExpandedRowKeys: ce,
|
|
5606
|
+
checkRole: ye,
|
|
5607
|
+
rebuild: Pe,
|
|
5608
|
+
summaryFn: le,
|
|
5609
|
+
handleMobileCheckRowKeys: oe,
|
|
5610
|
+
isTypeofNumber: Te,
|
|
5611
|
+
resetFilter: Ie,
|
|
5612
|
+
handleColumnResize: Le,
|
|
5577
5613
|
expandedRowKeys: O,
|
|
5578
|
-
handleExpandAll:
|
|
5579
|
-
handleContractAll:
|
|
5614
|
+
handleExpandAll: Re,
|
|
5615
|
+
handleContractAll: ze,
|
|
5580
5616
|
doPortChange: () => {
|
|
5581
|
-
|
|
5617
|
+
V();
|
|
5582
5618
|
}
|
|
5583
5619
|
};
|
|
5584
5620
|
}
|
|
@@ -5853,13 +5889,13 @@ function ao(t, n, u, d, f, p) {
|
|
|
5853
5889
|
var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
5854
5890
|
name: "UzTableChild",
|
|
5855
5891
|
components: {
|
|
5856
|
-
UzIcon:
|
|
5857
|
-
NSpin:
|
|
5892
|
+
UzIcon: Kt,
|
|
5893
|
+
NSpin: je,
|
|
5858
5894
|
NButton: L,
|
|
5859
|
-
NIcon:
|
|
5860
|
-
NDataTable:
|
|
5861
|
-
NForm:
|
|
5862
|
-
NDivider:
|
|
5895
|
+
NIcon: H,
|
|
5896
|
+
NDataTable: ae,
|
|
5897
|
+
NForm: fe,
|
|
5898
|
+
NDivider: se
|
|
5863
5899
|
},
|
|
5864
5900
|
props: {
|
|
5865
5901
|
value: {
|
|
@@ -5878,13 +5914,13 @@ var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
|
5878
5914
|
},
|
|
5879
5915
|
emits: ["update:value"],
|
|
5880
5916
|
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(
|
|
5917
|
+
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) => {
|
|
5918
|
+
let { formDefaultValue: r, fillingDefaultArray: i } = await wi(G(n ?? e.item.params.columns), t, void 0, !0);
|
|
5883
5919
|
return S.value = r, i;
|
|
5884
5920
|
}, D = async (t) => {
|
|
5885
5921
|
if (g.value) return;
|
|
5886
5922
|
g.value = !0;
|
|
5887
|
-
let n = await E(t), r =
|
|
5923
|
+
let n = await E(t), r = G(t).map((e, t) => ({
|
|
5888
5924
|
...e,
|
|
5889
5925
|
...n[t]
|
|
5890
5926
|
}));
|
|
@@ -5900,7 +5936,7 @@ var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
|
5900
5936
|
let t = e.item.params.merge;
|
|
5901
5937
|
r = await Function("formValue", "mainFormValue", "POST", t)(r, o, Z);
|
|
5902
5938
|
} catch (e) {
|
|
5903
|
-
|
|
5939
|
+
q(e);
|
|
5904
5940
|
}
|
|
5905
5941
|
b.value.child = r, g.value = !1, h(() => {
|
|
5906
5942
|
F();
|
|
@@ -5910,7 +5946,7 @@ var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
|
5910
5946
|
});
|
|
5911
5947
|
}, O = (e) => e.delete ? "uz-table-child-delete" : "", k = async (t, n = !1) => {
|
|
5912
5948
|
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(
|
|
5949
|
+
let { tableColumns: r, tableWidth: i } = await Ti(G(t ?? e.item.params.columns), !0, e.status, () => b.value.child, a, n), s = i;
|
|
5914
5950
|
r.unshift({
|
|
5915
5951
|
title: " ",
|
|
5916
5952
|
key: "index",
|
|
@@ -5929,7 +5965,7 @@ var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
|
5929
5965
|
hide: !0,
|
|
5930
5966
|
show: !0,
|
|
5931
5967
|
render() {
|
|
5932
|
-
return f("div", { class: "flex justify-center" }, f(
|
|
5968
|
+
return f("div", { class: "flex justify-center" }, f(H, {}, { default: () => f(Kt, { icon: "List" }) }));
|
|
5933
5969
|
}
|
|
5934
5970
|
}), s += 40), e.status !== 2 && e.item.params.showActions && r.push({
|
|
5935
5971
|
title: () => l("Common.action"),
|
|
@@ -5972,12 +6008,12 @@ var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
|
5972
6008
|
let n = e.item.params.summary;
|
|
5973
6009
|
return Function("pageData", "h", n)(t, f);
|
|
5974
6010
|
} catch (e) {
|
|
5975
|
-
|
|
6011
|
+
q(e);
|
|
5976
6012
|
}
|
|
5977
6013
|
}
|
|
5978
6014
|
return [];
|
|
5979
6015
|
}, ee = async () => {
|
|
5980
|
-
x.value = "", b.value.child.push(
|
|
6016
|
+
x.value = "", b.value.child.push(G(S.value)), h(() => {
|
|
5981
6017
|
F();
|
|
5982
6018
|
});
|
|
5983
6019
|
}, j = async () => {
|
|
@@ -6008,7 +6044,7 @@ var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
|
6008
6044
|
}
|
|
6009
6045
|
});
|
|
6010
6046
|
} catch (e) {
|
|
6011
|
-
|
|
6047
|
+
q(e);
|
|
6012
6048
|
}
|
|
6013
6049
|
}, N = () => {
|
|
6014
6050
|
m.value?.restoreValidation();
|
|
@@ -6020,11 +6056,11 @@ var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
|
6020
6056
|
})), F = () => {
|
|
6021
6057
|
if (e.item.params.draggable && e.status !== 2 && u.value && !d.value) {
|
|
6022
6058
|
let e = u.value.$el.querySelector(".n-data-table-tbody");
|
|
6023
|
-
e && (d.value =
|
|
6059
|
+
e && (d.value = tt.create(e, {
|
|
6024
6060
|
handle: ".uz-drag-handle",
|
|
6025
6061
|
onEnd: ({ oldIndex: e, newIndex: t }) => {
|
|
6026
6062
|
d.value?.destroy(), d.value = null, _.value = !1;
|
|
6027
|
-
let n =
|
|
6063
|
+
let n = G(b.value.child), r = n.splice(e, 1)[0];
|
|
6028
6064
|
n.splice(t, 0, r), n = n.map((e, t) => ({
|
|
6029
6065
|
...e,
|
|
6030
6066
|
sort_index: t
|
|
@@ -6194,7 +6230,7 @@ function ho(t, n, u, d, f, p) {
|
|
|
6194
6230
|
}
|
|
6195
6231
|
var go = /*#__PURE__*/ Q(so, [["render", ho]]), _o = d({
|
|
6196
6232
|
name: "UzTableQuestChild",
|
|
6197
|
-
components: { NDataTable:
|
|
6233
|
+
components: { NDataTable: ae },
|
|
6198
6234
|
props: {
|
|
6199
6235
|
formValue: {
|
|
6200
6236
|
type: Object,
|
|
@@ -6208,7 +6244,7 @@ var go = /*#__PURE__*/ Q(so, [["render", ho]]), _o = d({
|
|
|
6208
6244
|
},
|
|
6209
6245
|
emits: ["update:value"],
|
|
6210
6246
|
setup(e) {
|
|
6211
|
-
let t = p("modules"), { t: n } =
|
|
6247
|
+
let t = p("modules"), { t: n } = W(), r = w(), i = w(!1), a = w([]), o = w([]), s = w(void 0), c = (t) => {
|
|
6212
6248
|
if (i.value = !0, e.item.params.link) {
|
|
6213
6249
|
let n = [];
|
|
6214
6250
|
e.item.params.columns.forEach((e) => {
|
|
@@ -6220,7 +6256,7 @@ var go = /*#__PURE__*/ Q(so, [["render", ho]]), _o = d({
|
|
|
6220
6256
|
}), o.value = t, i.value = !1;
|
|
6221
6257
|
}
|
|
6222
6258
|
}, l = async (i) => {
|
|
6223
|
-
let { tableColumns: c, tableWidth: l } = await Ti(
|
|
6259
|
+
let { tableColumns: c, tableWidth: l } = await Ti(G(i ?? e.item.params.columns), !0, 2, () => o.value, t), u = l;
|
|
6224
6260
|
c.unshift({
|
|
6225
6261
|
title: " ",
|
|
6226
6262
|
key: "index",
|
|
@@ -6286,7 +6322,7 @@ var go = /*#__PURE__*/ Q(so, [["render", ho]]), _o = d({
|
|
|
6286
6322
|
let n = e.item.params.summary;
|
|
6287
6323
|
return Function("pageData", "h", n)(t, f);
|
|
6288
6324
|
} catch (e) {
|
|
6289
|
-
|
|
6325
|
+
q(e);
|
|
6290
6326
|
}
|
|
6291
6327
|
}
|
|
6292
6328
|
return [];
|
|
@@ -6324,16 +6360,16 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6324
6360
|
name: "UzTableDrawer",
|
|
6325
6361
|
components: {
|
|
6326
6362
|
NButton: L,
|
|
6327
|
-
NDrawerContent:
|
|
6328
|
-
NDrawer:
|
|
6329
|
-
NSkeleton:
|
|
6330
|
-
NSpin:
|
|
6331
|
-
NPopover:
|
|
6332
|
-
NModal:
|
|
6363
|
+
NDrawerContent: le,
|
|
6364
|
+
NDrawer: ce,
|
|
6365
|
+
NSkeleton: ke,
|
|
6366
|
+
NSpin: je,
|
|
6367
|
+
NPopover: Te,
|
|
6368
|
+
NModal: Se
|
|
6333
6369
|
},
|
|
6334
6370
|
emits: ["update:show", "on-submit"],
|
|
6335
6371
|
setup(e, { emit: t, expose: r }) {
|
|
6336
|
-
let { t: i } =
|
|
6372
|
+
let { t: i } = W(), a = n(() => X.isMobile), o = w(), s = w(""), c = w(0), l = w({}), u = w({
|
|
6337
6373
|
link: "",
|
|
6338
6374
|
linkFn: ""
|
|
6339
6375
|
}), d = w(!1), f = w({
|
|
@@ -6362,7 +6398,7 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6362
6398
|
}), x = w(!1), S = w(), C = () => {
|
|
6363
6399
|
o.value?.restoreValidation(), l.value = {}, m.value = !1, p.value = !1, d.value = !1, t("update:show", !1);
|
|
6364
6400
|
}, T = () => {
|
|
6365
|
-
c.value === 2 ? C() :
|
|
6401
|
+
c.value === 2 ? C() : wt.info({
|
|
6366
6402
|
title: i("Common.hint"),
|
|
6367
6403
|
content: i("Table.closeConfirm"),
|
|
6368
6404
|
positiveText: i("Common.confirm"),
|
|
@@ -6378,10 +6414,10 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6378
6414
|
Function("formValues", "POST", t)(e, Z).then((e) => {
|
|
6379
6415
|
l.value = e;
|
|
6380
6416
|
}).catch((e) => {
|
|
6381
|
-
|
|
6417
|
+
q(e);
|
|
6382
6418
|
});
|
|
6383
6419
|
} catch (e) {
|
|
6384
|
-
|
|
6420
|
+
q(e);
|
|
6385
6421
|
}
|
|
6386
6422
|
else l.value = e;
|
|
6387
6423
|
};
|
|
@@ -6395,11 +6431,11 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6395
6431
|
let r = e.split(".")[0];
|
|
6396
6432
|
_i(r).then((e) => {
|
|
6397
6433
|
h(async () => {
|
|
6398
|
-
let t =
|
|
6434
|
+
let t = et.parse(e.viewJson);
|
|
6399
6435
|
f.value = Ci(t.option), d.value = !0;
|
|
6400
6436
|
let { form: i } = await wi(yi(t.table), n);
|
|
6401
6437
|
b.value = t.trigger, n && E(n);
|
|
6402
|
-
let a =
|
|
6438
|
+
let a = Y(`tables_cache_link_${r}`, !1);
|
|
6403
6439
|
a && (l.value = a), h(() => {
|
|
6404
6440
|
y.value = i, g.value = !1;
|
|
6405
6441
|
});
|
|
@@ -6411,7 +6447,7 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6411
6447
|
},
|
|
6412
6448
|
addAndEdit: async (e, t, n, r, i = 0, a) => {
|
|
6413
6449
|
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 =
|
|
6450
|
+
let r = Y(`tables_cache_${e}`, !1);
|
|
6415
6451
|
r && i === 0 ? l.value = r : l.value = n, y.value = t, S.value = a, g.value = !1;
|
|
6416
6452
|
}).catch(() => null);
|
|
6417
6453
|
},
|
|
@@ -6445,19 +6481,8 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6445
6481
|
v.value = 1, _.value = e.message;
|
|
6446
6482
|
return;
|
|
6447
6483
|
}
|
|
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();
|
|
6484
|
+
if (S.value) S.value(e, () => {
|
|
6485
|
+
Tt(`tables_cache_${s.value}`), C();
|
|
6461
6486
|
}, (e) => {
|
|
6462
6487
|
v.value = 1, _.value = e;
|
|
6463
6488
|
});
|
|
@@ -6467,29 +6492,18 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6467
6492
|
tableId: n,
|
|
6468
6493
|
...e
|
|
6469
6494
|
}).then(() => {
|
|
6470
|
-
hi(), Xn({ tableId: n }).then((
|
|
6471
|
-
let
|
|
6495
|
+
hi(), Xn({ tableId: n }).then((e) => {
|
|
6496
|
+
let r = u.value.link.split("."), i;
|
|
6472
6497
|
if (u.value.linkFn) {
|
|
6473
|
-
let
|
|
6474
|
-
|
|
6475
|
-
} else
|
|
6476
|
-
label: e[
|
|
6498
|
+
let t = u.value.linkFn;
|
|
6499
|
+
i = Function("sourceData", t)(e);
|
|
6500
|
+
} else i = e.map((e) => ({
|
|
6501
|
+
label: e[r[1]],
|
|
6477
6502
|
value: e.id,
|
|
6478
6503
|
disabled: e?.status === "0",
|
|
6479
6504
|
params: e
|
|
6480
6505
|
}));
|
|
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();
|
|
6506
|
+
m.value = !1, Tt(`tables_cache_link_${n}`), t("on-submit", i), C();
|
|
6493
6507
|
}).catch((e) => {
|
|
6494
6508
|
v.value = 1, _.value = e;
|
|
6495
6509
|
});
|
|
@@ -6503,10 +6517,10 @@ var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
|
6503
6517
|
},
|
|
6504
6518
|
doCacheToStore: () => {
|
|
6505
6519
|
let e = o.value?.getValues();
|
|
6506
|
-
if (S.value)
|
|
6520
|
+
if (S.value) J(`tables_cache_${s.value}`, e, "1 Hours"), C();
|
|
6507
6521
|
else {
|
|
6508
6522
|
let t = u.value.link.split(".")[0];
|
|
6509
|
-
|
|
6523
|
+
J(`tables_cache_link_${t}`, e, "1 Hours"), C();
|
|
6510
6524
|
}
|
|
6511
6525
|
}
|
|
6512
6526
|
};
|
|
@@ -6722,11 +6736,11 @@ function No(t, n, s, c, l, u) {
|
|
|
6722
6736
|
var Po = d({
|
|
6723
6737
|
name: "UzTableMobile",
|
|
6724
6738
|
components: {
|
|
6725
|
-
NCheckbox:
|
|
6726
|
-
NRadio:
|
|
6727
|
-
NPagination:
|
|
6728
|
-
NCheckboxGroup:
|
|
6729
|
-
NRadioGroup:
|
|
6739
|
+
NCheckbox: z,
|
|
6740
|
+
NRadio: Ee,
|
|
6741
|
+
NPagination: Ce,
|
|
6742
|
+
NCheckboxGroup: re,
|
|
6743
|
+
NRadioGroup: De,
|
|
6730
6744
|
UzTableMobileList: /* @__PURE__ */ Q(Ao, [["render", No], ["__scopeId", "data-v-84c394fe"]])
|
|
6731
6745
|
},
|
|
6732
6746
|
props: {
|
|
@@ -6904,14 +6918,14 @@ function Ro(t, n, o, s, c, u) {
|
|
|
6904
6918
|
var zo = /*#__PURE__*/ Q(Po, [["render", Ro], ["__scopeId", "data-v-70b54e3b"]]), Bo = d({
|
|
6905
6919
|
name: "UzTableFile",
|
|
6906
6920
|
components: {
|
|
6907
|
-
UzIcon:
|
|
6908
|
-
NDropdown:
|
|
6921
|
+
UzIcon: Kt,
|
|
6922
|
+
NDropdown: ue,
|
|
6909
6923
|
NButton: L,
|
|
6910
|
-
NModal:
|
|
6911
|
-
NUpload:
|
|
6912
|
-
NSpace:
|
|
6913
|
-
NIcon:
|
|
6914
|
-
NDataTable:
|
|
6924
|
+
NModal: Se,
|
|
6925
|
+
NUpload: Le,
|
|
6926
|
+
NSpace: Ae,
|
|
6927
|
+
NIcon: H,
|
|
6928
|
+
NDataTable: ae
|
|
6915
6929
|
},
|
|
6916
6930
|
props: {
|
|
6917
6931
|
query: {
|
|
@@ -6927,14 +6941,14 @@ var zo = /*#__PURE__*/ Q(Po, [["render", Ro], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
6927
6941
|
},
|
|
6928
6942
|
emits: ["on-update:change"],
|
|
6929
6943
|
setup(e, { emit: t }) {
|
|
6930
|
-
let { t: n } =
|
|
6944
|
+
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
6945
|
label: n("Common.import"),
|
|
6932
6946
|
key: "import",
|
|
6933
|
-
icon: () => f(
|
|
6947
|
+
icon: () => f(H, null, { default: () => f(Kt, { icon: "CloudUpload" }) })
|
|
6934
6948
|
}, {
|
|
6935
6949
|
label: n("Common.export"),
|
|
6936
6950
|
key: "export",
|
|
6937
|
-
icon: () => f(
|
|
6951
|
+
icon: () => f(H, null, { default: () => f(Kt, { icon: "CloudDownload" }) })
|
|
6938
6952
|
}]), d = w([
|
|
6939
6953
|
{
|
|
6940
6954
|
title: n("Common.fileName"),
|
|
@@ -7010,7 +7024,7 @@ var zo = /*#__PURE__*/ Q(Po, [["render", Ro], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
7010
7024
|
rawFileName: c,
|
|
7011
7025
|
dropOption: u,
|
|
7012
7026
|
dropSelect: (t) => {
|
|
7013
|
-
t === "import" ? (a.value = !0, v()) : t === "export" &&
|
|
7027
|
+
t === "import" ? (a.value = !0, v()) : t === "export" && wt.info({
|
|
7014
7028
|
title: n("Common.hint"),
|
|
7015
7029
|
content: n("File.exportConfirm"),
|
|
7016
7030
|
positiveText: n("Common.confirm"),
|
|
@@ -7157,7 +7171,7 @@ function Jo(t, n, i, s, u, d) {
|
|
|
7157
7171
|
}
|
|
7158
7172
|
var Yo = /*#__PURE__*/ Q(Bo, [["render", Jo], ["__scopeId", "data-v-d8e581ec"]]), $ = C({
|
|
7159
7173
|
page: {
|
|
7160
|
-
label:
|
|
7174
|
+
label: K.global.t("Common.home"),
|
|
7161
7175
|
key: "/",
|
|
7162
7176
|
path: "/",
|
|
7163
7177
|
closable: !1
|
|
@@ -7173,7 +7187,7 @@ function Xo(e) {
|
|
|
7173
7187
|
path: e.key,
|
|
7174
7188
|
closable: !1
|
|
7175
7189
|
};
|
|
7176
|
-
let t =
|
|
7190
|
+
let t = Y($.cache, !1);
|
|
7177
7191
|
t ? ($.active = t.active, t.thumbnail && ($.thumbnail = t.thumbnail)) : $.thumbnail = [{
|
|
7178
7192
|
label: e.label,
|
|
7179
7193
|
key: e.key,
|
|
@@ -7182,53 +7196,53 @@ function Xo(e) {
|
|
|
7182
7196
|
}];
|
|
7183
7197
|
}
|
|
7184
7198
|
function Zo(e) {
|
|
7185
|
-
$.active = e,
|
|
7199
|
+
$.active = e, qt.push(e), J($.cache, $, 0);
|
|
7186
7200
|
}
|
|
7187
7201
|
function Qo(e, t) {
|
|
7188
7202
|
let n = $.thumbnail.find((t) => t.key === e);
|
|
7189
|
-
n && (n.key = t, $.active = t,
|
|
7203
|
+
n && (n.key = t, $.active = t, J($.cache, $, 0));
|
|
7190
7204
|
}
|
|
7191
7205
|
function $o(e) {
|
|
7192
7206
|
let t = $.thumbnail.find((t) => t.path === e.key);
|
|
7193
|
-
t ? ($.active = t.key,
|
|
7207
|
+
t ? ($.active = t.key, J($.cache, $, 0), qt.push(t.key)) : ($.active = e.key, $.thumbnail.push({
|
|
7194
7208
|
...e,
|
|
7195
7209
|
path: e.key,
|
|
7196
7210
|
closable: !0
|
|
7197
|
-
}),
|
|
7211
|
+
}), qt.push(e.key));
|
|
7198
7212
|
}
|
|
7199
7213
|
function es(e) {
|
|
7200
7214
|
let t = $.thumbnail.findIndex((t) => t.key === e);
|
|
7201
7215
|
if ($.thumbnail.splice(t, 1), $.active === e) {
|
|
7202
7216
|
let e = $.thumbnail[t - 1]?.key || "";
|
|
7203
|
-
$.active = e,
|
|
7217
|
+
$.active = e, qt.push(e);
|
|
7204
7218
|
}
|
|
7205
|
-
|
|
7219
|
+
J($.cache, $, 0);
|
|
7206
7220
|
}
|
|
7207
7221
|
function ts() {
|
|
7208
|
-
$.active = $.page.path, $.thumbnail = [$.page],
|
|
7222
|
+
$.active = $.page.path, $.thumbnail = [$.page], qt.push($.page.path), J($.cache, $, 0);
|
|
7209
7223
|
}
|
|
7210
7224
|
//#endregion
|
|
7211
7225
|
//#region components/thumbnail/index.vue?vue&type=script&lang.ts
|
|
7212
7226
|
var ns = d({
|
|
7213
7227
|
name: "UzThumbnail",
|
|
7214
7228
|
components: {
|
|
7215
|
-
NTabs:
|
|
7216
|
-
NTabPane:
|
|
7229
|
+
NTabs: Pe,
|
|
7230
|
+
NTabPane: Ne,
|
|
7217
7231
|
NButton: L,
|
|
7218
|
-
NIcon:
|
|
7219
|
-
NPopconfirm:
|
|
7220
|
-
NFlex:
|
|
7232
|
+
NIcon: H,
|
|
7233
|
+
NPopconfirm: we,
|
|
7234
|
+
NFlex: V
|
|
7221
7235
|
},
|
|
7222
7236
|
props: { option: {
|
|
7223
7237
|
type: Object,
|
|
7224
7238
|
default: () => ({
|
|
7225
|
-
label:
|
|
7239
|
+
label: K.global.t("Common.home"),
|
|
7226
7240
|
key: "/",
|
|
7227
7241
|
cache: "thumbnailStore"
|
|
7228
7242
|
})
|
|
7229
7243
|
} },
|
|
7230
7244
|
setup(e, { slots: t }) {
|
|
7231
|
-
let { t: n } =
|
|
7245
|
+
let { t: n } = W(), r = w(!!t.prefix), i = qe();
|
|
7232
7246
|
return y(() => {
|
|
7233
7247
|
Xo(e.option), $.active !== i.path && Qo(i.path, i.fullPath);
|
|
7234
7248
|
}), M(() => i, (e) => {
|
|
@@ -7303,7 +7317,7 @@ function rs(t, n, i, o, u, d) {
|
|
|
7303
7317
|
]);
|
|
7304
7318
|
}
|
|
7305
7319
|
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
|
-
|
|
7320
|
+
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
7321
|
var hs = {
|
|
7308
7322
|
common: {
|
|
7309
7323
|
inputColor: "rgba(var(--input))",
|
|
@@ -7342,14 +7356,14 @@ var hs = {
|
|
|
7342
7356
|
borderRadius: "8px",
|
|
7343
7357
|
color: "#c0c0c0"
|
|
7344
7358
|
}
|
|
7345
|
-
}, gs =
|
|
7359
|
+
}, gs = U, _s = d({
|
|
7346
7360
|
name: "UzWrap",
|
|
7347
|
-
components: { NConfigProvider:
|
|
7361
|
+
components: { NConfigProvider: ie },
|
|
7348
7362
|
setup() {
|
|
7349
7363
|
return {
|
|
7350
|
-
zhCN:
|
|
7351
|
-
dateZhCN:
|
|
7352
|
-
commonStore:
|
|
7364
|
+
zhCN: He,
|
|
7365
|
+
dateZhCN: Be,
|
|
7366
|
+
commonStore: X,
|
|
7353
7367
|
lightTheme: hs,
|
|
7354
7368
|
darkTheme: gs
|
|
7355
7369
|
};
|
|
@@ -7454,15 +7468,15 @@ var Ss = d({
|
|
|
7454
7468
|
name: "UzOcr",
|
|
7455
7469
|
components: {
|
|
7456
7470
|
NButton: L,
|
|
7457
|
-
NUpload:
|
|
7458
|
-
NSelect:
|
|
7459
|
-
NSwitch:
|
|
7460
|
-
NTabs:
|
|
7461
|
-
NTabPane:
|
|
7462
|
-
NSpace:
|
|
7471
|
+
NUpload: Le,
|
|
7472
|
+
NSelect: Oe,
|
|
7473
|
+
NSwitch: Me,
|
|
7474
|
+
NTabs: Pe,
|
|
7475
|
+
NTabPane: Ne,
|
|
7476
|
+
NSpace: Ae
|
|
7463
7477
|
},
|
|
7464
7478
|
setup() {
|
|
7465
|
-
let { t: e } =
|
|
7479
|
+
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
7480
|
{
|
|
7467
7481
|
label: e("OCR.scaleNone"),
|
|
7468
7482
|
value: 1
|
|
@@ -7475,12 +7489,12 @@ var Ss = d({
|
|
|
7475
7489
|
label: e("OCR.scale3x"),
|
|
7476
7490
|
value: 3
|
|
7477
7491
|
}
|
|
7478
|
-
]), _ = async () => (a.value ||= await
|
|
7492
|
+
]), _ = async () => (a.value ||= await ot(["eng", "chi_sim"], it.LSTM_ONLY, {
|
|
7479
7493
|
workerPath: "https://unizhen-1369980751.cos.ap-shanghai.myqcloud.com/tesseract/worker.min.js",
|
|
7480
7494
|
corePath: "https://unizhen-1369980751.cos.ap-shanghai.myqcloud.com/tesseract/tesseract-core-simd-lstm.wasm.js"
|
|
7481
7495
|
}), a.value.setParameters({
|
|
7482
|
-
tessedit_pageseg_mode:
|
|
7483
|
-
tessedit_ocr_engine_mode:
|
|
7496
|
+
tessedit_pageseg_mode: at.SINGLE_COLUMN,
|
|
7497
|
+
tessedit_ocr_engine_mode: it.LSTM_ONLY,
|
|
7484
7498
|
user_defined_dpi: "300",
|
|
7485
7499
|
preserve_interword_spaces: "1",
|
|
7486
7500
|
textord_tabfind_vertical_spaces: "0",
|
|
@@ -7518,7 +7532,7 @@ var Ss = d({
|
|
|
7518
7532
|
let { data: { text: n } } = await t.recognize(e);
|
|
7519
7533
|
return n;
|
|
7520
7534
|
} catch (e) {
|
|
7521
|
-
throw
|
|
7535
|
+
throw q(e), e;
|
|
7522
7536
|
}
|
|
7523
7537
|
}, b = async (n) => {
|
|
7524
7538
|
t.value = !0, r.value = e("OCR.analysis");
|
|
@@ -7690,8 +7704,8 @@ function Js(e, t, n, s, u, d) {
|
|
|
7690
7704
|
size: "small"
|
|
7691
7705
|
}, 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
7706
|
}
|
|
7693
|
-
var Ys = /*#__PURE__*/ Q(Ss, [["render", Js], ["__scopeId", "data-v-1e757396"]]), Xs = /* @__PURE__ */
|
|
7694
|
-
UzActionButton: () =>
|
|
7707
|
+
var Ys = /*#__PURE__*/ Q(Ss, [["render", Js], ["__scopeId", "data-v-1e757396"]]), Xs = /* @__PURE__ */ ct({
|
|
7708
|
+
UzActionButton: () => lt,
|
|
7695
7709
|
UzBack: () => xr,
|
|
7696
7710
|
UzBom: () => Pi,
|
|
7697
7711
|
UzCamera: () => Ta,
|
|
@@ -7702,7 +7716,7 @@ var Ys = /*#__PURE__*/ Q(Ss, [["render", Js], ["__scopeId", "data-v-1e757396"]])
|
|
|
7702
7716
|
UzFormItemImage: () => Wr,
|
|
7703
7717
|
UzFormItemTimesPicker: () => Jr,
|
|
7704
7718
|
UzFormItemUpload: () => Br,
|
|
7705
|
-
UzIcon: () =>
|
|
7719
|
+
UzIcon: () => Kt,
|
|
7706
7720
|
UzOcr: () => Ys,
|
|
7707
7721
|
UzSearchBar: () => Fa,
|
|
7708
7722
|
UzSearchMobileBar: () => Va,
|
|
@@ -7715,7 +7729,7 @@ var Ys = /*#__PURE__*/ Q(Ss, [["render", Js], ["__scopeId", "data-v-1e757396"]])
|
|
|
7715
7729
|
UzTableQuestChild: () => So,
|
|
7716
7730
|
UzThumbnail: () => is,
|
|
7717
7731
|
UzWrap: () => ys,
|
|
7718
|
-
commonStore: () =>
|
|
7732
|
+
commonStore: () => X,
|
|
7719
7733
|
fnActionReduction: () => vr,
|
|
7720
7734
|
fnActionSimplify: () => _r,
|
|
7721
7735
|
fnAddThumbnail: () => $o,
|
|
@@ -7727,14 +7741,14 @@ var Ys = /*#__PURE__*/ Q(Ss, [["render", Js], ["__scopeId", "data-v-1e757396"]])
|
|
|
7727
7741
|
fnPrepareFormData: () => wi,
|
|
7728
7742
|
fnPrepareTableData: () => Ti,
|
|
7729
7743
|
fnRenderAction: () => ur,
|
|
7730
|
-
fnSetLang: () =>
|
|
7731
|
-
fnSetTheme: () =>
|
|
7744
|
+
fnSetLang: () => Vt,
|
|
7745
|
+
fnSetTheme: () => Ht,
|
|
7732
7746
|
fnSetThumbnail: () => Zo,
|
|
7733
7747
|
fnTableReduction: () => yi,
|
|
7734
7748
|
fnTableSimplify: () => vi,
|
|
7735
7749
|
fnTriggersReduction: () => xi,
|
|
7736
7750
|
fnTriggersSimplify: () => bi,
|
|
7737
|
-
i18n: () =>
|
|
7751
|
+
i18n: () => K
|
|
7738
7752
|
}), Zs = 3840, Qs = 2160, $s = C({ scale: 1 });
|
|
7739
7753
|
function ec(e, t) {
|
|
7740
7754
|
Zs = e, Qs = t;
|
|
@@ -7751,7 +7765,7 @@ function tc() {
|
|
|
7751
7765
|
$s.scale = e;
|
|
7752
7766
|
}
|
|
7753
7767
|
function nc() {
|
|
7754
|
-
let e =
|
|
7768
|
+
let e = Xe(tc, 200);
|
|
7755
7769
|
return e(), window.addEventListener("resize", e), () => {
|
|
7756
7770
|
Zs = 3840, Qs = 2160, window.removeEventListener("resize", e);
|
|
7757
7771
|
};
|
|
@@ -7759,7 +7773,7 @@ function nc() {
|
|
|
7759
7773
|
//#endregion
|
|
7760
7774
|
//#region components/hooks/useThrottleFn.ts
|
|
7761
7775
|
function rc(e, t = 1e3) {
|
|
7762
|
-
let r = w(e), i = n(() =>
|
|
7776
|
+
let r = w(e), i = n(() => Ze((...e) => r.value([...e]), t));
|
|
7763
7777
|
return b(() => {
|
|
7764
7778
|
i.value.cancel();
|
|
7765
7779
|
}), {
|
|
@@ -7771,8 +7785,8 @@ function rc(e, t = 1e3) {
|
|
|
7771
7785
|
//#endregion
|
|
7772
7786
|
//#region components/hooks/useLocalStorage.ts
|
|
7773
7787
|
function ic(e, t) {
|
|
7774
|
-
return [w(
|
|
7775
|
-
n === void 0 ?
|
|
7788
|
+
return [w(Y(e, t?.defaultValue)), (n) => {
|
|
7789
|
+
n === void 0 ? Tt(e) : J(e, n, t?.expired || "1 Day");
|
|
7776
7790
|
}];
|
|
7777
7791
|
}
|
|
7778
7792
|
//#endregion
|
|
@@ -7798,7 +7812,7 @@ function ac(e, t, n) {
|
|
|
7798
7812
|
});
|
|
7799
7813
|
e = await Promise.race([n, t()]);
|
|
7800
7814
|
}
|
|
7801
|
-
h(!1, "success"), m(e),
|
|
7815
|
+
h(!1, "success"), m(e), J(r, e, 0);
|
|
7802
7816
|
} catch (e) {
|
|
7803
7817
|
g(e), h(!1, "error"), u.value > 0 && (--u.value, setTimeout(() => {
|
|
7804
7818
|
p();
|
|
@@ -7822,7 +7836,7 @@ function ac(e, t, n) {
|
|
|
7822
7836
|
}, n?.pollingInterval));
|
|
7823
7837
|
};
|
|
7824
7838
|
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 =
|
|
7839
|
+
let e = Y(r, !1);
|
|
7826
7840
|
e && m(e);
|
|
7827
7841
|
} catch {
|
|
7828
7842
|
m(!1);
|
|
@@ -7843,7 +7857,7 @@ function ac(e, t, n) {
|
|
|
7843
7857
|
}
|
|
7844
7858
|
//#endregion
|
|
7845
7859
|
//#region package.json
|
|
7846
|
-
var oc = "0.1.
|
|
7860
|
+
var oc = "0.1.137", sc;
|
|
7847
7861
|
async function cc() {
|
|
7848
7862
|
let e = await fetch(`${window.location.protocol}//${window.location.host}`, {
|
|
7849
7863
|
method: "HEAD",
|
|
@@ -7853,7 +7867,7 @@ async function cc() {
|
|
|
7853
7867
|
}
|
|
7854
7868
|
async function lc() {
|
|
7855
7869
|
let e = await cc();
|
|
7856
|
-
sc !== e &&
|
|
7870
|
+
sc !== e && Ut(!0);
|
|
7857
7871
|
}
|
|
7858
7872
|
async function uc() {
|
|
7859
7873
|
sc = await cc(), window.versionMonitor && clearInterval(window.versionMonitor), window.versionMonitor = setInterval(() => {
|
|
@@ -7874,11 +7888,11 @@ function dc({ components: e = [] } = {}) {
|
|
|
7874
7888
|
n(r, t, e);
|
|
7875
7889
|
});
|
|
7876
7890
|
}), 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
|
-
|
|
7891
|
+
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);
|
|
7892
|
+
Bt(o), Vt(d), Wt(e || K.global.t("App.title")), Ht(u), zt({
|
|
7879
7893
|
icons: c,
|
|
7880
7894
|
iconDefault: l
|
|
7881
|
-
}),
|
|
7895
|
+
}), K.global.locale.value = d, a && uc(), t && Mn(r, t, n);
|
|
7882
7896
|
}
|
|
7883
7897
|
}
|
|
7884
7898
|
return {
|
|
@@ -7890,4 +7904,4 @@ function dc({ components: e = [] } = {}) {
|
|
|
7890
7904
|
//#region components/preset.ts
|
|
7891
7905
|
var fc = dc({ components: Object.keys(Xs).map((e) => Xs[e]) }), pc = fc.install;
|
|
7892
7906
|
//#endregion
|
|
7893
|
-
export { Gn as BLOB, Kn as CUSTOM, qn as FILE, Wn as GET, Z as POST,
|
|
7907
|
+
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 };
|