@unizhen/ui 0.1.130 → 0.1.131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/bom/index.vue.d.ts +24 -3
- package/lib/ui.css +1 -1
- package/lib/ui.js +1013 -985
- package/package.json +1 -1
package/lib/ui.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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
|
|
2
|
-
import { NButton as
|
|
3
|
-
import { createI18n as
|
|
4
|
-
import
|
|
5
|
-
import { createRouter as
|
|
6
|
-
import { cloneDeep as
|
|
7
|
-
import
|
|
8
|
-
import { VueDraggable as
|
|
9
|
-
import
|
|
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 re, NCheckboxGroup as ie, NColorPicker as z, NConfigProvider as ae, NDataTable as oe, NDatePicker as se, NDivider as ce, NDrawer as le, NDrawerContent as ue, NDropdown as de, NEllipsis as fe, NFlex as B, NForm as pe, NFormItem as me, NGrid as he, NGridItem as ge, NIcon as V, NImage as _e, NImageGroup as ve, NInput as ye, NInputGroup as be, NInputGroupLabel as xe, NInputNumber as Se, NModal as Ce, NPagination as we, NPopconfirm as Te, NPopover as Ee, NRadio as De, NRadioGroup as Oe, NSelect as ke, NSkeleton as Ae, NSpace as je, NSpin as Me, NSwitch as Ne, NTabPane as Pe, NTabs as Fe, NTimePicker as Ie, NTooltip as Le, NUpload as Re, NUploadDragger as ze, createDiscreteApi as Be, darkTheme as H, dateZhCN as Ve, useNotification as He, zhCN as Ue } from "naive-ui";
|
|
3
|
+
import { createI18n as We, useI18n as U } from "vue-i18n";
|
|
4
|
+
import Ge from "axios";
|
|
5
|
+
import { createRouter as Ke, createWebHistory as qe, useRoute as Je, useRouter as Ye } from "vue-router";
|
|
6
|
+
import { cloneDeep as W, compact as Xe, debounce as Ze, throttle as Qe } from "lodash-es";
|
|
7
|
+
import $e from "dayjs";
|
|
8
|
+
import { VueDraggable as et } from "vue-draggable-plus";
|
|
9
|
+
import tt from "json5";
|
|
10
10
|
import nt from "sortablejs";
|
|
11
11
|
import { UzNumberFlow as rt } from "@unizhen/number";
|
|
12
12
|
import it from "jsqr";
|
|
@@ -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
|
-
}, G =
|
|
104
|
+
}, G = We({
|
|
105
105
|
legacy: !1,
|
|
106
106
|
locale: "zh-CN",
|
|
107
107
|
messages: {
|
|
@@ -351,7 +351,7 @@ var gt = "local-", _t = class {
|
|
|
351
351
|
},
|
|
352
352
|
"fr-FR": {}
|
|
353
353
|
}
|
|
354
|
-
}), vt = new _t("uz"), yt = new Intl.Collator("zh-Hans-u-co-pinyin"), bt = [..."阿八嚓哒妸发旮哈讥咔垃妈拏噢妑七呥仨他屲夕丫帀"], xt = [..."ABCDEFGHJKLMNOPQRSTWXYZ"], { notification: St, dialog: Ct } =
|
|
354
|
+
}), vt = new _t("uz"), yt = new Intl.Collator("zh-Hans-u-co-pinyin"), bt = [..."阿八嚓哒妸发旮哈讥咔垃妈拏噢妑七呥仨他屲夕丫帀"], xt = [..."ABCDEFGHJKLMNOPQRSTWXYZ"], { notification: St, dialog: Ct } = Be(["notification", "dialog"], {
|
|
355
355
|
configProviderProps: { themeOverrides: { common: { borderRadius: "12px" } } },
|
|
356
356
|
notificationProviderProps: { placement: "bottom-right" }
|
|
357
357
|
}), wt = St, Tt = Ct;
|
|
@@ -569,14 +569,14 @@ var qt = d({
|
|
|
569
569
|
});
|
|
570
570
|
} else n.value = e;
|
|
571
571
|
};
|
|
572
|
-
return r(e.icon),
|
|
572
|
+
return r(e.icon), M(() => e.icon, (e) => {
|
|
573
573
|
r(e);
|
|
574
574
|
}), () => t.value ? n.value && n.value.render(null, []) : null;
|
|
575
575
|
}
|
|
576
576
|
}), Jt;
|
|
577
577
|
function Yt(e, t = "/") {
|
|
578
|
-
return Jt =
|
|
579
|
-
history:
|
|
578
|
+
return Jt = Ke({
|
|
579
|
+
history: qe(t),
|
|
580
580
|
routes: e,
|
|
581
581
|
scrollBehavior: () => ({
|
|
582
582
|
left: 0,
|
|
@@ -817,13 +817,13 @@ var zn = (e) => {
|
|
|
817
817
|
return e && e.groups && e.groups.fileName;
|
|
818
818
|
}
|
|
819
819
|
return "";
|
|
820
|
-
}, Bn =
|
|
820
|
+
}, Bn = Ge.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 = Ge.CancelToken.source();
|
|
827
827
|
Bn.interceptors.request.use((e) => {
|
|
828
828
|
e.cancelToken = Vn.token, e.headers.Language = Y.lang, e.headers.Platform = Y.isMobile ? "mobile" : "pc";
|
|
829
829
|
let t = J("token", !1);
|
|
@@ -862,7 +862,7 @@ Bn.interceptors.request.use((e) => {
|
|
|
862
862
|
duration: 3e3
|
|
863
863
|
}), Promise.reject(G.global.t("Notice.error"))) : Promise.reject(e)) : Promise.reject(G.global.t("Notice.error")));
|
|
864
864
|
var Hn = "/apiserver/", Un = () => {
|
|
865
|
-
Vn.cancel(), Vn =
|
|
865
|
+
Vn.cancel(), Vn = Ge.CancelToken.source();
|
|
866
866
|
}, Wn = (e, t, n = "json", r = 3e5) => {
|
|
867
867
|
let i = JSON.stringify({
|
|
868
868
|
fetchUri: e,
|
|
@@ -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(Le, { style: { "max-width": "300px" } }, {
|
|
918
918
|
trigger: () => e,
|
|
919
919
|
default: () => typeof t == "function" ? t() : t
|
|
920
920
|
}), or = (e, t, n, r) => {
|
|
@@ -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(V, {}, { default: () => f(qt, { 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(Te, 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(Ee, { 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(B, {
|
|
988
988
|
vertical: !0,
|
|
989
989
|
size: 12
|
|
990
990
|
}, { default: () => o })
|
|
@@ -1095,8 +1095,8 @@ var Hn = "/apiserver/", Un = () => {
|
|
|
1095
1095
|
}, yr = d({
|
|
1096
1096
|
name: "UzBack",
|
|
1097
1097
|
components: {
|
|
1098
|
-
NButton:
|
|
1099
|
-
NIcon:
|
|
1098
|
+
NButton: L,
|
|
1099
|
+
NIcon: V
|
|
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 } = U(), n = Ye();
|
|
1113
1113
|
return {
|
|
1114
1114
|
t,
|
|
1115
1115
|
back: () => {
|
|
@@ -1130,30 +1130,30 @@ function br(e, t, n, i, a, s) {
|
|
|
1130
1130
|
quaternary: "",
|
|
1131
1131
|
onClick: e.back
|
|
1132
1132
|
}, {
|
|
1133
|
-
icon:
|
|
1134
|
-
default:
|
|
1133
|
+
icon: P(() => [l(u, null, {
|
|
1134
|
+
default: P(() => [l(c, { icon: "ArrowLeft" })]),
|
|
1135
1135
|
_: 1
|
|
1136
1136
|
})]),
|
|
1137
|
-
default:
|
|
1137
|
+
default: P(() => [o("span", null, A(e.text || e.t("Common.back")), 1)]),
|
|
1138
1138
|
_: 1
|
|
1139
1139
|
}, 8, ["onClick"]);
|
|
1140
1140
|
}
|
|
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:
|
|
1154
|
-
NCascader:
|
|
1155
|
-
NTooltip:
|
|
1156
|
-
NDropdown:
|
|
1144
|
+
NIcon: V,
|
|
1145
|
+
NInput: ye,
|
|
1146
|
+
NSelect: ke,
|
|
1147
|
+
NInputNumber: Se,
|
|
1148
|
+
NDatePicker: se,
|
|
1149
|
+
NTimePicker: Ie,
|
|
1150
|
+
NSwitch: Ne,
|
|
1151
|
+
NColorPicker: z,
|
|
1152
|
+
NCheckbox: re,
|
|
1153
|
+
NCheckboxGroup: ie,
|
|
1154
|
+
NCascader: ne,
|
|
1155
|
+
NTooltip: Le,
|
|
1156
|
+
NDropdown: de
|
|
1157
1157
|
},
|
|
1158
1158
|
props: {
|
|
1159
1159
|
item: {
|
|
@@ -1189,7 +1189,7 @@ var xr = /*#__PURE__*/ Q(yr, [["render", br]]), Sr = d({
|
|
|
1189
1189
|
isMobile: n(() => Y.isMobile),
|
|
1190
1190
|
showDropdown: i,
|
|
1191
1191
|
dropdownOptions: a,
|
|
1192
|
-
dayjs:
|
|
1192
|
+
dayjs: $e,
|
|
1193
1193
|
updateValue: async (t, n, i) => {
|
|
1194
1194
|
if (t.form.updateValue) {
|
|
1195
1195
|
let a = { ...e.formValue };
|
|
@@ -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 = W(e.item.params.options);
|
|
1295
1295
|
if (n) {
|
|
1296
1296
|
if (e.formValue && e.formValue[t]) {
|
|
1297
1297
|
let r = e.formValue[t].toLocaleLowerCase();
|
|
@@ -1341,11 +1341,11 @@ function wr(t, n, i, u, d, f) {
|
|
|
1341
1341
|
}
|
|
1342
1342
|
}, s({ _: 2 }, [t.item.params.prefix ? {
|
|
1343
1343
|
name: "prefix",
|
|
1344
|
-
fn:
|
|
1344
|
+
fn: P(() => [c(A(t.item.params.prefix), 1)]),
|
|
1345
1345
|
key: "0"
|
|
1346
1346
|
} : void 0, t.item.params.suffix ? {
|
|
1347
1347
|
name: "suffix",
|
|
1348
|
-
fn:
|
|
1348
|
+
fn: P(() => [c(A(t.item.params.suffix), 1)]),
|
|
1349
1349
|
key: "1"
|
|
1350
1350
|
} : void 0]), 1032, [
|
|
1351
1351
|
"value",
|
|
@@ -1377,7 +1377,7 @@ function wr(t, n, i, u, d, f) {
|
|
|
1377
1377
|
t.showDropdown = !1;
|
|
1378
1378
|
}
|
|
1379
1379
|
}, {
|
|
1380
|
-
default:
|
|
1380
|
+
default: P(() => [l(p, {
|
|
1381
1381
|
value: t.formValue[t.item.key],
|
|
1382
1382
|
"show-password-on": "click",
|
|
1383
1383
|
type: t.item.params.type,
|
|
@@ -1395,11 +1395,11 @@ function wr(t, n, i, u, d, f) {
|
|
|
1395
1395
|
}
|
|
1396
1396
|
}, s({ _: 2 }, [t.item.params.prefix ? {
|
|
1397
1397
|
name: "prefix",
|
|
1398
|
-
fn:
|
|
1398
|
+
fn: P(() => [c(A(t.item.params.prefix), 1)]),
|
|
1399
1399
|
key: "0"
|
|
1400
1400
|
} : void 0, t.item.params.suffix ? {
|
|
1401
1401
|
name: "suffix",
|
|
1402
|
-
fn:
|
|
1402
|
+
fn: P(() => [c(A(t.item.params.suffix), 1)]),
|
|
1403
1403
|
key: "1"
|
|
1404
1404
|
} : void 0]), 1032, [
|
|
1405
1405
|
"value",
|
|
@@ -1437,11 +1437,11 @@ function wr(t, n, i, u, d, f) {
|
|
|
1437
1437
|
}
|
|
1438
1438
|
}, s({ _: 2 }, [t.item.params.prefix ? {
|
|
1439
1439
|
name: "prefix",
|
|
1440
|
-
fn:
|
|
1440
|
+
fn: P(() => [c(A(t.item.params.prefix), 1)]),
|
|
1441
1441
|
key: "0"
|
|
1442
1442
|
} : void 0, t.item.params.suffix ? {
|
|
1443
1443
|
name: "suffix",
|
|
1444
|
-
fn:
|
|
1444
|
+
fn: P(() => [c(A(t.item.params.suffix), 1)]),
|
|
1445
1445
|
key: "1"
|
|
1446
1446
|
} : void 0]), 1032, [
|
|
1447
1447
|
"value",
|
|
@@ -1625,7 +1625,7 @@ function wr(t, n, i, u, d, f) {
|
|
|
1625
1625
|
value: t.formValue[t.item.key],
|
|
1626
1626
|
disabled: t.checkDisabled()
|
|
1627
1627
|
}, {
|
|
1628
|
-
default:
|
|
1628
|
+
default: P(() => [o("div", Cr, [(x(!0), a(e, null, T(t.item.params.options, (e) => (x(), r(S, {
|
|
1629
1629
|
key: e.value,
|
|
1630
1630
|
label: e.label,
|
|
1631
1631
|
value: e.value
|
|
@@ -1676,11 +1676,11 @@ function wr(t, n, i, u, d, f) {
|
|
|
1676
1676
|
}
|
|
1677
1677
|
}, s({ _: 2 }, [t.item.params.checked ? {
|
|
1678
1678
|
name: "checked",
|
|
1679
|
-
fn:
|
|
1679
|
+
fn: P(() => [c(A(t.item.params.checked), 1)]),
|
|
1680
1680
|
key: "0"
|
|
1681
1681
|
} : void 0, t.item.params.unchecked ? {
|
|
1682
1682
|
name: "unchecked",
|
|
1683
|
-
fn:
|
|
1683
|
+
fn: P(() => [c(A(t.item.params.unchecked), 1)]),
|
|
1684
1684
|
key: "1"
|
|
1685
1685
|
} : void 0]), 1032, ["value", "disabled"])) : t.item.input === "upload" ? (x(), r(k, {
|
|
1686
1686
|
key: 13,
|
|
@@ -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:
|
|
1703
|
-
NButton:
|
|
1704
|
-
NIcon:
|
|
1700
|
+
NForm: pe,
|
|
1701
|
+
NFormItem: me,
|
|
1702
|
+
NDivider: ce,
|
|
1703
|
+
NButton: L,
|
|
1704
|
+
NIcon: V,
|
|
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 } = U(), i = p("userStore"), a = n(() => Y.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) => {
|
|
@@ -1787,7 +1787,7 @@ var Tr = /*#__PURE__*/ Q(Sr, [["render", wr]]), Er = d({
|
|
|
1787
1787
|
default: return jt(t);
|
|
1788
1788
|
}
|
|
1789
1789
|
}, g = (e, t = !1) => {
|
|
1790
|
-
let n =
|
|
1790
|
+
let n = $e(e).startOf("day").diff($e().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 = $e().startOf("day").valueOf(), n = $e().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 ||= W(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 = W(c.value);
|
|
1858
1858
|
d.value.forEach((e) => {
|
|
1859
1859
|
t[e] = JSON.stringify(t[e]);
|
|
1860
1860
|
}), Object.keys(t).forEach((e) => {
|
|
@@ -1876,7 +1876,7 @@ var Tr = /*#__PURE__*/ Q(Sr, [["render", wr]]), Er = d({
|
|
|
1876
1876
|
manual: () => {
|
|
1877
1877
|
c.value = e.value, v(e.items);
|
|
1878
1878
|
}
|
|
1879
|
-
}),
|
|
1879
|
+
}), M(() => e.value, (t, n) => {
|
|
1880
1880
|
JSON.stringify(t) !== JSON.stringify(n) && (c.value = t, l.value.length === 0 && v(e.items));
|
|
1881
1881
|
}, {
|
|
1882
1882
|
deep: !0,
|
|
@@ -1925,7 +1925,7 @@ function Or(t, n, s, u, d, f) {
|
|
|
1925
1925
|
labelAlign: t.labelAlign,
|
|
1926
1926
|
labelPlacement: t.labelPlacement
|
|
1927
1927
|
}, {
|
|
1928
|
-
default:
|
|
1928
|
+
default: P(() => [F((x(), a("div", { class: g(t.isMobile ? "" : "uz-form-grid") }, [(x(!0), a(e, null, T(t.formItems, (n, s) => (x(), a(e, { key: n.key }, [t.itemShow(n) ? (x(), r(C, {
|
|
1929
1929
|
key: 0,
|
|
1930
1930
|
path: n.key,
|
|
1931
1931
|
rule: n.input === "subTable" ? void 0 : n.form.rule?.required ? n.form.rule : void 0,
|
|
@@ -1933,14 +1933,14 @@ function Or(t, n, s, u, d, f) {
|
|
|
1933
1933
|
"show-label": n.input !== "divider" && n.input !== "subTable",
|
|
1934
1934
|
"show-feedback": t.showFeedback && n.input !== "divider"
|
|
1935
1935
|
}, {
|
|
1936
|
-
label:
|
|
1936
|
+
label: P(() => [
|
|
1937
1937
|
o("div", null, A(typeof n.label == "function" ? n.label() : n.label), 1),
|
|
1938
1938
|
t.status !== 2 && n.source && n.form.createButton ? (x(), a("a", {
|
|
1939
1939
|
key: 0,
|
|
1940
1940
|
class: "uz-flex uz-items-center uz-gap-1 uz-form-item-add",
|
|
1941
1941
|
onClick: (e) => t.sourceAdd(n, s)
|
|
1942
1942
|
}, [l(m, null, {
|
|
1943
|
-
default:
|
|
1943
|
+
default: P(() => [l(p, { icon: "Add" })]),
|
|
1944
1944
|
_: 1
|
|
1945
1945
|
}), c(" " + A(t.t("Common.add")), 1)], 8, Dr)) : i("", !0),
|
|
1946
1946
|
n.form.showDays ? (x(), a("span", {
|
|
@@ -1948,19 +1948,17 @@ function Or(t, n, s, u, d, f) {
|
|
|
1948
1948
|
class: g(["uz-form-item-add", t.diffDay(t.formValue[n.key], !0)])
|
|
1949
1949
|
}, A(t.diffDay(t.formValue[n.key])), 3)) : i("", !0)
|
|
1950
1950
|
]),
|
|
1951
|
-
default:
|
|
1951
|
+
default: P(() => [n.input === "subTable" && !n.params.quest ? (x(), r(h, {
|
|
1952
1952
|
key: 0,
|
|
1953
1953
|
ref_for: !0,
|
|
1954
1954
|
ref: "childRef",
|
|
1955
1955
|
value: t.formValue[`sub_${n.key}`],
|
|
1956
1956
|
"onUpdate:value": (e) => t.formValue[`sub_${n.key}`] = e,
|
|
1957
|
-
formValue: t.formValue,
|
|
1958
1957
|
item: n,
|
|
1959
1958
|
status: t.status
|
|
1960
1959
|
}, null, 8, [
|
|
1961
1960
|
"value",
|
|
1962
1961
|
"onUpdate:value",
|
|
1963
|
-
"formValue",
|
|
1964
1962
|
"item",
|
|
1965
1963
|
"status"
|
|
1966
1964
|
])) : n.input === "subTable" && n.params.quest ? (x(), r(v, {
|
|
@@ -1970,12 +1968,19 @@ function Or(t, n, s, u, d, f) {
|
|
|
1970
1968
|
}, null, 8, ["formValue", "item"])) : n.input === "bom" ? (x(), r(y, {
|
|
1971
1969
|
key: 2,
|
|
1972
1970
|
value: t.formValue[n.key],
|
|
1973
|
-
"onUpdate:value": (e) => t.formValue[n.key] = e
|
|
1974
|
-
|
|
1971
|
+
"onUpdate:value": (e) => t.formValue[n.key] = e,
|
|
1972
|
+
item: n,
|
|
1973
|
+
status: t.status
|
|
1974
|
+
}, null, 8, [
|
|
1975
|
+
"value",
|
|
1976
|
+
"onUpdate:value",
|
|
1977
|
+
"item",
|
|
1978
|
+
"status"
|
|
1979
|
+
])) : n.input === "divider" ? (x(), r(b, {
|
|
1975
1980
|
key: 3,
|
|
1976
1981
|
"title-placement": n.params.placement
|
|
1977
1982
|
}, {
|
|
1978
|
-
default:
|
|
1983
|
+
default: P(() => [c(A(typeof n.label == "function" ? n.label() : n.label), 1)]),
|
|
1979
1984
|
_: 2
|
|
1980
1985
|
}, 1032, ["title-placement"])) : (x(), r(S, {
|
|
1981
1986
|
key: 4,
|
|
@@ -2010,13 +2015,13 @@ function Or(t, n, s, u, d, f) {
|
|
|
2010
2015
|
var kr = /*#__PURE__*/ Q(Er, [["render", Or]]), Ar = d({
|
|
2011
2016
|
name: "UzDraggableForm",
|
|
2012
2017
|
components: {
|
|
2013
|
-
NForm:
|
|
2014
|
-
NFormItem:
|
|
2015
|
-
NButton:
|
|
2016
|
-
NIcon:
|
|
2017
|
-
NDivider:
|
|
2018
|
+
NForm: pe,
|
|
2019
|
+
NFormItem: me,
|
|
2020
|
+
NButton: L,
|
|
2021
|
+
NIcon: V,
|
|
2022
|
+
NDivider: ce,
|
|
2018
2023
|
UzFormItem: Tr,
|
|
2019
|
-
VueDraggable:
|
|
2024
|
+
VueDraggable: et
|
|
2020
2025
|
},
|
|
2021
2026
|
props: {
|
|
2022
2027
|
items: {
|
|
@@ -2060,7 +2065,7 @@ var kr = /*#__PURE__*/ Q(Er, [["render", Or]]), Ar = d({
|
|
|
2060
2065
|
"on-change"
|
|
2061
2066
|
],
|
|
2062
2067
|
setup(e, { expose: t, emit: n }) {
|
|
2063
|
-
let { t: r } =
|
|
2068
|
+
let { t: r } = U(), i = p("userStore"), a = w(), o = w({}), s = w([]), c = w([-1, -1]), l = (e, t, r) => {
|
|
2064
2069
|
c.value = [t, r ?? -1], n("on-select", e);
|
|
2065
2070
|
}, u = (e) => {
|
|
2066
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();
|
|
@@ -2086,19 +2091,19 @@ var kr = /*#__PURE__*/ Q(Er, [["render", Or]]), Ar = d({
|
|
|
2086
2091
|
}
|
|
2087
2092
|
}), e), f = () => {
|
|
2088
2093
|
if (e.items && Array.isArray(e.items)) {
|
|
2089
|
-
let t =
|
|
2094
|
+
let t = W(e.items);
|
|
2090
2095
|
s.value = d(t);
|
|
2091
2096
|
}
|
|
2092
2097
|
}, m = () => {
|
|
2093
|
-
n("on-change",
|
|
2098
|
+
n("on-change", W(s.value)), h();
|
|
2094
2099
|
}, h = () => {
|
|
2095
2100
|
c.value = [-1, -1], n("on-select", void 0);
|
|
2096
2101
|
};
|
|
2097
2102
|
return y(() => {
|
|
2098
2103
|
o.value = e.value, f();
|
|
2099
|
-
}), t({ changeItem: u }),
|
|
2104
|
+
}), t({ changeItem: u }), M(() => e.items, () => {
|
|
2100
2105
|
f();
|
|
2101
|
-
}, { deep: !0 }),
|
|
2106
|
+
}, { deep: !0 }), M(() => e.value, (e) => {
|
|
2102
2107
|
o.value = e;
|
|
2103
2108
|
}, { deep: !0 }), {
|
|
2104
2109
|
t: r,
|
|
@@ -2133,7 +2138,7 @@ function Nr(t, n, s, u, d, f) {
|
|
|
2133
2138
|
labelPlacement: t.labelPlacement,
|
|
2134
2139
|
onClick: t.onCancel
|
|
2135
2140
|
}, {
|
|
2136
|
-
default:
|
|
2141
|
+
default: P(() => [l(S, {
|
|
2137
2142
|
modelValue: t.formItems,
|
|
2138
2143
|
"onUpdate:modelValue": n[0] ||= (e) => t.formItems = e,
|
|
2139
2144
|
animation: 200,
|
|
@@ -2147,33 +2152,33 @@ function Nr(t, n, s, u, d, f) {
|
|
|
2147
2152
|
onAdd: t.onDragChange,
|
|
2148
2153
|
onEnd: t.onDragChange
|
|
2149
2154
|
}, {
|
|
2150
|
-
default:
|
|
2155
|
+
default: P(() => [(x(!0), a(e, null, T(t.formItems, (n, s) => (x(), r(b, {
|
|
2151
2156
|
path: n.key,
|
|
2152
2157
|
rule: n.form.rule?.required ? n.form.rule : void 0,
|
|
2153
2158
|
class: g(["uz-form-grid-item uz-form-mode", t.formItemIndex[0] === s && t.formItemIndex[1] === -1 ? "select" : n.input === "group" ? "group" : ""]),
|
|
2154
|
-
onClick:
|
|
2159
|
+
onClick: I((e) => t.onModeClick(n, s), ["stop"]),
|
|
2155
2160
|
key: n.key,
|
|
2156
2161
|
style: _(`grid-column: span ${n.form.span || 6} / span ${n.form.span || 6};`),
|
|
2157
2162
|
"show-label": n.input !== "divider" && n.input !== "subTable",
|
|
2158
2163
|
"show-feedback": t.showFeedback && n.input !== "divider"
|
|
2159
2164
|
}, {
|
|
2160
|
-
label:
|
|
2165
|
+
label: P(() => [
|
|
2161
2166
|
o("div", null, A(typeof n.label == "function" ? n.label() : n.label), 1),
|
|
2162
2167
|
n.source && n.form.createButton ? (x(), a("a", jr, [l(m, null, {
|
|
2163
|
-
default:
|
|
2168
|
+
default: P(() => [l(p, { icon: "Add" })]),
|
|
2164
2169
|
_: 1
|
|
2165
2170
|
}), c(" " + A(t.t("Common.add")), 1)])) : i("", !0),
|
|
2166
2171
|
n.form.showDays ? (x(), a("span", Mr, " showDays ")) : i("", !0)
|
|
2167
2172
|
]),
|
|
2168
|
-
default:
|
|
2173
|
+
default: P(() => [t.formItemIndex[0] === s && t.formItemIndex[1] === -1 ? (x(), r(h, {
|
|
2169
2174
|
key: 0,
|
|
2170
2175
|
size: "small",
|
|
2171
2176
|
type: "error",
|
|
2172
2177
|
class: "uz-form-delete",
|
|
2173
|
-
onClick:
|
|
2178
|
+
onClick: I(t.onDelete, ["stop"])
|
|
2174
2179
|
}, {
|
|
2175
|
-
icon:
|
|
2176
|
-
default:
|
|
2180
|
+
icon: P(() => [l(m, { color: "#FFF" }, {
|
|
2181
|
+
default: P(() => [l(p, { icon: "Trash" })]),
|
|
2177
2182
|
_: 1
|
|
2178
2183
|
})]),
|
|
2179
2184
|
_: 1
|
|
@@ -2199,26 +2204,26 @@ function Nr(t, n, s, u, d, f) {
|
|
|
2199
2204
|
onAdd: t.onDragChange,
|
|
2200
2205
|
onEnd: t.onDragChange
|
|
2201
2206
|
}, {
|
|
2202
|
-
default:
|
|
2207
|
+
default: P(() => [(x(!0), a(e, null, T(n.params.children, (e, n) => (x(), r(b, {
|
|
2203
2208
|
label: e.input === "divider" ? "" : typeof e.label == "function" ? e.label() : e.label,
|
|
2204
2209
|
path: e.key,
|
|
2205
2210
|
rule: e.form.rule?.required ? e.form.rule : void 0,
|
|
2206
2211
|
class: g(["uz-form-grid-item uz-form-mode", t.formItemIndex[0] === s && t.formItemIndex[1] === n ? "select" : ""]),
|
|
2207
|
-
onClick:
|
|
2212
|
+
onClick: I((r) => t.onModeClick(e, s, n), ["stop"]),
|
|
2208
2213
|
key: n,
|
|
2209
2214
|
style: _(`grid-column: span ${e.form.span || 6} / span ${e.form.span || 6};`),
|
|
2210
2215
|
"show-label": e.input !== "divider" && e.input !== "subTable",
|
|
2211
2216
|
"show-feedback": t.showFeedback && e.input !== "divider"
|
|
2212
2217
|
}, {
|
|
2213
|
-
default:
|
|
2218
|
+
default: P(() => [t.formItemIndex[0] === s && t.formItemIndex[1] === n ? (x(), r(h, {
|
|
2214
2219
|
key: 0,
|
|
2215
2220
|
size: "small",
|
|
2216
2221
|
type: "error",
|
|
2217
2222
|
class: "uz-form-delete",
|
|
2218
|
-
onClick:
|
|
2223
|
+
onClick: I(t.onDelete, ["stop"])
|
|
2219
2224
|
}, {
|
|
2220
|
-
icon:
|
|
2221
|
-
default:
|
|
2225
|
+
icon: P(() => [l(m, { color: "#FFF" }, {
|
|
2226
|
+
default: P(() => [l(p, { icon: "Trash" })]),
|
|
2222
2227
|
_: 1
|
|
2223
2228
|
})]),
|
|
2224
2229
|
_: 1
|
|
@@ -2256,7 +2261,7 @@ function Nr(t, n, s, u, d, f) {
|
|
|
2256
2261
|
key: 4,
|
|
2257
2262
|
"title-placement": n.params.placement
|
|
2258
2263
|
}, {
|
|
2259
|
-
default:
|
|
2264
|
+
default: P(() => [c(A(typeof n.label == "function" ? n.label() : n.label), 1)]),
|
|
2260
2265
|
_: 2
|
|
2261
2266
|
}, 1032, ["title-placement"])) : (x(), r(y, {
|
|
2262
2267
|
key: 5,
|
|
@@ -2297,15 +2302,15 @@ function Nr(t, n, s, u, d, f) {
|
|
|
2297
2302
|
var Pr = /*#__PURE__*/ Q(Ar, [["render", Nr]]), Fr = d({
|
|
2298
2303
|
name: "UzFormItemUpload",
|
|
2299
2304
|
components: {
|
|
2300
|
-
NUpload:
|
|
2301
|
-
NButton:
|
|
2302
|
-
NIcon:
|
|
2303
|
-
NImage:
|
|
2304
|
-
NPopover:
|
|
2305
|
-
NPopconfirm:
|
|
2306
|
-
NUploadDragger:
|
|
2307
|
-
NInputGroup:
|
|
2308
|
-
NSpin:
|
|
2305
|
+
NUpload: Re,
|
|
2306
|
+
NButton: L,
|
|
2307
|
+
NIcon: V,
|
|
2308
|
+
NImage: _e,
|
|
2309
|
+
NPopover: Ee,
|
|
2310
|
+
NPopconfirm: Te,
|
|
2311
|
+
NUploadDragger: ze,
|
|
2312
|
+
NInputGroup: be,
|
|
2313
|
+
NSpin: Me
|
|
2309
2314
|
},
|
|
2310
2315
|
props: {
|
|
2311
2316
|
value: {
|
|
@@ -2329,8 +2334,8 @@ var Pr = /*#__PURE__*/ Q(Ar, [["render", Nr]]), Fr = d({
|
|
|
2329
2334
|
},
|
|
2330
2335
|
emits: ["update:value"],
|
|
2331
2336
|
setup(e, { emit: t }) {
|
|
2332
|
-
let { t: n } =
|
|
2333
|
-
t("update:value",
|
|
2337
|
+
let { t: n } = U(), r = He(), i = w(!1), a = w([]), o = () => {
|
|
2338
|
+
t("update:value", tt.stringify(a.value.map((e) => e.url)));
|
|
2334
2339
|
}, s = (e) => new Promise((t, s) => {
|
|
2335
2340
|
if (e.file.file) {
|
|
2336
2341
|
if (i.value = !0, e.file.file.size > 10485760) r.error({
|
|
@@ -2371,10 +2376,10 @@ var Pr = /*#__PURE__*/ Q(Ar, [["render", Nr]]), Fr = d({
|
|
|
2371
2376
|
}, l = (e) => {
|
|
2372
2377
|
a.value.splice(e, 1), o();
|
|
2373
2378
|
}, u = () => {
|
|
2374
|
-
let t =
|
|
2379
|
+
let t = W(e.value);
|
|
2375
2380
|
if (!t) a.value = [];
|
|
2376
2381
|
else if (typeof t == "string") try {
|
|
2377
|
-
t =
|
|
2382
|
+
t = tt.parse(t), a.value = t.map((e, t) => {
|
|
2378
2383
|
let n = decodeURIComponent(e), r = n.lastIndexOf("/"), i = n.substring(r + 1);
|
|
2379
2384
|
return {
|
|
2380
2385
|
id: String(t + 1),
|
|
@@ -2390,7 +2395,7 @@ var Pr = /*#__PURE__*/ Q(Ar, [["render", Nr]]), Fr = d({
|
|
|
2390
2395
|
};
|
|
2391
2396
|
return y(() => {
|
|
2392
2397
|
u();
|
|
2393
|
-
}),
|
|
2398
|
+
}), M(() => e.value, () => {
|
|
2394
2399
|
u();
|
|
2395
2400
|
}), {
|
|
2396
2401
|
t: n,
|
|
@@ -2411,7 +2416,7 @@ function zr(t, n, s, u, d, f) {
|
|
|
2411
2416
|
"content-class": "uz-form-upload uz-flex uz-flex-wrap uz-gap-2 uz-items-center",
|
|
2412
2417
|
show: t.show
|
|
2413
2418
|
}, {
|
|
2414
|
-
default:
|
|
2419
|
+
default: P(() => [t.status === 2 ? i("", !0) : (x(), r(g, {
|
|
2415
2420
|
key: 0,
|
|
2416
2421
|
accept: t.item.params.accept,
|
|
2417
2422
|
max: t.item.params.max,
|
|
@@ -2422,9 +2427,9 @@ function zr(t, n, s, u, d, f) {
|
|
|
2422
2427
|
class: "!uz-w-20",
|
|
2423
2428
|
"directory-dnd": ""
|
|
2424
2429
|
}, {
|
|
2425
|
-
default:
|
|
2426
|
-
default:
|
|
2427
|
-
default:
|
|
2430
|
+
default: P(() => [l(h, { class: "uz-flex uz-items-center uz-justify-center uz-h-20" }, {
|
|
2431
|
+
default: P(() => [l(m, { size: "28" }, {
|
|
2432
|
+
default: P(() => [l(p, { icon: "CloudUpload" })]),
|
|
2428
2433
|
_: 1
|
|
2429
2434
|
})]),
|
|
2430
2435
|
_: 1
|
|
@@ -2442,11 +2447,11 @@ function zr(t, n, s, u, d, f) {
|
|
|
2442
2447
|
width: "80",
|
|
2443
2448
|
src: e.url
|
|
2444
2449
|
}, {
|
|
2445
|
-
error:
|
|
2450
|
+
error: P(() => [l(m, {
|
|
2446
2451
|
size: "60",
|
|
2447
2452
|
color: "lightGrey"
|
|
2448
2453
|
}, {
|
|
2449
|
-
default:
|
|
2454
|
+
default: P(() => [l(p, { icon: "Gallery" })]),
|
|
2450
2455
|
_: 1
|
|
2451
2456
|
})]),
|
|
2452
2457
|
_: 1
|
|
@@ -2457,23 +2462,23 @@ function zr(t, n, s, u, d, f) {
|
|
|
2457
2462
|
class: "uz-cursor-pointer",
|
|
2458
2463
|
onClick: (n) => t.openFile(e.url)
|
|
2459
2464
|
}, {
|
|
2460
|
-
default:
|
|
2465
|
+
default: P(() => [l(p, { icon: "Document" })]),
|
|
2461
2466
|
_: 1
|
|
2462
2467
|
}, 8, ["onClick"])), o("div", Ir, [o("div", {
|
|
2463
2468
|
class: "uz-form-upload-title uz-truncate",
|
|
2464
2469
|
title: e.name
|
|
2465
2470
|
}, A(e.name), 9, Lr), t.status === 2 ? i("", !0) : (x(), a("div", Rr, [l(y, { onPositiveClick: (e) => t.doDelete(n) }, {
|
|
2466
|
-
trigger:
|
|
2471
|
+
trigger: P(() => [l(v, {
|
|
2467
2472
|
size: "small",
|
|
2468
2473
|
tertiary: ""
|
|
2469
2474
|
}, {
|
|
2470
|
-
icon:
|
|
2471
|
-
default:
|
|
2475
|
+
icon: P(() => [l(m, { size: "14" }, {
|
|
2476
|
+
default: P(() => [l(p, { icon: "Trash" })]),
|
|
2472
2477
|
_: 1
|
|
2473
2478
|
})]),
|
|
2474
2479
|
_: 1
|
|
2475
2480
|
})]),
|
|
2476
|
-
default:
|
|
2481
|
+
default: P(() => [c(" " + A(t.t("Table.confirmDelete")), 1)]),
|
|
2477
2482
|
_: 1
|
|
2478
2483
|
}, 8, ["onPositiveClick"]), l(v, {
|
|
2479
2484
|
tag: "a",
|
|
@@ -2482,8 +2487,8 @@ function zr(t, n, s, u, d, f) {
|
|
|
2482
2487
|
size: "small",
|
|
2483
2488
|
tertiary: ""
|
|
2484
2489
|
}, {
|
|
2485
|
-
icon:
|
|
2486
|
-
default:
|
|
2490
|
+
icon: P(() => [l(m, { size: "14" }, {
|
|
2491
|
+
default: P(() => [l(p, { icon: "CloudDownload" })]),
|
|
2487
2492
|
_: 1
|
|
2488
2493
|
})]),
|
|
2489
2494
|
_: 1
|
|
@@ -2491,13 +2496,13 @@ function zr(t, n, s, u, d, f) {
|
|
|
2491
2496
|
_: 1
|
|
2492
2497
|
}, 8, ["show"]);
|
|
2493
2498
|
}
|
|
2494
|
-
var Br = /*#__PURE__*/ Q(Fr, [["render", zr], ["__scopeId", "data-v-
|
|
2499
|
+
var Br = /*#__PURE__*/ Q(Fr, [["render", zr], ["__scopeId", "data-v-3f4cdb7e"]]), Vr = d({
|
|
2495
2500
|
name: "UzFormItemImage",
|
|
2496
2501
|
components: {
|
|
2497
|
-
NImageGroup:
|
|
2498
|
-
NImage:
|
|
2499
|
-
NIcon:
|
|
2500
|
-
NPopover:
|
|
2502
|
+
NImageGroup: ve,
|
|
2503
|
+
NImage: _e,
|
|
2504
|
+
NIcon: V,
|
|
2505
|
+
NPopover: Ee
|
|
2501
2506
|
},
|
|
2502
2507
|
props: { value: {
|
|
2503
2508
|
required: !0,
|
|
@@ -2506,9 +2511,9 @@ var Br = /*#__PURE__*/ Q(Fr, [["render", zr], ["__scopeId", "data-v-b1499369"]])
|
|
|
2506
2511
|
} },
|
|
2507
2512
|
setup(e) {
|
|
2508
2513
|
let t = w([]);
|
|
2509
|
-
return
|
|
2514
|
+
return N(() => {
|
|
2510
2515
|
try {
|
|
2511
|
-
e.value ? t.value =
|
|
2516
|
+
e.value ? t.value = tt.parse(e.value) : t.value = [];
|
|
2512
2517
|
} catch {
|
|
2513
2518
|
t.value = [];
|
|
2514
2519
|
}
|
|
@@ -2539,16 +2544,16 @@ var Br = /*#__PURE__*/ Q(Fr, [["render", zr], ["__scopeId", "data-v-b1499369"]])
|
|
|
2539
2544
|
function Ur(t, n, i, s, u, d) {
|
|
2540
2545
|
let f = D("UzIcon"), p = D("NIcon"), m = D("NImage"), h = D("NPopover"), g = D("NImageGroup");
|
|
2541
2546
|
return x(), r(g, null, {
|
|
2542
|
-
default:
|
|
2547
|
+
default: P(() => [o("div", Hr, [(x(!0), a(e, null, T(t.imgs, (n) => (x(), a(e, null, [t.isAssetTypeAnImage(n) ? (x(), r(m, {
|
|
2543
2548
|
key: 0,
|
|
2544
2549
|
width: "40",
|
|
2545
2550
|
src: n
|
|
2546
2551
|
}, {
|
|
2547
|
-
error:
|
|
2552
|
+
error: P(() => [l(p, {
|
|
2548
2553
|
size: "40",
|
|
2549
2554
|
color: "lightGrey"
|
|
2550
2555
|
}, {
|
|
2551
|
-
default:
|
|
2556
|
+
default: P(() => [l(f, { icon: "Gallery" })]),
|
|
2552
2557
|
_: 1
|
|
2553
2558
|
})]),
|
|
2554
2559
|
_: 1
|
|
@@ -2556,16 +2561,16 @@ function Ur(t, n, i, s, u, d) {
|
|
|
2556
2561
|
key: 1,
|
|
2557
2562
|
trigger: "hover"
|
|
2558
2563
|
}, {
|
|
2559
|
-
trigger:
|
|
2564
|
+
trigger: P(() => [l(p, {
|
|
2560
2565
|
size: "40",
|
|
2561
2566
|
color: "lightGrey",
|
|
2562
2567
|
onClick: (e) => t.openFile(n),
|
|
2563
2568
|
class: "uz-cursor-pointer"
|
|
2564
2569
|
}, {
|
|
2565
|
-
default:
|
|
2570
|
+
default: P(() => [l(f, { icon: "Document" })]),
|
|
2566
2571
|
_: 1
|
|
2567
2572
|
}, 8, ["onClick"])]),
|
|
2568
|
-
default:
|
|
2573
|
+
default: P(() => [c(A(t.getFileName(n)), 1)]),
|
|
2569
2574
|
_: 2
|
|
2570
2575
|
}, 1024))], 64))), 256))])]),
|
|
2571
2576
|
_: 1
|
|
@@ -2573,7 +2578,7 @@ function Ur(t, n, i, s, u, d) {
|
|
|
2573
2578
|
}
|
|
2574
2579
|
var Wr = /*#__PURE__*/ Q(Vr, [["render", Ur]]), Gr = d({
|
|
2575
2580
|
name: "UzFormItemTimesPicker",
|
|
2576
|
-
components: { NSelect:
|
|
2581
|
+
components: { NSelect: ke },
|
|
2577
2582
|
props: {
|
|
2578
2583
|
value: {
|
|
2579
2584
|
required: !0,
|
|
@@ -2587,7 +2592,7 @@ var Wr = /*#__PURE__*/ Q(Vr, [["render", Ur]]), Gr = d({
|
|
|
2587
2592
|
},
|
|
2588
2593
|
emits: ["update:value"],
|
|
2589
2594
|
setup(e, { emit: t, expose: n }) {
|
|
2590
|
-
let { t: r } =
|
|
2595
|
+
let { t: r } = U(), i = w([]), a = w("00"), o = w("00"), s = w("00"), c = () => {
|
|
2591
2596
|
a.value = "00", o.value = "00", s.value = "00", t("update:value", "00:00:00");
|
|
2592
2597
|
}, l = () => {
|
|
2593
2598
|
let e = [];
|
|
@@ -2599,7 +2604,7 @@ var Wr = /*#__PURE__*/ Q(Vr, [["render", Ur]]), Gr = d({
|
|
|
2599
2604
|
}, u = () => {
|
|
2600
2605
|
t("update:value", `${a.value}:${o.value}:${s.value}`);
|
|
2601
2606
|
};
|
|
2602
|
-
return n({ clearAll: c }),
|
|
2607
|
+
return n({ clearAll: c }), M(() => e.value, (e) => {
|
|
2603
2608
|
if (e && e.indexOf(":") > -1) {
|
|
2604
2609
|
let t = e.split(":");
|
|
2605
2610
|
a.value = t[0], o.value = t[1], s.value = t[2];
|
|
@@ -2633,7 +2638,7 @@ function qr(e, t, n, r, i, o) {
|
|
|
2633
2638
|
disabled: e.disabled,
|
|
2634
2639
|
"on-update:value": e.changeH
|
|
2635
2640
|
}, {
|
|
2636
|
-
arrow:
|
|
2641
|
+
arrow: P(() => [c(A(e.t("Common.hour")), 1)]),
|
|
2637
2642
|
_: 1
|
|
2638
2643
|
}, 8, [
|
|
2639
2644
|
"value",
|
|
@@ -2648,7 +2653,7 @@ function qr(e, t, n, r, i, o) {
|
|
|
2648
2653
|
disabled: e.disabled,
|
|
2649
2654
|
"on-update:value": e.changeM
|
|
2650
2655
|
}, {
|
|
2651
|
-
arrow:
|
|
2656
|
+
arrow: P(() => [c(A(e.t("Common.minute")), 1)]),
|
|
2652
2657
|
_: 1
|
|
2653
2658
|
}, 8, [
|
|
2654
2659
|
"value",
|
|
@@ -2663,7 +2668,7 @@ function qr(e, t, n, r, i, o) {
|
|
|
2663
2668
|
disabled: e.disabled,
|
|
2664
2669
|
"on-update:value": e.changeS
|
|
2665
2670
|
}, {
|
|
2666
|
-
arrow:
|
|
2671
|
+
arrow: P(() => [c(A(e.t("Common.second")), 1)]),
|
|
2667
2672
|
_: 1
|
|
2668
2673
|
}, 8, [
|
|
2669
2674
|
"value",
|
|
@@ -2677,7 +2682,7 @@ var Jr = /*#__PURE__*/ Q(Gr, [["render", qr], ["__scopeId", "data-v-ee9b84d6"]])
|
|
|
2677
2682
|
//#endregion
|
|
2678
2683
|
//#region components/hooks/useDebounceFn.ts
|
|
2679
2684
|
function Yr(e, t = 1e3) {
|
|
2680
|
-
let n =
|
|
2685
|
+
let n = Ze(e, t);
|
|
2681
2686
|
return {
|
|
2682
2687
|
run: n,
|
|
2683
2688
|
cancel: n.cancel,
|
|
@@ -2738,7 +2743,7 @@ var Xr = (e, t) => e.map((e, n) => {
|
|
|
2738
2743
|
}
|
|
2739
2744
|
}));
|
|
2740
2745
|
};
|
|
2741
|
-
return y(s),
|
|
2746
|
+
return y(s), M(e, s), v(() => a.value?.destroy()), {
|
|
2742
2747
|
dragColumn: {
|
|
2743
2748
|
title: "",
|
|
2744
2749
|
key: "drag",
|
|
@@ -2845,7 +2850,7 @@ var li = () => new Promise((e) => {
|
|
|
2845
2850
|
let r = [], i = t.id;
|
|
2846
2851
|
return e.input === "select" && (e.params.labelKeys || e.search.labelKeys) ? ((e.params.labelKeys || e.search.labelKeys || "").split(",").forEach((e) => {
|
|
2847
2852
|
r.push(t[e]);
|
|
2848
|
-
}), r =
|
|
2853
|
+
}), r = Xe(r).join("-")) : r = t[n[1]], e.input === "select" && e.params.valueKey && (i = t[e.params.valueKey]), {
|
|
2849
2854
|
label: t?.is_disabled === "1" ? `${r}-${G.global.t("Common.disabled")}` : r,
|
|
2850
2855
|
value: i,
|
|
2851
2856
|
disabled: !e.params._search && t?.is_disabled === "1",
|
|
@@ -2859,7 +2864,7 @@ function pi() {
|
|
|
2859
2864
|
}
|
|
2860
2865
|
async function mi(e, t = !1) {
|
|
2861
2866
|
let n = e.split("."), r = !1;
|
|
2862
|
-
return n.length > 1 && (fi.has(n[0]) && !t ? r =
|
|
2867
|
+
return n.length > 1 && (fi.has(n[0]) && !t ? r = W(fi.get(n[0])) : (r = await Xn({ tableId: n[0] }), fi.set(n[0], r))), {
|
|
2863
2868
|
sourceData: r,
|
|
2864
2869
|
n
|
|
2865
2870
|
};
|
|
@@ -3080,11 +3085,11 @@ var gi = (e) => e.map((e) => {
|
|
|
3080
3085
|
drawerHeight: e.h,
|
|
3081
3086
|
placement: e.l,
|
|
3082
3087
|
summary: e.r
|
|
3083
|
-
}), Object.assign({}, si,
|
|
3088
|
+
}), Object.assign({}, si, W(t));
|
|
3084
3089
|
};
|
|
3085
3090
|
function Si(e, t, n, r) {
|
|
3086
3091
|
let i = async (i, a) => {
|
|
3087
|
-
let o = [], s = {}, c = {}, l = {}, u = [], d = [], f =
|
|
3092
|
+
let o = [], s = {}, c = {}, l = {}, u = [], d = [], f = W(e), p = [];
|
|
3088
3093
|
for (let e of f) e.input === "group" ? p.push(...e.params.children) : p.push(e);
|
|
3089
3094
|
for (let e of p) {
|
|
3090
3095
|
if (e.source && (e.input === "select" || e.input === "cascader")) {
|
|
@@ -3121,7 +3126,7 @@ function Si(e, t, n, r) {
|
|
|
3121
3126
|
if (t && Array.isArray(t)) {
|
|
3122
3127
|
if (e.sourceFn) {
|
|
3123
3128
|
let r = e.sourceFn;
|
|
3124
|
-
n = Function("sourceData", "POST", r)(t, Z);
|
|
3129
|
+
n = await Function("sourceData", "POST", r)(t, Z);
|
|
3125
3130
|
} else n = di(e, t, r);
|
|
3126
3131
|
}
|
|
3127
3132
|
} else e.params._async = !0, e.params._fetch = !1, e.params._asyncFn = async () => {
|
|
@@ -3129,7 +3134,7 @@ function Si(e, t, n, r) {
|
|
|
3129
3134
|
if (t && Array.isArray(t)) {
|
|
3130
3135
|
if (e.sourceFn) {
|
|
3131
3136
|
let n = e.sourceFn;
|
|
3132
|
-
return Function("sourceData", "POST", n)(t, Z);
|
|
3137
|
+
return await Function("sourceData", "POST", n)(t, Z);
|
|
3133
3138
|
}
|
|
3134
3139
|
return di(e, t, n);
|
|
3135
3140
|
}
|
|
@@ -3173,7 +3178,7 @@ function Si(e, t, n, r) {
|
|
|
3173
3178
|
a();
|
|
3174
3179
|
});
|
|
3175
3180
|
if (t) try {
|
|
3176
|
-
let n =
|
|
3181
|
+
let n = tt.parse(t.viewJson);
|
|
3177
3182
|
n.suffix && (e._suffix = vr(n.suffix));
|
|
3178
3183
|
let r = _i(n.table);
|
|
3179
3184
|
r.forEach((e) => {
|
|
@@ -3185,7 +3190,7 @@ function Si(e, t, n, r) {
|
|
|
3185
3190
|
a();
|
|
3186
3191
|
});
|
|
3187
3192
|
if (t) try {
|
|
3188
|
-
let n =
|
|
3193
|
+
let n = tt.parse(t.viewJson), r = _i(n.table);
|
|
3189
3194
|
r.forEach((e) => {
|
|
3190
3195
|
e.table.sorter = !1;
|
|
3191
3196
|
}), e.params.columns = r, e.params.actions = n.action;
|
|
@@ -3227,7 +3232,7 @@ async function Ci(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3227
3232
|
key: "",
|
|
3228
3233
|
link: "",
|
|
3229
3234
|
merge: ""
|
|
3230
|
-
}, d = [], p =
|
|
3235
|
+
}, d = [], p = W(e), m = [], h = [];
|
|
3231
3236
|
for (let e of p) e.input === "group" ? (m.push(...e.params.children), h.push({
|
|
3232
3237
|
title: e.label,
|
|
3233
3238
|
key: e.key,
|
|
@@ -3241,7 +3246,7 @@ async function Ci(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3241
3246
|
if (t && Array.isArray(t)) {
|
|
3242
3247
|
if (s.sourceFn) {
|
|
3243
3248
|
let e = s.sourceFn, n = Function("sourceData", "POST", e);
|
|
3244
|
-
s.params.options = n(t, Z);
|
|
3249
|
+
s.params.options = await n(t, Z);
|
|
3245
3250
|
} else s.params.options = di(s, t, n);
|
|
3246
3251
|
}
|
|
3247
3252
|
} else s.params.options = [{
|
|
@@ -3253,7 +3258,7 @@ async function Ci(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3253
3258
|
if (e && Array.isArray(e)) {
|
|
3254
3259
|
if (s.sourceFn) {
|
|
3255
3260
|
let t = s.sourceFn;
|
|
3256
|
-
return Function("sourceData", "POST", t)(e, Z);
|
|
3261
|
+
return await Function("sourceData", "POST", t)(e, Z);
|
|
3257
3262
|
}
|
|
3258
3263
|
return di(s, e, t);
|
|
3259
3264
|
}
|
|
@@ -3292,7 +3297,7 @@ async function Ci(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3292
3297
|
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());
|
|
3293
3298
|
}
|
|
3294
3299
|
p.render = function(e, t) {
|
|
3295
|
-
return f(
|
|
3300
|
+
return f(me, {
|
|
3296
3301
|
showLabel: !1,
|
|
3297
3302
|
showFeedback: !1,
|
|
3298
3303
|
path: `child[${t}].${s.key}`,
|
|
@@ -3317,7 +3322,7 @@ async function Ci(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3317
3322
|
if (e && Array.isArray(e)) {
|
|
3318
3323
|
if (s.sourceFn) {
|
|
3319
3324
|
let t = s.sourceFn, n = Function("sourceData", "POST", t);
|
|
3320
|
-
s.params.options = n(e, Z);
|
|
3325
|
+
s.params.options = await n(e, Z);
|
|
3321
3326
|
} else s.params.options = di(s, e, t);
|
|
3322
3327
|
}
|
|
3323
3328
|
} else s.params._async = !0, s.params._fetch = !1, s.params._asyncFn = async () => {
|
|
@@ -3325,20 +3330,20 @@ async function Ci(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3325
3330
|
if (e && Array.isArray(e)) {
|
|
3326
3331
|
if (s.sourceFn) {
|
|
3327
3332
|
let t = s.sourceFn;
|
|
3328
|
-
return Function("sourceData", "POST", t)(e, Z);
|
|
3333
|
+
return await Function("sourceData", "POST", t)(e, Z);
|
|
3329
3334
|
}
|
|
3330
3335
|
return di(s, e, t);
|
|
3331
3336
|
}
|
|
3332
3337
|
};
|
|
3333
3338
|
}
|
|
3334
3339
|
if (s.search.multiple && (s.params.multiple = !0, s.search.defaultValue && (s.search.defaultValue = ci(s.search.defaultValue))), s.search.show) {
|
|
3335
|
-
let e =
|
|
3340
|
+
let e = W(s);
|
|
3336
3341
|
e.params._async && (e.params._search = !0, e.params._asyncFn = async () => {
|
|
3337
3342
|
let { sourceData: t, n } = await mi(e.source || e.search.source);
|
|
3338
3343
|
if (t && Array.isArray(t)) {
|
|
3339
3344
|
if (e.sourceFn) {
|
|
3340
3345
|
let n = e.sourceFn;
|
|
3341
|
-
return Function("sourceData", "POST", n)(t, Z);
|
|
3346
|
+
return await Function("sourceData", "POST", n)(t, Z);
|
|
3342
3347
|
}
|
|
3343
3348
|
return di(e, t, n);
|
|
3344
3349
|
}
|
|
@@ -3402,63 +3407,72 @@ var wi = [
|
|
|
3402
3407
|
], Ti = d({
|
|
3403
3408
|
name: "UzBom",
|
|
3404
3409
|
components: {
|
|
3405
|
-
NDataTable:
|
|
3406
|
-
NForm:
|
|
3410
|
+
NDataTable: oe,
|
|
3411
|
+
NForm: pe
|
|
3407
3412
|
},
|
|
3408
3413
|
props: {
|
|
3409
3414
|
value: {
|
|
3410
3415
|
type: Array,
|
|
3411
3416
|
default: () => []
|
|
3412
3417
|
},
|
|
3418
|
+
item: {
|
|
3419
|
+
required: !0,
|
|
3420
|
+
type: Object,
|
|
3421
|
+
default: () => ({})
|
|
3422
|
+
},
|
|
3413
3423
|
height: {
|
|
3414
3424
|
type: [Number, String],
|
|
3415
3425
|
default: void 0
|
|
3426
|
+
},
|
|
3427
|
+
status: {
|
|
3428
|
+
type: Number,
|
|
3429
|
+
default: 1
|
|
3416
3430
|
}
|
|
3417
3431
|
},
|
|
3418
3432
|
emits: ["update:value"],
|
|
3419
|
-
setup(e, { emit: t, expose:
|
|
3420
|
-
let { t:
|
|
3433
|
+
setup(e, { emit: t, expose: r }) {
|
|
3434
|
+
let i = p("mainFormValue"), { t: a } = U(), o = w(null), s = w([]), c = (e) => i?.value ? i.value()?.ticket_counts : e.counts, l = (e, t, n) => n ? `${n}-${t + 1}` : String(e.code || e.product_no || t + 1), u = (e, t = 1, n, r) => (e ?? []).map((e, t) => ({
|
|
3421
3435
|
row: e,
|
|
3422
3436
|
index: t
|
|
3423
3437
|
})).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) => {
|
|
3424
|
-
let a =
|
|
3438
|
+
let a = l(e, i, n), o = e.children, s = ti(e), d = t === 1 ? c(e) : ni(s, r);
|
|
3425
3439
|
return {
|
|
3426
3440
|
...e,
|
|
3427
|
-
required_quantity:
|
|
3428
|
-
counts:
|
|
3441
|
+
required_quantity: s,
|
|
3442
|
+
counts: d,
|
|
3429
3443
|
key: ii(e),
|
|
3430
3444
|
level: t,
|
|
3431
3445
|
code: a,
|
|
3432
3446
|
sort: i,
|
|
3433
3447
|
sort_index: i,
|
|
3434
|
-
...Array.isArray(o) ? { children:
|
|
3448
|
+
...Array.isArray(o) ? { children: u(o, t + 1, a, t === 1 ? d : r) } : {}
|
|
3435
3449
|
};
|
|
3436
|
-
}),
|
|
3450
|
+
}), d = w(u(e.value)), m = w([]), h = !1, g = 1, _ = ii, b = (e, t = 1, n) => {
|
|
3437
3451
|
e.forEach((e, r) => {
|
|
3438
|
-
let i = e.code, a =
|
|
3439
|
-
e.level !== t && (e.level = t), i !== a && (e.code = a), Array.isArray(e.children) &&
|
|
3452
|
+
let i = e.code, a = l(e, r, n);
|
|
3453
|
+
e.level !== t && (e.level = t), i !== a && (e.code = a), Array.isArray(e.children) && b(e.children, t + 1, a);
|
|
3440
3454
|
});
|
|
3441
|
-
},
|
|
3455
|
+
}, x = (e) => {
|
|
3442
3456
|
let t = [];
|
|
3443
3457
|
return e.forEach((e) => {
|
|
3444
3458
|
let n = e.children;
|
|
3445
|
-
Array.isArray(n) && n.length && (t.push(
|
|
3459
|
+
Array.isArray(n) && n.length && (t.push(_(e)), t.push(...x(n)));
|
|
3446
3460
|
}), t;
|
|
3447
|
-
},
|
|
3448
|
-
|
|
3449
|
-
},
|
|
3450
|
-
let e =
|
|
3451
|
-
if (!
|
|
3452
|
-
if (!
|
|
3453
|
-
|
|
3461
|
+
}, S = (e) => {
|
|
3462
|
+
m.value = e, h = !0;
|
|
3463
|
+
}, C = () => {
|
|
3464
|
+
let e = x(d.value);
|
|
3465
|
+
if (!h) {
|
|
3466
|
+
if (!d.value.length) return;
|
|
3467
|
+
m.value = e, h = !0;
|
|
3454
3468
|
return;
|
|
3455
3469
|
}
|
|
3456
|
-
let t = new Set(e), n =
|
|
3457
|
-
(n.length !==
|
|
3458
|
-
}, { run:
|
|
3459
|
-
|
|
3460
|
-
}, 200),
|
|
3461
|
-
let t =
|
|
3470
|
+
let t = new Set(e), n = m.value.filter((e) => t.has(e));
|
|
3471
|
+
(n.length !== m.value.length || n.some((e, t) => e !== m.value[t])) && (m.value = n);
|
|
3472
|
+
}, { run: T, flush: E, cancel: D } = Yr(() => {
|
|
3473
|
+
b(d.value), C();
|
|
3474
|
+
}, 200), O = /* @__PURE__ */ new WeakMap(), k = (e) => {
|
|
3475
|
+
let t = O.get(e);
|
|
3462
3476
|
if (t) return t;
|
|
3463
3477
|
let n = new Proxy(e, {
|
|
3464
3478
|
get(e, t, n) {
|
|
@@ -3466,22 +3480,22 @@ var wi = [
|
|
|
3466
3480
|
},
|
|
3467
3481
|
set(e, t, n) {
|
|
3468
3482
|
let r = Reflect.get(e, t) !== n, i = Reflect.set(e, t, n);
|
|
3469
|
-
return r && (t === "quantity" || t === "lossRate") && Reflect.set(e, "required_quantity", ti(e)), r && (t === "quantity" || t === "lossRate" || t === "counts") &&
|
|
3483
|
+
return r && (t === "quantity" || t === "lossRate") && Reflect.set(e, "required_quantity", ti(e)), r && (t === "quantity" || t === "lossRate" || t === "counts") && d.value.forEach((e) => ri(Array.isArray(e.children) ? e.children : [], e.counts)), r && t === "product_no" && T(), i;
|
|
3470
3484
|
}
|
|
3471
3485
|
});
|
|
3472
|
-
return
|
|
3473
|
-
},
|
|
3486
|
+
return O.set(e, n), n;
|
|
3487
|
+
}, A = () => {
|
|
3474
3488
|
let e = /* @__PURE__ */ new Set(), t = (n) => {
|
|
3475
3489
|
n.forEach((n) => {
|
|
3476
|
-
e.add(
|
|
3490
|
+
e.add(_(n));
|
|
3477
3491
|
let r = n.children;
|
|
3478
3492
|
Array.isArray(r) && t(r);
|
|
3479
3493
|
});
|
|
3480
3494
|
};
|
|
3481
|
-
t(
|
|
3495
|
+
t(d.value);
|
|
3482
3496
|
let n;
|
|
3483
3497
|
do
|
|
3484
|
-
n = `NEW-${String(
|
|
3498
|
+
n = `NEW-${String(g).padStart(4, "0")}`, g += 1;
|
|
3485
3499
|
while (e.has(n));
|
|
3486
3500
|
return {
|
|
3487
3501
|
key: n,
|
|
@@ -3491,7 +3505,7 @@ var wi = [
|
|
|
3491
3505
|
sort_index: 0,
|
|
3492
3506
|
product_no: n,
|
|
3493
3507
|
product_name: "",
|
|
3494
|
-
status:
|
|
3508
|
+
status: 0,
|
|
3495
3509
|
procurement: "0",
|
|
3496
3510
|
unit: "",
|
|
3497
3511
|
operation_no: "",
|
|
@@ -3499,17 +3513,19 @@ var wi = [
|
|
|
3499
3513
|
lossRate: 0,
|
|
3500
3514
|
remark: ""
|
|
3501
3515
|
};
|
|
3502
|
-
},
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3516
|
+
}, ee = (e) => u(e?.length ? e : [A()]);
|
|
3517
|
+
d.value.length || (d.value = ee(e.value));
|
|
3518
|
+
let j = (e) => {
|
|
3519
|
+
d.value = u(e), C(), t("update:value", d.value);
|
|
3520
|
+
}, { dragColumn: N, getSortableRowProps: P, tableRef: F, tableVersion: te } = $r(d, j), I = (e) => {
|
|
3521
|
+
let t = _(e), n = !1, r = (e) => e.map((e) => {
|
|
3522
|
+
if (_(e) === t) {
|
|
3507
3523
|
n = !0;
|
|
3508
3524
|
let t = e.children, r = Array.isArray(t) ? t : [];
|
|
3509
3525
|
return {
|
|
3510
3526
|
...e,
|
|
3511
3527
|
children: [...r, {
|
|
3512
|
-
...
|
|
3528
|
+
...A(),
|
|
3513
3529
|
sort: r.length,
|
|
3514
3530
|
sort_index: r.length
|
|
3515
3531
|
}]
|
|
@@ -3521,44 +3537,44 @@ var wi = [
|
|
|
3521
3537
|
children: r(i)
|
|
3522
3538
|
} : e;
|
|
3523
3539
|
});
|
|
3524
|
-
|
|
3525
|
-
},
|
|
3526
|
-
|
|
3527
|
-
},
|
|
3528
|
-
let t =
|
|
3529
|
-
if (
|
|
3540
|
+
j(r(d.value)), n && !m.value.includes(t) && S([...m.value, t]);
|
|
3541
|
+
}, R = (e) => {
|
|
3542
|
+
j(ai(d.value, _(e), A()));
|
|
3543
|
+
}, ne = (e) => {
|
|
3544
|
+
let t = _(e), n = (e) => e.reduce((e, r) => {
|
|
3545
|
+
if (_(r) === t) return e;
|
|
3530
3546
|
let i = r.children;
|
|
3531
3547
|
return e.push(Array.isArray(i) ? {
|
|
3532
3548
|
...r,
|
|
3533
3549
|
children: n(i)
|
|
3534
3550
|
} : r), e;
|
|
3535
3551
|
}, []);
|
|
3536
|
-
|
|
3537
|
-
},
|
|
3538
|
-
title: () => f(
|
|
3552
|
+
j(n(d.value));
|
|
3553
|
+
}, re = {
|
|
3554
|
+
title: () => f(de, {
|
|
3539
3555
|
trigger: "click",
|
|
3540
3556
|
options: [{
|
|
3541
|
-
label:
|
|
3557
|
+
label: a("Common.expand"),
|
|
3542
3558
|
key: "expand-all"
|
|
3543
3559
|
}, {
|
|
3544
|
-
label:
|
|
3560
|
+
label: a("Common.contract"),
|
|
3545
3561
|
key: "collapse-all"
|
|
3546
3562
|
}],
|
|
3547
3563
|
onSelect: (e) => {
|
|
3548
|
-
|
|
3564
|
+
S(e === "expand-all" ? x(d.value) : []);
|
|
3549
3565
|
}
|
|
3550
|
-
}, { default: () => f(
|
|
3566
|
+
}, { default: () => f(L, {
|
|
3551
3567
|
text: !0,
|
|
3552
3568
|
size: "small",
|
|
3553
|
-
"aria-label":
|
|
3554
|
-
}, { default: () =>
|
|
3569
|
+
"aria-label": a("BOM.expandOrCollapseAll")
|
|
3570
|
+
}, { default: () => a("BOM.level") }) }),
|
|
3555
3571
|
key: "level",
|
|
3556
3572
|
width: 70,
|
|
3557
3573
|
fixed: "left",
|
|
3558
3574
|
tree: !0,
|
|
3559
3575
|
ellipsis: { tooltip: !0 }
|
|
3560
|
-
},
|
|
3561
|
-
title:
|
|
3576
|
+
}, ie = {
|
|
3577
|
+
title: a("Common.action"),
|
|
3562
3578
|
key: "actions",
|
|
3563
3579
|
width: 240,
|
|
3564
3580
|
fixed: "right",
|
|
@@ -3570,21 +3586,21 @@ var wi = [
|
|
|
3570
3586
|
type: "normal",
|
|
3571
3587
|
key: "add-child",
|
|
3572
3588
|
color: "primary",
|
|
3573
|
-
buttonText:
|
|
3574
|
-
onClick: (e) =>
|
|
3589
|
+
buttonText: a("BOM.addChild"),
|
|
3590
|
+
onClick: (e) => I(e)
|
|
3575
3591
|
}, ...Number(e.level) === 1 ? [] : [{
|
|
3576
3592
|
type: "normal",
|
|
3577
3593
|
key: "add-sibling",
|
|
3578
3594
|
color: "primary",
|
|
3579
|
-
buttonText:
|
|
3580
|
-
onClick: (e) =>
|
|
3595
|
+
buttonText: a("BOM.addSibling"),
|
|
3596
|
+
onClick: (e) => R(e)
|
|
3581
3597
|
}, {
|
|
3582
3598
|
type: "normal",
|
|
3583
3599
|
key: "delete",
|
|
3584
3600
|
color: "error",
|
|
3585
|
-
buttonText:
|
|
3586
|
-
confirmText:
|
|
3587
|
-
onClick: (e) =>
|
|
3601
|
+
buttonText: a("Common.delete"),
|
|
3602
|
+
confirmText: a("BOM.deleteConfirm"),
|
|
3603
|
+
onClick: (e) => ne(e)
|
|
3588
3604
|
}]],
|
|
3589
3605
|
rowData: e,
|
|
3590
3606
|
hProps: {
|
|
@@ -3592,9 +3608,12 @@ var wi = [
|
|
|
3592
3608
|
secondary: !0
|
|
3593
3609
|
}
|
|
3594
3610
|
})
|
|
3595
|
-
},
|
|
3596
|
-
|
|
3597
|
-
|
|
3611
|
+
}, z = n(() => Number(e.status) === 2 ? s.value.filter((e) => e.key !== "actions") : s.value), ae = n(() => z.value.reduce((e, t) => {
|
|
3612
|
+
let n = "width" in t ? Number(t.width) : 120;
|
|
3613
|
+
return e + (Number.isFinite(n) ? n : 120);
|
|
3614
|
+
}, 0)), oe = (e) => {
|
|
3615
|
+
S(e);
|
|
3616
|
+
}, se = (e) => {
|
|
3598
3617
|
let t = Math.trunc(Number(e.level));
|
|
3599
3618
|
if (!Number.isFinite(t) || t < 1) return null;
|
|
3600
3619
|
let n = (t - 1) % 4 + 1, r = Math.floor((t - 1) / 4);
|
|
@@ -3603,109 +3622,118 @@ var wi = [
|
|
|
3603
3622
|
strength: `${Math.min(10 + r * 5, 40)}%`
|
|
3604
3623
|
};
|
|
3605
3624
|
};
|
|
3606
|
-
return
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3625
|
+
return M(() => i?.value?.()?.ticket_counts, (e) => {
|
|
3626
|
+
i?.value && d.value.forEach((t) => {
|
|
3627
|
+
t.counts = e, ri(Array.isArray(t.children) ? t.children : [], e);
|
|
3628
|
+
});
|
|
3629
|
+
}), M(() => e.value, (e) => {
|
|
3630
|
+
e !== d.value && (D(), d.value = ee(e), e?.length || t("update:value", d.value));
|
|
3631
|
+
}), M(d, () => C(), { immediate: !0 }), y(async () => {
|
|
3632
|
+
e.value?.length || t("update:value", d.value);
|
|
3633
|
+
let n = await Jn("bom_col");
|
|
3634
|
+
n = tt.parse(n.viewJson), n = _i(n.table);
|
|
3635
|
+
let { tableColumns: r } = await Ci(n), i = r.filter((e) => e.show).map((t) => ({
|
|
3636
|
+
title: t.title,
|
|
3637
|
+
key: t.key,
|
|
3638
|
+
width: t.width ?? 120,
|
|
3639
|
+
render: (n, r) => f(me, {
|
|
3616
3640
|
showLabel: !1,
|
|
3617
3641
|
showFeedback: !1,
|
|
3618
|
-
path: `child[${
|
|
3619
|
-
rule:
|
|
3620
|
-
...
|
|
3621
|
-
validator: typeof
|
|
3622
|
-
index:
|
|
3642
|
+
path: `child[${r}].${t.key}`,
|
|
3643
|
+
rule: t.form.rule?.required ? {
|
|
3644
|
+
...t.form.rule,
|
|
3645
|
+
validator: typeof t.form.rule.validator == "function" ? t.form.rule.validator : void 0,
|
|
3646
|
+
index: r
|
|
3623
3647
|
} : void 0
|
|
3624
3648
|
}, { default: () => f(Tr, {
|
|
3625
|
-
item:
|
|
3626
|
-
formValue:
|
|
3627
|
-
status:
|
|
3628
|
-
itemIndex:
|
|
3649
|
+
item: t,
|
|
3650
|
+
formValue: k(n),
|
|
3651
|
+
status: e.status,
|
|
3652
|
+
itemIndex: r
|
|
3629
3653
|
}) })
|
|
3630
|
-
}))
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3654
|
+
}));
|
|
3655
|
+
s.value = [
|
|
3656
|
+
N,
|
|
3657
|
+
re,
|
|
3658
|
+
...i,
|
|
3659
|
+
ie
|
|
3635
3660
|
];
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
t: r,
|
|
3642
|
-
formRef: i,
|
|
3643
|
-
innerData: l,
|
|
3644
|
-
tableRef: ee,
|
|
3661
|
+
}), r({ validate: async () => (await o.value?.validate(), d.value) }), v(D), {
|
|
3662
|
+
t: a,
|
|
3663
|
+
formRef: o,
|
|
3664
|
+
innerData: d,
|
|
3665
|
+
tableRef: F,
|
|
3645
3666
|
tableVersion: te,
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
innerExpandedRowKeys:
|
|
3649
|
-
getRowKey:
|
|
3667
|
+
displayedTableCols: z,
|
|
3668
|
+
displayedScrollX: ae,
|
|
3669
|
+
innerExpandedRowKeys: m,
|
|
3670
|
+
getRowKey: _,
|
|
3650
3671
|
getRowProps: (e) => {
|
|
3651
|
-
let t =
|
|
3672
|
+
let t = se(e);
|
|
3652
3673
|
return {
|
|
3653
|
-
...
|
|
3674
|
+
...P(e),
|
|
3654
3675
|
...t ? { style: `--uz-bom-level-color: ${t.color}; --uz-bom-level-strength: ${t.strength}` } : {}
|
|
3655
3676
|
};
|
|
3656
3677
|
},
|
|
3657
|
-
handleExpandedRowKeysChange:
|
|
3678
|
+
handleExpandedRowKeysChange: oe
|
|
3658
3679
|
};
|
|
3659
3680
|
}
|
|
3660
|
-
}), Ei = { class: "uz-bom" }
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
"row-props": e.getRowProps,
|
|
3673
|
-
"row-key": e.getRowKey,
|
|
3674
|
-
"children-key": "children",
|
|
3675
|
-
indent: 0,
|
|
3676
|
-
"expanded-row-keys": e.innerExpandedRowKeys,
|
|
3677
|
-
"min-height": e.height,
|
|
3678
|
-
"max-height": e.height,
|
|
3679
|
-
"scroll-x": e.scrollX,
|
|
3680
|
-
pagination: !1,
|
|
3681
|
-
size: "small",
|
|
3682
|
-
"onUpdate:expandedRowKeys": e.handleExpandedRowKeysChange,
|
|
3683
|
-
"scrollbar-props": { trigger: "none" },
|
|
3684
|
-
remote: ""
|
|
3681
|
+
}), Ei = { class: "uz-bom uz-flex-1 uz-w-full" }, Di = { class: "uz-flex uz-justify-between" }, Oi = { class: "uz-com-title" }, ki = {
|
|
3682
|
+
key: 0,
|
|
3683
|
+
class: "uz-table-asterisk"
|
|
3684
|
+
};
|
|
3685
|
+
function Ai(e, t, n, s, u, d) {
|
|
3686
|
+
let f = D("NDataTable"), p = D("NForm");
|
|
3687
|
+
return x(), a("div", Ei, [o("div", Di, [
|
|
3688
|
+
o("div", Oi, [c(A(e.item.label) + " ", 1), e.item.form.rule.required ? (x(), a("span", ki, " \xA0* ")) : i("", !0)]),
|
|
3689
|
+
t[0] ||= o("div", { class: "uz-br" }, null, -1),
|
|
3690
|
+
l(p, {
|
|
3691
|
+
ref: "formRef",
|
|
3692
|
+
model: { child: e.innerData }
|
|
3685
3693
|
}, {
|
|
3686
|
-
|
|
3694
|
+
default: P(() => [(x(), r(f, {
|
|
3695
|
+
key: e.tableVersion,
|
|
3696
|
+
ref: "tableRef",
|
|
3697
|
+
columns: e.displayedTableCols,
|
|
3698
|
+
data: e.innerData,
|
|
3699
|
+
"row-props": e.getRowProps,
|
|
3700
|
+
"row-key": e.getRowKey,
|
|
3701
|
+
"children-key": "children",
|
|
3702
|
+
indent: 0,
|
|
3703
|
+
"expanded-row-keys": e.innerExpandedRowKeys,
|
|
3704
|
+
"min-height": e.height,
|
|
3705
|
+
"max-height": e.height,
|
|
3706
|
+
"scroll-x": e.displayedScrollX,
|
|
3707
|
+
pagination: !1,
|
|
3708
|
+
size: "small",
|
|
3709
|
+
"onUpdate:expandedRowKeys": e.handleExpandedRowKeysChange,
|
|
3710
|
+
"scrollbar-props": { trigger: "none" },
|
|
3711
|
+
remote: ""
|
|
3712
|
+
}, {
|
|
3713
|
+
empty: P(() => [E(e.$slots, "empty", {}, () => [c(A(e.t("BOM.empty")), 1)])]),
|
|
3714
|
+
_: 3
|
|
3715
|
+
}, 8, [
|
|
3716
|
+
"columns",
|
|
3717
|
+
"data",
|
|
3718
|
+
"row-props",
|
|
3719
|
+
"row-key",
|
|
3720
|
+
"expanded-row-keys",
|
|
3721
|
+
"min-height",
|
|
3722
|
+
"max-height",
|
|
3723
|
+
"scroll-x",
|
|
3724
|
+
"onUpdate:expandedRowKeys"
|
|
3725
|
+
]))]),
|
|
3687
3726
|
_: 3
|
|
3688
|
-
}, 8, [
|
|
3689
|
-
|
|
3690
|
-
"data",
|
|
3691
|
-
"row-props",
|
|
3692
|
-
"row-key",
|
|
3693
|
-
"expanded-row-keys",
|
|
3694
|
-
"min-height",
|
|
3695
|
-
"max-height",
|
|
3696
|
-
"scroll-x",
|
|
3697
|
-
"onUpdate:expandedRowKeys"
|
|
3698
|
-
]))]),
|
|
3699
|
-
_: 3
|
|
3700
|
-
}, 8, ["model"])]);
|
|
3727
|
+
}, 8, ["model"])
|
|
3728
|
+
])]);
|
|
3701
3729
|
}
|
|
3702
|
-
var
|
|
3730
|
+
var ji = /*#__PURE__*/ Q(Ti, [["render", Ai]]), Mi = 46, Ni = 8, Pi = 2 * Math.PI * Mi, Fi = Ni, Ii = 19, Li = 69, Ri = 52, zi = 8, Bi = 135, Vi = 270, Hi = 2 * Math.PI * Ri, Ui = Vi / 360 * Hi, Wi = 11, Gi = `rotate(${Bi} 60 ${Li})`, Ki = (e, t, n, r) => {
|
|
3703
3731
|
let i = r * Math.PI / 180;
|
|
3704
3732
|
return {
|
|
3705
3733
|
x: e + n * Math.cos(i),
|
|
3706
3734
|
y: t + n * Math.sin(i)
|
|
3707
3735
|
};
|
|
3708
|
-
},
|
|
3736
|
+
}, qi = ({ x: e, y: t }) => `${e.toFixed(3)} ${t.toFixed(3)}`, Ji = (e, t, n, r, i, a) => {
|
|
3709
3737
|
if (a <= 0) return "";
|
|
3710
3738
|
let o = n + r / 2, s = n - r / 2;
|
|
3711
3739
|
if (a >= 359.999) {
|
|
@@ -3717,16 +3745,16 @@ var Oi = /*#__PURE__*/ Q(Ti, [["render", Di]]), ki = 46, Ai = 8, ji = 2 * Math.P
|
|
|
3717
3745
|
`A ${s} ${s} 0 1 0 ${i}`
|
|
3718
3746
|
].join(" ");
|
|
3719
3747
|
}
|
|
3720
|
-
let c = i + a, l =
|
|
3748
|
+
let c = i + a, l = Ki(e, t, o, i), u = Ki(e, t, o, c), d = Ki(e, t, s, c), f = Ki(e, t, s, i), p = r / 2, m = +(a > 180);
|
|
3721
3749
|
return [
|
|
3722
|
-
`M ${
|
|
3723
|
-
`A ${o} ${o} 0 ${m} 1 ${
|
|
3724
|
-
`A ${p} ${p} 0 0 1 ${
|
|
3725
|
-
`A ${s} ${s} 0 ${m} 0 ${
|
|
3726
|
-
`A ${p} ${p} 0 0 1 ${
|
|
3750
|
+
`M ${qi(l)}`,
|
|
3751
|
+
`A ${o} ${o} 0 ${m} 1 ${qi(u)}`,
|
|
3752
|
+
`A ${p} ${p} 0 0 1 ${qi(d)}`,
|
|
3753
|
+
`A ${s} ${s} 0 ${m} 0 ${qi(f)}`,
|
|
3754
|
+
`A ${p} ${p} 0 0 1 ${qi(l)}`,
|
|
3727
3755
|
"Z"
|
|
3728
3756
|
].join(" ");
|
|
3729
|
-
},
|
|
3757
|
+
}, Yi = (e) => {
|
|
3730
3758
|
if (!e) return "";
|
|
3731
3759
|
let t = e.toLowerCase();
|
|
3732
3760
|
if (t.length > 6 && (t = t.substring(0, 7)), t && /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)) {
|
|
@@ -3740,7 +3768,7 @@ var Oi = /*#__PURE__*/ Q(Ti, [["render", Di]]), ki = 46, Ai = 8, ji = 2 * Math.P
|
|
|
3740
3768
|
return e.join(",");
|
|
3741
3769
|
}
|
|
3742
3770
|
return "0,0,0";
|
|
3743
|
-
},
|
|
3771
|
+
}, Xi = d({
|
|
3744
3772
|
name: "UzCircle",
|
|
3745
3773
|
components: { UzNumberFlow: rt },
|
|
3746
3774
|
props: {
|
|
@@ -3763,14 +3791,14 @@ var Oi = /*#__PURE__*/ Q(Ti, [["render", Di]]), ki = 46, Ai = 8, ji = 2 * Math.P
|
|
|
3763
3791
|
}
|
|
3764
3792
|
},
|
|
3765
3793
|
setup(e) {
|
|
3766
|
-
let t = ee(), r = `uz-blurs-${t}`, i = n(() => `rgba(${
|
|
3794
|
+
let t = ee(), r = `uz-blurs-${t}`, i = n(() => `rgba(${Yi(e.color).split(",").map((e) => {
|
|
3767
3795
|
let t = Number(e) - 50;
|
|
3768
3796
|
return t < 0 && (t = 0), t;
|
|
3769
|
-
})},1)`), a = n(() => `rgba(${
|
|
3797
|
+
})},1)`), a = n(() => `rgba(${Yi(e.color)},1)`), o = n(() => {
|
|
3770
3798
|
let t = Number(e.circle);
|
|
3771
3799
|
return Number.isFinite(t) ? Math.min(100, Math.max(0, t)) : 0;
|
|
3772
3800
|
}), s = w(o.value), c;
|
|
3773
|
-
|
|
3801
|
+
M(o, (e) => {
|
|
3774
3802
|
if (c !== void 0 && cancelAnimationFrame(c), typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches || typeof requestAnimationFrame > "u") {
|
|
3775
3803
|
s.value = e;
|
|
3776
3804
|
return;
|
|
@@ -3785,62 +3813,62 @@ var Oi = /*#__PURE__*/ Q(Ti, [["render", Di]]), ki = 46, Ai = 8, ji = 2 * Math.P
|
|
|
3785
3813
|
c !== void 0 && cancelAnimationFrame(c);
|
|
3786
3814
|
});
|
|
3787
3815
|
let l = n(() => {
|
|
3788
|
-
let e =
|
|
3816
|
+
let e = Pi * (s.value / 100), t = Pi - e;
|
|
3789
3817
|
if (e === 0) return {
|
|
3790
3818
|
activeLength: 0,
|
|
3791
3819
|
activeStart: 0,
|
|
3792
|
-
remainingLength:
|
|
3820
|
+
remainingLength: Pi,
|
|
3793
3821
|
remainingStart: 0
|
|
3794
3822
|
};
|
|
3795
3823
|
if (t === 0) return {
|
|
3796
|
-
activeLength:
|
|
3824
|
+
activeLength: Pi,
|
|
3797
3825
|
activeStart: 0,
|
|
3798
3826
|
remainingLength: 0,
|
|
3799
3827
|
remainingStart: 0
|
|
3800
3828
|
};
|
|
3801
|
-
let n = Math.min(1, Math.min(e, t) /
|
|
3829
|
+
let n = Math.min(1, Math.min(e, t) / Ii), r = Fi + 3 * n, i = Ni * n, a = e < Ii ? i : Pi - (t < Ii ? i : t - r) - r * 2, o = Pi - a - r * 2;
|
|
3802
3830
|
return {
|
|
3803
3831
|
activeLength: a,
|
|
3804
3832
|
activeStart: r / 2,
|
|
3805
3833
|
remainingLength: o,
|
|
3806
3834
|
remainingStart: r / 2 + a + r
|
|
3807
3835
|
};
|
|
3808
|
-
}), u = n(() => l.value.activeLength), d = n(() => l.value.activeStart), f = n(() => l.value.remainingLength), p = n(() => l.value.remainingStart), m = n(() =>
|
|
3809
|
-
let e =
|
|
3836
|
+
}), u = n(() => l.value.activeLength), d = n(() => l.value.activeStart), f = n(() => l.value.remainingLength), p = n(() => l.value.remainingStart), m = n(() => Ji(60, 60, Mi, Ni, -90 + p.value / Pi * 360, f.value / Pi * 360)), h = n(() => {
|
|
3837
|
+
let e = Ui * (s.value / 100), t = Ui - e;
|
|
3810
3838
|
if (e === 0) return {
|
|
3811
3839
|
activeLength: 0,
|
|
3812
|
-
remainingLength:
|
|
3840
|
+
remainingLength: Ui,
|
|
3813
3841
|
remainingStart: 0
|
|
3814
3842
|
};
|
|
3815
3843
|
if (t === 0) return {
|
|
3816
|
-
activeLength:
|
|
3844
|
+
activeLength: Ui,
|
|
3817
3845
|
remainingLength: 0,
|
|
3818
3846
|
remainingStart: 0
|
|
3819
3847
|
};
|
|
3820
|
-
let n = Math.min(
|
|
3848
|
+
let n = Math.min(Wi, e, t);
|
|
3821
3849
|
return {
|
|
3822
3850
|
activeLength: e - n / 2,
|
|
3823
3851
|
remainingLength: t - n / 2,
|
|
3824
3852
|
remainingStart: e + n / 2
|
|
3825
3853
|
};
|
|
3826
|
-
}), g = n(() => h.value.activeLength), _ = n(() => h.value.remainingLength), y = n(() => h.value.remainingStart), b = n(() =>
|
|
3854
|
+
}), g = n(() => h.value.activeLength), _ = n(() => h.value.remainingLength), y = n(() => h.value.remainingStart), b = n(() => Ji(60, Li, Ri, zi, Bi + y.value / Hi * 360, _.value / Hi * 360));
|
|
3827
3855
|
return {
|
|
3828
3856
|
color: n(() => e.color),
|
|
3829
3857
|
colorA: i,
|
|
3830
3858
|
colorB: a,
|
|
3831
|
-
fullRadius:
|
|
3832
|
-
fullStrokeWidth:
|
|
3833
|
-
fullCircumference:
|
|
3859
|
+
fullRadius: Mi,
|
|
3860
|
+
fullStrokeWidth: Ni,
|
|
3861
|
+
fullCircumference: Pi,
|
|
3834
3862
|
fullActiveLength: u,
|
|
3835
3863
|
fullActiveStart: d,
|
|
3836
3864
|
fullRemainingLength: f,
|
|
3837
3865
|
fullRemainingStart: p,
|
|
3838
3866
|
fullRemainingPath: m,
|
|
3839
|
-
gaugeCenterY:
|
|
3840
|
-
gaugeRadius:
|
|
3841
|
-
gaugeStrokeWidth:
|
|
3842
|
-
gaugeCircumference:
|
|
3843
|
-
gaugeTransform:
|
|
3867
|
+
gaugeCenterY: Li,
|
|
3868
|
+
gaugeRadius: Ri,
|
|
3869
|
+
gaugeStrokeWidth: zi,
|
|
3870
|
+
gaugeCircumference: Hi,
|
|
3871
|
+
gaugeTransform: Gi,
|
|
3844
3872
|
gaugeActiveLength: g,
|
|
3845
3873
|
gaugeRemainingLength: _,
|
|
3846
3874
|
gaugeRemainingStart: y,
|
|
@@ -3849,31 +3877,31 @@ var Oi = /*#__PURE__*/ Q(Ti, [["render", Di]]), ki = 46, Ai = 8, ji = 2 * Math.P
|
|
|
3849
3877
|
blurFilterId: r
|
|
3850
3878
|
};
|
|
3851
3879
|
}
|
|
3852
|
-
}),
|
|
3880
|
+
}), Zi = { class: "uz-circle" }, Qi = {
|
|
3853
3881
|
key: 0,
|
|
3854
3882
|
viewBox: "0 0 120 120",
|
|
3855
3883
|
"aria-hidden": "true"
|
|
3856
|
-
},
|
|
3884
|
+
}, $i = ["id"], ea = ["stop-color"], ta = ["stop-color"], na = ["id"], ra = [
|
|
3857
3885
|
"r",
|
|
3858
3886
|
"stroke-width",
|
|
3859
3887
|
"stroke-dasharray",
|
|
3860
3888
|
"stroke-dashoffset",
|
|
3861
3889
|
"filter",
|
|
3862
3890
|
"stroke"
|
|
3863
|
-
],
|
|
3891
|
+
], ia = [
|
|
3864
3892
|
"d",
|
|
3865
3893
|
"fill",
|
|
3866
3894
|
"filter"
|
|
3867
|
-
],
|
|
3895
|
+
], aa = {
|
|
3868
3896
|
class: "uz-circle__unit",
|
|
3869
3897
|
x: "60",
|
|
3870
3898
|
y: "82",
|
|
3871
3899
|
"text-anchor": "middle"
|
|
3872
|
-
},
|
|
3900
|
+
}, oa = {
|
|
3873
3901
|
key: 1,
|
|
3874
3902
|
viewBox: "0 0 120 120",
|
|
3875
3903
|
"aria-hidden": "true"
|
|
3876
|
-
},
|
|
3904
|
+
}, sa = ["id"], ca = ["stop-color"], la = ["stop-color"], ua = ["id"], da = [
|
|
3877
3905
|
"cy",
|
|
3878
3906
|
"r",
|
|
3879
3907
|
"stroke-width",
|
|
@@ -3881,19 +3909,19 @@ var Oi = /*#__PURE__*/ Q(Ti, [["render", Di]]), ki = 46, Ai = 8, ji = 2 * Math.P
|
|
|
3881
3909
|
"transform",
|
|
3882
3910
|
"filter",
|
|
3883
3911
|
"stroke"
|
|
3884
|
-
],
|
|
3912
|
+
], fa = [
|
|
3885
3913
|
"d",
|
|
3886
3914
|
"fill",
|
|
3887
3915
|
"filter"
|
|
3888
|
-
],
|
|
3916
|
+
], pa = {
|
|
3889
3917
|
class: "uz-circle__unit uz-circle__unit--gauge",
|
|
3890
3918
|
x: "60",
|
|
3891
3919
|
y: "90",
|
|
3892
3920
|
"text-anchor": "middle"
|
|
3893
3921
|
};
|
|
3894
|
-
function
|
|
3922
|
+
function ma(e, t, n, r, s, c) {
|
|
3895
3923
|
let u = D("UzNumberFlow");
|
|
3896
|
-
return x(), a("div",
|
|
3924
|
+
return x(), a("div", Zi, [e.mode === 0 ? (x(), a("svg", Qi, [
|
|
3897
3925
|
o("defs", null, [o("linearGradient", {
|
|
3898
3926
|
id: `uz-progress-grad-${e.uniqueId}`,
|
|
3899
3927
|
x1: "1",
|
|
@@ -3903,10 +3931,10 @@ function da(e, t, n, r, s, c) {
|
|
|
3903
3931
|
}, [o("stop", {
|
|
3904
3932
|
offset: "0%",
|
|
3905
3933
|
"stop-color": e.colorA
|
|
3906
|
-
}, null, 8,
|
|
3934
|
+
}, null, 8, ea), o("stop", {
|
|
3907
3935
|
offset: "50%",
|
|
3908
3936
|
"stop-color": e.colorB
|
|
3909
|
-
}, null, 8,
|
|
3937
|
+
}, null, 8, ta)], 8, $i), o("filter", { id: e.blurFilterId }, [...t[0] ||= [
|
|
3910
3938
|
o("feOffset", {
|
|
3911
3939
|
result: "offOut",
|
|
3912
3940
|
in: "SourceGraphic",
|
|
@@ -3923,7 +3951,7 @@ function da(e, t, n, r, s, c) {
|
|
|
3923
3951
|
in2: "blurOut",
|
|
3924
3952
|
mode: "normal"
|
|
3925
3953
|
}, null, -1)
|
|
3926
|
-
]], 8,
|
|
3954
|
+
]], 8, na)]),
|
|
3927
3955
|
e.fullActiveLength > 0 ? (x(), a("circle", {
|
|
3928
3956
|
key: 0,
|
|
3929
3957
|
class: "uz-circle__progress",
|
|
@@ -3938,7 +3966,7 @@ function da(e, t, n, r, s, c) {
|
|
|
3938
3966
|
transform: "rotate(-90 60 60)",
|
|
3939
3967
|
filter: `url(#${e.blurFilterId})`,
|
|
3940
3968
|
stroke: `url(#uz-progress-grad-${e.uniqueId})`
|
|
3941
|
-
}, null, 8,
|
|
3969
|
+
}, null, 8, ra)) : i("", !0),
|
|
3942
3970
|
e.fullRemainingPath ? (x(), a("path", {
|
|
3943
3971
|
key: 1,
|
|
3944
3972
|
class: "uz-circle__progress",
|
|
@@ -3946,9 +3974,9 @@ function da(e, t, n, r, s, c) {
|
|
|
3946
3974
|
fill: e.color,
|
|
3947
3975
|
"fill-opacity": "0.1",
|
|
3948
3976
|
filter: `url(#${e.blurFilterId})`
|
|
3949
|
-
}, null, 8,
|
|
3950
|
-
o("text",
|
|
3951
|
-
])) : (x(), a("svg",
|
|
3977
|
+
}, null, 8, ia)) : i("", !0),
|
|
3978
|
+
o("text", aa, A(e.circleUnit), 1)
|
|
3979
|
+
])) : (x(), a("svg", oa, [
|
|
3952
3980
|
o("defs", null, [o("linearGradient", {
|
|
3953
3981
|
id: `uz-progress-grad-1-${e.uniqueId}`,
|
|
3954
3982
|
x1: "1",
|
|
@@ -3958,10 +3986,10 @@ function da(e, t, n, r, s, c) {
|
|
|
3958
3986
|
}, [o("stop", {
|
|
3959
3987
|
offset: "0%",
|
|
3960
3988
|
"stop-color": e.colorA
|
|
3961
|
-
}, null, 8,
|
|
3989
|
+
}, null, 8, ca), o("stop", {
|
|
3962
3990
|
offset: "50%",
|
|
3963
3991
|
"stop-color": e.colorB
|
|
3964
|
-
}, null, 8,
|
|
3992
|
+
}, null, 8, la)], 8, sa), o("filter", { id: e.blurFilterId }, [...t[1] ||= [
|
|
3965
3993
|
o("feOffset", {
|
|
3966
3994
|
result: "offOut",
|
|
3967
3995
|
in: "SourceGraphic",
|
|
@@ -3978,7 +4006,7 @@ function da(e, t, n, r, s, c) {
|
|
|
3978
4006
|
in2: "blurOut",
|
|
3979
4007
|
mode: "normal"
|
|
3980
4008
|
}, null, -1)
|
|
3981
|
-
]], 8,
|
|
4009
|
+
]], 8, ua)]),
|
|
3982
4010
|
e.gaugeActiveLength > 0 ? (x(), a("circle", {
|
|
3983
4011
|
key: 0,
|
|
3984
4012
|
class: "uz-circle__progress",
|
|
@@ -3992,7 +4020,7 @@ function da(e, t, n, r, s, c) {
|
|
|
3992
4020
|
transform: e.gaugeTransform,
|
|
3993
4021
|
filter: `url(#${e.blurFilterId})`,
|
|
3994
4022
|
stroke: `url(#uz-progress-grad-1-${e.uniqueId})`
|
|
3995
|
-
}, null, 8,
|
|
4023
|
+
}, null, 8, da)) : i("", !0),
|
|
3996
4024
|
e.gaugeRemainingPath ? (x(), a("path", {
|
|
3997
4025
|
key: 1,
|
|
3998
4026
|
class: "uz-circle__progress",
|
|
@@ -4000,15 +4028,15 @@ function da(e, t, n, r, s, c) {
|
|
|
4000
4028
|
fill: e.color,
|
|
4001
4029
|
"fill-opacity": "0.1",
|
|
4002
4030
|
filter: `url(#${e.blurFilterId})`
|
|
4003
|
-
}, null, 8,
|
|
4004
|
-
o("text",
|
|
4031
|
+
}, null, 8, fa)) : i("", !0),
|
|
4032
|
+
o("text", pa, A(e.circleUnit), 1)
|
|
4005
4033
|
])), 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)]);
|
|
4006
4034
|
}
|
|
4007
|
-
var
|
|
4035
|
+
var ha = /*#__PURE__*/ Q(Xi, [["render", ma]]), ga = d({
|
|
4008
4036
|
name: "UzCamera",
|
|
4009
4037
|
components: {
|
|
4010
|
-
NButton:
|
|
4011
|
-
NModal:
|
|
4038
|
+
NButton: L,
|
|
4039
|
+
NModal: Ce
|
|
4012
4040
|
},
|
|
4013
4041
|
props: {
|
|
4014
4042
|
mode: {
|
|
@@ -4030,7 +4058,7 @@ var fa = /*#__PURE__*/ Q(qi, [["render", da]]), pa = d({
|
|
|
4030
4058
|
},
|
|
4031
4059
|
emits: ["on-update:value"],
|
|
4032
4060
|
setup(e, { emit: t }) {
|
|
4033
|
-
let { t: n } =
|
|
4061
|
+
let { t: n } = U(), r = w(), i = w(!1), a = w(!1), o = He(), s = null, c = null, l = (e, t) => {
|
|
4034
4062
|
s.beginPath(), s.moveTo(e.x, e.y), s.lineTo(t.x, t.y), s.lineWidth = 2, s.strokeStyle = "green", s.stroke();
|
|
4035
4063
|
}, u = () => {
|
|
4036
4064
|
a.value && requestAnimationFrame(d);
|
|
@@ -4086,7 +4114,7 @@ var fa = /*#__PURE__*/ Q(qi, [["render", da]]), pa = d({
|
|
|
4086
4114
|
e.mode === "video" && g();
|
|
4087
4115
|
}), v(() => {
|
|
4088
4116
|
f();
|
|
4089
|
-
}),
|
|
4117
|
+
}), M([() => e.width, () => e.width], () => {
|
|
4090
4118
|
e.mode === "video" && (f(), g());
|
|
4091
4119
|
}), {
|
|
4092
4120
|
t: n,
|
|
@@ -4097,11 +4125,11 @@ var fa = /*#__PURE__*/ Q(qi, [["render", da]]), pa = d({
|
|
|
4097
4125
|
closeAll: f
|
|
4098
4126
|
};
|
|
4099
4127
|
}
|
|
4100
|
-
}),
|
|
4128
|
+
}), _a = ["width", "height"], va = ["width", "height"], ya = { class: "uz-scan-video" }, ba = {
|
|
4101
4129
|
ref: "videoRef",
|
|
4102
4130
|
playsInline: ""
|
|
4103
4131
|
};
|
|
4104
|
-
function
|
|
4132
|
+
function xa(t, n, s, l, u, d) {
|
|
4105
4133
|
let f = D("NButton"), p = D("NModal");
|
|
4106
4134
|
return x(), a(e, null, [
|
|
4107
4135
|
t.mode === "button" ? (x(), r(f, {
|
|
@@ -4110,7 +4138,7 @@ function va(t, n, s, l, u, d) {
|
|
|
4110
4138
|
loading: t.loading,
|
|
4111
4139
|
onClick: t.doScan
|
|
4112
4140
|
}, {
|
|
4113
|
-
default:
|
|
4141
|
+
default: P(() => [c(A(t.t("Common.scan")), 1)]),
|
|
4114
4142
|
_: 1
|
|
4115
4143
|
}, 8, ["loading", "onClick"])) : i("", !0),
|
|
4116
4144
|
t.mode === "button" ? (x(), r(p, {
|
|
@@ -4123,7 +4151,7 @@ function va(t, n, s, l, u, d) {
|
|
|
4123
4151
|
"mask-closable": !1,
|
|
4124
4152
|
"on-after-leave": t.closeAll
|
|
4125
4153
|
}, {
|
|
4126
|
-
default:
|
|
4154
|
+
default: P(() => [o("div", {
|
|
4127
4155
|
class: "uz-scan-canvas-main",
|
|
4128
4156
|
style: _({
|
|
4129
4157
|
width: `${t.width}px`,
|
|
@@ -4133,7 +4161,7 @@ function va(t, n, s, l, u, d) {
|
|
|
4133
4161
|
id: "uz-scan-canvas",
|
|
4134
4162
|
width: t.width,
|
|
4135
4163
|
height: t.height
|
|
4136
|
-
}, null, 8,
|
|
4164
|
+
}, null, 8, _a)], 4)]),
|
|
4137
4165
|
_: 1
|
|
4138
4166
|
}, 8, [
|
|
4139
4167
|
"show",
|
|
@@ -4151,21 +4179,21 @@ function va(t, n, s, l, u, d) {
|
|
|
4151
4179
|
id: "uz-scan-canvas",
|
|
4152
4180
|
width: t.width,
|
|
4153
4181
|
height: t.height
|
|
4154
|
-
}, null, 8,
|
|
4155
|
-
o("div",
|
|
4182
|
+
}, null, 8, va)], 4)) : i("", !0),
|
|
4183
|
+
o("div", ya, [o("video", ba, null, 512)])
|
|
4156
4184
|
], 64);
|
|
4157
4185
|
}
|
|
4158
|
-
var
|
|
4186
|
+
var Sa = /*#__PURE__*/ Q(ga, [["render", xa]]), Ca = /* @__PURE__ */ new WeakMap(), wa = d({
|
|
4159
4187
|
name: "UzSearchBar",
|
|
4160
4188
|
components: {
|
|
4161
|
-
NIcon:
|
|
4162
|
-
NButton:
|
|
4163
|
-
NButtonGroup:
|
|
4164
|
-
NGrid:
|
|
4165
|
-
NGridItem:
|
|
4166
|
-
NInputGroup:
|
|
4167
|
-
NInputGroupLabel:
|
|
4168
|
-
NPopover:
|
|
4189
|
+
NIcon: V,
|
|
4190
|
+
NButton: L,
|
|
4191
|
+
NButtonGroup: R,
|
|
4192
|
+
NGrid: he,
|
|
4193
|
+
NGridItem: ge,
|
|
4194
|
+
NInputGroup: be,
|
|
4195
|
+
NInputGroupLabel: xe,
|
|
4196
|
+
NPopover: Ee,
|
|
4169
4197
|
UzFormItem: Tr
|
|
4170
4198
|
},
|
|
4171
4199
|
props: {
|
|
@@ -4204,17 +4232,17 @@ var ya = /*#__PURE__*/ Q(pa, [["render", va]]), ba = /* @__PURE__ */ new WeakMap
|
|
|
4204
4232
|
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);
|
|
4205
4233
|
}
|
|
4206
4234
|
});
|
|
4207
|
-
n.observe(e),
|
|
4235
|
+
n.observe(e), Ca.set(e, n);
|
|
4208
4236
|
},
|
|
4209
4237
|
unmounted: (e) => {
|
|
4210
|
-
|
|
4238
|
+
Ca.get(e)?.disconnect(), Ca.delete(e);
|
|
4211
4239
|
}
|
|
4212
4240
|
} },
|
|
4213
4241
|
emits: ["update:loading", "on-update:value"],
|
|
4214
4242
|
setup(e, { emit: t }) {
|
|
4215
|
-
let { t: n } =
|
|
4243
|
+
let { t: n } = U(), r = Je(), 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) => {
|
|
4216
4244
|
if (e.loading) return;
|
|
4217
|
-
let r =
|
|
4245
|
+
let r = W(i.value);
|
|
4218
4246
|
!n && r.query && (r.query.page = 1);
|
|
4219
4247
|
let o = [];
|
|
4220
4248
|
a.value.forEach((e) => {
|
|
@@ -4233,7 +4261,7 @@ var ya = /*#__PURE__*/ Q(pa, [["render", va]]), ba = /* @__PURE__ */ new WeakMap
|
|
|
4233
4261
|
}
|
|
4234
4262
|
}), t("update:loading", !0), t("on-update:value", o);
|
|
4235
4263
|
}, y = () => {
|
|
4236
|
-
e.loading || (i.value =
|
|
4264
|
+
e.loading || (i.value = W(o.value), v());
|
|
4237
4265
|
}, b = () => {
|
|
4238
4266
|
s.value = !s.value;
|
|
4239
4267
|
}, 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) => {
|
|
@@ -4246,7 +4274,7 @@ var ya = /*#__PURE__*/ Q(pa, [["render", va]]), ba = /* @__PURE__ */ new WeakMap
|
|
|
4246
4274
|
if (e.params.type.indexOf("range") > -1) switch (e.search.defaultValue) {
|
|
4247
4275
|
case "now":
|
|
4248
4276
|
{
|
|
4249
|
-
let t =
|
|
4277
|
+
let t = $e().startOf("day").valueOf(), r = $e().endOf("day").valueOf();
|
|
4250
4278
|
n[e.key] = [t, r];
|
|
4251
4279
|
}
|
|
4252
4280
|
break;
|
|
@@ -4270,7 +4298,7 @@ var ya = /*#__PURE__*/ Q(pa, [["render", va]]), ba = /* @__PURE__ */ new WeakMap
|
|
|
4270
4298
|
};
|
|
4271
4299
|
}, C = (t) => {
|
|
4272
4300
|
if (h.value = [], t && t.length > 0) {
|
|
4273
|
-
let { data: n, values: s } = S(
|
|
4301
|
+
let { data: n, values: s } = S(W(t)), c = {}, l = e.id || r.params.id;
|
|
4274
4302
|
if (e.cache && l) {
|
|
4275
4303
|
let e = J(`tables_${l}`, !1);
|
|
4276
4304
|
e && e.params.forEach((e) => {
|
|
@@ -4284,14 +4312,14 @@ var ya = /*#__PURE__*/ Q(pa, [["render", va]]), ba = /* @__PURE__ */ new WeakMap
|
|
|
4284
4312
|
c[e.key] = e.value;
|
|
4285
4313
|
});
|
|
4286
4314
|
}
|
|
4287
|
-
a.value = n, i.value =
|
|
4315
|
+
a.value = n, i.value = W({
|
|
4288
4316
|
...s,
|
|
4289
4317
|
...c
|
|
4290
|
-
}), o.value =
|
|
4318
|
+
}), o.value = W(s);
|
|
4291
4319
|
}
|
|
4292
4320
|
v(!0);
|
|
4293
4321
|
};
|
|
4294
|
-
return
|
|
4322
|
+
return M(() => e.data, (e) => {
|
|
4295
4323
|
C(e);
|
|
4296
4324
|
}), {
|
|
4297
4325
|
t: n,
|
|
@@ -4323,60 +4351,60 @@ var ya = /*#__PURE__*/ Q(pa, [["render", va]]), ba = /* @__PURE__ */ new WeakMap
|
|
|
4323
4351
|
tabButtonType: x
|
|
4324
4352
|
};
|
|
4325
4353
|
}
|
|
4326
|
-
}),
|
|
4354
|
+
}), Ta = { class: "uz-flex uz-justify-between uz-gap-2" }, Ea = {
|
|
4327
4355
|
key: 0,
|
|
4328
4356
|
class: "uz-flex uz-items-start uz-justify-between uz-gap-2 uz-w-full"
|
|
4329
|
-
},
|
|
4357
|
+
}, Da = { key: 0 }, Oa = { class: "uz-flex-1" }, ka = {
|
|
4330
4358
|
key: 1,
|
|
4331
4359
|
class: "uz-flex uz-gap-2 uz-flex-1"
|
|
4332
|
-
},
|
|
4360
|
+
}, Aa = {
|
|
4333
4361
|
key: 0,
|
|
4334
4362
|
class: "uz-search-fields-collapse"
|
|
4335
4363
|
};
|
|
4336
|
-
function
|
|
4364
|
+
function ja(n, s, u, d, f, p) {
|
|
4337
4365
|
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");
|
|
4338
4366
|
return x(), a("div", {
|
|
4339
4367
|
class: "uz-search-bar uz-flex uz-flex-col uz-w-full",
|
|
4340
|
-
onKeyup: s[1] ||=
|
|
4341
|
-
}, [o("div",
|
|
4368
|
+
onKeyup: s[1] ||= te((e) => n.doSearch(!1), ["enter"])
|
|
4369
|
+
}, [o("div", Ta, [n.enableHeader ? (x(), a("div", Ea, [
|
|
4342
4370
|
E(n.$slots, "header"),
|
|
4343
|
-
n.tabList && n.tabList.length > 0 ? (x(), a("div",
|
|
4344
|
-
default:
|
|
4371
|
+
n.tabList && n.tabList.length > 0 ? (x(), a("div", Da, [l(h, null, {
|
|
4372
|
+
default: P(() => [(x(!0), a(e, null, T(n.tabList, (e) => (x(), r(m, {
|
|
4345
4373
|
key: e.value,
|
|
4346
4374
|
type: n.tabButtonType(e),
|
|
4347
4375
|
quaternary: "",
|
|
4348
4376
|
onClick: (t) => n.tabItemChange(e.value)
|
|
4349
4377
|
}, {
|
|
4350
|
-
default:
|
|
4378
|
+
default: P(() => [c(A(e.label), 1)]),
|
|
4351
4379
|
_: 2
|
|
4352
4380
|
}, 1032, ["type", "onClick"]))), 128))]),
|
|
4353
4381
|
_: 1
|
|
4354
4382
|
})])) : i("", !0),
|
|
4355
|
-
|
|
4383
|
+
F((x(), a("div", Oa, [l(C, {
|
|
4356
4384
|
"x-gap": "8",
|
|
4357
4385
|
"y-gap": "8",
|
|
4358
4386
|
cols: n.cols,
|
|
4359
4387
|
"collapsed-rows": 1,
|
|
4360
4388
|
collapsed: !0
|
|
4361
4389
|
}, {
|
|
4362
|
-
default:
|
|
4390
|
+
default: P(() => [n.offset > -1 ? (x(), r(_, {
|
|
4363
4391
|
key: 0,
|
|
4364
4392
|
offset: n.offset
|
|
4365
4393
|
}, null, 8, ["offset"])) : i("", !0), n.collapsed ? (x(!0), a(e, { key: 1 }, T(n.itemData, (e, t) => (x(), r(_, {
|
|
4366
4394
|
key: `${t}_${Date.now()}`,
|
|
4367
4395
|
span: e.search.show ? e.search.span === 1 ? n.gridSpan : e.search.span || n.gridSpan : 0
|
|
4368
4396
|
}, {
|
|
4369
|
-
default:
|
|
4370
|
-
default:
|
|
4397
|
+
default: P(() => [l(S, null, {
|
|
4398
|
+
default: P(() => [l(y, {
|
|
4371
4399
|
trigger: "hover",
|
|
4372
4400
|
placement: "top-start",
|
|
4373
4401
|
overlap: ""
|
|
4374
4402
|
}, {
|
|
4375
|
-
trigger:
|
|
4376
|
-
default:
|
|
4403
|
+
trigger: P(() => [l(v, { class: "uz-group-label" }, {
|
|
4404
|
+
default: P(() => [c(A(typeof e.label == "function" ? e.label() : e.label), 1)]),
|
|
4377
4405
|
_: 2
|
|
4378
4406
|
}, 1024)]),
|
|
4379
|
-
default:
|
|
4407
|
+
default: P(() => [c(A(typeof e.label == "function" ? e.label() : e.label), 1)]),
|
|
4380
4408
|
_: 2
|
|
4381
4409
|
}, 1024), l(b, {
|
|
4382
4410
|
item: e,
|
|
@@ -4389,14 +4417,14 @@ function Oa(n, s, u, d, f, p) {
|
|
|
4389
4417
|
}, 1032, ["span"]))), 128)) : i("", !0)]),
|
|
4390
4418
|
_: 1
|
|
4391
4419
|
}, 8, ["cols"])])), [[ee]])
|
|
4392
|
-
])) : i("", !0), n.enableHeader ? (x(), a("div",
|
|
4420
|
+
])) : i("", !0), n.enableHeader ? (x(), a("div", ka, [
|
|
4393
4421
|
n.more ? (x(), r(m, {
|
|
4394
4422
|
key: 0,
|
|
4395
4423
|
secondary: "",
|
|
4396
4424
|
onClick: n.showMore
|
|
4397
4425
|
}, {
|
|
4398
|
-
icon:
|
|
4399
|
-
default:
|
|
4426
|
+
icon: P(() => [l(k, { class: g(["uz-search-more", n.collapsed ? void 0 : "uz-search-rotate"]) }, {
|
|
4427
|
+
default: P(() => [l(w, { icon: "ArrowDown" })]),
|
|
4400
4428
|
_: 1
|
|
4401
4429
|
}, 8, ["class"])]),
|
|
4402
4430
|
_: 1
|
|
@@ -4408,57 +4436,57 @@ function Oa(n, s, u, d, f, p) {
|
|
|
4408
4436
|
"show-arrow": !1,
|
|
4409
4437
|
style: { padding: "0" }
|
|
4410
4438
|
}, {
|
|
4411
|
-
trigger:
|
|
4439
|
+
trigger: P(() => [l(m, {
|
|
4412
4440
|
loading: n.loading,
|
|
4413
4441
|
secondary: "",
|
|
4414
4442
|
onClick: s[0] ||= (e) => n.doSearch(!1)
|
|
4415
4443
|
}, {
|
|
4416
|
-
icon:
|
|
4444
|
+
icon: P(() => [l(k, {
|
|
4417
4445
|
size: "18",
|
|
4418
4446
|
color: "#0086ff"
|
|
4419
4447
|
}, {
|
|
4420
|
-
default:
|
|
4448
|
+
default: P(() => [l(w, { icon: "Search" })]),
|
|
4421
4449
|
_: 1
|
|
4422
4450
|
})]),
|
|
4423
|
-
default:
|
|
4451
|
+
default: P(() => [c(" " + A(n.t("Common.search")), 1)]),
|
|
4424
4452
|
_: 1
|
|
4425
4453
|
}, 8, ["loading"])]),
|
|
4426
|
-
default:
|
|
4454
|
+
default: P(() => [l(m, {
|
|
4427
4455
|
loading: n.loading,
|
|
4428
4456
|
secondary: "",
|
|
4429
4457
|
onClick: n.clearAll
|
|
4430
4458
|
}, {
|
|
4431
|
-
icon:
|
|
4432
|
-
default:
|
|
4459
|
+
icon: P(() => [l(k, null, {
|
|
4460
|
+
default: P(() => [l(w, { icon: "Refresh" })]),
|
|
4433
4461
|
_: 1
|
|
4434
4462
|
})]),
|
|
4435
|
-
default:
|
|
4463
|
+
default: P(() => [c(" " + A(n.t("Common.reset")), 1)]),
|
|
4436
4464
|
_: 1
|
|
4437
4465
|
}, 8, ["loading", "onClick"])]),
|
|
4438
4466
|
_: 1
|
|
4439
4467
|
})) : i("", !0),
|
|
4440
4468
|
E(n.$slots, "action")
|
|
4441
4469
|
])) : i("", !0)]), l(t, { name: "uz-search-fields" }, {
|
|
4442
|
-
default:
|
|
4470
|
+
default: P(() => [!n.collapsed && n.itemData && Object.keys(n.itemData).length > 0 ? (x(), a("div", Aa, [l(C, {
|
|
4443
4471
|
"x-gap": "8",
|
|
4444
4472
|
"y-gap": "8",
|
|
4445
4473
|
cols: 4
|
|
4446
4474
|
}, {
|
|
4447
|
-
default:
|
|
4475
|
+
default: P(() => [(x(!0), a(e, null, T(n.itemData, (e, t) => (x(), r(_, {
|
|
4448
4476
|
key: t,
|
|
4449
4477
|
span: e.search.show ? n.gridSpan / 2 : 0
|
|
4450
4478
|
}, {
|
|
4451
|
-
default:
|
|
4452
|
-
default:
|
|
4479
|
+
default: P(() => [l(S, null, {
|
|
4480
|
+
default: P(() => [l(y, {
|
|
4453
4481
|
trigger: "hover",
|
|
4454
4482
|
placement: "top-start",
|
|
4455
4483
|
overlap: ""
|
|
4456
4484
|
}, {
|
|
4457
|
-
trigger:
|
|
4458
|
-
default:
|
|
4485
|
+
trigger: P(() => [l(v, { class: "uz-group-label" }, {
|
|
4486
|
+
default: P(() => [c(A(typeof e.label == "function" ? e.label() : e.label), 1)]),
|
|
4459
4487
|
_: 2
|
|
4460
4488
|
}, 1024)]),
|
|
4461
|
-
default:
|
|
4489
|
+
default: P(() => [c(A(typeof e.label == "function" ? e.label() : e.label), 1)]),
|
|
4462
4490
|
_: 2
|
|
4463
4491
|
}, 1024), l(b, {
|
|
4464
4492
|
item: e,
|
|
@@ -4474,17 +4502,17 @@ function Oa(n, s, u, d, f, p) {
|
|
|
4474
4502
|
_: 1
|
|
4475
4503
|
})], 32);
|
|
4476
4504
|
}
|
|
4477
|
-
var
|
|
4505
|
+
var Ma = /*#__PURE__*/ Q(wa, [["render", ja]]), Na = d({
|
|
4478
4506
|
name: "UzSearchMobileBar",
|
|
4479
4507
|
components: {
|
|
4480
|
-
NIcon:
|
|
4481
|
-
NButton:
|
|
4482
|
-
NDrawer:
|
|
4483
|
-
NDrawerContent:
|
|
4484
|
-
NGrid:
|
|
4485
|
-
NGridItem:
|
|
4486
|
-
NInputGroup:
|
|
4487
|
-
NInputGroupLabel:
|
|
4508
|
+
NIcon: V,
|
|
4509
|
+
NButton: L,
|
|
4510
|
+
NDrawer: le,
|
|
4511
|
+
NDrawerContent: ue,
|
|
4512
|
+
NGrid: he,
|
|
4513
|
+
NGridItem: ge,
|
|
4514
|
+
NInputGroup: be,
|
|
4515
|
+
NInputGroupLabel: xe,
|
|
4488
4516
|
UzFormItem: Tr
|
|
4489
4517
|
},
|
|
4490
4518
|
props: {
|
|
@@ -4508,9 +4536,9 @@ var ka = /*#__PURE__*/ Q(xa, [["render", Oa]]), Aa = d({
|
|
|
4508
4536
|
},
|
|
4509
4537
|
emits: ["update:loading", "on-update:value"],
|
|
4510
4538
|
setup(e, { emit: t }) {
|
|
4511
|
-
let { t: n } =
|
|
4539
|
+
let { t: n } = U(), r = Je(), i = w([]), a = w(!1), o = w(), s = w(), c = (e) => Array.isArray(e) && e.length > 0 || e ? e : !1, l = (n = !1) => {
|
|
4512
4540
|
if (e.loading) return;
|
|
4513
|
-
let r =
|
|
4541
|
+
let r = W(o.value);
|
|
4514
4542
|
!n && r.query && (r.query.page = 1);
|
|
4515
4543
|
let s = [];
|
|
4516
4544
|
i.value.forEach((e) => {
|
|
@@ -4529,7 +4557,7 @@ var ka = /*#__PURE__*/ Q(xa, [["render", Oa]]), Aa = d({
|
|
|
4529
4557
|
}
|
|
4530
4558
|
}), a.value = !1, t("update:loading", !0), t("on-update:value", s);
|
|
4531
4559
|
}, u = () => {
|
|
4532
|
-
e.loading || (o.value =
|
|
4560
|
+
e.loading || (o.value = W(s.value), l());
|
|
4533
4561
|
}, d = (e) => {
|
|
4534
4562
|
let t = {};
|
|
4535
4563
|
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));
|
|
@@ -4539,21 +4567,21 @@ var ka = /*#__PURE__*/ Q(xa, [["render", Oa]]), Aa = d({
|
|
|
4539
4567
|
};
|
|
4540
4568
|
}, f = (t) => {
|
|
4541
4569
|
if (t && t.length > 0) {
|
|
4542
|
-
let { data: n, values: a } = d(
|
|
4570
|
+
let { data: n, values: a } = d(W(t)), c = {}, l = e.id || r.params.id;
|
|
4543
4571
|
if (e.cache && l) {
|
|
4544
4572
|
let e = J(`tables_${l}`, !1);
|
|
4545
4573
|
e && e.params.forEach((e) => {
|
|
4546
4574
|
c[e.key] = e.value;
|
|
4547
4575
|
});
|
|
4548
4576
|
}
|
|
4549
|
-
i.value = n, o.value =
|
|
4577
|
+
i.value = n, o.value = W({
|
|
4550
4578
|
...a,
|
|
4551
4579
|
...c
|
|
4552
|
-
}), s.value =
|
|
4580
|
+
}), s.value = W(a);
|
|
4553
4581
|
}
|
|
4554
4582
|
l(!0);
|
|
4555
4583
|
};
|
|
4556
|
-
return
|
|
4584
|
+
return M(() => e.data, (e) => {
|
|
4557
4585
|
f(e);
|
|
4558
4586
|
}), {
|
|
4559
4587
|
t: n,
|
|
@@ -4564,19 +4592,19 @@ var ka = /*#__PURE__*/ Q(xa, [["render", Oa]]), Aa = d({
|
|
|
4564
4592
|
clearAll: u
|
|
4565
4593
|
};
|
|
4566
4594
|
}
|
|
4567
|
-
}),
|
|
4568
|
-
function
|
|
4595
|
+
}), Pa = { class: "uz-flex uz-items-start uz-justify-between uz-gap-8 uz-pb-2" }, Fa = { class: "uz-flex uz-gap-2" }, Ia = { class: "uz-flex uz-items-center uz-gap-2 uz-w-full" };
|
|
4596
|
+
function La(t, n, s, u, d, f) {
|
|
4569
4597
|
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");
|
|
4570
|
-
return x(), a(e, null, [o("div",
|
|
4598
|
+
return x(), a(e, null, [o("div", Pa, [E(t.$slots, "header"), o("div", Fa, [t.itemData && Object.keys(t.itemData).length > 0 ? (x(), r(h, {
|
|
4571
4599
|
key: 0,
|
|
4572
4600
|
secondary: "",
|
|
4573
4601
|
onClick: n[0] ||= (e) => t.drawer = !0
|
|
4574
4602
|
}, {
|
|
4575
|
-
icon:
|
|
4576
|
-
default:
|
|
4603
|
+
icon: P(() => [l(m, { size: "18" }, {
|
|
4604
|
+
default: P(() => [l(p, { icon: "Search" })]),
|
|
4577
4605
|
_: 1
|
|
4578
4606
|
})]),
|
|
4579
|
-
default:
|
|
4607
|
+
default: P(() => [c(" " + A(t.t("Common.search")), 1)]),
|
|
4580
4608
|
_: 1
|
|
4581
4609
|
})) : i("", !0), E(t.$slots, "action")])]), l(C, {
|
|
4582
4610
|
show: t.drawer,
|
|
@@ -4588,21 +4616,21 @@ function Pa(t, n, s, u, d, f) {
|
|
|
4588
4616
|
"auto-focus": !1,
|
|
4589
4617
|
"close-on-esc": !1
|
|
4590
4618
|
}, {
|
|
4591
|
-
default:
|
|
4619
|
+
default: P(() => [l(S, {
|
|
4592
4620
|
title: t.t("Common.search"),
|
|
4593
4621
|
closable: ""
|
|
4594
4622
|
}, {
|
|
4595
|
-
footer:
|
|
4623
|
+
footer: P(() => [o("div", Ia, [l(h, {
|
|
4596
4624
|
secondary: "",
|
|
4597
4625
|
loading: t.loading,
|
|
4598
4626
|
onClick: t.clearAll,
|
|
4599
4627
|
class: "uz-flex-1"
|
|
4600
4628
|
}, {
|
|
4601
|
-
icon:
|
|
4602
|
-
default:
|
|
4629
|
+
icon: P(() => [l(m, null, {
|
|
4630
|
+
default: P(() => [l(p, { icon: "Refresh" })]),
|
|
4603
4631
|
_: 1
|
|
4604
4632
|
})]),
|
|
4605
|
-
default:
|
|
4633
|
+
default: P(() => [c(" " + A(t.t("Common.reset")), 1)]),
|
|
4606
4634
|
_: 1
|
|
4607
4635
|
}, 8, ["loading", "onClick"]), t.itemData && Object.keys(t.itemData).length > 0 ? (x(), r(h, {
|
|
4608
4636
|
key: 0,
|
|
@@ -4611,25 +4639,25 @@ function Pa(t, n, s, u, d, f) {
|
|
|
4611
4639
|
class: "uz-flex-1",
|
|
4612
4640
|
onClick: n[1] ||= (e) => t.doSearch(!1)
|
|
4613
4641
|
}, {
|
|
4614
|
-
icon:
|
|
4615
|
-
default:
|
|
4642
|
+
icon: P(() => [l(m, { size: "18" }, {
|
|
4643
|
+
default: P(() => [l(p, { icon: "Search" })]),
|
|
4616
4644
|
_: 1
|
|
4617
4645
|
})]),
|
|
4618
|
-
default:
|
|
4646
|
+
default: P(() => [c(" " + A(t.t("Common.search")), 1)]),
|
|
4619
4647
|
_: 1
|
|
4620
4648
|
}, 8, ["loading"])) : i("", !0)])]),
|
|
4621
|
-
default:
|
|
4649
|
+
default: P(() => [l(b, {
|
|
4622
4650
|
"x-gap": "8",
|
|
4623
4651
|
"y-gap": "8",
|
|
4624
4652
|
cols: "1"
|
|
4625
4653
|
}, {
|
|
4626
|
-
default:
|
|
4654
|
+
default: P(() => [(x(!0), a(e, null, T(t.itemData, (e, n) => (x(), r(y, {
|
|
4627
4655
|
key: `${n}_${Date.now()}`,
|
|
4628
4656
|
span: +!!e.search.show
|
|
4629
4657
|
}, {
|
|
4630
|
-
default:
|
|
4631
|
-
default:
|
|
4632
|
-
default:
|
|
4658
|
+
default: P(() => [l(v, null, {
|
|
4659
|
+
default: P(() => [l(g, { class: "uz-group-label" }, {
|
|
4660
|
+
default: P(() => [c(A(typeof e.label == "function" ? e.label() : e.label), 1)]),
|
|
4633
4661
|
_: 2
|
|
4634
4662
|
}, 1024), l(_, {
|
|
4635
4663
|
item: e,
|
|
@@ -4647,12 +4675,12 @@ function Pa(t, n, s, u, d, f) {
|
|
|
4647
4675
|
_: 1
|
|
4648
4676
|
}, 8, ["show"])], 64);
|
|
4649
4677
|
}
|
|
4650
|
-
var
|
|
4678
|
+
var Ra = /*#__PURE__*/ Q(Na, [["render", La]]), za = d({
|
|
4651
4679
|
name: "UzSpin",
|
|
4652
4680
|
components: {
|
|
4653
|
-
NButton:
|
|
4654
|
-
NSpin:
|
|
4655
|
-
NEllipsis:
|
|
4681
|
+
NButton: L,
|
|
4682
|
+
NSpin: Me,
|
|
4683
|
+
NEllipsis: fe
|
|
4656
4684
|
},
|
|
4657
4685
|
emits: ["update:value"],
|
|
4658
4686
|
props: {
|
|
@@ -4670,7 +4698,7 @@ var Fa = /*#__PURE__*/ Q(Aa, [["render", Pa]]), Ia = d({
|
|
|
4670
4698
|
}
|
|
4671
4699
|
},
|
|
4672
4700
|
setup(e, { emit: t }) {
|
|
4673
|
-
let { t: n } =
|
|
4701
|
+
let { t: n } = U(), r = w(), i = w(5), a = () => {
|
|
4674
4702
|
t("update:value", !1);
|
|
4675
4703
|
}, o = () => {
|
|
4676
4704
|
clearInterval(r.value);
|
|
@@ -4682,7 +4710,7 @@ var Fa = /*#__PURE__*/ Q(Aa, [["render", Pa]]), Ia = d({
|
|
|
4682
4710
|
};
|
|
4683
4711
|
return b(() => {
|
|
4684
4712
|
clearInterval(r.value);
|
|
4685
|
-
}),
|
|
4713
|
+
}), M(() => e.status, (e) => {
|
|
4686
4714
|
e === 1 && s();
|
|
4687
4715
|
}), {
|
|
4688
4716
|
t: n,
|
|
@@ -4694,39 +4722,39 @@ var Fa = /*#__PURE__*/ Q(Aa, [["render", Pa]]), Ia = d({
|
|
|
4694
4722
|
});
|
|
4695
4723
|
//#endregion
|
|
4696
4724
|
//#region components/spin/index.vue
|
|
4697
|
-
function
|
|
4725
|
+
function Ba(e, t, n, i, a, s) {
|
|
4698
4726
|
let u = D("NEllipsis"), d = D("NButton"), f = D("NSpin");
|
|
4699
4727
|
return x(), r(f, { show: e.value }, {
|
|
4700
|
-
description:
|
|
4728
|
+
description: P(() => [
|
|
4701
4729
|
l(u, {
|
|
4702
4730
|
"expand-trigger": "click",
|
|
4703
4731
|
"line-clamp": "3",
|
|
4704
4732
|
tooltip: !1
|
|
4705
4733
|
}, {
|
|
4706
|
-
default:
|
|
4734
|
+
default: P(() => [c(A(e.status === 0 ? e.t("Spin.processing") : e.message), 1)]),
|
|
4707
4735
|
_: 1
|
|
4708
4736
|
}),
|
|
4709
4737
|
t[0] ||= o("div", { class: "uz-br" }, null, -1),
|
|
4710
|
-
|
|
4738
|
+
F(l(d, {
|
|
4711
4739
|
type: "warning",
|
|
4712
4740
|
block: "",
|
|
4713
4741
|
secondary: "",
|
|
4714
4742
|
onMouseover: e.stopCountdown,
|
|
4715
4743
|
onClick: e.handleClose
|
|
4716
4744
|
}, {
|
|
4717
|
-
default:
|
|
4745
|
+
default: P(() => [c(A(e.t("Spin.closeCountdown", { seconds: e.counts })), 1)]),
|
|
4718
4746
|
_: 1
|
|
4719
|
-
}, 8, ["onMouseover", "onClick"]), [[
|
|
4747
|
+
}, 8, ["onMouseover", "onClick"]), [[j, e.status === 1]])
|
|
4720
4748
|
]),
|
|
4721
|
-
default:
|
|
4749
|
+
default: P(() => [E(e.$slots, "default")]),
|
|
4722
4750
|
_: 3
|
|
4723
4751
|
}, 8, ["show"]);
|
|
4724
4752
|
}
|
|
4725
|
-
var
|
|
4753
|
+
var Va = /*#__PURE__*/ Q(za, [["render", Ba]]), Ha = d({
|
|
4726
4754
|
name: "UzTableExpand",
|
|
4727
4755
|
components: {
|
|
4728
|
-
NDataTable:
|
|
4729
|
-
NForm:
|
|
4756
|
+
NDataTable: oe,
|
|
4757
|
+
NForm: pe
|
|
4730
4758
|
},
|
|
4731
4759
|
props: {
|
|
4732
4760
|
data: {
|
|
@@ -4749,7 +4777,7 @@ var Ra = /*#__PURE__*/ Q(Ia, [["render", La]]), za = d({
|
|
|
4749
4777
|
K(e);
|
|
4750
4778
|
}
|
|
4751
4779
|
hi(e.data.link).then(async (e) => {
|
|
4752
|
-
let { tableColumns: r } = await Ci(_i(
|
|
4780
|
+
let { tableColumns: r } = await Ci(_i(tt.parse(e.viewJson).table), !0, 2, () => {}, {}, !1, !0), a = 0, o = r.map((e) => ({
|
|
4753
4781
|
...e,
|
|
4754
4782
|
sorter: !1,
|
|
4755
4783
|
resizable: !1
|
|
@@ -4770,7 +4798,7 @@ var Ra = /*#__PURE__*/ Q(Ia, [["render", La]]), za = d({
|
|
|
4770
4798
|
});
|
|
4771
4799
|
//#endregion
|
|
4772
4800
|
//#region components/table/components/expand.vue
|
|
4773
|
-
function
|
|
4801
|
+
function Ua(e, t, n, i, a, o) {
|
|
4774
4802
|
let s = D("NDataTable");
|
|
4775
4803
|
return x(), r(s, {
|
|
4776
4804
|
columns: e.columns,
|
|
@@ -4789,18 +4817,18 @@ function Ba(e, t, n, i, a, o) {
|
|
|
4789
4817
|
"scroll-x"
|
|
4790
4818
|
]);
|
|
4791
4819
|
}
|
|
4792
|
-
var
|
|
4793
|
-
components: { NSkeleton:
|
|
4820
|
+
var Wa = /*#__PURE__*/ Q(Ha, [["render", Ua]]), Ga = d({
|
|
4821
|
+
components: { NSkeleton: Ae },
|
|
4794
4822
|
setup() {
|
|
4795
4823
|
return {};
|
|
4796
4824
|
}
|
|
4797
|
-
}),
|
|
4798
|
-
function
|
|
4825
|
+
}), Ka = { class: "uz-flex uz-flex-col uz-gap-2 uz-flex-1 uz-h-full" }, qa = { class: "uz-flex uz-justify-between" }, Ja = { class: "uz-flex uz-gap-1" };
|
|
4826
|
+
function Ya(e, t, n, r, i, s) {
|
|
4799
4827
|
let c = D("NSkeleton");
|
|
4800
|
-
return x(), a("div",
|
|
4828
|
+
return x(), a("div", Ka, [o("div", qa, [l(c, {
|
|
4801
4829
|
width: 120,
|
|
4802
4830
|
size: "medium"
|
|
4803
|
-
}), o("div",
|
|
4831
|
+
}), o("div", Ja, [
|
|
4804
4832
|
l(c, {
|
|
4805
4833
|
width: 180,
|
|
4806
4834
|
size: "medium"
|
|
@@ -4833,19 +4861,19 @@ function Ka(e, t, n, r, i, s) {
|
|
|
4833
4861
|
}
|
|
4834
4862
|
//#endregion
|
|
4835
4863
|
//#region components/table/index.vue?vue&type=script&lang.ts
|
|
4836
|
-
var
|
|
4864
|
+
var Xa = d({
|
|
4837
4865
|
name: "UzTable",
|
|
4838
4866
|
components: {
|
|
4839
|
-
NDataTable:
|
|
4840
|
-
NPopover:
|
|
4841
|
-
NButton:
|
|
4842
|
-
NIcon:
|
|
4843
|
-
NCheckbox:
|
|
4844
|
-
NSpin:
|
|
4845
|
-
VueDraggable:
|
|
4846
|
-
UzSpin:
|
|
4847
|
-
TableExpand:
|
|
4848
|
-
SkeletonLoading: /* @__PURE__ */ Q(
|
|
4867
|
+
NDataTable: oe,
|
|
4868
|
+
NPopover: Ee,
|
|
4869
|
+
NButton: L,
|
|
4870
|
+
NIcon: V,
|
|
4871
|
+
NCheckbox: re,
|
|
4872
|
+
NSpin: Me,
|
|
4873
|
+
VueDraggable: et,
|
|
4874
|
+
UzSpin: Va,
|
|
4875
|
+
TableExpand: Wa,
|
|
4876
|
+
SkeletonLoading: /* @__PURE__ */ Q(Ga, [["render", Ya]])
|
|
4849
4877
|
},
|
|
4850
4878
|
props: {
|
|
4851
4879
|
id: {
|
|
@@ -4973,109 +5001,109 @@ var qa = d({
|
|
|
4973
5001
|
value: () => null,
|
|
4974
5002
|
setValue: () => null
|
|
4975
5003
|
});
|
|
4976
|
-
let a = p("userStore"), o =
|
|
5004
|
+
let a = p("userStore"), o = Je(), { t: s } = U(), c = He(), l = n(() => Y.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({
|
|
4977
5005
|
params: [],
|
|
4978
5006
|
query: {
|
|
4979
5007
|
page: 1,
|
|
4980
5008
|
pageMax: 1,
|
|
4981
5009
|
pageSize: e.pageSize || 30
|
|
4982
5010
|
}
|
|
4983
|
-
}), A = w([]), ee = w(void 0),
|
|
5011
|
+
}), A = w([]), ee = w(void 0), j = w(void 0), N = w([]), P = w([]), F = w([]), te = w([]), I = w({
|
|
4984
5012
|
fetch: null,
|
|
4985
5013
|
fetchFn: "",
|
|
4986
5014
|
when_drawer_open: "",
|
|
4987
5015
|
when_before_save: ""
|
|
4988
|
-
}),
|
|
5016
|
+
}), R = w(xi()), ne = w(""), re = w(!1), ie = w([]), z = w([]), ae = p("modules"), oe = (e) => e.id, se = (e, n) => {
|
|
4989
5017
|
t("update:rowKeys", {
|
|
4990
5018
|
keys: e,
|
|
4991
|
-
rows:
|
|
5019
|
+
rows: W(n)
|
|
4992
5020
|
});
|
|
4993
|
-
},
|
|
4994
|
-
if (
|
|
4995
|
-
let e =
|
|
4996
|
-
|
|
5021
|
+
}, ce = (e, n, r) => {
|
|
5022
|
+
if (ie.value = e, r.action === "check" && z.value.push(r.row), r.action === "uncheck") {
|
|
5023
|
+
let e = z.value.findIndex((e) => e.id === r.row?.id);
|
|
5024
|
+
z.value.splice(e, 1);
|
|
4997
5025
|
}
|
|
4998
5026
|
r.action === "checkAll" && n.forEach((e) => {
|
|
4999
|
-
e &&
|
|
5000
|
-
}), r.action === "uncheckAll" && (
|
|
5001
|
-
keys:
|
|
5002
|
-
rows:
|
|
5027
|
+
e && z.value.push(e);
|
|
5028
|
+
}), r.action === "uncheckAll" && (z.value = [], ie.value = []), t("update:rowKeys", {
|
|
5029
|
+
keys: W(ie.value),
|
|
5030
|
+
rows: W(z.value)
|
|
5003
5031
|
});
|
|
5004
|
-
},
|
|
5032
|
+
}, le = (e) => {
|
|
5005
5033
|
O.value = e;
|
|
5006
|
-
},
|
|
5007
|
-
let t = e.summary ||
|
|
5034
|
+
}, ue = n(() => {
|
|
5035
|
+
let t = e.summary || R.value.summary;
|
|
5008
5036
|
if (t && typeof t == "string") {
|
|
5009
5037
|
let e = Function("pageData", "h", t);
|
|
5010
5038
|
return (t) => e(t, f);
|
|
5011
5039
|
}
|
|
5012
5040
|
return t && typeof t == "function" ? t : () => [];
|
|
5013
|
-
}),
|
|
5041
|
+
}), de = (t) => {
|
|
5014
5042
|
let n = e.id || o.params.id, r;
|
|
5015
5043
|
if (e.fetch) r = e.fetch({
|
|
5016
5044
|
...t,
|
|
5017
5045
|
tableId: n
|
|
5018
5046
|
});
|
|
5019
|
-
else if (
|
|
5020
|
-
let e =
|
|
5047
|
+
else if (I.value.fetchFn) {
|
|
5048
|
+
let e = I.value.fetchFn;
|
|
5021
5049
|
r = Function("POST", "queryData", e)(Z, { ...t });
|
|
5022
5050
|
} else r = Xn({
|
|
5023
5051
|
...t,
|
|
5024
5052
|
tableId: n
|
|
5025
5053
|
});
|
|
5026
5054
|
return r;
|
|
5027
|
-
},
|
|
5055
|
+
}, fe = (t) => {
|
|
5028
5056
|
let n = e.id || o.params.id, r;
|
|
5029
5057
|
if (e.fetch) r = e.fetch({
|
|
5030
5058
|
id: t.id,
|
|
5031
5059
|
tableId: n
|
|
5032
5060
|
});
|
|
5033
|
-
else if (
|
|
5034
|
-
let e =
|
|
5061
|
+
else if (I.value.fetchFn) {
|
|
5062
|
+
let e = I.value.fetchFn;
|
|
5035
5063
|
r = Function("POST", "queryData", e)(Z, { id: t.id });
|
|
5036
5064
|
} else r = Xn({
|
|
5037
5065
|
id: t.id,
|
|
5038
5066
|
tableId: n
|
|
5039
5067
|
});
|
|
5040
5068
|
return r;
|
|
5041
|
-
},
|
|
5069
|
+
}, B = (n = !1) => {
|
|
5042
5070
|
let r = e.id || o.params.id;
|
|
5043
5071
|
e.enableLoading && (_.value = !0, t("update:loading", !0));
|
|
5044
|
-
let i =
|
|
5045
|
-
n && delete i.orderby,
|
|
5072
|
+
let i = W(k.value);
|
|
5073
|
+
n && delete i.orderby, I.value.fetch ? tr([I.value.fetch], "", i).then((e) => {
|
|
5046
5074
|
let n = At(e);
|
|
5047
|
-
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1),
|
|
5075
|
+
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 && q(`tables_${r}`, k.value);
|
|
5048
5076
|
}).catch(() => {
|
|
5049
5077
|
_.value = !1, v.value = !0, t("update:loading", !1);
|
|
5050
|
-
}) :
|
|
5078
|
+
}) : de(i).then((e) => {
|
|
5051
5079
|
let n = At(e);
|
|
5052
|
-
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1),
|
|
5080
|
+
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 && q(`tables_${r}`, k.value);
|
|
5053
5081
|
}).catch(() => {
|
|
5054
5082
|
_.value = !1, v.value = !0, t("update:loading", !1);
|
|
5055
5083
|
});
|
|
5056
|
-
},
|
|
5057
|
-
k.value.query.page = e, u.value && (u.value.scrollTop = 0), kt(),
|
|
5058
|
-
},
|
|
5084
|
+
}, pe = (e) => {
|
|
5085
|
+
k.value.query.page = e, u.value && (u.value.scrollTop = 0), kt(), B();
|
|
5086
|
+
}, me = () => {
|
|
5059
5087
|
let e = k.value.query.page + 1;
|
|
5060
|
-
e > k.value.query.pageMax && (e = 1), k.value.query.page = e, u.value && (u.value.scrollTop = 0),
|
|
5088
|
+
e > k.value.query.pageMax && (e = 1), k.value.query.page = e, u.value && (u.value.scrollTop = 0), B();
|
|
5089
|
+
}, he = (e) => {
|
|
5090
|
+
k.value.query.pageSize = e, k.value.query.page = 1, kt(), B();
|
|
5061
5091
|
}, ge = (e) => {
|
|
5062
|
-
k.value.
|
|
5063
|
-
},
|
|
5064
|
-
e && e.order ? k.value.orderby = `${e.columnKey} ${e.order.replace("end", "")}` : delete k.value.orderby, z();
|
|
5065
|
-
}, B = () => {
|
|
5092
|
+
e && e.order ? k.value.orderby = `${e.columnKey} ${e.order.replace("end", "")}` : delete k.value.orderby, B();
|
|
5093
|
+
}, V = () => {
|
|
5066
5094
|
if (typeof e.addFetch == "function") return e.addFetch();
|
|
5067
5095
|
m.value?.addAndEdit(e.id || o.params.id, async () => {
|
|
5068
|
-
let { form: e } = await
|
|
5096
|
+
let { form: e } = await xe();
|
|
5069
5097
|
return {
|
|
5070
5098
|
form: e,
|
|
5071
5099
|
data: {}
|
|
5072
5100
|
};
|
|
5073
|
-
},
|
|
5101
|
+
}, R.value, I.value, 0, Me);
|
|
5102
|
+
}, _e = (e) => {
|
|
5103
|
+
e.show = !e.show, je();
|
|
5074
5104
|
}, ve = (e) => {
|
|
5075
|
-
|
|
5076
|
-
}, ye = (
|
|
5077
|
-
k.value.params = e, z();
|
|
5078
|
-
}, be = () => [{
|
|
5105
|
+
k.value.params = e, B();
|
|
5106
|
+
}, ye = () => [{
|
|
5079
5107
|
title: s("Table.createdByTime"),
|
|
5080
5108
|
key: "createTime",
|
|
5081
5109
|
resizable: !0,
|
|
@@ -5093,21 +5121,21 @@ var qa = d({
|
|
|
5093
5121
|
ellipsis: !0,
|
|
5094
5122
|
width: 180,
|
|
5095
5123
|
render: (e) => [f("div", {}, { default: () => e.updateBy }), f("div", {}, { default: () => jt(e.updateTime, "yyyy-MM-dd hh:mm:ss") })]
|
|
5096
|
-
}],
|
|
5097
|
-
let { form: t, fillingDefaultValue: n, formDefaultValue: r } = await Si(
|
|
5124
|
+
}], be = (t) => a?.remainingDays < 0 && t === "add" ? !0 : !e.ruleFetch || !N.value || N.value && N.value[0] === "*" ? !1 : !N.value?.includes(t), xe = async (e) => {
|
|
5125
|
+
let { form: t, fillingDefaultValue: n, formDefaultValue: r } = await Si(P.value, e, () => m.value?.getFormValues());
|
|
5098
5126
|
return x.value = t, {
|
|
5099
5127
|
form: t,
|
|
5100
5128
|
fillingDefaultValue: n,
|
|
5101
5129
|
formDefaultValue: r
|
|
5102
5130
|
};
|
|
5103
|
-
},
|
|
5104
|
-
|
|
5131
|
+
}, Se = async (e) => new Promise((t, n) => {
|
|
5132
|
+
fe(e).then((e) => {
|
|
5105
5133
|
t(e && e[0]);
|
|
5106
5134
|
}).catch(() => {
|
|
5107
5135
|
n();
|
|
5108
5136
|
});
|
|
5109
|
-
}),
|
|
5110
|
-
let n = await
|
|
5137
|
+
}), Ce = async (e, t) => {
|
|
5138
|
+
let n = await Se(e).catch(() => {}), { form: r, fillingDefaultValue: i } = await xe(n || {}), a = {
|
|
5111
5139
|
...n,
|
|
5112
5140
|
...i
|
|
5113
5141
|
};
|
|
@@ -5116,7 +5144,7 @@ var qa = d({
|
|
|
5116
5144
|
} catch (e) {
|
|
5117
5145
|
K(e);
|
|
5118
5146
|
}
|
|
5119
|
-
let o =
|
|
5147
|
+
let o = I.value.when_drawer_open;
|
|
5120
5148
|
if (o && typeof o == "string") try {
|
|
5121
5149
|
a = await Function("data", "POST", o)(a, Z).catch((e) => {
|
|
5122
5150
|
K(e);
|
|
@@ -5128,19 +5156,19 @@ var qa = d({
|
|
|
5128
5156
|
form: r,
|
|
5129
5157
|
data: a
|
|
5130
5158
|
};
|
|
5131
|
-
},
|
|
5132
|
-
let i =
|
|
5159
|
+
}, we = (n, r) => {
|
|
5160
|
+
let i = W(n.onClick), a = e.id || o.params.id;
|
|
5133
5161
|
if (n.disabled) {
|
|
5134
5162
|
if (typeof n.disabled == "string") {
|
|
5135
5163
|
let e = Function("rowData", "rowIndex", n.disabled);
|
|
5136
|
-
n.disabled = (t, r) => e(t, r) ||
|
|
5164
|
+
n.disabled = (t, r) => e(t, r) || be(n.key);
|
|
5137
5165
|
} else if (typeof n.disabled == "function") {
|
|
5138
|
-
let e =
|
|
5139
|
-
n.disabled = (t, r) => e.disabled(t, r) ||
|
|
5166
|
+
let e = W(n);
|
|
5167
|
+
n.disabled = (t, r) => e.disabled(t, r) || be(n.key);
|
|
5140
5168
|
}
|
|
5141
|
-
} else n.disabled = () =>
|
|
5169
|
+
} else n.disabled = () => be(n.key);
|
|
5142
5170
|
if (n.loading = _.value, n.type !== "group" && n.optionsType) n.onClick = async (e) => {
|
|
5143
|
-
|
|
5171
|
+
Se(e).then((r) => {
|
|
5144
5172
|
if (n.optionsType === "drawer:insider") {
|
|
5145
5173
|
if (i) try {
|
|
5146
5174
|
Function("rowData", "POST", "fnNotification", i)(r, Z, c).then((e) => {
|
|
@@ -5166,17 +5194,17 @@ var qa = d({
|
|
|
5166
5194
|
}).catch(() => null);
|
|
5167
5195
|
};
|
|
5168
5196
|
else if (n.type !== "group" && n.action === "detailInside") {
|
|
5169
|
-
let t =
|
|
5197
|
+
let t = W(n.onClick);
|
|
5170
5198
|
n.onClick = (n) => {
|
|
5171
|
-
m.value?.addAndEdit(e.id || o.params.id, () =>
|
|
5199
|
+
m.value?.addAndEdit(e.id || o.params.id, () => Ce(n, t), R.value, I.value, 2, Me);
|
|
5172
5200
|
};
|
|
5173
5201
|
} else if (n.type !== "group" && n.action === "editInside") {
|
|
5174
|
-
let t =
|
|
5202
|
+
let t = W(n.onClick);
|
|
5175
5203
|
n.onClick = (n) => {
|
|
5176
|
-
m.value?.addAndEdit(e.id || o.params.id, () =>
|
|
5204
|
+
m.value?.addAndEdit(e.id || o.params.id, () => Ce(n, t), R.value, I.value, 1, Me);
|
|
5177
5205
|
};
|
|
5178
5206
|
} else if (n.type !== "group" && n.action === "deleteInside") {
|
|
5179
|
-
let t =
|
|
5207
|
+
let t = W(n.onClick);
|
|
5180
5208
|
n.onClick = (n) => {
|
|
5181
5209
|
let i;
|
|
5182
5210
|
i = e.deleteFetch ? e.deleteFetch({
|
|
@@ -5190,12 +5218,12 @@ var qa = d({
|
|
|
5190
5218
|
}), i.then(() => {
|
|
5191
5219
|
if (t) try {
|
|
5192
5220
|
Function("rowData", "fnNotification", "POST", t)(n, c, Z).then(() => {
|
|
5193
|
-
|
|
5221
|
+
B();
|
|
5194
5222
|
}).catch(() => null);
|
|
5195
5223
|
} catch (e) {
|
|
5196
5224
|
K(e);
|
|
5197
5225
|
}
|
|
5198
|
-
else
|
|
5226
|
+
else B();
|
|
5199
5227
|
}).catch((e) => {
|
|
5200
5228
|
K(e);
|
|
5201
5229
|
});
|
|
@@ -5206,7 +5234,7 @@ var qa = d({
|
|
|
5206
5234
|
...t,
|
|
5207
5235
|
is_disabled: "1"
|
|
5208
5236
|
}).then(() => {
|
|
5209
|
-
|
|
5237
|
+
B();
|
|
5210
5238
|
}).catch(() => null);
|
|
5211
5239
|
};
|
|
5212
5240
|
else if (n.type !== "group" && n.action === "enabledInside") n.onClick = (t) => {
|
|
@@ -5215,13 +5243,13 @@ var qa = d({
|
|
|
5215
5243
|
...t,
|
|
5216
5244
|
is_disabled: "0"
|
|
5217
5245
|
}).then(() => {
|
|
5218
|
-
|
|
5246
|
+
B();
|
|
5219
5247
|
}).catch(() => null);
|
|
5220
5248
|
};
|
|
5221
5249
|
else if (n.type !== "group" && n.action) {
|
|
5222
|
-
let e =
|
|
5250
|
+
let e = W(n.onClick);
|
|
5223
5251
|
n.onClick = (t) => {
|
|
5224
|
-
|
|
5252
|
+
fe(t).then((t) => {
|
|
5225
5253
|
let r = t && t[0];
|
|
5226
5254
|
tr([n.action], r.id, r).then((t) => {
|
|
5227
5255
|
if (e && typeof e == "string") try {
|
|
@@ -5229,7 +5257,7 @@ var qa = d({
|
|
|
5229
5257
|
c.success({
|
|
5230
5258
|
content: e,
|
|
5231
5259
|
duration: 3e3
|
|
5232
|
-
}),
|
|
5260
|
+
}), B();
|
|
5233
5261
|
}).catch((e) => {
|
|
5234
5262
|
K(e);
|
|
5235
5263
|
});
|
|
@@ -5240,24 +5268,24 @@ var qa = d({
|
|
|
5240
5268
|
c.success({
|
|
5241
5269
|
content: () => s("Notice.success"),
|
|
5242
5270
|
duration: 3e3
|
|
5243
|
-
}),
|
|
5271
|
+
}), B();
|
|
5244
5272
|
}) : (c.success({
|
|
5245
5273
|
content: () => s("Notice.success"),
|
|
5246
5274
|
duration: 3e3
|
|
5247
|
-
}),
|
|
5275
|
+
}), B());
|
|
5248
5276
|
}).catch(() => {
|
|
5249
5277
|
c.error({
|
|
5250
5278
|
content: () => s("Notice.failed"),
|
|
5251
5279
|
duration: 3e3
|
|
5252
|
-
}),
|
|
5280
|
+
}), B();
|
|
5253
5281
|
});
|
|
5254
5282
|
}).catch(() => null);
|
|
5255
5283
|
};
|
|
5256
5284
|
}
|
|
5257
|
-
},
|
|
5258
|
-
|
|
5259
|
-
let { tableColumns: n, search: r, subTableIds: i, subTableExpand: a } = await Ci(
|
|
5260
|
-
!l.value &&
|
|
5285
|
+
}, Te = async () => {
|
|
5286
|
+
re.value = !1, pi();
|
|
5287
|
+
let { tableColumns: n, search: r, subTableIds: i, subTableExpand: a } = await Ci(P.value, e.child, 0, () => ({}), ae);
|
|
5288
|
+
!l.value && R.value.index && n.unshift({
|
|
5261
5289
|
title: "#",
|
|
5262
5290
|
key: "index",
|
|
5263
5291
|
align: "center",
|
|
@@ -5272,21 +5300,21 @@ var qa = d({
|
|
|
5272
5300
|
return (e - 1) * n + (t + 1);
|
|
5273
5301
|
} });
|
|
5274
5302
|
}
|
|
5275
|
-
}), !l.value && (e.selection ||
|
|
5303
|
+
}), !l.value && (e.selection || R.value.selection !== 0) && n.unshift({
|
|
5276
5304
|
type: "selection",
|
|
5277
5305
|
fixed: "left",
|
|
5278
5306
|
width: 60,
|
|
5279
5307
|
hide: !0,
|
|
5280
5308
|
show: !0,
|
|
5281
|
-
multiple: e.selection === 2 ||
|
|
5309
|
+
multiple: e.selection === 2 || R.value.selection === 2,
|
|
5282
5310
|
options: ["all", "none"]
|
|
5283
5311
|
});
|
|
5284
5312
|
let c = e.id || o.params.id;
|
|
5285
|
-
if (!l.value &&
|
|
5286
|
-
let e =
|
|
5313
|
+
if (!l.value && R.value.commonTime && n.push(...ye()), e.enableAction === !0 && F.value && F.value.length > 0) {
|
|
5314
|
+
let e = W(F.value);
|
|
5287
5315
|
for (let t of e) t.type === "group" ? t.children.forEach((e) => {
|
|
5288
|
-
|
|
5289
|
-
}) :
|
|
5316
|
+
we(e, i);
|
|
5317
|
+
}) : we(t, i);
|
|
5290
5318
|
let t = {
|
|
5291
5319
|
title: () => s("Common.action"),
|
|
5292
5320
|
key: "action",
|
|
@@ -5296,12 +5324,12 @@ var qa = d({
|
|
|
5296
5324
|
checked: !0,
|
|
5297
5325
|
show: !0,
|
|
5298
5326
|
hide: !0,
|
|
5299
|
-
width: Number(typeof
|
|
5327
|
+
width: Number(typeof R.value.actionWidth == "string" ? R.value.actionWidth.replace("px", "") : R.value.actionWidth),
|
|
5300
5328
|
render(t) {
|
|
5301
5329
|
return ur({
|
|
5302
5330
|
buttons: e,
|
|
5303
5331
|
rowData: t,
|
|
5304
|
-
callback:
|
|
5332
|
+
callback: B,
|
|
5305
5333
|
tableId: c
|
|
5306
5334
|
});
|
|
5307
5335
|
}
|
|
@@ -5324,22 +5352,22 @@ var qa = d({
|
|
|
5324
5352
|
fixed: "left",
|
|
5325
5353
|
filter: "default",
|
|
5326
5354
|
filterOptionValue: null,
|
|
5327
|
-
renderFilterMenu: () => f("div", { class: "uz-table-filter" }, [f(
|
|
5328
|
-
renderExpand: (e) => f(
|
|
5355
|
+
renderFilterMenu: () => f("div", { class: "uz-table-filter" }, [f(L, { onClick: ze }, { default: () => s("Common.expand") }), f(L, { onClick: Be }, { default: () => s("Common.contract") })]),
|
|
5356
|
+
renderExpand: (e) => f(Wa, {
|
|
5329
5357
|
data: a,
|
|
5330
5358
|
value: e
|
|
5331
5359
|
})
|
|
5332
|
-
}),
|
|
5360
|
+
}), R.value.asynchronous ? t("update:asynchronous", R.value.asynchronous) : t("update:asynchronous", null);
|
|
5333
5361
|
let d = 0;
|
|
5334
5362
|
u.forEach((e) => {
|
|
5335
5363
|
e.show && (d += Number(e.width || 140));
|
|
5336
5364
|
}), C.value = u, A.value = r, D.value = d;
|
|
5337
|
-
},
|
|
5365
|
+
}, Ee = (e) => typeof e == "number" ? `${e}px` : e, De = () => {
|
|
5338
5366
|
if (e.height) {
|
|
5339
|
-
let t =
|
|
5340
|
-
ee.value = t,
|
|
5367
|
+
let t = Ee(e.height);
|
|
5368
|
+
ee.value = t, j.value = t;
|
|
5341
5369
|
}
|
|
5342
|
-
},
|
|
5370
|
+
}, Oe = (t) => {
|
|
5343
5371
|
let n = e.id || o.params.id;
|
|
5344
5372
|
if (n) {
|
|
5345
5373
|
let e = 0;
|
|
@@ -5350,7 +5378,7 @@ var qa = d({
|
|
|
5350
5378
|
data: JSON.stringify(t)
|
|
5351
5379
|
}).catch(() => null);
|
|
5352
5380
|
}
|
|
5353
|
-
}, { run:
|
|
5381
|
+
}, { run: ke } = Yr(Oe), { run: Ae } = Yr((e, t) => {
|
|
5354
5382
|
let n = [];
|
|
5355
5383
|
C.value.forEach((r) => {
|
|
5356
5384
|
r.key !== "action" && r.key !== "index" && r.type !== "expand" && n.push({
|
|
@@ -5360,8 +5388,8 @@ var qa = d({
|
|
|
5360
5388
|
fixed: r.fixed,
|
|
5361
5389
|
width: r.key === t ? Number(e.toFixed(0)) : r.width
|
|
5362
5390
|
});
|
|
5363
|
-
}),
|
|
5364
|
-
}),
|
|
5391
|
+
}), Oe(n);
|
|
5392
|
+
}), je = () => {
|
|
5365
5393
|
let e = [];
|
|
5366
5394
|
C.value.forEach((t) => {
|
|
5367
5395
|
t.key !== "action" && t.key !== "index" && t.type !== "expand" && e.push({
|
|
@@ -5371,8 +5399,8 @@ var qa = d({
|
|
|
5371
5399
|
fixed: t.fixed,
|
|
5372
5400
|
width: t.width
|
|
5373
5401
|
});
|
|
5374
|
-
}),
|
|
5375
|
-
},
|
|
5402
|
+
}), ke(e);
|
|
5403
|
+
}, Me = (t, n, r) => {
|
|
5376
5404
|
let i, a = e.id || o.params.id;
|
|
5377
5405
|
i = e.formFetch ? e.formFetch({
|
|
5378
5406
|
tableId: a,
|
|
@@ -5381,26 +5409,26 @@ var qa = d({
|
|
|
5381
5409
|
tableId: a,
|
|
5382
5410
|
...t
|
|
5383
5411
|
}), i.then(() => {
|
|
5384
|
-
|
|
5412
|
+
B(), n();
|
|
5385
5413
|
}).catch((e) => {
|
|
5386
5414
|
r(e);
|
|
5387
5415
|
});
|
|
5388
|
-
},
|
|
5389
|
-
b.value = "",
|
|
5416
|
+
}, Ne = () => {
|
|
5417
|
+
b.value = "", P.value = [], F.value = [], te.value = [], I.value = {
|
|
5390
5418
|
fetch: null,
|
|
5391
5419
|
fetchFn: "",
|
|
5392
5420
|
when_drawer_open: "",
|
|
5393
5421
|
when_before_save: ""
|
|
5394
|
-
},
|
|
5395
|
-
},
|
|
5396
|
-
let n =
|
|
5397
|
-
b.value = t.tableTitle,
|
|
5422
|
+
}, R.value = xi();
|
|
5423
|
+
}, Pe = (t) => {
|
|
5424
|
+
let n = tt.parse(t.viewJson);
|
|
5425
|
+
b.value = t.tableTitle, P.value = _i(n.table), F.value = vr(e.actions || n.action);
|
|
5398
5426
|
let r = vr(n.suffix || []);
|
|
5399
|
-
|
|
5427
|
+
te.value = r.filter((e) => e.main).map((e) => (Ie(e), e)), I.value = yi(n.trigger);
|
|
5400
5428
|
let i = xi(e.options ?? n.option);
|
|
5401
|
-
t.tableTitle && i.title && Mt(t.tableTitle),
|
|
5402
|
-
},
|
|
5403
|
-
v.value = !1,
|
|
5429
|
+
t.tableTitle && i.title && Mt(t.tableTitle), R.value = i;
|
|
5430
|
+
}, Fe = async () => {
|
|
5431
|
+
v.value = !1, Ne();
|
|
5404
5432
|
let t = e.id || o.params.id;
|
|
5405
5433
|
if (k.value = {
|
|
5406
5434
|
params: [],
|
|
@@ -5410,19 +5438,19 @@ var qa = d({
|
|
|
5410
5438
|
pageSize: e.pageSize || 30
|
|
5411
5439
|
}
|
|
5412
5440
|
}, E.value = [], e.ruleFetch) try {
|
|
5413
|
-
|
|
5441
|
+
N.value = await e.ruleFetch(t);
|
|
5414
5442
|
} catch {
|
|
5415
|
-
|
|
5443
|
+
ne.value = s("Notice.network"), re.value = !0;
|
|
5416
5444
|
return;
|
|
5417
5445
|
}
|
|
5418
|
-
|
|
5419
|
-
|
|
5446
|
+
De(), e.columns ? (P.value = e.columns || [], F.value = e.actions || [], te.value = e.suffixes || [], R.value = xi(e.options), await Te()) : await hi(t).then(async (e) => {
|
|
5447
|
+
Pe(e), await Te();
|
|
5420
5448
|
}).catch((e) => {
|
|
5421
|
-
|
|
5449
|
+
ne.value = e?.message || s("Notice.network"), re.value = !0;
|
|
5422
5450
|
});
|
|
5423
|
-
},
|
|
5451
|
+
}, Ie = (e) => {
|
|
5424
5452
|
if (e.type !== "group" && e.optionsType) {
|
|
5425
|
-
let n =
|
|
5453
|
+
let n = W(e.onClick);
|
|
5426
5454
|
e.onClick = () => {
|
|
5427
5455
|
t("update:suffixes", {
|
|
5428
5456
|
isTop: !0,
|
|
@@ -5432,24 +5460,24 @@ var qa = d({
|
|
|
5432
5460
|
open: e.optionsType,
|
|
5433
5461
|
onClick: n,
|
|
5434
5462
|
optionsSource: e.optionsSource,
|
|
5435
|
-
mainFormValue: () =>
|
|
5463
|
+
mainFormValue: () => z.value,
|
|
5436
5464
|
tableData: () => E.value,
|
|
5437
5465
|
children: null,
|
|
5438
5466
|
callback: null
|
|
5439
5467
|
});
|
|
5440
5468
|
};
|
|
5441
5469
|
} else if (e.type !== "group") {
|
|
5442
|
-
let t =
|
|
5470
|
+
let t = W(e.onClick);
|
|
5443
5471
|
e.onClick = async () => {
|
|
5444
5472
|
if (t && typeof t == "string") try {
|
|
5445
5473
|
let e = Function("rowData", "POST", "fnNotification", t);
|
|
5446
|
-
await e(
|
|
5474
|
+
await e(z.value, Z, c, e), B();
|
|
5447
5475
|
} catch (e) {
|
|
5448
5476
|
K(e);
|
|
5449
5477
|
}
|
|
5450
5478
|
};
|
|
5451
5479
|
}
|
|
5452
|
-
},
|
|
5480
|
+
}, Le = () => {
|
|
5453
5481
|
if (_.value) return;
|
|
5454
5482
|
_.value = !0;
|
|
5455
5483
|
let t = e.id || o.params.id;
|
|
@@ -5457,40 +5485,40 @@ var qa = d({
|
|
|
5457
5485
|
table_id: t,
|
|
5458
5486
|
data: null
|
|
5459
5487
|
}).catch(() => null).finally(() => {
|
|
5460
|
-
|
|
5488
|
+
Te(), _.value = !1;
|
|
5461
5489
|
}));
|
|
5462
|
-
},
|
|
5463
|
-
|
|
5464
|
-
},
|
|
5490
|
+
}, Re = (e, t, n) => {
|
|
5491
|
+
Ae(e, n.key);
|
|
5492
|
+
}, ze = () => {
|
|
5465
5493
|
O.value = E.value.map((e) => e.id);
|
|
5466
|
-
},
|
|
5494
|
+
}, Be = () => {
|
|
5467
5495
|
O.value = [];
|
|
5468
5496
|
};
|
|
5469
5497
|
return r({
|
|
5470
|
-
rebuild:
|
|
5471
|
-
init:
|
|
5472
|
-
nextPage:
|
|
5498
|
+
rebuild: Fe,
|
|
5499
|
+
init: B,
|
|
5500
|
+
nextPage: me
|
|
5473
5501
|
}), y(async () => {
|
|
5474
|
-
await
|
|
5502
|
+
await Fe(), h(() => {
|
|
5475
5503
|
d.value?.scrollTo({
|
|
5476
5504
|
left: 0,
|
|
5477
5505
|
right: 0
|
|
5478
5506
|
});
|
|
5479
5507
|
});
|
|
5480
|
-
}),
|
|
5481
|
-
|
|
5482
|
-
}),
|
|
5483
|
-
kt(), await
|
|
5484
|
-
}),
|
|
5485
|
-
let t = e || [], n =
|
|
5486
|
-
|
|
5508
|
+
}), M(() => e.height, () => {
|
|
5509
|
+
De();
|
|
5510
|
+
}), M([() => o.params.id, () => e.id], async () => {
|
|
5511
|
+
kt(), await Fe();
|
|
5512
|
+
}), M(() => e.defaultCheckedRowKeys, (e) => {
|
|
5513
|
+
let t = e || [], n = z.value.filter((e) => t.includes(e.id));
|
|
5514
|
+
ie.value = t, z.value = n;
|
|
5487
5515
|
}, { deep: !0 }), {
|
|
5488
5516
|
t: s,
|
|
5489
5517
|
loading: _,
|
|
5490
5518
|
minH: ee,
|
|
5491
|
-
maxH:
|
|
5519
|
+
maxH: j,
|
|
5492
5520
|
drawerRef: m,
|
|
5493
|
-
tableOption:
|
|
5521
|
+
tableOption: R,
|
|
5494
5522
|
tableCols: T,
|
|
5495
5523
|
tableData: E,
|
|
5496
5524
|
tableQueries: k,
|
|
@@ -5499,58 +5527,58 @@ var qa = d({
|
|
|
5499
5527
|
isSlotHeader: g,
|
|
5500
5528
|
title: b,
|
|
5501
5529
|
dynamicLoading: v,
|
|
5502
|
-
spinMsg:
|
|
5530
|
+
spinMsg: ne,
|
|
5503
5531
|
tableScrollX: D,
|
|
5504
|
-
suffixes:
|
|
5505
|
-
spinError:
|
|
5532
|
+
suffixes: te,
|
|
5533
|
+
spinError: re,
|
|
5506
5534
|
isMobile: l,
|
|
5507
5535
|
mRef: u,
|
|
5508
|
-
checkRowKeys:
|
|
5536
|
+
checkRowKeys: ie,
|
|
5509
5537
|
route: o,
|
|
5510
|
-
rowKey:
|
|
5511
|
-
pageChange:
|
|
5512
|
-
pageSizeChange:
|
|
5513
|
-
pageSorter:
|
|
5514
|
-
showChange:
|
|
5515
|
-
submit:
|
|
5516
|
-
handleAdd:
|
|
5517
|
-
handleColumnChange:
|
|
5518
|
-
handleCheckRowKeys:
|
|
5519
|
-
handleExpandedRowKeys:
|
|
5520
|
-
checkRole:
|
|
5521
|
-
rebuild:
|
|
5522
|
-
summaryFn:
|
|
5523
|
-
handleMobileCheckRowKeys:
|
|
5524
|
-
isTypeofNumber:
|
|
5525
|
-
resetFilter:
|
|
5526
|
-
handleColumnResize:
|
|
5538
|
+
rowKey: oe,
|
|
5539
|
+
pageChange: pe,
|
|
5540
|
+
pageSizeChange: he,
|
|
5541
|
+
pageSorter: ge,
|
|
5542
|
+
showChange: _e,
|
|
5543
|
+
submit: ve,
|
|
5544
|
+
handleAdd: V,
|
|
5545
|
+
handleColumnChange: je,
|
|
5546
|
+
handleCheckRowKeys: ce,
|
|
5547
|
+
handleExpandedRowKeys: le,
|
|
5548
|
+
checkRole: be,
|
|
5549
|
+
rebuild: Fe,
|
|
5550
|
+
summaryFn: ue,
|
|
5551
|
+
handleMobileCheckRowKeys: se,
|
|
5552
|
+
isTypeofNumber: Ee,
|
|
5553
|
+
resetFilter: Le,
|
|
5554
|
+
handleColumnResize: Re,
|
|
5527
5555
|
expandedRowKeys: O,
|
|
5528
|
-
handleExpandAll:
|
|
5529
|
-
handleContractAll:
|
|
5556
|
+
handleExpandAll: ze,
|
|
5557
|
+
handleContractAll: Be,
|
|
5530
5558
|
doPortChange: () => {
|
|
5531
|
-
|
|
5559
|
+
B();
|
|
5532
5560
|
}
|
|
5533
5561
|
};
|
|
5534
5562
|
}
|
|
5535
|
-
}),
|
|
5563
|
+
}), Za = { class: "uz-com-title" }, Qa = {
|
|
5536
5564
|
ref: "mRef",
|
|
5537
5565
|
class: "uz-table-m-content"
|
|
5538
|
-
},
|
|
5566
|
+
}, $a = {
|
|
5539
5567
|
key: 1,
|
|
5540
5568
|
class: "uz-transform-fade-in"
|
|
5541
|
-
},
|
|
5542
|
-
function
|
|
5543
|
-
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"),
|
|
5569
|
+
}, eo = { class: "uz-com-title" }, to = ["data-index"];
|
|
5570
|
+
function no(t, n, u, d, f, p) {
|
|
5571
|
+
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");
|
|
5544
5572
|
return x(), a("div", {
|
|
5545
5573
|
class: "uz-table",
|
|
5546
5574
|
style: _({ width: t.isTypeofNumber(t.width) })
|
|
5547
5575
|
}, [
|
|
5548
|
-
|
|
5549
|
-
|
|
5576
|
+
F(l(m, null, null, 512), [[j, !t.dynamicLoading]]),
|
|
5577
|
+
F(l(te, {
|
|
5550
5578
|
show: t.spinError,
|
|
5551
5579
|
class: "uz-table-n-spin"
|
|
5552
5580
|
}, {
|
|
5553
|
-
description:
|
|
5581
|
+
description: P(() => [
|
|
5554
5582
|
o("div", null, A(t.spinMsg), 1),
|
|
5555
5583
|
n[1] ||= o("div", { class: "uz-br" }, null, -1),
|
|
5556
5584
|
l(h, {
|
|
@@ -5558,11 +5586,11 @@ function $a(t, n, u, d, f, p) {
|
|
|
5558
5586
|
onClick: t.rebuild,
|
|
5559
5587
|
block: ""
|
|
5560
5588
|
}, {
|
|
5561
|
-
default:
|
|
5589
|
+
default: P(() => [c(A(t.t("Common.retry")), 1)]),
|
|
5562
5590
|
_: 1
|
|
5563
5591
|
}, 8, ["onClick"])
|
|
5564
5592
|
]),
|
|
5565
|
-
default:
|
|
5593
|
+
default: P(() => [t.isMobile ? (x(), a("div", {
|
|
5566
5594
|
key: 0,
|
|
5567
5595
|
class: g([t.enableTransform ? "uz-transform-fade-in" : "", "uz-table-m-main"])
|
|
5568
5596
|
}, [l(S, {
|
|
@@ -5572,18 +5600,18 @@ function $a(t, n, u, d, f, p) {
|
|
|
5572
5600
|
loading: t.loading,
|
|
5573
5601
|
"onOnUpdate:value": t.submit
|
|
5574
5602
|
}, s({
|
|
5575
|
-
action:
|
|
5603
|
+
action: P(() => [
|
|
5576
5604
|
t.addFetch && t.tableOption.addButton ? (x(), r(h, {
|
|
5577
5605
|
key: 0,
|
|
5578
5606
|
secondary: "",
|
|
5579
5607
|
disabled: t.checkRole("add"),
|
|
5580
5608
|
onClick: t.handleAdd
|
|
5581
5609
|
}, {
|
|
5582
|
-
icon:
|
|
5583
|
-
default:
|
|
5610
|
+
icon: P(() => [l(y, null, {
|
|
5611
|
+
default: P(() => [l(v, { icon: "Add" })]),
|
|
5584
5612
|
_: 1
|
|
5585
5613
|
})]),
|
|
5586
|
-
default:
|
|
5614
|
+
default: P(() => [c(" " + A(t.t("Common.add")), 1)]),
|
|
5587
5615
|
_: 1
|
|
5588
5616
|
}, 8, ["disabled", "onClick"])) : i("", !0),
|
|
5589
5617
|
t.suffixes && t.suffixes.length > 0 ? (x(), r(b, {
|
|
@@ -5600,11 +5628,11 @@ function $a(t, n, u, d, f, p) {
|
|
|
5600
5628
|
_: 2
|
|
5601
5629
|
}, [t.isSlotHeader ? {
|
|
5602
5630
|
name: "header",
|
|
5603
|
-
fn:
|
|
5631
|
+
fn: P(() => [E(t.$slots, "header")]),
|
|
5604
5632
|
key: "0"
|
|
5605
5633
|
} : {
|
|
5606
5634
|
name: "header",
|
|
5607
|
-
fn:
|
|
5635
|
+
fn: P(() => [o("div", Za, A(t.title), 1)]),
|
|
5608
5636
|
key: "1"
|
|
5609
5637
|
}]), 1032, [
|
|
5610
5638
|
"data",
|
|
@@ -5612,7 +5640,7 @@ function $a(t, n, u, d, f, p) {
|
|
|
5612
5640
|
"cache",
|
|
5613
5641
|
"loading",
|
|
5614
5642
|
"onOnUpdate:value"
|
|
5615
|
-
]), o("div",
|
|
5643
|
+
]), o("div", Qa, [l(C, {
|
|
5616
5644
|
tableColumns: t.tableCols,
|
|
5617
5645
|
tableData: t.tableData,
|
|
5618
5646
|
tableQueries: t.tableQueries,
|
|
@@ -5630,7 +5658,7 @@ function $a(t, n, u, d, f, p) {
|
|
|
5630
5658
|
"minH",
|
|
5631
5659
|
"maxH",
|
|
5632
5660
|
"onUpdate:rowKeys"
|
|
5633
|
-
])], 512)], 2)) : (x(), a("div",
|
|
5661
|
+
])], 512)], 2)) : (x(), a("div", $a, [l(M, {
|
|
5634
5662
|
data: t.searchData,
|
|
5635
5663
|
id: t.id || t.route.params.id,
|
|
5636
5664
|
cache: t.tableOption.cache,
|
|
@@ -5639,22 +5667,22 @@ function $a(t, n, u, d, f, p) {
|
|
|
5639
5667
|
enableHeader: t.enableHeader,
|
|
5640
5668
|
"onOnUpdate:value": t.submit
|
|
5641
5669
|
}, s({
|
|
5642
|
-
action:
|
|
5670
|
+
action: P(() => [
|
|
5643
5671
|
t.tableOption.filterButton && t.filterColumns.length > 0 ? (x(), r(k, {
|
|
5644
5672
|
key: 0,
|
|
5645
5673
|
placement: "bottom-end",
|
|
5646
5674
|
trigger: "click",
|
|
5647
5675
|
"show-arrow": !1
|
|
5648
5676
|
}, {
|
|
5649
|
-
trigger:
|
|
5650
|
-
icon:
|
|
5651
|
-
default:
|
|
5677
|
+
trigger: P(() => [l(h, { secondary: "" }, {
|
|
5678
|
+
icon: P(() => [l(y, null, {
|
|
5679
|
+
default: P(() => [l(v, { icon: "Filter" })]),
|
|
5652
5680
|
_: 1
|
|
5653
5681
|
})]),
|
|
5654
|
-
default:
|
|
5682
|
+
default: P(() => [c(" " + A(t.t("Common.columns")), 1)]),
|
|
5655
5683
|
_: 1
|
|
5656
5684
|
})]),
|
|
5657
|
-
default:
|
|
5685
|
+
default: P(() => [l(O, {
|
|
5658
5686
|
modelValue: t.filterColumns,
|
|
5659
5687
|
"onUpdate:modelValue": n[0] ||= (e) => t.filterColumns = e,
|
|
5660
5688
|
animation: 200,
|
|
@@ -5665,7 +5693,7 @@ function $a(t, n, u, d, f, p) {
|
|
|
5665
5693
|
handle: ".uz-drag-handle",
|
|
5666
5694
|
onEnd: t.handleColumnChange
|
|
5667
5695
|
}, {
|
|
5668
|
-
default:
|
|
5696
|
+
default: P(() => [(x(!0), a(e, null, T(t.filterColumns, (e, n) => F((x(), a("div", {
|
|
5669
5697
|
key: e.key,
|
|
5670
5698
|
class: "uz-table-sort",
|
|
5671
5699
|
"data-index": n
|
|
@@ -5674,24 +5702,24 @@ function $a(t, n, u, d, f, p) {
|
|
|
5674
5702
|
"on-update:checked": () => t.showChange(e),
|
|
5675
5703
|
size: "large"
|
|
5676
5704
|
}, {
|
|
5677
|
-
default:
|
|
5705
|
+
default: P(() => [c(A(typeof e.title == "string" ? e.title : e.title && e.title()), 1)]),
|
|
5678
5706
|
_: 2
|
|
5679
5707
|
}, 1032, ["checked", "on-update:checked"]), l(h, {
|
|
5680
5708
|
quaternary: "",
|
|
5681
5709
|
class: "uz-drag-handle"
|
|
5682
5710
|
}, {
|
|
5683
|
-
icon:
|
|
5684
|
-
default:
|
|
5711
|
+
icon: P(() => [l(y, { size: "18" }, {
|
|
5712
|
+
default: P(() => [l(v, { icon: "List" })]),
|
|
5685
5713
|
_: 1
|
|
5686
5714
|
})]),
|
|
5687
5715
|
_: 1
|
|
5688
|
-
})], 8,
|
|
5716
|
+
})], 8, to)), [[j, !e.hide]])), 128)), l(h, {
|
|
5689
5717
|
block: "",
|
|
5690
5718
|
tertiary: "",
|
|
5691
5719
|
loading: t.loading,
|
|
5692
5720
|
onClick: t.resetFilter
|
|
5693
5721
|
}, {
|
|
5694
|
-
default:
|
|
5722
|
+
default: P(() => [c(A(t.t("Common.reset")), 1)]),
|
|
5695
5723
|
_: 1
|
|
5696
5724
|
}, 8, ["loading", "onClick"])]),
|
|
5697
5725
|
_: 1
|
|
@@ -5723,11 +5751,11 @@ function $a(t, n, u, d, f, p) {
|
|
|
5723
5751
|
disabled: t.checkRole("add"),
|
|
5724
5752
|
onClick: t.handleAdd
|
|
5725
5753
|
}, {
|
|
5726
|
-
icon:
|
|
5727
|
-
default:
|
|
5754
|
+
icon: P(() => [l(y, null, {
|
|
5755
|
+
default: P(() => [l(v, { icon: "Add" })]),
|
|
5728
5756
|
_: 1
|
|
5729
5757
|
})]),
|
|
5730
|
-
default:
|
|
5758
|
+
default: P(() => [c(" " + A(t.t("Common.add")), 1)]),
|
|
5731
5759
|
_: 1
|
|
5732
5760
|
}, 8, ["disabled", "onClick"])) : i("", !0),
|
|
5733
5761
|
E(t.$slots, "action")
|
|
@@ -5735,11 +5763,11 @@ function $a(t, n, u, d, f, p) {
|
|
|
5735
5763
|
_: 2
|
|
5736
5764
|
}, [t.isSlotHeader ? {
|
|
5737
5765
|
name: "header",
|
|
5738
|
-
fn:
|
|
5766
|
+
fn: P(() => [E(t.$slots, "header")]),
|
|
5739
5767
|
key: "0"
|
|
5740
5768
|
} : {
|
|
5741
5769
|
name: "header",
|
|
5742
|
-
fn:
|
|
5770
|
+
fn: P(() => [o("div", eo, A(t.title), 1)]),
|
|
5743
5771
|
key: "1"
|
|
5744
5772
|
}]), 1032, [
|
|
5745
5773
|
"data",
|
|
@@ -5749,7 +5777,7 @@ function $a(t, n, u, d, f, p) {
|
|
|
5749
5777
|
"cols",
|
|
5750
5778
|
"enableHeader",
|
|
5751
5779
|
"onOnUpdate:value"
|
|
5752
|
-
]), l(
|
|
5780
|
+
]), l(N, {
|
|
5753
5781
|
ref: "tableRef",
|
|
5754
5782
|
columns: t.tableCols,
|
|
5755
5783
|
data: t.tableData,
|
|
@@ -5796,20 +5824,20 @@ function $a(t, n, u, d, f, p) {
|
|
|
5796
5824
|
"onUpdate:expandedRowKeys"
|
|
5797
5825
|
])]))]),
|
|
5798
5826
|
_: 3
|
|
5799
|
-
}, 8, ["show"]), [[
|
|
5800
|
-
l(
|
|
5827
|
+
}, 8, ["show"]), [[j, t.dynamicLoading]]),
|
|
5828
|
+
l(I, { ref: "drawerRef" }, null, 512)
|
|
5801
5829
|
], 4);
|
|
5802
5830
|
}
|
|
5803
|
-
var
|
|
5831
|
+
var ro = /*#__PURE__*/ Q(Xa, [["render", no]]), io = d({
|
|
5804
5832
|
name: "UzTableChild",
|
|
5805
5833
|
components: {
|
|
5806
5834
|
UzIcon: qt,
|
|
5807
|
-
NSpin:
|
|
5808
|
-
NButton:
|
|
5809
|
-
NIcon:
|
|
5810
|
-
NDataTable:
|
|
5811
|
-
NForm:
|
|
5812
|
-
NDivider:
|
|
5835
|
+
NSpin: Me,
|
|
5836
|
+
NButton: L,
|
|
5837
|
+
NIcon: V,
|
|
5838
|
+
NDataTable: oe,
|
|
5839
|
+
NForm: pe,
|
|
5840
|
+
NDivider: ce
|
|
5813
5841
|
},
|
|
5814
5842
|
props: {
|
|
5815
5843
|
value: {
|
|
@@ -5828,13 +5856,13 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
5828
5856
|
},
|
|
5829
5857
|
emits: ["update:value"],
|
|
5830
5858
|
setup(e, { emit: t, expose: r }) {
|
|
5831
|
-
let i = p("emitSuffix"), a = p("modules"), o = p("mainFormValue"), s = p("childFormReload"), c = n(() => s ? s() : 0), { t: l } =
|
|
5832
|
-
let { formDefaultValue: r, fillingDefaultArray: i } = await Si(
|
|
5859
|
+
let i = p("emitSuffix"), a = p("modules"), o = p("mainFormValue"), s = p("childFormReload"), c = n(() => s ? s() : 0), { t: l } = U(), 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) => {
|
|
5860
|
+
let { formDefaultValue: r, fillingDefaultArray: i } = await Si(W(n ?? e.item.params.columns), t, void 0, !0);
|
|
5833
5861
|
return S.value = r, i;
|
|
5834
5862
|
}, D = async (t) => {
|
|
5835
5863
|
if (g.value) return;
|
|
5836
5864
|
g.value = !0;
|
|
5837
|
-
let n = await E(t), r =
|
|
5865
|
+
let n = await E(t), r = W(t).map((e, t) => ({
|
|
5838
5866
|
...e,
|
|
5839
5867
|
...n[t]
|
|
5840
5868
|
}));
|
|
@@ -5853,14 +5881,14 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
5853
5881
|
K(e);
|
|
5854
5882
|
}
|
|
5855
5883
|
b.value.child = r, g.value = !1, h(() => {
|
|
5856
|
-
|
|
5884
|
+
F();
|
|
5857
5885
|
});
|
|
5858
5886
|
} else h(() => {
|
|
5859
|
-
|
|
5887
|
+
F();
|
|
5860
5888
|
});
|
|
5861
5889
|
}, O = (e) => e.delete ? "uz-table-child-delete" : "", k = async (t, n = !1) => {
|
|
5862
5890
|
e.item._suffix && (C.value = e.item._suffix.filter((e) => e.sub)), await E(e.value, t);
|
|
5863
|
-
let { tableColumns: r, tableWidth: i } = await Ci(
|
|
5891
|
+
let { tableColumns: r, tableWidth: i } = await Ci(W(t ?? e.item.params.columns), !0, e.status, () => b.value.child, a, n), s = i;
|
|
5864
5892
|
r.unshift({
|
|
5865
5893
|
title: " ",
|
|
5866
5894
|
key: "index",
|
|
@@ -5879,7 +5907,7 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
5879
5907
|
hide: !0,
|
|
5880
5908
|
show: !0,
|
|
5881
5909
|
render() {
|
|
5882
|
-
return f("div", { class: "flex justify-center" }, f(
|
|
5910
|
+
return f("div", { class: "flex justify-center" }, f(V, {}, { default: () => f(qt, { icon: "List" }) }));
|
|
5883
5911
|
}
|
|
5884
5912
|
}), s += 40), e.status !== 2 && e.item.params.showActions && r.push({
|
|
5885
5913
|
title: () => l("Common.action"),
|
|
@@ -5927,10 +5955,10 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
5927
5955
|
}
|
|
5928
5956
|
return [];
|
|
5929
5957
|
}, ee = async () => {
|
|
5930
|
-
x.value = "", b.value.child.push(
|
|
5931
|
-
|
|
5958
|
+
x.value = "", b.value.child.push(W(S.value)), h(() => {
|
|
5959
|
+
F();
|
|
5932
5960
|
});
|
|
5933
|
-
},
|
|
5961
|
+
}, j = async () => {
|
|
5934
5962
|
x.value = "";
|
|
5935
5963
|
try {
|
|
5936
5964
|
let t = e.item.params.options;
|
|
@@ -5943,7 +5971,7 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
5943
5971
|
callback: async (e) => {
|
|
5944
5972
|
let t = await n(e, o, Z);
|
|
5945
5973
|
b.value.child = [...b.value.child, ...t], h(() => {
|
|
5946
|
-
|
|
5974
|
+
F();
|
|
5947
5975
|
});
|
|
5948
5976
|
}
|
|
5949
5977
|
});
|
|
@@ -5953,34 +5981,34 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
5953
5981
|
children: () => b.value.child,
|
|
5954
5982
|
callback: async (e) => {
|
|
5955
5983
|
b.value.child = [...b.value.child, ...e], h(() => {
|
|
5956
|
-
|
|
5984
|
+
F();
|
|
5957
5985
|
});
|
|
5958
5986
|
}
|
|
5959
5987
|
});
|
|
5960
5988
|
} catch (e) {
|
|
5961
5989
|
K(e);
|
|
5962
5990
|
}
|
|
5963
|
-
},
|
|
5991
|
+
}, N = () => {
|
|
5964
5992
|
m.value?.restoreValidation();
|
|
5965
|
-
},
|
|
5993
|
+
}, P = () => (x.value = "", new Promise((t, n) => {
|
|
5966
5994
|
let r = b.value.child.filter((e) => !e.delete).length;
|
|
5967
5995
|
e.item.form.rule.required && r === 0 ? (x.value = e.item.form.rule.message, n()) : m.value?.validate((r) => {
|
|
5968
5996
|
r ? (x.value = e.item.form.rule.message, n()) : t();
|
|
5969
5997
|
});
|
|
5970
|
-
})),
|
|
5998
|
+
})), F = () => {
|
|
5971
5999
|
if (e.item.params.draggable && e.status !== 2 && u.value && !d.value) {
|
|
5972
6000
|
let e = u.value.$el.querySelector(".n-data-table-tbody");
|
|
5973
6001
|
e && (d.value = nt.create(e, {
|
|
5974
6002
|
handle: ".uz-drag-handle",
|
|
5975
6003
|
onEnd: ({ oldIndex: e, newIndex: t }) => {
|
|
5976
6004
|
d.value?.destroy(), d.value = null, _.value = !1;
|
|
5977
|
-
let n =
|
|
6005
|
+
let n = W(b.value.child), r = n.splice(e, 1)[0];
|
|
5978
6006
|
n.splice(t, 0, r), n = n.map((e, t) => ({
|
|
5979
6007
|
...e,
|
|
5980
6008
|
sort_index: t
|
|
5981
6009
|
})), b.value.child = n, h(() => {
|
|
5982
6010
|
_.value = !0, setTimeout(() => {
|
|
5983
|
-
|
|
6011
|
+
F();
|
|
5984
6012
|
}, 0);
|
|
5985
6013
|
});
|
|
5986
6014
|
}
|
|
@@ -5990,21 +6018,21 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
5990
6018
|
return v(() => {
|
|
5991
6019
|
d.value?.destroy(), d.value = null;
|
|
5992
6020
|
}), r({
|
|
5993
|
-
validate:
|
|
5994
|
-
restoreValidation:
|
|
5995
|
-
}),
|
|
6021
|
+
validate: P,
|
|
6022
|
+
restoreValidation: N
|
|
6023
|
+
}), M(() => e.item.params.columns, (e, t) => {
|
|
5996
6024
|
JSON.stringify(e) !== JSON.stringify(t) && k(e);
|
|
5997
6025
|
}, {
|
|
5998
6026
|
deep: !0,
|
|
5999
6027
|
immediate: !0
|
|
6000
|
-
}),
|
|
6028
|
+
}), M(() => e.value, (e) => {
|
|
6001
6029
|
JSON.stringify(e) !== JSON.stringify(b.value.child) && D(e);
|
|
6002
6030
|
}, {
|
|
6003
6031
|
deep: !0,
|
|
6004
6032
|
immediate: !0
|
|
6005
|
-
}),
|
|
6033
|
+
}), M(() => b.value.child, (n) => {
|
|
6006
6034
|
e.status !== 2 && t("update:value", n);
|
|
6007
|
-
}, { deep: !0 }),
|
|
6035
|
+
}, { deep: !0 }), M(() => c.value, async () => {
|
|
6008
6036
|
await k(void 0, !0);
|
|
6009
6037
|
}), {
|
|
6010
6038
|
t: l,
|
|
@@ -6019,7 +6047,7 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
6019
6047
|
tableShow: _,
|
|
6020
6048
|
suffixes: C,
|
|
6021
6049
|
onAdd: ee,
|
|
6022
|
-
onAddFormData:
|
|
6050
|
+
onAddFormData: j,
|
|
6023
6051
|
rowClassName: O,
|
|
6024
6052
|
doSuffixClick: (e) => {
|
|
6025
6053
|
i({
|
|
@@ -6033,26 +6061,26 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
6033
6061
|
}
|
|
6034
6062
|
};
|
|
6035
6063
|
}
|
|
6036
|
-
}),
|
|
6064
|
+
}), ao = { class: "uz-flex-1 uz-w-full" }, oo = { class: "uz-flex uz-justify-between" }, so = { class: "uz-com-title" }, co = {
|
|
6037
6065
|
key: 0,
|
|
6038
6066
|
class: "uz-table-asterisk"
|
|
6039
|
-
},
|
|
6040
|
-
function
|
|
6067
|
+
}, lo = { class: "uz-flex uz-gap-2" }, uo = { class: "uz-flex uz-justify-end uz-gap-2" };
|
|
6068
|
+
function fo(t, n, u, d, f, p) {
|
|
6041
6069
|
let m = D("UzIcon"), h = D("NIcon"), _ = D("NButton"), v = D("NDataTable"), y = D("NForm");
|
|
6042
|
-
return x(), a("div",
|
|
6043
|
-
o("div",
|
|
6070
|
+
return x(), a("div", ao, [
|
|
6071
|
+
o("div", oo, [o("div", so, [c(A(t.item.label) + " ", 1), t.item.form.rule.required ? (x(), a("span", co, " \xA0* ")) : i("", !0)]), o("div", lo, [
|
|
6044
6072
|
t.status === 2 ? i("", !0) : (x(!0), a(e, { key: 0 }, T(t.suffixes, (e) => (x(), r(_, {
|
|
6045
6073
|
key: e.key,
|
|
6046
6074
|
type: e.color,
|
|
6047
6075
|
secondary: "",
|
|
6048
6076
|
onClick: (n) => t.doSuffixClick(e)
|
|
6049
6077
|
}, s({
|
|
6050
|
-
default:
|
|
6078
|
+
default: P(() => [c(" " + A(e.buttonText), 1)]),
|
|
6051
6079
|
_: 2
|
|
6052
6080
|
}, [e.icon ? {
|
|
6053
6081
|
name: "icon",
|
|
6054
|
-
fn:
|
|
6055
|
-
default:
|
|
6082
|
+
fn: P(() => [l(h, null, {
|
|
6083
|
+
default: P(() => [l(m, { icon: e.icon }, null, 8, ["icon"])]),
|
|
6056
6084
|
_: 2
|
|
6057
6085
|
}, 1024)]),
|
|
6058
6086
|
key: "0"
|
|
@@ -6063,11 +6091,11 @@ function co(t, n, u, d, f, p) {
|
|
|
6063
6091
|
secondary: "",
|
|
6064
6092
|
onClick: t.onAddFormData
|
|
6065
6093
|
}, {
|
|
6066
|
-
icon:
|
|
6067
|
-
default:
|
|
6094
|
+
icon: P(() => [l(h, null, {
|
|
6095
|
+
default: P(() => [l(m, { icon: "Add" })]),
|
|
6068
6096
|
_: 1
|
|
6069
6097
|
})]),
|
|
6070
|
-
default:
|
|
6098
|
+
default: P(() => [c(" " + A(t.t("Table.addFromData")), 1)]),
|
|
6071
6099
|
_: 1
|
|
6072
6100
|
}, 8, ["onClick"])) : i("", !0),
|
|
6073
6101
|
t.item.params.addButton && t.status !== 2 && (t.item.form.edit ? !t.item.form.edit.readonly : !t.item.form.readonly) ? (x(), r(_, {
|
|
@@ -6076,11 +6104,11 @@ function co(t, n, u, d, f, p) {
|
|
|
6076
6104
|
secondary: "",
|
|
6077
6105
|
onClick: t.onAdd
|
|
6078
6106
|
}, {
|
|
6079
|
-
icon:
|
|
6080
|
-
default:
|
|
6107
|
+
icon: P(() => [l(h, null, {
|
|
6108
|
+
default: P(() => [l(m, { icon: "Add" })]),
|
|
6081
6109
|
_: 1
|
|
6082
6110
|
})]),
|
|
6083
|
-
default:
|
|
6111
|
+
default: P(() => [c(" " + A(t.t("Common.add")), 1)]),
|
|
6084
6112
|
_: 1
|
|
6085
6113
|
}, 8, ["onClick"])) : i("", !0)
|
|
6086
6114
|
])]),
|
|
@@ -6091,7 +6119,7 @@ function co(t, n, u, d, f, p) {
|
|
|
6091
6119
|
model: t.tableData,
|
|
6092
6120
|
class: "uz-flex uz-flex-col uz-gap-2"
|
|
6093
6121
|
}, {
|
|
6094
|
-
default:
|
|
6122
|
+
default: P(() => [t.tableShow ? (x(), r(v, {
|
|
6095
6123
|
key: 0,
|
|
6096
6124
|
ref: "tableRef",
|
|
6097
6125
|
columns: t.columns,
|
|
@@ -6113,17 +6141,17 @@ function co(t, n, u, d, f, p) {
|
|
|
6113
6141
|
"scroll-x",
|
|
6114
6142
|
"class",
|
|
6115
6143
|
"row-class-name"
|
|
6116
|
-
])) : i("", !0), o("div",
|
|
6144
|
+
])) : i("", !0), o("div", uo, [t.item.params.optionsType && t.status !== 2 && (t.item.form.edit ? !t.item.form.edit.readonly : !t.item.form.readonly) ? (x(), r(_, {
|
|
6117
6145
|
key: 0,
|
|
6118
6146
|
type: "success",
|
|
6119
6147
|
secondary: "",
|
|
6120
6148
|
onClick: t.onAddFormData
|
|
6121
6149
|
}, {
|
|
6122
|
-
icon:
|
|
6123
|
-
default:
|
|
6150
|
+
icon: P(() => [l(h, null, {
|
|
6151
|
+
default: P(() => [l(m, { icon: "Add" })]),
|
|
6124
6152
|
_: 1
|
|
6125
6153
|
})]),
|
|
6126
|
-
default:
|
|
6154
|
+
default: P(() => [c(" " + A(t.t("Table.addFromData")), 1)]),
|
|
6127
6155
|
_: 1
|
|
6128
6156
|
}, 8, ["onClick"])) : i("", !0), t.item.params.addButton && t.status !== 2 && (t.item.form.edit ? !t.item.form.edit.readonly : !t.item.form.readonly) ? (x(), r(_, {
|
|
6129
6157
|
key: 1,
|
|
@@ -6131,20 +6159,20 @@ function co(t, n, u, d, f, p) {
|
|
|
6131
6159
|
secondary: "",
|
|
6132
6160
|
onClick: t.onAdd
|
|
6133
6161
|
}, {
|
|
6134
|
-
icon:
|
|
6135
|
-
default:
|
|
6162
|
+
icon: P(() => [l(h, null, {
|
|
6163
|
+
default: P(() => [l(m, { icon: "Add" })]),
|
|
6136
6164
|
_: 1
|
|
6137
6165
|
})]),
|
|
6138
|
-
default:
|
|
6166
|
+
default: P(() => [c(" " + A(t.t("Common.add")), 1)]),
|
|
6139
6167
|
_: 1
|
|
6140
6168
|
}, 8, ["onClick"])) : i("", !0)])]),
|
|
6141
6169
|
_: 1
|
|
6142
6170
|
}, 8, ["model"])
|
|
6143
6171
|
]);
|
|
6144
6172
|
}
|
|
6145
|
-
var
|
|
6173
|
+
var po = /*#__PURE__*/ Q(io, [["render", fo]]), mo = d({
|
|
6146
6174
|
name: "UzTableQuestChild",
|
|
6147
|
-
components: { NDataTable:
|
|
6175
|
+
components: { NDataTable: oe },
|
|
6148
6176
|
props: {
|
|
6149
6177
|
formValue: {
|
|
6150
6178
|
type: Object,
|
|
@@ -6158,7 +6186,7 @@ var lo = /*#__PURE__*/ Q(to, [["render", co]]), uo = d({
|
|
|
6158
6186
|
},
|
|
6159
6187
|
emits: ["update:value"],
|
|
6160
6188
|
setup(e) {
|
|
6161
|
-
let t = p("modules"), { t: n } =
|
|
6189
|
+
let t = p("modules"), { t: n } = U(), r = w(), i = w(!1), a = w([]), o = w([]), s = w(void 0), c = (t) => {
|
|
6162
6190
|
if (i.value = !0, e.item.params.link) {
|
|
6163
6191
|
let n = [];
|
|
6164
6192
|
e.item.params.columns.forEach((e) => {
|
|
@@ -6170,7 +6198,7 @@ var lo = /*#__PURE__*/ Q(to, [["render", co]]), uo = d({
|
|
|
6170
6198
|
}), o.value = t, i.value = !1;
|
|
6171
6199
|
}
|
|
6172
6200
|
}, l = async (i) => {
|
|
6173
|
-
let { tableColumns: c, tableWidth: l } = await Ci(
|
|
6201
|
+
let { tableColumns: c, tableWidth: l } = await Ci(W(i ?? e.item.params.columns), !0, 2, () => o.value, t), u = l;
|
|
6174
6202
|
c.unshift({
|
|
6175
6203
|
title: " ",
|
|
6176
6204
|
key: "index",
|
|
@@ -6207,7 +6235,7 @@ var lo = /*#__PURE__*/ Q(to, [["render", co]]), uo = d({
|
|
|
6207
6235
|
};
|
|
6208
6236
|
return y(() => {
|
|
6209
6237
|
l();
|
|
6210
|
-
}),
|
|
6238
|
+
}), N(async () => {
|
|
6211
6239
|
try {
|
|
6212
6240
|
if (e.formValue && e.formValue.id && e.item.params.searchKey) {
|
|
6213
6241
|
let t = await Xn({
|
|
@@ -6244,11 +6272,11 @@ var lo = /*#__PURE__*/ Q(to, [["render", co]]), uo = d({
|
|
|
6244
6272
|
tableScrollX: s
|
|
6245
6273
|
};
|
|
6246
6274
|
}
|
|
6247
|
-
}),
|
|
6248
|
-
function
|
|
6275
|
+
}), ho = { class: "uz-flex-1 uz-w-full" }, go = { class: "uz-flex uz-justify-between" }, _o = { class: "uz-com-title" };
|
|
6276
|
+
function vo(e, t, n, r, i, s) {
|
|
6249
6277
|
let c = D("NDataTable"), u = D("UzTableDrawer");
|
|
6250
|
-
return x(), a("div",
|
|
6251
|
-
o("div",
|
|
6278
|
+
return x(), a("div", ho, [
|
|
6279
|
+
o("div", go, [o("div", _o, A(e.item.label), 1)]),
|
|
6252
6280
|
t[0] ||= o("div", { class: "uz-br" }, null, -1),
|
|
6253
6281
|
l(c, {
|
|
6254
6282
|
columns: e.columns,
|
|
@@ -6270,20 +6298,20 @@ function ho(e, t, n, r, i, s) {
|
|
|
6270
6298
|
l(u, { ref: "drawerRef" }, null, 512)
|
|
6271
6299
|
]);
|
|
6272
6300
|
}
|
|
6273
|
-
var
|
|
6301
|
+
var yo = /*#__PURE__*/ Q(mo, [["render", vo]]), bo = d({
|
|
6274
6302
|
name: "UzTableDrawer",
|
|
6275
6303
|
components: {
|
|
6276
|
-
NButton:
|
|
6277
|
-
NDrawerContent:
|
|
6278
|
-
NDrawer:
|
|
6279
|
-
NSkeleton:
|
|
6280
|
-
NSpin:
|
|
6281
|
-
NPopover:
|
|
6282
|
-
NModal:
|
|
6304
|
+
NButton: L,
|
|
6305
|
+
NDrawerContent: ue,
|
|
6306
|
+
NDrawer: le,
|
|
6307
|
+
NSkeleton: Ae,
|
|
6308
|
+
NSpin: Me,
|
|
6309
|
+
NPopover: Ee,
|
|
6310
|
+
NModal: Ce
|
|
6283
6311
|
},
|
|
6284
6312
|
emits: ["update:show", "on-submit"],
|
|
6285
6313
|
setup(e, { emit: t, expose: r }) {
|
|
6286
|
-
let { t: i } =
|
|
6314
|
+
let { t: i } = U(), a = n(() => Y.isMobile), o = w(), s = w(""), c = w(0), l = w({}), u = w({
|
|
6287
6315
|
link: "",
|
|
6288
6316
|
linkFn: ""
|
|
6289
6317
|
}), d = w(!1), f = w({
|
|
@@ -6344,7 +6372,7 @@ var go = /*#__PURE__*/ Q(uo, [["render", ho]]), _o = d({
|
|
|
6344
6372
|
let r = e.split(".")[0];
|
|
6345
6373
|
hi(r).then((e) => {
|
|
6346
6374
|
h(async () => {
|
|
6347
|
-
let t =
|
|
6375
|
+
let t = tt.parse(e.viewJson);
|
|
6348
6376
|
f.value = xi(t.option), d.value = !0;
|
|
6349
6377
|
let { form: i } = await Si(_i(t.table), n);
|
|
6350
6378
|
b.value = t.trigger, n && E(n);
|
|
@@ -6438,11 +6466,11 @@ var go = /*#__PURE__*/ Q(uo, [["render", ho]]), _o = d({
|
|
|
6438
6466
|
}
|
|
6439
6467
|
};
|
|
6440
6468
|
}
|
|
6441
|
-
}),
|
|
6469
|
+
}), xo = { class: "uz-flex uz-flex-col uz-gap-2 uz-h-full" }, So = {
|
|
6442
6470
|
key: 0,
|
|
6443
6471
|
class: "uz-grid uz-grid-cols-2 uz-gap-2"
|
|
6444
|
-
},
|
|
6445
|
-
function
|
|
6472
|
+
}, Co = { class: "uz-flex uz-justify-between uz-gap-2 uz-w-full" }, wo = { class: "uz-flex uz-gap-2" };
|
|
6473
|
+
function To(t, n, u, d, f, p) {
|
|
6446
6474
|
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");
|
|
6447
6475
|
return x(), a(e, null, [l(S, {
|
|
6448
6476
|
show: t.drawer,
|
|
@@ -6456,19 +6484,19 @@ function So(t, n, u, d, f, p) {
|
|
|
6456
6484
|
"auto-focus": !1,
|
|
6457
6485
|
"mask-closable": !1
|
|
6458
6486
|
}, {
|
|
6459
|
-
default:
|
|
6487
|
+
default: P(() => [l(b, {
|
|
6460
6488
|
title: t.formStatus === 1 ? t.t("Common.edit") : t.formStatus === 2 ? t.t("Common.detail") : t.t("Common.add"),
|
|
6461
6489
|
closable: ""
|
|
6462
6490
|
}, s({
|
|
6463
|
-
default:
|
|
6464
|
-
description:
|
|
6465
|
-
default:
|
|
6491
|
+
default: P(() => [l(_, { show: t.spinError }, {
|
|
6492
|
+
description: P(() => [c(A(t.t("Notice.error")), 1)]),
|
|
6493
|
+
default: P(() => [l(g, {
|
|
6466
6494
|
value: t.spinShow,
|
|
6467
6495
|
"onUpdate:value": n[0] ||= (e) => t.spinShow = e,
|
|
6468
6496
|
message: t.spinMsg,
|
|
6469
6497
|
status: t.spinStatus
|
|
6470
6498
|
}, {
|
|
6471
|
-
default:
|
|
6499
|
+
default: P(() => [o("div", xo, [t.skeletonShow ? (x(), a("div", So, [
|
|
6472
6500
|
l(m, {
|
|
6473
6501
|
size: "large",
|
|
6474
6502
|
style: { height: "156px" }
|
|
@@ -6531,40 +6559,40 @@ function So(t, n, u, d, f, p) {
|
|
|
6531
6559
|
_: 2
|
|
6532
6560
|
}, [t.formStatus === 2 ? void 0 : {
|
|
6533
6561
|
name: "footer",
|
|
6534
|
-
fn:
|
|
6562
|
+
fn: P(() => [o("div", Co, [t.isMobile ? i("", !0) : (x(), r(v, {
|
|
6535
6563
|
key: 0,
|
|
6536
6564
|
loading: t.spinShow,
|
|
6537
6565
|
type: "success",
|
|
6538
6566
|
class: "uz-drawer-button",
|
|
6539
6567
|
onClick: n[1] ||= (e) => t.ocrShow = !t.ocrShow
|
|
6540
6568
|
}, {
|
|
6541
|
-
default:
|
|
6569
|
+
default: P(() => [c(A(t.t("OCR.ocr")), 1)]),
|
|
6542
6570
|
_: 1
|
|
6543
|
-
}, 8, ["loading"])), o("div",
|
|
6571
|
+
}, 8, ["loading"])), o("div", wo, [
|
|
6544
6572
|
l(v, {
|
|
6545
6573
|
loading: t.spinShow,
|
|
6546
6574
|
class: "uz-drawer-button",
|
|
6547
6575
|
secondary: "",
|
|
6548
6576
|
onClick: t.drawerCheck
|
|
6549
6577
|
}, {
|
|
6550
|
-
default:
|
|
6578
|
+
default: P(() => [c(A(t.t("Common.cancel")), 1)]),
|
|
6551
6579
|
_: 1
|
|
6552
6580
|
}, 8, ["loading", "onClick"]),
|
|
6553
6581
|
t.formStatus === 0 ? (x(), r(y, {
|
|
6554
6582
|
key: 0,
|
|
6555
6583
|
trigger: "hover"
|
|
6556
6584
|
}, {
|
|
6557
|
-
trigger:
|
|
6585
|
+
trigger: P(() => [l(v, {
|
|
6558
6586
|
type: "success",
|
|
6559
6587
|
loading: t.spinShow,
|
|
6560
6588
|
class: "uz-drawer-button",
|
|
6561
6589
|
secondary: "",
|
|
6562
6590
|
onClick: t.doCacheToStore
|
|
6563
6591
|
}, {
|
|
6564
|
-
default:
|
|
6592
|
+
default: P(() => [c(A(t.t("Common.cache")), 1)]),
|
|
6565
6593
|
_: 1
|
|
6566
6594
|
}, 8, ["loading", "onClick"])]),
|
|
6567
|
-
default:
|
|
6595
|
+
default: P(() => [o("span", null, A(t.t("Table.cacheTip")), 1)]),
|
|
6568
6596
|
_: 1
|
|
6569
6597
|
})) : i("", !0),
|
|
6570
6598
|
l(v, {
|
|
@@ -6573,7 +6601,7 @@ function So(t, n, u, d, f, p) {
|
|
|
6573
6601
|
type: "primary",
|
|
6574
6602
|
onClick: t.drawerSubmit
|
|
6575
6603
|
}, {
|
|
6576
|
-
default:
|
|
6604
|
+
default: P(() => [c(A(t.t("Common.apply")), 1)]),
|
|
6577
6605
|
_: 1
|
|
6578
6606
|
}, 8, ["loading", "onClick"])
|
|
6579
6607
|
])])]),
|
|
@@ -6604,11 +6632,11 @@ function So(t, n, u, d, f, p) {
|
|
|
6604
6632
|
bottom: "0"
|
|
6605
6633
|
}
|
|
6606
6634
|
}, {
|
|
6607
|
-
default:
|
|
6635
|
+
default: P(() => [l(C)]),
|
|
6608
6636
|
_: 1
|
|
6609
6637
|
}, 8, ["show", "title"])], 64);
|
|
6610
6638
|
}
|
|
6611
|
-
var
|
|
6639
|
+
var Eo = /*#__PURE__*/ Q(bo, [["render", To]]), Do = d({
|
|
6612
6640
|
name: "UzTableMobileList",
|
|
6613
6641
|
props: {
|
|
6614
6642
|
tableData: {
|
|
@@ -6626,12 +6654,12 @@ var Co = /*#__PURE__*/ Q(_o, [["render", So]]), wo = d({
|
|
|
6626
6654
|
},
|
|
6627
6655
|
emits: ["update:row-keys"],
|
|
6628
6656
|
setup() {}
|
|
6629
|
-
}),
|
|
6657
|
+
}), Oo = { class: "uz-grid uz-grid-cols-2 uz-gap-2" }, ko = {
|
|
6630
6658
|
key: 1,
|
|
6631
6659
|
class: "uz-table-mobile-group-txt"
|
|
6632
6660
|
};
|
|
6633
|
-
function
|
|
6634
|
-
return x(), a("div",
|
|
6661
|
+
function Ao(t, n, s, c, l, u) {
|
|
6662
|
+
return x(), a("div", Oo, [(x(!0), a(e, null, T(t.tableColumns, (n) => (x(), a("div", {
|
|
6635
6663
|
key: n.key,
|
|
6636
6664
|
class: g(["uz-flex uz-overflow-hidden", n.lineBreak ? "uz-flex-col" : ""]),
|
|
6637
6665
|
style: _(`grid-column: span ${n.lineCol || 2} / span ${n.lineCol || 2}`)
|
|
@@ -6642,19 +6670,19 @@ function Do(t, n, s, c, l, u) {
|
|
|
6642
6670
|
class: "mobile"
|
|
6643
6671
|
})) : 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(() => {
|
|
6644
6672
|
if (t.tableData) return n.render(t.tableData, t.tableIndex);
|
|
6645
|
-
}), { key: 0 })) : (x(), a("div",
|
|
6673
|
+
}), { key: 0 })) : (x(), a("div", ko, A(t.tableData[n.key] || "-"), 1))], 2)], 64))], 6))), 128))]);
|
|
6646
6674
|
}
|
|
6647
6675
|
//#endregion
|
|
6648
6676
|
//#region components/table/mobile.vue?vue&type=script&lang.ts
|
|
6649
|
-
var
|
|
6677
|
+
var jo = d({
|
|
6650
6678
|
name: "UzTableMobile",
|
|
6651
6679
|
components: {
|
|
6652
|
-
NCheckbox:
|
|
6653
|
-
NRadio:
|
|
6654
|
-
NPagination:
|
|
6655
|
-
NCheckboxGroup:
|
|
6656
|
-
NRadioGroup:
|
|
6657
|
-
UzTableMobileList: /* @__PURE__ */ Q(
|
|
6680
|
+
NCheckbox: re,
|
|
6681
|
+
NRadio: De,
|
|
6682
|
+
NPagination: we,
|
|
6683
|
+
NCheckboxGroup: ie,
|
|
6684
|
+
NRadioGroup: Oe,
|
|
6685
|
+
UzTableMobileList: /* @__PURE__ */ Q(Do, [["render", Ao], ["__scopeId", "data-v-84c394fe"]])
|
|
6658
6686
|
},
|
|
6659
6687
|
props: {
|
|
6660
6688
|
tableData: {
|
|
@@ -6701,17 +6729,17 @@ var Oo = d({
|
|
|
6701
6729
|
}
|
|
6702
6730
|
};
|
|
6703
6731
|
}
|
|
6704
|
-
}),
|
|
6732
|
+
}), Mo = {
|
|
6705
6733
|
key: 0,
|
|
6706
6734
|
class: "uz-flex uz-justify-center uz-text-center uz-pb-4"
|
|
6707
|
-
},
|
|
6735
|
+
}, No = {
|
|
6708
6736
|
key: 0,
|
|
6709
6737
|
class: "uz-flex uz-justify-center uz-text-center uz-pb-4"
|
|
6710
|
-
},
|
|
6738
|
+
}, Po = {
|
|
6711
6739
|
key: 0,
|
|
6712
6740
|
class: "uz-flex uz-justify-center uz-text-center uz-pb-4"
|
|
6713
6741
|
};
|
|
6714
|
-
function
|
|
6742
|
+
function Fo(t, n, o, s, c, u) {
|
|
6715
6743
|
let d = D("UzTableMobileList"), f = D("NCheckbox"), p = D("NPagination"), m = D("NCheckboxGroup"), h = D("NRadio"), g = D("NRadioGroup");
|
|
6716
6744
|
return t.selection === 2 ? (x(), r(m, {
|
|
6717
6745
|
key: 0,
|
|
@@ -6723,12 +6751,12 @@ function Mo(t, n, o, s, c, u) {
|
|
|
6723
6751
|
maxHeight: t.maxH
|
|
6724
6752
|
})
|
|
6725
6753
|
}, {
|
|
6726
|
-
default:
|
|
6754
|
+
default: P(() => [(x(!0), a(e, null, T(t.tableData, (e, n) => (x(), r(f, {
|
|
6727
6755
|
key: e.id,
|
|
6728
6756
|
class: "uz-com-card uz-flex uz-gap-2",
|
|
6729
6757
|
value: e.id
|
|
6730
6758
|
}, {
|
|
6731
|
-
default:
|
|
6759
|
+
default: P(() => [l(d, {
|
|
6732
6760
|
tableData: e,
|
|
6733
6761
|
tableIndex: n,
|
|
6734
6762
|
tableColumns: t.tableColumns
|
|
@@ -6738,7 +6766,7 @@ function Mo(t, n, o, s, c, u) {
|
|
|
6738
6766
|
"tableColumns"
|
|
6739
6767
|
])]),
|
|
6740
6768
|
_: 2
|
|
6741
|
-
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div",
|
|
6769
|
+
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div", Mo, [l(p, {
|
|
6742
6770
|
page: t.tableQueries.query.page,
|
|
6743
6771
|
"onUpdate:page": [n[0] ||= (e) => t.tableQueries.query.page = e, t.pageChange],
|
|
6744
6772
|
"item-count": t.tableQueries.query.itemCount,
|
|
@@ -6765,12 +6793,12 @@ function Mo(t, n, o, s, c, u) {
|
|
|
6765
6793
|
maxHeight: t.maxH
|
|
6766
6794
|
})
|
|
6767
6795
|
}, {
|
|
6768
|
-
default:
|
|
6796
|
+
default: P(() => [(x(!0), a(e, null, T(t.tableData, (e, n) => (x(), r(h, {
|
|
6769
6797
|
key: e.id,
|
|
6770
6798
|
class: "uz-com-card uz-flex uz-gap-2",
|
|
6771
6799
|
value: e.id
|
|
6772
6800
|
}, {
|
|
6773
|
-
default:
|
|
6801
|
+
default: P(() => [l(d, {
|
|
6774
6802
|
tableData: e,
|
|
6775
6803
|
tableIndex: n,
|
|
6776
6804
|
tableColumns: t.tableColumns
|
|
@@ -6780,7 +6808,7 @@ function Mo(t, n, o, s, c, u) {
|
|
|
6780
6808
|
"tableColumns"
|
|
6781
6809
|
])]),
|
|
6782
6810
|
_: 2
|
|
6783
|
-
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div",
|
|
6811
|
+
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div", No, [l(p, {
|
|
6784
6812
|
page: t.tableQueries.query.page,
|
|
6785
6813
|
"onUpdate:page": [n[2] ||= (e) => t.tableQueries.query.page = e, t.pageChange],
|
|
6786
6814
|
"item-count": t.tableQueries.query.itemCount,
|
|
@@ -6815,7 +6843,7 @@ function Mo(t, n, o, s, c, u) {
|
|
|
6815
6843
|
"tableData",
|
|
6816
6844
|
"tableIndex",
|
|
6817
6845
|
"tableColumns"
|
|
6818
|
-
])]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div",
|
|
6846
|
+
])]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div", Po, [l(p, {
|
|
6819
6847
|
page: t.tableQueries.query.page,
|
|
6820
6848
|
"onUpdate:page": [n[4] ||= (e) => t.tableQueries.query.page = e, t.pageChange],
|
|
6821
6849
|
"item-count": t.tableQueries.query.itemCount,
|
|
@@ -6828,17 +6856,17 @@ function Mo(t, n, o, s, c, u) {
|
|
|
6828
6856
|
"onUpdate:page"
|
|
6829
6857
|
])])) : i("", !0)], 4));
|
|
6830
6858
|
}
|
|
6831
|
-
var
|
|
6859
|
+
var Io = /*#__PURE__*/ Q(jo, [["render", Fo], ["__scopeId", "data-v-70b54e3b"]]), Lo = d({
|
|
6832
6860
|
name: "UzTableFile",
|
|
6833
6861
|
components: {
|
|
6834
6862
|
UzIcon: qt,
|
|
6835
|
-
NDropdown:
|
|
6836
|
-
NButton:
|
|
6837
|
-
NModal:
|
|
6838
|
-
NUpload:
|
|
6839
|
-
NSpace:
|
|
6840
|
-
NIcon:
|
|
6841
|
-
NDataTable:
|
|
6863
|
+
NDropdown: de,
|
|
6864
|
+
NButton: L,
|
|
6865
|
+
NModal: Ce,
|
|
6866
|
+
NUpload: Re,
|
|
6867
|
+
NSpace: je,
|
|
6868
|
+
NIcon: V,
|
|
6869
|
+
NDataTable: oe
|
|
6842
6870
|
},
|
|
6843
6871
|
props: {
|
|
6844
6872
|
query: {
|
|
@@ -6854,14 +6882,14 @@ var No = /*#__PURE__*/ Q(Oo, [["render", Mo], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
6854
6882
|
},
|
|
6855
6883
|
emits: ["on-update:change"],
|
|
6856
6884
|
setup(e, { emit: t }) {
|
|
6857
|
-
let { t: n } =
|
|
6885
|
+
let { t: n } = U(), r = Je(), i = He(), a = w(!1), o = w(!1), s = w(!1), c = w([]), l = w(new FormData()), u = w([{
|
|
6858
6886
|
label: n("Common.import"),
|
|
6859
6887
|
key: "import",
|
|
6860
|
-
icon: () => f(
|
|
6888
|
+
icon: () => f(V, null, { default: () => f(qt, { icon: "CloudUpload" }) })
|
|
6861
6889
|
}, {
|
|
6862
6890
|
label: n("Common.export"),
|
|
6863
6891
|
key: "export",
|
|
6864
|
-
icon: () => f(
|
|
6892
|
+
icon: () => f(V, null, { default: () => f(qt, { icon: "CloudDownload" }) })
|
|
6865
6893
|
}]), d = w([
|
|
6866
6894
|
{
|
|
6867
6895
|
title: n("Common.fileName"),
|
|
@@ -6887,7 +6915,7 @@ var No = /*#__PURE__*/ Q(Oo, [["render", Mo], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
6887
6915
|
key: "action",
|
|
6888
6916
|
align: "center",
|
|
6889
6917
|
render(e) {
|
|
6890
|
-
return f(
|
|
6918
|
+
return f(L, {
|
|
6891
6919
|
tertiary: !0,
|
|
6892
6920
|
onClick: () => {
|
|
6893
6921
|
window.open(e.cosUrl);
|
|
@@ -6967,23 +6995,23 @@ var No = /*#__PURE__*/ Q(Oo, [["render", Mo], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
6967
6995
|
}
|
|
6968
6996
|
};
|
|
6969
6997
|
}
|
|
6970
|
-
}),
|
|
6998
|
+
}), Ro = { class: "uz-file-port-modal" }, zo = { class: "uz-file-port-card" }, Bo = { class: "uz-file-port-subtitle" }, Vo = {
|
|
6971
6999
|
key: 1,
|
|
6972
7000
|
class: "uz-file-port-panel"
|
|
6973
|
-
},
|
|
6974
|
-
function
|
|
7001
|
+
}, Ho = { class: "uz-file-port-subtitle" }, Uo = { class: "uz-flex uz-justify-between" }, Wo = { class: "uz-com-title" };
|
|
7002
|
+
function Go(t, n, i, s, u, d) {
|
|
6975
7003
|
let f = D("UzIcon"), p = D("NIcon"), m = D("NButton"), h = D("NDropdown"), g = D("NUpload"), _ = D("NSpace"), v = D("NDataTable"), y = D("NModal");
|
|
6976
7004
|
return x(), a(e, null, [l(h, {
|
|
6977
7005
|
trigger: "hover",
|
|
6978
7006
|
options: t.dropOption,
|
|
6979
7007
|
onSelect: t.dropSelect
|
|
6980
7008
|
}, {
|
|
6981
|
-
default:
|
|
6982
|
-
icon:
|
|
6983
|
-
default:
|
|
7009
|
+
default: P(() => [l(m, { secondary: "" }, {
|
|
7010
|
+
icon: P(() => [l(p, null, {
|
|
7011
|
+
default: P(() => [l(f, { icon: "ClipboardText" })]),
|
|
6984
7012
|
_: 1
|
|
6985
7013
|
})]),
|
|
6986
|
-
default:
|
|
7014
|
+
default: P(() => [c(" " + A(t.t("Common.file")), 1)]),
|
|
6987
7015
|
_: 1
|
|
6988
7016
|
})]),
|
|
6989
7017
|
_: 1
|
|
@@ -6998,16 +7026,16 @@ function Ho(t, n, i, s, u, d) {
|
|
|
6998
7026
|
"auto-focus": !1,
|
|
6999
7027
|
"on-after-leave": t.modalLeave
|
|
7000
7028
|
}, {
|
|
7001
|
-
"header-extra":
|
|
7029
|
+
"header-extra": P(() => [l(m, {
|
|
7002
7030
|
type: "success",
|
|
7003
7031
|
onClick: t.downloadTemplate,
|
|
7004
7032
|
secondary: ""
|
|
7005
7033
|
}, {
|
|
7006
|
-
default:
|
|
7034
|
+
default: P(() => [c(A(t.t("File.downloadTemplate")), 1)]),
|
|
7007
7035
|
_: 1
|
|
7008
7036
|
}, 8, ["onClick"])]),
|
|
7009
|
-
default:
|
|
7010
|
-
t.rawFile ? (x(), a("div",
|
|
7037
|
+
default: P(() => [o("div", Ro, [
|
|
7038
|
+
t.rawFile ? (x(), a("div", Vo, [
|
|
7011
7039
|
n[2] ||= o("div", { class: "uz-file-port-icon" }, [o("svg", {
|
|
7012
7040
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7013
7041
|
viewBox: "0 0 24 24",
|
|
@@ -7016,15 +7044,15 @@ function Ho(t, n, i, s, u, d) {
|
|
|
7016
7044
|
fill: "currentColor"
|
|
7017
7045
|
}, [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),
|
|
7018
7046
|
o("div", null, A(t.rawFileName.join(",")), 1),
|
|
7019
|
-
o("div",
|
|
7047
|
+
o("div", Ho, A(t.t("File.importWaitTip")), 1),
|
|
7020
7048
|
l(_, { justify: "space-between" }, {
|
|
7021
|
-
default:
|
|
7049
|
+
default: P(() => [l(m, {
|
|
7022
7050
|
size: "small",
|
|
7023
7051
|
secondary: "",
|
|
7024
7052
|
type: "default",
|
|
7025
7053
|
onClick: t.clearFile
|
|
7026
7054
|
}, {
|
|
7027
|
-
default:
|
|
7055
|
+
default: P(() => [c(A(t.t("Common.selectAgain")), 1)]),
|
|
7028
7056
|
_: 1
|
|
7029
7057
|
}, 8, ["onClick"]), l(m, {
|
|
7030
7058
|
size: "small",
|
|
@@ -7032,7 +7060,7 @@ function Ho(t, n, i, s, u, d) {
|
|
|
7032
7060
|
loading: t.loading,
|
|
7033
7061
|
onClick: t.manualImport
|
|
7034
7062
|
}, {
|
|
7035
|
-
default:
|
|
7063
|
+
default: P(() => [c(A(t.t("File.startImport")), 1)]),
|
|
7036
7064
|
_: 1
|
|
7037
7065
|
}, 8, ["loading", "onClick"])]),
|
|
7038
7066
|
_: 1
|
|
@@ -7046,21 +7074,21 @@ function Ho(t, n, i, s, u, d) {
|
|
|
7046
7074
|
multiple: "",
|
|
7047
7075
|
class: "uz-w-full"
|
|
7048
7076
|
}, {
|
|
7049
|
-
default:
|
|
7077
|
+
default: P(() => [o("div", zo, [n[1] ||= o("div", { class: "uz-file-port-icon" }, [o("svg", {
|
|
7050
7078
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7051
7079
|
viewBox: "0 0 24 24",
|
|
7052
7080
|
width: "40",
|
|
7053
7081
|
height: "40",
|
|
7054
7082
|
fill: "currentColor"
|
|
7055
|
-
}, [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",
|
|
7083
|
+
}, [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", Bo, A(t.t("File.uploadExcelTip")), 1)])]),
|
|
7056
7084
|
_: 1
|
|
7057
7085
|
}, 8, ["on-before-upload"])),
|
|
7058
|
-
o("div",
|
|
7086
|
+
o("div", Uo, [o("div", Wo, A(t.t("File.importHistory")), 1), l(m, {
|
|
7059
7087
|
onClick: t.init,
|
|
7060
7088
|
loading: t.loading,
|
|
7061
7089
|
secondary: ""
|
|
7062
7090
|
}, {
|
|
7063
|
-
default:
|
|
7091
|
+
default: P(() => [c(A(t.t("Common.refresh")), 1)]),
|
|
7064
7092
|
_: 1
|
|
7065
7093
|
}, 8, ["onClick", "loading"])]),
|
|
7066
7094
|
l(v, {
|
|
@@ -7082,7 +7110,7 @@ function Ho(t, n, i, s, u, d) {
|
|
|
7082
7110
|
"on-after-leave"
|
|
7083
7111
|
])], 64);
|
|
7084
7112
|
}
|
|
7085
|
-
var
|
|
7113
|
+
var Ko = /*#__PURE__*/ Q(Lo, [["render", Go], ["__scopeId", "data-v-d8e581ec"]]), $ = C({
|
|
7086
7114
|
page: {
|
|
7087
7115
|
label: G.global.t("Common.home"),
|
|
7088
7116
|
key: "/",
|
|
@@ -7093,7 +7121,7 @@ var Uo = /*#__PURE__*/ Q(Po, [["render", Ho], ["__scopeId", "data-v-d8e581ec"]])
|
|
|
7093
7121
|
active: "/",
|
|
7094
7122
|
thumbnail: []
|
|
7095
7123
|
});
|
|
7096
|
-
function
|
|
7124
|
+
function qo(e) {
|
|
7097
7125
|
$.cache = e.cache, $.page = {
|
|
7098
7126
|
label: e.label,
|
|
7099
7127
|
key: e.key,
|
|
@@ -7108,14 +7136,14 @@ function Wo(e) {
|
|
|
7108
7136
|
closable: !1
|
|
7109
7137
|
}];
|
|
7110
7138
|
}
|
|
7111
|
-
function
|
|
7139
|
+
function Jo(e) {
|
|
7112
7140
|
$.active = e, Jt.push(e), q($.cache, $, 0);
|
|
7113
7141
|
}
|
|
7114
|
-
function
|
|
7142
|
+
function Yo(e, t) {
|
|
7115
7143
|
let n = $.thumbnail.find((t) => t.key === e);
|
|
7116
7144
|
n && (n.key = t, $.active = t, q($.cache, $, 0));
|
|
7117
7145
|
}
|
|
7118
|
-
function
|
|
7146
|
+
function Xo(e) {
|
|
7119
7147
|
let t = $.thumbnail.find((t) => t.path === e.key);
|
|
7120
7148
|
t ? ($.active = t.key, q($.cache, $, 0), Jt.push(t.key)) : ($.active = e.key, $.thumbnail.push({
|
|
7121
7149
|
...e,
|
|
@@ -7123,7 +7151,7 @@ function qo(e) {
|
|
|
7123
7151
|
closable: !0
|
|
7124
7152
|
}), Jt.push(e.key));
|
|
7125
7153
|
}
|
|
7126
|
-
function
|
|
7154
|
+
function Zo(e) {
|
|
7127
7155
|
let t = $.thumbnail.findIndex((t) => t.key === e);
|
|
7128
7156
|
if ($.thumbnail.splice(t, 1), $.active === e) {
|
|
7129
7157
|
let e = $.thumbnail[t - 1]?.key || "";
|
|
@@ -7131,20 +7159,20 @@ function Jo(e) {
|
|
|
7131
7159
|
}
|
|
7132
7160
|
q($.cache, $, 0);
|
|
7133
7161
|
}
|
|
7134
|
-
function
|
|
7162
|
+
function Qo() {
|
|
7135
7163
|
$.active = $.page.path, $.thumbnail = [$.page], Jt.push($.page.path), q($.cache, $, 0);
|
|
7136
7164
|
}
|
|
7137
7165
|
//#endregion
|
|
7138
7166
|
//#region components/thumbnail/index.vue?vue&type=script&lang.ts
|
|
7139
|
-
var
|
|
7167
|
+
var $o = d({
|
|
7140
7168
|
name: "UzThumbnail",
|
|
7141
7169
|
components: {
|
|
7142
|
-
NTabs:
|
|
7143
|
-
NTabPane:
|
|
7144
|
-
NButton:
|
|
7145
|
-
NIcon:
|
|
7146
|
-
NPopconfirm:
|
|
7147
|
-
NFlex:
|
|
7170
|
+
NTabs: Fe,
|
|
7171
|
+
NTabPane: Pe,
|
|
7172
|
+
NButton: L,
|
|
7173
|
+
NIcon: V,
|
|
7174
|
+
NPopconfirm: Te,
|
|
7175
|
+
NFlex: B
|
|
7148
7176
|
},
|
|
7149
7177
|
props: { option: {
|
|
7150
7178
|
type: Object,
|
|
@@ -7155,32 +7183,32 @@ var Xo = d({
|
|
|
7155
7183
|
})
|
|
7156
7184
|
} },
|
|
7157
7185
|
setup(e, { slots: t }) {
|
|
7158
|
-
let { t: n } =
|
|
7186
|
+
let { t: n } = U(), r = w(!!t.prefix), i = Je();
|
|
7159
7187
|
return y(() => {
|
|
7160
|
-
|
|
7161
|
-
}),
|
|
7162
|
-
$.active === i.path &&
|
|
7163
|
-
}, { deep: !0 }),
|
|
7164
|
-
|
|
7188
|
+
qo(e.option), $.active !== i.path && Yo(i.path, i.fullPath);
|
|
7189
|
+
}), M(() => i, (e) => {
|
|
7190
|
+
$.active === i.path && Yo(e.path, e.fullPath);
|
|
7191
|
+
}, { deep: !0 }), M(() => e.option, (e) => {
|
|
7192
|
+
qo(e);
|
|
7165
7193
|
}, { deep: !0 }), {
|
|
7166
7194
|
t: n,
|
|
7167
7195
|
thumbnailStore: $,
|
|
7168
7196
|
isSlotPrefix: r,
|
|
7169
7197
|
handleClose: (e) => {
|
|
7170
|
-
|
|
7198
|
+
Zo(e);
|
|
7171
7199
|
},
|
|
7172
7200
|
handleChange: (e) => {
|
|
7173
|
-
|
|
7201
|
+
Jo(e);
|
|
7174
7202
|
},
|
|
7175
7203
|
handleClear: () => {
|
|
7176
|
-
|
|
7204
|
+
Qo();
|
|
7177
7205
|
}
|
|
7178
7206
|
};
|
|
7179
7207
|
}
|
|
7180
7208
|
});
|
|
7181
7209
|
//#endregion
|
|
7182
7210
|
//#region components/thumbnail/index.vue
|
|
7183
|
-
function
|
|
7211
|
+
function es(t, n, i, o, u, d) {
|
|
7184
7212
|
let f = D("NTabPane"), p = D("UzIcon"), m = D("NIcon"), h = D("NButton"), g = D("NPopconfirm"), _ = D("NFlex"), v = D("NTabs");
|
|
7185
7213
|
return x(), r(v, {
|
|
7186
7214
|
value: t.thumbnailStore.active,
|
|
@@ -7191,27 +7219,27 @@ function Zo(t, n, i, o, u, d) {
|
|
|
7191
7219
|
"on-update:value": t.handleChange,
|
|
7192
7220
|
class: "uz-thumbnail"
|
|
7193
7221
|
}, s({
|
|
7194
|
-
suffix:
|
|
7195
|
-
default:
|
|
7196
|
-
trigger:
|
|
7197
|
-
default:
|
|
7198
|
-
default:
|
|
7222
|
+
suffix: P(() => [l(_, null, {
|
|
7223
|
+
default: P(() => [l(g, { onPositiveClick: t.handleClear }, {
|
|
7224
|
+
trigger: P(() => [l(h, { class: "uz-button-glass" }, {
|
|
7225
|
+
default: P(() => [l(m, { color: "#e65444" }, {
|
|
7226
|
+
default: P(() => [l(p, { icon: "Trash" })]),
|
|
7199
7227
|
_: 1
|
|
7200
7228
|
})]),
|
|
7201
7229
|
_: 1
|
|
7202
7230
|
})]),
|
|
7203
|
-
default:
|
|
7231
|
+
default: P(() => [c(" " + A(t.t("Thumbnail.clearConfirm")), 1)]),
|
|
7204
7232
|
_: 1
|
|
7205
7233
|
}, 8, ["onPositiveClick"]), E(t.$slots, "suffix")]),
|
|
7206
7234
|
_: 3
|
|
7207
7235
|
})]),
|
|
7208
|
-
default:
|
|
7236
|
+
default: P(() => [(x(!0), a(e, null, T(t.thumbnailStore.thumbnail, (e) => (x(), r(f, {
|
|
7209
7237
|
key: e.key,
|
|
7210
7238
|
name: e.key,
|
|
7211
7239
|
tab: e.label,
|
|
7212
7240
|
closable: e.closable
|
|
7213
7241
|
}, {
|
|
7214
|
-
default:
|
|
7242
|
+
default: P(() => [c(A(e.label), 1)]),
|
|
7215
7243
|
_: 2
|
|
7216
7244
|
}, 1032, [
|
|
7217
7245
|
"name",
|
|
@@ -7221,7 +7249,7 @@ function Zo(t, n, i, o, u, d) {
|
|
|
7221
7249
|
_: 2
|
|
7222
7250
|
}, [t.isSlotPrefix ? {
|
|
7223
7251
|
name: "prefix",
|
|
7224
|
-
fn:
|
|
7252
|
+
fn: P(() => [E(t.$slots, "prefix")]),
|
|
7225
7253
|
key: "0"
|
|
7226
7254
|
} : void 0]), 1032, [
|
|
7227
7255
|
"value",
|
|
@@ -7229,33 +7257,33 @@ function Zo(t, n, i, o, u, d) {
|
|
|
7229
7257
|
"on-update:value"
|
|
7230
7258
|
]);
|
|
7231
7259
|
}
|
|
7232
|
-
var
|
|
7233
|
-
|
|
7234
|
-
var
|
|
7260
|
+
var ts = /*#__PURE__*/ Q($o, [["render", es]]), ns = "#007AFF", rs = "#0A84FF", is = "#FF9500", as = "#FF9F0A", os = "#28CD41", ss = "#32D74B", cs = "#FFCC00", ls = "#FFD60A", us = "#FF3B30", ds = "#FF453A";
|
|
7261
|
+
H.common.cardColor = "#32323b", H.common.primaryColor = "#0A84FF", H.common.primaryColorHover = rs, H.common.infoColor = "#FF9F0A", H.common.infoColorHover = as, H.common.successColor = "#32D74B", H.common.successColorHover = ss, H.common.warningColor = "#FFD60A", H.common.successColorHover = ls, H.common.errorColor = "#FF453A", H.common.errorColorHover = ds, H.common.borderRadius = "var(--borderRadius)", H.common.inputColor = "rgba(var(--input))", H.common.borderColor = "rgba(var(--border), 0.7)", H.DataTable.tdColor = "#2d2d31", H.Scrollbar.width = "8px", H.Scrollbar.height = "8px", H.Scrollbar.borderRadius = "8px", H.Scrollbar.color = "#686873";
|
|
7262
|
+
var fs = {
|
|
7235
7263
|
common: {
|
|
7236
7264
|
inputColor: "rgba(var(--input))",
|
|
7237
7265
|
borderColor: "rgba(var(--border), 0.7)",
|
|
7238
7266
|
borderRadius: "var(--borderRadius)",
|
|
7239
|
-
primaryColor:
|
|
7240
|
-
primaryColorHover:
|
|
7241
|
-
primaryColorPressed:
|
|
7242
|
-
primaryColorSuppl:
|
|
7243
|
-
infoColor:
|
|
7244
|
-
infoColorHover:
|
|
7245
|
-
infoColorPressed:
|
|
7246
|
-
infoColorSuppl:
|
|
7247
|
-
successColor:
|
|
7248
|
-
successColorHover:
|
|
7249
|
-
successColorPressed:
|
|
7250
|
-
successColorSuppl:
|
|
7251
|
-
warningColor:
|
|
7252
|
-
warningColorHover:
|
|
7253
|
-
warningColorPressed:
|
|
7254
|
-
warningColorSuppl:
|
|
7255
|
-
errorColor:
|
|
7256
|
-
errorColorHover:
|
|
7257
|
-
errorColorPressed:
|
|
7258
|
-
errorColorSuppl:
|
|
7267
|
+
primaryColor: ns,
|
|
7268
|
+
primaryColorHover: rs,
|
|
7269
|
+
primaryColorPressed: ns,
|
|
7270
|
+
primaryColorSuppl: ns,
|
|
7271
|
+
infoColor: is,
|
|
7272
|
+
infoColorHover: as,
|
|
7273
|
+
infoColorPressed: is,
|
|
7274
|
+
infoColorSuppl: is,
|
|
7275
|
+
successColor: os,
|
|
7276
|
+
successColorHover: ss,
|
|
7277
|
+
successColorPressed: os,
|
|
7278
|
+
successColorSuppl: os,
|
|
7279
|
+
warningColor: cs,
|
|
7280
|
+
warningColorHover: ls,
|
|
7281
|
+
warningColorPressed: cs,
|
|
7282
|
+
warningColorSuppl: cs,
|
|
7283
|
+
errorColor: us,
|
|
7284
|
+
errorColorHover: ds,
|
|
7285
|
+
errorColorPressed: us,
|
|
7286
|
+
errorColorSuppl: us,
|
|
7259
7287
|
cardColor: "#fff"
|
|
7260
7288
|
},
|
|
7261
7289
|
Button: { textColor: "rgb(var(--font))" },
|
|
@@ -7269,22 +7297,22 @@ var ls = {
|
|
|
7269
7297
|
borderRadius: "8px",
|
|
7270
7298
|
color: "#c0c0c0"
|
|
7271
7299
|
}
|
|
7272
|
-
},
|
|
7300
|
+
}, ps = H, ms = d({
|
|
7273
7301
|
name: "UzWrap",
|
|
7274
|
-
components: { NConfigProvider:
|
|
7302
|
+
components: { NConfigProvider: ae },
|
|
7275
7303
|
setup() {
|
|
7276
7304
|
return {
|
|
7277
|
-
zhCN:
|
|
7278
|
-
dateZhCN:
|
|
7305
|
+
zhCN: Ue,
|
|
7306
|
+
dateZhCN: Ve,
|
|
7279
7307
|
commonStore: Y,
|
|
7280
|
-
lightTheme:
|
|
7281
|
-
darkTheme:
|
|
7308
|
+
lightTheme: fs,
|
|
7309
|
+
darkTheme: ps
|
|
7282
7310
|
};
|
|
7283
7311
|
}
|
|
7284
7312
|
});
|
|
7285
7313
|
//#endregion
|
|
7286
7314
|
//#region components/wrap/index.vue
|
|
7287
|
-
function
|
|
7315
|
+
function hs(e, t, n, i, a, o) {
|
|
7288
7316
|
let s = D("NConfigProvider");
|
|
7289
7317
|
return x(), r(s, {
|
|
7290
7318
|
theme: e.commonStore.theme ? { name: "darkTheme" } : null,
|
|
@@ -7294,7 +7322,7 @@ function fs(e, t, n, i, a, o) {
|
|
|
7294
7322
|
"inline-theme-disabled": "",
|
|
7295
7323
|
abstract: ""
|
|
7296
7324
|
}, {
|
|
7297
|
-
default:
|
|
7325
|
+
default: P(() => [E(e.$slots, "default")]),
|
|
7298
7326
|
_: 3
|
|
7299
7327
|
}, 8, [
|
|
7300
7328
|
"theme",
|
|
@@ -7303,10 +7331,10 @@ function fs(e, t, n, i, a, o) {
|
|
|
7303
7331
|
"date-locale"
|
|
7304
7332
|
]);
|
|
7305
7333
|
}
|
|
7306
|
-
var
|
|
7334
|
+
var gs = /*#__PURE__*/ Q(ms, [["render", hs]]);
|
|
7307
7335
|
//#endregion
|
|
7308
7336
|
//#region components/ocr/preprocess.ts
|
|
7309
|
-
function
|
|
7337
|
+
function _s(e) {
|
|
7310
7338
|
let t = /* @__PURE__ */ new Int32Array(256), n = e.length;
|
|
7311
7339
|
for (let r = 0; r < n; r++) t[e[r]]++;
|
|
7312
7340
|
let r = 0;
|
|
@@ -7321,7 +7349,7 @@ function ms(e) {
|
|
|
7321
7349
|
}
|
|
7322
7350
|
return c;
|
|
7323
7351
|
}
|
|
7324
|
-
function
|
|
7352
|
+
function vs(e, t) {
|
|
7325
7353
|
return new Promise((n, r) => {
|
|
7326
7354
|
let i = new Image();
|
|
7327
7355
|
i.crossOrigin = "anonymous", i.onload = () => {
|
|
@@ -7354,7 +7382,7 @@ function hs(e, t) {
|
|
|
7354
7382
|
}
|
|
7355
7383
|
let u = t.threshold;
|
|
7356
7384
|
if (t.binarize) {
|
|
7357
|
-
t.autoThreshold && (u =
|
|
7385
|
+
t.autoThreshold && (u = _s(l));
|
|
7358
7386
|
for (let e = 0, t = 0; e < s.length; e += 4, t++) {
|
|
7359
7387
|
let n = l[t] < u ? 0 : 255;
|
|
7360
7388
|
s[e] = n, s[e + 1] = n, s[e + 2] = n;
|
|
@@ -7377,19 +7405,19 @@ function hs(e, t) {
|
|
|
7377
7405
|
}
|
|
7378
7406
|
//#endregion
|
|
7379
7407
|
//#region components/ocr/index.vue?vue&type=script&lang.ts
|
|
7380
|
-
var
|
|
7408
|
+
var ys = d({
|
|
7381
7409
|
name: "UzOcr",
|
|
7382
7410
|
components: {
|
|
7383
|
-
NButton:
|
|
7384
|
-
NUpload:
|
|
7385
|
-
NSelect:
|
|
7386
|
-
NSwitch:
|
|
7387
|
-
NTabs:
|
|
7388
|
-
NTabPane:
|
|
7389
|
-
NSpace:
|
|
7411
|
+
NButton: L,
|
|
7412
|
+
NUpload: Re,
|
|
7413
|
+
NSelect: ke,
|
|
7414
|
+
NSwitch: Ne,
|
|
7415
|
+
NTabs: Fe,
|
|
7416
|
+
NTabPane: Pe,
|
|
7417
|
+
NSpace: je
|
|
7390
7418
|
},
|
|
7391
7419
|
setup() {
|
|
7392
|
-
let { t: e } =
|
|
7420
|
+
let { t: e } = U(), 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(() => [
|
|
7393
7421
|
{
|
|
7394
7422
|
label: e("OCR.scaleNone"),
|
|
7395
7423
|
value: 1
|
|
@@ -7414,7 +7442,7 @@ var gs = d({
|
|
|
7414
7442
|
tessedit_char_blacklist: "|"
|
|
7415
7443
|
}), a.value), v = async () => {
|
|
7416
7444
|
if (f.value) try {
|
|
7417
|
-
let e = await
|
|
7445
|
+
let e = await vs(f.value, {
|
|
7418
7446
|
enabled: o.value,
|
|
7419
7447
|
scale: s.value,
|
|
7420
7448
|
grayscale: !0,
|
|
@@ -7428,7 +7456,7 @@ var gs = d({
|
|
|
7428
7456
|
console.error("实时预处理失败", e);
|
|
7429
7457
|
}
|
|
7430
7458
|
};
|
|
7431
|
-
|
|
7459
|
+
M([
|
|
7432
7460
|
f,
|
|
7433
7461
|
o,
|
|
7434
7462
|
s,
|
|
@@ -7451,7 +7479,7 @@ var gs = d({
|
|
|
7451
7479
|
t.value = !0, r.value = e("OCR.analysis");
|
|
7452
7480
|
let a = n;
|
|
7453
7481
|
if (o.value || s.value > 1) try {
|
|
7454
|
-
let e = await
|
|
7482
|
+
let e = await vs(n, {
|
|
7455
7483
|
enabled: o.value,
|
|
7456
7484
|
scale: s.value,
|
|
7457
7485
|
grayscale: !0,
|
|
@@ -7513,49 +7541,49 @@ var gs = d({
|
|
|
7513
7541
|
t: e
|
|
7514
7542
|
};
|
|
7515
7543
|
}
|
|
7516
|
-
}),
|
|
7544
|
+
}), bs = { class: "uz-ocr" }, xs = { class: "uz-ocr-left-col" }, Ss = { class: "uz-ocr-upload-card" }, Cs = { class: "uz-ocr-upload-title" }, ws = { class: "uz-ocr-upload-subtitle" }, Ts = {
|
|
7517
7545
|
key: 1,
|
|
7518
7546
|
class: "uz-ocr-preview-panel"
|
|
7519
|
-
},
|
|
7547
|
+
}, Es = { class: "uz-ocr-preview-box" }, Ds = ["src"], Os = {
|
|
7520
7548
|
key: 0,
|
|
7521
7549
|
class: "uz-ocr-threshold-badge"
|
|
7522
|
-
},
|
|
7550
|
+
}, ks = { class: "uz-ocr-preview-box" }, As = ["src"], js = { class: "uz-ocr-settings-form" }, Ms = { class: "uz-settings-row" }, Ns = { class: "uz-settings-label" }, Ps = {
|
|
7523
7551
|
key: 0,
|
|
7524
7552
|
class: "uz-ocr-nested-settings animate-fade-in"
|
|
7525
|
-
},
|
|
7553
|
+
}, Fs = { class: "uz-settings-row" }, Is = { class: "uz-settings-label" }, Ls = { class: "uz-settings-row" }, Rs = { class: "uz-settings-label" }, zs = { class: "uz-ocr-right-col" }, Bs = { class: "uz-ocr-result-header" }, Vs = { class: "uz-result-title" }, Hs = {
|
|
7526
7554
|
key: 0,
|
|
7527
7555
|
class: "uz-ocr-empty-state"
|
|
7528
|
-
},
|
|
7556
|
+
}, Us = { class: "uz-empty-text" }, Ws = {
|
|
7529
7557
|
key: 1,
|
|
7530
7558
|
class: "uz-ocr-result-tabs"
|
|
7531
7559
|
};
|
|
7532
|
-
function
|
|
7560
|
+
function Gs(e, t, n, s, u, d) {
|
|
7533
7561
|
let f = D("NUpload"), p = D("NTabPane"), m = D("NTabs"), h = D("NButton"), g = D("NSpace"), _ = D("NSwitch"), v = D("NSelect");
|
|
7534
|
-
return x(), a("div",
|
|
7562
|
+
return x(), a("div", bs, [o("div", xs, [e.rawImage ? (x(), a("div", Ts, [l(m, {
|
|
7535
7563
|
value: e.imagePreviewTab,
|
|
7536
7564
|
"onUpdate:value": t[0] ||= (t) => e.imagePreviewTab = t,
|
|
7537
7565
|
type: "segment",
|
|
7538
7566
|
size: "small"
|
|
7539
7567
|
}, {
|
|
7540
|
-
default:
|
|
7568
|
+
default: P(() => [l(p, {
|
|
7541
7569
|
name: "processed",
|
|
7542
7570
|
tab: e.t("OCR.previewProcessed")
|
|
7543
7571
|
}, {
|
|
7544
|
-
default:
|
|
7572
|
+
default: P(() => [o("div", Es, [o("img", {
|
|
7545
7573
|
src: e.processedImage,
|
|
7546
7574
|
alt: "Processed Preview",
|
|
7547
7575
|
class: "uz-ocr-preview-img"
|
|
7548
|
-
}, null, 8,
|
|
7576
|
+
}, null, 8, Ds), e.preEnabled && e.preBinarize ? (x(), a("div", Os, A(e.preAutoThreshold ? e.t("OCR.autoThreshold") : e.t("OCR.manualThreshold")) + A(e.t("OCR.threshold")) + ": " + A(e.thresholdUsed), 1)) : i("", !0)])]),
|
|
7549
7577
|
_: 1
|
|
7550
7578
|
}, 8, ["tab"]), l(p, {
|
|
7551
7579
|
name: "raw",
|
|
7552
7580
|
tab: e.t("OCR.previewRaw")
|
|
7553
7581
|
}, {
|
|
7554
|
-
default:
|
|
7582
|
+
default: P(() => [o("div", ks, [o("img", {
|
|
7555
7583
|
src: e.rawImage,
|
|
7556
7584
|
alt: "Raw Preview",
|
|
7557
7585
|
class: "uz-ocr-preview-img"
|
|
7558
|
-
}, null, 8,
|
|
7586
|
+
}, null, 8, As)])]),
|
|
7559
7587
|
_: 1
|
|
7560
7588
|
}, 8, ["tab"])]),
|
|
7561
7589
|
_: 1
|
|
@@ -7563,13 +7591,13 @@ function Hs(e, t, n, s, u, d) {
|
|
|
7563
7591
|
justify: "space-between",
|
|
7564
7592
|
class: "uz-ocr-preview-actions"
|
|
7565
7593
|
}, {
|
|
7566
|
-
default:
|
|
7594
|
+
default: P(() => [l(h, {
|
|
7567
7595
|
size: "small",
|
|
7568
7596
|
secondary: "",
|
|
7569
7597
|
type: "warning",
|
|
7570
7598
|
onClick: e.clearImage
|
|
7571
7599
|
}, {
|
|
7572
|
-
default:
|
|
7600
|
+
default: P(() => [c(A(e.t("OCR.selectAgain")), 1)]),
|
|
7573
7601
|
_: 1
|
|
7574
7602
|
}, 8, ["onClick"]), l(h, {
|
|
7575
7603
|
size: "small",
|
|
@@ -7577,7 +7605,7 @@ function Hs(e, t, n, s, u, d) {
|
|
|
7577
7605
|
loading: e.ocrLoading,
|
|
7578
7606
|
onClick: e.handleManualOcr
|
|
7579
7607
|
}, {
|
|
7580
|
-
default:
|
|
7608
|
+
default: P(() => [c(A(e.t("OCR.reRecognize")), 1)]),
|
|
7581
7609
|
_: 1
|
|
7582
7610
|
}, 8, ["loading", "onClick"])]),
|
|
7583
7611
|
_: 1
|
|
@@ -7589,7 +7617,7 @@ function Hs(e, t, n, s, u, d) {
|
|
|
7589
7617
|
"directory-dnd": "",
|
|
7590
7618
|
class: "uz-w-full"
|
|
7591
7619
|
}, {
|
|
7592
|
-
default:
|
|
7620
|
+
default: P(() => [o("div", Ss, [
|
|
7593
7621
|
t[4] ||= o("div", { class: "uz-ocr-upload-icon" }, [o("svg", {
|
|
7594
7622
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7595
7623
|
viewBox: "0 0 24 24",
|
|
@@ -7597,32 +7625,32 @@ function Hs(e, t, n, s, u, d) {
|
|
|
7597
7625
|
height: "40",
|
|
7598
7626
|
fill: "currentColor"
|
|
7599
7627
|
}, [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),
|
|
7600
|
-
o("div",
|
|
7601
|
-
o("div",
|
|
7628
|
+
o("div", Cs, A(e.t("OCR.scan")), 1),
|
|
7629
|
+
o("div", ws, A(e.t("OCR.uploadTip")), 1)
|
|
7602
7630
|
])]),
|
|
7603
7631
|
_: 1
|
|
7604
|
-
}, 8, ["on-before-upload"])), o("div",
|
|
7632
|
+
}, 8, ["on-before-upload"])), o("div", js, [o("div", Ms, [o("span", Ns, A(e.t("OCR.preprocess")), 1), l(_, {
|
|
7605
7633
|
value: e.preEnabled,
|
|
7606
7634
|
"onUpdate:value": t[1] ||= (t) => e.preEnabled = t,
|
|
7607
7635
|
size: "small"
|
|
7608
|
-
}, null, 8, ["value"])]), e.preEnabled ? (x(), a("div",
|
|
7636
|
+
}, null, 8, ["value"])]), e.preEnabled ? (x(), a("div", Ps, [o("div", Fs, [o("span", Is, A(e.t("OCR.scale")), 1), l(v, {
|
|
7609
7637
|
value: e.preScale,
|
|
7610
7638
|
"onUpdate:value": t[2] ||= (t) => e.preScale = t,
|
|
7611
7639
|
options: e.scaleOptions,
|
|
7612
7640
|
size: "small",
|
|
7613
7641
|
class: "uz-settings-select"
|
|
7614
|
-
}, null, 8, ["value", "options"])]), o("div",
|
|
7642
|
+
}, null, 8, ["value", "options"])]), o("div", Ls, [o("span", Rs, A(e.t("OCR.contrast")), 1), l(_, {
|
|
7615
7643
|
value: e.preContrast,
|
|
7616
7644
|
"onUpdate:value": t[3] ||= (t) => e.preContrast = t,
|
|
7617
7645
|
size: "small"
|
|
7618
|
-
}, null, 8, ["value"])])])) : i("", !0)])]), o("div",
|
|
7646
|
+
}, null, 8, ["value"])])])) : i("", !0)])]), o("div", zs, [o("div", Bs, [o("span", Vs, A(e.t("OCR.result", { count: e.text.length })), 1)]), e.text.length ? (x(), a("div", Ws, A(e.fullText), 1)) : (x(), a("div", Hs, [t[5] ||= o("div", { class: "uz-empty-icon" }, "📝", -1), o("div", Us, A(e.ocrLoading ? e.t("OCR.reading") : e.t("OCR.empty")), 1)]))])]);
|
|
7619
7647
|
}
|
|
7620
|
-
var
|
|
7648
|
+
var Ks = /*#__PURE__*/ Q(ys, [["render", Gs], ["__scopeId", "data-v-1e757396"]]), qs = /* @__PURE__ */ lt({
|
|
7621
7649
|
UzActionButton: () => ut,
|
|
7622
7650
|
UzBack: () => xr,
|
|
7623
|
-
UzBom: () =>
|
|
7624
|
-
UzCamera: () =>
|
|
7625
|
-
UzCircle: () =>
|
|
7651
|
+
UzBom: () => ji,
|
|
7652
|
+
UzCamera: () => Sa,
|
|
7653
|
+
UzCircle: () => ha,
|
|
7626
7654
|
UzDraggableForm: () => Pr,
|
|
7627
7655
|
UzForm: () => kr,
|
|
7628
7656
|
UzFormItem: () => Tr,
|
|
@@ -7630,24 +7658,24 @@ var Us = /*#__PURE__*/ Q(gs, [["render", Hs], ["__scopeId", "data-v-1e757396"]])
|
|
|
7630
7658
|
UzFormItemTimesPicker: () => Jr,
|
|
7631
7659
|
UzFormItemUpload: () => Br,
|
|
7632
7660
|
UzIcon: () => qt,
|
|
7633
|
-
UzOcr: () =>
|
|
7634
|
-
UzSearchBar: () =>
|
|
7635
|
-
UzSearchMobileBar: () =>
|
|
7636
|
-
UzSpin: () =>
|
|
7637
|
-
UzTable: () =>
|
|
7638
|
-
UzTableChild: () =>
|
|
7639
|
-
UzTableDrawer: () =>
|
|
7640
|
-
UzTableFile: () =>
|
|
7641
|
-
UzTableMobile: () =>
|
|
7642
|
-
UzTableQuestChild: () =>
|
|
7643
|
-
UzThumbnail: () =>
|
|
7644
|
-
UzWrap: () =>
|
|
7661
|
+
UzOcr: () => Ks,
|
|
7662
|
+
UzSearchBar: () => Ma,
|
|
7663
|
+
UzSearchMobileBar: () => Ra,
|
|
7664
|
+
UzSpin: () => Va,
|
|
7665
|
+
UzTable: () => ro,
|
|
7666
|
+
UzTableChild: () => po,
|
|
7667
|
+
UzTableDrawer: () => Eo,
|
|
7668
|
+
UzTableFile: () => Ko,
|
|
7669
|
+
UzTableMobile: () => Io,
|
|
7670
|
+
UzTableQuestChild: () => yo,
|
|
7671
|
+
UzThumbnail: () => ts,
|
|
7672
|
+
UzWrap: () => gs,
|
|
7645
7673
|
commonStore: () => Y,
|
|
7646
7674
|
fnActionReduction: () => vr,
|
|
7647
7675
|
fnActionSimplify: () => _r,
|
|
7648
|
-
fnAddThumbnail: () =>
|
|
7649
|
-
fnClearAllThumbnail: () =>
|
|
7650
|
-
fnDeleteThumbnail: () =>
|
|
7676
|
+
fnAddThumbnail: () => Xo,
|
|
7677
|
+
fnClearAllThumbnail: () => Qo,
|
|
7678
|
+
fnDeleteThumbnail: () => Zo,
|
|
7651
7679
|
fnGetTableData: () => hi,
|
|
7652
7680
|
fnOptionReduction: () => xi,
|
|
7653
7681
|
fnOptionSimplify: () => bi,
|
|
@@ -7656,18 +7684,18 @@ var Us = /*#__PURE__*/ Q(gs, [["render", Hs], ["__scopeId", "data-v-1e757396"]])
|
|
|
7656
7684
|
fnRenderAction: () => ur,
|
|
7657
7685
|
fnSetLang: () => Ht,
|
|
7658
7686
|
fnSetTheme: () => Ut,
|
|
7659
|
-
fnSetThumbnail: () =>
|
|
7687
|
+
fnSetThumbnail: () => Jo,
|
|
7660
7688
|
fnTableReduction: () => _i,
|
|
7661
7689
|
fnTableSimplify: () => gi,
|
|
7662
7690
|
fnTriggersReduction: () => yi,
|
|
7663
7691
|
fnTriggersSimplify: () => vi,
|
|
7664
7692
|
i18n: () => G
|
|
7665
|
-
}),
|
|
7666
|
-
function
|
|
7667
|
-
|
|
7693
|
+
}), Js = 3840, Ys = 2160, Xs = C({ scale: 1 });
|
|
7694
|
+
function Zs(e, t) {
|
|
7695
|
+
Js = e, Ys = t;
|
|
7668
7696
|
}
|
|
7669
|
-
function
|
|
7670
|
-
let e = 1, t = window.innerWidth, n = window.innerHeight, r =
|
|
7697
|
+
function Qs() {
|
|
7698
|
+
let e = 1, t = window.innerWidth, n = window.innerHeight, r = Js, i = Ys, a = parseFloat((r / i).toFixed(5));
|
|
7671
7699
|
if (parseFloat((t / n).toFixed(5)) > a) {
|
|
7672
7700
|
let t = parseFloat((n * a / r).toFixed(5));
|
|
7673
7701
|
e = t > 1 ? 1 : t;
|
|
@@ -7675,18 +7703,18 @@ function Ys() {
|
|
|
7675
7703
|
let n = parseFloat((t / a / i).toFixed(5));
|
|
7676
7704
|
e = n > 1 ? 1 : n;
|
|
7677
7705
|
}
|
|
7678
|
-
|
|
7706
|
+
Xs.scale = e;
|
|
7679
7707
|
}
|
|
7680
|
-
function
|
|
7681
|
-
let e =
|
|
7708
|
+
function $s() {
|
|
7709
|
+
let e = Ze(Qs, 200);
|
|
7682
7710
|
return e(), window.addEventListener("resize", e), () => {
|
|
7683
|
-
|
|
7711
|
+
Js = 3840, Ys = 2160, window.removeEventListener("resize", e);
|
|
7684
7712
|
};
|
|
7685
7713
|
}
|
|
7686
7714
|
//#endregion
|
|
7687
7715
|
//#region components/hooks/useThrottleFn.ts
|
|
7688
|
-
function
|
|
7689
|
-
let r = w(e), i = n(() =>
|
|
7716
|
+
function ec(e, t = 1e3) {
|
|
7717
|
+
let r = w(e), i = n(() => Qe((...e) => r.value([...e]), t));
|
|
7690
7718
|
return b(() => {
|
|
7691
7719
|
i.value.cancel();
|
|
7692
7720
|
}), {
|
|
@@ -7697,14 +7725,14 @@ function Zs(e, t = 1e3) {
|
|
|
7697
7725
|
}
|
|
7698
7726
|
//#endregion
|
|
7699
7727
|
//#region components/hooks/useLocalStorage.ts
|
|
7700
|
-
function
|
|
7728
|
+
function tc(e, t) {
|
|
7701
7729
|
return [w(J(e, t?.defaultValue)), (n) => {
|
|
7702
7730
|
n === void 0 ? Et(e) : q(e, n, t?.expired || "1 Day");
|
|
7703
7731
|
}];
|
|
7704
7732
|
}
|
|
7705
7733
|
//#endregion
|
|
7706
7734
|
//#region components/hooks/useQuery.ts
|
|
7707
|
-
function
|
|
7735
|
+
function nc(e, t, n) {
|
|
7708
7736
|
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 = () => {
|
|
7709
7737
|
Un(), clearInterval(o.value), o.value = null;
|
|
7710
7738
|
}, p = async () => {
|
|
@@ -7770,26 +7798,26 @@ function $s(e, t, n) {
|
|
|
7770
7798
|
}
|
|
7771
7799
|
//#endregion
|
|
7772
7800
|
//#region package.json
|
|
7773
|
-
var
|
|
7774
|
-
async function
|
|
7801
|
+
var rc = "0.1.131", ic;
|
|
7802
|
+
async function ac() {
|
|
7775
7803
|
let e = await fetch(`${window.location.protocol}//${window.location.host}`, {
|
|
7776
7804
|
method: "HEAD",
|
|
7777
7805
|
cache: "no-cache"
|
|
7778
7806
|
});
|
|
7779
7807
|
return e.headers.get("etag") || e.headers.get("last-modified");
|
|
7780
7808
|
}
|
|
7781
|
-
async function
|
|
7782
|
-
let e = await
|
|
7783
|
-
|
|
7809
|
+
async function oc() {
|
|
7810
|
+
let e = await ac();
|
|
7811
|
+
ic !== e && Wt(!0);
|
|
7784
7812
|
}
|
|
7785
|
-
async function
|
|
7786
|
-
|
|
7787
|
-
|
|
7813
|
+
async function sc() {
|
|
7814
|
+
ic = await ac(), window.versionMonitor && clearInterval(window.versionMonitor), window.versionMonitor = setInterval(() => {
|
|
7815
|
+
oc();
|
|
7788
7816
|
}, 6e4);
|
|
7789
7817
|
}
|
|
7790
7818
|
//#endregion
|
|
7791
7819
|
//#region components/create.ts
|
|
7792
|
-
function
|
|
7820
|
+
function cc({ components: e = [] } = {}) {
|
|
7793
7821
|
let t = [];
|
|
7794
7822
|
function n(e, t, n) {
|
|
7795
7823
|
e.component(t) || e.component(t, n);
|
|
@@ -7805,16 +7833,16 @@ function ac({ components: e = [] } = {}) {
|
|
|
7805
7833
|
Vt(o), Ht(d), Gt(e || G.global.t("App.title")), Ut(u), Bt({
|
|
7806
7834
|
icons: c,
|
|
7807
7835
|
iconDefault: l
|
|
7808
|
-
}), G.global.locale.value = d, a &&
|
|
7836
|
+
}), G.global.locale.value = d, a && sc(), t && Nn(r, t, n);
|
|
7809
7837
|
}
|
|
7810
7838
|
}
|
|
7811
7839
|
return {
|
|
7812
|
-
version:
|
|
7840
|
+
version: rc,
|
|
7813
7841
|
install: r
|
|
7814
7842
|
};
|
|
7815
7843
|
}
|
|
7816
7844
|
//#endregion
|
|
7817
7845
|
//#region components/preset.ts
|
|
7818
|
-
var
|
|
7846
|
+
var lc = cc({ components: Object.keys(qs).map((e) => qs[e]) }), uc = lc.install;
|
|
7819
7847
|
//#endregion
|
|
7820
|
-
export { Gn as BLOB, Kn as CUSTOM, qn as FILE, Wn as GET, Z as POST, ut as UzActionButton, xr as UzBack,
|
|
7848
|
+
export { Gn as BLOB, Kn as CUSTOM, qn as FILE, Wn as GET, Z as POST, ut as UzActionButton, xr as UzBack, ji as UzBom, Sa as UzCamera, ha as UzCircle, Pr as UzDraggableForm, kr as UzForm, Tr as UzFormItem, Wr as UzFormItemImage, Jr as UzFormItemTimesPicker, Br as UzFormItemUpload, qt as UzIcon, Ks as UzOcr, Ma as UzSearchBar, Ra as UzSearchMobileBar, Va as UzSpin, ro as UzTable, po as UzTableChild, Eo as UzTableDrawer, Ko as UzTableFile, Io as UzTableMobile, yo as UzTableQuestChild, ts as UzThumbnail, gs as UzWrap, Y as commonStore, cc as create, ps as darkTheme, lc as default, vr as fnActionReduction, _r as fnActionSimplify, Xo as fnAddThumbnail, Un as fnCancelFetch, Qo as fnClearAllThumbnail, Qs as fnComputedScale, Yt as fnCreateRouter, Et as fnDelStorage, Ot as fnDelStorageAll, Dt as fnDelStorageByPrefix, Zo as fnDeleteThumbnail, Tt as fnDialog, K as fnErrorLog, Rt as fnFilterByPinyinInitials, jt as fnFormatTime, Ft as fnFormatUnits, Pt as fnFullScreen, J as fnGetStorage, hi as fnGetTableData, $s as fnListenerScale, wt as fnNotification, xi as fnOptionReduction, bi as fnOptionSimplify, At as fnPageModel2Naive, Si as fnPrepareFormData, Ci as fnPrepareTableData, ur as fnRenderAction, kt as fnScrollTop, Ht as fnSetLang, Zs as fnSetNormalWidthAndHeight, q as fnSetStorage, Ut as fnSetTheme, Jo as fnSetThumbnail, _i as fnTableReduction, gi as fnTableSimplify, Nt as fnThrottle, Mt as fnTitle, yi as fnTriggersReduction, vi as fnTriggersSimplify, G as i18n, uc as install, fs as lightTheme, zt as mergeColumns, Jt as router, Xs as scaleStore, Yr as useDebounceFn, tc as useLocalStorage, nc as useQuery, ec as useThrottleFn };
|