@das-fed/ui 6.4.0-dev.71 → 6.4.0-dev.72
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 +5 -5
- package/packages/business-components/app-container/index.js +97 -68
- 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/export-button/index.js +59 -59
- package/packages/business-components/export-button/index.js.gz +0 -0
- package/packages/business-components/import-button/hooks/useImport.d.ts +12 -13
- package/packages/business-components/import-button/index.js +117 -115
- package/packages/business-components/import-button/index.js.gz +0 -0
- package/packages/components/edit-table/index.d.ts +3 -3
- package/packages/components/edit-table/index.js +1254 -1251
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/edit-table/src/index.vue.d.ts +1 -1
- package/packages/components/pagination/index.js +101 -98
- 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/search-form/index.js +49 -49
- package/packages/components/search-form/index.js.gz +0 -0
- package/packages/components/search-form/style.css +1 -1
- package/packages/components/search-form/style.css.gz +0 -0
- package/packages/components/table/index.js +4 -4
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/table/style.css +1 -1
- package/packages/components/table/style.css.gz +0 -0
- package/packages/components/tree-select/index.js +50 -49
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-select/src/App.vue.d.ts +1 -0
- package/packages/components/tree-select/src/type.d.ts +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/ui",
|
|
3
|
-
"version": "6.4.0-dev.
|
|
3
|
+
"version": "6.4.0-dev.72",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@antv/x6-plugin-snapline": "^2.1.7",
|
|
27
27
|
"@antv/x6-plugin-transform": "^2.1.8",
|
|
28
28
|
"@antv/x6-vue-shape": "^2.1.2",
|
|
29
|
-
"@das-fed/cli": "6.4.0-dev.
|
|
29
|
+
"@das-fed/cli": "6.4.0-dev.72",
|
|
30
30
|
"@element-plus/icons-vue": "^2.3.1",
|
|
31
31
|
"@types/lodash": "^4.14.194",
|
|
32
32
|
"@types/lodash-es": "^4.17.9",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"vue-tsc": "^2.0.29"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@das-fed/ui": "6.4.0-dev.
|
|
60
|
-
"@das-fed/utils": "6.4.0-dev.
|
|
61
|
-
"@das-fed/web": "6.4.0-dev.
|
|
59
|
+
"@das-fed/ui": "6.4.0-dev.72",
|
|
60
|
+
"@das-fed/utils": "6.4.0-dev.72",
|
|
61
|
+
"@das-fed/web": "6.4.0-dev.72",
|
|
62
62
|
"@wangeditor/editor": "^5.1.23",
|
|
63
63
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
|
64
64
|
"@wangeditor/plugin-upload-attachment": "^1.1.0",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/business-components/app-container/style.css';
|
|
2
|
-
import { withInstall as
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
import { ElRow as
|
|
2
|
+
import { withInstall as q } from "@das-fed/utils/with-install/index";
|
|
3
|
+
import { defineComponent as B, computed as S, ref as O, watch as U, onMounted as V, withDirectives as f, openBlock as a, createElementBlock as l, normalizeClass as $, normalizeStyle as C, Fragment as h, renderList as u, createElementVNode as c, toDisplayString as g, createBlock as y, unref as i, withCtx as k, createTextVNode as w } from "vue";
|
|
4
|
+
import { ElRow as L, ElCol as M } from "element-plus";
|
|
5
5
|
import "element-plus/es/components/row/style/css";
|
|
6
6
|
import "element-plus/es/components/col/style/css";
|
|
7
|
-
import { DasEmpty as
|
|
8
|
-
import { vOverlay as
|
|
9
|
-
import { vDasTooltip as
|
|
10
|
-
import { pureImageSrc as
|
|
11
|
-
import { setThemeRule as
|
|
12
|
-
const
|
|
7
|
+
import { DasEmpty as P } from "@das-fed/ui/packages/components/empty/index";
|
|
8
|
+
import { vOverlay as G } from "@das-fed/ui/packages/components/overlay/index";
|
|
9
|
+
import { vDasTooltip as z } from "@das-fed/ui/packages/components/text-tooltip/index";
|
|
10
|
+
import { pureImageSrc as x } from "@das-fed/utils/pure-image-src";
|
|
11
|
+
import { setThemeRule as H } from "@das-fed/web/packages/theme/index";
|
|
12
|
+
const D = {
|
|
13
13
|
"--das-application-app-bg-color": {
|
|
14
14
|
kjl: "#2673DC",
|
|
15
15
|
cjb: "#343848",
|
|
@@ -20,102 +20,131 @@ const g = {
|
|
|
20
20
|
cjb: "#FFFFFF",
|
|
21
21
|
ssl: "#FFFFFF"
|
|
22
22
|
}
|
|
23
|
-
},
|
|
23
|
+
}, J = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "application-list"
|
|
26
|
-
},
|
|
26
|
+
}, K = { class: "app-box" }, Q = { class: "cell cell-title" }, X = { class: "app-name" }, Y = { class: "cell app-list" }, Z = ["onClick"], b = ["src"], A = { class: "box-right" }, tt = { class: "name" }, et = { class: "describe" }, ot = /* @__PURE__ */ B({
|
|
27
27
|
__name: "index",
|
|
28
28
|
props: {
|
|
29
29
|
theme: { default: "default" },
|
|
30
30
|
appCategorys: { default: () => [] }
|
|
31
31
|
},
|
|
32
32
|
emits: ["open-app"],
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
return
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
setup(j, { emit: E }) {
|
|
34
|
+
const p = j, T = E, N = S(() => {
|
|
35
|
+
const t = {};
|
|
36
|
+
return p.theme === "default" || Object.keys(D).forEach((e) => {
|
|
37
|
+
var n;
|
|
38
|
+
t[e] = (n = D[e]) == null ? void 0 : n[p.theme];
|
|
39
|
+
}), t;
|
|
40
|
+
}), I = (t) => T("open-app", t), F = O("18px"), _ = (t, e) => {
|
|
41
|
+
if (!e) return;
|
|
42
|
+
if (e.offsetWidth > t) {
|
|
43
|
+
const s = parseInt(window.getComputedStyle(e).fontSize) - 1;
|
|
44
|
+
e.style.fontSize = s + "px", F.value = s + "px", _(t, e);
|
|
45
|
+
}
|
|
46
|
+
}, v = async () => {
|
|
47
|
+
await R();
|
|
48
|
+
const t = document.querySelectorAll(".application-content .cell-title .app-name")[0];
|
|
49
|
+
if (!t) return;
|
|
50
|
+
const e = parseInt(getComputedStyle(t).paddingRight) || 0, n = t.clientWidth - e;
|
|
51
|
+
let r = 0, s = null;
|
|
52
|
+
document.querySelectorAll(".application-content .cell-title .app-name > .text").forEach((d) => {
|
|
53
|
+
const m = d.offsetWidth;
|
|
54
|
+
m > r && (r = m, s = d);
|
|
55
|
+
}), _(n, s);
|
|
56
|
+
}, R = () => new Promise((t) => {
|
|
57
|
+
const e = () => {
|
|
58
|
+
const n = document.querySelectorAll(".application-content .cell-title .app-name");
|
|
59
|
+
if ((n == null ? void 0 : n.length) === p.appCategorys.length) return t();
|
|
60
|
+
setTimeout(() => e(), 50);
|
|
61
|
+
};
|
|
62
|
+
e();
|
|
63
|
+
}), W = S(() => p.appCategorys.map((t) => t.name));
|
|
64
|
+
return U(() => W.value, v, { deep: !0 }), V(v), (t, e) => f((a(), l(
|
|
41
65
|
"div",
|
|
42
66
|
{
|
|
43
|
-
class:
|
|
44
|
-
style:
|
|
67
|
+
class: $(["application-content", `theme-${t.theme}`]),
|
|
68
|
+
style: C(N.value)
|
|
45
69
|
},
|
|
46
70
|
[
|
|
47
|
-
|
|
48
|
-
(
|
|
49
|
-
|
|
71
|
+
t.appCategorys && t.appCategorys.length ? (a(), l("div", J, [
|
|
72
|
+
(a(!0), l(
|
|
73
|
+
h,
|
|
50
74
|
null,
|
|
51
|
-
|
|
52
|
-
(
|
|
53
|
-
key:
|
|
75
|
+
u(t.appCategorys, (n, r) => (a(), l("div", K, [
|
|
76
|
+
(a(), l("div", {
|
|
77
|
+
key: r,
|
|
54
78
|
class: "row"
|
|
55
79
|
}, [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
80
|
+
c("div", Q, [
|
|
81
|
+
c("div", X, [
|
|
82
|
+
c(
|
|
83
|
+
"span",
|
|
84
|
+
{
|
|
85
|
+
class: "text",
|
|
86
|
+
style: C({ fontSize: F.value })
|
|
87
|
+
},
|
|
88
|
+
g(n.name),
|
|
89
|
+
5
|
|
90
|
+
/* TEXT, STYLE */
|
|
91
|
+
)
|
|
92
|
+
])
|
|
64
93
|
]),
|
|
65
|
-
|
|
66
|
-
(
|
|
67
|
-
|
|
94
|
+
c("div", Y, [
|
|
95
|
+
(a(!0), l(
|
|
96
|
+
h,
|
|
68
97
|
null,
|
|
69
|
-
n
|
|
70
|
-
|
|
98
|
+
u(n.apps, (s) => (a(), y(
|
|
99
|
+
i(L),
|
|
71
100
|
{
|
|
72
101
|
class: "app-row",
|
|
73
102
|
gutter: 20
|
|
74
103
|
},
|
|
75
104
|
{
|
|
76
|
-
default:
|
|
77
|
-
(
|
|
78
|
-
|
|
105
|
+
default: k(() => [
|
|
106
|
+
(a(!0), l(
|
|
107
|
+
h,
|
|
79
108
|
null,
|
|
80
|
-
|
|
81
|
-
|
|
109
|
+
u(s, (o, d) => (a(), y(
|
|
110
|
+
i(M),
|
|
82
111
|
{
|
|
83
112
|
class: "app-col",
|
|
84
|
-
key:
|
|
113
|
+
key: d,
|
|
85
114
|
span: 6
|
|
86
115
|
},
|
|
87
116
|
{
|
|
88
|
-
default:
|
|
89
|
-
|
|
117
|
+
default: k(() => [
|
|
118
|
+
c("div", {
|
|
90
119
|
class: "sub-app",
|
|
91
|
-
onClick: (
|
|
120
|
+
onClick: (m) => I(o)
|
|
92
121
|
}, [
|
|
93
|
-
|
|
122
|
+
c("img", {
|
|
94
123
|
class: "img",
|
|
95
|
-
src:
|
|
124
|
+
src: o != null && o.iconDomain ? o.iconDomain + i(x)(o == null ? void 0 : o.iconUrl) : i(x)(o == null ? void 0 : o.iconUrl),
|
|
96
125
|
alt: ""
|
|
97
|
-
}, null, 8,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
126
|
+
}, null, 8, b),
|
|
127
|
+
c("div", A, [
|
|
128
|
+
f((a(), l("div", tt, [
|
|
129
|
+
w(
|
|
130
|
+
g(o.name),
|
|
102
131
|
1
|
|
103
132
|
/* TEXT */
|
|
104
133
|
)
|
|
105
134
|
])), [
|
|
106
|
-
[
|
|
135
|
+
[i(z)]
|
|
107
136
|
]),
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
137
|
+
f((a(), l("div", et, [
|
|
138
|
+
w(
|
|
139
|
+
g(o.description),
|
|
111
140
|
1
|
|
112
141
|
/* TEXT */
|
|
113
142
|
)
|
|
114
143
|
])), [
|
|
115
|
-
[
|
|
144
|
+
[i(z)]
|
|
116
145
|
])
|
|
117
146
|
])
|
|
118
|
-
], 8,
|
|
147
|
+
], 8, Z)
|
|
119
148
|
]),
|
|
120
149
|
_: 2
|
|
121
150
|
/* DYNAMIC */
|
|
@@ -142,7 +171,7 @@ const g = {
|
|
|
142
171
|
256
|
|
143
172
|
/* UNKEYED_FRAGMENT */
|
|
144
173
|
))
|
|
145
|
-
])) : (
|
|
174
|
+
])) : (a(), y(i(P), {
|
|
146
175
|
key: 1,
|
|
147
176
|
size: "large"
|
|
148
177
|
}))
|
|
@@ -150,18 +179,18 @@ const g = {
|
|
|
150
179
|
6
|
|
151
180
|
/* CLASS, STYLE */
|
|
152
181
|
)), [
|
|
153
|
-
[
|
|
182
|
+
[i(G)]
|
|
154
183
|
]);
|
|
155
184
|
}
|
|
156
|
-
}),
|
|
185
|
+
}), nt = {
|
|
157
186
|
"--das-application-app-bg-color": "#343848",
|
|
158
187
|
"--das-application-app-color": "#ffffff",
|
|
159
188
|
"--das-application-subapp-bg-color": "#ffffff",
|
|
160
189
|
"--das-application-subapp-name-color": "#212121",
|
|
161
190
|
"--das-application-subapp-describe-color": "#999999"
|
|
162
191
|
};
|
|
163
|
-
|
|
164
|
-
const
|
|
192
|
+
H(nt);
|
|
193
|
+
const ht = q(ot);
|
|
165
194
|
export {
|
|
166
|
-
|
|
195
|
+
ht as DasAppContainer
|
|
167
196
|
};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.application-content{position:relative;width:100%;height:100%;padding:30px 20px;box-sizing:border-box}.application-content .application-list{width:100%;display:table}.application-content .application-list .app-box{width:100%;margin-bottom:20px;display:table}.application-content .application-list .app-box .row{display:table-row}.application-content .application-list .app-box .row .cell{display:table-cell}.application-content .application-list .app-box .row .cell.cell-title{width:110px;font-size:0;vertical-align:middle;color:var(--das-application-app-color);background-color:var(--das-application-app-bg-color);position:relative}.application-content .application-list .app-box .row .cell.cell-title .app-name{width:110px;height:100%;font-size:18px;text-align:center;box-sizing:border-box;padding:25px 8px
|
|
1
|
+
.application-content{position:relative;width:100%;height:100%;padding:30px 20px;box-sizing:border-box}.application-content .application-list{width:100%;display:table}.application-content .application-list .app-box{width:100%;margin-bottom:20px;display:table}.application-content .application-list .app-box .row{display:table-row}.application-content .application-list .app-box .row .cell{display:table-cell}.application-content .application-list .app-box .row .cell.cell-title{width:110px;font-size:0;vertical-align:middle;color:var(--das-application-app-color);background-color:var(--das-application-app-bg-color);position:relative}.application-content .application-list .app-box .row .cell.cell-title .app-name{width:110px;height:100%;font-size:18px;text-align:center;box-sizing:border-box;padding:25px 8px}.application-content .application-list .app-box .row .cell.app-list{padding-left:20px;box-sizing:border-box;width:calc(100% - 110px)}.application-content .application-list .app-box .row .cell.app-list .app-row:not(:first-child){margin-top:20px}.application-content .application-list .app-box .row .cell.app-list .app-row .app-col .sub-app{height:100%;box-shadow:0 4px 12px #86a2d233;background-color:var(--das-application-subapp-bg-color);padding:25px 30px;display:flex;cursor:pointer}.application-content .application-list .app-box .row .cell.app-list .app-row .app-col .sub-app .img{width:48px;height:48px;border-radius:6px}.application-content .application-list .app-box .row .cell.app-list .app-row .app-col .sub-app .box-right{padding-left:10px;flex:1;box-sizing:border-box;overflow:hidden}.application-content .application-list .app-box .row .cell.app-list .app-row .app-col .sub-app .box-right .name{font-size:16px;font-weight:400;color:var(--das-application-subapp-name-color)}.application-content .application-list .app-box .row .cell.app-list .app-row .app-col .sub-app .box-right .describe{font-size:12px;font-weight:400;color:var(--das-application-subapp-describe-color)}.application-content .application-list .app-box .row .cell.app-list .app-row .app-col .sub-app:hover,.application-content .application-list .app-box .row .cell.app-list .app-row .app-col .sub-app:active{box-shadow:0 0 20px #0003;border-radius:2px}
|
|
Binary file
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/business-components/export-button/style.css';
|
|
2
|
-
import { withInstall as
|
|
3
|
-
import { ref as p, defineComponent as
|
|
4
|
-
import { t as
|
|
2
|
+
import { withInstall as G } from "@das-fed/utils/with-install/index";
|
|
3
|
+
import { ref as p, defineComponent as J, computed as K, watch as B, openBlock as Q, createElementBlock as W, createVNode as z, unref as k, withCtx as L, renderSlot as Z, createTextVNode as ee, toDisplayString as te, createCommentVNode as se, isRef as M } from "vue";
|
|
4
|
+
import { t as v, currentLang as N, i18n as $, setI18nRule as ae } from "@das-fed/web/packages/i18n/index";
|
|
5
5
|
import { DasDialog as oe } from "@das-fed/ui/packages/components/dialog/index";
|
|
6
6
|
import { DasProgress as re } from "@das-fed/ui/packages/components/progress/index";
|
|
7
7
|
import { DasButton as le } from "@das-fed/ui/packages/components/button/index";
|
|
8
8
|
import { iotProgress as ne } from "@das-fed/utils/api-services/modules/iot";
|
|
9
9
|
import D from "dayjs";
|
|
10
10
|
import { DasMessage as P } from "@das-fed/ui/packages/components/message/index";
|
|
11
|
-
import { getConfig as
|
|
12
|
-
let
|
|
11
|
+
import { getConfig as H } from "@das-fed/utils/config";
|
|
12
|
+
let F = (a = 21) => {
|
|
13
13
|
let l = "", e = crypto.getRandomValues(new Uint8Array(a));
|
|
14
14
|
for (; a--; ) {
|
|
15
15
|
let s = e[a] & 63;
|
|
@@ -18,19 +18,19 @@ let Y = (a = 21) => {
|
|
|
18
18
|
return l;
|
|
19
19
|
};
|
|
20
20
|
const ue = ne.get("progress"), ie = (a) => {
|
|
21
|
-
let l = p(!1), e = p(!1), s = p(""), i = p(0), o = p("normal"), m = p(!1), c, x = p(""), n = p(""), d = p(""), f = p(""),
|
|
21
|
+
let l = p(!1), e = p(!1), s = p(""), i = p(0), o = p("normal"), m = p(!1), c, x = p(""), n = p(""), d = p(""), f = p(""), g = p(!1), w = p(""), y;
|
|
22
22
|
const _ = () => {
|
|
23
|
-
n.value = "", d.value = "", f.value = "",
|
|
24
|
-
},
|
|
25
|
-
o.value = "normal", i.value = 0, s.value = h ||
|
|
23
|
+
n.value = "", d.value = "", f.value = "", g.value = !1, w.value = "";
|
|
24
|
+
}, O = async (t, u = "", h = "") => {
|
|
25
|
+
o.value = "normal", i.value = 0, s.value = h || v("导出进度"), e.value = !0;
|
|
26
26
|
const b = await (t == null ? void 0 : t());
|
|
27
27
|
if (!b.status) {
|
|
28
28
|
e.value = !1, o.value = "error";
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
T(b.taskId, "action", "");
|
|
32
|
-
},
|
|
33
|
-
o.value = "normal", i.value = 0, s.value =
|
|
32
|
+
}, j = async (t, u = "", h = "") => {
|
|
33
|
+
o.value = "normal", i.value = 0, s.value = v("导出进度"), e.value = !0;
|
|
34
34
|
const b = await (t == null ? void 0 : t());
|
|
35
35
|
if (!b.status) {
|
|
36
36
|
e.value = !1, o.value = "error";
|
|
@@ -38,53 +38,53 @@ const ue = ne.get("progress"), ie = (a) => {
|
|
|
38
38
|
}
|
|
39
39
|
D().format("YYYYMMDDHHmmss") + "", T(b.taskId, "export", u || "", h);
|
|
40
40
|
}, T = async (t, u, h, b = "") => {
|
|
41
|
-
m.value = !0,
|
|
41
|
+
m.value = !0, E(t, u, h, b), c = setTimeout(() => {
|
|
42
42
|
}, 50);
|
|
43
|
-
},
|
|
43
|
+
}, V = () => {
|
|
44
44
|
clearTimeout(c), c = null, e.value = !1;
|
|
45
|
-
},
|
|
46
|
-
var
|
|
47
|
-
const [
|
|
45
|
+
}, E = async (t, u = "export", h, b = "") => {
|
|
46
|
+
var U, I, S;
|
|
47
|
+
const [q, r] = await ue("", {
|
|
48
48
|
url: `progress/${t}`
|
|
49
49
|
}).run();
|
|
50
|
-
if (
|
|
50
|
+
if (q) {
|
|
51
51
|
m.value = !1;
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
i.value = r.percentage;
|
|
55
|
-
const C = u == "export" ?
|
|
55
|
+
const C = u == "export" ? v("导出") : v("导入");
|
|
56
56
|
if (i.value == 100)
|
|
57
|
-
if (x.value = r, m.value = !1,
|
|
58
|
-
r.status == 1 ? (o.value = "success",
|
|
59
|
-
message: r.message || `${C}${
|
|
57
|
+
if (x.value = r, m.value = !1, V(), u == "export")
|
|
58
|
+
r.status == 1 ? (o.value = "success", Y(`${H().baseURL}/oss${r.filePath}`, h, b), m.value = !1, a("success")) : r.status == 2 && (f.value = r.message || `${C}${N.value === "zh-CN" ? v("失败") : " " + v("失败")}`, P.error({
|
|
59
|
+
message: r.message || `${C}${N.value === "zh-CN" ? v("失败") : " " + v("失败")}`,
|
|
60
60
|
grouping: !0,
|
|
61
61
|
repeatNum: 1
|
|
62
62
|
}));
|
|
63
63
|
else if (u == "import") {
|
|
64
64
|
if (r.filePath) {
|
|
65
65
|
o.value = "error";
|
|
66
|
-
const
|
|
67
|
-
(
|
|
68
|
-
const
|
|
69
|
-
n.value = `${
|
|
66
|
+
const A = (U = y.name) == null ? void 0 : U.substr(y.name.indexOf("."));
|
|
67
|
+
(I = y.name) == null || I.replace(/(.*\/)*([^.]+).*/gi, "$2"), g.value = !0;
|
|
68
|
+
const X = (S = r.filePath) == null ? void 0 : S.replace(/(.*\/)*([^.]+).*/gi, "$2");
|
|
69
|
+
n.value = `${X}${A}`, d.value = y.sizeText, f.value = v("部分数据校验不通过,请下载附件并修改,重新导入!"), w.value = `${H().baseURL}/oss${r.filePath}`;
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
R(r.status, C), r.status == 1 && (l.value = !1), a("success");
|
|
72
72
|
} else u == "action" && (o.value = "success");
|
|
73
73
|
else
|
|
74
74
|
c && r.status != 2 ? c = setTimeout(() => {
|
|
75
|
-
|
|
76
|
-
}, 50) : (x.value = r, m.value = !1,
|
|
77
|
-
},
|
|
75
|
+
E(t, u, h, b);
|
|
76
|
+
}, 50) : (x.value = r, m.value = !1, R(r.status, C), V(), g.value = !0, f.value = (r == null ? void 0 : r.message) || "");
|
|
77
|
+
}, R = (t, u) => {
|
|
78
78
|
t == 1 ? (o.value = "success", P.success({
|
|
79
|
-
message:
|
|
79
|
+
message: v("business-components_export-success-tip", u),
|
|
80
80
|
grouping: !0,
|
|
81
81
|
repeatNum: 1
|
|
82
82
|
}), n.value = "", d.value = "", f.value = "") : t == 2 ? (o.value = "error", P.error({
|
|
83
|
-
message:
|
|
83
|
+
message: v("business-components_export-failure-tip", u),
|
|
84
84
|
grouping: !0,
|
|
85
85
|
repeatNum: 1
|
|
86
86
|
})) : t == 3 && (o.value = "error", P.error({
|
|
87
|
-
message:
|
|
87
|
+
message: v("business-components_export-partially-failure-tip", u),
|
|
88
88
|
grouping: !0,
|
|
89
89
|
repeatNum: 1
|
|
90
90
|
}));
|
|
@@ -100,19 +100,19 @@ const ue = ne.get("progress"), ie = (a) => {
|
|
|
100
100
|
errorFileName: n,
|
|
101
101
|
errorFileSize: d,
|
|
102
102
|
errorMessage: f,
|
|
103
|
-
errorImport:
|
|
103
|
+
errorImport: g,
|
|
104
104
|
errorFilePath: w,
|
|
105
|
-
fileExport:
|
|
106
|
-
fileAction:
|
|
105
|
+
fileExport: j,
|
|
106
|
+
fileAction: O,
|
|
107
107
|
generateUniqueName: (t) => {
|
|
108
108
|
const u = t == null ? void 0 : t.substr(t.indexOf("."));
|
|
109
|
-
return `${t == null ? void 0 : t.replace(/(.*\/)*([^.]+).*/gi, "$2")}${
|
|
109
|
+
return `${t == null ? void 0 : t.replace(/(.*\/)*([^.]+).*/gi, "$2")}${F()}${u}`;
|
|
110
110
|
},
|
|
111
|
-
downloadFile:
|
|
111
|
+
downloadFile: Y,
|
|
112
112
|
resetStataus: _,
|
|
113
113
|
checkProgress: T
|
|
114
114
|
};
|
|
115
|
-
},
|
|
115
|
+
}, Y = (a, l, e = "xlsx") => {
|
|
116
116
|
const s = new XMLHttpRequest();
|
|
117
117
|
s.open("get", a), s.setRequestHeader("Content-Type", "application/json; charset=UTF-8"), s.responseType = "blob", s.onload = function(i) {
|
|
118
118
|
const o = new Blob([this.response], {
|
|
@@ -126,21 +126,21 @@ const ue = ne.get("progress"), ie = (a) => {
|
|
|
126
126
|
}
|
|
127
127
|
}, s.send();
|
|
128
128
|
}, pe = (a, l) => {
|
|
129
|
-
const { showProgressDialog: e, progressTitle: s, percent: i, progressStatus: o, progressLoading: m, fileExport: c } = ie(l), x = p({}), n = p({}), d = (
|
|
129
|
+
const { showProgressDialog: e, progressTitle: s, percent: i, progressStatus: o, progressLoading: m, fileExport: c } = ie(l), x = p({}), n = p({}), d = (g, w) => {
|
|
130
130
|
x.value = {
|
|
131
|
-
...
|
|
131
|
+
...g
|
|
132
132
|
}, n.value = {
|
|
133
133
|
...w
|
|
134
134
|
};
|
|
135
135
|
let y = `${D().format("YYYYMMDD")}-${D().format("HHmmss")}.${a.fileType}`;
|
|
136
|
-
|
|
136
|
+
N.value === "en" && !/s$/.test(a.exportFileName) && (y = " " + y);
|
|
137
137
|
const _ = `${a.exportFileName}${y}`;
|
|
138
138
|
c(f, _, a.fileType);
|
|
139
139
|
}, f = async () => {
|
|
140
|
-
let
|
|
141
|
-
a.taskIdPosition === "params" && (x.value.taskId =
|
|
140
|
+
let g = F();
|
|
141
|
+
a.taskIdPosition === "params" && (x.value.taskId = g), a.taskIdPosition === "body" && (n.value.taskId = g);
|
|
142
142
|
const [w, y] = await a.exportFun(n.value, { params: x.value }).run();
|
|
143
|
-
return w ? { status: !1 } : { status: !0, taskId:
|
|
143
|
+
return w ? { status: !1 } : { status: !0, taskId: g };
|
|
144
144
|
};
|
|
145
145
|
return {
|
|
146
146
|
showProgressDialog: e,
|
|
@@ -150,7 +150,7 @@ const ue = ne.get("progress"), ie = (a) => {
|
|
|
150
150
|
progressLoading: m,
|
|
151
151
|
exportList: d
|
|
152
152
|
};
|
|
153
|
-
}, me = { class: "das-export-button" }, ce = /* @__PURE__ */
|
|
153
|
+
}, me = { class: "das-export-button" }, ce = /* @__PURE__ */ J({
|
|
154
154
|
__name: "App",
|
|
155
155
|
props: {
|
|
156
156
|
modelValue: {},
|
|
@@ -167,13 +167,13 @@ const ue = ne.get("progress"), ie = (a) => {
|
|
|
167
167
|
emits: ["update:modelValue", "update:bodyParams", "success"],
|
|
168
168
|
setup(a, { emit: l }) {
|
|
169
169
|
const e = a, s = l;
|
|
170
|
-
|
|
170
|
+
K(() => e.exportFileName || v("导出表")), B(e.modelValue, (n) => {
|
|
171
171
|
s("update:modelValue", n);
|
|
172
|
-
}),
|
|
172
|
+
}), B(e.bodyParams, (n) => {
|
|
173
173
|
s("update:bodyParams", n);
|
|
174
174
|
});
|
|
175
175
|
const { showProgressDialog: i, percent: o, progressStatus: m, exportList: c } = pe(e, s), x = [$("正在导出中...").value, $("导出失败").value, $("导出成功").value];
|
|
176
|
-
return (n, d) => (
|
|
176
|
+
return (n, d) => (Q(), W("div", me, [
|
|
177
177
|
z(k(le), {
|
|
178
178
|
block: n.block,
|
|
179
179
|
size: "middle",
|
|
@@ -182,10 +182,10 @@ const ue = ne.get("progress"), ie = (a) => {
|
|
|
182
182
|
ghost: n.ghost,
|
|
183
183
|
onClick: d[0] || (d[0] = (f) => k(c)(e.modelValue, e.bodyParams))
|
|
184
184
|
}, {
|
|
185
|
-
default:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
185
|
+
default: L(() => [
|
|
186
|
+
Z(n.$slots, "default", {}, () => [
|
|
187
|
+
ee(
|
|
188
|
+
te(k($)("导出").value),
|
|
189
189
|
1
|
|
190
190
|
/* TEXT */
|
|
191
191
|
)
|
|
@@ -194,20 +194,20 @@ const ue = ne.get("progress"), ie = (a) => {
|
|
|
194
194
|
_: 3
|
|
195
195
|
/* FORWARDED */
|
|
196
196
|
}, 8, ["block", "disabled", "btn-type", "ghost"]),
|
|
197
|
-
|
|
197
|
+
se(" 进度弹窗 "),
|
|
198
198
|
z(k(oe), {
|
|
199
199
|
size: "mini",
|
|
200
200
|
title: k($)("导出进度").value,
|
|
201
201
|
"is-feedback-img": !1,
|
|
202
202
|
modelValue: k(i),
|
|
203
|
-
"onUpdate:modelValue": d[2] || (d[2] = (f) =>
|
|
203
|
+
"onUpdate:modelValue": d[2] || (d[2] = (f) => M(i) ? i.value = f : null),
|
|
204
204
|
"append-to-body": !0,
|
|
205
205
|
type: "feedback"
|
|
206
206
|
}, {
|
|
207
|
-
default:
|
|
207
|
+
default: L(() => [
|
|
208
208
|
z(k(re), {
|
|
209
209
|
modelValue: k(o),
|
|
210
|
-
"onUpdate:modelValue": d[1] || (d[1] = (f) =>
|
|
210
|
+
"onUpdate:modelValue": d[1] || (d[1] = (f) => M(o) ? o.value = f : null),
|
|
211
211
|
style: { "margin-top": "35px" },
|
|
212
212
|
type: "circle",
|
|
213
213
|
status: k(m),
|
|
@@ -224,7 +224,7 @@ const ue = ne.get("progress"), ie = (a) => {
|
|
|
224
224
|
for (const [s, i] of l)
|
|
225
225
|
e[s] = i;
|
|
226
226
|
return e;
|
|
227
|
-
}, fe = /* @__PURE__ */ de(ce, [["__scopeId", "data-v-49f0bb05"]]),
|
|
227
|
+
}, fe = /* @__PURE__ */ de(ce, [["__scopeId", "data-v-49f0bb05"]]), ve = {
|
|
228
228
|
导出表: { "zh-CN": "导出表", en: "Export Table", _appCode: "framework" },
|
|
229
229
|
导出失败: { "zh-CN": "导出失败", en: "Export Failed", _appCode: "framework" },
|
|
230
230
|
导出成功: { "zh-CN": "导出成功", en: "Export Successful", _appCode: "framework" },
|
|
@@ -245,8 +245,8 @@ const ue = ne.get("progress"), ie = (a) => {
|
|
|
245
245
|
_appCode: "framework"
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
|
-
ae(
|
|
249
|
-
const Te =
|
|
248
|
+
ae(ve);
|
|
249
|
+
const Te = G(fe);
|
|
250
250
|
export {
|
|
251
251
|
Te as DasExportButton,
|
|
252
252
|
Te as default
|
|
Binary file
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
1
|
export declare const useImport: (props: any, emits: any) => {
|
|
3
|
-
showProgressDialog: Ref<boolean, boolean>;
|
|
4
|
-
progressTitle: Ref<string, string>;
|
|
5
|
-
percent: Ref<number, number>;
|
|
6
|
-
progressStatus: Ref<string, string>;
|
|
7
|
-
progressLoading: Ref<boolean, boolean>;
|
|
8
|
-
errorFileName: Ref<string, string>;
|
|
9
|
-
errorFileSize: Ref<string, string>;
|
|
10
|
-
errorMessage: Ref<string, string>;
|
|
11
|
-
errorImport: Ref<boolean, boolean>;
|
|
12
|
-
importDialog: Ref<boolean, boolean>;
|
|
13
|
-
fileList: Ref<any, any>;
|
|
14
|
-
fileHandleType: Ref<string, string>;
|
|
2
|
+
showProgressDialog: import("vue").Ref<boolean, boolean>;
|
|
3
|
+
progressTitle: import("vue").Ref<string, string>;
|
|
4
|
+
percent: import("vue").Ref<number, number>;
|
|
5
|
+
progressStatus: import("vue").Ref<string, string>;
|
|
6
|
+
progressLoading: import("vue").Ref<boolean, boolean>;
|
|
7
|
+
errorFileName: import("vue").Ref<string, string>;
|
|
8
|
+
errorFileSize: import("vue").Ref<string, string>;
|
|
9
|
+
errorMessage: import("vue").Ref<string, string>;
|
|
10
|
+
errorImport: import("vue").Ref<boolean, boolean>;
|
|
11
|
+
importDialog: import("vue").Ref<boolean, boolean>;
|
|
12
|
+
fileList: import("vue").Ref<any, any>;
|
|
13
|
+
fileHandleType: import("vue").Ref<string, string>;
|
|
15
14
|
showImportHandle: () => void;
|
|
16
15
|
confirmImport: () => Promise<import("element-plus").MessageHandler | undefined>;
|
|
17
16
|
fileUpload: (file: any) => void;
|