@unizhen/ui 0.1.133 → 0.1.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/form/draggable.vue.d.ts +4 -0
- package/lib/components/form/index.vue.d.ts +4 -0
- package/lib/components/form/interface.d.ts +1 -0
- package/lib/components/table/factory.d.ts +2 -0
- package/lib/components/table/interface.d.ts +1 -0
- package/lib/ui.js +927 -892
- 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
|
};
|
|
@@ -2159,7 +2159,7 @@ function Nr(t, n, s, u, d, f) {
|
|
|
2159
2159
|
onClick: I((e) => t.onModeClick(n, s), ["stop"]),
|
|
2160
2160
|
key: n.key,
|
|
2161
2161
|
style: _(`grid-column: span ${n.form.span || 6} / span ${n.form.span || 6};`),
|
|
2162
|
-
"show-label": n.input !== "divider" && n.input !== "subTable",
|
|
2162
|
+
"show-label": n.input !== "divider" && n.input !== "subTable" && n.input !== "bom",
|
|
2163
2163
|
"show-feedback": t.showFeedback && n.input !== "divider"
|
|
2164
2164
|
}, {
|
|
2165
2165
|
label: P(() => [
|
|
@@ -2212,7 +2212,7 @@ function Nr(t, n, s, u, d, f) {
|
|
|
2212
2212
|
onClick: I((r) => t.onModeClick(e, s, n), ["stop"]),
|
|
2213
2213
|
key: n,
|
|
2214
2214
|
style: _(`grid-column: span ${e.form.span || 6} / span ${e.form.span || 6};`),
|
|
2215
|
-
"show-label": e.input !== "divider" && e.input !== "subTable",
|
|
2215
|
+
"show-label": e.input !== "divider" && e.input !== "subTable" && e.input !== "bom",
|
|
2216
2216
|
"show-feedback": t.showFeedback && e.input !== "divider"
|
|
2217
2217
|
}, {
|
|
2218
2218
|
default: P(() => [t.formItemIndex[0] === s && t.formItemIndex[1] === n ? (x(), r(h, {
|
|
@@ -2302,15 +2302,15 @@ function Nr(t, n, s, u, d, f) {
|
|
|
2302
2302
|
var Pr = /*#__PURE__*/ Q(Ar, [["render", Nr]]), Fr = d({
|
|
2303
2303
|
name: "UzFormItemUpload",
|
|
2304
2304
|
components: {
|
|
2305
|
-
NUpload:
|
|
2305
|
+
NUpload: Le,
|
|
2306
2306
|
NButton: L,
|
|
2307
|
-
NIcon:
|
|
2308
|
-
NImage:
|
|
2309
|
-
NPopover:
|
|
2310
|
-
NPopconfirm:
|
|
2311
|
-
NUploadDragger:
|
|
2312
|
-
NInputGroup:
|
|
2313
|
-
NSpin:
|
|
2307
|
+
NIcon: H,
|
|
2308
|
+
NImage: ge,
|
|
2309
|
+
NPopover: Te,
|
|
2310
|
+
NPopconfirm: we,
|
|
2311
|
+
NUploadDragger: Re,
|
|
2312
|
+
NInputGroup: ye,
|
|
2313
|
+
NSpin: je
|
|
2314
2314
|
},
|
|
2315
2315
|
props: {
|
|
2316
2316
|
value: {
|
|
@@ -2334,8 +2334,8 @@ var Pr = /*#__PURE__*/ Q(Ar, [["render", Nr]]), Fr = d({
|
|
|
2334
2334
|
},
|
|
2335
2335
|
emits: ["update:value"],
|
|
2336
2336
|
setup(e, { emit: t }) {
|
|
2337
|
-
let { t: n } =
|
|
2338
|
-
t("update:value",
|
|
2337
|
+
let { t: n } = W(), r = Ve(), i = w(!1), a = w([]), o = () => {
|
|
2338
|
+
t("update:value", et.stringify(a.value.map((e) => e.url)));
|
|
2339
2339
|
}, s = (e) => new Promise((t, s) => {
|
|
2340
2340
|
if (e.file.file) {
|
|
2341
2341
|
if (i.value = !0, e.file.file.size > 10485760) r.error({
|
|
@@ -2376,10 +2376,10 @@ var Pr = /*#__PURE__*/ Q(Ar, [["render", Nr]]), Fr = d({
|
|
|
2376
2376
|
}, l = (e) => {
|
|
2377
2377
|
a.value.splice(e, 1), o();
|
|
2378
2378
|
}, u = () => {
|
|
2379
|
-
let t =
|
|
2379
|
+
let t = G(e.value);
|
|
2380
2380
|
if (!t) a.value = [];
|
|
2381
2381
|
else if (typeof t == "string") try {
|
|
2382
|
-
t =
|
|
2382
|
+
t = et.parse(t), a.value = t.map((e, t) => {
|
|
2383
2383
|
let n = decodeURIComponent(e), r = n.lastIndexOf("/"), i = n.substring(r + 1);
|
|
2384
2384
|
return {
|
|
2385
2385
|
id: String(t + 1),
|
|
@@ -2499,10 +2499,10 @@ function zr(t, n, s, u, d, f) {
|
|
|
2499
2499
|
var Br = /*#__PURE__*/ Q(Fr, [["render", zr], ["__scopeId", "data-v-3f4cdb7e"]]), Vr = d({
|
|
2500
2500
|
name: "UzFormItemImage",
|
|
2501
2501
|
components: {
|
|
2502
|
-
NImageGroup:
|
|
2503
|
-
NImage:
|
|
2504
|
-
NIcon:
|
|
2505
|
-
NPopover:
|
|
2502
|
+
NImageGroup: _e,
|
|
2503
|
+
NImage: ge,
|
|
2504
|
+
NIcon: H,
|
|
2505
|
+
NPopover: Te
|
|
2506
2506
|
},
|
|
2507
2507
|
props: { value: {
|
|
2508
2508
|
required: !0,
|
|
@@ -2513,7 +2513,7 @@ var Br = /*#__PURE__*/ Q(Fr, [["render", zr], ["__scopeId", "data-v-3f4cdb7e"]])
|
|
|
2513
2513
|
let t = w([]);
|
|
2514
2514
|
return N(() => {
|
|
2515
2515
|
try {
|
|
2516
|
-
e.value ? t.value =
|
|
2516
|
+
e.value ? t.value = et.parse(e.value) : t.value = [];
|
|
2517
2517
|
} catch {
|
|
2518
2518
|
t.value = [];
|
|
2519
2519
|
}
|
|
@@ -2578,7 +2578,7 @@ function Ur(t, n, i, s, u, d) {
|
|
|
2578
2578
|
}
|
|
2579
2579
|
var Wr = /*#__PURE__*/ Q(Vr, [["render", Ur]]), Gr = d({
|
|
2580
2580
|
name: "UzFormItemTimesPicker",
|
|
2581
|
-
components: { NSelect:
|
|
2581
|
+
components: { NSelect: Oe },
|
|
2582
2582
|
props: {
|
|
2583
2583
|
value: {
|
|
2584
2584
|
required: !0,
|
|
@@ -2592,7 +2592,7 @@ var Wr = /*#__PURE__*/ Q(Vr, [["render", Ur]]), Gr = d({
|
|
|
2592
2592
|
},
|
|
2593
2593
|
emits: ["update:value"],
|
|
2594
2594
|
setup(e, { emit: t, expose: n }) {
|
|
2595
|
-
let { t: r } =
|
|
2595
|
+
let { t: r } = W(), i = w([]), a = w("00"), o = w("00"), s = w("00"), c = () => {
|
|
2596
2596
|
a.value = "00", o.value = "00", s.value = "00", t("update:value", "00:00:00");
|
|
2597
2597
|
}, l = () => {
|
|
2598
2598
|
let e = [];
|
|
@@ -2682,7 +2682,7 @@ var Jr = /*#__PURE__*/ Q(Gr, [["render", qr], ["__scopeId", "data-v-ee9b84d6"]])
|
|
|
2682
2682
|
//#endregion
|
|
2683
2683
|
//#region components/hooks/useDebounceFn.ts
|
|
2684
2684
|
function Yr(e, t = 1e3) {
|
|
2685
|
-
let n =
|
|
2685
|
+
let n = Xe(e, t);
|
|
2686
2686
|
return {
|
|
2687
2687
|
run: n,
|
|
2688
2688
|
cancel: n.cancel,
|
|
@@ -2727,7 +2727,7 @@ var Xr = (e, t) => e.map((e, n) => {
|
|
|
2727
2727
|
}), s = async () => {
|
|
2728
2728
|
await h();
|
|
2729
2729
|
let n = r.value?.$el?.querySelector(".n-data-table-tbody");
|
|
2730
|
-
n && a.value?.el !== n && (a.value?.destroy(), a.value =
|
|
2730
|
+
n && a.value?.el !== n && (a.value?.destroy(), a.value = tt.create(n, {
|
|
2731
2731
|
animation: 150,
|
|
2732
2732
|
handle: ".uz-bom-drag-handle",
|
|
2733
2733
|
onMove: ({ dragged: e, related: t }) => {
|
|
@@ -2752,7 +2752,7 @@ var Xr = (e, t) => e.map((e, n) => {
|
|
|
2752
2752
|
align: "center",
|
|
2753
2753
|
render: (e) => o.value.get(e.code) ? f("span", {
|
|
2754
2754
|
class: "uz-bom-drag-handle uz-cursor-pointer uz-select-none",
|
|
2755
|
-
"aria-label":
|
|
2755
|
+
"aria-label": K.global.t("BOM.dragSort")
|
|
2756
2756
|
}, "⠿") : null
|
|
2757
2757
|
},
|
|
2758
2758
|
getSortableRowProps: (e) => ({
|
|
@@ -2838,7 +2838,7 @@ var di = () => new Promise((e) => {
|
|
|
2838
2838
|
let r = t.match(ci);
|
|
2839
2839
|
if (r && t.indexOf("return") === -1) {
|
|
2840
2840
|
let t = r[0].split(":");
|
|
2841
|
-
if (t[0] === "date") return (t) =>
|
|
2841
|
+
if (t[0] === "date") return (t) => At(t[e], r[0].replace("date:", "") || "YYYY-MM-DD");
|
|
2842
2842
|
if (t[0] === "city") return (t) => t[`${e}Str`];
|
|
2843
2843
|
if (t[0] === "modules" && n && Object.keys(n).length > 0) {
|
|
2844
2844
|
let e = r[0].replace("modules:", ""), t = Object.keys(n).find((t) => t.includes(e));
|
|
@@ -2852,7 +2852,7 @@ var di = () => new Promise((e) => {
|
|
|
2852
2852
|
let e = Function("rowData", "rowIndex", "h", t);
|
|
2853
2853
|
return (t, n) => e(t, n, f);
|
|
2854
2854
|
} catch (e) {
|
|
2855
|
-
|
|
2855
|
+
q(e);
|
|
2856
2856
|
}
|
|
2857
2857
|
}
|
|
2858
2858
|
return t && typeof t == "function" ? (e, n) => t(e, n, f) : "";
|
|
@@ -2861,8 +2861,8 @@ var di = () => new Promise((e) => {
|
|
|
2861
2861
|
let r = [], i = t.id;
|
|
2862
2862
|
return e.input === "select" && (e.params.labelKeys || e.search.labelKeys) ? ((e.params.labelKeys || e.search.labelKeys || "").split(",").forEach((e) => {
|
|
2863
2863
|
r.push(t[e]);
|
|
2864
|
-
}), r =
|
|
2865
|
-
label: t?.is_disabled === "1" ? `${r}-${
|
|
2864
|
+
}), r = Ye(r).join("-")) : r = t[n[1]], e.input === "select" && e.params.valueKey && (i = t[e.params.valueKey]), {
|
|
2865
|
+
label: t?.is_disabled === "1" ? `${r}-${K.global.t("Common.disabled")}` : r,
|
|
2866
2866
|
value: i,
|
|
2867
2867
|
disabled: !e.params._search && t?.is_disabled === "1",
|
|
2868
2868
|
params: t
|
|
@@ -2875,14 +2875,14 @@ function hi() {
|
|
|
2875
2875
|
}
|
|
2876
2876
|
async function gi(e, t = !1) {
|
|
2877
2877
|
let n = e.split("."), r = !1;
|
|
2878
|
-
return n.length > 1 && (mi.has(n[0]) && !t ? r =
|
|
2878
|
+
return n.length > 1 && (mi.has(n[0]) && !t ? r = G(mi.get(n[0])) : (r = await Xn({ tableId: n[0] }), mi.set(n[0], r))), {
|
|
2879
2879
|
sourceData: r,
|
|
2880
2880
|
n
|
|
2881
2881
|
};
|
|
2882
2882
|
}
|
|
2883
2883
|
async function _i(e) {
|
|
2884
2884
|
return new Promise((t, n) => {
|
|
2885
|
-
let r =
|
|
2885
|
+
let r = Y(`dynamicTable_${e}`, !1);
|
|
2886
2886
|
r && mi.has(`dynamicTable_${e}`) ? t(r) : Yn(e, r ? r.createTime : null).then((n) => {
|
|
2887
2887
|
if (n) {
|
|
2888
2888
|
let r = {
|
|
@@ -2890,7 +2890,7 @@ async function _i(e) {
|
|
|
2890
2890
|
tableTitle: n.tableTitle,
|
|
2891
2891
|
viewJson: n.viewJson
|
|
2892
2892
|
};
|
|
2893
|
-
|
|
2893
|
+
J(`dynamicTable_${e}`, r, 0), mi.set(`dynamicTable_${e}`, !0), Et("tables_"), t(n);
|
|
2894
2894
|
} else mi.set(`dynamicTable_${e}`, !0), t(r);
|
|
2895
2895
|
}).catch(() => {
|
|
2896
2896
|
n();
|
|
@@ -2899,7 +2899,7 @@ async function _i(e) {
|
|
|
2899
2899
|
}
|
|
2900
2900
|
var vi = (e) => e.map((e) => {
|
|
2901
2901
|
let t = {};
|
|
2902
|
-
return t.z = e.params.placeholder, e.input === "group" ? t.n = e.params.children : t.c = +!!e.params.clearable, e.input === "input" && (e.params.type && (t.t = e.params.type), e.params.minlength && (t.i = e.params.minlength), e.params.maxlength && (t.a = e.params.maxlength), e.params.rows && (t.r = e.params.rows), e.params.prefix && (t.e = e.params.prefix), e.params.suffix && (t.s = e.params.suffix)), e.input === "auto" && (t.o = e.params.options, e.params.prefix && (t.e = e.params.prefix), e.params.suffix && (t.s = e.params.suffix)), e.input === "number" && (t.b = +!!e.params.showButton, e.params.min && (t.i = e.params.min), e.params.max && (t.a = e.params.max), e.params.minKey && (t.x = e.params.minKey), e.params.maxKey && (t.y = e.params.maxKey), e.params.step && (t.t = e.params.step), e.params.precision && (t.p = e.params.precision), e.params.prefix && (t.e = e.params.prefix), e.params.suffix && (t.s = e.params.suffix)), e.input === "date" && (t.y = e.params.type, e.params.format && (t.f = e.params.format), e.params.isDateDisabled && (t.d = e.params.isDateDisabled), e.params.timePickerProps && (t.t = e.params.timePickerProps)), e.input === "select" && (t.o = e.params.options, t.y = e.params.immediately, t.f = +!!e.params.filterable, t.m = +!!e.params.multiple, t.t = +!!e.params.tag, t.l = (e.params.labelKeys || "").replace(/\s*/g, ""), t.v = (e.params.valueKey || "").replace(/\s*/g, ""), t.r = e.params.renderLabel, t.g = e.params.renderTag), e.input === "cascader" && (t.o = e.params.options, t.y = e.params.immediately, t.f = +!!e.params.filterable, t.m = +!!e.params.multiple), e.input === "checkbox" && (t.o = e.params.options), e.input === "time" && (t.f = e.params.format), e.input === "upload" && (t.s = +!!e.params.small, t.a = e.params.accept, t.m = e.params.max), e.input === "switch" && (t.h = e.params.checked, t.u = e.params.unchecked), e.input === "divider" && (t.p = e.params.placement), e.input === "filling" && (t.k = e.params.parentKey), e.input === "subTable" && (t.i = +!!e.params.init, t.q = +!!e.params.quest, t.k = e.params.searchKey, t.l = e.params.link, t.c = e.params.columns, t.a = e.params.actions, t.b = +!!e.params.addButton, t.g = +!!e.params.draggable, t.h = +!!e.params.childActions, t.x = +!!e.params.expandable, t.n = +!!e.params.showActions, t.d = +!!e.params.showDelete, e.params.optionsType && (t.t = e.params.optionsType), e.params.optionsSource && (t.u = e.params.optionsSource), e.params.options && (t.o = e.params.options), e.params.summary && (t.s = e.params.summary), e.params.merge && (t.m = e.params.merge), e.params.deleteFn && (t.f = e.params.deleteFn)), {
|
|
2902
|
+
return t.z = e.params.placeholder, e.input === "group" ? t.n = e.params.children : t.c = +!!e.params.clearable, e.input === "input" && (e.params.type && (t.t = e.params.type), e.params.minlength && (t.i = e.params.minlength), e.params.maxlength && (t.a = e.params.maxlength), e.params.rows && (t.r = e.params.rows), e.params.prefix && (t.e = e.params.prefix), e.params.suffix && (t.s = e.params.suffix)), e.input === "auto" && (t.o = e.params.options, e.params.prefix && (t.e = e.params.prefix), e.params.suffix && (t.s = e.params.suffix)), e.input === "number" && (t.b = +!!e.params.showButton, e.params.min && (t.i = e.params.min), e.params.max && (t.a = e.params.max), e.params.minKey && (t.x = e.params.minKey), e.params.maxKey && (t.y = e.params.maxKey), e.params.step && (t.t = e.params.step), e.params.precision && (t.p = e.params.precision), e.params.prefix && (t.e = e.params.prefix), e.params.suffix && (t.s = e.params.suffix)), e.input === "date" && (t.y = e.params.type, e.params.format && (t.f = e.params.format), e.params.isDateDisabled && (t.d = e.params.isDateDisabled), e.params.timePickerProps && (t.t = e.params.timePickerProps)), e.input === "select" && (t.o = e.params.options, t.y = e.params.immediately, t.f = +!!e.params.filterable, t.m = +!!e.params.multiple, t.t = +!!e.params.tag, t.l = (e.params.labelKeys || "").replace(/\s*/g, ""), t.v = (e.params.valueKey || "").replace(/\s*/g, ""), t.r = e.params.renderLabel, t.g = e.params.renderTag), e.input === "cascader" && (t.o = e.params.options, t.y = e.params.immediately, t.f = +!!e.params.filterable, t.m = +!!e.params.multiple), e.input === "checkbox" && (t.o = e.params.options), e.input === "time" && (t.f = e.params.format), e.input === "upload" && (t.s = +!!e.params.small, t.a = e.params.accept, t.m = e.params.max), e.input === "switch" && (t.h = e.params.checked, t.u = e.params.unchecked), e.input === "divider" && (t.p = e.params.placement), e.input === "filling" && (t.k = e.params.parentKey), e.input === "bom" && (t.x = +!!e.params.expandable), e.input === "subTable" && (t.i = +!!e.params.init, t.q = +!!e.params.quest, t.k = e.params.searchKey, t.l = e.params.link, t.c = e.params.columns, t.a = e.params.actions, t.b = +!!e.params.addButton, t.g = +!!e.params.draggable, t.h = +!!e.params.childActions, t.x = +!!e.params.expandable, t.n = +!!e.params.showActions, t.d = +!!e.params.showDelete, e.params.optionsType && (t.t = e.params.optionsType), e.params.optionsSource && (t.u = e.params.optionsSource), e.params.options && (t.o = e.params.options), e.params.summary && (t.s = e.params.summary), e.params.merge && (t.m = e.params.merge), e.params.deleteFn && (t.f = e.params.deleteFn)), {
|
|
2903
2903
|
i: e.input,
|
|
2904
2904
|
l: e.label ? encodeURIComponent(e.label) : "",
|
|
2905
2905
|
k: e.key.replace(/\s*/g, ""),
|
|
@@ -2974,7 +2974,7 @@ var vi = (e) => e.map((e) => {
|
|
|
2974
2974
|
};
|
|
2975
2975
|
}), yi = (e) => !e[0] || e[0] && e[0].input ? e : e.map((e) => {
|
|
2976
2976
|
let t = {};
|
|
2977
|
-
return t.placeholder = e.p.z, e.i === "group" ? t.children = e.p.n : t.clearable = !!e.p.c, e.i === "input" && (e.p.t && (t.type = e.p.t), e.p.i && (t.minlength = e.p.i), e.p.a && (t.maxlength = e.p.a), e.p.r && (t.rows = e.p.r), e.p.e && (t.prefix = e.p.e), e.p.s && (t.suffix = e.p.s)), e.i === "auto" && (t.options = e.p.o, e.p.e && (t.prefix = e.p.e), e.p.s && (t.suffix = e.p.s)), e.i === "number" && (t.showButton = !!e.p.b, e.p.i && (t.min = e.p.i), e.p.a && (t.max = e.p.a), e.p.x && (t.minKey = e.p.x), e.p.y && (t.maxKey = e.p.y), e.p.t && (t.step = e.p.t), e.p.p && (t.precision = e.p.p), e.p.e && (t.prefix = e.p.e), e.p.s && (t.suffix = e.p.s)), e.i === "date" && (t.type = e.p.y, e.p.f && (t.format = e.p.f), e.p.d && (t.isDateDisabled = e.p.d), e.p.t && (t.timePickerProps = e.p.t)), e.i === "select" && (t.options = e.p.o, t.immediately = e.p.y, t.filterable = !!e.p.f, t.multiple = !!e.p.m, t.tag = !!e.p.t, t.labelKeys = e.p.l, t.valueKey = e.p.v, t.renderLabel = e.p.r, t.renderTag = e.p.g), e.i === "cascader" && (t.options = e.p.o, t.immediately = e.p.y, t.filterable = !!e.p.f, t.multiple = !!e.p.m), e.i === "checkbox" && (t.options = e.p.o), e.i === "time" && (t.format = e.p.f), e.i === "upload" && (t.small = !!e.p.s, t.accept = e.p.a, t.max = e.p.m), e.i === "switch" && (t.checked = e.p.h, t.unchecked = e.p.u), e.i === "divider" && (t.placement = e.p.p), e.i === "filling" && (t.parentKey = e.p.k), e.i === "subTable" && (t.init = !!e.p.i, t.quest = !!e.p.q, t.searchKey = e.p.k, t.link = e.p.l, t.columns = e.p.c, t.actions = e.p.a, t.addButton = !!e.p.b, t.draggable = !!e.p.g, t.childActions = !!e.p.h, t.showActions = !!e.p.n, t.showDelete = !!(e.p.d ?? !0), t.expandable = !!e.p.x, e.p.t && (t.optionsType = e.p.t), e.p.u && (t.optionsSource = e.p.u), e.p.o && (t.options = e.p.o), e.p.s && (t.summary = e.p.s), e.p.m && (t.merge = e.p.m), e.p.f && (t.deleteFn = e.p.f)), {
|
|
2977
|
+
return t.placeholder = e.p.z, e.i === "group" ? t.children = e.p.n : t.clearable = !!e.p.c, e.i === "input" && (e.p.t && (t.type = e.p.t), e.p.i && (t.minlength = e.p.i), e.p.a && (t.maxlength = e.p.a), e.p.r && (t.rows = e.p.r), e.p.e && (t.prefix = e.p.e), e.p.s && (t.suffix = e.p.s)), e.i === "auto" && (t.options = e.p.o, e.p.e && (t.prefix = e.p.e), e.p.s && (t.suffix = e.p.s)), e.i === "number" && (t.showButton = !!e.p.b, e.p.i && (t.min = e.p.i), e.p.a && (t.max = e.p.a), e.p.x && (t.minKey = e.p.x), e.p.y && (t.maxKey = e.p.y), e.p.t && (t.step = e.p.t), e.p.p && (t.precision = e.p.p), e.p.e && (t.prefix = e.p.e), e.p.s && (t.suffix = e.p.s)), e.i === "date" && (t.type = e.p.y, e.p.f && (t.format = e.p.f), e.p.d && (t.isDateDisabled = e.p.d), e.p.t && (t.timePickerProps = e.p.t)), e.i === "select" && (t.options = e.p.o, t.immediately = e.p.y, t.filterable = !!e.p.f, t.multiple = !!e.p.m, t.tag = !!e.p.t, t.labelKeys = e.p.l, t.valueKey = e.p.v, t.renderLabel = e.p.r, t.renderTag = e.p.g), e.i === "cascader" && (t.options = e.p.o, t.immediately = e.p.y, t.filterable = !!e.p.f, t.multiple = !!e.p.m), e.i === "checkbox" && (t.options = e.p.o), e.i === "time" && (t.format = e.p.f), e.i === "upload" && (t.small = !!e.p.s, t.accept = e.p.a, t.max = e.p.m), e.i === "switch" && (t.checked = e.p.h, t.unchecked = e.p.u), e.i === "divider" && (t.placement = e.p.p), e.i === "filling" && (t.parentKey = e.p.k), e.i === "bom" && (t.expandable = !!e.p.x), e.i === "subTable" && (t.init = !!e.p.i, t.quest = !!e.p.q, t.searchKey = e.p.k, t.link = e.p.l, t.columns = e.p.c, t.actions = e.p.a, t.addButton = !!e.p.b, t.draggable = !!e.p.g, t.childActions = !!e.p.h, t.showActions = !!e.p.n, t.showDelete = !!(e.p.d ?? !0), t.expandable = !!e.p.x, e.p.t && (t.optionsType = e.p.t), e.p.u && (t.optionsSource = e.p.u), e.p.o && (t.options = e.p.o), e.p.s && (t.summary = e.p.s), e.p.m && (t.merge = e.p.m), e.p.f && (t.deleteFn = e.p.f)), {
|
|
2978
2978
|
input: e.i,
|
|
2979
2979
|
label: e.l ? decodeURIComponent(e.l) : "",
|
|
2980
2980
|
key: e.k,
|
|
@@ -3051,17 +3051,20 @@ var vi = (e) => e.map((e) => {
|
|
|
3051
3051
|
f: e.fetch,
|
|
3052
3052
|
n: e.fetchFn,
|
|
3053
3053
|
o: e.when_drawer_open,
|
|
3054
|
-
b: e.when_before_save
|
|
3054
|
+
b: e.when_before_save,
|
|
3055
|
+
a: e.when_after_save
|
|
3055
3056
|
}), xi = (e) => e ? e.fetch ? e : {
|
|
3056
3057
|
fetch: e.f,
|
|
3057
3058
|
fetchFn: e.n,
|
|
3058
3059
|
when_drawer_open: e.o,
|
|
3059
|
-
when_before_save: e.b
|
|
3060
|
+
when_before_save: e.b,
|
|
3061
|
+
when_after_save: e.a
|
|
3060
3062
|
} : {
|
|
3061
3063
|
fetch: null,
|
|
3062
3064
|
fetchFn: "",
|
|
3063
3065
|
when_drawer_open: "",
|
|
3064
|
-
when_before_save: ""
|
|
3066
|
+
when_before_save: "",
|
|
3067
|
+
when_after_save: ""
|
|
3065
3068
|
}, Si = (e) => ({
|
|
3066
3069
|
i: e.index,
|
|
3067
3070
|
s: e.selection,
|
|
@@ -3096,11 +3099,11 @@ var vi = (e) => e.map((e) => {
|
|
|
3096
3099
|
drawerHeight: e.h,
|
|
3097
3100
|
placement: e.l,
|
|
3098
3101
|
summary: e.r
|
|
3099
|
-
}), Object.assign({}, li,
|
|
3102
|
+
}), Object.assign({}, li, G(t));
|
|
3100
3103
|
};
|
|
3101
3104
|
function wi(e, t, n, r) {
|
|
3102
3105
|
let i = async (i, a) => {
|
|
3103
|
-
let o = [], s = {}, c = {}, l = {}, u = [], d = [], f =
|
|
3106
|
+
let o = [], s = {}, c = {}, l = {}, u = [], d = [], f = G(e), p = [];
|
|
3104
3107
|
for (let e of f) e.input === "group" ? p.push(...e.params.children) : p.push(e);
|
|
3105
3108
|
for (let e of p) {
|
|
3106
3109
|
if (e.source && (e.input === "select" || e.input === "cascader")) {
|
|
@@ -3123,12 +3126,12 @@ function wi(e, t, n, r) {
|
|
|
3123
3126
|
params: {}
|
|
3124
3127
|
});
|
|
3125
3128
|
n.push({
|
|
3126
|
-
label:
|
|
3129
|
+
label: K.global.t("Common.loading"),
|
|
3127
3130
|
value: "loading",
|
|
3128
3131
|
disabled: !0
|
|
3129
3132
|
});
|
|
3130
3133
|
} else n = [{
|
|
3131
|
-
label:
|
|
3134
|
+
label: K.global.t("Common.loading"),
|
|
3132
3135
|
value: "loading",
|
|
3133
3136
|
disabled: !0
|
|
3134
3137
|
}];
|
|
@@ -3166,19 +3169,19 @@ function wi(e, t, n, r) {
|
|
|
3166
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);
|
|
3167
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);
|
|
3168
3171
|
} catch (e) {
|
|
3169
|
-
|
|
3172
|
+
q(e);
|
|
3170
3173
|
}
|
|
3171
3174
|
if (e.input !== "divider" && e.form.rule && e.form.rule.validator && typeof e.form.rule.validator == "string") try {
|
|
3172
3175
|
let t = e.form.rule.validator, r = Function("rule", "value", "index", "formValues", t);
|
|
3173
3176
|
e.form.rule.validator = (e, t) => r(e, t, null, n);
|
|
3174
3177
|
} catch (e) {
|
|
3175
|
-
|
|
3178
|
+
q(e);
|
|
3176
3179
|
}
|
|
3177
3180
|
if (e.input === "date" && e.params.isDateDisabled && typeof e.params.isDateDisabled == "string") try {
|
|
3178
3181
|
let t = e.params.isDateDisabled, n = Function("ts", "detail", t);
|
|
3179
3182
|
e.params.isDateDisabled = (e, t) => n(e, t);
|
|
3180
3183
|
} catch (e) {
|
|
3181
|
-
|
|
3184
|
+
q(e);
|
|
3182
3185
|
}
|
|
3183
3186
|
if (e.input === "cascader" && e.table.render === "[city]") {
|
|
3184
3187
|
let t = await di();
|
|
@@ -3189,7 +3192,7 @@ function wi(e, t, n, r) {
|
|
|
3189
3192
|
a();
|
|
3190
3193
|
});
|
|
3191
3194
|
if (t) try {
|
|
3192
|
-
let n =
|
|
3195
|
+
let n = et.parse(t.viewJson);
|
|
3193
3196
|
n.suffix && (e._suffix = vr(n.suffix));
|
|
3194
3197
|
let r = yi(n.table);
|
|
3195
3198
|
r.forEach((e) => {
|
|
@@ -3201,7 +3204,7 @@ function wi(e, t, n, r) {
|
|
|
3201
3204
|
a();
|
|
3202
3205
|
});
|
|
3203
3206
|
if (t) try {
|
|
3204
|
-
let n =
|
|
3207
|
+
let n = et.parse(t.viewJson), r = yi(n.table);
|
|
3205
3208
|
r.forEach((e) => {
|
|
3206
3209
|
e.table.sorter = !1;
|
|
3207
3210
|
}), e.params.columns = r, e.params.actions = n.action;
|
|
@@ -3243,7 +3246,7 @@ async function Ti(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3243
3246
|
key: "",
|
|
3244
3247
|
link: "",
|
|
3245
3248
|
merge: ""
|
|
3246
|
-
}, d = [], p =
|
|
3249
|
+
}, d = [], p = G(e), m = [], h = [];
|
|
3247
3250
|
for (let e of p) e.input === "group" ? (m.push(...e.params.children), h.push({
|
|
3248
3251
|
title: e.label,
|
|
3249
3252
|
key: e.key,
|
|
@@ -3261,7 +3264,7 @@ async function Ti(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3261
3264
|
} else s.params.options = pi(s, t, n);
|
|
3262
3265
|
}
|
|
3263
3266
|
} else s.params.options = [{
|
|
3264
|
-
label:
|
|
3267
|
+
label: K.global.t("Common.loading"),
|
|
3265
3268
|
value: "loading",
|
|
3266
3269
|
disabled: !0
|
|
3267
3270
|
}], s.params._async = !0, s.params._fetch = !1, s.params._asyncFn = async () => {
|
|
@@ -3295,20 +3298,20 @@ async function Ti(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3295
3298
|
"line-clamp": s.table.clamp ?? 0
|
|
3296
3299
|
} : !1,
|
|
3297
3300
|
render: s.table.render ? await fi(s.key, s.table.render, i) : void 0,
|
|
3298
|
-
show:
|
|
3301
|
+
show: X.isMobile ? s.table.mobile ?? !1 : s.table.show ?? !0,
|
|
3299
3302
|
pin: !!s.table.fixed,
|
|
3300
3303
|
fixTemp: s.table.fixed
|
|
3301
3304
|
};
|
|
3302
3305
|
if (p.resizable && (p.minWidth = 80), t) {
|
|
3303
3306
|
if (!p.form.edit.show) p = null;
|
|
3304
3307
|
else {
|
|
3305
|
-
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") {
|
|
3306
3309
|
delete s.form.rule.message;
|
|
3307
3310
|
let e = s.form.rule.validator, t = Function("rule", "value", "index", "formValues", e);
|
|
3308
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());
|
|
3309
3312
|
}
|
|
3310
3313
|
p.render = function(e, t) {
|
|
3311
|
-
return f(
|
|
3314
|
+
return f(pe, {
|
|
3312
3315
|
showLabel: !1,
|
|
3313
3316
|
showFeedback: !1,
|
|
3314
3317
|
path: `child[${t}].${s.key}`,
|
|
@@ -3348,7 +3351,7 @@ async function Ti(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3348
3351
|
};
|
|
3349
3352
|
}
|
|
3350
3353
|
if (s.search.multiple && (s.params.multiple = !0, s.search.defaultValue && (s.search.defaultValue = ui(s.search.defaultValue))), s.search.show) {
|
|
3351
|
-
let e =
|
|
3354
|
+
let e = G(s);
|
|
3352
3355
|
e.params._async && (e.params._search = !0, e.params._asyncFn = async () => {
|
|
3353
3356
|
let { sourceData: t, n } = await gi(e.source || e.search.source);
|
|
3354
3357
|
if (t && Array.isArray(t)) {
|
|
@@ -3374,7 +3377,11 @@ async function Ti(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3374
3377
|
});
|
|
3375
3378
|
}
|
|
3376
3379
|
}
|
|
3377
|
-
s.input === "
|
|
3380
|
+
s.input === "bom" && s.params.expandable && (u = {
|
|
3381
|
+
key: s.key,
|
|
3382
|
+
link: "",
|
|
3383
|
+
merge: ""
|
|
3384
|
+
}), s.input === "subTable" && s.params.link && !s.params.quest && (l.push(s.params.link), s.params.expandable && (u = {
|
|
3378
3385
|
key: s.key,
|
|
3379
3386
|
link: s.params.link,
|
|
3380
3387
|
merge: s.params.merge
|
|
@@ -3410,16 +3417,16 @@ async function Ti(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3410
3417
|
}
|
|
3411
3418
|
//#endregion
|
|
3412
3419
|
//#region components/bom/index.vue?vue&type=script&lang.ts
|
|
3413
|
-
var Ei = [
|
|
3420
|
+
var Ei = (e) => e.key === "product_no" || e.key === "product_name" || typeof e.title == "string" && e.title.includes("物料"), Di = [
|
|
3414
3421
|
"var(--primary)",
|
|
3415
3422
|
"var(--green)",
|
|
3416
3423
|
"var(--yellow)",
|
|
3417
3424
|
"var(--purple)"
|
|
3418
|
-
],
|
|
3425
|
+
], Oi = d({
|
|
3419
3426
|
name: "UzBom",
|
|
3420
3427
|
components: {
|
|
3421
|
-
NDataTable:
|
|
3422
|
-
NForm:
|
|
3428
|
+
NDataTable: ae,
|
|
3429
|
+
NForm: fe
|
|
3423
3430
|
},
|
|
3424
3431
|
props: {
|
|
3425
3432
|
value: {
|
|
@@ -3442,11 +3449,14 @@ var Ei = [
|
|
|
3442
3449
|
},
|
|
3443
3450
|
emits: ["update:value"],
|
|
3444
3451
|
setup(e, { emit: t, expose: r }) {
|
|
3445
|
-
let i = p("mainFormValue"), { t: a } =
|
|
3452
|
+
let i = p("mainFormValue"), { t: a } = W(), o = w(null), s = w([]), c = () => {
|
|
3453
|
+
let e = i?.value?.()?.ticket_counts;
|
|
3454
|
+
return e == null || e === "" ? 1 : e;
|
|
3455
|
+
}, l = (e, t, n) => n ? `${n}-${t + 1}` : String(e.operation_no || e.product_no || e.code || t + 1), u = (e, t = 1, n, r) => (e ?? []).map((e, t) => ({
|
|
3446
3456
|
row: e,
|
|
3447
3457
|
index: t
|
|
3448
3458
|
})).sort((e, t) => (typeof e.row.sort_index == "number" && Number.isFinite(e.row.sort_index) ? e.row.sort_index : Number.isFinite(e.row.sort) ? e.row.sort : e.index) - (typeof t.row.sort_index == "number" && Number.isFinite(t.row.sort_index) ? t.row.sort_index : Number.isFinite(t.row.sort) ? t.row.sort : t.index)).map(({ row: e }, i) => {
|
|
3449
|
-
let a = l(e, i, n), o = e.children, s = ti(e), d = t === 1 ? c(
|
|
3459
|
+
let a = l(e, i, n), o = e.children, s = ti(e), d = t === 1 ? c() : ni(s, r);
|
|
3450
3460
|
return {
|
|
3451
3461
|
...e,
|
|
3452
3462
|
required_quantity: s,
|
|
@@ -3482,45 +3492,49 @@ var Ei = [
|
|
|
3482
3492
|
(n.length !== m.value.length || n.some((e, t) => e !== m.value[t])) && (m.value = n);
|
|
3483
3493
|
}, { run: T, flush: E, cancel: D } = Yr(() => {
|
|
3484
3494
|
b(d.value), C();
|
|
3485
|
-
}, 200), O = /* @__PURE__ */ new WeakMap(), k = (e,
|
|
3486
|
-
let
|
|
3487
|
-
|
|
3488
|
-
let
|
|
3489
|
-
if (
|
|
3490
|
-
let
|
|
3495
|
+
}, 200), O = /* @__PURE__ */ new WeakMap(), k = (e, n) => {
|
|
3496
|
+
let r = O.get(e);
|
|
3497
|
+
r || (r = /* @__PURE__ */ new Map(), O.set(e, r));
|
|
3498
|
+
let i = r.get(n.key);
|
|
3499
|
+
if (i) return i;
|
|
3500
|
+
let a = new Proxy(e, {
|
|
3491
3501
|
get(e, t, n) {
|
|
3492
3502
|
return t === "required_quantity" ? ti(e) : Reflect.get(e, t, n);
|
|
3493
3503
|
},
|
|
3494
|
-
set(e,
|
|
3495
|
-
let
|
|
3496
|
-
if (
|
|
3497
|
-
let
|
|
3498
|
-
|
|
3504
|
+
set(e, r, i) {
|
|
3505
|
+
let a = Reflect.get(e, r) !== i, o = Reflect.set(e, r, i);
|
|
3506
|
+
if (a && (r === "quantity" || r === "lossRate") && Reflect.set(e, "required_quantity", ti(e)), a && (r === "quantity" || r === "lossRate" || r === "counts") && d.value.forEach((e) => ri(Array.isArray(e.children) ? e.children : [], e.counts)), a && r === n.key && Ei(n)) {
|
|
3507
|
+
let t = si(n.params?.options, i);
|
|
3508
|
+
t !== void 0 && (Reflect.set(e, "operation_no", t), Number(e.level) === 1 && Reflect.set(e, "code", t)), (t !== void 0 || r === "product_no") && (T(), t !== void 0 && E());
|
|
3499
3509
|
}
|
|
3500
|
-
return a;
|
|
3510
|
+
return a && o && t("update:value", d.value), o;
|
|
3501
3511
|
}
|
|
3502
3512
|
});
|
|
3503
|
-
return
|
|
3513
|
+
return r.set(n.key, a), a;
|
|
3504
3514
|
}, A = () => {
|
|
3505
|
-
let e = /* @__PURE__ */ new Set(), t = (n) => {
|
|
3506
|
-
|
|
3507
|
-
e.add(_(
|
|
3508
|
-
let
|
|
3509
|
-
Array.isArray(
|
|
3515
|
+
let e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), n = (r) => {
|
|
3516
|
+
r.forEach((r) => {
|
|
3517
|
+
e.add(_(r)), t.add(r.code);
|
|
3518
|
+
let i = r.children;
|
|
3519
|
+
Array.isArray(i) && n(i);
|
|
3510
3520
|
});
|
|
3511
3521
|
};
|
|
3512
|
-
|
|
3513
|
-
let
|
|
3522
|
+
n(d.value);
|
|
3523
|
+
let r;
|
|
3514
3524
|
do
|
|
3515
|
-
|
|
3516
|
-
while (e.has(
|
|
3525
|
+
r = crypto.randomUUID();
|
|
3526
|
+
while (e.has(r));
|
|
3527
|
+
let i;
|
|
3528
|
+
do
|
|
3529
|
+
i = `NEW-${String(g).padStart(4, "0")}`, g += 1;
|
|
3530
|
+
while (t.has(i));
|
|
3517
3531
|
return {
|
|
3518
|
-
key:
|
|
3532
|
+
key: r,
|
|
3519
3533
|
level: 1,
|
|
3520
|
-
code:
|
|
3534
|
+
code: i,
|
|
3521
3535
|
sort: 0,
|
|
3522
3536
|
sort_index: 0,
|
|
3523
|
-
product_no:
|
|
3537
|
+
product_no: i,
|
|
3524
3538
|
product_name: "",
|
|
3525
3539
|
status: 0,
|
|
3526
3540
|
procurement: "0",
|
|
@@ -3567,8 +3581,8 @@ var Ei = [
|
|
|
3567
3581
|
} : r), e;
|
|
3568
3582
|
}, []);
|
|
3569
3583
|
j(n(d.value));
|
|
3570
|
-
},
|
|
3571
|
-
title: () => f(
|
|
3584
|
+
}, z = {
|
|
3585
|
+
title: () => f(ue, {
|
|
3572
3586
|
trigger: "click",
|
|
3573
3587
|
options: [{
|
|
3574
3588
|
label: a("Common.expand"),
|
|
@@ -3590,7 +3604,7 @@ var Ei = [
|
|
|
3590
3604
|
fixed: "left",
|
|
3591
3605
|
tree: !0,
|
|
3592
3606
|
ellipsis: { tooltip: !0 }
|
|
3593
|
-
},
|
|
3607
|
+
}, re = {
|
|
3594
3608
|
title: a("Common.action"),
|
|
3595
3609
|
key: "actions",
|
|
3596
3610
|
width: 240,
|
|
@@ -3625,35 +3639,48 @@ var Ei = [
|
|
|
3625
3639
|
secondary: !0
|
|
3626
3640
|
}
|
|
3627
3641
|
})
|
|
3628
|
-
},
|
|
3642
|
+
}, B = n(() => Number(e.status) === 2 ? s.value.filter((e) => e.key !== "actions") : s.value), ie = n(() => B.value.reduce((e, t) => {
|
|
3629
3643
|
let n = "width" in t ? Number(t.width) : 120;
|
|
3630
3644
|
return e + (Number.isFinite(n) ? n : 120);
|
|
3631
|
-
}, 0)),
|
|
3645
|
+
}, 0)), ae = (e) => {
|
|
3632
3646
|
S(e);
|
|
3633
|
-
},
|
|
3647
|
+
}, oe = (e) => {
|
|
3634
3648
|
let t = Math.trunc(Number(e.level));
|
|
3635
3649
|
if (!Number.isFinite(t) || t < 1) return null;
|
|
3636
3650
|
let n = (t - 1) % 4 + 1, r = Math.floor((t - 1) / 4);
|
|
3637
3651
|
return {
|
|
3638
|
-
color:
|
|
3652
|
+
color: Di[n - 1],
|
|
3639
3653
|
strength: `${Math.min(10 + r * 5, 40)}%`
|
|
3640
3654
|
};
|
|
3655
|
+
}, se = (e) => {
|
|
3656
|
+
let t = oe(e);
|
|
3657
|
+
return {
|
|
3658
|
+
...P(e),
|
|
3659
|
+
...t ? { style: `--uz-bom-level-color: ${t.color}; --uz-bom-level-strength: ${t.strength}` } : {}
|
|
3660
|
+
};
|
|
3661
|
+
}, ce = (t) => {
|
|
3662
|
+
if (!t.form.display) switch (e.status) {
|
|
3663
|
+
case 0: return t.form.create && t.form.create.show;
|
|
3664
|
+
case 1: return t.form.edit && t.form.edit.show;
|
|
3665
|
+
case 2: return t.form.show;
|
|
3666
|
+
}
|
|
3641
3667
|
};
|
|
3642
|
-
return M(() => i?.value?.()?.ticket_counts, (
|
|
3643
|
-
|
|
3668
|
+
return M(() => i?.value?.()?.ticket_counts, () => {
|
|
3669
|
+
let e = c();
|
|
3670
|
+
d.value.forEach((t) => {
|
|
3644
3671
|
t.counts = e, ri(Array.isArray(t.children) ? t.children : [], e);
|
|
3645
|
-
});
|
|
3646
|
-
}), M(() => e.value, (e) => {
|
|
3647
|
-
e !== d.value && (D(), d.value = ee(e),
|
|
3672
|
+
}), t("update:value", d.value);
|
|
3673
|
+
}, { immediate: !0 }), M(() => e.value, (e) => {
|
|
3674
|
+
e !== d.value && (D(), d.value = ee(e), t("update:value", d.value));
|
|
3648
3675
|
}), M(d, () => C(), { immediate: !0 }), y(async () => {
|
|
3649
3676
|
e.value?.length || t("update:value", d.value);
|
|
3650
3677
|
let n = await Jn("bom_col");
|
|
3651
|
-
n =
|
|
3652
|
-
let { tableColumns: r } = await Ti(n), i = r.filter((e) => e
|
|
3678
|
+
n = et.parse(n.viewJson), n = yi(n.table);
|
|
3679
|
+
let { tableColumns: r } = await Ti(n), i = r.filter((e) => ce(e)).map((t) => ({
|
|
3653
3680
|
title: t.title,
|
|
3654
3681
|
key: t.key,
|
|
3655
3682
|
width: t.width ?? 120,
|
|
3656
|
-
render: (n, r) => f(
|
|
3683
|
+
render: (n, r) => f(pe, {
|
|
3657
3684
|
showLabel: !1,
|
|
3658
3685
|
showFeedback: !1,
|
|
3659
3686
|
path: `child[${r}].${t.key}`,
|
|
@@ -3671,9 +3698,9 @@ var Ei = [
|
|
|
3671
3698
|
}));
|
|
3672
3699
|
s.value = [
|
|
3673
3700
|
N,
|
|
3674
|
-
|
|
3701
|
+
z,
|
|
3675
3702
|
...i,
|
|
3676
|
-
|
|
3703
|
+
re
|
|
3677
3704
|
];
|
|
3678
3705
|
}), r({ validate: async () => (await o.value?.validate(), d.value) }), v(D), {
|
|
3679
3706
|
t: a,
|
|
@@ -3681,28 +3708,22 @@ var Ei = [
|
|
|
3681
3708
|
innerData: d,
|
|
3682
3709
|
tableRef: F,
|
|
3683
3710
|
tableVersion: te,
|
|
3684
|
-
displayedTableCols:
|
|
3685
|
-
displayedScrollX:
|
|
3711
|
+
displayedTableCols: B,
|
|
3712
|
+
displayedScrollX: ie,
|
|
3686
3713
|
innerExpandedRowKeys: m,
|
|
3687
3714
|
getRowKey: _,
|
|
3688
|
-
getRowProps:
|
|
3689
|
-
|
|
3690
|
-
return {
|
|
3691
|
-
...P(e),
|
|
3692
|
-
...t ? { style: `--uz-bom-level-color: ${t.color}; --uz-bom-level-strength: ${t.strength}` } : {}
|
|
3693
|
-
};
|
|
3694
|
-
},
|
|
3695
|
-
handleExpandedRowKeysChange: oe
|
|
3715
|
+
getRowProps: se,
|
|
3716
|
+
handleExpandedRowKeysChange: ae
|
|
3696
3717
|
};
|
|
3697
3718
|
}
|
|
3698
|
-
}),
|
|
3719
|
+
}), ki = { class: "uz-bom uz-flex-1 uz-w-full" }, Ai = { class: "uz-flex uz-flex-col uz-justify-between" }, ji = { class: "uz-com-title" }, Mi = {
|
|
3699
3720
|
key: 0,
|
|
3700
3721
|
class: "uz-table-asterisk"
|
|
3701
3722
|
};
|
|
3702
|
-
function
|
|
3723
|
+
function Ni(e, t, n, s, u, d) {
|
|
3703
3724
|
let f = D("NDataTable"), p = D("NForm");
|
|
3704
|
-
return x(), a("div",
|
|
3705
|
-
o("div",
|
|
3725
|
+
return x(), a("div", ki, [o("div", Ai, [
|
|
3726
|
+
o("div", ji, [c(A(e.item.label) + " ", 1), e.item.form?.rule.required ? (x(), a("span", Mi, " \xA0* ")) : i("", !0)]),
|
|
3706
3727
|
t[0] ||= o("div", { class: "uz-br" }, null, -1),
|
|
3707
3728
|
l(p, {
|
|
3708
3729
|
ref: "formRef",
|
|
@@ -3744,13 +3765,13 @@ function Mi(e, t, n, s, u, d) {
|
|
|
3744
3765
|
}, 8, ["model"])
|
|
3745
3766
|
])]);
|
|
3746
3767
|
}
|
|
3747
|
-
var
|
|
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) => {
|
|
3748
3769
|
let i = r * Math.PI / 180;
|
|
3749
3770
|
return {
|
|
3750
3771
|
x: e + n * Math.cos(i),
|
|
3751
3772
|
y: t + n * Math.sin(i)
|
|
3752
3773
|
};
|
|
3753
|
-
},
|
|
3774
|
+
}, Xi = ({ x: e, y: t }) => `${e.toFixed(3)} ${t.toFixed(3)}`, Zi = (e, t, n, r, i, a) => {
|
|
3754
3775
|
if (a <= 0) return "";
|
|
3755
3776
|
let o = n + r / 2, s = n - r / 2;
|
|
3756
3777
|
if (a >= 359.999) {
|
|
@@ -3762,16 +3783,16 @@ var Ni = /*#__PURE__*/ Q(Di, [["render", Mi]]), Pi = 46, Fi = 8, Ii = 2 * Math.P
|
|
|
3762
3783
|
`A ${s} ${s} 0 1 0 ${i}`
|
|
3763
3784
|
].join(" ");
|
|
3764
3785
|
}
|
|
3765
|
-
let c = i + a, l =
|
|
3786
|
+
let c = i + a, l = Yi(e, t, o, i), u = Yi(e, t, o, c), d = Yi(e, t, s, c), f = Yi(e, t, s, i), p = r / 2, m = +(a > 180);
|
|
3766
3787
|
return [
|
|
3767
|
-
`M ${
|
|
3768
|
-
`A ${o} ${o} 0 ${m} 1 ${
|
|
3769
|
-
`A ${p} ${p} 0 0 1 ${
|
|
3770
|
-
`A ${s} ${s} 0 ${m} 0 ${
|
|
3771
|
-
`A ${p} ${p} 0 0 1 ${
|
|
3788
|
+
`M ${Xi(l)}`,
|
|
3789
|
+
`A ${o} ${o} 0 ${m} 1 ${Xi(u)}`,
|
|
3790
|
+
`A ${p} ${p} 0 0 1 ${Xi(d)}`,
|
|
3791
|
+
`A ${s} ${s} 0 ${m} 0 ${Xi(f)}`,
|
|
3792
|
+
`A ${p} ${p} 0 0 1 ${Xi(l)}`,
|
|
3772
3793
|
"Z"
|
|
3773
3794
|
].join(" ");
|
|
3774
|
-
},
|
|
3795
|
+
}, Qi = (e) => {
|
|
3775
3796
|
if (!e) return "";
|
|
3776
3797
|
let t = e.toLowerCase();
|
|
3777
3798
|
if (t.length > 6 && (t = t.substring(0, 7)), t && /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)) {
|
|
@@ -3785,9 +3806,9 @@ var Ni = /*#__PURE__*/ Q(Di, [["render", Mi]]), Pi = 46, Fi = 8, Ii = 2 * Math.P
|
|
|
3785
3806
|
return e.join(",");
|
|
3786
3807
|
}
|
|
3787
3808
|
return "0,0,0";
|
|
3788
|
-
},
|
|
3809
|
+
}, $i = d({
|
|
3789
3810
|
name: "UzCircle",
|
|
3790
|
-
components: { UzNumberFlow:
|
|
3811
|
+
components: { UzNumberFlow: nt },
|
|
3791
3812
|
props: {
|
|
3792
3813
|
circle: {
|
|
3793
3814
|
required: !0,
|
|
@@ -3808,10 +3829,10 @@ var Ni = /*#__PURE__*/ Q(Di, [["render", Mi]]), Pi = 46, Fi = 8, Ii = 2 * Math.P
|
|
|
3808
3829
|
}
|
|
3809
3830
|
},
|
|
3810
3831
|
setup(e) {
|
|
3811
|
-
let t = ee(), r = `uz-blurs-${t}`, i = n(() => `rgba(${
|
|
3832
|
+
let t = ee(), r = `uz-blurs-${t}`, i = n(() => `rgba(${Qi(e.color).split(",").map((e) => {
|
|
3812
3833
|
let t = Number(e) - 50;
|
|
3813
3834
|
return t < 0 && (t = 0), t;
|
|
3814
|
-
})},1)`), a = n(() => `rgba(${
|
|
3835
|
+
})},1)`), a = n(() => `rgba(${Qi(e.color)},1)`), o = n(() => {
|
|
3815
3836
|
let t = Number(e.circle);
|
|
3816
3837
|
return Number.isFinite(t) ? Math.min(100, Math.max(0, t)) : 0;
|
|
3817
3838
|
}), s = w(o.value), c;
|
|
@@ -3830,62 +3851,62 @@ var Ni = /*#__PURE__*/ Q(Di, [["render", Mi]]), Pi = 46, Fi = 8, Ii = 2 * Math.P
|
|
|
3830
3851
|
c !== void 0 && cancelAnimationFrame(c);
|
|
3831
3852
|
});
|
|
3832
3853
|
let l = n(() => {
|
|
3833
|
-
let e =
|
|
3854
|
+
let e = Li * (s.value / 100), t = Li - e;
|
|
3834
3855
|
if (e === 0) return {
|
|
3835
3856
|
activeLength: 0,
|
|
3836
3857
|
activeStart: 0,
|
|
3837
|
-
remainingLength:
|
|
3858
|
+
remainingLength: Li,
|
|
3838
3859
|
remainingStart: 0
|
|
3839
3860
|
};
|
|
3840
3861
|
if (t === 0) return {
|
|
3841
|
-
activeLength:
|
|
3862
|
+
activeLength: Li,
|
|
3842
3863
|
activeStart: 0,
|
|
3843
3864
|
remainingLength: 0,
|
|
3844
3865
|
remainingStart: 0
|
|
3845
3866
|
};
|
|
3846
|
-
let n = Math.min(1, Math.min(e, t) /
|
|
3867
|
+
let n = Math.min(1, Math.min(e, t) / zi), r = Ri + 3 * n, i = Ii * n, a = e < zi ? i : Li - (t < zi ? i : t - r) - r * 2, o = Li - a - r * 2;
|
|
3847
3868
|
return {
|
|
3848
3869
|
activeLength: a,
|
|
3849
3870
|
activeStart: r / 2,
|
|
3850
3871
|
remainingLength: o,
|
|
3851
3872
|
remainingStart: r / 2 + a + r
|
|
3852
3873
|
};
|
|
3853
|
-
}), u = n(() => l.value.activeLength), d = n(() => l.value.activeStart), f = n(() => l.value.remainingLength), p = n(() => l.value.remainingStart), m = n(() =>
|
|
3854
|
-
let e =
|
|
3874
|
+
}), u = n(() => l.value.activeLength), d = n(() => l.value.activeStart), f = n(() => l.value.remainingLength), p = n(() => l.value.remainingStart), m = n(() => Zi(60, 60, Fi, Ii, -90 + p.value / Li * 360, f.value / Li * 360)), h = n(() => {
|
|
3875
|
+
let e = Ki * (s.value / 100), t = Ki - e;
|
|
3855
3876
|
if (e === 0) return {
|
|
3856
3877
|
activeLength: 0,
|
|
3857
|
-
remainingLength:
|
|
3878
|
+
remainingLength: Ki,
|
|
3858
3879
|
remainingStart: 0
|
|
3859
3880
|
};
|
|
3860
3881
|
if (t === 0) return {
|
|
3861
|
-
activeLength:
|
|
3882
|
+
activeLength: Ki,
|
|
3862
3883
|
remainingLength: 0,
|
|
3863
3884
|
remainingStart: 0
|
|
3864
3885
|
};
|
|
3865
|
-
let n = Math.min(
|
|
3886
|
+
let n = Math.min(qi, e, t);
|
|
3866
3887
|
return {
|
|
3867
3888
|
activeLength: e - n / 2,
|
|
3868
3889
|
remainingLength: t - n / 2,
|
|
3869
3890
|
remainingStart: e + n / 2
|
|
3870
3891
|
};
|
|
3871
|
-
}), g = n(() => h.value.activeLength), _ = n(() => h.value.remainingLength), y = n(() => h.value.remainingStart), b = n(() =>
|
|
3892
|
+
}), g = n(() => h.value.activeLength), _ = n(() => h.value.remainingLength), y = n(() => h.value.remainingStart), b = n(() => Zi(60, Bi, Vi, Hi, Ui + y.value / Gi * 360, _.value / Gi * 360));
|
|
3872
3893
|
return {
|
|
3873
3894
|
color: n(() => e.color),
|
|
3874
3895
|
colorA: i,
|
|
3875
3896
|
colorB: a,
|
|
3876
|
-
fullRadius:
|
|
3877
|
-
fullStrokeWidth:
|
|
3878
|
-
fullCircumference:
|
|
3897
|
+
fullRadius: Fi,
|
|
3898
|
+
fullStrokeWidth: Ii,
|
|
3899
|
+
fullCircumference: Li,
|
|
3879
3900
|
fullActiveLength: u,
|
|
3880
3901
|
fullActiveStart: d,
|
|
3881
3902
|
fullRemainingLength: f,
|
|
3882
3903
|
fullRemainingStart: p,
|
|
3883
3904
|
fullRemainingPath: m,
|
|
3884
|
-
gaugeCenterY:
|
|
3885
|
-
gaugeRadius:
|
|
3886
|
-
gaugeStrokeWidth:
|
|
3887
|
-
gaugeCircumference:
|
|
3888
|
-
gaugeTransform:
|
|
3905
|
+
gaugeCenterY: Bi,
|
|
3906
|
+
gaugeRadius: Vi,
|
|
3907
|
+
gaugeStrokeWidth: Hi,
|
|
3908
|
+
gaugeCircumference: Gi,
|
|
3909
|
+
gaugeTransform: Ji,
|
|
3889
3910
|
gaugeActiveLength: g,
|
|
3890
3911
|
gaugeRemainingLength: _,
|
|
3891
3912
|
gaugeRemainingStart: y,
|
|
@@ -3894,31 +3915,31 @@ var Ni = /*#__PURE__*/ Q(Di, [["render", Mi]]), Pi = 46, Fi = 8, Ii = 2 * Math.P
|
|
|
3894
3915
|
blurFilterId: r
|
|
3895
3916
|
};
|
|
3896
3917
|
}
|
|
3897
|
-
}),
|
|
3918
|
+
}), ea = { class: "uz-circle" }, ta = {
|
|
3898
3919
|
key: 0,
|
|
3899
3920
|
viewBox: "0 0 120 120",
|
|
3900
3921
|
"aria-hidden": "true"
|
|
3901
|
-
},
|
|
3922
|
+
}, na = ["id"], ra = ["stop-color"], ia = ["stop-color"], aa = ["id"], oa = [
|
|
3902
3923
|
"r",
|
|
3903
3924
|
"stroke-width",
|
|
3904
3925
|
"stroke-dasharray",
|
|
3905
3926
|
"stroke-dashoffset",
|
|
3906
3927
|
"filter",
|
|
3907
3928
|
"stroke"
|
|
3908
|
-
],
|
|
3929
|
+
], sa = [
|
|
3909
3930
|
"d",
|
|
3910
3931
|
"fill",
|
|
3911
3932
|
"filter"
|
|
3912
|
-
],
|
|
3933
|
+
], ca = {
|
|
3913
3934
|
class: "uz-circle__unit",
|
|
3914
3935
|
x: "60",
|
|
3915
3936
|
y: "82",
|
|
3916
3937
|
"text-anchor": "middle"
|
|
3917
|
-
},
|
|
3938
|
+
}, la = {
|
|
3918
3939
|
key: 1,
|
|
3919
3940
|
viewBox: "0 0 120 120",
|
|
3920
3941
|
"aria-hidden": "true"
|
|
3921
|
-
},
|
|
3942
|
+
}, ua = ["id"], da = ["stop-color"], fa = ["stop-color"], pa = ["id"], ma = [
|
|
3922
3943
|
"cy",
|
|
3923
3944
|
"r",
|
|
3924
3945
|
"stroke-width",
|
|
@@ -3926,19 +3947,19 @@ var Ni = /*#__PURE__*/ Q(Di, [["render", Mi]]), Pi = 46, Fi = 8, Ii = 2 * Math.P
|
|
|
3926
3947
|
"transform",
|
|
3927
3948
|
"filter",
|
|
3928
3949
|
"stroke"
|
|
3929
|
-
],
|
|
3950
|
+
], ha = [
|
|
3930
3951
|
"d",
|
|
3931
3952
|
"fill",
|
|
3932
3953
|
"filter"
|
|
3933
|
-
],
|
|
3954
|
+
], ga = {
|
|
3934
3955
|
class: "uz-circle__unit uz-circle__unit--gauge",
|
|
3935
3956
|
x: "60",
|
|
3936
3957
|
y: "90",
|
|
3937
3958
|
"text-anchor": "middle"
|
|
3938
3959
|
};
|
|
3939
|
-
function
|
|
3960
|
+
function _a(e, t, n, r, s, c) {
|
|
3940
3961
|
let u = D("UzNumberFlow");
|
|
3941
|
-
return x(), a("div",
|
|
3962
|
+
return x(), a("div", ea, [e.mode === 0 ? (x(), a("svg", ta, [
|
|
3942
3963
|
o("defs", null, [o("linearGradient", {
|
|
3943
3964
|
id: `uz-progress-grad-${e.uniqueId}`,
|
|
3944
3965
|
x1: "1",
|
|
@@ -3948,10 +3969,10 @@ function ga(e, t, n, r, s, c) {
|
|
|
3948
3969
|
}, [o("stop", {
|
|
3949
3970
|
offset: "0%",
|
|
3950
3971
|
"stop-color": e.colorA
|
|
3951
|
-
}, null, 8,
|
|
3972
|
+
}, null, 8, ra), o("stop", {
|
|
3952
3973
|
offset: "50%",
|
|
3953
3974
|
"stop-color": e.colorB
|
|
3954
|
-
}, null, 8,
|
|
3975
|
+
}, null, 8, ia)], 8, na), o("filter", { id: e.blurFilterId }, [...t[0] ||= [
|
|
3955
3976
|
o("feOffset", {
|
|
3956
3977
|
result: "offOut",
|
|
3957
3978
|
in: "SourceGraphic",
|
|
@@ -3968,7 +3989,7 @@ function ga(e, t, n, r, s, c) {
|
|
|
3968
3989
|
in2: "blurOut",
|
|
3969
3990
|
mode: "normal"
|
|
3970
3991
|
}, null, -1)
|
|
3971
|
-
]], 8,
|
|
3992
|
+
]], 8, aa)]),
|
|
3972
3993
|
e.fullActiveLength > 0 ? (x(), a("circle", {
|
|
3973
3994
|
key: 0,
|
|
3974
3995
|
class: "uz-circle__progress",
|
|
@@ -3983,7 +4004,7 @@ function ga(e, t, n, r, s, c) {
|
|
|
3983
4004
|
transform: "rotate(-90 60 60)",
|
|
3984
4005
|
filter: `url(#${e.blurFilterId})`,
|
|
3985
4006
|
stroke: `url(#uz-progress-grad-${e.uniqueId})`
|
|
3986
|
-
}, null, 8,
|
|
4007
|
+
}, null, 8, oa)) : i("", !0),
|
|
3987
4008
|
e.fullRemainingPath ? (x(), a("path", {
|
|
3988
4009
|
key: 1,
|
|
3989
4010
|
class: "uz-circle__progress",
|
|
@@ -3991,9 +4012,9 @@ function ga(e, t, n, r, s, c) {
|
|
|
3991
4012
|
fill: e.color,
|
|
3992
4013
|
"fill-opacity": "0.1",
|
|
3993
4014
|
filter: `url(#${e.blurFilterId})`
|
|
3994
|
-
}, null, 8,
|
|
3995
|
-
o("text",
|
|
3996
|
-
])) : (x(), a("svg",
|
|
4015
|
+
}, null, 8, sa)) : i("", !0),
|
|
4016
|
+
o("text", ca, A(e.circleUnit), 1)
|
|
4017
|
+
])) : (x(), a("svg", la, [
|
|
3997
4018
|
o("defs", null, [o("linearGradient", {
|
|
3998
4019
|
id: `uz-progress-grad-1-${e.uniqueId}`,
|
|
3999
4020
|
x1: "1",
|
|
@@ -4003,10 +4024,10 @@ function ga(e, t, n, r, s, c) {
|
|
|
4003
4024
|
}, [o("stop", {
|
|
4004
4025
|
offset: "0%",
|
|
4005
4026
|
"stop-color": e.colorA
|
|
4006
|
-
}, null, 8,
|
|
4027
|
+
}, null, 8, da), o("stop", {
|
|
4007
4028
|
offset: "50%",
|
|
4008
4029
|
"stop-color": e.colorB
|
|
4009
|
-
}, null, 8,
|
|
4030
|
+
}, null, 8, fa)], 8, ua), o("filter", { id: e.blurFilterId }, [...t[1] ||= [
|
|
4010
4031
|
o("feOffset", {
|
|
4011
4032
|
result: "offOut",
|
|
4012
4033
|
in: "SourceGraphic",
|
|
@@ -4023,7 +4044,7 @@ function ga(e, t, n, r, s, c) {
|
|
|
4023
4044
|
in2: "blurOut",
|
|
4024
4045
|
mode: "normal"
|
|
4025
4046
|
}, null, -1)
|
|
4026
|
-
]], 8,
|
|
4047
|
+
]], 8, pa)]),
|
|
4027
4048
|
e.gaugeActiveLength > 0 ? (x(), a("circle", {
|
|
4028
4049
|
key: 0,
|
|
4029
4050
|
class: "uz-circle__progress",
|
|
@@ -4037,7 +4058,7 @@ function ga(e, t, n, r, s, c) {
|
|
|
4037
4058
|
transform: e.gaugeTransform,
|
|
4038
4059
|
filter: `url(#${e.blurFilterId})`,
|
|
4039
4060
|
stroke: `url(#uz-progress-grad-1-${e.uniqueId})`
|
|
4040
|
-
}, null, 8,
|
|
4061
|
+
}, null, 8, ma)) : i("", !0),
|
|
4041
4062
|
e.gaugeRemainingPath ? (x(), a("path", {
|
|
4042
4063
|
key: 1,
|
|
4043
4064
|
class: "uz-circle__progress",
|
|
@@ -4045,15 +4066,15 @@ function ga(e, t, n, r, s, c) {
|
|
|
4045
4066
|
fill: e.color,
|
|
4046
4067
|
"fill-opacity": "0.1",
|
|
4047
4068
|
filter: `url(#${e.blurFilterId})`
|
|
4048
|
-
}, null, 8,
|
|
4049
|
-
o("text",
|
|
4069
|
+
}, null, 8, ha)) : i("", !0),
|
|
4070
|
+
o("text", ga, A(e.circleUnit), 1)
|
|
4050
4071
|
])), o("div", { class: g(["uz-circle__value uz-circle__value--gauge uz-circle__number", { "uz-circle__number--gauge": e.mode !== 0 }]) }, [l(u, { value: e.circle }, null, 8, ["value"])], 2)]);
|
|
4051
4072
|
}
|
|
4052
|
-
var
|
|
4073
|
+
var va = /*#__PURE__*/ Q($i, [["render", _a]]), ya = d({
|
|
4053
4074
|
name: "UzCamera",
|
|
4054
4075
|
components: {
|
|
4055
4076
|
NButton: L,
|
|
4056
|
-
NModal:
|
|
4077
|
+
NModal: Se
|
|
4057
4078
|
},
|
|
4058
4079
|
props: {
|
|
4059
4080
|
mode: {
|
|
@@ -4075,7 +4096,7 @@ var _a = /*#__PURE__*/ Q(Qi, [["render", ga]]), va = d({
|
|
|
4075
4096
|
},
|
|
4076
4097
|
emits: ["on-update:value"],
|
|
4077
4098
|
setup(e, { emit: t }) {
|
|
4078
|
-
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) => {
|
|
4079
4100
|
s.beginPath(), s.moveTo(e.x, e.y), s.lineTo(t.x, t.y), s.lineWidth = 2, s.strokeStyle = "green", s.stroke();
|
|
4080
4101
|
}, u = () => {
|
|
4081
4102
|
a.value && requestAnimationFrame(d);
|
|
@@ -4085,7 +4106,7 @@ var _a = /*#__PURE__*/ Q(Qi, [["render", ga]]), va = d({
|
|
|
4085
4106
|
c.width = i, c.height = d, s.drawImage(r.value, 0, 0, i, d);
|
|
4086
4107
|
let e = s.getImageData(0, 0, i, d);
|
|
4087
4108
|
try {
|
|
4088
|
-
let n =
|
|
4109
|
+
let n = rt(e.data, i, d);
|
|
4089
4110
|
if (n) {
|
|
4090
4111
|
let { location: e, data: r } = n;
|
|
4091
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));
|
|
@@ -4108,7 +4129,7 @@ var _a = /*#__PURE__*/ Q(Qi, [["render", ga]]), va = d({
|
|
|
4108
4129
|
try {
|
|
4109
4130
|
e.getCapabilities().focusDistance && await e.applyConstraints({ advanced: [{ autoFocus: "continuous" }] });
|
|
4110
4131
|
} catch (e) {
|
|
4111
|
-
|
|
4132
|
+
q(e);
|
|
4112
4133
|
}
|
|
4113
4134
|
}, g = () => {
|
|
4114
4135
|
i.value = !0, h(async () => {
|
|
@@ -4142,11 +4163,11 @@ var _a = /*#__PURE__*/ Q(Qi, [["render", ga]]), va = d({
|
|
|
4142
4163
|
closeAll: f
|
|
4143
4164
|
};
|
|
4144
4165
|
}
|
|
4145
|
-
}),
|
|
4166
|
+
}), ba = ["width", "height"], xa = ["width", "height"], Sa = { class: "uz-scan-video" }, Ca = {
|
|
4146
4167
|
ref: "videoRef",
|
|
4147
4168
|
playsInline: ""
|
|
4148
4169
|
};
|
|
4149
|
-
function
|
|
4170
|
+
function wa(t, n, s, l, u, d) {
|
|
4150
4171
|
let f = D("NButton"), p = D("NModal");
|
|
4151
4172
|
return x(), a(e, null, [
|
|
4152
4173
|
t.mode === "button" ? (x(), r(f, {
|
|
@@ -4178,7 +4199,7 @@ function Ca(t, n, s, l, u, d) {
|
|
|
4178
4199
|
id: "uz-scan-canvas",
|
|
4179
4200
|
width: t.width,
|
|
4180
4201
|
height: t.height
|
|
4181
|
-
}, null, 8,
|
|
4202
|
+
}, null, 8, ba)], 4)]),
|
|
4182
4203
|
_: 1
|
|
4183
4204
|
}, 8, [
|
|
4184
4205
|
"show",
|
|
@@ -4196,21 +4217,21 @@ function Ca(t, n, s, l, u, d) {
|
|
|
4196
4217
|
id: "uz-scan-canvas",
|
|
4197
4218
|
width: t.width,
|
|
4198
4219
|
height: t.height
|
|
4199
|
-
}, null, 8,
|
|
4200
|
-
o("div",
|
|
4220
|
+
}, null, 8, xa)], 4)) : i("", !0),
|
|
4221
|
+
o("div", Sa, [o("video", Ca, null, 512)])
|
|
4201
4222
|
], 64);
|
|
4202
4223
|
}
|
|
4203
|
-
var
|
|
4224
|
+
var Ta = /*#__PURE__*/ Q(ya, [["render", wa]]), Ea = /* @__PURE__ */ new WeakMap(), Da = d({
|
|
4204
4225
|
name: "UzSearchBar",
|
|
4205
4226
|
components: {
|
|
4206
|
-
NIcon:
|
|
4227
|
+
NIcon: H,
|
|
4207
4228
|
NButton: L,
|
|
4208
4229
|
NButtonGroup: R,
|
|
4209
|
-
NGrid:
|
|
4210
|
-
NGridItem:
|
|
4211
|
-
NInputGroup:
|
|
4212
|
-
NInputGroupLabel:
|
|
4213
|
-
NPopover:
|
|
4230
|
+
NGrid: me,
|
|
4231
|
+
NGridItem: he,
|
|
4232
|
+
NInputGroup: ye,
|
|
4233
|
+
NInputGroupLabel: be,
|
|
4234
|
+
NPopover: Te,
|
|
4214
4235
|
UzFormItem: Tr
|
|
4215
4236
|
},
|
|
4216
4237
|
props: {
|
|
@@ -4249,17 +4270,17 @@ var wa = /*#__PURE__*/ Q(va, [["render", Ca]]), Ta = /* @__PURE__ */ new WeakMap
|
|
|
4249
4270
|
e.offsetWidth > 1100 ? (t.instance.gridSpan = 1, t.instance.more = t.instance.moreCache, t.instance.offset = t.instance.offsetCache) : e.offsetWidth <= 1100 && e.offsetWidth > 550 ? (t.instance.gridSpan = 2, t.instance.more = t.instance.moreIndex > 2, t.instance.offset = t.instance.moreIndex === 1 ? 1 : -1) : (t.instance.gridSpan = 4, t.instance.more = t.instance.moreIndex > 1, t.instance.offset = -1);
|
|
4250
4271
|
}
|
|
4251
4272
|
});
|
|
4252
|
-
n.observe(e),
|
|
4273
|
+
n.observe(e), Ea.set(e, n);
|
|
4253
4274
|
},
|
|
4254
4275
|
unmounted: (e) => {
|
|
4255
|
-
|
|
4276
|
+
Ea.get(e)?.disconnect(), Ea.delete(e);
|
|
4256
4277
|
}
|
|
4257
4278
|
} },
|
|
4258
4279
|
emits: ["update:loading", "on-update:value"],
|
|
4259
4280
|
setup(e, { emit: t }) {
|
|
4260
|
-
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) => {
|
|
4261
4282
|
if (e.loading) return;
|
|
4262
|
-
let r =
|
|
4283
|
+
let r = G(i.value);
|
|
4263
4284
|
!n && r.query && (r.query.page = 1);
|
|
4264
4285
|
let o = [];
|
|
4265
4286
|
a.value.forEach((e) => {
|
|
@@ -4278,7 +4299,7 @@ var wa = /*#__PURE__*/ Q(va, [["render", Ca]]), Ta = /* @__PURE__ */ new WeakMap
|
|
|
4278
4299
|
}
|
|
4279
4300
|
}), t("update:loading", !0), t("on-update:value", o);
|
|
4280
4301
|
}, y = () => {
|
|
4281
|
-
e.loading || (i.value =
|
|
4302
|
+
e.loading || (i.value = G(o.value), v());
|
|
4282
4303
|
}, b = () => {
|
|
4283
4304
|
s.value = !s.value;
|
|
4284
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) => {
|
|
@@ -4291,7 +4312,7 @@ var wa = /*#__PURE__*/ Q(va, [["render", Ca]]), Ta = /* @__PURE__ */ new WeakMap
|
|
|
4291
4312
|
if (e.params.type.indexOf("range") > -1) switch (e.search.defaultValue) {
|
|
4292
4313
|
case "now":
|
|
4293
4314
|
{
|
|
4294
|
-
let t =
|
|
4315
|
+
let t = Qe().startOf("day").valueOf(), r = Qe().endOf("day").valueOf();
|
|
4295
4316
|
n[e.key] = [t, r];
|
|
4296
4317
|
}
|
|
4297
4318
|
break;
|
|
@@ -4315,9 +4336,9 @@ var wa = /*#__PURE__*/ Q(va, [["render", Ca]]), Ta = /* @__PURE__ */ new WeakMap
|
|
|
4315
4336
|
};
|
|
4316
4337
|
}, C = (t) => {
|
|
4317
4338
|
if (h.value = [], t && t.length > 0) {
|
|
4318
|
-
let { data: n, values: s } = S(
|
|
4339
|
+
let { data: n, values: s } = S(G(t)), c = {}, l = e.id || r.params.id;
|
|
4319
4340
|
if (e.cache && l) {
|
|
4320
|
-
let e =
|
|
4341
|
+
let e = Y(`tables_${l}`, !1);
|
|
4321
4342
|
e && e.params.forEach((e) => {
|
|
4322
4343
|
if (e.str) {
|
|
4323
4344
|
let t = n.find((t) => t.key === e.key);
|
|
@@ -4329,10 +4350,10 @@ var wa = /*#__PURE__*/ Q(va, [["render", Ca]]), Ta = /* @__PURE__ */ new WeakMap
|
|
|
4329
4350
|
c[e.key] = e.value;
|
|
4330
4351
|
});
|
|
4331
4352
|
}
|
|
4332
|
-
a.value = n, i.value =
|
|
4353
|
+
a.value = n, i.value = G({
|
|
4333
4354
|
...s,
|
|
4334
4355
|
...c
|
|
4335
|
-
}), o.value =
|
|
4356
|
+
}), o.value = G(s);
|
|
4336
4357
|
}
|
|
4337
4358
|
v(!0);
|
|
4338
4359
|
};
|
|
@@ -4368,24 +4389,24 @@ var wa = /*#__PURE__*/ Q(va, [["render", Ca]]), Ta = /* @__PURE__ */ new WeakMap
|
|
|
4368
4389
|
tabButtonType: x
|
|
4369
4390
|
};
|
|
4370
4391
|
}
|
|
4371
|
-
}),
|
|
4392
|
+
}), Oa = { class: "uz-flex uz-justify-between uz-gap-2" }, ka = {
|
|
4372
4393
|
key: 0,
|
|
4373
4394
|
class: "uz-flex uz-items-start uz-justify-between uz-gap-2 uz-w-full"
|
|
4374
|
-
},
|
|
4395
|
+
}, Aa = { key: 0 }, ja = { class: "uz-flex-1" }, Ma = {
|
|
4375
4396
|
key: 1,
|
|
4376
4397
|
class: "uz-flex uz-gap-2 uz-flex-1"
|
|
4377
|
-
},
|
|
4398
|
+
}, Na = {
|
|
4378
4399
|
key: 0,
|
|
4379
4400
|
class: "uz-search-fields-collapse"
|
|
4380
4401
|
};
|
|
4381
|
-
function
|
|
4402
|
+
function Pa(n, s, u, d, f, p) {
|
|
4382
4403
|
let m = D("NButton"), h = D("NButtonGroup"), _ = D("NGridItem"), v = D("NInputGroupLabel"), y = D("NPopover"), b = D("UzFormItem"), S = D("NInputGroup"), C = D("NGrid"), w = D("UzIcon"), k = D("NIcon"), ee = O("media");
|
|
4383
4404
|
return x(), a("div", {
|
|
4384
4405
|
class: "uz-search-bar uz-flex uz-flex-col uz-w-full",
|
|
4385
4406
|
onKeyup: s[1] ||= te((e) => n.doSearch(!1), ["enter"])
|
|
4386
|
-
}, [o("div",
|
|
4407
|
+
}, [o("div", Oa, [n.enableHeader ? (x(), a("div", ka, [
|
|
4387
4408
|
E(n.$slots, "header"),
|
|
4388
|
-
n.tabList && n.tabList.length > 0 ? (x(), a("div",
|
|
4409
|
+
n.tabList && n.tabList.length > 0 ? (x(), a("div", Aa, [l(h, null, {
|
|
4389
4410
|
default: P(() => [(x(!0), a(e, null, T(n.tabList, (e) => (x(), r(m, {
|
|
4390
4411
|
key: e.value,
|
|
4391
4412
|
type: n.tabButtonType(e),
|
|
@@ -4397,7 +4418,7 @@ function Na(n, s, u, d, f, p) {
|
|
|
4397
4418
|
}, 1032, ["type", "onClick"]))), 128))]),
|
|
4398
4419
|
_: 1
|
|
4399
4420
|
})])) : i("", !0),
|
|
4400
|
-
F((x(), a("div",
|
|
4421
|
+
F((x(), a("div", ja, [l(C, {
|
|
4401
4422
|
"x-gap": "8",
|
|
4402
4423
|
"y-gap": "8",
|
|
4403
4424
|
cols: n.cols,
|
|
@@ -4434,7 +4455,7 @@ function Na(n, s, u, d, f, p) {
|
|
|
4434
4455
|
}, 1032, ["span"]))), 128)) : i("", !0)]),
|
|
4435
4456
|
_: 1
|
|
4436
4457
|
}, 8, ["cols"])])), [[ee]])
|
|
4437
|
-
])) : i("", !0), n.enableHeader ? (x(), a("div",
|
|
4458
|
+
])) : i("", !0), n.enableHeader ? (x(), a("div", Ma, [
|
|
4438
4459
|
n.more ? (x(), r(m, {
|
|
4439
4460
|
key: 0,
|
|
4440
4461
|
secondary: "",
|
|
@@ -4484,7 +4505,7 @@ function Na(n, s, u, d, f, p) {
|
|
|
4484
4505
|
})) : i("", !0),
|
|
4485
4506
|
E(n.$slots, "action")
|
|
4486
4507
|
])) : i("", !0)]), l(t, { name: "uz-search-fields" }, {
|
|
4487
|
-
default: P(() => [!n.collapsed && n.itemData && Object.keys(n.itemData).length > 0 ? (x(), a("div",
|
|
4508
|
+
default: P(() => [!n.collapsed && n.itemData && Object.keys(n.itemData).length > 0 ? (x(), a("div", Na, [l(C, {
|
|
4488
4509
|
"x-gap": "8",
|
|
4489
4510
|
"y-gap": "8",
|
|
4490
4511
|
cols: 4
|
|
@@ -4519,17 +4540,17 @@ function Na(n, s, u, d, f, p) {
|
|
|
4519
4540
|
_: 1
|
|
4520
4541
|
})], 32);
|
|
4521
4542
|
}
|
|
4522
|
-
var
|
|
4543
|
+
var Fa = /*#__PURE__*/ Q(Da, [["render", Pa]]), Ia = d({
|
|
4523
4544
|
name: "UzSearchMobileBar",
|
|
4524
4545
|
components: {
|
|
4525
|
-
NIcon:
|
|
4546
|
+
NIcon: H,
|
|
4526
4547
|
NButton: L,
|
|
4527
|
-
NDrawer:
|
|
4528
|
-
NDrawerContent:
|
|
4529
|
-
NGrid:
|
|
4530
|
-
NGridItem:
|
|
4531
|
-
NInputGroup:
|
|
4532
|
-
NInputGroupLabel:
|
|
4548
|
+
NDrawer: ce,
|
|
4549
|
+
NDrawerContent: le,
|
|
4550
|
+
NGrid: me,
|
|
4551
|
+
NGridItem: he,
|
|
4552
|
+
NInputGroup: ye,
|
|
4553
|
+
NInputGroupLabel: be,
|
|
4533
4554
|
UzFormItem: Tr
|
|
4534
4555
|
},
|
|
4535
4556
|
props: {
|
|
@@ -4553,9 +4574,9 @@ var Pa = /*#__PURE__*/ Q(Ea, [["render", Na]]), Fa = d({
|
|
|
4553
4574
|
},
|
|
4554
4575
|
emits: ["update:loading", "on-update:value"],
|
|
4555
4576
|
setup(e, { emit: t }) {
|
|
4556
|
-
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) => {
|
|
4557
4578
|
if (e.loading) return;
|
|
4558
|
-
let r =
|
|
4579
|
+
let r = G(o.value);
|
|
4559
4580
|
!n && r.query && (r.query.page = 1);
|
|
4560
4581
|
let s = [];
|
|
4561
4582
|
i.value.forEach((e) => {
|
|
@@ -4574,7 +4595,7 @@ var Pa = /*#__PURE__*/ Q(Ea, [["render", Na]]), Fa = d({
|
|
|
4574
4595
|
}
|
|
4575
4596
|
}), a.value = !1, t("update:loading", !0), t("on-update:value", s);
|
|
4576
4597
|
}, u = () => {
|
|
4577
|
-
e.loading || (o.value =
|
|
4598
|
+
e.loading || (o.value = G(s.value), l());
|
|
4578
4599
|
}, d = (e) => {
|
|
4579
4600
|
let t = {};
|
|
4580
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));
|
|
@@ -4584,17 +4605,17 @@ var Pa = /*#__PURE__*/ Q(Ea, [["render", Na]]), Fa = d({
|
|
|
4584
4605
|
};
|
|
4585
4606
|
}, f = (t) => {
|
|
4586
4607
|
if (t && t.length > 0) {
|
|
4587
|
-
let { data: n, values: a } = d(
|
|
4608
|
+
let { data: n, values: a } = d(G(t)), c = {}, l = e.id || r.params.id;
|
|
4588
4609
|
if (e.cache && l) {
|
|
4589
|
-
let e =
|
|
4610
|
+
let e = Y(`tables_${l}`, !1);
|
|
4590
4611
|
e && e.params.forEach((e) => {
|
|
4591
4612
|
c[e.key] = e.value;
|
|
4592
4613
|
});
|
|
4593
4614
|
}
|
|
4594
|
-
i.value = n, o.value =
|
|
4615
|
+
i.value = n, o.value = G({
|
|
4595
4616
|
...a,
|
|
4596
4617
|
...c
|
|
4597
|
-
}), s.value =
|
|
4618
|
+
}), s.value = G(a);
|
|
4598
4619
|
}
|
|
4599
4620
|
l(!0);
|
|
4600
4621
|
};
|
|
@@ -4609,10 +4630,10 @@ var Pa = /*#__PURE__*/ Q(Ea, [["render", Na]]), Fa = d({
|
|
|
4609
4630
|
clearAll: u
|
|
4610
4631
|
};
|
|
4611
4632
|
}
|
|
4612
|
-
}),
|
|
4613
|
-
function
|
|
4633
|
+
}), La = { class: "uz-flex uz-items-start uz-justify-between uz-gap-8 uz-pb-2" }, Ra = { class: "uz-flex uz-gap-2" }, za = { class: "uz-flex uz-items-center uz-gap-2 uz-w-full" };
|
|
4634
|
+
function Ba(t, n, s, u, d, f) {
|
|
4614
4635
|
let p = D("UzIcon"), m = D("NIcon"), h = D("NButton"), g = D("NInputGroupLabel"), _ = D("UzFormItem"), v = D("NInputGroup"), y = D("NGridItem"), b = D("NGrid"), S = D("NDrawerContent"), C = D("NDrawer");
|
|
4615
|
-
return x(), a(e, null, [o("div",
|
|
4636
|
+
return x(), a(e, null, [o("div", La, [E(t.$slots, "header"), o("div", Ra, [t.itemData && Object.keys(t.itemData).length > 0 ? (x(), r(h, {
|
|
4616
4637
|
key: 0,
|
|
4617
4638
|
secondary: "",
|
|
4618
4639
|
onClick: n[0] ||= (e) => t.drawer = !0
|
|
@@ -4637,7 +4658,7 @@ function za(t, n, s, u, d, f) {
|
|
|
4637
4658
|
title: t.t("Common.search"),
|
|
4638
4659
|
closable: ""
|
|
4639
4660
|
}, {
|
|
4640
|
-
footer: P(() => [o("div",
|
|
4661
|
+
footer: P(() => [o("div", za, [l(h, {
|
|
4641
4662
|
secondary: "",
|
|
4642
4663
|
loading: t.loading,
|
|
4643
4664
|
onClick: t.clearAll,
|
|
@@ -4692,12 +4713,12 @@ function za(t, n, s, u, d, f) {
|
|
|
4692
4713
|
_: 1
|
|
4693
4714
|
}, 8, ["show"])], 64);
|
|
4694
4715
|
}
|
|
4695
|
-
var
|
|
4716
|
+
var Va = /*#__PURE__*/ Q(Ia, [["render", Ba]]), Ha = d({
|
|
4696
4717
|
name: "UzSpin",
|
|
4697
4718
|
components: {
|
|
4698
4719
|
NButton: L,
|
|
4699
|
-
NSpin:
|
|
4700
|
-
NEllipsis:
|
|
4720
|
+
NSpin: je,
|
|
4721
|
+
NEllipsis: de
|
|
4701
4722
|
},
|
|
4702
4723
|
emits: ["update:value"],
|
|
4703
4724
|
props: {
|
|
@@ -4715,7 +4736,7 @@ var Ba = /*#__PURE__*/ Q(Fa, [["render", za]]), Va = d({
|
|
|
4715
4736
|
}
|
|
4716
4737
|
},
|
|
4717
4738
|
setup(e, { emit: t }) {
|
|
4718
|
-
let { t: n } =
|
|
4739
|
+
let { t: n } = W(), r = w(), i = w(5), a = () => {
|
|
4719
4740
|
t("update:value", !1);
|
|
4720
4741
|
}, o = () => {
|
|
4721
4742
|
clearInterval(r.value);
|
|
@@ -4739,7 +4760,7 @@ var Ba = /*#__PURE__*/ Q(Fa, [["render", za]]), Va = d({
|
|
|
4739
4760
|
});
|
|
4740
4761
|
//#endregion
|
|
4741
4762
|
//#region components/spin/index.vue
|
|
4742
|
-
function
|
|
4763
|
+
function Ua(e, t, n, i, a, s) {
|
|
4743
4764
|
let u = D("NEllipsis"), d = D("NButton"), f = D("NSpin");
|
|
4744
4765
|
return x(), r(f, { show: e.value }, {
|
|
4745
4766
|
description: P(() => [
|
|
@@ -4767,11 +4788,11 @@ function Ha(e, t, n, i, a, s) {
|
|
|
4767
4788
|
_: 3
|
|
4768
4789
|
}, 8, ["show"]);
|
|
4769
4790
|
}
|
|
4770
|
-
var
|
|
4791
|
+
var Wa = /*#__PURE__*/ Q(Ha, [["render", Ua]]), Ga = d({
|
|
4771
4792
|
name: "UzTableExpand",
|
|
4772
4793
|
components: {
|
|
4773
|
-
NDataTable:
|
|
4774
|
-
NForm:
|
|
4794
|
+
NDataTable: ae,
|
|
4795
|
+
NForm: fe
|
|
4775
4796
|
},
|
|
4776
4797
|
props: {
|
|
4777
4798
|
data: {
|
|
@@ -4791,10 +4812,10 @@ var Ua = /*#__PURE__*/ Q(Va, [["render", Ha]]), Wa = d({
|
|
|
4791
4812
|
let t = e.data.merge, n = Function("formValue", "mainFormValue", "POST", t);
|
|
4792
4813
|
r.value = await n(e.value[`sub_${e.data.key}`], { value: () => e.value }, Z);
|
|
4793
4814
|
} catch (e) {
|
|
4794
|
-
|
|
4815
|
+
q(e);
|
|
4795
4816
|
}
|
|
4796
4817
|
_i(e.data.link).then(async (e) => {
|
|
4797
|
-
let { tableColumns: r } = await Ti(yi(
|
|
4818
|
+
let { tableColumns: r } = await Ti(yi(et.parse(e.viewJson).table), !0, 2, () => {}, {}, !1, !0), a = 0, o = r.map((e) => ({
|
|
4798
4819
|
...e,
|
|
4799
4820
|
sorter: !1,
|
|
4800
4821
|
resizable: !1
|
|
@@ -4815,7 +4836,7 @@ var Ua = /*#__PURE__*/ Q(Va, [["render", Ha]]), Wa = d({
|
|
|
4815
4836
|
});
|
|
4816
4837
|
//#endregion
|
|
4817
4838
|
//#region components/table/components/expand.vue
|
|
4818
|
-
function
|
|
4839
|
+
function Ka(e, t, n, i, a, o) {
|
|
4819
4840
|
let s = D("NDataTable");
|
|
4820
4841
|
return x(), r(s, {
|
|
4821
4842
|
columns: e.columns,
|
|
@@ -4834,18 +4855,18 @@ function Ga(e, t, n, i, a, o) {
|
|
|
4834
4855
|
"scroll-x"
|
|
4835
4856
|
]);
|
|
4836
4857
|
}
|
|
4837
|
-
var
|
|
4838
|
-
components: { NSkeleton:
|
|
4858
|
+
var qa = /*#__PURE__*/ Q(Ga, [["render", Ka]]), Ja = d({
|
|
4859
|
+
components: { NSkeleton: ke },
|
|
4839
4860
|
setup() {
|
|
4840
4861
|
return {};
|
|
4841
4862
|
}
|
|
4842
|
-
}),
|
|
4843
|
-
function
|
|
4863
|
+
}), Ya = { class: "uz-flex uz-flex-col uz-gap-2 uz-flex-1 uz-h-full" }, Xa = { class: "uz-flex uz-justify-between" }, Za = { class: "uz-flex uz-gap-1" };
|
|
4864
|
+
function Qa(e, t, n, r, i, s) {
|
|
4844
4865
|
let c = D("NSkeleton");
|
|
4845
|
-
return x(), a("div",
|
|
4866
|
+
return x(), a("div", Ya, [o("div", Xa, [l(c, {
|
|
4846
4867
|
width: 120,
|
|
4847
4868
|
size: "medium"
|
|
4848
|
-
}), o("div",
|
|
4869
|
+
}), o("div", Za, [
|
|
4849
4870
|
l(c, {
|
|
4850
4871
|
width: 180,
|
|
4851
4872
|
size: "medium"
|
|
@@ -4878,19 +4899,19 @@ function Za(e, t, n, r, i, s) {
|
|
|
4878
4899
|
}
|
|
4879
4900
|
//#endregion
|
|
4880
4901
|
//#region components/table/index.vue?vue&type=script&lang.ts
|
|
4881
|
-
var
|
|
4902
|
+
var $a = d({
|
|
4882
4903
|
name: "UzTable",
|
|
4883
4904
|
components: {
|
|
4884
|
-
NDataTable:
|
|
4885
|
-
NPopover:
|
|
4905
|
+
NDataTable: ae,
|
|
4906
|
+
NPopover: Te,
|
|
4886
4907
|
NButton: L,
|
|
4887
|
-
NIcon:
|
|
4888
|
-
NCheckbox:
|
|
4889
|
-
NSpin:
|
|
4890
|
-
VueDraggable:
|
|
4891
|
-
UzSpin:
|
|
4892
|
-
TableExpand:
|
|
4893
|
-
SkeletonLoading: /* @__PURE__ */ Q(
|
|
4908
|
+
NIcon: H,
|
|
4909
|
+
NCheckbox: z,
|
|
4910
|
+
NSpin: je,
|
|
4911
|
+
VueDraggable: $e,
|
|
4912
|
+
UzSpin: Wa,
|
|
4913
|
+
TableExpand: qa,
|
|
4914
|
+
SkeletonLoading: /* @__PURE__ */ Q(Ja, [["render", Qa]])
|
|
4894
4915
|
},
|
|
4895
4916
|
props: {
|
|
4896
4917
|
id: {
|
|
@@ -5018,7 +5039,7 @@ var Qa = d({
|
|
|
5018
5039
|
value: () => null,
|
|
5019
5040
|
setValue: () => null
|
|
5020
5041
|
});
|
|
5021
|
-
let a = p("userStore"), o =
|
|
5042
|
+
let a = p("userStore"), o = qe(), { t: s } = W(), c = Ve(), l = n(() => X.isMobile), u = w(), d = w(), m = w(), g = w(!!i.header), _ = w(!1), v = w(!1), b = w(""), x = w(), C = w([]), T = n(() => C.value.filter((e) => e.show)), E = w([]), D = w(void 0), O = w([]), k = w({
|
|
5022
5043
|
params: [],
|
|
5023
5044
|
query: {
|
|
5024
5045
|
page: 1,
|
|
@@ -5029,33 +5050,34 @@ var Qa = d({
|
|
|
5029
5050
|
fetch: null,
|
|
5030
5051
|
fetchFn: "",
|
|
5031
5052
|
when_drawer_open: "",
|
|
5032
|
-
when_before_save: ""
|
|
5033
|
-
|
|
5053
|
+
when_before_save: "",
|
|
5054
|
+
when_after_save: ""
|
|
5055
|
+
}), R = w(Ci()), ne = w(""), z = w(!1), re = w([]), B = w([]), ie = p("modules"), ae = (e) => e.id, oe = (e, n) => {
|
|
5034
5056
|
t("update:rowKeys", {
|
|
5035
5057
|
keys: e,
|
|
5036
|
-
rows:
|
|
5058
|
+
rows: G(n)
|
|
5037
5059
|
});
|
|
5038
|
-
},
|
|
5039
|
-
if (
|
|
5040
|
-
let e =
|
|
5041
|
-
|
|
5060
|
+
}, se = (e, n, r) => {
|
|
5061
|
+
if (re.value = e, r.action === "check" && B.value.push(r.row), r.action === "uncheck") {
|
|
5062
|
+
let e = B.value.findIndex((e) => e.id === r.row?.id);
|
|
5063
|
+
B.value.splice(e, 1);
|
|
5042
5064
|
}
|
|
5043
5065
|
r.action === "checkAll" && n.forEach((e) => {
|
|
5044
|
-
e &&
|
|
5045
|
-
}), r.action === "uncheckAll" && (
|
|
5046
|
-
keys:
|
|
5047
|
-
rows:
|
|
5066
|
+
e && B.value.push(e);
|
|
5067
|
+
}), r.action === "uncheckAll" && (B.value = [], re.value = []), t("update:rowKeys", {
|
|
5068
|
+
keys: G(re.value),
|
|
5069
|
+
rows: G(B.value)
|
|
5048
5070
|
});
|
|
5049
|
-
},
|
|
5071
|
+
}, ce = (e) => {
|
|
5050
5072
|
O.value = e;
|
|
5051
|
-
},
|
|
5073
|
+
}, le = n(() => {
|
|
5052
5074
|
let t = e.summary || R.value.summary;
|
|
5053
5075
|
if (t && typeof t == "string") {
|
|
5054
5076
|
let e = Function("pageData", "h", t);
|
|
5055
5077
|
return (t) => e(t, f);
|
|
5056
5078
|
}
|
|
5057
5079
|
return t && typeof t == "function" ? t : () => [];
|
|
5058
|
-
}),
|
|
5080
|
+
}), ue = (t) => {
|
|
5059
5081
|
let n = e.id || o.params.id, r;
|
|
5060
5082
|
if (e.fetch) r = e.fetch({
|
|
5061
5083
|
...t,
|
|
@@ -5069,7 +5091,7 @@ var Qa = d({
|
|
|
5069
5091
|
tableId: n
|
|
5070
5092
|
});
|
|
5071
5093
|
return r;
|
|
5072
|
-
},
|
|
5094
|
+
}, de = (t) => {
|
|
5073
5095
|
let n = e.id || o.params.id, r;
|
|
5074
5096
|
if (e.fetch) r = e.fetch({
|
|
5075
5097
|
id: t.id,
|
|
@@ -5083,44 +5105,44 @@ var Qa = d({
|
|
|
5083
5105
|
tableId: n
|
|
5084
5106
|
});
|
|
5085
5107
|
return r;
|
|
5086
|
-
},
|
|
5108
|
+
}, V = (n = !1) => {
|
|
5087
5109
|
let r = e.id || o.params.id;
|
|
5088
5110
|
e.enableLoading && (_.value = !0, t("update:loading", !0));
|
|
5089
|
-
let i =
|
|
5111
|
+
let i = G(k.value);
|
|
5090
5112
|
n && delete i.orderby, I.value.fetch ? tr([I.value.fetch], "", i).then((e) => {
|
|
5091
|
-
let n =
|
|
5092
|
-
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1), R.value.cache && r &&
|
|
5113
|
+
let n = kt(e);
|
|
5114
|
+
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1), R.value.cache && r && J(`tables_${r}`, k.value);
|
|
5093
5115
|
}).catch(() => {
|
|
5094
5116
|
_.value = !1, v.value = !0, t("update:loading", !1);
|
|
5095
|
-
}) :
|
|
5096
|
-
let n =
|
|
5097
|
-
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1), R.value.cache && r &&
|
|
5117
|
+
}) : ue(i).then((e) => {
|
|
5118
|
+
let n = kt(e);
|
|
5119
|
+
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1), R.value.cache && r && J(`tables_${r}`, k.value);
|
|
5098
5120
|
}).catch(() => {
|
|
5099
5121
|
_.value = !1, v.value = !0, t("update:loading", !1);
|
|
5100
5122
|
});
|
|
5101
|
-
},
|
|
5102
|
-
k.value.query.page = e, u.value && (u.value.scrollTop = 0),
|
|
5103
|
-
},
|
|
5123
|
+
}, fe = (e) => {
|
|
5124
|
+
k.value.query.page = e, u.value && (u.value.scrollTop = 0), Ot(), V();
|
|
5125
|
+
}, pe = () => {
|
|
5104
5126
|
let e = k.value.query.page + 1;
|
|
5105
|
-
e > k.value.query.pageMax && (e = 1), k.value.query.page = e, u.value && (u.value.scrollTop = 0),
|
|
5127
|
+
e > k.value.query.pageMax && (e = 1), k.value.query.page = e, u.value && (u.value.scrollTop = 0), V();
|
|
5128
|
+
}, me = (e) => {
|
|
5129
|
+
k.value.query.pageSize = e, k.value.query.page = 1, Ot(), V();
|
|
5106
5130
|
}, he = (e) => {
|
|
5107
|
-
k.value.
|
|
5108
|
-
},
|
|
5109
|
-
e && e.order ? k.value.orderby = `${e.columnKey} ${e.order.replace("end", "")}` : delete k.value.orderby, B();
|
|
5110
|
-
}, V = () => {
|
|
5131
|
+
e && e.order ? k.value.orderby = `${e.columnKey} ${e.order.replace("end", "")}` : delete k.value.orderby, V();
|
|
5132
|
+
}, H = () => {
|
|
5111
5133
|
if (typeof e.addFetch == "function") return e.addFetch();
|
|
5112
5134
|
m.value?.addAndEdit(e.id || o.params.id, async () => {
|
|
5113
|
-
let { form: e } = await
|
|
5135
|
+
let { form: e } = await be();
|
|
5114
5136
|
return {
|
|
5115
5137
|
form: e,
|
|
5116
5138
|
data: {}
|
|
5117
5139
|
};
|
|
5118
|
-
}, R.value, I.value, 0,
|
|
5140
|
+
}, R.value, I.value, 0, je);
|
|
5141
|
+
}, ge = (e) => {
|
|
5142
|
+
e.show = !e.show, Ae();
|
|
5119
5143
|
}, _e = (e) => {
|
|
5120
|
-
|
|
5121
|
-
}, ve = (
|
|
5122
|
-
k.value.params = e, B();
|
|
5123
|
-
}, ye = () => [{
|
|
5144
|
+
k.value.params = e, V();
|
|
5145
|
+
}, ve = () => [{
|
|
5124
5146
|
title: s("Table.createdByTime"),
|
|
5125
5147
|
key: "createTime",
|
|
5126
5148
|
resizable: !0,
|
|
@@ -5128,7 +5150,7 @@ var Qa = d({
|
|
|
5128
5150
|
show: !0,
|
|
5129
5151
|
ellipsis: !1,
|
|
5130
5152
|
width: 180,
|
|
5131
|
-
render: (e) => [f("div", {}, { default: () => e.createBy }), f("div", {}, { default: () =>
|
|
5153
|
+
render: (e) => [f("div", {}, { default: () => e.createBy }), f("div", {}, { default: () => At(e.createTime, "yyyy-MM-dd hh:mm:ss") })]
|
|
5132
5154
|
}, {
|
|
5133
5155
|
title: s("Table.updatedByTime"),
|
|
5134
5156
|
key: "updateTime",
|
|
@@ -5137,64 +5159,64 @@ var Qa = d({
|
|
|
5137
5159
|
show: !0,
|
|
5138
5160
|
ellipsis: !0,
|
|
5139
5161
|
width: 180,
|
|
5140
|
-
render: (e) => [f("div", {}, { default: () => e.updateBy }), f("div", {}, { default: () =>
|
|
5141
|
-
}],
|
|
5162
|
+
render: (e) => [f("div", {}, { default: () => e.updateBy }), f("div", {}, { default: () => At(e.updateTime, "yyyy-MM-dd hh:mm:ss") })]
|
|
5163
|
+
}], ye = (t) => a?.remainingDays < 0 && t === "add" ? !0 : !e.ruleFetch || !N.value || N.value && N.value[0] === "*" ? !1 : !N.value?.includes(t), be = async (e) => {
|
|
5142
5164
|
let { form: t, fillingDefaultValue: n, formDefaultValue: r } = await wi(P.value, e, () => m.value?.getFormValues());
|
|
5143
5165
|
return x.value = t, {
|
|
5144
5166
|
form: t,
|
|
5145
5167
|
fillingDefaultValue: n,
|
|
5146
5168
|
formDefaultValue: r
|
|
5147
5169
|
};
|
|
5148
|
-
},
|
|
5149
|
-
|
|
5170
|
+
}, xe = async (e) => new Promise((t, n) => {
|
|
5171
|
+
de(e).then((e) => {
|
|
5150
5172
|
t(e && e[0]);
|
|
5151
5173
|
}).catch(() => {
|
|
5152
5174
|
n();
|
|
5153
5175
|
});
|
|
5154
|
-
}),
|
|
5155
|
-
let n = await
|
|
5176
|
+
}), Se = async (e, t) => {
|
|
5177
|
+
let n = await xe(e).catch(() => {}), { form: r, fillingDefaultValue: i } = await be(n || {}), a = {
|
|
5156
5178
|
...n,
|
|
5157
5179
|
...i
|
|
5158
5180
|
};
|
|
5159
5181
|
if (t && typeof t == "string") try {
|
|
5160
5182
|
a = await Function("rowData", "POST", "fnNotification", t)(a, Z, c).catch(() => null);
|
|
5161
5183
|
} catch (e) {
|
|
5162
|
-
|
|
5184
|
+
q(e);
|
|
5163
5185
|
}
|
|
5164
5186
|
let o = I.value.when_drawer_open;
|
|
5165
5187
|
if (o && typeof o == "string") try {
|
|
5166
5188
|
a = await Function("data", "POST", o)(a, Z).catch((e) => {
|
|
5167
|
-
|
|
5189
|
+
q(e);
|
|
5168
5190
|
});
|
|
5169
5191
|
} catch (e) {
|
|
5170
|
-
|
|
5192
|
+
q(e);
|
|
5171
5193
|
}
|
|
5172
5194
|
return {
|
|
5173
5195
|
form: r,
|
|
5174
5196
|
data: a
|
|
5175
5197
|
};
|
|
5176
|
-
},
|
|
5177
|
-
let i =
|
|
5198
|
+
}, Ce = (n, r) => {
|
|
5199
|
+
let i = G(n.onClick), a = e.id || o.params.id;
|
|
5178
5200
|
if (n.disabled) {
|
|
5179
5201
|
if (typeof n.disabled == "string") {
|
|
5180
5202
|
let e = Function("rowData", "rowIndex", n.disabled);
|
|
5181
|
-
n.disabled = (t, r) => e(t, r) ||
|
|
5203
|
+
n.disabled = (t, r) => e(t, r) || ye(n.key);
|
|
5182
5204
|
} else if (typeof n.disabled == "function") {
|
|
5183
|
-
let e =
|
|
5184
|
-
n.disabled = (t, r) => e.disabled(t, r) ||
|
|
5205
|
+
let e = G(n);
|
|
5206
|
+
n.disabled = (t, r) => e.disabled(t, r) || ye(n.key);
|
|
5185
5207
|
}
|
|
5186
|
-
} else n.disabled = () =>
|
|
5208
|
+
} else n.disabled = () => ye(n.key);
|
|
5187
5209
|
if (n.loading = _.value, n.type !== "group" && n.optionsType) n.onClick = async (e) => {
|
|
5188
|
-
|
|
5210
|
+
xe(e).then((r) => {
|
|
5189
5211
|
if (n.optionsType === "drawer:insider") {
|
|
5190
5212
|
if (i) try {
|
|
5191
5213
|
Function("rowData", "POST", "fnNotification", i)(r, Z, c).then((e) => {
|
|
5192
5214
|
m.value?.link(n.optionsSource || "", void 0, e);
|
|
5193
5215
|
}).catch((e) => {
|
|
5194
|
-
|
|
5216
|
+
q(e);
|
|
5195
5217
|
});
|
|
5196
5218
|
} catch (e) {
|
|
5197
|
-
|
|
5219
|
+
q(e);
|
|
5198
5220
|
}
|
|
5199
5221
|
} else t("update:suffixes", {
|
|
5200
5222
|
title: n.buttonText,
|
|
@@ -5211,17 +5233,17 @@ var Qa = d({
|
|
|
5211
5233
|
}).catch(() => null);
|
|
5212
5234
|
};
|
|
5213
5235
|
else if (n.type !== "group" && n.action === "detailInside") {
|
|
5214
|
-
let t =
|
|
5236
|
+
let t = G(n.onClick);
|
|
5215
5237
|
n.onClick = (n) => {
|
|
5216
|
-
m.value?.addAndEdit(e.id || o.params.id, () =>
|
|
5238
|
+
m.value?.addAndEdit(e.id || o.params.id, () => Se(n, t), R.value, I.value, 2, je);
|
|
5217
5239
|
};
|
|
5218
5240
|
} else if (n.type !== "group" && n.action === "editInside") {
|
|
5219
|
-
let t =
|
|
5241
|
+
let t = G(n.onClick);
|
|
5220
5242
|
n.onClick = (n) => {
|
|
5221
|
-
m.value?.addAndEdit(e.id || o.params.id, () =>
|
|
5243
|
+
m.value?.addAndEdit(e.id || o.params.id, () => Se(n, t), R.value, I.value, 1, je);
|
|
5222
5244
|
};
|
|
5223
5245
|
} else if (n.type !== "group" && n.action === "deleteInside") {
|
|
5224
|
-
let t =
|
|
5246
|
+
let t = G(n.onClick);
|
|
5225
5247
|
n.onClick = (n) => {
|
|
5226
5248
|
let i;
|
|
5227
5249
|
i = e.deleteFetch ? e.deleteFetch({
|
|
@@ -5235,14 +5257,14 @@ var Qa = d({
|
|
|
5235
5257
|
}), i.then(() => {
|
|
5236
5258
|
if (t) try {
|
|
5237
5259
|
Function("rowData", "fnNotification", "POST", t)(n, c, Z).then(() => {
|
|
5238
|
-
|
|
5260
|
+
V();
|
|
5239
5261
|
}).catch(() => null);
|
|
5240
5262
|
} catch (e) {
|
|
5241
|
-
|
|
5263
|
+
q(e);
|
|
5242
5264
|
}
|
|
5243
|
-
else
|
|
5265
|
+
else V();
|
|
5244
5266
|
}).catch((e) => {
|
|
5245
|
-
|
|
5267
|
+
q(e);
|
|
5246
5268
|
});
|
|
5247
5269
|
};
|
|
5248
5270
|
} else if (n.type !== "group" && n.action === "disabledInside") n.onClick = (t) => {
|
|
@@ -5251,7 +5273,7 @@ var Qa = d({
|
|
|
5251
5273
|
...t,
|
|
5252
5274
|
is_disabled: "1"
|
|
5253
5275
|
}).then(() => {
|
|
5254
|
-
|
|
5276
|
+
V();
|
|
5255
5277
|
}).catch(() => null);
|
|
5256
5278
|
};
|
|
5257
5279
|
else if (n.type !== "group" && n.action === "enabledInside") n.onClick = (t) => {
|
|
@@ -5260,13 +5282,13 @@ var Qa = d({
|
|
|
5260
5282
|
...t,
|
|
5261
5283
|
is_disabled: "0"
|
|
5262
5284
|
}).then(() => {
|
|
5263
|
-
|
|
5285
|
+
V();
|
|
5264
5286
|
}).catch(() => null);
|
|
5265
5287
|
};
|
|
5266
5288
|
else if (n.type !== "group" && n.action) {
|
|
5267
|
-
let e =
|
|
5289
|
+
let e = G(n.onClick);
|
|
5268
5290
|
n.onClick = (t) => {
|
|
5269
|
-
|
|
5291
|
+
de(t).then((t) => {
|
|
5270
5292
|
let r = t && t[0];
|
|
5271
5293
|
tr([n.action], r.id, r).then((t) => {
|
|
5272
5294
|
if (e && typeof e == "string") try {
|
|
@@ -5274,34 +5296,34 @@ var Qa = d({
|
|
|
5274
5296
|
c.success({
|
|
5275
5297
|
content: e,
|
|
5276
5298
|
duration: 3e3
|
|
5277
|
-
}),
|
|
5299
|
+
}), V();
|
|
5278
5300
|
}).catch((e) => {
|
|
5279
|
-
|
|
5301
|
+
q(e);
|
|
5280
5302
|
});
|
|
5281
5303
|
} catch (e) {
|
|
5282
|
-
|
|
5304
|
+
q(e);
|
|
5283
5305
|
}
|
|
5284
5306
|
else e && typeof e == "function" ? e(r, t, () => {
|
|
5285
5307
|
c.success({
|
|
5286
5308
|
content: () => s("Notice.success"),
|
|
5287
5309
|
duration: 3e3
|
|
5288
|
-
}),
|
|
5310
|
+
}), V();
|
|
5289
5311
|
}) : (c.success({
|
|
5290
5312
|
content: () => s("Notice.success"),
|
|
5291
5313
|
duration: 3e3
|
|
5292
|
-
}),
|
|
5314
|
+
}), V());
|
|
5293
5315
|
}).catch(() => {
|
|
5294
5316
|
c.error({
|
|
5295
5317
|
content: () => s("Notice.failed"),
|
|
5296
5318
|
duration: 3e3
|
|
5297
|
-
}),
|
|
5319
|
+
}), V();
|
|
5298
5320
|
});
|
|
5299
5321
|
}).catch(() => null);
|
|
5300
5322
|
};
|
|
5301
5323
|
}
|
|
5302
|
-
},
|
|
5303
|
-
|
|
5304
|
-
let { tableColumns: n, search: r, subTableIds: i, subTableExpand: a } = await Ti(P.value, e.child, 0, () => ({}),
|
|
5324
|
+
}, we = async () => {
|
|
5325
|
+
z.value = !1, hi();
|
|
5326
|
+
let { tableColumns: n, search: r, subTableIds: i, subTableExpand: a } = await Ti(P.value, e.child, 0, () => ({}), ie);
|
|
5305
5327
|
!l.value && R.value.index && n.unshift({
|
|
5306
5328
|
title: "#",
|
|
5307
5329
|
key: "index",
|
|
@@ -5327,11 +5349,11 @@ var Qa = d({
|
|
|
5327
5349
|
options: ["all", "none"]
|
|
5328
5350
|
});
|
|
5329
5351
|
let c = e.id || o.params.id;
|
|
5330
|
-
if (!l.value && R.value.commonTime && n.push(...
|
|
5331
|
-
let e =
|
|
5352
|
+
if (!l.value && R.value.commonTime && n.push(...ve()), e.enableAction === !0 && F.value && F.value.length > 0) {
|
|
5353
|
+
let e = G(F.value);
|
|
5332
5354
|
for (let t of e) t.type === "group" ? t.children.forEach((e) => {
|
|
5333
|
-
|
|
5334
|
-
}) :
|
|
5355
|
+
Ce(e, i);
|
|
5356
|
+
}) : Ce(t, i);
|
|
5335
5357
|
let t = {
|
|
5336
5358
|
title: () => s("Common.action"),
|
|
5337
5359
|
key: "action",
|
|
@@ -5346,7 +5368,7 @@ var Qa = d({
|
|
|
5346
5368
|
return ur({
|
|
5347
5369
|
buttons: e,
|
|
5348
5370
|
rowData: t,
|
|
5349
|
-
callback:
|
|
5371
|
+
callback: V,
|
|
5350
5372
|
tableId: c
|
|
5351
5373
|
});
|
|
5352
5374
|
}
|
|
@@ -5355,10 +5377,10 @@ var Qa = d({
|
|
|
5355
5377
|
}
|
|
5356
5378
|
let u = n;
|
|
5357
5379
|
if (c) {
|
|
5358
|
-
let e =
|
|
5380
|
+
let e = Y(`tables_filter_${c}`, !1);
|
|
5359
5381
|
if (e) try {
|
|
5360
5382
|
let t = await $n(c);
|
|
5361
|
-
t && (e = JSON.parse(t), u =
|
|
5383
|
+
t && (e = JSON.parse(t), u = Rt(n, e));
|
|
5362
5384
|
} catch {}
|
|
5363
5385
|
}
|
|
5364
5386
|
a.link && u.unshift({
|
|
@@ -5369,8 +5391,8 @@ var Qa = d({
|
|
|
5369
5391
|
fixed: "left",
|
|
5370
5392
|
filter: "default",
|
|
5371
5393
|
filterOptionValue: null,
|
|
5372
|
-
renderFilterMenu: () => f("div", { class: "uz-table-filter" }, [f(L, { onClick:
|
|
5373
|
-
renderExpand: (e) => f(
|
|
5394
|
+
renderFilterMenu: () => f("div", { class: "uz-table-filter" }, [f(L, { onClick: Re }, { default: () => s("Common.expand") }), f(L, { onClick: ze }, { default: () => s("Common.contract") })]),
|
|
5395
|
+
renderExpand: (e) => f(qa, {
|
|
5374
5396
|
data: a,
|
|
5375
5397
|
value: e
|
|
5376
5398
|
})
|
|
@@ -5379,23 +5401,23 @@ var Qa = d({
|
|
|
5379
5401
|
u.forEach((e) => {
|
|
5380
5402
|
e.show && (d += Number(e.width || 140));
|
|
5381
5403
|
}), C.value = u, A.value = r, D.value = d;
|
|
5382
|
-
},
|
|
5404
|
+
}, Te = (e) => typeof e == "number" ? `${e}px` : e, Ee = () => {
|
|
5383
5405
|
if (e.height) {
|
|
5384
|
-
let t =
|
|
5406
|
+
let t = Te(e.height);
|
|
5385
5407
|
ee.value = t, j.value = t;
|
|
5386
5408
|
}
|
|
5387
|
-
},
|
|
5409
|
+
}, De = (t) => {
|
|
5388
5410
|
let n = e.id || o.params.id;
|
|
5389
5411
|
if (n) {
|
|
5390
5412
|
let e = 0;
|
|
5391
5413
|
C.value.forEach((t) => {
|
|
5392
5414
|
t.show && (e += Number(t.width || 140));
|
|
5393
|
-
}), D.value = e,
|
|
5415
|
+
}), D.value = e, J(`tables_filter_${n}`, t.filter((e) => e.key)), er({
|
|
5394
5416
|
table_id: n,
|
|
5395
5417
|
data: JSON.stringify(t)
|
|
5396
5418
|
}).catch(() => null);
|
|
5397
5419
|
}
|
|
5398
|
-
}, { run:
|
|
5420
|
+
}, { run: Oe } = Yr(De), { run: ke } = Yr((e, t) => {
|
|
5399
5421
|
let n = [];
|
|
5400
5422
|
C.value.forEach((r) => {
|
|
5401
5423
|
r.key !== "action" && r.key !== "index" && r.type !== "expand" && n.push({
|
|
@@ -5405,8 +5427,8 @@ var Qa = d({
|
|
|
5405
5427
|
fixed: r.fixed,
|
|
5406
5428
|
width: r.key === t ? Number(e.toFixed(0)) : r.width
|
|
5407
5429
|
});
|
|
5408
|
-
}),
|
|
5409
|
-
}),
|
|
5430
|
+
}), De(n);
|
|
5431
|
+
}), Ae = () => {
|
|
5410
5432
|
let e = [];
|
|
5411
5433
|
C.value.forEach((t) => {
|
|
5412
5434
|
t.key !== "action" && t.key !== "index" && t.type !== "expand" && e.push({
|
|
@@ -5416,8 +5438,8 @@ var Qa = d({
|
|
|
5416
5438
|
fixed: t.fixed,
|
|
5417
5439
|
width: t.width
|
|
5418
5440
|
});
|
|
5419
|
-
}),
|
|
5420
|
-
},
|
|
5441
|
+
}), Oe(e);
|
|
5442
|
+
}, je = (t, n, r) => {
|
|
5421
5443
|
let i, a = e.id || o.params.id;
|
|
5422
5444
|
i = e.formFetch ? e.formFetch({
|
|
5423
5445
|
tableId: a,
|
|
@@ -5425,27 +5447,39 @@ var Qa = d({
|
|
|
5425
5447
|
}) : Zn({
|
|
5426
5448
|
tableId: a,
|
|
5427
5449
|
...t
|
|
5428
|
-
}), i.then(() => {
|
|
5429
|
-
|
|
5450
|
+
}), i.then((e) => {
|
|
5451
|
+
if (I.value.when_after_save) try {
|
|
5452
|
+
let r = I.value.when_after_save;
|
|
5453
|
+
Function("data", "POST", "res", r)(t, Z, e).then(() => {
|
|
5454
|
+
V(), n();
|
|
5455
|
+
}).catch(() => {
|
|
5456
|
+
ne.value = s("Notice.network"), z.value = !0;
|
|
5457
|
+
});
|
|
5458
|
+
} catch {
|
|
5459
|
+
ne.value = s("Notice.network"), z.value = !0;
|
|
5460
|
+
return;
|
|
5461
|
+
}
|
|
5462
|
+
else V(), n();
|
|
5430
5463
|
}).catch((e) => {
|
|
5431
5464
|
r(e);
|
|
5432
5465
|
});
|
|
5433
|
-
},
|
|
5466
|
+
}, Me = () => {
|
|
5434
5467
|
b.value = "", P.value = [], F.value = [], te.value = [], I.value = {
|
|
5435
5468
|
fetch: null,
|
|
5436
5469
|
fetchFn: "",
|
|
5437
5470
|
when_drawer_open: "",
|
|
5438
|
-
when_before_save: ""
|
|
5471
|
+
when_before_save: "",
|
|
5472
|
+
when_after_save: ""
|
|
5439
5473
|
}, R.value = Ci();
|
|
5440
|
-
},
|
|
5441
|
-
let n =
|
|
5474
|
+
}, Ne = (t) => {
|
|
5475
|
+
let n = et.parse(t.viewJson);
|
|
5442
5476
|
b.value = t.tableTitle, P.value = yi(n.table), F.value = vr(e.actions || n.action);
|
|
5443
5477
|
let r = vr(n.suffix || []);
|
|
5444
|
-
te.value = r.filter((e) => e.main).map((e) => (
|
|
5478
|
+
te.value = r.filter((e) => e.main).map((e) => (Fe(e), e)), I.value = xi(n.trigger);
|
|
5445
5479
|
let i = Ci(e.options ?? n.option);
|
|
5446
|
-
t.tableTitle && i.title &&
|
|
5447
|
-
},
|
|
5448
|
-
v.value = !1,
|
|
5480
|
+
t.tableTitle && i.title && jt(t.tableTitle), R.value = i;
|
|
5481
|
+
}, Pe = async () => {
|
|
5482
|
+
v.value = !1, Me();
|
|
5449
5483
|
let t = e.id || o.params.id;
|
|
5450
5484
|
if (k.value = {
|
|
5451
5485
|
params: [],
|
|
@@ -5457,17 +5491,17 @@ var Qa = d({
|
|
|
5457
5491
|
}, E.value = [], e.ruleFetch) try {
|
|
5458
5492
|
N.value = await e.ruleFetch(t);
|
|
5459
5493
|
} catch {
|
|
5460
|
-
ne.value = s("Notice.network"),
|
|
5494
|
+
ne.value = s("Notice.network"), z.value = !0;
|
|
5461
5495
|
return;
|
|
5462
5496
|
}
|
|
5463
|
-
|
|
5464
|
-
|
|
5497
|
+
Ee(), e.columns ? (P.value = e.columns || [], F.value = e.actions || [], te.value = e.suffixes || [], R.value = Ci(e.options), await we()) : await _i(t).then(async (e) => {
|
|
5498
|
+
Ne(e), await we();
|
|
5465
5499
|
}).catch((e) => {
|
|
5466
|
-
ne.value = e?.message || s("Notice.network"),
|
|
5500
|
+
ne.value = e?.message || s("Notice.network"), z.value = !0;
|
|
5467
5501
|
});
|
|
5468
|
-
},
|
|
5502
|
+
}, Fe = (e) => {
|
|
5469
5503
|
if (e.type !== "group" && e.optionsType) {
|
|
5470
|
-
let n =
|
|
5504
|
+
let n = G(e.onClick);
|
|
5471
5505
|
e.onClick = () => {
|
|
5472
5506
|
t("update:suffixes", {
|
|
5473
5507
|
isTop: !0,
|
|
@@ -5477,58 +5511,58 @@ var Qa = d({
|
|
|
5477
5511
|
open: e.optionsType,
|
|
5478
5512
|
onClick: n,
|
|
5479
5513
|
optionsSource: e.optionsSource,
|
|
5480
|
-
mainFormValue: () =>
|
|
5514
|
+
mainFormValue: () => B.value,
|
|
5481
5515
|
tableData: () => E.value,
|
|
5482
5516
|
children: null,
|
|
5483
5517
|
callback: null
|
|
5484
5518
|
});
|
|
5485
5519
|
};
|
|
5486
5520
|
} else if (e.type !== "group") {
|
|
5487
|
-
let t =
|
|
5521
|
+
let t = G(e.onClick);
|
|
5488
5522
|
e.onClick = async () => {
|
|
5489
5523
|
if (t && typeof t == "string") try {
|
|
5490
5524
|
let e = Function("rowData", "POST", "fnNotification", t);
|
|
5491
|
-
await e(
|
|
5525
|
+
await e(B.value, Z, c, e), V();
|
|
5492
5526
|
} catch (e) {
|
|
5493
|
-
|
|
5527
|
+
q(e);
|
|
5494
5528
|
}
|
|
5495
5529
|
};
|
|
5496
5530
|
}
|
|
5497
|
-
},
|
|
5531
|
+
}, Ie = () => {
|
|
5498
5532
|
if (_.value) return;
|
|
5499
5533
|
_.value = !0;
|
|
5500
5534
|
let t = e.id || o.params.id;
|
|
5501
|
-
t && (
|
|
5535
|
+
t && (Tt(`tables_filter_${t}`), er({
|
|
5502
5536
|
table_id: t,
|
|
5503
5537
|
data: null
|
|
5504
5538
|
}).catch(() => null).finally(() => {
|
|
5505
|
-
|
|
5539
|
+
we(), _.value = !1;
|
|
5506
5540
|
}));
|
|
5507
|
-
},
|
|
5508
|
-
|
|
5509
|
-
},
|
|
5541
|
+
}, Le = (e, t, n) => {
|
|
5542
|
+
ke(e, n.key);
|
|
5543
|
+
}, Re = () => {
|
|
5510
5544
|
O.value = E.value.map((e) => e.id);
|
|
5511
|
-
},
|
|
5545
|
+
}, ze = () => {
|
|
5512
5546
|
O.value = [];
|
|
5513
5547
|
};
|
|
5514
5548
|
return r({
|
|
5515
|
-
rebuild:
|
|
5516
|
-
init:
|
|
5517
|
-
nextPage:
|
|
5549
|
+
rebuild: Pe,
|
|
5550
|
+
init: V,
|
|
5551
|
+
nextPage: pe
|
|
5518
5552
|
}), y(async () => {
|
|
5519
|
-
await
|
|
5553
|
+
await Pe(), h(() => {
|
|
5520
5554
|
d.value?.scrollTo({
|
|
5521
5555
|
left: 0,
|
|
5522
5556
|
right: 0
|
|
5523
5557
|
});
|
|
5524
5558
|
});
|
|
5525
5559
|
}), M(() => e.height, () => {
|
|
5526
|
-
|
|
5560
|
+
Ee();
|
|
5527
5561
|
}), M([() => o.params.id, () => e.id], async () => {
|
|
5528
|
-
|
|
5562
|
+
Ot(), await Pe();
|
|
5529
5563
|
}), M(() => e.defaultCheckedRowKeys, (e) => {
|
|
5530
|
-
let t = e || [], n =
|
|
5531
|
-
|
|
5564
|
+
let t = e || [], n = B.value.filter((e) => t.includes(e.id));
|
|
5565
|
+
re.value = t, B.value = n;
|
|
5532
5566
|
}, { deep: !0 }), {
|
|
5533
5567
|
t: s,
|
|
5534
5568
|
loading: _,
|
|
@@ -5547,44 +5581,44 @@ var Qa = d({
|
|
|
5547
5581
|
spinMsg: ne,
|
|
5548
5582
|
tableScrollX: D,
|
|
5549
5583
|
suffixes: te,
|
|
5550
|
-
spinError:
|
|
5584
|
+
spinError: z,
|
|
5551
5585
|
isMobile: l,
|
|
5552
5586
|
mRef: u,
|
|
5553
|
-
checkRowKeys:
|
|
5587
|
+
checkRowKeys: re,
|
|
5554
5588
|
route: o,
|
|
5555
|
-
rowKey:
|
|
5556
|
-
pageChange:
|
|
5557
|
-
pageSizeChange:
|
|
5558
|
-
pageSorter:
|
|
5559
|
-
showChange:
|
|
5560
|
-
submit:
|
|
5561
|
-
handleAdd:
|
|
5562
|
-
handleColumnChange:
|
|
5563
|
-
handleCheckRowKeys:
|
|
5564
|
-
handleExpandedRowKeys:
|
|
5565
|
-
checkRole:
|
|
5566
|
-
rebuild:
|
|
5567
|
-
summaryFn:
|
|
5568
|
-
handleMobileCheckRowKeys:
|
|
5569
|
-
isTypeofNumber:
|
|
5570
|
-
resetFilter:
|
|
5571
|
-
handleColumnResize:
|
|
5589
|
+
rowKey: ae,
|
|
5590
|
+
pageChange: fe,
|
|
5591
|
+
pageSizeChange: me,
|
|
5592
|
+
pageSorter: he,
|
|
5593
|
+
showChange: ge,
|
|
5594
|
+
submit: _e,
|
|
5595
|
+
handleAdd: H,
|
|
5596
|
+
handleColumnChange: Ae,
|
|
5597
|
+
handleCheckRowKeys: se,
|
|
5598
|
+
handleExpandedRowKeys: ce,
|
|
5599
|
+
checkRole: ye,
|
|
5600
|
+
rebuild: Pe,
|
|
5601
|
+
summaryFn: le,
|
|
5602
|
+
handleMobileCheckRowKeys: oe,
|
|
5603
|
+
isTypeofNumber: Te,
|
|
5604
|
+
resetFilter: Ie,
|
|
5605
|
+
handleColumnResize: Le,
|
|
5572
5606
|
expandedRowKeys: O,
|
|
5573
|
-
handleExpandAll:
|
|
5574
|
-
handleContractAll:
|
|
5607
|
+
handleExpandAll: Re,
|
|
5608
|
+
handleContractAll: ze,
|
|
5575
5609
|
doPortChange: () => {
|
|
5576
|
-
|
|
5610
|
+
V();
|
|
5577
5611
|
}
|
|
5578
5612
|
};
|
|
5579
5613
|
}
|
|
5580
|
-
}),
|
|
5614
|
+
}), eo = { class: "uz-com-title" }, to = {
|
|
5581
5615
|
ref: "mRef",
|
|
5582
5616
|
class: "uz-table-m-content"
|
|
5583
|
-
},
|
|
5617
|
+
}, no = {
|
|
5584
5618
|
key: 1,
|
|
5585
5619
|
class: "uz-transform-fade-in"
|
|
5586
|
-
},
|
|
5587
|
-
function
|
|
5620
|
+
}, ro = { class: "uz-com-title" }, io = ["data-index"];
|
|
5621
|
+
function ao(t, n, u, d, f, p) {
|
|
5588
5622
|
let m = D("SkeletonLoading"), h = D("NButton"), v = D("UzIcon"), y = D("NIcon"), b = D("UzActionButton"), S = D("UzSearchMobileBar"), C = D("UzTableMobile"), w = D("NCheckbox"), O = D("VueDraggable"), k = D("NPopover"), ee = D("UzTableFile"), M = D("UzSearchBar"), N = D("NDataTable"), te = D("NSpin"), I = D("UzTableDrawer");
|
|
5589
5623
|
return x(), a("div", {
|
|
5590
5624
|
class: "uz-table",
|
|
@@ -5649,7 +5683,7 @@ function io(t, n, u, d, f, p) {
|
|
|
5649
5683
|
key: "0"
|
|
5650
5684
|
} : {
|
|
5651
5685
|
name: "header",
|
|
5652
|
-
fn: P(() => [o("div",
|
|
5686
|
+
fn: P(() => [o("div", eo, A(t.title), 1)]),
|
|
5653
5687
|
key: "1"
|
|
5654
5688
|
}]), 1032, [
|
|
5655
5689
|
"data",
|
|
@@ -5657,7 +5691,7 @@ function io(t, n, u, d, f, p) {
|
|
|
5657
5691
|
"cache",
|
|
5658
5692
|
"loading",
|
|
5659
5693
|
"onOnUpdate:value"
|
|
5660
|
-
]), o("div",
|
|
5694
|
+
]), o("div", to, [l(C, {
|
|
5661
5695
|
tableColumns: t.tableCols,
|
|
5662
5696
|
tableData: t.tableData,
|
|
5663
5697
|
tableQueries: t.tableQueries,
|
|
@@ -5675,7 +5709,7 @@ function io(t, n, u, d, f, p) {
|
|
|
5675
5709
|
"minH",
|
|
5676
5710
|
"maxH",
|
|
5677
5711
|
"onUpdate:rowKeys"
|
|
5678
|
-
])], 512)], 2)) : (x(), a("div",
|
|
5712
|
+
])], 512)], 2)) : (x(), a("div", no, [l(M, {
|
|
5679
5713
|
data: t.searchData,
|
|
5680
5714
|
id: t.id || t.route.params.id,
|
|
5681
5715
|
cache: t.tableOption.cache,
|
|
@@ -5730,7 +5764,7 @@ function io(t, n, u, d, f, p) {
|
|
|
5730
5764
|
_: 1
|
|
5731
5765
|
})]),
|
|
5732
5766
|
_: 1
|
|
5733
|
-
})], 8,
|
|
5767
|
+
})], 8, io)), [[j, !e.hide]])), 128)), l(h, {
|
|
5734
5768
|
block: "",
|
|
5735
5769
|
tertiary: "",
|
|
5736
5770
|
loading: t.loading,
|
|
@@ -5784,7 +5818,7 @@ function io(t, n, u, d, f, p) {
|
|
|
5784
5818
|
key: "0"
|
|
5785
5819
|
} : {
|
|
5786
5820
|
name: "header",
|
|
5787
|
-
fn: P(() => [o("div",
|
|
5821
|
+
fn: P(() => [o("div", ro, A(t.title), 1)]),
|
|
5788
5822
|
key: "1"
|
|
5789
5823
|
}]), 1032, [
|
|
5790
5824
|
"data",
|
|
@@ -5845,16 +5879,16 @@ function io(t, n, u, d, f, p) {
|
|
|
5845
5879
|
l(I, { ref: "drawerRef" }, null, 512)
|
|
5846
5880
|
], 4);
|
|
5847
5881
|
}
|
|
5848
|
-
var
|
|
5882
|
+
var oo = /*#__PURE__*/ Q($a, [["render", ao]]), so = d({
|
|
5849
5883
|
name: "UzTableChild",
|
|
5850
5884
|
components: {
|
|
5851
|
-
UzIcon:
|
|
5852
|
-
NSpin:
|
|
5885
|
+
UzIcon: Kt,
|
|
5886
|
+
NSpin: je,
|
|
5853
5887
|
NButton: L,
|
|
5854
|
-
NIcon:
|
|
5855
|
-
NDataTable:
|
|
5856
|
-
NForm:
|
|
5857
|
-
NDivider:
|
|
5888
|
+
NIcon: H,
|
|
5889
|
+
NDataTable: ae,
|
|
5890
|
+
NForm: fe,
|
|
5891
|
+
NDivider: se
|
|
5858
5892
|
},
|
|
5859
5893
|
props: {
|
|
5860
5894
|
value: {
|
|
@@ -5873,13 +5907,13 @@ var ao = /*#__PURE__*/ Q(Qa, [["render", io]]), oo = d({
|
|
|
5873
5907
|
},
|
|
5874
5908
|
emits: ["update:value"],
|
|
5875
5909
|
setup(e, { emit: t, expose: r }) {
|
|
5876
|
-
let i = p("emitSuffix"), a = p("modules"), o = p("mainFormValue"), s = p("childFormReload"), c = n(() => s ? s() : 0), { t: l } =
|
|
5877
|
-
let { formDefaultValue: r, fillingDefaultArray: i } = await wi(
|
|
5910
|
+
let i = p("emitSuffix"), a = p("modules"), o = p("mainFormValue"), s = p("childFormReload"), c = n(() => s ? s() : 0), { t: l } = W(), u = w(), d = w(), m = w(), g = w(!1), _ = w(!0), y = w([]), b = w({ child: [] }), x = w(""), S = w({}), C = w([]), T = w(void 0), E = async (t, n) => {
|
|
5911
|
+
let { formDefaultValue: r, fillingDefaultArray: i } = await wi(G(n ?? e.item.params.columns), t, void 0, !0);
|
|
5878
5912
|
return S.value = r, i;
|
|
5879
5913
|
}, D = async (t) => {
|
|
5880
5914
|
if (g.value) return;
|
|
5881
5915
|
g.value = !0;
|
|
5882
|
-
let n = await E(t), r =
|
|
5916
|
+
let n = await E(t), r = G(t).map((e, t) => ({
|
|
5883
5917
|
...e,
|
|
5884
5918
|
...n[t]
|
|
5885
5919
|
}));
|
|
@@ -5895,7 +5929,7 @@ var ao = /*#__PURE__*/ Q(Qa, [["render", io]]), oo = d({
|
|
|
5895
5929
|
let t = e.item.params.merge;
|
|
5896
5930
|
r = await Function("formValue", "mainFormValue", "POST", t)(r, o, Z);
|
|
5897
5931
|
} catch (e) {
|
|
5898
|
-
|
|
5932
|
+
q(e);
|
|
5899
5933
|
}
|
|
5900
5934
|
b.value.child = r, g.value = !1, h(() => {
|
|
5901
5935
|
F();
|
|
@@ -5905,7 +5939,7 @@ var ao = /*#__PURE__*/ Q(Qa, [["render", io]]), oo = d({
|
|
|
5905
5939
|
});
|
|
5906
5940
|
}, O = (e) => e.delete ? "uz-table-child-delete" : "", k = async (t, n = !1) => {
|
|
5907
5941
|
e.item._suffix && (C.value = e.item._suffix.filter((e) => e.sub)), await E(e.value, t);
|
|
5908
|
-
let { tableColumns: r, tableWidth: i } = await Ti(
|
|
5942
|
+
let { tableColumns: r, tableWidth: i } = await Ti(G(t ?? e.item.params.columns), !0, e.status, () => b.value.child, a, n), s = i;
|
|
5909
5943
|
r.unshift({
|
|
5910
5944
|
title: " ",
|
|
5911
5945
|
key: "index",
|
|
@@ -5924,7 +5958,7 @@ var ao = /*#__PURE__*/ Q(Qa, [["render", io]]), oo = d({
|
|
|
5924
5958
|
hide: !0,
|
|
5925
5959
|
show: !0,
|
|
5926
5960
|
render() {
|
|
5927
|
-
return f("div", { class: "flex justify-center" }, f(
|
|
5961
|
+
return f("div", { class: "flex justify-center" }, f(H, {}, { default: () => f(Kt, { icon: "List" }) }));
|
|
5928
5962
|
}
|
|
5929
5963
|
}), s += 40), e.status !== 2 && e.item.params.showActions && r.push({
|
|
5930
5964
|
title: () => l("Common.action"),
|
|
@@ -5967,12 +6001,12 @@ var ao = /*#__PURE__*/ Q(Qa, [["render", io]]), oo = d({
|
|
|
5967
6001
|
let n = e.item.params.summary;
|
|
5968
6002
|
return Function("pageData", "h", n)(t, f);
|
|
5969
6003
|
} catch (e) {
|
|
5970
|
-
|
|
6004
|
+
q(e);
|
|
5971
6005
|
}
|
|
5972
6006
|
}
|
|
5973
6007
|
return [];
|
|
5974
6008
|
}, ee = async () => {
|
|
5975
|
-
x.value = "", b.value.child.push(
|
|
6009
|
+
x.value = "", b.value.child.push(G(S.value)), h(() => {
|
|
5976
6010
|
F();
|
|
5977
6011
|
});
|
|
5978
6012
|
}, j = async () => {
|
|
@@ -6003,7 +6037,7 @@ var ao = /*#__PURE__*/ Q(Qa, [["render", io]]), oo = d({
|
|
|
6003
6037
|
}
|
|
6004
6038
|
});
|
|
6005
6039
|
} catch (e) {
|
|
6006
|
-
|
|
6040
|
+
q(e);
|
|
6007
6041
|
}
|
|
6008
6042
|
}, N = () => {
|
|
6009
6043
|
m.value?.restoreValidation();
|
|
@@ -6015,11 +6049,11 @@ var ao = /*#__PURE__*/ Q(Qa, [["render", io]]), oo = d({
|
|
|
6015
6049
|
})), F = () => {
|
|
6016
6050
|
if (e.item.params.draggable && e.status !== 2 && u.value && !d.value) {
|
|
6017
6051
|
let e = u.value.$el.querySelector(".n-data-table-tbody");
|
|
6018
|
-
e && (d.value =
|
|
6052
|
+
e && (d.value = tt.create(e, {
|
|
6019
6053
|
handle: ".uz-drag-handle",
|
|
6020
6054
|
onEnd: ({ oldIndex: e, newIndex: t }) => {
|
|
6021
6055
|
d.value?.destroy(), d.value = null, _.value = !1;
|
|
6022
|
-
let n =
|
|
6056
|
+
let n = G(b.value.child), r = n.splice(e, 1)[0];
|
|
6023
6057
|
n.splice(t, 0, r), n = n.map((e, t) => ({
|
|
6024
6058
|
...e,
|
|
6025
6059
|
sort_index: t
|
|
@@ -6078,14 +6112,14 @@ var ao = /*#__PURE__*/ Q(Qa, [["render", io]]), oo = d({
|
|
|
6078
6112
|
}
|
|
6079
6113
|
};
|
|
6080
6114
|
}
|
|
6081
|
-
}),
|
|
6115
|
+
}), co = { class: "uz-flex-1 uz-w-full" }, lo = { class: "uz-flex uz-justify-between" }, uo = { class: "uz-com-title" }, fo = {
|
|
6082
6116
|
key: 0,
|
|
6083
6117
|
class: "uz-table-asterisk"
|
|
6084
|
-
},
|
|
6085
|
-
function
|
|
6118
|
+
}, po = { class: "uz-flex uz-gap-2" }, mo = { class: "uz-flex uz-justify-end uz-gap-2" };
|
|
6119
|
+
function ho(t, n, u, d, f, p) {
|
|
6086
6120
|
let m = D("UzIcon"), h = D("NIcon"), _ = D("NButton"), v = D("NDataTable"), y = D("NForm");
|
|
6087
|
-
return x(), a("div",
|
|
6088
|
-
o("div",
|
|
6121
|
+
return x(), a("div", co, [
|
|
6122
|
+
o("div", lo, [o("div", uo, [c(A(t.item.label) + " ", 1), t.item.form.rule.required ? (x(), a("span", fo, " \xA0* ")) : i("", !0)]), o("div", po, [
|
|
6089
6123
|
t.status === 2 ? i("", !0) : (x(!0), a(e, { key: 0 }, T(t.suffixes, (e) => (x(), r(_, {
|
|
6090
6124
|
key: e.key,
|
|
6091
6125
|
type: e.color,
|
|
@@ -6158,7 +6192,7 @@ function mo(t, n, u, d, f, p) {
|
|
|
6158
6192
|
"scroll-x",
|
|
6159
6193
|
"class",
|
|
6160
6194
|
"row-class-name"
|
|
6161
|
-
])) : i("", !0), o("div",
|
|
6195
|
+
])) : i("", !0), o("div", mo, [t.item.params.optionsType && t.status !== 2 && (t.item.form.edit ? !t.item.form.edit.readonly : !t.item.form.readonly) ? (x(), r(_, {
|
|
6162
6196
|
key: 0,
|
|
6163
6197
|
type: "success",
|
|
6164
6198
|
secondary: "",
|
|
@@ -6187,9 +6221,9 @@ function mo(t, n, u, d, f, p) {
|
|
|
6187
6221
|
}, 8, ["model"])
|
|
6188
6222
|
]);
|
|
6189
6223
|
}
|
|
6190
|
-
var
|
|
6224
|
+
var go = /*#__PURE__*/ Q(so, [["render", ho]]), _o = d({
|
|
6191
6225
|
name: "UzTableQuestChild",
|
|
6192
|
-
components: { NDataTable:
|
|
6226
|
+
components: { NDataTable: ae },
|
|
6193
6227
|
props: {
|
|
6194
6228
|
formValue: {
|
|
6195
6229
|
type: Object,
|
|
@@ -6203,7 +6237,7 @@ var ho = /*#__PURE__*/ Q(oo, [["render", mo]]), go = d({
|
|
|
6203
6237
|
},
|
|
6204
6238
|
emits: ["update:value"],
|
|
6205
6239
|
setup(e) {
|
|
6206
|
-
let t = p("modules"), { t: n } =
|
|
6240
|
+
let t = p("modules"), { t: n } = W(), r = w(), i = w(!1), a = w([]), o = w([]), s = w(void 0), c = (t) => {
|
|
6207
6241
|
if (i.value = !0, e.item.params.link) {
|
|
6208
6242
|
let n = [];
|
|
6209
6243
|
e.item.params.columns.forEach((e) => {
|
|
@@ -6215,7 +6249,7 @@ var ho = /*#__PURE__*/ Q(oo, [["render", mo]]), go = d({
|
|
|
6215
6249
|
}), o.value = t, i.value = !1;
|
|
6216
6250
|
}
|
|
6217
6251
|
}, l = async (i) => {
|
|
6218
|
-
let { tableColumns: c, tableWidth: l } = await Ti(
|
|
6252
|
+
let { tableColumns: c, tableWidth: l } = await Ti(G(i ?? e.item.params.columns), !0, 2, () => o.value, t), u = l;
|
|
6219
6253
|
c.unshift({
|
|
6220
6254
|
title: " ",
|
|
6221
6255
|
key: "index",
|
|
@@ -6281,7 +6315,7 @@ var ho = /*#__PURE__*/ Q(oo, [["render", mo]]), go = d({
|
|
|
6281
6315
|
let n = e.item.params.summary;
|
|
6282
6316
|
return Function("pageData", "h", n)(t, f);
|
|
6283
6317
|
} catch (e) {
|
|
6284
|
-
|
|
6318
|
+
q(e);
|
|
6285
6319
|
}
|
|
6286
6320
|
}
|
|
6287
6321
|
return [];
|
|
@@ -6289,11 +6323,11 @@ var ho = /*#__PURE__*/ Q(oo, [["render", mo]]), go = d({
|
|
|
6289
6323
|
tableScrollX: s
|
|
6290
6324
|
};
|
|
6291
6325
|
}
|
|
6292
|
-
}),
|
|
6293
|
-
function
|
|
6326
|
+
}), vo = { class: "uz-flex-1 uz-w-full" }, yo = { class: "uz-flex uz-justify-between" }, bo = { class: "uz-com-title" };
|
|
6327
|
+
function xo(e, t, n, r, i, s) {
|
|
6294
6328
|
let c = D("NDataTable"), u = D("UzTableDrawer");
|
|
6295
|
-
return x(), a("div",
|
|
6296
|
-
o("div",
|
|
6329
|
+
return x(), a("div", vo, [
|
|
6330
|
+
o("div", yo, [o("div", bo, A(e.item.label), 1)]),
|
|
6297
6331
|
t[0] ||= o("div", { class: "uz-br" }, null, -1),
|
|
6298
6332
|
l(c, {
|
|
6299
6333
|
columns: e.columns,
|
|
@@ -6315,20 +6349,20 @@ function bo(e, t, n, r, i, s) {
|
|
|
6315
6349
|
l(u, { ref: "drawerRef" }, null, 512)
|
|
6316
6350
|
]);
|
|
6317
6351
|
}
|
|
6318
|
-
var
|
|
6352
|
+
var So = /*#__PURE__*/ Q(_o, [["render", xo]]), Co = d({
|
|
6319
6353
|
name: "UzTableDrawer",
|
|
6320
6354
|
components: {
|
|
6321
6355
|
NButton: L,
|
|
6322
|
-
NDrawerContent:
|
|
6323
|
-
NDrawer:
|
|
6324
|
-
NSkeleton:
|
|
6325
|
-
NSpin:
|
|
6326
|
-
NPopover:
|
|
6327
|
-
NModal:
|
|
6356
|
+
NDrawerContent: le,
|
|
6357
|
+
NDrawer: ce,
|
|
6358
|
+
NSkeleton: ke,
|
|
6359
|
+
NSpin: je,
|
|
6360
|
+
NPopover: Te,
|
|
6361
|
+
NModal: Se
|
|
6328
6362
|
},
|
|
6329
6363
|
emits: ["update:show", "on-submit"],
|
|
6330
6364
|
setup(e, { emit: t, expose: r }) {
|
|
6331
|
-
let { t: i } =
|
|
6365
|
+
let { t: i } = W(), a = n(() => X.isMobile), o = w(), s = w(""), c = w(0), l = w({}), u = w({
|
|
6332
6366
|
link: "",
|
|
6333
6367
|
linkFn: ""
|
|
6334
6368
|
}), d = w(!1), f = w({
|
|
@@ -6352,11 +6386,12 @@ var xo = /*#__PURE__*/ Q(go, [["render", bo]]), So = d({
|
|
|
6352
6386
|
fetch: null,
|
|
6353
6387
|
fetchFn: "",
|
|
6354
6388
|
when_drawer_open: "",
|
|
6355
|
-
when_before_save: ""
|
|
6389
|
+
when_before_save: "",
|
|
6390
|
+
when_after_save: ""
|
|
6356
6391
|
}), x = w(!1), S = w(), C = () => {
|
|
6357
6392
|
o.value?.restoreValidation(), l.value = {}, m.value = !1, p.value = !1, d.value = !1, t("update:show", !1);
|
|
6358
6393
|
}, T = () => {
|
|
6359
|
-
c.value === 2 ? C() :
|
|
6394
|
+
c.value === 2 ? C() : wt.info({
|
|
6360
6395
|
title: i("Common.hint"),
|
|
6361
6396
|
content: i("Table.closeConfirm"),
|
|
6362
6397
|
positiveText: i("Common.confirm"),
|
|
@@ -6372,10 +6407,10 @@ var xo = /*#__PURE__*/ Q(go, [["render", bo]]), So = d({
|
|
|
6372
6407
|
Function("formValues", "POST", t)(e, Z).then((e) => {
|
|
6373
6408
|
l.value = e;
|
|
6374
6409
|
}).catch((e) => {
|
|
6375
|
-
|
|
6410
|
+
q(e);
|
|
6376
6411
|
});
|
|
6377
6412
|
} catch (e) {
|
|
6378
|
-
|
|
6413
|
+
q(e);
|
|
6379
6414
|
}
|
|
6380
6415
|
else l.value = e;
|
|
6381
6416
|
};
|
|
@@ -6389,11 +6424,11 @@ var xo = /*#__PURE__*/ Q(go, [["render", bo]]), So = d({
|
|
|
6389
6424
|
let r = e.split(".")[0];
|
|
6390
6425
|
_i(r).then((e) => {
|
|
6391
6426
|
h(async () => {
|
|
6392
|
-
let t =
|
|
6427
|
+
let t = et.parse(e.viewJson);
|
|
6393
6428
|
f.value = Ci(t.option), d.value = !0;
|
|
6394
6429
|
let { form: i } = await wi(yi(t.table), n);
|
|
6395
6430
|
b.value = t.trigger, n && E(n);
|
|
6396
|
-
let a =
|
|
6431
|
+
let a = Y(`tables_cache_link_${r}`, !1);
|
|
6397
6432
|
a && (l.value = a), h(() => {
|
|
6398
6433
|
y.value = i, g.value = !1;
|
|
6399
6434
|
});
|
|
@@ -6405,7 +6440,7 @@ var xo = /*#__PURE__*/ Q(go, [["render", bo]]), So = d({
|
|
|
6405
6440
|
},
|
|
6406
6441
|
addAndEdit: async (e, t, n, r, i = 0, a) => {
|
|
6407
6442
|
s.value = e, g.value = !0, c.value = i, f.value = n, b.value = r, d.value = !0, t().then(({ form: t, data: n }) => {
|
|
6408
|
-
let r =
|
|
6443
|
+
let r = Y(`tables_cache_${e}`, !1);
|
|
6409
6444
|
r && i === 0 ? l.value = r : l.value = n, y.value = t, S.value = a, g.value = !1;
|
|
6410
6445
|
}).catch(() => null);
|
|
6411
6446
|
},
|
|
@@ -6440,7 +6475,7 @@ var xo = /*#__PURE__*/ Q(go, [["render", bo]]), So = d({
|
|
|
6440
6475
|
return;
|
|
6441
6476
|
}
|
|
6442
6477
|
if (S.value) S.value(e, () => {
|
|
6443
|
-
|
|
6478
|
+
Tt(`tables_cache_${s.value}`), C();
|
|
6444
6479
|
}, (e) => {
|
|
6445
6480
|
v.value = 1, _.value = e;
|
|
6446
6481
|
});
|
|
@@ -6461,7 +6496,7 @@ var xo = /*#__PURE__*/ Q(go, [["render", bo]]), So = d({
|
|
|
6461
6496
|
disabled: e?.status === "0",
|
|
6462
6497
|
params: e
|
|
6463
6498
|
}));
|
|
6464
|
-
m.value = !1,
|
|
6499
|
+
m.value = !1, Tt(`tables_cache_link_${n}`), t("on-submit", i), C();
|
|
6465
6500
|
}).catch((e) => {
|
|
6466
6501
|
v.value = 1, _.value = e;
|
|
6467
6502
|
});
|
|
@@ -6475,19 +6510,19 @@ var xo = /*#__PURE__*/ Q(go, [["render", bo]]), So = d({
|
|
|
6475
6510
|
},
|
|
6476
6511
|
doCacheToStore: () => {
|
|
6477
6512
|
let e = o.value?.getValues();
|
|
6478
|
-
if (S.value)
|
|
6513
|
+
if (S.value) J(`tables_cache_${s.value}`, e, "1 Hours"), C();
|
|
6479
6514
|
else {
|
|
6480
6515
|
let t = u.value.link.split(".")[0];
|
|
6481
|
-
|
|
6516
|
+
J(`tables_cache_link_${t}`, e, "1 Hours"), C();
|
|
6482
6517
|
}
|
|
6483
6518
|
}
|
|
6484
6519
|
};
|
|
6485
6520
|
}
|
|
6486
|
-
}),
|
|
6521
|
+
}), wo = { class: "uz-flex uz-flex-col uz-gap-2 uz-h-full" }, To = {
|
|
6487
6522
|
key: 0,
|
|
6488
6523
|
class: "uz-grid uz-grid-cols-2 uz-gap-2"
|
|
6489
|
-
},
|
|
6490
|
-
function
|
|
6524
|
+
}, Eo = { class: "uz-flex uz-justify-between uz-gap-2 uz-w-full" }, Do = { class: "uz-flex uz-gap-2" };
|
|
6525
|
+
function Oo(t, n, u, d, f, p) {
|
|
6491
6526
|
let m = D("NSkeleton"), h = D("UzForm"), g = D("UzSpin"), _ = D("NSpin"), v = D("NButton"), y = D("NPopover"), b = D("NDrawerContent"), S = D("NDrawer"), C = D("UzOcr"), w = D("NModal");
|
|
6492
6527
|
return x(), a(e, null, [l(S, {
|
|
6493
6528
|
show: t.drawer,
|
|
@@ -6513,7 +6548,7 @@ function Do(t, n, u, d, f, p) {
|
|
|
6513
6548
|
message: t.spinMsg,
|
|
6514
6549
|
status: t.spinStatus
|
|
6515
6550
|
}, {
|
|
6516
|
-
default: P(() => [o("div",
|
|
6551
|
+
default: P(() => [o("div", wo, [t.skeletonShow ? (x(), a("div", To, [
|
|
6517
6552
|
l(m, {
|
|
6518
6553
|
size: "large",
|
|
6519
6554
|
style: { height: "156px" }
|
|
@@ -6576,7 +6611,7 @@ function Do(t, n, u, d, f, p) {
|
|
|
6576
6611
|
_: 2
|
|
6577
6612
|
}, [t.formStatus === 2 ? void 0 : {
|
|
6578
6613
|
name: "footer",
|
|
6579
|
-
fn: P(() => [o("div",
|
|
6614
|
+
fn: P(() => [o("div", Eo, [t.isMobile ? i("", !0) : (x(), r(v, {
|
|
6580
6615
|
key: 0,
|
|
6581
6616
|
loading: t.spinShow,
|
|
6582
6617
|
type: "success",
|
|
@@ -6585,7 +6620,7 @@ function Do(t, n, u, d, f, p) {
|
|
|
6585
6620
|
}, {
|
|
6586
6621
|
default: P(() => [c(A(t.t("OCR.ocr")), 1)]),
|
|
6587
6622
|
_: 1
|
|
6588
|
-
}, 8, ["loading"])), o("div",
|
|
6623
|
+
}, 8, ["loading"])), o("div", Do, [
|
|
6589
6624
|
l(v, {
|
|
6590
6625
|
loading: t.spinShow,
|
|
6591
6626
|
class: "uz-drawer-button",
|
|
@@ -6653,7 +6688,7 @@ function Do(t, n, u, d, f, p) {
|
|
|
6653
6688
|
_: 1
|
|
6654
6689
|
}, 8, ["show", "title"])], 64);
|
|
6655
6690
|
}
|
|
6656
|
-
var
|
|
6691
|
+
var ko = /*#__PURE__*/ Q(Co, [["render", Oo]]), Ao = d({
|
|
6657
6692
|
name: "UzTableMobileList",
|
|
6658
6693
|
props: {
|
|
6659
6694
|
tableData: {
|
|
@@ -6671,12 +6706,12 @@ var Oo = /*#__PURE__*/ Q(So, [["render", Do]]), ko = d({
|
|
|
6671
6706
|
},
|
|
6672
6707
|
emits: ["update:row-keys"],
|
|
6673
6708
|
setup() {}
|
|
6674
|
-
}),
|
|
6709
|
+
}), jo = { class: "uz-grid uz-grid-cols-2 uz-gap-2" }, Mo = {
|
|
6675
6710
|
key: 1,
|
|
6676
6711
|
class: "uz-table-mobile-group-txt"
|
|
6677
6712
|
};
|
|
6678
|
-
function
|
|
6679
|
-
return x(), a("div",
|
|
6713
|
+
function No(t, n, s, c, l, u) {
|
|
6714
|
+
return x(), a("div", jo, [(x(!0), a(e, null, T(t.tableColumns, (n) => (x(), a("div", {
|
|
6680
6715
|
key: n.key,
|
|
6681
6716
|
class: g(["uz-flex uz-overflow-hidden", n.lineBreak ? "uz-flex-col" : ""]),
|
|
6682
6717
|
style: _(`grid-column: span ${n.lineCol || 2} / span ${n.lineCol || 2}`)
|
|
@@ -6687,19 +6722,19 @@ function Mo(t, n, s, c, l, u) {
|
|
|
6687
6722
|
class: "mobile"
|
|
6688
6723
|
})) : i("", !0)], 64)) : (x(), a(e, { key: 1 }, [o("div", { class: g(["uz-table-mobile-group-title", n.lineBreak ? "line-break" : ""]) }, [o("div", null, A(typeof n.title == "string" ? n.title : n.title()), 1)], 2), o("div", { class: g(["uz-table-mobile-group-content", n.lineBreak ? "line-break" : ""]) }, [n.render ? (x(), r(k(() => {
|
|
6689
6724
|
if (t.tableData) return n.render(t.tableData, t.tableIndex);
|
|
6690
|
-
}), { key: 0 })) : (x(), a("div",
|
|
6725
|
+
}), { key: 0 })) : (x(), a("div", Mo, A(t.tableData[n.key] || "-"), 1))], 2)], 64))], 6))), 128))]);
|
|
6691
6726
|
}
|
|
6692
6727
|
//#endregion
|
|
6693
6728
|
//#region components/table/mobile.vue?vue&type=script&lang.ts
|
|
6694
|
-
var
|
|
6729
|
+
var Po = d({
|
|
6695
6730
|
name: "UzTableMobile",
|
|
6696
6731
|
components: {
|
|
6697
|
-
NCheckbox:
|
|
6698
|
-
NRadio:
|
|
6699
|
-
NPagination:
|
|
6700
|
-
NCheckboxGroup:
|
|
6701
|
-
NRadioGroup:
|
|
6702
|
-
UzTableMobileList: /* @__PURE__ */ Q(
|
|
6732
|
+
NCheckbox: z,
|
|
6733
|
+
NRadio: Ee,
|
|
6734
|
+
NPagination: Ce,
|
|
6735
|
+
NCheckboxGroup: re,
|
|
6736
|
+
NRadioGroup: De,
|
|
6737
|
+
UzTableMobileList: /* @__PURE__ */ Q(Ao, [["render", No], ["__scopeId", "data-v-84c394fe"]])
|
|
6703
6738
|
},
|
|
6704
6739
|
props: {
|
|
6705
6740
|
tableData: {
|
|
@@ -6746,17 +6781,17 @@ var No = d({
|
|
|
6746
6781
|
}
|
|
6747
6782
|
};
|
|
6748
6783
|
}
|
|
6749
|
-
}),
|
|
6784
|
+
}), Fo = {
|
|
6750
6785
|
key: 0,
|
|
6751
6786
|
class: "uz-flex uz-justify-center uz-text-center uz-pb-4"
|
|
6752
|
-
},
|
|
6787
|
+
}, Io = {
|
|
6753
6788
|
key: 0,
|
|
6754
6789
|
class: "uz-flex uz-justify-center uz-text-center uz-pb-4"
|
|
6755
|
-
},
|
|
6790
|
+
}, Lo = {
|
|
6756
6791
|
key: 0,
|
|
6757
6792
|
class: "uz-flex uz-justify-center uz-text-center uz-pb-4"
|
|
6758
6793
|
};
|
|
6759
|
-
function
|
|
6794
|
+
function Ro(t, n, o, s, c, u) {
|
|
6760
6795
|
let d = D("UzTableMobileList"), f = D("NCheckbox"), p = D("NPagination"), m = D("NCheckboxGroup"), h = D("NRadio"), g = D("NRadioGroup");
|
|
6761
6796
|
return t.selection === 2 ? (x(), r(m, {
|
|
6762
6797
|
key: 0,
|
|
@@ -6783,7 +6818,7 @@ function Lo(t, n, o, s, c, u) {
|
|
|
6783
6818
|
"tableColumns"
|
|
6784
6819
|
])]),
|
|
6785
6820
|
_: 2
|
|
6786
|
-
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div",
|
|
6821
|
+
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div", Fo, [l(p, {
|
|
6787
6822
|
page: t.tableQueries.query.page,
|
|
6788
6823
|
"onUpdate:page": [n[0] ||= (e) => t.tableQueries.query.page = e, t.pageChange],
|
|
6789
6824
|
"item-count": t.tableQueries.query.itemCount,
|
|
@@ -6825,7 +6860,7 @@ function Lo(t, n, o, s, c, u) {
|
|
|
6825
6860
|
"tableColumns"
|
|
6826
6861
|
])]),
|
|
6827
6862
|
_: 2
|
|
6828
|
-
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div",
|
|
6863
|
+
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div", Io, [l(p, {
|
|
6829
6864
|
page: t.tableQueries.query.page,
|
|
6830
6865
|
"onUpdate:page": [n[2] ||= (e) => t.tableQueries.query.page = e, t.pageChange],
|
|
6831
6866
|
"item-count": t.tableQueries.query.itemCount,
|
|
@@ -6860,7 +6895,7 @@ function Lo(t, n, o, s, c, u) {
|
|
|
6860
6895
|
"tableData",
|
|
6861
6896
|
"tableIndex",
|
|
6862
6897
|
"tableColumns"
|
|
6863
|
-
])]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div",
|
|
6898
|
+
])]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div", Lo, [l(p, {
|
|
6864
6899
|
page: t.tableQueries.query.page,
|
|
6865
6900
|
"onUpdate:page": [n[4] ||= (e) => t.tableQueries.query.page = e, t.pageChange],
|
|
6866
6901
|
"item-count": t.tableQueries.query.itemCount,
|
|
@@ -6873,17 +6908,17 @@ function Lo(t, n, o, s, c, u) {
|
|
|
6873
6908
|
"onUpdate:page"
|
|
6874
6909
|
])])) : i("", !0)], 4));
|
|
6875
6910
|
}
|
|
6876
|
-
var
|
|
6911
|
+
var zo = /*#__PURE__*/ Q(Po, [["render", Ro], ["__scopeId", "data-v-70b54e3b"]]), Bo = d({
|
|
6877
6912
|
name: "UzTableFile",
|
|
6878
6913
|
components: {
|
|
6879
|
-
UzIcon:
|
|
6880
|
-
NDropdown:
|
|
6914
|
+
UzIcon: Kt,
|
|
6915
|
+
NDropdown: ue,
|
|
6881
6916
|
NButton: L,
|
|
6882
|
-
NModal:
|
|
6883
|
-
NUpload:
|
|
6884
|
-
NSpace:
|
|
6885
|
-
NIcon:
|
|
6886
|
-
NDataTable:
|
|
6917
|
+
NModal: Se,
|
|
6918
|
+
NUpload: Le,
|
|
6919
|
+
NSpace: Ae,
|
|
6920
|
+
NIcon: H,
|
|
6921
|
+
NDataTable: ae
|
|
6887
6922
|
},
|
|
6888
6923
|
props: {
|
|
6889
6924
|
query: {
|
|
@@ -6899,14 +6934,14 @@ var Ro = /*#__PURE__*/ Q(No, [["render", Lo], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
6899
6934
|
},
|
|
6900
6935
|
emits: ["on-update:change"],
|
|
6901
6936
|
setup(e, { emit: t }) {
|
|
6902
|
-
let { t: n } =
|
|
6937
|
+
let { t: n } = W(), r = qe(), i = Ve(), a = w(!1), o = w(!1), s = w(!1), c = w([]), l = w(new FormData()), u = w([{
|
|
6903
6938
|
label: n("Common.import"),
|
|
6904
6939
|
key: "import",
|
|
6905
|
-
icon: () => f(
|
|
6940
|
+
icon: () => f(H, null, { default: () => f(Kt, { icon: "CloudUpload" }) })
|
|
6906
6941
|
}, {
|
|
6907
6942
|
label: n("Common.export"),
|
|
6908
6943
|
key: "export",
|
|
6909
|
-
icon: () => f(
|
|
6944
|
+
icon: () => f(H, null, { default: () => f(Kt, { icon: "CloudDownload" }) })
|
|
6910
6945
|
}]), d = w([
|
|
6911
6946
|
{
|
|
6912
6947
|
title: n("Common.fileName"),
|
|
@@ -6982,7 +7017,7 @@ var Ro = /*#__PURE__*/ Q(No, [["render", Lo], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
6982
7017
|
rawFileName: c,
|
|
6983
7018
|
dropOption: u,
|
|
6984
7019
|
dropSelect: (t) => {
|
|
6985
|
-
t === "import" ? (a.value = !0, v()) : t === "export" &&
|
|
7020
|
+
t === "import" ? (a.value = !0, v()) : t === "export" && wt.info({
|
|
6986
7021
|
title: n("Common.hint"),
|
|
6987
7022
|
content: n("File.exportConfirm"),
|
|
6988
7023
|
positiveText: n("Common.confirm"),
|
|
@@ -7012,11 +7047,11 @@ var Ro = /*#__PURE__*/ Q(No, [["render", Lo], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
7012
7047
|
}
|
|
7013
7048
|
};
|
|
7014
7049
|
}
|
|
7015
|
-
}),
|
|
7050
|
+
}), Vo = { class: "uz-file-port-modal" }, Ho = { class: "uz-file-port-card" }, Uo = { class: "uz-file-port-subtitle" }, Wo = {
|
|
7016
7051
|
key: 1,
|
|
7017
7052
|
class: "uz-file-port-panel"
|
|
7018
|
-
},
|
|
7019
|
-
function
|
|
7053
|
+
}, Go = { class: "uz-file-port-subtitle" }, Ko = { class: "uz-flex uz-justify-between" }, qo = { class: "uz-com-title" };
|
|
7054
|
+
function Jo(t, n, i, s, u, d) {
|
|
7020
7055
|
let f = D("UzIcon"), p = D("NIcon"), m = D("NButton"), h = D("NDropdown"), g = D("NUpload"), _ = D("NSpace"), v = D("NDataTable"), y = D("NModal");
|
|
7021
7056
|
return x(), a(e, null, [l(h, {
|
|
7022
7057
|
trigger: "hover",
|
|
@@ -7051,8 +7086,8 @@ function qo(t, n, i, s, u, d) {
|
|
|
7051
7086
|
default: P(() => [c(A(t.t("File.downloadTemplate")), 1)]),
|
|
7052
7087
|
_: 1
|
|
7053
7088
|
}, 8, ["onClick"])]),
|
|
7054
|
-
default: P(() => [o("div",
|
|
7055
|
-
t.rawFile ? (x(), a("div",
|
|
7089
|
+
default: P(() => [o("div", Vo, [
|
|
7090
|
+
t.rawFile ? (x(), a("div", Wo, [
|
|
7056
7091
|
n[2] ||= o("div", { class: "uz-file-port-icon" }, [o("svg", {
|
|
7057
7092
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7058
7093
|
viewBox: "0 0 24 24",
|
|
@@ -7061,7 +7096,7 @@ function qo(t, n, i, s, u, d) {
|
|
|
7061
7096
|
fill: "currentColor"
|
|
7062
7097
|
}, [o("path", { d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z" })])], -1),
|
|
7063
7098
|
o("div", null, A(t.rawFileName.join(",")), 1),
|
|
7064
|
-
o("div",
|
|
7099
|
+
o("div", Go, A(t.t("File.importWaitTip")), 1),
|
|
7065
7100
|
l(_, { justify: "space-between" }, {
|
|
7066
7101
|
default: P(() => [l(m, {
|
|
7067
7102
|
size: "small",
|
|
@@ -7091,16 +7126,16 @@ function qo(t, n, i, s, u, d) {
|
|
|
7091
7126
|
multiple: "",
|
|
7092
7127
|
class: "uz-w-full"
|
|
7093
7128
|
}, {
|
|
7094
|
-
default: P(() => [o("div",
|
|
7129
|
+
default: P(() => [o("div", Ho, [n[1] ||= o("div", { class: "uz-file-port-icon" }, [o("svg", {
|
|
7095
7130
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7096
7131
|
viewBox: "0 0 24 24",
|
|
7097
7132
|
width: "40",
|
|
7098
7133
|
height: "40",
|
|
7099
7134
|
fill: "currentColor"
|
|
7100
|
-
}, [o("path", { d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z" })])], -1), o("div",
|
|
7135
|
+
}, [o("path", { d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z" })])], -1), o("div", Uo, A(t.t("File.uploadExcelTip")), 1)])]),
|
|
7101
7136
|
_: 1
|
|
7102
7137
|
}, 8, ["on-before-upload"])),
|
|
7103
|
-
o("div",
|
|
7138
|
+
o("div", Ko, [o("div", qo, A(t.t("File.importHistory")), 1), l(m, {
|
|
7104
7139
|
onClick: t.init,
|
|
7105
7140
|
loading: t.loading,
|
|
7106
7141
|
secondary: ""
|
|
@@ -7127,9 +7162,9 @@ function qo(t, n, i, s, u, d) {
|
|
|
7127
7162
|
"on-after-leave"
|
|
7128
7163
|
])], 64);
|
|
7129
7164
|
}
|
|
7130
|
-
var
|
|
7165
|
+
var Yo = /*#__PURE__*/ Q(Bo, [["render", Jo], ["__scopeId", "data-v-d8e581ec"]]), $ = C({
|
|
7131
7166
|
page: {
|
|
7132
|
-
label:
|
|
7167
|
+
label: K.global.t("Common.home"),
|
|
7133
7168
|
key: "/",
|
|
7134
7169
|
path: "/",
|
|
7135
7170
|
closable: !1
|
|
@@ -7138,14 +7173,14 @@ var Jo = /*#__PURE__*/ Q(zo, [["render", qo], ["__scopeId", "data-v-d8e581ec"]])
|
|
|
7138
7173
|
active: "/",
|
|
7139
7174
|
thumbnail: []
|
|
7140
7175
|
});
|
|
7141
|
-
function
|
|
7176
|
+
function Xo(e) {
|
|
7142
7177
|
$.cache = e.cache, $.page = {
|
|
7143
7178
|
label: e.label,
|
|
7144
7179
|
key: e.key,
|
|
7145
7180
|
path: e.key,
|
|
7146
7181
|
closable: !1
|
|
7147
7182
|
};
|
|
7148
|
-
let t =
|
|
7183
|
+
let t = Y($.cache, !1);
|
|
7149
7184
|
t ? ($.active = t.active, t.thumbnail && ($.thumbnail = t.thumbnail)) : $.thumbnail = [{
|
|
7150
7185
|
label: e.label,
|
|
7151
7186
|
key: e.key,
|
|
@@ -7153,79 +7188,79 @@ function Yo(e) {
|
|
|
7153
7188
|
closable: !1
|
|
7154
7189
|
}];
|
|
7155
7190
|
}
|
|
7156
|
-
function
|
|
7157
|
-
$.active = e,
|
|
7191
|
+
function Zo(e) {
|
|
7192
|
+
$.active = e, qt.push(e), J($.cache, $, 0);
|
|
7158
7193
|
}
|
|
7159
|
-
function
|
|
7194
|
+
function Qo(e, t) {
|
|
7160
7195
|
let n = $.thumbnail.find((t) => t.key === e);
|
|
7161
|
-
n && (n.key = t, $.active = t,
|
|
7196
|
+
n && (n.key = t, $.active = t, J($.cache, $, 0));
|
|
7162
7197
|
}
|
|
7163
|
-
function
|
|
7198
|
+
function $o(e) {
|
|
7164
7199
|
let t = $.thumbnail.find((t) => t.path === e.key);
|
|
7165
|
-
t ? ($.active = t.key,
|
|
7200
|
+
t ? ($.active = t.key, J($.cache, $, 0), qt.push(t.key)) : ($.active = e.key, $.thumbnail.push({
|
|
7166
7201
|
...e,
|
|
7167
7202
|
path: e.key,
|
|
7168
7203
|
closable: !0
|
|
7169
|
-
}),
|
|
7204
|
+
}), qt.push(e.key));
|
|
7170
7205
|
}
|
|
7171
|
-
function
|
|
7206
|
+
function es(e) {
|
|
7172
7207
|
let t = $.thumbnail.findIndex((t) => t.key === e);
|
|
7173
7208
|
if ($.thumbnail.splice(t, 1), $.active === e) {
|
|
7174
7209
|
let e = $.thumbnail[t - 1]?.key || "";
|
|
7175
|
-
$.active = e,
|
|
7210
|
+
$.active = e, qt.push(e);
|
|
7176
7211
|
}
|
|
7177
|
-
|
|
7212
|
+
J($.cache, $, 0);
|
|
7178
7213
|
}
|
|
7179
|
-
function
|
|
7180
|
-
$.active = $.page.path, $.thumbnail = [$.page],
|
|
7214
|
+
function ts() {
|
|
7215
|
+
$.active = $.page.path, $.thumbnail = [$.page], qt.push($.page.path), J($.cache, $, 0);
|
|
7181
7216
|
}
|
|
7182
7217
|
//#endregion
|
|
7183
7218
|
//#region components/thumbnail/index.vue?vue&type=script&lang.ts
|
|
7184
|
-
var
|
|
7219
|
+
var ns = d({
|
|
7185
7220
|
name: "UzThumbnail",
|
|
7186
7221
|
components: {
|
|
7187
|
-
NTabs:
|
|
7188
|
-
NTabPane:
|
|
7222
|
+
NTabs: Pe,
|
|
7223
|
+
NTabPane: Ne,
|
|
7189
7224
|
NButton: L,
|
|
7190
|
-
NIcon:
|
|
7191
|
-
NPopconfirm:
|
|
7192
|
-
NFlex:
|
|
7225
|
+
NIcon: H,
|
|
7226
|
+
NPopconfirm: we,
|
|
7227
|
+
NFlex: V
|
|
7193
7228
|
},
|
|
7194
7229
|
props: { option: {
|
|
7195
7230
|
type: Object,
|
|
7196
7231
|
default: () => ({
|
|
7197
|
-
label:
|
|
7232
|
+
label: K.global.t("Common.home"),
|
|
7198
7233
|
key: "/",
|
|
7199
7234
|
cache: "thumbnailStore"
|
|
7200
7235
|
})
|
|
7201
7236
|
} },
|
|
7202
7237
|
setup(e, { slots: t }) {
|
|
7203
|
-
let { t: n } =
|
|
7238
|
+
let { t: n } = W(), r = w(!!t.prefix), i = qe();
|
|
7204
7239
|
return y(() => {
|
|
7205
|
-
|
|
7240
|
+
Xo(e.option), $.active !== i.path && Qo(i.path, i.fullPath);
|
|
7206
7241
|
}), M(() => i, (e) => {
|
|
7207
|
-
$.active === i.path &&
|
|
7242
|
+
$.active === i.path && Qo(e.path, e.fullPath);
|
|
7208
7243
|
}, { deep: !0 }), M(() => e.option, (e) => {
|
|
7209
|
-
|
|
7244
|
+
Xo(e);
|
|
7210
7245
|
}, { deep: !0 }), {
|
|
7211
7246
|
t: n,
|
|
7212
7247
|
thumbnailStore: $,
|
|
7213
7248
|
isSlotPrefix: r,
|
|
7214
7249
|
handleClose: (e) => {
|
|
7215
|
-
|
|
7250
|
+
es(e);
|
|
7216
7251
|
},
|
|
7217
7252
|
handleChange: (e) => {
|
|
7218
|
-
|
|
7253
|
+
Zo(e);
|
|
7219
7254
|
},
|
|
7220
7255
|
handleClear: () => {
|
|
7221
|
-
|
|
7256
|
+
ts();
|
|
7222
7257
|
}
|
|
7223
7258
|
};
|
|
7224
7259
|
}
|
|
7225
7260
|
});
|
|
7226
7261
|
//#endregion
|
|
7227
7262
|
//#region components/thumbnail/index.vue
|
|
7228
|
-
function
|
|
7263
|
+
function rs(t, n, i, o, u, d) {
|
|
7229
7264
|
let f = D("NTabPane"), p = D("UzIcon"), m = D("NIcon"), h = D("NButton"), g = D("NPopconfirm"), _ = D("NFlex"), v = D("NTabs");
|
|
7230
7265
|
return x(), r(v, {
|
|
7231
7266
|
value: t.thumbnailStore.active,
|
|
@@ -7274,33 +7309,33 @@ function ns(t, n, i, o, u, d) {
|
|
|
7274
7309
|
"on-update:value"
|
|
7275
7310
|
]);
|
|
7276
7311
|
}
|
|
7277
|
-
var
|
|
7278
|
-
|
|
7279
|
-
var
|
|
7312
|
+
var is = /*#__PURE__*/ Q(ns, [["render", rs]]), as = "#007AFF", os = "#0A84FF", ss = "#FF9500", cs = "#FF9F0A", ls = "#28CD41", us = "#32D74B", ds = "#FFCC00", fs = "#FFD60A", ps = "#FF3B30", ms = "#FF453A";
|
|
7313
|
+
U.common.cardColor = "#32323b", U.common.primaryColor = "#0A84FF", U.common.primaryColorHover = os, U.common.infoColor = "#FF9F0A", U.common.infoColorHover = cs, U.common.successColor = "#32D74B", U.common.successColorHover = us, U.common.warningColor = "#FFD60A", U.common.successColorHover = fs, U.common.errorColor = "#FF453A", U.common.errorColorHover = ms, U.common.borderRadius = "var(--borderRadius)", U.common.inputColor = "rgba(var(--input))", U.common.borderColor = "rgba(var(--border), 0.7)", U.DataTable.tdColor = "#2d2d31", U.Scrollbar.width = "8px", U.Scrollbar.height = "8px", U.Scrollbar.borderRadius = "8px", U.Scrollbar.color = "#686873";
|
|
7314
|
+
var hs = {
|
|
7280
7315
|
common: {
|
|
7281
7316
|
inputColor: "rgba(var(--input))",
|
|
7282
7317
|
borderColor: "rgba(var(--border), 0.7)",
|
|
7283
7318
|
borderRadius: "var(--borderRadius)",
|
|
7284
|
-
primaryColor:
|
|
7285
|
-
primaryColorHover:
|
|
7286
|
-
primaryColorPressed:
|
|
7287
|
-
primaryColorSuppl:
|
|
7288
|
-
infoColor:
|
|
7289
|
-
infoColorHover:
|
|
7290
|
-
infoColorPressed:
|
|
7291
|
-
infoColorSuppl:
|
|
7292
|
-
successColor:
|
|
7293
|
-
successColorHover:
|
|
7294
|
-
successColorPressed:
|
|
7295
|
-
successColorSuppl:
|
|
7296
|
-
warningColor:
|
|
7297
|
-
warningColorHover:
|
|
7298
|
-
warningColorPressed:
|
|
7299
|
-
warningColorSuppl:
|
|
7300
|
-
errorColor:
|
|
7301
|
-
errorColorHover:
|
|
7302
|
-
errorColorPressed:
|
|
7303
|
-
errorColorSuppl:
|
|
7319
|
+
primaryColor: as,
|
|
7320
|
+
primaryColorHover: os,
|
|
7321
|
+
primaryColorPressed: as,
|
|
7322
|
+
primaryColorSuppl: as,
|
|
7323
|
+
infoColor: ss,
|
|
7324
|
+
infoColorHover: cs,
|
|
7325
|
+
infoColorPressed: ss,
|
|
7326
|
+
infoColorSuppl: ss,
|
|
7327
|
+
successColor: ls,
|
|
7328
|
+
successColorHover: us,
|
|
7329
|
+
successColorPressed: ls,
|
|
7330
|
+
successColorSuppl: ls,
|
|
7331
|
+
warningColor: ds,
|
|
7332
|
+
warningColorHover: fs,
|
|
7333
|
+
warningColorPressed: ds,
|
|
7334
|
+
warningColorSuppl: ds,
|
|
7335
|
+
errorColor: ps,
|
|
7336
|
+
errorColorHover: ms,
|
|
7337
|
+
errorColorPressed: ps,
|
|
7338
|
+
errorColorSuppl: ps,
|
|
7304
7339
|
cardColor: "#fff"
|
|
7305
7340
|
},
|
|
7306
7341
|
Button: { textColor: "rgb(var(--font))" },
|
|
@@ -7314,22 +7349,22 @@ var ms = {
|
|
|
7314
7349
|
borderRadius: "8px",
|
|
7315
7350
|
color: "#c0c0c0"
|
|
7316
7351
|
}
|
|
7317
|
-
},
|
|
7352
|
+
}, gs = U, _s = d({
|
|
7318
7353
|
name: "UzWrap",
|
|
7319
|
-
components: { NConfigProvider:
|
|
7354
|
+
components: { NConfigProvider: ie },
|
|
7320
7355
|
setup() {
|
|
7321
7356
|
return {
|
|
7322
|
-
zhCN:
|
|
7323
|
-
dateZhCN:
|
|
7324
|
-
commonStore:
|
|
7325
|
-
lightTheme:
|
|
7326
|
-
darkTheme:
|
|
7357
|
+
zhCN: He,
|
|
7358
|
+
dateZhCN: Be,
|
|
7359
|
+
commonStore: X,
|
|
7360
|
+
lightTheme: hs,
|
|
7361
|
+
darkTheme: gs
|
|
7327
7362
|
};
|
|
7328
7363
|
}
|
|
7329
7364
|
});
|
|
7330
7365
|
//#endregion
|
|
7331
7366
|
//#region components/wrap/index.vue
|
|
7332
|
-
function
|
|
7367
|
+
function vs(e, t, n, i, a, o) {
|
|
7333
7368
|
let s = D("NConfigProvider");
|
|
7334
7369
|
return x(), r(s, {
|
|
7335
7370
|
theme: e.commonStore.theme ? { name: "darkTheme" } : null,
|
|
@@ -7348,10 +7383,10 @@ function _s(e, t, n, i, a, o) {
|
|
|
7348
7383
|
"date-locale"
|
|
7349
7384
|
]);
|
|
7350
7385
|
}
|
|
7351
|
-
var
|
|
7386
|
+
var ys = /*#__PURE__*/ Q(_s, [["render", vs]]);
|
|
7352
7387
|
//#endregion
|
|
7353
7388
|
//#region components/ocr/preprocess.ts
|
|
7354
|
-
function
|
|
7389
|
+
function bs(e) {
|
|
7355
7390
|
let t = /* @__PURE__ */ new Int32Array(256), n = e.length;
|
|
7356
7391
|
for (let r = 0; r < n; r++) t[e[r]]++;
|
|
7357
7392
|
let r = 0;
|
|
@@ -7366,7 +7401,7 @@ function ys(e) {
|
|
|
7366
7401
|
}
|
|
7367
7402
|
return c;
|
|
7368
7403
|
}
|
|
7369
|
-
function
|
|
7404
|
+
function xs(e, t) {
|
|
7370
7405
|
return new Promise((n, r) => {
|
|
7371
7406
|
let i = new Image();
|
|
7372
7407
|
i.crossOrigin = "anonymous", i.onload = () => {
|
|
@@ -7399,7 +7434,7 @@ function bs(e, t) {
|
|
|
7399
7434
|
}
|
|
7400
7435
|
let u = t.threshold;
|
|
7401
7436
|
if (t.binarize) {
|
|
7402
|
-
t.autoThreshold && (u =
|
|
7437
|
+
t.autoThreshold && (u = bs(l));
|
|
7403
7438
|
for (let e = 0, t = 0; e < s.length; e += 4, t++) {
|
|
7404
7439
|
let n = l[t] < u ? 0 : 255;
|
|
7405
7440
|
s[e] = n, s[e + 1] = n, s[e + 2] = n;
|
|
@@ -7422,19 +7457,19 @@ function bs(e, t) {
|
|
|
7422
7457
|
}
|
|
7423
7458
|
//#endregion
|
|
7424
7459
|
//#region components/ocr/index.vue?vue&type=script&lang.ts
|
|
7425
|
-
var
|
|
7460
|
+
var Ss = d({
|
|
7426
7461
|
name: "UzOcr",
|
|
7427
7462
|
components: {
|
|
7428
7463
|
NButton: L,
|
|
7429
|
-
NUpload:
|
|
7430
|
-
NSelect:
|
|
7431
|
-
NSwitch:
|
|
7432
|
-
NTabs:
|
|
7433
|
-
NTabPane:
|
|
7434
|
-
NSpace:
|
|
7464
|
+
NUpload: Le,
|
|
7465
|
+
NSelect: Oe,
|
|
7466
|
+
NSwitch: Me,
|
|
7467
|
+
NTabs: Pe,
|
|
7468
|
+
NTabPane: Ne,
|
|
7469
|
+
NSpace: Ae
|
|
7435
7470
|
},
|
|
7436
7471
|
setup() {
|
|
7437
|
-
let { t: e } =
|
|
7472
|
+
let { t: e } = W(), t = w(!1), r = w(e("OCR.scan")), i = w([]), a = w(null), o = w(!0), s = w(3), c = w(!0), l = w(!0), u = w(!0), d = w(128), f = w(""), p = w(""), m = w(128), h = w("processed"), g = n(() => [
|
|
7438
7473
|
{
|
|
7439
7474
|
label: e("OCR.scaleNone"),
|
|
7440
7475
|
value: 1
|
|
@@ -7447,19 +7482,19 @@ var xs = d({
|
|
|
7447
7482
|
label: e("OCR.scale3x"),
|
|
7448
7483
|
value: 3
|
|
7449
7484
|
}
|
|
7450
|
-
]), _ = async () => (a.value ||= await
|
|
7485
|
+
]), _ = async () => (a.value ||= await ot(["eng", "chi_sim"], it.LSTM_ONLY, {
|
|
7451
7486
|
workerPath: "https://unizhen-1369980751.cos.ap-shanghai.myqcloud.com/tesseract/worker.min.js",
|
|
7452
7487
|
corePath: "https://unizhen-1369980751.cos.ap-shanghai.myqcloud.com/tesseract/tesseract-core-simd-lstm.wasm.js"
|
|
7453
7488
|
}), a.value.setParameters({
|
|
7454
|
-
tessedit_pageseg_mode:
|
|
7455
|
-
tessedit_ocr_engine_mode:
|
|
7489
|
+
tessedit_pageseg_mode: at.SINGLE_COLUMN,
|
|
7490
|
+
tessedit_ocr_engine_mode: it.LSTM_ONLY,
|
|
7456
7491
|
user_defined_dpi: "300",
|
|
7457
7492
|
preserve_interword_spaces: "1",
|
|
7458
7493
|
textord_tabfind_vertical_spaces: "0",
|
|
7459
7494
|
tessedit_char_blacklist: "|"
|
|
7460
7495
|
}), a.value), v = async () => {
|
|
7461
7496
|
if (f.value) try {
|
|
7462
|
-
let e = await
|
|
7497
|
+
let e = await xs(f.value, {
|
|
7463
7498
|
enabled: o.value,
|
|
7464
7499
|
scale: s.value,
|
|
7465
7500
|
grayscale: !0,
|
|
@@ -7490,13 +7525,13 @@ var xs = d({
|
|
|
7490
7525
|
let { data: { text: n } } = await t.recognize(e);
|
|
7491
7526
|
return n;
|
|
7492
7527
|
} catch (e) {
|
|
7493
|
-
throw
|
|
7528
|
+
throw q(e), e;
|
|
7494
7529
|
}
|
|
7495
7530
|
}, b = async (n) => {
|
|
7496
7531
|
t.value = !0, r.value = e("OCR.analysis");
|
|
7497
7532
|
let a = n;
|
|
7498
7533
|
if (o.value || s.value > 1) try {
|
|
7499
|
-
let e = await
|
|
7534
|
+
let e = await xs(n, {
|
|
7500
7535
|
enabled: o.value,
|
|
7501
7536
|
scale: s.value,
|
|
7502
7537
|
grayscale: !0,
|
|
@@ -7558,25 +7593,25 @@ var xs = d({
|
|
|
7558
7593
|
t: e
|
|
7559
7594
|
};
|
|
7560
7595
|
}
|
|
7561
|
-
}),
|
|
7596
|
+
}), Cs = { class: "uz-ocr" }, ws = { class: "uz-ocr-left-col" }, Ts = { class: "uz-ocr-upload-card" }, Es = { class: "uz-ocr-upload-title" }, Ds = { class: "uz-ocr-upload-subtitle" }, Os = {
|
|
7562
7597
|
key: 1,
|
|
7563
7598
|
class: "uz-ocr-preview-panel"
|
|
7564
|
-
},
|
|
7599
|
+
}, ks = { class: "uz-ocr-preview-box" }, As = ["src"], js = {
|
|
7565
7600
|
key: 0,
|
|
7566
7601
|
class: "uz-ocr-threshold-badge"
|
|
7567
|
-
},
|
|
7602
|
+
}, Ms = { class: "uz-ocr-preview-box" }, Ns = ["src"], Ps = { class: "uz-ocr-settings-form" }, Fs = { class: "uz-settings-row" }, Is = { class: "uz-settings-label" }, Ls = {
|
|
7568
7603
|
key: 0,
|
|
7569
7604
|
class: "uz-ocr-nested-settings animate-fade-in"
|
|
7570
|
-
},
|
|
7605
|
+
}, Rs = { class: "uz-settings-row" }, zs = { class: "uz-settings-label" }, Bs = { class: "uz-settings-row" }, Vs = { class: "uz-settings-label" }, Hs = { class: "uz-ocr-right-col" }, Us = { class: "uz-ocr-result-header" }, Ws = { class: "uz-result-title" }, Gs = {
|
|
7571
7606
|
key: 0,
|
|
7572
7607
|
class: "uz-ocr-empty-state"
|
|
7573
|
-
},
|
|
7608
|
+
}, Ks = { class: "uz-empty-text" }, qs = {
|
|
7574
7609
|
key: 1,
|
|
7575
7610
|
class: "uz-ocr-result-tabs"
|
|
7576
7611
|
};
|
|
7577
|
-
function
|
|
7612
|
+
function Js(e, t, n, s, u, d) {
|
|
7578
7613
|
let f = D("NUpload"), p = D("NTabPane"), m = D("NTabs"), h = D("NButton"), g = D("NSpace"), _ = D("NSwitch"), v = D("NSelect");
|
|
7579
|
-
return x(), a("div",
|
|
7614
|
+
return x(), a("div", Cs, [o("div", ws, [e.rawImage ? (x(), a("div", Os, [l(m, {
|
|
7580
7615
|
value: e.imagePreviewTab,
|
|
7581
7616
|
"onUpdate:value": t[0] ||= (t) => e.imagePreviewTab = t,
|
|
7582
7617
|
type: "segment",
|
|
@@ -7586,21 +7621,21 @@ function qs(e, t, n, s, u, d) {
|
|
|
7586
7621
|
name: "processed",
|
|
7587
7622
|
tab: e.t("OCR.previewProcessed")
|
|
7588
7623
|
}, {
|
|
7589
|
-
default: P(() => [o("div",
|
|
7624
|
+
default: P(() => [o("div", ks, [o("img", {
|
|
7590
7625
|
src: e.processedImage,
|
|
7591
7626
|
alt: "Processed Preview",
|
|
7592
7627
|
class: "uz-ocr-preview-img"
|
|
7593
|
-
}, null, 8,
|
|
7628
|
+
}, null, 8, As), e.preEnabled && e.preBinarize ? (x(), a("div", js, A(e.preAutoThreshold ? e.t("OCR.autoThreshold") : e.t("OCR.manualThreshold")) + A(e.t("OCR.threshold")) + ": " + A(e.thresholdUsed), 1)) : i("", !0)])]),
|
|
7594
7629
|
_: 1
|
|
7595
7630
|
}, 8, ["tab"]), l(p, {
|
|
7596
7631
|
name: "raw",
|
|
7597
7632
|
tab: e.t("OCR.previewRaw")
|
|
7598
7633
|
}, {
|
|
7599
|
-
default: P(() => [o("div",
|
|
7634
|
+
default: P(() => [o("div", Ms, [o("img", {
|
|
7600
7635
|
src: e.rawImage,
|
|
7601
7636
|
alt: "Raw Preview",
|
|
7602
7637
|
class: "uz-ocr-preview-img"
|
|
7603
|
-
}, null, 8,
|
|
7638
|
+
}, null, 8, Ns)])]),
|
|
7604
7639
|
_: 1
|
|
7605
7640
|
}, 8, ["tab"])]),
|
|
7606
7641
|
_: 1
|
|
@@ -7634,7 +7669,7 @@ function qs(e, t, n, s, u, d) {
|
|
|
7634
7669
|
"directory-dnd": "",
|
|
7635
7670
|
class: "uz-w-full"
|
|
7636
7671
|
}, {
|
|
7637
|
-
default: P(() => [o("div",
|
|
7672
|
+
default: P(() => [o("div", Ts, [
|
|
7638
7673
|
t[4] ||= o("div", { class: "uz-ocr-upload-icon" }, [o("svg", {
|
|
7639
7674
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7640
7675
|
viewBox: "0 0 24 24",
|
|
@@ -7642,77 +7677,77 @@ function qs(e, t, n, s, u, d) {
|
|
|
7642
7677
|
height: "40",
|
|
7643
7678
|
fill: "currentColor"
|
|
7644
7679
|
}, [o("path", { d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z" })])], -1),
|
|
7645
|
-
o("div",
|
|
7646
|
-
o("div",
|
|
7680
|
+
o("div", Es, A(e.t("OCR.scan")), 1),
|
|
7681
|
+
o("div", Ds, A(e.t("OCR.uploadTip")), 1)
|
|
7647
7682
|
])]),
|
|
7648
7683
|
_: 1
|
|
7649
|
-
}, 8, ["on-before-upload"])), o("div",
|
|
7684
|
+
}, 8, ["on-before-upload"])), o("div", Ps, [o("div", Fs, [o("span", Is, A(e.t("OCR.preprocess")), 1), l(_, {
|
|
7650
7685
|
value: e.preEnabled,
|
|
7651
7686
|
"onUpdate:value": t[1] ||= (t) => e.preEnabled = t,
|
|
7652
7687
|
size: "small"
|
|
7653
|
-
}, null, 8, ["value"])]), e.preEnabled ? (x(), a("div",
|
|
7688
|
+
}, null, 8, ["value"])]), e.preEnabled ? (x(), a("div", Ls, [o("div", Rs, [o("span", zs, A(e.t("OCR.scale")), 1), l(v, {
|
|
7654
7689
|
value: e.preScale,
|
|
7655
7690
|
"onUpdate:value": t[2] ||= (t) => e.preScale = t,
|
|
7656
7691
|
options: e.scaleOptions,
|
|
7657
7692
|
size: "small",
|
|
7658
7693
|
class: "uz-settings-select"
|
|
7659
|
-
}, null, 8, ["value", "options"])]), o("div",
|
|
7694
|
+
}, null, 8, ["value", "options"])]), o("div", Bs, [o("span", Vs, A(e.t("OCR.contrast")), 1), l(_, {
|
|
7660
7695
|
value: e.preContrast,
|
|
7661
7696
|
"onUpdate:value": t[3] ||= (t) => e.preContrast = t,
|
|
7662
7697
|
size: "small"
|
|
7663
|
-
}, null, 8, ["value"])])])) : i("", !0)])]), o("div",
|
|
7698
|
+
}, null, 8, ["value"])])])) : i("", !0)])]), o("div", Hs, [o("div", Us, [o("span", Ws, A(e.t("OCR.result", { count: e.text.length })), 1)]), e.text.length ? (x(), a("div", qs, A(e.fullText), 1)) : (x(), a("div", Gs, [t[5] ||= o("div", { class: "uz-empty-icon" }, "📝", -1), o("div", Ks, A(e.ocrLoading ? e.t("OCR.reading") : e.t("OCR.empty")), 1)]))])]);
|
|
7664
7699
|
}
|
|
7665
|
-
var
|
|
7666
|
-
UzActionButton: () =>
|
|
7700
|
+
var Ys = /*#__PURE__*/ Q(Ss, [["render", Js], ["__scopeId", "data-v-1e757396"]]), Xs = /* @__PURE__ */ ct({
|
|
7701
|
+
UzActionButton: () => lt,
|
|
7667
7702
|
UzBack: () => xr,
|
|
7668
|
-
UzBom: () =>
|
|
7669
|
-
UzCamera: () =>
|
|
7670
|
-
UzCircle: () =>
|
|
7703
|
+
UzBom: () => Pi,
|
|
7704
|
+
UzCamera: () => Ta,
|
|
7705
|
+
UzCircle: () => va,
|
|
7671
7706
|
UzDraggableForm: () => Pr,
|
|
7672
7707
|
UzForm: () => kr,
|
|
7673
7708
|
UzFormItem: () => Tr,
|
|
7674
7709
|
UzFormItemImage: () => Wr,
|
|
7675
7710
|
UzFormItemTimesPicker: () => Jr,
|
|
7676
7711
|
UzFormItemUpload: () => Br,
|
|
7677
|
-
UzIcon: () =>
|
|
7678
|
-
UzOcr: () =>
|
|
7679
|
-
UzSearchBar: () =>
|
|
7680
|
-
UzSearchMobileBar: () =>
|
|
7681
|
-
UzSpin: () =>
|
|
7682
|
-
UzTable: () =>
|
|
7683
|
-
UzTableChild: () =>
|
|
7684
|
-
UzTableDrawer: () =>
|
|
7685
|
-
UzTableFile: () =>
|
|
7686
|
-
UzTableMobile: () =>
|
|
7687
|
-
UzTableQuestChild: () =>
|
|
7688
|
-
UzThumbnail: () =>
|
|
7689
|
-
UzWrap: () =>
|
|
7690
|
-
commonStore: () =>
|
|
7712
|
+
UzIcon: () => Kt,
|
|
7713
|
+
UzOcr: () => Ys,
|
|
7714
|
+
UzSearchBar: () => Fa,
|
|
7715
|
+
UzSearchMobileBar: () => Va,
|
|
7716
|
+
UzSpin: () => Wa,
|
|
7717
|
+
UzTable: () => oo,
|
|
7718
|
+
UzTableChild: () => go,
|
|
7719
|
+
UzTableDrawer: () => ko,
|
|
7720
|
+
UzTableFile: () => Yo,
|
|
7721
|
+
UzTableMobile: () => zo,
|
|
7722
|
+
UzTableQuestChild: () => So,
|
|
7723
|
+
UzThumbnail: () => is,
|
|
7724
|
+
UzWrap: () => ys,
|
|
7725
|
+
commonStore: () => X,
|
|
7691
7726
|
fnActionReduction: () => vr,
|
|
7692
7727
|
fnActionSimplify: () => _r,
|
|
7693
|
-
fnAddThumbnail: () =>
|
|
7694
|
-
fnClearAllThumbnail: () =>
|
|
7695
|
-
fnDeleteThumbnail: () =>
|
|
7728
|
+
fnAddThumbnail: () => $o,
|
|
7729
|
+
fnClearAllThumbnail: () => ts,
|
|
7730
|
+
fnDeleteThumbnail: () => es,
|
|
7696
7731
|
fnGetTableData: () => _i,
|
|
7697
7732
|
fnOptionReduction: () => Ci,
|
|
7698
7733
|
fnOptionSimplify: () => Si,
|
|
7699
7734
|
fnPrepareFormData: () => wi,
|
|
7700
7735
|
fnPrepareTableData: () => Ti,
|
|
7701
7736
|
fnRenderAction: () => ur,
|
|
7702
|
-
fnSetLang: () =>
|
|
7703
|
-
fnSetTheme: () =>
|
|
7704
|
-
fnSetThumbnail: () =>
|
|
7737
|
+
fnSetLang: () => Vt,
|
|
7738
|
+
fnSetTheme: () => Ht,
|
|
7739
|
+
fnSetThumbnail: () => Zo,
|
|
7705
7740
|
fnTableReduction: () => yi,
|
|
7706
7741
|
fnTableSimplify: () => vi,
|
|
7707
7742
|
fnTriggersReduction: () => xi,
|
|
7708
7743
|
fnTriggersSimplify: () => bi,
|
|
7709
|
-
i18n: () =>
|
|
7710
|
-
}),
|
|
7711
|
-
function
|
|
7712
|
-
|
|
7744
|
+
i18n: () => K
|
|
7745
|
+
}), Zs = 3840, Qs = 2160, $s = C({ scale: 1 });
|
|
7746
|
+
function ec(e, t) {
|
|
7747
|
+
Zs = e, Qs = t;
|
|
7713
7748
|
}
|
|
7714
|
-
function
|
|
7715
|
-
let e = 1, t = window.innerWidth, n = window.innerHeight, r =
|
|
7749
|
+
function tc() {
|
|
7750
|
+
let e = 1, t = window.innerWidth, n = window.innerHeight, r = Zs, i = Qs, a = parseFloat((r / i).toFixed(5));
|
|
7716
7751
|
if (parseFloat((t / n).toFixed(5)) > a) {
|
|
7717
7752
|
let t = parseFloat((n * a / r).toFixed(5));
|
|
7718
7753
|
e = t > 1 ? 1 : t;
|
|
@@ -7720,18 +7755,18 @@ function ec() {
|
|
|
7720
7755
|
let n = parseFloat((t / a / i).toFixed(5));
|
|
7721
7756
|
e = n > 1 ? 1 : n;
|
|
7722
7757
|
}
|
|
7723
|
-
|
|
7758
|
+
$s.scale = e;
|
|
7724
7759
|
}
|
|
7725
|
-
function
|
|
7726
|
-
let e =
|
|
7760
|
+
function nc() {
|
|
7761
|
+
let e = Xe(tc, 200);
|
|
7727
7762
|
return e(), window.addEventListener("resize", e), () => {
|
|
7728
|
-
|
|
7763
|
+
Zs = 3840, Qs = 2160, window.removeEventListener("resize", e);
|
|
7729
7764
|
};
|
|
7730
7765
|
}
|
|
7731
7766
|
//#endregion
|
|
7732
7767
|
//#region components/hooks/useThrottleFn.ts
|
|
7733
|
-
function
|
|
7734
|
-
let r = w(e), i = n(() =>
|
|
7768
|
+
function rc(e, t = 1e3) {
|
|
7769
|
+
let r = w(e), i = n(() => Ze((...e) => r.value([...e]), t));
|
|
7735
7770
|
return b(() => {
|
|
7736
7771
|
i.value.cancel();
|
|
7737
7772
|
}), {
|
|
@@ -7742,14 +7777,14 @@ function nc(e, t = 1e3) {
|
|
|
7742
7777
|
}
|
|
7743
7778
|
//#endregion
|
|
7744
7779
|
//#region components/hooks/useLocalStorage.ts
|
|
7745
|
-
function
|
|
7746
|
-
return [w(
|
|
7747
|
-
n === void 0 ?
|
|
7780
|
+
function ic(e, t) {
|
|
7781
|
+
return [w(Y(e, t?.defaultValue)), (n) => {
|
|
7782
|
+
n === void 0 ? Tt(e) : J(e, n, t?.expired || "1 Day");
|
|
7748
7783
|
}];
|
|
7749
7784
|
}
|
|
7750
7785
|
//#endregion
|
|
7751
7786
|
//#region components/hooks/useQuery.ts
|
|
7752
|
-
function
|
|
7787
|
+
function ac(e, t, n) {
|
|
7753
7788
|
let r = `useQuery-${e}`, i = w(), a = w(), o = w(), s = w(!1), c = w("idle"), l = w(), u = w(0), d = w(0), f = () => {
|
|
7754
7789
|
Un(), clearInterval(o.value), o.value = null;
|
|
7755
7790
|
}, p = async () => {
|
|
@@ -7770,7 +7805,7 @@ function ic(e, t, n) {
|
|
|
7770
7805
|
});
|
|
7771
7806
|
e = await Promise.race([n, t()]);
|
|
7772
7807
|
}
|
|
7773
|
-
h(!1, "success"), m(e),
|
|
7808
|
+
h(!1, "success"), m(e), J(r, e, 0);
|
|
7774
7809
|
} catch (e) {
|
|
7775
7810
|
g(e), h(!1, "error"), u.value > 0 && (--u.value, setTimeout(() => {
|
|
7776
7811
|
p();
|
|
@@ -7794,7 +7829,7 @@ function ic(e, t, n) {
|
|
|
7794
7829
|
}, n?.pollingInterval));
|
|
7795
7830
|
};
|
|
7796
7831
|
if (n?.retry && n.pollingInterval === void 0 && (u.value = n.retry.retryCount || 3, d.value = n.retry.retryInterval || 8e3), n?.initialData && m(n.initialData()), n === void 0 || n.initialData === void 0 || n.cache === void 0 || n.cache === !0) try {
|
|
7797
|
-
let e =
|
|
7832
|
+
let e = Y(r, !1);
|
|
7798
7833
|
e && m(e);
|
|
7799
7834
|
} catch {
|
|
7800
7835
|
m(!1);
|
|
@@ -7815,26 +7850,26 @@ function ic(e, t, n) {
|
|
|
7815
7850
|
}
|
|
7816
7851
|
//#endregion
|
|
7817
7852
|
//#region package.json
|
|
7818
|
-
var
|
|
7819
|
-
async function
|
|
7853
|
+
var oc = "0.1.136", sc;
|
|
7854
|
+
async function cc() {
|
|
7820
7855
|
let e = await fetch(`${window.location.protocol}//${window.location.host}`, {
|
|
7821
7856
|
method: "HEAD",
|
|
7822
7857
|
cache: "no-cache"
|
|
7823
7858
|
});
|
|
7824
7859
|
return e.headers.get("etag") || e.headers.get("last-modified");
|
|
7825
7860
|
}
|
|
7826
|
-
async function cc() {
|
|
7827
|
-
let e = await sc();
|
|
7828
|
-
oc !== e && Wt(!0);
|
|
7829
|
-
}
|
|
7830
7861
|
async function lc() {
|
|
7831
|
-
|
|
7832
|
-
|
|
7862
|
+
let e = await cc();
|
|
7863
|
+
sc !== e && Ut(!0);
|
|
7864
|
+
}
|
|
7865
|
+
async function uc() {
|
|
7866
|
+
sc = await cc(), window.versionMonitor && clearInterval(window.versionMonitor), window.versionMonitor = setInterval(() => {
|
|
7867
|
+
lc();
|
|
7833
7868
|
}, 6e4);
|
|
7834
7869
|
}
|
|
7835
7870
|
//#endregion
|
|
7836
7871
|
//#region components/create.ts
|
|
7837
|
-
function
|
|
7872
|
+
function dc({ components: e = [] } = {}) {
|
|
7838
7873
|
let t = [];
|
|
7839
7874
|
function n(e, t, n) {
|
|
7840
7875
|
e.component(t) || e.component(t, n);
|
|
@@ -7846,20 +7881,20 @@ function uc({ components: e = [] } = {}) {
|
|
|
7846
7881
|
n(r, t, e);
|
|
7847
7882
|
});
|
|
7848
7883
|
}), i)) {
|
|
7849
|
-
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 =
|
|
7850
|
-
|
|
7884
|
+
let { title: e, monitor: t = !1, monitorInfo: n, version: a = !0, language: o = !1, local: s = "zh-CN", icons: c = void 0, iconDefault: l = "" } = i, u = Y("theme", !1), d = Y("lang", s);
|
|
7885
|
+
Bt(o), Vt(d), Wt(e || K.global.t("App.title")), Ht(u), zt({
|
|
7851
7886
|
icons: c,
|
|
7852
7887
|
iconDefault: l
|
|
7853
|
-
}),
|
|
7888
|
+
}), K.global.locale.value = d, a && uc(), t && Mn(r, t, n);
|
|
7854
7889
|
}
|
|
7855
7890
|
}
|
|
7856
7891
|
return {
|
|
7857
|
-
version:
|
|
7892
|
+
version: oc,
|
|
7858
7893
|
install: r
|
|
7859
7894
|
};
|
|
7860
7895
|
}
|
|
7861
7896
|
//#endregion
|
|
7862
7897
|
//#region components/preset.ts
|
|
7863
|
-
var
|
|
7898
|
+
var fc = dc({ components: Object.keys(Xs).map((e) => Xs[e]) }), pc = fc.install;
|
|
7864
7899
|
//#endregion
|
|
7865
|
-
export { Gn as BLOB, Kn as CUSTOM, qn as FILE, Wn as GET, Z as POST,
|
|
7900
|
+
export { Gn as BLOB, Kn as CUSTOM, qn as FILE, Wn as GET, Z as POST, lt as UzActionButton, xr as UzBack, Pi as UzBom, Ta as UzCamera, va as UzCircle, Pr as UzDraggableForm, kr as UzForm, Tr as UzFormItem, Wr as UzFormItemImage, Jr as UzFormItemTimesPicker, Br as UzFormItemUpload, Kt as UzIcon, Ys as UzOcr, Fa as UzSearchBar, Va as UzSearchMobileBar, Wa as UzSpin, oo as UzTable, go as UzTableChild, ko as UzTableDrawer, Yo as UzTableFile, zo as UzTableMobile, So as UzTableQuestChild, is as UzThumbnail, ys as UzWrap, X as commonStore, dc as create, gs as darkTheme, fc as default, vr as fnActionReduction, _r as fnActionSimplify, $o as fnAddThumbnail, Un as fnCancelFetch, ts as fnClearAllThumbnail, tc as fnComputedScale, Jt as fnCreateRouter, Tt as fnDelStorage, Dt as fnDelStorageAll, Et as fnDelStorageByPrefix, es as fnDeleteThumbnail, wt as fnDialog, q as fnErrorLog, Lt as fnFilterByPinyinInitials, At as fnFormatTime, Pt as fnFormatUnits, Nt as fnFullScreen, Y as fnGetStorage, _i as fnGetTableData, nc as fnListenerScale, Ct as fnNotification, Ci as fnOptionReduction, Si as fnOptionSimplify, kt as fnPageModel2Naive, wi as fnPrepareFormData, Ti as fnPrepareTableData, ur as fnRenderAction, Ot as fnScrollTop, Vt as fnSetLang, ec as fnSetNormalWidthAndHeight, J as fnSetStorage, Ht as fnSetTheme, Zo as fnSetThumbnail, yi as fnTableReduction, vi as fnTableSimplify, Mt as fnThrottle, jt as fnTitle, xi as fnTriggersReduction, bi as fnTriggersSimplify, K as i18n, pc as install, hs as lightTheme, Rt as mergeColumns, qt as router, $s as scaleStore, Yr as useDebounceFn, ic as useLocalStorage, ac as useQuery, rc as useThrottleFn };
|