@skyfox2000/webui 1.3.9 → 1.3.11
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/{file-upload-Bkrnsn-c.js → file-upload-CwyUkWwi.js} +1 -1
- package/lib/assets/modules/{index-DpVh0k1G.js → index-BRWQ6SRp.js} +1 -1
- package/lib/assets/modules/{index-BOBTPmiP.js → index-DHWlaZL2.js} +2 -2
- package/lib/assets/modules/{index-D9o5XTiu.js → index-Dd8HdGOL.js} +68 -65
- package/lib/assets/modules/{menuTabs-D0MJJye5.js → menuTabs-NoNLt_B5.js} +2 -2
- package/lib/assets/modules/{toolIcon-jkoAB1WI.js → toolIcon-BSjgzw0G.js} +1 -1
- package/lib/assets/modules/{uploadList-Bwj7G7OA.js → uploadList-1Zmhwr0q.js} +4 -4
- package/lib/assets/modules/{uploadList-D80ld89N.js → uploadList-B4wb8I9a.js} +279 -275
- package/lib/es/AceEditor/index.js +3 -3
- package/lib/es/BasicLayout/index.js +3 -3
- package/lib/es/Error403/index.js +1 -1
- package/lib/es/Error404/index.js +1 -1
- package/lib/es/ExcelForm/index.js +112 -113
- package/lib/es/UploadForm/index.js +4 -4
- package/lib/utils/form-excel.d.ts +2 -1
- package/lib/webui.es.js +12 -12
- package/package.json +1 -1
- package/src/components/content/dialog/excelForm.vue +12 -13
- package/src/utils/form-excel.ts +18 -8
- package/src/utils/page.ts +15 -9
|
@@ -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-BSjgzw0G.js";
|
|
4
4
|
import "@skyfox2000/fapi";
|
|
5
|
-
import "../../assets/modules/uploadList-
|
|
5
|
+
import "../../assets/modules/uploadList-B4wb8I9a.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-DHWlaZL2.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,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as y, ref as I, watch as C, onMounted as g, resolveComponent as b, createBlock as n, openBlock as o, unref as e, withCtx as l, createCommentVNode as c, createVNode as r, createElementVNode as u, createElementBlock as k, toDisplayString as w, normalizeClass as S, KeepAlive as N, resolveDynamicComponent as $ } from "vue";
|
|
2
2
|
import { Layout as f, LayoutSider as E } from "ant-design-vue";
|
|
3
|
-
import { a as z } from "../../assets/modules/toolIcon-
|
|
4
|
-
import { I as A, _ as B, f as L, d as V, g as D } from "../../assets/modules/menuTabs-
|
|
5
|
-
import { ad as j, a as K, af as M } from "../../assets/modules/uploadList-
|
|
3
|
+
import { a as z } from "../../assets/modules/toolIcon-BSjgzw0G.js";
|
|
4
|
+
import { I as A, _ as B, f as L, d as V, g as D } from "../../assets/modules/menuTabs-NoNLt_B5.js";
|
|
5
|
+
import { ad as j, a as K, af as M } from "../../assets/modules/uploadList-B4wb8I9a.js";
|
|
6
6
|
import "@skyfox2000/microbase";
|
|
7
7
|
import "@skyfox2000/fapi";
|
|
8
8
|
import P 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/uploadList-
|
|
2
|
+
import { r as s } from "../../assets/modules/uploadList-B4wb8I9a.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/uploadList-
|
|
2
|
+
import { r as s } from "../../assets/modules/uploadList-B4wb8I9a.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
|
|
2
|
-
import { _ as Y } from "../../assets/modules/index-
|
|
1
|
+
import { defineComponent as we, ref as f, computed as T, watch as W, onMounted as be, createBlock as H, openBlock as d, unref as i, 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-BRWQ6SRp.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 { E as Te, a1 as Se, a7 as Ee } from "../../assets/modules/uploadList-
|
|
6
|
-
import { A as Re, p as De, U as ce } from "../../assets/modules/file-upload-
|
|
5
|
+
import { E as Te, a1 as Se, a7 as Ee } from "../../assets/modules/uploadList-B4wb8I9a.js";
|
|
6
|
+
import { A as Re, p as De, U as ce } from "../../assets/modules/file-upload-CwyUkWwi.js";
|
|
7
7
|
import "@skyfox2000/microbase";
|
|
8
|
-
import
|
|
9
|
-
import { c as ke, _ as Z, h as Le, p as Ne, i as Ke } from "../../assets/modules/index-
|
|
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-Dd8HdGOL.js";
|
|
10
10
|
import "dayjs";
|
|
11
11
|
import "vue-draggable-next";
|
|
12
12
|
import "async-validator";
|
|
@@ -54,7 +54,7 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
54
54
|
throw new Error("不支持的文件格式");
|
|
55
55
|
}, Pe = async (l, s) => {
|
|
56
56
|
if (!l || !s)
|
|
57
|
-
return
|
|
57
|
+
return p.error("预览URL或Excel控制器未配置"), { success: !1 };
|
|
58
58
|
try {
|
|
59
59
|
let e = null;
|
|
60
60
|
if (l.method === "GET") {
|
|
@@ -82,15 +82,15 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
82
82
|
} else
|
|
83
83
|
throw new Error((e == null ? void 0 : e.msg) || "文件加载失败");
|
|
84
84
|
} catch (e) {
|
|
85
|
-
throw console.error("预览文件加载错误:", e),
|
|
85
|
+
throw console.error("预览文件加载错误:", e), p.error("文件加载失败:" + ((e == null ? void 0 : e.message) || "未知错误")), e;
|
|
86
86
|
}
|
|
87
87
|
}, $e = {
|
|
88
88
|
key: 0,
|
|
89
89
|
class: "mb-4 flex items-center"
|
|
90
|
-
},
|
|
90
|
+
}, je = {
|
|
91
91
|
key: 0,
|
|
92
92
|
class: "ml-3 text-gray-600"
|
|
93
|
-
},
|
|
93
|
+
}, Ae = { class: "flex gap-4 relative" }, Oe = {
|
|
94
94
|
key: 1,
|
|
95
95
|
class: "w-[22%] flex-grow overflow-hidden flex flex-col"
|
|
96
96
|
}, Ge = { class: "bg-gray-50 p-2 rounded border flex-grow flex flex-col" }, Ie = {
|
|
@@ -120,7 +120,7 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
120
120
|
fileType: {}
|
|
121
121
|
},
|
|
122
122
|
setup(l, { expose: s }) {
|
|
123
|
-
const e = l, a = e.excelCtrl, m =
|
|
123
|
+
const e = l, a = e.excelCtrl, m = f(!1), b = f(""), le = f([]), y = f(""), z = T(() => !!e.previewUrl), te = T(() => e.enableUpload), de = T(() => {
|
|
124
124
|
switch (e.fileType || "both") {
|
|
125
125
|
case "excel":
|
|
126
126
|
return ".xlsx,.xls";
|
|
@@ -130,7 +130,7 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
130
130
|
default:
|
|
131
131
|
return ".xlsx,.xls,.csv";
|
|
132
132
|
}
|
|
133
|
-
}), pe =
|
|
133
|
+
}), pe = T(() => {
|
|
134
134
|
switch (e.fileType || "both") {
|
|
135
135
|
case "excel":
|
|
136
136
|
return "请选择Excel文件";
|
|
@@ -140,16 +140,16 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
140
140
|
default:
|
|
141
141
|
return "请选择Excel或CSV文件";
|
|
142
142
|
}
|
|
143
|
-
}), V =
|
|
143
|
+
}), V = f("待验证数据规则"), B = f("warning"), P = f("待验证重复数据"), $ = f("warning");
|
|
144
144
|
W(
|
|
145
145
|
() => a.visible.value,
|
|
146
146
|
() => {
|
|
147
|
-
m.value = a.visible.value, m.value && (
|
|
147
|
+
m.value = a.visible.value, m.value && (A(), e.previewUrl && I());
|
|
148
148
|
}
|
|
149
149
|
), W(
|
|
150
150
|
() => m.value,
|
|
151
151
|
() => {
|
|
152
|
-
a.visible.value = m.value, m.value ||
|
|
152
|
+
a.visible.value = m.value, m.value || A();
|
|
153
153
|
}
|
|
154
154
|
), W(
|
|
155
155
|
() => e.previewUrl,
|
|
@@ -158,13 +158,13 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
158
158
|
},
|
|
159
159
|
{ deep: !0 }
|
|
160
160
|
);
|
|
161
|
-
const F =
|
|
161
|
+
const F = f(e.uploadParams), R = T(() => {
|
|
162
162
|
var t;
|
|
163
163
|
return (t = F.value) == null ? void 0 : t.uploadUrl;
|
|
164
|
-
}),
|
|
164
|
+
}), _ = T(() => {
|
|
165
165
|
var t;
|
|
166
166
|
return (t = F.value) == null ? void 0 : t.duplicateRules;
|
|
167
|
-
}), D =
|
|
167
|
+
}), D = T(() => {
|
|
168
168
|
var t;
|
|
169
169
|
return (t = F.value) == null ? void 0 : t.duplicateUrl;
|
|
170
170
|
}), I = async () => {
|
|
@@ -172,7 +172,7 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
172
172
|
a.isFormLoading.value = !0;
|
|
173
173
|
try {
|
|
174
174
|
const t = await Pe(e.previewUrl, a);
|
|
175
|
-
t.success && (
|
|
175
|
+
t.success && (b.value = t.blobUrl, y.value = t.fileName);
|
|
176
176
|
} finally {
|
|
177
177
|
setTimeout(() => {
|
|
178
178
|
a.isFormLoading.value = !1;
|
|
@@ -184,36 +184,36 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
184
184
|
F.value = e.uploadParams;
|
|
185
185
|
const t = R.value;
|
|
186
186
|
if (!t) {
|
|
187
|
-
|
|
187
|
+
p.error("未配置文件上传地址!");
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
|
-
if (
|
|
191
|
-
|
|
190
|
+
if (U.value) {
|
|
191
|
+
p.error("表格数据存在验证错误,请修正后再上传!");
|
|
192
192
|
return;
|
|
193
193
|
}
|
|
194
194
|
a.isFormSaving.value = !0;
|
|
195
195
|
try {
|
|
196
196
|
if (!L.value || !y.value) {
|
|
197
|
-
|
|
197
|
+
p.warning("请先选择文件!"), a.isFormSaving.value = !1;
|
|
198
198
|
return;
|
|
199
199
|
}
|
|
200
200
|
const r = new Re(t, 1), u = q.value || "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", n = new File([L.value], y.value, {
|
|
201
201
|
type: u
|
|
202
|
-
}),
|
|
202
|
+
}), c = De.join(((o = F.value) == null ? void 0 : o.basePath) ?? "", y.value), v = {
|
|
203
203
|
uid: "1",
|
|
204
204
|
name: y.value,
|
|
205
205
|
originFileObj: n,
|
|
206
206
|
status: ce.Uploading,
|
|
207
207
|
percent: 0,
|
|
208
208
|
params: {
|
|
209
|
-
FileKey:
|
|
209
|
+
FileKey: c
|
|
210
210
|
}
|
|
211
|
-
},
|
|
212
|
-
(await r.uploadFile(
|
|
213
|
-
|
|
214
|
-
})).status === ce.Success && (
|
|
211
|
+
}, x = new AbortController();
|
|
212
|
+
(await r.uploadFile(v, x.signal, (w) => {
|
|
213
|
+
v.percent = w;
|
|
214
|
+
})).status === ce.Success && (p.success("文件上传成功,开始业务处理!"), ye(v));
|
|
215
215
|
} catch (r) {
|
|
216
|
-
console.error("上传处理错误:", r),
|
|
216
|
+
console.error("上传处理错误:", r), p.error("上传处理失败:" + ((r == null ? void 0 : r.message) || "未知错误"));
|
|
217
217
|
} finally {
|
|
218
218
|
a.isFormSaving.value = !1;
|
|
219
219
|
}
|
|
@@ -222,16 +222,16 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
222
222
|
if (e.excelRecordsKey || e.excelRowsKey) {
|
|
223
223
|
const n = await Ne(L.value);
|
|
224
224
|
if (!n) return null;
|
|
225
|
-
const { excelData:
|
|
225
|
+
const { excelData: c, excelRows: v } = n, x = c.map((N) => {
|
|
226
226
|
var Q;
|
|
227
|
-
const
|
|
227
|
+
const w = {};
|
|
228
228
|
for (const O in N) {
|
|
229
229
|
const G = (Q = e.excelFieldMap) == null ? void 0 : Q[O];
|
|
230
|
-
G && (
|
|
230
|
+
G && (w[G] = N[O]);
|
|
231
231
|
}
|
|
232
|
-
return
|
|
232
|
+
return w;
|
|
233
233
|
});
|
|
234
|
-
e.excelRecordsKey && (a.formData.value[e.excelRecordsKey] =
|
|
234
|
+
e.excelRecordsKey && (a.formData.value[e.excelRecordsKey] = x), e.excelRowsKey && (a.formData.value[e.excelRowsKey] = v);
|
|
235
235
|
}
|
|
236
236
|
const o = e.fileField ?? "FileInfo";
|
|
237
237
|
a.formData.value[o] = t;
|
|
@@ -254,82 +254,81 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
254
254
|
});
|
|
255
255
|
(n == null ? void 0 : n.status) === fe.SUCCESS && (a.afterSave && a.afterSave(), a.visible.value = !1);
|
|
256
256
|
} catch (n) {
|
|
257
|
-
console.error("保存错误:", n),
|
|
257
|
+
console.error("保存错误:", n), p.error("数据保存失败,请稍后再试!");
|
|
258
258
|
} finally {
|
|
259
259
|
a.isFormSaving.value = !1;
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
},
|
|
262
|
+
}, U = f(!1), k = f(!1), L = f(null), q = f(""), re = async (t) => {
|
|
263
263
|
const o = e.gridCtrl;
|
|
264
264
|
if (o) {
|
|
265
265
|
F.value = e.uploadParams;
|
|
266
266
|
try {
|
|
267
267
|
D.value && (D.value.api || (D.value.api = o.page.api), D.value.authorize === void 0 && (D.value.authorize = o.page.authorize));
|
|
268
268
|
const {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
}
|
|
269
|
+
errBlob: r,
|
|
270
|
+
validationMsg: u,
|
|
271
|
+
duplicateMsg: n,
|
|
272
|
+
hasFormatError: c,
|
|
273
|
+
hasDuplicateError: v
|
|
274
|
+
} = await Ke(t, a.formRules.value, _.value, D.value);
|
|
275
|
+
if (V.value = u, P.value = n, B.value = c ? "error" : a.formRules.value && Object.keys(a.formRules.value).length > 0 ? "success" : "warning", $.value = v ? "error" : _.value && _.value.length > 0 ? "success" : "warning", r) {
|
|
276
|
+
U.value = c ?? !1, k.value = v ?? !1;
|
|
277
|
+
const x = URL.createObjectURL(r);
|
|
278
|
+
b.value = x;
|
|
280
279
|
} else
|
|
281
|
-
|
|
280
|
+
U.value = !1, k.value = !1;
|
|
282
281
|
} catch {
|
|
283
|
-
V.value = "验证异常",
|
|
282
|
+
V.value = "验证异常", P.value = "验证异常", B.value = "error", $.value = "error";
|
|
284
283
|
}
|
|
285
284
|
}
|
|
286
285
|
}, xe = async (t) => {
|
|
287
286
|
if (!e.gridCtrl) {
|
|
288
|
-
|
|
287
|
+
p.error("未配置表格控制器!");
|
|
289
288
|
return;
|
|
290
289
|
}
|
|
291
290
|
F.value = e.uploadParams;
|
|
292
291
|
const r = t.type === "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" || t.type === "application/vnd.ms-excel", u = t.type === "text/csv" || t.name.toLowerCase().endsWith(".csv"), n = e.fileType || "both";
|
|
293
|
-
let
|
|
292
|
+
let c = !1, v = "";
|
|
294
293
|
switch (n) {
|
|
295
294
|
case "excel":
|
|
296
|
-
|
|
295
|
+
c = r, v = "只能上传Excel文件!";
|
|
297
296
|
break;
|
|
298
297
|
case "csv":
|
|
299
|
-
|
|
298
|
+
c = u, v = "只能上传CSV文件!";
|
|
300
299
|
break;
|
|
301
300
|
case "both":
|
|
302
301
|
default:
|
|
303
|
-
|
|
302
|
+
c = r || u, v = "只能上传Excel文件或CSV文件!";
|
|
304
303
|
break;
|
|
305
304
|
}
|
|
306
|
-
if (!
|
|
307
|
-
return
|
|
305
|
+
if (!c)
|
|
306
|
+
return p.error(v), ue.LIST_IGNORE;
|
|
308
307
|
try {
|
|
309
|
-
if (
|
|
310
|
-
const
|
|
311
|
-
if (!
|
|
312
|
-
throw new Error(
|
|
313
|
-
const oe = await (await fetch(
|
|
314
|
-
return L.value = oe, await re(oe), !
|
|
308
|
+
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-Dd8HdGOL.js").then((he) => he.j), M = await G(O, t.name);
|
|
310
|
+
if (!M.success)
|
|
311
|
+
throw new Error(M.error || "CSV文件处理失败");
|
|
312
|
+
const oe = await (await fetch(M.blobUrl)).arrayBuffer();
|
|
313
|
+
return L.value = oe, await re(oe), !U.value && !k.value && (b.value = M.blobUrl), y.value = M.fileName, a.isFormLoading.value = !1, !1;
|
|
315
314
|
}
|
|
316
|
-
const
|
|
317
|
-
L.value =
|
|
315
|
+
const x = await t.arrayBuffer();
|
|
316
|
+
L.value = x;
|
|
318
317
|
const N = new FileReader();
|
|
319
|
-
N.readAsDataURL(t), N.onload = async (
|
|
320
|
-
|
|
318
|
+
N.readAsDataURL(t), N.onload = async (w) => {
|
|
319
|
+
w.target ? (await re(x), !U.value && !k.value && (b.value = w.target.result), a.isFormLoading.value = !1) : p.error("加载文件失败,请检查文件格式!");
|
|
321
320
|
};
|
|
322
|
-
} catch (
|
|
323
|
-
console.error("文件处理错误:",
|
|
321
|
+
} catch (x) {
|
|
322
|
+
console.error("文件处理错误:", x), p.error("文件处理失败,请检查文件格式!"), a.isFormLoading.value = !1, V.value = "文件处理错误", B.value = "error";
|
|
324
323
|
}
|
|
325
324
|
return !1;
|
|
326
|
-
},
|
|
325
|
+
}, j = Se(a.formRules.value);
|
|
327
326
|
be(() => {
|
|
328
327
|
var o;
|
|
329
328
|
const t = (o = e.gridCtrl) == null ? void 0 : o.page;
|
|
330
|
-
if (t && !
|
|
329
|
+
if (t && !z.value) {
|
|
331
330
|
if (!R.value) {
|
|
332
|
-
|
|
331
|
+
p.error("未配置文件上传地址!");
|
|
333
332
|
return;
|
|
334
333
|
}
|
|
335
334
|
R.value.api || (R.value.api = t.api), R.value.authorize === void 0 && (R.value.authorize = t.authorize);
|
|
@@ -338,8 +337,8 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
338
337
|
}
|
|
339
338
|
m.value = a.visible.value, m.value && e.previewUrl && I();
|
|
340
339
|
});
|
|
341
|
-
const
|
|
342
|
-
if (
|
|
340
|
+
const A = () => {
|
|
341
|
+
if (b.value = "", y.value = "", le.value = [], L.value = null, q.value = "", a.isFormLoading.value = !1, V.value = "待验证数据规则", B.value = "warning", P.value = "待验证重复数据", $.value = "warning", U.value = !1, k.value = !1, a.formData.value) {
|
|
343
342
|
const t = e.fileField ?? "FileInfo", o = e.excelRecordsKey, r = e.excelRowsKey;
|
|
344
343
|
delete a.formData.value[t], o && delete a.formData.value[o], r && delete a.formData.value[r];
|
|
345
344
|
}
|
|
@@ -348,8 +347,8 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
348
347
|
}, ge = () => {
|
|
349
348
|
};
|
|
350
349
|
return s({
|
|
351
|
-
clearAll:
|
|
352
|
-
}), (t, o) => (
|
|
350
|
+
clearAll: A
|
|
351
|
+
}), (t, o) => (d(), H(i(Fe), {
|
|
353
352
|
title: t.title ?? "文件上传",
|
|
354
353
|
open: m.value,
|
|
355
354
|
"onUpdate:open": o[0] || (o[0] = (r) => m.value = r),
|
|
@@ -357,26 +356,26 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
357
356
|
width: 940,
|
|
358
357
|
onClose: se
|
|
359
358
|
}, {
|
|
360
|
-
footer:
|
|
359
|
+
footer: S(() => [
|
|
361
360
|
C(i(_e), null, {
|
|
362
|
-
default:
|
|
361
|
+
default: S(() => {
|
|
363
362
|
var r;
|
|
364
363
|
return [
|
|
365
364
|
C(i(Y), { onClick: se }, {
|
|
366
|
-
default:
|
|
367
|
-
X(
|
|
365
|
+
default: S(() => [
|
|
366
|
+
X(E(t.cancelText ?? (z.value ? "关闭" : "取消")), 1)
|
|
368
367
|
]),
|
|
369
368
|
_: 1
|
|
370
369
|
}),
|
|
371
|
-
|
|
370
|
+
z.value ? K("", !0) : (d(), H(i(Y), {
|
|
372
371
|
key: 0,
|
|
373
372
|
onClick: me,
|
|
374
373
|
type: "primary",
|
|
375
374
|
loading: ((r = i(a)) == null ? void 0 : r.isFormSaving.value) ?? !1,
|
|
376
|
-
disabled: !
|
|
375
|
+
disabled: !b.value || U.value || k.value || i(a).isFormLoading.value
|
|
377
376
|
}, {
|
|
378
|
-
default:
|
|
379
|
-
X(
|
|
377
|
+
default: S(() => [
|
|
378
|
+
X(E(t.saveText ?? "上传文件"), 1)
|
|
380
379
|
]),
|
|
381
380
|
_: 1
|
|
382
381
|
}, 8, ["loading", "disabled"]))
|
|
@@ -385,9 +384,9 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
385
384
|
_: 1
|
|
386
385
|
})
|
|
387
386
|
]),
|
|
388
|
-
default:
|
|
387
|
+
default: S(() => [
|
|
389
388
|
J(t.$slots, "default"),
|
|
390
|
-
|
|
389
|
+
z.value ? K("", !0) : (d(), g("div", $e, [
|
|
391
390
|
J(t.$slots, "file-before"),
|
|
392
391
|
C(i(ue), {
|
|
393
392
|
"file-list": le.value,
|
|
@@ -396,20 +395,20 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
396
395
|
showUploadList: !0,
|
|
397
396
|
disabled: !te.value
|
|
398
397
|
}, {
|
|
399
|
-
default:
|
|
398
|
+
default: S(() => [
|
|
400
399
|
C(i(Y), {
|
|
401
400
|
type: "primary",
|
|
402
401
|
disabled: !te.value
|
|
403
402
|
}, {
|
|
404
|
-
default:
|
|
405
|
-
X(
|
|
403
|
+
default: S(() => [
|
|
404
|
+
X(E(pe.value), 1)
|
|
406
405
|
]),
|
|
407
406
|
_: 1
|
|
408
407
|
}, 8, ["disabled"])
|
|
409
408
|
]),
|
|
410
409
|
_: 1
|
|
411
410
|
}, 8, ["file-list", "accept", "disabled"]),
|
|
412
|
-
|
|
411
|
+
b.value && y.value ? (d(), g("div", je, [
|
|
413
412
|
C(i(Z), {
|
|
414
413
|
message: y.value,
|
|
415
414
|
type: "info",
|
|
@@ -418,17 +417,17 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
418
417
|
])) : K("", !0),
|
|
419
418
|
J(t.$slots, "file-after")
|
|
420
419
|
])),
|
|
421
|
-
|
|
422
|
-
i(a).isFormLoading.value ? (
|
|
420
|
+
h("div", Ae, [
|
|
421
|
+
i(a).isFormLoading.value ? (d(), H(i(Le), {
|
|
423
422
|
key: 0,
|
|
424
423
|
size: "large"
|
|
425
424
|
})) : K("", !0),
|
|
426
|
-
|
|
427
|
-
class: Ce(["flex-shrink-0 relative border border-gray-200 rounded-md overflow-hidden", [i(
|
|
425
|
+
h("div", {
|
|
426
|
+
class: Ce(["flex-shrink-0 relative border border-gray-200 rounded-md overflow-hidden", [i(j).length === 0 ? "w-[100%]" : "w-[80%]"]]),
|
|
428
427
|
style: { height: "430px" }
|
|
429
428
|
}, [
|
|
430
429
|
C(i(Ve), {
|
|
431
|
-
src:
|
|
430
|
+
src: b.value,
|
|
432
431
|
onError: ge,
|
|
433
432
|
style: { width: "100%", height: "100%" },
|
|
434
433
|
options: {
|
|
@@ -441,40 +440,40 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
441
440
|
}
|
|
442
441
|
}, null, 8, ["src"])
|
|
443
442
|
], 2),
|
|
444
|
-
i(
|
|
445
|
-
|
|
446
|
-
i(
|
|
443
|
+
i(j).length > 0 ? (d(), g("div", Oe, [
|
|
444
|
+
h("div", Ge, [
|
|
445
|
+
i(j).length === 0 ? (d(), g("div", Ie, "没有设置验证规则")) : (d(), g("div", qe, [
|
|
447
446
|
C(i(Z), {
|
|
448
447
|
message: V.value,
|
|
449
|
-
type:
|
|
448
|
+
type: B.value,
|
|
450
449
|
"show-icon": "",
|
|
451
450
|
class: "mb-2"
|
|
452
451
|
}, null, 8, ["message", "type"]),
|
|
453
|
-
|
|
454
|
-
(
|
|
452
|
+
h("div", Qe, [
|
|
453
|
+
(d(!0), g(ie, null, ne(i(j), (r, u) => (d(), g("div", {
|
|
455
454
|
key: u,
|
|
456
455
|
class: "border-b pb-0"
|
|
457
456
|
}, [
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
(
|
|
461
|
-
key:
|
|
457
|
+
h("div", We, E(r.field), 1),
|
|
458
|
+
h("ul", He, [
|
|
459
|
+
(d(!0), g(ie, null, ne(r.rules, (n, c) => (d(), g("li", {
|
|
460
|
+
key: c,
|
|
462
461
|
class: "text-[12px] text-gray-600"
|
|
463
|
-
},
|
|
462
|
+
}, E(n), 1))), 128))
|
|
464
463
|
])
|
|
465
464
|
]))), 128))
|
|
466
465
|
]),
|
|
467
|
-
|
|
466
|
+
_.value && _.value.length > 0 ? (d(), g("div", Je, [
|
|
468
467
|
C(i(Z), {
|
|
469
|
-
message:
|
|
470
|
-
type:
|
|
468
|
+
message: P.value,
|
|
469
|
+
type: $.value,
|
|
471
470
|
"show-icon": "",
|
|
472
471
|
class: "mt-2 mb-2"
|
|
473
472
|
}, null, 8, ["message", "type"]),
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
473
|
+
h("div", Xe, [
|
|
474
|
+
h("div", Ye, " 以下" + E(_.value.length > 1 ? "组合" : "字段") + "必须唯一 ", 1),
|
|
475
|
+
h("ul", Ze, [
|
|
476
|
+
h("li", ea, E(_.value.join(", ")), 1)
|
|
478
477
|
])
|
|
479
478
|
])
|
|
480
479
|
])) : K("", !0)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as y, ref as f, watch as S, onMounted as z, createBlock as D, openBlock as F, unref as u, withCtx as s, createVNode as m, createTextVNode as C } from "vue";
|
|
2
|
-
import { _ as c } from "../../assets/modules/index-
|
|
2
|
+
import { _ as c } from "../../assets/modules/index-BRWQ6SRp.js";
|
|
3
3
|
import { Modal as _, Space as k } from "ant-design-vue";
|
|
4
4
|
import { ResStatus as E } from "@skyfox2000/fapi";
|
|
5
|
-
import { a3 as h } from "../../assets/modules/uploadList-
|
|
5
|
+
import { a3 as h } from "../../assets/modules/uploadList-B4wb8I9a.js";
|
|
6
6
|
import "@skyfox2000/microbase";
|
|
7
7
|
import L from "vue-m-message";
|
|
8
8
|
import "async-validator";
|
|
9
9
|
import "dayjs";
|
|
10
|
-
import { A as N } from "../../assets/modules/file-upload-
|
|
10
|
+
import { A as N } from "../../assets/modules/file-upload-CwyUkWwi.js";
|
|
11
11
|
import "vue-draggable-next";
|
|
12
|
-
import { U as B } from "../../assets/modules/uploadList-
|
|
12
|
+
import { U as B } from "../../assets/modules/uploadList-1Zmhwr0q.js";
|
|
13
13
|
const K = /* @__PURE__ */ y({
|
|
14
14
|
__name: "uploadForm",
|
|
15
15
|
props: {
|
|
@@ -27,9 +27,10 @@ export declare const checkExcelDuplicates: (excelBuffer: ArrayBuffer, duplicateR
|
|
|
27
27
|
markHeaders?: string[];
|
|
28
28
|
}>;
|
|
29
29
|
export declare const validateExcelUnified: (excelBuffer: ArrayBuffer, rules?: Record<string, ValidateRule>, duplicateRules?: string[], duplicateUrl?: IUrlInfo) => Promise<{
|
|
30
|
-
hasError: boolean;
|
|
31
30
|
errBlob?: Blob;
|
|
32
31
|
validationMsg: string;
|
|
33
32
|
duplicateMsg: string;
|
|
33
|
+
hasFormatError?: boolean;
|
|
34
|
+
hasDuplicateError?: boolean;
|
|
34
35
|
}>;
|
|
35
36
|
export declare const appendExcelData: (fileInfo: UploadFile, fileData: Record<string, any>, fields?: string[]) => Promise<void>;
|
package/lib/webui.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { u as Je, i as Z, a as ve, c as Xe, P as H, o as Ee, b as Ze, d as ea, e as Pe, r as ce, f as aa, g as ta, h as Fe, j as la, k as ke, l as sa, _ as ra, m as oa, O as Ne, q as Me, n as na, p as ia, s as L, t as ca, v as ua, w as da, x as pa, y as fa, z as va, A as Q, B as ma, C as ha, D as ga, E as Re } from "./assets/modules/uploadList-
|
|
2
|
-
import { a9 as Sl, N as Cl, Q as Tl, U as $l, a8 as Il, a6 as Dl, a7 as El, aa as Pl, X as Fl, S as Nl, a4 as Ml, a1 as Rl, L as Bl, a3 as Al, T as Ol, G as Ll, Z as zl, a2 as Ul, a5 as Vl, M as Yl, R as Kl, ab as Wl, F as Hl, a0 as jl, ac as Ql, W as ql, Y as Gl, V as Jl, ad as Xl, H as Zl, I as es, ae as as, K as ts, af as ls, J as ss, $ as rs } from "./assets/modules/uploadList-
|
|
3
|
-
import { A as ns, U as is, a as cs, g as us, c as ds, d as ps, p as fs, u as vs, b as ms } from "./assets/modules/file-upload-
|
|
1
|
+
import { u as Je, i as Z, a as ve, c as Xe, P as H, o as Ee, b as Ze, d as ea, e as Pe, r as ce, f as aa, g as ta, h as Fe, j as la, k as ke, l as sa, _ as ra, m as oa, O as Ne, q as Me, n as na, p as ia, s as L, t as ca, v as ua, w as da, x as pa, y as fa, z as va, A as Q, B as ma, C as ha, D as ga, E as Re } from "./assets/modules/uploadList-B4wb8I9a.js";
|
|
2
|
+
import { a9 as Sl, N as Cl, Q as Tl, U as $l, a8 as Il, a6 as Dl, a7 as El, aa as Pl, X as Fl, S as Nl, a4 as Ml, a1 as Rl, L as Bl, a3 as Al, T as Ol, G as Ll, Z as zl, a2 as Ul, a5 as Vl, M as Yl, R as Kl, ab as Wl, F as Hl, a0 as jl, ac as Ql, W as ql, Y as Gl, V as Jl, ad as Xl, H as Zl, I as es, ae as as, K as ts, af as ls, J as ss, $ as rs } from "./assets/modules/uploadList-B4wb8I9a.js";
|
|
3
|
+
import { A as ns, U as is, a as cs, g as us, c as ds, d as ps, p as fs, u as vs, b as ms } from "./assets/modules/file-upload-CwyUkWwi.js";
|
|
4
4
|
import { EnvConfig as we } from "@skyfox2000/microbase";
|
|
5
5
|
import { FrontCache as re, httpPost as Be, ResStatus as Ae, SERVER_HOST as ba, fieldMapping as oe } from "@skyfox2000/fapi";
|
|
6
6
|
import me from "vue-m-message";
|
|
@@ -9,15 +9,15 @@ import "async-validator";
|
|
|
9
9
|
import pe from "dayjs";
|
|
10
10
|
import { Popover as Sa, theme as Le, Drawer as Ca, Space as te, Form as ze, message as Ta, FormItem as Ue, ConfigProvider as Ce, Popconfirm as $a, Button as Ve, DropdownButton as Ia, Menu as be, MenuItem as xe, Dropdown as fe, Checkbox as Da, Table as Ye, Tree as Ea, Cascader as Pa, DatePicker as Fa, Input as ee, InputPassword as Na, InputNumber as Ma, RangePicker as Ra, Textarea as Ba, Transfer as Aa, TreeSelect as Oa, LayoutContent as La } from "ant-design-vue";
|
|
11
11
|
import { VueDraggableNext as za } from "vue-draggable-next";
|
|
12
|
-
import { d as Ke } from "./assets/modules/uploadList-
|
|
13
|
-
import { C as gs, U as bs, a as xs, p as _s } from "./assets/modules/uploadList-
|
|
14
|
-
import { c as We } from "./assets/modules/index-
|
|
15
|
-
import { _ as ks, h as ws, b as Ss, a as Cs, d as Ts, e as $s, g as Is, f as Ds, n as Es, p as Ps, t as Fs, v as Ns } from "./assets/modules/index-
|
|
16
|
-
import { _ as O } from "./assets/modules/index-
|
|
17
|
-
import { _ as U } from "./assets/modules/toolIcon-
|
|
18
|
-
import { a as Rs } from "./assets/modules/toolIcon-
|
|
19
|
-
import { _ as As, b as Os, c as Ls, d as zs, e as Us, I as Vs, f as Ys, g as Ks, a as Ws } from "./assets/modules/menuTabs-
|
|
20
|
-
import { _ as js } from "./assets/modules/index-
|
|
12
|
+
import { d as Ke } from "./assets/modules/uploadList-1Zmhwr0q.js";
|
|
13
|
+
import { C as gs, U as bs, a as xs, p as _s } from "./assets/modules/uploadList-1Zmhwr0q.js";
|
|
14
|
+
import { c as We } from "./assets/modules/index-Dd8HdGOL.js";
|
|
15
|
+
import { _ as ks, h as ws, b as Ss, a as Cs, d as Ts, e as $s, g as Is, f as Ds, n as Es, p as Ps, t as Fs, v as Ns } from "./assets/modules/index-Dd8HdGOL.js";
|
|
16
|
+
import { _ as O } from "./assets/modules/index-BRWQ6SRp.js";
|
|
17
|
+
import { _ as U } from "./assets/modules/toolIcon-BSjgzw0G.js";
|
|
18
|
+
import { a as Rs } from "./assets/modules/toolIcon-BSjgzw0G.js";
|
|
19
|
+
import { _ as As, b as Os, c as Ls, d as zs, e as Us, I as Vs, f as Ys, g as Ks, a as Ws } from "./assets/modules/menuTabs-NoNLt_B5.js";
|
|
20
|
+
import { _ as js } from "./assets/modules/index-DHWlaZL2.js";
|
|
21
21
|
import { _ as q } from "./assets/modules/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
22
22
|
const Te = (s, a, e, t = "remove") => {
|
|
23
23
|
if (!e)
|