act-plus 1.1.80 → 1.1.82
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/act-plus.js +1 -1
- package/act-plus.umd.cjs +53 -53
- package/lib/{dialogAddField-356c0203.js → dialogAddField-2e9cd8dd.js} +33 -33
- package/lib/{dialogConfigBtn-b826fbbd.js → dialogConfigBtn-f03ef8a6.js} +21 -21
- package/lib/{dialogSiteComponentsParams-2bd207be.js → dialogSiteComponentsParams-86be6478.js} +7 -7
- package/lib/{index-0ca10994.js → index-2e399e7e.js} +1333 -1365
- package/lib/{index-a1576e42.js → index-46cda8de.js} +5 -5
- package/lib/{index-bb510fb9.js → index-49c791d2.js} +1 -1
- package/lib/index-4c83efe5.js +277 -0
- package/lib/{index-a1929e12.js → index-66a60f4b.js} +67 -53
- package/lib/{index-5cf4016d.js → index-753b774f.js} +4535 -4788
- package/lib/{index-35e3b49c.js → index-7a82a0bc.js} +104 -112
- package/lib/{index-b42134dd.js → index-a34395ac.js} +25 -18
- package/lib/{index-083d66b1.js → index-b33bb0e0.js} +4 -4
- package/lib/{index-07af7560.js → index-d69cc7dd.js} +21 -21
- package/package.json +16 -16
- package/style.css +1 -1
- package/lib/index-ddd5b9be.js +0 -249
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { reactive as m, watch as
|
|
2
|
-
import { _ as k, u as w } from "./index-
|
|
1
|
+
import { reactive as m, watch as b, resolveComponent as s, openBlock as v, createBlock as g, withCtx as o, createElementVNode as i, createVNode as x, createTextVNode as y, toDisplayString as h, unref as C } from "vue";
|
|
2
|
+
import { _ as k, u as w } from "./index-2e399e7e.js";
|
|
3
3
|
import "vue-router";
|
|
4
4
|
import "element-plus";
|
|
5
5
|
const V = ["innerHTML"], B = { class: "dialog-footer" }, D = {
|
|
@@ -15,7 +15,7 @@ const V = ["innerHTML"], B = { class: "dialog-footer" }, D = {
|
|
|
15
15
|
let a = m((() => ({
|
|
16
16
|
loading: !1
|
|
17
17
|
}))());
|
|
18
|
-
|
|
18
|
+
b(
|
|
19
19
|
() => t.visible,
|
|
20
20
|
async (e, p) => {
|
|
21
21
|
e && (a.loading = !0, a.loading = !1);
|
|
@@ -28,7 +28,7 @@ const V = ["innerHTML"], B = { class: "dialog-footer" }, D = {
|
|
|
28
28
|
};
|
|
29
29
|
return (e, p) => {
|
|
30
30
|
const f = s("el-button"), u = s("el-dialog");
|
|
31
|
-
return
|
|
31
|
+
return v(), g(u, {
|
|
32
32
|
"model-value": t.visible,
|
|
33
33
|
title: t.title,
|
|
34
34
|
top: "5vh",
|
|
@@ -59,7 +59,7 @@ const V = ["innerHTML"], B = { class: "dialog-footer" }, D = {
|
|
|
59
59
|
}, 8, ["model-value", "title"]);
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
}, M = /* @__PURE__ */ k(D, [["__scopeId", "data-v-
|
|
62
|
+
}, M = /* @__PURE__ */ k(D, [["__scopeId", "data-v-be1c5be6"]]);
|
|
63
63
|
export {
|
|
64
64
|
M as default
|
|
65
65
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as N, watch as O, resolveComponent as u, resolveDirective as T, openBlock as l, createElementBlock as p, withDirectives as j, createBlock as i, mergeProps as D, withCtx as g, createTextVNode as W, toDisplayString as A, unref as y, Fragment as c, renderList as H, renderSlot as w, createCommentVNode as U, nextTick as b } from "vue";
|
|
2
|
-
import { _ as V, u as $ } from "./index-
|
|
2
|
+
import { _ as V, u as $ } from "./index-2e399e7e.js";
|
|
3
3
|
import "vue-router";
|
|
4
4
|
import "element-plus";
|
|
5
5
|
const F = { class: "act-table" }, L = {
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { ref as P, computed as ie, resolveComponent as w, resolveDirective as ae, openBlock as h, createElementBlock as L, withDirectives as se, createBlock as U, mergeProps as re, unref as d, withCtx as D, renderSlot as A, createElementVNode as x, toDisplayString as S, createCommentVNode as B, createVNode as $, createTextVNode as ce, Fragment as ue, renderList as pe, normalizeClass as de, nextTick as me } from "vue";
|
|
2
|
+
import { ElNotification as E } from "element-plus";
|
|
3
|
+
import { _ as fe, u as ge, z as ye, o as _e, p as he, q as ve } from "./index-2e399e7e.js";
|
|
4
|
+
import "vue-router";
|
|
5
|
+
let R;
|
|
6
|
+
const we = new Uint8Array(16);
|
|
7
|
+
function xe() {
|
|
8
|
+
if (!R && (R = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !R))
|
|
9
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
10
|
+
return R(we);
|
|
11
|
+
}
|
|
12
|
+
const a = [];
|
|
13
|
+
for (let n = 0; n < 256; ++n)
|
|
14
|
+
a.push((n + 256).toString(16).slice(1));
|
|
15
|
+
function Te(n, o = 0) {
|
|
16
|
+
return a[n[o + 0]] + a[n[o + 1]] + a[n[o + 2]] + a[n[o + 3]] + "-" + a[n[o + 4]] + a[n[o + 5]] + "-" + a[n[o + 6]] + a[n[o + 7]] + "-" + a[n[o + 8]] + a[n[o + 9]] + "-" + a[n[o + 10]] + a[n[o + 11]] + a[n[o + 12]] + a[n[o + 13]] + a[n[o + 14]] + a[n[o + 15]];
|
|
17
|
+
}
|
|
18
|
+
const Fe = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), M = {
|
|
19
|
+
randomUUID: Fe
|
|
20
|
+
};
|
|
21
|
+
function ke(n, o, T) {
|
|
22
|
+
if (M.randomUUID && !o && !n)
|
|
23
|
+
return M.randomUUID();
|
|
24
|
+
n = n || {};
|
|
25
|
+
const m = n.random || (n.rng || xe)();
|
|
26
|
+
if (m[6] = m[6] & 15 | 64, m[8] = m[8] & 63 | 128, o) {
|
|
27
|
+
T = T || 0;
|
|
28
|
+
for (let v = 0; v < 16; ++v)
|
|
29
|
+
o[T + v] = m[v];
|
|
30
|
+
return o;
|
|
31
|
+
}
|
|
32
|
+
return Te(m);
|
|
33
|
+
}
|
|
34
|
+
const $e = { class: "upload-container" }, Ve = { class: "el-upload__text" }, be = { class: "tip-text" }, Ce = { class: "file-list-l" }, Ie = ["onMouseenter", "onMouseleave"], Pe = { class: "el-file-operate" }, Ue = {
|
|
35
|
+
__name: "index",
|
|
36
|
+
props: {
|
|
37
|
+
request: { type: Function, required: !0, default: null },
|
|
38
|
+
modelValue: { type: [Array, String], default: [] },
|
|
39
|
+
action: { type: String, default: "/api/v1/utils/uploadFiles" },
|
|
40
|
+
data: { type: Object, default: () => ({ uploadFileType: 1 }) },
|
|
41
|
+
name: { type: String, default: "files" },
|
|
42
|
+
multiple: { type: Boolean, default: !0 },
|
|
43
|
+
limit: { type: Number, default: 9 },
|
|
44
|
+
accept: { type: String, default: "*" },
|
|
45
|
+
tipText: { type: String, default: "" },
|
|
46
|
+
fileMaxSize: { type: Number, default: 100 },
|
|
47
|
+
autoUpload: { type: Boolean, default: !0 }
|
|
48
|
+
},
|
|
49
|
+
emits: ["update:modelValue", "delete"],
|
|
50
|
+
setup(n, { expose: o, emit: T }) {
|
|
51
|
+
const { getAssetsFileName: m, getAssetsFilePath: v, downloadFile: O } = ve(), { t: g } = ge(), V = T, u = n, b = {
|
|
52
|
+
image: /^(gif|jpg|jpeg|png|bmp|webp)$/i,
|
|
53
|
+
word: /^(doc|docx)$/i,
|
|
54
|
+
pdf: /^pdf$/i,
|
|
55
|
+
excel: /^(xls|xlsx)$/i
|
|
56
|
+
};
|
|
57
|
+
let C = P(!1), j = P({}), z = P(!1), y = P(null), I = null, _ = ie({
|
|
58
|
+
get() {
|
|
59
|
+
return K(u.modelValue);
|
|
60
|
+
},
|
|
61
|
+
set(e) {
|
|
62
|
+
V("update:modelValue", e);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
const q = (e) => {
|
|
66
|
+
const t = (_.value || []).map((s) => s.filePath);
|
|
67
|
+
if (e == 0)
|
|
68
|
+
return t;
|
|
69
|
+
let l = t.splice(e), i = t.splice(0, e);
|
|
70
|
+
return l.concat(i);
|
|
71
|
+
}, W = (e) => {
|
|
72
|
+
if (!e || typeof e != "string")
|
|
73
|
+
return "";
|
|
74
|
+
const t = e.split("?")[0].split("#")[0], l = t.lastIndexOf(".");
|
|
75
|
+
return l < 0 ? "" : t.slice(l + 1).toLowerCase();
|
|
76
|
+
}, H = (...e) => {
|
|
77
|
+
for (const t of e) {
|
|
78
|
+
const l = `${t || ""}`.trim();
|
|
79
|
+
if (!l)
|
|
80
|
+
continue;
|
|
81
|
+
const i = l.startsWith(".") ? l.slice(1).toLowerCase() : l.toLowerCase();
|
|
82
|
+
if (i === "image")
|
|
83
|
+
return "image";
|
|
84
|
+
if (Object.keys(b).includes(i))
|
|
85
|
+
return i;
|
|
86
|
+
const s = W(l) || i;
|
|
87
|
+
let r = null;
|
|
88
|
+
if (Object.keys(b).some((c) => {
|
|
89
|
+
if (b[c].test(s))
|
|
90
|
+
return r = c, !0;
|
|
91
|
+
}), r)
|
|
92
|
+
return r;
|
|
93
|
+
}
|
|
94
|
+
return "file";
|
|
95
|
+
}, G = (e) => {
|
|
96
|
+
var s, r;
|
|
97
|
+
const t = typeof e == "string" ? { filePath: e } : e || {}, l = t.filePath || t.url || "", i = t.name || t.fileName || m(l) || ((s = t.raw) == null ? void 0 : s.name) || "";
|
|
98
|
+
return {
|
|
99
|
+
...t,
|
|
100
|
+
uid: t.uid ?? ke(),
|
|
101
|
+
name: i,
|
|
102
|
+
filePath: l,
|
|
103
|
+
fileType: H(t.fileType, i, l, (r = t.raw) == null ? void 0 : r.name),
|
|
104
|
+
status: t.status ?? "success"
|
|
105
|
+
};
|
|
106
|
+
}, J = (e = []) => e.filter(Boolean).map((t) => G(t)), K = (e) => {
|
|
107
|
+
const t = Array.isArray(e) ? e : e ? e.split(";").filter(Boolean) : [];
|
|
108
|
+
return J(t);
|
|
109
|
+
}, Q = ({ name: e }) => {
|
|
110
|
+
const t = e.lastIndexOf("."), l = e.slice(t), i = u.accept.trim().split(",");
|
|
111
|
+
let s = !1;
|
|
112
|
+
return i.includes(l) && (s = !0), s = i.some((r) => r == "image/*" ? b.image.test(l) : r.startsWith(".") ? e.endsWith(r) : r === l), s || E({
|
|
113
|
+
title: `${g("act.tip")}`,
|
|
114
|
+
message: `【${e}】${g("act.uploadErrorTip")}`,
|
|
115
|
+
type: "warning",
|
|
116
|
+
duration: 2500
|
|
117
|
+
}), s;
|
|
118
|
+
}, X = (e, t, l) => {
|
|
119
|
+
I && (clearTimeout(I), I = null), I = setTimeout(() => {
|
|
120
|
+
e.call(this, t);
|
|
121
|
+
}, l);
|
|
122
|
+
}, Y = (e) => u.request({ url: u.action, method: "POST", data: e, headers: { "Content-Type": "application/x-www-form-urlencoded" } }), Z = async (e) => {
|
|
123
|
+
try {
|
|
124
|
+
const t = e.filter((c) => c.status == "ready" && Q(c)), l = _.value.length + t.length;
|
|
125
|
+
if (t.length === 0) {
|
|
126
|
+
y.value.clearFiles();
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (l > u.limit) {
|
|
130
|
+
E({
|
|
131
|
+
title: `${g("act.tip")}`,
|
|
132
|
+
message: `${g("act.uploadLimitTip")}`,
|
|
133
|
+
type: "warning",
|
|
134
|
+
duration: 2500
|
|
135
|
+
}), y.value.clearFiles();
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (!u.autoUpload) {
|
|
139
|
+
const c = t.map((F) => ({ ...F, filePath: null, status: "success" }));
|
|
140
|
+
V("update:modelValue", c), y.value.clearFiles();
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
C.value = !0;
|
|
144
|
+
const i = new FormData();
|
|
145
|
+
Object.keys(u.data).forEach((c) => {
|
|
146
|
+
i.append(c, u.data[c]);
|
|
147
|
+
}), t.forEach((c) => {
|
|
148
|
+
i.append(u.name, c.raw);
|
|
149
|
+
});
|
|
150
|
+
let { data: s } = await Y(i);
|
|
151
|
+
const r = u.multiple ? [..._.value.map((c) => c.filePath), ...s.filePaths || []].join(";") : [...s.filePaths || []].join(";");
|
|
152
|
+
y.value.clearFiles(), V("update:modelValue", r), C.value = !1;
|
|
153
|
+
} catch (t) {
|
|
154
|
+
y.value.clearFiles(), C.value = !1, console.error(t);
|
|
155
|
+
}
|
|
156
|
+
}, ee = (e, t) => {
|
|
157
|
+
X(Z, t, 500);
|
|
158
|
+
}, N = (e, t) => {
|
|
159
|
+
const l = j.value[`tooltipRef${t}`];
|
|
160
|
+
z.value = l.scrollWidth <= Math.round(l.getBoundingClientRect().width);
|
|
161
|
+
}, te = ({ filePath: e, name: t, uid: l }, i) => {
|
|
162
|
+
me(() => {
|
|
163
|
+
document.querySelector(`.previewImage_${l}`).children[0].click();
|
|
164
|
+
});
|
|
165
|
+
}, le = ({ filePath: e, name: t }) => {
|
|
166
|
+
O(u.request, e);
|
|
167
|
+
}, ne = (e, t) => {
|
|
168
|
+
_.value = _.value.filter((l, i) => i !== t), V("delete", { data: e });
|
|
169
|
+
};
|
|
170
|
+
return o({ clearFiles: () => {
|
|
171
|
+
_.value = [], y.value.clearFiles();
|
|
172
|
+
} }), (e, t) => {
|
|
173
|
+
const l = w("upload-filled"), i = w("el-icon"), s = w("el-upload"), r = w("el-image"), c = w("el-tooltip"), F = w("el-button"), oe = ae("loading");
|
|
174
|
+
return h(), L("div", $e, [
|
|
175
|
+
se((h(), U(s, re({
|
|
176
|
+
ref_key: "uploadRef",
|
|
177
|
+
ref: y,
|
|
178
|
+
action: "#",
|
|
179
|
+
drag: "",
|
|
180
|
+
accept: u.accept,
|
|
181
|
+
multiple: u.multiple,
|
|
182
|
+
"auto-upload": !1,
|
|
183
|
+
"show-file-list": !1,
|
|
184
|
+
"on-change": ee
|
|
185
|
+
}, e.$attrs, {
|
|
186
|
+
"element-loading-text": d(g)("act.uploadLoading")
|
|
187
|
+
}), {
|
|
188
|
+
tip: D(() => [
|
|
189
|
+
u.tipText ? A(e.$slots, "default", { key: 0 }, () => [
|
|
190
|
+
x("p", be, S(u.tipText), 1)
|
|
191
|
+
], !0) : B("", !0)
|
|
192
|
+
]),
|
|
193
|
+
default: D(() => [
|
|
194
|
+
$(i, { class: "el-icon--upload" }, {
|
|
195
|
+
default: D(() => [
|
|
196
|
+
$(l)
|
|
197
|
+
]),
|
|
198
|
+
_: 1
|
|
199
|
+
}),
|
|
200
|
+
x("div", Ve, [
|
|
201
|
+
ce(S(d(g)("act.uploadText")), 1),
|
|
202
|
+
x("em", null, S(d(g)("act.clickUpload")), 1)
|
|
203
|
+
])
|
|
204
|
+
]),
|
|
205
|
+
_: 3
|
|
206
|
+
}, 16, ["accept", "multiple", "element-loading-text"])), [
|
|
207
|
+
[oe, d(C)]
|
|
208
|
+
]),
|
|
209
|
+
A(e.$slots, "default", {}, () => [
|
|
210
|
+
(h(!0), L(ue, null, pe(d(_), (p, k) => (h(), L("div", {
|
|
211
|
+
class: "file-list",
|
|
212
|
+
key: p.uid
|
|
213
|
+
}, [
|
|
214
|
+
x("div", Ce, [
|
|
215
|
+
p.fileType === "image" ? (h(), U(r, {
|
|
216
|
+
key: 0,
|
|
217
|
+
class: de(["file-list-image", { [`previewImage_${p.uid}`]: !0 }]),
|
|
218
|
+
fit: "cover",
|
|
219
|
+
"preview-src-list": q(k),
|
|
220
|
+
"preview-teleported": "",
|
|
221
|
+
src: p.filePath
|
|
222
|
+
}, null, 8, ["class", "preview-src-list", "src"])) : (h(), U(r, {
|
|
223
|
+
key: 1,
|
|
224
|
+
class: "file-list-icon",
|
|
225
|
+
src: d(v)(`images/upload-${p.fileType || "file"}.png`)
|
|
226
|
+
}, null, 8, ["src"])),
|
|
227
|
+
$(c, {
|
|
228
|
+
effect: "dark",
|
|
229
|
+
content: p.name,
|
|
230
|
+
placement: "bottom-start",
|
|
231
|
+
disabled: d(z)
|
|
232
|
+
}, {
|
|
233
|
+
default: D(() => [
|
|
234
|
+
x("div", {
|
|
235
|
+
class: "el-file-name",
|
|
236
|
+
ref_for: !0,
|
|
237
|
+
ref: (f) => d(j)[`tooltipRef${k}`] = f,
|
|
238
|
+
onMouseenter: (f) => N(f, k),
|
|
239
|
+
onMouseleave: (f) => N(f, k)
|
|
240
|
+
}, S(p.name), 41, Ie)
|
|
241
|
+
]),
|
|
242
|
+
_: 2
|
|
243
|
+
}, 1032, ["content", "disabled"])
|
|
244
|
+
]),
|
|
245
|
+
x("div", Pe, [
|
|
246
|
+
p.fileType === "image" ? (h(), U(F, {
|
|
247
|
+
key: 0,
|
|
248
|
+
type: "primary",
|
|
249
|
+
size: "small",
|
|
250
|
+
icon: d(ye),
|
|
251
|
+
circle: "",
|
|
252
|
+
onClick: (f) => te(p)
|
|
253
|
+
}, null, 8, ["icon", "onClick"])) : B("", !0),
|
|
254
|
+
$(F, {
|
|
255
|
+
type: "primary",
|
|
256
|
+
size: "small",
|
|
257
|
+
icon: d(_e),
|
|
258
|
+
circle: "",
|
|
259
|
+
onClick: (f) => le(p)
|
|
260
|
+
}, null, 8, ["icon", "onClick"]),
|
|
261
|
+
$(F, {
|
|
262
|
+
type: "danger",
|
|
263
|
+
size: "small",
|
|
264
|
+
icon: d(he),
|
|
265
|
+
circle: "",
|
|
266
|
+
onClick: (f) => ne(p, k)
|
|
267
|
+
}, null, 8, ["icon", "onClick"])
|
|
268
|
+
])
|
|
269
|
+
]))), 128))
|
|
270
|
+
], !0)
|
|
271
|
+
]);
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
}, ze = /* @__PURE__ */ fe(Ue, [["__scopeId", "data-v-50a2deea"]]);
|
|
275
|
+
export {
|
|
276
|
+
ze as default
|
|
277
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineAsyncComponent as O, inject as D, ref as N, watch as De, resolveComponent as _, resolveDirective as le, openBlock as u, createBlock as y, withCtx as K, createElementVNode as ae, createVNode as oe, createTextVNode as J, toDisplayString as A, unref as d, withDirectives as te, createElementBlock as L, Fragment as x, renderList as Q, mergeProps as v, createCommentVNode as se, resolveDynamicComponent as we, toRaw as Ne } from "vue";
|
|
2
|
-
import { _ as ke, u as Ue, P as Pe, b as re, a as Se } from "./index-
|
|
2
|
+
import { _ as ke, u as Ue, P as Pe, b as re, a as Se } from "./index-2e399e7e.js";
|
|
3
3
|
import { ElNotification as Le } from "element-plus";
|
|
4
4
|
import "vue-router";
|
|
5
5
|
const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
@@ -11,11 +11,11 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
11
11
|
},
|
|
12
12
|
emits: ["update:visible", "refresh"],
|
|
13
13
|
setup(k, { emit: de }) {
|
|
14
|
-
const ie = O(() => import("./index-e2f2023d.js")), ne = O(() => import("./index-
|
|
14
|
+
const ie = O(() => import("./index-e2f2023d.js")), ne = O(() => import("./index-b33bb0e0.js")), ue = O(() => import("./index-4c83efe5.js")), ce = O(() => import("./index-7a82a0bc.js")), { t: h } = Ue(), q = D("request"), fe = D("loadComponents"), w = D("formatDataType"), M = D("globalProps"), pe = D("stringToBoolean"), b = D("getFieldUiProps"), me = D("disposeRequestData"), X = de, p = k, R = N(!1), U = N(!1), E = N(null), P = N([]), o = N({}), j = N({}), ye = (l) => l.formColumnCol == null ? 24 : l.formColumnCol ? l.formColumnCol : 24 / l.formRow, be = (l) => ["input", "textarea"].includes(l.fieldType) ? "blur" : (["select", "multipleSelect", "datetimerange", "treeSelect", "provinceCascade"].includes(l.fieldType), "change"), he = async ({ node: l, resolve: c }, a) => {
|
|
15
15
|
const r = b(a), { label: m, value: n, children: g, isLeaf: s } = { ...re, ...r.treeProps || {} };
|
|
16
16
|
if (l[s])
|
|
17
17
|
return c([]);
|
|
18
|
-
const i = a.postRequestParams.filter((f) => f.submitType === "default").reduce((f, V) => (f[V.submitName] = w(V.paramsType, V.submitValue), f), {}),
|
|
18
|
+
const i = a.postRequestParams.filter((f) => f.submitType === "default").reduce((f, V) => (f[V.submitName] = w(V.paramsType, V.submitValue), f), {}), T = a.postRequestParams.filter((f) => f.submitType === "match").reduce((f, V) => (f[V.submitName] = w(V.paramsType, M.matchData[V.submitValue][V.submitName]), f), {}), F = a.postRequestParams.filter((f) => f.submitType === "dynamic").map((f) => {
|
|
19
19
|
let V = {
|
|
20
20
|
field: f.submitName,
|
|
21
21
|
operate: f.submitMatchType,
|
|
@@ -23,12 +23,12 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
23
23
|
};
|
|
24
24
|
return r.loadCode === f.submitName && (l != null && l.data.value) && (V.value = l == null ? void 0 : l.data.value), V;
|
|
25
25
|
});
|
|
26
|
-
let
|
|
27
|
-
Object.keys(i).length && (
|
|
26
|
+
let C = {};
|
|
27
|
+
Object.keys(i).length && (C = { ...C, ...i }), Object.keys(T).length && (C = { ...C, ...T }), F.length && (C.dynamicFilters = F), r.loadCode && Reflect.has(C, r.loadCode) && (C[r.loadCode] = l == null ? void 0 : l.data.value);
|
|
28
28
|
const { data: H } = await q({
|
|
29
29
|
url: a.fieldRequestUrl,
|
|
30
30
|
method: a.fieldRequestType || "GET",
|
|
31
|
-
data:
|
|
31
|
+
data: C
|
|
32
32
|
}), W = (H || []).map((f) => ({ label: f[m], value: f[n], children: [], isLeaf: f[s] }));
|
|
33
33
|
c(W);
|
|
34
34
|
}, Y = (l) => {
|
|
@@ -77,12 +77,12 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
77
77
|
const m = await me(p.data.formList, p.data.rowData, !1, !0);
|
|
78
78
|
console.log("formList", (a = p.data) == null ? void 0 : a.formList), P.value = await Promise.all(
|
|
79
79
|
(((r = p.data) == null ? void 0 : r.formList) ?? []).sort((n, g) => n.sort - g.sort).map(async (n) => {
|
|
80
|
-
const g = m.find((
|
|
80
|
+
const g = m.find((F) => n.fieldName == F.fieldName && n.fieldKey == F.fieldKey);
|
|
81
81
|
g && (n.dataList = (g == null ? void 0 : g.dataList) ?? []), ["select", "multipleSelect"].includes(n.fieldType) && (o.value[`${n.fieldKey}ActImplicit`] = Object.keys(p.data.rowData).length && n.isFormSetValue ? z(n, !0) : Y(n.fieldType)), o.value[n.fieldKey] = Object.keys(p.data.rowData).length && n.isFormSetValue ? z(n) : Y(n.fieldType);
|
|
82
|
-
const { isFieldCustom: s, customComponentName: i, customComponentUrl:
|
|
82
|
+
const { isFieldCustom: s, customComponentName: i, customComponentUrl: T } = n.customFiledsComponentes;
|
|
83
83
|
if (s && !n.customFiledsComponentes[i]) {
|
|
84
|
-
const
|
|
85
|
-
n.customFiledsComponentes[i] =
|
|
84
|
+
const F = await fe(T, i);
|
|
85
|
+
n.customFiledsComponentes[i] = F;
|
|
86
86
|
}
|
|
87
87
|
return n;
|
|
88
88
|
})
|
|
@@ -106,7 +106,7 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
106
106
|
}, Ve = (l, c) => {
|
|
107
107
|
const { fieldKey: a, fieldType: r } = c;
|
|
108
108
|
r === "multipleSelect" ? l === void 0 && (o.value[a] = []) : l === void 0 && (o.value[a] = "");
|
|
109
|
-
},
|
|
109
|
+
}, Ce = (l) => {
|
|
110
110
|
l && l.validate((c) => {
|
|
111
111
|
if (c) {
|
|
112
112
|
const { dataItem: a, rowData: r } = p.data;
|
|
@@ -116,12 +116,12 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
116
116
|
delete m[s];
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
|
-
const i = P.value.find((
|
|
120
|
-
console.log(i), s.includes("&") ? s.split("&").forEach((
|
|
121
|
-
m[
|
|
122
|
-
}) : Array.isArray(m[s]) && i.fieldSubmitType == "string" && (m[s] = $(m[s], "string"));
|
|
119
|
+
const i = P.value.find((T) => T.fieldKey === s);
|
|
120
|
+
console.log(i), s.includes("&") ? s.split("&").forEach((F, C) => {
|
|
121
|
+
m[F] = m[s] ? $(m[s][C], i.fieldSubmitType) : m[s];
|
|
122
|
+
}) : Array.isArray(m[s]) && (i == null ? void 0 : i.fieldSubmitType) == "string" && (m[s] = $(m[s], "string"));
|
|
123
123
|
});
|
|
124
|
-
const n = a.submitFields.filter((s) => s.matchType == "default").reduce((s, i) => (i.submitFieldType === "string" && (s[i.submitFieldName] = i.matchFieldName.toString()), s), {}), g = a.submitFields.filter((s) => s.matchType == "match").reduce((s, i) => (Reflect.has(i, "submitFieldMatchOrigin") && i.submitFieldMatchOrigin === "selections" ? s[i.submitFieldName] = p.data.selections.map((
|
|
124
|
+
const n = a.submitFields.filter((s) => s.matchType == "default").reduce((s, i) => (i.submitFieldType === "string" && (s[i.submitFieldName] = i.matchFieldName.toString()), s), {}), g = a.submitFields.filter((s) => s.matchType == "match").reduce((s, i) => (Reflect.has(i, "submitFieldMatchOrigin") && i.submitFieldMatchOrigin === "selections" ? s[i.submitFieldName] = p.data.selections.map((T) => w(i.submitFieldType, T[i.matchFieldName])) : Reflect.has(i, "submitFieldMatchOrigin") && i.submitFieldMatchOrigin != "rowData" ? Reflect.has(M.matchData, i.submitFieldMatchOrigin) && (s[i.submitFieldName] = w(i.submitFieldType, M.matchData[i.submitFieldMatchOrigin][i.matchFieldName])) : s[i.submitFieldName] = w(i.submitFieldType, r[i.matchFieldName]), s), {});
|
|
125
125
|
ge({
|
|
126
126
|
...m,
|
|
127
127
|
...n,
|
|
@@ -138,18 +138,18 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
|
-
},
|
|
141
|
+
}, Te = (l) => {
|
|
142
142
|
const c = Object.keys(j.value).map((a) => {
|
|
143
143
|
var r;
|
|
144
144
|
return (r = j.value[a]) == null ? void 0 : r.updateFormData(o.value);
|
|
145
145
|
}).filter((a) => a);
|
|
146
146
|
Promise.all([l.validate(), ...c]).then((a) => {
|
|
147
|
-
a.every((r) => r) &&
|
|
147
|
+
a.every((r) => r) && Ce(l);
|
|
148
148
|
}).catch((a) => (console.error(a), a));
|
|
149
149
|
};
|
|
150
150
|
return (l, c) => {
|
|
151
151
|
var Z;
|
|
152
|
-
const a = _("el-input"), r = _("el-option"), m = _("el-select"), n = _("el-select-v2"), g = _("el-tree-select"), s = _("el-date-picker"), i = _("el-cascader"),
|
|
152
|
+
const a = _("el-input"), r = _("el-option"), m = _("el-select"), n = _("el-select-v2"), g = _("el-tree-select"), s = _("el-date-picker"), i = _("el-cascader"), T = _("el-switch"), F = _("el-form-item"), C = _("el-col"), H = _("el-row"), W = _("el-form"), f = _("el-button"), V = _("el-dialog"), Fe = le("loading"), Ke = le("debounce");
|
|
153
153
|
return u(), y(V, {
|
|
154
154
|
"model-value": p.visible,
|
|
155
155
|
title: p.title,
|
|
@@ -176,7 +176,7 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
176
176
|
te((u(), y(f, {
|
|
177
177
|
type: "primary",
|
|
178
178
|
loading: U.value,
|
|
179
|
-
onClick: c[1] || (c[1] = (G) =>
|
|
179
|
+
onClick: c[1] || (c[1] = (G) => Te(E.value))
|
|
180
180
|
}, {
|
|
181
181
|
default: K(() => [
|
|
182
182
|
J(A(d(h)("act.save")), 1)
|
|
@@ -202,7 +202,7 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
202
202
|
default: K(() => [
|
|
203
203
|
oe(H, { gutter: 40 }, {
|
|
204
204
|
default: K(() => [
|
|
205
|
-
(u(!0), L(x, null, Q(P.value, (e, ee) => (u(), y(
|
|
205
|
+
(u(!0), L(x, null, Q(P.value, (e, ee) => (u(), y(C, {
|
|
206
206
|
span: ye(e),
|
|
207
207
|
key: ee
|
|
208
208
|
}, {
|
|
@@ -225,7 +225,7 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
225
225
|
ae("span", Re, "【" + A(e.fieldName) + "】", 1),
|
|
226
226
|
J(A(d(h)("act.fieldCustom")), 1)
|
|
227
227
|
]))
|
|
228
|
-
], 64)) : (u(), y(
|
|
228
|
+
], 64)) : (u(), y(F, {
|
|
229
229
|
key: 0,
|
|
230
230
|
label: e.fieldName,
|
|
231
231
|
prop: ["select", "multipleSelect"].includes(e.fieldType) ? `${e.fieldKey}ActImplicit` : e.fieldKey,
|
|
@@ -237,8 +237,9 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
237
237
|
modelValue: o.value[e.fieldKey],
|
|
238
238
|
"onUpdate:modelValue": (t) => o.value[e.fieldKey] = t,
|
|
239
239
|
placeholder: `${d(h)("act.inputPlaceholder")}${e.fieldName}`,
|
|
240
|
-
clearable: ""
|
|
241
|
-
|
|
240
|
+
clearable: "",
|
|
241
|
+
ref_for: !0
|
|
242
|
+
}, d(b)(e), {
|
|
242
243
|
disabled: e.isFormDisabled
|
|
243
244
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : se("", !0),
|
|
244
245
|
e.fieldType === "inputNumber" ? (u(), y(d(ie), v({
|
|
@@ -246,16 +247,18 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
246
247
|
modelValue: o.value[e.fieldKey],
|
|
247
248
|
"onUpdate:modelValue": (t) => o.value[e.fieldKey] = t,
|
|
248
249
|
placeholder: `${d(h)("act.inputPlaceholder")}${e.fieldName}`,
|
|
249
|
-
clearable: ""
|
|
250
|
-
|
|
250
|
+
clearable: "",
|
|
251
|
+
ref_for: !0
|
|
252
|
+
}, d(b)(e), {
|
|
251
253
|
disabled: e.isFormDisabled
|
|
252
254
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "textarea" ? (u(), y(a, v({
|
|
253
255
|
key: 2,
|
|
254
256
|
modelValue: o.value[e.fieldKey],
|
|
255
257
|
"onUpdate:modelValue": (t) => o.value[e.fieldKey] = t,
|
|
256
258
|
placeholder: `${d(h)("act.inputPlaceholder")}${e.fieldName}`,
|
|
257
|
-
rows: 4
|
|
258
|
-
|
|
259
|
+
rows: 4,
|
|
260
|
+
ref_for: !0
|
|
261
|
+
}, d(b)(e), {
|
|
259
262
|
type: "textarea",
|
|
260
263
|
disabled: e.isFormDisabled
|
|
261
264
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "selectIcon" ? (u(), y(d(ne), v({
|
|
@@ -263,8 +266,9 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
263
266
|
modelValue: o.value[e.fieldKey],
|
|
264
267
|
"onUpdate:modelValue": (t) => o.value[e.fieldKey] = t,
|
|
265
268
|
icons: e.dataList,
|
|
266
|
-
placeholder: `${d(h)("act.selectPlaceholder")}${e.fieldName}
|
|
267
|
-
|
|
269
|
+
placeholder: `${d(h)("act.selectPlaceholder")}${e.fieldName}`,
|
|
270
|
+
ref_for: !0
|
|
271
|
+
}, d(b)(e), {
|
|
268
272
|
disabled: e.isFormDisabled
|
|
269
273
|
}), {
|
|
270
274
|
default: K(() => [
|
|
@@ -282,8 +286,9 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
282
286
|
placeholder: `${d(h)("act.selectPlaceholder")}${e.fieldName}`,
|
|
283
287
|
clearable: "",
|
|
284
288
|
filterable: "",
|
|
285
|
-
"value-key": "value"
|
|
286
|
-
|
|
289
|
+
"value-key": "value",
|
|
290
|
+
ref_for: !0
|
|
291
|
+
}, d(b)(e), {
|
|
287
292
|
multiple: e.fieldType === "multipleSelect",
|
|
288
293
|
disabled: e.isFormDisabled,
|
|
289
294
|
onChange: (t) => ve(t, e)
|
|
@@ -304,8 +309,9 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
304
309
|
props: { ...d(Pe) },
|
|
305
310
|
placeholder: `${d(h)("act.selectPlaceholder")}${e.fieldName}`,
|
|
306
311
|
clearable: "",
|
|
307
|
-
filterable: ""
|
|
308
|
-
|
|
312
|
+
filterable: "",
|
|
313
|
+
ref_for: !0
|
|
314
|
+
}, d(b)(e), {
|
|
309
315
|
disabled: e.isFormDisabled,
|
|
310
316
|
multiple: e.fieldType === "virtualizedMultipleSelect",
|
|
311
317
|
onChange: (t) => Ve(t, e)
|
|
@@ -322,8 +328,9 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
322
328
|
multiple: "",
|
|
323
329
|
"show-checkbox": "",
|
|
324
330
|
clearable: "",
|
|
325
|
-
filterable: ""
|
|
326
|
-
|
|
331
|
+
filterable: "",
|
|
332
|
+
ref_for: !0
|
|
333
|
+
}, d(b)(e)), null, 16, ["modelValue", "onUpdate:modelValue", "data", "default-expanded-keys", "placeholder", "props"])) : e.fieldType === "treeSelect" ? (u(), y(g, v({
|
|
327
334
|
key: 7,
|
|
328
335
|
modelValue: o.value[e.fieldKey],
|
|
329
336
|
"onUpdate:modelValue": (t) => o.value[e.fieldKey] = t,
|
|
@@ -337,15 +344,17 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
337
344
|
clearable: "",
|
|
338
345
|
filterable: "",
|
|
339
346
|
lazy: "",
|
|
340
|
-
load: (t, S) => he({ node: t, resolve: S }, e)
|
|
341
|
-
|
|
347
|
+
load: (t, S) => he({ node: t, resolve: S }, e),
|
|
348
|
+
ref_for: !0
|
|
349
|
+
}, d(b)(e)), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "load"])) : e.fieldType === "date" ? (u(), y(s, v({
|
|
342
350
|
key: 8,
|
|
343
351
|
modelValue: o.value[e.fieldKey],
|
|
344
352
|
"onUpdate:modelValue": (t) => o.value[e.fieldKey] = t,
|
|
345
353
|
type: "date",
|
|
346
354
|
placeholder: `${d(h)("act.selectPlaceholder")}${d(h)("act.time")}`,
|
|
347
|
-
"value-format": "YYYY-MM-DD HH:mm:ss"
|
|
348
|
-
|
|
355
|
+
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
356
|
+
ref_for: !0
|
|
357
|
+
}, d(b)(e), {
|
|
349
358
|
disabled: e.isFormDisabled
|
|
350
359
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "dateRange" ? (u(), y(s, v({
|
|
351
360
|
key: 9,
|
|
@@ -354,8 +363,9 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
354
363
|
type: "daterange",
|
|
355
364
|
"start-placeholder": d(h)("act.startTime"),
|
|
356
365
|
"end-placeholder": d(h)("act.endTime"),
|
|
357
|
-
"value-format": "YYYY-MM-DD HH:mm:ss"
|
|
358
|
-
|
|
366
|
+
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
367
|
+
ref_for: !0
|
|
368
|
+
}, d(b)(e), {
|
|
359
369
|
disabled: e.isFormDisabled
|
|
360
370
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "disabled"])) : e.fieldType === "provinceCascade" ? (u(), y(i, v({
|
|
361
371
|
key: 10,
|
|
@@ -365,28 +375,32 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
365
375
|
props: d(Se),
|
|
366
376
|
clearable: "",
|
|
367
377
|
filterable: "",
|
|
368
|
-
placeholder: `${d(h)("act.selectPlaceholder")}${e.fieldName}
|
|
369
|
-
|
|
378
|
+
placeholder: `${d(h)("act.selectPlaceholder")}${e.fieldName}`,
|
|
379
|
+
ref_for: !0
|
|
380
|
+
}, d(b)(e), {
|
|
370
381
|
disabled: e.isFormDisabled
|
|
371
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder", "disabled"])) : e.fieldType === "switch" ? (u(), y(
|
|
382
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder", "disabled"])) : e.fieldType === "switch" ? (u(), y(T, v({
|
|
372
383
|
key: 11,
|
|
373
384
|
modelValue: o.value[e.fieldKey],
|
|
374
385
|
"onUpdate:modelValue": (t) => o.value[e.fieldKey] = t,
|
|
375
386
|
"active-value": !0,
|
|
376
|
-
"inactive-value": !1
|
|
377
|
-
|
|
387
|
+
"inactive-value": !1,
|
|
388
|
+
ref_for: !0
|
|
389
|
+
}, d(b)(e)), null, 16, ["modelValue", "onUpdate:modelValue"])) : e.fieldType === "upload" ? (u(), y(d(ue), v({
|
|
378
390
|
key: 12,
|
|
379
391
|
class: "form-upload",
|
|
380
392
|
modelValue: o.value[e.fieldKey],
|
|
381
393
|
"onUpdate:modelValue": (t) => o.value[e.fieldKey] = t,
|
|
382
|
-
request: d(q)
|
|
383
|
-
|
|
394
|
+
request: d(q),
|
|
395
|
+
ref_for: !0
|
|
396
|
+
}, d(b)(e)), null, 16, ["modelValue", "onUpdate:modelValue", "request"])) : e.fieldType === "editor" ? (u(), y(d(ce), v({
|
|
384
397
|
key: 13,
|
|
385
398
|
modelValue: o.value[e.fieldKey],
|
|
386
399
|
"onUpdate:modelValue": (t) => o.value[e.fieldKey] = t,
|
|
387
400
|
disabled: e.isFormDisabled,
|
|
388
|
-
placeholder: `${d(h)("act.inputPlaceholder")}${e.fieldName}
|
|
389
|
-
|
|
401
|
+
placeholder: `${d(h)("act.inputPlaceholder")}${e.fieldName}`,
|
|
402
|
+
ref_for: !0
|
|
403
|
+
}, d(b)(e)), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder"])) : se("", !0)
|
|
390
404
|
]),
|
|
391
405
|
_: 2
|
|
392
406
|
}, 1032, ["label", "prop", "rules"]))
|
|
@@ -399,7 +413,7 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
399
413
|
]),
|
|
400
414
|
_: 1
|
|
401
415
|
}, 8, ["model", "label-width", "label-position"])), [
|
|
402
|
-
[
|
|
416
|
+
[Fe, R.value]
|
|
403
417
|
])
|
|
404
418
|
];
|
|
405
419
|
}),
|
|
@@ -407,7 +421,7 @@ const Re = { class: "no-config-field" }, $e = { class: "dialog-footer" }, Oe = {
|
|
|
407
421
|
}, 8, ["model-value", "title", "width"]);
|
|
408
422
|
};
|
|
409
423
|
}
|
|
410
|
-
}, Ee = /* @__PURE__ */ ke(Oe, [["__scopeId", "data-v-
|
|
424
|
+
}, Ee = /* @__PURE__ */ ke(Oe, [["__scopeId", "data-v-a7576826"]]);
|
|
411
425
|
export {
|
|
412
426
|
Ee as default
|
|
413
427
|
};
|