@skyfox2000/webui 1.3.7 → 1.3.8
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-CKliLHBF.js → file-upload-D7ysapQL.js} +1 -1
- package/lib/assets/modules/{index-Cm_1mhHh.js → index-BiXvleeT.js} +2 -2
- package/lib/assets/modules/{index-DTFrhJdN.js → index-_foSmXoy.js} +1 -1
- package/lib/assets/modules/{index-CTOX9glc.js → index-tow3C94d.js} +2 -2
- package/lib/assets/modules/{menuTabs-ylnnzjNu.js → menuTabs-CmB2d0Wh.js} +2 -2
- package/lib/assets/modules/{toolIcon-CNfvNkNh.js → toolIcon-IR6jQE0h.js} +1 -1
- package/lib/assets/modules/{uploadList-DroJGtBI.js → uploadList-BNx4hnQX.js} +4 -4
- package/lib/assets/modules/{uploadList-M21hxVQy.js → uploadList-DoiSzbHZ.js} +525 -513
- 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 +100 -100
- package/lib/es/UploadForm/index.js +4 -4
- package/lib/webui.css +1 -1
- package/lib/webui.es.js +14 -14
- package/package.json +1 -1
- package/src/components/content/dialog/excelForm.vue +0 -3
- package/src/components/form/autoComplete/index.vue +3 -10
- package/src/components/form/select/index.vue +48 -24
|
@@ -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-IR6jQE0h.js";
|
|
4
4
|
import "@skyfox2000/fapi";
|
|
5
|
-
import "../../assets/modules/uploadList-
|
|
5
|
+
import "../../assets/modules/uploadList-DoiSzbHZ.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-tow3C94d.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-IR6jQE0h.js";
|
|
4
|
+
import { I as A, _ as B, f as L, d as V, g as D } from "../../assets/modules/menuTabs-CmB2d0Wh.js";
|
|
5
|
+
import { ad as j, a as K, af as M } from "../../assets/modules/uploadList-DoiSzbHZ.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-DoiSzbHZ.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-DoiSzbHZ.js";
|
|
3
3
|
import "@skyfox2000/microbase";
|
|
4
4
|
import "@skyfox2000/fapi";
|
|
5
5
|
import "vue-m-message";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as we, ref as
|
|
2
|
-
import { _ as Y } from "../../assets/modules/index-
|
|
3
|
-
import { Modal as Fe, Upload as
|
|
1
|
+
import { defineComponent as we, ref as c, computed as U, watch as W, onMounted as be, createBlock as H, openBlock as v, unref as i, withCtx as T, renderSlot as J, createElementBlock as x, createCommentVNode as K, createElementVNode as g, createVNode as C, createTextVNode as X, toDisplayString as S, normalizeClass as Ce, Fragment as ie, renderList as ne } from "vue";
|
|
2
|
+
import { _ as Y } from "../../assets/modules/index-_foSmXoy.js";
|
|
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
|
|
5
|
+
import { E as Te, a1 as Se, a7 as Ee } from "../../assets/modules/uploadList-DoiSzbHZ.js";
|
|
6
|
+
import { A as Re, p as De, U as ce } from "../../assets/modules/file-upload-D7ysapQL.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 f from "vue-m-message";
|
|
9
|
+
import { c as ke, _ as Z, h as Le, p as Ne, i as Ke } from "../../assets/modules/index-BiXvleeT.js";
|
|
10
10
|
import "dayjs";
|
|
11
11
|
import "vue-draggable-next";
|
|
12
12
|
import "async-validator";
|
|
13
13
|
import Ve from "@vue-office/excel";
|
|
14
14
|
const Be = (l) => l.includes(",") || l.includes(`
|
|
15
|
-
`), Me = (l,
|
|
16
|
-
const e = await ke(l,
|
|
15
|
+
`), Me = (l, s) => l === "text/csv" || (s == null ? void 0 : s.toLowerCase().includes(".csv")) || !1, ze = (l, s) => l === "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" || l === "application/vnd.ms-excel" || (s == null ? void 0 : s.toLowerCase().match(/\.(xlsx|xls)$/)) !== null, ee = async (l, s = "preview.csv") => {
|
|
16
|
+
const e = await ke(l, s);
|
|
17
17
|
if (e.success)
|
|
18
18
|
return {
|
|
19
19
|
success: !0,
|
|
@@ -21,12 +21,12 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
21
21
|
fileName: e.fileName
|
|
22
22
|
};
|
|
23
23
|
throw new Error(e.error || "CSV格式处理失败");
|
|
24
|
-
}, ae = (l,
|
|
24
|
+
}, ae = (l, s, e = "预览文件.xlsx") => ({
|
|
25
25
|
success: !0,
|
|
26
|
-
blobUrl: `data:${
|
|
26
|
+
blobUrl: `data:${s || "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};base64,${l}`,
|
|
27
27
|
fileName: e
|
|
28
|
-
}), ve = async (l,
|
|
29
|
-
if (
|
|
28
|
+
}), ve = async (l, s = !1) => {
|
|
29
|
+
if (s) {
|
|
30
30
|
if (typeof l == "string")
|
|
31
31
|
return Be(l) ? await ee(l) : ae(l);
|
|
32
32
|
if (l instanceof ArrayBuffer || l instanceof Uint8Array) {
|
|
@@ -52,22 +52,22 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
52
52
|
if (typeof l == "string")
|
|
53
53
|
return await ee(l);
|
|
54
54
|
throw new Error("不支持的文件格式");
|
|
55
|
-
}, Pe = async (l,
|
|
56
|
-
if (!l || !
|
|
57
|
-
return
|
|
55
|
+
}, Pe = async (l, s) => {
|
|
56
|
+
if (!l || !s)
|
|
57
|
+
return f.error("预览URL或Excel控制器未配置"), { success: !1 };
|
|
58
58
|
try {
|
|
59
59
|
let e = null;
|
|
60
60
|
if (l.method === "GET") {
|
|
61
61
|
const a = {
|
|
62
62
|
...l,
|
|
63
63
|
method: "GET",
|
|
64
|
-
api: l.api ||
|
|
65
|
-
authorize: l.authorize ??
|
|
64
|
+
api: l.api || s.page.api,
|
|
65
|
+
authorize: l.authorize ?? s.page.authorize
|
|
66
66
|
};
|
|
67
67
|
e = await Ue(a);
|
|
68
68
|
} else {
|
|
69
69
|
const a = l.params;
|
|
70
|
-
e = await Te(
|
|
70
|
+
e = await Te(s, {
|
|
71
71
|
url: l,
|
|
72
72
|
urlKey: "preview",
|
|
73
73
|
params: a,
|
|
@@ -82,7 +82,7 @@ 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), f.error("文件加载失败:" + ((e == null ? void 0 : e.message) || "未知错误")), e;
|
|
86
86
|
}
|
|
87
87
|
}, $e = {
|
|
88
88
|
key: 0,
|
|
@@ -119,8 +119,8 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
119
119
|
previewUrl: {},
|
|
120
120
|
fileType: {}
|
|
121
121
|
},
|
|
122
|
-
setup(l, { expose:
|
|
123
|
-
const e = l, a = e.excelCtrl, m =
|
|
122
|
+
setup(l, { expose: s }) {
|
|
123
|
+
const e = l, a = e.excelCtrl, m = c(!1), w = c(""), le = c([]), y = c(""), P = U(() => !!e.previewUrl), te = U(() => e.enableUpload), de = U(() => {
|
|
124
124
|
switch (e.fileType || "both") {
|
|
125
125
|
case "excel":
|
|
126
126
|
return ".xlsx,.xls";
|
|
@@ -140,7 +140,7 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
140
140
|
default:
|
|
141
141
|
return "请选择Excel或CSV文件";
|
|
142
142
|
}
|
|
143
|
-
}), V =
|
|
143
|
+
}), V = c("待验证数据规则"), E = c("warning"), $ = c("待验证重复数据"), B = c("warning");
|
|
144
144
|
W(
|
|
145
145
|
() => a.visible.value,
|
|
146
146
|
() => {
|
|
@@ -158,7 +158,7 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
158
158
|
},
|
|
159
159
|
{ deep: !0 }
|
|
160
160
|
);
|
|
161
|
-
const F =
|
|
161
|
+
const F = c(e.uploadParams), R = U(() => {
|
|
162
162
|
var t;
|
|
163
163
|
return (t = F.value) == null ? void 0 : t.uploadUrl;
|
|
164
164
|
}), M = U(() => {
|
|
@@ -180,49 +180,49 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
}, me = async () => {
|
|
183
|
-
var
|
|
183
|
+
var o;
|
|
184
184
|
F.value = e.uploadParams;
|
|
185
185
|
const t = R.value;
|
|
186
186
|
if (!t) {
|
|
187
|
-
|
|
187
|
+
f.error("未配置文件上传地址!");
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
190
|
if (_.value) {
|
|
191
|
-
|
|
191
|
+
f.error("表格数据存在验证错误,请修正后再上传!");
|
|
192
192
|
return;
|
|
193
193
|
}
|
|
194
194
|
a.isFormSaving.value = !0;
|
|
195
195
|
try {
|
|
196
196
|
if (!L.value || !y.value) {
|
|
197
|
-
|
|
197
|
+
f.warning("请先选择文件!"), a.isFormSaving.value = !1;
|
|
198
198
|
return;
|
|
199
199
|
}
|
|
200
|
-
const
|
|
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
|
-
}), d = De.join(((
|
|
202
|
+
}), d = De.join(((o = F.value) == null ? void 0 : o.basePath) ?? "", y.value), p = {
|
|
203
203
|
uid: "1",
|
|
204
204
|
name: y.value,
|
|
205
|
-
originFileObj:
|
|
206
|
-
status:
|
|
205
|
+
originFileObj: n,
|
|
206
|
+
status: ce.Uploading,
|
|
207
207
|
percent: 0,
|
|
208
208
|
params: {
|
|
209
209
|
FileKey: d
|
|
210
210
|
}
|
|
211
211
|
}, b = new AbortController();
|
|
212
|
-
(await
|
|
212
|
+
(await r.uploadFile(p, b.signal, (h) => {
|
|
213
213
|
p.percent = h;
|
|
214
|
-
})).status ===
|
|
215
|
-
} catch (
|
|
216
|
-
console.error("上传处理错误:",
|
|
214
|
+
})).status === ce.Success && (f.success("文件上传成功,开始业务处理!"), ye(p));
|
|
215
|
+
} catch (r) {
|
|
216
|
+
console.error("上传处理错误:", r), f.error("上传处理失败:" + ((r == null ? void 0 : r.message) || "未知错误"));
|
|
217
217
|
} finally {
|
|
218
218
|
a.isFormSaving.value = !1;
|
|
219
219
|
}
|
|
220
220
|
}, ye = async (t) => {
|
|
221
221
|
if (a.formData.value) {
|
|
222
222
|
if (e.excelRecordsKey || e.excelRowsKey) {
|
|
223
|
-
const
|
|
224
|
-
if (!
|
|
225
|
-
const { excelData: d, excelRows: p } =
|
|
223
|
+
const n = await Ne(L.value);
|
|
224
|
+
if (!n) return null;
|
|
225
|
+
const { excelData: d, excelRows: p } = n, b = d.map((N) => {
|
|
226
226
|
var Q;
|
|
227
227
|
const h = {};
|
|
228
228
|
for (const O in N) {
|
|
@@ -233,45 +233,45 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
233
233
|
});
|
|
234
234
|
e.excelRecordsKey && (a.formData.value[e.excelRecordsKey] = b), e.excelRowsKey && (a.formData.value[e.excelRowsKey] = p);
|
|
235
235
|
}
|
|
236
|
-
const
|
|
237
|
-
a.formData.value[
|
|
238
|
-
const
|
|
239
|
-
a.primaryKey && a.formData.value[a.primaryKey] !== void 0 && (
|
|
236
|
+
const o = e.fileField ?? "FileInfo";
|
|
237
|
+
a.formData.value[o] = t;
|
|
238
|
+
const r = {};
|
|
239
|
+
a.primaryKey && a.formData.value[a.primaryKey] !== void 0 && (r[a.primaryKey] = a.formData.value[a.primaryKey]);
|
|
240
240
|
const u = {
|
|
241
241
|
Data: {
|
|
242
242
|
...a.formData.value
|
|
243
243
|
},
|
|
244
|
-
Query:
|
|
244
|
+
Query: r
|
|
245
245
|
};
|
|
246
246
|
if (a.beforeSave && a.beforeSave(u) === !1)
|
|
247
247
|
return;
|
|
248
248
|
a.isFormSaving.value = !0;
|
|
249
249
|
try {
|
|
250
|
-
const
|
|
250
|
+
const n = await Ee(e.excelCtrl, {
|
|
251
251
|
params: u,
|
|
252
252
|
urlKey: "save",
|
|
253
253
|
url: e.excelCtrl.saveUrl
|
|
254
254
|
});
|
|
255
|
-
(
|
|
256
|
-
} catch (
|
|
257
|
-
console.error("保存错误:",
|
|
255
|
+
(n == null ? void 0 : n.status) === fe.SUCCESS && (a.afterSave && a.afterSave(), a.visible.value = !1);
|
|
256
|
+
} catch (n) {
|
|
257
|
+
console.error("保存错误:", n), f.error("数据保存失败,请稍后再试!");
|
|
258
258
|
} finally {
|
|
259
259
|
a.isFormSaving.value = !1;
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
}, _ =
|
|
263
|
-
const
|
|
264
|
-
if (
|
|
262
|
+
}, _ = c(!1), k = c(!1), L = c(null), q = c(""), re = async (t) => {
|
|
263
|
+
const o = e.gridCtrl;
|
|
264
|
+
if (o) {
|
|
265
265
|
F.value = e.uploadParams;
|
|
266
266
|
try {
|
|
267
|
-
D.value && (D.value.api || (D.value.api =
|
|
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
|
-
hasError:
|
|
269
|
+
hasError: r,
|
|
270
270
|
errBlob: u,
|
|
271
|
-
validationMsg:
|
|
271
|
+
validationMsg: n,
|
|
272
272
|
duplicateMsg: d
|
|
273
273
|
} = await Ke(t, a.formRules.value, M.value, D.value);
|
|
274
|
-
if (V.value =
|
|
274
|
+
if (V.value = n, $.value = d, r) {
|
|
275
275
|
if (u) {
|
|
276
276
|
_.value = !0, k.value = !0, E.value = "error", B.value = "error";
|
|
277
277
|
const p = URL.createObjectURL(u);
|
|
@@ -285,95 +285,95 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
285
285
|
}
|
|
286
286
|
}, xe = async (t) => {
|
|
287
287
|
if (!e.gridCtrl) {
|
|
288
|
-
|
|
288
|
+
f.error("未配置表格控制器!");
|
|
289
289
|
return;
|
|
290
290
|
}
|
|
291
291
|
F.value = e.uploadParams;
|
|
292
|
-
const
|
|
292
|
+
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
293
|
let d = !1, p = "";
|
|
294
|
-
switch (
|
|
294
|
+
switch (n) {
|
|
295
295
|
case "excel":
|
|
296
|
-
d =
|
|
296
|
+
d = r, p = "只能上传Excel文件!";
|
|
297
297
|
break;
|
|
298
298
|
case "csv":
|
|
299
299
|
d = u, p = "只能上传CSV文件!";
|
|
300
300
|
break;
|
|
301
301
|
case "both":
|
|
302
302
|
default:
|
|
303
|
-
d =
|
|
303
|
+
d = r || u, p = "只能上传Excel文件或CSV文件!";
|
|
304
304
|
break;
|
|
305
305
|
}
|
|
306
306
|
if (!d)
|
|
307
|
-
return
|
|
307
|
+
return f.error(p), ue.LIST_IGNORE;
|
|
308
308
|
try {
|
|
309
309
|
if (j(), y.value = t.name, q.value = u ? "text/csv" : "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", u) {
|
|
310
|
-
const h = await t.arrayBuffer(), O = new TextDecoder("utf-8").decode(h), { csvToExcelView: G } = await import("../../assets/modules/index-
|
|
310
|
+
const h = await t.arrayBuffer(), O = new TextDecoder("utf-8").decode(h), { csvToExcelView: G } = await import("../../assets/modules/index-BiXvleeT.js").then((he) => he.j), z = await G(O, t.name);
|
|
311
311
|
if (!z.success)
|
|
312
312
|
throw new Error(z.error || "CSV文件处理失败");
|
|
313
313
|
const oe = await (await fetch(z.blobUrl)).arrayBuffer();
|
|
314
|
-
return L.value = oe, await
|
|
314
|
+
return L.value = oe, await re(oe), !_.value && !k.value && (w.value = z.blobUrl), y.value = z.fileName, a.isFormLoading.value = !1, !1;
|
|
315
315
|
}
|
|
316
316
|
const b = await t.arrayBuffer();
|
|
317
317
|
L.value = b;
|
|
318
318
|
const N = new FileReader();
|
|
319
319
|
N.readAsDataURL(t), N.onload = async (h) => {
|
|
320
|
-
h.target ? (await
|
|
320
|
+
h.target ? (await re(b), !_.value && !k.value && (w.value = h.target.result), a.isFormLoading.value = !1) : f.error("加载文件失败,请检查文件格式!");
|
|
321
321
|
};
|
|
322
322
|
} catch (b) {
|
|
323
|
-
console.error("文件处理错误:", b),
|
|
323
|
+
console.error("文件处理错误:", b), f.error("文件处理失败,请检查文件格式!"), a.isFormLoading.value = !1, V.value = "文件处理错误", E.value = "error";
|
|
324
324
|
}
|
|
325
325
|
return !1;
|
|
326
326
|
}, A = Se(a.formRules.value);
|
|
327
327
|
be(() => {
|
|
328
|
-
var
|
|
329
|
-
const t = (
|
|
328
|
+
var o;
|
|
329
|
+
const t = (o = e.gridCtrl) == null ? void 0 : o.page;
|
|
330
330
|
if (t && !P.value) {
|
|
331
331
|
if (!R.value) {
|
|
332
|
-
|
|
332
|
+
f.error("未配置文件上传地址!");
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
335
|
R.value.api || (R.value.api = t.api), R.value.authorize === void 0 && (R.value.authorize = t.authorize);
|
|
336
|
-
for (const
|
|
337
|
-
e.gridCtrl.rowData.value && (a.formData.value[
|
|
336
|
+
for (const r in a.formData.value)
|
|
337
|
+
e.gridCtrl.rowData.value && (a.formData.value[r] = e.gridCtrl.rowData.value[r]);
|
|
338
338
|
}
|
|
339
339
|
m.value = a.visible.value, m.value && e.previewUrl && I();
|
|
340
340
|
});
|
|
341
341
|
const j = () => {
|
|
342
342
|
if (w.value = "", y.value = "", le.value = [], L.value = null, q.value = "", a.isFormLoading.value = !1, V.value = "待验证数据规则", E.value = "warning", $.value = "待验证重复数据", B.value = "warning", _.value = !1, k.value = !1, a.formData.value) {
|
|
343
|
-
const t = e.fileField ?? "FileInfo",
|
|
344
|
-
delete a.formData.value[t],
|
|
343
|
+
const t = e.fileField ?? "FileInfo", o = e.excelRecordsKey, r = e.excelRowsKey;
|
|
344
|
+
delete a.formData.value[t], o && delete a.formData.value[o], r && delete a.formData.value[r];
|
|
345
345
|
}
|
|
346
|
-
},
|
|
346
|
+
}, se = () => {
|
|
347
347
|
a.visible.value = !1;
|
|
348
348
|
}, ge = () => {
|
|
349
349
|
};
|
|
350
|
-
return
|
|
350
|
+
return s({
|
|
351
351
|
clearAll: j
|
|
352
|
-
}), (t,
|
|
352
|
+
}), (t, o) => (v(), H(i(Fe), {
|
|
353
353
|
title: t.title ?? "文件上传",
|
|
354
354
|
open: m.value,
|
|
355
|
-
"onUpdate:open":
|
|
355
|
+
"onUpdate:open": o[0] || (o[0] = (r) => m.value = r),
|
|
356
356
|
wrapClassName: ["modal", "mx-auto", t.$attrs.width ? "w-[" + t.$attrs.width + "]" : ""].join(" "),
|
|
357
357
|
width: 940,
|
|
358
|
-
onClose:
|
|
358
|
+
onClose: se
|
|
359
359
|
}, {
|
|
360
360
|
footer: T(() => [
|
|
361
|
-
C(
|
|
361
|
+
C(i(_e), null, {
|
|
362
362
|
default: T(() => {
|
|
363
|
-
var
|
|
363
|
+
var r;
|
|
364
364
|
return [
|
|
365
|
-
C(
|
|
365
|
+
C(i(Y), { onClick: se }, {
|
|
366
366
|
default: T(() => [
|
|
367
367
|
X(S(t.cancelText ?? (P.value ? "关闭" : "取消")), 1)
|
|
368
368
|
]),
|
|
369
369
|
_: 1
|
|
370
370
|
}),
|
|
371
|
-
P.value ? K("", !0) : (
|
|
371
|
+
P.value ? K("", !0) : (v(), H(i(Y), {
|
|
372
372
|
key: 0,
|
|
373
373
|
onClick: me,
|
|
374
374
|
type: "primary",
|
|
375
|
-
loading: ((
|
|
376
|
-
disabled: !w.value || _.value || k.value ||
|
|
375
|
+
loading: ((r = i(a)) == null ? void 0 : r.isFormSaving.value) ?? !1,
|
|
376
|
+
disabled: !w.value || _.value || k.value || i(a).isFormLoading.value
|
|
377
377
|
}, {
|
|
378
378
|
default: T(() => [
|
|
379
379
|
X(S(t.saveText ?? "上传文件"), 1)
|
|
@@ -387,9 +387,9 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
387
387
|
]),
|
|
388
388
|
default: T(() => [
|
|
389
389
|
J(t.$slots, "default"),
|
|
390
|
-
P.value ? K("", !0) : (
|
|
390
|
+
P.value ? K("", !0) : (v(), x("div", $e, [
|
|
391
391
|
J(t.$slots, "file-before"),
|
|
392
|
-
C(
|
|
392
|
+
C(i(ue), {
|
|
393
393
|
"file-list": le.value,
|
|
394
394
|
"before-upload": xe,
|
|
395
395
|
accept: de.value,
|
|
@@ -397,7 +397,7 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
397
397
|
disabled: !te.value
|
|
398
398
|
}, {
|
|
399
399
|
default: T(() => [
|
|
400
|
-
C(
|
|
400
|
+
C(i(Y), {
|
|
401
401
|
type: "primary",
|
|
402
402
|
disabled: !te.value
|
|
403
403
|
}, {
|
|
@@ -409,8 +409,8 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
409
409
|
]),
|
|
410
410
|
_: 1
|
|
411
411
|
}, 8, ["file-list", "accept", "disabled"]),
|
|
412
|
-
w.value && y.value ? (
|
|
413
|
-
C(
|
|
412
|
+
w.value && y.value ? (v(), x("div", Ae, [
|
|
413
|
+
C(i(Z), {
|
|
414
414
|
message: y.value,
|
|
415
415
|
type: "info",
|
|
416
416
|
"show-icon": !1
|
|
@@ -419,15 +419,15 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
419
419
|
J(t.$slots, "file-after")
|
|
420
420
|
])),
|
|
421
421
|
g("div", je, [
|
|
422
|
-
|
|
422
|
+
i(a).isFormLoading.value ? (v(), H(i(Le), {
|
|
423
423
|
key: 0,
|
|
424
424
|
size: "large"
|
|
425
425
|
})) : K("", !0),
|
|
426
426
|
g("div", {
|
|
427
|
-
class: Ce(["flex-shrink-0 relative border border-gray-200 rounded-md overflow-hidden", [
|
|
427
|
+
class: Ce(["flex-shrink-0 relative border border-gray-200 rounded-md overflow-hidden", [i(A).length === 0 ? "w-[100%]" : "w-[80%]"]]),
|
|
428
428
|
style: { height: "430px" }
|
|
429
429
|
}, [
|
|
430
|
-
C(
|
|
430
|
+
C(i(Ve), {
|
|
431
431
|
src: w.value,
|
|
432
432
|
onError: ge,
|
|
433
433
|
style: { width: "100%", height: "100%" },
|
|
@@ -441,31 +441,31 @@ const Be = (l) => l.includes(",") || l.includes(`
|
|
|
441
441
|
}
|
|
442
442
|
}, null, 8, ["src"])
|
|
443
443
|
], 2),
|
|
444
|
-
|
|
444
|
+
i(A).length > 0 ? (v(), x("div", Oe, [
|
|
445
445
|
g("div", Ge, [
|
|
446
|
-
|
|
447
|
-
C(
|
|
446
|
+
i(A).length === 0 ? (v(), x("div", Ie, "没有设置验证规则")) : (v(), x("div", qe, [
|
|
447
|
+
C(i(Z), {
|
|
448
448
|
message: V.value,
|
|
449
449
|
type: E.value,
|
|
450
450
|
"show-icon": "",
|
|
451
451
|
class: "mb-2"
|
|
452
452
|
}, null, 8, ["message", "type"]),
|
|
453
453
|
g("div", Qe, [
|
|
454
|
-
(
|
|
454
|
+
(v(!0), x(ie, null, ne(i(A), (r, u) => (v(), x("div", {
|
|
455
455
|
key: u,
|
|
456
456
|
class: "border-b pb-0"
|
|
457
457
|
}, [
|
|
458
|
-
g("div", We, S(
|
|
458
|
+
g("div", We, S(r.field), 1),
|
|
459
459
|
g("ul", He, [
|
|
460
|
-
(
|
|
460
|
+
(v(!0), x(ie, null, ne(r.rules, (n, d) => (v(), x("li", {
|
|
461
461
|
key: d,
|
|
462
462
|
class: "text-[12px] text-gray-600"
|
|
463
|
-
}, S(
|
|
463
|
+
}, S(n), 1))), 128))
|
|
464
464
|
])
|
|
465
465
|
]))), 128))
|
|
466
466
|
]),
|
|
467
|
-
M.value && M.value.length > 0 ? (
|
|
468
|
-
C(
|
|
467
|
+
M.value && M.value.length > 0 ? (v(), x("div", Je, [
|
|
468
|
+
C(i(Z), {
|
|
469
469
|
message: $.value,
|
|
470
470
|
type: B.value,
|
|
471
471
|
"show-icon": "",
|
|
@@ -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-_foSmXoy.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-DoiSzbHZ.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-D7ysapQL.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-BNx4hnQX.js";
|
|
13
13
|
const K = /* @__PURE__ */ y({
|
|
14
14
|
__name: "uploadForm",
|
|
15
15
|
props: {
|