@unizhen/ui 0.1.126 → 0.1.128
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/api.d.ts +1 -0
- package/lib/components/bom/index.vue.d.ts +102 -5
- package/lib/components/bom/interface.d.ts +1 -0
- package/lib/ui.js +1354 -1738
- package/package.json +1 -1
- package/lib/components/bom/columns.d.ts +0 -258
- package/lib/components/bom/identity.test.d.ts +0 -1
- package/lib/components/bom/options.d.ts +0 -19
- package/lib/components/bom/options.test.d.ts +0 -1
- package/lib/components/bom/quantity.test.d.ts +0 -1
- package/lib/components/bom/sortable.test.d.ts +0 -1
- package/lib/components/bom/tree.test.d.ts +0 -1
package/lib/ui.js
CHANGED
|
@@ -6,20 +6,20 @@ import { createRouter as Je, createWebHistory as Ye, useRoute as Xe, useRouter a
|
|
|
6
6
|
import { cloneDeep as H, compact as Qe, debounce as $e, throttle as et } from "lodash-es";
|
|
7
7
|
import tt from "dayjs";
|
|
8
8
|
import { VueDraggable as nt } from "vue-draggable-plus";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { UzNumberFlow as
|
|
12
|
-
import
|
|
13
|
-
import { OEM as
|
|
9
|
+
import U from "json5";
|
|
10
|
+
import rt from "sortablejs";
|
|
11
|
+
import { UzNumberFlow as it } from "@unizhen/number";
|
|
12
|
+
import at from "jsqr";
|
|
13
|
+
import { OEM as ot, PSM as st, createWorker as ct } from "tesseract.js";
|
|
14
14
|
//#region \0rolldown/runtime.js
|
|
15
|
-
var
|
|
15
|
+
var lt = Object.defineProperty, ut = (e, t) => {
|
|
16
16
|
let n = {};
|
|
17
|
-
for (var r in e)
|
|
17
|
+
for (var r in e) lt(n, r, {
|
|
18
18
|
get: e[r],
|
|
19
19
|
enumerable: !0
|
|
20
20
|
});
|
|
21
|
-
return t ||
|
|
22
|
-
},
|
|
21
|
+
return t || lt(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
22
|
+
}, dt = d({
|
|
23
23
|
name: "UzActionButton",
|
|
24
24
|
props: {
|
|
25
25
|
data: {
|
|
@@ -49,33 +49,33 @@ var ut = Object.defineProperty, dt = (e, t) => {
|
|
|
49
49
|
hProps: e.hProps
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
}),
|
|
53
|
-
function
|
|
54
|
-
|
|
52
|
+
}), ft = window.localStorage;
|
|
53
|
+
function pt(e, t) {
|
|
54
|
+
ft.setItem(e, JSON.stringify(t));
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
let t =
|
|
56
|
+
function mt(e) {
|
|
57
|
+
let t = ft.getItem(e);
|
|
58
58
|
if (t) return JSON.parse(t);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
60
|
+
function ht(e) {
|
|
61
|
+
ft.removeItem(e);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function gt() {
|
|
64
64
|
return Date.parse(String(/* @__PURE__ */ new Date()));
|
|
65
65
|
}
|
|
66
|
-
var
|
|
66
|
+
var _t = "local-", vt = new class {
|
|
67
67
|
namespace;
|
|
68
68
|
mapKey;
|
|
69
69
|
map;
|
|
70
70
|
constructor(e = "") {
|
|
71
|
-
this.namespace = e, this.mapKey =
|
|
71
|
+
this.namespace = e, this.mapKey = _t + this.namespace, this.map = mt(this.mapKey) || {};
|
|
72
72
|
}
|
|
73
73
|
set(e, t, n = 0) {
|
|
74
74
|
let r = this.getReallyKey(e), i = {
|
|
75
75
|
expires: n,
|
|
76
|
-
time:
|
|
76
|
+
time: gt()
|
|
77
77
|
};
|
|
78
|
-
|
|
78
|
+
pt(r, t), this.map[e] = i, pt(this.mapKey, this.map);
|
|
79
79
|
}
|
|
80
80
|
getReallyKey(e) {
|
|
81
81
|
return this.namespace + "-" + e;
|
|
@@ -83,9 +83,9 @@ var vt = "local-", yt = new class {
|
|
|
83
83
|
get(e, t) {
|
|
84
84
|
let n = this.getReallyKey(e), r = this.map[e];
|
|
85
85
|
if (r) {
|
|
86
|
-
let i =
|
|
86
|
+
let i = mt(n);
|
|
87
87
|
if (r.expires > 0) {
|
|
88
|
-
if (
|
|
88
|
+
if (gt() - r.time <= r.expires) return i === !1 || i ? i : t;
|
|
89
89
|
this.delete(e);
|
|
90
90
|
} else return i === !1 || i ? i : t;
|
|
91
91
|
}
|
|
@@ -93,7 +93,7 @@ var vt = "local-", yt = new class {
|
|
|
93
93
|
}
|
|
94
94
|
delete(e) {
|
|
95
95
|
let t = this.getReallyKey(e);
|
|
96
|
-
delete this.map[e],
|
|
96
|
+
delete this.map[e], pt(this.mapKey, this.map), ht(t);
|
|
97
97
|
}
|
|
98
98
|
deleteByPrefix(e) {
|
|
99
99
|
for (let t in this.map) t.indexOf(e) > -1 && this.delete(t);
|
|
@@ -101,17 +101,17 @@ var vt = "local-", yt = new class {
|
|
|
101
101
|
deleteAll() {
|
|
102
102
|
for (let e in this.map) this.delete(e);
|
|
103
103
|
}
|
|
104
|
-
}("uz"),
|
|
104
|
+
}("uz"), yt = new Intl.Collator("zh-Hans-u-co-pinyin"), bt = [..."阿八嚓哒妸发旮哈讥咔垃妈拏噢妑七呥仨他屲夕丫帀"], xt = [..."ABCDEFGHJKLMNOPQRSTWXYZ"], { notification: St, dialog: Ct } = Ve(["notification", "dialog"], {
|
|
105
105
|
configProviderProps: { themeOverrides: { common: { borderRadius: "12px" } } },
|
|
106
106
|
notificationProviderProps: { placement: "bottom-right" }
|
|
107
|
-
}),
|
|
108
|
-
function
|
|
109
|
-
console.log(e),
|
|
107
|
+
}), wt = St, Tt = Ct;
|
|
108
|
+
function W(e) {
|
|
109
|
+
console.log(e), St.error({
|
|
110
110
|
content: e.message,
|
|
111
111
|
duration: 3e3
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function G(e, t, n = "1 Day") {
|
|
115
115
|
if (typeof n == "string") {
|
|
116
116
|
let e = 0, t = n.split(" ");
|
|
117
117
|
switch (t[1]) {
|
|
@@ -128,18 +128,18 @@ function W(e, t, n = "1 Day") {
|
|
|
128
128
|
}
|
|
129
129
|
n = Number(t[0]) * e;
|
|
130
130
|
}
|
|
131
|
-
|
|
131
|
+
vt.set(e, t, n);
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
return
|
|
133
|
+
function K(e, t) {
|
|
134
|
+
return vt.get(e, t);
|
|
135
135
|
}
|
|
136
|
-
var
|
|
137
|
-
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
},
|
|
136
|
+
var Et = (e) => {
|
|
137
|
+
vt.delete(e);
|
|
138
|
+
}, Dt = (e) => {
|
|
139
|
+
vt.deleteByPrefix(e);
|
|
140
|
+
}, Ot = () => {
|
|
141
|
+
vt.deleteAll();
|
|
142
|
+
}, kt = (e = 0) => {
|
|
143
143
|
let t = document.documentElement, n = document.querySelectorAll(".uz-table-m-content");
|
|
144
144
|
t && (t.scrollTop = e, setTimeout(() => {
|
|
145
145
|
t.scrollTop = e;
|
|
@@ -147,7 +147,7 @@ var Dt = (e) => {
|
|
|
147
147
|
t.scrollTop = e;
|
|
148
148
|
});
|
|
149
149
|
};
|
|
150
|
-
function
|
|
150
|
+
function At(e) {
|
|
151
151
|
if (!e.records) {
|
|
152
152
|
let t = e;
|
|
153
153
|
return {
|
|
@@ -191,7 +191,7 @@ function jt(e) {
|
|
|
191
191
|
records: e.records
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
|
-
var
|
|
194
|
+
var jt = (e, t = "yyyy-MM-dd") => {
|
|
195
195
|
if (!e) return "";
|
|
196
196
|
typeof e == "string" && (e = e.replace(/年/g, "-").replace(/月/g, "-").replace(/日/g, ""));
|
|
197
197
|
let n = new Date(e);
|
|
@@ -209,9 +209,9 @@ var Mt = (e, t = "yyyy-MM-dd") => {
|
|
|
209
209
|
RegExp.$1.length !== 1 && (n = ("00" + r[e]).substr(("" + r[e]).length)), t = t.replace(RegExp.$1, n);
|
|
210
210
|
}
|
|
211
211
|
return t;
|
|
212
|
-
},
|
|
213
|
-
document.title = `${e} - ${
|
|
214
|
-
},
|
|
212
|
+
}, Mt = (e) => {
|
|
213
|
+
document.title = `${e} - ${J.title}`;
|
|
214
|
+
}, Nt = (e, t = 500) => {
|
|
215
215
|
let n = e, r, i = !1, a = function(...e) {
|
|
216
216
|
i ? (n.apply(a, e), i = !1) : r ||= setTimeout(function() {
|
|
217
217
|
r && clearTimeout(r), r = void 0, n.apply(a, e);
|
|
@@ -219,10 +219,10 @@ var Mt = (e, t = "yyyy-MM-dd") => {
|
|
|
219
219
|
};
|
|
220
220
|
return a;
|
|
221
221
|
};
|
|
222
|
-
function
|
|
222
|
+
function Pt(e, t) {
|
|
223
223
|
e.requestFullscreen ? (t && (e.onfullscreenchange = t), e.requestFullscreen()) : e.mozRequestFullScreen ? (t && (e.onmozfullscreenchange = t), e.mozRequestFullScreen()) : e.webkitRequestFullscreen ? (t && (e.onwebkitfullscreenchange = t), e.webkitRequestFullscreen()) : e.msRequestFullscreen && (t && (e.onmsfullscreenchange = t), e.msRequestFullscreen());
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function Ft(e, t = 0) {
|
|
226
226
|
let n = [
|
|
227
227
|
"",
|
|
228
228
|
"k",
|
|
@@ -232,20 +232,20 @@ function It(e, t = 0) {
|
|
|
232
232
|
], r = Math.floor(Math.log10(Math.abs(e)) / 3), i = Math.max(0, Math.min(r, n.length - 1)), a = n[i];
|
|
233
233
|
return a ? (e / 10 ** (i * 3)).toFixed(t) + a : (e / 10 ** (i * 3)).toFixed(0);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function It(e) {
|
|
236
236
|
if (/^[a-z0-9]$/i.test(e)) return e.toLowerCase();
|
|
237
237
|
if (!/^[\u4e00-\u9fff]$/.test(e)) return "";
|
|
238
|
-
for (let t =
|
|
238
|
+
for (let t = bt.length - 1; t >= 0; --t) if (yt.compare(e, bt[t]) >= 0) return xt[t].toLowerCase();
|
|
239
239
|
return "";
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
return [...String(e)].map(
|
|
241
|
+
function Lt(e) {
|
|
242
|
+
return [...String(e)].map(It).join("");
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function Rt(e, t) {
|
|
245
245
|
let n = String(t).trim().toLowerCase();
|
|
246
|
-
return n === "" || e.toLowerCase().includes(n) ||
|
|
246
|
+
return n === "" || e.toLowerCase().includes(n) || Lt(e).includes(n);
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function zt(e, t) {
|
|
249
249
|
e.forEach((e) => {
|
|
250
250
|
let n = t.find((t) => t.key === e.key);
|
|
251
251
|
n && (e.hide = n.hide, e.show = n.show, e.width = n.width);
|
|
@@ -256,7 +256,7 @@ function Bt(e, t) {
|
|
|
256
256
|
index: t
|
|
257
257
|
})).sort((e, t) => r(e.item) - r(t.item) || e.index - t.index).map(({ item: e }) => e);
|
|
258
258
|
}
|
|
259
|
-
var
|
|
259
|
+
var q = Ge({
|
|
260
260
|
legacy: !1,
|
|
261
261
|
locale: "zh-CN",
|
|
262
262
|
messages: {
|
|
@@ -348,7 +348,7 @@ var K = Ge({
|
|
|
348
348
|
},
|
|
349
349
|
"fr-FR": {}
|
|
350
350
|
}
|
|
351
|
-
}),
|
|
351
|
+
}), J = C({
|
|
352
352
|
title: "杭州宇臻智能",
|
|
353
353
|
needUpdate: !1,
|
|
354
354
|
theme: !1,
|
|
@@ -358,39 +358,39 @@ var K = Ge({
|
|
|
358
358
|
icons: void 0,
|
|
359
359
|
iconDefault: ""
|
|
360
360
|
});
|
|
361
|
+
function Bt(e) {
|
|
362
|
+
J.icons = e.icons, J.iconDefault = e.iconDefault;
|
|
363
|
+
}
|
|
361
364
|
function Vt(e) {
|
|
362
|
-
|
|
365
|
+
J.language = e;
|
|
363
366
|
}
|
|
364
367
|
function Ht(e) {
|
|
365
|
-
q.language = e;
|
|
366
|
-
}
|
|
367
|
-
function Ut(e) {
|
|
368
368
|
let t;
|
|
369
|
-
t = e || (
|
|
369
|
+
t = e || (J.lang === "zh-CN" ? "en-US" : "zh-CN"), G("lang", t, 0), J.lang = t;
|
|
370
370
|
let n = document.body;
|
|
371
|
-
n.dataset.lang = t,
|
|
371
|
+
n.dataset.lang = t, q.global.locale.value = t;
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function Ut(e) {
|
|
374
374
|
let t = document.body;
|
|
375
375
|
t.classList.add("remove-all-transition");
|
|
376
376
|
let n = document.querySelector("meta[name=theme-color]");
|
|
377
|
-
e ? t.dataset.theme = "dark" : t.dataset.theme = "", n && (e ? n.setAttribute("content", "#2b2b2d") : n.setAttribute("content", "#ffffff")),
|
|
377
|
+
e ? t.dataset.theme = "dark" : t.dataset.theme = "", n && (e ? n.setAttribute("content", "#2b2b2d") : n.setAttribute("content", "#ffffff")), J.theme = e, setTimeout(() => {
|
|
378
378
|
t.classList.remove("remove-all-transition");
|
|
379
379
|
}, 0);
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
|
|
381
|
+
function Wt(e) {
|
|
382
|
+
J.needUpdate = e;
|
|
383
383
|
}
|
|
384
|
-
function
|
|
385
|
-
|
|
384
|
+
function Gt(e) {
|
|
385
|
+
J.title = e;
|
|
386
386
|
}
|
|
387
|
-
var
|
|
388
|
-
|
|
387
|
+
var Kt = () => {
|
|
388
|
+
J.isMobile = window.screen.availWidth < 769;
|
|
389
389
|
};
|
|
390
|
-
window.addEventListener("resize",
|
|
390
|
+
window.addEventListener("resize", Kt), Kt();
|
|
391
391
|
//#endregion
|
|
392
392
|
//#region components/icon/index.vue
|
|
393
|
-
var
|
|
393
|
+
var qt = d({
|
|
394
394
|
name: "UzIcon",
|
|
395
395
|
props: { icon: {
|
|
396
396
|
required: !0,
|
|
@@ -401,8 +401,8 @@ var Jt = d({
|
|
|
401
401
|
let t = w(!0), n = w(), r = (e) => {
|
|
402
402
|
if (t.value = !1, e && typeof e == "string") {
|
|
403
403
|
try {
|
|
404
|
-
let t =
|
|
405
|
-
Object.keys(t).length > 0 && (t[e] ? n.value = t[e] : t[
|
|
404
|
+
let t = J.icons;
|
|
405
|
+
Object.keys(t).length > 0 && (t[e] ? n.value = t[e] : t[J.iconDefault] && (n.value = t[J.iconDefault]));
|
|
406
406
|
} catch {}
|
|
407
407
|
h(() => {
|
|
408
408
|
t.value = !0;
|
|
@@ -413,21 +413,21 @@ var Jt = d({
|
|
|
413
413
|
r(e);
|
|
414
414
|
}), () => t.value ? n.value && n.value.render(null, []) : null;
|
|
415
415
|
}
|
|
416
|
-
}),
|
|
417
|
-
function
|
|
418
|
-
return
|
|
416
|
+
}), Y;
|
|
417
|
+
function Jt(e, t = "/") {
|
|
418
|
+
return Y = Je({
|
|
419
419
|
history: Ye(t),
|
|
420
420
|
routes: e,
|
|
421
421
|
scrollBehavior: () => ({
|
|
422
422
|
left: 0,
|
|
423
423
|
top: 0
|
|
424
424
|
})
|
|
425
|
-
}),
|
|
425
|
+
}), Y;
|
|
426
426
|
}
|
|
427
427
|
//#endregion
|
|
428
428
|
//#region components/monitor.ts
|
|
429
|
-
var
|
|
430
|
-
let e =
|
|
429
|
+
var Yt = 500, Xt = 300, Zt = [], Qt = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakSet(), tn, nn, rn, an, on, sn, cn = !1, ln = () => typeof navigator > "u" ? "" : navigator.userAgent.toLocaleUpperCase(), un = () => {
|
|
430
|
+
let e = ln(), t = /ANDROID ([\d.]+)/.exec(e);
|
|
431
431
|
if (t) return `Android ${t[1]}`;
|
|
432
432
|
let n = /(?:IPHONE|IPAD).*OS ([\d_]+)/.exec(e);
|
|
433
433
|
if (n) return `${e.includes("IPAD") ? "iPad" : "iPhone"} ${n[1].replace(/_/g, ".")}`;
|
|
@@ -442,8 +442,8 @@ var Zt = 500, Qt = 300, $t = [], en = /* @__PURE__ */ new WeakMap(), tn = /* @__
|
|
|
442
442
|
}[r[1]] ?? `Windows NT ${r[1]}`;
|
|
443
443
|
let i = /MAC OS X ([\d_]+)/.exec(e);
|
|
444
444
|
return i ? `macOS ${i[1].replace(/_/g, ".")}` : "Other Platform";
|
|
445
|
-
},
|
|
446
|
-
let e =
|
|
445
|
+
}, dn = () => {
|
|
446
|
+
let e = ln();
|
|
447
447
|
for (let [t, n] of [
|
|
448
448
|
[/EDG(?:A|IOS)?\/([\d.]+)/, "Edge"],
|
|
449
449
|
[/OPR\/([\d.]+)/, "Opera"],
|
|
@@ -458,7 +458,7 @@ var Zt = 500, Qt = 300, $t = [], en = /* @__PURE__ */ new WeakMap(), tn = /* @__
|
|
|
458
458
|
if (r) return `${n} ${r[1]}`;
|
|
459
459
|
}
|
|
460
460
|
return "Others";
|
|
461
|
-
},
|
|
461
|
+
}, fn = (e, t) => e.length > t ? `${e.slice(0, t)}…` : e, pn = (e) => e.replace(/([?&](?:access[_-]?token|refresh[_-]?token|token|authorization|password|passwd|secret|api[_-]?key|cookie|session)=)[^&#\s]*/gi, "$1[REDACTED]").replace(/("(?:access[_-]?token|refresh[_-]?token|token|authorization|password|passwd|secret|api[_-]?key|cookie|session)"\s*:\s*)"[^"]*"/gi, "$1\"[REDACTED]\"").replace(/(\b(?:access[_-]?token|refresh[_-]?token|token|authorization|password|passwd|secret|api[_-]?key|cookie|session)\s*[=:]\s*)[^\s,;]+/gi, "$1[REDACTED]"), mn = (e) => {
|
|
462
462
|
let t = /* @__PURE__ */ new WeakSet();
|
|
463
463
|
try {
|
|
464
464
|
return JSON.stringify(e, (e, n) => {
|
|
@@ -472,7 +472,7 @@ var Zt = 500, Qt = 300, $t = [], en = /* @__PURE__ */ new WeakMap(), tn = /* @__
|
|
|
472
472
|
} catch {
|
|
473
473
|
return String(e);
|
|
474
474
|
}
|
|
475
|
-
},
|
|
475
|
+
}, hn = (e) => e instanceof Error ? fn(pn(`${e.name && e.name !== "Error" ? `${e.name}: ` : ""}${e.message || "Unknown error"}`), Yt) : fn(pn((typeof e == "string" ? e : mn(e)).trim() || "Unknown error"), Yt), gn = (e) => {
|
|
476
476
|
let t = String(e || "");
|
|
477
477
|
if (!t) return "";
|
|
478
478
|
try {
|
|
@@ -481,7 +481,7 @@ var Zt = 500, Qt = 300, $t = [], en = /* @__PURE__ */ new WeakMap(), tn = /* @__
|
|
|
481
481
|
} catch {
|
|
482
482
|
return t.split(/[?#]/, 1)[0];
|
|
483
483
|
}
|
|
484
|
-
},
|
|
484
|
+
}, _n = (e, t) => {
|
|
485
485
|
let n = [];
|
|
486
486
|
try {
|
|
487
487
|
let t = new URL(e, location.href).searchParams.toString();
|
|
@@ -498,8 +498,8 @@ var Zt = 500, Qt = 300, $t = [], en = /* @__PURE__ */ new WeakMap(), tn = /* @__
|
|
|
498
498
|
}), n.push(e.join("&"));
|
|
499
499
|
} else typeof Blob < "u" && t instanceof Blob ? n.push(`[Blob:${t.type || "unknown"},${t.size}B]`) : typeof ArrayBuffer < "u" && (t instanceof ArrayBuffer || ArrayBuffer.isView(t)) && n.push("[Binary data]");
|
|
500
500
|
}
|
|
501
|
-
return
|
|
502
|
-
},
|
|
501
|
+
return fn(pn(n.filter(Boolean).join(" | ")), Xt);
|
|
502
|
+
}, vn = (e) => {
|
|
503
503
|
let t;
|
|
504
504
|
if (typeof TextEncoder < "u") {
|
|
505
505
|
let n = new TextEncoder().encode(e);
|
|
@@ -514,8 +514,8 @@ var Zt = 500, Qt = 300, $t = [], en = /* @__PURE__ */ new WeakMap(), tn = /* @__
|
|
|
514
514
|
t = n.map((e) => String.fromCharCode(e)).join("");
|
|
515
515
|
}
|
|
516
516
|
return window.btoa(t);
|
|
517
|
-
},
|
|
518
|
-
let n =
|
|
517
|
+
}, yn = (e, t) => {
|
|
518
|
+
let n = vn(t), r = () => {
|
|
519
519
|
let t = new XMLHttpRequest();
|
|
520
520
|
t.open("POST", e, !0), t.setRequestHeader("Content-Type", "text/plain;charset=UTF-8"), t.send(n);
|
|
521
521
|
}, i = () => {
|
|
@@ -525,7 +525,7 @@ var Zt = 500, Qt = 300, $t = [], en = /* @__PURE__ */ new WeakMap(), tn = /* @__
|
|
|
525
525
|
try {
|
|
526
526
|
r();
|
|
527
527
|
} catch {}
|
|
528
|
-
}, a =
|
|
528
|
+
}, a = rn ?? window.fetch;
|
|
529
529
|
typeof a == "function" ? a.call(window, e, {
|
|
530
530
|
method: "POST",
|
|
531
531
|
body: n,
|
|
@@ -535,87 +535,87 @@ var Zt = 500, Qt = 300, $t = [], en = /* @__PURE__ */ new WeakMap(), tn = /* @__
|
|
|
535
535
|
}).then((e) => {
|
|
536
536
|
e.ok || i();
|
|
537
537
|
}).catch(i) : i();
|
|
538
|
-
},
|
|
539
|
-
if (!
|
|
540
|
-
|
|
538
|
+
}, bn = (e, t) => (n, r, i) => {
|
|
539
|
+
if (!cn) {
|
|
540
|
+
cn = !0;
|
|
541
541
|
try {
|
|
542
|
-
let a =
|
|
543
|
-
a && a.toLocaleLowerCase().indexOf("resizeobserver") === -1 &&
|
|
542
|
+
let a = hn(i);
|
|
543
|
+
a && a.toLocaleLowerCase().indexOf("resizeobserver") === -1 && yn(e, mn({
|
|
544
544
|
type: n,
|
|
545
545
|
time: Date.now(),
|
|
546
|
-
url:
|
|
547
|
-
browser:
|
|
548
|
-
platform:
|
|
546
|
+
url: gn(r) || gn(location.href),
|
|
547
|
+
browser: dn(),
|
|
548
|
+
platform: un(),
|
|
549
549
|
message: `[${n}] [${window.document.title}] [${a}]`,
|
|
550
550
|
info: t ? t() : ""
|
|
551
551
|
}));
|
|
552
552
|
} catch {} finally {
|
|
553
|
-
|
|
553
|
+
cn = !1;
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
|
-
},
|
|
557
|
-
for (let r of
|
|
558
|
-
},
|
|
559
|
-
let t =
|
|
560
|
-
return
|
|
561
|
-
},
|
|
562
|
-
|
|
563
|
-
let t =
|
|
564
|
-
t && !
|
|
556
|
+
}, xn = (e, t, n) => {
|
|
557
|
+
for (let r of Zt) r.report(e, t, n);
|
|
558
|
+
}, Sn = (e) => {
|
|
559
|
+
let t = gn(e);
|
|
560
|
+
return Zt.some((e) => e.endpoint === t);
|
|
561
|
+
}, Cn = (e) => {
|
|
562
|
+
en.has(e) || (en.add(e), e.addEventListener("error", () => {
|
|
563
|
+
let t = $t.get(e);
|
|
564
|
+
t && !Sn(t.url) && xn(3, t.url, `${t.method} network error`);
|
|
565
565
|
}), e.addEventListener("timeout", () => {
|
|
566
|
-
let t =
|
|
567
|
-
t && !
|
|
566
|
+
let t = $t.get(e);
|
|
567
|
+
t && !Sn(t.url) && xn(3, t.url, `${t.method} timeout`);
|
|
568
568
|
}), e.addEventListener("loadend", () => {
|
|
569
|
-
let t =
|
|
570
|
-
if (!t || e.status < 400 ||
|
|
569
|
+
let t = $t.get(e);
|
|
570
|
+
if (!t || e.status < 400 || Sn(t.url)) return;
|
|
571
571
|
let n = Date.now() - t.startTime;
|
|
572
|
-
|
|
572
|
+
xn(3, t.url, `${t.method} ${e.status} (${n}ms)`);
|
|
573
573
|
}));
|
|
574
|
-
},
|
|
575
|
-
|
|
576
|
-
|
|
574
|
+
}, wn = () => {
|
|
575
|
+
tn || nn || an || on || typeof XMLHttpRequest > "u" || (tn = XMLHttpRequest.prototype.open, nn = XMLHttpRequest.prototype.send, an = function(e, t, ...n) {
|
|
576
|
+
$t.set(this, {
|
|
577
577
|
method: String(e).toUpperCase(),
|
|
578
578
|
url: String(t),
|
|
579
579
|
startTime: Date.now()
|
|
580
|
-
}),
|
|
581
|
-
}, XMLHttpRequest.prototype.open =
|
|
582
|
-
let t =
|
|
583
|
-
t && (t.startTime = Date.now()),
|
|
584
|
-
}, XMLHttpRequest.prototype.send =
|
|
585
|
-
},
|
|
586
|
-
|
|
587
|
-
},
|
|
588
|
-
if (
|
|
580
|
+
}), Cn(this), tn?.call(this, e, t, n[0] ?? !0, n[1] ?? null, n[2] ?? null);
|
|
581
|
+
}, XMLHttpRequest.prototype.open = an, on = function(e) {
|
|
582
|
+
let t = $t.get(this);
|
|
583
|
+
t && (t.startTime = Date.now()), nn?.call(this, e ?? null);
|
|
584
|
+
}, XMLHttpRequest.prototype.send = on);
|
|
585
|
+
}, Tn = () => {
|
|
586
|
+
tn && XMLHttpRequest.prototype.open === an && (XMLHttpRequest.prototype.open = tn, tn = void 0, an = void 0), nn && XMLHttpRequest.prototype.send === on && (XMLHttpRequest.prototype.send = nn, nn = void 0, on = void 0);
|
|
587
|
+
}, En = () => {
|
|
588
|
+
if (rn || typeof window.fetch != "function") return;
|
|
589
589
|
let e = window.fetch;
|
|
590
|
-
|
|
591
|
-
let r = typeof Request < "u" && t instanceof Request, i = r ? t.url : String(t), a = String(n?.method || r && t.method || "GET").toUpperCase(), o =
|
|
590
|
+
rn = e, sn = async function(t, n) {
|
|
591
|
+
let r = typeof Request < "u" && t instanceof Request, i = r ? t.url : String(t), a = String(n?.method || r && t.method || "GET").toUpperCase(), o = _n(i, n?.body), s = o ? ` | Params: ${o}` : "", c = Date.now();
|
|
592
592
|
try {
|
|
593
593
|
let r = await e.call(this, t, n);
|
|
594
|
-
return !r.ok && !
|
|
594
|
+
return !r.ok && !Sn(i) && xn(3, i, `${a} ${r.status} (${Date.now() - c}ms)${s}`), r;
|
|
595
595
|
} catch (e) {
|
|
596
|
-
throw
|
|
596
|
+
throw Sn(i) || xn(3, i, `${a} network error: ${hn(e)}${s}`), e;
|
|
597
597
|
}
|
|
598
|
-
}, window.fetch =
|
|
599
|
-
},
|
|
600
|
-
|
|
601
|
-
},
|
|
602
|
-
|
|
603
|
-
},
|
|
604
|
-
|
|
605
|
-
},
|
|
606
|
-
|
|
607
|
-
},
|
|
608
|
-
|
|
598
|
+
}, window.fetch = sn;
|
|
599
|
+
}, Dn = () => {
|
|
600
|
+
rn && window.fetch === sn && (window.fetch = rn, rn = void 0, sn = void 0);
|
|
601
|
+
}, On = (e) => {
|
|
602
|
+
xn(1, e.filename || location.href, e.error || e.message);
|
|
603
|
+
}, kn = (e) => {
|
|
604
|
+
xn(1, location.href, `Promise: ${hn(e.reason)}`);
|
|
605
|
+
}, An = () => {
|
|
606
|
+
Zt.length === 1 && (wn(), En(), window.addEventListener("error", On), window.addEventListener("unhandledrejection", kn));
|
|
607
|
+
}, jn = () => {
|
|
608
|
+
Zt.length > 0 || (Tn(), Dn(), window.removeEventListener("error", On), window.removeEventListener("unhandledrejection", kn));
|
|
609
609
|
};
|
|
610
|
-
function
|
|
610
|
+
function Mn(e, t, n) {
|
|
611
611
|
if (!t || typeof window > "u" || typeof navigator > "u") return;
|
|
612
|
-
let r =
|
|
612
|
+
let r = Qt.get(e);
|
|
613
613
|
if (r) return r;
|
|
614
|
-
let i =
|
|
615
|
-
endpoint:
|
|
614
|
+
let i = bn(t, n), a = {
|
|
615
|
+
endpoint: gn(t),
|
|
616
616
|
report: i
|
|
617
617
|
};
|
|
618
|
-
|
|
618
|
+
Zt.push(a), An();
|
|
619
619
|
let o = e.config.errorHandler, s = (e, t, n) => {
|
|
620
620
|
i(2, location.href, e), o?.(e, t, n);
|
|
621
621
|
};
|
|
@@ -623,14 +623,14 @@ function Pn(e, t, n) {
|
|
|
623
623
|
let c = !1, l = () => {
|
|
624
624
|
if (c) return;
|
|
625
625
|
c = !0, e.config.errorHandler === s && (e.config.errorHandler = o);
|
|
626
|
-
let t =
|
|
627
|
-
t >= 0 &&
|
|
626
|
+
let t = Zt.indexOf(a);
|
|
627
|
+
t >= 0 && Zt.splice(t, 1), Qt.delete(e), jn();
|
|
628
628
|
};
|
|
629
|
-
return
|
|
629
|
+
return Qt.set(e, l), e.onUnmount(l), l;
|
|
630
630
|
}
|
|
631
|
-
var
|
|
632
|
-
|
|
633
|
-
},
|
|
631
|
+
var Nn = (e, t, n) => {
|
|
632
|
+
xn(e, t, n);
|
|
633
|
+
}, X = /* @__PURE__ */ new Map(), Pn = Object.prototype.hasOwnProperty, Fn = 300, In = (e) => {
|
|
634
634
|
if (e == null) return "";
|
|
635
635
|
let t;
|
|
636
636
|
if (typeof e == "string") t = e;
|
|
@@ -639,44 +639,44 @@ var Fn = (e, t, n) => {
|
|
|
639
639
|
} catch {
|
|
640
640
|
t = String(e);
|
|
641
641
|
}
|
|
642
|
-
return t.length >
|
|
642
|
+
return t.length > Fn ? `${t.slice(0, Fn)}…` : t;
|
|
643
643
|
};
|
|
644
|
-
function
|
|
644
|
+
function Ln(e, t) {
|
|
645
645
|
let n = [];
|
|
646
646
|
for (let r in e) {
|
|
647
|
-
if (!
|
|
647
|
+
if (!Pn.call(e, r)) continue;
|
|
648
648
|
let i = e[r], a = encodeURIComponent(r), o;
|
|
649
|
-
o = typeof i == "object" ?
|
|
649
|
+
o = typeof i == "object" ? Ln(i, t ? t + "[" + a + "]" : a) : (t ? t + "[" + a + "]" : a) + "=" + encodeURIComponent(i), n.push(o);
|
|
650
650
|
}
|
|
651
651
|
return n.join("&");
|
|
652
652
|
}
|
|
653
|
-
var
|
|
653
|
+
var Rn = (e) => {
|
|
654
654
|
let t = e["content-disposition"];
|
|
655
655
|
if (t) {
|
|
656
656
|
let e = t.match(/filename=(?<fileName>.+)/);
|
|
657
657
|
return e && e.groups && e.groups.fileName;
|
|
658
658
|
}
|
|
659
659
|
return "";
|
|
660
|
-
},
|
|
660
|
+
}, zn = qe.create({
|
|
661
661
|
timeout: 3e5,
|
|
662
662
|
responseType: "json",
|
|
663
663
|
headers: { "Content-Type": "application/json" }
|
|
664
664
|
});
|
|
665
|
-
|
|
666
|
-
var
|
|
667
|
-
|
|
668
|
-
e.cancelToken =
|
|
669
|
-
let t =
|
|
665
|
+
zn.defaults.timeout = 3e5;
|
|
666
|
+
var Bn = qe.CancelToken.source();
|
|
667
|
+
zn.interceptors.request.use((e) => {
|
|
668
|
+
e.cancelToken = Bn.token, e.headers.Language = J.lang, e.headers.Platform = J.isMobile ? "mobile" : "pc";
|
|
669
|
+
let t = K("token", !1);
|
|
670
670
|
if (e.headers && t && (e.headers.token = t), e.method?.toLocaleUpperCase() === "GET") {
|
|
671
|
-
let t =
|
|
671
|
+
let t = Ln(e.data);
|
|
672
672
|
t && (e.url = `${e.url}?${t}`);
|
|
673
673
|
}
|
|
674
674
|
return e.method?.toLocaleUpperCase() === "POST" && (e.data = e.data), e;
|
|
675
|
-
}, (e) => Promise.reject(e)),
|
|
675
|
+
}, (e) => Promise.reject(e)), zn.interceptors.response.use((e) => {
|
|
676
676
|
let t = e.data;
|
|
677
|
-
if (t.code === 401) return
|
|
677
|
+
if (t.code === 401) return Et("token"), Y.replace("/login"), Promise.reject(!1);
|
|
678
678
|
if (e.config.responseType === "blob" || e.config.responseType === "text" || e.config.responseType === "arraybuffer") {
|
|
679
|
-
let t =
|
|
679
|
+
let t = Rn(e.headers);
|
|
680
680
|
return Promise.resolve({
|
|
681
681
|
fileName: decodeURIComponent(t),
|
|
682
682
|
data: e.data
|
|
@@ -687,89 +687,89 @@ Vn.interceptors.request.use((e) => {
|
|
|
687
687
|
return Promise.resolve(e);
|
|
688
688
|
}
|
|
689
689
|
{
|
|
690
|
-
|
|
691
|
-
let n = t.message, r =
|
|
692
|
-
return
|
|
693
|
-
content: n ||
|
|
690
|
+
wt.destroyAll();
|
|
691
|
+
let n = t.message, r = In(e.config.data ?? e.config.params);
|
|
692
|
+
return Nn(3, e.config.url || location.href, `Fetch ${t.code ?? "error"}: ${n || "Unknown error"}${r ? ` | Params: ${r}` : ""}`), wt.error({
|
|
693
|
+
content: n || q.global.t("Notice.error"),
|
|
694
694
|
duration: 3e3
|
|
695
695
|
}), Promise.reject(n);
|
|
696
696
|
}
|
|
697
|
-
}, (e) => e ? (
|
|
698
|
-
content:
|
|
697
|
+
}, (e) => e ? (wt.destroyAll(), e.code === "ERR_NETWORK" ? (wt.error({
|
|
698
|
+
content: q.global.t("Notice.network"),
|
|
699
699
|
duration: 3e3
|
|
700
|
-
}), Promise.reject("Notice.network")) : e.response ? (e.response.status === 401 && (
|
|
701
|
-
content:
|
|
700
|
+
}), Promise.reject("Notice.network")) : e.response ? (e.response.status === 401 && (Et("token"), window.location.href = "/mom/login"), wt.error({
|
|
701
|
+
content: q.global.t("Notice.error"),
|
|
702
702
|
duration: 3e3
|
|
703
|
-
}), Promise.reject(
|
|
704
|
-
var
|
|
705
|
-
|
|
706
|
-
},
|
|
703
|
+
}), Promise.reject(q.global.t("Notice.error"))) : Promise.reject(e)) : Promise.reject(q.global.t("Notice.error")));
|
|
704
|
+
var Vn = "/apiserver/", Hn = () => {
|
|
705
|
+
Bn.cancel(), Bn = qe.CancelToken.source();
|
|
706
|
+
}, Un = (e, t, n = "json", r = 3e5) => {
|
|
707
707
|
let i = JSON.stringify({
|
|
708
708
|
fetchUri: e,
|
|
709
709
|
...t
|
|
710
710
|
});
|
|
711
|
-
if (
|
|
712
|
-
let a =
|
|
713
|
-
url: `${
|
|
711
|
+
if (X.has(i)) return X.get(i);
|
|
712
|
+
let a = zn({
|
|
713
|
+
url: `${Vn}${e}`,
|
|
714
714
|
method: "GET",
|
|
715
715
|
data: t,
|
|
716
716
|
responseType: n,
|
|
717
717
|
timeout: r
|
|
718
|
-
}).then((e) => (
|
|
719
|
-
|
|
718
|
+
}).then((e) => (X.delete(i), e)).catch(() => {
|
|
719
|
+
X.delete(i);
|
|
720
720
|
});
|
|
721
|
-
return
|
|
722
|
-
},
|
|
721
|
+
return X.set(i, a), a;
|
|
722
|
+
}, Z = (e, t = {}, n = "json", r = 3e5) => {
|
|
723
723
|
let i = JSON.stringify({
|
|
724
724
|
fetchUri: e,
|
|
725
725
|
...t
|
|
726
726
|
});
|
|
727
|
-
if (
|
|
728
|
-
let a =
|
|
729
|
-
url: `${
|
|
727
|
+
if (X.has(i)) return X.get(i);
|
|
728
|
+
let a = zn({
|
|
729
|
+
url: `${Vn}${e}`,
|
|
730
730
|
method: "POST",
|
|
731
731
|
data: t,
|
|
732
732
|
responseType: n,
|
|
733
733
|
timeout: r
|
|
734
|
-
}).then((e) => (
|
|
735
|
-
return
|
|
736
|
-
},
|
|
737
|
-
url: `${
|
|
734
|
+
}).then((e) => (X.delete(i), Promise.resolve(e))).catch((e) => (X.delete(i), Promise.reject(e)));
|
|
735
|
+
return X.set(i, a), a;
|
|
736
|
+
}, Wn = (e, t = {}, n = "blob", r = 3e5) => zn({
|
|
737
|
+
url: `${Vn}${e}`,
|
|
738
738
|
method: "POST",
|
|
739
739
|
data: t,
|
|
740
740
|
responseType: n,
|
|
741
741
|
timeout: r
|
|
742
|
-
}),
|
|
742
|
+
}), Gn = (e) => zn(e), Kn = (e, t) => zn({
|
|
743
743
|
headers: { "Content-Type": "multipart/form-data" },
|
|
744
|
-
url: `${
|
|
744
|
+
url: `${Vn}${e}`,
|
|
745
745
|
method: "POST",
|
|
746
746
|
data: t
|
|
747
|
-
}),
|
|
747
|
+
}), qn = (e) => Z("dynamic-table/queryById", { id: e }), Jn = (e, t) => Z("dynamic-table/createTime", {
|
|
748
748
|
id: e,
|
|
749
749
|
createTime: t
|
|
750
|
-
}),
|
|
750
|
+
}), Yn = (e) => Z("table/query", e), Xn = (e) => Z("table/submit", e), Zn = (e) => Z("table/delete", e), Qn = (e) => Z("dataBind/query", { table_id: e }), $n = (e) => Z("dataBind/submit", e), er = (e, t, n) => Z("calculation/sqlExecute", {
|
|
751
751
|
calculationIds: e,
|
|
752
752
|
linkId: t,
|
|
753
753
|
...n
|
|
754
|
-
}), tr = (e) =>
|
|
754
|
+
}), tr = (e) => Wn("excel/template", { tableKey: e }, "arraybuffer"), nr = (e) => Z("excel/record/query", {
|
|
755
755
|
recordType: "import",
|
|
756
756
|
tableKey: e
|
|
757
|
-
}), rr = (e) =>
|
|
757
|
+
}), rr = (e) => Z("excel/exportData", e), ir = (e, t) => f(Re, { style: { "max-width": "300px" } }, {
|
|
758
758
|
trigger: () => e,
|
|
759
759
|
default: () => typeof t == "function" ? t() : t
|
|
760
760
|
}), ar = (e, t, n, r) => {
|
|
761
761
|
try {
|
|
762
762
|
Function("rowData", "next", "fetchData", "submitData", "fnNotification", "POST", e)(t, () => {
|
|
763
763
|
n && n();
|
|
764
|
-
}, (e) =>
|
|
764
|
+
}, (e) => Yn({
|
|
765
765
|
id: e,
|
|
766
766
|
tableId: r
|
|
767
767
|
}), (e) => Xn({
|
|
768
768
|
tableId: r,
|
|
769
769
|
...e
|
|
770
|
-
}),
|
|
770
|
+
}), wt, Z);
|
|
771
771
|
} catch (e) {
|
|
772
|
-
|
|
772
|
+
W(e);
|
|
773
773
|
}
|
|
774
774
|
}, or = (e, t, n, r, i) => {
|
|
775
775
|
let a = {
|
|
@@ -790,7 +790,7 @@ var Un = "/apiserver/", Wn = () => {
|
|
|
790
790
|
}
|
|
791
791
|
e.onClick && typeof e.onClick == "function" && (a.onClick = e.onClick.bind(void 0, t, n, r));
|
|
792
792
|
}
|
|
793
|
-
return e.icon && (o.icon = () => f(B, {}, { default: () => f(
|
|
793
|
+
return e.icon && (o.icon = () => f(B, {}, { default: () => f(qt, { icon: e.icon }, { default: () => null }) })), f(I, a, o);
|
|
794
794
|
}, sr = (e, t, n, r, i) => {
|
|
795
795
|
let a = { placement: "left" };
|
|
796
796
|
if (typeof t.onClick == "string") {
|
|
@@ -954,7 +954,7 @@ var Un = "/apiserver/", Wn = () => {
|
|
|
954
954
|
e.to ? t.push(e.to) : t.back();
|
|
955
955
|
} };
|
|
956
956
|
}
|
|
957
|
-
}),
|
|
957
|
+
}), Q = (e, t) => {
|
|
958
958
|
let n = e.__vccOpts || e;
|
|
959
959
|
for (let [e, r] of t) n[e] = r;
|
|
960
960
|
return n;
|
|
@@ -975,7 +975,7 @@ function yr(e, t, n, i, a, s) {
|
|
|
975
975
|
_: 1
|
|
976
976
|
}, 8, ["onClick"]);
|
|
977
977
|
}
|
|
978
|
-
var br = /*#__PURE__*/
|
|
978
|
+
var br = /*#__PURE__*/ Q(vr, [["render", yr]]), xr = d({
|
|
979
979
|
name: "UzFormItem",
|
|
980
980
|
components: {
|
|
981
981
|
NIcon: B,
|
|
@@ -1023,7 +1023,7 @@ var br = /*#__PURE__*/ Z(vr, [["render", yr]]), xr = d({
|
|
|
1023
1023
|
setup(e) {
|
|
1024
1024
|
let t = p("userStore"), r = p("mainFormValue"), i = w(!1), a = w([]);
|
|
1025
1025
|
return {
|
|
1026
|
-
isMobile: n(() =>
|
|
1026
|
+
isMobile: n(() => J.isMobile),
|
|
1027
1027
|
showDropdown: i,
|
|
1028
1028
|
dropdownOptions: a,
|
|
1029
1029
|
dayjs: tt,
|
|
@@ -1033,17 +1033,17 @@ var br = /*#__PURE__*/ Z(vr, [["render", yr]]), xr = d({
|
|
|
1033
1033
|
if (typeof t.form.updateValue == "string") try {
|
|
1034
1034
|
let o = t.form.updateValue, s = Function("value", "formValue", "mainFormValue", "index", "option", "POST", o);
|
|
1035
1035
|
try {
|
|
1036
|
-
let t = await s(n, a, r, e.itemIndex, i,
|
|
1036
|
+
let t = await s(n, a, r, e.itemIndex, i, Z);
|
|
1037
1037
|
t && typeof t == "object" && Object.keys(t).forEach((n) => {
|
|
1038
1038
|
e.formValue[n] = t[n];
|
|
1039
1039
|
});
|
|
1040
1040
|
} catch (e) {
|
|
1041
|
-
|
|
1041
|
+
W(e);
|
|
1042
1042
|
}
|
|
1043
1043
|
} catch (e) {
|
|
1044
|
-
|
|
1044
|
+
W(e);
|
|
1045
1045
|
}
|
|
1046
|
-
else t.form.updateValue(n, a, i,
|
|
1046
|
+
else t.form.updateValue(n, a, i, Z);
|
|
1047
1047
|
}
|
|
1048
1048
|
},
|
|
1049
1049
|
showPlaceholder: (e) => typeof e.params.placeholder == "function" ? e.params.placeholder() : e.params.placeholder ? e.params.placeholder : typeof e.label == "function" ? e.label() : e.label,
|
|
@@ -1153,7 +1153,7 @@ var br = /*#__PURE__*/ Z(vr, [["render", yr]]), xr = d({
|
|
|
1153
1153
|
checkNumberMax: (t) => {
|
|
1154
1154
|
if (e.status !== 2) return t.params.maxKey ? Number(e.formValue[t.params.maxKey]) : t.params.max;
|
|
1155
1155
|
},
|
|
1156
|
-
selectFilter: (e, t) =>
|
|
1156
|
+
selectFilter: (e, t) => Rt(t.label, e)
|
|
1157
1157
|
};
|
|
1158
1158
|
}
|
|
1159
1159
|
}), Sr = { class: "uz-flex uz-flex-wrap uz-gap-2" };
|
|
@@ -1531,7 +1531,7 @@ function Cr(t, n, i, u, d, f) {
|
|
|
1531
1531
|
"status"
|
|
1532
1532
|
])) : (x(), a(e, { key: 14 }, [], 64));
|
|
1533
1533
|
}
|
|
1534
|
-
var wr = /*#__PURE__*/
|
|
1534
|
+
var wr = /*#__PURE__*/ Q(xr, [["render", Cr]]), Tr = d({
|
|
1535
1535
|
name: "UzForm",
|
|
1536
1536
|
components: {
|
|
1537
1537
|
NForm: me,
|
|
@@ -1586,7 +1586,7 @@ var wr = /*#__PURE__*/ Z(xr, [["render", Cr]]), Tr = d({
|
|
|
1586
1586
|
}).observe(e);
|
|
1587
1587
|
} } },
|
|
1588
1588
|
setup(e, { expose: t }) {
|
|
1589
|
-
let r = p("userStore"), i = n(() =>
|
|
1589
|
+
let r = p("userStore"), i = n(() => J.isMobile), a = w(), o = w(), s = w({}), c = w([]), l = w([]), u = w([]), d = w();
|
|
1590
1590
|
S("mainFormValue", {
|
|
1591
1591
|
value: () => s.value,
|
|
1592
1592
|
setValue: (e) => {
|
|
@@ -1616,12 +1616,12 @@ var wr = /*#__PURE__*/ Z(xr, [["render", Cr]]), Tr = d({
|
|
|
1616
1616
|
}, m = (e, t) => {
|
|
1617
1617
|
switch (e) {
|
|
1618
1618
|
case "datetime":
|
|
1619
|
-
case "datetimerange": return
|
|
1619
|
+
case "datetimerange": return jt(t, "yyyy-MM-dd hh:mm:ss");
|
|
1620
1620
|
case "month":
|
|
1621
|
-
case "monthrange": return
|
|
1621
|
+
case "monthrange": return jt(t, "yyyy-MM");
|
|
1622
1622
|
case "year":
|
|
1623
|
-
case "yearrange": return
|
|
1624
|
-
default: return
|
|
1623
|
+
case "yearrange": return jt(t, "yyyy");
|
|
1624
|
+
default: return jt(t);
|
|
1625
1625
|
}
|
|
1626
1626
|
}, h = (e, t = !1) => {
|
|
1627
1627
|
let n = tt(e).startOf("day").diff(tt().startOf("day"), "day");
|
|
@@ -1843,7 +1843,7 @@ function Dr(t, n, s, u, d, f) {
|
|
|
1843
1843
|
onOnSubmit: t.refreshOption
|
|
1844
1844
|
}, null, 8, ["onOnSubmit"])], 64);
|
|
1845
1845
|
}
|
|
1846
|
-
var Or = /*#__PURE__*/
|
|
1846
|
+
var Or = /*#__PURE__*/ Q(Tr, [["render", Dr]]), kr = d({
|
|
1847
1847
|
name: "UzDraggableForm",
|
|
1848
1848
|
components: {
|
|
1849
1849
|
NForm: me,
|
|
@@ -2129,7 +2129,7 @@ function Mr(t, n, s, u, d, f) {
|
|
|
2129
2129
|
"onClick"
|
|
2130
2130
|
]);
|
|
2131
2131
|
}
|
|
2132
|
-
var Nr = /*#__PURE__*/
|
|
2132
|
+
var Nr = /*#__PURE__*/ Q(kr, [["render", Mr]]), Pr = d({
|
|
2133
2133
|
name: "UzFormItemUpload",
|
|
2134
2134
|
components: {
|
|
2135
2135
|
NUpload: ze,
|
|
@@ -2165,7 +2165,7 @@ var Nr = /*#__PURE__*/ Z(kr, [["render", Mr]]), Pr = d({
|
|
|
2165
2165
|
emits: ["update:value"],
|
|
2166
2166
|
setup(e, { emit: t }) {
|
|
2167
2167
|
let n = Ue(), r = w(!1), i = w([]), a = () => {
|
|
2168
|
-
t("update:value",
|
|
2168
|
+
t("update:value", U.stringify(i.value.map((e) => e.url)));
|
|
2169
2169
|
}, o = (e) => new Promise((t, o) => {
|
|
2170
2170
|
if (e.file.file) {
|
|
2171
2171
|
if (r.value = !0, e.file.file.size > 10485760) n.error({
|
|
@@ -2174,7 +2174,7 @@ var Nr = /*#__PURE__*/ Z(kr, [["render", Mr]]), Pr = d({
|
|
|
2174
2174
|
}), r.value = !1, o();
|
|
2175
2175
|
else {
|
|
2176
2176
|
let s = new FormData();
|
|
2177
|
-
s.append("file", e.file.file), s.append("name", e.file.name),
|
|
2177
|
+
s.append("file", e.file.file), s.append("name", e.file.name), Kn("file/cos/upload", s).then((o) => {
|
|
2178
2178
|
i.value.push({
|
|
2179
2179
|
id: e.file.id,
|
|
2180
2180
|
name: e.file.name,
|
|
@@ -2209,7 +2209,7 @@ var Nr = /*#__PURE__*/ Z(kr, [["render", Mr]]), Pr = d({
|
|
|
2209
2209
|
let t = H(e.value);
|
|
2210
2210
|
if (!t) i.value = [];
|
|
2211
2211
|
else if (typeof t == "string") try {
|
|
2212
|
-
t =
|
|
2212
|
+
t = U.parse(t), i.value = t.map((e, t) => {
|
|
2213
2213
|
let n = decodeURIComponent(e), r = n.lastIndexOf("/"), i = n.substring(r + 1);
|
|
2214
2214
|
return {
|
|
2215
2215
|
id: String(t + 1),
|
|
@@ -2325,7 +2325,7 @@ function Rr(t, n, s, u, d, f) {
|
|
|
2325
2325
|
_: 1
|
|
2326
2326
|
}, 8, ["show"]);
|
|
2327
2327
|
}
|
|
2328
|
-
var zr = /*#__PURE__*/
|
|
2328
|
+
var zr = /*#__PURE__*/ Q(Pr, [["render", Rr], ["__scopeId", "data-v-abc9b567"]]), Br = d({
|
|
2329
2329
|
name: "UzFormItemImage",
|
|
2330
2330
|
components: {
|
|
2331
2331
|
NImageGroup: ye,
|
|
@@ -2342,7 +2342,7 @@ var zr = /*#__PURE__*/ Z(Pr, [["render", Rr], ["__scopeId", "data-v-abc9b567"]])
|
|
|
2342
2342
|
let t = w([]);
|
|
2343
2343
|
return M(() => {
|
|
2344
2344
|
try {
|
|
2345
|
-
e.value ? t.value =
|
|
2345
|
+
e.value ? t.value = U.parse(e.value) : t.value = [];
|
|
2346
2346
|
} catch {
|
|
2347
2347
|
t.value = [];
|
|
2348
2348
|
}
|
|
@@ -2405,7 +2405,7 @@ function Hr(t, n, i, s, u, d) {
|
|
|
2405
2405
|
_: 1
|
|
2406
2406
|
});
|
|
2407
2407
|
}
|
|
2408
|
-
var Ur = /*#__PURE__*/
|
|
2408
|
+
var Ur = /*#__PURE__*/ Q(Br, [["render", Hr]]), Wr = d({
|
|
2409
2409
|
name: "UzFormItemTimesPicker",
|
|
2410
2410
|
components: { NSelect: Ae },
|
|
2411
2411
|
props: {
|
|
@@ -2506,7 +2506,7 @@ function Kr(e, t, n, r, i, o) {
|
|
|
2506
2506
|
])
|
|
2507
2507
|
]);
|
|
2508
2508
|
}
|
|
2509
|
-
var qr = /*#__PURE__*/
|
|
2509
|
+
var qr = /*#__PURE__*/ Q(Wr, [["render", Kr], ["__scopeId", "data-v-12b4d7e3"]]);
|
|
2510
2510
|
//#endregion
|
|
2511
2511
|
//#region components/hooks/useDebounceFn.ts
|
|
2512
2512
|
function Jr(e, t = 1e3) {
|
|
@@ -2525,6 +2525,7 @@ var Yr = (e, t) => e.map((e, n) => {
|
|
|
2525
2525
|
...e,
|
|
2526
2526
|
code: r,
|
|
2527
2527
|
sort: n,
|
|
2528
|
+
sort_index: n,
|
|
2528
2529
|
children: i
|
|
2529
2530
|
};
|
|
2530
2531
|
}), Xr = (e, t) => {
|
|
@@ -2534,7 +2535,8 @@ var Yr = (e, t) => e.map((e, n) => {
|
|
|
2534
2535
|
return t ? [t] : [];
|
|
2535
2536
|
}), ...e.filter((e) => !r.has(e.code))].map((e, t) => ({
|
|
2536
2537
|
...e,
|
|
2537
|
-
sort: t
|
|
2538
|
+
sort: t,
|
|
2539
|
+
sort_index: t
|
|
2538
2540
|
}));
|
|
2539
2541
|
}, Zr = (e, t, n) => t ? e.map((e) => e.code === t ? {
|
|
2540
2542
|
...e,
|
|
@@ -2553,7 +2555,7 @@ var Yr = (e, t) => e.map((e, n) => {
|
|
|
2553
2555
|
}), s = async () => {
|
|
2554
2556
|
await h();
|
|
2555
2557
|
let n = r.value?.$el?.querySelector(".n-data-table-tbody");
|
|
2556
|
-
n && a.value?.el !== n && (a.value?.destroy(), a.value =
|
|
2558
|
+
n && a.value?.el !== n && (a.value?.destroy(), a.value = rt.create(n, {
|
|
2557
2559
|
animation: 150,
|
|
2558
2560
|
handle: ".uz-bom-drag-handle",
|
|
2559
2561
|
onMove: ({ dragged: e, related: t }) => {
|
|
@@ -2588,449 +2590,642 @@ var Yr = (e, t) => e.map((e, n) => {
|
|
|
2588
2590
|
tableRef: r,
|
|
2589
2591
|
tableVersion: i
|
|
2590
2592
|
};
|
|
2591
|
-
}, $r = (e
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
}
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
}
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2593
|
+
}, $r = (e) => e == null ? null : Number.isFinite(e) ? e : null, ei = (e) => {
|
|
2594
|
+
let t = Number(e.quantity), n = $r(e.lossRate);
|
|
2595
|
+
return !Number.isFinite(t) || n === null || n < 0 ? null : Math.ceil(t * (1 + n / 100));
|
|
2596
|
+
}, ti = (e) => e.key ?? e.code, ni = (e, t, n) => {
|
|
2597
|
+
let r = e.findIndex((e) => ti(e) === t);
|
|
2598
|
+
return r >= 0 ? [
|
|
2599
|
+
...e.slice(0, r + 1),
|
|
2600
|
+
{
|
|
2601
|
+
...n,
|
|
2602
|
+
sort: r + 1,
|
|
2603
|
+
sort_index: r + 1
|
|
2604
|
+
},
|
|
2605
|
+
...e.slice(r + 1)
|
|
2606
|
+
] : e.map((e) => Array.isArray(e.children) ? {
|
|
2607
|
+
...e,
|
|
2608
|
+
children: ni(e.children, t, n)
|
|
2609
|
+
} : e);
|
|
2610
|
+
}, ri = /(?<=\[)(.+?)(?=\])/g, ii = {
|
|
2611
|
+
index: 1,
|
|
2612
|
+
selection: 0,
|
|
2613
|
+
pagination: 1,
|
|
2614
|
+
title: 1,
|
|
2615
|
+
cache: 1,
|
|
2616
|
+
draggable: 0,
|
|
2617
|
+
addButton: 1,
|
|
2618
|
+
filterButton: 1,
|
|
2619
|
+
commonTime: 1,
|
|
2620
|
+
asynchronous: "",
|
|
2621
|
+
filePort: 0,
|
|
2622
|
+
actionWidth: 300,
|
|
2623
|
+
drawerWidth: "70%",
|
|
2624
|
+
drawerHeight: "96vh",
|
|
2625
|
+
placement: "right",
|
|
2626
|
+
summary: ""
|
|
2627
|
+
};
|
|
2628
|
+
function ai(e) {
|
|
2629
|
+
return Function("return " + e)();
|
|
2630
|
+
}
|
|
2631
|
+
var oi = () => new Promise((e) => {
|
|
2632
|
+
let t = window.localStorage.getItem("city");
|
|
2633
|
+
if (t) e(JSON.parse(t));
|
|
2634
|
+
else {
|
|
2635
|
+
let t = document.body, n = document.createElement("script");
|
|
2636
|
+
n.append("\n function cityFn(data) {\n window.localStorage.setItem('city', JSON.stringify(data))\n }\n "), t?.appendChild(n);
|
|
2637
|
+
let r = document.createElement("script");
|
|
2638
|
+
r.src = "https://unizhen-1369980751.cos.ap-shanghai.myqcloud.com/static/city.js?callback=cityFn", t?.appendChild(r);
|
|
2639
|
+
let i = setInterval(() => {
|
|
2640
|
+
let t = window.localStorage.getItem("city");
|
|
2641
|
+
t && (clearInterval(i), e(JSON.parse(t)));
|
|
2642
|
+
}, 500);
|
|
2643
|
+
}
|
|
2644
|
+
}), si = async (e, t, n) => {
|
|
2645
|
+
if (t && typeof t == "string") {
|
|
2646
|
+
let r = t.match(ri);
|
|
2647
|
+
if (r && t.indexOf("return") === -1) {
|
|
2648
|
+
let t = r[0].split(":");
|
|
2649
|
+
if (t[0] === "date") return (t) => jt(t[e], r[0].replace("date:", "") || "YYYY-MM-DD");
|
|
2650
|
+
if (t[0] === "city") return (t) => t[`${e}Str`];
|
|
2651
|
+
if (t[0] === "modules" && n && Object.keys(n).length > 0) {
|
|
2652
|
+
let e = r[0].replace("modules:", ""), t = Object.keys(n).find((t) => t.includes(e));
|
|
2653
|
+
if (t) {
|
|
2654
|
+
let e = n[t], r = m(u(e));
|
|
2655
|
+
return (e) => f(r, { rowData: e }, {});
|
|
2656
|
+
}
|
|
2657
|
+
return f("div", "Module not found");
|
|
2658
|
+
}
|
|
2659
|
+
} else try {
|
|
2660
|
+
let e = Function("rowData", "rowIndex", "h", t);
|
|
2661
|
+
return (t, n) => e(t, n, f);
|
|
2662
|
+
} catch (e) {
|
|
2663
|
+
W(e);
|
|
2664
|
+
}
|
|
2665
|
+
}
|
|
2666
|
+
return t && typeof t == "function" ? (e, n) => t(e, n, f) : "";
|
|
2667
|
+
}, ci = (e, t, n) => {
|
|
2668
|
+
let r = t.map((t) => {
|
|
2669
|
+
let r = [], i = t.id;
|
|
2670
|
+
return e.input === "select" && (e.params.labelKeys || e.search.labelKeys) ? ((e.params.labelKeys || e.search.labelKeys || "").split(",").forEach((e) => {
|
|
2671
|
+
r.push(t[e]);
|
|
2672
|
+
}), r = Qe(r).join("-")) : r = t[n[1]], e.input === "select" && e.params.valueKey && (i = t[e.params.valueKey]), {
|
|
2673
|
+
label: t?.is_disabled === "1" ? `${r}-已禁用` : r,
|
|
2674
|
+
value: i,
|
|
2675
|
+
disabled: !e.params._search && t?.is_disabled === "1",
|
|
2676
|
+
params: t
|
|
2612
2677
|
};
|
|
2613
|
-
})
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2678
|
+
});
|
|
2679
|
+
return r.sort((e, t) => Number(e.disabled) - Number(t.disabled)), r;
|
|
2680
|
+
}, li = /* @__PURE__ */ new Map();
|
|
2681
|
+
function ui() {
|
|
2682
|
+
li.clear();
|
|
2683
|
+
}
|
|
2684
|
+
async function di(e, t = !1) {
|
|
2685
|
+
let n = e.split("."), r = !1;
|
|
2686
|
+
return n.length > 1 && (li.has(n[0]) && !t ? r = H(li.get(n[0])) : (r = await Yn({ tableId: n[0] }), li.set(n[0], r))), {
|
|
2687
|
+
sourceData: r,
|
|
2688
|
+
n
|
|
2689
|
+
};
|
|
2690
|
+
}
|
|
2691
|
+
async function fi(e) {
|
|
2692
|
+
return new Promise((t, n) => {
|
|
2693
|
+
let r = K(`dynamicTable_${e}`, !1);
|
|
2694
|
+
r && li.has(`dynamicTable_${e}`) ? t(r) : Jn(e, r ? r.createTime : null).then((n) => {
|
|
2695
|
+
if (n) {
|
|
2696
|
+
let r = {
|
|
2697
|
+
createTime: n.createTime,
|
|
2698
|
+
tableTitle: n.tableTitle,
|
|
2699
|
+
viewJson: n.viewJson
|
|
2700
|
+
};
|
|
2701
|
+
G(`dynamicTable_${e}`, r, 0), li.set(`dynamicTable_${e}`, !0), Dt("tables_"), t(n);
|
|
2702
|
+
} else li.set(`dynamicTable_${e}`, !0), t(r);
|
|
2703
|
+
}).catch(() => {
|
|
2704
|
+
n();
|
|
2705
|
+
});
|
|
2706
|
+
});
|
|
2707
|
+
}
|
|
2708
|
+
var pi = (e) => e.map((e) => {
|
|
2709
|
+
let t = {};
|
|
2710
|
+
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)), {
|
|
2711
|
+
i: e.input,
|
|
2712
|
+
l: e.label ? encodeURIComponent(e.label) : "",
|
|
2713
|
+
k: e.key.replace(/\s*/g, ""),
|
|
2714
|
+
y: e.dbType,
|
|
2715
|
+
s: e.source,
|
|
2716
|
+
n: e.sourceFn,
|
|
2717
|
+
u: e.unique,
|
|
2718
|
+
v: e.fieldValueRule,
|
|
2719
|
+
t: {
|
|
2720
|
+
a: e.table.align,
|
|
2721
|
+
n: e.table.titleAlign,
|
|
2722
|
+
f: e.table.fixed,
|
|
2723
|
+
w: e.table.width,
|
|
2724
|
+
b: +!!e.table.resizable,
|
|
2725
|
+
h: +!!e.table.hide,
|
|
2726
|
+
c: +!!e.table.sorter,
|
|
2727
|
+
s: +!!e.table.show,
|
|
2728
|
+
m: +!!e.table.mobile,
|
|
2729
|
+
k: +!!e.table.lineBreak,
|
|
2730
|
+
e: +!!e.table.ellipsis,
|
|
2731
|
+
l: e.table.clamp,
|
|
2732
|
+
o: e.table.lineCol,
|
|
2733
|
+
r: e.table.render
|
|
2626
2734
|
},
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2735
|
+
p: t,
|
|
2736
|
+
c: {
|
|
2737
|
+
f: +!!e.search.fuzzy,
|
|
2738
|
+
s: +!!e.search.show,
|
|
2739
|
+
v: e.search.defaultValue,
|
|
2740
|
+
r: e.search.source,
|
|
2741
|
+
y: e.search.type,
|
|
2742
|
+
e: (e.search.title || "").replace(/\s*/g, ""),
|
|
2743
|
+
l: (e.search.labelKeys || "").replace(/\s*/g, ""),
|
|
2744
|
+
a: (e.search.valueKey || "").replace(/\s*/g, ""),
|
|
2745
|
+
d: (e.search.child || "").replace(/\s*/g, ""),
|
|
2746
|
+
m: +!!e.search.multiple,
|
|
2747
|
+
t: +!!e.search.tab,
|
|
2748
|
+
p: e.search.span
|
|
2749
|
+
},
|
|
2750
|
+
f: {
|
|
2751
|
+
v: e.form.defaultValue,
|
|
2752
|
+
n: e.form.span,
|
|
2753
|
+
s: +!!e.form.show,
|
|
2754
|
+
d: +!!e.form.disabled,
|
|
2755
|
+
r: +!!e.form.readonly,
|
|
2756
|
+
u: e.form.updateValue,
|
|
2757
|
+
i: e.form.display,
|
|
2758
|
+
a: e.form.readonlyFn,
|
|
2759
|
+
b: e.form.disabledFn,
|
|
2760
|
+
y: +!!e.form.createButton,
|
|
2761
|
+
h: +!!e.form.showDays,
|
|
2762
|
+
f: +!!e.form.backfill,
|
|
2763
|
+
l: {
|
|
2764
|
+
r: +!!e.form.rule.required,
|
|
2765
|
+
y: e.form.rule.type,
|
|
2766
|
+
m: e.form.rule.message ? encodeURIComponent(e.form.rule.message) : void 0,
|
|
2767
|
+
t: e.form.rule.trigger,
|
|
2768
|
+
v: e.form.rule.validator
|
|
2645
2769
|
},
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2770
|
+
c: {
|
|
2771
|
+
d: +!!e.form.create.disabled,
|
|
2772
|
+
r: +!!e.form.create.readonly,
|
|
2773
|
+
s: +!!e.form.create.show
|
|
2650
2774
|
},
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2775
|
+
e: {
|
|
2776
|
+
d: +!!e.form.edit.disabled,
|
|
2777
|
+
r: +!!e.form.edit.readonly,
|
|
2778
|
+
s: +!!e.form.edit.show
|
|
2655
2779
|
},
|
|
2656
|
-
|
|
2657
|
-
show: !0,
|
|
2658
|
-
disabled: !1,
|
|
2659
|
-
readonly: !0
|
|
2660
|
-
}
|
|
2780
|
+
p: { s: +!!e.form.expand.show }
|
|
2661
2781
|
}
|
|
2662
|
-
}
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2782
|
+
};
|
|
2783
|
+
}), mi = (e) => !e[0] || e[0] && e[0].input ? e : e.map((e) => {
|
|
2784
|
+
let t = {};
|
|
2785
|
+
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)), {
|
|
2786
|
+
input: e.i,
|
|
2787
|
+
label: e.l ? decodeURIComponent(e.l) : "",
|
|
2788
|
+
key: e.k,
|
|
2789
|
+
dbType: e.y,
|
|
2790
|
+
source: e.s,
|
|
2791
|
+
sourceFn: e.n,
|
|
2792
|
+
unique: e.u,
|
|
2793
|
+
fieldValueRule: e.v,
|
|
2794
|
+
table: {
|
|
2795
|
+
align: e.t.a,
|
|
2796
|
+
titleAlign: e.t.n,
|
|
2797
|
+
fixed: e.t.f,
|
|
2798
|
+
width: e.t.w,
|
|
2799
|
+
resizable: !!e.t.b,
|
|
2800
|
+
hide: !!e.t.h,
|
|
2801
|
+
sorter: !!e.t.c,
|
|
2802
|
+
show: !!e.t.s,
|
|
2803
|
+
mobile: !!e.t.m,
|
|
2804
|
+
lineBreak: !!e.t.k,
|
|
2805
|
+
ellipsis: !!e.t.e,
|
|
2806
|
+
clamp: e.t.l,
|
|
2807
|
+
lineCol: e.t.o,
|
|
2808
|
+
render: e.t.r
|
|
2809
|
+
},
|
|
2810
|
+
params: t,
|
|
2811
|
+
search: {
|
|
2812
|
+
fuzzy: !!e.c.f,
|
|
2813
|
+
show: !!e.c.s,
|
|
2814
|
+
defaultValue: e.c.v,
|
|
2815
|
+
source: e.c.r,
|
|
2816
|
+
type: e.c.y,
|
|
2817
|
+
title: e.c.e,
|
|
2818
|
+
labelKeys: e.c.l,
|
|
2819
|
+
valueKey: e.c.a,
|
|
2820
|
+
child: e.c.d,
|
|
2821
|
+
multiple: !!e.c.m,
|
|
2822
|
+
tab: !!e.c.t,
|
|
2823
|
+
span: e.c.p
|
|
2675
2824
|
},
|
|
2676
2825
|
form: {
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2826
|
+
defaultValue: e.f.v,
|
|
2827
|
+
span: e.f.n,
|
|
2828
|
+
show: !!e.f.s,
|
|
2829
|
+
disabled: !!e.f.d,
|
|
2830
|
+
readonly: !!e.f.r,
|
|
2831
|
+
updateValue: e.f.u,
|
|
2832
|
+
display: e.f.i,
|
|
2833
|
+
readonlyFn: e.f.a,
|
|
2834
|
+
disabledFn: e.f.b,
|
|
2835
|
+
createButton: !!e.f.y,
|
|
2836
|
+
showDays: !!e.f.h,
|
|
2837
|
+
backfill: !!e.f.f,
|
|
2688
2838
|
rule: {
|
|
2689
|
-
required:
|
|
2690
|
-
type:
|
|
2691
|
-
message:
|
|
2692
|
-
trigger:
|
|
2693
|
-
validator:
|
|
2839
|
+
required: !!e.f.l.r,
|
|
2840
|
+
type: e.f.l.y,
|
|
2841
|
+
message: e.f.l.m ? decodeURIComponent(e.f.l.m) : void 0,
|
|
2842
|
+
trigger: e.f.l.t,
|
|
2843
|
+
validator: e.f.l.v
|
|
2694
2844
|
},
|
|
2695
2845
|
create: {
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2846
|
+
disabled: !!e.f.c.d,
|
|
2847
|
+
readonly: !!e.f.c.r,
|
|
2848
|
+
show: !!e.f.c.s
|
|
2699
2849
|
},
|
|
2700
2850
|
edit: {
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
},
|
|
2705
|
-
expand: {
|
|
2706
|
-
show: !0,
|
|
2707
|
-
disabled: !1,
|
|
2708
|
-
readonly: !1
|
|
2709
|
-
}
|
|
2710
|
-
}
|
|
2711
|
-
},
|
|
2712
|
-
{
|
|
2713
|
-
input: "select",
|
|
2714
|
-
label: "单位",
|
|
2715
|
-
key: "unit",
|
|
2716
|
-
source: "",
|
|
2717
|
-
sourceFn: "",
|
|
2718
|
-
params: {
|
|
2719
|
-
immediately: !1,
|
|
2720
|
-
placeholder: "单位",
|
|
2721
|
-
clearable: !0,
|
|
2722
|
-
options: []
|
|
2723
|
-
},
|
|
2724
|
-
form: {
|
|
2725
|
-
span: 24,
|
|
2726
|
-
show: !0,
|
|
2727
|
-
disabled: !1,
|
|
2728
|
-
readonly: !1,
|
|
2729
|
-
updateValue: "",
|
|
2730
|
-
display: "",
|
|
2731
|
-
readonlyFn: "",
|
|
2732
|
-
disabledFn: "",
|
|
2733
|
-
createButton: !1,
|
|
2734
|
-
showDays: !1,
|
|
2735
|
-
backfill: !1,
|
|
2736
|
-
rule: {
|
|
2737
|
-
required: !1,
|
|
2738
|
-
type: "string",
|
|
2739
|
-
message: "必填",
|
|
2740
|
-
trigger: "change",
|
|
2741
|
-
validator: ""
|
|
2742
|
-
},
|
|
2743
|
-
create: {
|
|
2744
|
-
show: !0,
|
|
2745
|
-
disabled: !1,
|
|
2746
|
-
readonly: !1
|
|
2747
|
-
},
|
|
2748
|
-
edit: {
|
|
2749
|
-
show: !0,
|
|
2750
|
-
disabled: !1,
|
|
2751
|
-
readonly: !1
|
|
2851
|
+
disabled: !!e.f.e.d,
|
|
2852
|
+
readonly: !!e.f.e.r,
|
|
2853
|
+
show: !!e.f.e.s
|
|
2752
2854
|
},
|
|
2753
|
-
expand: {
|
|
2754
|
-
show: !0,
|
|
2755
|
-
disabled: !1,
|
|
2756
|
-
readonly: !1
|
|
2757
|
-
}
|
|
2855
|
+
expand: { show: e.f && e.f.p ? !!e.f.p.s : !0 }
|
|
2758
2856
|
}
|
|
2759
|
-
}
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2857
|
+
};
|
|
2858
|
+
}), hi = (e) => ({
|
|
2859
|
+
f: e.fetch,
|
|
2860
|
+
n: e.fetchFn,
|
|
2861
|
+
o: e.when_drawer_open,
|
|
2862
|
+
b: e.when_before_save
|
|
2863
|
+
}), gi = (e) => e ? e.fetch ? e : {
|
|
2864
|
+
fetch: e.f,
|
|
2865
|
+
fetchFn: e.n,
|
|
2866
|
+
when_drawer_open: e.o,
|
|
2867
|
+
when_before_save: e.b
|
|
2868
|
+
} : {
|
|
2869
|
+
fetch: null,
|
|
2870
|
+
fetchFn: "",
|
|
2871
|
+
when_drawer_open: "",
|
|
2872
|
+
when_before_save: ""
|
|
2873
|
+
}, _i = (e) => ({
|
|
2874
|
+
i: e.index,
|
|
2875
|
+
s: e.selection,
|
|
2876
|
+
p: e.pagination,
|
|
2877
|
+
c: e.cache,
|
|
2878
|
+
d: e.draggable,
|
|
2879
|
+
a: e.addButton,
|
|
2880
|
+
f: e.filterButton,
|
|
2881
|
+
o: e.commonTime,
|
|
2882
|
+
n: e.asynchronous,
|
|
2883
|
+
e: e.filePort,
|
|
2884
|
+
t: e.actionWidth,
|
|
2885
|
+
w: e.drawerWidth,
|
|
2886
|
+
h: e.drawerHeight,
|
|
2887
|
+
l: e.placement,
|
|
2888
|
+
r: e.summary
|
|
2889
|
+
}), vi = (e) => {
|
|
2890
|
+
let t = {};
|
|
2891
|
+
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 : {
|
|
2892
|
+
index: e.i,
|
|
2893
|
+
selection: e.s,
|
|
2894
|
+
pagination: e.p,
|
|
2895
|
+
cache: e.c,
|
|
2896
|
+
draggable: e.d,
|
|
2897
|
+
addButton: e.a,
|
|
2898
|
+
filterButton: e.f,
|
|
2899
|
+
commonTime: e.o,
|
|
2900
|
+
asynchronous: e.n,
|
|
2901
|
+
filePort: e.e,
|
|
2902
|
+
actionWidth: e.t,
|
|
2903
|
+
drawerWidth: e.w,
|
|
2904
|
+
drawerHeight: e.h,
|
|
2905
|
+
placement: e.l,
|
|
2906
|
+
summary: e.r
|
|
2907
|
+
}), Object.assign({}, ii, H(t));
|
|
2908
|
+
};
|
|
2909
|
+
function yi(e, t, n, r) {
|
|
2910
|
+
return new Promise(async (i, a) => {
|
|
2911
|
+
let o = [], s = {}, c = {}, l = {}, u = [], d = [], f = H(e), p = [];
|
|
2912
|
+
for (let e of f) e.input === "group" ? p.push(...e.params.children) : p.push(e);
|
|
2913
|
+
for (let e of p) {
|
|
2914
|
+
if (e.source && (e.input === "select" || e.input === "cascader")) {
|
|
2915
|
+
let n = [];
|
|
2916
|
+
if (t && !Array.isArray(t) && t[e.key]) {
|
|
2917
|
+
if (e.params.multiple && t[`${e.key}Str`]) {
|
|
2918
|
+
let r = t[`${e.key}Str`].split(","), i = JSON.parse(t[e.key]);
|
|
2919
|
+
i.forEach((e, t) => {
|
|
2920
|
+
n.push({
|
|
2921
|
+
label: r[t],
|
|
2922
|
+
value: i[t],
|
|
2923
|
+
disabled: !1,
|
|
2924
|
+
params: {}
|
|
2925
|
+
});
|
|
2926
|
+
});
|
|
2927
|
+
} else n.push({
|
|
2928
|
+
label: t[`${e.key}Str`],
|
|
2929
|
+
value: t[e.key],
|
|
2930
|
+
disabled: !1,
|
|
2931
|
+
params: {}
|
|
2932
|
+
});
|
|
2933
|
+
n.push({
|
|
2934
|
+
label: "加载中......",
|
|
2935
|
+
value: "loading",
|
|
2936
|
+
disabled: !0
|
|
2937
|
+
});
|
|
2938
|
+
} else n = [{
|
|
2939
|
+
label: "加载中......",
|
|
2940
|
+
value: "loading",
|
|
2941
|
+
disabled: !0
|
|
2942
|
+
}];
|
|
2943
|
+
if (e.params.immediately || r) {
|
|
2944
|
+
let { sourceData: t, n: r } = await di(e.source);
|
|
2945
|
+
if (t && Array.isArray(t)) {
|
|
2946
|
+
if (e.sourceFn) {
|
|
2947
|
+
let r = e.sourceFn;
|
|
2948
|
+
n = Function("sourceData", "POST", r)(t, Z);
|
|
2949
|
+
} else n = ci(e, t, r);
|
|
2950
|
+
}
|
|
2951
|
+
} else e.params._async = !0, e.params._fetch = !1, e.params._asyncFn = async () => {
|
|
2952
|
+
let { sourceData: t, n } = await di(e.source);
|
|
2953
|
+
if (t && Array.isArray(t)) {
|
|
2954
|
+
if (e.sourceFn) {
|
|
2955
|
+
let n = e.sourceFn;
|
|
2956
|
+
return Function("sourceData", "POST", n)(t, Z);
|
|
2957
|
+
}
|
|
2958
|
+
return ci(e, t, n);
|
|
2959
|
+
}
|
|
2960
|
+
};
|
|
2961
|
+
if (e.params.options = n, e.form.backfill && t) {
|
|
2962
|
+
if (Array.isArray(t)) t.forEach((t, r) => {
|
|
2963
|
+
let i = n.find((n) => n.value === t[e.key]);
|
|
2964
|
+
i && (u[r] || (u[r] = {}), u[r][e.key] = i.params);
|
|
2965
|
+
});
|
|
2966
|
+
else {
|
|
2967
|
+
let r = n.find((n) => n.value === t[e.key]);
|
|
2968
|
+
r && (c[e.key] = r.params);
|
|
2969
|
+
}
|
|
2970
|
+
}
|
|
2806
2971
|
}
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
source: "",
|
|
2814
|
-
sourceFn: "",
|
|
2815
|
-
params: {
|
|
2816
|
-
placeholder: "用量",
|
|
2817
|
-
clearable: !0,
|
|
2818
|
-
showButton: !1
|
|
2819
|
-
},
|
|
2820
|
-
form: {
|
|
2821
|
-
span: 24,
|
|
2822
|
-
show: !0,
|
|
2823
|
-
disabled: !1,
|
|
2824
|
-
readonly: !1,
|
|
2825
|
-
updateValue: "",
|
|
2826
|
-
display: "",
|
|
2827
|
-
readonlyFn: "",
|
|
2828
|
-
disabledFn: "",
|
|
2829
|
-
createButton: !1,
|
|
2830
|
-
showDays: !1,
|
|
2831
|
-
backfill: !1,
|
|
2832
|
-
rule: {
|
|
2833
|
-
required: !1,
|
|
2834
|
-
type: "number",
|
|
2835
|
-
message: "必填",
|
|
2836
|
-
trigger: "change",
|
|
2837
|
-
validator: ""
|
|
2838
|
-
},
|
|
2839
|
-
create: {
|
|
2840
|
-
show: !0,
|
|
2841
|
-
disabled: !1,
|
|
2842
|
-
readonly: !1
|
|
2843
|
-
},
|
|
2844
|
-
edit: {
|
|
2845
|
-
show: !0,
|
|
2846
|
-
disabled: !1,
|
|
2847
|
-
readonly: !1
|
|
2848
|
-
},
|
|
2849
|
-
expand: {
|
|
2850
|
-
show: !0,
|
|
2851
|
-
disabled: !1,
|
|
2852
|
-
readonly: !1
|
|
2972
|
+
if (e.input === "filling") try {
|
|
2973
|
+
Array.isArray(t) ? t.forEach((t, n) => {
|
|
2974
|
+
d[n] || (d[n] = {}), u[n] && u[n][e.params.parentKey] && u[n][e.params.parentKey][e.key] ? (d[n][e.key] = u[n][e.params.parentKey][e.key], u[n][e.params.parentKey][`${e.key}Str`] && (d[n][`${e.key}Str`] = u[n][e.params.parentKey][`${e.key}Str`])) : (d[n][e.key] = t[e.key] || null, d[n][`${e.key}Str`] = t[`${e.key}Str`] || null);
|
|
2975
|
+
}) : c[e.params.parentKey] && c[e.params.parentKey][e.key] ? (l[e.key] = c[e.params.parentKey][e.key], c[e.params.parentKey][`${e.key}Str`] && (l[`${e.key}Str`] = c[e.params.parentKey][`${e.key}Str`])) : (l[e.key] = null, l[`${e.key}Str`] = null);
|
|
2976
|
+
} catch (e) {
|
|
2977
|
+
W(e);
|
|
2853
2978
|
}
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
key: "lossRate",
|
|
2860
|
-
source: "",
|
|
2861
|
-
sourceFn: "",
|
|
2862
|
-
params: {
|
|
2863
|
-
placeholder: "损耗率",
|
|
2864
|
-
clearable: !0,
|
|
2865
|
-
showButton: !1,
|
|
2866
|
-
suffix: "%"
|
|
2867
|
-
},
|
|
2868
|
-
form: {
|
|
2869
|
-
span: 24,
|
|
2870
|
-
show: !0,
|
|
2871
|
-
disabled: !1,
|
|
2872
|
-
readonly: !1,
|
|
2873
|
-
updateValue: "",
|
|
2874
|
-
display: "",
|
|
2875
|
-
readonlyFn: "",
|
|
2876
|
-
disabledFn: "",
|
|
2877
|
-
createButton: !1,
|
|
2878
|
-
showDays: !1,
|
|
2879
|
-
backfill: !1,
|
|
2880
|
-
rule: {
|
|
2881
|
-
required: !1,
|
|
2882
|
-
type: "number",
|
|
2883
|
-
message: "必填",
|
|
2884
|
-
trigger: "change",
|
|
2885
|
-
validator: ""
|
|
2886
|
-
},
|
|
2887
|
-
create: {
|
|
2888
|
-
show: !0,
|
|
2889
|
-
disabled: !1,
|
|
2890
|
-
readonly: !1
|
|
2891
|
-
},
|
|
2892
|
-
edit: {
|
|
2893
|
-
show: !0,
|
|
2894
|
-
disabled: !1,
|
|
2895
|
-
readonly: !1
|
|
2896
|
-
},
|
|
2897
|
-
expand: {
|
|
2898
|
-
show: !0,
|
|
2899
|
-
disabled: !1,
|
|
2900
|
-
readonly: !1
|
|
2979
|
+
if (e.input !== "divider" && e.form.rule && e.form.rule.validator && typeof e.form.rule.validator == "string") try {
|
|
2980
|
+
let t = e.form.rule.validator, r = Function("rule", "value", "index", "formValues", t);
|
|
2981
|
+
e.form.rule.validator = (e, t) => r(e, t, null, n);
|
|
2982
|
+
} catch (e) {
|
|
2983
|
+
W(e);
|
|
2901
2984
|
}
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
key: "required_quantity",
|
|
2908
|
-
source: "",
|
|
2909
|
-
sourceFn: "",
|
|
2910
|
-
params: {
|
|
2911
|
-
placeholder: "含损耗用量",
|
|
2912
|
-
clearable: !1,
|
|
2913
|
-
showButton: !1
|
|
2914
|
-
},
|
|
2915
|
-
form: {
|
|
2916
|
-
span: 24,
|
|
2917
|
-
show: !0,
|
|
2918
|
-
disabled: !1,
|
|
2919
|
-
readonly: !0,
|
|
2920
|
-
updateValue: "",
|
|
2921
|
-
display: "",
|
|
2922
|
-
readonlyFn: "",
|
|
2923
|
-
disabledFn: "",
|
|
2924
|
-
createButton: !1,
|
|
2925
|
-
showDays: !1,
|
|
2926
|
-
backfill: !1,
|
|
2927
|
-
rule: {
|
|
2928
|
-
required: !1,
|
|
2929
|
-
type: "number",
|
|
2930
|
-
message: "必填",
|
|
2931
|
-
trigger: "change",
|
|
2932
|
-
validator: ""
|
|
2933
|
-
},
|
|
2934
|
-
create: {
|
|
2935
|
-
show: !0,
|
|
2936
|
-
disabled: !1,
|
|
2937
|
-
readonly: !0
|
|
2938
|
-
},
|
|
2939
|
-
edit: {
|
|
2940
|
-
show: !0,
|
|
2941
|
-
disabled: !1,
|
|
2942
|
-
readonly: !0
|
|
2943
|
-
},
|
|
2944
|
-
expand: {
|
|
2945
|
-
show: !0,
|
|
2946
|
-
disabled: !1,
|
|
2947
|
-
readonly: !0
|
|
2985
|
+
if (e.input === "date" && e.params.isDateDisabled && typeof e.params.isDateDisabled == "string") try {
|
|
2986
|
+
let t = e.params.isDateDisabled, n = Function("ts", "detail", t);
|
|
2987
|
+
e.params.isDateDisabled = (e, t) => n(e, t);
|
|
2988
|
+
} catch (e) {
|
|
2989
|
+
W(e);
|
|
2948
2990
|
}
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
disabled: !1,
|
|
2985
|
-
readonly: !1
|
|
2986
|
-
},
|
|
2987
|
-
edit: {
|
|
2988
|
-
show: !0,
|
|
2989
|
-
disabled: !1,
|
|
2990
|
-
readonly: !1
|
|
2991
|
-
},
|
|
2992
|
-
expand: {
|
|
2993
|
-
show: !0,
|
|
2994
|
-
disabled: !1,
|
|
2995
|
-
readonly: !1
|
|
2991
|
+
if (e.input === "cascader" && e.table.render === "[city]") {
|
|
2992
|
+
let t = await oi();
|
|
2993
|
+
e.params.options = t;
|
|
2994
|
+
}
|
|
2995
|
+
if (e.input === "subTable" && e.params.link) {
|
|
2996
|
+
let t = await fi(e.params.link).catch(() => {
|
|
2997
|
+
a();
|
|
2998
|
+
});
|
|
2999
|
+
if (t) try {
|
|
3000
|
+
let n = U.parse(t.viewJson);
|
|
3001
|
+
n.suffix && (e._suffix = _r(n.suffix));
|
|
3002
|
+
let r = mi(n.table);
|
|
3003
|
+
r.forEach((e) => {
|
|
3004
|
+
e.table.sorter = !1;
|
|
3005
|
+
});
|
|
3006
|
+
let i = r.filter((e) => e.input === "subTable");
|
|
3007
|
+
if (i) for await (let e of i) {
|
|
3008
|
+
let t = await fi(e.params.link).catch(() => {
|
|
3009
|
+
a();
|
|
3010
|
+
});
|
|
3011
|
+
if (t) try {
|
|
3012
|
+
let n = U.parse(t.viewJson), r = mi(n.table);
|
|
3013
|
+
r.forEach((e) => {
|
|
3014
|
+
e.table.sorter = !1;
|
|
3015
|
+
}), e.params.columns = r, e.params.actions = n.action;
|
|
3016
|
+
} catch (e) {
|
|
3017
|
+
a(e);
|
|
3018
|
+
return;
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
e.params.columns = r, e.params.actions = n.action;
|
|
3022
|
+
} catch (e) {
|
|
3023
|
+
a(e);
|
|
3024
|
+
return;
|
|
3025
|
+
}
|
|
2996
3026
|
}
|
|
3027
|
+
o.push({
|
|
3028
|
+
input: e.input,
|
|
3029
|
+
label: e.label,
|
|
3030
|
+
key: e.key,
|
|
3031
|
+
source: e.source,
|
|
3032
|
+
sourceFn: e.sourceFn,
|
|
3033
|
+
params: e.params,
|
|
3034
|
+
form: e.form,
|
|
3035
|
+
_suffix: e._suffix
|
|
3036
|
+
}), e.input === "date" || e.input === "number" || e.input === "time" ? s[e.key] = Number(e.form.defaultValue) || 0 : s[e.key] = e.form.defaultValue;
|
|
2997
3037
|
}
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
X({ tableId: "unit" })
|
|
3005
|
-
]).then(([t, n, r, i]) => {
|
|
3006
|
-
ri[1].params.options = ni(t, n), ri[2].params.options = ti(i), ri[3].params.options = ei(r), e(ri);
|
|
3007
|
-
}).catch((e) => {
|
|
3008
|
-
U(e), t([]);
|
|
3038
|
+
i({
|
|
3039
|
+
form: o,
|
|
3040
|
+
formDefaultValue: s,
|
|
3041
|
+
fillingDefaultValue: l,
|
|
3042
|
+
fillingDefaultArray: d
|
|
3043
|
+
});
|
|
3009
3044
|
});
|
|
3010
|
-
}
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3045
|
+
}
|
|
3046
|
+
async function bi(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
3047
|
+
let s = 0, c = [], l = [], u = {
|
|
3048
|
+
key: "",
|
|
3049
|
+
link: "",
|
|
3050
|
+
merge: ""
|
|
3051
|
+
}, d = [], p = H(e), m = [], h = [];
|
|
3052
|
+
for (let e of p) e.input === "group" ? (m.push(...e.params.children), h.push({
|
|
3053
|
+
title: e.label,
|
|
3054
|
+
key: e.key,
|
|
3055
|
+
...e.table,
|
|
3056
|
+
children: e.params.children.map((e) => e.key)
|
|
3057
|
+
})) : (m.push(e), h.push(e.key));
|
|
3058
|
+
for await (let [e, s] of m.entries()) {
|
|
3059
|
+
if (s.source && !s.table.render && (s.input === "select" || s.input === "cascader")) {
|
|
3060
|
+
if (s.table.render = (e) => e[`${s.key}Str`], t || s.params.immediately || s.search.defaultValue) {
|
|
3061
|
+
let { sourceData: t, n } = await di(s.source, a && e === 0);
|
|
3062
|
+
if (t && Array.isArray(t)) {
|
|
3063
|
+
if (s.sourceFn) {
|
|
3064
|
+
let e = s.sourceFn, n = Function("sourceData", "POST", e);
|
|
3065
|
+
s.params.options = n(t, Z);
|
|
3066
|
+
} else s.params.options = ci(s, t, n);
|
|
3067
|
+
}
|
|
3068
|
+
} else s.params.options = [{
|
|
3069
|
+
label: "加载中......",
|
|
3070
|
+
value: "loading",
|
|
3071
|
+
disabled: !0
|
|
3072
|
+
}], s.params._async = !0, s.params._fetch = !1, s.params._asyncFn = async () => {
|
|
3073
|
+
let { sourceData: e, n: t } = await di(s.source);
|
|
3074
|
+
if (e && Array.isArray(e)) {
|
|
3075
|
+
if (s.sourceFn) {
|
|
3076
|
+
let t = s.sourceFn;
|
|
3077
|
+
return Function("sourceData", "POST", t)(e, Z);
|
|
3078
|
+
}
|
|
3079
|
+
return ci(s, e, t);
|
|
3080
|
+
}
|
|
3081
|
+
};
|
|
3082
|
+
}
|
|
3083
|
+
!s.table.render && !s.source && s.input === "select" && typeof s.params.options != "function" && s.params.options.length > 0 && (s.table.render = (e) => {
|
|
3084
|
+
let t = s.params.options.find((t) => t.value === e[s.key]);
|
|
3085
|
+
if (t) return t.label;
|
|
3086
|
+
}), s.input === "upload" && !s.table.render && (s.table.render = function(e) {
|
|
3087
|
+
return f(Ur, { value: e[s.key] }, { default: () => null });
|
|
3088
|
+
});
|
|
3089
|
+
let p = {
|
|
3090
|
+
input: s.input,
|
|
3091
|
+
title: s.label,
|
|
3092
|
+
key: s.key,
|
|
3093
|
+
params: s.params,
|
|
3094
|
+
form: s.form,
|
|
3095
|
+
ellipsisComponent: "performant-ellipsis",
|
|
3096
|
+
...s.table,
|
|
3097
|
+
width: Number(s.table.width || 140),
|
|
3098
|
+
ellipsis: s.table.ellipsis ? {
|
|
3099
|
+
tooltip: !0,
|
|
3100
|
+
"line-clamp": s.table.clamp ?? 0
|
|
3101
|
+
} : !1,
|
|
3102
|
+
render: s.table.render ? await si(s.key, s.table.render, i) : void 0,
|
|
3103
|
+
show: J.isMobile ? s.table.mobile ?? !1 : s.table.show ?? !0,
|
|
3104
|
+
pin: !!s.table.fixed,
|
|
3105
|
+
fixTemp: s.table.fixed
|
|
3106
|
+
};
|
|
3107
|
+
if (p.resizable && (p.minWidth = 80), t) {
|
|
3108
|
+
if (!p.form.edit.show) p = null;
|
|
3109
|
+
else {
|
|
3110
|
+
if (p.ellipsis = !1, p.resizable = !0, J.isMobile && (p.show = s.table.mobile), s.table.show && (n === 0 && (p.show = s.form.create.show), n === 1 && (p.show = s.form.edit.show), n === 2 && (p.show = s.form.show)), o && (s.form.rule.validator = () => !0), o === !1 && s.form.rule?.required && typeof s.form.rule.validator == "string") {
|
|
3111
|
+
delete s.form.rule.message;
|
|
3112
|
+
let e = s.form.rule.validator, t = Function("rule", "value", "index", "formValues", e);
|
|
3113
|
+
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());
|
|
3114
|
+
}
|
|
3115
|
+
p.render = function(e, t) {
|
|
3116
|
+
return f(he, {
|
|
3117
|
+
showLabel: !1,
|
|
3118
|
+
showFeedback: !1,
|
|
3119
|
+
path: `child[${t}].${s.key}`,
|
|
3120
|
+
rule: s.form.rule?.required ? {
|
|
3121
|
+
...s.form.rule,
|
|
3122
|
+
index: t
|
|
3123
|
+
} : void 0
|
|
3124
|
+
}, { default: () => f(wr, {
|
|
3125
|
+
item: s,
|
|
3126
|
+
formValue: e,
|
|
3127
|
+
status: n,
|
|
3128
|
+
itemIndex: t
|
|
3129
|
+
}) });
|
|
3130
|
+
};
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3133
|
+
if (p && s.input !== "divider" && s.input !== "subTable" && (o && (p.show = s.form.expand.show), d.push(p)), s.input !== "divider" && s.input !== "switch" && s.input !== "subTable" && s.input !== "upload" && s.search.show) {
|
|
3134
|
+
if (s.search.title && (s.label = s.search.title), s.search.source) {
|
|
3135
|
+
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;
|
|
3136
|
+
else if (s.params.immediately || s.search.defaultValue) {
|
|
3137
|
+
let { sourceData: e, n: t } = await di(s.search.source);
|
|
3138
|
+
if (e && Array.isArray(e)) {
|
|
3139
|
+
if (s.sourceFn) {
|
|
3140
|
+
let t = s.sourceFn, n = Function("sourceData", "POST", t);
|
|
3141
|
+
s.params.options = n(e, Z);
|
|
3142
|
+
} else s.params.options = ci(s, e, t);
|
|
3143
|
+
}
|
|
3144
|
+
} else s.params._async = !0, s.params._fetch = !1, s.params._asyncFn = async () => {
|
|
3145
|
+
let { sourceData: e, n: t } = await di(s.search.source);
|
|
3146
|
+
if (e && Array.isArray(e)) {
|
|
3147
|
+
if (s.sourceFn) {
|
|
3148
|
+
let t = s.sourceFn;
|
|
3149
|
+
return Function("sourceData", "POST", t)(e, Z);
|
|
3150
|
+
}
|
|
3151
|
+
return ci(s, e, t);
|
|
3152
|
+
}
|
|
3153
|
+
};
|
|
3154
|
+
}
|
|
3155
|
+
if (s.search.multiple && (s.params.multiple = !0, s.search.defaultValue && (s.search.defaultValue = ai(s.search.defaultValue))), s.search.show) {
|
|
3156
|
+
let e = H(s);
|
|
3157
|
+
e.params._async && (e.params._search = !0, e.params._asyncFn = async () => {
|
|
3158
|
+
let { sourceData: t, n } = await di(e.source || e.search.source);
|
|
3159
|
+
if (t && Array.isArray(t)) {
|
|
3160
|
+
if (e.sourceFn) {
|
|
3161
|
+
let n = e.sourceFn;
|
|
3162
|
+
return Function("sourceData", "POST", n)(t, Z);
|
|
3163
|
+
}
|
|
3164
|
+
return ci(e, t, n);
|
|
3165
|
+
}
|
|
3166
|
+
}), c.push({
|
|
3167
|
+
input: e.input,
|
|
3168
|
+
label: e.label,
|
|
3169
|
+
key: e.key,
|
|
3170
|
+
defaultValue: e.search.defaultValue,
|
|
3171
|
+
params: {
|
|
3172
|
+
...e.params,
|
|
3173
|
+
placeholder: e.label,
|
|
3174
|
+
filterable: !0,
|
|
3175
|
+
type: e.params.type
|
|
3176
|
+
},
|
|
3177
|
+
form: { show: e.search.show },
|
|
3178
|
+
search: e.search
|
|
3179
|
+
});
|
|
3180
|
+
}
|
|
3181
|
+
}
|
|
3182
|
+
s.input === "subTable" && s.params.link && !s.params.quest && (l.push(s.params.link), s.params.expandable && (u = {
|
|
3183
|
+
key: s.key,
|
|
3184
|
+
link: s.params.link,
|
|
3185
|
+
merge: s.params.merge
|
|
3186
|
+
}));
|
|
3187
|
+
}
|
|
3188
|
+
let g = [];
|
|
3189
|
+
if (h.length > 0) {
|
|
3190
|
+
for (let e of h) {
|
|
3191
|
+
if (typeof e == "string") {
|
|
3192
|
+
let t = d.find((t) => t.key === e);
|
|
3193
|
+
t && g.push(t);
|
|
3194
|
+
}
|
|
3195
|
+
if (typeof e == "object") {
|
|
3196
|
+
let t = e.children, n = [];
|
|
3197
|
+
for (let e of t) {
|
|
3198
|
+
let t = d.find((t) => t.key === e);
|
|
3199
|
+
t && n.push(t);
|
|
3200
|
+
}
|
|
3201
|
+
e.children = n, g.push(e);
|
|
3202
|
+
}
|
|
3203
|
+
}
|
|
3204
|
+
d = g;
|
|
3205
|
+
}
|
|
3206
|
+
return d.forEach((e) => {
|
|
3207
|
+
e.show && (s += e.width);
|
|
3208
|
+
}), {
|
|
3209
|
+
tableColumns: d,
|
|
3210
|
+
search: c,
|
|
3211
|
+
subTableIds: l,
|
|
3212
|
+
subTableExpand: u,
|
|
3213
|
+
tableWidth: s
|
|
3214
|
+
};
|
|
3215
|
+
}
|
|
3216
|
+
//#endregion
|
|
3217
|
+
//#region components/bom/index.vue?vue&type=script&lang.ts
|
|
3218
|
+
var xi = [
|
|
3027
3219
|
"var(--primary)",
|
|
3028
3220
|
"var(--green)",
|
|
3029
3221
|
"var(--yellow)",
|
|
3030
3222
|
"var(--purple)"
|
|
3031
|
-
],
|
|
3223
|
+
], Si = d({
|
|
3032
3224
|
name: "UzBom",
|
|
3033
|
-
components: {
|
|
3225
|
+
components: {
|
|
3226
|
+
NDataTable: se,
|
|
3227
|
+
NForm: me
|
|
3228
|
+
},
|
|
3034
3229
|
props: {
|
|
3035
3230
|
value: {
|
|
3036
3231
|
type: Array,
|
|
@@ -3042,95 +3237,106 @@ var Yr = (e, t) => e.map((e, n) => {
|
|
|
3042
3237
|
}
|
|
3043
3238
|
},
|
|
3044
3239
|
emits: ["update:value"],
|
|
3045
|
-
setup(e, { emit: t }) {
|
|
3046
|
-
let
|
|
3240
|
+
setup(e, { emit: t, expose: n }) {
|
|
3241
|
+
let r = w(null), i = w([]), a = w(0), o = (e, t, n) => n ? `${n}-${t + 1}` : String(e.product_no || e.code || t + 1), s = (e, t = 1, n) => (e ?? []).map((e, t) => ({
|
|
3047
3242
|
row: e,
|
|
3048
3243
|
index: t
|
|
3049
|
-
})).sort((e, t) => (Number.isFinite(e.row.sort) ? e.row.sort : e.index) - (Number.isFinite(t.row.sort) ? t.row.sort : t.index)).map(({ row: e }, r) => {
|
|
3050
|
-
let
|
|
3244
|
+
})).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 }, r) => {
|
|
3245
|
+
let i = o(e, r, n), a = e.children, c = ei(e);
|
|
3051
3246
|
return {
|
|
3052
3247
|
...e,
|
|
3053
|
-
|
|
3248
|
+
required_quantity: c,
|
|
3249
|
+
counts: c,
|
|
3250
|
+
key: ti(e),
|
|
3054
3251
|
level: t,
|
|
3055
|
-
code:
|
|
3252
|
+
code: i,
|
|
3056
3253
|
sort: r,
|
|
3057
|
-
|
|
3254
|
+
sort_index: r,
|
|
3255
|
+
...Array.isArray(a) ? { children: s(a, t + 1, i) } : {}
|
|
3058
3256
|
};
|
|
3059
|
-
}),
|
|
3257
|
+
}), c = w(s(e.value)), l = w([]), u = !1, d = 1, p = ti, m = (e, t = 1, n) => {
|
|
3060
3258
|
e.forEach((e, r) => {
|
|
3061
|
-
let
|
|
3062
|
-
e.level !== t && (e.level = t),
|
|
3259
|
+
let i = e.code, a = o(e, r, n);
|
|
3260
|
+
e.level !== t && (e.level = t), i !== a && (e.code = a), Array.isArray(e.children) && m(e.children, t + 1, a);
|
|
3063
3261
|
});
|
|
3064
|
-
},
|
|
3262
|
+
}, h = (e) => {
|
|
3065
3263
|
let t = [];
|
|
3066
3264
|
return e.forEach((e) => {
|
|
3067
3265
|
let n = e.children;
|
|
3068
|
-
Array.isArray(n) && n.length && (t.push(
|
|
3266
|
+
Array.isArray(n) && n.length && (t.push(p(e)), t.push(...h(n)));
|
|
3069
3267
|
}), t;
|
|
3070
|
-
},
|
|
3071
|
-
|
|
3072
|
-
},
|
|
3073
|
-
let e =
|
|
3074
|
-
if (!
|
|
3075
|
-
if (!
|
|
3076
|
-
|
|
3268
|
+
}, g = (e) => {
|
|
3269
|
+
l.value = e, u = !0;
|
|
3270
|
+
}, _ = () => {
|
|
3271
|
+
let e = h(c.value);
|
|
3272
|
+
if (!u) {
|
|
3273
|
+
if (!c.value.length) return;
|
|
3274
|
+
l.value = e, u = !0;
|
|
3077
3275
|
return;
|
|
3078
3276
|
}
|
|
3079
|
-
let t = new Set(e), n =
|
|
3080
|
-
(n.length !==
|
|
3081
|
-
}, { run:
|
|
3082
|
-
|
|
3083
|
-
}, 200),
|
|
3084
|
-
let t =
|
|
3277
|
+
let t = new Set(e), n = l.value.filter((e) => t.has(e));
|
|
3278
|
+
(n.length !== l.value.length || n.some((e, t) => e !== l.value[t])) && (l.value = n);
|
|
3279
|
+
}, { run: b, flush: x, cancel: S } = Jr(() => {
|
|
3280
|
+
m(c.value), _();
|
|
3281
|
+
}, 200), C = /* @__PURE__ */ new WeakMap(), T = (e) => {
|
|
3282
|
+
let t = C.get(e);
|
|
3085
3283
|
if (t) return t;
|
|
3086
3284
|
let n = new Proxy(e, {
|
|
3087
3285
|
get(e, t, n) {
|
|
3088
|
-
return t === "required_quantity" ?
|
|
3286
|
+
return t === "required_quantity" ? ei(e) : Reflect.get(e, t, n);
|
|
3089
3287
|
},
|
|
3090
3288
|
set(e, t, n) {
|
|
3091
3289
|
let r = Reflect.get(e, t) !== n, i = Reflect.set(e, t, n);
|
|
3092
|
-
|
|
3290
|
+
if (r && (t === "quantity" || t === "lossRate")) {
|
|
3291
|
+
let t = ei(e);
|
|
3292
|
+
Reflect.set(e, "required_quantity", t), Reflect.set(e, "counts", t);
|
|
3293
|
+
}
|
|
3294
|
+
return r && t === "product_no" && b(), i;
|
|
3093
3295
|
}
|
|
3094
3296
|
});
|
|
3095
|
-
return
|
|
3096
|
-
},
|
|
3297
|
+
return C.set(e, n), n;
|
|
3298
|
+
}, E = () => {
|
|
3097
3299
|
let e = /* @__PURE__ */ new Set(), t = (n) => {
|
|
3098
3300
|
n.forEach((n) => {
|
|
3099
|
-
e.add(
|
|
3301
|
+
e.add(p(n));
|
|
3100
3302
|
let r = n.children;
|
|
3101
3303
|
Array.isArray(r) && t(r);
|
|
3102
3304
|
});
|
|
3103
3305
|
};
|
|
3104
|
-
t(
|
|
3306
|
+
t(c.value);
|
|
3105
3307
|
let n;
|
|
3106
3308
|
do
|
|
3107
|
-
n = `NEW-${String(
|
|
3309
|
+
n = `NEW-${String(d).padStart(4, "0")}`, d += 1;
|
|
3108
3310
|
while (e.has(n));
|
|
3109
3311
|
return {
|
|
3110
3312
|
key: n,
|
|
3111
3313
|
level: 1,
|
|
3112
3314
|
code: n,
|
|
3113
3315
|
sort: 0,
|
|
3316
|
+
sort_index: 0,
|
|
3114
3317
|
product_no: n,
|
|
3115
3318
|
product_name: "",
|
|
3319
|
+
status: "0",
|
|
3320
|
+
procurement: "0",
|
|
3116
3321
|
unit: "",
|
|
3117
3322
|
operation_no: "",
|
|
3118
3323
|
quantity: 1,
|
|
3119
3324
|
lossRate: 0,
|
|
3120
3325
|
remark: ""
|
|
3121
3326
|
};
|
|
3122
|
-
},
|
|
3123
|
-
|
|
3124
|
-
}, { dragColumn:
|
|
3125
|
-
let t =
|
|
3126
|
-
if (
|
|
3327
|
+
}, D = (e) => {
|
|
3328
|
+
c.value = s(e), _(), t("update:value", c.value);
|
|
3329
|
+
}, { dragColumn: O, getSortableRowProps: k, tableRef: A, tableVersion: ee } = Qr(c, D), te = (e) => {
|
|
3330
|
+
let t = p(e), n = !1, r = (e) => e.map((e) => {
|
|
3331
|
+
if (p(e) === t) {
|
|
3127
3332
|
n = !0;
|
|
3128
3333
|
let t = e.children, r = Array.isArray(t) ? t : [];
|
|
3129
3334
|
return {
|
|
3130
3335
|
...e,
|
|
3131
3336
|
children: [...r, {
|
|
3132
|
-
...
|
|
3133
|
-
sort: r.length
|
|
3337
|
+
...E(),
|
|
3338
|
+
sort: r.length,
|
|
3339
|
+
sort_index: r.length
|
|
3134
3340
|
}]
|
|
3135
3341
|
};
|
|
3136
3342
|
}
|
|
@@ -3140,20 +3346,20 @@ var Yr = (e, t) => e.map((e, n) => {
|
|
|
3140
3346
|
children: r(i)
|
|
3141
3347
|
} : e;
|
|
3142
3348
|
});
|
|
3143
|
-
|
|
3144
|
-
},
|
|
3145
|
-
|
|
3146
|
-
},
|
|
3147
|
-
let t =
|
|
3148
|
-
if (
|
|
3349
|
+
D(r(c.value)), n && !l.value.includes(t) && g([...l.value, t]);
|
|
3350
|
+
}, M = (e) => {
|
|
3351
|
+
D(ni(c.value, p(e), E()));
|
|
3352
|
+
}, N = (e) => {
|
|
3353
|
+
let t = p(e), n = (e) => e.reduce((e, r) => {
|
|
3354
|
+
if (p(r) === t) return e;
|
|
3149
3355
|
let i = r.children;
|
|
3150
3356
|
return e.push(Array.isArray(i) ? {
|
|
3151
3357
|
...r,
|
|
3152
3358
|
children: n(i)
|
|
3153
3359
|
} : r), e;
|
|
3154
3360
|
}, []);
|
|
3155
|
-
|
|
3156
|
-
},
|
|
3361
|
+
D(n(c.value));
|
|
3362
|
+
}, P = {
|
|
3157
3363
|
title: () => f(fe, {
|
|
3158
3364
|
trigger: "click",
|
|
3159
3365
|
options: [{
|
|
@@ -3164,7 +3370,7 @@ var Yr = (e, t) => e.map((e, n) => {
|
|
|
3164
3370
|
key: "collapse-all"
|
|
3165
3371
|
}],
|
|
3166
3372
|
onSelect: (e) => {
|
|
3167
|
-
|
|
3373
|
+
g(e === "expand-all" ? h(c.value) : []);
|
|
3168
3374
|
}
|
|
3169
3375
|
}, { default: () => f(I, {
|
|
3170
3376
|
text: !0,
|
|
@@ -3176,7 +3382,7 @@ var Yr = (e, t) => e.map((e, n) => {
|
|
|
3176
3382
|
fixed: "left",
|
|
3177
3383
|
tree: !0,
|
|
3178
3384
|
ellipsis: { tooltip: !0 }
|
|
3179
|
-
},
|
|
3385
|
+
}, ne = {
|
|
3180
3386
|
title: "操作",
|
|
3181
3387
|
key: "actions",
|
|
3182
3388
|
width: 240,
|
|
@@ -3190,20 +3396,20 @@ var Yr = (e, t) => e.map((e, n) => {
|
|
|
3190
3396
|
key: "add-child",
|
|
3191
3397
|
color: "primary",
|
|
3192
3398
|
buttonText: "新增下级",
|
|
3193
|
-
onClick: (e) =>
|
|
3399
|
+
onClick: (e) => te(e)
|
|
3194
3400
|
}, ...Number(e.level) === 1 ? [] : [{
|
|
3195
3401
|
type: "normal",
|
|
3196
3402
|
key: "add-sibling",
|
|
3197
3403
|
color: "primary",
|
|
3198
3404
|
buttonText: "新增同级",
|
|
3199
|
-
onClick: (e) =>
|
|
3405
|
+
onClick: (e) => M(e)
|
|
3200
3406
|
}, {
|
|
3201
3407
|
type: "normal",
|
|
3202
3408
|
key: "delete",
|
|
3203
3409
|
color: "error",
|
|
3204
3410
|
buttonText: "删除",
|
|
3205
3411
|
confirmText: "确认删除该物料及其所有下级吗?",
|
|
3206
|
-
onClick: (e) =>
|
|
3412
|
+
onClick: (e) => N(e)
|
|
3207
3413
|
}]],
|
|
3208
3414
|
rowData: e,
|
|
3209
3415
|
hProps: {
|
|
@@ -3211,101 +3417,119 @@ var Yr = (e, t) => e.map((e, n) => {
|
|
|
3211
3417
|
secondary: !0
|
|
3212
3418
|
}
|
|
3213
3419
|
})
|
|
3214
|
-
},
|
|
3215
|
-
|
|
3216
|
-
},
|
|
3420
|
+
}, F = (e) => {
|
|
3421
|
+
g(e);
|
|
3422
|
+
}, L = (e) => {
|
|
3217
3423
|
let t = Math.trunc(Number(e.level));
|
|
3218
3424
|
if (!Number.isFinite(t) || t < 1) return null;
|
|
3219
3425
|
let n = (t - 1) % 4 + 1, r = Math.floor((t - 1) / 4);
|
|
3220
3426
|
return {
|
|
3221
|
-
color:
|
|
3427
|
+
color: xi[n - 1],
|
|
3222
3428
|
strength: `${Math.min(10 + r * 5, 40)}%`
|
|
3223
3429
|
};
|
|
3224
3430
|
};
|
|
3225
3431
|
return j(() => e.value, (e) => {
|
|
3226
|
-
e !==
|
|
3227
|
-
}), j(
|
|
3228
|
-
let e =
|
|
3229
|
-
|
|
3432
|
+
e !== c.value && (S(), c.value = s(e));
|
|
3433
|
+
}), j(c, () => _(), { immediate: !0 }), y(async () => {
|
|
3434
|
+
let e = await qn("bom_col");
|
|
3435
|
+
e = U.parse(e.viewJson), e = mi(e.table);
|
|
3436
|
+
let { tableColumns: t } = await bi(e), n = t.filter((e) => e.show).map((e) => ({
|
|
3437
|
+
title: e.title,
|
|
3230
3438
|
key: e.key,
|
|
3231
3439
|
width: e.width ?? 120,
|
|
3232
|
-
render: (t, n) => f(
|
|
3440
|
+
render: (t, n) => f(he, {
|
|
3441
|
+
showLabel: !1,
|
|
3442
|
+
showFeedback: !1,
|
|
3443
|
+
path: `child[${n}].${e.key}`,
|
|
3444
|
+
rule: e.form.rule?.required ? {
|
|
3445
|
+
...e.form.rule,
|
|
3446
|
+
validator: typeof e.form.rule.validator == "function" ? e.form.rule.validator : void 0,
|
|
3447
|
+
index: n
|
|
3448
|
+
} : void 0
|
|
3449
|
+
}, { default: () => f(wr, {
|
|
3233
3450
|
item: e,
|
|
3234
|
-
formValue:
|
|
3451
|
+
formValue: T(t),
|
|
3235
3452
|
status: 1,
|
|
3236
3453
|
itemIndex: n
|
|
3237
|
-
})
|
|
3238
|
-
})),
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
...
|
|
3242
|
-
|
|
3454
|
+
}) })
|
|
3455
|
+
})), r = [
|
|
3456
|
+
O,
|
|
3457
|
+
P,
|
|
3458
|
+
...n,
|
|
3459
|
+
ne
|
|
3243
3460
|
];
|
|
3244
|
-
|
|
3461
|
+
a.value = r.reduce((e, t) => {
|
|
3245
3462
|
let n = "width" in t ? Number(t.width) : 120;
|
|
3246
3463
|
return e + (Number.isFinite(n) ? n : 120);
|
|
3247
|
-
}, 0),
|
|
3248
|
-
}), v(
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3464
|
+
}, 0), i.value = r;
|
|
3465
|
+
}), n({ validate: async () => (await r.value?.validate(), c.value) }), v(S), {
|
|
3466
|
+
formRef: r,
|
|
3467
|
+
innerData: c,
|
|
3468
|
+
tableRef: A,
|
|
3469
|
+
tableVersion: ee,
|
|
3470
|
+
tableCols: i,
|
|
3471
|
+
scrollX: a,
|
|
3472
|
+
innerExpandedRowKeys: l,
|
|
3473
|
+
getRowKey: p,
|
|
3256
3474
|
getRowProps: (e) => {
|
|
3257
|
-
let t =
|
|
3475
|
+
let t = L(e);
|
|
3258
3476
|
return {
|
|
3259
|
-
...
|
|
3477
|
+
...k(e),
|
|
3260
3478
|
...t ? { style: `--uz-bom-level-color: ${t.color}; --uz-bom-level-strength: ${t.strength}` } : {}
|
|
3261
3479
|
};
|
|
3262
3480
|
},
|
|
3263
|
-
handleExpandedRowKeysChange:
|
|
3481
|
+
handleExpandedRowKeysChange: F
|
|
3264
3482
|
};
|
|
3265
3483
|
}
|
|
3266
|
-
}),
|
|
3267
|
-
function
|
|
3268
|
-
let
|
|
3269
|
-
return x(), a("div",
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
columns: e.tableColumns,
|
|
3273
|
-
data: e.innerData,
|
|
3274
|
-
"row-props": e.getRowProps,
|
|
3275
|
-
"row-key": e.getRowKey,
|
|
3276
|
-
"children-key": "children",
|
|
3277
|
-
indent: 0,
|
|
3278
|
-
"expanded-row-keys": e.innerExpandedRowKeys,
|
|
3279
|
-
"min-height": e.height,
|
|
3280
|
-
"max-height": e.height,
|
|
3281
|
-
"scroll-x": e.scrollX,
|
|
3282
|
-
pagination: !1,
|
|
3283
|
-
size: "small",
|
|
3284
|
-
"onUpdate:expandedRowKeys": e.handleExpandedRowKeysChange,
|
|
3285
|
-
"scrollbar-props": { trigger: "none" },
|
|
3286
|
-
remote: ""
|
|
3484
|
+
}), Ci = { class: "uz-bom" };
|
|
3485
|
+
function wi(e, t, n, i, o, s) {
|
|
3486
|
+
let u = D("NDataTable"), d = D("NForm");
|
|
3487
|
+
return x(), a("div", Ci, [l(d, {
|
|
3488
|
+
ref: "formRef",
|
|
3489
|
+
model: { child: e.innerData }
|
|
3287
3490
|
}, {
|
|
3288
|
-
|
|
3491
|
+
default: N(() => [(x(), r(u, {
|
|
3492
|
+
key: e.tableVersion,
|
|
3493
|
+
ref: "tableRef",
|
|
3494
|
+
columns: e.tableCols,
|
|
3495
|
+
data: e.innerData,
|
|
3496
|
+
"row-props": e.getRowProps,
|
|
3497
|
+
"row-key": e.getRowKey,
|
|
3498
|
+
"children-key": "children",
|
|
3499
|
+
indent: 0,
|
|
3500
|
+
"expanded-row-keys": e.innerExpandedRowKeys,
|
|
3501
|
+
"min-height": e.height,
|
|
3502
|
+
"max-height": e.height,
|
|
3503
|
+
"scroll-x": e.scrollX,
|
|
3504
|
+
pagination: !1,
|
|
3505
|
+
size: "small",
|
|
3506
|
+
"onUpdate:expandedRowKeys": e.handleExpandedRowKeysChange,
|
|
3507
|
+
"scrollbar-props": { trigger: "none" },
|
|
3508
|
+
remote: ""
|
|
3509
|
+
}, {
|
|
3510
|
+
empty: N(() => [E(e.$slots, "empty", {}, () => [t[0] ||= c("暂无 BOM 数据", -1)])]),
|
|
3511
|
+
_: 3
|
|
3512
|
+
}, 8, [
|
|
3513
|
+
"columns",
|
|
3514
|
+
"data",
|
|
3515
|
+
"row-props",
|
|
3516
|
+
"row-key",
|
|
3517
|
+
"expanded-row-keys",
|
|
3518
|
+
"min-height",
|
|
3519
|
+
"max-height",
|
|
3520
|
+
"scroll-x",
|
|
3521
|
+
"onUpdate:expandedRowKeys"
|
|
3522
|
+
]))]),
|
|
3289
3523
|
_: 3
|
|
3290
|
-
}, 8, [
|
|
3291
|
-
"columns",
|
|
3292
|
-
"data",
|
|
3293
|
-
"row-props",
|
|
3294
|
-
"row-key",
|
|
3295
|
-
"expanded-row-keys",
|
|
3296
|
-
"min-height",
|
|
3297
|
-
"max-height",
|
|
3298
|
-
"scroll-x",
|
|
3299
|
-
"onUpdate:expandedRowKeys"
|
|
3300
|
-
]))]);
|
|
3524
|
+
}, 8, ["model"])]);
|
|
3301
3525
|
}
|
|
3302
|
-
var
|
|
3526
|
+
var Ti = /*#__PURE__*/ Q(Si, [["render", wi]]), Ei = 46, Di = 8, Oi = 2 * Math.PI * Ei, ki = Di, Ai = 19, ji = 69, Mi = 52, Ni = 8, Pi = 135, Fi = 270, Ii = 2 * Math.PI * Mi, Li = Fi / 360 * Ii, Ri = 11, zi = `rotate(${Pi} 60 ${ji})`, Bi = (e, t, n, r) => {
|
|
3303
3527
|
let i = r * Math.PI / 180;
|
|
3304
3528
|
return {
|
|
3305
3529
|
x: e + n * Math.cos(i),
|
|
3306
3530
|
y: t + n * Math.sin(i)
|
|
3307
3531
|
};
|
|
3308
|
-
},
|
|
3532
|
+
}, Vi = ({ x: e, y: t }) => `${e.toFixed(3)} ${t.toFixed(3)}`, Hi = (e, t, n, r, i, a) => {
|
|
3309
3533
|
if (a <= 0) return "";
|
|
3310
3534
|
let o = n + r / 2, s = n - r / 2;
|
|
3311
3535
|
if (a >= 359.999) {
|
|
@@ -3317,16 +3541,16 @@ var pi = /*#__PURE__*/ Z(ui, [["render", fi]]), mi = 46, hi = 8, Q = 2 * Math.PI
|
|
|
3317
3541
|
`A ${s} ${s} 0 1 0 ${i}`
|
|
3318
3542
|
].join(" ");
|
|
3319
3543
|
}
|
|
3320
|
-
let c = i + a, l =
|
|
3544
|
+
let c = i + a, l = Bi(e, t, o, i), u = Bi(e, t, o, c), d = Bi(e, t, s, c), f = Bi(e, t, s, i), p = r / 2, m = +(a > 180);
|
|
3321
3545
|
return [
|
|
3322
|
-
`M ${
|
|
3323
|
-
`A ${o} ${o} 0 ${m} 1 ${
|
|
3324
|
-
`A ${p} ${p} 0 0 1 ${
|
|
3325
|
-
`A ${s} ${s} 0 ${m} 0 ${
|
|
3326
|
-
`A ${p} ${p} 0 0 1 ${
|
|
3546
|
+
`M ${Vi(l)}`,
|
|
3547
|
+
`A ${o} ${o} 0 ${m} 1 ${Vi(u)}`,
|
|
3548
|
+
`A ${p} ${p} 0 0 1 ${Vi(d)}`,
|
|
3549
|
+
`A ${s} ${s} 0 ${m} 0 ${Vi(f)}`,
|
|
3550
|
+
`A ${p} ${p} 0 0 1 ${Vi(l)}`,
|
|
3327
3551
|
"Z"
|
|
3328
3552
|
].join(" ");
|
|
3329
|
-
},
|
|
3553
|
+
}, Ui = (e) => {
|
|
3330
3554
|
if (!e) return "";
|
|
3331
3555
|
let t = e.toLowerCase();
|
|
3332
3556
|
if (t.length > 6 && (t = t.substring(0, 7)), t && /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)) {
|
|
@@ -3340,9 +3564,9 @@ var pi = /*#__PURE__*/ Z(ui, [["render", fi]]), mi = 46, hi = 8, Q = 2 * Math.PI
|
|
|
3340
3564
|
return e.join(",");
|
|
3341
3565
|
}
|
|
3342
3566
|
return "0,0,0";
|
|
3343
|
-
},
|
|
3567
|
+
}, Wi = d({
|
|
3344
3568
|
name: "UzCircle",
|
|
3345
|
-
components: { UzNumberFlow:
|
|
3569
|
+
components: { UzNumberFlow: it },
|
|
3346
3570
|
props: {
|
|
3347
3571
|
circle: {
|
|
3348
3572
|
required: !0,
|
|
@@ -3363,10 +3587,10 @@ var pi = /*#__PURE__*/ Z(ui, [["render", fi]]), mi = 46, hi = 8, Q = 2 * Math.PI
|
|
|
3363
3587
|
}
|
|
3364
3588
|
},
|
|
3365
3589
|
setup(e) {
|
|
3366
|
-
let t = ee(), r = `uz-blurs-${t}`, i = n(() => `rgba(${
|
|
3590
|
+
let t = ee(), r = `uz-blurs-${t}`, i = n(() => `rgba(${Ui(e.color).split(",").map((e) => {
|
|
3367
3591
|
let t = Number(e) - 50;
|
|
3368
3592
|
return t < 0 && (t = 0), t;
|
|
3369
|
-
})},1)`), a = n(() => `rgba(${
|
|
3593
|
+
})},1)`), a = n(() => `rgba(${Ui(e.color)},1)`), o = n(() => {
|
|
3370
3594
|
let t = Number(e.circle);
|
|
3371
3595
|
return Number.isFinite(t) ? Math.min(100, Math.max(0, t)) : 0;
|
|
3372
3596
|
}), s = w(o.value), c;
|
|
@@ -3385,62 +3609,62 @@ var pi = /*#__PURE__*/ Z(ui, [["render", fi]]), mi = 46, hi = 8, Q = 2 * Math.PI
|
|
|
3385
3609
|
c !== void 0 && cancelAnimationFrame(c);
|
|
3386
3610
|
});
|
|
3387
3611
|
let l = n(() => {
|
|
3388
|
-
let e =
|
|
3612
|
+
let e = Oi * (s.value / 100), t = Oi - e;
|
|
3389
3613
|
if (e === 0) return {
|
|
3390
3614
|
activeLength: 0,
|
|
3391
3615
|
activeStart: 0,
|
|
3392
|
-
remainingLength:
|
|
3616
|
+
remainingLength: Oi,
|
|
3393
3617
|
remainingStart: 0
|
|
3394
3618
|
};
|
|
3395
3619
|
if (t === 0) return {
|
|
3396
|
-
activeLength:
|
|
3620
|
+
activeLength: Oi,
|
|
3397
3621
|
activeStart: 0,
|
|
3398
3622
|
remainingLength: 0,
|
|
3399
3623
|
remainingStart: 0
|
|
3400
3624
|
};
|
|
3401
|
-
let n = Math.min(1, Math.min(e, t) /
|
|
3625
|
+
let n = Math.min(1, Math.min(e, t) / Ai), r = ki + 3 * n, i = Di * n, a = e < Ai ? i : Oi - (t < Ai ? i : t - r) - r * 2, o = Oi - a - r * 2;
|
|
3402
3626
|
return {
|
|
3403
3627
|
activeLength: a,
|
|
3404
3628
|
activeStart: r / 2,
|
|
3405
3629
|
remainingLength: o,
|
|
3406
3630
|
remainingStart: r / 2 + a + r
|
|
3407
3631
|
};
|
|
3408
|
-
}), u = n(() => l.value.activeLength), d = n(() => l.value.activeStart), f = n(() => l.value.remainingLength), p = n(() => l.value.remainingStart), m = n(() =>
|
|
3409
|
-
let e =
|
|
3632
|
+
}), u = n(() => l.value.activeLength), d = n(() => l.value.activeStart), f = n(() => l.value.remainingLength), p = n(() => l.value.remainingStart), m = n(() => Hi(60, 60, Ei, Di, -90 + p.value / Oi * 360, f.value / Oi * 360)), h = n(() => {
|
|
3633
|
+
let e = Li * (s.value / 100), t = Li - e;
|
|
3410
3634
|
if (e === 0) return {
|
|
3411
3635
|
activeLength: 0,
|
|
3412
|
-
remainingLength:
|
|
3636
|
+
remainingLength: Li,
|
|
3413
3637
|
remainingStart: 0
|
|
3414
3638
|
};
|
|
3415
3639
|
if (t === 0) return {
|
|
3416
|
-
activeLength:
|
|
3640
|
+
activeLength: Li,
|
|
3417
3641
|
remainingLength: 0,
|
|
3418
3642
|
remainingStart: 0
|
|
3419
3643
|
};
|
|
3420
|
-
let n = Math.min(
|
|
3644
|
+
let n = Math.min(Ri, e, t);
|
|
3421
3645
|
return {
|
|
3422
3646
|
activeLength: e - n / 2,
|
|
3423
3647
|
remainingLength: t - n / 2,
|
|
3424
3648
|
remainingStart: e + n / 2
|
|
3425
3649
|
};
|
|
3426
|
-
}), g = n(() => h.value.activeLength), _ = n(() => h.value.remainingLength), y = n(() => h.value.remainingStart), b = n(() =>
|
|
3650
|
+
}), g = n(() => h.value.activeLength), _ = n(() => h.value.remainingLength), y = n(() => h.value.remainingStart), b = n(() => Hi(60, ji, Mi, Ni, Pi + y.value / Ii * 360, _.value / Ii * 360));
|
|
3427
3651
|
return {
|
|
3428
3652
|
color: n(() => e.color),
|
|
3429
3653
|
colorA: i,
|
|
3430
3654
|
colorB: a,
|
|
3431
|
-
fullRadius:
|
|
3432
|
-
fullStrokeWidth:
|
|
3433
|
-
fullCircumference:
|
|
3655
|
+
fullRadius: Ei,
|
|
3656
|
+
fullStrokeWidth: Di,
|
|
3657
|
+
fullCircumference: Oi,
|
|
3434
3658
|
fullActiveLength: u,
|
|
3435
3659
|
fullActiveStart: d,
|
|
3436
3660
|
fullRemainingLength: f,
|
|
3437
3661
|
fullRemainingStart: p,
|
|
3438
3662
|
fullRemainingPath: m,
|
|
3439
|
-
gaugeCenterY:
|
|
3440
|
-
gaugeRadius:
|
|
3441
|
-
gaugeStrokeWidth:
|
|
3442
|
-
gaugeCircumference:
|
|
3443
|
-
gaugeTransform:
|
|
3663
|
+
gaugeCenterY: ji,
|
|
3664
|
+
gaugeRadius: Mi,
|
|
3665
|
+
gaugeStrokeWidth: Ni,
|
|
3666
|
+
gaugeCircumference: Ii,
|
|
3667
|
+
gaugeTransform: zi,
|
|
3444
3668
|
gaugeActiveLength: g,
|
|
3445
3669
|
gaugeRemainingLength: _,
|
|
3446
3670
|
gaugeRemainingStart: y,
|
|
@@ -3449,31 +3673,31 @@ var pi = /*#__PURE__*/ Z(ui, [["render", fi]]), mi = 46, hi = 8, Q = 2 * Math.PI
|
|
|
3449
3673
|
blurFilterId: r
|
|
3450
3674
|
};
|
|
3451
3675
|
}
|
|
3452
|
-
}),
|
|
3676
|
+
}), Gi = { class: "uz-circle" }, Ki = {
|
|
3453
3677
|
key: 0,
|
|
3454
3678
|
viewBox: "0 0 120 120",
|
|
3455
3679
|
"aria-hidden": "true"
|
|
3456
|
-
},
|
|
3680
|
+
}, qi = ["id"], Ji = ["stop-color"], Yi = ["stop-color"], Xi = ["id"], Zi = [
|
|
3457
3681
|
"r",
|
|
3458
3682
|
"stroke-width",
|
|
3459
3683
|
"stroke-dasharray",
|
|
3460
3684
|
"stroke-dashoffset",
|
|
3461
3685
|
"filter",
|
|
3462
3686
|
"stroke"
|
|
3463
|
-
],
|
|
3687
|
+
], Qi = [
|
|
3464
3688
|
"d",
|
|
3465
3689
|
"fill",
|
|
3466
3690
|
"filter"
|
|
3467
|
-
],
|
|
3691
|
+
], $i = {
|
|
3468
3692
|
class: "uz-circle__unit",
|
|
3469
3693
|
x: "60",
|
|
3470
3694
|
y: "82",
|
|
3471
3695
|
"text-anchor": "middle"
|
|
3472
|
-
},
|
|
3696
|
+
}, ea = {
|
|
3473
3697
|
key: 1,
|
|
3474
3698
|
viewBox: "0 0 120 120",
|
|
3475
3699
|
"aria-hidden": "true"
|
|
3476
|
-
},
|
|
3700
|
+
}, ta = ["id"], na = ["stop-color"], ra = ["stop-color"], ia = ["id"], aa = [
|
|
3477
3701
|
"cy",
|
|
3478
3702
|
"r",
|
|
3479
3703
|
"stroke-width",
|
|
@@ -3481,19 +3705,19 @@ var pi = /*#__PURE__*/ Z(ui, [["render", fi]]), mi = 46, hi = 8, Q = 2 * Math.PI
|
|
|
3481
3705
|
"transform",
|
|
3482
3706
|
"filter",
|
|
3483
3707
|
"stroke"
|
|
3484
|
-
],
|
|
3708
|
+
], oa = [
|
|
3485
3709
|
"d",
|
|
3486
3710
|
"fill",
|
|
3487
3711
|
"filter"
|
|
3488
|
-
],
|
|
3712
|
+
], sa = {
|
|
3489
3713
|
class: "uz-circle__unit uz-circle__unit--gauge",
|
|
3490
3714
|
x: "60",
|
|
3491
3715
|
y: "90",
|
|
3492
3716
|
"text-anchor": "middle"
|
|
3493
3717
|
};
|
|
3494
|
-
function
|
|
3718
|
+
function ca(e, t, n, r, s, c) {
|
|
3495
3719
|
let u = D("UzNumberFlow");
|
|
3496
|
-
return x(), a("div",
|
|
3720
|
+
return x(), a("div", Gi, [e.mode === 0 ? (x(), a("svg", Ki, [
|
|
3497
3721
|
o("defs", null, [o("linearGradient", {
|
|
3498
3722
|
id: `uz-progress-grad-${e.uniqueId}`,
|
|
3499
3723
|
x1: "1",
|
|
@@ -3503,10 +3727,10 @@ function Yi(e, t, n, r, s, c) {
|
|
|
3503
3727
|
}, [o("stop", {
|
|
3504
3728
|
offset: "0%",
|
|
3505
3729
|
"stop-color": e.colorA
|
|
3506
|
-
}, null, 8,
|
|
3730
|
+
}, null, 8, Ji), o("stop", {
|
|
3507
3731
|
offset: "50%",
|
|
3508
3732
|
"stop-color": e.colorB
|
|
3509
|
-
}, null, 8,
|
|
3733
|
+
}, null, 8, Yi)], 8, qi), o("filter", { id: e.blurFilterId }, [...t[0] ||= [
|
|
3510
3734
|
o("feOffset", {
|
|
3511
3735
|
result: "offOut",
|
|
3512
3736
|
in: "SourceGraphic",
|
|
@@ -3523,7 +3747,7 @@ function Yi(e, t, n, r, s, c) {
|
|
|
3523
3747
|
in2: "blurOut",
|
|
3524
3748
|
mode: "normal"
|
|
3525
3749
|
}, null, -1)
|
|
3526
|
-
]], 8,
|
|
3750
|
+
]], 8, Xi)]),
|
|
3527
3751
|
e.fullActiveLength > 0 ? (x(), a("circle", {
|
|
3528
3752
|
key: 0,
|
|
3529
3753
|
class: "uz-circle__progress",
|
|
@@ -3538,7 +3762,7 @@ function Yi(e, t, n, r, s, c) {
|
|
|
3538
3762
|
transform: "rotate(-90 60 60)",
|
|
3539
3763
|
filter: `url(#${e.blurFilterId})`,
|
|
3540
3764
|
stroke: `url(#uz-progress-grad-${e.uniqueId})`
|
|
3541
|
-
}, null, 8,
|
|
3765
|
+
}, null, 8, Zi)) : i("", !0),
|
|
3542
3766
|
e.fullRemainingPath ? (x(), a("path", {
|
|
3543
3767
|
key: 1,
|
|
3544
3768
|
class: "uz-circle__progress",
|
|
@@ -3546,9 +3770,9 @@ function Yi(e, t, n, r, s, c) {
|
|
|
3546
3770
|
fill: e.color,
|
|
3547
3771
|
"fill-opacity": "0.1",
|
|
3548
3772
|
filter: `url(#${e.blurFilterId})`
|
|
3549
|
-
}, null, 8,
|
|
3550
|
-
o("text",
|
|
3551
|
-
])) : (x(), a("svg",
|
|
3773
|
+
}, null, 8, Qi)) : i("", !0),
|
|
3774
|
+
o("text", $i, A(e.circleUnit), 1)
|
|
3775
|
+
])) : (x(), a("svg", ea, [
|
|
3552
3776
|
o("defs", null, [o("linearGradient", {
|
|
3553
3777
|
id: `uz-progress-grad-1-${e.uniqueId}`,
|
|
3554
3778
|
x1: "1",
|
|
@@ -3558,10 +3782,10 @@ function Yi(e, t, n, r, s, c) {
|
|
|
3558
3782
|
}, [o("stop", {
|
|
3559
3783
|
offset: "0%",
|
|
3560
3784
|
"stop-color": e.colorA
|
|
3561
|
-
}, null, 8,
|
|
3785
|
+
}, null, 8, na), o("stop", {
|
|
3562
3786
|
offset: "50%",
|
|
3563
3787
|
"stop-color": e.colorB
|
|
3564
|
-
}, null, 8,
|
|
3788
|
+
}, null, 8, ra)], 8, ta), o("filter", { id: e.blurFilterId }, [...t[1] ||= [
|
|
3565
3789
|
o("feOffset", {
|
|
3566
3790
|
result: "offOut",
|
|
3567
3791
|
in: "SourceGraphic",
|
|
@@ -3578,7 +3802,7 @@ function Yi(e, t, n, r, s, c) {
|
|
|
3578
3802
|
in2: "blurOut",
|
|
3579
3803
|
mode: "normal"
|
|
3580
3804
|
}, null, -1)
|
|
3581
|
-
]], 8,
|
|
3805
|
+
]], 8, ia)]),
|
|
3582
3806
|
e.gaugeActiveLength > 0 ? (x(), a("circle", {
|
|
3583
3807
|
key: 0,
|
|
3584
3808
|
class: "uz-circle__progress",
|
|
@@ -3592,7 +3816,7 @@ function Yi(e, t, n, r, s, c) {
|
|
|
3592
3816
|
transform: e.gaugeTransform,
|
|
3593
3817
|
filter: `url(#${e.blurFilterId})`,
|
|
3594
3818
|
stroke: `url(#uz-progress-grad-1-${e.uniqueId})`
|
|
3595
|
-
}, null, 8,
|
|
3819
|
+
}, null, 8, aa)) : i("", !0),
|
|
3596
3820
|
e.gaugeRemainingPath ? (x(), a("path", {
|
|
3597
3821
|
key: 1,
|
|
3598
3822
|
class: "uz-circle__progress",
|
|
@@ -3600,11 +3824,11 @@ function Yi(e, t, n, r, s, c) {
|
|
|
3600
3824
|
fill: e.color,
|
|
3601
3825
|
"fill-opacity": "0.1",
|
|
3602
3826
|
filter: `url(#${e.blurFilterId})`
|
|
3603
|
-
}, null, 8,
|
|
3604
|
-
o("text",
|
|
3827
|
+
}, null, 8, oa)) : i("", !0),
|
|
3828
|
+
o("text", sa, A(e.circleUnit), 1)
|
|
3605
3829
|
])), 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)]);
|
|
3606
3830
|
}
|
|
3607
|
-
var
|
|
3831
|
+
var la = /*#__PURE__*/ Q(Wi, [["render", ca]]), ua = d({
|
|
3608
3832
|
name: "UzCamera",
|
|
3609
3833
|
components: {
|
|
3610
3834
|
NButton: I,
|
|
@@ -3640,7 +3864,7 @@ var Xi = /*#__PURE__*/ Z(ji, [["render", Yi]]), Zi = d({
|
|
|
3640
3864
|
s.width = r, s.height = u, o.drawImage(n.value, 0, 0, r, u);
|
|
3641
3865
|
let e = o.getImageData(0, 0, r, u);
|
|
3642
3866
|
try {
|
|
3643
|
-
let n =
|
|
3867
|
+
let n = at(e.data, r, u);
|
|
3644
3868
|
if (n) {
|
|
3645
3869
|
let { location: e, data: r } = n;
|
|
3646
3870
|
r && (c(e.topLeftCorner, e.topRightCorner), c(e.topRightCorner, e.bottomRightCorner), c(e.bottomRightCorner, e.bottomLeftCorner), c(e.bottomLeftCorner, e.topLeftCorner), t("on-update:value", r));
|
|
@@ -3663,7 +3887,7 @@ var Xi = /*#__PURE__*/ Z(ji, [["render", Yi]]), Zi = d({
|
|
|
3663
3887
|
try {
|
|
3664
3888
|
e.getCapabilities().focusDistance && await e.applyConstraints({ advanced: [{ autoFocus: "continuous" }] });
|
|
3665
3889
|
} catch (e) {
|
|
3666
|
-
|
|
3890
|
+
W(e);
|
|
3667
3891
|
}
|
|
3668
3892
|
}, m = () => {
|
|
3669
3893
|
r.value = !0, h(async () => {
|
|
@@ -3696,11 +3920,11 @@ var Xi = /*#__PURE__*/ Z(ji, [["render", Yi]]), Zi = d({
|
|
|
3696
3920
|
closeAll: d
|
|
3697
3921
|
};
|
|
3698
3922
|
}
|
|
3699
|
-
}),
|
|
3923
|
+
}), da = ["width", "height"], fa = ["width", "height"], pa = { class: "uz-scan-video" }, ma = {
|
|
3700
3924
|
ref: "videoRef",
|
|
3701
3925
|
playsInline: ""
|
|
3702
3926
|
};
|
|
3703
|
-
function
|
|
3927
|
+
function ha(t, n, s, l, u, d) {
|
|
3704
3928
|
let f = D("NButton"), p = D("NModal");
|
|
3705
3929
|
return x(), a(e, null, [
|
|
3706
3930
|
t.mode === "button" ? (x(), r(f, {
|
|
@@ -3732,7 +3956,7 @@ function na(t, n, s, l, u, d) {
|
|
|
3732
3956
|
id: "uz-scan-canvas",
|
|
3733
3957
|
width: t.width,
|
|
3734
3958
|
height: t.height
|
|
3735
|
-
}, null, 8,
|
|
3959
|
+
}, null, 8, da)], 4)]),
|
|
3736
3960
|
_: 1
|
|
3737
3961
|
}, 8, [
|
|
3738
3962
|
"show",
|
|
@@ -3750,11 +3974,11 @@ function na(t, n, s, l, u, d) {
|
|
|
3750
3974
|
id: "uz-scan-canvas",
|
|
3751
3975
|
width: t.width,
|
|
3752
3976
|
height: t.height
|
|
3753
|
-
}, null, 8,
|
|
3754
|
-
o("div",
|
|
3977
|
+
}, null, 8, fa)], 4)) : i("", !0),
|
|
3978
|
+
o("div", pa, [o("video", ma, null, 512)])
|
|
3755
3979
|
], 64);
|
|
3756
3980
|
}
|
|
3757
|
-
var
|
|
3981
|
+
var ga = /*#__PURE__*/ Q(ua, [["render", ha]]), _a = /* @__PURE__ */ new WeakMap(), va = d({
|
|
3758
3982
|
name: "UzSearchBar",
|
|
3759
3983
|
components: {
|
|
3760
3984
|
NIcon: B,
|
|
@@ -3803,10 +4027,10 @@ var ra = /*#__PURE__*/ Z(Zi, [["render", na]]), ia = /* @__PURE__ */ new WeakMap
|
|
|
3803
4027
|
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);
|
|
3804
4028
|
}
|
|
3805
4029
|
});
|
|
3806
|
-
n.observe(e),
|
|
4030
|
+
n.observe(e), _a.set(e, n);
|
|
3807
4031
|
},
|
|
3808
4032
|
unmounted: (e) => {
|
|
3809
|
-
|
|
4033
|
+
_a.get(e)?.disconnect(), _a.delete(e);
|
|
3810
4034
|
}
|
|
3811
4035
|
} },
|
|
3812
4036
|
emits: ["update:loading", "on-update:value"],
|
|
@@ -3871,7 +4095,7 @@ var ra = /*#__PURE__*/ Z(Zi, [["render", na]]), ia = /* @__PURE__ */ new WeakMap
|
|
|
3871
4095
|
if (m.value = [], t && t.length > 0) {
|
|
3872
4096
|
let { data: o, values: s } = x(H(t)), c = {}, l = e.id || n.params.id;
|
|
3873
4097
|
if (e.cache && l) {
|
|
3874
|
-
let e =
|
|
4098
|
+
let e = K(`tables_${l}`, !1);
|
|
3875
4099
|
e && e.params.forEach((e) => {
|
|
3876
4100
|
if (e.str) {
|
|
3877
4101
|
let t = o.find((t) => t.key === e.key);
|
|
@@ -3921,24 +4145,24 @@ var ra = /*#__PURE__*/ Z(Zi, [["render", na]]), ia = /* @__PURE__ */ new WeakMap
|
|
|
3921
4145
|
tabButtonType: b
|
|
3922
4146
|
};
|
|
3923
4147
|
}
|
|
3924
|
-
}),
|
|
4148
|
+
}), ya = { class: "uz-flex uz-justify-between uz-gap-2" }, ba = {
|
|
3925
4149
|
key: 0,
|
|
3926
4150
|
class: "uz-flex uz-items-start uz-justify-between uz-gap-2 uz-w-full"
|
|
3927
|
-
},
|
|
4151
|
+
}, xa = { key: 0 }, Sa = { class: "uz-flex-1" }, Ca = {
|
|
3928
4152
|
key: 1,
|
|
3929
4153
|
class: "uz-flex uz-gap-2 uz-flex-1"
|
|
3930
|
-
},
|
|
4154
|
+
}, wa = {
|
|
3931
4155
|
key: 0,
|
|
3932
4156
|
class: "uz-search-fields-collapse"
|
|
3933
4157
|
};
|
|
3934
|
-
function
|
|
4158
|
+
function Ta(n, s, u, d, f, p) {
|
|
3935
4159
|
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");
|
|
3936
4160
|
return x(), a("div", {
|
|
3937
4161
|
class: "uz-search-bar uz-flex uz-flex-col uz-w-full",
|
|
3938
4162
|
onKeyup: s[1] ||= ne((e) => n.doSearch(!1), ["enter"])
|
|
3939
|
-
}, [o("div",
|
|
4163
|
+
}, [o("div", ya, [n.enableHeader ? (x(), a("div", ba, [
|
|
3940
4164
|
E(n.$slots, "header"),
|
|
3941
|
-
n.tabList && n.tabList.length > 0 ? (x(), a("div",
|
|
4165
|
+
n.tabList && n.tabList.length > 0 ? (x(), a("div", xa, [l(h, null, {
|
|
3942
4166
|
default: N(() => [(x(!0), a(e, null, T(n.tabList, (e) => (x(), r(m, {
|
|
3943
4167
|
key: e.value,
|
|
3944
4168
|
type: n.tabButtonType(e),
|
|
@@ -3950,7 +4174,7 @@ function fa(n, s, u, d, f, p) {
|
|
|
3950
4174
|
}, 1032, ["type", "onClick"]))), 128))]),
|
|
3951
4175
|
_: 1
|
|
3952
4176
|
})])) : i("", !0),
|
|
3953
|
-
P((x(), a("div",
|
|
4177
|
+
P((x(), a("div", Sa, [l(C, {
|
|
3954
4178
|
"x-gap": "8",
|
|
3955
4179
|
"y-gap": "8",
|
|
3956
4180
|
cols: n.cols,
|
|
@@ -3987,7 +4211,7 @@ function fa(n, s, u, d, f, p) {
|
|
|
3987
4211
|
}, 1032, ["span"]))), 128)) : i("", !0)]),
|
|
3988
4212
|
_: 1
|
|
3989
4213
|
}, 8, ["cols"])])), [[ee]])
|
|
3990
|
-
])) : i("", !0), n.enableHeader ? (x(), a("div",
|
|
4214
|
+
])) : i("", !0), n.enableHeader ? (x(), a("div", Ca, [
|
|
3991
4215
|
n.more ? (x(), r(m, {
|
|
3992
4216
|
key: 0,
|
|
3993
4217
|
secondary: "",
|
|
@@ -4037,7 +4261,7 @@ function fa(n, s, u, d, f, p) {
|
|
|
4037
4261
|
})) : i("", !0),
|
|
4038
4262
|
E(n.$slots, "action")
|
|
4039
4263
|
])) : i("", !0)]), l(t, { name: "uz-search-fields" }, {
|
|
4040
|
-
default: N(() => [!n.collapsed && n.itemData && Object.keys(n.itemData).length > 0 ? (x(), a("div",
|
|
4264
|
+
default: N(() => [!n.collapsed && n.itemData && Object.keys(n.itemData).length > 0 ? (x(), a("div", wa, [l(C, {
|
|
4041
4265
|
"x-gap": "8",
|
|
4042
4266
|
"y-gap": "8",
|
|
4043
4267
|
cols: 4
|
|
@@ -4072,7 +4296,7 @@ function fa(n, s, u, d, f, p) {
|
|
|
4072
4296
|
_: 1
|
|
4073
4297
|
})], 32);
|
|
4074
4298
|
}
|
|
4075
|
-
var
|
|
4299
|
+
var Ea = /*#__PURE__*/ Q(va, [["render", Ta]]), Da = d({
|
|
4076
4300
|
name: "UzSearchMobileBar",
|
|
4077
4301
|
components: {
|
|
4078
4302
|
NIcon: B,
|
|
@@ -4139,7 +4363,7 @@ var pa = /*#__PURE__*/ Z(aa, [["render", fa]]), ma = d({
|
|
|
4139
4363
|
if (t && t.length > 0) {
|
|
4140
4364
|
let { data: i, values: s } = u(H(t)), c = {}, l = e.id || n.params.id;
|
|
4141
4365
|
if (e.cache && l) {
|
|
4142
|
-
let e =
|
|
4366
|
+
let e = K(`tables_${l}`, !1);
|
|
4143
4367
|
e && e.params.forEach((e) => {
|
|
4144
4368
|
c[e.key] = e.value;
|
|
4145
4369
|
});
|
|
@@ -4161,10 +4385,10 @@ var pa = /*#__PURE__*/ Z(aa, [["render", fa]]), ma = d({
|
|
|
4161
4385
|
clearAll: l
|
|
4162
4386
|
};
|
|
4163
4387
|
}
|
|
4164
|
-
}),
|
|
4165
|
-
function
|
|
4388
|
+
}), Oa = { class: "uz-flex uz-items-start uz-justify-between uz-gap-8 uz-pb-2" }, ka = { class: "uz-flex uz-gap-2" }, Aa = { class: "uz-flex uz-items-center uz-gap-2 uz-w-full" };
|
|
4389
|
+
function ja(t, n, s, u, d, f) {
|
|
4166
4390
|
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");
|
|
4167
|
-
return x(), a(e, null, [o("div",
|
|
4391
|
+
return x(), a(e, null, [o("div", Oa, [E(t.$slots, "header"), o("div", ka, [t.itemData && Object.keys(t.itemData).length > 0 ? (x(), r(h, {
|
|
4168
4392
|
key: 0,
|
|
4169
4393
|
secondary: "",
|
|
4170
4394
|
onClick: n[0] ||= (e) => t.drawer = !0
|
|
@@ -4189,7 +4413,7 @@ function va(t, n, s, u, d, f) {
|
|
|
4189
4413
|
title: "查询",
|
|
4190
4414
|
closable: ""
|
|
4191
4415
|
}, {
|
|
4192
|
-
footer: N(() => [o("div",
|
|
4416
|
+
footer: N(() => [o("div", Aa, [l(h, {
|
|
4193
4417
|
secondary: "",
|
|
4194
4418
|
loading: t.loading,
|
|
4195
4419
|
onClick: t.clearAll,
|
|
@@ -4244,615 +4468,7 @@ function va(t, n, s, u, d, f) {
|
|
|
4244
4468
|
_: 1
|
|
4245
4469
|
}, 8, ["show"])], 64);
|
|
4246
4470
|
}
|
|
4247
|
-
var
|
|
4248
|
-
index: 1,
|
|
4249
|
-
selection: 0,
|
|
4250
|
-
pagination: 1,
|
|
4251
|
-
title: 1,
|
|
4252
|
-
cache: 1,
|
|
4253
|
-
draggable: 0,
|
|
4254
|
-
addButton: 1,
|
|
4255
|
-
filterButton: 1,
|
|
4256
|
-
commonTime: 1,
|
|
4257
|
-
asynchronous: "",
|
|
4258
|
-
filePort: 0,
|
|
4259
|
-
actionWidth: 300,
|
|
4260
|
-
drawerWidth: "70%",
|
|
4261
|
-
drawerHeight: "96vh",
|
|
4262
|
-
placement: "right",
|
|
4263
|
-
summary: ""
|
|
4264
|
-
};
|
|
4265
|
-
function Sa(e) {
|
|
4266
|
-
return Function("return " + e)();
|
|
4267
|
-
}
|
|
4268
|
-
var Ca = () => new Promise((e) => {
|
|
4269
|
-
let t = window.localStorage.getItem("city");
|
|
4270
|
-
if (t) e(JSON.parse(t));
|
|
4271
|
-
else {
|
|
4272
|
-
let t = document.body, n = document.createElement("script");
|
|
4273
|
-
n.append("\n function cityFn(data) {\n window.localStorage.setItem('city', JSON.stringify(data))\n }\n "), t?.appendChild(n);
|
|
4274
|
-
let r = document.createElement("script");
|
|
4275
|
-
r.src = "https://unizhen-1369980751.cos.ap-shanghai.myqcloud.com/static/city.js?callback=cityFn", t?.appendChild(r);
|
|
4276
|
-
let i = setInterval(() => {
|
|
4277
|
-
let t = window.localStorage.getItem("city");
|
|
4278
|
-
t && (clearInterval(i), e(JSON.parse(t)));
|
|
4279
|
-
}, 500);
|
|
4280
|
-
}
|
|
4281
|
-
}), wa = async (e, t, n) => {
|
|
4282
|
-
if (t && typeof t == "string") {
|
|
4283
|
-
let r = t.match(ba);
|
|
4284
|
-
if (r && t.indexOf("return") === -1) {
|
|
4285
|
-
let t = r[0].split(":");
|
|
4286
|
-
if (t[0] === "date") return (t) => Mt(t[e], r[0].replace("date:", "") || "YYYY-MM-DD");
|
|
4287
|
-
if (t[0] === "city") return (t) => t[`${e}Str`];
|
|
4288
|
-
if (t[0] === "modules" && n && Object.keys(n).length > 0) {
|
|
4289
|
-
let e = r[0].replace("modules:", ""), t = Object.keys(n).find((t) => t.includes(e));
|
|
4290
|
-
if (t) {
|
|
4291
|
-
let e = n[t], r = m(u(e));
|
|
4292
|
-
return (e) => f(r, { rowData: e }, {});
|
|
4293
|
-
}
|
|
4294
|
-
return f("div", "Module not found");
|
|
4295
|
-
}
|
|
4296
|
-
} else try {
|
|
4297
|
-
let e = Function("rowData", "rowIndex", "h", t);
|
|
4298
|
-
return (t, n) => e(t, n, f);
|
|
4299
|
-
} catch (e) {
|
|
4300
|
-
U(e);
|
|
4301
|
-
}
|
|
4302
|
-
}
|
|
4303
|
-
return t && typeof t == "function" ? (e, n) => t(e, n, f) : "";
|
|
4304
|
-
}, Ta = (e, t, n) => {
|
|
4305
|
-
let r = t.map((t) => {
|
|
4306
|
-
let r = [], i = t.id;
|
|
4307
|
-
return e.input === "select" && (e.params.labelKeys || e.search.labelKeys) ? ((e.params.labelKeys || e.search.labelKeys || "").split(",").forEach((e) => {
|
|
4308
|
-
r.push(t[e]);
|
|
4309
|
-
}), r = Qe(r).join("-")) : r = t[n[1]], e.input === "select" && e.params.valueKey && (i = t[e.params.valueKey]), {
|
|
4310
|
-
label: t?.is_disabled === "1" ? `${r}-已禁用` : r,
|
|
4311
|
-
value: i,
|
|
4312
|
-
disabled: !e.params._search && t?.is_disabled === "1",
|
|
4313
|
-
params: t
|
|
4314
|
-
};
|
|
4315
|
-
});
|
|
4316
|
-
return r.sort((e, t) => Number(e.disabled) - Number(t.disabled)), r;
|
|
4317
|
-
}, Ea = /* @__PURE__ */ new Map();
|
|
4318
|
-
function Da() {
|
|
4319
|
-
Ea.clear();
|
|
4320
|
-
}
|
|
4321
|
-
async function Oa(e, t = !1) {
|
|
4322
|
-
let n = e.split("."), r = !1;
|
|
4323
|
-
return n.length > 1 && (Ea.has(n[0]) && !t ? r = H(Ea.get(n[0])) : (r = await X({ tableId: n[0] }), Ea.set(n[0], r))), {
|
|
4324
|
-
sourceData: r,
|
|
4325
|
-
n
|
|
4326
|
-
};
|
|
4327
|
-
}
|
|
4328
|
-
async function ka(e) {
|
|
4329
|
-
return new Promise((t, n) => {
|
|
4330
|
-
let r = G(`dynamicTable_${e}`, !1);
|
|
4331
|
-
r && Ea.has(`dynamicTable_${e}`) ? t(r) : Yn(e, r ? r.createTime : null).then((n) => {
|
|
4332
|
-
if (n) {
|
|
4333
|
-
let r = {
|
|
4334
|
-
createTime: n.createTime,
|
|
4335
|
-
tableTitle: n.tableTitle,
|
|
4336
|
-
viewJson: n.viewJson
|
|
4337
|
-
};
|
|
4338
|
-
W(`dynamicTable_${e}`, r, 0), Ea.set(`dynamicTable_${e}`, !0), Ot("tables_"), t(n);
|
|
4339
|
-
} else Ea.set(`dynamicTable_${e}`, !0), t(r);
|
|
4340
|
-
}).catch(() => {
|
|
4341
|
-
n();
|
|
4342
|
-
});
|
|
4343
|
-
});
|
|
4344
|
-
}
|
|
4345
|
-
var Aa = (e) => e.map((e) => {
|
|
4346
|
-
let t = {};
|
|
4347
|
-
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)), {
|
|
4348
|
-
i: e.input,
|
|
4349
|
-
l: e.label ? encodeURIComponent(e.label) : "",
|
|
4350
|
-
k: e.key.replace(/\s*/g, ""),
|
|
4351
|
-
y: e.dbType,
|
|
4352
|
-
s: e.source,
|
|
4353
|
-
n: e.sourceFn,
|
|
4354
|
-
u: e.unique,
|
|
4355
|
-
v: e.fieldValueRule,
|
|
4356
|
-
t: {
|
|
4357
|
-
a: e.table.align,
|
|
4358
|
-
n: e.table.titleAlign,
|
|
4359
|
-
f: e.table.fixed,
|
|
4360
|
-
w: e.table.width,
|
|
4361
|
-
b: +!!e.table.resizable,
|
|
4362
|
-
h: +!!e.table.hide,
|
|
4363
|
-
c: +!!e.table.sorter,
|
|
4364
|
-
s: +!!e.table.show,
|
|
4365
|
-
m: +!!e.table.mobile,
|
|
4366
|
-
k: +!!e.table.lineBreak,
|
|
4367
|
-
e: +!!e.table.ellipsis,
|
|
4368
|
-
l: e.table.clamp,
|
|
4369
|
-
o: e.table.lineCol,
|
|
4370
|
-
r: e.table.render
|
|
4371
|
-
},
|
|
4372
|
-
p: t,
|
|
4373
|
-
c: {
|
|
4374
|
-
f: +!!e.search.fuzzy,
|
|
4375
|
-
s: +!!e.search.show,
|
|
4376
|
-
v: e.search.defaultValue,
|
|
4377
|
-
r: e.search.source,
|
|
4378
|
-
y: e.search.type,
|
|
4379
|
-
e: (e.search.title || "").replace(/\s*/g, ""),
|
|
4380
|
-
l: (e.search.labelKeys || "").replace(/\s*/g, ""),
|
|
4381
|
-
a: (e.search.valueKey || "").replace(/\s*/g, ""),
|
|
4382
|
-
d: (e.search.child || "").replace(/\s*/g, ""),
|
|
4383
|
-
m: +!!e.search.multiple,
|
|
4384
|
-
t: +!!e.search.tab,
|
|
4385
|
-
p: e.search.span
|
|
4386
|
-
},
|
|
4387
|
-
f: {
|
|
4388
|
-
v: e.form.defaultValue,
|
|
4389
|
-
n: e.form.span,
|
|
4390
|
-
s: +!!e.form.show,
|
|
4391
|
-
d: +!!e.form.disabled,
|
|
4392
|
-
r: +!!e.form.readonly,
|
|
4393
|
-
u: e.form.updateValue,
|
|
4394
|
-
i: e.form.display,
|
|
4395
|
-
a: e.form.readonlyFn,
|
|
4396
|
-
b: e.form.disabledFn,
|
|
4397
|
-
y: +!!e.form.createButton,
|
|
4398
|
-
h: +!!e.form.showDays,
|
|
4399
|
-
f: +!!e.form.backfill,
|
|
4400
|
-
l: {
|
|
4401
|
-
r: +!!e.form.rule.required,
|
|
4402
|
-
y: e.form.rule.type,
|
|
4403
|
-
m: e.form.rule.message ? encodeURIComponent(e.form.rule.message) : void 0,
|
|
4404
|
-
t: e.form.rule.trigger,
|
|
4405
|
-
v: e.form.rule.validator
|
|
4406
|
-
},
|
|
4407
|
-
c: {
|
|
4408
|
-
d: +!!e.form.create.disabled,
|
|
4409
|
-
r: +!!e.form.create.readonly,
|
|
4410
|
-
s: +!!e.form.create.show
|
|
4411
|
-
},
|
|
4412
|
-
e: {
|
|
4413
|
-
d: +!!e.form.edit.disabled,
|
|
4414
|
-
r: +!!e.form.edit.readonly,
|
|
4415
|
-
s: +!!e.form.edit.show
|
|
4416
|
-
},
|
|
4417
|
-
p: { s: +!!e.form.expand.show }
|
|
4418
|
-
}
|
|
4419
|
-
};
|
|
4420
|
-
}), ja = (e) => !e[0] || e[0] && e[0].input ? e : e.map((e) => {
|
|
4421
|
-
let t = {};
|
|
4422
|
-
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)), {
|
|
4423
|
-
input: e.i,
|
|
4424
|
-
label: e.l ? decodeURIComponent(e.l) : "",
|
|
4425
|
-
key: e.k,
|
|
4426
|
-
dbType: e.y,
|
|
4427
|
-
source: e.s,
|
|
4428
|
-
sourceFn: e.n,
|
|
4429
|
-
unique: e.u,
|
|
4430
|
-
fieldValueRule: e.v,
|
|
4431
|
-
table: {
|
|
4432
|
-
align: e.t.a,
|
|
4433
|
-
titleAlign: e.t.n,
|
|
4434
|
-
fixed: e.t.f,
|
|
4435
|
-
width: e.t.w,
|
|
4436
|
-
resizable: !!e.t.b,
|
|
4437
|
-
hide: !!e.t.h,
|
|
4438
|
-
sorter: !!e.t.c,
|
|
4439
|
-
show: !!e.t.s,
|
|
4440
|
-
mobile: !!e.t.m,
|
|
4441
|
-
lineBreak: !!e.t.k,
|
|
4442
|
-
ellipsis: !!e.t.e,
|
|
4443
|
-
clamp: e.t.l,
|
|
4444
|
-
lineCol: e.t.o,
|
|
4445
|
-
render: e.t.r
|
|
4446
|
-
},
|
|
4447
|
-
params: t,
|
|
4448
|
-
search: {
|
|
4449
|
-
fuzzy: !!e.c.f,
|
|
4450
|
-
show: !!e.c.s,
|
|
4451
|
-
defaultValue: e.c.v,
|
|
4452
|
-
source: e.c.r,
|
|
4453
|
-
type: e.c.y,
|
|
4454
|
-
title: e.c.e,
|
|
4455
|
-
labelKeys: e.c.l,
|
|
4456
|
-
valueKey: e.c.a,
|
|
4457
|
-
child: e.c.d,
|
|
4458
|
-
multiple: !!e.c.m,
|
|
4459
|
-
tab: !!e.c.t,
|
|
4460
|
-
span: e.c.p
|
|
4461
|
-
},
|
|
4462
|
-
form: {
|
|
4463
|
-
defaultValue: e.f.v,
|
|
4464
|
-
span: e.f.n,
|
|
4465
|
-
show: !!e.f.s,
|
|
4466
|
-
disabled: !!e.f.d,
|
|
4467
|
-
readonly: !!e.f.r,
|
|
4468
|
-
updateValue: e.f.u,
|
|
4469
|
-
display: e.f.i,
|
|
4470
|
-
readonlyFn: e.f.a,
|
|
4471
|
-
disabledFn: e.f.b,
|
|
4472
|
-
createButton: !!e.f.y,
|
|
4473
|
-
showDays: !!e.f.h,
|
|
4474
|
-
backfill: !!e.f.f,
|
|
4475
|
-
rule: {
|
|
4476
|
-
required: !!e.f.l.r,
|
|
4477
|
-
type: e.f.l.y,
|
|
4478
|
-
message: e.f.l.m ? decodeURIComponent(e.f.l.m) : void 0,
|
|
4479
|
-
trigger: e.f.l.t,
|
|
4480
|
-
validator: e.f.l.v
|
|
4481
|
-
},
|
|
4482
|
-
create: {
|
|
4483
|
-
disabled: !!e.f.c.d,
|
|
4484
|
-
readonly: !!e.f.c.r,
|
|
4485
|
-
show: !!e.f.c.s
|
|
4486
|
-
},
|
|
4487
|
-
edit: {
|
|
4488
|
-
disabled: !!e.f.e.d,
|
|
4489
|
-
readonly: !!e.f.e.r,
|
|
4490
|
-
show: !!e.f.e.s
|
|
4491
|
-
},
|
|
4492
|
-
expand: { show: e.f && e.f.p ? !!e.f.p.s : !0 }
|
|
4493
|
-
}
|
|
4494
|
-
};
|
|
4495
|
-
}), Ma = (e) => ({
|
|
4496
|
-
f: e.fetch,
|
|
4497
|
-
n: e.fetchFn,
|
|
4498
|
-
o: e.when_drawer_open,
|
|
4499
|
-
b: e.when_before_save
|
|
4500
|
-
}), Na = (e) => e ? e.fetch ? e : {
|
|
4501
|
-
fetch: e.f,
|
|
4502
|
-
fetchFn: e.n,
|
|
4503
|
-
when_drawer_open: e.o,
|
|
4504
|
-
when_before_save: e.b
|
|
4505
|
-
} : {
|
|
4506
|
-
fetch: null,
|
|
4507
|
-
fetchFn: "",
|
|
4508
|
-
when_drawer_open: "",
|
|
4509
|
-
when_before_save: ""
|
|
4510
|
-
}, Pa = (e) => ({
|
|
4511
|
-
i: e.index,
|
|
4512
|
-
s: e.selection,
|
|
4513
|
-
p: e.pagination,
|
|
4514
|
-
c: e.cache,
|
|
4515
|
-
d: e.draggable,
|
|
4516
|
-
a: e.addButton,
|
|
4517
|
-
f: e.filterButton,
|
|
4518
|
-
o: e.commonTime,
|
|
4519
|
-
n: e.asynchronous,
|
|
4520
|
-
e: e.filePort,
|
|
4521
|
-
t: e.actionWidth,
|
|
4522
|
-
w: e.drawerWidth,
|
|
4523
|
-
h: e.drawerHeight,
|
|
4524
|
-
l: e.placement,
|
|
4525
|
-
r: e.summary
|
|
4526
|
-
}), Fa = (e) => {
|
|
4527
|
-
let t = {};
|
|
4528
|
-
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 : {
|
|
4529
|
-
index: e.i,
|
|
4530
|
-
selection: e.s,
|
|
4531
|
-
pagination: e.p,
|
|
4532
|
-
cache: e.c,
|
|
4533
|
-
draggable: e.d,
|
|
4534
|
-
addButton: e.a,
|
|
4535
|
-
filterButton: e.f,
|
|
4536
|
-
commonTime: e.o,
|
|
4537
|
-
asynchronous: e.n,
|
|
4538
|
-
filePort: e.e,
|
|
4539
|
-
actionWidth: e.t,
|
|
4540
|
-
drawerWidth: e.w,
|
|
4541
|
-
drawerHeight: e.h,
|
|
4542
|
-
placement: e.l,
|
|
4543
|
-
summary: e.r
|
|
4544
|
-
}), Object.assign({}, xa, H(t));
|
|
4545
|
-
};
|
|
4546
|
-
function Ia(e, t, n, r) {
|
|
4547
|
-
return new Promise(async (i, a) => {
|
|
4548
|
-
let o = [], s = {}, c = {}, l = {}, u = [], d = [], f = H(e), p = [];
|
|
4549
|
-
for (let e of f) e.input === "group" ? p.push(...e.params.children) : p.push(e);
|
|
4550
|
-
for (let e of p) {
|
|
4551
|
-
if (e.source && (e.input === "select" || e.input === "cascader")) {
|
|
4552
|
-
let n = [];
|
|
4553
|
-
if (t && !Array.isArray(t) && t[e.key]) {
|
|
4554
|
-
if (e.params.multiple && t[`${e.key}Str`]) {
|
|
4555
|
-
let r = t[`${e.key}Str`].split(","), i = JSON.parse(t[e.key]);
|
|
4556
|
-
i.forEach((e, t) => {
|
|
4557
|
-
n.push({
|
|
4558
|
-
label: r[t],
|
|
4559
|
-
value: i[t],
|
|
4560
|
-
disabled: !1,
|
|
4561
|
-
params: {}
|
|
4562
|
-
});
|
|
4563
|
-
});
|
|
4564
|
-
} else n.push({
|
|
4565
|
-
label: t[`${e.key}Str`],
|
|
4566
|
-
value: t[e.key],
|
|
4567
|
-
disabled: !1,
|
|
4568
|
-
params: {}
|
|
4569
|
-
});
|
|
4570
|
-
n.push({
|
|
4571
|
-
label: "加载中......",
|
|
4572
|
-
value: "loading",
|
|
4573
|
-
disabled: !0
|
|
4574
|
-
});
|
|
4575
|
-
} else n = [{
|
|
4576
|
-
label: "加载中......",
|
|
4577
|
-
value: "loading",
|
|
4578
|
-
disabled: !0
|
|
4579
|
-
}];
|
|
4580
|
-
if (e.params.immediately || r) {
|
|
4581
|
-
let { sourceData: t, n: r } = await Oa(e.source);
|
|
4582
|
-
if (t && Array.isArray(t)) {
|
|
4583
|
-
if (e.sourceFn) {
|
|
4584
|
-
let r = e.sourceFn;
|
|
4585
|
-
n = Function("sourceData", r)(t);
|
|
4586
|
-
} else n = Ta(e, t, r);
|
|
4587
|
-
}
|
|
4588
|
-
} else e.params._async = !0, e.params._fetch = !1, e.params._asyncFn = async () => {
|
|
4589
|
-
let { sourceData: t, n } = await Oa(e.source);
|
|
4590
|
-
if (t && Array.isArray(t)) {
|
|
4591
|
-
if (e.sourceFn) {
|
|
4592
|
-
let n = e.sourceFn;
|
|
4593
|
-
return Function("sourceData", n)(t);
|
|
4594
|
-
}
|
|
4595
|
-
return Ta(e, t, n);
|
|
4596
|
-
}
|
|
4597
|
-
};
|
|
4598
|
-
if (e.params.options = n, e.form.backfill && t) {
|
|
4599
|
-
if (Array.isArray(t)) t.forEach((t, r) => {
|
|
4600
|
-
let i = n.find((n) => n.value === t[e.key]);
|
|
4601
|
-
i && (u[r] || (u[r] = {}), u[r][e.key] = i.params);
|
|
4602
|
-
});
|
|
4603
|
-
else {
|
|
4604
|
-
let r = n.find((n) => n.value === t[e.key]);
|
|
4605
|
-
r && (c[e.key] = r.params);
|
|
4606
|
-
}
|
|
4607
|
-
}
|
|
4608
|
-
}
|
|
4609
|
-
if (e.input === "filling") try {
|
|
4610
|
-
Array.isArray(t) ? t.forEach((t, n) => {
|
|
4611
|
-
d[n] || (d[n] = {}), u[n] && u[n][e.params.parentKey] && u[n][e.params.parentKey][e.key] ? (d[n][e.key] = u[n][e.params.parentKey][e.key], u[n][e.params.parentKey][`${e.key}Str`] && (d[n][`${e.key}Str`] = u[n][e.params.parentKey][`${e.key}Str`])) : (d[n][e.key] = t[e.key] || null, d[n][`${e.key}Str`] = t[`${e.key}Str`] || null);
|
|
4612
|
-
}) : c[e.params.parentKey] && c[e.params.parentKey][e.key] ? (l[e.key] = c[e.params.parentKey][e.key], c[e.params.parentKey][`${e.key}Str`] && (l[`${e.key}Str`] = c[e.params.parentKey][`${e.key}Str`])) : (l[e.key] = null, l[`${e.key}Str`] = null);
|
|
4613
|
-
} catch (e) {
|
|
4614
|
-
U(e);
|
|
4615
|
-
}
|
|
4616
|
-
if (e.input !== "divider" && e.form.rule && e.form.rule.validator && typeof e.form.rule.validator == "string") try {
|
|
4617
|
-
let t = e.form.rule.validator, r = Function("rule", "value", "index", "formValues", t);
|
|
4618
|
-
e.form.rule.validator = (e, t) => r(e, t, null, n);
|
|
4619
|
-
} catch (e) {
|
|
4620
|
-
U(e);
|
|
4621
|
-
}
|
|
4622
|
-
if (e.input === "date" && e.params.isDateDisabled && typeof e.params.isDateDisabled == "string") try {
|
|
4623
|
-
let t = e.params.isDateDisabled, n = Function("ts", "detail", t);
|
|
4624
|
-
e.params.isDateDisabled = (e, t) => n(e, t);
|
|
4625
|
-
} catch (e) {
|
|
4626
|
-
U(e);
|
|
4627
|
-
}
|
|
4628
|
-
if (e.input === "cascader" && e.table.render === "[city]") {
|
|
4629
|
-
let t = await Ca();
|
|
4630
|
-
e.params.options = t;
|
|
4631
|
-
}
|
|
4632
|
-
if (e.input === "subTable" && e.params.link) {
|
|
4633
|
-
let t = await ka(e.params.link).catch(() => {
|
|
4634
|
-
a();
|
|
4635
|
-
});
|
|
4636
|
-
if (t) try {
|
|
4637
|
-
let n = rt.parse(t.viewJson);
|
|
4638
|
-
n.suffix && (e._suffix = _r(n.suffix));
|
|
4639
|
-
let r = ja(n.table);
|
|
4640
|
-
r.forEach((e) => {
|
|
4641
|
-
e.table.sorter = !1;
|
|
4642
|
-
});
|
|
4643
|
-
let i = r.filter((e) => e.input === "subTable");
|
|
4644
|
-
if (i) for await (let e of i) {
|
|
4645
|
-
let t = await ka(e.params.link).catch(() => {
|
|
4646
|
-
a();
|
|
4647
|
-
});
|
|
4648
|
-
if (t) try {
|
|
4649
|
-
let n = rt.parse(t.viewJson), r = ja(n.table);
|
|
4650
|
-
r.forEach((e) => {
|
|
4651
|
-
e.table.sorter = !1;
|
|
4652
|
-
}), e.params.columns = r, e.params.actions = n.action;
|
|
4653
|
-
} catch (e) {
|
|
4654
|
-
a(e);
|
|
4655
|
-
return;
|
|
4656
|
-
}
|
|
4657
|
-
}
|
|
4658
|
-
e.params.columns = r, e.params.actions = n.action;
|
|
4659
|
-
} catch (e) {
|
|
4660
|
-
a(e);
|
|
4661
|
-
return;
|
|
4662
|
-
}
|
|
4663
|
-
}
|
|
4664
|
-
o.push({
|
|
4665
|
-
input: e.input,
|
|
4666
|
-
label: e.label,
|
|
4667
|
-
key: e.key,
|
|
4668
|
-
source: e.source,
|
|
4669
|
-
sourceFn: e.sourceFn,
|
|
4670
|
-
params: e.params,
|
|
4671
|
-
form: e.form,
|
|
4672
|
-
_suffix: e._suffix
|
|
4673
|
-
}), e.input === "date" || e.input === "number" || e.input === "time" ? s[e.key] = Number(e.form.defaultValue) || 0 : s[e.key] = e.form.defaultValue;
|
|
4674
|
-
}
|
|
4675
|
-
i({
|
|
4676
|
-
form: o,
|
|
4677
|
-
formDefaultValue: s,
|
|
4678
|
-
fillingDefaultValue: l,
|
|
4679
|
-
fillingDefaultArray: d
|
|
4680
|
-
});
|
|
4681
|
-
});
|
|
4682
|
-
}
|
|
4683
|
-
async function La(e, t = !1, n = 0, r = () => {}, i = {}, a = !1, o = !1) {
|
|
4684
|
-
let s = 0, c = [], l = [], u = {
|
|
4685
|
-
key: "",
|
|
4686
|
-
link: "",
|
|
4687
|
-
merge: ""
|
|
4688
|
-
}, d = [], p = H(e), m = [], h = [];
|
|
4689
|
-
for (let e of p) e.input === "group" ? (m.push(...e.params.children), h.push({
|
|
4690
|
-
title: e.label,
|
|
4691
|
-
key: e.key,
|
|
4692
|
-
...e.table,
|
|
4693
|
-
children: e.params.children.map((e) => e.key)
|
|
4694
|
-
})) : (m.push(e), h.push(e.key));
|
|
4695
|
-
for await (let [e, s] of m.entries()) {
|
|
4696
|
-
if (s.source && !s.table.render && (s.input === "select" || s.input === "cascader")) {
|
|
4697
|
-
if (s.table.render = (e) => e[`${s.key}Str`], t || s.params.immediately || s.search.defaultValue) {
|
|
4698
|
-
let { sourceData: t, n } = await Oa(s.source, a && e === 0);
|
|
4699
|
-
if (t && Array.isArray(t)) {
|
|
4700
|
-
if (s.sourceFn) {
|
|
4701
|
-
let e = s.sourceFn, n = Function("sourceData", e);
|
|
4702
|
-
s.params.options = n(t);
|
|
4703
|
-
} else s.params.options = Ta(s, t, n);
|
|
4704
|
-
}
|
|
4705
|
-
} else s.params.options = [{
|
|
4706
|
-
label: "加载中......",
|
|
4707
|
-
value: "loading",
|
|
4708
|
-
disabled: !0
|
|
4709
|
-
}], s.params._async = !0, s.params._fetch = !1, s.params._asyncFn = async () => {
|
|
4710
|
-
let { sourceData: e, n: t } = await Oa(s.source);
|
|
4711
|
-
if (e && Array.isArray(e)) {
|
|
4712
|
-
if (s.sourceFn) {
|
|
4713
|
-
let t = s.sourceFn;
|
|
4714
|
-
return Function("sourceData", t)(e);
|
|
4715
|
-
}
|
|
4716
|
-
return Ta(s, e, t);
|
|
4717
|
-
}
|
|
4718
|
-
};
|
|
4719
|
-
}
|
|
4720
|
-
!s.table.render && !s.source && s.input === "select" && typeof s.params.options != "function" && s.params.options.length > 0 && (s.table.render = (e) => {
|
|
4721
|
-
let t = s.params.options.find((t) => t.value === e[s.key]);
|
|
4722
|
-
if (t) return t.label;
|
|
4723
|
-
}), s.input === "upload" && !s.table.render && (s.table.render = function(e) {
|
|
4724
|
-
return f(Ur, { value: e[s.key] }, { default: () => null });
|
|
4725
|
-
});
|
|
4726
|
-
let p = {
|
|
4727
|
-
input: s.input,
|
|
4728
|
-
title: s.label,
|
|
4729
|
-
key: s.key,
|
|
4730
|
-
params: s.params,
|
|
4731
|
-
form: s.form,
|
|
4732
|
-
ellipsisComponent: "performant-ellipsis",
|
|
4733
|
-
...s.table,
|
|
4734
|
-
width: Number(s.table.width || 140),
|
|
4735
|
-
ellipsis: s.table.ellipsis ? {
|
|
4736
|
-
tooltip: !0,
|
|
4737
|
-
"line-clamp": s.table.clamp ?? 0
|
|
4738
|
-
} : !1,
|
|
4739
|
-
render: s.table.render ? await wa(s.key, s.table.render, i) : void 0,
|
|
4740
|
-
show: q.isMobile ? s.table.mobile ?? !1 : s.table.show ?? !0,
|
|
4741
|
-
pin: !!s.table.fixed,
|
|
4742
|
-
fixTemp: s.table.fixed
|
|
4743
|
-
};
|
|
4744
|
-
if (p.resizable && (p.minWidth = 80), t) {
|
|
4745
|
-
if (!p.form.edit.show) p = null;
|
|
4746
|
-
else {
|
|
4747
|
-
if (p.ellipsis = !1, p.resizable = !0, q.isMobile && (p.show = s.table.mobile), s.table.show && (n === 0 && (p.show = s.form.create.show), n === 1 && (p.show = s.form.edit.show), n === 2 && (p.show = s.form.show)), o && (s.form.rule.validator = () => !0), o === !1 && s.form.rule?.required && typeof s.form.rule.validator == "string") {
|
|
4748
|
-
delete s.form.rule.message;
|
|
4749
|
-
let e = s.form.rule.validator, t = Function("rule", "value", "index", "formValues", e);
|
|
4750
|
-
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());
|
|
4751
|
-
}
|
|
4752
|
-
p.render = function(e, t) {
|
|
4753
|
-
return f(he, {
|
|
4754
|
-
showLabel: !1,
|
|
4755
|
-
showFeedback: !1,
|
|
4756
|
-
path: `child[${t}].${s.key}`,
|
|
4757
|
-
rule: s.form.rule?.required ? {
|
|
4758
|
-
...s.form.rule,
|
|
4759
|
-
index: t
|
|
4760
|
-
} : void 0
|
|
4761
|
-
}, { default: () => f(wr, {
|
|
4762
|
-
item: s,
|
|
4763
|
-
formValue: e,
|
|
4764
|
-
status: n,
|
|
4765
|
-
itemIndex: t
|
|
4766
|
-
}) });
|
|
4767
|
-
};
|
|
4768
|
-
}
|
|
4769
|
-
}
|
|
4770
|
-
if (p && s.input !== "divider" && s.input !== "subTable" && (o && (p.show = s.form.expand.show), d.push(p)), s.input !== "divider" && s.input !== "switch" && s.input !== "subTable" && s.input !== "upload" && s.search.show) {
|
|
4771
|
-
if (s.search.title && (s.label = s.search.title), s.search.source) {
|
|
4772
|
-
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;
|
|
4773
|
-
else if (s.params.immediately || s.search.defaultValue) {
|
|
4774
|
-
let { sourceData: e, n: t } = await Oa(s.search.source);
|
|
4775
|
-
if (e && Array.isArray(e)) {
|
|
4776
|
-
if (s.sourceFn) {
|
|
4777
|
-
let t = s.sourceFn, n = Function("sourceData", t);
|
|
4778
|
-
s.params.options = n(e);
|
|
4779
|
-
} else s.params.options = Ta(s, e, t);
|
|
4780
|
-
}
|
|
4781
|
-
} else s.params._async = !0, s.params._fetch = !1, s.params._asyncFn = async () => {
|
|
4782
|
-
let { sourceData: e, n: t } = await Oa(s.search.source);
|
|
4783
|
-
if (e && Array.isArray(e)) {
|
|
4784
|
-
if (s.sourceFn) {
|
|
4785
|
-
let t = s.sourceFn;
|
|
4786
|
-
return Function("sourceData", t)(e);
|
|
4787
|
-
}
|
|
4788
|
-
return Ta(s, e, t);
|
|
4789
|
-
}
|
|
4790
|
-
};
|
|
4791
|
-
}
|
|
4792
|
-
if (s.search.multiple && (s.params.multiple = !0, s.search.defaultValue && (s.search.defaultValue = Sa(s.search.defaultValue))), s.search.show) {
|
|
4793
|
-
let e = H(s);
|
|
4794
|
-
e.params._async && (e.params._search = !0, e.params._asyncFn = async () => {
|
|
4795
|
-
let { sourceData: t, n } = await Oa(e.source || e.search.source);
|
|
4796
|
-
if (t && Array.isArray(t)) {
|
|
4797
|
-
if (e.sourceFn) {
|
|
4798
|
-
let n = e.sourceFn;
|
|
4799
|
-
return Function("sourceData", n)(t);
|
|
4800
|
-
}
|
|
4801
|
-
return Ta(e, t, n);
|
|
4802
|
-
}
|
|
4803
|
-
}), c.push({
|
|
4804
|
-
input: e.input,
|
|
4805
|
-
label: e.label,
|
|
4806
|
-
key: e.key,
|
|
4807
|
-
defaultValue: e.search.defaultValue,
|
|
4808
|
-
params: {
|
|
4809
|
-
...e.params,
|
|
4810
|
-
placeholder: e.label,
|
|
4811
|
-
filterable: !0,
|
|
4812
|
-
type: e.params.type
|
|
4813
|
-
},
|
|
4814
|
-
form: { show: e.search.show },
|
|
4815
|
-
search: e.search
|
|
4816
|
-
});
|
|
4817
|
-
}
|
|
4818
|
-
}
|
|
4819
|
-
s.input === "subTable" && s.params.link && !s.params.quest && (l.push(s.params.link), s.params.expandable && (u = {
|
|
4820
|
-
key: s.key,
|
|
4821
|
-
link: s.params.link,
|
|
4822
|
-
merge: s.params.merge
|
|
4823
|
-
}));
|
|
4824
|
-
}
|
|
4825
|
-
let g = [];
|
|
4826
|
-
if (h.length > 0) {
|
|
4827
|
-
for (let e of h) {
|
|
4828
|
-
if (typeof e == "string") {
|
|
4829
|
-
let t = d.find((t) => t.key === e);
|
|
4830
|
-
t && g.push(t);
|
|
4831
|
-
}
|
|
4832
|
-
if (typeof e == "object") {
|
|
4833
|
-
let t = e.children, n = [];
|
|
4834
|
-
for (let e of t) {
|
|
4835
|
-
let t = d.find((t) => t.key === e);
|
|
4836
|
-
t && n.push(t);
|
|
4837
|
-
}
|
|
4838
|
-
e.children = n, g.push(e);
|
|
4839
|
-
}
|
|
4840
|
-
}
|
|
4841
|
-
d = g;
|
|
4842
|
-
}
|
|
4843
|
-
return d.forEach((e) => {
|
|
4844
|
-
e.show && (s += e.width);
|
|
4845
|
-
}), {
|
|
4846
|
-
tableColumns: d,
|
|
4847
|
-
search: c,
|
|
4848
|
-
subTableIds: l,
|
|
4849
|
-
subTableExpand: u,
|
|
4850
|
-
tableWidth: s
|
|
4851
|
-
};
|
|
4852
|
-
}
|
|
4853
|
-
//#endregion
|
|
4854
|
-
//#region components/spin/index.vue?vue&type=script&lang.ts
|
|
4855
|
-
var Ra = d({
|
|
4471
|
+
var Ma = /*#__PURE__*/ Q(Da, [["render", ja]]), Na = d({
|
|
4856
4472
|
name: "UzSpin",
|
|
4857
4473
|
components: {
|
|
4858
4474
|
NButton: I,
|
|
@@ -4898,7 +4514,7 @@ var Ra = d({
|
|
|
4898
4514
|
});
|
|
4899
4515
|
//#endregion
|
|
4900
4516
|
//#region components/spin/index.vue
|
|
4901
|
-
function
|
|
4517
|
+
function Pa(e, t, n, i, a, s) {
|
|
4902
4518
|
let u = D("NEllipsis"), d = D("NButton"), f = D("NSpin");
|
|
4903
4519
|
return x(), r(f, { show: e.value }, {
|
|
4904
4520
|
description: N(() => [
|
|
@@ -4926,7 +4542,7 @@ function za(e, t, n, i, a, s) {
|
|
|
4926
4542
|
_: 3
|
|
4927
4543
|
}, 8, ["show"]);
|
|
4928
4544
|
}
|
|
4929
|
-
var
|
|
4545
|
+
var Fa = /*#__PURE__*/ Q(Na, [["render", Pa]]), Ia = d({
|
|
4930
4546
|
name: "UzTableExpand",
|
|
4931
4547
|
components: {
|
|
4932
4548
|
NDataTable: se,
|
|
@@ -4948,12 +4564,12 @@ var Ba = /*#__PURE__*/ Z(Ra, [["render", za]]), Va = d({
|
|
|
4948
4564
|
return y(async () => {
|
|
4949
4565
|
if (e.data.merge) try {
|
|
4950
4566
|
let t = e.data.merge, n = Function("formValue", "mainFormValue", "POST", t);
|
|
4951
|
-
r.value = await n(e.value[`sub_${e.data.key}`], { value: () => e.value },
|
|
4567
|
+
r.value = await n(e.value[`sub_${e.data.key}`], { value: () => e.value }, Z);
|
|
4952
4568
|
} catch (e) {
|
|
4953
|
-
|
|
4569
|
+
W(e);
|
|
4954
4570
|
}
|
|
4955
|
-
|
|
4956
|
-
let { tableColumns: r } = await
|
|
4571
|
+
fi(e.data.link).then(async (e) => {
|
|
4572
|
+
let { tableColumns: r } = await bi(mi(U.parse(e.viewJson).table), !0, 2, () => {}, {}, !1, !0), a = 0, o = r.map((e) => ({
|
|
4957
4573
|
...e,
|
|
4958
4574
|
sorter: !1,
|
|
4959
4575
|
resizable: !1
|
|
@@ -4974,7 +4590,7 @@ var Ba = /*#__PURE__*/ Z(Ra, [["render", za]]), Va = d({
|
|
|
4974
4590
|
});
|
|
4975
4591
|
//#endregion
|
|
4976
4592
|
//#region components/table/components/expand.vue
|
|
4977
|
-
function
|
|
4593
|
+
function La(e, t, n, i, a, o) {
|
|
4978
4594
|
let s = D("NDataTable");
|
|
4979
4595
|
return x(), r(s, {
|
|
4980
4596
|
columns: e.columns,
|
|
@@ -4993,18 +4609,18 @@ function Ha(e, t, n, i, a, o) {
|
|
|
4993
4609
|
"scroll-x"
|
|
4994
4610
|
]);
|
|
4995
4611
|
}
|
|
4996
|
-
var
|
|
4612
|
+
var Ra = /*#__PURE__*/ Q(Ia, [["render", La]]), za = d({
|
|
4997
4613
|
components: { NSkeleton: je },
|
|
4998
4614
|
setup() {
|
|
4999
4615
|
return {};
|
|
5000
4616
|
}
|
|
5001
|
-
}),
|
|
5002
|
-
function
|
|
4617
|
+
}), Ba = { class: "uz-flex uz-flex-col uz-gap-2 uz-flex-1 uz-h-full" }, Va = { class: "uz-flex uz-justify-between" }, Ha = { class: "uz-flex uz-gap-1" };
|
|
4618
|
+
function Ua(e, t, n, r, i, s) {
|
|
5003
4619
|
let c = D("NSkeleton");
|
|
5004
|
-
return x(), a("div",
|
|
4620
|
+
return x(), a("div", Ba, [o("div", Va, [l(c, {
|
|
5005
4621
|
width: 120,
|
|
5006
4622
|
size: "medium"
|
|
5007
|
-
}), o("div",
|
|
4623
|
+
}), o("div", Ha, [
|
|
5008
4624
|
l(c, {
|
|
5009
4625
|
width: 180,
|
|
5010
4626
|
size: "medium"
|
|
@@ -5037,7 +4653,7 @@ function Ja(e, t, n, r, i, s) {
|
|
|
5037
4653
|
}
|
|
5038
4654
|
//#endregion
|
|
5039
4655
|
//#region components/table/index.vue?vue&type=script&lang.ts
|
|
5040
|
-
var
|
|
4656
|
+
var Wa = d({
|
|
5041
4657
|
name: "UzTable",
|
|
5042
4658
|
components: {
|
|
5043
4659
|
NDataTable: se,
|
|
@@ -5047,9 +4663,9 @@ var Ya = d({
|
|
|
5047
4663
|
NCheckbox: ie,
|
|
5048
4664
|
NSpin: Ne,
|
|
5049
4665
|
VueDraggable: nt,
|
|
5050
|
-
UzSpin:
|
|
5051
|
-
TableExpand:
|
|
5052
|
-
SkeletonLoading: /* @__PURE__ */
|
|
4666
|
+
UzSpin: Fa,
|
|
4667
|
+
TableExpand: Ra,
|
|
4668
|
+
SkeletonLoading: /* @__PURE__ */ Q(za, [["render", Ua]])
|
|
5053
4669
|
},
|
|
5054
4670
|
props: {
|
|
5055
4671
|
id: {
|
|
@@ -5177,7 +4793,7 @@ var Ya = d({
|
|
|
5177
4793
|
value: () => null,
|
|
5178
4794
|
setValue: () => null
|
|
5179
4795
|
});
|
|
5180
|
-
let a = p("userStore"), o = Xe(), { t: s } = Ke(), c = Ue(), l = n(() =>
|
|
4796
|
+
let a = p("userStore"), o = Xe(), { t: s } = Ke(), c = Ue(), l = n(() => J.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({
|
|
5181
4797
|
params: [],
|
|
5182
4798
|
query: {
|
|
5183
4799
|
page: 1,
|
|
@@ -5189,7 +4805,7 @@ var Ya = d({
|
|
|
5189
4805
|
fetchFn: "",
|
|
5190
4806
|
when_drawer_open: "",
|
|
5191
4807
|
when_before_save: ""
|
|
5192
|
-
}), L = w(
|
|
4808
|
+
}), L = w(vi()), re = w(""), ie = w(!1), ae = w([]), R = w([]), oe = p("modules"), se = (e) => e.id, ce = (e, n) => {
|
|
5193
4809
|
t("update:rowKeys", {
|
|
5194
4810
|
keys: e,
|
|
5195
4811
|
rows: H(n)
|
|
@@ -5222,8 +4838,8 @@ var Ya = d({
|
|
|
5222
4838
|
});
|
|
5223
4839
|
else if (F.value.fetchFn) {
|
|
5224
4840
|
let e = F.value.fetchFn;
|
|
5225
|
-
r = Function("POST", "queryData", e)(
|
|
5226
|
-
} else r =
|
|
4841
|
+
r = Function("POST", "queryData", e)(Z, { ...t });
|
|
4842
|
+
} else r = Yn({
|
|
5227
4843
|
...t,
|
|
5228
4844
|
tableId: n
|
|
5229
4845
|
});
|
|
@@ -5236,8 +4852,8 @@ var Ya = d({
|
|
|
5236
4852
|
});
|
|
5237
4853
|
else if (F.value.fetchFn) {
|
|
5238
4854
|
let e = F.value.fetchFn;
|
|
5239
|
-
r = Function("POST", "queryData", e)(
|
|
5240
|
-
} else r =
|
|
4855
|
+
r = Function("POST", "queryData", e)(Z, { id: t.id });
|
|
4856
|
+
} else r = Yn({
|
|
5241
4857
|
id: t.id,
|
|
5242
4858
|
tableId: n
|
|
5243
4859
|
});
|
|
@@ -5247,23 +4863,23 @@ var Ya = d({
|
|
|
5247
4863
|
e.enableLoading && (_.value = !0, t("update:loading", !0));
|
|
5248
4864
|
let i = H(k.value);
|
|
5249
4865
|
n && delete i.orderby, F.value.fetch ? er([F.value.fetch], "", i).then((e) => {
|
|
5250
|
-
let n =
|
|
5251
|
-
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1), L.value.cache && r &&
|
|
4866
|
+
let n = At(e);
|
|
4867
|
+
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1), L.value.cache && r && G(`tables_${r}`, k.value);
|
|
5252
4868
|
}).catch(() => {
|
|
5253
4869
|
_.value = !1, v.value = !0, t("update:loading", !1);
|
|
5254
4870
|
}) : fe(i).then((e) => {
|
|
5255
|
-
let n =
|
|
5256
|
-
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1), L.value.cache && r &&
|
|
4871
|
+
let n = At(e);
|
|
4872
|
+
k.value.query = n.query, E.value = n.records, _.value = !1, v.value = !0, t("on-update:value", i), t("update:loading", !1), L.value.cache && r && G(`tables_${r}`, k.value);
|
|
5257
4873
|
}).catch(() => {
|
|
5258
4874
|
_.value = !1, v.value = !0, t("update:loading", !1);
|
|
5259
4875
|
});
|
|
5260
4876
|
}, me = (e) => {
|
|
5261
|
-
k.value.query.page = e, u.value && (u.value.scrollTop = 0),
|
|
4877
|
+
k.value.query.page = e, u.value && (u.value.scrollTop = 0), kt(), z();
|
|
5262
4878
|
}, he = () => {
|
|
5263
4879
|
let e = k.value.query.page + 1;
|
|
5264
4880
|
e > k.value.query.pageMax && (e = 1), k.value.query.page = e, u.value && (u.value.scrollTop = 0), z();
|
|
5265
4881
|
}, ge = (e) => {
|
|
5266
|
-
k.value.query.pageSize = e, k.value.query.page = 1,
|
|
4882
|
+
k.value.query.pageSize = e, k.value.query.page = 1, kt(), z();
|
|
5267
4883
|
}, _e = (e) => {
|
|
5268
4884
|
e && e.order ? k.value.orderby = `${e.columnKey} ${e.order.replace("end", "")}` : delete k.value.orderby, z();
|
|
5269
4885
|
}, B = () => {
|
|
@@ -5287,7 +4903,7 @@ var Ya = d({
|
|
|
5287
4903
|
show: !0,
|
|
5288
4904
|
ellipsis: !1,
|
|
5289
4905
|
width: 180,
|
|
5290
|
-
render: (e) => [f("div", {}, { default: () => e.createBy }), f("div", {}, { default: () =>
|
|
4906
|
+
render: (e) => [f("div", {}, { default: () => e.createBy }), f("div", {}, { default: () => jt(e.createTime, "yyyy-MM-dd hh:mm:ss") })]
|
|
5291
4907
|
}, {
|
|
5292
4908
|
title: "更新人/时间",
|
|
5293
4909
|
key: "updateTime",
|
|
@@ -5296,9 +4912,9 @@ var Ya = d({
|
|
|
5296
4912
|
show: !0,
|
|
5297
4913
|
ellipsis: !0,
|
|
5298
4914
|
width: 180,
|
|
5299
|
-
render: (e) => [f("div", {}, { default: () => e.updateBy }), f("div", {}, { default: () =>
|
|
4915
|
+
render: (e) => [f("div", {}, { default: () => e.updateBy }), f("div", {}, { default: () => jt(e.updateTime, "yyyy-MM-dd hh:mm:ss") })]
|
|
5300
4916
|
}], xe = (t) => a?.remainingDays < 0 && t === "add" ? !0 : !e.ruleFetch || !M.value || M.value && M.value[0] === "*" ? !1 : !M.value?.includes(t), Se = async (e) => {
|
|
5301
|
-
let { form: t, fillingDefaultValue: n, formDefaultValue: r } = await
|
|
4917
|
+
let { form: t, fillingDefaultValue: n, formDefaultValue: r } = await yi(N.value, e, () => m.value?.getFormValues());
|
|
5302
4918
|
return x.value = t, {
|
|
5303
4919
|
form: t,
|
|
5304
4920
|
fillingDefaultValue: n,
|
|
@@ -5316,17 +4932,17 @@ var Ya = d({
|
|
|
5316
4932
|
...i
|
|
5317
4933
|
};
|
|
5318
4934
|
if (t && typeof t == "string") try {
|
|
5319
|
-
a = await Function("rowData", "POST", "fnNotification", t)(a,
|
|
4935
|
+
a = await Function("rowData", "POST", "fnNotification", t)(a, Z, c).catch(() => null);
|
|
5320
4936
|
} catch (e) {
|
|
5321
|
-
|
|
4937
|
+
W(e);
|
|
5322
4938
|
}
|
|
5323
4939
|
let o = F.value.when_drawer_open;
|
|
5324
4940
|
if (o && typeof o == "string") try {
|
|
5325
|
-
a = await Function("data", "POST", o)(a,
|
|
5326
|
-
|
|
4941
|
+
a = await Function("data", "POST", o)(a, Z).catch((e) => {
|
|
4942
|
+
W(e);
|
|
5327
4943
|
});
|
|
5328
4944
|
} catch (e) {
|
|
5329
|
-
|
|
4945
|
+
W(e);
|
|
5330
4946
|
}
|
|
5331
4947
|
return {
|
|
5332
4948
|
form: r,
|
|
@@ -5347,13 +4963,13 @@ var Ya = d({
|
|
|
5347
4963
|
Ce(e).then((r) => {
|
|
5348
4964
|
if (n.optionsType === "drawer:insider") {
|
|
5349
4965
|
if (i) try {
|
|
5350
|
-
Function("rowData", "POST", "fnNotification", i)(r,
|
|
4966
|
+
Function("rowData", "POST", "fnNotification", i)(r, Z, c).then((e) => {
|
|
5351
4967
|
m.value?.link(n.optionsSource || "", void 0, e);
|
|
5352
4968
|
}).catch((e) => {
|
|
5353
|
-
|
|
4969
|
+
W(e);
|
|
5354
4970
|
});
|
|
5355
4971
|
} catch (e) {
|
|
5356
|
-
|
|
4972
|
+
W(e);
|
|
5357
4973
|
}
|
|
5358
4974
|
} else t("update:suffixes", {
|
|
5359
4975
|
title: n.buttonText,
|
|
@@ -5393,15 +5009,15 @@ var Ya = d({
|
|
|
5393
5009
|
sub_table_ids: r
|
|
5394
5010
|
}), i.then(() => {
|
|
5395
5011
|
if (t) try {
|
|
5396
|
-
Function("rowData", "fnNotification", "POST", t)(n, c,
|
|
5012
|
+
Function("rowData", "fnNotification", "POST", t)(n, c, Z).then(() => {
|
|
5397
5013
|
z();
|
|
5398
5014
|
}).catch(() => null);
|
|
5399
5015
|
} catch (e) {
|
|
5400
|
-
|
|
5016
|
+
W(e);
|
|
5401
5017
|
}
|
|
5402
5018
|
else z();
|
|
5403
5019
|
}).catch((e) => {
|
|
5404
|
-
|
|
5020
|
+
W(e);
|
|
5405
5021
|
});
|
|
5406
5022
|
};
|
|
5407
5023
|
} else if (n.type !== "group" && n.action === "disabledInside") n.onClick = (t) => {
|
|
@@ -5435,10 +5051,10 @@ var Ya = d({
|
|
|
5435
5051
|
duration: 3e3
|
|
5436
5052
|
}), z();
|
|
5437
5053
|
}).catch((e) => {
|
|
5438
|
-
|
|
5054
|
+
W(e);
|
|
5439
5055
|
});
|
|
5440
5056
|
} catch (e) {
|
|
5441
|
-
|
|
5057
|
+
W(e);
|
|
5442
5058
|
}
|
|
5443
5059
|
else e && typeof e == "function" ? e(r, t, () => {
|
|
5444
5060
|
c.success({
|
|
@@ -5459,8 +5075,8 @@ var Ya = d({
|
|
|
5459
5075
|
};
|
|
5460
5076
|
}
|
|
5461
5077
|
}, Ee = async () => {
|
|
5462
|
-
ie.value = !1,
|
|
5463
|
-
let { tableColumns: n, search: r, subTableIds: i, subTableExpand: a } = await
|
|
5078
|
+
ie.value = !1, ui();
|
|
5079
|
+
let { tableColumns: n, search: r, subTableIds: i, subTableExpand: a } = await bi(N.value, e.child, 0, () => ({}), oe);
|
|
5464
5080
|
!l.value && L.value.index && n.unshift({
|
|
5465
5081
|
title: "#",
|
|
5466
5082
|
key: "index",
|
|
@@ -5514,10 +5130,10 @@ var Ya = d({
|
|
|
5514
5130
|
}
|
|
5515
5131
|
let u = n;
|
|
5516
5132
|
if (c) {
|
|
5517
|
-
let e =
|
|
5133
|
+
let e = K(`tables_filter_${c}`, !1);
|
|
5518
5134
|
if (e) try {
|
|
5519
5135
|
let t = await Qn(c);
|
|
5520
|
-
t && (e = JSON.parse(t), u =
|
|
5136
|
+
t && (e = JSON.parse(t), u = zt(n, e));
|
|
5521
5137
|
} catch {}
|
|
5522
5138
|
}
|
|
5523
5139
|
a.link && u.unshift({
|
|
@@ -5529,7 +5145,7 @@ var Ya = d({
|
|
|
5529
5145
|
filter: "default",
|
|
5530
5146
|
filterOptionValue: null,
|
|
5531
5147
|
renderFilterMenu: () => f("div", { class: "uz-table-filter" }, [f(I, { onClick: Be }, { default: () => s("Common.expand") }), f(I, { onClick: Ve }, { default: () => s("Common.contract") })]),
|
|
5532
|
-
renderExpand: (e) => f(
|
|
5148
|
+
renderExpand: (e) => f(Ra, {
|
|
5533
5149
|
data: a,
|
|
5534
5150
|
value: e
|
|
5535
5151
|
})
|
|
@@ -5549,7 +5165,7 @@ var Ya = d({
|
|
|
5549
5165
|
let e = 0;
|
|
5550
5166
|
C.value.forEach((t) => {
|
|
5551
5167
|
t.show && (e += Number(t.width || 140));
|
|
5552
|
-
}), D.value = e,
|
|
5168
|
+
}), D.value = e, G(`tables_filter_${n}`, t.filter((e) => e.key)), $n({
|
|
5553
5169
|
table_id: n,
|
|
5554
5170
|
data: JSON.stringify(t)
|
|
5555
5171
|
}).catch(() => null);
|
|
@@ -5595,14 +5211,14 @@ var Ya = d({
|
|
|
5595
5211
|
fetchFn: "",
|
|
5596
5212
|
when_drawer_open: "",
|
|
5597
5213
|
when_before_save: ""
|
|
5598
|
-
}, L.value =
|
|
5214
|
+
}, L.value = vi();
|
|
5599
5215
|
}, Fe = (t) => {
|
|
5600
|
-
let n =
|
|
5601
|
-
b.value = t.tableTitle, N.value =
|
|
5216
|
+
let n = U.parse(t.viewJson);
|
|
5217
|
+
b.value = t.tableTitle, N.value = mi(n.table), P.value = _r(e.actions || n.action);
|
|
5602
5218
|
let r = _r(n.suffix || []);
|
|
5603
|
-
ne.value = r.filter((e) => e.main).map((e) => (Le(e), e)), F.value =
|
|
5604
|
-
let i =
|
|
5605
|
-
t.tableTitle && i.title &&
|
|
5219
|
+
ne.value = r.filter((e) => e.main).map((e) => (Le(e), e)), F.value = gi(n.trigger);
|
|
5220
|
+
let i = vi(e.options ?? n.option);
|
|
5221
|
+
t.tableTitle && i.title && Mt(t.tableTitle), L.value = i;
|
|
5606
5222
|
}, Ie = async () => {
|
|
5607
5223
|
v.value = !1, Pe();
|
|
5608
5224
|
let t = e.id || o.params.id;
|
|
@@ -5619,7 +5235,7 @@ var Ya = d({
|
|
|
5619
5235
|
re.value = s("Notice.network"), ie.value = !0;
|
|
5620
5236
|
return;
|
|
5621
5237
|
}
|
|
5622
|
-
Oe(), e.columns ? (N.value = e.columns || [], P.value = e.actions || [], ne.value = e.suffixes || [], L.value =
|
|
5238
|
+
Oe(), e.columns ? (N.value = e.columns || [], P.value = e.actions || [], ne.value = e.suffixes || [], L.value = vi(e.options), await Ee()) : await fi(t).then(async (e) => {
|
|
5623
5239
|
Fe(e), await Ee();
|
|
5624
5240
|
}).catch((e) => {
|
|
5625
5241
|
re.value = e?.message || s("Notice.network"), ie.value = !0;
|
|
@@ -5647,9 +5263,9 @@ var Ya = d({
|
|
|
5647
5263
|
e.onClick = async () => {
|
|
5648
5264
|
if (t && typeof t == "string") try {
|
|
5649
5265
|
let e = Function("rowData", "POST", "fnNotification", t);
|
|
5650
|
-
await e(R.value,
|
|
5266
|
+
await e(R.value, Z, c, e), z();
|
|
5651
5267
|
} catch (e) {
|
|
5652
|
-
|
|
5268
|
+
W(e);
|
|
5653
5269
|
}
|
|
5654
5270
|
};
|
|
5655
5271
|
}
|
|
@@ -5657,7 +5273,7 @@ var Ya = d({
|
|
|
5657
5273
|
if (_.value) return;
|
|
5658
5274
|
_.value = !0;
|
|
5659
5275
|
let t = e.id || o.params.id;
|
|
5660
|
-
t && (
|
|
5276
|
+
t && (Et(`tables_filter_${t}`), $n({
|
|
5661
5277
|
table_id: t,
|
|
5662
5278
|
data: null
|
|
5663
5279
|
}).catch(() => null).finally(() => {
|
|
@@ -5684,7 +5300,7 @@ var Ya = d({
|
|
|
5684
5300
|
}), j(() => e.height, () => {
|
|
5685
5301
|
Oe();
|
|
5686
5302
|
}), j([() => o.params.id, () => e.id], async () => {
|
|
5687
|
-
|
|
5303
|
+
kt(), await Ie();
|
|
5688
5304
|
}), j(() => e.defaultCheckedRowKeys, (e) => {
|
|
5689
5305
|
let t = e || [], n = R.value.filter((e) => t.includes(e.id));
|
|
5690
5306
|
ae.value = t, R.value = n;
|
|
@@ -5735,14 +5351,14 @@ var Ya = d({
|
|
|
5735
5351
|
}
|
|
5736
5352
|
};
|
|
5737
5353
|
}
|
|
5738
|
-
}),
|
|
5354
|
+
}), Ga = { class: "uz-com-title" }, Ka = {
|
|
5739
5355
|
ref: "mRef",
|
|
5740
5356
|
class: "uz-table-m-content"
|
|
5741
|
-
},
|
|
5357
|
+
}, qa = {
|
|
5742
5358
|
key: 1,
|
|
5743
5359
|
class: "uz-transform-fade-in"
|
|
5744
|
-
},
|
|
5745
|
-
function
|
|
5360
|
+
}, Ja = { class: "uz-com-title" }, Ya = ["data-index"];
|
|
5361
|
+
function Xa(t, n, u, d, f, p) {
|
|
5746
5362
|
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"), j = D("UzSearchBar"), M = D("NDataTable"), ne = D("NSpin"), F = D("UzTableDrawer");
|
|
5747
5363
|
return x(), a("div", {
|
|
5748
5364
|
class: "uz-table",
|
|
@@ -5807,7 +5423,7 @@ function to(t, n, u, d, f, p) {
|
|
|
5807
5423
|
key: "0"
|
|
5808
5424
|
} : {
|
|
5809
5425
|
name: "header",
|
|
5810
|
-
fn: N(() => [o("div",
|
|
5426
|
+
fn: N(() => [o("div", Ga, A(t.title), 1)]),
|
|
5811
5427
|
key: "1"
|
|
5812
5428
|
}]), 1032, [
|
|
5813
5429
|
"data",
|
|
@@ -5815,7 +5431,7 @@ function to(t, n, u, d, f, p) {
|
|
|
5815
5431
|
"cache",
|
|
5816
5432
|
"loading",
|
|
5817
5433
|
"onOnUpdate:value"
|
|
5818
|
-
]), o("div",
|
|
5434
|
+
]), o("div", Ka, [l(C, {
|
|
5819
5435
|
tableColumns: t.tableCols,
|
|
5820
5436
|
tableData: t.tableData,
|
|
5821
5437
|
tableQueries: t.tableQueries,
|
|
@@ -5833,7 +5449,7 @@ function to(t, n, u, d, f, p) {
|
|
|
5833
5449
|
"minH",
|
|
5834
5450
|
"maxH",
|
|
5835
5451
|
"onUpdate:rowKeys"
|
|
5836
|
-
])], 512)], 2)) : (x(), a("div",
|
|
5452
|
+
])], 512)], 2)) : (x(), a("div", qa, [l(j, {
|
|
5837
5453
|
data: t.searchData,
|
|
5838
5454
|
id: t.id || t.route.params.id,
|
|
5839
5455
|
cache: t.tableOption.cache,
|
|
@@ -5888,7 +5504,7 @@ function to(t, n, u, d, f, p) {
|
|
|
5888
5504
|
_: 1
|
|
5889
5505
|
})]),
|
|
5890
5506
|
_: 1
|
|
5891
|
-
})], 8,
|
|
5507
|
+
})], 8, Ya)), [[te, !e.hide]])), 128)), l(h, {
|
|
5892
5508
|
block: "",
|
|
5893
5509
|
tertiary: "",
|
|
5894
5510
|
loading: t.loading,
|
|
@@ -5942,7 +5558,7 @@ function to(t, n, u, d, f, p) {
|
|
|
5942
5558
|
key: "0"
|
|
5943
5559
|
} : {
|
|
5944
5560
|
name: "header",
|
|
5945
|
-
fn: N(() => [o("div",
|
|
5561
|
+
fn: N(() => [o("div", Ja, A(t.title), 1)]),
|
|
5946
5562
|
key: "1"
|
|
5947
5563
|
}]), 1032, [
|
|
5948
5564
|
"data",
|
|
@@ -6003,10 +5619,10 @@ function to(t, n, u, d, f, p) {
|
|
|
6003
5619
|
l(F, { ref: "drawerRef" }, null, 512)
|
|
6004
5620
|
], 4);
|
|
6005
5621
|
}
|
|
6006
|
-
var
|
|
5622
|
+
var Za = /*#__PURE__*/ Q(Wa, [["render", Xa]]), Qa = d({
|
|
6007
5623
|
name: "UzTableChild",
|
|
6008
5624
|
components: {
|
|
6009
|
-
UzIcon:
|
|
5625
|
+
UzIcon: qt,
|
|
6010
5626
|
NSpin: Ne,
|
|
6011
5627
|
NButton: I,
|
|
6012
5628
|
NIcon: B,
|
|
@@ -6032,7 +5648,7 @@ var no = /*#__PURE__*/ Z(Ya, [["render", to]]), ro = d({
|
|
|
6032
5648
|
emits: ["update:value"],
|
|
6033
5649
|
setup(e, { emit: t, expose: r }) {
|
|
6034
5650
|
let i = p("emitSuffix"), a = p("modules"), o = p("mainFormValue"), s = p("childFormReload"), c = n(() => s ? s() : 0), { t: l } = Ke(), 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) => {
|
|
6035
|
-
let { formDefaultValue: r, fillingDefaultArray: i } = await
|
|
5651
|
+
let { formDefaultValue: r, fillingDefaultArray: i } = await yi(H(n ?? e.item.params.columns), t, void 0, !0);
|
|
6036
5652
|
return S.value = r, i;
|
|
6037
5653
|
}, D = async (t) => {
|
|
6038
5654
|
if (g.value) return;
|
|
@@ -6051,9 +5667,9 @@ var no = /*#__PURE__*/ Z(Ya, [["render", to]]), ro = d({
|
|
|
6051
5667
|
});
|
|
6052
5668
|
}), e.item.params.init && r.length === 0 && e.status === 0 && (r = [S.value]), e.item.params.merge && typeof e.item.params.merge == "string") try {
|
|
6053
5669
|
let t = e.item.params.merge;
|
|
6054
|
-
r = await Function("formValue", "mainFormValue", "POST", t)(r, o,
|
|
5670
|
+
r = await Function("formValue", "mainFormValue", "POST", t)(r, o, Z);
|
|
6055
5671
|
} catch (e) {
|
|
6056
|
-
|
|
5672
|
+
W(e);
|
|
6057
5673
|
}
|
|
6058
5674
|
b.value.child = r, g.value = !1, h(() => {
|
|
6059
5675
|
P();
|
|
@@ -6063,7 +5679,7 @@ var no = /*#__PURE__*/ Z(Ya, [["render", to]]), ro = d({
|
|
|
6063
5679
|
});
|
|
6064
5680
|
}, O = (e) => e.delete ? "uz-table-child-delete" : "", k = async (t, n = !1) => {
|
|
6065
5681
|
e.item._suffix && (C.value = e.item._suffix.filter((e) => e.sub)), await E(e.value, t);
|
|
6066
|
-
let { tableColumns: r, tableWidth: i } = await
|
|
5682
|
+
let { tableColumns: r, tableWidth: i } = await bi(H(t ?? e.item.params.columns), !0, e.status, () => b.value.child, a, n), s = i;
|
|
6067
5683
|
r.unshift({
|
|
6068
5684
|
title: " ",
|
|
6069
5685
|
key: "index",
|
|
@@ -6082,7 +5698,7 @@ var no = /*#__PURE__*/ Z(Ya, [["render", to]]), ro = d({
|
|
|
6082
5698
|
hide: !0,
|
|
6083
5699
|
show: !0,
|
|
6084
5700
|
render() {
|
|
6085
|
-
return f("div", { class: "flex justify-center" }, f(B, {}, { default: () => f(
|
|
5701
|
+
return f("div", { class: "flex justify-center" }, f(B, {}, { default: () => f(qt, { icon: "Add" }) }));
|
|
6086
5702
|
}
|
|
6087
5703
|
}), s += 40), e.status !== 2 && e.item.params.showActions && r.push({
|
|
6088
5704
|
title: () => l("Common.action"),
|
|
@@ -6125,7 +5741,7 @@ var no = /*#__PURE__*/ Z(Ya, [["render", to]]), ro = d({
|
|
|
6125
5741
|
let n = e.item.params.summary;
|
|
6126
5742
|
return Function("pageData", "h", n)(t, f);
|
|
6127
5743
|
} catch (e) {
|
|
6128
|
-
|
|
5744
|
+
W(e);
|
|
6129
5745
|
}
|
|
6130
5746
|
}
|
|
6131
5747
|
return [];
|
|
@@ -6144,7 +5760,7 @@ var no = /*#__PURE__*/ Z(Ya, [["render", to]]), ro = d({
|
|
|
6144
5760
|
mainFormValue: o,
|
|
6145
5761
|
children: () => b.value.child,
|
|
6146
5762
|
callback: async (e) => {
|
|
6147
|
-
let t = await n(e, o,
|
|
5763
|
+
let t = await n(e, o, Z);
|
|
6148
5764
|
b.value.child = [...b.value.child, ...t], h(() => {
|
|
6149
5765
|
P();
|
|
6150
5766
|
});
|
|
@@ -6161,7 +5777,7 @@ var no = /*#__PURE__*/ Z(Ya, [["render", to]]), ro = d({
|
|
|
6161
5777
|
}
|
|
6162
5778
|
});
|
|
6163
5779
|
} catch (e) {
|
|
6164
|
-
|
|
5780
|
+
W(e);
|
|
6165
5781
|
}
|
|
6166
5782
|
}, M = () => {
|
|
6167
5783
|
m.value?.restoreValidation();
|
|
@@ -6173,7 +5789,7 @@ var no = /*#__PURE__*/ Z(Ya, [["render", to]]), ro = d({
|
|
|
6173
5789
|
})), P = () => {
|
|
6174
5790
|
if (e.item.params.draggable && e.status !== 2 && u.value && !d.value) {
|
|
6175
5791
|
let e = u.value.$el.querySelector(".n-data-table-tbody");
|
|
6176
|
-
e && (d.value =
|
|
5792
|
+
e && (d.value = rt.create(e, {
|
|
6177
5793
|
handle: ".uz-drag-handle",
|
|
6178
5794
|
onEnd: ({ oldIndex: e, newIndex: t }) => {
|
|
6179
5795
|
d.value?.destroy(), d.value = null, _.value = !1;
|
|
@@ -6235,14 +5851,14 @@ var no = /*#__PURE__*/ Z(Ya, [["render", to]]), ro = d({
|
|
|
6235
5851
|
}
|
|
6236
5852
|
};
|
|
6237
5853
|
}
|
|
6238
|
-
}),
|
|
5854
|
+
}), $a = { class: "uz-flex-1 uz-w-full" }, eo = { class: "uz-flex uz-justify-between" }, to = { class: "uz-com-title" }, no = {
|
|
6239
5855
|
key: 0,
|
|
6240
5856
|
class: "uz-table-asterisk"
|
|
6241
|
-
},
|
|
6242
|
-
function
|
|
5857
|
+
}, ro = { class: "uz-flex uz-gap-2" }, io = { class: "uz-flex uz-justify-end uz-gap-2" };
|
|
5858
|
+
function ao(t, n, u, d, f, p) {
|
|
6243
5859
|
let m = D("UzIcon"), h = D("NIcon"), _ = D("NButton"), v = D("NDataTable"), y = D("NForm");
|
|
6244
|
-
return x(), a("div",
|
|
6245
|
-
o("div",
|
|
5860
|
+
return x(), a("div", $a, [
|
|
5861
|
+
o("div", eo, [o("div", to, [c(A(t.item.label) + " ", 1), t.item.form.rule.required ? (x(), a("span", no, " \xA0* ")) : i("", !0)]), o("div", ro, [
|
|
6246
5862
|
t.status === 2 ? i("", !0) : (x(!0), a(e, { key: 0 }, T(t.suffixes, (e) => (x(), r(_, {
|
|
6247
5863
|
key: e.key,
|
|
6248
5864
|
type: e.color,
|
|
@@ -6315,7 +5931,7 @@ function uo(t, n, u, d, f, p) {
|
|
|
6315
5931
|
"scroll-x",
|
|
6316
5932
|
"class",
|
|
6317
5933
|
"row-class-name"
|
|
6318
|
-
])) : i("", !0), o("div",
|
|
5934
|
+
])) : i("", !0), o("div", io, [t.item.params.optionsType && t.status !== 2 && (t.item.form.edit ? !t.item.form.edit.readonly : !t.item.form.readonly) ? (x(), r(_, {
|
|
6319
5935
|
key: 0,
|
|
6320
5936
|
type: "success",
|
|
6321
5937
|
secondary: "",
|
|
@@ -6344,7 +5960,7 @@ function uo(t, n, u, d, f, p) {
|
|
|
6344
5960
|
}, 8, ["model"])
|
|
6345
5961
|
]);
|
|
6346
5962
|
}
|
|
6347
|
-
var
|
|
5963
|
+
var oo = /*#__PURE__*/ Q(Qa, [["render", ao]]), so = d({
|
|
6348
5964
|
name: "UzTableQuestChild",
|
|
6349
5965
|
components: { NDataTable: se },
|
|
6350
5966
|
props: {
|
|
@@ -6372,7 +5988,7 @@ var fo = /*#__PURE__*/ Z(ro, [["render", uo]]), po = d({
|
|
|
6372
5988
|
}), o.value = t, i.value = !1;
|
|
6373
5989
|
}
|
|
6374
5990
|
}, l = async (i) => {
|
|
6375
|
-
let { tableColumns: c, tableWidth: l } = await
|
|
5991
|
+
let { tableColumns: c, tableWidth: l } = await bi(H(i ?? e.item.params.columns), !0, 2, () => o.value, t), u = l;
|
|
6376
5992
|
c.unshift({
|
|
6377
5993
|
title: " ",
|
|
6378
5994
|
key: "index",
|
|
@@ -6412,7 +6028,7 @@ var fo = /*#__PURE__*/ Z(ro, [["render", uo]]), po = d({
|
|
|
6412
6028
|
}), M(async () => {
|
|
6413
6029
|
try {
|
|
6414
6030
|
if (e.formValue && e.formValue.id && e.item.params.searchKey) {
|
|
6415
|
-
let t = await
|
|
6031
|
+
let t = await Yn({
|
|
6416
6032
|
tableId: e.item.params.link,
|
|
6417
6033
|
params: [{
|
|
6418
6034
|
key: e.item.params.searchKey,
|
|
@@ -6438,7 +6054,7 @@ var fo = /*#__PURE__*/ Z(ro, [["render", uo]]), po = d({
|
|
|
6438
6054
|
let n = e.item.params.summary;
|
|
6439
6055
|
return Function("pageData", "h", n)(t, f);
|
|
6440
6056
|
} catch (e) {
|
|
6441
|
-
|
|
6057
|
+
W(e);
|
|
6442
6058
|
}
|
|
6443
6059
|
}
|
|
6444
6060
|
return [];
|
|
@@ -6446,11 +6062,11 @@ var fo = /*#__PURE__*/ Z(ro, [["render", uo]]), po = d({
|
|
|
6446
6062
|
tableScrollX: s
|
|
6447
6063
|
};
|
|
6448
6064
|
}
|
|
6449
|
-
}),
|
|
6450
|
-
function
|
|
6065
|
+
}), co = { class: "uz-flex-1 uz-w-full" }, lo = { class: "uz-flex uz-justify-between" }, uo = { class: "uz-com-title" };
|
|
6066
|
+
function fo(e, t, n, r, i, s) {
|
|
6451
6067
|
let c = D("NDataTable"), u = D("UzTableDrawer");
|
|
6452
|
-
return x(), a("div",
|
|
6453
|
-
o("div",
|
|
6068
|
+
return x(), a("div", co, [
|
|
6069
|
+
o("div", lo, [o("div", uo, A(e.item.label), 1)]),
|
|
6454
6070
|
t[0] ||= o("div", { class: "uz-br" }, null, -1),
|
|
6455
6071
|
l(c, {
|
|
6456
6072
|
columns: e.columns,
|
|
@@ -6472,7 +6088,7 @@ function _o(e, t, n, r, i, s) {
|
|
|
6472
6088
|
l(u, { ref: "drawerRef" }, null, 512)
|
|
6473
6089
|
]);
|
|
6474
6090
|
}
|
|
6475
|
-
var
|
|
6091
|
+
var po = /*#__PURE__*/ Q(so, [["render", fo]]), mo = d({
|
|
6476
6092
|
name: "UzTableDrawer",
|
|
6477
6093
|
components: {
|
|
6478
6094
|
NButton: I,
|
|
@@ -6485,7 +6101,7 @@ var vo = /*#__PURE__*/ Z(po, [["render", _o]]), yo = d({
|
|
|
6485
6101
|
},
|
|
6486
6102
|
emits: ["update:show", "on-submit"],
|
|
6487
6103
|
setup(e, { emit: t, expose: r }) {
|
|
6488
|
-
let i = n(() =>
|
|
6104
|
+
let i = n(() => J.isMobile), a = w(), o = w(""), s = w(0), c = w({}), l = w({
|
|
6489
6105
|
link: "",
|
|
6490
6106
|
linkFn: ""
|
|
6491
6107
|
}), u = w(!1), d = w({
|
|
@@ -6513,7 +6129,7 @@ var vo = /*#__PURE__*/ Z(po, [["render", _o]]), yo = d({
|
|
|
6513
6129
|
}), b = w(!1), x = w(), S = () => {
|
|
6514
6130
|
a.value?.restoreValidation(), c.value = {}, p.value = !1, f.value = !1, u.value = !1, t("update:show", !1);
|
|
6515
6131
|
}, C = () => {
|
|
6516
|
-
s.value === 2 ? S() :
|
|
6132
|
+
s.value === 2 ? S() : Tt.info({
|
|
6517
6133
|
title: "提示",
|
|
6518
6134
|
content: "关闭后修改的数据将不保留,确定关闭?",
|
|
6519
6135
|
positiveText: "确定",
|
|
@@ -6526,13 +6142,13 @@ var vo = /*#__PURE__*/ Z(po, [["render", _o]]), yo = d({
|
|
|
6526
6142
|
}, T = (e) => {
|
|
6527
6143
|
let t = y.value.when_drawer_open;
|
|
6528
6144
|
if (t && typeof t == "string") try {
|
|
6529
|
-
Function("formValues", "POST", t)(e,
|
|
6145
|
+
Function("formValues", "POST", t)(e, Z).then((e) => {
|
|
6530
6146
|
c.value = e;
|
|
6531
6147
|
}).catch((e) => {
|
|
6532
|
-
|
|
6148
|
+
W(e);
|
|
6533
6149
|
});
|
|
6534
6150
|
} catch (e) {
|
|
6535
|
-
|
|
6151
|
+
W(e);
|
|
6536
6152
|
}
|
|
6537
6153
|
else c.value = e;
|
|
6538
6154
|
};
|
|
@@ -6544,13 +6160,13 @@ var vo = /*#__PURE__*/ Z(po, [["render", _o]]), yo = d({
|
|
|
6544
6160
|
linkFn: t
|
|
6545
6161
|
};
|
|
6546
6162
|
let r = e.split(".")[0];
|
|
6547
|
-
|
|
6163
|
+
fi(r).then((e) => {
|
|
6548
6164
|
h(async () => {
|
|
6549
|
-
let t =
|
|
6550
|
-
d.value =
|
|
6551
|
-
let { form: i } = await
|
|
6165
|
+
let t = U.parse(e.viewJson);
|
|
6166
|
+
d.value = vi(t.option), u.value = !0;
|
|
6167
|
+
let { form: i } = await yi(mi(t.table), n);
|
|
6552
6168
|
y.value = t.trigger, n && T(n);
|
|
6553
|
-
let a =
|
|
6169
|
+
let a = K(`tables_cache_link_${r}`, !1);
|
|
6554
6170
|
a && (c.value = a), h(() => {
|
|
6555
6171
|
v.value = i, m.value = !1;
|
|
6556
6172
|
});
|
|
@@ -6562,7 +6178,7 @@ var vo = /*#__PURE__*/ Z(po, [["render", _o]]), yo = d({
|
|
|
6562
6178
|
},
|
|
6563
6179
|
addAndEdit: async (e, t, n, r, i = 0, a) => {
|
|
6564
6180
|
o.value = e, m.value = !0, s.value = i, d.value = n, y.value = r, u.value = !0, t().then(({ form: t, data: n }) => {
|
|
6565
|
-
let r =
|
|
6181
|
+
let r = K(`tables_cache_${e}`, !1);
|
|
6566
6182
|
r && i === 0 ? c.value = r : c.value = n, v.value = t, x.value = a, m.value = !1;
|
|
6567
6183
|
}).catch(() => null);
|
|
6568
6184
|
},
|
|
@@ -6588,7 +6204,7 @@ var vo = /*#__PURE__*/ Z(po, [["render", _o]]), yo = d({
|
|
|
6588
6204
|
_.value = 0, p.value = !0, a.value?.validate().then(async (e) => {
|
|
6589
6205
|
if (y.value.when_before_save) try {
|
|
6590
6206
|
let t = y.value.when_before_save;
|
|
6591
|
-
e = await Function("data", "POST", t)(e,
|
|
6207
|
+
e = await Function("data", "POST", t)(e, Z).catch((e) => {
|
|
6592
6208
|
_.value = 1, g.value = e.message;
|
|
6593
6209
|
});
|
|
6594
6210
|
} catch (e) {
|
|
@@ -6596,7 +6212,7 @@ var vo = /*#__PURE__*/ Z(po, [["render", _o]]), yo = d({
|
|
|
6596
6212
|
return;
|
|
6597
6213
|
}
|
|
6598
6214
|
if (x.value) x.value(e, () => {
|
|
6599
|
-
|
|
6215
|
+
Et(`tables_cache_${o.value}`), S();
|
|
6600
6216
|
}, (e) => {
|
|
6601
6217
|
_.value = 1, g.value = e;
|
|
6602
6218
|
});
|
|
@@ -6606,7 +6222,7 @@ var vo = /*#__PURE__*/ Z(po, [["render", _o]]), yo = d({
|
|
|
6606
6222
|
tableId: n,
|
|
6607
6223
|
...e
|
|
6608
6224
|
}).then(() => {
|
|
6609
|
-
|
|
6225
|
+
ui(), Yn({ tableId: n }).then((e) => {
|
|
6610
6226
|
let r = l.value.link.split("."), i;
|
|
6611
6227
|
if (l.value.linkFn) {
|
|
6612
6228
|
let t = l.value.linkFn;
|
|
@@ -6617,7 +6233,7 @@ var vo = /*#__PURE__*/ Z(po, [["render", _o]]), yo = d({
|
|
|
6617
6233
|
disabled: e?.status === "0",
|
|
6618
6234
|
params: e
|
|
6619
6235
|
}));
|
|
6620
|
-
p.value = !1,
|
|
6236
|
+
p.value = !1, Et(`tables_cache_link_${n}`), t("on-submit", i), S();
|
|
6621
6237
|
}).catch((e) => {
|
|
6622
6238
|
_.value = 1, g.value = e;
|
|
6623
6239
|
});
|
|
@@ -6631,19 +6247,19 @@ var vo = /*#__PURE__*/ Z(po, [["render", _o]]), yo = d({
|
|
|
6631
6247
|
},
|
|
6632
6248
|
doCacheToStore: () => {
|
|
6633
6249
|
let e = a.value?.getValues();
|
|
6634
|
-
if (x.value)
|
|
6250
|
+
if (x.value) G(`tables_cache_${o.value}`, e, "1 Hours"), S();
|
|
6635
6251
|
else {
|
|
6636
6252
|
let t = l.value.link.split(".")[0];
|
|
6637
|
-
|
|
6253
|
+
G(`tables_cache_link_${t}`, e, "1 Hours"), S();
|
|
6638
6254
|
}
|
|
6639
6255
|
}
|
|
6640
6256
|
};
|
|
6641
6257
|
}
|
|
6642
|
-
}),
|
|
6258
|
+
}), ho = { class: "uz-flex uz-flex-col uz-gap-2 uz-h-full" }, go = {
|
|
6643
6259
|
key: 0,
|
|
6644
6260
|
class: "uz-grid uz-grid-cols-2 uz-gap-2"
|
|
6645
|
-
},
|
|
6646
|
-
function
|
|
6261
|
+
}, _o = { class: "uz-flex uz-justify-between uz-gap-2 uz-w-full" }, vo = { class: "uz-flex uz-gap-2" };
|
|
6262
|
+
function yo(t, n, u, d, f, p) {
|
|
6647
6263
|
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");
|
|
6648
6264
|
return x(), a(e, null, [l(S, {
|
|
6649
6265
|
show: t.drawer,
|
|
@@ -6669,7 +6285,7 @@ function wo(t, n, u, d, f, p) {
|
|
|
6669
6285
|
message: t.spinMsg,
|
|
6670
6286
|
status: t.spinStatus
|
|
6671
6287
|
}, {
|
|
6672
|
-
default: N(() => [o("div",
|
|
6288
|
+
default: N(() => [o("div", ho, [t.skeletonShow ? (x(), a("div", go, [
|
|
6673
6289
|
l(m, {
|
|
6674
6290
|
size: "large",
|
|
6675
6291
|
style: { height: "156px" }
|
|
@@ -6732,7 +6348,7 @@ function wo(t, n, u, d, f, p) {
|
|
|
6732
6348
|
_: 2
|
|
6733
6349
|
}, [t.formStatus === 2 ? void 0 : {
|
|
6734
6350
|
name: "footer",
|
|
6735
|
-
fn: N(() => [o("div",
|
|
6351
|
+
fn: N(() => [o("div", _o, [t.isMobile ? i("", !0) : (x(), r(v, {
|
|
6736
6352
|
key: 0,
|
|
6737
6353
|
loading: t.spinShow,
|
|
6738
6354
|
type: "success",
|
|
@@ -6741,7 +6357,7 @@ function wo(t, n, u, d, f, p) {
|
|
|
6741
6357
|
}, {
|
|
6742
6358
|
default: N(() => [c(A(t.$t("OCR.ocr")), 1)]),
|
|
6743
6359
|
_: 1
|
|
6744
|
-
}, 8, ["loading"])), o("div",
|
|
6360
|
+
}, 8, ["loading"])), o("div", vo, [
|
|
6745
6361
|
l(v, {
|
|
6746
6362
|
loading: t.spinShow,
|
|
6747
6363
|
class: "uz-drawer-button",
|
|
@@ -6809,7 +6425,7 @@ function wo(t, n, u, d, f, p) {
|
|
|
6809
6425
|
_: 1
|
|
6810
6426
|
}, 8, ["show"])], 64);
|
|
6811
6427
|
}
|
|
6812
|
-
var
|
|
6428
|
+
var bo = /*#__PURE__*/ Q(mo, [["render", yo]]), xo = d({
|
|
6813
6429
|
name: "UzTableMobileList",
|
|
6814
6430
|
props: {
|
|
6815
6431
|
tableData: {
|
|
@@ -6827,12 +6443,12 @@ var To = /*#__PURE__*/ Z(yo, [["render", wo]]), Eo = d({
|
|
|
6827
6443
|
},
|
|
6828
6444
|
emits: ["update:row-keys"],
|
|
6829
6445
|
setup() {}
|
|
6830
|
-
}),
|
|
6446
|
+
}), So = { class: "uz-grid uz-grid-cols-2 uz-gap-2" }, Co = {
|
|
6831
6447
|
key: 1,
|
|
6832
6448
|
class: "uz-table-mobile-group-txt"
|
|
6833
6449
|
};
|
|
6834
|
-
function
|
|
6835
|
-
return x(), a("div",
|
|
6450
|
+
function wo(t, n, s, c, l, u) {
|
|
6451
|
+
return x(), a("div", So, [(x(!0), a(e, null, T(t.tableColumns, (n) => (x(), a("div", {
|
|
6836
6452
|
key: n.key,
|
|
6837
6453
|
class: g(["uz-flex uz-overflow-hidden", n.lineBreak ? "uz-flex-col" : ""]),
|
|
6838
6454
|
style: _(`grid-column: span ${n.lineCol || 2} / span ${n.lineCol || 2}`)
|
|
@@ -6843,11 +6459,11 @@ function ko(t, n, s, c, l, u) {
|
|
|
6843
6459
|
class: "mobile"
|
|
6844
6460
|
})) : 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(() => {
|
|
6845
6461
|
if (t.tableData) return n.render(t.tableData, t.tableIndex);
|
|
6846
|
-
}), { key: 0 })) : (x(), a("div",
|
|
6462
|
+
}), { key: 0 })) : (x(), a("div", Co, A(t.tableData[n.key] || "-"), 1))], 2)], 64))], 6))), 128))]);
|
|
6847
6463
|
}
|
|
6848
6464
|
//#endregion
|
|
6849
6465
|
//#region components/table/mobile.vue?vue&type=script&lang.ts
|
|
6850
|
-
var
|
|
6466
|
+
var To = d({
|
|
6851
6467
|
name: "UzTableMobile",
|
|
6852
6468
|
components: {
|
|
6853
6469
|
NCheckbox: ie,
|
|
@@ -6855,7 +6471,7 @@ var Ao = d({
|
|
|
6855
6471
|
NPagination: Te,
|
|
6856
6472
|
NCheckboxGroup: ae,
|
|
6857
6473
|
NRadioGroup: ke,
|
|
6858
|
-
UzTableMobileList: /* @__PURE__ */
|
|
6474
|
+
UzTableMobileList: /* @__PURE__ */ Q(xo, [["render", wo], ["__scopeId", "data-v-84c394fe"]])
|
|
6859
6475
|
},
|
|
6860
6476
|
props: {
|
|
6861
6477
|
tableData: {
|
|
@@ -6902,17 +6518,17 @@ var Ao = d({
|
|
|
6902
6518
|
}
|
|
6903
6519
|
};
|
|
6904
6520
|
}
|
|
6905
|
-
}),
|
|
6521
|
+
}), Eo = {
|
|
6906
6522
|
key: 0,
|
|
6907
6523
|
class: "uz-flex uz-justify-center uz-text-center uz-pb-4"
|
|
6908
|
-
},
|
|
6524
|
+
}, Do = {
|
|
6909
6525
|
key: 0,
|
|
6910
6526
|
class: "uz-flex uz-justify-center uz-text-center uz-pb-4"
|
|
6911
|
-
},
|
|
6527
|
+
}, Oo = {
|
|
6912
6528
|
key: 0,
|
|
6913
6529
|
class: "uz-flex uz-justify-center uz-text-center uz-pb-4"
|
|
6914
6530
|
};
|
|
6915
|
-
function
|
|
6531
|
+
function ko(t, n, o, s, c, u) {
|
|
6916
6532
|
let d = D("UzTableMobileList"), f = D("NCheckbox"), p = D("NPagination"), m = D("NCheckboxGroup"), h = D("NRadio"), g = D("NRadioGroup");
|
|
6917
6533
|
return t.selection === 2 ? (x(), r(m, {
|
|
6918
6534
|
key: 0,
|
|
@@ -6939,7 +6555,7 @@ function Po(t, n, o, s, c, u) {
|
|
|
6939
6555
|
"tableColumns"
|
|
6940
6556
|
])]),
|
|
6941
6557
|
_: 2
|
|
6942
|
-
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div",
|
|
6558
|
+
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div", Eo, [l(p, {
|
|
6943
6559
|
page: t.tableQueries.query.page,
|
|
6944
6560
|
"onUpdate:page": [n[0] ||= (e) => t.tableQueries.query.page = e, t.pageChange],
|
|
6945
6561
|
"item-count": t.tableQueries.query.itemCount,
|
|
@@ -6981,7 +6597,7 @@ function Po(t, n, o, s, c, u) {
|
|
|
6981
6597
|
"tableColumns"
|
|
6982
6598
|
])]),
|
|
6983
6599
|
_: 2
|
|
6984
|
-
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div",
|
|
6600
|
+
}, 1032, ["value"]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div", Do, [l(p, {
|
|
6985
6601
|
page: t.tableQueries.query.page,
|
|
6986
6602
|
"onUpdate:page": [n[2] ||= (e) => t.tableQueries.query.page = e, t.pageChange],
|
|
6987
6603
|
"item-count": t.tableQueries.query.itemCount,
|
|
@@ -7016,7 +6632,7 @@ function Po(t, n, o, s, c, u) {
|
|
|
7016
6632
|
"tableData",
|
|
7017
6633
|
"tableIndex",
|
|
7018
6634
|
"tableColumns"
|
|
7019
|
-
])]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div",
|
|
6635
|
+
])]))), 128)), t.tableQueries && t.tableData && t.tableData.length > 0 ? (x(), a("div", Oo, [l(p, {
|
|
7020
6636
|
page: t.tableQueries.query.page,
|
|
7021
6637
|
"onUpdate:page": [n[4] ||= (e) => t.tableQueries.query.page = e, t.pageChange],
|
|
7022
6638
|
"item-count": t.tableQueries.query.itemCount,
|
|
@@ -7029,10 +6645,10 @@ function Po(t, n, o, s, c, u) {
|
|
|
7029
6645
|
"onUpdate:page"
|
|
7030
6646
|
])])) : i("", !0)], 4));
|
|
7031
6647
|
}
|
|
7032
|
-
var
|
|
6648
|
+
var Ao = /*#__PURE__*/ Q(To, [["render", ko], ["__scopeId", "data-v-70b54e3b"]]), jo = d({
|
|
7033
6649
|
name: "UzTableFile",
|
|
7034
6650
|
components: {
|
|
7035
|
-
UzIcon:
|
|
6651
|
+
UzIcon: qt,
|
|
7036
6652
|
NDropdown: fe,
|
|
7037
6653
|
NButton: I,
|
|
7038
6654
|
NModal: we,
|
|
@@ -7058,11 +6674,11 @@ var Fo = /*#__PURE__*/ Z(Ao, [["render", Po], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
7058
6674
|
let { t: n } = Ke(), r = Xe(), i = Ue(), a = w(!1), o = w(!1), s = w(!1), c = w([]), l = w(new FormData()), u = w([{
|
|
7059
6675
|
label: n("Common.import"),
|
|
7060
6676
|
key: "import",
|
|
7061
|
-
icon: () => f(B, null, { default: () => f(
|
|
6677
|
+
icon: () => f(B, null, { default: () => f(qt, { icon: "CloudUpload" }) })
|
|
7062
6678
|
}, {
|
|
7063
6679
|
label: n("Common.export"),
|
|
7064
6680
|
key: "export",
|
|
7065
|
-
icon: () => f(B, null, { default: () => f(
|
|
6681
|
+
icon: () => f(B, null, { default: () => f(qt, { icon: "CloudDownload" }) })
|
|
7066
6682
|
}]), d = w([
|
|
7067
6683
|
{
|
|
7068
6684
|
title: "文件名称",
|
|
@@ -7108,7 +6724,7 @@ var Fo = /*#__PURE__*/ Z(Ao, [["render", Po], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
7108
6724
|
o.value = !1;
|
|
7109
6725
|
}));
|
|
7110
6726
|
}, _ = () => {
|
|
7111
|
-
o.value || (o.value = !0,
|
|
6727
|
+
o.value || (o.value = !0, Kn("excel/import", l.value).then(() => {
|
|
7112
6728
|
i.success({
|
|
7113
6729
|
content: "导入执行中...",
|
|
7114
6730
|
duration: 3e3
|
|
@@ -7137,7 +6753,7 @@ var Fo = /*#__PURE__*/ Z(Ao, [["render", Po], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
7137
6753
|
rawFileName: c,
|
|
7138
6754
|
dropOption: u,
|
|
7139
6755
|
dropSelect: (t) => {
|
|
7140
|
-
t === "import" ? (a.value = !0, v()) : t === "export" &&
|
|
6756
|
+
t === "import" ? (a.value = !0, v()) : t === "export" && Tt.info({
|
|
7141
6757
|
title: "提示",
|
|
7142
6758
|
content: "确认导出数据?导出过程较慢,稍后请在文件中心查看",
|
|
7143
6759
|
positiveText: "确定",
|
|
@@ -7167,11 +6783,11 @@ var Fo = /*#__PURE__*/ Z(Ao, [["render", Po], ["__scopeId", "data-v-70b54e3b"]])
|
|
|
7167
6783
|
}
|
|
7168
6784
|
};
|
|
7169
6785
|
}
|
|
7170
|
-
}),
|
|
6786
|
+
}), Mo = { class: "uz-file-port-modal" }, No = {
|
|
7171
6787
|
key: 1,
|
|
7172
6788
|
class: "uz-file-port-panel"
|
|
7173
|
-
},
|
|
7174
|
-
function
|
|
6789
|
+
}, Po = { class: "uz-flex uz-justify-between" };
|
|
6790
|
+
function Fo(t, n, i, s, u, d) {
|
|
7175
6791
|
let f = D("UzIcon"), p = D("NIcon"), m = D("NButton"), h = D("NDropdown"), g = D("NUpload"), _ = D("NSpace"), v = D("NDataTable"), y = D("NModal");
|
|
7176
6792
|
return x(), a(e, null, [l(h, {
|
|
7177
6793
|
trigger: "hover",
|
|
@@ -7206,8 +6822,8 @@ function Bo(t, n, i, s, u, d) {
|
|
|
7206
6822
|
default: N(() => [...n[1] ||= [c(" 下载模板 ", -1)]]),
|
|
7207
6823
|
_: 1
|
|
7208
6824
|
}, 8, ["onClick"])]),
|
|
7209
|
-
default: N(() => [o("div",
|
|
7210
|
-
t.rawFile ? (x(), a("div",
|
|
6825
|
+
default: N(() => [o("div", Mo, [
|
|
6826
|
+
t.rawFile ? (x(), a("div", No, [
|
|
7211
6827
|
n[5] ||= o("div", { class: "uz-file-port-icon" }, [o("svg", {
|
|
7212
6828
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7213
6829
|
viewBox: "0 0 24 24",
|
|
@@ -7255,7 +6871,7 @@ function Bo(t, n, i, s, u, d) {
|
|
|
7255
6871
|
}, [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" })])]), o("div", { class: "uz-file-port-subtitle" }, "拖拽或点击上传Excel文件")], -1)]]),
|
|
7256
6872
|
_: 1
|
|
7257
6873
|
}, 8, ["on-before-upload"])),
|
|
7258
|
-
o("div",
|
|
6874
|
+
o("div", Po, [n[8] ||= o("div", { class: "uz-com-title" }, "导入历史", -1), l(m, {
|
|
7259
6875
|
onClick: t.init,
|
|
7260
6876
|
loading: t.loading,
|
|
7261
6877
|
secondary: ""
|
|
@@ -7278,7 +6894,7 @@ function Bo(t, n, i, s, u, d) {
|
|
|
7278
6894
|
_: 1
|
|
7279
6895
|
}, 8, ["show", "on-after-leave"])], 64);
|
|
7280
6896
|
}
|
|
7281
|
-
var
|
|
6897
|
+
var Io = /*#__PURE__*/ Q(jo, [["render", Fo], ["__scopeId", "data-v-a491799c"]]), $ = C({
|
|
7282
6898
|
page: {
|
|
7283
6899
|
label: "首页",
|
|
7284
6900
|
key: "/",
|
|
@@ -7289,14 +6905,14 @@ var Vo = /*#__PURE__*/ Z(Io, [["render", Bo], ["__scopeId", "data-v-a491799c"]])
|
|
|
7289
6905
|
active: "/",
|
|
7290
6906
|
thumbnail: []
|
|
7291
6907
|
});
|
|
7292
|
-
function
|
|
6908
|
+
function Lo(e) {
|
|
7293
6909
|
$.cache = e.cache, $.page = {
|
|
7294
6910
|
label: e.label,
|
|
7295
6911
|
key: e.key,
|
|
7296
6912
|
path: e.key,
|
|
7297
6913
|
closable: !1
|
|
7298
6914
|
};
|
|
7299
|
-
let t =
|
|
6915
|
+
let t = K($.cache, !1);
|
|
7300
6916
|
t ? ($.active = t.active, t.thumbnail && ($.thumbnail = t.thumbnail)) : $.thumbnail = [{
|
|
7301
6917
|
label: e.label,
|
|
7302
6918
|
key: e.key,
|
|
@@ -7304,35 +6920,35 @@ function Ho(e) {
|
|
|
7304
6920
|
closable: !1
|
|
7305
6921
|
}];
|
|
7306
6922
|
}
|
|
7307
|
-
function
|
|
7308
|
-
$.active = e,
|
|
6923
|
+
function Ro(e) {
|
|
6924
|
+
$.active = e, Y.push(e), G($.cache, $, 0);
|
|
7309
6925
|
}
|
|
7310
|
-
function
|
|
6926
|
+
function zo(e, t) {
|
|
7311
6927
|
let n = $.thumbnail.find((t) => t.key === e);
|
|
7312
|
-
n && (n.key = t, $.active = t,
|
|
6928
|
+
n && (n.key = t, $.active = t, G($.cache, $, 0));
|
|
7313
6929
|
}
|
|
7314
|
-
function
|
|
6930
|
+
function Bo(e) {
|
|
7315
6931
|
let t = $.thumbnail.find((t) => t.path === e.key);
|
|
7316
|
-
t ? ($.active = t.key,
|
|
6932
|
+
t ? ($.active = t.key, G($.cache, $, 0), Y.push(t.key)) : ($.active = e.key, $.thumbnail.push({
|
|
7317
6933
|
...e,
|
|
7318
6934
|
path: e.key,
|
|
7319
6935
|
closable: !0
|
|
7320
|
-
}),
|
|
6936
|
+
}), Y.push(e.key));
|
|
7321
6937
|
}
|
|
7322
|
-
function
|
|
6938
|
+
function Vo(e) {
|
|
7323
6939
|
let t = $.thumbnail.findIndex((t) => t.key === e);
|
|
7324
6940
|
if ($.thumbnail.splice(t, 1), $.active === e) {
|
|
7325
6941
|
let e = $.thumbnail[t - 1]?.key || "";
|
|
7326
|
-
$.active = e,
|
|
6942
|
+
$.active = e, Y.push(e);
|
|
7327
6943
|
}
|
|
7328
|
-
|
|
6944
|
+
G($.cache, $, 0);
|
|
7329
6945
|
}
|
|
7330
|
-
function
|
|
7331
|
-
$.active = $.page.path, $.thumbnail = [$.page],
|
|
6946
|
+
function Ho() {
|
|
6947
|
+
$.active = $.page.path, $.thumbnail = [$.page], Y.push($.page.path), G($.cache, $, 0);
|
|
7332
6948
|
}
|
|
7333
6949
|
//#endregion
|
|
7334
6950
|
//#region components/thumbnail/index.vue?vue&type=script&lang.ts
|
|
7335
|
-
var
|
|
6951
|
+
var Uo = d({
|
|
7336
6952
|
name: "UzThumbnail",
|
|
7337
6953
|
components: {
|
|
7338
6954
|
NTabs: Ie,
|
|
@@ -7353,29 +6969,29 @@ var Jo = d({
|
|
|
7353
6969
|
setup(e, { slots: t }) {
|
|
7354
6970
|
let n = w(!!t.prefix), r = Xe();
|
|
7355
6971
|
return y(() => {
|
|
7356
|
-
|
|
6972
|
+
Lo(e.option), $.active !== r.path && zo(r.path, r.fullPath);
|
|
7357
6973
|
}), j(() => r, (e) => {
|
|
7358
|
-
$.active === r.path &&
|
|
6974
|
+
$.active === r.path && zo(e.path, e.fullPath);
|
|
7359
6975
|
}, { deep: !0 }), j(() => e.option, (e) => {
|
|
7360
|
-
|
|
6976
|
+
Lo(e);
|
|
7361
6977
|
}, { deep: !0 }), {
|
|
7362
6978
|
thumbnailStore: $,
|
|
7363
6979
|
isSlotPrefix: n,
|
|
7364
6980
|
handleClose: (e) => {
|
|
7365
|
-
|
|
6981
|
+
Vo(e);
|
|
7366
6982
|
},
|
|
7367
6983
|
handleChange: (e) => {
|
|
7368
|
-
|
|
6984
|
+
Ro(e);
|
|
7369
6985
|
},
|
|
7370
6986
|
handleClear: () => {
|
|
7371
|
-
|
|
6987
|
+
Ho();
|
|
7372
6988
|
}
|
|
7373
6989
|
};
|
|
7374
6990
|
}
|
|
7375
6991
|
});
|
|
7376
6992
|
//#endregion
|
|
7377
6993
|
//#region components/thumbnail/index.vue
|
|
7378
|
-
function
|
|
6994
|
+
function Wo(t, n, i, o, u, d) {
|
|
7379
6995
|
let f = D("NTabPane"), p = D("UzIcon"), m = D("NIcon"), h = D("NButton"), g = D("NPopconfirm"), _ = D("NFlex"), v = D("NTabs");
|
|
7380
6996
|
return x(), r(v, {
|
|
7381
6997
|
value: t.thumbnailStore.active,
|
|
@@ -7424,33 +7040,33 @@ function Yo(t, n, i, o, u, d) {
|
|
|
7424
7040
|
"on-update:value"
|
|
7425
7041
|
]);
|
|
7426
7042
|
}
|
|
7427
|
-
var
|
|
7428
|
-
V.common.cardColor = "#32323b", V.common.primaryColor = "#0A84FF", V.common.primaryColorHover =
|
|
7429
|
-
var
|
|
7043
|
+
var Go = /*#__PURE__*/ Q(Uo, [["render", Wo]]), Ko = "#007AFF", qo = "#0A84FF", Jo = "#FF9500", Yo = "#FF9F0A", Xo = "#28CD41", Zo = "#32D74B", Qo = "#FFCC00", $o = "#FFD60A", es = "#FF3B30", ts = "#FF453A";
|
|
7044
|
+
V.common.cardColor = "#32323b", V.common.primaryColor = "#0A84FF", V.common.primaryColorHover = qo, V.common.infoColor = "#FF9F0A", V.common.infoColorHover = Yo, V.common.successColor = "#32D74B", V.common.successColorHover = Zo, V.common.warningColor = "#FFD60A", V.common.successColorHover = $o, V.common.errorColor = "#FF453A", V.common.errorColorHover = ts, V.common.borderRadius = "var(--borderRadius)", V.common.inputColor = "rgba(var(--input))", V.common.borderColor = "rgba(var(--border), 0.7)", V.DataTable.tdColor = "#2d2d31", V.Scrollbar.width = "8px", V.Scrollbar.height = "8px", V.Scrollbar.borderRadius = "8px", V.Scrollbar.color = "#686873";
|
|
7045
|
+
var ns = {
|
|
7430
7046
|
common: {
|
|
7431
7047
|
inputColor: "rgba(var(--input))",
|
|
7432
7048
|
borderColor: "rgba(var(--border), 0.7)",
|
|
7433
7049
|
borderRadius: "var(--borderRadius)",
|
|
7434
|
-
primaryColor:
|
|
7435
|
-
primaryColorHover:
|
|
7436
|
-
primaryColorPressed:
|
|
7437
|
-
primaryColorSuppl:
|
|
7438
|
-
infoColor:
|
|
7439
|
-
infoColorHover:
|
|
7440
|
-
infoColorPressed:
|
|
7441
|
-
infoColorSuppl:
|
|
7442
|
-
successColor:
|
|
7443
|
-
successColorHover:
|
|
7444
|
-
successColorPressed:
|
|
7445
|
-
successColorSuppl:
|
|
7446
|
-
warningColor:
|
|
7447
|
-
warningColorHover:
|
|
7448
|
-
warningColorPressed:
|
|
7449
|
-
warningColorSuppl:
|
|
7450
|
-
errorColor:
|
|
7451
|
-
errorColorHover:
|
|
7452
|
-
errorColorPressed:
|
|
7453
|
-
errorColorSuppl:
|
|
7050
|
+
primaryColor: Ko,
|
|
7051
|
+
primaryColorHover: qo,
|
|
7052
|
+
primaryColorPressed: Ko,
|
|
7053
|
+
primaryColorSuppl: Ko,
|
|
7054
|
+
infoColor: Jo,
|
|
7055
|
+
infoColorHover: Yo,
|
|
7056
|
+
infoColorPressed: Jo,
|
|
7057
|
+
infoColorSuppl: Jo,
|
|
7058
|
+
successColor: Xo,
|
|
7059
|
+
successColorHover: Zo,
|
|
7060
|
+
successColorPressed: Xo,
|
|
7061
|
+
successColorSuppl: Xo,
|
|
7062
|
+
warningColor: Qo,
|
|
7063
|
+
warningColorHover: $o,
|
|
7064
|
+
warningColorPressed: Qo,
|
|
7065
|
+
warningColorSuppl: Qo,
|
|
7066
|
+
errorColor: es,
|
|
7067
|
+
errorColorHover: ts,
|
|
7068
|
+
errorColorPressed: es,
|
|
7069
|
+
errorColorSuppl: es,
|
|
7454
7070
|
cardColor: "#fff"
|
|
7455
7071
|
},
|
|
7456
7072
|
Button: { textColor: "rgb(var(--font))" },
|
|
@@ -7464,22 +7080,22 @@ var ss = {
|
|
|
7464
7080
|
borderRadius: "8px",
|
|
7465
7081
|
color: "#c0c0c0"
|
|
7466
7082
|
}
|
|
7467
|
-
},
|
|
7083
|
+
}, rs = V, is = d({
|
|
7468
7084
|
name: "UzWrap",
|
|
7469
7085
|
components: { NConfigProvider: oe },
|
|
7470
7086
|
setup() {
|
|
7471
7087
|
return {
|
|
7472
7088
|
zhCN: We,
|
|
7473
7089
|
dateZhCN: He,
|
|
7474
|
-
commonStore:
|
|
7475
|
-
lightTheme:
|
|
7476
|
-
darkTheme:
|
|
7090
|
+
commonStore: J,
|
|
7091
|
+
lightTheme: ns,
|
|
7092
|
+
darkTheme: rs
|
|
7477
7093
|
};
|
|
7478
7094
|
}
|
|
7479
7095
|
});
|
|
7480
7096
|
//#endregion
|
|
7481
7097
|
//#region components/wrap/index.vue
|
|
7482
|
-
function
|
|
7098
|
+
function as(e, t, n, i, a, o) {
|
|
7483
7099
|
let s = D("NConfigProvider");
|
|
7484
7100
|
return x(), r(s, {
|
|
7485
7101
|
theme: e.commonStore.theme ? { name: "darkTheme" } : null,
|
|
@@ -7498,10 +7114,10 @@ function us(e, t, n, i, a, o) {
|
|
|
7498
7114
|
"date-locale"
|
|
7499
7115
|
]);
|
|
7500
7116
|
}
|
|
7501
|
-
var
|
|
7117
|
+
var os = /*#__PURE__*/ Q(is, [["render", as]]);
|
|
7502
7118
|
//#endregion
|
|
7503
7119
|
//#region components/ocr/preprocess.ts
|
|
7504
|
-
function
|
|
7120
|
+
function ss(e) {
|
|
7505
7121
|
let t = /* @__PURE__ */ new Int32Array(256), n = e.length;
|
|
7506
7122
|
for (let r = 0; r < n; r++) t[e[r]]++;
|
|
7507
7123
|
let r = 0;
|
|
@@ -7516,7 +7132,7 @@ function fs(e) {
|
|
|
7516
7132
|
}
|
|
7517
7133
|
return c;
|
|
7518
7134
|
}
|
|
7519
|
-
function
|
|
7135
|
+
function cs(e, t) {
|
|
7520
7136
|
return new Promise((n, r) => {
|
|
7521
7137
|
let i = new Image();
|
|
7522
7138
|
i.crossOrigin = "anonymous", i.onload = () => {
|
|
@@ -7549,7 +7165,7 @@ function ps(e, t) {
|
|
|
7549
7165
|
}
|
|
7550
7166
|
let u = t.threshold;
|
|
7551
7167
|
if (t.binarize) {
|
|
7552
|
-
t.autoThreshold && (u =
|
|
7168
|
+
t.autoThreshold && (u = ss(l));
|
|
7553
7169
|
for (let e = 0, t = 0; e < s.length; e += 4, t++) {
|
|
7554
7170
|
let n = l[t] < u ? 0 : 255;
|
|
7555
7171
|
s[e] = n, s[e + 1] = n, s[e + 2] = n;
|
|
@@ -7572,7 +7188,7 @@ function ps(e, t) {
|
|
|
7572
7188
|
}
|
|
7573
7189
|
//#endregion
|
|
7574
7190
|
//#region components/ocr/index.vue?vue&type=script&lang.ts
|
|
7575
|
-
var
|
|
7191
|
+
var ls = d({
|
|
7576
7192
|
name: "UzOcr",
|
|
7577
7193
|
components: {
|
|
7578
7194
|
NButton: I,
|
|
@@ -7597,19 +7213,19 @@ var ms = d({
|
|
|
7597
7213
|
label: "放大 3x",
|
|
7598
7214
|
value: 3
|
|
7599
7215
|
}
|
|
7600
|
-
], _ = async () => (a.value ||= await
|
|
7216
|
+
], _ = async () => (a.value ||= await ct(["eng", "chi_sim"], ot.LSTM_ONLY, {
|
|
7601
7217
|
workerPath: "https://unizhen-1369980751.cos.ap-shanghai.myqcloud.com/tesseract/worker.min.js",
|
|
7602
7218
|
corePath: "https://unizhen-1369980751.cos.ap-shanghai.myqcloud.com/tesseract/tesseract-core-simd-lstm.wasm.js"
|
|
7603
7219
|
}), a.value.setParameters({
|
|
7604
|
-
tessedit_pageseg_mode:
|
|
7605
|
-
tessedit_ocr_engine_mode:
|
|
7220
|
+
tessedit_pageseg_mode: st.SINGLE_COLUMN,
|
|
7221
|
+
tessedit_ocr_engine_mode: ot.LSTM_ONLY,
|
|
7606
7222
|
user_defined_dpi: "300",
|
|
7607
7223
|
preserve_interword_spaces: "1",
|
|
7608
7224
|
textord_tabfind_vertical_spaces: "0",
|
|
7609
7225
|
tessedit_char_blacklist: "|"
|
|
7610
7226
|
}), a.value), v = async () => {
|
|
7611
7227
|
if (f.value) try {
|
|
7612
|
-
let e = await
|
|
7228
|
+
let e = await cs(f.value, {
|
|
7613
7229
|
enabled: o.value,
|
|
7614
7230
|
scale: s.value,
|
|
7615
7231
|
grayscale: !0,
|
|
@@ -7640,13 +7256,13 @@ var ms = d({
|
|
|
7640
7256
|
let { data: { text: n } } = await t.recognize(e);
|
|
7641
7257
|
return n;
|
|
7642
7258
|
} catch (e) {
|
|
7643
|
-
throw
|
|
7259
|
+
throw W(e), e;
|
|
7644
7260
|
}
|
|
7645
7261
|
}, b = async (n) => {
|
|
7646
7262
|
t.value = !0, r.value = e("OCR.analysis");
|
|
7647
7263
|
let a = n;
|
|
7648
7264
|
if (o.value || s.value > 1) try {
|
|
7649
|
-
let e = await
|
|
7265
|
+
let e = await cs(n, {
|
|
7650
7266
|
enabled: o.value,
|
|
7651
7267
|
scale: s.value,
|
|
7652
7268
|
grayscale: !0,
|
|
@@ -7708,25 +7324,25 @@ var ms = d({
|
|
|
7708
7324
|
t: e
|
|
7709
7325
|
};
|
|
7710
7326
|
}
|
|
7711
|
-
}),
|
|
7327
|
+
}), us = { class: "uz-ocr" }, ds = { class: "uz-ocr-left-col" }, fs = { class: "uz-ocr-upload-card" }, ps = { class: "uz-ocr-upload-title" }, ms = {
|
|
7712
7328
|
key: 1,
|
|
7713
7329
|
class: "uz-ocr-preview-panel"
|
|
7714
|
-
},
|
|
7330
|
+
}, hs = { class: "uz-ocr-preview-box" }, gs = ["src"], _s = {
|
|
7715
7331
|
key: 0,
|
|
7716
7332
|
class: "uz-ocr-threshold-badge"
|
|
7717
|
-
},
|
|
7333
|
+
}, vs = { class: "uz-ocr-preview-box" }, ys = ["src"], bs = { class: "uz-ocr-settings-form" }, xs = { class: "uz-settings-row" }, Ss = { class: "uz-settings-label" }, Cs = {
|
|
7718
7334
|
key: 0,
|
|
7719
7335
|
class: "uz-ocr-nested-settings animate-fade-in"
|
|
7720
|
-
},
|
|
7336
|
+
}, ws = { class: "uz-settings-row" }, Ts = { class: "uz-settings-label" }, Es = { class: "uz-settings-row" }, Ds = { class: "uz-settings-label" }, Os = { class: "uz-ocr-right-col" }, ks = { class: "uz-ocr-result-header" }, As = { class: "uz-result-title" }, js = {
|
|
7721
7337
|
key: 0,
|
|
7722
7338
|
class: "uz-ocr-empty-state"
|
|
7723
|
-
},
|
|
7339
|
+
}, Ms = { class: "uz-empty-text" }, Ns = {
|
|
7724
7340
|
key: 1,
|
|
7725
7341
|
class: "uz-ocr-result-tabs"
|
|
7726
7342
|
};
|
|
7727
|
-
function
|
|
7343
|
+
function Ps(e, t, n, s, u, d) {
|
|
7728
7344
|
let f = D("NUpload"), p = D("NTabPane"), m = D("NTabs"), h = D("NButton"), g = D("NSpace"), _ = D("NSwitch"), v = D("NSelect");
|
|
7729
|
-
return x(), a("div",
|
|
7345
|
+
return x(), a("div", us, [o("div", ds, [e.rawImage ? (x(), a("div", ms, [l(m, {
|
|
7730
7346
|
value: e.imagePreviewTab,
|
|
7731
7347
|
"onUpdate:value": t[0] ||= (t) => e.imagePreviewTab = t,
|
|
7732
7348
|
type: "segment",
|
|
@@ -7736,21 +7352,21 @@ function zs(e, t, n, s, u, d) {
|
|
|
7736
7352
|
name: "processed",
|
|
7737
7353
|
tab: e.t("OCR.previewProcessed")
|
|
7738
7354
|
}, {
|
|
7739
|
-
default: N(() => [o("div",
|
|
7355
|
+
default: N(() => [o("div", hs, [o("img", {
|
|
7740
7356
|
src: e.processedImage,
|
|
7741
7357
|
alt: "Processed Preview",
|
|
7742
7358
|
class: "uz-ocr-preview-img"
|
|
7743
|
-
}, null, 8,
|
|
7359
|
+
}, null, 8, gs), e.preEnabled && e.preBinarize ? (x(), a("div", _s, A(e.preAutoThreshold ? "大津自适应" : "手动") + "阈值: " + A(e.thresholdUsed), 1)) : i("", !0)])]),
|
|
7744
7360
|
_: 1
|
|
7745
7361
|
}, 8, ["tab"]), l(p, {
|
|
7746
7362
|
name: "raw",
|
|
7747
7363
|
tab: e.t("OCR.previewRaw")
|
|
7748
7364
|
}, {
|
|
7749
|
-
default: N(() => [o("div",
|
|
7365
|
+
default: N(() => [o("div", vs, [o("img", {
|
|
7750
7366
|
src: e.rawImage,
|
|
7751
7367
|
alt: "Raw Preview",
|
|
7752
7368
|
class: "uz-ocr-preview-img"
|
|
7753
|
-
}, null, 8,
|
|
7369
|
+
}, null, 8, ys)])]),
|
|
7754
7370
|
_: 1
|
|
7755
7371
|
}, 8, ["tab"])]),
|
|
7756
7372
|
_: 1
|
|
@@ -7784,7 +7400,7 @@ function zs(e, t, n, s, u, d) {
|
|
|
7784
7400
|
"directory-dnd": "",
|
|
7785
7401
|
class: "uz-w-full"
|
|
7786
7402
|
}, {
|
|
7787
|
-
default: N(() => [o("div",
|
|
7403
|
+
default: N(() => [o("div", fs, [
|
|
7788
7404
|
t[4] ||= o("div", { class: "uz-ocr-upload-icon" }, [o("svg", {
|
|
7789
7405
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7790
7406
|
viewBox: "0 0 24 24",
|
|
@@ -7792,77 +7408,77 @@ function zs(e, t, n, s, u, d) {
|
|
|
7792
7408
|
height: "40",
|
|
7793
7409
|
fill: "currentColor"
|
|
7794
7410
|
}, [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),
|
|
7795
|
-
o("div",
|
|
7411
|
+
o("div", ps, A(e.t("OCR.scan")), 1),
|
|
7796
7412
|
t[5] ||= o("div", { class: "uz-ocr-upload-subtitle" }, "拖拽或点击上传图片", -1)
|
|
7797
7413
|
])]),
|
|
7798
7414
|
_: 1
|
|
7799
|
-
}, 8, ["on-before-upload"])), o("div",
|
|
7415
|
+
}, 8, ["on-before-upload"])), o("div", bs, [o("div", xs, [o("span", Ss, A(e.t("OCR.preprocess")), 1), l(_, {
|
|
7800
7416
|
value: e.preEnabled,
|
|
7801
7417
|
"onUpdate:value": t[1] ||= (t) => e.preEnabled = t,
|
|
7802
7418
|
size: "small"
|
|
7803
|
-
}, null, 8, ["value"])]), e.preEnabled ? (x(), a("div",
|
|
7419
|
+
}, null, 8, ["value"])]), e.preEnabled ? (x(), a("div", Cs, [o("div", ws, [o("span", Ts, A(e.t("OCR.scale")), 1), l(v, {
|
|
7804
7420
|
value: e.preScale,
|
|
7805
7421
|
"onUpdate:value": t[2] ||= (t) => e.preScale = t,
|
|
7806
7422
|
options: e.scaleOptions,
|
|
7807
7423
|
size: "small",
|
|
7808
7424
|
class: "uz-settings-select"
|
|
7809
|
-
}, null, 8, ["value", "options"])]), o("div",
|
|
7425
|
+
}, null, 8, ["value", "options"])]), o("div", Es, [o("span", Ds, A(e.t("OCR.contrast")), 1), l(_, {
|
|
7810
7426
|
value: e.preContrast,
|
|
7811
7427
|
"onUpdate:value": t[3] ||= (t) => e.preContrast = t,
|
|
7812
7428
|
size: "small"
|
|
7813
|
-
}, null, 8, ["value"])])])) : i("", !0)])]), o("div",
|
|
7429
|
+
}, null, 8, ["value"])])])) : i("", !0)])]), o("div", Os, [o("div", ks, [o("span", As, "识别结果 (" + A(e.text.length) + " 行)", 1)]), e.text.length ? (x(), a("div", Ns, A(e.fullText), 1)) : (x(), a("div", js, [t[7] ||= o("div", { class: "uz-empty-icon" }, "📝", -1), o("div", Ms, A(e.ocrLoading ? "正在读取图像解析文字,请稍候..." : "暂无识别数据,请上传图像"), 1)]))])]);
|
|
7814
7430
|
}
|
|
7815
|
-
var
|
|
7816
|
-
UzActionButton: () =>
|
|
7431
|
+
var Fs = /*#__PURE__*/ Q(ls, [["render", Ps], ["__scopeId", "data-v-c7224ff5"]]), Is = /* @__PURE__ */ ut({
|
|
7432
|
+
UzActionButton: () => dt,
|
|
7817
7433
|
UzBack: () => br,
|
|
7818
|
-
UzBom: () =>
|
|
7819
|
-
UzCamera: () =>
|
|
7820
|
-
UzCircle: () =>
|
|
7434
|
+
UzBom: () => Ti,
|
|
7435
|
+
UzCamera: () => ga,
|
|
7436
|
+
UzCircle: () => la,
|
|
7821
7437
|
UzDraggableForm: () => Nr,
|
|
7822
7438
|
UzForm: () => Or,
|
|
7823
7439
|
UzFormItem: () => wr,
|
|
7824
7440
|
UzFormItemImage: () => Ur,
|
|
7825
7441
|
UzFormItemTimesPicker: () => qr,
|
|
7826
7442
|
UzFormItemUpload: () => zr,
|
|
7827
|
-
UzIcon: () =>
|
|
7828
|
-
UzOcr: () =>
|
|
7829
|
-
UzSearchBar: () =>
|
|
7830
|
-
UzSearchMobileBar: () =>
|
|
7831
|
-
UzSpin: () =>
|
|
7832
|
-
UzTable: () =>
|
|
7833
|
-
UzTableChild: () =>
|
|
7834
|
-
UzTableDrawer: () =>
|
|
7835
|
-
UzTableFile: () =>
|
|
7836
|
-
UzTableMobile: () =>
|
|
7837
|
-
UzTableQuestChild: () =>
|
|
7838
|
-
UzThumbnail: () =>
|
|
7839
|
-
UzWrap: () =>
|
|
7840
|
-
commonStore: () =>
|
|
7443
|
+
UzIcon: () => qt,
|
|
7444
|
+
UzOcr: () => Fs,
|
|
7445
|
+
UzSearchBar: () => Ea,
|
|
7446
|
+
UzSearchMobileBar: () => Ma,
|
|
7447
|
+
UzSpin: () => Fa,
|
|
7448
|
+
UzTable: () => Za,
|
|
7449
|
+
UzTableChild: () => oo,
|
|
7450
|
+
UzTableDrawer: () => bo,
|
|
7451
|
+
UzTableFile: () => Io,
|
|
7452
|
+
UzTableMobile: () => Ao,
|
|
7453
|
+
UzTableQuestChild: () => po,
|
|
7454
|
+
UzThumbnail: () => Go,
|
|
7455
|
+
UzWrap: () => os,
|
|
7456
|
+
commonStore: () => J,
|
|
7841
7457
|
fnActionReduction: () => _r,
|
|
7842
7458
|
fnActionSimplify: () => gr,
|
|
7843
|
-
fnAddThumbnail: () =>
|
|
7844
|
-
fnClearAllThumbnail: () =>
|
|
7845
|
-
fnDeleteThumbnail: () =>
|
|
7846
|
-
fnGetTableData: () =>
|
|
7847
|
-
fnOptionReduction: () =>
|
|
7848
|
-
fnOptionSimplify: () =>
|
|
7849
|
-
fnPrepareFormData: () =>
|
|
7850
|
-
fnPrepareTableData: () =>
|
|
7459
|
+
fnAddThumbnail: () => Bo,
|
|
7460
|
+
fnClearAllThumbnail: () => Ho,
|
|
7461
|
+
fnDeleteThumbnail: () => Vo,
|
|
7462
|
+
fnGetTableData: () => fi,
|
|
7463
|
+
fnOptionReduction: () => vi,
|
|
7464
|
+
fnOptionSimplify: () => _i,
|
|
7465
|
+
fnPrepareFormData: () => yi,
|
|
7466
|
+
fnPrepareTableData: () => bi,
|
|
7851
7467
|
fnRenderAction: () => lr,
|
|
7852
|
-
fnSetLang: () =>
|
|
7853
|
-
fnSetTheme: () =>
|
|
7854
|
-
fnSetThumbnail: () =>
|
|
7855
|
-
fnTableReduction: () =>
|
|
7856
|
-
fnTableSimplify: () =>
|
|
7857
|
-
fnTriggersReduction: () =>
|
|
7858
|
-
fnTriggersSimplify: () =>
|
|
7859
|
-
i18n: () =>
|
|
7860
|
-
}),
|
|
7861
|
-
function
|
|
7862
|
-
|
|
7468
|
+
fnSetLang: () => Ht,
|
|
7469
|
+
fnSetTheme: () => Ut,
|
|
7470
|
+
fnSetThumbnail: () => Ro,
|
|
7471
|
+
fnTableReduction: () => mi,
|
|
7472
|
+
fnTableSimplify: () => pi,
|
|
7473
|
+
fnTriggersReduction: () => gi,
|
|
7474
|
+
fnTriggersSimplify: () => hi,
|
|
7475
|
+
i18n: () => q
|
|
7476
|
+
}), Ls = 3840, Rs = 2160, zs = C({ scale: 1 });
|
|
7477
|
+
function Bs(e, t) {
|
|
7478
|
+
Ls = e, Rs = t;
|
|
7863
7479
|
}
|
|
7864
|
-
function
|
|
7865
|
-
let e = 1, t = window.innerWidth, n = window.innerHeight, r =
|
|
7480
|
+
function Vs() {
|
|
7481
|
+
let e = 1, t = window.innerWidth, n = window.innerHeight, r = Ls, i = Rs, a = parseFloat((r / i).toFixed(5));
|
|
7866
7482
|
if (parseFloat((t / n).toFixed(5)) > a) {
|
|
7867
7483
|
let t = parseFloat((n * a / r).toFixed(5));
|
|
7868
7484
|
e = t > 1 ? 1 : t;
|
|
@@ -7870,17 +7486,17 @@ function Ks() {
|
|
|
7870
7486
|
let n = parseFloat((t / a / i).toFixed(5));
|
|
7871
7487
|
e = n > 1 ? 1 : n;
|
|
7872
7488
|
}
|
|
7873
|
-
|
|
7489
|
+
zs.scale = e;
|
|
7874
7490
|
}
|
|
7875
|
-
function
|
|
7876
|
-
let e = $e(
|
|
7491
|
+
function Hs() {
|
|
7492
|
+
let e = $e(Vs, 200);
|
|
7877
7493
|
return e(), window.addEventListener("resize", e), () => {
|
|
7878
|
-
|
|
7494
|
+
Ls = 3840, Rs = 2160, window.removeEventListener("resize", e);
|
|
7879
7495
|
};
|
|
7880
7496
|
}
|
|
7881
7497
|
//#endregion
|
|
7882
7498
|
//#region components/hooks/useThrottleFn.ts
|
|
7883
|
-
function
|
|
7499
|
+
function Us(e, t = 1e3) {
|
|
7884
7500
|
let r = w(e), i = n(() => et((...e) => r.value([...e]), t));
|
|
7885
7501
|
return b(() => {
|
|
7886
7502
|
i.value.cancel();
|
|
@@ -7892,16 +7508,16 @@ function Js(e, t = 1e3) {
|
|
|
7892
7508
|
}
|
|
7893
7509
|
//#endregion
|
|
7894
7510
|
//#region components/hooks/useLocalStorage.ts
|
|
7895
|
-
function
|
|
7896
|
-
return [w(
|
|
7897
|
-
n === void 0 ?
|
|
7511
|
+
function Ws(e, t) {
|
|
7512
|
+
return [w(K(e, t?.defaultValue)), (n) => {
|
|
7513
|
+
n === void 0 ? Et(e) : G(e, n, t?.expired || "1 Day");
|
|
7898
7514
|
}];
|
|
7899
7515
|
}
|
|
7900
7516
|
//#endregion
|
|
7901
7517
|
//#region components/hooks/useQuery.ts
|
|
7902
|
-
function
|
|
7518
|
+
function Gs(e, t, n) {
|
|
7903
7519
|
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 = () => {
|
|
7904
|
-
|
|
7520
|
+
Hn(), clearInterval(o.value), o.value = null;
|
|
7905
7521
|
}, p = async () => {
|
|
7906
7522
|
if (!s.value) {
|
|
7907
7523
|
h(!0, "loading");
|
|
@@ -7920,7 +7536,7 @@ function Xs(e, t, n) {
|
|
|
7920
7536
|
});
|
|
7921
7537
|
e = await Promise.race([n, t()]);
|
|
7922
7538
|
}
|
|
7923
|
-
h(!1, "success"), m(e),
|
|
7539
|
+
h(!1, "success"), m(e), G(r, e, 0);
|
|
7924
7540
|
} catch (e) {
|
|
7925
7541
|
g(e), h(!1, "error"), u.value > 0 && (--u.value, setTimeout(() => {
|
|
7926
7542
|
p();
|
|
@@ -7937,14 +7553,14 @@ function Xs(e, t, n) {
|
|
|
7937
7553
|
}, g = (e) => {
|
|
7938
7554
|
l.value = e;
|
|
7939
7555
|
}, _ = () => {
|
|
7940
|
-
|
|
7556
|
+
Hn(), i.value && i.value();
|
|
7941
7557
|
}, y = () => {
|
|
7942
7558
|
_(), p(), n?.pollingInterval && (f(), o.value = setInterval(() => {
|
|
7943
7559
|
p();
|
|
7944
7560
|
}, n?.pollingInterval));
|
|
7945
7561
|
};
|
|
7946
7562
|
if (n?.retry && n.pollingInterval === void 0 && (u.value = n.retry.retryCount || 3, d.value = n.retry.retryInterval || 8e3), n?.initialData && m(n.initialData()), n === void 0 || n.initialData === void 0 || n.cache === void 0 || n.cache === !0) try {
|
|
7947
|
-
let e =
|
|
7563
|
+
let e = K(r, !1);
|
|
7948
7564
|
e && m(e);
|
|
7949
7565
|
} catch {
|
|
7950
7566
|
m(!1);
|
|
@@ -7965,26 +7581,26 @@ function Xs(e, t, n) {
|
|
|
7965
7581
|
}
|
|
7966
7582
|
//#endregion
|
|
7967
7583
|
//#region package.json
|
|
7968
|
-
var
|
|
7969
|
-
async function
|
|
7584
|
+
var Ks = "0.1.128", qs;
|
|
7585
|
+
async function Js() {
|
|
7970
7586
|
let e = await fetch(`${window.location.protocol}//${window.location.host}`, {
|
|
7971
7587
|
method: "HEAD",
|
|
7972
7588
|
cache: "no-cache"
|
|
7973
7589
|
});
|
|
7974
7590
|
return e.headers.get("etag") || e.headers.get("last-modified");
|
|
7975
7591
|
}
|
|
7976
|
-
async function
|
|
7977
|
-
let e = await
|
|
7978
|
-
|
|
7592
|
+
async function Ys() {
|
|
7593
|
+
let e = await Js();
|
|
7594
|
+
qs !== e && Wt(!0);
|
|
7979
7595
|
}
|
|
7980
|
-
async function
|
|
7981
|
-
|
|
7982
|
-
|
|
7596
|
+
async function Xs() {
|
|
7597
|
+
qs = await Js(), window.versionMonitor && clearInterval(window.versionMonitor), window.versionMonitor = setInterval(() => {
|
|
7598
|
+
Ys();
|
|
7983
7599
|
}, 6e4);
|
|
7984
7600
|
}
|
|
7985
7601
|
//#endregion
|
|
7986
7602
|
//#region components/create.ts
|
|
7987
|
-
function
|
|
7603
|
+
function Zs({ components: e = [] } = {}) {
|
|
7988
7604
|
let t = [];
|
|
7989
7605
|
function n(e, t, n) {
|
|
7990
7606
|
e.component(t) || e.component(t, n);
|
|
@@ -7996,20 +7612,20 @@ function nc({ components: e = [] } = {}) {
|
|
|
7996
7612
|
n(r, t, e);
|
|
7997
7613
|
});
|
|
7998
7614
|
}), i)) {
|
|
7999
|
-
let { title: e = "杭州宇臻智能", monitor: t = !1, monitorInfo: n, version: a = !0, language: o = !1, local: s = "zh-CN", icons: c = void 0, iconDefault: l = "" } = i, u =
|
|
8000
|
-
|
|
7615
|
+
let { title: e = "杭州宇臻智能", monitor: t = !1, monitorInfo: n, version: a = !0, language: o = !1, local: s = "zh-CN", icons: c = void 0, iconDefault: l = "" } = i, u = K("theme", !1), d = K("lang", s);
|
|
7616
|
+
Gt(e), Vt(o), Ht(d), Ut(u), Bt({
|
|
8001
7617
|
icons: c,
|
|
8002
7618
|
iconDefault: l
|
|
8003
|
-
}),
|
|
7619
|
+
}), q.global.locale.value = d, a && Xs(), t && Mn(r, t, n);
|
|
8004
7620
|
}
|
|
8005
7621
|
}
|
|
8006
7622
|
return {
|
|
8007
|
-
version:
|
|
7623
|
+
version: Ks,
|
|
8008
7624
|
install: r
|
|
8009
7625
|
};
|
|
8010
7626
|
}
|
|
8011
7627
|
//#endregion
|
|
8012
7628
|
//#region components/preset.ts
|
|
8013
|
-
var
|
|
7629
|
+
var Qs = Zs({ components: Object.keys(Is).map((e) => Is[e]) }), $s = Qs.install;
|
|
8014
7630
|
//#endregion
|
|
8015
|
-
export {
|
|
7631
|
+
export { Wn as BLOB, Gn as CUSTOM, Kn as FILE, Un as GET, Z as POST, dt as UzActionButton, br as UzBack, Ti as UzBom, ga as UzCamera, la as UzCircle, Nr as UzDraggableForm, Or as UzForm, wr as UzFormItem, Ur as UzFormItemImage, qr as UzFormItemTimesPicker, zr as UzFormItemUpload, qt as UzIcon, Fs as UzOcr, Ea as UzSearchBar, Ma as UzSearchMobileBar, Fa as UzSpin, Za as UzTable, oo as UzTableChild, bo as UzTableDrawer, Io as UzTableFile, Ao as UzTableMobile, po as UzTableQuestChild, Go as UzThumbnail, os as UzWrap, J as commonStore, Zs as create, rs as darkTheme, Qs as default, _r as fnActionReduction, gr as fnActionSimplify, Bo as fnAddThumbnail, Hn as fnCancelFetch, Ho as fnClearAllThumbnail, Vs as fnComputedScale, Jt as fnCreateRouter, Et as fnDelStorage, Ot as fnDelStorageAll, Dt as fnDelStorageByPrefix, Vo as fnDeleteThumbnail, Tt as fnDialog, W as fnErrorLog, Rt as fnFilterByPinyinInitials, jt as fnFormatTime, Ft as fnFormatUnits, Pt as fnFullScreen, K as fnGetStorage, fi as fnGetTableData, Hs as fnListenerScale, wt as fnNotification, vi as fnOptionReduction, _i as fnOptionSimplify, At as fnPageModel2Naive, yi as fnPrepareFormData, bi as fnPrepareTableData, lr as fnRenderAction, kt as fnScrollTop, Ht as fnSetLang, Bs as fnSetNormalWidthAndHeight, G as fnSetStorage, Ut as fnSetTheme, Ro as fnSetThumbnail, mi as fnTableReduction, pi as fnTableSimplify, Nt as fnThrottle, Mt as fnTitle, gi as fnTriggersReduction, hi as fnTriggersSimplify, q as i18n, $s as install, ns as lightTheme, zt as mergeColumns, Y as router, zs as scaleStore, Jr as useDebounceFn, Ws as useLocalStorage, Gs as useQuery, Us as useThrottleFn };
|