@das-fed/ui 6.4.0-dev.9 → 6.4.0-hot.1
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/package.json +8 -6
- package/packages/business-components/app-container/index.js +46 -252
- package/packages/business-components/app-container/index.js.gz +0 -0
- package/packages/business-components/app-container/style.css +1 -1
- package/packages/business-components/app-container/style.css.gz +0 -0
- package/packages/business-components/change-enterprises/index.js +89 -295
- package/packages/business-components/change-enterprises/index.js.gz +0 -0
- package/packages/business-components/change-enterprises/style.css +1 -1
- package/packages/business-components/change-enterprises/style.css.gz +0 -0
- package/packages/business-components/device-panel/index.js +24047 -29070
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/device-panel/style.css +1 -1
- package/packages/business-components/device-panel/style.css.gz +0 -0
- package/packages/business-components/export-button/index.js +152 -432
- package/packages/business-components/export-button/index.js.gz +0 -0
- package/packages/business-components/import-button/index.js +323 -603
- package/packages/business-components/import-button/index.js.gz +0 -0
- package/packages/business-components/process-form/index.js +788 -1276
- package/packages/business-components/process-form/index.js.gz +0 -0
- package/packages/business-components/process-form/style.css +1 -1
- package/packages/business-components/process-log/ProcessLogItem.vue.d.ts +1 -1
- package/packages/business-components/process-log/index.d.ts +21 -21
- package/packages/business-components/process-log/index.js +329 -3948
- package/packages/business-components/process-log/index.js.gz +0 -0
- package/packages/business-components/process-search-form/index.js +439 -719
- package/packages/business-components/process-search-form/index.js.gz +0 -0
- package/packages/business-components/process-table/index.js +538 -819
- package/packages/business-components/process-table/index.js.gz +0 -0
- package/packages/business-components/urgent-panel/index.js +1587 -2700
- package/packages/business-components/urgent-panel/index.js.gz +0 -0
- package/packages/business-components/urgent-panel/src/components/urgentPanelModal/apis.d.ts +1 -0
- package/packages/business-components/urgent-panel/src/components/urgentPanelModal/components/use-schedule-track/Track.vue.d.ts +2 -2
- package/packages/business-components/urgent-panel/src/components/urgentPanelModal/components/use-schedule-track/track.d.ts +1 -1
- package/packages/business-components/urgent-panel/style.css +1 -1
- package/packages/business-components/urgent-panel/style.css.gz +0 -0
- package/packages/business-components/video-dialog/index.js +338 -619
- package/packages/business-components/video-dialog/index.js.gz +0 -0
- package/packages/components/alert/index.js +52 -3418
- package/packages/components/alert/index.js.gz +0 -0
- package/packages/components/alert/style.css +1 -1
- package/packages/components/alert/style.css.gz +0 -0
- package/packages/components/autocomplete/index.js +456 -2872
- package/packages/components/autocomplete/index.js.gz +0 -0
- package/packages/components/autocomplete/style.css +1 -1
- package/packages/components/autocomplete/style.css.gz +0 -0
- package/packages/components/breadcrumb/index.js +47 -269
- package/packages/components/breadcrumb/index.js.gz +0 -0
- package/packages/components/breadcrumb/style.css +1 -1
- package/packages/components/breadcrumb/style.css.gz +0 -0
- package/packages/components/button/index.js +215 -9801
- package/packages/components/button/index.js.gz +0 -0
- package/packages/components/button/style.css +1 -1
- package/packages/components/button/style.css.gz +0 -0
- package/packages/components/calendar/index.js +257 -614
- package/packages/components/calendar/index.js.gz +0 -0
- package/packages/components/cascader/index.js +139 -6397
- package/packages/components/cascader/index.js.gz +0 -0
- package/packages/components/cascader/style.css +1 -1
- package/packages/components/cascader/style.css.gz +0 -0
- package/packages/components/checkbox/index.js +180 -3837
- package/packages/components/checkbox/index.js.gz +0 -0
- package/packages/components/checkbox/style.css +1 -1
- package/packages/components/checkbox/style.css.gz +0 -0
- package/packages/components/collapse-panel/index.js +31 -3624
- package/packages/components/collapse-panel/index.js.gz +0 -0
- package/packages/components/collapse-panel/style.css +1 -1
- package/packages/components/collapse-panel/style.css.gz +0 -0
- package/packages/components/collaspe/index.js +31 -3624
- package/packages/components/collaspe/index.js.gz +0 -0
- package/packages/components/collaspe/style.css +1 -1
- package/packages/components/color-picker/index.js +106 -5342
- package/packages/components/color-picker/index.js.gz +0 -0
- package/packages/components/color-picker/style.css +1 -1
- package/packages/components/color-picker/style.css.gz +0 -0
- package/packages/components/date-picker/index.js +539 -14894
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/date-picker/style.css +1 -1
- package/packages/components/date-picker/style.css.gz +0 -0
- package/packages/components/dialog/index.js +186 -1832
- package/packages/components/dialog/index.js.gz +0 -0
- package/packages/components/dialog/style.css +1 -1
- package/packages/components/dialog/style.css.gz +0 -0
- package/packages/components/drawer/index.js +38 -1611
- package/packages/components/drawer/index.js.gz +0 -0
- package/packages/components/drawer/style.css +1 -1
- package/packages/components/dropdown/index.js +54 -4607
- package/packages/components/dropdown/index.js.gz +0 -0
- package/packages/components/dropdown/style.css +1 -1
- package/packages/components/dropdown/style.css.gz +0 -0
- package/packages/components/empty/index.js +39 -800
- package/packages/components/empty/index.js.gz +0 -0
- package/packages/components/image-preview/index.js +34 -1282
- package/packages/components/image-preview/index.js.gz +0 -0
- package/packages/components/image-upload/index.js +112 -11722
- package/packages/components/image-upload/index.js.gz +0 -0
- package/packages/components/image-upload/style.css +1 -1
- package/packages/components/image-upload/style.css.gz +0 -0
- package/packages/components/image-viewer/index.d.ts +9 -0
- package/packages/components/image-viewer/index.js +389 -13162
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/image-viewer/src/Index.vue.d.ts +3 -0
- package/packages/components/image-viewer/src/hooks/use-handler-image-src.d.ts +2 -1
- package/packages/components/image-viewer/src/type.d.ts +3 -0
- package/packages/components/image-viewer/style.css +1 -1
- package/packages/components/image-viewer/style.css.gz +0 -0
- package/packages/components/input/index.js +157 -1084
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input/style.css +1 -1
- package/packages/components/input/style.css.gz +0 -0
- package/packages/components/input-dialog-select/index.js +2 -2
- package/packages/components/input-dialog-select/index.js.gz +0 -0
- package/packages/components/input-dialog-select/style.css +1 -1
- package/packages/components/input-dialog-select/style.css.gz +0 -0
- package/packages/components/input-number/index.js +145 -1828
- package/packages/components/input-number/index.js.gz +0 -0
- package/packages/components/input-number/style.css +1 -1
- package/packages/components/input-number/style.css.gz +0 -0
- package/packages/components/live-player/index.js +2883 -3667
- package/packages/components/live-player/index.js.gz +0 -0
- package/packages/components/live-player/style.css +1 -1
- package/packages/components/map/index.js +1189 -5207
- package/packages/components/map/index.js.gz +0 -0
- package/packages/components/map/style.css +1 -1
- package/packages/components/menu-aside/index.js +610 -8303
- package/packages/components/menu-aside/index.js.gz +0 -0
- package/packages/components/menu-aside/style.css +1 -1
- package/packages/components/menu-aside/style.css.gz +0 -0
- package/packages/components/menu-header/index.js +39 -10077
- package/packages/components/menu-header/index.js.gz +0 -0
- package/packages/components/menu-header/style.css +1 -1
- package/packages/components/menu-header/style.css.gz +0 -0
- package/packages/components/message/index.js +53 -1286
- package/packages/components/message/index.js.gz +0 -0
- package/packages/components/message/style.css +1 -1
- package/packages/components/message/style.css.gz +0 -0
- package/packages/components/notification/index.js +48 -3269
- package/packages/components/notification/index.js.gz +0 -0
- package/packages/components/notification/style.css +1 -1
- package/packages/components/notification/style.css.gz +0 -0
- package/packages/components/pagination/index.js +153 -8015
- package/packages/components/pagination/index.js.gz +0 -0
- package/packages/components/pagination/style.css +1 -1
- package/packages/components/pagination/style.css.gz +0 -0
- package/packages/components/popover/index.js +44 -2492
- package/packages/components/popover/index.js.gz +0 -0
- package/packages/components/popover/style.css +1 -1
- package/packages/components/popover/style.css.gz +0 -0
- package/packages/components/progress/index.js +107 -514
- package/packages/components/progress/index.js.gz +0 -0
- package/packages/components/progress/style.css +1 -1
- package/packages/components/progress/style.css.gz +0 -0
- package/packages/components/radio/index.js +160 -3724
- package/packages/components/radio/index.js.gz +0 -0
- package/packages/components/radio/style.css +1 -1
- package/packages/components/radio/style.css.gz +0 -0
- package/packages/components/scrollbar/index.js +915 -1440
- package/packages/components/scrollbar/index.js.gz +0 -0
- package/packages/components/scrollbar/style.css +9 -9
- package/packages/components/scrollbar/style.css.gz +0 -0
- package/packages/components/search/index.js +90 -5261
- package/packages/components/search/index.js.gz +0 -0
- package/packages/components/search/style.css +1 -1
- package/packages/components/search/style.css.gz +0 -0
- package/packages/components/search-form/index.js +920 -1008
- package/packages/components/search-form/index.js.gz +0 -0
- package/packages/components/select/index.js +380 -10505
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/select-list/index.js +1173 -1431
- package/packages/components/select-list/index.js.gz +0 -0
- package/packages/components/select-list/style.css +1 -1
- package/packages/components/select-list/style.css.gz +0 -0
- package/packages/components/special-range-picker-month/index.js +196 -2645
- package/packages/components/special-range-picker-month/index.js.gz +0 -0
- package/packages/components/special-range-picker-year/index.js +259 -2707
- package/packages/components/special-range-picker-year/index.js.gz +0 -0
- package/packages/components/special-range-picker-year/style.css +1 -1
- package/packages/components/special-range-picker-year/style.css.gz +0 -0
- package/packages/components/spin/index.js +49 -3534
- package/packages/components/spin/index.js.gz +0 -0
- package/packages/components/spin/style.css +1 -1
- package/packages/components/spin/style.css.gz +0 -0
- package/packages/components/step/index.js +29 -4085
- package/packages/components/step/index.js.gz +0 -0
- package/packages/components/step/style.css +1 -1
- package/packages/components/steps/index.js +15 -4070
- package/packages/components/steps/style.css +1 -1
- package/packages/components/steps/style.css.gz +0 -0
- package/packages/components/switch/index.js +31 -545
- package/packages/components/switch/index.js.gz +0 -0
- package/packages/components/switch/style.css +1 -1
- package/packages/components/switch/style.css.gz +0 -0
- package/packages/components/table/index.js +6287 -18573
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/table/src/Table.vue.d.ts +2 -2
- package/packages/components/table/style.css +1 -1
- package/packages/components/table/style.css.gz +0 -0
- package/packages/components/tabs/index.js +173 -12627
- package/packages/components/tabs/index.js.gz +0 -0
- package/packages/components/tabs/style.css +1 -1
- package/packages/components/tabs/style.css.gz +0 -0
- package/packages/components/tag/index.js +55 -323
- package/packages/components/tag/index.js.gz +0 -0
- package/packages/components/tag/style.css +1 -1
- package/packages/components/tag/style.css.gz +0 -0
- package/packages/components/time-line/index.js +61 -3397
- package/packages/components/time-line/index.js.gz +0 -0
- package/packages/components/time-line/style.css +1 -1
- package/packages/components/time-line/style.css.gz +0 -0
- package/packages/components/tooltip/index.js +65 -2171
- package/packages/components/tooltip/index.js.gz +0 -0
- package/packages/components/tooltip/style.css +1 -1
- package/packages/components/tooltip/style.css.gz +0 -0
- package/packages/components/tree/index.js +1887 -6747
- package/packages/components/tree/index.js.gz +0 -0
- package/packages/components/tree/style.css +1 -1
- package/packages/components/tree/style.css.gz +0 -0
- package/packages/components/tree-select/index.js +358 -2776
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-select/style.css +1 -1
- package/packages/components/tree-select/style.css.gz +0 -0
- package/packages/components/upload/index.js +116 -11726
- package/packages/components/upload/index.js.gz +0 -0
- package/packages/components/upload/style.css +1 -1
- package/packages/components/upload/style.css.gz +0 -0
- package/packages/components/virtual-tree/index.js +86 -2923
- package/packages/components/virtual-tree/index.js.gz +0 -0
- package/packages/components/virtual-tree/style.css +1 -1
- package/packages/components/virtual-tree/style.css.gz +0 -0
- package/packages/components/watermark/index.js +17 -368
- package/packages/business-components/process-form/style.css.gz +0 -0
- package/packages/components/collaspe/style.css.gz +0 -0
- package/packages/components/drawer/style.css.gz +0 -0
- package/packages/components/image-preview/style.css +0 -1
- package/packages/components/image-preview/style.css.gz +0 -0
- package/packages/components/live-player/style.css.gz +0 -0
- package/packages/components/map/style.css.gz +0 -0
- package/packages/components/step/style.css.gz +0 -0
- package/packages/components/steps/index.js.gz +0 -0
- package/packages/components/watermark/index.js.gz +0 -0
|
@@ -1,460 +1,180 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/business-components/import-button/style.css';
|
|
2
|
-
import { withInstall as
|
|
3
|
-
import { ref as
|
|
4
|
-
import { i18n as
|
|
5
|
-
import { DasDialog as
|
|
6
|
-
import { DasUpload as
|
|
7
|
-
import { DasProgress as
|
|
8
|
-
import { DasButton as
|
|
9
|
-
import { iotMinio as
|
|
10
|
-
import { DasMessage as
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
import { withInstall as me } from "@das-fed/utils/with-install/index";
|
|
3
|
+
import { ref as b, defineComponent as pe, watch as ce, openBlock as de, createElementBlock as fe, createElementVNode as A, unref as s, renderSlot as ae, createVNode as P, withCtx as j, createTextVNode as H, toDisplayString as V, isRef as X } from "vue";
|
|
4
|
+
import { i18n as B } from "@das-fed/web/packages/i18n/index";
|
|
5
|
+
import { DasDialog as se } from "@das-fed/ui/packages/components/dialog/index";
|
|
6
|
+
import { DasUpload as ge } from "@das-fed/ui/packages/components/upload/index";
|
|
7
|
+
import { DasProgress as ve } from "@das-fed/ui/packages/components/progress/index";
|
|
8
|
+
import { DasButton as G } from "@das-fed/ui/packages/components/button/index";
|
|
9
|
+
import { iotMinio as ee, iotProgress as xe } from "@das-fed/utils/api-services/modules/iot";
|
|
10
|
+
import { DasMessage as S } from "@das-fed/ui/packages/components/message/index";
|
|
11
|
+
import be from "dayjs";
|
|
12
|
+
import { getConfig as le } from "@das-fed/utils/config";
|
|
13
|
+
import { getUserInfo as he } from "@das-fed/utils/common-info/index";
|
|
14
|
+
import { pureImageSrc as we } from "@das-fed/utils/pure-image-src";
|
|
15
|
+
let Z = (e = 21) => {
|
|
16
|
+
let p = "", m = crypto.getRandomValues(new Uint8Array(e));
|
|
17
|
+
for (; e--; ) {
|
|
18
|
+
let i = m[e] & 63;
|
|
19
|
+
i < 36 ? p += i.toString(36) : i < 62 ? p += (i - 26).toString(36).toUpperCase() : i < 63 ? p += "_" : p += "-";
|
|
19
20
|
}
|
|
20
|
-
return
|
|
21
|
+
return p;
|
|
21
22
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
var n = String(a);
|
|
36
|
-
return !n || n.length >= t ? a : "" + Array(t + 1 - n.length).join(e) + a;
|
|
37
|
-
}, G = { s: V, z: function(a) {
|
|
38
|
-
var t = -a.utcOffset(), e = Math.abs(t), n = Math.floor(e / 60), r = e % 60;
|
|
39
|
-
return (t <= 0 ? "+" : "-") + V(n, 2, "0") + ":" + V(r, 2, "0");
|
|
40
|
-
}, m: function a(t, e) {
|
|
41
|
-
if (t.date() < e.date()) return -a(e, t);
|
|
42
|
-
var n = 12 * (e.year() - t.year()) + (e.month() - t.month()), r = t.clone().add(n, y), i = e - r < 0, l = t.clone().add(n + (i ? -1 : 1), y);
|
|
43
|
-
return +(-(n + (e - r) / (i ? r - l : l - r)) || 0);
|
|
44
|
-
}, a: function(a) {
|
|
45
|
-
return a < 0 ? Math.ceil(a) || 0 : Math.floor(a);
|
|
46
|
-
}, p: function(a) {
|
|
47
|
-
return { M: y, y: F, w: U, d: C, D: I, h: O, m: w, s: b, ms: p, Q: H }[a] || String(a || "").toLowerCase().replace(/s$/, "");
|
|
48
|
-
}, u: function(a) {
|
|
49
|
-
return a === void 0;
|
|
50
|
-
} }, z = "en", g = {};
|
|
51
|
-
g[z] = W;
|
|
52
|
-
var x = "$isDayjsObject", S = function(a) {
|
|
53
|
-
return a instanceof c || !(!a || !a[x]);
|
|
54
|
-
}, E = function a(t, e, n) {
|
|
55
|
-
var r;
|
|
56
|
-
if (!t) return z;
|
|
57
|
-
if (typeof t == "string") {
|
|
58
|
-
var i = t.toLowerCase();
|
|
59
|
-
g[i] && (r = i), e && (g[i] = e, r = i);
|
|
60
|
-
var l = t.split("-");
|
|
61
|
-
if (!r && l.length > 1) return a(l[0]);
|
|
62
|
-
} else {
|
|
63
|
-
var d = t.name;
|
|
64
|
-
g[d] = t, r = d;
|
|
65
|
-
}
|
|
66
|
-
return !n && r && (z = r), r || !n && z;
|
|
67
|
-
}, M = function(a, t) {
|
|
68
|
-
if (S(a)) return a.clone();
|
|
69
|
-
var e = typeof t == "object" ? t : {};
|
|
70
|
-
return e.date = a, e.args = arguments, new c(e);
|
|
71
|
-
}, o = G;
|
|
72
|
-
o.l = E, o.i = S, o.w = function(a, t) {
|
|
73
|
-
return M(a, { locale: t.$L, utc: t.$u, x: t.$x, $offset: t.$offset });
|
|
74
|
-
};
|
|
75
|
-
var c = function() {
|
|
76
|
-
function a(e) {
|
|
77
|
-
this.$L = E(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[x] = !0;
|
|
78
|
-
}
|
|
79
|
-
var t = a.prototype;
|
|
80
|
-
return t.parse = function(e) {
|
|
81
|
-
this.$d = function(n) {
|
|
82
|
-
var r = n.date, i = n.utc;
|
|
83
|
-
if (r === null) return /* @__PURE__ */ new Date(NaN);
|
|
84
|
-
if (o.u(r)) return /* @__PURE__ */ new Date();
|
|
85
|
-
if (r instanceof Date) return new Date(r);
|
|
86
|
-
if (typeof r == "string" && !/Z$/i.test(r)) {
|
|
87
|
-
var l = r.match(j);
|
|
88
|
-
if (l) {
|
|
89
|
-
var d = l[2] - 1 || 0, v = (l[7] || "0").substring(0, 3);
|
|
90
|
-
return i ? new Date(Date.UTC(l[1], d, l[3] || 1, l[4] || 0, l[5] || 0, l[6] || 0, v)) : new Date(l[1], d, l[3] || 1, l[4] || 0, l[5] || 0, l[6] || 0, v);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return new Date(r);
|
|
94
|
-
}(e), this.init();
|
|
95
|
-
}, t.init = function() {
|
|
96
|
-
var e = this.$d;
|
|
97
|
-
this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds();
|
|
98
|
-
}, t.$utils = function() {
|
|
99
|
-
return o;
|
|
100
|
-
}, t.isValid = function() {
|
|
101
|
-
return this.$d.toString() !== _;
|
|
102
|
-
}, t.isSame = function(e, n) {
|
|
103
|
-
var r = M(e);
|
|
104
|
-
return this.startOf(n) <= r && r <= this.endOf(n);
|
|
105
|
-
}, t.isAfter = function(e, n) {
|
|
106
|
-
return M(e) < this.startOf(n);
|
|
107
|
-
}, t.isBefore = function(e, n) {
|
|
108
|
-
return this.endOf(n) < M(e);
|
|
109
|
-
}, t.$g = function(e, n, r) {
|
|
110
|
-
return o.u(e) ? this[n] : this.set(r, e);
|
|
111
|
-
}, t.unix = function() {
|
|
112
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
113
|
-
}, t.valueOf = function() {
|
|
114
|
-
return this.$d.getTime();
|
|
115
|
-
}, t.startOf = function(e, n) {
|
|
116
|
-
var r = this, i = !!o.u(n) || n, l = o.p(e), d = function(A, T) {
|
|
117
|
-
var q = o.w(r.$u ? Date.UTC(r.$y, T, A) : new Date(r.$y, T, A), r);
|
|
118
|
-
return i ? q : q.endOf(C);
|
|
119
|
-
}, v = function(A, T) {
|
|
120
|
-
return o.w(r.toDate()[A].apply(r.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(T)), r);
|
|
121
|
-
}, D = this.$W, k = this.$M, L = this.$D, K = "set" + (this.$u ? "UTC" : "");
|
|
122
|
-
switch (l) {
|
|
123
|
-
case F:
|
|
124
|
-
return i ? d(1, 0) : d(31, 11);
|
|
125
|
-
case y:
|
|
126
|
-
return i ? d(1, k) : d(0, k + 1);
|
|
127
|
-
case U:
|
|
128
|
-
var B = this.$locale().weekStart || 0, Y = (D < B ? D + 7 : D) - B;
|
|
129
|
-
return d(i ? L - Y : L + (6 - Y), k);
|
|
130
|
-
case C:
|
|
131
|
-
case I:
|
|
132
|
-
return v(K + "Hours", 0);
|
|
133
|
-
case O:
|
|
134
|
-
return v(K + "Minutes", 1);
|
|
135
|
-
case w:
|
|
136
|
-
return v(K + "Seconds", 2);
|
|
137
|
-
case b:
|
|
138
|
-
return v(K + "Milliseconds", 3);
|
|
139
|
-
default:
|
|
140
|
-
return this.clone();
|
|
141
|
-
}
|
|
142
|
-
}, t.endOf = function(e) {
|
|
143
|
-
return this.startOf(e, !1);
|
|
144
|
-
}, t.$set = function(e, n) {
|
|
145
|
-
var r, i = o.p(e), l = "set" + (this.$u ? "UTC" : ""), d = (r = {}, r[C] = l + "Date", r[I] = l + "Date", r[y] = l + "Month", r[F] = l + "FullYear", r[O] = l + "Hours", r[w] = l + "Minutes", r[b] = l + "Seconds", r[p] = l + "Milliseconds", r)[i], v = i === C ? this.$D + (n - this.$W) : n;
|
|
146
|
-
if (i === y || i === F) {
|
|
147
|
-
var D = this.clone().set(I, 1);
|
|
148
|
-
D.$d[d](v), D.init(), this.$d = D.set(I, Math.min(this.$D, D.daysInMonth())).$d;
|
|
149
|
-
} else d && this.$d[d](v);
|
|
150
|
-
return this.init(), this;
|
|
151
|
-
}, t.set = function(e, n) {
|
|
152
|
-
return this.clone().$set(e, n);
|
|
153
|
-
}, t.get = function(e) {
|
|
154
|
-
return this[o.p(e)]();
|
|
155
|
-
}, t.add = function(e, n) {
|
|
156
|
-
var r, i = this;
|
|
157
|
-
e = Number(e);
|
|
158
|
-
var l = o.p(n), d = function(k) {
|
|
159
|
-
var L = M(i);
|
|
160
|
-
return o.w(L.date(L.date() + Math.round(k * e)), i);
|
|
161
|
-
};
|
|
162
|
-
if (l === y) return this.set(y, this.$M + e);
|
|
163
|
-
if (l === F) return this.set(F, this.$y + e);
|
|
164
|
-
if (l === C) return d(1);
|
|
165
|
-
if (l === U) return d(7);
|
|
166
|
-
var v = (r = {}, r[w] = m, r[O] = N, r[b] = h, r)[l] || 1, D = this.$d.getTime() + e * v;
|
|
167
|
-
return o.w(D, this);
|
|
168
|
-
}, t.subtract = function(e, n) {
|
|
169
|
-
return this.add(-1 * e, n);
|
|
170
|
-
}, t.format = function(e) {
|
|
171
|
-
var n = this, r = this.$locale();
|
|
172
|
-
if (!this.isValid()) return r.invalidDate || _;
|
|
173
|
-
var i = e || "YYYY-MM-DDTHH:mm:ssZ", l = o.z(this), d = this.$H, v = this.$m, D = this.$M, k = r.weekdays, L = r.months, K = r.meridiem, B = function(T, q, te, se) {
|
|
174
|
-
return T && (T[q] || T(n, i)) || te[q].slice(0, se);
|
|
175
|
-
}, Y = function(T) {
|
|
176
|
-
return o.s(d % 12 || 12, T, "0");
|
|
177
|
-
}, A = K || function(T, q, te) {
|
|
178
|
-
var se = T < 12 ? "AM" : "PM";
|
|
179
|
-
return te ? se.toLowerCase() : se;
|
|
180
|
-
};
|
|
181
|
-
return i.replace(R, function(T, q) {
|
|
182
|
-
return q || function(te) {
|
|
183
|
-
switch (te) {
|
|
184
|
-
case "YY":
|
|
185
|
-
return String(n.$y).slice(-2);
|
|
186
|
-
case "YYYY":
|
|
187
|
-
return o.s(n.$y, 4, "0");
|
|
188
|
-
case "M":
|
|
189
|
-
return D + 1;
|
|
190
|
-
case "MM":
|
|
191
|
-
return o.s(D + 1, 2, "0");
|
|
192
|
-
case "MMM":
|
|
193
|
-
return B(r.monthsShort, D, L, 3);
|
|
194
|
-
case "MMMM":
|
|
195
|
-
return B(L, D);
|
|
196
|
-
case "D":
|
|
197
|
-
return n.$D;
|
|
198
|
-
case "DD":
|
|
199
|
-
return o.s(n.$D, 2, "0");
|
|
200
|
-
case "d":
|
|
201
|
-
return String(n.$W);
|
|
202
|
-
case "dd":
|
|
203
|
-
return B(r.weekdaysMin, n.$W, k, 2);
|
|
204
|
-
case "ddd":
|
|
205
|
-
return B(r.weekdaysShort, n.$W, k, 3);
|
|
206
|
-
case "dddd":
|
|
207
|
-
return k[n.$W];
|
|
208
|
-
case "H":
|
|
209
|
-
return String(d);
|
|
210
|
-
case "HH":
|
|
211
|
-
return o.s(d, 2, "0");
|
|
212
|
-
case "h":
|
|
213
|
-
return Y(1);
|
|
214
|
-
case "hh":
|
|
215
|
-
return Y(2);
|
|
216
|
-
case "a":
|
|
217
|
-
return A(d, v, !0);
|
|
218
|
-
case "A":
|
|
219
|
-
return A(d, v, !1);
|
|
220
|
-
case "m":
|
|
221
|
-
return String(v);
|
|
222
|
-
case "mm":
|
|
223
|
-
return o.s(v, 2, "0");
|
|
224
|
-
case "s":
|
|
225
|
-
return String(n.$s);
|
|
226
|
-
case "ss":
|
|
227
|
-
return o.s(n.$s, 2, "0");
|
|
228
|
-
case "SSS":
|
|
229
|
-
return o.s(n.$ms, 3, "0");
|
|
230
|
-
case "Z":
|
|
231
|
-
return l;
|
|
232
|
-
}
|
|
233
|
-
return null;
|
|
234
|
-
}(T) || l.replace(":", "");
|
|
235
|
-
});
|
|
236
|
-
}, t.utcOffset = function() {
|
|
237
|
-
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
238
|
-
}, t.diff = function(e, n, r) {
|
|
239
|
-
var i, l = this, d = o.p(n), v = M(e), D = (v.utcOffset() - this.utcOffset()) * m, k = this - v, L = function() {
|
|
240
|
-
return o.m(l, v);
|
|
241
|
-
};
|
|
242
|
-
switch (d) {
|
|
243
|
-
case F:
|
|
244
|
-
i = L() / 12;
|
|
245
|
-
break;
|
|
246
|
-
case y:
|
|
247
|
-
i = L();
|
|
248
|
-
break;
|
|
249
|
-
case H:
|
|
250
|
-
i = L() / 3;
|
|
251
|
-
break;
|
|
252
|
-
case U:
|
|
253
|
-
i = (k - D) / 6048e5;
|
|
254
|
-
break;
|
|
255
|
-
case C:
|
|
256
|
-
i = (k - D) / 864e5;
|
|
257
|
-
break;
|
|
258
|
-
case O:
|
|
259
|
-
i = k / N;
|
|
260
|
-
break;
|
|
261
|
-
case w:
|
|
262
|
-
i = k / m;
|
|
263
|
-
break;
|
|
264
|
-
case b:
|
|
265
|
-
i = k / h;
|
|
266
|
-
break;
|
|
267
|
-
default:
|
|
268
|
-
i = k;
|
|
269
|
-
}
|
|
270
|
-
return r ? i : o.a(i);
|
|
271
|
-
}, t.daysInMonth = function() {
|
|
272
|
-
return this.endOf(y).$D;
|
|
273
|
-
}, t.$locale = function() {
|
|
274
|
-
return g[this.$L];
|
|
275
|
-
}, t.locale = function(e, n) {
|
|
276
|
-
if (!e) return this.$L;
|
|
277
|
-
var r = this.clone(), i = E(e, n, !0);
|
|
278
|
-
return i && (r.$L = i), r;
|
|
279
|
-
}, t.clone = function() {
|
|
280
|
-
return o.w(this.$d, this);
|
|
281
|
-
}, t.toDate = function() {
|
|
282
|
-
return new Date(this.valueOf());
|
|
283
|
-
}, t.toJSON = function() {
|
|
284
|
-
return this.isValid() ? this.toISOString() : null;
|
|
285
|
-
}, t.toISOString = function() {
|
|
286
|
-
return this.$d.toISOString();
|
|
287
|
-
}, t.toString = function() {
|
|
288
|
-
return this.$d.toUTCString();
|
|
289
|
-
}, a;
|
|
290
|
-
}(), u = c.prototype;
|
|
291
|
-
return M.prototype = u, [["$ms", p], ["$s", b], ["$m", w], ["$H", O], ["$W", C], ["$M", y], ["$y", F], ["$D", I]].forEach(function(a) {
|
|
292
|
-
u[a[1]] = function(t) {
|
|
293
|
-
return this.$g(t, a[0], a[1]);
|
|
294
|
-
};
|
|
295
|
-
}), M.extend = function(a, t) {
|
|
296
|
-
return a.$i || (a(t, c, M), a.$i = !0), M;
|
|
297
|
-
}, M.locale = E, M.isDayjs = S, M.unix = function(a) {
|
|
298
|
-
return M(1e3 * a);
|
|
299
|
-
}, M.en = g[z], M.Ls = g, M.p = {}, M;
|
|
300
|
-
});
|
|
301
|
-
})(de);
|
|
302
|
-
var ke = de.exports;
|
|
303
|
-
const Te = /* @__PURE__ */ Se(ke), Ne = le.get("token"), Oe = le.post("put-object", (s) => (s.headers || (s.headers = {}), s.headers["Content-Type"] = "multipart/form-data", s.responseType = "blob", s)), Ce = le.post("upload-objects", (s) => (s.headers || (s.headers = {}), s.headers["Content-Type"] = "multipart/form-data", s.responseType = "blob", s)), Ie = be.get("progress"), Fe = (s) => {
|
|
304
|
-
let $ = P(!1), h = P(!1), m = P(""), N = P(0), p = P("normal"), b = P(!1), w, O = P(""), C = P(""), U = P(""), y = P(""), H = P(!1), F = P(""), I = "", _;
|
|
305
|
-
const j = () => {
|
|
306
|
-
C.value = "", U.value = "", y.value = "", H.value = !1, F.value = "";
|
|
307
|
-
}, R = async () => {
|
|
308
|
-
const [o, c] = await Ne().run();
|
|
309
|
-
return o ? { stauts: !1 } : { status: !0, data: c };
|
|
310
|
-
}, W = (o) => new Promise((c, u) => {
|
|
311
|
-
const t = [];
|
|
312
|
-
let e = 0;
|
|
313
|
-
for (; e < o.size; ) {
|
|
314
|
-
const r = o.slice(e, e + 1048576);
|
|
315
|
-
t.push(r), e += 1048576;
|
|
23
|
+
const ye = ee.get("token"), Te = ee.post("put-object", (e) => (e.headers || (e.headers = {}), e.headers["Content-Type"] = "multipart/form-data", e.responseType = "blob", e)), ke = ee.post("upload-objects", (e) => (e.headers || (e.headers = {}), e.headers["Content-Type"] = "multipart/form-data", e.responseType = "blob", e)), Ne = xe.get("progress"), $e = (e) => {
|
|
24
|
+
let p = b(!1), m = b(!1), i = b(""), v = b(0), n = b("normal"), x = b(!1), f, $ = b(""), D = b(""), I = b(""), T = b(""), U = b(!1), M = b(""), F = "", k;
|
|
25
|
+
const h = () => {
|
|
26
|
+
D.value = "", I.value = "", T.value = "", U.value = !1, M.value = "";
|
|
27
|
+
}, L = async () => {
|
|
28
|
+
const [l, o] = await ye().run();
|
|
29
|
+
return l ? { stauts: !1 } : { status: !0, data: o };
|
|
30
|
+
}, R = (l) => new Promise((o, a) => {
|
|
31
|
+
const u = [];
|
|
32
|
+
let t = 0;
|
|
33
|
+
for (; t < l.size; ) {
|
|
34
|
+
const N = l.slice(t, t + 1048576);
|
|
35
|
+
u.push(N), t += 1048576;
|
|
316
36
|
}
|
|
317
|
-
const
|
|
318
|
-
|
|
319
|
-
}),
|
|
320
|
-
|
|
321
|
-
const
|
|
322
|
-
if (!
|
|
323
|
-
let
|
|
324
|
-
const
|
|
325
|
-
if (
|
|
37
|
+
const w = new Blob(u, { type: l.type });
|
|
38
|
+
o(w);
|
|
39
|
+
}), z = async (l, o, a, r = !1, u = !0, t = "") => {
|
|
40
|
+
F = t, u && (n.value = "normal", v.value = 0, i.value = "导入进度", m.value = !0, $.value = ""), k = o;
|
|
41
|
+
const w = await L();
|
|
42
|
+
if (!w.status) return;
|
|
43
|
+
let N = w.data, y = null, { autoContentType: K, bucketName: _, importFileName: q } = a;
|
|
44
|
+
const re = r ? ke : Te;
|
|
45
|
+
if (r) {
|
|
326
46
|
let Y = [];
|
|
327
|
-
await
|
|
328
|
-
let
|
|
329
|
-
Y.push(
|
|
330
|
-
}),
|
|
331
|
-
|
|
332
|
-
}),
|
|
333
|
-
|
|
47
|
+
await o.forEach(async (J) => {
|
|
48
|
+
let W = await R(J);
|
|
49
|
+
Y.push(W);
|
|
50
|
+
}), y = new FormData(), y.append("accessKeyId", N.accessKeyId), y.append("secretAccessKey", N.secretAccessKey), y.append("sessionToken", N.sessionToken), y.append("bucketName", _), o.forEach((J, W) => {
|
|
51
|
+
y.append("file", Y[W]);
|
|
52
|
+
}), q.forEach((J) => {
|
|
53
|
+
y.append("filePaths", J);
|
|
334
54
|
});
|
|
335
55
|
} else {
|
|
336
|
-
const Y = await
|
|
337
|
-
|
|
338
|
-
accessKeyId:
|
|
339
|
-
secretAccessKey:
|
|
340
|
-
sessionToken:
|
|
56
|
+
const Y = await R(o);
|
|
57
|
+
y = {
|
|
58
|
+
accessKeyId: N.accessKeyId,
|
|
59
|
+
secretAccessKey: N.secretAccessKey,
|
|
60
|
+
sessionToken: N.sessionToken,
|
|
341
61
|
file: Y,
|
|
342
|
-
bucketName:
|
|
343
|
-
filePath:
|
|
344
|
-
autoContentType:
|
|
62
|
+
bucketName: _,
|
|
63
|
+
filePath: q,
|
|
64
|
+
autoContentType: K
|
|
345
65
|
};
|
|
346
66
|
}
|
|
347
|
-
const [
|
|
348
|
-
if (
|
|
349
|
-
const
|
|
350
|
-
if (
|
|
351
|
-
if (!
|
|
352
|
-
|
|
67
|
+
const [ie, ne] = await re(y).run();
|
|
68
|
+
if (ie) return;
|
|
69
|
+
const ue = await Ie(ne.data), Q = await (l == null ? void 0 : l(ue));
|
|
70
|
+
if (u) {
|
|
71
|
+
if (!Q.status) {
|
|
72
|
+
m.value = !1, n.value = "error";
|
|
353
73
|
return;
|
|
354
74
|
}
|
|
355
|
-
|
|
75
|
+
i.value = "导入进度", m.value = !0, c(Q.taskId, "import", "");
|
|
356
76
|
} else {
|
|
357
|
-
if (!
|
|
358
|
-
|
|
77
|
+
if (!Q.status) return;
|
|
78
|
+
n.value = "success", S.success({
|
|
359
79
|
message: "导入成功",
|
|
360
80
|
grouping: !0,
|
|
361
81
|
repeatNum: 1
|
|
362
82
|
});
|
|
363
83
|
}
|
|
364
|
-
},
|
|
365
|
-
|
|
366
|
-
const
|
|
367
|
-
if (!
|
|
368
|
-
|
|
84
|
+
}, E = async (l, o = "", a = "") => {
|
|
85
|
+
n.value = "normal", v.value = 0, i.value = a || "导出进度", m.value = !0;
|
|
86
|
+
const r = await (l == null ? void 0 : l());
|
|
87
|
+
if (!r.status) {
|
|
88
|
+
m.value = !1, n.value = "error";
|
|
369
89
|
return;
|
|
370
90
|
}
|
|
371
|
-
|
|
372
|
-
},
|
|
373
|
-
|
|
374
|
-
const
|
|
375
|
-
if (!
|
|
376
|
-
|
|
91
|
+
c(r.taskId, "action", "");
|
|
92
|
+
}, C = async (l, o = "", a = "xlsx") => {
|
|
93
|
+
n.value = "normal", v.value = 0, i.value = "导出进度", m.value = !0;
|
|
94
|
+
const r = await (l == null ? void 0 : l());
|
|
95
|
+
if (!r.status) {
|
|
96
|
+
m.value = !1, n.value = "error";
|
|
377
97
|
return;
|
|
378
98
|
}
|
|
379
|
-
|
|
380
|
-
},
|
|
381
|
-
|
|
99
|
+
be().format("YYYYMMDDHHmmss") + "", c(r.taskId, "export", o || "", a);
|
|
100
|
+
}, c = async (l, o, a, r = "") => {
|
|
101
|
+
x.value = !0, g(l, o, a, r), f = setTimeout(() => {
|
|
382
102
|
}, 50);
|
|
383
|
-
},
|
|
384
|
-
clearTimeout(
|
|
385
|
-
},
|
|
386
|
-
var
|
|
387
|
-
const [
|
|
388
|
-
url: `progress/${
|
|
103
|
+
}, d = () => {
|
|
104
|
+
clearTimeout(f), f = null, m.value = !1;
|
|
105
|
+
}, g = async (l, o = "export", a, r = "") => {
|
|
106
|
+
var N, y;
|
|
107
|
+
const [u, t] = await Ne("", {
|
|
108
|
+
url: `progress/${l}`
|
|
389
109
|
}).run();
|
|
390
|
-
if (
|
|
391
|
-
|
|
110
|
+
if (u) {
|
|
111
|
+
x.value = !1;
|
|
392
112
|
return;
|
|
393
113
|
}
|
|
394
|
-
|
|
395
|
-
const
|
|
396
|
-
if (
|
|
397
|
-
if (
|
|
398
|
-
|
|
399
|
-
message:
|
|
114
|
+
v.value = t.percentage;
|
|
115
|
+
const w = o == "export" ? "导出" : "导入";
|
|
116
|
+
if (v.value == 100)
|
|
117
|
+
if ($.value = t, x.value = !1, d(), o == "export")
|
|
118
|
+
t.status == 1 ? (n.value = "success", oe(`${le().baseURL}/oss${t.filePath}`, a, r), x.value = !1) : t.status == 2 && (T.value = t.message || `${w}失败`, S.error({
|
|
119
|
+
message: t.message || `${w}失败`,
|
|
400
120
|
grouping: !0,
|
|
401
121
|
repeatNum: 1
|
|
402
122
|
}));
|
|
403
|
-
else if (
|
|
404
|
-
if (
|
|
405
|
-
|
|
406
|
-
const
|
|
407
|
-
|
|
408
|
-
const
|
|
409
|
-
|
|
123
|
+
else if (o == "import") {
|
|
124
|
+
if (t.filePath) {
|
|
125
|
+
n.value = "error";
|
|
126
|
+
const K = (N = k.name) == null ? void 0 : N.match(/(.*?)(\.[^.]*$|$)/), _ = K.length ? K[2] : "";
|
|
127
|
+
U.value = !0;
|
|
128
|
+
const q = (y = t.filePath) == null ? void 0 : y.replace(/(.*\/)*([^.]+).*/gi, "$2");
|
|
129
|
+
D.value = F || `${q}${_}`, I.value = k.sizeText, T.value = "部分数据校验不通过,请下载附件并修改,重新导入!", M.value = `${le().baseURL}/oss${t.filePath}`;
|
|
410
130
|
}
|
|
411
|
-
|
|
412
|
-
} else
|
|
131
|
+
O(t.status, w, t.message), t.status == 1 && (p.value = !1), e("success");
|
|
132
|
+
} else o == "action" && (n.value = "success");
|
|
413
133
|
else
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}, 50) : (
|
|
417
|
-
},
|
|
418
|
-
|
|
419
|
-
message: `${
|
|
134
|
+
f && t.status != 2 ? f = setTimeout(() => {
|
|
135
|
+
g(l, o, a, r);
|
|
136
|
+
}, 50) : ($.value = t, x.value = !1, O(t.status, w, t.message), d(), U.value = !0, T.value = (t == null ? void 0 : t.message) || "", e("error", t));
|
|
137
|
+
}, O = (l, o, a) => {
|
|
138
|
+
l == 1 ? (n.value = "success", S.success({
|
|
139
|
+
message: `${o}成功`,
|
|
420
140
|
grouping: !0,
|
|
421
141
|
repeatNum: 1
|
|
422
|
-
}),
|
|
423
|
-
message:
|
|
142
|
+
}), D.value = "", I.value = "", T.value = "") : l == 2 ? (n.value = "error", S.error({
|
|
143
|
+
message: a || `${o}失败`,
|
|
424
144
|
grouping: !0,
|
|
425
145
|
repeatNum: 1
|
|
426
|
-
})) :
|
|
427
|
-
message: `部分${
|
|
146
|
+
})) : l == 3 && (n.value = "error", S.error({
|
|
147
|
+
message: `部分${o}失败`,
|
|
428
148
|
grouping: !0,
|
|
429
149
|
repeatNum: 1
|
|
430
150
|
}));
|
|
431
151
|
};
|
|
432
152
|
return {
|
|
433
|
-
importDialog:
|
|
434
|
-
showProgressDialog:
|
|
435
|
-
progressTitle:
|
|
436
|
-
percent:
|
|
437
|
-
progressStatus:
|
|
438
|
-
progressLoading:
|
|
439
|
-
progressResult:
|
|
440
|
-
errorFileName:
|
|
441
|
-
errorFileSize:
|
|
442
|
-
errorMessage:
|
|
443
|
-
errorImport:
|
|
444
|
-
errorFilePath:
|
|
445
|
-
fileImport:
|
|
446
|
-
fileExport:
|
|
447
|
-
fileAction:
|
|
448
|
-
generateUniqueName: (
|
|
449
|
-
const
|
|
450
|
-
return `${
|
|
153
|
+
importDialog: p,
|
|
154
|
+
showProgressDialog: m,
|
|
155
|
+
progressTitle: i,
|
|
156
|
+
percent: v,
|
|
157
|
+
progressStatus: n,
|
|
158
|
+
progressLoading: x,
|
|
159
|
+
progressResult: $,
|
|
160
|
+
errorFileName: D,
|
|
161
|
+
errorFileSize: I,
|
|
162
|
+
errorMessage: T,
|
|
163
|
+
errorImport: U,
|
|
164
|
+
errorFilePath: M,
|
|
165
|
+
fileImport: z,
|
|
166
|
+
fileExport: C,
|
|
167
|
+
fileAction: E,
|
|
168
|
+
generateUniqueName: (l) => {
|
|
169
|
+
const o = l == null ? void 0 : l.match(/(.*?)(\.[^.]*$|$)/), a = o.length ? o[2] : "";
|
|
170
|
+
return `${o.length ? o[1] : l}${Z()}${a}`;
|
|
451
171
|
},
|
|
452
|
-
downloadFile:
|
|
453
|
-
resetStataus:
|
|
454
|
-
checkProgress:
|
|
172
|
+
downloadFile: oe,
|
|
173
|
+
resetStataus: h,
|
|
174
|
+
checkProgress: c
|
|
455
175
|
};
|
|
456
|
-
},
|
|
457
|
-
let
|
|
176
|
+
}, Fe = (e) => {
|
|
177
|
+
let p = e == null ? void 0 : e.toLocaleLowerCase();
|
|
458
178
|
return {
|
|
459
179
|
excel: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
460
180
|
pdf: "application/pdf",
|
|
@@ -481,127 +201,127 @@ const Te = /* @__PURE__ */ Se(ke), Ne = le.get("token"), Oe = le.post("put-objec
|
|
|
481
201
|
crt: "application/x-x509-ca-cert",
|
|
482
202
|
der: "application/x-x509-ca-cert",
|
|
483
203
|
cer: "application/pkix-cert"
|
|
484
|
-
}[
|
|
485
|
-
},
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
const
|
|
489
|
-
type:
|
|
490
|
-
}),
|
|
204
|
+
}[p];
|
|
205
|
+
}, oe = (e, p, m = "excel") => {
|
|
206
|
+
const i = new XMLHttpRequest();
|
|
207
|
+
i.open("get", e), i.setRequestHeader("Content-Type", "application/json; charset=UTF-8"), i.responseType = "blob", i.onload = function(v) {
|
|
208
|
+
const n = new Blob([this.response], {
|
|
209
|
+
type: Fe(m)
|
|
210
|
+
}), x = URL.createObjectURL(n);
|
|
491
211
|
if (window.navigator.msSaveOrOpenBlob)
|
|
492
|
-
navigator.msSaveBlob(
|
|
212
|
+
navigator.msSaveBlob(n, p);
|
|
493
213
|
else {
|
|
494
|
-
const
|
|
495
|
-
|
|
214
|
+
const f = document.createElement("a");
|
|
215
|
+
f.href = x, f.download = p, f.click(), window.URL.revokeObjectURL(x);
|
|
496
216
|
}
|
|
497
|
-
},
|
|
498
|
-
},
|
|
499
|
-
var
|
|
500
|
-
|
|
501
|
-
let
|
|
502
|
-
typeof
|
|
503
|
-
},
|
|
504
|
-
}),
|
|
505
|
-
var
|
|
217
|
+
}, i.send();
|
|
218
|
+
}, Ie = (e) => new Promise((p, m) => {
|
|
219
|
+
var i = new FileReader();
|
|
220
|
+
i.onload = function(v) {
|
|
221
|
+
let n = "";
|
|
222
|
+
typeof i.result == "string" && (n = JSON.parse(i.result)), p(n);
|
|
223
|
+
}, i.readAsText(e);
|
|
224
|
+
}), Ue = (e, p) => {
|
|
225
|
+
var o;
|
|
506
226
|
const {
|
|
507
|
-
importDialog:
|
|
508
|
-
showProgressDialog:
|
|
509
|
-
progressTitle:
|
|
510
|
-
percent:
|
|
511
|
-
progressStatus:
|
|
512
|
-
progressLoading:
|
|
513
|
-
errorFileName:
|
|
514
|
-
errorFileSize:
|
|
515
|
-
errorMessage:
|
|
516
|
-
errorImport:
|
|
517
|
-
errorFilePath:
|
|
518
|
-
fileImport:
|
|
519
|
-
fileExport:
|
|
520
|
-
downloadFile:
|
|
521
|
-
} =
|
|
522
|
-
let
|
|
523
|
-
const
|
|
524
|
-
|
|
227
|
+
importDialog: m,
|
|
228
|
+
showProgressDialog: i,
|
|
229
|
+
progressTitle: v,
|
|
230
|
+
percent: n,
|
|
231
|
+
progressStatus: x,
|
|
232
|
+
progressLoading: f,
|
|
233
|
+
errorFileName: $,
|
|
234
|
+
errorFileSize: D,
|
|
235
|
+
errorMessage: I,
|
|
236
|
+
errorImport: T,
|
|
237
|
+
errorFilePath: U,
|
|
238
|
+
fileImport: M,
|
|
239
|
+
fileExport: F,
|
|
240
|
+
downloadFile: k
|
|
241
|
+
} = $e(p);
|
|
242
|
+
let h = b([]), L = (o = he()) == null ? void 0 : o.tenantId;
|
|
243
|
+
const R = () => {
|
|
244
|
+
h.value = [], T.value = !1, $.value = "", D.value = "", I.value = "", m.value = !0, U.value = "", p("open");
|
|
525
245
|
};
|
|
526
|
-
let
|
|
527
|
-
const
|
|
528
|
-
const
|
|
529
|
-
if (!
|
|
530
|
-
|
|
531
|
-
|
|
246
|
+
let z;
|
|
247
|
+
const E = (a) => {
|
|
248
|
+
const r = e.fileType.split(","), u = a.name.substring(a.name.lastIndexOf(".")), t = C(a.sizeText), w = C(e.fileMaxSize);
|
|
249
|
+
if (!r.includes(u)) {
|
|
250
|
+
S.warning("文件格式错误,请重新上传!"), setTimeout(() => {
|
|
251
|
+
h.value = [];
|
|
532
252
|
});
|
|
533
253
|
return;
|
|
534
254
|
}
|
|
535
|
-
if (
|
|
536
|
-
|
|
537
|
-
|
|
255
|
+
if (t > w) {
|
|
256
|
+
S.warning(`文件大小不超过${e.fileMaxSize}`), setTimeout(() => {
|
|
257
|
+
h.value = [];
|
|
538
258
|
});
|
|
539
259
|
return;
|
|
540
260
|
}
|
|
541
|
-
|
|
542
|
-
},
|
|
543
|
-
let
|
|
544
|
-
return
|
|
545
|
-
},
|
|
546
|
-
let
|
|
261
|
+
z = a.name;
|
|
262
|
+
}, C = (a) => {
|
|
263
|
+
let r = a.match(/\d+(\.\d+)?/)[0], u = a.match(/[a-zA-z]+/gi)[0], t = 0;
|
|
264
|
+
return r = parseFloat(r), u = u.toLowerCase(), u === "gb" || u === "g" ? t = (r * 1024 * 1024 * 1024).toFixed(2) : u === "mb" || u === "m" ? t = (r * 1024 * 1024).toFixed(2) : u === "kb" || u === "k" ? t = (r * 1024).toFixed(2) : u === "b" && (t = r), parseFloat(t);
|
|
265
|
+
}, c = async () => {
|
|
266
|
+
let a = Z();
|
|
267
|
+
const r = {
|
|
268
|
+
fileName: z,
|
|
269
|
+
filePath: `${e.bucketName}/${L}/${e.ossName}/${z}`,
|
|
270
|
+
taskId: a,
|
|
271
|
+
...e.importParams
|
|
272
|
+
}, u = e.importParamsPosition === "params" ? e.importFun("", { params: r }) : e.importFun(r), [t, w] = await u.run();
|
|
273
|
+
return t ? { status: !1 } : { status: !0, taskId: a };
|
|
274
|
+
}, d = async () => {
|
|
275
|
+
if (!h.value.length) return S.warning("请上传文件");
|
|
547
276
|
const a = {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
},
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
await F(g, t, u, a);
|
|
561
|
-
}, S = () => {
|
|
562
|
-
_(H.value, O.value);
|
|
563
|
-
}, E = () => {
|
|
564
|
-
I(M, s.templateName);
|
|
565
|
-
}, M = async () => {
|
|
566
|
-
let u = ie();
|
|
567
|
-
const [a, t] = await s.templateFun({ taskId: u }).run();
|
|
568
|
-
return a ? { status: !1 } : { status: !0, taskId: u };
|
|
277
|
+
bucketName: e.bucketName,
|
|
278
|
+
importFileName: `${L}/${e.ossName}/${z}`
|
|
279
|
+
}, r = e.maxCount > 1, u = e.maxCount > 1 ? h.value : h.value[0];
|
|
280
|
+
await M(c, u, a, r);
|
|
281
|
+
}, g = () => {
|
|
282
|
+
k(U.value, $.value);
|
|
283
|
+
}, O = () => {
|
|
284
|
+
F(te, e.templateName);
|
|
285
|
+
}, te = async () => {
|
|
286
|
+
let a = Z();
|
|
287
|
+
const [r, u] = await e.templateFun({ taskId: a }).run();
|
|
288
|
+
return r ? { status: !1 } : { status: !0, taskId: a };
|
|
569
289
|
};
|
|
570
290
|
return {
|
|
571
|
-
showProgressDialog:
|
|
572
|
-
progressTitle:
|
|
573
|
-
percent:
|
|
574
|
-
progressStatus:
|
|
575
|
-
progressLoading:
|
|
576
|
-
errorFileName:
|
|
577
|
-
errorFileSize:
|
|
578
|
-
errorMessage:
|
|
579
|
-
errorImport:
|
|
580
|
-
importDialog:
|
|
581
|
-
fileList:
|
|
582
|
-
showImportHandle:
|
|
583
|
-
confirmImport:
|
|
584
|
-
fileUpload:
|
|
585
|
-
errorFileDownload:
|
|
291
|
+
showProgressDialog: i,
|
|
292
|
+
progressTitle: v,
|
|
293
|
+
percent: n,
|
|
294
|
+
progressStatus: x,
|
|
295
|
+
progressLoading: f,
|
|
296
|
+
errorFileName: $,
|
|
297
|
+
errorFileSize: D,
|
|
298
|
+
errorMessage: I,
|
|
299
|
+
errorImport: T,
|
|
300
|
+
importDialog: m,
|
|
301
|
+
fileList: h,
|
|
302
|
+
showImportHandle: R,
|
|
303
|
+
confirmImport: d,
|
|
304
|
+
fileUpload: E,
|
|
305
|
+
errorFileDownload: g,
|
|
586
306
|
downTemplate: async () => {
|
|
587
|
-
let
|
|
588
|
-
if (
|
|
589
|
-
|
|
590
|
-
else if (
|
|
591
|
-
if (
|
|
592
|
-
if (
|
|
593
|
-
|
|
594
|
-
else if (
|
|
595
|
-
const [
|
|
596
|
-
|
|
307
|
+
let a = "";
|
|
308
|
+
if (e.templateUrl)
|
|
309
|
+
a = e.templateUrl;
|
|
310
|
+
else if (e.templateFun) {
|
|
311
|
+
if (e.templateType === "static") {
|
|
312
|
+
if (e.templateUrl)
|
|
313
|
+
a = e.templateUrl;
|
|
314
|
+
else if (e.templateFun) {
|
|
315
|
+
const [r, u] = await e.templateFun().run();
|
|
316
|
+
a = u;
|
|
597
317
|
}
|
|
598
|
-
|
|
318
|
+
k(we(a), e.templateName);
|
|
599
319
|
}
|
|
600
|
-
|
|
320
|
+
e.templateType === "dynamic" && e.templateFun && O();
|
|
601
321
|
}
|
|
602
322
|
}
|
|
603
323
|
};
|
|
604
|
-
},
|
|
324
|
+
}, De = { class: "das-import-button" }, ze = { class: "tip-box" }, Ce = { class: "first-line" }, Pe = { class: "second-line" }, Se = /* @__PURE__ */ pe({
|
|
605
325
|
__name: "App",
|
|
606
326
|
props: {
|
|
607
327
|
importFun: {},
|
|
@@ -622,145 +342,145 @@ const Te = /* @__PURE__ */ Se(ke), Ne = le.get("token"), Oe = le.post("put-objec
|
|
|
622
342
|
multiple: { type: Boolean, default: !1 }
|
|
623
343
|
},
|
|
624
344
|
emits: ["open", "success", "error"],
|
|
625
|
-
setup(
|
|
626
|
-
const
|
|
627
|
-
showProgressDialog:
|
|
628
|
-
progressTitle:
|
|
629
|
-
percent:
|
|
630
|
-
progressStatus:
|
|
631
|
-
progressLoading:
|
|
632
|
-
errorFileName:
|
|
633
|
-
errorFileSize:
|
|
634
|
-
errorMessage:
|
|
635
|
-
errorImport:
|
|
636
|
-
importDialog:
|
|
637
|
-
fileList:
|
|
638
|
-
showImportHandle:
|
|
639
|
-
confirmImport:
|
|
640
|
-
fileUpload:
|
|
641
|
-
errorFileDownload:
|
|
642
|
-
downTemplate:
|
|
643
|
-
} =
|
|
644
|
-
let
|
|
645
|
-
return
|
|
646
|
-
|
|
647
|
-
}),
|
|
648
|
-
confirmImport:
|
|
649
|
-
}), (
|
|
650
|
-
|
|
651
|
-
onClick:
|
|
652
|
-
(...
|
|
345
|
+
setup(e, { expose: p, emit: m }) {
|
|
346
|
+
const i = e, v = m, {
|
|
347
|
+
showProgressDialog: n,
|
|
348
|
+
progressTitle: x,
|
|
349
|
+
percent: f,
|
|
350
|
+
progressStatus: $,
|
|
351
|
+
progressLoading: D,
|
|
352
|
+
errorFileName: I,
|
|
353
|
+
errorFileSize: T,
|
|
354
|
+
errorMessage: U,
|
|
355
|
+
errorImport: M,
|
|
356
|
+
importDialog: F,
|
|
357
|
+
fileList: k,
|
|
358
|
+
showImportHandle: h,
|
|
359
|
+
confirmImport: L,
|
|
360
|
+
fileUpload: R,
|
|
361
|
+
errorFileDownload: z,
|
|
362
|
+
downTemplate: E
|
|
363
|
+
} = Ue(i, v);
|
|
364
|
+
let C;
|
|
365
|
+
return ce(x, (c) => {
|
|
366
|
+
c.includes("导入") ? C = ["正在导入中...", "导入失败", "导入成功"] : C = ["正在导出中...", "导出失败", "导出成功"];
|
|
367
|
+
}), p({
|
|
368
|
+
confirmImport: L
|
|
369
|
+
}), (c, d) => (de(), fe("div", De, [
|
|
370
|
+
A("div", {
|
|
371
|
+
onClick: d[0] || (d[0] = //@ts-ignore
|
|
372
|
+
(...g) => s(h) && s(h)(...g))
|
|
653
373
|
}, [
|
|
654
|
-
|
|
655
|
-
|
|
374
|
+
ae(c.$slots, "default", {}, () => [
|
|
375
|
+
P(s(G), {
|
|
656
376
|
size: "middle",
|
|
657
377
|
"btn-type": "primary"
|
|
658
378
|
}, {
|
|
659
|
-
default:
|
|
660
|
-
|
|
379
|
+
default: j(() => [
|
|
380
|
+
H(V(s(B)("导入").value), 1)
|
|
661
381
|
]),
|
|
662
382
|
_: 1
|
|
663
383
|
})
|
|
664
384
|
], !0)
|
|
665
385
|
]),
|
|
666
|
-
|
|
667
|
-
title:
|
|
668
|
-
modelValue:
|
|
669
|
-
"onUpdate:modelValue":
|
|
386
|
+
P(s(se), {
|
|
387
|
+
title: s(B)(c.importDialogName).value,
|
|
388
|
+
modelValue: s(F),
|
|
389
|
+
"onUpdate:modelValue": d[3] || (d[3] = (g) => X(F) ? F.value = g : null),
|
|
670
390
|
customClass: "upload-dialog",
|
|
671
391
|
width: "610px",
|
|
672
392
|
height: "500px"
|
|
673
393
|
}, {
|
|
674
|
-
footer:
|
|
675
|
-
|
|
676
|
-
|
|
394
|
+
footer: j(() => [
|
|
395
|
+
A("div", null, [
|
|
396
|
+
P(s(G), {
|
|
677
397
|
size: "middle",
|
|
678
|
-
onClick:
|
|
398
|
+
onClick: d[2] || (d[2] = (g) => F.value = !1)
|
|
679
399
|
}, {
|
|
680
|
-
default:
|
|
681
|
-
|
|
400
|
+
default: j(() => [
|
|
401
|
+
H(V(s(B)("取消").value), 1)
|
|
682
402
|
]),
|
|
683
403
|
_: 1
|
|
684
404
|
}),
|
|
685
|
-
|
|
405
|
+
P(s(G), {
|
|
686
406
|
size: "middle",
|
|
687
407
|
"btn-type": "primary",
|
|
688
|
-
disabled:
|
|
408
|
+
disabled: c.openDisabled && s(k).length === 0,
|
|
689
409
|
style: { "margin-left": "12px" },
|
|
690
|
-
onClick:
|
|
410
|
+
onClick: s(L)
|
|
691
411
|
}, {
|
|
692
|
-
default:
|
|
693
|
-
|
|
412
|
+
default: j(() => [
|
|
413
|
+
H(V(c.confirmButtonName), 1)
|
|
694
414
|
]),
|
|
695
415
|
_: 1
|
|
696
416
|
}, 8, ["disabled", "onClick"])
|
|
697
417
|
])
|
|
698
418
|
]),
|
|
699
|
-
default:
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
419
|
+
default: j(() => [
|
|
420
|
+
ae(c.$slots, "tip", {}, () => [
|
|
421
|
+
A("div", ze, [
|
|
422
|
+
A("div", Ce, [
|
|
423
|
+
H(V(s(B)("1、点击下载 ").value), 1),
|
|
424
|
+
P(s(G), {
|
|
705
425
|
size: "large",
|
|
706
426
|
btnType: "primary-text",
|
|
707
427
|
block: "",
|
|
708
|
-
onClick:
|
|
428
|
+
onClick: s(E)
|
|
709
429
|
}, {
|
|
710
|
-
default:
|
|
711
|
-
|
|
430
|
+
default: j(() => [
|
|
431
|
+
H(V(s(B)(`${c.templateName}`).value), 1)
|
|
712
432
|
]),
|
|
713
433
|
_: 1
|
|
714
434
|
}, 8, ["onClick"])
|
|
715
435
|
]),
|
|
716
|
-
|
|
436
|
+
A("div", Pe, V(s(B)("2、仅支持上传Excel文件,重复数据以最后一条为准").value), 1)
|
|
717
437
|
])
|
|
718
438
|
], !0),
|
|
719
|
-
|
|
720
|
-
modelValue:
|
|
721
|
-
"onUpdate:modelValue":
|
|
722
|
-
error:
|
|
723
|
-
"error-file-name":
|
|
724
|
-
"error-file-size":
|
|
725
|
-
"error-message":
|
|
726
|
-
accept:
|
|
727
|
-
maxCount:
|
|
728
|
-
multiple:
|
|
729
|
-
onErrorFileDownload:
|
|
730
|
-
onFileUpload:
|
|
439
|
+
P(s(ge), {
|
|
440
|
+
modelValue: s(k),
|
|
441
|
+
"onUpdate:modelValue": d[1] || (d[1] = (g) => X(k) ? k.value = g : null),
|
|
442
|
+
error: s(M),
|
|
443
|
+
"error-file-name": s(I),
|
|
444
|
+
"error-file-size": s(T),
|
|
445
|
+
"error-message": s(U),
|
|
446
|
+
accept: c.fileType,
|
|
447
|
+
maxCount: c.maxCount,
|
|
448
|
+
multiple: c.multiple,
|
|
449
|
+
onErrorFileDownload: s(z),
|
|
450
|
+
onFileUpload: s(R)
|
|
731
451
|
}, null, 8, ["modelValue", "error", "error-file-name", "error-file-size", "error-message", "accept", "maxCount", "multiple", "onErrorFileDownload", "onFileUpload"])
|
|
732
452
|
]),
|
|
733
453
|
_: 3
|
|
734
454
|
}, 8, ["title", "modelValue"]),
|
|
735
|
-
|
|
455
|
+
P(s(se), {
|
|
736
456
|
size: "mini",
|
|
737
|
-
title:
|
|
457
|
+
title: s(B)(s(x)).value,
|
|
738
458
|
"is-feedback-img": !1,
|
|
739
|
-
modelValue:
|
|
740
|
-
"onUpdate:modelValue":
|
|
459
|
+
modelValue: s(n),
|
|
460
|
+
"onUpdate:modelValue": d[5] || (d[5] = (g) => X(n) ? n.value = g : null),
|
|
741
461
|
type: "feedback"
|
|
742
462
|
}, {
|
|
743
|
-
default:
|
|
744
|
-
|
|
745
|
-
modelValue: f
|
|
746
|
-
"onUpdate:modelValue":
|
|
463
|
+
default: j(() => [
|
|
464
|
+
P(s(ve), {
|
|
465
|
+
modelValue: s(f),
|
|
466
|
+
"onUpdate:modelValue": d[4] || (d[4] = (g) => X(f) ? f.value = g : null),
|
|
747
467
|
style: { "margin-top": "35px" },
|
|
748
468
|
type: "circle",
|
|
749
|
-
status:
|
|
750
|
-
textMap:
|
|
469
|
+
status: s($),
|
|
470
|
+
textMap: s(C)
|
|
751
471
|
}, null, 8, ["modelValue", "status", "textMap"])
|
|
752
472
|
]),
|
|
753
473
|
_: 1
|
|
754
474
|
}, 8, ["title", "modelValue"])
|
|
755
475
|
]));
|
|
756
476
|
}
|
|
757
|
-
}),
|
|
758
|
-
const
|
|
759
|
-
for (const [
|
|
760
|
-
|
|
761
|
-
return
|
|
762
|
-
},
|
|
477
|
+
}), Me = (e, p) => {
|
|
478
|
+
const m = e.__vccOpts || e;
|
|
479
|
+
for (const [i, v] of p)
|
|
480
|
+
m[i] = v;
|
|
481
|
+
return m;
|
|
482
|
+
}, Le = /* @__PURE__ */ Me(Se, [["__scopeId", "data-v-f0e36808"]]), Xe = me(Le);
|
|
763
483
|
export {
|
|
764
|
-
|
|
765
|
-
|
|
484
|
+
Xe as DasImportButton,
|
|
485
|
+
Xe as default
|
|
766
486
|
};
|