@skyfox2000/webui 1.4.9 → 1.4.10
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/assets/modules/{baseLayout-DIny49tw.js → baseLayout-DSVT_hCt.js} +3 -3
- package/lib/assets/modules/{file-upload-DHUBZlX4.js → file-upload-BefTs4CH.js} +1 -1
- package/lib/assets/modules/{index-CEffEFtI.js → index-C6BAsERS.js} +1 -1
- package/lib/assets/modules/{index-DyRjXb_O.js → index-Cwr2EDEI.js} +2 -2
- package/lib/assets/modules/{index-BIAdOoSj.js → index-DkMjvF98.js} +10 -10
- package/lib/assets/modules/{menuTabs-CCrFWIOl.js → menuTabs-D99nhxm_.js} +2 -2
- package/lib/assets/modules/{toolIcon-BGZR_aUI.js → toolIcon-DDp0EFRE.js} +1 -1
- package/lib/assets/modules/{uploadList-CMXuGRWT.js → upload-template-BK8iQQYz.js} +273 -263
- package/lib/assets/modules/uploadList-BfCPE5Gb.js +420 -0
- package/lib/es/AceEditor/index.js +3 -3
- package/lib/es/BasicLayout/index.js +2 -2
- package/lib/es/Error403/index.js +1 -1
- package/lib/es/Error404/index.js +1 -1
- package/lib/es/ExcelForm/index.js +16 -15
- package/lib/es/MenuLayout/index.js +2 -2
- package/lib/es/TemplateFile/index.js +61 -90
- package/lib/es/UploadForm/index.js +4 -4
- package/lib/index.d.ts +1 -0
- package/lib/utils/upload-template.d.ts +4 -0
- package/lib/webui.css +1 -1
- package/lib/webui.es.js +52 -50
- package/package.json +1 -1
- package/src/components/content/dialog/excelForm.vue +5 -0
- package/src/components/content/dialog/templateFile.vue +27 -79
- package/src/components/content/table/index.vue +1 -0
- package/src/components/form/upload/uploadList.vue +106 -38
- package/src/index.ts +2 -0
- package/src/utils/upload-template.ts +15 -0
- package/lib/assets/modules/uploadList-l4q5o65m.js +0 -400
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
import { defineComponent as se, ref as L, computed as D, watch as A, resolveDirective as ie, createElementBlock as d, openBlock as u, normalizeClass as P, unref as n, createElementVNode as f, withDirectives as w, createBlock as ae, mergeProps as re, withCtx as C, createVNode as p, createTextVNode as z, toDisplayString as B, Fragment as le, renderList as ce, createCommentVNode as _ } from "vue";
|
|
2
|
+
import { _ as ue } from "./index-C6BAsERS.js";
|
|
3
|
+
import { a as $, _ as T } from "./toolIcon-DDp0EFRE.js";
|
|
4
|
+
import { httpPost as I, ResStatus as K } from "@skyfox2000/fapi";
|
|
5
|
+
import { L as Q, u as V, t as pe, _ as de } from "./upload-template-BK8iQQYz.js";
|
|
6
|
+
import { p as R, U as a } from "./file-upload-BefTs4CH.js";
|
|
7
|
+
import { combineParams as q } from "@skyfox2000/microbase";
|
|
8
|
+
import g from "vue-m-message";
|
|
9
|
+
import "async-validator";
|
|
10
|
+
import "dayjs";
|
|
11
|
+
import { Upload as me, Tag as fe, Popconfirm as he, Progress as ve } from "ant-design-vue";
|
|
12
|
+
import "vue-draggable-next";
|
|
13
|
+
import { _ as xe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const ye = (l, S) => {
|
|
15
|
+
const t = document.createElement("a"), m = URL.createObjectURL(l);
|
|
16
|
+
t.href = m, t.download = S, t.style.display = "none", document.body.appendChild(t), t.click(), URL.revokeObjectURL(m), document.body.removeChild(t);
|
|
17
|
+
}, we = (l, S, t) => {
|
|
18
|
+
try {
|
|
19
|
+
t && (l.api || (l.api = t.api), l.authorize === void 0 && (l.authorize = t.authorize));
|
|
20
|
+
const m = q(l.params, S);
|
|
21
|
+
return I(l, m).then((c) => {
|
|
22
|
+
if ((c == null ? void 0 : c.status) === K.SUCCESS && c.data) {
|
|
23
|
+
const s = c.data, b = s.Content, E = s.Key.split("/").pop(), k = atob(b), h = [];
|
|
24
|
+
for (let F = 0; F < k.length; F++)
|
|
25
|
+
h.push(k.charCodeAt(F));
|
|
26
|
+
const U = new Blob([new Uint8Array(h)], {
|
|
27
|
+
type: s.Type
|
|
28
|
+
});
|
|
29
|
+
ye(U, E);
|
|
30
|
+
} else if ((c == null ? void 0 : c.errno) == Q) {
|
|
31
|
+
V().logout(!1);
|
|
32
|
+
return;
|
|
33
|
+
} else
|
|
34
|
+
g.error("下载文件失败!");
|
|
35
|
+
});
|
|
36
|
+
} catch (m) {
|
|
37
|
+
console.error("下载失败:", m), g.error("文件下载失败,请稍后重试");
|
|
38
|
+
}
|
|
39
|
+
}, Ce = ["xlsx", "xls", "csv", "txt"], _e = (l, S, t) => {
|
|
40
|
+
const m = S.split(".").pop();
|
|
41
|
+
if (Ce.includes(m))
|
|
42
|
+
console.log(l);
|
|
43
|
+
else
|
|
44
|
+
return g.error("文件类型不支持预览"), !1;
|
|
45
|
+
const c = q(l.params, t);
|
|
46
|
+
return I(l, c).then((s) => {
|
|
47
|
+
if ((s == null ? void 0 : s.status) === K.SUCCESS && s.data) {
|
|
48
|
+
const E = s.data.Content, k = atob(E), h = [];
|
|
49
|
+
for (let U = 0; U < k.length; U++)
|
|
50
|
+
h.push(k.charCodeAt(U));
|
|
51
|
+
} else if ((s == null ? void 0 : s.errno) == Q) {
|
|
52
|
+
V().logout(!1);
|
|
53
|
+
return;
|
|
54
|
+
} else
|
|
55
|
+
g.error("文件预览失败!");
|
|
56
|
+
});
|
|
57
|
+
}, ge = { class: "flex items-center justify-between w-full" }, Se = { class: "w-35 mx-3" }, be = { class: "mt-4 px-3" }, ke = { class: "flex items-center justify-between" }, Ue = { class: "flex items-center" }, Fe = { class: "flex items-center" }, Ee = {
|
|
58
|
+
key: 0,
|
|
59
|
+
class: "mr-2"
|
|
60
|
+
}, Oe = {
|
|
61
|
+
key: 1,
|
|
62
|
+
class: "flex items-center text-blue-500 hover:text-blue-700 mr-1 cursor-pointer"
|
|
63
|
+
}, ze = ["onClick"], Le = {
|
|
64
|
+
key: 2,
|
|
65
|
+
class: "flex items-center text-blue-500 hover:text-blue-700 mr-1 cursor-pointer"
|
|
66
|
+
}, Pe = ["onClick"], $e = {
|
|
67
|
+
key: 3,
|
|
68
|
+
class: "flex items-center text-red-500 hover:text-red-700 cursor-pointer"
|
|
69
|
+
}, Ae = ["onClick"], Be = {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: "text-sm text-nowrap"
|
|
72
|
+
}, Te = { key: 0 }, Ie = /* @__PURE__ */ se({
|
|
73
|
+
__name: "uploadList",
|
|
74
|
+
props: {
|
|
75
|
+
autoUpload: { type: Boolean, default: !1 },
|
|
76
|
+
uploadUrl: {},
|
|
77
|
+
downloadUrl: {},
|
|
78
|
+
previewUrl: {},
|
|
79
|
+
deleteUrl: {},
|
|
80
|
+
fileList: { default: () => [] },
|
|
81
|
+
placeholder: { default: "" },
|
|
82
|
+
fileExt: {},
|
|
83
|
+
maxFileSize: { default: 20 },
|
|
84
|
+
maxCount: { default: 5 },
|
|
85
|
+
maxCountTip: { type: Boolean, default: !1 },
|
|
86
|
+
maxFileSizeTip: { type: Boolean, default: !0 },
|
|
87
|
+
fileExtTip: { type: Boolean, default: !0 },
|
|
88
|
+
parentPath: {},
|
|
89
|
+
showActionText: { type: Boolean, default: !0 },
|
|
90
|
+
showOnlineSwitch: { type: Boolean, default: !1 },
|
|
91
|
+
showDelete: { type: Boolean, default: !0 }
|
|
92
|
+
},
|
|
93
|
+
emits: ["update:file-list"],
|
|
94
|
+
setup(l, { emit: S }) {
|
|
95
|
+
const t = l, m = pe(), { errInfo: c } = m, s = L(t.fileList), b = L([]), E = L(), k = S, h = L(!1), U = D(() => {
|
|
96
|
+
var e;
|
|
97
|
+
return (e = t.fileExt) != null && e.length ? t.fileExt.map((o) => `.${o}`).join(",") : "";
|
|
98
|
+
}), F = (e) => {
|
|
99
|
+
var o;
|
|
100
|
+
if (t.fileExt && t.fileExt.length > 0) {
|
|
101
|
+
const r = ((o = e.name.split(".").pop()) == null ? void 0 : o.toLowerCase()) || "";
|
|
102
|
+
if (!t.fileExt.includes(r))
|
|
103
|
+
return g.error("文件类型不支持"), !1;
|
|
104
|
+
}
|
|
105
|
+
return e.size / 1024 / 1024 > t.maxFileSize ? (g.error(`文件大小超过 ${t.maxFileSize}MB 限制`), !1) : !0;
|
|
106
|
+
}, G = () => t.maxCount > 1 && s.value.length >= t.maxCount, H = (e) => {
|
|
107
|
+
const o = e;
|
|
108
|
+
return o.params || (o.params = {}), o.params.FileKey = o.name, t.parentPath && (o.params.FileKey = R.join("/", t.parentPath, o.name)), o.status = a.Pending, o;
|
|
109
|
+
}, J = (e) => F(e) && t.autoUpload, W = (e) => {
|
|
110
|
+
if (e.length === 0) return;
|
|
111
|
+
const o = [...s.value];
|
|
112
|
+
let r = !1;
|
|
113
|
+
for (const O of e) {
|
|
114
|
+
if (!F(O)) {
|
|
115
|
+
r = !0;
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
const y = H(O);
|
|
119
|
+
if (t.maxCount === 1) {
|
|
120
|
+
o.length = 0, o.push(y);
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
if (G()) {
|
|
124
|
+
g.error(`最多上传 ${t.maxCount} 个文件`), r = !0;
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
console.log("checking file", y), console.log("existing file", o);
|
|
128
|
+
const i = o.findIndex(
|
|
129
|
+
(v) => v.name === y.name
|
|
130
|
+
);
|
|
131
|
+
i > -1 ? o[i] = y : o.push(y);
|
|
132
|
+
}
|
|
133
|
+
(!r || o.length > 0) && (s.value = o), b.value = [];
|
|
134
|
+
}, X = (e) => {
|
|
135
|
+
b.value = e, W(e);
|
|
136
|
+
}, Y = D(() => ({
|
|
137
|
+
accept: U.value,
|
|
138
|
+
multiple: t.maxCount !== 1,
|
|
139
|
+
fileList: b.value,
|
|
140
|
+
"onUpdate:fileList": X,
|
|
141
|
+
beforeUpload: J,
|
|
142
|
+
listType: "text",
|
|
143
|
+
showUploadList: !1
|
|
144
|
+
}));
|
|
145
|
+
A(
|
|
146
|
+
() => t.fileList,
|
|
147
|
+
(e) => {
|
|
148
|
+
s.value = e;
|
|
149
|
+
},
|
|
150
|
+
{ deep: !0, immediate: !0 }
|
|
151
|
+
), A(
|
|
152
|
+
() => s.value,
|
|
153
|
+
(e) => {
|
|
154
|
+
k("update:file-list", e);
|
|
155
|
+
},
|
|
156
|
+
{ deep: !0 }
|
|
157
|
+
), A(
|
|
158
|
+
() => t.parentPath,
|
|
159
|
+
(e) => {
|
|
160
|
+
e && s.value.forEach((o) => {
|
|
161
|
+
o.params.FileKey = R.join("/", e, o.fileName);
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
const j = (e) => {
|
|
166
|
+
const o = s.value[e].minioFile, r = {
|
|
167
|
+
api: t.downloadUrl.api,
|
|
168
|
+
authorize: t.downloadUrl.authorize,
|
|
169
|
+
url: t.downloadUrl.url,
|
|
170
|
+
params: {
|
|
171
|
+
Query: {
|
|
172
|
+
FileKey: o.Key
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
we(r);
|
|
177
|
+
}, Z = (e) => {
|
|
178
|
+
e.minioFile && (e.minioFile.Status = e.status);
|
|
179
|
+
}, M = (e) => {
|
|
180
|
+
const o = s.value[e].minioFile, r = {
|
|
181
|
+
api: t.previewUrl.api,
|
|
182
|
+
authorize: t.previewUrl.authorize,
|
|
183
|
+
url: t.previewUrl.url,
|
|
184
|
+
params: {
|
|
185
|
+
Query: {
|
|
186
|
+
FileKey: o.Key
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
_e(r, o.FileName);
|
|
191
|
+
}, N = (e) => {
|
|
192
|
+
const o = s.value[e];
|
|
193
|
+
t.deleteUrl && o.minioFile && o.minioFile.Key ? I(t.deleteUrl, {
|
|
194
|
+
Query: {
|
|
195
|
+
FileKey: o.minioFile.Key
|
|
196
|
+
}
|
|
197
|
+
}).then((r) => {
|
|
198
|
+
r && r.status === K.SUCCESS && (g.success("删除文件成功!"), s.value.splice(e, 1));
|
|
199
|
+
}) : s.value.splice(e, 1), h.value = !1;
|
|
200
|
+
}, ee = (e, o) => {
|
|
201
|
+
if (o === a.Pending) {
|
|
202
|
+
N(e);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
h.value = !0;
|
|
206
|
+
}, te = () => {
|
|
207
|
+
const e = t.fileExt && t.fileExt.length && t.fileExtTip ? `文件必须为 ${t.fileExt.join("/")}` : "", o = t.maxFileSize !== 0 && t.maxFileSizeTip ? `单文件最大 ${t.maxFileSize}MB` : "", r = t.maxCount !== 0 && t.maxCountTip ? `最多 ${t.maxCount} 个文件` : "";
|
|
208
|
+
return [o, e, r].filter(Boolean).join(",");
|
|
209
|
+
}, oe = (e) => {
|
|
210
|
+
switch (e) {
|
|
211
|
+
case a.Uploading:
|
|
212
|
+
return "blue";
|
|
213
|
+
case a.Success:
|
|
214
|
+
return "green";
|
|
215
|
+
case a.Error:
|
|
216
|
+
return "red";
|
|
217
|
+
case a.Online:
|
|
218
|
+
return "green";
|
|
219
|
+
case a.Offline:
|
|
220
|
+
return "pink";
|
|
221
|
+
default:
|
|
222
|
+
return "cyan";
|
|
223
|
+
}
|
|
224
|
+
}, ne = (e) => {
|
|
225
|
+
switch (e) {
|
|
226
|
+
case a.Uploading:
|
|
227
|
+
return "上传中";
|
|
228
|
+
case a.Success:
|
|
229
|
+
return "上传完成";
|
|
230
|
+
case a.Error:
|
|
231
|
+
return "上传失败";
|
|
232
|
+
case a.Online:
|
|
233
|
+
return "在线";
|
|
234
|
+
case a.Offline:
|
|
235
|
+
return "已下线";
|
|
236
|
+
default:
|
|
237
|
+
return "待上传";
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
return (e, o) => {
|
|
241
|
+
var O, y;
|
|
242
|
+
const r = ie("auth");
|
|
243
|
+
return u(), d("div", {
|
|
244
|
+
class: P(["w-full border border-solid border-gray-100 mt-1 rounded-md py-5", [(O = n(c)) == null ? void 0 : O.errClass]])
|
|
245
|
+
}, [
|
|
246
|
+
f("div", ge, [
|
|
247
|
+
f("div", Se, [
|
|
248
|
+
w((u(), ae(n(me), re({
|
|
249
|
+
ref_key: "fileUploader",
|
|
250
|
+
ref: E
|
|
251
|
+
}, Y.value), {
|
|
252
|
+
default: C(() => {
|
|
253
|
+
var i;
|
|
254
|
+
return [
|
|
255
|
+
p(n(ue), {
|
|
256
|
+
class: P([((i = n(c)) == null ? void 0 : i.errClass) + "-text"])
|
|
257
|
+
}, {
|
|
258
|
+
default: C(() => o[1] || (o[1] = [
|
|
259
|
+
z("选择文件")
|
|
260
|
+
])),
|
|
261
|
+
_: 1,
|
|
262
|
+
__: [1]
|
|
263
|
+
}, 8, ["class"])
|
|
264
|
+
];
|
|
265
|
+
}),
|
|
266
|
+
_: 1
|
|
267
|
+
}, 16)), [
|
|
268
|
+
[r, { role: ["Super", "Admin"], permit: ":uploadlist:upload" }]
|
|
269
|
+
])
|
|
270
|
+
]),
|
|
271
|
+
f("div", {
|
|
272
|
+
class: P(["flex-1 text-sm text-gray-500", [((y = n(c)) == null ? void 0 : y.errClass) + "-text"]])
|
|
273
|
+
}, B(te()), 3)
|
|
274
|
+
]),
|
|
275
|
+
f("div", be, [
|
|
276
|
+
(u(!0), d(le, null, ce(s.value, (i, v) => (u(), d("div", {
|
|
277
|
+
key: v,
|
|
278
|
+
class: "mb-2 pb-1"
|
|
279
|
+
}, [
|
|
280
|
+
f("div", ke, [
|
|
281
|
+
f("div", Ue, [
|
|
282
|
+
f("span", {
|
|
283
|
+
class: P(["text-gray-700 mr-2", [i.status == n(a).Offline ? "line-through" : ""]])
|
|
284
|
+
}, B(i.fileName ?? i.name), 3),
|
|
285
|
+
f("span", null, [
|
|
286
|
+
p(n(fe), {
|
|
287
|
+
color: oe(i.status)
|
|
288
|
+
}, {
|
|
289
|
+
default: C(() => [
|
|
290
|
+
z(B(ne(i.status)), 1)
|
|
291
|
+
]),
|
|
292
|
+
_: 2
|
|
293
|
+
}, 1032, ["color"])
|
|
294
|
+
])
|
|
295
|
+
]),
|
|
296
|
+
f("div", Fe, [
|
|
297
|
+
e.showOnlineSwitch && (i.status == n(a).Online || i.status == n(a).Offline) ? (u(), d("div", Ee, [
|
|
298
|
+
p(n($), { title: "上线或下线" }, {
|
|
299
|
+
default: C(() => [
|
|
300
|
+
w(p(n(de), {
|
|
301
|
+
checked: i.status,
|
|
302
|
+
"onUpdate:checked": (x) => i.status = x,
|
|
303
|
+
data: [
|
|
304
|
+
{ label: "上线", value: n(a).Online },
|
|
305
|
+
{ label: "下线", value: n(a).Offline }
|
|
306
|
+
],
|
|
307
|
+
onChange: (x) => Z(i)
|
|
308
|
+
}, null, 8, ["checked", "onUpdate:checked", "data", "onChange"]), [
|
|
309
|
+
[r, { role: ["Super", "Admin"], permit: ":uploadlist:online" }]
|
|
310
|
+
])
|
|
311
|
+
]),
|
|
312
|
+
_: 2
|
|
313
|
+
}, 1024)
|
|
314
|
+
])) : _("", !0),
|
|
315
|
+
e.downloadUrl && (i.status == n(a).Online || i.status == n(a).Offline) ? (u(), d("div", Oe, [
|
|
316
|
+
p(n($), { title: "下载" }, {
|
|
317
|
+
default: C(() => [
|
|
318
|
+
w(p(n(T), {
|
|
319
|
+
icon: "icon-download",
|
|
320
|
+
clickable: "",
|
|
321
|
+
onClick: (x) => j(v)
|
|
322
|
+
}, null, 8, ["onClick"]), [
|
|
323
|
+
[r, { role: ["Super", "Admin"], permit: ":uploadlist:download" }]
|
|
324
|
+
]),
|
|
325
|
+
e.showActionText ? w((u(), d("span", {
|
|
326
|
+
key: 0,
|
|
327
|
+
class: "mr-2 text-sm text-nowrap",
|
|
328
|
+
onClick: (x) => j(v)
|
|
329
|
+
}, o[2] || (o[2] = [
|
|
330
|
+
z("下载")
|
|
331
|
+
]), 8, ze)), [
|
|
332
|
+
[r, { role: ["Super", "Admin"], permit: ":uploadlist:download" }]
|
|
333
|
+
]) : _("", !0)
|
|
334
|
+
]),
|
|
335
|
+
_: 2
|
|
336
|
+
}, 1024)
|
|
337
|
+
])) : _("", !0),
|
|
338
|
+
e.previewUrl && (i.status == n(a).Online || i.status == n(a).Offline) ? (u(), d("div", Le, [
|
|
339
|
+
p(n($), { title: "预览" }, {
|
|
340
|
+
default: C(() => [
|
|
341
|
+
w(p(n(T), {
|
|
342
|
+
icon: "icon-eye",
|
|
343
|
+
clickable: "",
|
|
344
|
+
onClick: (x) => M(v)
|
|
345
|
+
}, null, 8, ["onClick"]), [
|
|
346
|
+
[r, { role: ["Super", "Admin"], permit: ":uploadlist:preview" }]
|
|
347
|
+
]),
|
|
348
|
+
e.showActionText ? w((u(), d("span", {
|
|
349
|
+
key: 0,
|
|
350
|
+
class: "mr-2 text-sm text-nowrap",
|
|
351
|
+
onClick: (x) => M(v)
|
|
352
|
+
}, o[3] || (o[3] = [
|
|
353
|
+
z("预览")
|
|
354
|
+
]), 8, Pe)), [
|
|
355
|
+
[r, { role: ["Super", "Admin"], permit: ":uploadlist:preview" }]
|
|
356
|
+
]) : _("", !0)
|
|
357
|
+
]),
|
|
358
|
+
_: 2
|
|
359
|
+
}, 1024)
|
|
360
|
+
])) : _("", !0),
|
|
361
|
+
e.showDelete !== !1 ? (u(), d("div", $e, [
|
|
362
|
+
p(n(he), {
|
|
363
|
+
open: h.value,
|
|
364
|
+
cancelText: "否",
|
|
365
|
+
okText: "是",
|
|
366
|
+
title: "确定删除该文件吗?",
|
|
367
|
+
okButtonProps: { size: "small" },
|
|
368
|
+
cancelButtonProps: { size: "small" },
|
|
369
|
+
onConfirm: (x) => N(v),
|
|
370
|
+
onCancel: o[0] || (o[0] = (x) => h.value = !1)
|
|
371
|
+
}, {
|
|
372
|
+
default: C(() => [
|
|
373
|
+
p(n($), { title: "删除" }, {
|
|
374
|
+
default: C(() => [
|
|
375
|
+
f("div", {
|
|
376
|
+
onClick: (x) => ee(v, i.status)
|
|
377
|
+
}, [
|
|
378
|
+
w(p(n(T), {
|
|
379
|
+
icon: "icon-new",
|
|
380
|
+
angle: 45,
|
|
381
|
+
clickable: ""
|
|
382
|
+
}, null, 512), [
|
|
383
|
+
[r, { role: ["Super", "Admin"], permit: ":uploadlist:delete" }]
|
|
384
|
+
]),
|
|
385
|
+
e.showActionText ? w((u(), d("span", Be, o[4] || (o[4] = [
|
|
386
|
+
z("删除")
|
|
387
|
+
]))), [
|
|
388
|
+
[r, { role: ["Super", "Admin"], permit: ":uploadlist:delete" }]
|
|
389
|
+
]) : _("", !0)
|
|
390
|
+
], 8, Ae)
|
|
391
|
+
]),
|
|
392
|
+
_: 2
|
|
393
|
+
}, 1024)
|
|
394
|
+
]),
|
|
395
|
+
_: 2
|
|
396
|
+
}, 1032, ["open", "onConfirm"])
|
|
397
|
+
])) : _("", !0)
|
|
398
|
+
])
|
|
399
|
+
]),
|
|
400
|
+
i.status !== n(a).Online && i.status !== n(a).Offline && i.status !== n(a).Success ? (u(), d("div", Te, [
|
|
401
|
+
p(n(ve), {
|
|
402
|
+
percent: i.percent,
|
|
403
|
+
"stroke-width": 2,
|
|
404
|
+
"show-info": !1,
|
|
405
|
+
style: { height: "2px" }
|
|
406
|
+
}, null, 8, ["percent"])
|
|
407
|
+
])) : _("", !0)
|
|
408
|
+
]))), 128))
|
|
409
|
+
])
|
|
410
|
+
], 2);
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
}), Xe = /* @__PURE__ */ xe(Ie, [["__scopeId", "data-v-b9252ae9"]]);
|
|
414
|
+
export {
|
|
415
|
+
Ce as C,
|
|
416
|
+
Xe as U,
|
|
417
|
+
we as a,
|
|
418
|
+
ye as d,
|
|
419
|
+
_e as p
|
|
420
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as F, defineAsyncComponent as M, ref as m, watch as V, onMounted as J, createElementBlock as x, openBlock as p, Fragment as K, createElementVNode as v, createVNode as _, toDisplayString as W, unref as i, createBlock as P, withKeys as f, normalizeClass as N, withModifiers as w, withCtx as z, createCommentVNode as L } from "vue";
|
|
2
2
|
import "ant-design-vue";
|
|
3
|
-
import { _ as q } from "../../assets/modules/toolIcon-
|
|
3
|
+
import { _ as q } from "../../assets/modules/toolIcon-DDp0EFRE.js";
|
|
4
4
|
import "@skyfox2000/fapi";
|
|
5
|
-
import "../../assets/modules/
|
|
5
|
+
import "../../assets/modules/upload-template-BK8iQQYz.js";
|
|
6
6
|
import "@skyfox2000/microbase";
|
|
7
7
|
import "vue-m-message";
|
|
8
8
|
import "async-validator";
|
|
9
9
|
import "dayjs";
|
|
10
|
-
import { _ as D } from "../../assets/modules/index-
|
|
10
|
+
import { _ as D } from "../../assets/modules/index-Cwr2EDEI.js";
|
|
11
11
|
import "vue-draggable-next";
|
|
12
12
|
const h = async (s) => window.ace ? window.ace : new Promise((l, t) => {
|
|
13
13
|
const o = document.createElement("script");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as f, ref as d, watch as _, onMounted as v, resolveComponent as h, createBlock as o, openBlock as t, withCtx as s, createElementVNode as C, normalizeClass as x, createVNode as w, KeepAlive as g, unref as n, resolveDynamicComponent as y } from "vue";
|
|
2
|
-
import { _ as I } from "../../assets/modules/baseLayout-
|
|
3
|
-
import { ag as A, a as S } from "../../assets/modules/
|
|
2
|
+
import { _ as I } from "../../assets/modules/baseLayout-DSVT_hCt.js";
|
|
3
|
+
import { ag as A, a as S } from "../../assets/modules/upload-template-BK8iQQYz.js";
|
|
4
4
|
import "@skyfox2000/microbase";
|
|
5
5
|
import "@skyfox2000/fapi";
|
|
6
6
|
import b from "vue-m-message";
|
package/lib/es/Error403/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as i, createBlock as p, openBlock as m, unref as r, withCtx as e, createVNode as n, createTextVNode as a } from "vue";
|
|
2
|
-
import { r as s } from "../../assets/modules/
|
|
2
|
+
import { r as s } from "../../assets/modules/upload-template-BK8iQQYz.js";
|
|
3
3
|
import "@skyfox2000/microbase";
|
|
4
4
|
import "@skyfox2000/fapi";
|
|
5
5
|
import "vue-m-message";
|
package/lib/es/Error404/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as i, createBlock as p, openBlock as m, unref as r, withCtx as e, createVNode as n, createTextVNode as a } from "vue";
|
|
2
|
-
import { r as s } from "../../assets/modules/
|
|
2
|
+
import { r as s } from "../../assets/modules/upload-template-BK8iQQYz.js";
|
|
3
3
|
import "@skyfox2000/microbase";
|
|
4
4
|
import "@skyfox2000/fapi";
|
|
5
5
|
import "vue-m-message";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as we, ref as f, computed as T, watch as
|
|
2
|
-
import { _ as Y } from "../../assets/modules/index-
|
|
1
|
+
import { defineComponent as we, ref as f, computed as T, watch as H, onMounted as be, createBlock as W, openBlock as d, unref as n, withCtx as S, renderSlot as J, createElementBlock as g, createCommentVNode as K, createElementVNode as h, createVNode as C, createTextVNode as X, toDisplayString as E, normalizeClass as Ce, Fragment as ie, renderList as ne } from "vue";
|
|
2
|
+
import { _ as Y } from "../../assets/modules/index-C6BAsERS.js";
|
|
3
3
|
import { Modal as Fe, Upload as ue, Space as _e } from "ant-design-vue";
|
|
4
4
|
import { httpGet as Ue, ResStatus as fe } from "@skyfox2000/fapi";
|
|
5
|
-
import { F as Te, a3 as Se, a9 as Ee } from "../../assets/modules/
|
|
6
|
-
import { A as Re, p as De, U as ce } from "../../assets/modules/file-upload-
|
|
5
|
+
import { F as Te, a3 as Se, a9 as Ee } from "../../assets/modules/upload-template-BK8iQQYz.js";
|
|
6
|
+
import { A as Re, p as De, U as ce } from "../../assets/modules/file-upload-BefTs4CH.js";
|
|
7
7
|
import "@skyfox2000/microbase";
|
|
8
8
|
import p from "vue-m-message";
|
|
9
|
-
import { c as ke, _ as Z, h as Le, p as Ne, i as Ke } from "../../assets/modules/index-
|
|
9
|
+
import { c as ke, _ as Z, h as Le, p as Ne, i as Ke } from "../../assets/modules/index-DkMjvF98.js";
|
|
10
10
|
import "dayjs";
|
|
11
11
|
import "vue-draggable-next";
|
|
12
12
|
import "async-validator";
|
|
@@ -99,7 +99,7 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
99
99
|
}, qe = {
|
|
100
100
|
key: 1,
|
|
101
101
|
class: "flex flex-col"
|
|
102
|
-
}, Qe = { class: "overflow-y-auto" },
|
|
102
|
+
}, Qe = { class: "overflow-y-auto" }, He = { class: "text-[13px] text-gray-600" }, We = { class: "pl-5 mt-1 mb-0" }, Je = {
|
|
103
103
|
key: 0,
|
|
104
104
|
class: "mt-3"
|
|
105
105
|
}, Xe = { class: "text-[12px] text-gray-600 p-1" }, Ye = { class: "text-[13px] text-gray-600" }, Ze = { class: "pl-5 mt-1 mb-0" }, ea = { class: "text-[12px] text-gray-600" }, ma = /* @__PURE__ */ we({
|
|
@@ -110,6 +110,7 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
110
110
|
excelCtrl: {},
|
|
111
111
|
enableUpload: { type: Boolean, default: !0 },
|
|
112
112
|
uploadParams: {},
|
|
113
|
+
excelHeaders: {},
|
|
113
114
|
excelFieldMap: {},
|
|
114
115
|
fileField: {},
|
|
115
116
|
excelRecordsKey: {},
|
|
@@ -141,17 +142,17 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
141
142
|
return "请选择Excel或CSV文件";
|
|
142
143
|
}
|
|
143
144
|
}), V = f("待验证数据规则"), B = f("warning"), P = f("待验证重复数据"), $ = f("warning");
|
|
144
|
-
|
|
145
|
+
H(
|
|
145
146
|
() => a.visible.value,
|
|
146
147
|
() => {
|
|
147
148
|
m.value = a.visible.value, m.value && (A(), e.previewUrl && I());
|
|
148
149
|
}
|
|
149
|
-
),
|
|
150
|
+
), H(
|
|
150
151
|
() => m.value,
|
|
151
152
|
() => {
|
|
152
153
|
a.visible.value = m.value, m.value || A();
|
|
153
154
|
}
|
|
154
|
-
),
|
|
155
|
+
), H(
|
|
155
156
|
() => e.previewUrl,
|
|
156
157
|
() => {
|
|
157
158
|
m.value && e.previewUrl && I();
|
|
@@ -306,7 +307,7 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
306
307
|
return p.error(v), ue.LIST_IGNORE;
|
|
307
308
|
try {
|
|
308
309
|
if (A(), y.value = t.name, q.value = u ? "text/csv" : "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", u) {
|
|
309
|
-
const w = await t.arrayBuffer(), O = new TextDecoder("utf-8").decode(w), { csvToExcelView: G } = await import("../../assets/modules/index-
|
|
310
|
+
const w = await t.arrayBuffer(), O = new TextDecoder("utf-8").decode(w), { csvToExcelView: G } = await import("../../assets/modules/index-DkMjvF98.js").then((he) => he.j), M = await G(O, t.name);
|
|
310
311
|
if (!M.success)
|
|
311
312
|
throw new Error(M.error || "CSV文件处理失败");
|
|
312
313
|
const oe = await (await fetch(M.blobUrl)).arrayBuffer();
|
|
@@ -348,7 +349,7 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
348
349
|
};
|
|
349
350
|
return s({
|
|
350
351
|
clearAll: A
|
|
351
|
-
}), (t, o) => (d(),
|
|
352
|
+
}), (t, o) => (d(), W(n(Fe), {
|
|
352
353
|
title: t.title ?? "文件上传",
|
|
353
354
|
open: m.value,
|
|
354
355
|
"onUpdate:open": o[0] || (o[0] = (r) => m.value = r),
|
|
@@ -367,7 +368,7 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
367
368
|
]),
|
|
368
369
|
_: 1
|
|
369
370
|
}),
|
|
370
|
-
z.value ? K("", !0) : (d(),
|
|
371
|
+
z.value ? K("", !0) : (d(), W(n(Y), {
|
|
371
372
|
key: 0,
|
|
372
373
|
onClick: me,
|
|
373
374
|
type: "primary",
|
|
@@ -418,7 +419,7 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
418
419
|
J(t.$slots, "file-after")
|
|
419
420
|
])),
|
|
420
421
|
h("div", Ae, [
|
|
421
|
-
n(a).isFormLoading.value ? (d(),
|
|
422
|
+
n(a).isFormLoading.value ? (d(), W(n(Le), {
|
|
422
423
|
key: 0,
|
|
423
424
|
size: "large"
|
|
424
425
|
})) : K("", !0),
|
|
@@ -454,8 +455,8 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
454
455
|
key: u,
|
|
455
456
|
class: "border-b pb-0"
|
|
456
457
|
}, [
|
|
457
|
-
h("div",
|
|
458
|
-
h("ul",
|
|
458
|
+
h("div", He, E(r.field), 1),
|
|
459
|
+
h("ul", We, [
|
|
459
460
|
(d(!0), g(ie, null, ne(r.rules, (i, c) => (d(), g("li", {
|
|
460
461
|
key: c,
|
|
461
462
|
class: "text-[12px] text-gray-600"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as f, ref as d, watch as _, onMounted as v, resolveComponent as h, createBlock as o, openBlock as t, withCtx as s, createElementVNode as C, normalizeClass as x, createVNode as g, KeepAlive as w, unref as n, resolveDynamicComponent as I } from "vue";
|
|
2
|
-
import { _ as y } from "../../assets/modules/baseLayout-
|
|
3
|
-
import { ag as A, a as S } from "../../assets/modules/
|
|
2
|
+
import { _ as y } from "../../assets/modules/baseLayout-DSVT_hCt.js";
|
|
3
|
+
import { ag as A, a as S } from "../../assets/modules/upload-template-BK8iQQYz.js";
|
|
4
4
|
import "@skyfox2000/microbase";
|
|
5
5
|
import "@skyfox2000/fapi";
|
|
6
6
|
import k from "vue-m-message";
|