@unizhen/ui 0.1.130 → 0.1.132
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/components/bom/options.d.ts +12 -0
- package/lib/ui.css +1 -1
- package/lib/ui.js +1095 -1050
- 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,22 +1925,22 @@ 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,
|
|
1932
1932
|
style: _(`grid-column: span ${n.form.span || 6} / span ${n.form.span || 6};`),
|
|
1933
|
-
"show-label": n.input !== "divider" && n.input !== "subTable",
|
|
1933
|
+
"show-label": n.input !== "divider" && n.input !== "subTable" && n.input !== "bom",
|
|
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",
|
|
@@ -2783,7 +2788,18 @@ var Xr = (e, t) => e.map((e, n) => {
|
|
|
2783
2788
|
...e,
|
|
2784
2789
|
children: ai(e.children, t, n)
|
|
2785
2790
|
} : e);
|
|
2786
|
-
}, oi =
|
|
2791
|
+
}, oi = (e, t) => {
|
|
2792
|
+
for (let n of e ?? []) {
|
|
2793
|
+
if (n.value === t) return n;
|
|
2794
|
+
let e = oi(n.children, t);
|
|
2795
|
+
if (e) return e;
|
|
2796
|
+
}
|
|
2797
|
+
}, si = (e, t) => {
|
|
2798
|
+
let n = oi(e, t);
|
|
2799
|
+
if (!n) return;
|
|
2800
|
+
let r = n.operation_no ?? n.params?.operation_no ?? n.product_no ?? n.params?.product_no;
|
|
2801
|
+
return r != null && r !== "" ? String(r) : typeof n.label == "string" ? n.label.split("-")[0].trim() : "";
|
|
2802
|
+
}, ci = /(?<=\[)(.+?)(?=\])/g, li = {
|
|
2787
2803
|
index: 1,
|
|
2788
2804
|
selection: 0,
|
|
2789
2805
|
pagination: 1,
|
|
@@ -2801,10 +2817,10 @@ var Xr = (e, t) => e.map((e, n) => {
|
|
|
2801
2817
|
placement: "right",
|
|
2802
2818
|
summary: ""
|
|
2803
2819
|
};
|
|
2804
|
-
function
|
|
2820
|
+
function ui(e) {
|
|
2805
2821
|
return Function("return " + e)();
|
|
2806
2822
|
}
|
|
2807
|
-
var
|
|
2823
|
+
var di = () => new Promise((e) => {
|
|
2808
2824
|
let t = window.localStorage.getItem("city");
|
|
2809
2825
|
if (t) e(JSON.parse(t));
|
|
2810
2826
|
else {
|
|
@@ -2817,9 +2833,9 @@ var li = () => new Promise((e) => {
|
|
|
2817
2833
|
t && (clearInterval(i), e(JSON.parse(t)));
|
|
2818
2834
|
}, 500);
|
|
2819
2835
|
}
|
|
2820
|
-
}),
|
|
2836
|
+
}), fi = async (e, t, n) => {
|
|
2821
2837
|
if (t && typeof t == "string") {
|
|
2822
|
-
let r = t.match(
|
|
2838
|
+
let r = t.match(ci);
|
|
2823
2839
|
if (r && t.indexOf("return") === -1) {
|
|
2824
2840
|
let t = r[0].split(":");
|
|
2825
2841
|
if (t[0] === "date") return (t) => jt(t[e], r[0].replace("date:", "") || "YYYY-MM-DD");
|
|
@@ -2840,12 +2856,12 @@ var li = () => new Promise((e) => {
|
|
|
2840
2856
|
}
|
|
2841
2857
|
}
|
|
2842
2858
|
return t && typeof t == "function" ? (e, n) => t(e, n, f) : "";
|
|
2843
|
-
},
|
|
2859
|
+
}, pi = (e, t, n) => {
|
|
2844
2860
|
let r = t.map((t) => {
|
|
2845
2861
|
let r = [], i = t.id;
|
|
2846
2862
|
return e.input === "select" && (e.params.labelKeys || e.search.labelKeys) ? ((e.params.labelKeys || e.search.labelKeys || "").split(",").forEach((e) => {
|
|
2847
2863
|
r.push(t[e]);
|
|
2848
|
-
}), r =
|
|
2864
|
+
}), r = Xe(r).join("-")) : r = t[n[1]], e.input === "select" && e.params.valueKey && (i = t[e.params.valueKey]), {
|
|
2849
2865
|
label: t?.is_disabled === "1" ? `${r}-${G.global.t("Common.disabled")}` : r,
|
|
2850
2866
|
value: i,
|
|
2851
2867
|
disabled: !e.params._search && t?.is_disabled === "1",
|
|
@@ -2853,35 +2869,35 @@ var li = () => new Promise((e) => {
|
|
|
2853
2869
|
};
|
|
2854
2870
|
});
|
|
2855
2871
|
return r.sort((e, t) => Number(e.disabled) - Number(t.disabled)), r;
|
|
2856
|
-
},
|
|
2857
|
-
function
|
|
2858
|
-
|
|
2872
|
+
}, mi = /* @__PURE__ */ new Map();
|
|
2873
|
+
function hi() {
|
|
2874
|
+
mi.clear();
|
|
2859
2875
|
}
|
|
2860
|
-
async function
|
|
2876
|
+
async function gi(e, t = !1) {
|
|
2861
2877
|
let n = e.split("."), r = !1;
|
|
2862
|
-
return n.length > 1 && (
|
|
2878
|
+
return n.length > 1 && (mi.has(n[0]) && !t ? r = W(mi.get(n[0])) : (r = await Xn({ tableId: n[0] }), mi.set(n[0], r))), {
|
|
2863
2879
|
sourceData: r,
|
|
2864
2880
|
n
|
|
2865
2881
|
};
|
|
2866
2882
|
}
|
|
2867
|
-
async function
|
|
2883
|
+
async function _i(e) {
|
|
2868
2884
|
return new Promise((t, n) => {
|
|
2869
2885
|
let r = J(`dynamicTable_${e}`, !1);
|
|
2870
|
-
r &&
|
|
2886
|
+
r && mi.has(`dynamicTable_${e}`) ? t(r) : Yn(e, r ? r.createTime : null).then((n) => {
|
|
2871
2887
|
if (n) {
|
|
2872
2888
|
let r = {
|
|
2873
2889
|
createTime: n.createTime,
|
|
2874
2890
|
tableTitle: n.tableTitle,
|
|
2875
2891
|
viewJson: n.viewJson
|
|
2876
2892
|
};
|
|
2877
|
-
q(`dynamicTable_${e}`, r, 0),
|
|
2878
|
-
} else
|
|
2893
|
+
q(`dynamicTable_${e}`, r, 0), mi.set(`dynamicTable_${e}`, !0), Dt("tables_"), t(n);
|
|
2894
|
+
} else mi.set(`dynamicTable_${e}`, !0), t(r);
|
|
2879
2895
|
}).catch(() => {
|
|
2880
2896
|
n();
|
|
2881
2897
|
});
|
|
2882
2898
|
});
|
|
2883
2899
|
}
|
|
2884
|
-
var
|
|
2900
|
+
var vi = (e) => e.map((e) => {
|
|
2885
2901
|
let t = {};
|
|
2886
2902
|
return t.z = e.params.placeholder, e.input === "group" ? t.n = e.params.children : t.c = +!!e.params.clearable, e.input === "input" && (e.params.type && (t.t = e.params.type), e.params.minlength && (t.i = e.params.minlength), e.params.maxlength && (t.a = e.params.maxlength), e.params.rows && (t.r = e.params.rows), e.params.prefix && (t.e = e.params.prefix), e.params.suffix && (t.s = e.params.suffix)), e.input === "auto" && (t.o = e.params.options, e.params.prefix && (t.e = e.params.prefix), e.params.suffix && (t.s = e.params.suffix)), e.input === "number" && (t.b = +!!e.params.showButton, e.params.min && (t.i = e.params.min), e.params.max && (t.a = e.params.max), e.params.minKey && (t.x = e.params.minKey), e.params.maxKey && (t.y = e.params.maxKey), e.params.step && (t.t = e.params.step), e.params.precision && (t.p = e.params.precision), e.params.prefix && (t.e = e.params.prefix), e.params.suffix && (t.s = e.params.suffix)), e.input === "date" && (t.y = e.params.type, e.params.format && (t.f = e.params.format), e.params.isDateDisabled && (t.d = e.params.isDateDisabled), e.params.timePickerProps && (t.t = e.params.timePickerProps)), e.input === "select" && (t.o = e.params.options, t.y = e.params.immediately, t.f = +!!e.params.filterable, t.m = +!!e.params.multiple, t.t = +!!e.params.tag, t.l = (e.params.labelKeys || "").replace(/\s*/g, ""), t.v = (e.params.valueKey || "").replace(/\s*/g, ""), t.r = e.params.renderLabel, t.g = e.params.renderTag), e.input === "cascader" && (t.o = e.params.options, t.y = e.params.immediately, t.f = +!!e.params.filterable, t.m = +!!e.params.multiple), e.input === "checkbox" && (t.o = e.params.options), e.input === "time" && (t.f = e.params.format), e.input === "upload" && (t.s = +!!e.params.small, t.a = e.params.accept, t.m = e.params.max), e.input === "switch" && (t.h = e.params.checked, t.u = e.params.unchecked), e.input === "divider" && (t.p = e.params.placement), e.input === "filling" && (t.k = e.params.parentKey), e.input === "subTable" && (t.i = +!!e.params.init, t.q = +!!e.params.quest, t.k = e.params.searchKey, t.l = e.params.link, t.c = e.params.columns, t.a = e.params.actions, t.b = +!!e.params.addButton, t.g = +!!e.params.draggable, t.h = +!!e.params.childActions, t.x = +!!e.params.expandable, t.n = +!!e.params.showActions, t.d = +!!e.params.showDelete, e.params.optionsType && (t.t = e.params.optionsType), e.params.optionsSource && (t.u = e.params.optionsSource), e.params.options && (t.o = e.params.options), e.params.summary && (t.s = e.params.summary), e.params.merge && (t.m = e.params.merge), e.params.deleteFn && (t.f = e.params.deleteFn)), {
|
|
2887
2903
|
i: e.input,
|
|
@@ -2956,7 +2972,7 @@ var gi = (e) => e.map((e) => {
|
|
|
2956
2972
|
p: { s: +!!e.form.expand.show }
|
|
2957
2973
|
}
|
|
2958
2974
|
};
|
|
2959
|
-
}),
|
|
2975
|
+
}), yi = (e) => !e[0] || e[0] && e[0].input ? e : e.map((e) => {
|
|
2960
2976
|
let t = {};
|
|
2961
2977
|
return t.placeholder = e.p.z, e.i === "group" ? t.children = e.p.n : t.clearable = !!e.p.c, e.i === "input" && (e.p.t && (t.type = e.p.t), e.p.i && (t.minlength = e.p.i), e.p.a && (t.maxlength = e.p.a), e.p.r && (t.rows = e.p.r), e.p.e && (t.prefix = e.p.e), e.p.s && (t.suffix = e.p.s)), e.i === "auto" && (t.options = e.p.o, e.p.e && (t.prefix = e.p.e), e.p.s && (t.suffix = e.p.s)), e.i === "number" && (t.showButton = !!e.p.b, e.p.i && (t.min = e.p.i), e.p.a && (t.max = e.p.a), e.p.x && (t.minKey = e.p.x), e.p.y && (t.maxKey = e.p.y), e.p.t && (t.step = e.p.t), e.p.p && (t.precision = e.p.p), e.p.e && (t.prefix = e.p.e), e.p.s && (t.suffix = e.p.s)), e.i === "date" && (t.type = e.p.y, e.p.f && (t.format = e.p.f), e.p.d && (t.isDateDisabled = e.p.d), e.p.t && (t.timePickerProps = e.p.t)), e.i === "select" && (t.options = e.p.o, t.immediately = e.p.y, t.filterable = !!e.p.f, t.multiple = !!e.p.m, t.tag = !!e.p.t, t.labelKeys = e.p.l, t.valueKey = e.p.v, t.renderLabel = e.p.r, t.renderTag = e.p.g), e.i === "cascader" && (t.options = e.p.o, t.immediately = e.p.y, t.filterable = !!e.p.f, t.multiple = !!e.p.m), e.i === "checkbox" && (t.options = e.p.o), e.i === "time" && (t.format = e.p.f), e.i === "upload" && (t.small = !!e.p.s, t.accept = e.p.a, t.max = e.p.m), e.i === "switch" && (t.checked = e.p.h, t.unchecked = e.p.u), e.i === "divider" && (t.placement = e.p.p), e.i === "filling" && (t.parentKey = e.p.k), e.i === "subTable" && (t.init = !!e.p.i, t.quest = !!e.p.q, t.searchKey = e.p.k, t.link = e.p.l, t.columns = e.p.c, t.actions = e.p.a, t.addButton = !!e.p.b, t.draggable = !!e.p.g, t.childActions = !!e.p.h, t.showActions = !!e.p.n, t.showDelete = !!(e.p.d ?? !0), t.expandable = !!e.p.x, e.p.t && (t.optionsType = e.p.t), e.p.u && (t.optionsSource = e.p.u), e.p.o && (t.options = e.p.o), e.p.s && (t.summary = e.p.s), e.p.m && (t.merge = e.p.m), e.p.f && (t.deleteFn = e.p.f)), {
|
|
2962
2978
|
input: e.i,
|
|
@@ -3031,12 +3047,12 @@ var gi = (e) => e.map((e) => {
|
|
|
3031
3047
|
expand: { show: e.f && e.f.p ? !!e.f.p.s : !0 }
|
|
3032
3048
|
}
|
|
3033
3049
|
};
|
|
3034
|
-
}),
|
|
3050
|
+
}), bi = (e) => ({
|
|
3035
3051
|
f: e.fetch,
|
|
3036
3052
|
n: e.fetchFn,
|
|
3037
3053
|
o: e.when_drawer_open,
|
|
3038
3054
|
b: e.when_before_save
|
|
3039
|
-
}),
|
|
3055
|
+
}), xi = (e) => e ? e.fetch ? e : {
|
|
3040
3056
|
fetch: e.f,
|
|
3041
3057
|
fetchFn: e.n,
|
|
3042
3058
|
when_drawer_open: e.o,
|
|
@@ -3046,7 +3062,7 @@ var gi = (e) => e.map((e) => {
|
|
|
3046
3062
|
fetchFn: "",
|
|
3047
3063
|
when_drawer_open: "",
|
|
3048
3064
|
when_before_save: ""
|
|
3049
|
-
},
|
|
3065
|
+
}, Si = (e) => ({
|
|
3050
3066
|
i: e.index,
|
|
3051
3067
|
s: e.selection,
|
|
3052
3068
|
p: e.pagination,
|
|
@@ -3062,7 +3078,7 @@ var gi = (e) => e.map((e) => {
|
|
|
3062
3078
|
h: e.drawerHeight,
|
|
3063
3079
|
l: e.placement,
|
|
3064
3080
|
r: e.summary
|
|
3065
|
-
}),
|
|
3081
|
+
}), Ci = (e) => {
|
|
3066
3082
|
let t = {};
|
|
3067
3083
|
return e && (t = e.index !== void 0 || e.selection !== void 0 || e.pagination !== void 0 || e.cache !== void 0 || e.draggable !== void 0 || e.addButton !== void 0 || e.filterButton !== void 0 || e.commonTime !== void 0 || e.asynchronous !== void 0 || e.filePort !== void 0 || e.actionWidth !== void 0 || e.drawerWidth !== void 0 || e.drawerHeight !== void 0 || e.placement !== void 0 || e.summary !== void 0 ? e : {
|
|
3068
3084
|
index: e.i,
|
|
@@ -3080,11 +3096,11 @@ var gi = (e) => e.map((e) => {
|
|
|
3080
3096
|
drawerHeight: e.h,
|
|
3081
3097
|
placement: e.l,
|
|
3082
3098
|
summary: e.r
|
|
3083
|
-
}), Object.assign({},
|
|
3099
|
+
}), Object.assign({}, li, W(t));
|
|
3084
3100
|
};
|
|
3085
|
-
function
|
|
3101
|
+
function wi(e, t, n, r) {
|
|
3086
3102
|
let i = async (i, a) => {
|
|
3087
|
-
let o = [], s = {}, c = {}, l = {}, u = [], d = [], f =
|
|
3103
|
+
let o = [], s = {}, c = {}, l = {}, u = [], d = [], f = W(e), p = [];
|
|
3088
3104
|
for (let e of f) e.input === "group" ? p.push(...e.params.children) : p.push(e);
|
|
3089
3105
|
for (let e of p) {
|
|
3090
3106
|
if (e.source && (e.input === "select" || e.input === "cascader")) {
|
|
@@ -3117,21 +3133,21 @@ function Si(e, t, n, r) {
|
|
|
3117
3133
|
disabled: !0
|
|
3118
3134
|
}];
|
|
3119
3135
|
if (e.params.immediately || r) {
|
|
3120
|
-
let { sourceData: t, n: r } = await
|
|
3136
|
+
let { sourceData: t, n: r } = await gi(e.source);
|
|
3121
3137
|
if (t && Array.isArray(t)) {
|
|
3122
3138
|
if (e.sourceFn) {
|
|
3123
3139
|
let r = e.sourceFn;
|
|
3124
|
-
n = Function("sourceData", "POST", r)(t, Z);
|
|
3125
|
-
} else n =
|
|
3140
|
+
n = await Function("sourceData", "POST", r)(t, Z);
|
|
3141
|
+
} else n = pi(e, t, r);
|
|
3126
3142
|
}
|
|
3127
3143
|
} else e.params._async = !0, e.params._fetch = !1, e.params._asyncFn = async () => {
|
|
3128
|
-
let { sourceData: t, n } = await
|
|
3144
|
+
let { sourceData: t, n } = await gi(e.source);
|
|
3129
3145
|
if (t && Array.isArray(t)) {
|
|
3130
3146
|
if (e.sourceFn) {
|
|
3131
3147
|
let n = e.sourceFn;
|
|
3132
|
-
return Function("sourceData", "POST", n)(t, Z);
|
|
3148
|
+
return await Function("sourceData", "POST", n)(t, Z);
|
|
3133
3149
|
}
|
|
3134
|
-
return
|
|
3150
|
+
return pi(e, t, n);
|
|
3135
3151
|
}
|
|
3136
3152
|
};
|
|
3137
3153
|
if (e.params.options = n, e.form.backfill && t) {
|
|
@@ -3165,27 +3181,27 @@ function Si(e, t, n, r) {
|
|
|
3165
3181
|
K(e);
|
|
3166
3182
|
}
|
|
3167
3183
|
if (e.input === "cascader" && e.table.render === "[city]") {
|
|
3168
|
-
let t = await
|
|
3184
|
+
let t = await di();
|
|
3169
3185
|
e.params.options = t;
|
|
3170
3186
|
}
|
|
3171
3187
|
if (e.input === "subTable" && e.params.link) {
|
|
3172
|
-
let t = await
|
|
3188
|
+
let t = await _i(e.params.link).catch(() => {
|
|
3173
3189
|
a();
|
|
3174
3190
|
});
|
|
3175
3191
|
if (t) try {
|
|
3176
|
-
let n =
|
|
3192
|
+
let n = tt.parse(t.viewJson);
|
|
3177
3193
|
n.suffix && (e._suffix = vr(n.suffix));
|
|
3178
|
-
let r =
|
|
3194
|
+
let r = yi(n.table);
|
|
3179
3195
|
r.forEach((e) => {
|
|
3180
3196
|
e.table.sorter = !1;
|
|
3181
3197
|
});
|
|
3182
3198
|
let i = r.filter((e) => e.input === "subTable");
|
|
3183
3199
|
if (i) for await (let e of i) {
|
|
3184
|
-
let t = await
|
|
3200
|
+
let t = await _i(e.params.link).catch(() => {
|
|
3185
3201
|
a();
|
|
3186
3202
|
});
|
|
3187
3203
|
if (t) try {
|
|
3188
|
-
let n =
|
|
3204
|
+
let n = tt.parse(t.viewJson), r = yi(n.table);
|
|
3189
3205
|
r.forEach((e) => {
|
|
3190
3206
|
e.table.sorter = !1;
|
|
3191
3207
|
}), e.params.columns = r, e.params.actions = n.action;
|
|
@@ -3222,12 +3238,12 @@ function Si(e, t, n, r) {
|
|
|
3222
3238
|
i(e, t).catch(t);
|
|
3223
3239
|
});
|
|
3224
3240
|
}
|
|
3225
|
-
async function
|
|
3241
|
+
async function Ti(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
3226
3242
|
let s = 0, c = [], l = [], u = {
|
|
3227
3243
|
key: "",
|
|
3228
3244
|
link: "",
|
|
3229
3245
|
merge: ""
|
|
3230
|
-
}, d = [], p =
|
|
3246
|
+
}, d = [], p = W(e), m = [], h = [];
|
|
3231
3247
|
for (let e of p) e.input === "group" ? (m.push(...e.params.children), h.push({
|
|
3232
3248
|
title: e.label,
|
|
3233
3249
|
key: e.key,
|
|
@@ -3237,25 +3253,25 @@ async function Ci(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3237
3253
|
for await (let [e, s] of m.entries()) {
|
|
3238
3254
|
if (s.source && !s.table.render && (s.input === "select" || s.input === "cascader")) {
|
|
3239
3255
|
if (s.table.render = (e) => e[`${s.key}Str`], t || s.params.immediately || s.search.defaultValue) {
|
|
3240
|
-
let { sourceData: t, n } = await
|
|
3256
|
+
let { sourceData: t, n } = await gi(s.source, a && e === 0);
|
|
3241
3257
|
if (t && Array.isArray(t)) {
|
|
3242
3258
|
if (s.sourceFn) {
|
|
3243
3259
|
let e = s.sourceFn, n = Function("sourceData", "POST", e);
|
|
3244
|
-
s.params.options = n(t, Z);
|
|
3245
|
-
} else s.params.options =
|
|
3260
|
+
s.params.options = await n(t, Z);
|
|
3261
|
+
} else s.params.options = pi(s, t, n);
|
|
3246
3262
|
}
|
|
3247
3263
|
} else s.params.options = [{
|
|
3248
3264
|
label: G.global.t("Common.loading"),
|
|
3249
3265
|
value: "loading",
|
|
3250
3266
|
disabled: !0
|
|
3251
3267
|
}], s.params._async = !0, s.params._fetch = !1, s.params._asyncFn = async () => {
|
|
3252
|
-
let { sourceData: e, n: t } = await
|
|
3268
|
+
let { sourceData: e, n: t } = await gi(s.source);
|
|
3253
3269
|
if (e && Array.isArray(e)) {
|
|
3254
3270
|
if (s.sourceFn) {
|
|
3255
3271
|
let t = s.sourceFn;
|
|
3256
|
-
return Function("sourceData", "POST", t)(e, Z);
|
|
3272
|
+
return await Function("sourceData", "POST", t)(e, Z);
|
|
3257
3273
|
}
|
|
3258
|
-
return
|
|
3274
|
+
return pi(s, e, t);
|
|
3259
3275
|
}
|
|
3260
3276
|
};
|
|
3261
3277
|
}
|
|
@@ -3278,7 +3294,7 @@ async function Ci(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3278
3294
|
tooltip: !0,
|
|
3279
3295
|
"line-clamp": s.table.clamp ?? 0
|
|
3280
3296
|
} : !1,
|
|
3281
|
-
render: s.table.render ? await
|
|
3297
|
+
render: s.table.render ? await fi(s.key, s.table.render, i) : void 0,
|
|
3282
3298
|
show: Y.isMobile ? s.table.mobile ?? !1 : s.table.show ?? !0,
|
|
3283
3299
|
pin: !!s.table.fixed,
|
|
3284
3300
|
fixTemp: s.table.fixed
|
|
@@ -3292,7 +3308,7 @@ async function Ci(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3292
3308
|
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
3309
|
}
|
|
3294
3310
|
p.render = function(e, t) {
|
|
3295
|
-
return f(
|
|
3311
|
+
return f(me, {
|
|
3296
3312
|
showLabel: !1,
|
|
3297
3313
|
showFeedback: !1,
|
|
3298
3314
|
path: `child[${t}].${s.key}`,
|
|
@@ -3313,34 +3329,34 @@ async function Ci(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3313
3329
|
if (s.search.title && (s.label = s.search.title), s.search.source) {
|
|
3314
3330
|
if (s.input = "select", s.params.type = s.search.type, s.params.valueKey = s.search.valueKey, s.params.valueKey = s.search.valueKey, s.search.source === "from-up") s.params.options = s.params.options;
|
|
3315
3331
|
else if (s.params.immediately || s.search.defaultValue) {
|
|
3316
|
-
let { sourceData: e, n: t } = await
|
|
3332
|
+
let { sourceData: e, n: t } = await gi(s.search.source);
|
|
3317
3333
|
if (e && Array.isArray(e)) {
|
|
3318
3334
|
if (s.sourceFn) {
|
|
3319
3335
|
let t = s.sourceFn, n = Function("sourceData", "POST", t);
|
|
3320
|
-
s.params.options = n(e, Z);
|
|
3321
|
-
} else s.params.options =
|
|
3336
|
+
s.params.options = await n(e, Z);
|
|
3337
|
+
} else s.params.options = pi(s, e, t);
|
|
3322
3338
|
}
|
|
3323
3339
|
} else s.params._async = !0, s.params._fetch = !1, s.params._asyncFn = async () => {
|
|
3324
|
-
let { sourceData: e, n: t } = await
|
|
3340
|
+
let { sourceData: e, n: t } = await gi(s.search.source);
|
|
3325
3341
|
if (e && Array.isArray(e)) {
|
|
3326
3342
|
if (s.sourceFn) {
|
|
3327
3343
|
let t = s.sourceFn;
|
|
3328
|
-
return Function("sourceData", "POST", t)(e, Z);
|
|
3344
|
+
return await Function("sourceData", "POST", t)(e, Z);
|
|
3329
3345
|
}
|
|
3330
|
-
return
|
|
3346
|
+
return pi(s, e, t);
|
|
3331
3347
|
}
|
|
3332
3348
|
};
|
|
3333
3349
|
}
|
|
3334
|
-
if (s.search.multiple && (s.params.multiple = !0, s.search.defaultValue && (s.search.defaultValue =
|
|
3335
|
-
let e =
|
|
3350
|
+
if (s.search.multiple && (s.params.multiple = !0, s.search.defaultValue && (s.search.defaultValue = ui(s.search.defaultValue))), s.search.show) {
|
|
3351
|
+
let e = W(s);
|
|
3336
3352
|
e.params._async && (e.params._search = !0, e.params._asyncFn = async () => {
|
|
3337
|
-
let { sourceData: t, n } = await
|
|
3353
|
+
let { sourceData: t, n } = await gi(e.source || e.search.source);
|
|
3338
3354
|
if (t && Array.isArray(t)) {
|
|
3339
3355
|
if (e.sourceFn) {
|
|
3340
3356
|
let n = e.sourceFn;
|
|
3341
|
-
return Function("sourceData", "POST", n)(t, Z);
|
|
3357
|
+
return await Function("sourceData", "POST", n)(t, Z);
|
|
3342
3358
|
}
|
|
3343
|
-
return
|
|
3359
|
+
return pi(e, t, n);
|
|
3344
3360
|
}
|
|
3345
3361
|
}), c.push({
|
|
3346
3362
|
input: e.input,
|
|
@@ -3394,94 +3410,109 @@ async function Ci(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
|
3394
3410
|
}
|
|
3395
3411
|
//#endregion
|
|
3396
3412
|
//#region components/bom/index.vue?vue&type=script&lang.ts
|
|
3397
|
-
var
|
|
3413
|
+
var Ei = [
|
|
3398
3414
|
"var(--primary)",
|
|
3399
3415
|
"var(--green)",
|
|
3400
3416
|
"var(--yellow)",
|
|
3401
3417
|
"var(--purple)"
|
|
3402
|
-
],
|
|
3418
|
+
], Di = d({
|
|
3403
3419
|
name: "UzBom",
|
|
3404
3420
|
components: {
|
|
3405
|
-
NDataTable:
|
|
3406
|
-
NForm:
|
|
3421
|
+
NDataTable: oe,
|
|
3422
|
+
NForm: pe
|
|
3407
3423
|
},
|
|
3408
3424
|
props: {
|
|
3409
3425
|
value: {
|
|
3410
3426
|
type: Array,
|
|
3411
3427
|
default: () => []
|
|
3412
3428
|
},
|
|
3429
|
+
item: {
|
|
3430
|
+
required: !0,
|
|
3431
|
+
type: Object,
|
|
3432
|
+
default: () => ({})
|
|
3433
|
+
},
|
|
3413
3434
|
height: {
|
|
3414
3435
|
type: [Number, String],
|
|
3415
3436
|
default: void 0
|
|
3437
|
+
},
|
|
3438
|
+
status: {
|
|
3439
|
+
type: Number,
|
|
3440
|
+
default: 1
|
|
3416
3441
|
}
|
|
3417
3442
|
},
|
|
3418
3443
|
emits: ["update:value"],
|
|
3419
|
-
setup(e, { emit: t, expose:
|
|
3420
|
-
let { t:
|
|
3444
|
+
setup(e, { emit: t, expose: r }) {
|
|
3445
|
+
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.operation_no || e.product_no || e.code || t + 1), u = (e, t = 1, n, r) => (e ?? []).map((e, t) => ({
|
|
3421
3446
|
row: e,
|
|
3422
3447
|
index: t
|
|
3423
3448
|
})).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 =
|
|
3449
|
+
let a = l(e, i, n), o = e.children, s = ti(e), d = t === 1 ? c(e) : ni(s, r);
|
|
3425
3450
|
return {
|
|
3426
3451
|
...e,
|
|
3427
|
-
required_quantity:
|
|
3428
|
-
counts:
|
|
3452
|
+
required_quantity: s,
|
|
3453
|
+
counts: d,
|
|
3429
3454
|
key: ii(e),
|
|
3430
3455
|
level: t,
|
|
3431
3456
|
code: a,
|
|
3432
3457
|
sort: i,
|
|
3433
3458
|
sort_index: i,
|
|
3434
|
-
...Array.isArray(o) ? { children:
|
|
3459
|
+
...Array.isArray(o) ? { children: u(o, t + 1, a, t === 1 ? d : r) } : {}
|
|
3435
3460
|
};
|
|
3436
|
-
}),
|
|
3461
|
+
}), d = w(u(e.value)), m = w([]), h = !1, g = 1, _ = ii, b = (e, t = 1, n) => {
|
|
3437
3462
|
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) &&
|
|
3463
|
+
let i = e.code, a = l(e, r, n);
|
|
3464
|
+
e.level !== t && (e.level = t), i !== a && (e.code = a), Array.isArray(e.children) && b(e.children, t + 1, a);
|
|
3440
3465
|
});
|
|
3441
|
-
},
|
|
3466
|
+
}, x = (e) => {
|
|
3442
3467
|
let t = [];
|
|
3443
3468
|
return e.forEach((e) => {
|
|
3444
3469
|
let n = e.children;
|
|
3445
|
-
Array.isArray(n) && n.length && (t.push(
|
|
3470
|
+
Array.isArray(n) && n.length && (t.push(_(e)), t.push(...x(n)));
|
|
3446
3471
|
}), t;
|
|
3447
|
-
},
|
|
3448
|
-
|
|
3449
|
-
},
|
|
3450
|
-
let e =
|
|
3451
|
-
if (!
|
|
3452
|
-
if (!
|
|
3453
|
-
|
|
3472
|
+
}, S = (e) => {
|
|
3473
|
+
m.value = e, h = !0;
|
|
3474
|
+
}, C = () => {
|
|
3475
|
+
let e = x(d.value);
|
|
3476
|
+
if (!h) {
|
|
3477
|
+
if (!d.value.length) return;
|
|
3478
|
+
m.value = e, h = !0;
|
|
3454
3479
|
return;
|
|
3455
3480
|
}
|
|
3456
|
-
let t = new Set(e), n =
|
|
3457
|
-
(n.length !==
|
|
3458
|
-
}, { run:
|
|
3459
|
-
|
|
3460
|
-
}, 200),
|
|
3461
|
-
let
|
|
3462
|
-
|
|
3463
|
-
let
|
|
3481
|
+
let t = new Set(e), n = m.value.filter((e) => t.has(e));
|
|
3482
|
+
(n.length !== m.value.length || n.some((e, t) => e !== m.value[t])) && (m.value = n);
|
|
3483
|
+
}, { run: T, flush: E, cancel: D } = Yr(() => {
|
|
3484
|
+
b(d.value), C();
|
|
3485
|
+
}, 200), O = /* @__PURE__ */ new WeakMap(), k = (e, t) => {
|
|
3486
|
+
let n = O.get(e);
|
|
3487
|
+
n || (n = /* @__PURE__ */ new Map(), O.set(e, n));
|
|
3488
|
+
let r = n.get(t.key);
|
|
3489
|
+
if (r) return r;
|
|
3490
|
+
let i = new Proxy(e, {
|
|
3464
3491
|
get(e, t, n) {
|
|
3465
3492
|
return t === "required_quantity" ? ti(e) : Reflect.get(e, t, n);
|
|
3466
3493
|
},
|
|
3467
|
-
set(e,
|
|
3468
|
-
let
|
|
3469
|
-
|
|
3494
|
+
set(e, n, r) {
|
|
3495
|
+
let i = Reflect.get(e, n) !== r, a = Reflect.set(e, n, r);
|
|
3496
|
+
if (i && (n === "quantity" || n === "lossRate") && Reflect.set(e, "required_quantity", ti(e)), i && (n === "quantity" || n === "lossRate" || n === "counts") && d.value.forEach((e) => ri(Array.isArray(e.children) ? e.children : [], e.counts)), i && n === t.key) {
|
|
3497
|
+
let i = si(t.params?.options, r);
|
|
3498
|
+
i !== void 0 && (Reflect.set(e, "operation_no", i), Number(e.level) === 1 && Reflect.set(e, "code", i)), (i !== void 0 || n === "product_no") && (T(), i !== void 0 && E());
|
|
3499
|
+
}
|
|
3500
|
+
return a;
|
|
3470
3501
|
}
|
|
3471
3502
|
});
|
|
3472
|
-
return
|
|
3473
|
-
},
|
|
3503
|
+
return n.set(t.key, i), i;
|
|
3504
|
+
}, A = () => {
|
|
3474
3505
|
let e = /* @__PURE__ */ new Set(), t = (n) => {
|
|
3475
3506
|
n.forEach((n) => {
|
|
3476
|
-
e.add(
|
|
3507
|
+
e.add(_(n));
|
|
3477
3508
|
let r = n.children;
|
|
3478
3509
|
Array.isArray(r) && t(r);
|
|
3479
3510
|
});
|
|
3480
3511
|
};
|
|
3481
|
-
t(
|
|
3512
|
+
t(d.value);
|
|
3482
3513
|
let n;
|
|
3483
3514
|
do
|
|
3484
|
-
n = `NEW-${String(
|
|
3515
|
+
n = `NEW-${String(g).padStart(4, "0")}`, g += 1;
|
|
3485
3516
|
while (e.has(n));
|
|
3486
3517
|
return {
|
|
3487
3518
|
key: n,
|
|
@@ -3491,7 +3522,7 @@ var wi = [
|
|
|
3491
3522
|
sort_index: 0,
|
|
3492
3523
|
product_no: n,
|
|
3493
3524
|
product_name: "",
|
|
3494
|
-
status:
|
|
3525
|
+
status: 0,
|
|
3495
3526
|
procurement: "0",
|
|
3496
3527
|
unit: "",
|
|
3497
3528
|
operation_no: "",
|
|
@@ -3499,17 +3530,19 @@ var wi = [
|
|
|
3499
3530
|
lossRate: 0,
|
|
3500
3531
|
remark: ""
|
|
3501
3532
|
};
|
|
3502
|
-
},
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3533
|
+
}, ee = (e) => u(e?.length ? e : [A()]);
|
|
3534
|
+
d.value.length || (d.value = ee(e.value));
|
|
3535
|
+
let j = (e) => {
|
|
3536
|
+
d.value = u(e), C(), t("update:value", d.value);
|
|
3537
|
+
}, { dragColumn: N, getSortableRowProps: P, tableRef: F, tableVersion: te } = $r(d, j), I = (e) => {
|
|
3538
|
+
let t = _(e), n = !1, r = (e) => e.map((e) => {
|
|
3539
|
+
if (_(e) === t) {
|
|
3507
3540
|
n = !0;
|
|
3508
3541
|
let t = e.children, r = Array.isArray(t) ? t : [];
|
|
3509
3542
|
return {
|
|
3510
3543
|
...e,
|
|
3511
3544
|
children: [...r, {
|
|
3512
|
-
...
|
|
3545
|
+
...A(),
|
|
3513
3546
|
sort: r.length,
|
|
3514
3547
|
sort_index: r.length
|
|
3515
3548
|
}]
|
|
@@ -3521,44 +3554,44 @@ var wi = [
|
|
|
3521
3554
|
children: r(i)
|
|
3522
3555
|
} : e;
|
|
3523
3556
|
});
|
|
3524
|
-
|
|
3525
|
-
},
|
|
3526
|
-
|
|
3527
|
-
},
|
|
3528
|
-
let t =
|
|
3529
|
-
if (
|
|
3557
|
+
j(r(d.value)), n && !m.value.includes(t) && S([...m.value, t]);
|
|
3558
|
+
}, R = (e) => {
|
|
3559
|
+
j(ai(d.value, _(e), A()));
|
|
3560
|
+
}, ne = (e) => {
|
|
3561
|
+
let t = _(e), n = (e) => e.reduce((e, r) => {
|
|
3562
|
+
if (_(r) === t) return e;
|
|
3530
3563
|
let i = r.children;
|
|
3531
3564
|
return e.push(Array.isArray(i) ? {
|
|
3532
3565
|
...r,
|
|
3533
3566
|
children: n(i)
|
|
3534
3567
|
} : r), e;
|
|
3535
3568
|
}, []);
|
|
3536
|
-
|
|
3537
|
-
},
|
|
3538
|
-
title: () => f(
|
|
3569
|
+
j(n(d.value));
|
|
3570
|
+
}, re = {
|
|
3571
|
+
title: () => f(de, {
|
|
3539
3572
|
trigger: "click",
|
|
3540
3573
|
options: [{
|
|
3541
|
-
label:
|
|
3574
|
+
label: a("Common.expand"),
|
|
3542
3575
|
key: "expand-all"
|
|
3543
3576
|
}, {
|
|
3544
|
-
label:
|
|
3577
|
+
label: a("Common.contract"),
|
|
3545
3578
|
key: "collapse-all"
|
|
3546
3579
|
}],
|
|
3547
3580
|
onSelect: (e) => {
|
|
3548
|
-
|
|
3581
|
+
S(e === "expand-all" ? x(d.value) : []);
|
|
3549
3582
|
}
|
|
3550
|
-
}, { default: () => f(
|
|
3583
|
+
}, { default: () => f(L, {
|
|
3551
3584
|
text: !0,
|
|
3552
3585
|
size: "small",
|
|
3553
|
-
"aria-label":
|
|
3554
|
-
}, { default: () =>
|
|
3586
|
+
"aria-label": a("BOM.expandOrCollapseAll")
|
|
3587
|
+
}, { default: () => a("BOM.level") }) }),
|
|
3555
3588
|
key: "level",
|
|
3556
3589
|
width: 70,
|
|
3557
3590
|
fixed: "left",
|
|
3558
3591
|
tree: !0,
|
|
3559
3592
|
ellipsis: { tooltip: !0 }
|
|
3560
|
-
},
|
|
3561
|
-
title:
|
|
3593
|
+
}, ie = {
|
|
3594
|
+
title: a("Common.action"),
|
|
3562
3595
|
key: "actions",
|
|
3563
3596
|
width: 240,
|
|
3564
3597
|
fixed: "right",
|
|
@@ -3570,21 +3603,21 @@ var wi = [
|
|
|
3570
3603
|
type: "normal",
|
|
3571
3604
|
key: "add-child",
|
|
3572
3605
|
color: "primary",
|
|
3573
|
-
buttonText:
|
|
3574
|
-
onClick: (e) =>
|
|
3606
|
+
buttonText: a("BOM.addChild"),
|
|
3607
|
+
onClick: (e) => I(e)
|
|
3575
3608
|
}, ...Number(e.level) === 1 ? [] : [{
|
|
3576
3609
|
type: "normal",
|
|
3577
3610
|
key: "add-sibling",
|
|
3578
3611
|
color: "primary",
|
|
3579
|
-
buttonText:
|
|
3580
|
-
onClick: (e) =>
|
|
3612
|
+
buttonText: a("BOM.addSibling"),
|
|
3613
|
+
onClick: (e) => R(e)
|
|
3581
3614
|
}, {
|
|
3582
3615
|
type: "normal",
|
|
3583
3616
|
key: "delete",
|
|
3584
3617
|
color: "error",
|
|
3585
|
-
buttonText:
|
|
3586
|
-
confirmText:
|
|
3587
|
-
onClick: (e) =>
|
|
3618
|
+
buttonText: a("Common.delete"),
|
|
3619
|
+
confirmText: a("BOM.deleteConfirm"),
|
|
3620
|
+
onClick: (e) => ne(e)
|
|
3588
3621
|
}]],
|
|
3589
3622
|
rowData: e,
|
|
3590
3623
|
hProps: {
|
|
@@ -3592,120 +3625,132 @@ var wi = [
|
|
|
3592
3625
|
secondary: !0
|
|
3593
3626
|
}
|
|
3594
3627
|
})
|
|
3595
|
-
},
|
|
3596
|
-
|
|
3597
|
-
|
|
3628
|
+
}, z = n(() => Number(e.status) === 2 ? s.value.filter((e) => e.key !== "actions") : s.value), ae = n(() => z.value.reduce((e, t) => {
|
|
3629
|
+
let n = "width" in t ? Number(t.width) : 120;
|
|
3630
|
+
return e + (Number.isFinite(n) ? n : 120);
|
|
3631
|
+
}, 0)), oe = (e) => {
|
|
3632
|
+
S(e);
|
|
3633
|
+
}, se = (e) => {
|
|
3598
3634
|
let t = Math.trunc(Number(e.level));
|
|
3599
3635
|
if (!Number.isFinite(t) || t < 1) return null;
|
|
3600
3636
|
let n = (t - 1) % 4 + 1, r = Math.floor((t - 1) / 4);
|
|
3601
3637
|
return {
|
|
3602
|
-
color:
|
|
3638
|
+
color: Ei[n - 1],
|
|
3603
3639
|
strength: `${Math.min(10 + r * 5, 40)}%`
|
|
3604
3640
|
};
|
|
3605
3641
|
};
|
|
3606
|
-
return
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3642
|
+
return M(() => i?.value?.()?.ticket_counts, (e) => {
|
|
3643
|
+
i?.value && d.value.forEach((t) => {
|
|
3644
|
+
t.counts = e, ri(Array.isArray(t.children) ? t.children : [], e);
|
|
3645
|
+
});
|
|
3646
|
+
}), M(() => e.value, (e) => {
|
|
3647
|
+
e !== d.value && (D(), d.value = ee(e), e?.length || t("update:value", d.value));
|
|
3648
|
+
}), M(d, () => C(), { immediate: !0 }), y(async () => {
|
|
3649
|
+
e.value?.length || t("update:value", d.value);
|
|
3650
|
+
let n = await Jn("bom_col");
|
|
3651
|
+
n = tt.parse(n.viewJson), n = yi(n.table);
|
|
3652
|
+
let { tableColumns: r } = await Ti(n), i = r.filter((e) => e.show).map((t) => ({
|
|
3653
|
+
title: t.title,
|
|
3654
|
+
key: t.key,
|
|
3655
|
+
width: t.width ?? 120,
|
|
3656
|
+
render: (n, r) => f(me, {
|
|
3616
3657
|
showLabel: !1,
|
|
3617
3658
|
showFeedback: !1,
|
|
3618
|
-
path: `child[${
|
|
3619
|
-
rule:
|
|
3620
|
-
...
|
|
3621
|
-
validator: typeof
|
|
3622
|
-
index:
|
|
3659
|
+
path: `child[${r}].${t.key}`,
|
|
3660
|
+
rule: t.form.rule?.required ? {
|
|
3661
|
+
...t.form.rule,
|
|
3662
|
+
validator: typeof t.form.rule.validator == "function" ? t.form.rule.validator : void 0,
|
|
3663
|
+
index: r
|
|
3623
3664
|
} : void 0
|
|
3624
3665
|
}, { default: () => f(Tr, {
|
|
3625
|
-
item:
|
|
3626
|
-
formValue:
|
|
3627
|
-
status:
|
|
3628
|
-
itemIndex:
|
|
3666
|
+
item: t,
|
|
3667
|
+
formValue: k(n, t),
|
|
3668
|
+
status: e.status,
|
|
3669
|
+
itemIndex: r
|
|
3629
3670
|
}) })
|
|
3630
|
-
}))
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3671
|
+
}));
|
|
3672
|
+
s.value = [
|
|
3673
|
+
N,
|
|
3674
|
+
re,
|
|
3675
|
+
...i,
|
|
3676
|
+
ie
|
|
3635
3677
|
];
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
t: r,
|
|
3642
|
-
formRef: i,
|
|
3643
|
-
innerData: l,
|
|
3644
|
-
tableRef: ee,
|
|
3678
|
+
}), r({ validate: async () => (await o.value?.validate(), d.value) }), v(D), {
|
|
3679
|
+
t: a,
|
|
3680
|
+
formRef: o,
|
|
3681
|
+
innerData: d,
|
|
3682
|
+
tableRef: F,
|
|
3645
3683
|
tableVersion: te,
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
innerExpandedRowKeys:
|
|
3649
|
-
getRowKey:
|
|
3684
|
+
displayedTableCols: z,
|
|
3685
|
+
displayedScrollX: ae,
|
|
3686
|
+
innerExpandedRowKeys: m,
|
|
3687
|
+
getRowKey: _,
|
|
3650
3688
|
getRowProps: (e) => {
|
|
3651
|
-
let t =
|
|
3689
|
+
let t = se(e);
|
|
3652
3690
|
return {
|
|
3653
|
-
...
|
|
3691
|
+
...P(e),
|
|
3654
3692
|
...t ? { style: `--uz-bom-level-color: ${t.color}; --uz-bom-level-strength: ${t.strength}` } : {}
|
|
3655
3693
|
};
|
|
3656
3694
|
},
|
|
3657
|
-
handleExpandedRowKeysChange:
|
|
3695
|
+
handleExpandedRowKeysChange: oe
|
|
3658
3696
|
};
|
|
3659
3697
|
}
|
|
3660
|
-
}),
|
|
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: ""
|
|
3698
|
+
}), Oi = { class: "uz-bom uz-flex-1 uz-w-full" }, ki = { class: "uz-flex uz-flex-col uz-justify-between" }, Ai = { class: "uz-com-title" }, ji = {
|
|
3699
|
+
key: 0,
|
|
3700
|
+
class: "uz-table-asterisk"
|
|
3701
|
+
};
|
|
3702
|
+
function Mi(e, t, n, s, u, d) {
|
|
3703
|
+
let f = D("NDataTable"), p = D("NForm");
|
|
3704
|
+
return x(), a("div", Oi, [o("div", ki, [
|
|
3705
|
+
o("div", Ai, [c(A(e.item.label) + " ", 1), e.item.form.rule.required ? (x(), a("span", ji, " \xA0* ")) : i("", !0)]),
|
|
3706
|
+
t[0] ||= o("div", { class: "uz-br" }, null, -1),
|
|
3707
|
+
l(p, {
|
|
3708
|
+
ref: "formRef",
|
|
3709
|
+
model: { child: e.innerData }
|
|
3685
3710
|
}, {
|
|
3686
|
-
|
|
3711
|
+
default: P(() => [(x(), r(f, {
|
|
3712
|
+
key: e.tableVersion,
|
|
3713
|
+
ref: "tableRef",
|
|
3714
|
+
columns: e.displayedTableCols,
|
|
3715
|
+
data: e.innerData,
|
|
3716
|
+
"row-props": e.getRowProps,
|
|
3717
|
+
"row-key": e.getRowKey,
|
|
3718
|
+
"children-key": "children",
|
|
3719
|
+
indent: 0,
|
|
3720
|
+
"expanded-row-keys": e.innerExpandedRowKeys,
|
|
3721
|
+
"min-height": e.height,
|
|
3722
|
+
"max-height": e.height,
|
|
3723
|
+
"scroll-x": e.displayedScrollX,
|
|
3724
|
+
pagination: !1,
|
|
3725
|
+
size: "small",
|
|
3726
|
+
"onUpdate:expandedRowKeys": e.handleExpandedRowKeysChange,
|
|
3727
|
+
"scrollbar-props": { trigger: "none" },
|
|
3728
|
+
remote: ""
|
|
3729
|
+
}, {
|
|
3730
|
+
empty: P(() => [E(e.$slots, "empty", {}, () => [c(A(e.t("BOM.empty")), 1)])]),
|
|
3731
|
+
_: 3
|
|
3732
|
+
}, 8, [
|
|
3733
|
+
"columns",
|
|
3734
|
+
"data",
|
|
3735
|
+
"row-props",
|
|
3736
|
+
"row-key",
|
|
3737
|
+
"expanded-row-keys",
|
|
3738
|
+
"min-height",
|
|
3739
|
+
"max-height",
|
|
3740
|
+
"scroll-x",
|
|
3741
|
+
"onUpdate:expandedRowKeys"
|
|
3742
|
+
]))]),
|
|
3687
3743
|
_: 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"])]);
|
|
3744
|
+
}, 8, ["model"])
|
|
3745
|
+
])]);
|
|
3701
3746
|
}
|
|
3702
|
-
var
|
|
3747
|
+
var Ni = /*#__PURE__*/ Q(Di, [["render", Mi]]), Pi = 46, Fi = 8, Ii = 2 * Math.PI * Pi, Li = Fi, Ri = 19, zi = 69, Bi = 52, Vi = 8, Hi = 135, Ui = 270, Wi = 2 * Math.PI * Bi, Gi = Ui / 360 * Wi, Ki = 11, qi = `rotate(${Hi} 60 ${zi})`, Ji = (e, t, n, r) => {
|
|
3703
3748
|
let i = r * Math.PI / 180;
|
|
3704
3749
|
return {
|
|
3705
3750
|
x: e + n * Math.cos(i),
|
|
3706
3751
|
y: t + n * Math.sin(i)
|
|
3707
3752
|
};
|
|
3708
|
-
},
|
|
3753
|
+
}, Yi = ({ x: e, y: t }) => `${e.toFixed(3)} ${t.toFixed(3)}`, Xi = (e, t, n, r, i, a) => {
|
|
3709
3754
|
if (a <= 0) return "";
|
|
3710
3755
|
let o = n + r / 2, s = n - r / 2;
|
|
3711
3756
|
if (a >= 359.999) {
|
|
@@ -3717,16 +3762,16 @@ var Oi = /*#__PURE__*/ Q(Ti, [["render", Di]]), ki = 46, Ai = 8, ji = 2 * Math.P
|
|
|
3717
3762
|
`A ${s} ${s} 0 1 0 ${i}`
|
|
3718
3763
|
].join(" ");
|
|
3719
3764
|
}
|
|
3720
|
-
let c = i + a, l =
|
|
3765
|
+
let c = i + a, l = Ji(e, t, o, i), u = Ji(e, t, o, c), d = Ji(e, t, s, c), f = Ji(e, t, s, i), p = r / 2, m = +(a > 180);
|
|
3721
3766
|
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 ${
|
|
3767
|
+
`M ${Yi(l)}`,
|
|
3768
|
+
`A ${o} ${o} 0 ${m} 1 ${Yi(u)}`,
|
|
3769
|
+
`A ${p} ${p} 0 0 1 ${Yi(d)}`,
|
|
3770
|
+
`A ${s} ${s} 0 ${m} 0 ${Yi(f)}`,
|
|
3771
|
+
`A ${p} ${p} 0 0 1 ${Yi(l)}`,
|
|
3727
3772
|
"Z"
|
|
3728
3773
|
].join(" ");
|
|
3729
|
-
},
|
|
3774
|
+
}, Zi = (e) => {
|
|
3730
3775
|
if (!e) return "";
|
|
3731
3776
|
let t = e.toLowerCase();
|
|
3732
3777
|
if (t.length > 6 && (t = t.substring(0, 7)), t && /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)) {
|
|
@@ -3740,7 +3785,7 @@ var Oi = /*#__PURE__*/ Q(Ti, [["render", Di]]), ki = 46, Ai = 8, ji = 2 * Math.P
|
|
|
3740
3785
|
return e.join(",");
|
|
3741
3786
|
}
|
|
3742
3787
|
return "0,0,0";
|
|
3743
|
-
},
|
|
3788
|
+
}, Qi = d({
|
|
3744
3789
|
name: "UzCircle",
|
|
3745
3790
|
components: { UzNumberFlow: rt },
|
|
3746
3791
|
props: {
|
|
@@ -3763,14 +3808,14 @@ var Oi = /*#__PURE__*/ Q(Ti, [["render", Di]]), ki = 46, Ai = 8, ji = 2 * Math.P
|
|
|
3763
3808
|
}
|
|
3764
3809
|
},
|
|
3765
3810
|
setup(e) {
|
|
3766
|
-
let t = ee(), r = `uz-blurs-${t}`, i = n(() => `rgba(${
|
|
3811
|
+
let t = ee(), r = `uz-blurs-${t}`, i = n(() => `rgba(${Zi(e.color).split(",").map((e) => {
|
|
3767
3812
|
let t = Number(e) - 50;
|
|
3768
3813
|
return t < 0 && (t = 0), t;
|
|
3769
|
-
})},1)`), a = n(() => `rgba(${
|
|
3814
|
+
})},1)`), a = n(() => `rgba(${Zi(e.color)},1)`), o = n(() => {
|
|
3770
3815
|
let t = Number(e.circle);
|
|
3771
3816
|
return Number.isFinite(t) ? Math.min(100, Math.max(0, t)) : 0;
|
|
3772
3817
|
}), s = w(o.value), c;
|
|
3773
|
-
|
|
3818
|
+
M(o, (e) => {
|
|
3774
3819
|
if (c !== void 0 && cancelAnimationFrame(c), typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches || typeof requestAnimationFrame > "u") {
|
|
3775
3820
|
s.value = e;
|
|
3776
3821
|
return;
|
|
@@ -3785,62 +3830,62 @@ var Oi = /*#__PURE__*/ Q(Ti, [["render", Di]]), ki = 46, Ai = 8, ji = 2 * Math.P
|
|
|
3785
3830
|
c !== void 0 && cancelAnimationFrame(c);
|
|
3786
3831
|
});
|
|
3787
3832
|
let l = n(() => {
|
|
3788
|
-
let e =
|
|
3833
|
+
let e = Ii * (s.value / 100), t = Ii - e;
|
|
3789
3834
|
if (e === 0) return {
|
|
3790
3835
|
activeLength: 0,
|
|
3791
3836
|
activeStart: 0,
|
|
3792
|
-
remainingLength:
|
|
3837
|
+
remainingLength: Ii,
|
|
3793
3838
|
remainingStart: 0
|
|
3794
3839
|
};
|
|
3795
3840
|
if (t === 0) return {
|
|
3796
|
-
activeLength:
|
|
3841
|
+
activeLength: Ii,
|
|
3797
3842
|
activeStart: 0,
|
|
3798
3843
|
remainingLength: 0,
|
|
3799
3844
|
remainingStart: 0
|
|
3800
3845
|
};
|
|
3801
|
-
let n = Math.min(1, Math.min(e, t) /
|
|
3846
|
+
let n = Math.min(1, Math.min(e, t) / Ri), r = Li + 3 * n, i = Fi * n, a = e < Ri ? i : Ii - (t < Ri ? i : t - r) - r * 2, o = Ii - a - r * 2;
|
|
3802
3847
|
return {
|
|
3803
3848
|
activeLength: a,
|
|
3804
3849
|
activeStart: r / 2,
|
|
3805
3850
|
remainingLength: o,
|
|
3806
3851
|
remainingStart: r / 2 + a + r
|
|
3807
3852
|
};
|
|
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 =
|
|
3853
|
+
}), u = n(() => l.value.activeLength), d = n(() => l.value.activeStart), f = n(() => l.value.remainingLength), p = n(() => l.value.remainingStart), m = n(() => Xi(60, 60, Pi, Fi, -90 + p.value / Ii * 360, f.value / Ii * 360)), h = n(() => {
|
|
3854
|
+
let e = Gi * (s.value / 100), t = Gi - e;
|
|
3810
3855
|
if (e === 0) return {
|
|
3811
3856
|
activeLength: 0,
|
|
3812
|
-
remainingLength:
|
|
3857
|
+
remainingLength: Gi,
|
|
3813
3858
|
remainingStart: 0
|
|
3814
3859
|
};
|
|
3815
3860
|
if (t === 0) return {
|
|
3816
|
-
activeLength:
|
|
3861
|
+
activeLength: Gi,
|
|
3817
3862
|
remainingLength: 0,
|
|
3818
3863
|
remainingStart: 0
|
|
3819
3864
|
};
|
|
3820
|
-
let n = Math.min(
|
|
3865
|
+
let n = Math.min(Ki, e, t);
|
|
3821
3866
|
return {
|
|
3822
3867
|
activeLength: e - n / 2,
|
|
3823
3868
|
remainingLength: t - n / 2,
|
|
3824
3869
|
remainingStart: e + n / 2
|
|
3825
3870
|
};
|
|
3826
|
-
}), g = n(() => h.value.activeLength), _ = n(() => h.value.remainingLength), y = n(() => h.value.remainingStart), b = n(() =>
|
|
3871
|
+
}), g = n(() => h.value.activeLength), _ = n(() => h.value.remainingLength), y = n(() => h.value.remainingStart), b = n(() => Xi(60, zi, Bi, Vi, Hi + y.value / Wi * 360, _.value / Wi * 360));
|
|
3827
3872
|
return {
|
|
3828
3873
|
color: n(() => e.color),
|
|
3829
3874
|
colorA: i,
|
|
3830
3875
|
colorB: a,
|
|
3831
|
-
fullRadius:
|
|
3832
|
-
fullStrokeWidth:
|
|
3833
|
-
fullCircumference:
|
|
3876
|
+
fullRadius: Pi,
|
|
3877
|
+
fullStrokeWidth: Fi,
|
|
3878
|
+
fullCircumference: Ii,
|
|
3834
3879
|
fullActiveLength: u,
|
|
3835
3880
|
fullActiveStart: d,
|
|
3836
3881
|
fullRemainingLength: f,
|
|
3837
3882
|
fullRemainingStart: p,
|
|
3838
3883
|
fullRemainingPath: m,
|
|
3839
|
-
gaugeCenterY:
|
|
3840
|
-
gaugeRadius:
|
|
3841
|
-
gaugeStrokeWidth:
|
|
3842
|
-
gaugeCircumference:
|
|
3843
|
-
gaugeTransform:
|
|
3884
|
+
gaugeCenterY: zi,
|
|
3885
|
+
gaugeRadius: Bi,
|
|
3886
|
+
gaugeStrokeWidth: Vi,
|
|
3887
|
+
gaugeCircumference: Wi,
|
|
3888
|
+
gaugeTransform: qi,
|
|
3844
3889
|
gaugeActiveLength: g,
|
|
3845
3890
|
gaugeRemainingLength: _,
|
|
3846
3891
|
gaugeRemainingStart: y,
|
|
@@ -3849,31 +3894,31 @@ var Oi = /*#__PURE__*/ Q(Ti, [["render", Di]]), ki = 46, Ai = 8, ji = 2 * Math.P
|
|
|
3849
3894
|
blurFilterId: r
|
|
3850
3895
|
};
|
|
3851
3896
|
}
|
|
3852
|
-
}),
|
|
3897
|
+
}), $i = { class: "uz-circle" }, ea = {
|
|
3853
3898
|
key: 0,
|
|
3854
3899
|
viewBox: "0 0 120 120",
|
|
3855
3900
|
"aria-hidden": "true"
|
|
3856
|
-
},
|
|
3901
|
+
}, ta = ["id"], na = ["stop-color"], ra = ["stop-color"], ia = ["id"], aa = [
|
|
3857
3902
|
"r",
|
|
3858
3903
|
"stroke-width",
|
|
3859
3904
|
"stroke-dasharray",
|
|
3860
3905
|
"stroke-dashoffset",
|
|
3861
3906
|
"filter",
|
|
3862
3907
|
"stroke"
|
|
3863
|
-
],
|
|
3908
|
+
], oa = [
|
|
3864
3909
|
"d",
|
|
3865
3910
|
"fill",
|
|
3866
3911
|
"filter"
|
|
3867
|
-
],
|
|
3912
|
+
], sa = {
|
|
3868
3913
|
class: "uz-circle__unit",
|
|
3869
3914
|
x: "60",
|
|
3870
3915
|
y: "82",
|
|
3871
3916
|
"text-anchor": "middle"
|
|
3872
|
-
},
|
|
3917
|
+
}, ca = {
|
|
3873
3918
|
key: 1,
|
|
3874
3919
|
viewBox: "0 0 120 120",
|
|
3875
3920
|
"aria-hidden": "true"
|
|
3876
|
-
},
|
|
3921
|
+
}, la = ["id"], ua = ["stop-color"], da = ["stop-color"], fa = ["id"], pa = [
|
|
3877
3922
|
"cy",
|
|
3878
3923
|
"r",
|
|
3879
3924
|
"stroke-width",
|
|
@@ -3881,19 +3926,19 @@ var Oi = /*#__PURE__*/ Q(Ti, [["render", Di]]), ki = 46, Ai = 8, ji = 2 * Math.P
|
|
|
3881
3926
|
"transform",
|
|
3882
3927
|
"filter",
|
|
3883
3928
|
"stroke"
|
|
3884
|
-
],
|
|
3929
|
+
], ma = [
|
|
3885
3930
|
"d",
|
|
3886
3931
|
"fill",
|
|
3887
3932
|
"filter"
|
|
3888
|
-
],
|
|
3933
|
+
], ha = {
|
|
3889
3934
|
class: "uz-circle__unit uz-circle__unit--gauge",
|
|
3890
3935
|
x: "60",
|
|
3891
3936
|
y: "90",
|
|
3892
3937
|
"text-anchor": "middle"
|
|
3893
3938
|
};
|
|
3894
|
-
function
|
|
3939
|
+
function ga(e, t, n, r, s, c) {
|
|
3895
3940
|
let u = D("UzNumberFlow");
|
|
3896
|
-
return x(), a("div",
|
|
3941
|
+
return x(), a("div", $i, [e.mode === 0 ? (x(), a("svg", ea, [
|
|
3897
3942
|
o("defs", null, [o("linearGradient", {
|
|
3898
3943
|
id: `uz-progress-grad-${e.uniqueId}`,
|
|
3899
3944
|
x1: "1",
|
|
@@ -3903,10 +3948,10 @@ function da(e, t, n, r, s, c) {
|
|
|
3903
3948
|
}, [o("stop", {
|
|
3904
3949
|
offset: "0%",
|
|
3905
3950
|
"stop-color": e.colorA
|
|
3906
|
-
}, null, 8,
|
|
3951
|
+
}, null, 8, na), o("stop", {
|
|
3907
3952
|
offset: "50%",
|
|
3908
3953
|
"stop-color": e.colorB
|
|
3909
|
-
}, null, 8,
|
|
3954
|
+
}, null, 8, ra)], 8, ta), o("filter", { id: e.blurFilterId }, [...t[0] ||= [
|
|
3910
3955
|
o("feOffset", {
|
|
3911
3956
|
result: "offOut",
|
|
3912
3957
|
in: "SourceGraphic",
|
|
@@ -3923,7 +3968,7 @@ function da(e, t, n, r, s, c) {
|
|
|
3923
3968
|
in2: "blurOut",
|
|
3924
3969
|
mode: "normal"
|
|
3925
3970
|
}, null, -1)
|
|
3926
|
-
]], 8,
|
|
3971
|
+
]], 8, ia)]),
|
|
3927
3972
|
e.fullActiveLength > 0 ? (x(), a("circle", {
|
|
3928
3973
|
key: 0,
|
|
3929
3974
|
class: "uz-circle__progress",
|
|
@@ -3938,7 +3983,7 @@ function da(e, t, n, r, s, c) {
|
|
|
3938
3983
|
transform: "rotate(-90 60 60)",
|
|
3939
3984
|
filter: `url(#${e.blurFilterId})`,
|
|
3940
3985
|
stroke: `url(#uz-progress-grad-${e.uniqueId})`
|
|
3941
|
-
}, null, 8,
|
|
3986
|
+
}, null, 8, aa)) : i("", !0),
|
|
3942
3987
|
e.fullRemainingPath ? (x(), a("path", {
|
|
3943
3988
|
key: 1,
|
|
3944
3989
|
class: "uz-circle__progress",
|
|
@@ -3946,9 +3991,9 @@ function da(e, t, n, r, s, c) {
|
|
|
3946
3991
|
fill: e.color,
|
|
3947
3992
|
"fill-opacity": "0.1",
|
|
3948
3993
|
filter: `url(#${e.blurFilterId})`
|
|
3949
|
-
}, null, 8,
|
|
3950
|
-
o("text",
|
|
3951
|
-
])) : (x(), a("svg",
|
|
3994
|
+
}, null, 8, oa)) : i("", !0),
|
|
3995
|
+
o("text", sa, A(e.circleUnit), 1)
|
|
3996
|
+
])) : (x(), a("svg", ca, [
|
|
3952
3997
|
o("defs", null, [o("linearGradient", {
|
|
3953
3998
|
id: `uz-progress-grad-1-${e.uniqueId}`,
|
|
3954
3999
|
x1: "1",
|
|
@@ -3958,10 +4003,10 @@ function da(e, t, n, r, s, c) {
|
|
|
3958
4003
|
}, [o("stop", {
|
|
3959
4004
|
offset: "0%",
|
|
3960
4005
|
"stop-color": e.colorA
|
|
3961
|
-
}, null, 8,
|
|
4006
|
+
}, null, 8, ua), o("stop", {
|
|
3962
4007
|
offset: "50%",
|
|
3963
4008
|
"stop-color": e.colorB
|
|
3964
|
-
}, null, 8,
|
|
4009
|
+
}, null, 8, da)], 8, la), o("filter", { id: e.blurFilterId }, [...t[1] ||= [
|
|
3965
4010
|
o("feOffset", {
|
|
3966
4011
|
result: "offOut",
|
|
3967
4012
|
in: "SourceGraphic",
|
|
@@ -3978,7 +4023,7 @@ function da(e, t, n, r, s, c) {
|
|
|
3978
4023
|
in2: "blurOut",
|
|
3979
4024
|
mode: "normal"
|
|
3980
4025
|
}, null, -1)
|
|
3981
|
-
]], 8,
|
|
4026
|
+
]], 8, fa)]),
|
|
3982
4027
|
e.gaugeActiveLength > 0 ? (x(), a("circle", {
|
|
3983
4028
|
key: 0,
|
|
3984
4029
|
class: "uz-circle__progress",
|
|
@@ -3992,7 +4037,7 @@ function da(e, t, n, r, s, c) {
|
|
|
3992
4037
|
transform: e.gaugeTransform,
|
|
3993
4038
|
filter: `url(#${e.blurFilterId})`,
|
|
3994
4039
|
stroke: `url(#uz-progress-grad-1-${e.uniqueId})`
|
|
3995
|
-
}, null, 8,
|
|
4040
|
+
}, null, 8, pa)) : i("", !0),
|
|
3996
4041
|
e.gaugeRemainingPath ? (x(), a("path", {
|
|
3997
4042
|
key: 1,
|
|
3998
4043
|
class: "uz-circle__progress",
|
|
@@ -4000,15 +4045,15 @@ function da(e, t, n, r, s, c) {
|
|
|
4000
4045
|
fill: e.color,
|
|
4001
4046
|
"fill-opacity": "0.1",
|
|
4002
4047
|
filter: `url(#${e.blurFilterId})`
|
|
4003
|
-
}, null, 8,
|
|
4004
|
-
o("text",
|
|
4048
|
+
}, null, 8, ma)) : i("", !0),
|
|
4049
|
+
o("text", ha, A(e.circleUnit), 1)
|
|
4005
4050
|
])), 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
4051
|
}
|
|
4007
|
-
var
|
|
4052
|
+
var _a = /*#__PURE__*/ Q(Qi, [["render", ga]]), va = d({
|
|
4008
4053
|
name: "UzCamera",
|
|
4009
4054
|
components: {
|
|
4010
|
-
NButton:
|
|
4011
|
-
NModal:
|
|
4055
|
+
NButton: L,
|
|
4056
|
+
NModal: Ce
|
|
4012
4057
|
},
|
|
4013
4058
|
props: {
|
|
4014
4059
|
mode: {
|
|
@@ -4030,7 +4075,7 @@ var fa = /*#__PURE__*/ Q(qi, [["render", da]]), pa = d({
|
|
|
4030
4075
|
},
|
|
4031
4076
|
emits: ["on-update:value"],
|
|
4032
4077
|
setup(e, { emit: t }) {
|
|
4033
|
-
let { t: n } =
|
|
4078
|
+
let { t: n } = U(), r = w(), i = w(!1), a = w(!1), o = He(), s = null, c = null, l = (e, t) => {
|
|
4034
4079
|
s.beginPath(), s.moveTo(e.x, e.y), s.lineTo(t.x, t.y), s.lineWidth = 2, s.strokeStyle = "green", s.stroke();
|
|
4035
4080
|
}, u = () => {
|
|
4036
4081
|
a.value && requestAnimationFrame(d);
|
|
@@ -4086,7 +4131,7 @@ var fa = /*#__PURE__*/ Q(qi, [["render", da]]), pa = d({
|
|
|
4086
4131
|
e.mode === "video" && g();
|
|
4087
4132
|
}), v(() => {
|
|
4088
4133
|
f();
|
|
4089
|
-
}),
|
|
4134
|
+
}), M([() => e.width, () => e.width], () => {
|
|
4090
4135
|
e.mode === "video" && (f(), g());
|
|
4091
4136
|
}), {
|
|
4092
4137
|
t: n,
|
|
@@ -4097,11 +4142,11 @@ var fa = /*#__PURE__*/ Q(qi, [["render", da]]), pa = d({
|
|
|
4097
4142
|
closeAll: f
|
|
4098
4143
|
};
|
|
4099
4144
|
}
|
|
4100
|
-
}),
|
|
4145
|
+
}), ya = ["width", "height"], ba = ["width", "height"], xa = { class: "uz-scan-video" }, Sa = {
|
|
4101
4146
|
ref: "videoRef",
|
|
4102
4147
|
playsInline: ""
|
|
4103
4148
|
};
|
|
4104
|
-
function
|
|
4149
|
+
function Ca(t, n, s, l, u, d) {
|
|
4105
4150
|
let f = D("NButton"), p = D("NModal");
|
|
4106
4151
|
return x(), a(e, null, [
|
|
4107
4152
|
t.mode === "button" ? (x(), r(f, {
|
|
@@ -4110,7 +4155,7 @@ function va(t, n, s, l, u, d) {
|
|
|
4110
4155
|
loading: t.loading,
|
|
4111
4156
|
onClick: t.doScan
|
|
4112
4157
|
}, {
|
|
4113
|
-
default:
|
|
4158
|
+
default: P(() => [c(A(t.t("Common.scan")), 1)]),
|
|
4114
4159
|
_: 1
|
|
4115
4160
|
}, 8, ["loading", "onClick"])) : i("", !0),
|
|
4116
4161
|
t.mode === "button" ? (x(), r(p, {
|
|
@@ -4123,7 +4168,7 @@ function va(t, n, s, l, u, d) {
|
|
|
4123
4168
|
"mask-closable": !1,
|
|
4124
4169
|
"on-after-leave": t.closeAll
|
|
4125
4170
|
}, {
|
|
4126
|
-
default:
|
|
4171
|
+
default: P(() => [o("div", {
|
|
4127
4172
|
class: "uz-scan-canvas-main",
|
|
4128
4173
|
style: _({
|
|
4129
4174
|
width: `${t.width}px`,
|
|
@@ -4133,7 +4178,7 @@ function va(t, n, s, l, u, d) {
|
|
|
4133
4178
|
id: "uz-scan-canvas",
|
|
4134
4179
|
width: t.width,
|
|
4135
4180
|
height: t.height
|
|
4136
|
-
}, null, 8,
|
|
4181
|
+
}, null, 8, ya)], 4)]),
|
|
4137
4182
|
_: 1
|
|
4138
4183
|
}, 8, [
|
|
4139
4184
|
"show",
|
|
@@ -4151,21 +4196,21 @@ function va(t, n, s, l, u, d) {
|
|
|
4151
4196
|
id: "uz-scan-canvas",
|
|
4152
4197
|
width: t.width,
|
|
4153
4198
|
height: t.height
|
|
4154
|
-
}, null, 8,
|
|
4155
|
-
o("div",
|
|
4199
|
+
}, null, 8, ba)], 4)) : i("", !0),
|
|
4200
|
+
o("div", xa, [o("video", Sa, null, 512)])
|
|
4156
4201
|
], 64);
|
|
4157
4202
|
}
|
|
4158
|
-
var
|
|
4203
|
+
var wa = /*#__PURE__*/ Q(va, [["render", Ca]]), Ta = /* @__PURE__ */ new WeakMap(), Ea = d({
|
|
4159
4204
|
name: "UzSearchBar",
|
|
4160
4205
|
components: {
|
|
4161
|
-
NIcon:
|
|
4162
|
-
NButton:
|
|
4163
|
-
NButtonGroup:
|
|
4164
|
-
NGrid:
|
|
4165
|
-
NGridItem:
|
|
4166
|
-
NInputGroup:
|
|
4167
|
-
NInputGroupLabel:
|
|
4168
|
-
NPopover:
|
|
4206
|
+
NIcon: V,
|
|
4207
|
+
NButton: L,
|
|
4208
|
+
NButtonGroup: R,
|
|
4209
|
+
NGrid: he,
|
|
4210
|
+
NGridItem: ge,
|
|
4211
|
+
NInputGroup: be,
|
|
4212
|
+
NInputGroupLabel: xe,
|
|
4213
|
+
NPopover: Ee,
|
|
4169
4214
|
UzFormItem: Tr
|
|
4170
4215
|
},
|
|
4171
4216
|
props: {
|
|
@@ -4204,17 +4249,17 @@ var ya = /*#__PURE__*/ Q(pa, [["render", va]]), ba = /* @__PURE__ */ new WeakMap
|
|
|
4204
4249
|
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
4250
|
}
|
|
4206
4251
|
});
|
|
4207
|
-
n.observe(e),
|
|
4252
|
+
n.observe(e), Ta.set(e, n);
|
|
4208
4253
|
},
|
|
4209
4254
|
unmounted: (e) => {
|
|
4210
|
-
|
|
4255
|
+
Ta.get(e)?.disconnect(), Ta.delete(e);
|
|
4211
4256
|
}
|
|
4212
4257
|
} },
|
|
4213
4258
|
emits: ["update:loading", "on-update:value"],
|
|
4214
4259
|
setup(e, { emit: t }) {
|
|
4215
|
-
let { t: n } =
|
|
4260
|
+
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
4261
|
if (e.loading) return;
|
|
4217
|
-
let r =
|
|
4262
|
+
let r = W(i.value);
|
|
4218
4263
|
!n && r.query && (r.query.page = 1);
|
|
4219
4264
|
let o = [];
|
|
4220
4265
|
a.value.forEach((e) => {
|
|
@@ -4233,7 +4278,7 @@ var ya = /*#__PURE__*/ Q(pa, [["render", va]]), ba = /* @__PURE__ */ new WeakMap
|
|
|
4233
4278
|
}
|
|
4234
4279
|
}), t("update:loading", !0), t("on-update:value", o);
|
|
4235
4280
|
}, y = () => {
|
|
4236
|
-
e.loading || (i.value =
|
|
4281
|
+
e.loading || (i.value = W(o.value), v());
|
|
4237
4282
|
}, b = () => {
|
|
4238
4283
|
s.value = !s.value;
|
|
4239
4284
|
}, 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 +4291,7 @@ var ya = /*#__PURE__*/ Q(pa, [["render", va]]), ba = /* @__PURE__ */ new WeakMap
|
|
|
4246
4291
|
if (e.params.type.indexOf("range") > -1) switch (e.search.defaultValue) {
|
|
4247
4292
|
case "now":
|
|
4248
4293
|
{
|
|
4249
|
-
let t =
|
|
4294
|
+
let t = $e().startOf("day").valueOf(), r = $e().endOf("day").valueOf();
|
|
4250
4295
|
n[e.key] = [t, r];
|
|
4251
4296
|
}
|
|
4252
4297
|
break;
|
|
@@ -4270,7 +4315,7 @@ var ya = /*#__PURE__*/ Q(pa, [["render", va]]), ba = /* @__PURE__ */ new WeakMap
|
|
|
4270
4315
|
};
|
|
4271
4316
|
}, C = (t) => {
|
|
4272
4317
|
if (h.value = [], t && t.length > 0) {
|
|
4273
|
-
let { data: n, values: s } = S(
|
|
4318
|
+
let { data: n, values: s } = S(W(t)), c = {}, l = e.id || r.params.id;
|
|
4274
4319
|
if (e.cache && l) {
|
|
4275
4320
|
let e = J(`tables_${l}`, !1);
|
|
4276
4321
|
e && e.params.forEach((e) => {
|
|
@@ -4284,14 +4329,14 @@ var ya = /*#__PURE__*/ Q(pa, [["render", va]]), ba = /* @__PURE__ */ new WeakMap
|
|
|
4284
4329
|
c[e.key] = e.value;
|
|
4285
4330
|
});
|
|
4286
4331
|
}
|
|
4287
|
-
a.value = n, i.value =
|
|
4332
|
+
a.value = n, i.value = W({
|
|
4288
4333
|
...s,
|
|
4289
4334
|
...c
|
|
4290
|
-
}), o.value =
|
|
4335
|
+
}), o.value = W(s);
|
|
4291
4336
|
}
|
|
4292
4337
|
v(!0);
|
|
4293
4338
|
};
|
|
4294
|
-
return
|
|
4339
|
+
return M(() => e.data, (e) => {
|
|
4295
4340
|
C(e);
|
|
4296
4341
|
}), {
|
|
4297
4342
|
t: n,
|
|
@@ -4323,60 +4368,60 @@ var ya = /*#__PURE__*/ Q(pa, [["render", va]]), ba = /* @__PURE__ */ new WeakMap
|
|
|
4323
4368
|
tabButtonType: x
|
|
4324
4369
|
};
|
|
4325
4370
|
}
|
|
4326
|
-
}),
|
|
4371
|
+
}), Da = { class: "uz-flex uz-justify-between uz-gap-2" }, Oa = {
|
|
4327
4372
|
key: 0,
|
|
4328
4373
|
class: "uz-flex uz-items-start uz-justify-between uz-gap-2 uz-w-full"
|
|
4329
|
-
},
|
|
4374
|
+
}, ka = { key: 0 }, Aa = { class: "uz-flex-1" }, ja = {
|
|
4330
4375
|
key: 1,
|
|
4331
4376
|
class: "uz-flex uz-gap-2 uz-flex-1"
|
|
4332
|
-
},
|
|
4377
|
+
}, Ma = {
|
|
4333
4378
|
key: 0,
|
|
4334
4379
|
class: "uz-search-fields-collapse"
|
|
4335
4380
|
};
|
|
4336
|
-
function
|
|
4381
|
+
function Na(n, s, u, d, f, p) {
|
|
4337
4382
|
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
4383
|
return x(), a("div", {
|
|
4339
4384
|
class: "uz-search-bar uz-flex uz-flex-col uz-w-full",
|
|
4340
|
-
onKeyup: s[1] ||=
|
|
4341
|
-
}, [o("div",
|
|
4385
|
+
onKeyup: s[1] ||= te((e) => n.doSearch(!1), ["enter"])
|
|
4386
|
+
}, [o("div", Da, [n.enableHeader ? (x(), a("div", Oa, [
|
|
4342
4387
|
E(n.$slots, "header"),
|
|
4343
|
-
n.tabList && n.tabList.length > 0 ? (x(), a("div",
|
|
4344
|
-
default:
|
|
4388
|
+
n.tabList && n.tabList.length > 0 ? (x(), a("div", ka, [l(h, null, {
|
|
4389
|
+
default: P(() => [(x(!0), a(e, null, T(n.tabList, (e) => (x(), r(m, {
|
|
4345
4390
|
key: e.value,
|
|
4346
4391
|
type: n.tabButtonType(e),
|
|
4347
4392
|
quaternary: "",
|
|
4348
4393
|
onClick: (t) => n.tabItemChange(e.value)
|
|
4349
4394
|
}, {
|
|
4350
|
-
default:
|
|
4395
|
+
default: P(() => [c(A(e.label), 1)]),
|
|
4351
4396
|
_: 2
|
|
4352
4397
|
}, 1032, ["type", "onClick"]))), 128))]),
|
|
4353
4398
|
_: 1
|
|
4354
4399
|
})])) : i("", !0),
|
|
4355
|
-
|
|
4400
|
+
F((x(), a("div", Aa, [l(C, {
|
|
4356
4401
|
"x-gap": "8",
|
|
4357
4402
|
"y-gap": "8",
|
|
4358
4403
|
cols: n.cols,
|
|
4359
4404
|
"collapsed-rows": 1,
|
|
4360
4405
|
collapsed: !0
|
|
4361
4406
|
}, {
|
|
4362
|
-
default:
|
|
4407
|
+
default: P(() => [n.offset > -1 ? (x(), r(_, {
|
|
4363
4408
|
key: 0,
|
|
4364
4409
|
offset: n.offset
|
|
4365
4410
|
}, null, 8, ["offset"])) : i("", !0), n.collapsed ? (x(!0), a(e, { key: 1 }, T(n.itemData, (e, t) => (x(), r(_, {
|
|
4366
4411
|
key: `${t}_${Date.now()}`,
|
|
4367
4412
|
span: e.search.show ? e.search.span === 1 ? n.gridSpan : e.search.span || n.gridSpan : 0
|
|
4368
4413
|
}, {
|
|
4369
|
-
default:
|
|
4370
|
-
default:
|
|
4414
|
+
default: P(() => [l(S, null, {
|
|
4415
|
+
default: P(() => [l(y, {
|
|
4371
4416
|
trigger: "hover",
|
|
4372
4417
|
placement: "top-start",
|
|
4373
4418
|
overlap: ""
|
|
4374
4419
|
}, {
|
|
4375
|
-
trigger:
|
|
4376
|
-
default:
|
|
4420
|
+
trigger: P(() => [l(v, { class: "uz-group-label" }, {
|
|
4421
|
+
default: P(() => [c(A(typeof e.label == "function" ? e.label() : e.label), 1)]),
|
|
4377
4422
|
_: 2
|
|
4378
4423
|
}, 1024)]),
|
|
4379
|
-
default:
|
|
4424
|
+
default: P(() => [c(A(typeof e.label == "function" ? e.label() : e.label), 1)]),
|
|
4380
4425
|
_: 2
|
|
4381
4426
|
}, 1024), l(b, {
|
|
4382
4427
|
item: e,
|
|
@@ -4389,14 +4434,14 @@ function Oa(n, s, u, d, f, p) {
|
|
|
4389
4434
|
}, 1032, ["span"]))), 128)) : i("", !0)]),
|
|
4390
4435
|
_: 1
|
|
4391
4436
|
}, 8, ["cols"])])), [[ee]])
|
|
4392
|
-
])) : i("", !0), n.enableHeader ? (x(), a("div",
|
|
4437
|
+
])) : i("", !0), n.enableHeader ? (x(), a("div", ja, [
|
|
4393
4438
|
n.more ? (x(), r(m, {
|
|
4394
4439
|
key: 0,
|
|
4395
4440
|
secondary: "",
|
|
4396
4441
|
onClick: n.showMore
|
|
4397
4442
|
}, {
|
|
4398
|
-
icon:
|
|
4399
|
-
default:
|
|
4443
|
+
icon: P(() => [l(k, { class: g(["uz-search-more", n.collapsed ? void 0 : "uz-search-rotate"]) }, {
|
|
4444
|
+
default: P(() => [l(w, { icon: "ArrowDown" })]),
|
|
4400
4445
|
_: 1
|
|
4401
4446
|
}, 8, ["class"])]),
|
|
4402
4447
|
_: 1
|
|
@@ -4408,57 +4453,57 @@ function Oa(n, s, u, d, f, p) {
|
|
|
4408
4453
|
"show-arrow": !1,
|
|
4409
4454
|
style: { padding: "0" }
|
|
4410
4455
|
}, {
|
|
4411
|
-
trigger:
|
|
4456
|
+
trigger: P(() => [l(m, {
|
|
4412
4457
|
loading: n.loading,
|
|
4413
4458
|
secondary: "",
|
|
4414
4459
|
onClick: s[0] ||= (e) => n.doSearch(!1)
|
|
4415
4460
|
}, {
|
|
4416
|
-
icon:
|
|
4461
|
+
icon: P(() => [l(k, {
|
|
4417
4462
|
size: "18",
|
|
4418
4463
|
color: "#0086ff"
|
|
4419
4464
|
}, {
|
|
4420
|
-
default:
|
|
4465
|
+
default: P(() => [l(w, { icon: "Search" })]),
|
|
4421
4466
|
_: 1
|
|
4422
4467
|
})]),
|
|
4423
|
-
default:
|
|
4468
|
+
default: P(() => [c(" " + A(n.t("Common.search")), 1)]),
|
|
4424
4469
|
_: 1
|
|
4425
4470
|
}, 8, ["loading"])]),
|
|
4426
|
-
default:
|
|
4471
|
+
default: P(() => [l(m, {
|
|
4427
4472
|
loading: n.loading,
|
|
4428
4473
|
secondary: "",
|
|
4429
4474
|
onClick: n.clearAll
|
|
4430
4475
|
}, {
|
|
4431
|
-
icon:
|
|
4432
|
-
default:
|
|
4476
|
+
icon: P(() => [l(k, null, {
|
|
4477
|
+
default: P(() => [l(w, { icon: "Refresh" })]),
|
|
4433
4478
|
_: 1
|
|
4434
4479
|
})]),
|
|
4435
|
-
default:
|
|
4480
|
+
default: P(() => [c(" " + A(n.t("Common.reset")), 1)]),
|
|
4436
4481
|
_: 1
|
|
4437
4482
|
}, 8, ["loading", "onClick"])]),
|
|
4438
4483
|
_: 1
|
|
4439
4484
|
})) : i("", !0),
|
|
4440
4485
|
E(n.$slots, "action")
|
|
4441
4486
|
])) : i("", !0)]), l(t, { name: "uz-search-fields" }, {
|
|
4442
|
-
default:
|
|
4487
|
+
default: P(() => [!n.collapsed && n.itemData && Object.keys(n.itemData).length > 0 ? (x(), a("div", Ma, [l(C, {
|
|
4443
4488
|
"x-gap": "8",
|
|
4444
4489
|
"y-gap": "8",
|
|
4445
4490
|
cols: 4
|
|
4446
4491
|
}, {
|
|
4447
|
-
default:
|
|
4492
|
+
default: P(() => [(x(!0), a(e, null, T(n.itemData, (e, t) => (x(), r(_, {
|
|
4448
4493
|
key: t,
|
|
4449
4494
|
span: e.search.show ? n.gridSpan / 2 : 0
|
|
4450
4495
|
}, {
|
|
4451
|
-
default:
|
|
4452
|
-
default:
|
|
4496
|
+
default: P(() => [l(S, null, {
|
|
4497
|
+
default: P(() => [l(y, {
|
|
4453
4498
|
trigger: "hover",
|
|
4454
4499
|
placement: "top-start",
|
|
4455
4500
|
overlap: ""
|
|
4456
4501
|
}, {
|
|
4457
|
-
trigger:
|
|
4458
|
-
default:
|
|
4502
|
+
trigger: P(() => [l(v, { class: "uz-group-label" }, {
|
|
4503
|
+
default: P(() => [c(A(typeof e.label == "function" ? e.label() : e.label), 1)]),
|
|
4459
4504
|
_: 2
|
|
4460
4505
|
}, 1024)]),
|
|
4461
|
-
default:
|
|
4506
|
+
default: P(() => [c(A(typeof e.label == "function" ? e.label() : e.label), 1)]),
|
|
4462
4507
|
_: 2
|
|
4463
4508
|
}, 1024), l(b, {
|
|
4464
4509
|
item: e,
|
|
@@ -4474,17 +4519,17 @@ function Oa(n, s, u, d, f, p) {
|
|
|
4474
4519
|
_: 1
|
|
4475
4520
|
})], 32);
|
|
4476
4521
|
}
|
|
4477
|
-
var
|
|
4522
|
+
var Pa = /*#__PURE__*/ Q(Ea, [["render", Na]]), Fa = d({
|
|
4478
4523
|
name: "UzSearchMobileBar",
|
|
4479
4524
|
components: {
|
|
4480
|
-
NIcon:
|
|
4481
|
-
NButton:
|
|
4482
|
-
NDrawer:
|
|
4483
|
-
NDrawerContent:
|
|
4484
|
-
NGrid:
|
|
4485
|
-
NGridItem:
|
|
4486
|
-
NInputGroup:
|
|
4487
|
-
NInputGroupLabel:
|
|
4525
|
+
NIcon: V,
|
|
4526
|
+
NButton: L,
|
|
4527
|
+
NDrawer: le,
|
|
4528
|
+
NDrawerContent: ue,
|
|
4529
|
+
NGrid: he,
|
|
4530
|
+
NGridItem: ge,
|
|
4531
|
+
NInputGroup: be,
|
|
4532
|
+
NInputGroupLabel: xe,
|
|
4488
4533
|
UzFormItem: Tr
|
|
4489
4534
|
},
|
|
4490
4535
|
props: {
|
|
@@ -4508,9 +4553,9 @@ var ka = /*#__PURE__*/ Q(xa, [["render", Oa]]), Aa = d({
|
|
|
4508
4553
|
},
|
|
4509
4554
|
emits: ["update:loading", "on-update:value"],
|
|
4510
4555
|
setup(e, { emit: t }) {
|
|
4511
|
-
let { t: n } =
|
|
4556
|
+
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
4557
|
if (e.loading) return;
|
|
4513
|
-
let r =
|
|
4558
|
+
let r = W(o.value);
|
|
4514
4559
|
!n && r.query && (r.query.page = 1);
|
|
4515
4560
|
let s = [];
|
|
4516
4561
|
i.value.forEach((e) => {
|
|
@@ -4529,7 +4574,7 @@ var ka = /*#__PURE__*/ Q(xa, [["render", Oa]]), Aa = d({
|
|
|
4529
4574
|
}
|
|
4530
4575
|
}), a.value = !1, t("update:loading", !0), t("on-update:value", s);
|
|
4531
4576
|
}, u = () => {
|
|
4532
|
-
e.loading || (o.value =
|
|
4577
|
+
e.loading || (o.value = W(s.value), l());
|
|
4533
4578
|
}, d = (e) => {
|
|
4534
4579
|
let t = {};
|
|
4535
4580
|
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 +4584,21 @@ var ka = /*#__PURE__*/ Q(xa, [["render", Oa]]), Aa = d({
|
|
|
4539
4584
|
};
|
|
4540
4585
|
}, f = (t) => {
|
|
4541
4586
|
if (t && t.length > 0) {
|
|
4542
|
-
let { data: n, values: a } = d(
|
|
4587
|
+
let { data: n, values: a } = d(W(t)), c = {}, l = e.id || r.params.id;
|
|
4543
4588
|
if (e.cache && l) {
|
|
4544
4589
|
let e = J(`tables_${l}`, !1);
|
|
4545
4590
|
e && e.params.forEach((e) => {
|
|
4546
4591
|
c[e.key] = e.value;
|
|
4547
4592
|
});
|
|
4548
4593
|
}
|
|
4549
|
-
i.value = n, o.value =
|
|
4594
|
+
i.value = n, o.value = W({
|
|
4550
4595
|
...a,
|
|
4551
4596
|
...c
|
|
4552
|
-
}), s.value =
|
|
4597
|
+
}), s.value = W(a);
|
|
4553
4598
|
}
|
|
4554
4599
|
l(!0);
|
|
4555
4600
|
};
|
|
4556
|
-
return
|
|
4601
|
+
return M(() => e.data, (e) => {
|
|
4557
4602
|
f(e);
|
|
4558
4603
|
}), {
|
|
4559
4604
|
t: n,
|
|
@@ -4564,19 +4609,19 @@ var ka = /*#__PURE__*/ Q(xa, [["render", Oa]]), Aa = d({
|
|
|
4564
4609
|
clearAll: u
|
|
4565
4610
|
};
|
|
4566
4611
|
}
|
|
4567
|
-
}),
|
|
4568
|
-
function
|
|
4612
|
+
}), Ia = { class: "uz-flex uz-items-start uz-justify-between uz-gap-8 uz-pb-2" }, La = { class: "uz-flex uz-gap-2" }, Ra = { class: "uz-flex uz-items-center uz-gap-2 uz-w-full" };
|
|
4613
|
+
function za(t, n, s, u, d, f) {
|
|
4569
4614
|
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",
|
|
4615
|
+
return x(), a(e, null, [o("div", Ia, [E(t.$slots, "header"), o("div", La, [t.itemData && Object.keys(t.itemData).length > 0 ? (x(), r(h, {
|
|
4571
4616
|
key: 0,
|
|
4572
4617
|
secondary: "",
|
|
4573
4618
|
onClick: n[0] ||= (e) => t.drawer = !0
|
|
4574
4619
|
}, {
|
|
4575
|
-
icon:
|
|
4576
|
-
default:
|
|
4620
|
+
icon: P(() => [l(m, { size: "18" }, {
|
|
4621
|
+
default: P(() => [l(p, { icon: "Search" })]),
|
|
4577
4622
|
_: 1
|
|
4578
4623
|
})]),
|
|
4579
|
-
default:
|
|
4624
|
+
default: P(() => [c(" " + A(t.t("Common.search")), 1)]),
|
|
4580
4625
|
_: 1
|
|
4581
4626
|
})) : i("", !0), E(t.$slots, "action")])]), l(C, {
|
|
4582
4627
|
show: t.drawer,
|
|
@@ -4588,21 +4633,21 @@ function Pa(t, n, s, u, d, f) {
|
|
|
4588
4633
|
"auto-focus": !1,
|
|
4589
4634
|
"close-on-esc": !1
|
|
4590
4635
|
}, {
|
|
4591
|
-
default:
|
|
4636
|
+
default: P(() => [l(S, {
|
|
4592
4637
|
title: t.t("Common.search"),
|
|
4593
4638
|
closable: ""
|
|
4594
4639
|
}, {
|
|
4595
|
-
footer:
|
|
4640
|
+
footer: P(() => [o("div", Ra, [l(h, {
|
|
4596
4641
|
secondary: "",
|
|
4597
4642
|
loading: t.loading,
|
|
4598
4643
|
onClick: t.clearAll,
|
|
4599
4644
|
class: "uz-flex-1"
|
|
4600
4645
|
}, {
|
|
4601
|
-
icon:
|
|
4602
|
-
default:
|
|
4646
|
+
icon: P(() => [l(m, null, {
|
|
4647
|
+
default: P(() => [l(p, { icon: "Refresh" })]),
|
|
4603
4648
|
_: 1
|
|
4604
4649
|
})]),
|
|
4605
|
-
default:
|
|
4650
|
+
default: P(() => [c(" " + A(t.t("Common.reset")), 1)]),
|
|
4606
4651
|
_: 1
|
|
4607
4652
|
}, 8, ["loading", "onClick"]), t.itemData && Object.keys(t.itemData).length > 0 ? (x(), r(h, {
|
|
4608
4653
|
key: 0,
|
|
@@ -4611,25 +4656,25 @@ function Pa(t, n, s, u, d, f) {
|
|
|
4611
4656
|
class: "uz-flex-1",
|
|
4612
4657
|
onClick: n[1] ||= (e) => t.doSearch(!1)
|
|
4613
4658
|
}, {
|
|
4614
|
-
icon:
|
|
4615
|
-
default:
|
|
4659
|
+
icon: P(() => [l(m, { size: "18" }, {
|
|
4660
|
+
default: P(() => [l(p, { icon: "Search" })]),
|
|
4616
4661
|
_: 1
|
|
4617
4662
|
})]),
|
|
4618
|
-
default:
|
|
4663
|
+
default: P(() => [c(" " + A(t.t("Common.search")), 1)]),
|
|
4619
4664
|
_: 1
|
|
4620
4665
|
}, 8, ["loading"])) : i("", !0)])]),
|
|
4621
|
-
default:
|
|
4666
|
+
default: P(() => [l(b, {
|
|
4622
4667
|
"x-gap": "8",
|
|
4623
4668
|
"y-gap": "8",
|
|
4624
4669
|
cols: "1"
|
|
4625
4670
|
}, {
|
|
4626
|
-
default:
|
|
4671
|
+
default: P(() => [(x(!0), a(e, null, T(t.itemData, (e, n) => (x(), r(y, {
|
|
4627
4672
|
key: `${n}_${Date.now()}`,
|
|
4628
4673
|
span: +!!e.search.show
|
|
4629
4674
|
}, {
|
|
4630
|
-
default:
|
|
4631
|
-
default:
|
|
4632
|
-
default:
|
|
4675
|
+
default: P(() => [l(v, null, {
|
|
4676
|
+
default: P(() => [l(g, { class: "uz-group-label" }, {
|
|
4677
|
+
default: P(() => [c(A(typeof e.label == "function" ? e.label() : e.label), 1)]),
|
|
4633
4678
|
_: 2
|
|
4634
4679
|
}, 1024), l(_, {
|
|
4635
4680
|
item: e,
|
|
@@ -4647,12 +4692,12 @@ function Pa(t, n, s, u, d, f) {
|
|
|
4647
4692
|
_: 1
|
|
4648
4693
|
}, 8, ["show"])], 64);
|
|
4649
4694
|
}
|
|
4650
|
-
var
|
|
4695
|
+
var Ba = /*#__PURE__*/ Q(Fa, [["render", za]]), Va = d({
|
|
4651
4696
|
name: "UzSpin",
|
|
4652
4697
|
components: {
|
|
4653
|
-
NButton:
|
|
4654
|
-
NSpin:
|
|
4655
|
-
NEllipsis:
|
|
4698
|
+
NButton: L,
|
|
4699
|
+
NSpin: Me,
|
|
4700
|
+
NEllipsis: fe
|
|
4656
4701
|
},
|
|
4657
4702
|
emits: ["update:value"],
|
|
4658
4703
|
props: {
|
|
@@ -4670,7 +4715,7 @@ var Fa = /*#__PURE__*/ Q(Aa, [["render", Pa]]), Ia = d({
|
|
|
4670
4715
|
}
|
|
4671
4716
|
},
|
|
4672
4717
|
setup(e, { emit: t }) {
|
|
4673
|
-
let { t: n } =
|
|
4718
|
+
let { t: n } = U(), r = w(), i = w(5), a = () => {
|
|
4674
4719
|
t("update:value", !1);
|
|
4675
4720
|
}, o = () => {
|
|
4676
4721
|
clearInterval(r.value);
|
|
@@ -4682,7 +4727,7 @@ var Fa = /*#__PURE__*/ Q(Aa, [["render", Pa]]), Ia = d({
|
|
|
4682
4727
|
};
|
|
4683
4728
|
return b(() => {
|
|
4684
4729
|
clearInterval(r.value);
|
|
4685
|
-
}),
|
|
4730
|
+
}), M(() => e.status, (e) => {
|
|
4686
4731
|
e === 1 && s();
|
|
4687
4732
|
}), {
|
|
4688
4733
|
t: n,
|
|
@@ -4694,39 +4739,39 @@ var Fa = /*#__PURE__*/ Q(Aa, [["render", Pa]]), Ia = d({
|
|
|
4694
4739
|
});
|
|
4695
4740
|
//#endregion
|
|
4696
4741
|
//#region components/spin/index.vue
|
|
4697
|
-
function
|
|
4742
|
+
function Ha(e, t, n, i, a, s) {
|
|
4698
4743
|
let u = D("NEllipsis"), d = D("NButton"), f = D("NSpin");
|
|
4699
4744
|
return x(), r(f, { show: e.value }, {
|
|
4700
|
-
description:
|
|
4745
|
+
description: P(() => [
|
|
4701
4746
|
l(u, {
|
|
4702
4747
|
"expand-trigger": "click",
|
|
4703
4748
|
"line-clamp": "3",
|
|
4704
4749
|
tooltip: !1
|
|
4705
4750
|
}, {
|
|
4706
|
-
default:
|
|
4751
|
+
default: P(() => [c(A(e.status === 0 ? e.t("Spin.processing") : e.message), 1)]),
|
|
4707
4752
|
_: 1
|
|
4708
4753
|
}),
|
|
4709
4754
|
t[0] ||= o("div", { class: "uz-br" }, null, -1),
|
|
4710
|
-
|
|
4755
|
+
F(l(d, {
|
|
4711
4756
|
type: "warning",
|
|
4712
4757
|
block: "",
|
|
4713
4758
|
secondary: "",
|
|
4714
4759
|
onMouseover: e.stopCountdown,
|
|
4715
4760
|
onClick: e.handleClose
|
|
4716
4761
|
}, {
|
|
4717
|
-
default:
|
|
4762
|
+
default: P(() => [c(A(e.t("Spin.closeCountdown", { seconds: e.counts })), 1)]),
|
|
4718
4763
|
_: 1
|
|
4719
|
-
}, 8, ["onMouseover", "onClick"]), [[
|
|
4764
|
+
}, 8, ["onMouseover", "onClick"]), [[j, e.status === 1]])
|
|
4720
4765
|
]),
|
|
4721
|
-
default:
|
|
4766
|
+
default: P(() => [E(e.$slots, "default")]),
|
|
4722
4767
|
_: 3
|
|
4723
4768
|
}, 8, ["show"]);
|
|
4724
4769
|
}
|
|
4725
|
-
var
|
|
4770
|
+
var Ua = /*#__PURE__*/ Q(Va, [["render", Ha]]), Wa = d({
|
|
4726
4771
|
name: "UzTableExpand",
|
|
4727
4772
|
components: {
|
|
4728
|
-
NDataTable:
|
|
4729
|
-
NForm:
|
|
4773
|
+
NDataTable: oe,
|
|
4774
|
+
NForm: pe
|
|
4730
4775
|
},
|
|
4731
4776
|
props: {
|
|
4732
4777
|
data: {
|
|
@@ -4748,8 +4793,8 @@ var Ra = /*#__PURE__*/ Q(Ia, [["render", La]]), za = d({
|
|
|
4748
4793
|
} catch (e) {
|
|
4749
4794
|
K(e);
|
|
4750
4795
|
}
|
|
4751
|
-
|
|
4752
|
-
let { tableColumns: r } = await
|
|
4796
|
+
_i(e.data.link).then(async (e) => {
|
|
4797
|
+
let { tableColumns: r } = await Ti(yi(tt.parse(e.viewJson).table), !0, 2, () => {}, {}, !1, !0), a = 0, o = r.map((e) => ({
|
|
4753
4798
|
...e,
|
|
4754
4799
|
sorter: !1,
|
|
4755
4800
|
resizable: !1
|
|
@@ -4770,7 +4815,7 @@ var Ra = /*#__PURE__*/ Q(Ia, [["render", La]]), za = d({
|
|
|
4770
4815
|
});
|
|
4771
4816
|
//#endregion
|
|
4772
4817
|
//#region components/table/components/expand.vue
|
|
4773
|
-
function
|
|
4818
|
+
function Ga(e, t, n, i, a, o) {
|
|
4774
4819
|
let s = D("NDataTable");
|
|
4775
4820
|
return x(), r(s, {
|
|
4776
4821
|
columns: e.columns,
|
|
@@ -4789,18 +4834,18 @@ function Ba(e, t, n, i, a, o) {
|
|
|
4789
4834
|
"scroll-x"
|
|
4790
4835
|
]);
|
|
4791
4836
|
}
|
|
4792
|
-
var
|
|
4793
|
-
components: { NSkeleton:
|
|
4837
|
+
var Ka = /*#__PURE__*/ Q(Wa, [["render", Ga]]), qa = d({
|
|
4838
|
+
components: { NSkeleton: Ae },
|
|
4794
4839
|
setup() {
|
|
4795
4840
|
return {};
|
|
4796
4841
|
}
|
|
4797
|
-
}),
|
|
4798
|
-
function
|
|
4842
|
+
}), Ja = { class: "uz-flex uz-flex-col uz-gap-2 uz-flex-1 uz-h-full" }, Ya = { class: "uz-flex uz-justify-between" }, Xa = { class: "uz-flex uz-gap-1" };
|
|
4843
|
+
function Za(e, t, n, r, i, s) {
|
|
4799
4844
|
let c = D("NSkeleton");
|
|
4800
|
-
return x(), a("div",
|
|
4845
|
+
return x(), a("div", Ja, [o("div", Ya, [l(c, {
|
|
4801
4846
|
width: 120,
|
|
4802
4847
|
size: "medium"
|
|
4803
|
-
}), o("div",
|
|
4848
|
+
}), o("div", Xa, [
|
|
4804
4849
|
l(c, {
|
|
4805
4850
|
width: 180,
|
|
4806
4851
|
size: "medium"
|
|
@@ -4833,19 +4878,19 @@ function Ka(e, t, n, r, i, s) {
|
|
|
4833
4878
|
}
|
|
4834
4879
|
//#endregion
|
|
4835
4880
|
//#region components/table/index.vue?vue&type=script&lang.ts
|
|
4836
|
-
var
|
|
4881
|
+
var Qa = d({
|
|
4837
4882
|
name: "UzTable",
|
|
4838
4883
|
components: {
|
|
4839
|
-
NDataTable:
|
|
4840
|
-
NPopover:
|
|
4841
|
-
NButton:
|
|
4842
|
-
NIcon:
|
|
4843
|
-
NCheckbox:
|
|
4844
|
-
NSpin:
|
|
4845
|
-
VueDraggable:
|
|
4846
|
-
UzSpin:
|
|
4847
|
-
TableExpand:
|
|
4848
|
-
SkeletonLoading: /* @__PURE__ */ Q(
|
|
4884
|
+
NDataTable: oe,
|
|
4885
|
+
NPopover: Ee,
|
|
4886
|
+
NButton: L,
|
|
4887
|
+
NIcon: V,
|
|
4888
|
+
NCheckbox: re,
|
|
4889
|
+
NSpin: Me,
|
|
4890
|
+
VueDraggable: et,
|
|
4891
|
+
UzSpin: Ua,
|
|
4892
|
+
TableExpand: Ka,
|
|
4893
|
+
SkeletonLoading: /* @__PURE__ */ Q(qa, [["render", Za]])
|
|
4849
4894
|
},
|
|
4850
4895
|
props: {
|
|
4851
4896
|
id: {
|
|
@@ -4973,109 +5018,109 @@ var qa = d({
|
|
|
4973
5018
|
value: () => null,
|
|
4974
5019
|
setValue: () => null
|
|
4975
5020
|
});
|
|
4976
|
-
let a = p("userStore"), o =
|
|
5021
|
+
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
5022
|
params: [],
|
|
4978
5023
|
query: {
|
|
4979
5024
|
page: 1,
|
|
4980
5025
|
pageMax: 1,
|
|
4981
5026
|
pageSize: e.pageSize || 30
|
|
4982
5027
|
}
|
|
4983
|
-
}), A = w([]), ee = w(void 0),
|
|
5028
|
+
}), A = w([]), ee = w(void 0), j = w(void 0), N = w([]), P = w([]), F = w([]), te = w([]), I = w({
|
|
4984
5029
|
fetch: null,
|
|
4985
5030
|
fetchFn: "",
|
|
4986
5031
|
when_drawer_open: "",
|
|
4987
5032
|
when_before_save: ""
|
|
4988
|
-
}),
|
|
5033
|
+
}), R = w(Ci()), ne = w(""), re = w(!1), ie = w([]), z = w([]), ae = p("modules"), oe = (e) => e.id, se = (e, n) => {
|
|
4989
5034
|
t("update:rowKeys", {
|
|
4990
5035
|
keys: e,
|
|
4991
|
-
rows:
|
|
5036
|
+
rows: W(n)
|
|
4992
5037
|
});
|
|
4993
|
-
},
|
|
4994
|
-
if (
|
|
4995
|
-
let e =
|
|
4996
|
-
|
|
5038
|
+
}, ce = (e, n, r) => {
|
|
5039
|
+
if (ie.value = e, r.action === "check" && z.value.push(r.row), r.action === "uncheck") {
|
|
5040
|
+
let e = z.value.findIndex((e) => e.id === r.row?.id);
|
|
5041
|
+
z.value.splice(e, 1);
|
|
4997
5042
|
}
|
|
4998
5043
|
r.action === "checkAll" && n.forEach((e) => {
|
|
4999
|
-
e &&
|
|
5000
|
-
}), r.action === "uncheckAll" && (
|
|
5001
|
-
keys:
|
|
5002
|
-
rows:
|
|
5044
|
+
e && z.value.push(e);
|
|
5045
|
+
}), r.action === "uncheckAll" && (z.value = [], ie.value = []), t("update:rowKeys", {
|
|
5046
|
+
keys: W(ie.value),
|
|
5047
|
+
rows: W(z.value)
|
|
5003
5048
|
});
|
|
5004
|
-
},
|
|
5049
|
+
}, le = (e) => {
|
|
5005
5050
|
O.value = e;
|
|
5006
|
-
},
|
|
5007
|
-
let t = e.summary ||
|
|
5051
|
+
}, ue = n(() => {
|
|
5052
|
+
let t = e.summary || R.value.summary;
|
|
5008
5053
|
if (t && typeof t == "string") {
|
|
5009
5054
|
let e = Function("pageData", "h", t);
|
|
5010
5055
|
return (t) => e(t, f);
|
|
5011
5056
|
}
|
|
5012
5057
|
return t && typeof t == "function" ? t : () => [];
|
|
5013
|
-
}),
|
|
5058
|
+
}), de = (t) => {
|
|
5014
5059
|
let n = e.id || o.params.id, r;
|
|
5015
5060
|
if (e.fetch) r = e.fetch({
|
|
5016
5061
|
...t,
|
|
5017
5062
|
tableId: n
|
|
5018
5063
|
});
|
|
5019
|
-
else if (
|
|
5020
|
-
let e =
|
|
5064
|
+
else if (I.value.fetchFn) {
|
|
5065
|
+
let e = I.value.fetchFn;
|
|
5021
5066
|
r = Function("POST", "queryData", e)(Z, { ...t });
|
|
5022
5067
|
} else r = Xn({
|
|
5023
5068
|
...t,
|
|
5024
5069
|
tableId: n
|
|
5025
5070
|
});
|
|
5026
5071
|
return r;
|
|
5027
|
-
},
|
|
5072
|
+
}, fe = (t) => {
|
|
5028
5073
|
let n = e.id || o.params.id, r;
|
|
5029
5074
|
if (e.fetch) r = e.fetch({
|
|
5030
5075
|
id: t.id,
|
|
5031
5076
|
tableId: n
|
|
5032
5077
|
});
|
|
5033
|
-
else if (
|
|
5034
|
-
let e =
|
|
5078
|
+
else if (I.value.fetchFn) {
|
|
5079
|
+
let e = I.value.fetchFn;
|
|
5035
5080
|
r = Function("POST", "queryData", e)(Z, { id: t.id });
|
|
5036
5081
|
} else r = Xn({
|
|
5037
5082
|
id: t.id,
|
|
5038
5083
|
tableId: n
|
|
5039
5084
|
});
|
|
5040
5085
|
return r;
|
|
5041
|
-
},
|
|
5086
|
+
}, B = (n = !1) => {
|
|
5042
5087
|
let r = e.id || o.params.id;
|
|
5043
5088
|
e.enableLoading && (_.value = !0, t("update:loading", !0));
|
|
5044
|
-
let i =
|
|
5045
|
-
n && delete i.orderby,
|
|
5089
|
+
let i = W(k.value);
|
|
5090
|
+
n && delete i.orderby, I.value.fetch ? tr([I.value.fetch], "", i).then((e) => {
|
|
5046
5091
|
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),
|
|
5092
|
+
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1), R.value.cache && r && q(`tables_${r}`, k.value);
|
|
5048
5093
|
}).catch(() => {
|
|
5049
5094
|
_.value = !1, v.value = !0, t("update:loading", !1);
|
|
5050
|
-
}) :
|
|
5095
|
+
}) : de(i).then((e) => {
|
|
5051
5096
|
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),
|
|
5097
|
+
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1), R.value.cache && r && q(`tables_${r}`, k.value);
|
|
5053
5098
|
}).catch(() => {
|
|
5054
5099
|
_.value = !1, v.value = !0, t("update:loading", !1);
|
|
5055
5100
|
});
|
|
5056
|
-
},
|
|
5057
|
-
k.value.query.page = e, u.value && (u.value.scrollTop = 0), kt(),
|
|
5058
|
-
},
|
|
5101
|
+
}, pe = (e) => {
|
|
5102
|
+
k.value.query.page = e, u.value && (u.value.scrollTop = 0), kt(), B();
|
|
5103
|
+
}, me = () => {
|
|
5059
5104
|
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),
|
|
5105
|
+
e > k.value.query.pageMax && (e = 1), k.value.query.page = e, u.value && (u.value.scrollTop = 0), B();
|
|
5106
|
+
}, he = (e) => {
|
|
5107
|
+
k.value.query.pageSize = e, k.value.query.page = 1, kt(), B();
|
|
5061
5108
|
}, 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 = () => {
|
|
5109
|
+
e && e.order ? k.value.orderby = `${e.columnKey} ${e.order.replace("end", "")}` : delete k.value.orderby, B();
|
|
5110
|
+
}, V = () => {
|
|
5066
5111
|
if (typeof e.addFetch == "function") return e.addFetch();
|
|
5067
5112
|
m.value?.addAndEdit(e.id || o.params.id, async () => {
|
|
5068
|
-
let { form: e } = await
|
|
5113
|
+
let { form: e } = await xe();
|
|
5069
5114
|
return {
|
|
5070
5115
|
form: e,
|
|
5071
5116
|
data: {}
|
|
5072
5117
|
};
|
|
5073
|
-
},
|
|
5118
|
+
}, R.value, I.value, 0, Me);
|
|
5119
|
+
}, _e = (e) => {
|
|
5120
|
+
e.show = !e.show, je();
|
|
5074
5121
|
}, ve = (e) => {
|
|
5075
|
-
|
|
5076
|
-
}, ye = (
|
|
5077
|
-
k.value.params = e, z();
|
|
5078
|
-
}, be = () => [{
|
|
5122
|
+
k.value.params = e, B();
|
|
5123
|
+
}, ye = () => [{
|
|
5079
5124
|
title: s("Table.createdByTime"),
|
|
5080
5125
|
key: "createTime",
|
|
5081
5126
|
resizable: !0,
|
|
@@ -5093,21 +5138,21 @@ var qa = d({
|
|
|
5093
5138
|
ellipsis: !0,
|
|
5094
5139
|
width: 180,
|
|
5095
5140
|
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
|
|
5141
|
+
}], 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) => {
|
|
5142
|
+
let { form: t, fillingDefaultValue: n, formDefaultValue: r } = await wi(P.value, e, () => m.value?.getFormValues());
|
|
5098
5143
|
return x.value = t, {
|
|
5099
5144
|
form: t,
|
|
5100
5145
|
fillingDefaultValue: n,
|
|
5101
5146
|
formDefaultValue: r
|
|
5102
5147
|
};
|
|
5103
|
-
},
|
|
5104
|
-
|
|
5148
|
+
}, Se = async (e) => new Promise((t, n) => {
|
|
5149
|
+
fe(e).then((e) => {
|
|
5105
5150
|
t(e && e[0]);
|
|
5106
5151
|
}).catch(() => {
|
|
5107
5152
|
n();
|
|
5108
5153
|
});
|
|
5109
|
-
}),
|
|
5110
|
-
let n = await
|
|
5154
|
+
}), Ce = async (e, t) => {
|
|
5155
|
+
let n = await Se(e).catch(() => {}), { form: r, fillingDefaultValue: i } = await xe(n || {}), a = {
|
|
5111
5156
|
...n,
|
|
5112
5157
|
...i
|
|
5113
5158
|
};
|
|
@@ -5116,7 +5161,7 @@ var qa = d({
|
|
|
5116
5161
|
} catch (e) {
|
|
5117
5162
|
K(e);
|
|
5118
5163
|
}
|
|
5119
|
-
let o =
|
|
5164
|
+
let o = I.value.when_drawer_open;
|
|
5120
5165
|
if (o && typeof o == "string") try {
|
|
5121
5166
|
a = await Function("data", "POST", o)(a, Z).catch((e) => {
|
|
5122
5167
|
K(e);
|
|
@@ -5128,19 +5173,19 @@ var qa = d({
|
|
|
5128
5173
|
form: r,
|
|
5129
5174
|
data: a
|
|
5130
5175
|
};
|
|
5131
|
-
},
|
|
5132
|
-
let i =
|
|
5176
|
+
}, we = (n, r) => {
|
|
5177
|
+
let i = W(n.onClick), a = e.id || o.params.id;
|
|
5133
5178
|
if (n.disabled) {
|
|
5134
5179
|
if (typeof n.disabled == "string") {
|
|
5135
5180
|
let e = Function("rowData", "rowIndex", n.disabled);
|
|
5136
|
-
n.disabled = (t, r) => e(t, r) ||
|
|
5181
|
+
n.disabled = (t, r) => e(t, r) || be(n.key);
|
|
5137
5182
|
} else if (typeof n.disabled == "function") {
|
|
5138
|
-
let e =
|
|
5139
|
-
n.disabled = (t, r) => e.disabled(t, r) ||
|
|
5183
|
+
let e = W(n);
|
|
5184
|
+
n.disabled = (t, r) => e.disabled(t, r) || be(n.key);
|
|
5140
5185
|
}
|
|
5141
|
-
} else n.disabled = () =>
|
|
5186
|
+
} else n.disabled = () => be(n.key);
|
|
5142
5187
|
if (n.loading = _.value, n.type !== "group" && n.optionsType) n.onClick = async (e) => {
|
|
5143
|
-
|
|
5188
|
+
Se(e).then((r) => {
|
|
5144
5189
|
if (n.optionsType === "drawer:insider") {
|
|
5145
5190
|
if (i) try {
|
|
5146
5191
|
Function("rowData", "POST", "fnNotification", i)(r, Z, c).then((e) => {
|
|
@@ -5166,17 +5211,17 @@ var qa = d({
|
|
|
5166
5211
|
}).catch(() => null);
|
|
5167
5212
|
};
|
|
5168
5213
|
else if (n.type !== "group" && n.action === "detailInside") {
|
|
5169
|
-
let t =
|
|
5214
|
+
let t = W(n.onClick);
|
|
5170
5215
|
n.onClick = (n) => {
|
|
5171
|
-
m.value?.addAndEdit(e.id || o.params.id, () =>
|
|
5216
|
+
m.value?.addAndEdit(e.id || o.params.id, () => Ce(n, t), R.value, I.value, 2, Me);
|
|
5172
5217
|
};
|
|
5173
5218
|
} else if (n.type !== "group" && n.action === "editInside") {
|
|
5174
|
-
let t =
|
|
5219
|
+
let t = W(n.onClick);
|
|
5175
5220
|
n.onClick = (n) => {
|
|
5176
|
-
m.value?.addAndEdit(e.id || o.params.id, () =>
|
|
5221
|
+
m.value?.addAndEdit(e.id || o.params.id, () => Ce(n, t), R.value, I.value, 1, Me);
|
|
5177
5222
|
};
|
|
5178
5223
|
} else if (n.type !== "group" && n.action === "deleteInside") {
|
|
5179
|
-
let t =
|
|
5224
|
+
let t = W(n.onClick);
|
|
5180
5225
|
n.onClick = (n) => {
|
|
5181
5226
|
let i;
|
|
5182
5227
|
i = e.deleteFetch ? e.deleteFetch({
|
|
@@ -5190,12 +5235,12 @@ var qa = d({
|
|
|
5190
5235
|
}), i.then(() => {
|
|
5191
5236
|
if (t) try {
|
|
5192
5237
|
Function("rowData", "fnNotification", "POST", t)(n, c, Z).then(() => {
|
|
5193
|
-
|
|
5238
|
+
B();
|
|
5194
5239
|
}).catch(() => null);
|
|
5195
5240
|
} catch (e) {
|
|
5196
5241
|
K(e);
|
|
5197
5242
|
}
|
|
5198
|
-
else
|
|
5243
|
+
else B();
|
|
5199
5244
|
}).catch((e) => {
|
|
5200
5245
|
K(e);
|
|
5201
5246
|
});
|
|
@@ -5206,7 +5251,7 @@ var qa = d({
|
|
|
5206
5251
|
...t,
|
|
5207
5252
|
is_disabled: "1"
|
|
5208
5253
|
}).then(() => {
|
|
5209
|
-
|
|
5254
|
+
B();
|
|
5210
5255
|
}).catch(() => null);
|
|
5211
5256
|
};
|
|
5212
5257
|
else if (n.type !== "group" && n.action === "enabledInside") n.onClick = (t) => {
|
|
@@ -5215,13 +5260,13 @@ var qa = d({
|
|
|
5215
5260
|
...t,
|
|
5216
5261
|
is_disabled: "0"
|
|
5217
5262
|
}).then(() => {
|
|
5218
|
-
|
|
5263
|
+
B();
|
|
5219
5264
|
}).catch(() => null);
|
|
5220
5265
|
};
|
|
5221
5266
|
else if (n.type !== "group" && n.action) {
|
|
5222
|
-
let e =
|
|
5267
|
+
let e = W(n.onClick);
|
|
5223
5268
|
n.onClick = (t) => {
|
|
5224
|
-
|
|
5269
|
+
fe(t).then((t) => {
|
|
5225
5270
|
let r = t && t[0];
|
|
5226
5271
|
tr([n.action], r.id, r).then((t) => {
|
|
5227
5272
|
if (e && typeof e == "string") try {
|
|
@@ -5229,7 +5274,7 @@ var qa = d({
|
|
|
5229
5274
|
c.success({
|
|
5230
5275
|
content: e,
|
|
5231
5276
|
duration: 3e3
|
|
5232
|
-
}),
|
|
5277
|
+
}), B();
|
|
5233
5278
|
}).catch((e) => {
|
|
5234
5279
|
K(e);
|
|
5235
5280
|
});
|
|
@@ -5240,24 +5285,24 @@ var qa = d({
|
|
|
5240
5285
|
c.success({
|
|
5241
5286
|
content: () => s("Notice.success"),
|
|
5242
5287
|
duration: 3e3
|
|
5243
|
-
}),
|
|
5288
|
+
}), B();
|
|
5244
5289
|
}) : (c.success({
|
|
5245
5290
|
content: () => s("Notice.success"),
|
|
5246
5291
|
duration: 3e3
|
|
5247
|
-
}),
|
|
5292
|
+
}), B());
|
|
5248
5293
|
}).catch(() => {
|
|
5249
5294
|
c.error({
|
|
5250
5295
|
content: () => s("Notice.failed"),
|
|
5251
5296
|
duration: 3e3
|
|
5252
|
-
}),
|
|
5297
|
+
}), B();
|
|
5253
5298
|
});
|
|
5254
5299
|
}).catch(() => null);
|
|
5255
5300
|
};
|
|
5256
5301
|
}
|
|
5257
|
-
},
|
|
5258
|
-
|
|
5259
|
-
let { tableColumns: n, search: r, subTableIds: i, subTableExpand: a } = await
|
|
5260
|
-
!l.value &&
|
|
5302
|
+
}, Te = async () => {
|
|
5303
|
+
re.value = !1, hi();
|
|
5304
|
+
let { tableColumns: n, search: r, subTableIds: i, subTableExpand: a } = await Ti(P.value, e.child, 0, () => ({}), ae);
|
|
5305
|
+
!l.value && R.value.index && n.unshift({
|
|
5261
5306
|
title: "#",
|
|
5262
5307
|
key: "index",
|
|
5263
5308
|
align: "center",
|
|
@@ -5272,21 +5317,21 @@ var qa = d({
|
|
|
5272
5317
|
return (e - 1) * n + (t + 1);
|
|
5273
5318
|
} });
|
|
5274
5319
|
}
|
|
5275
|
-
}), !l.value && (e.selection ||
|
|
5320
|
+
}), !l.value && (e.selection || R.value.selection !== 0) && n.unshift({
|
|
5276
5321
|
type: "selection",
|
|
5277
5322
|
fixed: "left",
|
|
5278
5323
|
width: 60,
|
|
5279
5324
|
hide: !0,
|
|
5280
5325
|
show: !0,
|
|
5281
|
-
multiple: e.selection === 2 ||
|
|
5326
|
+
multiple: e.selection === 2 || R.value.selection === 2,
|
|
5282
5327
|
options: ["all", "none"]
|
|
5283
5328
|
});
|
|
5284
5329
|
let c = e.id || o.params.id;
|
|
5285
|
-
if (!l.value &&
|
|
5286
|
-
let e =
|
|
5330
|
+
if (!l.value && R.value.commonTime && n.push(...ye()), e.enableAction === !0 && F.value && F.value.length > 0) {
|
|
5331
|
+
let e = W(F.value);
|
|
5287
5332
|
for (let t of e) t.type === "group" ? t.children.forEach((e) => {
|
|
5288
|
-
|
|
5289
|
-
}) :
|
|
5333
|
+
we(e, i);
|
|
5334
|
+
}) : we(t, i);
|
|
5290
5335
|
let t = {
|
|
5291
5336
|
title: () => s("Common.action"),
|
|
5292
5337
|
key: "action",
|
|
@@ -5296,12 +5341,12 @@ var qa = d({
|
|
|
5296
5341
|
checked: !0,
|
|
5297
5342
|
show: !0,
|
|
5298
5343
|
hide: !0,
|
|
5299
|
-
width: Number(typeof
|
|
5344
|
+
width: Number(typeof R.value.actionWidth == "string" ? R.value.actionWidth.replace("px", "") : R.value.actionWidth),
|
|
5300
5345
|
render(t) {
|
|
5301
5346
|
return ur({
|
|
5302
5347
|
buttons: e,
|
|
5303
5348
|
rowData: t,
|
|
5304
|
-
callback:
|
|
5349
|
+
callback: B,
|
|
5305
5350
|
tableId: c
|
|
5306
5351
|
});
|
|
5307
5352
|
}
|
|
@@ -5324,22 +5369,22 @@ var qa = d({
|
|
|
5324
5369
|
fixed: "left",
|
|
5325
5370
|
filter: "default",
|
|
5326
5371
|
filterOptionValue: null,
|
|
5327
|
-
renderFilterMenu: () => f("div", { class: "uz-table-filter" }, [f(
|
|
5328
|
-
renderExpand: (e) => f(
|
|
5372
|
+
renderFilterMenu: () => f("div", { class: "uz-table-filter" }, [f(L, { onClick: ze }, { default: () => s("Common.expand") }), f(L, { onClick: Be }, { default: () => s("Common.contract") })]),
|
|
5373
|
+
renderExpand: (e) => f(Ka, {
|
|
5329
5374
|
data: a,
|
|
5330
5375
|
value: e
|
|
5331
5376
|
})
|
|
5332
|
-
}),
|
|
5377
|
+
}), R.value.asynchronous ? t("update:asynchronous", R.value.asynchronous) : t("update:asynchronous", null);
|
|
5333
5378
|
let d = 0;
|
|
5334
5379
|
u.forEach((e) => {
|
|
5335
5380
|
e.show && (d += Number(e.width || 140));
|
|
5336
5381
|
}), C.value = u, A.value = r, D.value = d;
|
|
5337
|
-
},
|
|
5382
|
+
}, Ee = (e) => typeof e == "number" ? `${e}px` : e, De = () => {
|
|
5338
5383
|
if (e.height) {
|
|
5339
|
-
let t =
|
|
5340
|
-
ee.value = t,
|
|
5384
|
+
let t = Ee(e.height);
|
|
5385
|
+
ee.value = t, j.value = t;
|
|
5341
5386
|
}
|
|
5342
|
-
},
|
|
5387
|
+
}, Oe = (t) => {
|
|
5343
5388
|
let n = e.id || o.params.id;
|
|
5344
5389
|
if (n) {
|
|
5345
5390
|
let e = 0;
|
|
@@ -5350,7 +5395,7 @@ var qa = d({
|
|
|
5350
5395
|
data: JSON.stringify(t)
|
|
5351
5396
|
}).catch(() => null);
|
|
5352
5397
|
}
|
|
5353
|
-
}, { run:
|
|
5398
|
+
}, { run: ke } = Yr(Oe), { run: Ae } = Yr((e, t) => {
|
|
5354
5399
|
let n = [];
|
|
5355
5400
|
C.value.forEach((r) => {
|
|
5356
5401
|
r.key !== "action" && r.key !== "index" && r.type !== "expand" && n.push({
|
|
@@ -5360,8 +5405,8 @@ var qa = d({
|
|
|
5360
5405
|
fixed: r.fixed,
|
|
5361
5406
|
width: r.key === t ? Number(e.toFixed(0)) : r.width
|
|
5362
5407
|
});
|
|
5363
|
-
}),
|
|
5364
|
-
}),
|
|
5408
|
+
}), Oe(n);
|
|
5409
|
+
}), je = () => {
|
|
5365
5410
|
let e = [];
|
|
5366
5411
|
C.value.forEach((t) => {
|
|
5367
5412
|
t.key !== "action" && t.key !== "index" && t.type !== "expand" && e.push({
|
|
@@ -5371,8 +5416,8 @@ var qa = d({
|
|
|
5371
5416
|
fixed: t.fixed,
|
|
5372
5417
|
width: t.width
|
|
5373
5418
|
});
|
|
5374
|
-
}),
|
|
5375
|
-
},
|
|
5419
|
+
}), ke(e);
|
|
5420
|
+
}, Me = (t, n, r) => {
|
|
5376
5421
|
let i, a = e.id || o.params.id;
|
|
5377
5422
|
i = e.formFetch ? e.formFetch({
|
|
5378
5423
|
tableId: a,
|
|
@@ -5381,26 +5426,26 @@ var qa = d({
|
|
|
5381
5426
|
tableId: a,
|
|
5382
5427
|
...t
|
|
5383
5428
|
}), i.then(() => {
|
|
5384
|
-
|
|
5429
|
+
B(), n();
|
|
5385
5430
|
}).catch((e) => {
|
|
5386
5431
|
r(e);
|
|
5387
5432
|
});
|
|
5388
|
-
},
|
|
5389
|
-
b.value = "",
|
|
5433
|
+
}, Ne = () => {
|
|
5434
|
+
b.value = "", P.value = [], F.value = [], te.value = [], I.value = {
|
|
5390
5435
|
fetch: null,
|
|
5391
5436
|
fetchFn: "",
|
|
5392
5437
|
when_drawer_open: "",
|
|
5393
5438
|
when_before_save: ""
|
|
5394
|
-
},
|
|
5395
|
-
},
|
|
5396
|
-
let n =
|
|
5397
|
-
b.value = t.tableTitle,
|
|
5439
|
+
}, R.value = Ci();
|
|
5440
|
+
}, Pe = (t) => {
|
|
5441
|
+
let n = tt.parse(t.viewJson);
|
|
5442
|
+
b.value = t.tableTitle, P.value = yi(n.table), F.value = vr(e.actions || n.action);
|
|
5398
5443
|
let r = vr(n.suffix || []);
|
|
5399
|
-
|
|
5400
|
-
let i =
|
|
5401
|
-
t.tableTitle && i.title && Mt(t.tableTitle),
|
|
5402
|
-
},
|
|
5403
|
-
v.value = !1,
|
|
5444
|
+
te.value = r.filter((e) => e.main).map((e) => (Ie(e), e)), I.value = xi(n.trigger);
|
|
5445
|
+
let i = Ci(e.options ?? n.option);
|
|
5446
|
+
t.tableTitle && i.title && Mt(t.tableTitle), R.value = i;
|
|
5447
|
+
}, Fe = async () => {
|
|
5448
|
+
v.value = !1, Ne();
|
|
5404
5449
|
let t = e.id || o.params.id;
|
|
5405
5450
|
if (k.value = {
|
|
5406
5451
|
params: [],
|
|
@@ -5410,19 +5455,19 @@ var qa = d({
|
|
|
5410
5455
|
pageSize: e.pageSize || 30
|
|
5411
5456
|
}
|
|
5412
5457
|
}, E.value = [], e.ruleFetch) try {
|
|
5413
|
-
|
|
5458
|
+
N.value = await e.ruleFetch(t);
|
|
5414
5459
|
} catch {
|
|
5415
|
-
|
|
5460
|
+
ne.value = s("Notice.network"), re.value = !0;
|
|
5416
5461
|
return;
|
|
5417
5462
|
}
|
|
5418
|
-
|
|
5419
|
-
|
|
5463
|
+
De(), e.columns ? (P.value = e.columns || [], F.value = e.actions || [], te.value = e.suffixes || [], R.value = Ci(e.options), await Te()) : await _i(t).then(async (e) => {
|
|
5464
|
+
Pe(e), await Te();
|
|
5420
5465
|
}).catch((e) => {
|
|
5421
|
-
|
|
5466
|
+
ne.value = e?.message || s("Notice.network"), re.value = !0;
|
|
5422
5467
|
});
|
|
5423
|
-
},
|
|
5468
|
+
}, Ie = (e) => {
|
|
5424
5469
|
if (e.type !== "group" && e.optionsType) {
|
|
5425
|
-
let n =
|
|
5470
|
+
let n = W(e.onClick);
|
|
5426
5471
|
e.onClick = () => {
|
|
5427
5472
|
t("update:suffixes", {
|
|
5428
5473
|
isTop: !0,
|
|
@@ -5432,24 +5477,24 @@ var qa = d({
|
|
|
5432
5477
|
open: e.optionsType,
|
|
5433
5478
|
onClick: n,
|
|
5434
5479
|
optionsSource: e.optionsSource,
|
|
5435
|
-
mainFormValue: () =>
|
|
5480
|
+
mainFormValue: () => z.value,
|
|
5436
5481
|
tableData: () => E.value,
|
|
5437
5482
|
children: null,
|
|
5438
5483
|
callback: null
|
|
5439
5484
|
});
|
|
5440
5485
|
};
|
|
5441
5486
|
} else if (e.type !== "group") {
|
|
5442
|
-
let t =
|
|
5487
|
+
let t = W(e.onClick);
|
|
5443
5488
|
e.onClick = async () => {
|
|
5444
5489
|
if (t && typeof t == "string") try {
|
|
5445
5490
|
let e = Function("rowData", "POST", "fnNotification", t);
|
|
5446
|
-
await e(
|
|
5491
|
+
await e(z.value, Z, c, e), B();
|
|
5447
5492
|
} catch (e) {
|
|
5448
5493
|
K(e);
|
|
5449
5494
|
}
|
|
5450
5495
|
};
|
|
5451
5496
|
}
|
|
5452
|
-
},
|
|
5497
|
+
}, Le = () => {
|
|
5453
5498
|
if (_.value) return;
|
|
5454
5499
|
_.value = !0;
|
|
5455
5500
|
let t = e.id || o.params.id;
|
|
@@ -5457,40 +5502,40 @@ var qa = d({
|
|
|
5457
5502
|
table_id: t,
|
|
5458
5503
|
data: null
|
|
5459
5504
|
}).catch(() => null).finally(() => {
|
|
5460
|
-
|
|
5505
|
+
Te(), _.value = !1;
|
|
5461
5506
|
}));
|
|
5462
|
-
},
|
|
5463
|
-
|
|
5464
|
-
},
|
|
5507
|
+
}, Re = (e, t, n) => {
|
|
5508
|
+
Ae(e, n.key);
|
|
5509
|
+
}, ze = () => {
|
|
5465
5510
|
O.value = E.value.map((e) => e.id);
|
|
5466
|
-
},
|
|
5511
|
+
}, Be = () => {
|
|
5467
5512
|
O.value = [];
|
|
5468
5513
|
};
|
|
5469
5514
|
return r({
|
|
5470
|
-
rebuild:
|
|
5471
|
-
init:
|
|
5472
|
-
nextPage:
|
|
5515
|
+
rebuild: Fe,
|
|
5516
|
+
init: B,
|
|
5517
|
+
nextPage: me
|
|
5473
5518
|
}), y(async () => {
|
|
5474
|
-
await
|
|
5519
|
+
await Fe(), h(() => {
|
|
5475
5520
|
d.value?.scrollTo({
|
|
5476
5521
|
left: 0,
|
|
5477
5522
|
right: 0
|
|
5478
5523
|
});
|
|
5479
5524
|
});
|
|
5480
|
-
}),
|
|
5481
|
-
|
|
5482
|
-
}),
|
|
5483
|
-
kt(), await
|
|
5484
|
-
}),
|
|
5485
|
-
let t = e || [], n =
|
|
5486
|
-
|
|
5525
|
+
}), M(() => e.height, () => {
|
|
5526
|
+
De();
|
|
5527
|
+
}), M([() => o.params.id, () => e.id], async () => {
|
|
5528
|
+
kt(), await Fe();
|
|
5529
|
+
}), M(() => e.defaultCheckedRowKeys, (e) => {
|
|
5530
|
+
let t = e || [], n = z.value.filter((e) => t.includes(e.id));
|
|
5531
|
+
ie.value = t, z.value = n;
|
|
5487
5532
|
}, { deep: !0 }), {
|
|
5488
5533
|
t: s,
|
|
5489
5534
|
loading: _,
|
|
5490
5535
|
minH: ee,
|
|
5491
|
-
maxH:
|
|
5536
|
+
maxH: j,
|
|
5492
5537
|
drawerRef: m,
|
|
5493
|
-
tableOption:
|
|
5538
|
+
tableOption: R,
|
|
5494
5539
|
tableCols: T,
|
|
5495
5540
|
tableData: E,
|
|
5496
5541
|
tableQueries: k,
|
|
@@ -5499,58 +5544,58 @@ var qa = d({
|
|
|
5499
5544
|
isSlotHeader: g,
|
|
5500
5545
|
title: b,
|
|
5501
5546
|
dynamicLoading: v,
|
|
5502
|
-
spinMsg:
|
|
5547
|
+
spinMsg: ne,
|
|
5503
5548
|
tableScrollX: D,
|
|
5504
|
-
suffixes:
|
|
5505
|
-
spinError:
|
|
5549
|
+
suffixes: te,
|
|
5550
|
+
spinError: re,
|
|
5506
5551
|
isMobile: l,
|
|
5507
5552
|
mRef: u,
|
|
5508
|
-
checkRowKeys:
|
|
5553
|
+
checkRowKeys: ie,
|
|
5509
5554
|
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:
|
|
5555
|
+
rowKey: oe,
|
|
5556
|
+
pageChange: pe,
|
|
5557
|
+
pageSizeChange: he,
|
|
5558
|
+
pageSorter: ge,
|
|
5559
|
+
showChange: _e,
|
|
5560
|
+
submit: ve,
|
|
5561
|
+
handleAdd: V,
|
|
5562
|
+
handleColumnChange: je,
|
|
5563
|
+
handleCheckRowKeys: ce,
|
|
5564
|
+
handleExpandedRowKeys: le,
|
|
5565
|
+
checkRole: be,
|
|
5566
|
+
rebuild: Fe,
|
|
5567
|
+
summaryFn: ue,
|
|
5568
|
+
handleMobileCheckRowKeys: se,
|
|
5569
|
+
isTypeofNumber: Ee,
|
|
5570
|
+
resetFilter: Le,
|
|
5571
|
+
handleColumnResize: Re,
|
|
5527
5572
|
expandedRowKeys: O,
|
|
5528
|
-
handleExpandAll:
|
|
5529
|
-
handleContractAll:
|
|
5573
|
+
handleExpandAll: ze,
|
|
5574
|
+
handleContractAll: Be,
|
|
5530
5575
|
doPortChange: () => {
|
|
5531
|
-
|
|
5576
|
+
B();
|
|
5532
5577
|
}
|
|
5533
5578
|
};
|
|
5534
5579
|
}
|
|
5535
|
-
}),
|
|
5580
|
+
}), $a = { class: "uz-com-title" }, eo = {
|
|
5536
5581
|
ref: "mRef",
|
|
5537
5582
|
class: "uz-table-m-content"
|
|
5538
|
-
},
|
|
5583
|
+
}, to = {
|
|
5539
5584
|
key: 1,
|
|
5540
5585
|
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"),
|
|
5586
|
+
}, no = { class: "uz-com-title" }, ro = ["data-index"];
|
|
5587
|
+
function io(t, n, u, d, f, p) {
|
|
5588
|
+
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
5589
|
return x(), a("div", {
|
|
5545
5590
|
class: "uz-table",
|
|
5546
5591
|
style: _({ width: t.isTypeofNumber(t.width) })
|
|
5547
5592
|
}, [
|
|
5548
|
-
|
|
5549
|
-
|
|
5593
|
+
F(l(m, null, null, 512), [[j, !t.dynamicLoading]]),
|
|
5594
|
+
F(l(te, {
|
|
5550
5595
|
show: t.spinError,
|
|
5551
5596
|
class: "uz-table-n-spin"
|
|
5552
5597
|
}, {
|
|
5553
|
-
description:
|
|
5598
|
+
description: P(() => [
|
|
5554
5599
|
o("div", null, A(t.spinMsg), 1),
|
|
5555
5600
|
n[1] ||= o("div", { class: "uz-br" }, null, -1),
|
|
5556
5601
|
l(h, {
|
|
@@ -5558,11 +5603,11 @@ function $a(t, n, u, d, f, p) {
|
|
|
5558
5603
|
onClick: t.rebuild,
|
|
5559
5604
|
block: ""
|
|
5560
5605
|
}, {
|
|
5561
|
-
default:
|
|
5606
|
+
default: P(() => [c(A(t.t("Common.retry")), 1)]),
|
|
5562
5607
|
_: 1
|
|
5563
5608
|
}, 8, ["onClick"])
|
|
5564
5609
|
]),
|
|
5565
|
-
default:
|
|
5610
|
+
default: P(() => [t.isMobile ? (x(), a("div", {
|
|
5566
5611
|
key: 0,
|
|
5567
5612
|
class: g([t.enableTransform ? "uz-transform-fade-in" : "", "uz-table-m-main"])
|
|
5568
5613
|
}, [l(S, {
|
|
@@ -5572,18 +5617,18 @@ function $a(t, n, u, d, f, p) {
|
|
|
5572
5617
|
loading: t.loading,
|
|
5573
5618
|
"onOnUpdate:value": t.submit
|
|
5574
5619
|
}, s({
|
|
5575
|
-
action:
|
|
5620
|
+
action: P(() => [
|
|
5576
5621
|
t.addFetch && t.tableOption.addButton ? (x(), r(h, {
|
|
5577
5622
|
key: 0,
|
|
5578
5623
|
secondary: "",
|
|
5579
5624
|
disabled: t.checkRole("add"),
|
|
5580
5625
|
onClick: t.handleAdd
|
|
5581
5626
|
}, {
|
|
5582
|
-
icon:
|
|
5583
|
-
default:
|
|
5627
|
+
icon: P(() => [l(y, null, {
|
|
5628
|
+
default: P(() => [l(v, { icon: "Add" })]),
|
|
5584
5629
|
_: 1
|
|
5585
5630
|
})]),
|
|
5586
|
-
default:
|
|
5631
|
+
default: P(() => [c(" " + A(t.t("Common.add")), 1)]),
|
|
5587
5632
|
_: 1
|
|
5588
5633
|
}, 8, ["disabled", "onClick"])) : i("", !0),
|
|
5589
5634
|
t.suffixes && t.suffixes.length > 0 ? (x(), r(b, {
|
|
@@ -5600,11 +5645,11 @@ function $a(t, n, u, d, f, p) {
|
|
|
5600
5645
|
_: 2
|
|
5601
5646
|
}, [t.isSlotHeader ? {
|
|
5602
5647
|
name: "header",
|
|
5603
|
-
fn:
|
|
5648
|
+
fn: P(() => [E(t.$slots, "header")]),
|
|
5604
5649
|
key: "0"
|
|
5605
5650
|
} : {
|
|
5606
5651
|
name: "header",
|
|
5607
|
-
fn:
|
|
5652
|
+
fn: P(() => [o("div", $a, A(t.title), 1)]),
|
|
5608
5653
|
key: "1"
|
|
5609
5654
|
}]), 1032, [
|
|
5610
5655
|
"data",
|
|
@@ -5612,7 +5657,7 @@ function $a(t, n, u, d, f, p) {
|
|
|
5612
5657
|
"cache",
|
|
5613
5658
|
"loading",
|
|
5614
5659
|
"onOnUpdate:value"
|
|
5615
|
-
]), o("div",
|
|
5660
|
+
]), o("div", eo, [l(C, {
|
|
5616
5661
|
tableColumns: t.tableCols,
|
|
5617
5662
|
tableData: t.tableData,
|
|
5618
5663
|
tableQueries: t.tableQueries,
|
|
@@ -5630,7 +5675,7 @@ function $a(t, n, u, d, f, p) {
|
|
|
5630
5675
|
"minH",
|
|
5631
5676
|
"maxH",
|
|
5632
5677
|
"onUpdate:rowKeys"
|
|
5633
|
-
])], 512)], 2)) : (x(), a("div",
|
|
5678
|
+
])], 512)], 2)) : (x(), a("div", to, [l(M, {
|
|
5634
5679
|
data: t.searchData,
|
|
5635
5680
|
id: t.id || t.route.params.id,
|
|
5636
5681
|
cache: t.tableOption.cache,
|
|
@@ -5639,22 +5684,22 @@ function $a(t, n, u, d, f, p) {
|
|
|
5639
5684
|
enableHeader: t.enableHeader,
|
|
5640
5685
|
"onOnUpdate:value": t.submit
|
|
5641
5686
|
}, s({
|
|
5642
|
-
action:
|
|
5687
|
+
action: P(() => [
|
|
5643
5688
|
t.tableOption.filterButton && t.filterColumns.length > 0 ? (x(), r(k, {
|
|
5644
5689
|
key: 0,
|
|
5645
5690
|
placement: "bottom-end",
|
|
5646
5691
|
trigger: "click",
|
|
5647
5692
|
"show-arrow": !1
|
|
5648
5693
|
}, {
|
|
5649
|
-
trigger:
|
|
5650
|
-
icon:
|
|
5651
|
-
default:
|
|
5694
|
+
trigger: P(() => [l(h, { secondary: "" }, {
|
|
5695
|
+
icon: P(() => [l(y, null, {
|
|
5696
|
+
default: P(() => [l(v, { icon: "Filter" })]),
|
|
5652
5697
|
_: 1
|
|
5653
5698
|
})]),
|
|
5654
|
-
default:
|
|
5699
|
+
default: P(() => [c(" " + A(t.t("Common.columns")), 1)]),
|
|
5655
5700
|
_: 1
|
|
5656
5701
|
})]),
|
|
5657
|
-
default:
|
|
5702
|
+
default: P(() => [l(O, {
|
|
5658
5703
|
modelValue: t.filterColumns,
|
|
5659
5704
|
"onUpdate:modelValue": n[0] ||= (e) => t.filterColumns = e,
|
|
5660
5705
|
animation: 200,
|
|
@@ -5665,7 +5710,7 @@ function $a(t, n, u, d, f, p) {
|
|
|
5665
5710
|
handle: ".uz-drag-handle",
|
|
5666
5711
|
onEnd: t.handleColumnChange
|
|
5667
5712
|
}, {
|
|
5668
|
-
default:
|
|
5713
|
+
default: P(() => [(x(!0), a(e, null, T(t.filterColumns, (e, n) => F((x(), a("div", {
|
|
5669
5714
|
key: e.key,
|
|
5670
5715
|
class: "uz-table-sort",
|
|
5671
5716
|
"data-index": n
|
|
@@ -5674,24 +5719,24 @@ function $a(t, n, u, d, f, p) {
|
|
|
5674
5719
|
"on-update:checked": () => t.showChange(e),
|
|
5675
5720
|
size: "large"
|
|
5676
5721
|
}, {
|
|
5677
|
-
default:
|
|
5722
|
+
default: P(() => [c(A(typeof e.title == "string" ? e.title : e.title && e.title()), 1)]),
|
|
5678
5723
|
_: 2
|
|
5679
5724
|
}, 1032, ["checked", "on-update:checked"]), l(h, {
|
|
5680
5725
|
quaternary: "",
|
|
5681
5726
|
class: "uz-drag-handle"
|
|
5682
5727
|
}, {
|
|
5683
|
-
icon:
|
|
5684
|
-
default:
|
|
5728
|
+
icon: P(() => [l(y, { size: "18" }, {
|
|
5729
|
+
default: P(() => [l(v, { icon: "List" })]),
|
|
5685
5730
|
_: 1
|
|
5686
5731
|
})]),
|
|
5687
5732
|
_: 1
|
|
5688
|
-
})], 8,
|
|
5733
|
+
})], 8, ro)), [[j, !e.hide]])), 128)), l(h, {
|
|
5689
5734
|
block: "",
|
|
5690
5735
|
tertiary: "",
|
|
5691
5736
|
loading: t.loading,
|
|
5692
5737
|
onClick: t.resetFilter
|
|
5693
5738
|
}, {
|
|
5694
|
-
default:
|
|
5739
|
+
default: P(() => [c(A(t.t("Common.reset")), 1)]),
|
|
5695
5740
|
_: 1
|
|
5696
5741
|
}, 8, ["loading", "onClick"])]),
|
|
5697
5742
|
_: 1
|
|
@@ -5723,11 +5768,11 @@ function $a(t, n, u, d, f, p) {
|
|
|
5723
5768
|
disabled: t.checkRole("add"),
|
|
5724
5769
|
onClick: t.handleAdd
|
|
5725
5770
|
}, {
|
|
5726
|
-
icon:
|
|
5727
|
-
default:
|
|
5771
|
+
icon: P(() => [l(y, null, {
|
|
5772
|
+
default: P(() => [l(v, { icon: "Add" })]),
|
|
5728
5773
|
_: 1
|
|
5729
5774
|
})]),
|
|
5730
|
-
default:
|
|
5775
|
+
default: P(() => [c(" " + A(t.t("Common.add")), 1)]),
|
|
5731
5776
|
_: 1
|
|
5732
5777
|
}, 8, ["disabled", "onClick"])) : i("", !0),
|
|
5733
5778
|
E(t.$slots, "action")
|
|
@@ -5735,11 +5780,11 @@ function $a(t, n, u, d, f, p) {
|
|
|
5735
5780
|
_: 2
|
|
5736
5781
|
}, [t.isSlotHeader ? {
|
|
5737
5782
|
name: "header",
|
|
5738
|
-
fn:
|
|
5783
|
+
fn: P(() => [E(t.$slots, "header")]),
|
|
5739
5784
|
key: "0"
|
|
5740
5785
|
} : {
|
|
5741
5786
|
name: "header",
|
|
5742
|
-
fn:
|
|
5787
|
+
fn: P(() => [o("div", no, A(t.title), 1)]),
|
|
5743
5788
|
key: "1"
|
|
5744
5789
|
}]), 1032, [
|
|
5745
5790
|
"data",
|
|
@@ -5749,7 +5794,7 @@ function $a(t, n, u, d, f, p) {
|
|
|
5749
5794
|
"cols",
|
|
5750
5795
|
"enableHeader",
|
|
5751
5796
|
"onOnUpdate:value"
|
|
5752
|
-
]), l(
|
|
5797
|
+
]), l(N, {
|
|
5753
5798
|
ref: "tableRef",
|
|
5754
5799
|
columns: t.tableCols,
|
|
5755
5800
|
data: t.tableData,
|
|
@@ -5796,20 +5841,20 @@ function $a(t, n, u, d, f, p) {
|
|
|
5796
5841
|
"onUpdate:expandedRowKeys"
|
|
5797
5842
|
])]))]),
|
|
5798
5843
|
_: 3
|
|
5799
|
-
}, 8, ["show"]), [[
|
|
5800
|
-
l(
|
|
5844
|
+
}, 8, ["show"]), [[j, t.dynamicLoading]]),
|
|
5845
|
+
l(I, { ref: "drawerRef" }, null, 512)
|
|
5801
5846
|
], 4);
|
|
5802
5847
|
}
|
|
5803
|
-
var
|
|
5848
|
+
var ao = /*#__PURE__*/ Q(Qa, [["render", io]]), oo = d({
|
|
5804
5849
|
name: "UzTableChild",
|
|
5805
5850
|
components: {
|
|
5806
5851
|
UzIcon: qt,
|
|
5807
|
-
NSpin:
|
|
5808
|
-
NButton:
|
|
5809
|
-
NIcon:
|
|
5810
|
-
NDataTable:
|
|
5811
|
-
NForm:
|
|
5812
|
-
NDivider:
|
|
5852
|
+
NSpin: Me,
|
|
5853
|
+
NButton: L,
|
|
5854
|
+
NIcon: V,
|
|
5855
|
+
NDataTable: oe,
|
|
5856
|
+
NForm: pe,
|
|
5857
|
+
NDivider: ce
|
|
5813
5858
|
},
|
|
5814
5859
|
props: {
|
|
5815
5860
|
value: {
|
|
@@ -5828,13 +5873,13 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
5828
5873
|
},
|
|
5829
5874
|
emits: ["update:value"],
|
|
5830
5875
|
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
|
|
5876
|
+
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) => {
|
|
5877
|
+
let { formDefaultValue: r, fillingDefaultArray: i } = await wi(W(n ?? e.item.params.columns), t, void 0, !0);
|
|
5833
5878
|
return S.value = r, i;
|
|
5834
5879
|
}, D = async (t) => {
|
|
5835
5880
|
if (g.value) return;
|
|
5836
5881
|
g.value = !0;
|
|
5837
|
-
let n = await E(t), r =
|
|
5882
|
+
let n = await E(t), r = W(t).map((e, t) => ({
|
|
5838
5883
|
...e,
|
|
5839
5884
|
...n[t]
|
|
5840
5885
|
}));
|
|
@@ -5853,14 +5898,14 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
5853
5898
|
K(e);
|
|
5854
5899
|
}
|
|
5855
5900
|
b.value.child = r, g.value = !1, h(() => {
|
|
5856
|
-
|
|
5901
|
+
F();
|
|
5857
5902
|
});
|
|
5858
5903
|
} else h(() => {
|
|
5859
|
-
|
|
5904
|
+
F();
|
|
5860
5905
|
});
|
|
5861
5906
|
}, O = (e) => e.delete ? "uz-table-child-delete" : "", k = async (t, n = !1) => {
|
|
5862
5907
|
e.item._suffix && (C.value = e.item._suffix.filter((e) => e.sub)), await E(e.value, t);
|
|
5863
|
-
let { tableColumns: r, tableWidth: i } = await
|
|
5908
|
+
let { tableColumns: r, tableWidth: i } = await Ti(W(t ?? e.item.params.columns), !0, e.status, () => b.value.child, a, n), s = i;
|
|
5864
5909
|
r.unshift({
|
|
5865
5910
|
title: " ",
|
|
5866
5911
|
key: "index",
|
|
@@ -5879,7 +5924,7 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
5879
5924
|
hide: !0,
|
|
5880
5925
|
show: !0,
|
|
5881
5926
|
render() {
|
|
5882
|
-
return f("div", { class: "flex justify-center" }, f(
|
|
5927
|
+
return f("div", { class: "flex justify-center" }, f(V, {}, { default: () => f(qt, { icon: "List" }) }));
|
|
5883
5928
|
}
|
|
5884
5929
|
}), s += 40), e.status !== 2 && e.item.params.showActions && r.push({
|
|
5885
5930
|
title: () => l("Common.action"),
|
|
@@ -5927,10 +5972,10 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
5927
5972
|
}
|
|
5928
5973
|
return [];
|
|
5929
5974
|
}, ee = async () => {
|
|
5930
|
-
x.value = "", b.value.child.push(
|
|
5931
|
-
|
|
5975
|
+
x.value = "", b.value.child.push(W(S.value)), h(() => {
|
|
5976
|
+
F();
|
|
5932
5977
|
});
|
|
5933
|
-
},
|
|
5978
|
+
}, j = async () => {
|
|
5934
5979
|
x.value = "";
|
|
5935
5980
|
try {
|
|
5936
5981
|
let t = e.item.params.options;
|
|
@@ -5943,7 +5988,7 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
5943
5988
|
callback: async (e) => {
|
|
5944
5989
|
let t = await n(e, o, Z);
|
|
5945
5990
|
b.value.child = [...b.value.child, ...t], h(() => {
|
|
5946
|
-
|
|
5991
|
+
F();
|
|
5947
5992
|
});
|
|
5948
5993
|
}
|
|
5949
5994
|
});
|
|
@@ -5953,34 +5998,34 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
5953
5998
|
children: () => b.value.child,
|
|
5954
5999
|
callback: async (e) => {
|
|
5955
6000
|
b.value.child = [...b.value.child, ...e], h(() => {
|
|
5956
|
-
|
|
6001
|
+
F();
|
|
5957
6002
|
});
|
|
5958
6003
|
}
|
|
5959
6004
|
});
|
|
5960
6005
|
} catch (e) {
|
|
5961
6006
|
K(e);
|
|
5962
6007
|
}
|
|
5963
|
-
},
|
|
6008
|
+
}, N = () => {
|
|
5964
6009
|
m.value?.restoreValidation();
|
|
5965
|
-
},
|
|
6010
|
+
}, P = () => (x.value = "", new Promise((t, n) => {
|
|
5966
6011
|
let r = b.value.child.filter((e) => !e.delete).length;
|
|
5967
6012
|
e.item.form.rule.required && r === 0 ? (x.value = e.item.form.rule.message, n()) : m.value?.validate((r) => {
|
|
5968
6013
|
r ? (x.value = e.item.form.rule.message, n()) : t();
|
|
5969
6014
|
});
|
|
5970
|
-
})),
|
|
6015
|
+
})), F = () => {
|
|
5971
6016
|
if (e.item.params.draggable && e.status !== 2 && u.value && !d.value) {
|
|
5972
6017
|
let e = u.value.$el.querySelector(".n-data-table-tbody");
|
|
5973
6018
|
e && (d.value = nt.create(e, {
|
|
5974
6019
|
handle: ".uz-drag-handle",
|
|
5975
6020
|
onEnd: ({ oldIndex: e, newIndex: t }) => {
|
|
5976
6021
|
d.value?.destroy(), d.value = null, _.value = !1;
|
|
5977
|
-
let n =
|
|
6022
|
+
let n = W(b.value.child), r = n.splice(e, 1)[0];
|
|
5978
6023
|
n.splice(t, 0, r), n = n.map((e, t) => ({
|
|
5979
6024
|
...e,
|
|
5980
6025
|
sort_index: t
|
|
5981
6026
|
})), b.value.child = n, h(() => {
|
|
5982
6027
|
_.value = !0, setTimeout(() => {
|
|
5983
|
-
|
|
6028
|
+
F();
|
|
5984
6029
|
}, 0);
|
|
5985
6030
|
});
|
|
5986
6031
|
}
|
|
@@ -5990,21 +6035,21 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
5990
6035
|
return v(() => {
|
|
5991
6036
|
d.value?.destroy(), d.value = null;
|
|
5992
6037
|
}), r({
|
|
5993
|
-
validate:
|
|
5994
|
-
restoreValidation:
|
|
5995
|
-
}),
|
|
6038
|
+
validate: P,
|
|
6039
|
+
restoreValidation: N
|
|
6040
|
+
}), M(() => e.item.params.columns, (e, t) => {
|
|
5996
6041
|
JSON.stringify(e) !== JSON.stringify(t) && k(e);
|
|
5997
6042
|
}, {
|
|
5998
6043
|
deep: !0,
|
|
5999
6044
|
immediate: !0
|
|
6000
|
-
}),
|
|
6045
|
+
}), M(() => e.value, (e) => {
|
|
6001
6046
|
JSON.stringify(e) !== JSON.stringify(b.value.child) && D(e);
|
|
6002
6047
|
}, {
|
|
6003
6048
|
deep: !0,
|
|
6004
6049
|
immediate: !0
|
|
6005
|
-
}),
|
|
6050
|
+
}), M(() => b.value.child, (n) => {
|
|
6006
6051
|
e.status !== 2 && t("update:value", n);
|
|
6007
|
-
}, { deep: !0 }),
|
|
6052
|
+
}, { deep: !0 }), M(() => c.value, async () => {
|
|
6008
6053
|
await k(void 0, !0);
|
|
6009
6054
|
}), {
|
|
6010
6055
|
t: l,
|
|
@@ -6019,7 +6064,7 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
6019
6064
|
tableShow: _,
|
|
6020
6065
|
suffixes: C,
|
|
6021
6066
|
onAdd: ee,
|
|
6022
|
-
onAddFormData:
|
|
6067
|
+
onAddFormData: j,
|
|
6023
6068
|
rowClassName: O,
|
|
6024
6069
|
doSuffixClick: (e) => {
|
|
6025
6070
|
i({
|
|
@@ -6033,26 +6078,26 @@ var eo = /*#__PURE__*/ Q(qa, [["render", $a]]), to = d({
|
|
|
6033
6078
|
}
|
|
6034
6079
|
};
|
|
6035
6080
|
}
|
|
6036
|
-
}),
|
|
6081
|
+
}), so = { class: "uz-flex-1 uz-w-full" }, co = { class: "uz-flex uz-justify-between" }, lo = { class: "uz-com-title" }, uo = {
|
|
6037
6082
|
key: 0,
|
|
6038
6083
|
class: "uz-table-asterisk"
|
|
6039
|
-
},
|
|
6040
|
-
function
|
|
6084
|
+
}, fo = { class: "uz-flex uz-gap-2" }, po = { class: "uz-flex uz-justify-end uz-gap-2" };
|
|
6085
|
+
function mo(t, n, u, d, f, p) {
|
|
6041
6086
|
let m = D("UzIcon"), h = D("NIcon"), _ = D("NButton"), v = D("NDataTable"), y = D("NForm");
|
|
6042
|
-
return x(), a("div",
|
|
6043
|
-
o("div",
|
|
6087
|
+
return x(), a("div", so, [
|
|
6088
|
+
o("div", co, [o("div", lo, [c(A(t.item.label) + " ", 1), t.item.form.rule.required ? (x(), a("span", uo, " \xA0* ")) : i("", !0)]), o("div", fo, [
|
|
6044
6089
|
t.status === 2 ? i("", !0) : (x(!0), a(e, { key: 0 }, T(t.suffixes, (e) => (x(), r(_, {
|
|
6045
6090
|
key: e.key,
|
|
6046
6091
|
type: e.color,
|
|
6047
6092
|
secondary: "",
|
|
6048
6093
|
onClick: (n) => t.doSuffixClick(e)
|
|
6049
6094
|
}, s({
|
|
6050
|
-
default:
|
|
6095
|
+
default: P(() => [c(" " + A(e.buttonText), 1)]),
|
|
6051
6096
|
_: 2
|
|
6052
6097
|
}, [e.icon ? {
|
|
6053
6098
|
name: "icon",
|
|
6054
|
-
fn:
|
|
6055
|
-
default:
|
|
6099
|
+
fn: P(() => [l(h, null, {
|
|
6100
|
+
default: P(() => [l(m, { icon: e.icon }, null, 8, ["icon"])]),
|
|
6056
6101
|
_: 2
|
|
6057
6102
|
}, 1024)]),
|
|
6058
6103
|
key: "0"
|
|
@@ -6063,11 +6108,11 @@ function co(t, n, u, d, f, p) {
|
|
|
6063
6108
|
secondary: "",
|
|
6064
6109
|
onClick: t.onAddFormData
|
|
6065
6110
|
}, {
|
|
6066
|
-
icon:
|
|
6067
|
-
default:
|
|
6111
|
+
icon: P(() => [l(h, null, {
|
|
6112
|
+
default: P(() => [l(m, { icon: "Add" })]),
|
|
6068
6113
|
_: 1
|
|
6069
6114
|
})]),
|
|
6070
|
-
default:
|
|
6115
|
+
default: P(() => [c(" " + A(t.t("Table.addFromData")), 1)]),
|
|
6071
6116
|
_: 1
|
|
6072
6117
|
}, 8, ["onClick"])) : i("", !0),
|
|
6073
6118
|
t.item.params.addButton && t.status !== 2 && (t.item.form.edit ? !t.item.form.edit.readonly : !t.item.form.readonly) ? (x(), r(_, {
|
|
@@ -6076,11 +6121,11 @@ function co(t, n, u, d, f, p) {
|
|
|
6076
6121
|
secondary: "",
|
|
6077
6122
|
onClick: t.onAdd
|
|
6078
6123
|
}, {
|
|
6079
|
-
icon:
|
|
6080
|
-
default:
|
|
6124
|
+
icon: P(() => [l(h, null, {
|
|
6125
|
+
default: P(() => [l(m, { icon: "Add" })]),
|
|
6081
6126
|
_: 1
|
|
6082
6127
|
})]),
|
|
6083
|
-
default:
|
|
6128
|
+
default: P(() => [c(" " + A(t.t("Common.add")), 1)]),
|
|
6084
6129
|
_: 1
|
|
6085
6130
|
}, 8, ["onClick"])) : i("", !0)
|
|
6086
6131
|
])]),
|
|
@@ -6091,7 +6136,7 @@ function co(t, n, u, d, f, p) {
|
|
|
6091
6136
|
model: t.tableData,
|
|
6092
6137
|
class: "uz-flex uz-flex-col uz-gap-2"
|
|
6093
6138
|
}, {
|
|
6094
|
-
default:
|
|
6139
|
+
default: P(() => [t.tableShow ? (x(), r(v, {
|
|
6095
6140
|
key: 0,
|
|
6096
6141
|
ref: "tableRef",
|
|
6097
6142
|
columns: t.columns,
|
|
@@ -6113,17 +6158,17 @@ function co(t, n, u, d, f, p) {
|
|
|
6113
6158
|
"scroll-x",
|
|
6114
6159
|
"class",
|
|
6115
6160
|
"row-class-name"
|
|
6116
|
-
])) : i("", !0), o("div",
|
|
6161
|
+
])) : i("", !0), o("div", po, [t.item.params.optionsType && t.status !== 2 && (t.item.form.edit ? !t.item.form.edit.readonly : !t.item.form.readonly) ? (x(), r(_, {
|
|
6117
6162
|
key: 0,
|
|
6118
6163
|
type: "success",
|
|
6119
6164
|
secondary: "",
|
|
6120
6165
|
onClick: t.onAddFormData
|
|
6121
6166
|
}, {
|
|
6122
|
-
icon:
|
|
6123
|
-
default:
|
|
6167
|
+
icon: P(() => [l(h, null, {
|
|
6168
|
+
default: P(() => [l(m, { icon: "Add" })]),
|
|
6124
6169
|
_: 1
|
|
6125
6170
|
})]),
|
|
6126
|
-
default:
|
|
6171
|
+
default: P(() => [c(" " + A(t.t("Table.addFromData")), 1)]),
|
|
6127
6172
|
_: 1
|
|
6128
6173
|
}, 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
6174
|
key: 1,
|
|
@@ -6131,20 +6176,20 @@ function co(t, n, u, d, f, p) {
|
|
|
6131
6176
|
secondary: "",
|
|
6132
6177
|
onClick: t.onAdd
|
|
6133
6178
|
}, {
|
|
6134
|
-
icon:
|
|
6135
|
-
default:
|
|
6179
|
+
icon: P(() => [l(h, null, {
|
|
6180
|
+
default: P(() => [l(m, { icon: "Add" })]),
|
|
6136
6181
|
_: 1
|
|
6137
6182
|
})]),
|
|
6138
|
-
default:
|
|
6183
|
+
default: P(() => [c(" " + A(t.t("Common.add")), 1)]),
|
|
6139
6184
|
_: 1
|
|
6140
6185
|
}, 8, ["onClick"])) : i("", !0)])]),
|
|
6141
6186
|
_: 1
|
|
6142
6187
|
}, 8, ["model"])
|
|
6143
6188
|
]);
|
|
6144
6189
|
}
|
|
6145
|
-
var
|
|
6190
|
+
var ho = /*#__PURE__*/ Q(oo, [["render", mo]]), go = d({
|
|
6146
6191
|
name: "UzTableQuestChild",
|
|
6147
|
-
components: { NDataTable:
|
|
6192
|
+
components: { NDataTable: oe },
|
|
6148
6193
|
props: {
|
|
6149
6194
|
formValue: {
|
|
6150
6195
|
type: Object,
|
|
@@ -6158,7 +6203,7 @@ var lo = /*#__PURE__*/ Q(to, [["render", co]]), uo = d({
|
|
|
6158
6203
|
},
|
|
6159
6204
|
emits: ["update:value"],
|
|
6160
6205
|
setup(e) {
|
|
6161
|
-
let t = p("modules"), { t: n } =
|
|
6206
|
+
let t = p("modules"), { t: n } = U(), r = w(), i = w(!1), a = w([]), o = w([]), s = w(void 0), c = (t) => {
|
|
6162
6207
|
if (i.value = !0, e.item.params.link) {
|
|
6163
6208
|
let n = [];
|
|
6164
6209
|
e.item.params.columns.forEach((e) => {
|
|
@@ -6170,7 +6215,7 @@ var lo = /*#__PURE__*/ Q(to, [["render", co]]), uo = d({
|
|
|
6170
6215
|
}), o.value = t, i.value = !1;
|
|
6171
6216
|
}
|
|
6172
6217
|
}, l = async (i) => {
|
|
6173
|
-
let { tableColumns: c, tableWidth: l } = await
|
|
6218
|
+
let { tableColumns: c, tableWidth: l } = await Ti(W(i ?? e.item.params.columns), !0, 2, () => o.value, t), u = l;
|
|
6174
6219
|
c.unshift({
|
|
6175
6220
|
title: " ",
|
|
6176
6221
|
key: "index",
|
|
@@ -6207,7 +6252,7 @@ var lo = /*#__PURE__*/ Q(to, [["render", co]]), uo = d({
|
|
|
6207
6252
|
};
|
|
6208
6253
|
return y(() => {
|
|
6209
6254
|
l();
|
|
6210
|
-
}),
|
|
6255
|
+
}), N(async () => {
|
|
6211
6256
|
try {
|
|
6212
6257
|
if (e.formValue && e.formValue.id && e.item.params.searchKey) {
|
|
6213
6258
|
let t = await Xn({
|
|
@@ -6244,11 +6289,11 @@ var lo = /*#__PURE__*/ Q(to, [["render", co]]), uo = d({
|
|
|
6244
6289
|
tableScrollX: s
|
|
6245
6290
|
};
|
|
6246
6291
|
}
|
|
6247
|
-
}),
|
|
6248
|
-
function
|
|
6292
|
+
}), _o = { class: "uz-flex-1 uz-w-full" }, vo = { class: "uz-flex uz-justify-between" }, yo = { class: "uz-com-title" };
|
|
6293
|
+
function bo(e, t, n, r, i, s) {
|
|
6249
6294
|
let c = D("NDataTable"), u = D("UzTableDrawer");
|
|
6250
|
-
return x(), a("div",
|
|
6251
|
-
o("div",
|
|
6295
|
+
return x(), a("div", _o, [
|
|
6296
|
+
o("div", vo, [o("div", yo, A(e.item.label), 1)]),
|
|
6252
6297
|
t[0] ||= o("div", { class: "uz-br" }, null, -1),
|
|
6253
6298
|
l(c, {
|
|
6254
6299
|
columns: e.columns,
|
|
@@ -6270,20 +6315,20 @@ function ho(e, t, n, r, i, s) {
|
|
|
6270
6315
|
l(u, { ref: "drawerRef" }, null, 512)
|
|
6271
6316
|
]);
|
|
6272
6317
|
}
|
|
6273
|
-
var
|
|
6318
|
+
var xo = /*#__PURE__*/ Q(go, [["render", bo]]), So = d({
|
|
6274
6319
|
name: "UzTableDrawer",
|
|
6275
6320
|
components: {
|
|
6276
|
-
NButton:
|
|
6277
|
-
NDrawerContent:
|
|
6278
|
-
NDrawer:
|
|
6279
|
-
NSkeleton:
|
|
6280
|
-
NSpin:
|
|
6281
|
-
NPopover:
|
|
6282
|
-
NModal:
|
|
6321
|
+
NButton: L,
|
|
6322
|
+
NDrawerContent: ue,
|
|
6323
|
+
NDrawer: le,
|
|
6324
|
+
NSkeleton: Ae,
|
|
6325
|
+
NSpin: Me,
|
|
6326
|
+
NPopover: Ee,
|
|
6327
|
+
NModal: Ce
|
|
6283
6328
|
},
|
|
6284
6329
|
emits: ["update:show", "on-submit"],
|
|
6285
6330
|
setup(e, { emit: t, expose: r }) {
|
|
6286
|
-
let { t: i } =
|
|
6331
|
+
let { t: i } = U(), a = n(() => Y.isMobile), o = w(), s = w(""), c = w(0), l = w({}), u = w({
|
|
6287
6332
|
link: "",
|
|
6288
6333
|
linkFn: ""
|
|
6289
6334
|
}), d = w(!1), f = w({
|
|
@@ -6342,11 +6387,11 @@ var go = /*#__PURE__*/ Q(uo, [["render", ho]]), _o = d({
|
|
|
6342
6387
|
linkFn: t
|
|
6343
6388
|
};
|
|
6344
6389
|
let r = e.split(".")[0];
|
|
6345
|
-
|
|
6390
|
+
_i(r).then((e) => {
|
|
6346
6391
|
h(async () => {
|
|
6347
|
-
let t =
|
|
6348
|
-
f.value =
|
|
6349
|
-
let { form: i } = await
|
|
6392
|
+
let t = tt.parse(e.viewJson);
|
|
6393
|
+
f.value = Ci(t.option), d.value = !0;
|
|
6394
|
+
let { form: i } = await wi(yi(t.table), n);
|
|
6350
6395
|
b.value = t.trigger, n && E(n);
|
|
6351
6396
|
let a = J(`tables_cache_link_${r}`, !1);
|
|
6352
6397
|
a && (l.value = a), h(() => {
|
|
@@ -6405,7 +6450,7 @@ var go = /*#__PURE__*/ Q(uo, [["render", ho]]), _o = d({
|
|
|
6405
6450
|
tableId: n,
|
|
6406
6451
|
...e
|
|
6407
6452
|
}).then(() => {
|
|
6408
|
-
|
|
6453
|
+
hi(), Xn({ tableId: n }).then((e) => {
|
|
6409
6454
|
let r = u.value.link.split("."), i;
|
|
6410
6455
|
if (u.value.linkFn) {
|
|
6411
6456
|
let t = u.value.linkFn;
|
|
@@ -6438,11 +6483,11 @@ var go = /*#__PURE__*/ Q(uo, [["render", ho]]), _o = d({
|
|
|
6438
6483
|
}
|
|
6439
6484
|
};
|
|
6440
6485
|
}
|
|
6441
|
-
}),
|
|
6486
|
+
}), Co = { class: "uz-flex uz-flex-col uz-gap-2 uz-h-full" }, wo = {
|
|
6442
6487
|
key: 0,
|
|
6443
6488
|
class: "uz-grid uz-grid-cols-2 uz-gap-2"
|
|
6444
|
-
},
|
|
6445
|
-
function
|
|
6489
|
+
}, To = { class: "uz-flex uz-justify-between uz-gap-2 uz-w-full" }, Eo = { class: "uz-flex uz-gap-2" };
|
|
6490
|
+
function Do(t, n, u, d, f, p) {
|
|
6446
6491
|
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
6492
|
return x(), a(e, null, [l(S, {
|
|
6448
6493
|
show: t.drawer,
|
|
@@ -6456,19 +6501,19 @@ function So(t, n, u, d, f, p) {
|
|
|
6456
6501
|
"auto-focus": !1,
|
|
6457
6502
|
"mask-closable": !1
|
|
6458
6503
|
}, {
|
|
6459
|
-
default:
|
|
6504
|
+
default: P(() => [l(b, {
|
|
6460
6505
|
title: t.formStatus === 1 ? t.t("Common.edit") : t.formStatus === 2 ? t.t("Common.detail") : t.t("Common.add"),
|
|
6461
6506
|
closable: ""
|
|
6462
6507
|
}, s({
|
|
6463
|
-
default:
|
|
6464
|
-
description:
|
|
6465
|
-
default:
|
|
6508
|
+
default: P(() => [l(_, { show: t.spinError }, {
|
|
6509
|
+
description: P(() => [c(A(t.t("Notice.error")), 1)]),
|
|
6510
|
+
default: P(() => [l(g, {
|
|
6466
6511
|
value: t.spinShow,
|
|
6467
6512
|
"onUpdate:value": n[0] ||= (e) => t.spinShow = e,
|
|
6468
6513
|
message: t.spinMsg,
|
|
6469
6514
|
status: t.spinStatus
|
|
6470
6515
|
}, {
|
|
6471
|
-
default:
|
|
6516
|
+
default: P(() => [o("div", Co, [t.skeletonShow ? (x(), a("div", wo, [
|
|
6472
6517
|
l(m, {
|
|
6473
6518
|
size: "large",
|
|
6474
6519
|
style: { height: "156px" }
|
|
@@ -6531,40 +6576,40 @@ function So(t, n, u, d, f, p) {
|
|
|
6531
6576
|
_: 2
|
|
6532
6577
|
}, [t.formStatus === 2 ? void 0 : {
|
|
6533
6578
|
name: "footer",
|
|
6534
|
-
fn:
|
|
6579
|
+
fn: P(() => [o("div", To, [t.isMobile ? i("", !0) : (x(), r(v, {
|
|
6535
6580
|
key: 0,
|
|
6536
6581
|
loading: t.spinShow,
|
|
6537
6582
|
type: "success",
|
|
6538
6583
|
class: "uz-drawer-button",
|
|
6539
6584
|
onClick: n[1] ||= (e) => t.ocrShow = !t.ocrShow
|
|
6540
6585
|
}, {
|
|
6541
|
-
default:
|
|
6586
|
+
default: P(() => [c(A(t.t("OCR.ocr")), 1)]),
|
|
6542
6587
|
_: 1
|
|
6543
|
-
}, 8, ["loading"])), o("div",
|
|
6588
|
+
}, 8, ["loading"])), o("div", Eo, [
|
|
6544
6589
|
l(v, {
|
|
6545
6590
|
loading: t.spinShow,
|
|
6546
6591
|
class: "uz-drawer-button",
|
|
6547
6592
|
secondary: "",
|
|
6548
6593
|
onClick: t.drawerCheck
|
|
6549
6594
|
}, {
|
|
6550
|
-
default:
|
|
6595
|
+
default: P(() => [c(A(t.t("Common.cancel")), 1)]),
|
|
6551
6596
|
_: 1
|
|
6552
6597
|
}, 8, ["loading", "onClick"]),
|
|
6553
6598
|
t.formStatus === 0 ? (x(), r(y, {
|
|
6554
6599
|
key: 0,
|
|
6555
6600
|
trigger: "hover"
|
|
6556
6601
|
}, {
|
|
6557
|
-
trigger:
|
|
6602
|
+
trigger: P(() => [l(v, {
|
|
6558
6603
|
type: "success",
|
|
6559
6604
|
loading: t.spinShow,
|
|
6560
6605
|
class: "uz-drawer-button",
|
|
6561
6606
|
secondary: "",
|
|
6562
6607
|
onClick: t.doCacheToStore
|
|
6563
6608
|
}, {
|
|
6564
|
-
default:
|
|
6609
|
+
default: P(() => [c(A(t.t("Common.cache")), 1)]),
|
|
6565
6610
|
_: 1
|
|
6566
6611
|
}, 8, ["loading", "onClick"])]),
|
|
6567
|
-
default:
|
|
6612
|
+
default: P(() => [o("span", null, A(t.t("Table.cacheTip")), 1)]),
|
|
6568
6613
|
_: 1
|
|
6569
6614
|
})) : i("", !0),
|
|
6570
6615
|
l(v, {
|
|
@@ -6573,7 +6618,7 @@ function So(t, n, u, d, f, p) {
|
|
|
6573
6618
|
type: "primary",
|
|
6574
6619
|
onClick: t.drawerSubmit
|
|
6575
6620
|
}, {
|
|
6576
|
-
default:
|
|
6621
|
+
default: P(() => [c(A(t.t("Common.apply")), 1)]),
|
|
6577
6622
|
_: 1
|
|
6578
6623
|
}, 8, ["loading", "onClick"])
|
|
6579
6624
|
])])]),
|
|
@@ -6604,11 +6649,11 @@ function So(t, n, u, d, f, p) {
|
|
|
6604
6649
|
bottom: "0"
|
|
6605
6650
|
}
|
|
6606
6651
|
}, {
|
|
6607
|
-
default:
|
|
6652
|
+
default: P(() => [l(C)]),
|
|
6608
6653
|
_: 1
|
|
6609
6654
|
}, 8, ["show", "title"])], 64);
|
|
6610
6655
|
}
|
|
6611
|
-
var
|
|
6656
|
+
var Oo = /*#__PURE__*/ Q(So, [["render", Do]]), ko = d({
|
|
6612
6657
|
name: "UzTableMobileList",
|
|
6613
6658
|
props: {
|
|
6614
6659
|
tableData: {
|
|
@@ -6626,12 +6671,12 @@ var Co = /*#__PURE__*/ Q(_o, [["render", So]]), wo = d({
|
|
|
6626
6671
|
},
|
|
6627
6672
|
emits: ["update:row-keys"],
|
|
6628
6673
|
setup() {}
|
|
6629
|
-
}),
|
|
6674
|
+
}), Ao = { class: "uz-grid uz-grid-cols-2 uz-gap-2" }, jo = {
|
|
6630
6675
|
key: 1,
|
|
6631
6676
|
class: "uz-table-mobile-group-txt"
|
|
6632
6677
|
};
|
|
6633
|
-
function
|
|
6634
|
-
return x(), a("div",
|
|
6678
|
+
function Mo(t, n, s, c, l, u) {
|
|
6679
|
+
return x(), a("div", Ao, [(x(!0), a(e, null, T(t.tableColumns, (n) => (x(), a("div", {
|
|
6635
6680
|
key: n.key,
|
|
6636
6681
|
class: g(["uz-flex uz-overflow-hidden", n.lineBreak ? "uz-flex-col" : ""]),
|
|
6637
6682
|
style: _(`grid-column: span ${n.lineCol || 2} / span ${n.lineCol || 2}`)
|
|
@@ -6642,19 +6687,19 @@ function Do(t, n, s, c, l, u) {
|
|
|
6642
6687
|
class: "mobile"
|
|
6643
6688
|
})) : 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
6689
|
if (t.tableData) return n.render(t.tableData, t.tableIndex);
|
|
6645
|
-
}), { key: 0 })) : (x(), a("div",
|
|
6690
|
+
}), { key: 0 })) : (x(), a("div", jo, A(t.tableData[n.key] || "-"), 1))], 2)], 64))], 6))), 128))]);
|
|
6646
6691
|
}
|
|
6647
6692
|
//#endregion
|
|
6648
6693
|
//#region components/table/mobile.vue?vue&type=script&lang.ts
|
|
6649
|
-
var
|
|
6694
|
+
var No = d({
|
|
6650
6695
|
name: "UzTableMobile",
|
|
6651
6696
|
components: {
|
|
6652
|
-
NCheckbox:
|
|
6653
|
-
NRadio:
|
|
6654
|
-
NPagination:
|
|
6655
|
-
NCheckboxGroup:
|
|
6656
|
-
NRadioGroup:
|
|
6657
|
-
UzTableMobileList: /* @__PURE__ */ Q(
|
|
6697
|
+
NCheckbox: re,
|
|
6698
|
+
NRadio: De,
|
|
6699
|
+
NPagination: we,
|
|
6700
|
+
NCheckboxGroup: ie,
|
|
6701
|
+
NRadioGroup: Oe,
|
|
6702
|
+
UzTableMobileList: /* @__PURE__ */ Q(ko, [["render", Mo], ["__scopeId", "data-v-84c394fe"]])
|
|
6658
6703
|
},
|
|
6659
6704
|
props: {
|
|
6660
6705
|
tableData: {
|
|
@@ -6701,17 +6746,17 @@ var Oo = d({
|
|
|
6701
6746
|
}
|
|
6702
6747
|
};
|
|
6703
6748
|
}
|
|
6704
|
-
}),
|
|
6749
|
+
}), Po = {
|
|
6705
6750
|
key: 0,
|
|
6706
6751
|
class: "uz-flex uz-justify-center uz-text-center uz-pb-4"
|
|
6707
|
-
},
|
|
6752
|
+
}, Fo = {
|
|
6708
6753
|
key: 0,
|
|
6709
6754
|
class: "uz-flex uz-justify-center uz-text-center uz-pb-4"
|
|
6710
|
-
},
|
|
6755
|
+
}, Io = {
|
|
6711
6756
|
key: 0,
|
|
6712
6757
|
class: "uz-flex uz-justify-center uz-text-center uz-pb-4"
|
|
6713
6758
|
};
|
|
6714
|
-
function
|
|
6759
|
+
function Lo(t, n, o, s, c, u) {
|
|
6715
6760
|
let d = D("UzTableMobileList"), f = D("NCheckbox"), p = D("NPagination"), m = D("NCheckboxGroup"), h = D("NRadio"), g = D("NRadioGroup");
|
|
6716
6761
|
return t.selection === 2 ? (x(), r(m, {
|
|
6717
6762
|
key: 0,
|
|
@@ -6723,12 +6768,12 @@ function Mo(t, n, o, s, c, u) {
|
|
|
6723
6768
|
maxHeight: t.maxH
|
|
6724
6769
|
})
|
|
6725
6770
|
}, {
|
|
6726
|
-
default:
|
|
6771
|
+
default: P(() => [(x(!0), a(e, null, T(t.tableData, (e, n) => (x(), r(f, {
|
|
6727
6772
|
key: e.id,
|
|
6728
6773
|
class: "uz-com-card uz-flex uz-gap-2",
|
|
6729
6774
|
value: e.id
|
|
6730
6775
|
}, {
|
|
6731
|
-
default:
|
|
6776
|
+
default: P(() => [l(d, {
|
|
6732
6777
|
tableData: e,
|
|
6733
6778
|
tableIndex: n,
|
|
6734
6779
|
tableColumns: t.tableColumns
|
|
@@ -6738,7 +6783,7 @@ function Mo(t, n, o, s, c, u) {
|
|
|
6738
6783
|
"tableColumns"
|
|
6739
6784
|
])]),
|
|
6740
6785
|
_: 2
|
|
6741
|
-
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div",
|
|
6786
|
+
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div", Po, [l(p, {
|
|
6742
6787
|
page: t.tableQueries.query.page,
|
|
6743
6788
|
"onUpdate:page": [n[0] ||= (e) => t.tableQueries.query.page = e, t.pageChange],
|
|
6744
6789
|
"item-count": t.tableQueries.query.itemCount,
|
|
@@ -6765,12 +6810,12 @@ function Mo(t, n, o, s, c, u) {
|
|
|
6765
6810
|
maxHeight: t.maxH
|
|
6766
6811
|
})
|
|
6767
6812
|
}, {
|
|
6768
|
-
default:
|
|
6813
|
+
default: P(() => [(x(!0), a(e, null, T(t.tableData, (e, n) => (x(), r(h, {
|
|
6769
6814
|
key: e.id,
|
|
6770
6815
|
class: "uz-com-card uz-flex uz-gap-2",
|
|
6771
6816
|
value: e.id
|
|
6772
6817
|
}, {
|
|
6773
|
-
default:
|
|
6818
|
+
default: P(() => [l(d, {
|
|
6774
6819
|
tableData: e,
|
|
6775
6820
|
tableIndex: n,
|
|
6776
6821
|
tableColumns: t.tableColumns
|
|
@@ -6780,7 +6825,7 @@ function Mo(t, n, o, s, c, u) {
|
|
|
6780
6825
|
"tableColumns"
|
|
6781
6826
|
])]),
|
|
6782
6827
|
_: 2
|
|
6783
|
-
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div",
|
|
6828
|
+
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div", Fo, [l(p, {
|
|
6784
6829
|
page: t.tableQueries.query.page,
|
|
6785
6830
|
"onUpdate:page": [n[2] ||= (e) => t.tableQueries.query.page = e, t.pageChange],
|
|
6786
6831
|
"item-count": t.tableQueries.query.itemCount,
|
|
@@ -6815,7 +6860,7 @@ function Mo(t, n, o, s, c, u) {
|
|
|
6815
6860
|
"tableData",
|
|
6816
6861
|
"tableIndex",
|
|
6817
6862
|
"tableColumns"
|
|
6818
|
-
])]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div",
|
|
6863
|
+
])]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div", Io, [l(p, {
|
|
6819
6864
|
page: t.tableQueries.query.page,
|
|
6820
6865
|
"onUpdate:page": [n[4] ||= (e) => t.tableQueries.query.page = e, t.pageChange],
|
|
6821
6866
|
"item-count": t.tableQueries.query.itemCount,
|
|
@@ -6828,17 +6873,17 @@ function Mo(t, n, o, s, c, u) {
|
|
|
6828
6873
|
"onUpdate:page"
|
|
6829
6874
|
])])) : i("", !0)], 4));
|
|
6830
6875
|
}
|
|
6831
|
-
var
|
|
6876
|
+
var Ro = /*#__PURE__*/ Q(No, [["render", Lo], ["__scopeId", "data-v-70b54e3b"]]), zo = d({
|
|
6832
6877
|
name: "UzTableFile",
|
|
6833
6878
|
components: {
|
|
6834
6879
|
UzIcon: qt,
|
|
6835
|
-
NDropdown:
|
|
6836
|
-
NButton:
|
|
6837
|
-
NModal:
|
|
6838
|
-
NUpload:
|
|
6839
|
-
NSpace:
|
|
6840
|
-
NIcon:
|
|
6841
|
-
NDataTable:
|
|
6880
|
+
NDropdown: de,
|
|
6881
|
+
NButton: L,
|
|
6882
|
+
NModal: Ce,
|
|
6883
|
+
NUpload: Re,
|
|
6884
|
+
NSpace: je,
|
|
6885
|
+
NIcon: V,
|
|
6886
|
+
NDataTable: oe
|
|
6842
6887
|
},
|
|
6843
6888
|
props: {
|
|
6844
6889
|
query: {
|
|
@@ -6854,14 +6899,14 @@ var No = /*#__PURE__*/ Q(Oo, [["render", Mo], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
6854
6899
|
},
|
|
6855
6900
|
emits: ["on-update:change"],
|
|
6856
6901
|
setup(e, { emit: t }) {
|
|
6857
|
-
let { t: n } =
|
|
6902
|
+
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
6903
|
label: n("Common.import"),
|
|
6859
6904
|
key: "import",
|
|
6860
|
-
icon: () => f(
|
|
6905
|
+
icon: () => f(V, null, { default: () => f(qt, { icon: "CloudUpload" }) })
|
|
6861
6906
|
}, {
|
|
6862
6907
|
label: n("Common.export"),
|
|
6863
6908
|
key: "export",
|
|
6864
|
-
icon: () => f(
|
|
6909
|
+
icon: () => f(V, null, { default: () => f(qt, { icon: "CloudDownload" }) })
|
|
6865
6910
|
}]), d = w([
|
|
6866
6911
|
{
|
|
6867
6912
|
title: n("Common.fileName"),
|
|
@@ -6887,7 +6932,7 @@ var No = /*#__PURE__*/ Q(Oo, [["render", Mo], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
6887
6932
|
key: "action",
|
|
6888
6933
|
align: "center",
|
|
6889
6934
|
render(e) {
|
|
6890
|
-
return f(
|
|
6935
|
+
return f(L, {
|
|
6891
6936
|
tertiary: !0,
|
|
6892
6937
|
onClick: () => {
|
|
6893
6938
|
window.open(e.cosUrl);
|
|
@@ -6967,23 +7012,23 @@ var No = /*#__PURE__*/ Q(Oo, [["render", Mo], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
6967
7012
|
}
|
|
6968
7013
|
};
|
|
6969
7014
|
}
|
|
6970
|
-
}),
|
|
7015
|
+
}), Bo = { class: "uz-file-port-modal" }, Vo = { class: "uz-file-port-card" }, Ho = { class: "uz-file-port-subtitle" }, Uo = {
|
|
6971
7016
|
key: 1,
|
|
6972
7017
|
class: "uz-file-port-panel"
|
|
6973
|
-
},
|
|
6974
|
-
function
|
|
7018
|
+
}, Wo = { class: "uz-file-port-subtitle" }, Go = { class: "uz-flex uz-justify-between" }, Ko = { class: "uz-com-title" };
|
|
7019
|
+
function qo(t, n, i, s, u, d) {
|
|
6975
7020
|
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
7021
|
return x(), a(e, null, [l(h, {
|
|
6977
7022
|
trigger: "hover",
|
|
6978
7023
|
options: t.dropOption,
|
|
6979
7024
|
onSelect: t.dropSelect
|
|
6980
7025
|
}, {
|
|
6981
|
-
default:
|
|
6982
|
-
icon:
|
|
6983
|
-
default:
|
|
7026
|
+
default: P(() => [l(m, { secondary: "" }, {
|
|
7027
|
+
icon: P(() => [l(p, null, {
|
|
7028
|
+
default: P(() => [l(f, { icon: "ClipboardText" })]),
|
|
6984
7029
|
_: 1
|
|
6985
7030
|
})]),
|
|
6986
|
-
default:
|
|
7031
|
+
default: P(() => [c(" " + A(t.t("Common.file")), 1)]),
|
|
6987
7032
|
_: 1
|
|
6988
7033
|
})]),
|
|
6989
7034
|
_: 1
|
|
@@ -6998,16 +7043,16 @@ function Ho(t, n, i, s, u, d) {
|
|
|
6998
7043
|
"auto-focus": !1,
|
|
6999
7044
|
"on-after-leave": t.modalLeave
|
|
7000
7045
|
}, {
|
|
7001
|
-
"header-extra":
|
|
7046
|
+
"header-extra": P(() => [l(m, {
|
|
7002
7047
|
type: "success",
|
|
7003
7048
|
onClick: t.downloadTemplate,
|
|
7004
7049
|
secondary: ""
|
|
7005
7050
|
}, {
|
|
7006
|
-
default:
|
|
7051
|
+
default: P(() => [c(A(t.t("File.downloadTemplate")), 1)]),
|
|
7007
7052
|
_: 1
|
|
7008
7053
|
}, 8, ["onClick"])]),
|
|
7009
|
-
default:
|
|
7010
|
-
t.rawFile ? (x(), a("div",
|
|
7054
|
+
default: P(() => [o("div", Bo, [
|
|
7055
|
+
t.rawFile ? (x(), a("div", Uo, [
|
|
7011
7056
|
n[2] ||= o("div", { class: "uz-file-port-icon" }, [o("svg", {
|
|
7012
7057
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7013
7058
|
viewBox: "0 0 24 24",
|
|
@@ -7016,15 +7061,15 @@ function Ho(t, n, i, s, u, d) {
|
|
|
7016
7061
|
fill: "currentColor"
|
|
7017
7062
|
}, [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
7063
|
o("div", null, A(t.rawFileName.join(",")), 1),
|
|
7019
|
-
o("div",
|
|
7064
|
+
o("div", Wo, A(t.t("File.importWaitTip")), 1),
|
|
7020
7065
|
l(_, { justify: "space-between" }, {
|
|
7021
|
-
default:
|
|
7066
|
+
default: P(() => [l(m, {
|
|
7022
7067
|
size: "small",
|
|
7023
7068
|
secondary: "",
|
|
7024
7069
|
type: "default",
|
|
7025
7070
|
onClick: t.clearFile
|
|
7026
7071
|
}, {
|
|
7027
|
-
default:
|
|
7072
|
+
default: P(() => [c(A(t.t("Common.selectAgain")), 1)]),
|
|
7028
7073
|
_: 1
|
|
7029
7074
|
}, 8, ["onClick"]), l(m, {
|
|
7030
7075
|
size: "small",
|
|
@@ -7032,7 +7077,7 @@ function Ho(t, n, i, s, u, d) {
|
|
|
7032
7077
|
loading: t.loading,
|
|
7033
7078
|
onClick: t.manualImport
|
|
7034
7079
|
}, {
|
|
7035
|
-
default:
|
|
7080
|
+
default: P(() => [c(A(t.t("File.startImport")), 1)]),
|
|
7036
7081
|
_: 1
|
|
7037
7082
|
}, 8, ["loading", "onClick"])]),
|
|
7038
7083
|
_: 1
|
|
@@ -7046,21 +7091,21 @@ function Ho(t, n, i, s, u, d) {
|
|
|
7046
7091
|
multiple: "",
|
|
7047
7092
|
class: "uz-w-full"
|
|
7048
7093
|
}, {
|
|
7049
|
-
default:
|
|
7094
|
+
default: P(() => [o("div", Vo, [n[1] ||= o("div", { class: "uz-file-port-icon" }, [o("svg", {
|
|
7050
7095
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7051
7096
|
viewBox: "0 0 24 24",
|
|
7052
7097
|
width: "40",
|
|
7053
7098
|
height: "40",
|
|
7054
7099
|
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",
|
|
7100
|
+
}, [o("path", { d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z" })])], -1), o("div", Ho, A(t.t("File.uploadExcelTip")), 1)])]),
|
|
7056
7101
|
_: 1
|
|
7057
7102
|
}, 8, ["on-before-upload"])),
|
|
7058
|
-
o("div",
|
|
7103
|
+
o("div", Go, [o("div", Ko, A(t.t("File.importHistory")), 1), l(m, {
|
|
7059
7104
|
onClick: t.init,
|
|
7060
7105
|
loading: t.loading,
|
|
7061
7106
|
secondary: ""
|
|
7062
7107
|
}, {
|
|
7063
|
-
default:
|
|
7108
|
+
default: P(() => [c(A(t.t("Common.refresh")), 1)]),
|
|
7064
7109
|
_: 1
|
|
7065
7110
|
}, 8, ["onClick", "loading"])]),
|
|
7066
7111
|
l(v, {
|
|
@@ -7082,7 +7127,7 @@ function Ho(t, n, i, s, u, d) {
|
|
|
7082
7127
|
"on-after-leave"
|
|
7083
7128
|
])], 64);
|
|
7084
7129
|
}
|
|
7085
|
-
var
|
|
7130
|
+
var Jo = /*#__PURE__*/ Q(zo, [["render", qo], ["__scopeId", "data-v-d8e581ec"]]), $ = C({
|
|
7086
7131
|
page: {
|
|
7087
7132
|
label: G.global.t("Common.home"),
|
|
7088
7133
|
key: "/",
|
|
@@ -7093,7 +7138,7 @@ var Uo = /*#__PURE__*/ Q(Po, [["render", Ho], ["__scopeId", "data-v-d8e581ec"]])
|
|
|
7093
7138
|
active: "/",
|
|
7094
7139
|
thumbnail: []
|
|
7095
7140
|
});
|
|
7096
|
-
function
|
|
7141
|
+
function Yo(e) {
|
|
7097
7142
|
$.cache = e.cache, $.page = {
|
|
7098
7143
|
label: e.label,
|
|
7099
7144
|
key: e.key,
|
|
@@ -7108,14 +7153,14 @@ function Wo(e) {
|
|
|
7108
7153
|
closable: !1
|
|
7109
7154
|
}];
|
|
7110
7155
|
}
|
|
7111
|
-
function
|
|
7156
|
+
function Xo(e) {
|
|
7112
7157
|
$.active = e, Jt.push(e), q($.cache, $, 0);
|
|
7113
7158
|
}
|
|
7114
|
-
function
|
|
7159
|
+
function Zo(e, t) {
|
|
7115
7160
|
let n = $.thumbnail.find((t) => t.key === e);
|
|
7116
7161
|
n && (n.key = t, $.active = t, q($.cache, $, 0));
|
|
7117
7162
|
}
|
|
7118
|
-
function
|
|
7163
|
+
function Qo(e) {
|
|
7119
7164
|
let t = $.thumbnail.find((t) => t.path === e.key);
|
|
7120
7165
|
t ? ($.active = t.key, q($.cache, $, 0), Jt.push(t.key)) : ($.active = e.key, $.thumbnail.push({
|
|
7121
7166
|
...e,
|
|
@@ -7123,7 +7168,7 @@ function qo(e) {
|
|
|
7123
7168
|
closable: !0
|
|
7124
7169
|
}), Jt.push(e.key));
|
|
7125
7170
|
}
|
|
7126
|
-
function
|
|
7171
|
+
function $o(e) {
|
|
7127
7172
|
let t = $.thumbnail.findIndex((t) => t.key === e);
|
|
7128
7173
|
if ($.thumbnail.splice(t, 1), $.active === e) {
|
|
7129
7174
|
let e = $.thumbnail[t - 1]?.key || "";
|
|
@@ -7131,20 +7176,20 @@ function Jo(e) {
|
|
|
7131
7176
|
}
|
|
7132
7177
|
q($.cache, $, 0);
|
|
7133
7178
|
}
|
|
7134
|
-
function
|
|
7179
|
+
function es() {
|
|
7135
7180
|
$.active = $.page.path, $.thumbnail = [$.page], Jt.push($.page.path), q($.cache, $, 0);
|
|
7136
7181
|
}
|
|
7137
7182
|
//#endregion
|
|
7138
7183
|
//#region components/thumbnail/index.vue?vue&type=script&lang.ts
|
|
7139
|
-
var
|
|
7184
|
+
var ts = d({
|
|
7140
7185
|
name: "UzThumbnail",
|
|
7141
7186
|
components: {
|
|
7142
|
-
NTabs:
|
|
7143
|
-
NTabPane:
|
|
7144
|
-
NButton:
|
|
7145
|
-
NIcon:
|
|
7146
|
-
NPopconfirm:
|
|
7147
|
-
NFlex:
|
|
7187
|
+
NTabs: Fe,
|
|
7188
|
+
NTabPane: Pe,
|
|
7189
|
+
NButton: L,
|
|
7190
|
+
NIcon: V,
|
|
7191
|
+
NPopconfirm: Te,
|
|
7192
|
+
NFlex: B
|
|
7148
7193
|
},
|
|
7149
7194
|
props: { option: {
|
|
7150
7195
|
type: Object,
|
|
@@ -7155,32 +7200,32 @@ var Xo = d({
|
|
|
7155
7200
|
})
|
|
7156
7201
|
} },
|
|
7157
7202
|
setup(e, { slots: t }) {
|
|
7158
|
-
let { t: n } =
|
|
7203
|
+
let { t: n } = U(), r = w(!!t.prefix), i = Je();
|
|
7159
7204
|
return y(() => {
|
|
7160
|
-
|
|
7161
|
-
}),
|
|
7162
|
-
$.active === i.path &&
|
|
7163
|
-
}, { deep: !0 }),
|
|
7164
|
-
|
|
7205
|
+
Yo(e.option), $.active !== i.path && Zo(i.path, i.fullPath);
|
|
7206
|
+
}), M(() => i, (e) => {
|
|
7207
|
+
$.active === i.path && Zo(e.path, e.fullPath);
|
|
7208
|
+
}, { deep: !0 }), M(() => e.option, (e) => {
|
|
7209
|
+
Yo(e);
|
|
7165
7210
|
}, { deep: !0 }), {
|
|
7166
7211
|
t: n,
|
|
7167
7212
|
thumbnailStore: $,
|
|
7168
7213
|
isSlotPrefix: r,
|
|
7169
7214
|
handleClose: (e) => {
|
|
7170
|
-
|
|
7215
|
+
$o(e);
|
|
7171
7216
|
},
|
|
7172
7217
|
handleChange: (e) => {
|
|
7173
|
-
|
|
7218
|
+
Xo(e);
|
|
7174
7219
|
},
|
|
7175
7220
|
handleClear: () => {
|
|
7176
|
-
|
|
7221
|
+
es();
|
|
7177
7222
|
}
|
|
7178
7223
|
};
|
|
7179
7224
|
}
|
|
7180
7225
|
});
|
|
7181
7226
|
//#endregion
|
|
7182
7227
|
//#region components/thumbnail/index.vue
|
|
7183
|
-
function
|
|
7228
|
+
function ns(t, n, i, o, u, d) {
|
|
7184
7229
|
let f = D("NTabPane"), p = D("UzIcon"), m = D("NIcon"), h = D("NButton"), g = D("NPopconfirm"), _ = D("NFlex"), v = D("NTabs");
|
|
7185
7230
|
return x(), r(v, {
|
|
7186
7231
|
value: t.thumbnailStore.active,
|
|
@@ -7191,27 +7236,27 @@ function Zo(t, n, i, o, u, d) {
|
|
|
7191
7236
|
"on-update:value": t.handleChange,
|
|
7192
7237
|
class: "uz-thumbnail"
|
|
7193
7238
|
}, s({
|
|
7194
|
-
suffix:
|
|
7195
|
-
default:
|
|
7196
|
-
trigger:
|
|
7197
|
-
default:
|
|
7198
|
-
default:
|
|
7239
|
+
suffix: P(() => [l(_, null, {
|
|
7240
|
+
default: P(() => [l(g, { onPositiveClick: t.handleClear }, {
|
|
7241
|
+
trigger: P(() => [l(h, { class: "uz-button-glass" }, {
|
|
7242
|
+
default: P(() => [l(m, { color: "#e65444" }, {
|
|
7243
|
+
default: P(() => [l(p, { icon: "Trash" })]),
|
|
7199
7244
|
_: 1
|
|
7200
7245
|
})]),
|
|
7201
7246
|
_: 1
|
|
7202
7247
|
})]),
|
|
7203
|
-
default:
|
|
7248
|
+
default: P(() => [c(" " + A(t.t("Thumbnail.clearConfirm")), 1)]),
|
|
7204
7249
|
_: 1
|
|
7205
7250
|
}, 8, ["onPositiveClick"]), E(t.$slots, "suffix")]),
|
|
7206
7251
|
_: 3
|
|
7207
7252
|
})]),
|
|
7208
|
-
default:
|
|
7253
|
+
default: P(() => [(x(!0), a(e, null, T(t.thumbnailStore.thumbnail, (e) => (x(), r(f, {
|
|
7209
7254
|
key: e.key,
|
|
7210
7255
|
name: e.key,
|
|
7211
7256
|
tab: e.label,
|
|
7212
7257
|
closable: e.closable
|
|
7213
7258
|
}, {
|
|
7214
|
-
default:
|
|
7259
|
+
default: P(() => [c(A(e.label), 1)]),
|
|
7215
7260
|
_: 2
|
|
7216
7261
|
}, 1032, [
|
|
7217
7262
|
"name",
|
|
@@ -7221,7 +7266,7 @@ function Zo(t, n, i, o, u, d) {
|
|
|
7221
7266
|
_: 2
|
|
7222
7267
|
}, [t.isSlotPrefix ? {
|
|
7223
7268
|
name: "prefix",
|
|
7224
|
-
fn:
|
|
7269
|
+
fn: P(() => [E(t.$slots, "prefix")]),
|
|
7225
7270
|
key: "0"
|
|
7226
7271
|
} : void 0]), 1032, [
|
|
7227
7272
|
"value",
|
|
@@ -7229,33 +7274,33 @@ function Zo(t, n, i, o, u, d) {
|
|
|
7229
7274
|
"on-update:value"
|
|
7230
7275
|
]);
|
|
7231
7276
|
}
|
|
7232
|
-
var
|
|
7233
|
-
|
|
7234
|
-
var
|
|
7277
|
+
var rs = /*#__PURE__*/ Q(ts, [["render", ns]]), is = "#007AFF", as = "#0A84FF", os = "#FF9500", ss = "#FF9F0A", cs = "#28CD41", ls = "#32D74B", us = "#FFCC00", ds = "#FFD60A", fs = "#FF3B30", ps = "#FF453A";
|
|
7278
|
+
H.common.cardColor = "#32323b", H.common.primaryColor = "#0A84FF", H.common.primaryColorHover = as, H.common.infoColor = "#FF9F0A", H.common.infoColorHover = ss, H.common.successColor = "#32D74B", H.common.successColorHover = ls, H.common.warningColor = "#FFD60A", H.common.successColorHover = ds, H.common.errorColor = "#FF453A", H.common.errorColorHover = ps, 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";
|
|
7279
|
+
var ms = {
|
|
7235
7280
|
common: {
|
|
7236
7281
|
inputColor: "rgba(var(--input))",
|
|
7237
7282
|
borderColor: "rgba(var(--border), 0.7)",
|
|
7238
7283
|
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:
|
|
7284
|
+
primaryColor: is,
|
|
7285
|
+
primaryColorHover: as,
|
|
7286
|
+
primaryColorPressed: is,
|
|
7287
|
+
primaryColorSuppl: is,
|
|
7288
|
+
infoColor: os,
|
|
7289
|
+
infoColorHover: ss,
|
|
7290
|
+
infoColorPressed: os,
|
|
7291
|
+
infoColorSuppl: os,
|
|
7292
|
+
successColor: cs,
|
|
7293
|
+
successColorHover: ls,
|
|
7294
|
+
successColorPressed: cs,
|
|
7295
|
+
successColorSuppl: cs,
|
|
7296
|
+
warningColor: us,
|
|
7297
|
+
warningColorHover: ds,
|
|
7298
|
+
warningColorPressed: us,
|
|
7299
|
+
warningColorSuppl: us,
|
|
7300
|
+
errorColor: fs,
|
|
7301
|
+
errorColorHover: ps,
|
|
7302
|
+
errorColorPressed: fs,
|
|
7303
|
+
errorColorSuppl: fs,
|
|
7259
7304
|
cardColor: "#fff"
|
|
7260
7305
|
},
|
|
7261
7306
|
Button: { textColor: "rgb(var(--font))" },
|
|
@@ -7269,22 +7314,22 @@ var ls = {
|
|
|
7269
7314
|
borderRadius: "8px",
|
|
7270
7315
|
color: "#c0c0c0"
|
|
7271
7316
|
}
|
|
7272
|
-
},
|
|
7317
|
+
}, hs = H, gs = d({
|
|
7273
7318
|
name: "UzWrap",
|
|
7274
|
-
components: { NConfigProvider:
|
|
7319
|
+
components: { NConfigProvider: ae },
|
|
7275
7320
|
setup() {
|
|
7276
7321
|
return {
|
|
7277
|
-
zhCN:
|
|
7278
|
-
dateZhCN:
|
|
7322
|
+
zhCN: Ue,
|
|
7323
|
+
dateZhCN: Ve,
|
|
7279
7324
|
commonStore: Y,
|
|
7280
|
-
lightTheme:
|
|
7281
|
-
darkTheme:
|
|
7325
|
+
lightTheme: ms,
|
|
7326
|
+
darkTheme: hs
|
|
7282
7327
|
};
|
|
7283
7328
|
}
|
|
7284
7329
|
});
|
|
7285
7330
|
//#endregion
|
|
7286
7331
|
//#region components/wrap/index.vue
|
|
7287
|
-
function
|
|
7332
|
+
function _s(e, t, n, i, a, o) {
|
|
7288
7333
|
let s = D("NConfigProvider");
|
|
7289
7334
|
return x(), r(s, {
|
|
7290
7335
|
theme: e.commonStore.theme ? { name: "darkTheme" } : null,
|
|
@@ -7294,7 +7339,7 @@ function fs(e, t, n, i, a, o) {
|
|
|
7294
7339
|
"inline-theme-disabled": "",
|
|
7295
7340
|
abstract: ""
|
|
7296
7341
|
}, {
|
|
7297
|
-
default:
|
|
7342
|
+
default: P(() => [E(e.$slots, "default")]),
|
|
7298
7343
|
_: 3
|
|
7299
7344
|
}, 8, [
|
|
7300
7345
|
"theme",
|
|
@@ -7303,10 +7348,10 @@ function fs(e, t, n, i, a, o) {
|
|
|
7303
7348
|
"date-locale"
|
|
7304
7349
|
]);
|
|
7305
7350
|
}
|
|
7306
|
-
var
|
|
7351
|
+
var vs = /*#__PURE__*/ Q(gs, [["render", _s]]);
|
|
7307
7352
|
//#endregion
|
|
7308
7353
|
//#region components/ocr/preprocess.ts
|
|
7309
|
-
function
|
|
7354
|
+
function ys(e) {
|
|
7310
7355
|
let t = /* @__PURE__ */ new Int32Array(256), n = e.length;
|
|
7311
7356
|
for (let r = 0; r < n; r++) t[e[r]]++;
|
|
7312
7357
|
let r = 0;
|
|
@@ -7321,7 +7366,7 @@ function ms(e) {
|
|
|
7321
7366
|
}
|
|
7322
7367
|
return c;
|
|
7323
7368
|
}
|
|
7324
|
-
function
|
|
7369
|
+
function bs(e, t) {
|
|
7325
7370
|
return new Promise((n, r) => {
|
|
7326
7371
|
let i = new Image();
|
|
7327
7372
|
i.crossOrigin = "anonymous", i.onload = () => {
|
|
@@ -7354,7 +7399,7 @@ function hs(e, t) {
|
|
|
7354
7399
|
}
|
|
7355
7400
|
let u = t.threshold;
|
|
7356
7401
|
if (t.binarize) {
|
|
7357
|
-
t.autoThreshold && (u =
|
|
7402
|
+
t.autoThreshold && (u = ys(l));
|
|
7358
7403
|
for (let e = 0, t = 0; e < s.length; e += 4, t++) {
|
|
7359
7404
|
let n = l[t] < u ? 0 : 255;
|
|
7360
7405
|
s[e] = n, s[e + 1] = n, s[e + 2] = n;
|
|
@@ -7377,19 +7422,19 @@ function hs(e, t) {
|
|
|
7377
7422
|
}
|
|
7378
7423
|
//#endregion
|
|
7379
7424
|
//#region components/ocr/index.vue?vue&type=script&lang.ts
|
|
7380
|
-
var
|
|
7425
|
+
var xs = d({
|
|
7381
7426
|
name: "UzOcr",
|
|
7382
7427
|
components: {
|
|
7383
|
-
NButton:
|
|
7384
|
-
NUpload:
|
|
7385
|
-
NSelect:
|
|
7386
|
-
NSwitch:
|
|
7387
|
-
NTabs:
|
|
7388
|
-
NTabPane:
|
|
7389
|
-
NSpace:
|
|
7428
|
+
NButton: L,
|
|
7429
|
+
NUpload: Re,
|
|
7430
|
+
NSelect: ke,
|
|
7431
|
+
NSwitch: Ne,
|
|
7432
|
+
NTabs: Fe,
|
|
7433
|
+
NTabPane: Pe,
|
|
7434
|
+
NSpace: je
|
|
7390
7435
|
},
|
|
7391
7436
|
setup() {
|
|
7392
|
-
let { t: e } =
|
|
7437
|
+
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
7438
|
{
|
|
7394
7439
|
label: e("OCR.scaleNone"),
|
|
7395
7440
|
value: 1
|
|
@@ -7414,7 +7459,7 @@ var gs = d({
|
|
|
7414
7459
|
tessedit_char_blacklist: "|"
|
|
7415
7460
|
}), a.value), v = async () => {
|
|
7416
7461
|
if (f.value) try {
|
|
7417
|
-
let e = await
|
|
7462
|
+
let e = await bs(f.value, {
|
|
7418
7463
|
enabled: o.value,
|
|
7419
7464
|
scale: s.value,
|
|
7420
7465
|
grayscale: !0,
|
|
@@ -7428,7 +7473,7 @@ var gs = d({
|
|
|
7428
7473
|
console.error("实时预处理失败", e);
|
|
7429
7474
|
}
|
|
7430
7475
|
};
|
|
7431
|
-
|
|
7476
|
+
M([
|
|
7432
7477
|
f,
|
|
7433
7478
|
o,
|
|
7434
7479
|
s,
|
|
@@ -7451,7 +7496,7 @@ var gs = d({
|
|
|
7451
7496
|
t.value = !0, r.value = e("OCR.analysis");
|
|
7452
7497
|
let a = n;
|
|
7453
7498
|
if (o.value || s.value > 1) try {
|
|
7454
|
-
let e = await
|
|
7499
|
+
let e = await bs(n, {
|
|
7455
7500
|
enabled: o.value,
|
|
7456
7501
|
scale: s.value,
|
|
7457
7502
|
grayscale: !0,
|
|
@@ -7513,49 +7558,49 @@ var gs = d({
|
|
|
7513
7558
|
t: e
|
|
7514
7559
|
};
|
|
7515
7560
|
}
|
|
7516
|
-
}),
|
|
7561
|
+
}), Ss = { class: "uz-ocr" }, Cs = { class: "uz-ocr-left-col" }, ws = { class: "uz-ocr-upload-card" }, Ts = { class: "uz-ocr-upload-title" }, Es = { class: "uz-ocr-upload-subtitle" }, Ds = {
|
|
7517
7562
|
key: 1,
|
|
7518
7563
|
class: "uz-ocr-preview-panel"
|
|
7519
|
-
},
|
|
7564
|
+
}, Os = { class: "uz-ocr-preview-box" }, ks = ["src"], As = {
|
|
7520
7565
|
key: 0,
|
|
7521
7566
|
class: "uz-ocr-threshold-badge"
|
|
7522
|
-
},
|
|
7567
|
+
}, js = { class: "uz-ocr-preview-box" }, Ms = ["src"], Ns = { class: "uz-ocr-settings-form" }, Ps = { class: "uz-settings-row" }, Fs = { class: "uz-settings-label" }, Is = {
|
|
7523
7568
|
key: 0,
|
|
7524
7569
|
class: "uz-ocr-nested-settings animate-fade-in"
|
|
7525
|
-
},
|
|
7570
|
+
}, Ls = { class: "uz-settings-row" }, Rs = { class: "uz-settings-label" }, zs = { class: "uz-settings-row" }, Bs = { class: "uz-settings-label" }, Vs = { class: "uz-ocr-right-col" }, Hs = { class: "uz-ocr-result-header" }, Us = { class: "uz-result-title" }, Ws = {
|
|
7526
7571
|
key: 0,
|
|
7527
7572
|
class: "uz-ocr-empty-state"
|
|
7528
|
-
},
|
|
7573
|
+
}, Gs = { class: "uz-empty-text" }, Ks = {
|
|
7529
7574
|
key: 1,
|
|
7530
7575
|
class: "uz-ocr-result-tabs"
|
|
7531
7576
|
};
|
|
7532
|
-
function
|
|
7577
|
+
function qs(e, t, n, s, u, d) {
|
|
7533
7578
|
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",
|
|
7579
|
+
return x(), a("div", Ss, [o("div", Cs, [e.rawImage ? (x(), a("div", Ds, [l(m, {
|
|
7535
7580
|
value: e.imagePreviewTab,
|
|
7536
7581
|
"onUpdate:value": t[0] ||= (t) => e.imagePreviewTab = t,
|
|
7537
7582
|
type: "segment",
|
|
7538
7583
|
size: "small"
|
|
7539
7584
|
}, {
|
|
7540
|
-
default:
|
|
7585
|
+
default: P(() => [l(p, {
|
|
7541
7586
|
name: "processed",
|
|
7542
7587
|
tab: e.t("OCR.previewProcessed")
|
|
7543
7588
|
}, {
|
|
7544
|
-
default:
|
|
7589
|
+
default: P(() => [o("div", Os, [o("img", {
|
|
7545
7590
|
src: e.processedImage,
|
|
7546
7591
|
alt: "Processed Preview",
|
|
7547
7592
|
class: "uz-ocr-preview-img"
|
|
7548
|
-
}, null, 8,
|
|
7593
|
+
}, null, 8, ks), e.preEnabled && e.preBinarize ? (x(), a("div", As, A(e.preAutoThreshold ? e.t("OCR.autoThreshold") : e.t("OCR.manualThreshold")) + A(e.t("OCR.threshold")) + ": " + A(e.thresholdUsed), 1)) : i("", !0)])]),
|
|
7549
7594
|
_: 1
|
|
7550
7595
|
}, 8, ["tab"]), l(p, {
|
|
7551
7596
|
name: "raw",
|
|
7552
7597
|
tab: e.t("OCR.previewRaw")
|
|
7553
7598
|
}, {
|
|
7554
|
-
default:
|
|
7599
|
+
default: P(() => [o("div", js, [o("img", {
|
|
7555
7600
|
src: e.rawImage,
|
|
7556
7601
|
alt: "Raw Preview",
|
|
7557
7602
|
class: "uz-ocr-preview-img"
|
|
7558
|
-
}, null, 8,
|
|
7603
|
+
}, null, 8, Ms)])]),
|
|
7559
7604
|
_: 1
|
|
7560
7605
|
}, 8, ["tab"])]),
|
|
7561
7606
|
_: 1
|
|
@@ -7563,13 +7608,13 @@ function Hs(e, t, n, s, u, d) {
|
|
|
7563
7608
|
justify: "space-between",
|
|
7564
7609
|
class: "uz-ocr-preview-actions"
|
|
7565
7610
|
}, {
|
|
7566
|
-
default:
|
|
7611
|
+
default: P(() => [l(h, {
|
|
7567
7612
|
size: "small",
|
|
7568
7613
|
secondary: "",
|
|
7569
7614
|
type: "warning",
|
|
7570
7615
|
onClick: e.clearImage
|
|
7571
7616
|
}, {
|
|
7572
|
-
default:
|
|
7617
|
+
default: P(() => [c(A(e.t("OCR.selectAgain")), 1)]),
|
|
7573
7618
|
_: 1
|
|
7574
7619
|
}, 8, ["onClick"]), l(h, {
|
|
7575
7620
|
size: "small",
|
|
@@ -7577,7 +7622,7 @@ function Hs(e, t, n, s, u, d) {
|
|
|
7577
7622
|
loading: e.ocrLoading,
|
|
7578
7623
|
onClick: e.handleManualOcr
|
|
7579
7624
|
}, {
|
|
7580
|
-
default:
|
|
7625
|
+
default: P(() => [c(A(e.t("OCR.reRecognize")), 1)]),
|
|
7581
7626
|
_: 1
|
|
7582
7627
|
}, 8, ["loading", "onClick"])]),
|
|
7583
7628
|
_: 1
|
|
@@ -7589,7 +7634,7 @@ function Hs(e, t, n, s, u, d) {
|
|
|
7589
7634
|
"directory-dnd": "",
|
|
7590
7635
|
class: "uz-w-full"
|
|
7591
7636
|
}, {
|
|
7592
|
-
default:
|
|
7637
|
+
default: P(() => [o("div", ws, [
|
|
7593
7638
|
t[4] ||= o("div", { class: "uz-ocr-upload-icon" }, [o("svg", {
|
|
7594
7639
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7595
7640
|
viewBox: "0 0 24 24",
|
|
@@ -7597,32 +7642,32 @@ function Hs(e, t, n, s, u, d) {
|
|
|
7597
7642
|
height: "40",
|
|
7598
7643
|
fill: "currentColor"
|
|
7599
7644
|
}, [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",
|
|
7645
|
+
o("div", Ts, A(e.t("OCR.scan")), 1),
|
|
7646
|
+
o("div", Es, A(e.t("OCR.uploadTip")), 1)
|
|
7602
7647
|
])]),
|
|
7603
7648
|
_: 1
|
|
7604
|
-
}, 8, ["on-before-upload"])), o("div",
|
|
7649
|
+
}, 8, ["on-before-upload"])), o("div", Ns, [o("div", Ps, [o("span", Fs, A(e.t("OCR.preprocess")), 1), l(_, {
|
|
7605
7650
|
value: e.preEnabled,
|
|
7606
7651
|
"onUpdate:value": t[1] ||= (t) => e.preEnabled = t,
|
|
7607
7652
|
size: "small"
|
|
7608
|
-
}, null, 8, ["value"])]), e.preEnabled ? (x(), a("div",
|
|
7653
|
+
}, null, 8, ["value"])]), e.preEnabled ? (x(), a("div", Is, [o("div", Ls, [o("span", Rs, A(e.t("OCR.scale")), 1), l(v, {
|
|
7609
7654
|
value: e.preScale,
|
|
7610
7655
|
"onUpdate:value": t[2] ||= (t) => e.preScale = t,
|
|
7611
7656
|
options: e.scaleOptions,
|
|
7612
7657
|
size: "small",
|
|
7613
7658
|
class: "uz-settings-select"
|
|
7614
|
-
}, null, 8, ["value", "options"])]), o("div",
|
|
7659
|
+
}, null, 8, ["value", "options"])]), o("div", zs, [o("span", Bs, A(e.t("OCR.contrast")), 1), l(_, {
|
|
7615
7660
|
value: e.preContrast,
|
|
7616
7661
|
"onUpdate:value": t[3] ||= (t) => e.preContrast = t,
|
|
7617
7662
|
size: "small"
|
|
7618
|
-
}, null, 8, ["value"])])])) : i("", !0)])]), o("div",
|
|
7663
|
+
}, null, 8, ["value"])])])) : i("", !0)])]), o("div", Vs, [o("div", Hs, [o("span", Us, A(e.t("OCR.result", { count: e.text.length })), 1)]), e.text.length ? (x(), a("div", Ks, A(e.fullText), 1)) : (x(), a("div", Ws, [t[5] ||= o("div", { class: "uz-empty-icon" }, "📝", -1), o("div", Gs, A(e.ocrLoading ? e.t("OCR.reading") : e.t("OCR.empty")), 1)]))])]);
|
|
7619
7664
|
}
|
|
7620
|
-
var
|
|
7665
|
+
var Js = /*#__PURE__*/ Q(xs, [["render", qs], ["__scopeId", "data-v-1e757396"]]), Ys = /* @__PURE__ */ lt({
|
|
7621
7666
|
UzActionButton: () => ut,
|
|
7622
7667
|
UzBack: () => xr,
|
|
7623
|
-
UzBom: () =>
|
|
7624
|
-
UzCamera: () =>
|
|
7625
|
-
UzCircle: () =>
|
|
7668
|
+
UzBom: () => Ni,
|
|
7669
|
+
UzCamera: () => wa,
|
|
7670
|
+
UzCircle: () => _a,
|
|
7626
7671
|
UzDraggableForm: () => Pr,
|
|
7627
7672
|
UzForm: () => kr,
|
|
7628
7673
|
UzFormItem: () => Tr,
|
|
@@ -7630,44 +7675,44 @@ var Us = /*#__PURE__*/ Q(gs, [["render", Hs], ["__scopeId", "data-v-1e757396"]])
|
|
|
7630
7675
|
UzFormItemTimesPicker: () => Jr,
|
|
7631
7676
|
UzFormItemUpload: () => Br,
|
|
7632
7677
|
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: () =>
|
|
7678
|
+
UzOcr: () => Js,
|
|
7679
|
+
UzSearchBar: () => Pa,
|
|
7680
|
+
UzSearchMobileBar: () => Ba,
|
|
7681
|
+
UzSpin: () => Ua,
|
|
7682
|
+
UzTable: () => ao,
|
|
7683
|
+
UzTableChild: () => ho,
|
|
7684
|
+
UzTableDrawer: () => Oo,
|
|
7685
|
+
UzTableFile: () => Jo,
|
|
7686
|
+
UzTableMobile: () => Ro,
|
|
7687
|
+
UzTableQuestChild: () => xo,
|
|
7688
|
+
UzThumbnail: () => rs,
|
|
7689
|
+
UzWrap: () => vs,
|
|
7645
7690
|
commonStore: () => Y,
|
|
7646
7691
|
fnActionReduction: () => vr,
|
|
7647
7692
|
fnActionSimplify: () => _r,
|
|
7648
|
-
fnAddThumbnail: () =>
|
|
7649
|
-
fnClearAllThumbnail: () =>
|
|
7650
|
-
fnDeleteThumbnail: () =>
|
|
7651
|
-
fnGetTableData: () =>
|
|
7652
|
-
fnOptionReduction: () =>
|
|
7653
|
-
fnOptionSimplify: () =>
|
|
7654
|
-
fnPrepareFormData: () =>
|
|
7655
|
-
fnPrepareTableData: () =>
|
|
7693
|
+
fnAddThumbnail: () => Qo,
|
|
7694
|
+
fnClearAllThumbnail: () => es,
|
|
7695
|
+
fnDeleteThumbnail: () => $o,
|
|
7696
|
+
fnGetTableData: () => _i,
|
|
7697
|
+
fnOptionReduction: () => Ci,
|
|
7698
|
+
fnOptionSimplify: () => Si,
|
|
7699
|
+
fnPrepareFormData: () => wi,
|
|
7700
|
+
fnPrepareTableData: () => Ti,
|
|
7656
7701
|
fnRenderAction: () => ur,
|
|
7657
7702
|
fnSetLang: () => Ht,
|
|
7658
7703
|
fnSetTheme: () => Ut,
|
|
7659
|
-
fnSetThumbnail: () =>
|
|
7660
|
-
fnTableReduction: () =>
|
|
7661
|
-
fnTableSimplify: () =>
|
|
7662
|
-
fnTriggersReduction: () =>
|
|
7663
|
-
fnTriggersSimplify: () =>
|
|
7704
|
+
fnSetThumbnail: () => Xo,
|
|
7705
|
+
fnTableReduction: () => yi,
|
|
7706
|
+
fnTableSimplify: () => vi,
|
|
7707
|
+
fnTriggersReduction: () => xi,
|
|
7708
|
+
fnTriggersSimplify: () => bi,
|
|
7664
7709
|
i18n: () => G
|
|
7665
|
-
}),
|
|
7666
|
-
function
|
|
7667
|
-
|
|
7710
|
+
}), Xs = 3840, Zs = 2160, Qs = C({ scale: 1 });
|
|
7711
|
+
function $s(e, t) {
|
|
7712
|
+
Xs = e, Zs = t;
|
|
7668
7713
|
}
|
|
7669
|
-
function
|
|
7670
|
-
let e = 1, t = window.innerWidth, n = window.innerHeight, r =
|
|
7714
|
+
function ec() {
|
|
7715
|
+
let e = 1, t = window.innerWidth, n = window.innerHeight, r = Xs, i = Zs, a = parseFloat((r / i).toFixed(5));
|
|
7671
7716
|
if (parseFloat((t / n).toFixed(5)) > a) {
|
|
7672
7717
|
let t = parseFloat((n * a / r).toFixed(5));
|
|
7673
7718
|
e = t > 1 ? 1 : t;
|
|
@@ -7675,18 +7720,18 @@ function Ys() {
|
|
|
7675
7720
|
let n = parseFloat((t / a / i).toFixed(5));
|
|
7676
7721
|
e = n > 1 ? 1 : n;
|
|
7677
7722
|
}
|
|
7678
|
-
|
|
7723
|
+
Qs.scale = e;
|
|
7679
7724
|
}
|
|
7680
|
-
function
|
|
7681
|
-
let e =
|
|
7725
|
+
function tc() {
|
|
7726
|
+
let e = Ze(ec, 200);
|
|
7682
7727
|
return e(), window.addEventListener("resize", e), () => {
|
|
7683
|
-
|
|
7728
|
+
Xs = 3840, Zs = 2160, window.removeEventListener("resize", e);
|
|
7684
7729
|
};
|
|
7685
7730
|
}
|
|
7686
7731
|
//#endregion
|
|
7687
7732
|
//#region components/hooks/useThrottleFn.ts
|
|
7688
|
-
function
|
|
7689
|
-
let r = w(e), i = n(() =>
|
|
7733
|
+
function nc(e, t = 1e3) {
|
|
7734
|
+
let r = w(e), i = n(() => Qe((...e) => r.value([...e]), t));
|
|
7690
7735
|
return b(() => {
|
|
7691
7736
|
i.value.cancel();
|
|
7692
7737
|
}), {
|
|
@@ -7697,14 +7742,14 @@ function Zs(e, t = 1e3) {
|
|
|
7697
7742
|
}
|
|
7698
7743
|
//#endregion
|
|
7699
7744
|
//#region components/hooks/useLocalStorage.ts
|
|
7700
|
-
function
|
|
7745
|
+
function rc(e, t) {
|
|
7701
7746
|
return [w(J(e, t?.defaultValue)), (n) => {
|
|
7702
7747
|
n === void 0 ? Et(e) : q(e, n, t?.expired || "1 Day");
|
|
7703
7748
|
}];
|
|
7704
7749
|
}
|
|
7705
7750
|
//#endregion
|
|
7706
7751
|
//#region components/hooks/useQuery.ts
|
|
7707
|
-
function
|
|
7752
|
+
function ic(e, t, n) {
|
|
7708
7753
|
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
7754
|
Un(), clearInterval(o.value), o.value = null;
|
|
7710
7755
|
}, p = async () => {
|
|
@@ -7770,26 +7815,26 @@ function $s(e, t, n) {
|
|
|
7770
7815
|
}
|
|
7771
7816
|
//#endregion
|
|
7772
7817
|
//#region package.json
|
|
7773
|
-
var
|
|
7774
|
-
async function
|
|
7818
|
+
var ac = "0.1.132", oc;
|
|
7819
|
+
async function sc() {
|
|
7775
7820
|
let e = await fetch(`${window.location.protocol}//${window.location.host}`, {
|
|
7776
7821
|
method: "HEAD",
|
|
7777
7822
|
cache: "no-cache"
|
|
7778
7823
|
});
|
|
7779
7824
|
return e.headers.get("etag") || e.headers.get("last-modified");
|
|
7780
7825
|
}
|
|
7781
|
-
async function
|
|
7782
|
-
let e = await
|
|
7783
|
-
|
|
7826
|
+
async function cc() {
|
|
7827
|
+
let e = await sc();
|
|
7828
|
+
oc !== e && Wt(!0);
|
|
7784
7829
|
}
|
|
7785
|
-
async function
|
|
7786
|
-
|
|
7787
|
-
|
|
7830
|
+
async function lc() {
|
|
7831
|
+
oc = await sc(), window.versionMonitor && clearInterval(window.versionMonitor), window.versionMonitor = setInterval(() => {
|
|
7832
|
+
cc();
|
|
7788
7833
|
}, 6e4);
|
|
7789
7834
|
}
|
|
7790
7835
|
//#endregion
|
|
7791
7836
|
//#region components/create.ts
|
|
7792
|
-
function
|
|
7837
|
+
function uc({ components: e = [] } = {}) {
|
|
7793
7838
|
let t = [];
|
|
7794
7839
|
function n(e, t, n) {
|
|
7795
7840
|
e.component(t) || e.component(t, n);
|
|
@@ -7805,16 +7850,16 @@ function ac({ components: e = [] } = {}) {
|
|
|
7805
7850
|
Vt(o), Ht(d), Gt(e || G.global.t("App.title")), Ut(u), Bt({
|
|
7806
7851
|
icons: c,
|
|
7807
7852
|
iconDefault: l
|
|
7808
|
-
}), G.global.locale.value = d, a &&
|
|
7853
|
+
}), G.global.locale.value = d, a && lc(), t && Nn(r, t, n);
|
|
7809
7854
|
}
|
|
7810
7855
|
}
|
|
7811
7856
|
return {
|
|
7812
|
-
version:
|
|
7857
|
+
version: ac,
|
|
7813
7858
|
install: r
|
|
7814
7859
|
};
|
|
7815
7860
|
}
|
|
7816
7861
|
//#endregion
|
|
7817
7862
|
//#region components/preset.ts
|
|
7818
|
-
var
|
|
7863
|
+
var dc = uc({ components: Object.keys(Ys).map((e) => Ys[e]) }), fc = dc.install;
|
|
7819
7864
|
//#endregion
|
|
7820
|
-
export { Gn as BLOB, Kn as CUSTOM, qn as FILE, Wn as GET, Z as POST, ut as UzActionButton, xr as UzBack,
|
|
7865
|
+
export { Gn as BLOB, Kn as CUSTOM, qn as FILE, Wn as GET, Z as POST, ut as UzActionButton, xr as UzBack, Ni as UzBom, wa as UzCamera, _a as UzCircle, Pr as UzDraggableForm, kr as UzForm, Tr as UzFormItem, Wr as UzFormItemImage, Jr as UzFormItemTimesPicker, Br as UzFormItemUpload, qt as UzIcon, Js as UzOcr, Pa as UzSearchBar, Ba as UzSearchMobileBar, Ua as UzSpin, ao as UzTable, ho as UzTableChild, Oo as UzTableDrawer, Jo as UzTableFile, Ro as UzTableMobile, xo as UzTableQuestChild, rs as UzThumbnail, vs as UzWrap, Y as commonStore, uc as create, hs as darkTheme, dc as default, vr as fnActionReduction, _r as fnActionSimplify, Qo as fnAddThumbnail, Un as fnCancelFetch, es as fnClearAllThumbnail, ec as fnComputedScale, Yt as fnCreateRouter, Et as fnDelStorage, Ot as fnDelStorageAll, Dt as fnDelStorageByPrefix, $o as fnDeleteThumbnail, Tt as fnDialog, K as fnErrorLog, Rt as fnFilterByPinyinInitials, jt as fnFormatTime, Ft as fnFormatUnits, Pt as fnFullScreen, J as fnGetStorage, _i as fnGetTableData, tc as fnListenerScale, wt as fnNotification, Ci as fnOptionReduction, Si as fnOptionSimplify, At as fnPageModel2Naive, wi as fnPrepareFormData, Ti as fnPrepareTableData, ur as fnRenderAction, kt as fnScrollTop, Ht as fnSetLang, $s as fnSetNormalWidthAndHeight, q as fnSetStorage, Ut as fnSetTheme, Xo as fnSetThumbnail, yi as fnTableReduction, vi as fnTableSimplify, Nt as fnThrottle, Mt as fnTitle, xi as fnTriggersReduction, bi as fnTriggersSimplify, G as i18n, fc as install, ms as lightTheme, zt as mergeColumns, Jt as router, Qs as scaleStore, Yr as useDebounceFn, rc as useLocalStorage, ic as useQuery, nc as useThrottleFn };
|