form-design-v3 1.1.7 → 1.1.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/README.md +37 -2
- package/dist-lib/{CodeEditor-DPnE8PRW.js → CodeEditor-C8Hh8Y2_.js} +1 -1
- package/dist-lib/form-design-v3.css +1 -1
- package/dist-lib/form-design-v3.es.js +13 -11
- package/dist-lib/form-design-v3.umd.cjs +2 -2
- package/dist-lib/{index-HSSxMFh5.js → index-AVoRu-VQ.js} +541 -489
- package/dist-lib/index.d.ts +63 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as N, openBlock as d, createElementBlock as c, normalizeClass as j, unref as h, createElementVNode as t, toDisplayString as k, normalizeStyle as q, Fragment as L, createTextVNode as U, computed as M, ref as O, onMounted as ve, onUnmounted as Oe, createVNode as F, withCtx as A, renderList as E, createBlock as R, resolveDynamicComponent as ke, createCommentVNode as T, withModifiers as G, withDirectives as de, renderSlot as Z, vShow as ye, reactive as Ue, Teleport as we, nextTick as Be, resolveComponent as Re, mergeProps as he, createSlots as ce, normalizeProps as qe, guardReactiveProps as Ye, provide as Ke, watch as ue, createStaticVNode as $e, onBeforeUnmount as Qe, vModelText as Xe, h as ge, defineAsyncComponent as Ze, createApp as et } from "vue";
|
|
2
2
|
import { defineStore as tt } from "pinia";
|
|
3
|
-
import { ElSelect as
|
|
3
|
+
import { ElSelect as fe, ElOption as te, ElTree as nt, ElLoading as ot, ElConfigProvider as st, ElDialog as lt, ElInput as it, ElEmpty as at, ElPagination as dt, ElButton as Fe, ElInputNumber as rt, ElMessage as J, ElMessageBox as ut } from "element-plus";
|
|
4
4
|
import "element-plus/es/components/select/style/css";
|
|
5
5
|
import { icons as ct } from "lucide-vue-next";
|
|
6
6
|
import "element-plus/es/components/input-number/style/css";
|
|
@@ -29,20 +29,20 @@ function mt(e) {
|
|
|
29
29
|
if (!n) throw new Error(`未注册的控件类型: ${e}`);
|
|
30
30
|
return { ...n.createDefaultProps(), id: `${e}_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 7)}` };
|
|
31
31
|
}
|
|
32
|
-
const pt = { class: "fd-label-name" }, vt = /* @__PURE__ */
|
|
32
|
+
const pt = { class: "fd-label-name" }, vt = /* @__PURE__ */ N({
|
|
33
33
|
__name: "LabelDesign",
|
|
34
34
|
props: {
|
|
35
35
|
node: {}
|
|
36
36
|
},
|
|
37
37
|
setup(e) {
|
|
38
|
-
const n =
|
|
38
|
+
const n = Y();
|
|
39
39
|
return (o, s) => (d(), c("div", {
|
|
40
40
|
class: j(["fd-label-design", { "is-mobile": h(n).device === "mobile" }])
|
|
41
41
|
}, [
|
|
42
42
|
t("span", pt, k(e.node.label || "标题"), 1),
|
|
43
43
|
t("span", {
|
|
44
44
|
class: j(["fd-label-value", { "fd-label-value--link": !!e.node.bindLink }]),
|
|
45
|
-
style:
|
|
45
|
+
style: q(!e.node.bindLink && e.node.color ? { color: e.node.color } : void 0)
|
|
46
46
|
}, [
|
|
47
47
|
e.node.bindLink ? (d(), c(L, { key: 0 }, [
|
|
48
48
|
U(k(e.node.bindField || e.node.bindLink), 1)
|
|
@@ -57,7 +57,7 @@ const pt = { class: "fd-label-name" }, vt = /* @__PURE__ */ E({
|
|
|
57
57
|
for (const [s, i] of n)
|
|
58
58
|
o[s] = i;
|
|
59
59
|
return o;
|
|
60
|
-
}, bt = /* @__PURE__ */ P(vt, [["__scopeId", "data-v-3b9308ef"]]), gt = { class: "fd-label-name" }, ht = ["data-key"], yt = ["href"], kt = /* @__PURE__ */
|
|
60
|
+
}, bt = /* @__PURE__ */ P(vt, [["__scopeId", "data-v-3b9308ef"]]), gt = { class: "fd-label-name" }, ht = ["data-key"], yt = ["href"], kt = /* @__PURE__ */ N({
|
|
61
61
|
__name: "LabelRender",
|
|
62
62
|
props: {
|
|
63
63
|
node: {},
|
|
@@ -65,13 +65,13 @@ const pt = { class: "fd-label-name" }, vt = /* @__PURE__ */ E({
|
|
|
65
65
|
formData: {}
|
|
66
66
|
},
|
|
67
67
|
setup(e) {
|
|
68
|
-
const n = e, o =
|
|
68
|
+
const n = e, o = M(() => !!n.node.bindLink), s = M(() => {
|
|
69
69
|
var p;
|
|
70
70
|
const m = n.node.bindLink ? (p = n.formData) == null ? void 0 : p[n.node.bindLink] : void 0;
|
|
71
71
|
return m == null ? "" : String(m);
|
|
72
|
-
}), i =
|
|
72
|
+
}), i = M(() => n.value !== void 0 && n.value !== null && n.value !== "" ? String(n.value) : s.value ? s.value : ""), a = Y(), u = O(!1);
|
|
73
73
|
let r = null;
|
|
74
|
-
|
|
74
|
+
ve(() => {
|
|
75
75
|
r = window.matchMedia("(max-width: 768px)"), u.value = r.matches, r.addEventListener("change", (m) => {
|
|
76
76
|
u.value = m.matches;
|
|
77
77
|
});
|
|
@@ -79,7 +79,7 @@ const pt = { class: "fd-label-name" }, vt = /* @__PURE__ */ E({
|
|
|
79
79
|
r && r.removeEventListener("change", () => {
|
|
80
80
|
});
|
|
81
81
|
});
|
|
82
|
-
const l =
|
|
82
|
+
const l = M(() => a.device === "mobile" || u.value);
|
|
83
83
|
return (m, p) => (d(), c("div", {
|
|
84
84
|
class: j(["fd-label-render", { "is-mobile": l.value }])
|
|
85
85
|
}, [
|
|
@@ -87,7 +87,7 @@ const pt = { class: "fd-label-name" }, vt = /* @__PURE__ */ E({
|
|
|
87
87
|
t("span", {
|
|
88
88
|
class: j(["fd-label-value", { "fd-label-value--link": o.value }]),
|
|
89
89
|
"data-key": e.node.bindField,
|
|
90
|
-
style:
|
|
90
|
+
style: q(!o.value && e.node.color ? { color: e.node.color } : void 0)
|
|
91
91
|
}, [
|
|
92
92
|
s.value ? (d(), c("a", {
|
|
93
93
|
key: 0,
|
|
@@ -101,7 +101,7 @@ const pt = { class: "fd-label-name" }, vt = /* @__PURE__ */ E({
|
|
|
101
101
|
], 14, ht)
|
|
102
102
|
], 2));
|
|
103
103
|
}
|
|
104
|
-
}), wt = /* @__PURE__ */ P(kt, [["__scopeId", "data-v-d9af68cc"]]), $t = { class: "fd-panel" }, xt = { class: "fd-panel-item" }, Ct = ["value"], _t = { class: "fd-panel-item" }, It = { class: "fd-panel-item" }, St = { class: "fd-panel-item" }, Dt = { class: "fd-color-row" }, Tt = ["value"], Lt = ["value"], Ft = "#344054", Nt = /* @__PURE__ */
|
|
104
|
+
}), wt = /* @__PURE__ */ P(kt, [["__scopeId", "data-v-d9af68cc"]]), $t = { class: "fd-panel" }, xt = { class: "fd-panel-item" }, Ct = ["value"], _t = { class: "fd-panel-item" }, It = { class: "fd-panel-item" }, St = { class: "fd-panel-item" }, Dt = { class: "fd-color-row" }, Tt = ["value"], Lt = ["value"], Ft = "#344054", Nt = /* @__PURE__ */ N({
|
|
105
105
|
__name: "LabelPanel",
|
|
106
106
|
props: {
|
|
107
107
|
node: {},
|
|
@@ -135,7 +135,7 @@ const pt = { class: "fd-label-name" }, vt = /* @__PURE__ */ E({
|
|
|
135
135
|
]),
|
|
136
136
|
t("div", _t, [
|
|
137
137
|
m[3] || (m[3] = t("label", null, "绑定字段", -1)),
|
|
138
|
-
F(h(
|
|
138
|
+
F(h(fe), {
|
|
139
139
|
"model-value": e.node.bindField,
|
|
140
140
|
filterable: "",
|
|
141
141
|
clearable: "",
|
|
@@ -144,11 +144,11 @@ const pt = { class: "fd-label-name" }, vt = /* @__PURE__ */ E({
|
|
|
144
144
|
"onUpdate:modelValue": u
|
|
145
145
|
}, {
|
|
146
146
|
default: A(() => [
|
|
147
|
-
F(h(
|
|
147
|
+
F(h(te), {
|
|
148
148
|
label: "不绑定",
|
|
149
149
|
value: ""
|
|
150
150
|
}),
|
|
151
|
-
(d(!0), c(L, null,
|
|
151
|
+
(d(!0), c(L, null, E(e.fields, (p) => (d(), R(h(te), {
|
|
152
152
|
key: p.name,
|
|
153
153
|
label: `${p.label}(${p.name})`,
|
|
154
154
|
value: p.name
|
|
@@ -159,7 +159,7 @@ const pt = { class: "fd-label-name" }, vt = /* @__PURE__ */ E({
|
|
|
159
159
|
]),
|
|
160
160
|
t("div", It, [
|
|
161
161
|
m[4] || (m[4] = t("label", null, "链接", -1)),
|
|
162
|
-
F(h(
|
|
162
|
+
F(h(fe), {
|
|
163
163
|
"model-value": e.node.bindLink,
|
|
164
164
|
filterable: "",
|
|
165
165
|
clearable: "",
|
|
@@ -168,11 +168,11 @@ const pt = { class: "fd-label-name" }, vt = /* @__PURE__ */ E({
|
|
|
168
168
|
"onUpdate:modelValue": r
|
|
169
169
|
}, {
|
|
170
170
|
default: A(() => [
|
|
171
|
-
F(h(
|
|
171
|
+
F(h(te), {
|
|
172
172
|
label: "不绑定",
|
|
173
173
|
value: ""
|
|
174
174
|
}),
|
|
175
|
-
(d(!0), c(L, null,
|
|
175
|
+
(d(!0), c(L, null, E(e.fields, (p) => (d(), R(h(te), {
|
|
176
176
|
key: p.name,
|
|
177
177
|
label: `${p.label}(${p.name})`,
|
|
178
178
|
value: p.name
|
|
@@ -215,7 +215,7 @@ const pt = { class: "fd-label-name" }, vt = /* @__PURE__ */ E({
|
|
|
215
215
|
color: "#344054"
|
|
216
216
|
}),
|
|
217
217
|
serialize: (e) => e
|
|
218
|
-
},
|
|
218
|
+
}, me = /* @__PURE__ */ N({
|
|
219
219
|
__name: "LucideIcon",
|
|
220
220
|
props: {
|
|
221
221
|
name: {},
|
|
@@ -223,20 +223,20 @@ const pt = { class: "fd-label-name" }, vt = /* @__PURE__ */ E({
|
|
|
223
223
|
strokeWidth: { default: 2 }
|
|
224
224
|
},
|
|
225
225
|
setup(e) {
|
|
226
|
-
const n = e, o =
|
|
227
|
-
return (s, i) => o.value ? (d(), R(
|
|
226
|
+
const n = e, o = M(() => n.name && ct[n.name] || null);
|
|
227
|
+
return (s, i) => o.value ? (d(), R(ke(o.value), {
|
|
228
228
|
key: 0,
|
|
229
229
|
size: e.size,
|
|
230
230
|
"stroke-width": e.strokeWidth
|
|
231
231
|
}, null, 8, ["size", "stroke-width"])) : T("", !0);
|
|
232
232
|
}
|
|
233
|
-
}), Pt = { class: "fd-card-design" }, Ot = { class: "fd-card-head" }, Ut = { class: "fd-card-title" }, Bt = ["title"], Rt = { class: "fd-card-body" }, Vt = /* @__PURE__ */
|
|
233
|
+
}), Pt = { class: "fd-card-design" }, Ot = { class: "fd-card-head" }, Ut = { class: "fd-card-title" }, Bt = ["title"], Rt = { class: "fd-card-body" }, Vt = /* @__PURE__ */ N({
|
|
234
234
|
__name: "CardDesign",
|
|
235
235
|
props: {
|
|
236
236
|
node: {}
|
|
237
237
|
},
|
|
238
238
|
setup(e) {
|
|
239
|
-
const n = e, o =
|
|
239
|
+
const n = e, o = Y();
|
|
240
240
|
function s() {
|
|
241
241
|
o.setExpanded(n.node.id, !n.node.expanded);
|
|
242
242
|
}
|
|
@@ -245,9 +245,9 @@ const pt = { class: "fd-label-name" }, vt = /* @__PURE__ */ E({
|
|
|
245
245
|
e.node.icon ? (d(), c("span", {
|
|
246
246
|
key: 0,
|
|
247
247
|
class: "fd-card-icon",
|
|
248
|
-
style:
|
|
248
|
+
style: q({ background: e.node.iconBgColor || void 0 })
|
|
249
249
|
}, [
|
|
250
|
-
F(
|
|
250
|
+
F(me, {
|
|
251
251
|
name: e.node.icon,
|
|
252
252
|
size: 18
|
|
253
253
|
}, null, 8, ["name"])
|
|
@@ -270,12 +270,12 @@ const pt = { class: "fd-label-name" }, vt = /* @__PURE__ */ E({
|
|
|
270
270
|
], -1)
|
|
271
271
|
])], 10, Bt)
|
|
272
272
|
]),
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
de(t("div", Rt, [
|
|
274
|
+
Z(i.$slots, "children", {}, () => [
|
|
275
275
|
a[1] || (a[1] = t("div", { class: "fd-card-empty" }, "拖拽子控件到此处", -1))
|
|
276
276
|
], !0)
|
|
277
277
|
], 512), [
|
|
278
|
-
[
|
|
278
|
+
[ye, e.node.expanded]
|
|
279
279
|
])
|
|
280
280
|
]));
|
|
281
281
|
}
|
|
@@ -288,7 +288,7 @@ function Ve(e, n) {
|
|
|
288
288
|
const jt = {
|
|
289
289
|
key: 0,
|
|
290
290
|
class: "fd-card-render"
|
|
291
|
-
}, zt = { class: "fd-card-title" }, Jt = { class: "fd-card-body" }, Wt = /* @__PURE__ */
|
|
291
|
+
}, zt = { class: "fd-card-title" }, Jt = { class: "fd-card-body" }, Wt = /* @__PURE__ */ N({
|
|
292
292
|
__name: "CardRender",
|
|
293
293
|
props: {
|
|
294
294
|
node: {},
|
|
@@ -306,9 +306,9 @@ const jt = {
|
|
|
306
306
|
e.node.icon ? (d(), c("span", {
|
|
307
307
|
key: 0,
|
|
308
308
|
class: "fd-card-icon",
|
|
309
|
-
style:
|
|
309
|
+
style: q({ background: e.node.iconBgColor || void 0 })
|
|
310
310
|
}, [
|
|
311
|
-
F(
|
|
311
|
+
F(me, {
|
|
312
312
|
name: e.node.icon,
|
|
313
313
|
size: 18
|
|
314
314
|
}, null, 8, ["name"])
|
|
@@ -329,15 +329,15 @@ const jt = {
|
|
|
329
329
|
], -1)
|
|
330
330
|
])], 2)
|
|
331
331
|
]),
|
|
332
|
-
|
|
333
|
-
|
|
332
|
+
de(t("div", Jt, [
|
|
333
|
+
Z(s.$slots, "children", {}, void 0, !0)
|
|
334
334
|
], 512), [
|
|
335
|
-
[
|
|
335
|
+
[ye, o.value]
|
|
336
336
|
])
|
|
337
337
|
]));
|
|
338
338
|
};
|
|
339
339
|
}
|
|
340
|
-
}), Ht = /* @__PURE__ */ P(Wt, [["__scopeId", "data-v-bc2f6273"]]), Gt = ["disabled", "aria-checked"], qt = /* @__PURE__ */
|
|
340
|
+
}), Ht = /* @__PURE__ */ P(Wt, [["__scopeId", "data-v-bc2f6273"]]), Gt = ["disabled", "aria-checked"], qt = /* @__PURE__ */ N({
|
|
341
341
|
__name: "FdSwitch",
|
|
342
342
|
props: {
|
|
343
343
|
modelValue: { type: Boolean },
|
|
@@ -357,7 +357,7 @@ const jt = {
|
|
|
357
357
|
t("span", { class: "fd-switch-dot" }, null, -1)
|
|
358
358
|
])], 10, Gt));
|
|
359
359
|
}
|
|
360
|
-
}),
|
|
360
|
+
}), re = /* @__PURE__ */ P(qt, [["__scopeId", "data-v-eac909bd"]]), Yt = [
|
|
361
361
|
// 卡片 / 布局通用
|
|
362
362
|
"LayoutGrid",
|
|
363
363
|
"PanelTop",
|
|
@@ -411,7 +411,7 @@ const jt = {
|
|
|
411
411
|
], Kt = { class: "fd-panel" }, Qt = { class: "fd-panel-item" }, Xt = ["value"], Zt = { class: "fd-panel-item" }, en = { class: "fd-icon-picker" }, tn = {
|
|
412
412
|
key: 1,
|
|
413
413
|
class: "fd-icon-placeholder"
|
|
414
|
-
}, nn = { class: "fd-icon-grid" }, on = ["title", "onClick"], sn = { class: "fd-panel-item" }, ln = ["value"], an = { class: "fd-panel-item fd-panel-item--row" }, dn = { class: "fd-panel-item" }, rn = ["value"], un = /* @__PURE__ */
|
|
414
|
+
}, nn = { class: "fd-icon-grid" }, on = ["title", "onClick"], sn = { class: "fd-panel-item" }, ln = ["value"], an = { class: "fd-panel-item fd-panel-item--row" }, dn = { class: "fd-panel-item" }, rn = ["value"], un = /* @__PURE__ */ N({
|
|
415
415
|
__name: "CardPanel",
|
|
416
416
|
props: {
|
|
417
417
|
node: {},
|
|
@@ -439,7 +439,7 @@ const jt = {
|
|
|
439
439
|
class: "fd-icon-trigger",
|
|
440
440
|
onClick: u[1] || (u[1] = (r) => s.value = !s.value)
|
|
441
441
|
}, [
|
|
442
|
-
e.node.icon ? (d(), R(
|
|
442
|
+
e.node.icon ? (d(), R(me, {
|
|
443
443
|
key: 0,
|
|
444
444
|
name: e.node.icon,
|
|
445
445
|
size: 16
|
|
@@ -471,14 +471,14 @@ const jt = {
|
|
|
471
471
|
}, [...u[9] || (u[9] = [
|
|
472
472
|
t("span", { class: "fd-icon-none" }, "无", -1)
|
|
473
473
|
])], 2),
|
|
474
|
-
(d(!0), c(L, null,
|
|
474
|
+
(d(!0), c(L, null, E(h(Yt), (r) => (d(), c("button", {
|
|
475
475
|
key: r,
|
|
476
476
|
type: "button",
|
|
477
477
|
class: j(["fd-icon-option", { active: e.node.icon === r }]),
|
|
478
478
|
title: r,
|
|
479
479
|
onClick: (l) => i(r)
|
|
480
480
|
}, [
|
|
481
|
-
F(
|
|
481
|
+
F(me, {
|
|
482
482
|
name: r,
|
|
483
483
|
size: 18
|
|
484
484
|
}, null, 8, ["name"])
|
|
@@ -496,7 +496,7 @@ const jt = {
|
|
|
496
496
|
]),
|
|
497
497
|
t("div", an, [
|
|
498
498
|
u[12] || (u[12] = t("label", null, "初始展开", -1)),
|
|
499
|
-
F(
|
|
499
|
+
F(re, {
|
|
500
500
|
"model-value": e.node.expanded,
|
|
501
501
|
"onUpdate:modelValue": u[5] || (u[5] = (r) => o("update", { expanded: r }))
|
|
502
502
|
}, null, 8, ["model-value"])
|
|
@@ -530,7 +530,7 @@ const jt = {
|
|
|
530
530
|
children: []
|
|
531
531
|
}),
|
|
532
532
|
serialize: (e) => e
|
|
533
|
-
}, mn = { class: "fd-slot-design" }, pn = { class: "fd-slot-hint" }, vn = /* @__PURE__ */
|
|
533
|
+
}, mn = { class: "fd-slot-design" }, pn = { class: "fd-slot-hint" }, vn = /* @__PURE__ */ N({
|
|
534
534
|
__name: "SlotDesign",
|
|
535
535
|
props: {
|
|
536
536
|
node: {}
|
|
@@ -538,8 +538,8 @@ const jt = {
|
|
|
538
538
|
setup(e) {
|
|
539
539
|
return (n, o) => (d(), c("div", mn, [
|
|
540
540
|
o[0] || (o[0] = t("span", { class: "fd-slot-tag" }, "插槽", -1)),
|
|
541
|
-
|
|
542
|
-
[
|
|
541
|
+
de(t("span", { class: "fd-slot-name" }, k(e.node.label || "未命名插槽"), 513), [
|
|
542
|
+
[ye, !["", "插", "插槽"].includes(e.node.label)]
|
|
543
543
|
]),
|
|
544
544
|
t("span", pn, "宿主注入:" + k(e.node.slotName), 1)
|
|
545
545
|
]));
|
|
@@ -547,7 +547,7 @@ const jt = {
|
|
|
547
547
|
}), bn = /* @__PURE__ */ P(vn, [["__scopeId", "data-v-b1a912fb"]]), gn = {
|
|
548
548
|
key: 0,
|
|
549
549
|
class: "fd-slot-render"
|
|
550
|
-
}, hn =
|
|
550
|
+
}, hn = /* @__PURE__ */ N({
|
|
551
551
|
__name: "SlotRender",
|
|
552
552
|
props: {
|
|
553
553
|
node: {},
|
|
@@ -559,18 +559,16 @@ const jt = {
|
|
|
559
559
|
return (n, o) => {
|
|
560
560
|
var s;
|
|
561
561
|
return h(Ve)(e.node.hiddenMode, (s = e.formData) == null ? void 0 : s.status) ? T("", !0) : (d(), c("div", gn, [
|
|
562
|
-
|
|
562
|
+
Z(n.$slots, e.node.slotName, {
|
|
563
563
|
node: e.node,
|
|
564
564
|
formData: e.formData,
|
|
565
565
|
mode: e.mode,
|
|
566
566
|
formId: e.formId
|
|
567
|
-
},
|
|
568
|
-
t("div", hn, "未注入插槽:" + k(e.node.slotName), 1)
|
|
569
|
-
], !0)
|
|
567
|
+
}, void 0, !0)
|
|
570
568
|
]));
|
|
571
569
|
};
|
|
572
570
|
}
|
|
573
|
-
}),
|
|
571
|
+
}), yn = /* @__PURE__ */ P(hn, [["__scopeId", "data-v-19b90209"]]), kn = [
|
|
574
572
|
"header",
|
|
575
573
|
"base-info",
|
|
576
574
|
"shop-tuning",
|
|
@@ -586,7 +584,7 @@ const jt = {
|
|
|
586
584
|
"approval-opinion",
|
|
587
585
|
"related-flows",
|
|
588
586
|
"footer"
|
|
589
|
-
],
|
|
587
|
+
], be = {
|
|
590
588
|
header: "页面头部",
|
|
591
589
|
"base-info": "基础信息",
|
|
592
590
|
"shop-tuning": "招调信息",
|
|
@@ -602,7 +600,7 @@ const jt = {
|
|
|
602
600
|
"approval-opinion": "审批意见",
|
|
603
601
|
"related-flows": "相关流程",
|
|
604
602
|
footer: "页面底部"
|
|
605
|
-
},
|
|
603
|
+
}, wn = { class: "fd-panel" }, $n = { class: "fd-panel-item" }, xn = ["value"], Cn = { class: "fd-panel-item" }, Ne = "插槽", _n = /* @__PURE__ */ N({
|
|
606
604
|
__name: "SlotPanel",
|
|
607
605
|
props: {
|
|
608
606
|
node: {},
|
|
@@ -610,37 +608,37 @@ const jt = {
|
|
|
610
608
|
},
|
|
611
609
|
emits: ["update"],
|
|
612
610
|
setup(e, { emit: n }) {
|
|
613
|
-
const o = e, s = n, i =
|
|
611
|
+
const o = e, s = n, i = Y(), a = O([]);
|
|
614
612
|
function u(p, y) {
|
|
615
613
|
p.forEach((C) => {
|
|
616
614
|
var B;
|
|
617
615
|
C.type === "slot" && C.slotName && y.add(C.slotName), (B = C.children) != null && B.length && u(C.children, y);
|
|
618
616
|
});
|
|
619
617
|
}
|
|
620
|
-
const r =
|
|
621
|
-
const p = new Set(
|
|
618
|
+
const r = M(() => {
|
|
619
|
+
const p = new Set(kn);
|
|
622
620
|
return u(i.widgets, p), a.value.forEach((y) => y && p.add(y)), [...p];
|
|
623
|
-
}), l =
|
|
624
|
-
() => o.node.label ||
|
|
621
|
+
}), l = M(
|
|
622
|
+
() => o.node.label || be[o.node.slotName || ""] || Ne
|
|
625
623
|
);
|
|
626
624
|
function m(p) {
|
|
627
625
|
const y = p ?? "";
|
|
628
626
|
y && !r.value.includes(y) && a.value.push(y), s("update", {
|
|
629
627
|
slotName: y,
|
|
630
|
-
label:
|
|
628
|
+
label: be[y] || Ne
|
|
631
629
|
});
|
|
632
630
|
}
|
|
633
|
-
return (p, y) => (d(), c("div",
|
|
634
|
-
t("div",
|
|
631
|
+
return (p, y) => (d(), c("div", wn, [
|
|
632
|
+
t("div", $n, [
|
|
635
633
|
y[1] || (y[1] = t("label", null, "标题", -1)),
|
|
636
634
|
t("input", {
|
|
637
635
|
value: l.value,
|
|
638
636
|
onInput: y[0] || (y[0] = (C) => s("update", { label: C.target.value }))
|
|
639
|
-
}, null, 40,
|
|
637
|
+
}, null, 40, xn)
|
|
640
638
|
]),
|
|
641
|
-
t("div",
|
|
639
|
+
t("div", Cn, [
|
|
642
640
|
y[2] || (y[2] = t("label", null, "插槽名", -1)),
|
|
643
|
-
F(h(
|
|
641
|
+
F(h(fe), {
|
|
644
642
|
"model-value": e.node.slotName,
|
|
645
643
|
filterable: "",
|
|
646
644
|
"allow-create": "",
|
|
@@ -651,13 +649,13 @@ const jt = {
|
|
|
651
649
|
"onUpdate:modelValue": m
|
|
652
650
|
}, {
|
|
653
651
|
default: A(() => [
|
|
654
|
-
(d(!0), c(L, null,
|
|
652
|
+
(d(!0), c(L, null, E(r.value, (C) => (d(), R(h(te), {
|
|
655
653
|
key: C,
|
|
656
654
|
label: C,
|
|
657
655
|
value: C
|
|
658
656
|
}, {
|
|
659
657
|
default: A(() => [
|
|
660
|
-
U(k(h(
|
|
658
|
+
U(k(h(be)[C] ? `${h(be)[C]}(${C})` : C), 1)
|
|
661
659
|
]),
|
|
662
660
|
_: 2
|
|
663
661
|
}, 1032, ["label", "value"]))), 128))
|
|
@@ -667,12 +665,12 @@ const jt = {
|
|
|
667
665
|
])
|
|
668
666
|
]));
|
|
669
667
|
}
|
|
670
|
-
}),
|
|
668
|
+
}), In = /* @__PURE__ */ P(_n, [["__scopeId", "data-v-56e42d3f"]]), Sn = {
|
|
671
669
|
type: "slot",
|
|
672
670
|
title: "插槽",
|
|
673
671
|
design: bn,
|
|
674
|
-
render:
|
|
675
|
-
panel:
|
|
672
|
+
render: yn,
|
|
673
|
+
panel: In,
|
|
676
674
|
isContainer: !1,
|
|
677
675
|
createDefaultProps: () => ({
|
|
678
676
|
id: "",
|
|
@@ -684,102 +682,102 @@ const jt = {
|
|
|
684
682
|
hiddenMode: "none"
|
|
685
683
|
}),
|
|
686
684
|
serialize: (e) => e
|
|
687
|
-
},
|
|
685
|
+
}, Dn = { class: "fd-st-design" }, Tn = {
|
|
688
686
|
key: 0,
|
|
689
687
|
class: "fd-st-table-wrap"
|
|
690
|
-
},
|
|
688
|
+
}, Ln = { class: "fd-st-table" }, Fn = {
|
|
691
689
|
key: 0,
|
|
692
690
|
class: "fd-st-seq"
|
|
693
|
-
},
|
|
691
|
+
}, Nn = {
|
|
694
692
|
key: 0,
|
|
695
693
|
class: "fd-st-seq"
|
|
696
|
-
},
|
|
694
|
+
}, Mn = {
|
|
697
695
|
key: 1,
|
|
698
696
|
class: "fd-st-cards"
|
|
699
|
-
},
|
|
697
|
+
}, En = { class: "fd-st-card" }, Pn = { class: "fd-st-card-label" }, On = {
|
|
700
698
|
key: 0,
|
|
701
699
|
class: "fd-st-cards-empty"
|
|
702
|
-
},
|
|
700
|
+
}, Un = /* @__PURE__ */ N({
|
|
703
701
|
__name: "SubtableDesign",
|
|
704
702
|
props: {
|
|
705
703
|
node: {}
|
|
706
704
|
},
|
|
707
705
|
setup(e) {
|
|
708
|
-
const n = e, o =
|
|
709
|
-
return (s, i) => (d(), c("div",
|
|
710
|
-
o.value ? (d(), c("div",
|
|
711
|
-
t("table",
|
|
706
|
+
const n = e, o = M(() => n.node.tablestyle !== "cards");
|
|
707
|
+
return (s, i) => (d(), c("div", Dn, [
|
|
708
|
+
o.value ? (d(), c("div", Tn, [
|
|
709
|
+
t("table", Ln, [
|
|
712
710
|
t("thead", null, [
|
|
713
711
|
t("tr", null, [
|
|
714
|
-
e.node.secondtableindex === "1" ? (d(), c("th",
|
|
715
|
-
(d(!0), c(L, null,
|
|
712
|
+
e.node.secondtableindex === "1" ? (d(), c("th", Fn, "序号")) : T("", !0),
|
|
713
|
+
(d(!0), c(L, null, E(e.node.colnums.filter((a) => a.isshow === 1), (a) => (d(), c("th", {
|
|
716
714
|
key: a.name,
|
|
717
|
-
style:
|
|
715
|
+
style: q({ width: a.showwidth || void 0 })
|
|
718
716
|
}, k(a.showname || a.major || a.name), 5))), 128))
|
|
719
717
|
])
|
|
720
718
|
]),
|
|
721
719
|
t("tbody", null, [
|
|
722
720
|
t("tr", null, [
|
|
723
|
-
e.node.secondtableindex === "1" ? (d(), c("td",
|
|
724
|
-
(d(!0), c(L, null,
|
|
721
|
+
e.node.secondtableindex === "1" ? (d(), c("td", Nn, "1")) : T("", !0),
|
|
722
|
+
(d(!0), c(L, null, E(e.node.colnums.filter((a) => a.isshow === 1), (a) => (d(), c("td", {
|
|
725
723
|
key: a.name,
|
|
726
724
|
class: j(["fd-st-cell", { "fd-st-cell--link": !!a.bindLink }])
|
|
727
725
|
}, k(a.name), 3))), 128))
|
|
728
726
|
])
|
|
729
727
|
])
|
|
730
728
|
])
|
|
731
|
-
])) : (d(), c("div",
|
|
732
|
-
t("div",
|
|
733
|
-
(d(!0), c(L, null,
|
|
729
|
+
])) : (d(), c("div", Mn, [
|
|
730
|
+
t("div", En, [
|
|
731
|
+
(d(!0), c(L, null, E(e.node.colnums.filter((a) => a.isshow === 1), (a) => (d(), c("div", {
|
|
734
732
|
key: a.name,
|
|
735
733
|
class: "fd-st-card-row"
|
|
736
734
|
}, [
|
|
737
|
-
t("span",
|
|
735
|
+
t("span", Pn, k(a.showname || a.major), 1),
|
|
738
736
|
t("span", {
|
|
739
737
|
class: j(["fd-st-card-value", { "fd-st-card-value--link": !!a.bindLink }])
|
|
740
738
|
}, k(a.name), 3)
|
|
741
739
|
]))), 128))
|
|
742
740
|
]),
|
|
743
|
-
e.node.colnums.filter((a) => a.isshow === 1).length === 0 ? (d(), c("div",
|
|
741
|
+
e.node.colnums.filter((a) => a.isshow === 1).length === 0 ? (d(), c("div", On, " 暂无列配置 ")) : T("", !0)
|
|
744
742
|
]))
|
|
745
743
|
]));
|
|
746
744
|
}
|
|
747
|
-
}),
|
|
745
|
+
}), Bn = /* @__PURE__ */ P(Un, [["__scopeId", "data-v-aba8caec"]]), Rn = ["subtable-key"], Vn = {
|
|
748
746
|
key: 0,
|
|
749
747
|
class: "fd-st-table-wrap"
|
|
750
|
-
},
|
|
748
|
+
}, An = { class: "fd-st-table" }, jn = {
|
|
751
749
|
key: 0,
|
|
752
750
|
class: "fd-st-seq"
|
|
753
|
-
},
|
|
751
|
+
}, zn = ["subtable-val"], Jn = {
|
|
754
752
|
key: 1,
|
|
755
753
|
class: "fd-st-op"
|
|
756
|
-
},
|
|
754
|
+
}, Wn = {
|
|
757
755
|
key: 0,
|
|
758
756
|
class: "fd-st-seq"
|
|
759
|
-
},
|
|
757
|
+
}, Hn = ["rowspan", "subtable-val"], Gn = ["href"], qn = {
|
|
760
758
|
key: 1,
|
|
761
759
|
class: "fd-st-op"
|
|
762
|
-
},
|
|
760
|
+
}, Yn = ["onClick"], Kn = { key: 0 }, Qn = ["colspan"], Xn = {
|
|
763
761
|
key: 1,
|
|
764
762
|
class: "fd-st-cards"
|
|
765
|
-
},
|
|
763
|
+
}, Zn = { class: "fd-st-card-label" }, eo = ["subtable-val"], to = ["href"], no = {
|
|
766
764
|
key: 0,
|
|
767
765
|
class: "fd-st-card-actions"
|
|
768
|
-
},
|
|
766
|
+
}, oo = ["onClick"], so = {
|
|
769
767
|
key: 0,
|
|
770
768
|
class: "fd-st-cards-empty"
|
|
771
|
-
},
|
|
769
|
+
}, lo = /* @__PURE__ */ N({
|
|
772
770
|
__name: "SubtableRender",
|
|
773
771
|
props: {
|
|
774
772
|
node: {},
|
|
775
773
|
formData: {}
|
|
776
774
|
},
|
|
777
775
|
setup(e) {
|
|
778
|
-
const n = e, o =
|
|
776
|
+
const n = e, o = M(() => n.node.colnums.filter((_) => _.isshow === 1)), s = M(() => n.node.isreadonly === "1"), i = M(() => {
|
|
779
777
|
var D;
|
|
780
778
|
const _ = (D = n.formData) == null ? void 0 : D[n.node.secondtable];
|
|
781
779
|
return Array.isArray(_) ? _ : [];
|
|
782
|
-
}), a =
|
|
780
|
+
}), a = M(() => !(n.node.nodatahidetable === "1" && i.value.length === 0)), u = M(() => n.node.tablestyle !== "cards");
|
|
783
781
|
function r() {
|
|
784
782
|
if (s.value) return;
|
|
785
783
|
const _ = {};
|
|
@@ -795,15 +793,15 @@ const jt = {
|
|
|
795
793
|
function p(_, D) {
|
|
796
794
|
return _.bindLink ? m(D, _.bindLink) : "";
|
|
797
795
|
}
|
|
798
|
-
const y =
|
|
796
|
+
const y = M(() => {
|
|
799
797
|
const _ = i.value, D = [], v = [];
|
|
800
798
|
return o.value.forEach((g, $) => {
|
|
801
799
|
D[$] = [], v[$] = [];
|
|
802
800
|
const V = g.issamecolmerge === 1;
|
|
803
|
-
let
|
|
801
|
+
let K = 0;
|
|
804
802
|
for (let x = 0; x < _.length; x++) {
|
|
805
803
|
const b = m(_[x], g.name);
|
|
806
|
-
V && x > 0 && b === m(_[x - 1], g.name) ? (v[$][x] = !0, D[$][
|
|
804
|
+
V && x > 0 && b === m(_[x - 1], g.name) ? (v[$][x] = !0, D[$][K] += 1) : (v[$][x] = !1, D[$][x] = 1, K = x);
|
|
807
805
|
}
|
|
808
806
|
}), { spans: D, skipped: v };
|
|
809
807
|
});
|
|
@@ -821,30 +819,30 @@ const jt = {
|
|
|
821
819
|
class: "fd-st-render",
|
|
822
820
|
"subtable-key": e.node.secondtable
|
|
823
821
|
}, [
|
|
824
|
-
u.value ? (d(), c("div",
|
|
825
|
-
t("table",
|
|
822
|
+
u.value ? (d(), c("div", Vn, [
|
|
823
|
+
t("table", An, [
|
|
826
824
|
t("thead", null, [
|
|
827
825
|
t("tr", null, [
|
|
828
|
-
e.node.secondtableindex === "1" ? (d(), c("th",
|
|
829
|
-
(d(!0), c(L, null,
|
|
826
|
+
e.node.secondtableindex === "1" ? (d(), c("th", jn, "序号")) : T("", !0),
|
|
827
|
+
(d(!0), c(L, null, E(o.value, (v) => (d(), c("th", {
|
|
830
828
|
key: v.name,
|
|
831
829
|
"subtable-val": v.name,
|
|
832
|
-
style:
|
|
833
|
-
}, k(v.showname || v.major || v.name), 13,
|
|
834
|
-
s.value ? T("", !0) : (d(), c("th",
|
|
830
|
+
style: q({ width: v.showwidth || void 0, textAlign: v.align || "left" })
|
|
831
|
+
}, k(v.showname || v.major || v.name), 13, zn))), 128)),
|
|
832
|
+
s.value ? T("", !0) : (d(), c("th", Jn, "操作"))
|
|
835
833
|
])
|
|
836
834
|
]),
|
|
837
835
|
t("tbody", null, [
|
|
838
|
-
(d(!0), c(L, null,
|
|
839
|
-
e.node.secondtableindex === "1" ? (d(), c("td",
|
|
840
|
-
(d(!0), c(L, null,
|
|
836
|
+
(d(!0), c(L, null, E(i.value, (v, g) => (d(), c("tr", { key: g }, [
|
|
837
|
+
e.node.secondtableindex === "1" ? (d(), c("td", Wn, k(g + 1), 1)) : T("", !0),
|
|
838
|
+
(d(!0), c(L, null, E(o.value, ($, V) => (d(), c(L, {
|
|
841
839
|
key: $.name
|
|
842
840
|
}, [
|
|
843
841
|
C(V, g) ? T("", !0) : (d(), c("td", {
|
|
844
842
|
key: 0,
|
|
845
843
|
rowspan: B(V, g),
|
|
846
844
|
"subtable-val": $.name,
|
|
847
|
-
style:
|
|
845
|
+
style: q({ textAlign: $.align || "left", color: $.prospect || void 0, background: $.background || void 0 })
|
|
848
846
|
}, [
|
|
849
847
|
p($, v) ? (d(), c("a", {
|
|
850
848
|
key: 0,
|
|
@@ -852,36 +850,36 @@ const jt = {
|
|
|
852
850
|
href: p($, v),
|
|
853
851
|
target: "_blank",
|
|
854
852
|
rel: "noopener noreferrer"
|
|
855
|
-
}, k(m(v, $.name)), 9,
|
|
853
|
+
}, k(m(v, $.name)), 9, Gn)) : (d(), c(L, { key: 1 }, [
|
|
856
854
|
U(k(m(v, $.name)), 1)
|
|
857
855
|
], 64))
|
|
858
|
-
], 12,
|
|
856
|
+
], 12, Hn))
|
|
859
857
|
], 64))), 128)),
|
|
860
|
-
s.value ? T("", !0) : (d(), c("td",
|
|
858
|
+
s.value ? T("", !0) : (d(), c("td", qn, [
|
|
861
859
|
t("button", {
|
|
862
860
|
class: "fd-btn fd-btn--danger",
|
|
863
861
|
onClick: ($) => l(g)
|
|
864
|
-
}, "删除", 8,
|
|
862
|
+
}, "删除", 8, Yn)
|
|
865
863
|
]))
|
|
866
864
|
]))), 128)),
|
|
867
|
-
i.value.length === 0 ? (d(), c("tr",
|
|
865
|
+
i.value.length === 0 ? (d(), c("tr", Kn, [
|
|
868
866
|
t("td", {
|
|
869
867
|
colspan: o.value.length + (e.node.secondtableindex === "1" ? 1 : 0) + (s.value ? 0 : 1),
|
|
870
868
|
class: "fd-st-empty"
|
|
871
|
-
}, k(e.node.nodatatitle === "1" ? "暂无数据" : ""), 9,
|
|
869
|
+
}, k(e.node.nodatatitle === "1" ? "暂无数据" : ""), 9, Qn)
|
|
872
870
|
])) : T("", !0)
|
|
873
871
|
])
|
|
874
872
|
])
|
|
875
|
-
])) : (d(), c("div",
|
|
876
|
-
(d(!0), c(L, null,
|
|
873
|
+
])) : (d(), c("div", Xn, [
|
|
874
|
+
(d(!0), c(L, null, E(i.value, (v, g) => (d(), c("div", {
|
|
877
875
|
key: g,
|
|
878
876
|
class: "fd-st-card"
|
|
879
877
|
}, [
|
|
880
|
-
(d(!0), c(L, null,
|
|
878
|
+
(d(!0), c(L, null, E(o.value, ($) => (d(), c("div", {
|
|
881
879
|
key: $.name,
|
|
882
880
|
class: "fd-st-card-row"
|
|
883
881
|
}, [
|
|
884
|
-
t("span",
|
|
882
|
+
t("span", Zn, k($.showname || $.major || $.name), 1),
|
|
885
883
|
t("span", {
|
|
886
884
|
class: "fd-st-card-value",
|
|
887
885
|
"subtable-val": $.name
|
|
@@ -892,29 +890,29 @@ const jt = {
|
|
|
892
890
|
href: p($, v),
|
|
893
891
|
target: "_blank",
|
|
894
892
|
rel: "noopener noreferrer"
|
|
895
|
-
}, k(m(v, $.name)), 9,
|
|
893
|
+
}, k(m(v, $.name)), 9, to)) : (d(), c(L, { key: 1 }, [
|
|
896
894
|
U(k(m(v, $.name)), 1)
|
|
897
895
|
], 64))
|
|
898
|
-
], 8,
|
|
896
|
+
], 8, eo)
|
|
899
897
|
]))), 128)),
|
|
900
|
-
s.value ? T("", !0) : (d(), c("div",
|
|
898
|
+
s.value ? T("", !0) : (d(), c("div", no, [
|
|
901
899
|
t("button", {
|
|
902
900
|
class: "fd-btn fd-btn--danger fd-btn--sm",
|
|
903
901
|
onClick: ($) => l(g)
|
|
904
|
-
}, "删除", 8,
|
|
902
|
+
}, "删除", 8, oo)
|
|
905
903
|
]))
|
|
906
904
|
]))), 128)),
|
|
907
|
-
i.value.length === 0 ? (d(), c("div",
|
|
905
|
+
i.value.length === 0 ? (d(), c("div", so, k(e.node.nodatatitle === "1" ? "暂无数据" : ""), 1)) : T("", !0)
|
|
908
906
|
])),
|
|
909
907
|
s.value ? T("", !0) : (d(), c("button", {
|
|
910
908
|
key: 2,
|
|
911
909
|
class: "fd-btn fd-btn--primary fd-st-add",
|
|
912
910
|
onClick: r
|
|
913
911
|
}, "新增一行"))
|
|
914
|
-
], 8,
|
|
912
|
+
], 8, Rn)) : T("", !0);
|
|
915
913
|
}
|
|
916
|
-
}),
|
|
917
|
-
function
|
|
914
|
+
}), io = /* @__PURE__ */ P(lo, [["__scopeId", "data-v-eda3f0fb"]]);
|
|
915
|
+
function ao(e) {
|
|
918
916
|
return e.fields.map((n, o) => {
|
|
919
917
|
const s = n.dataType === "file", i = n.dataType === "link";
|
|
920
918
|
return {
|
|
@@ -938,13 +936,13 @@ function ro(e) {
|
|
|
938
936
|
};
|
|
939
937
|
});
|
|
940
938
|
}
|
|
941
|
-
const
|
|
939
|
+
const ro = { class: "fd-panel" }, uo = { class: "fd-panel-item" }, co = { class: "fd-panel-item fd-panel-item--row" }, fo = { class: "fd-panel-item fd-panel-item--row" }, mo = { class: "fd-panel-item" }, po = { class: "fd-panel-item" }, vo = { class: "fd-cols-head" }, bo = {
|
|
942
940
|
key: 0,
|
|
943
941
|
class: "fd-cols-empty"
|
|
944
|
-
},
|
|
942
|
+
}, go = { class: "fd-col-card-top" }, ho = { class: "fd-col-order" }, yo = { class: "fd-col-meta" }, ko = { class: "fd-col-title" }, wo = { class: "fd-col-name-sub" }, $o = { class: "fd-col-tag" }, xo = { class: "fd-col-card-bottom" }, Co = { class: "fd-col-switch" }, _o = { class: "fd-col-actions" }, Io = ["onClick"], So = ["onClick"], Do = {
|
|
945
943
|
class: "fd-dialog",
|
|
946
944
|
style: { "max-width": "560px" }
|
|
947
|
-
},
|
|
945
|
+
}, To = { class: "fd-dialog-head" }, Lo = { class: "fd-dialog-body" }, Fo = { class: "fd-form-section" }, No = { class: "fd-form-grid" }, Mo = { class: "fd-form-item" }, Eo = ["value"], Po = ["value"], Oo = { class: "fd-form-item" }, Uo = ["value"], Bo = { class: "fd-form-item" }, Ro = ["value"], Vo = { class: "fd-form-item" }, Ao = ["value"], jo = { class: "fd-form-section" }, zo = { class: "fd-form-grid" }, Jo = { class: "fd-form-item" }, Wo = ["value"], Ho = { class: "fd-form-item" }, Go = ["value"], qo = { class: "fd-form-item" }, Yo = { class: "fd-color-row" }, Ko = ["value"], Qo = ["value"], Xo = { class: "fd-form-item" }, Zo = { class: "fd-color-row" }, es = ["value"], ts = ["value"], ns = { class: "fd-form-section" }, os = { class: "fd-form-grid" }, ss = { class: "fd-form-item" }, ls = { class: "fd-form-item" }, is = ["value"], as = /* @__PURE__ */ N({
|
|
948
946
|
__name: "SubtablePanel",
|
|
949
947
|
props: {
|
|
950
948
|
node: {},
|
|
@@ -952,13 +950,13 @@ const uo = { class: "fd-panel" }, co = { class: "fd-panel-item" }, fo = { class:
|
|
|
952
950
|
},
|
|
953
951
|
emits: ["update"],
|
|
954
952
|
setup(e, { emit: n }) {
|
|
955
|
-
const o = e, s = n, i =
|
|
953
|
+
const o = e, s = n, i = Y(), a = M(() => i.subTables);
|
|
956
954
|
function u(x, b) {
|
|
957
955
|
s("update", { [x]: b });
|
|
958
956
|
}
|
|
959
957
|
function r(x) {
|
|
960
958
|
const b = x ?? "", w = i.subTables.find((se) => se.name === b), W = { secondtable: b };
|
|
961
|
-
w && (W.displaytitle = w.label, W.colnums =
|
|
959
|
+
w && (W.displaytitle = w.label, W.colnums = ao(w)), s("update", W);
|
|
962
960
|
}
|
|
963
961
|
const l = Ue({
|
|
964
962
|
open: !1,
|
|
@@ -1015,7 +1013,7 @@ const uo = { class: "fd-panel" }, co = { class: "fd-panel-item" }, fo = { class:
|
|
|
1015
1013
|
function g(x, b) {
|
|
1016
1014
|
l.draft && (l.draft[x] = b.target.value);
|
|
1017
1015
|
}
|
|
1018
|
-
const $ =
|
|
1016
|
+
const $ = M(() => {
|
|
1019
1017
|
var x;
|
|
1020
1018
|
return ((x = i.subTables.find((b) => b.name === o.node.secondtable)) == null ? void 0 : x.fields) ?? [];
|
|
1021
1019
|
});
|
|
@@ -1030,14 +1028,14 @@ const uo = { class: "fd-panel" }, co = { class: "fd-panel-item" }, fo = { class:
|
|
|
1030
1028
|
l.draft.editmode.editmode = W ? "files" : "text", l.draft.editmode.title = W ? "文件" : "文本", l.draft.bindLink = w.dataType === "link" ? b : "";
|
|
1031
1029
|
}
|
|
1032
1030
|
}
|
|
1033
|
-
function
|
|
1031
|
+
function K(x) {
|
|
1034
1032
|
u("tablestyle", x || "table");
|
|
1035
1033
|
}
|
|
1036
1034
|
return (x, b) => (d(), c(L, null, [
|
|
1037
|
-
t("div",
|
|
1038
|
-
t("div",
|
|
1035
|
+
t("div", ro, [
|
|
1036
|
+
t("div", uo, [
|
|
1039
1037
|
b[13] || (b[13] = t("label", null, "选择子表", -1)),
|
|
1040
|
-
F(h(
|
|
1038
|
+
F(h(fe), {
|
|
1041
1039
|
"model-value": e.node.secondtable,
|
|
1042
1040
|
filterable: "",
|
|
1043
1041
|
clearable: "",
|
|
@@ -1046,7 +1044,7 @@ const uo = { class: "fd-panel" }, co = { class: "fd-panel-item" }, fo = { class:
|
|
|
1046
1044
|
"onUpdate:modelValue": r
|
|
1047
1045
|
}, {
|
|
1048
1046
|
default: A(() => [
|
|
1049
|
-
(d(!0), c(L, null,
|
|
1047
|
+
(d(!0), c(L, null, E(a.value, (w) => (d(), R(h(te), {
|
|
1050
1048
|
key: w.name,
|
|
1051
1049
|
label: `${w.label}(${w.name})`,
|
|
1052
1050
|
value: w.name
|
|
@@ -1055,33 +1053,33 @@ const uo = { class: "fd-panel" }, co = { class: "fd-panel-item" }, fo = { class:
|
|
|
1055
1053
|
_: 1
|
|
1056
1054
|
}, 8, ["model-value"])
|
|
1057
1055
|
]),
|
|
1058
|
-
t("div",
|
|
1056
|
+
t("div", co, [
|
|
1059
1057
|
b[14] || (b[14] = t("label", null, "只读", -1)),
|
|
1060
|
-
F(
|
|
1058
|
+
F(re, {
|
|
1061
1059
|
"model-value": e.node.isreadonly === "1",
|
|
1062
1060
|
"onUpdate:modelValue": b[0] || (b[0] = (w) => u("isreadonly", w ? "1" : "0"))
|
|
1063
1061
|
}, null, 8, ["model-value"])
|
|
1064
1062
|
]),
|
|
1065
|
-
t("div",
|
|
1063
|
+
t("div", fo, [
|
|
1066
1064
|
b[15] || (b[15] = t("label", null, "序号列", -1)),
|
|
1067
|
-
F(
|
|
1065
|
+
F(re, {
|
|
1068
1066
|
"model-value": e.node.secondtableindex === "1",
|
|
1069
1067
|
"onUpdate:modelValue": b[1] || (b[1] = (w) => u("secondtableindex", w ? "1" : "0"))
|
|
1070
1068
|
}, null, 8, ["model-value"])
|
|
1071
1069
|
]),
|
|
1072
|
-
t("div",
|
|
1070
|
+
t("div", mo, [
|
|
1073
1071
|
b[16] || (b[16] = t("label", null, "表格样式", -1)),
|
|
1074
|
-
F(h(
|
|
1072
|
+
F(h(fe), {
|
|
1075
1073
|
"model-value": e.node.tablestyle || "table",
|
|
1076
1074
|
style: { width: "100%" },
|
|
1077
|
-
"onUpdate:modelValue":
|
|
1075
|
+
"onUpdate:modelValue": K
|
|
1078
1076
|
}, {
|
|
1079
1077
|
default: A(() => [
|
|
1080
|
-
F(h(
|
|
1078
|
+
F(h(te), {
|
|
1081
1079
|
label: "表格",
|
|
1082
1080
|
value: "table"
|
|
1083
1081
|
}),
|
|
1084
|
-
F(h(
|
|
1082
|
+
F(h(te), {
|
|
1085
1083
|
label: "卡片列表",
|
|
1086
1084
|
value: "cards"
|
|
1087
1085
|
})
|
|
@@ -1089,44 +1087,44 @@ const uo = { class: "fd-panel" }, co = { class: "fd-panel-item" }, fo = { class:
|
|
|
1089
1087
|
_: 1
|
|
1090
1088
|
}, 8, ["model-value"])
|
|
1091
1089
|
]),
|
|
1092
|
-
t("div",
|
|
1093
|
-
t("div",
|
|
1090
|
+
t("div", po, [
|
|
1091
|
+
t("div", vo, [
|
|
1094
1092
|
t("span", null, "列配置(" + k(e.node.colnums.length) + ")", 1),
|
|
1095
1093
|
t("button", {
|
|
1096
1094
|
class: "fd-btn fd-btn--primary fd-btn--sm",
|
|
1097
1095
|
onClick: _
|
|
1098
1096
|
}, "+ 新增列")
|
|
1099
1097
|
]),
|
|
1100
|
-
e.node.colnums.length === 0 ? (d(), c("div",
|
|
1101
|
-
(d(!0), c(L, null,
|
|
1098
|
+
e.node.colnums.length === 0 ? (d(), c("div", bo, " 暂无列,点击「新增列」添加 ")) : T("", !0),
|
|
1099
|
+
(d(!0), c(L, null, E(e.node.colnums, (w, W) => (d(), c("div", {
|
|
1102
1100
|
key: w.name,
|
|
1103
1101
|
class: "fd-col-card"
|
|
1104
1102
|
}, [
|
|
1105
|
-
t("div",
|
|
1106
|
-
t("span",
|
|
1107
|
-
t("div",
|
|
1108
|
-
t("span",
|
|
1109
|
-
t("span",
|
|
1103
|
+
t("div", go, [
|
|
1104
|
+
t("span", ho, k(W + 1), 1),
|
|
1105
|
+
t("div", yo, [
|
|
1106
|
+
t("span", ko, k(w.showname || "未命名列"), 1),
|
|
1107
|
+
t("span", wo, k(w.name), 1)
|
|
1110
1108
|
]),
|
|
1111
|
-
t("span",
|
|
1109
|
+
t("span", $o, k(w.bindLink ? "链接" : "文本"), 1)
|
|
1112
1110
|
]),
|
|
1113
|
-
t("div",
|
|
1114
|
-
t("label",
|
|
1111
|
+
t("div", xo, [
|
|
1112
|
+
t("label", Co, [
|
|
1115
1113
|
b[17] || (b[17] = t("span", null, "显示", -1)),
|
|
1116
|
-
F(
|
|
1114
|
+
F(re, {
|
|
1117
1115
|
"model-value": w.isshow === 1,
|
|
1118
1116
|
"onUpdate:modelValue": (se) => B(w, se)
|
|
1119
1117
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
1120
1118
|
]),
|
|
1121
|
-
t("div",
|
|
1119
|
+
t("div", _o, [
|
|
1122
1120
|
t("button", {
|
|
1123
1121
|
class: "fd-btn fd-btn--ghost fd-btn--sm",
|
|
1124
1122
|
onClick: (se) => p(W)
|
|
1125
|
-
}, "设置", 8,
|
|
1123
|
+
}, "设置", 8, Io),
|
|
1126
1124
|
t("button", {
|
|
1127
1125
|
class: "fd-btn fd-btn--danger fd-btn--sm",
|
|
1128
1126
|
onClick: (se) => D(W)
|
|
1129
|
-
}, "删除", 8,
|
|
1127
|
+
}, "删除", 8, So)
|
|
1130
1128
|
])
|
|
1131
1129
|
])
|
|
1132
1130
|
]))), 128))
|
|
@@ -1138,8 +1136,8 @@ const uo = { class: "fd-panel" }, co = { class: "fd-panel-item" }, fo = { class:
|
|
|
1138
1136
|
class: "fd-dialog-mask",
|
|
1139
1137
|
onClick: G(y, ["self"])
|
|
1140
1138
|
}, [
|
|
1141
|
-
t("div",
|
|
1142
|
-
t("div",
|
|
1139
|
+
t("div", Do, [
|
|
1140
|
+
t("div", To, [
|
|
1143
1141
|
t("span", null, "列设置 · " + k(l.draft.showname || l.draft.name || "新列"), 1),
|
|
1144
1142
|
t("button", {
|
|
1145
1143
|
class: "fd-dialog-close",
|
|
@@ -1147,62 +1145,62 @@ const uo = { class: "fd-panel" }, co = { class: "fd-panel-item" }, fo = { class:
|
|
|
1147
1145
|
title: "关闭"
|
|
1148
1146
|
}, "×")
|
|
1149
1147
|
]),
|
|
1150
|
-
t("div",
|
|
1151
|
-
t("section",
|
|
1148
|
+
t("div", Lo, [
|
|
1149
|
+
t("section", Fo, [
|
|
1152
1150
|
b[23] || (b[23] = t("h5", { class: "fd-form-section-h" }, "基本信息", -1)),
|
|
1153
|
-
t("div",
|
|
1154
|
-
t("div",
|
|
1151
|
+
t("div", No, [
|
|
1152
|
+
t("div", Mo, [
|
|
1155
1153
|
b[19] || (b[19] = t("label", null, "列字段", -1)),
|
|
1156
1154
|
t("select", {
|
|
1157
1155
|
value: l.draft.name,
|
|
1158
1156
|
onChange: b[2] || (b[2] = (w) => V(w))
|
|
1159
1157
|
}, [
|
|
1160
1158
|
b[18] || (b[18] = t("option", { value: "" }, "请选择字段", -1)),
|
|
1161
|
-
(d(!0), c(L, null,
|
|
1159
|
+
(d(!0), c(L, null, E($.value, (w) => (d(), c("option", {
|
|
1162
1160
|
key: w.name,
|
|
1163
1161
|
value: w.name
|
|
1164
|
-
}, k(w.label) + "(" + k(w.name) + ")", 9,
|
|
1165
|
-
], 40,
|
|
1162
|
+
}, k(w.label) + "(" + k(w.name) + ")", 9, Po))), 128))
|
|
1163
|
+
], 40, Eo)
|
|
1166
1164
|
]),
|
|
1167
|
-
t("div",
|
|
1165
|
+
t("div", Oo, [
|
|
1168
1166
|
b[20] || (b[20] = t("label", null, "显示标题", -1)),
|
|
1169
1167
|
t("input", {
|
|
1170
1168
|
value: l.draft.showname,
|
|
1171
1169
|
onInput: b[3] || (b[3] = (w) => l.draft.showname = w.target.value),
|
|
1172
1170
|
placeholder: "如 姓名"
|
|
1173
|
-
}, null, 40,
|
|
1171
|
+
}, null, 40, Uo)
|
|
1174
1172
|
]),
|
|
1175
|
-
t("div",
|
|
1173
|
+
t("div", Bo, [
|
|
1176
1174
|
b[21] || (b[21] = t("label", null, "主表头分组", -1)),
|
|
1177
1175
|
t("input", {
|
|
1178
1176
|
value: l.draft.major,
|
|
1179
1177
|
onInput: b[4] || (b[4] = (w) => l.draft.major = w.target.value),
|
|
1180
1178
|
placeholder: "可合并表头分组名"
|
|
1181
|
-
}, null, 40,
|
|
1179
|
+
}, null, 40, Ro)
|
|
1182
1180
|
]),
|
|
1183
|
-
t("div",
|
|
1181
|
+
t("div", Vo, [
|
|
1184
1182
|
b[22] || (b[22] = t("label", null, "列序号", -1)),
|
|
1185
1183
|
t("input", {
|
|
1186
1184
|
type: "number",
|
|
1187
1185
|
min: "1",
|
|
1188
1186
|
value: l.draft.index,
|
|
1189
1187
|
onInput: b[5] || (b[5] = (w) => l.draft.index = Number(w.target.value))
|
|
1190
|
-
}, null, 40,
|
|
1188
|
+
}, null, 40, Ao)
|
|
1191
1189
|
])
|
|
1192
1190
|
])
|
|
1193
1191
|
]),
|
|
1194
|
-
t("section",
|
|
1192
|
+
t("section", jo, [
|
|
1195
1193
|
b[29] || (b[29] = t("h5", { class: "fd-form-section-h" }, "显示与样式", -1)),
|
|
1196
|
-
t("div",
|
|
1197
|
-
t("div",
|
|
1194
|
+
t("div", zo, [
|
|
1195
|
+
t("div", Jo, [
|
|
1198
1196
|
b[24] || (b[24] = t("label", null, "列宽", -1)),
|
|
1199
1197
|
t("input", {
|
|
1200
1198
|
value: l.draft.showwidth,
|
|
1201
1199
|
onInput: b[6] || (b[6] = (w) => l.draft.showwidth = w.target.value),
|
|
1202
1200
|
placeholder: "如 120px 或 20%"
|
|
1203
|
-
}, null, 40,
|
|
1201
|
+
}, null, 40, Wo)
|
|
1204
1202
|
]),
|
|
1205
|
-
t("div",
|
|
1203
|
+
t("div", Ho, [
|
|
1206
1204
|
b[26] || (b[26] = t("label", null, "对齐方式", -1)),
|
|
1207
1205
|
t("select", {
|
|
1208
1206
|
value: l.draft.align,
|
|
@@ -1212,56 +1210,56 @@ const uo = { class: "fd-panel" }, co = { class: "fd-panel-item" }, fo = { class:
|
|
|
1212
1210
|
t("option", { value: "left" }, "左对齐", -1),
|
|
1213
1211
|
t("option", { value: "center" }, "居中", -1),
|
|
1214
1212
|
t("option", { value: "right" }, "右对齐", -1)
|
|
1215
|
-
])], 40,
|
|
1213
|
+
])], 40, Go)
|
|
1216
1214
|
]),
|
|
1217
|
-
t("div",
|
|
1215
|
+
t("div", qo, [
|
|
1218
1216
|
b[27] || (b[27] = t("label", null, "背景色", -1)),
|
|
1219
|
-
t("div",
|
|
1217
|
+
t("div", Yo, [
|
|
1220
1218
|
t("input", {
|
|
1221
1219
|
type: "color",
|
|
1222
1220
|
value: v(l.draft.background),
|
|
1223
1221
|
onInput: b[8] || (b[8] = (w) => g("background", w))
|
|
1224
|
-
}, null, 40,
|
|
1222
|
+
}, null, 40, Ko),
|
|
1225
1223
|
t("input", {
|
|
1226
1224
|
value: l.draft.background,
|
|
1227
1225
|
onInput: b[9] || (b[9] = (w) => l.draft.background = w.target.value),
|
|
1228
1226
|
placeholder: "如 #f5f7fa 或空"
|
|
1229
|
-
}, null, 40,
|
|
1227
|
+
}, null, 40, Qo)
|
|
1230
1228
|
])
|
|
1231
1229
|
]),
|
|
1232
|
-
t("div",
|
|
1230
|
+
t("div", Xo, [
|
|
1233
1231
|
b[28] || (b[28] = t("label", null, "字体色", -1)),
|
|
1234
|
-
t("div",
|
|
1232
|
+
t("div", Zo, [
|
|
1235
1233
|
t("input", {
|
|
1236
1234
|
type: "color",
|
|
1237
1235
|
value: v(l.draft.prospect),
|
|
1238
1236
|
onInput: b[10] || (b[10] = (w) => g("prospect", w))
|
|
1239
|
-
}, null, 40,
|
|
1237
|
+
}, null, 40, es),
|
|
1240
1238
|
t("input", {
|
|
1241
1239
|
value: l.draft.prospect,
|
|
1242
1240
|
onInput: b[11] || (b[11] = (w) => l.draft.prospect = w.target.value),
|
|
1243
1241
|
placeholder: "如 #f5523a 或空"
|
|
1244
|
-
}, null, 40,
|
|
1242
|
+
}, null, 40, ts)
|
|
1245
1243
|
])
|
|
1246
1244
|
])
|
|
1247
1245
|
])
|
|
1248
1246
|
]),
|
|
1249
|
-
t("section",
|
|
1247
|
+
t("section", ns, [
|
|
1250
1248
|
b[32] || (b[32] = t("h5", { class: "fd-form-section-h" }, "编辑模式", -1)),
|
|
1251
|
-
t("div",
|
|
1252
|
-
t("div",
|
|
1249
|
+
t("div", os, [
|
|
1250
|
+
t("div", ss, [
|
|
1253
1251
|
b[30] || (b[30] = t("label", null, "同内容合并", -1)),
|
|
1254
|
-
F(
|
|
1252
|
+
F(re, {
|
|
1255
1253
|
"model-value": l.draft.issamecolmerge === 1,
|
|
1256
1254
|
"onUpdate:modelValue": b[12] || (b[12] = (w) => l.draft.issamecolmerge = w ? 1 : 0)
|
|
1257
1255
|
}, null, 8, ["model-value"])
|
|
1258
1256
|
]),
|
|
1259
|
-
t("div",
|
|
1257
|
+
t("div", ls, [
|
|
1260
1258
|
b[31] || (b[31] = t("label", null, "链接", -1)),
|
|
1261
1259
|
t("input", {
|
|
1262
1260
|
value: l.draft.bindLink ? `${l.draft.bindLink}(链接字段自动绑定)` : "非链接字段",
|
|
1263
1261
|
readonly: ""
|
|
1264
|
-
}, null, 8,
|
|
1262
|
+
}, null, 8, is)
|
|
1265
1263
|
])
|
|
1266
1264
|
])
|
|
1267
1265
|
])
|
|
@@ -1281,8 +1279,8 @@ const uo = { class: "fd-panel" }, co = { class: "fd-panel-item" }, fo = { class:
|
|
|
1281
1279
|
]))
|
|
1282
1280
|
], 64));
|
|
1283
1281
|
}
|
|
1284
|
-
}),
|
|
1285
|
-
function
|
|
1282
|
+
}), ds = /* @__PURE__ */ P(as, [["__scopeId", "data-v-e1fd519d"]]);
|
|
1283
|
+
function rs() {
|
|
1286
1284
|
return [
|
|
1287
1285
|
{
|
|
1288
1286
|
name: "field1",
|
|
@@ -1322,12 +1320,12 @@ function us() {
|
|
|
1322
1320
|
}
|
|
1323
1321
|
];
|
|
1324
1322
|
}
|
|
1325
|
-
const
|
|
1323
|
+
const us = {
|
|
1326
1324
|
type: "subtable",
|
|
1327
1325
|
title: "子表",
|
|
1328
|
-
design:
|
|
1329
|
-
render:
|
|
1330
|
-
panel:
|
|
1326
|
+
design: Bn,
|
|
1327
|
+
render: io,
|
|
1328
|
+
panel: ds,
|
|
1331
1329
|
isContainer: !1,
|
|
1332
1330
|
createDefaultProps: () => ({
|
|
1333
1331
|
id: "",
|
|
@@ -1353,24 +1351,24 @@ const cs = {
|
|
|
1353
1351
|
tableheight: 0,
|
|
1354
1352
|
iscompletehide: "0",
|
|
1355
1353
|
iscompletehidecode: "",
|
|
1356
|
-
colnums:
|
|
1354
|
+
colnums: rs(),
|
|
1357
1355
|
events: []
|
|
1358
1356
|
}),
|
|
1359
1357
|
serialize: (e) => e
|
|
1360
|
-
},
|
|
1358
|
+
}, cs = /* @__PURE__ */ N({
|
|
1361
1359
|
__name: "GridDesign",
|
|
1362
1360
|
props: {
|
|
1363
1361
|
node: {}
|
|
1364
1362
|
},
|
|
1365
1363
|
setup(e) {
|
|
1366
|
-
const n =
|
|
1364
|
+
const n = Y();
|
|
1367
1365
|
return (o, s) => (d(), c("div", {
|
|
1368
1366
|
class: j(["fd-grid-design", { "is-mobile": h(n).device === "mobile" }])
|
|
1369
1367
|
}, [
|
|
1370
|
-
|
|
1368
|
+
Z(o.$slots, "children", {}, void 0, !0)
|
|
1371
1369
|
], 2));
|
|
1372
1370
|
}
|
|
1373
|
-
}),
|
|
1371
|
+
}), fs = /* @__PURE__ */ P(cs, [["__scopeId", "data-v-b4d1e09d"]]), Ce = /* @__PURE__ */ N({
|
|
1374
1372
|
__name: "WidgetHost",
|
|
1375
1373
|
props: {
|
|
1376
1374
|
node: {},
|
|
@@ -1380,37 +1378,37 @@ const cs = {
|
|
|
1380
1378
|
formId: {}
|
|
1381
1379
|
},
|
|
1382
1380
|
setup(e) {
|
|
1383
|
-
const n = e, o =
|
|
1381
|
+
const n = e, o = M(() => X(n.node.type)), s = M(() => o.value ? n.mode === "design" ? o.value.design : o.value.render : null), i = (a) => a && n.formData ? n.formData[a] : void 0;
|
|
1384
1382
|
return (a, u) => {
|
|
1385
1383
|
var l;
|
|
1386
1384
|
const r = Re("WidgetHost", !0);
|
|
1387
|
-
return s.value ? (d(), R(
|
|
1385
|
+
return s.value ? (d(), R(ke(s.value), he({
|
|
1388
1386
|
key: 0,
|
|
1389
1387
|
node: e.node,
|
|
1390
1388
|
value: i(e.node.bindField),
|
|
1391
1389
|
"form-data": e.formData
|
|
1392
|
-
}, e.mode === "render" ? { formMode: e.formMode, formId: e.formId } : null),
|
|
1393
|
-
|
|
1390
|
+
}, e.mode === "render" ? { formMode: e.formMode, formId: e.formId } : null), ce({ _: 2 }, [
|
|
1391
|
+
E(a.$slots, (m, p) => ({
|
|
1394
1392
|
name: p,
|
|
1395
1393
|
fn: A((y) => [
|
|
1396
|
-
|
|
1394
|
+
Z(a.$slots, p, qe(Ye(y || {})))
|
|
1397
1395
|
])
|
|
1398
1396
|
})),
|
|
1399
1397
|
(l = o.value) != null && l.isContainer && !a.$slots.children ? {
|
|
1400
1398
|
name: "children",
|
|
1401
1399
|
fn: A(() => [
|
|
1402
|
-
(d(!0), c(L, null,
|
|
1400
|
+
(d(!0), c(L, null, E(e.node.children, (m) => (d(), R(r, {
|
|
1403
1401
|
key: m.id,
|
|
1404
1402
|
node: m,
|
|
1405
1403
|
mode: e.mode,
|
|
1406
1404
|
"form-mode": e.formMode,
|
|
1407
1405
|
"form-data": e.formData,
|
|
1408
1406
|
"form-id": e.formId
|
|
1409
|
-
},
|
|
1410
|
-
|
|
1407
|
+
}, ce({ _: 2 }, [
|
|
1408
|
+
E(a.$slots, (p, y) => ({
|
|
1411
1409
|
name: y,
|
|
1412
1410
|
fn: A((C) => [
|
|
1413
|
-
|
|
1411
|
+
Z(a.$slots, y, he({ ref_for: !0 }, C || {}))
|
|
1414
1412
|
])
|
|
1415
1413
|
}))
|
|
1416
1414
|
]), 1032, ["node", "mode", "form-mode", "form-data", "form-id"]))), 128))
|
|
@@ -1420,10 +1418,10 @@ const cs = {
|
|
|
1420
1418
|
]), 1040, ["node", "value", "form-data"])) : T("", !0);
|
|
1421
1419
|
};
|
|
1422
1420
|
}
|
|
1423
|
-
}),
|
|
1421
|
+
}), ms = 24;
|
|
1424
1422
|
function Ae(e, n, o, s, i = !1) {
|
|
1425
1423
|
if (e.type !== "label" || !o.length) return "";
|
|
1426
|
-
const a = i ? 1 :
|
|
1424
|
+
const a = i ? 1 : ms, u = (D) => Math.min(Math.max(D.gridSpan || s || a, 1), a), r = [];
|
|
1427
1425
|
let l = 0, m = 0;
|
|
1428
1426
|
for (const D of o) {
|
|
1429
1427
|
const v = u(D);
|
|
@@ -1438,7 +1436,7 @@ function Ae(e, n, o, s, i = !1) {
|
|
|
1438
1436
|
const y = r[r.length - 1].row, C = p.row === 0, B = p.row === y, _ = [];
|
|
1439
1437
|
return p.rowFirst && C && _.push("is-g-corner-tl"), p.rowLast && C && _.push("is-g-corner-tr"), p.rowFirst && B && _.push("is-g-corner-bl"), p.rowLast && B && _.push("is-g-corner-br"), _.join(" ");
|
|
1440
1438
|
}
|
|
1441
|
-
const
|
|
1439
|
+
const ps = /* @__PURE__ */ N({
|
|
1442
1440
|
__name: "GridRender",
|
|
1443
1441
|
props: {
|
|
1444
1442
|
node: {},
|
|
@@ -1447,9 +1445,9 @@ const vs = /* @__PURE__ */ E({
|
|
|
1447
1445
|
formId: {}
|
|
1448
1446
|
},
|
|
1449
1447
|
setup(e) {
|
|
1450
|
-
const n =
|
|
1448
|
+
const n = Y(), o = O(!1);
|
|
1451
1449
|
let s = null;
|
|
1452
|
-
|
|
1450
|
+
ve(() => {
|
|
1453
1451
|
s = window.matchMedia("(max-width: 768px)"), o.value = s.matches, s.addEventListener("change", (a) => {
|
|
1454
1452
|
o.value = a.matches;
|
|
1455
1453
|
});
|
|
@@ -1457,14 +1455,14 @@ const vs = /* @__PURE__ */ E({
|
|
|
1457
1455
|
s && s.removeEventListener("change", () => {
|
|
1458
1456
|
});
|
|
1459
1457
|
});
|
|
1460
|
-
const i =
|
|
1458
|
+
const i = M(() => n.device === "mobile" || o.value);
|
|
1461
1459
|
return (a, u) => (d(), c("div", {
|
|
1462
1460
|
class: j(["fd-grid-render", { "is-mobile": i.value }])
|
|
1463
1461
|
}, [
|
|
1464
|
-
(d(!0), c(L, null,
|
|
1462
|
+
(d(!0), c(L, null, E(e.node.children, (r, l) => (d(), c("div", {
|
|
1465
1463
|
key: r.id,
|
|
1466
1464
|
class: j(["fd-grid-cell", h(Ae)(r, l, e.node.children || [], e.node.layout || 24, i.value)]),
|
|
1467
|
-
style:
|
|
1465
|
+
style: q({ gridColumn: `span ${r.gridSpan || e.node.layout}` })
|
|
1468
1466
|
}, [
|
|
1469
1467
|
F(Ce, {
|
|
1470
1468
|
node: r,
|
|
@@ -1472,18 +1470,18 @@ const vs = /* @__PURE__ */ E({
|
|
|
1472
1470
|
"form-mode": e.formMode,
|
|
1473
1471
|
"form-data": e.formData,
|
|
1474
1472
|
"form-id": e.formId
|
|
1475
|
-
},
|
|
1476
|
-
|
|
1473
|
+
}, ce({ _: 2 }, [
|
|
1474
|
+
E(a.$slots, (m, p) => ({
|
|
1477
1475
|
name: p,
|
|
1478
1476
|
fn: A((y) => [
|
|
1479
|
-
|
|
1477
|
+
Z(a.$slots, p, he({ ref_for: !0 }, y || {}), void 0, !0)
|
|
1480
1478
|
])
|
|
1481
1479
|
}))
|
|
1482
1480
|
]), 1032, ["node", "form-mode", "form-data", "form-id"])
|
|
1483
1481
|
], 6))), 128))
|
|
1484
1482
|
], 2));
|
|
1485
1483
|
}
|
|
1486
|
-
}),
|
|
1484
|
+
}), vs = /* @__PURE__ */ P(ps, [["__scopeId", "data-v-a4c55357"]]), bs = { class: "fd-panel" }, gs = { class: "fd-panel-item" }, hs = ["value"], ys = ["value"], ks = { class: "fd-panel-item" }, ws = /* @__PURE__ */ N({
|
|
1487
1485
|
__name: "GridPanel",
|
|
1488
1486
|
props: {
|
|
1489
1487
|
node: {},
|
|
@@ -1501,20 +1499,20 @@ const vs = /* @__PURE__ */ E({
|
|
|
1501
1499
|
const u = o.node.layout || 24, r = (o.node.children ?? []).map((l) => ({ ...l, gridSpan: u }));
|
|
1502
1500
|
s("update", { children: r });
|
|
1503
1501
|
}
|
|
1504
|
-
return (u, r) => (d(), c("div",
|
|
1505
|
-
t("div",
|
|
1502
|
+
return (u, r) => (d(), c("div", bs, [
|
|
1503
|
+
t("div", gs, [
|
|
1506
1504
|
r[1] || (r[1] = t("label", null, "布局", -1)),
|
|
1507
1505
|
t("select", {
|
|
1508
1506
|
value: e.node.layout,
|
|
1509
1507
|
onChange: r[0] || (r[0] = (l) => s("update", { layout: Number(l.target.value) }))
|
|
1510
1508
|
}, [
|
|
1511
|
-
(d(), c(L, null,
|
|
1509
|
+
(d(), c(L, null, E(i, (l) => t("option", {
|
|
1512
1510
|
key: l.value,
|
|
1513
1511
|
value: l.value
|
|
1514
|
-
}, k(l.label), 9,
|
|
1515
|
-
], 40,
|
|
1512
|
+
}, k(l.label), 9, ys)), 64))
|
|
1513
|
+
], 40, hs)
|
|
1516
1514
|
]),
|
|
1517
|
-
t("div",
|
|
1515
|
+
t("div", ks, [
|
|
1518
1516
|
r[2] || (r[2] = t("label", null, "一键布局", -1)),
|
|
1519
1517
|
t("button", {
|
|
1520
1518
|
class: "fd-btn fd-btn--primary fd-btn--sm fd-grid-apply",
|
|
@@ -1523,12 +1521,12 @@ const vs = /* @__PURE__ */ E({
|
|
|
1523
1521
|
])
|
|
1524
1522
|
]));
|
|
1525
1523
|
}
|
|
1526
|
-
}),
|
|
1524
|
+
}), $s = /* @__PURE__ */ P(ws, [["__scopeId", "data-v-a333d2ea"]]), xs = {
|
|
1527
1525
|
type: "grid",
|
|
1528
1526
|
title: "栅栏格",
|
|
1529
|
-
design:
|
|
1530
|
-
render:
|
|
1531
|
-
panel:
|
|
1527
|
+
design: fs,
|
|
1528
|
+
render: vs,
|
|
1529
|
+
panel: $s,
|
|
1532
1530
|
isContainer: !0,
|
|
1533
1531
|
createDefaultProps: () => ({
|
|
1534
1532
|
id: "",
|
|
@@ -1540,7 +1538,7 @@ const vs = /* @__PURE__ */ E({
|
|
|
1540
1538
|
children: []
|
|
1541
1539
|
}),
|
|
1542
1540
|
serialize: (e) => e
|
|
1543
|
-
},
|
|
1541
|
+
}, Cs = /* @__PURE__ */ N({
|
|
1544
1542
|
__name: "TextDesign",
|
|
1545
1543
|
props: {
|
|
1546
1544
|
node: {}
|
|
@@ -1548,27 +1546,27 @@ const vs = /* @__PURE__ */ E({
|
|
|
1548
1546
|
setup(e) {
|
|
1549
1547
|
return (n, o) => (d(), c("div", {
|
|
1550
1548
|
class: "fd-text-design",
|
|
1551
|
-
style:
|
|
1549
|
+
style: q({ display: e.node.display })
|
|
1552
1550
|
}, k(e.node.text || "文本内容"), 5));
|
|
1553
1551
|
}
|
|
1554
|
-
}),
|
|
1552
|
+
}), _s = /* @__PURE__ */ P(Cs, [["__scopeId", "data-v-ba382e6c"]]), Is = /* @__PURE__ */ N({
|
|
1555
1553
|
__name: "TextRender",
|
|
1556
1554
|
props: {
|
|
1557
1555
|
node: {},
|
|
1558
1556
|
value: {}
|
|
1559
1557
|
},
|
|
1560
1558
|
setup(e) {
|
|
1561
|
-
const n = e, o =
|
|
1559
|
+
const n = e, o = M(() => {
|
|
1562
1560
|
if (!n.node.bindField) return n.node.text;
|
|
1563
1561
|
const s = n.value;
|
|
1564
1562
|
return s == null ? "" : String(s);
|
|
1565
1563
|
});
|
|
1566
1564
|
return (s, i) => (d(), c("div", {
|
|
1567
1565
|
class: "fd-text-render",
|
|
1568
|
-
style:
|
|
1566
|
+
style: q({ display: e.node.display })
|
|
1569
1567
|
}, k(o.value), 5));
|
|
1570
1568
|
}
|
|
1571
|
-
}),
|
|
1569
|
+
}), Ss = /* @__PURE__ */ P(Is, [["__scopeId", "data-v-3ed7b0f0"]]), Ds = { class: "fd-panel" }, Ts = { class: "fd-panel-item" }, Ls = ["value"], Fs = { class: "fd-panel-item" }, Ns = ["value"], Ms = ["value"], Es = { class: "fd-panel-item" }, Ps = ["value"], Os = /* @__PURE__ */ N({
|
|
1572
1570
|
__name: "TextPanel",
|
|
1573
1571
|
props: {
|
|
1574
1572
|
node: {},
|
|
@@ -1577,29 +1575,29 @@ const vs = /* @__PURE__ */ E({
|
|
|
1577
1575
|
emits: ["update"],
|
|
1578
1576
|
setup(e, { emit: n }) {
|
|
1579
1577
|
const o = n;
|
|
1580
|
-
return (s, i) => (d(), c("div",
|
|
1581
|
-
t("div",
|
|
1578
|
+
return (s, i) => (d(), c("div", Ds, [
|
|
1579
|
+
t("div", Ts, [
|
|
1582
1580
|
i[3] || (i[3] = t("label", null, "文本", -1)),
|
|
1583
1581
|
t("textarea", {
|
|
1584
1582
|
rows: "4",
|
|
1585
1583
|
value: e.node.text,
|
|
1586
1584
|
onInput: i[0] || (i[0] = (a) => o("update", { text: a.target.value }))
|
|
1587
|
-
}, null, 40,
|
|
1585
|
+
}, null, 40, Ls)
|
|
1588
1586
|
]),
|
|
1589
|
-
t("div",
|
|
1587
|
+
t("div", Fs, [
|
|
1590
1588
|
i[5] || (i[5] = t("label", null, "绑定字段", -1)),
|
|
1591
1589
|
t("select", {
|
|
1592
1590
|
value: e.node.bindField,
|
|
1593
1591
|
onChange: i[1] || (i[1] = (a) => o("update", { bindField: a.target.value }))
|
|
1594
1592
|
}, [
|
|
1595
1593
|
i[4] || (i[4] = t("option", { value: "" }, "不绑定", -1)),
|
|
1596
|
-
(d(!0), c(L, null,
|
|
1594
|
+
(d(!0), c(L, null, E(e.fields, (a) => (d(), c("option", {
|
|
1597
1595
|
key: a.name,
|
|
1598
1596
|
value: a.name
|
|
1599
|
-
}, k(a.label) + "(" + k(a.name) + ")", 9,
|
|
1600
|
-
], 40,
|
|
1597
|
+
}, k(a.label) + "(" + k(a.name) + ")", 9, Ms))), 128))
|
|
1598
|
+
], 40, Ns)
|
|
1601
1599
|
]),
|
|
1602
|
-
t("div",
|
|
1600
|
+
t("div", Es, [
|
|
1603
1601
|
i[7] || (i[7] = t("label", null, "对齐方式", -1)),
|
|
1604
1602
|
t("select", {
|
|
1605
1603
|
value: e.node.display,
|
|
@@ -1607,16 +1605,16 @@ const vs = /* @__PURE__ */ E({
|
|
|
1607
1605
|
}, [...i[6] || (i[6] = [
|
|
1608
1606
|
t("option", { value: "inline-block" }, "对齐", -1),
|
|
1609
1607
|
t("option", { value: "block" }, "换行", -1)
|
|
1610
|
-
])], 40,
|
|
1608
|
+
])], 40, Ps)
|
|
1611
1609
|
])
|
|
1612
1610
|
]));
|
|
1613
1611
|
}
|
|
1614
|
-
}),
|
|
1612
|
+
}), Us = /* @__PURE__ */ P(Os, [["__scopeId", "data-v-3201879c"]]), Bs = {
|
|
1615
1613
|
type: "text",
|
|
1616
1614
|
title: "文本",
|
|
1617
|
-
design:
|
|
1618
|
-
render:
|
|
1619
|
-
panel:
|
|
1615
|
+
design: _s,
|
|
1616
|
+
render: Ss,
|
|
1617
|
+
panel: Us,
|
|
1620
1618
|
isContainer: !1,
|
|
1621
1619
|
createDefaultProps: () => ({
|
|
1622
1620
|
id: "",
|
|
@@ -1630,47 +1628,47 @@ const vs = /* @__PURE__ */ E({
|
|
|
1630
1628
|
};
|
|
1631
1629
|
let Me = !1;
|
|
1632
1630
|
function _e() {
|
|
1633
|
-
Me || (Me = !0, ie(Et), ie(fn), ie(
|
|
1631
|
+
Me || (Me = !0, ie(Et), ie(fn), ie(Sn), ie(us), ie(xs), ie(Bs));
|
|
1634
1632
|
}
|
|
1635
1633
|
_e();
|
|
1636
|
-
const
|
|
1637
|
-
let le = {},
|
|
1638
|
-
const
|
|
1634
|
+
const Rs = { baseUrl: "/bpm" };
|
|
1635
|
+
let le = {}, pe = {}, Ie = {};
|
|
1636
|
+
const Vs = "__BPM_LOGIN_SITE__", As = "RetutnUrl";
|
|
1639
1637
|
let Ee = !1;
|
|
1640
|
-
const
|
|
1638
|
+
const js = "api/formdesigner/v1";
|
|
1641
1639
|
function je(e) {
|
|
1642
|
-
|
|
1640
|
+
pe = { ...pe, ...e };
|
|
1643
1641
|
}
|
|
1644
|
-
function
|
|
1642
|
+
function zs(e) {
|
|
1645
1643
|
le.baseUrl = e;
|
|
1646
1644
|
}
|
|
1647
|
-
function
|
|
1645
|
+
function ua(e) {
|
|
1648
1646
|
le.baseUrl = e ? e.startsWith("/") ? e : `/${e}` : "";
|
|
1649
1647
|
}
|
|
1650
|
-
function
|
|
1648
|
+
function ca(e) {
|
|
1651
1649
|
}
|
|
1652
|
-
function
|
|
1650
|
+
function fa(e) {
|
|
1653
1651
|
le.onUnauthorized = e;
|
|
1654
1652
|
}
|
|
1655
|
-
function
|
|
1653
|
+
function ma(e) {
|
|
1656
1654
|
le.loginSite = e;
|
|
1657
1655
|
}
|
|
1658
|
-
function
|
|
1659
|
-
const e = Ie.loginSite ?? le.loginSite ??
|
|
1656
|
+
function Js() {
|
|
1657
|
+
const e = Ie.loginSite ?? le.loginSite ?? pe.loginSite;
|
|
1660
1658
|
if (e) return e;
|
|
1661
1659
|
if (typeof window < "u") {
|
|
1662
|
-
const n = window[
|
|
1660
|
+
const n = window[Vs];
|
|
1663
1661
|
if (typeof n == "string" && n) return n;
|
|
1664
1662
|
}
|
|
1665
1663
|
return "";
|
|
1666
1664
|
}
|
|
1667
|
-
function
|
|
1665
|
+
function Ws() {
|
|
1668
1666
|
if (Ee) return !1;
|
|
1669
|
-
const e =
|
|
1670
|
-
return !e || typeof window > "u" ? !1 : (Ee = !0, window.location.href = `${e}?${
|
|
1667
|
+
const e = Js();
|
|
1668
|
+
return !e || typeof window > "u" ? !1 : (Ee = !0, window.location.href = `${e}?${As}=${encodeURIComponent(window.location.href)}`, !0);
|
|
1671
1669
|
}
|
|
1672
|
-
function
|
|
1673
|
-
const e = Ie.onUnauthorized ?? le.onUnauthorized ??
|
|
1670
|
+
function Hs() {
|
|
1671
|
+
const e = Ie.onUnauthorized ?? le.onUnauthorized ?? pe.onUnauthorized;
|
|
1674
1672
|
if (e) {
|
|
1675
1673
|
try {
|
|
1676
1674
|
e();
|
|
@@ -1678,27 +1676,27 @@ function Gs() {
|
|
|
1678
1676
|
}
|
|
1679
1677
|
return;
|
|
1680
1678
|
}
|
|
1681
|
-
|
|
1679
|
+
Ws();
|
|
1682
1680
|
}
|
|
1683
|
-
function
|
|
1681
|
+
function Gs() {
|
|
1684
1682
|
return {
|
|
1685
|
-
baseUrl: Ie.baseUrl ?? le.baseUrl ??
|
|
1683
|
+
baseUrl: Ie.baseUrl ?? le.baseUrl ?? pe.baseUrl ?? Rs.baseUrl
|
|
1686
1684
|
};
|
|
1687
1685
|
}
|
|
1688
1686
|
function ne(e, n) {
|
|
1689
|
-
const { baseUrl: o } =
|
|
1687
|
+
const { baseUrl: o } = Gs(), s = new URLSearchParams();
|
|
1690
1688
|
Object.entries(n ?? {}).forEach(([a, u]) => {
|
|
1691
1689
|
u != null && u !== "" && s.append(a, u);
|
|
1692
1690
|
});
|
|
1693
1691
|
const i = s.toString();
|
|
1694
|
-
return `${o}/${
|
|
1692
|
+
return `${o}/${js}/${e}${i ? `?${i}` : ""}`;
|
|
1695
1693
|
}
|
|
1696
1694
|
class ze extends Error {
|
|
1697
1695
|
constructor(n, o) {
|
|
1698
1696
|
super(o), this.status = n, this.name = "ApiError";
|
|
1699
1697
|
}
|
|
1700
1698
|
}
|
|
1701
|
-
function
|
|
1699
|
+
function qs(e) {
|
|
1702
1700
|
if (!e) return "";
|
|
1703
1701
|
try {
|
|
1704
1702
|
const n = JSON.parse(e), o = n.error ?? n.message ?? n.title ?? n.detail;
|
|
@@ -1713,7 +1711,7 @@ async function oe(e, n) {
|
|
|
1713
1711
|
headers: { "Content-Type": "application/json", ...(n == null ? void 0 : n.headers) ?? {} }
|
|
1714
1712
|
}), s = await o.text();
|
|
1715
1713
|
if (!o.ok)
|
|
1716
|
-
throw o.status === 401 &&
|
|
1714
|
+
throw o.status === 401 && Hs(), new ze(o.status, qs(s) || `请求失败(${o.status})`);
|
|
1717
1715
|
if ((o.headers.get("content-type") ?? "").includes("text/plain")) return s;
|
|
1718
1716
|
if (!s) return null;
|
|
1719
1717
|
try {
|
|
@@ -1722,7 +1720,7 @@ async function oe(e, n) {
|
|
|
1722
1720
|
return s;
|
|
1723
1721
|
}
|
|
1724
1722
|
}
|
|
1725
|
-
function
|
|
1723
|
+
function Ys(e) {
|
|
1726
1724
|
if (e == null) return null;
|
|
1727
1725
|
if (typeof e != "string") return e;
|
|
1728
1726
|
try {
|
|
@@ -1734,31 +1732,31 @@ function Ks(e) {
|
|
|
1734
1732
|
function Je(e) {
|
|
1735
1733
|
return e == null ? { success: !1, message: "无响应" } : typeof e == "string" ? { success: e.includes("成功"), message: e } : e;
|
|
1736
1734
|
}
|
|
1737
|
-
async function
|
|
1735
|
+
async function Ks(e, n) {
|
|
1738
1736
|
return oe(ne("opendesigner"), {
|
|
1739
1737
|
method: "POST",
|
|
1740
1738
|
body: JSON.stringify(e)
|
|
1741
1739
|
});
|
|
1742
1740
|
}
|
|
1743
|
-
async function
|
|
1741
|
+
async function Qs(e, n) {
|
|
1744
1742
|
return oe(ne("formconfig", { id: e }));
|
|
1745
1743
|
}
|
|
1746
|
-
async function
|
|
1744
|
+
async function Xs(e, n, o) {
|
|
1747
1745
|
return oe(ne("fieldbinding/allfields", { dbtable: e, formid: n }));
|
|
1748
1746
|
}
|
|
1749
|
-
async function
|
|
1747
|
+
async function Zs(e, n) {
|
|
1750
1748
|
return Je(await oe(ne("save"), { method: "POST", body: JSON.stringify(e) }));
|
|
1751
1749
|
}
|
|
1752
|
-
async function
|
|
1750
|
+
async function el(e, n) {
|
|
1753
1751
|
return Je(await oe(ne("publish"), { method: "POST", body: JSON.stringify(e) }));
|
|
1754
1752
|
}
|
|
1755
|
-
async function
|
|
1753
|
+
async function tl(e, n) {
|
|
1756
1754
|
return oe(ne("saveas"), { method: "POST", body: JSON.stringify(e) });
|
|
1757
1755
|
}
|
|
1758
|
-
async function
|
|
1756
|
+
async function nl(e, n) {
|
|
1759
1757
|
return oe(ne("effectcount", { formId: e }));
|
|
1760
1758
|
}
|
|
1761
|
-
async function
|
|
1759
|
+
async function ol(e, n) {
|
|
1762
1760
|
return oe(
|
|
1763
1761
|
ne("effectprocesses", {
|
|
1764
1762
|
id: e.id,
|
|
@@ -1768,22 +1766,22 @@ async function sl(e, n) {
|
|
|
1768
1766
|
})
|
|
1769
1767
|
);
|
|
1770
1768
|
}
|
|
1771
|
-
function
|
|
1769
|
+
function sl(e) {
|
|
1772
1770
|
return { name: e.name, label: e.label, dataType: e.dataType };
|
|
1773
1771
|
}
|
|
1774
|
-
function
|
|
1772
|
+
function ll(e) {
|
|
1775
1773
|
return { name: e.name, label: e.label, dataType: e.dataType || "string" };
|
|
1776
1774
|
}
|
|
1777
|
-
function
|
|
1778
|
-
return (e ?? []).filter((o) => o.name && o.name !== n).map((o) => ({ name: o.name, label: o.name, fields: (o.fields ?? []).map(
|
|
1775
|
+
function il(e, n) {
|
|
1776
|
+
return (e ?? []).filter((o) => o.name && o.name !== n).map((o) => ({ name: o.name, label: o.name, fields: (o.fields ?? []).map(ll) }));
|
|
1779
1777
|
}
|
|
1780
|
-
function
|
|
1781
|
-
return
|
|
1778
|
+
function al(e) {
|
|
1779
|
+
return Ys(e);
|
|
1782
1780
|
}
|
|
1783
1781
|
function ae(e) {
|
|
1784
1782
|
return e instanceof ze || e instanceof Error ? e.message : String(e);
|
|
1785
1783
|
}
|
|
1786
|
-
const
|
|
1784
|
+
const ee = (e) => JSON.parse(JSON.stringify(e));
|
|
1787
1785
|
function Q(e, n) {
|
|
1788
1786
|
for (const o of e) {
|
|
1789
1787
|
if (o.id === n) return o;
|
|
@@ -1802,7 +1800,7 @@ function We(e, n) {
|
|
|
1802
1800
|
if (s.children && We(s.children, n)) return !0;
|
|
1803
1801
|
return !1;
|
|
1804
1802
|
}
|
|
1805
|
-
const
|
|
1803
|
+
const Y = tt("designer", {
|
|
1806
1804
|
state: () => ({
|
|
1807
1805
|
workFormId: "",
|
|
1808
1806
|
originFormId: "",
|
|
@@ -1840,15 +1838,15 @@ const q = tt("designer", {
|
|
|
1840
1838
|
actions: {
|
|
1841
1839
|
/** 提交一次变更快照(用于撤销重做) */
|
|
1842
1840
|
commit() {
|
|
1843
|
-
this.past.push(
|
|
1841
|
+
this.past.push(ee(this.widgets)), this.past.length > 50 && this.past.shift(), this.future = [];
|
|
1844
1842
|
},
|
|
1845
1843
|
undo() {
|
|
1846
1844
|
const e = this.past.pop();
|
|
1847
|
-
e && (this.future.push(
|
|
1845
|
+
e && (this.future.push(ee(this.widgets)), this.widgets = e, this.selectedId && !Q(this.widgets, this.selectedId) && (this.selectedId = null));
|
|
1848
1846
|
},
|
|
1849
1847
|
redo() {
|
|
1850
1848
|
const e = this.future.pop();
|
|
1851
|
-
e && (this.past.push(
|
|
1849
|
+
e && (this.past.push(ee(this.widgets)), this.widgets = e);
|
|
1852
1850
|
},
|
|
1853
1851
|
select(e) {
|
|
1854
1852
|
this.selectedId = e, this.selectedForm = !1;
|
|
@@ -1982,7 +1980,7 @@ const q = tt("designer", {
|
|
|
1982
1980
|
this.draggingId = null, this.selectedId = s.id;
|
|
1983
1981
|
},
|
|
1984
1982
|
loadSchema(e) {
|
|
1985
|
-
this.formId = e.formId, this.dbtable = e.dbtable, this.fields = e.fields, this.widgets =
|
|
1983
|
+
this.formId = e.formId, this.dbtable = e.dbtable, this.fields = e.fields, this.widgets = ee(e.widgets), this.events = e.events ? ee(e.events) : { lifecycle: {}, custom: [] }, this.selectedId = null, this.selectedForm = !1, this.past = [], this.future = [];
|
|
1986
1984
|
},
|
|
1987
1985
|
/**
|
|
1988
1986
|
* 导入(「导入」按钮):仅用导入 JSON 的表单结构(控件树 + 事件)覆盖当前设计,
|
|
@@ -1992,7 +1990,7 @@ const q = tt("designer", {
|
|
|
1992
1990
|
* importSchema 只换表单 JSON,不动业务对象与字段。
|
|
1993
1991
|
*/
|
|
1994
1992
|
importSchema(e) {
|
|
1995
|
-
this.widgets =
|
|
1993
|
+
this.widgets = ee(e.widgets ?? []), this.events = e.events ? ee(e.events) : this.events, this.selectedId = null, this.selectedForm = !1, this.past = [], this.future = [];
|
|
1996
1994
|
},
|
|
1997
1995
|
toSchema() {
|
|
1998
1996
|
return {
|
|
@@ -2000,7 +1998,7 @@ const q = tt("designer", {
|
|
|
2000
1998
|
dbtable: this.dbtable,
|
|
2001
1999
|
fields: this.fields,
|
|
2002
2000
|
widgets: this.widgets,
|
|
2003
|
-
events:
|
|
2001
|
+
events: ee(this.events)
|
|
2004
2002
|
};
|
|
2005
2003
|
},
|
|
2006
2004
|
/**
|
|
@@ -2038,15 +2036,15 @@ const q = tt("designer", {
|
|
|
2038
2036
|
return;
|
|
2039
2037
|
}
|
|
2040
2038
|
this.originFormId = e;
|
|
2041
|
-
const s = await
|
|
2039
|
+
const s = await Ks({ openType: o, id: e, formVersion: n });
|
|
2042
2040
|
this.workFormId = s.newFormID, this.formId = s.newFormID;
|
|
2043
|
-
const i = await
|
|
2041
|
+
const i = await Qs(s.newFormID);
|
|
2044
2042
|
this.attribute = i.attribute ?? {}, this.formName = this.attribute.name ?? "", this.device = i.templateType === "App" ? "mobile" : "pc";
|
|
2045
|
-
const a = this.attribute.dbtable || "", u = await
|
|
2043
|
+
const a = this.attribute.dbtable || "", u = await Xs(a, s.newFormID);
|
|
2046
2044
|
this.dbtable = a || u.dbtable;
|
|
2047
|
-
const r = this.enrichFields((u.fields ?? []).map(
|
|
2048
|
-
this.setFields(r), this.setSubTables(
|
|
2049
|
-
const l =
|
|
2045
|
+
const r = this.enrichFields((u.fields ?? []).map(sl));
|
|
2046
|
+
this.setFields(r), this.setSubTables(il(u.subtables, this.dbtable));
|
|
2047
|
+
const l = al(i.json);
|
|
2050
2048
|
l && Array.isArray(l.widgets) ? this.loadSchema({
|
|
2051
2049
|
...l,
|
|
2052
2050
|
formId: s.newFormID,
|
|
@@ -2085,7 +2083,7 @@ const q = tt("designer", {
|
|
|
2085
2083
|
async save() {
|
|
2086
2084
|
this.errorMsg = "";
|
|
2087
2085
|
try {
|
|
2088
|
-
return await
|
|
2086
|
+
return await Zs({
|
|
2089
2087
|
id: this.workFormId,
|
|
2090
2088
|
name: this.formName,
|
|
2091
2089
|
att: this.attJson,
|
|
@@ -2106,7 +2104,7 @@ const q = tt("designer", {
|
|
|
2106
2104
|
async saveAs(e, n, o = "start") {
|
|
2107
2105
|
this.errorMsg = "";
|
|
2108
2106
|
try {
|
|
2109
|
-
return await
|
|
2107
|
+
return await tl({ id: this.workFormId, name: e, code: n, saveSelect: o });
|
|
2110
2108
|
} catch (s) {
|
|
2111
2109
|
throw this.errorMsg = `另存为失败:${ae(s)}`, s;
|
|
2112
2110
|
}
|
|
@@ -2115,7 +2113,7 @@ const q = tt("designer", {
|
|
|
2115
2113
|
async publish(e = "") {
|
|
2116
2114
|
this.errorMsg = "";
|
|
2117
2115
|
try {
|
|
2118
|
-
return await
|
|
2116
|
+
return await el({
|
|
2119
2117
|
id: this.workFormId,
|
|
2120
2118
|
name: this.formName,
|
|
2121
2119
|
att: this.attJson,
|
|
@@ -2134,7 +2132,7 @@ const q = tt("designer", {
|
|
|
2134
2132
|
async checkPublish() {
|
|
2135
2133
|
this.errorMsg = "";
|
|
2136
2134
|
try {
|
|
2137
|
-
const e = await
|
|
2135
|
+
const e = await nl(this.originFormId);
|
|
2138
2136
|
return { needConfirm: e.result || e.count > 0, count: e.count };
|
|
2139
2137
|
} catch (e) {
|
|
2140
2138
|
throw this.errorMsg = `发布检查失败:${ae(e)}`, e;
|
|
@@ -2142,10 +2140,10 @@ const q = tt("designer", {
|
|
|
2142
2140
|
}
|
|
2143
2141
|
}
|
|
2144
2142
|
}), He = "fd:form:";
|
|
2145
|
-
function
|
|
2143
|
+
function dl(e, n) {
|
|
2146
2144
|
localStorage.setItem(He + e, JSON.stringify(n));
|
|
2147
2145
|
}
|
|
2148
|
-
function
|
|
2146
|
+
function pa(e) {
|
|
2149
2147
|
const n = localStorage.getItem(He + e);
|
|
2150
2148
|
if (!n) return null;
|
|
2151
2149
|
try {
|
|
@@ -2154,7 +2152,7 @@ function ca(e) {
|
|
|
2154
2152
|
return null;
|
|
2155
2153
|
}
|
|
2156
2154
|
}
|
|
2157
|
-
const
|
|
2155
|
+
const rl = "fdFireEvent";
|
|
2158
2156
|
function Pe(e, n = {}) {
|
|
2159
2157
|
if (!(!e || !e.trim()))
|
|
2160
2158
|
try {
|
|
@@ -2165,7 +2163,7 @@ ${e}`)(n);
|
|
|
2165
2163
|
return;
|
|
2166
2164
|
}
|
|
2167
2165
|
}
|
|
2168
|
-
function
|
|
2166
|
+
function ul(e) {
|
|
2169
2167
|
if (!(!e || !e.trim() || typeof document > "u"))
|
|
2170
2168
|
try {
|
|
2171
2169
|
const n = document.createElement("script");
|
|
@@ -2174,7 +2172,7 @@ function cl(e) {
|
|
|
2174
2172
|
console.error("[form-designer] 自定义方法挂载失败:", n);
|
|
2175
2173
|
}
|
|
2176
2174
|
}
|
|
2177
|
-
const
|
|
2175
|
+
const cl = { class: "fd-renderer" }, fl = /* @__PURE__ */ N({
|
|
2178
2176
|
__name: "Renderer",
|
|
2179
2177
|
props: {
|
|
2180
2178
|
widgets: {},
|
|
@@ -2184,7 +2182,7 @@ const fl = { class: "fd-renderer" }, ml = /* @__PURE__ */ E({
|
|
|
2184
2182
|
formId: {}
|
|
2185
2183
|
},
|
|
2186
2184
|
setup(e, { expose: n }) {
|
|
2187
|
-
const o = e, s =
|
|
2185
|
+
const o = e, s = M(
|
|
2188
2186
|
() => o.widgets.filter((u) => {
|
|
2189
2187
|
var l;
|
|
2190
2188
|
const r = (l = X(u.type)) == null ? void 0 : l.visibleModes;
|
|
@@ -2201,41 +2199,41 @@ const fl = { class: "fd-renderer" }, ml = /* @__PURE__ */ E({
|
|
|
2201
2199
|
const l = (m = o.events) == null ? void 0 : m.custom.find((p) => p.name === u);
|
|
2202
2200
|
l && Pe(l.handler, { formData: o.formData, event: u, payload: r });
|
|
2203
2201
|
}
|
|
2204
|
-
return Ke(
|
|
2202
|
+
return Ke(rl, a), ve(() => {
|
|
2205
2203
|
var u;
|
|
2206
|
-
i("onLoad"), i("onMounted"),
|
|
2207
|
-
}),
|
|
2204
|
+
i("onLoad"), i("onMounted"), ul((u = o.events) == null ? void 0 : u.lifecycle.custom);
|
|
2205
|
+
}), ue(
|
|
2208
2206
|
() => o.formData,
|
|
2209
2207
|
() => i("onValueChange"),
|
|
2210
2208
|
{ deep: !0 }
|
|
2211
|
-
), n({ fireEvent: a, runLifecycle: i }), (u, r) => (d(), c("div",
|
|
2212
|
-
(d(!0), c(L, null,
|
|
2209
|
+
), n({ fireEvent: a, runLifecycle: i }), (u, r) => (d(), c("div", cl, [
|
|
2210
|
+
(d(!0), c(L, null, E(s.value, (l) => (d(), R(Ce, {
|
|
2213
2211
|
key: l.id,
|
|
2214
2212
|
node: l,
|
|
2215
2213
|
mode: "render",
|
|
2216
2214
|
"form-mode": e.formMode,
|
|
2217
2215
|
"form-data": e.formData,
|
|
2218
2216
|
"form-id": e.formId
|
|
2219
|
-
},
|
|
2220
|
-
|
|
2217
|
+
}, ce({ _: 2 }, [
|
|
2218
|
+
E(u.$slots, (m, p) => ({
|
|
2221
2219
|
name: p,
|
|
2222
2220
|
fn: A((y) => [
|
|
2223
|
-
|
|
2221
|
+
Z(u.$slots, p, he({ ref_for: !0 }, y || {}), void 0, !0)
|
|
2224
2222
|
])
|
|
2225
2223
|
}))
|
|
2226
2224
|
]), 1032, ["node", "form-mode", "form-data", "form-id"]))), 128))
|
|
2227
2225
|
]));
|
|
2228
2226
|
}
|
|
2229
|
-
}), Ge = /* @__PURE__ */ P(
|
|
2227
|
+
}), Ge = /* @__PURE__ */ P(fl, [["__scopeId", "data-v-82088c12"]]), ml = { class: "fd-tree" }, pl = { class: "fd-tree-head" }, vl = {
|
|
2230
2228
|
key: 0,
|
|
2231
2229
|
class: "fd-tree-count"
|
|
2232
|
-
},
|
|
2230
|
+
}, bl = {
|
|
2233
2231
|
key: 0,
|
|
2234
2232
|
class: "fd-tree-empty"
|
|
2235
|
-
},
|
|
2233
|
+
}, gl = { class: "fd-tree-name" }, hl = ["title"], yl = /* @__PURE__ */ N({
|
|
2236
2234
|
__name: "ComponentTree",
|
|
2237
2235
|
setup(e) {
|
|
2238
|
-
const n =
|
|
2236
|
+
const n = Y();
|
|
2239
2237
|
function o(u) {
|
|
2240
2238
|
var p;
|
|
2241
2239
|
const r = X(u.type), l = u.label, m = (r == null ? void 0 : r.title) ?? u.type;
|
|
@@ -2247,7 +2245,7 @@ const fl = { class: "fd-renderer" }, ml = /* @__PURE__ */ E({
|
|
|
2247
2245
|
children: (p = u.children) == null ? void 0 : p.map(o)
|
|
2248
2246
|
};
|
|
2249
2247
|
}
|
|
2250
|
-
const s =
|
|
2248
|
+
const s = M(() => n.widgets.map(o)), i = M(() => {
|
|
2251
2249
|
const u = (r) => r.reduce((l, m) => l + 1 + u(m.children ?? []), 0);
|
|
2252
2250
|
return u(n.widgets);
|
|
2253
2251
|
});
|
|
@@ -2257,10 +2255,10 @@ const fl = { class: "fd-renderer" }, ml = /* @__PURE__ */ E({
|
|
|
2257
2255
|
(r = document.querySelector(".fd-canvas-node.is-selected")) == null || r.scrollIntoView({ block: "nearest" });
|
|
2258
2256
|
});
|
|
2259
2257
|
}
|
|
2260
|
-
return (u, r) => (d(), c("div",
|
|
2261
|
-
t("div",
|
|
2258
|
+
return (u, r) => (d(), c("div", ml, [
|
|
2259
|
+
t("div", pl, [
|
|
2262
2260
|
r[0] || (r[0] = $e('<svg class="fd-tree-head-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" data-v-e38c14ec><rect x="3" y="3" width="7" height="7" rx="1" data-v-e38c14ec></rect><rect x="14" y="3" width="7" height="7" rx="1" data-v-e38c14ec></rect><rect x="3" y="14" width="7" height="7" rx="1" data-v-e38c14ec></rect><rect x="14" y="14" width="7" height="7" rx="1" data-v-e38c14ec></rect></svg><span class="fd-tree-title" data-v-e38c14ec>组件树</span>', 2)),
|
|
2263
|
-
i.value ? (d(), c("span",
|
|
2261
|
+
i.value ? (d(), c("span", vl, k(i.value), 1)) : T("", !0)
|
|
2264
2262
|
]),
|
|
2265
2263
|
i.value ? (d(), R(h(nt), {
|
|
2266
2264
|
key: 1,
|
|
@@ -2275,15 +2273,15 @@ const fl = { class: "fd-renderer" }, ml = /* @__PURE__ */ E({
|
|
|
2275
2273
|
onNodeClick: a
|
|
2276
2274
|
}, {
|
|
2277
2275
|
default: A(({ data: l }) => [
|
|
2278
|
-
t("span",
|
|
2276
|
+
t("span", gl, k(l.name), 1),
|
|
2279
2277
|
l.sub ? (d(), c("span", {
|
|
2280
2278
|
key: 0,
|
|
2281
2279
|
class: "fd-tree-sub",
|
|
2282
2280
|
title: l.sub
|
|
2283
|
-
}, k(l.sub), 9,
|
|
2281
|
+
}, k(l.sub), 9, hl)) : T("", !0)
|
|
2284
2282
|
]),
|
|
2285
2283
|
_: 1
|
|
2286
|
-
}, 8, ["data", "current-node-key"])) : (d(), c("div",
|
|
2284
|
+
}, 8, ["data", "current-node-key"])) : (d(), c("div", bl, [...r[1] || (r[1] = [
|
|
2287
2285
|
t("svg", {
|
|
2288
2286
|
viewBox: "0 0 24 24",
|
|
2289
2287
|
fill: "none",
|
|
@@ -2305,8 +2303,8 @@ const fl = { class: "fd-renderer" }, ml = /* @__PURE__ */ E({
|
|
|
2305
2303
|
])]))
|
|
2306
2304
|
]));
|
|
2307
2305
|
}
|
|
2308
|
-
}),
|
|
2309
|
-
var
|
|
2306
|
+
}), kl = /* @__PURE__ */ P(yl, [["__scopeId", "data-v-e38c14ec"]]);
|
|
2307
|
+
var wl = {
|
|
2310
2308
|
name: "zh-cn",
|
|
2311
2309
|
el: {
|
|
2312
2310
|
breadcrumb: { label: "面包屑" },
|
|
@@ -2488,10 +2486,10 @@ var $l = {
|
|
|
2488
2486
|
}
|
|
2489
2487
|
}
|
|
2490
2488
|
};
|
|
2491
|
-
const
|
|
2489
|
+
const $l = { class: "fd-publish-tip" }, xl = { class: "fd-publish-tip-text" }, Cl = { class: "fd-publish-toolbar" }, _l = { class: "fd-publish-table-wrap" }, Il = { class: "fd-publish-table" }, Sl = ["title"], Dl = ["href", "title"], Tl = ["title"], Ll = ["title"], Fl = {
|
|
2492
2490
|
key: 1,
|
|
2493
2491
|
class: "fd-publish-error"
|
|
2494
|
-
},
|
|
2492
|
+
}, Nl = { class: "fd-publish-pager" }, Ml = /* @__PURE__ */ N({
|
|
2495
2493
|
__name: "PublishConfirmDialog",
|
|
2496
2494
|
props: {
|
|
2497
2495
|
modelValue: { type: Boolean },
|
|
@@ -2505,7 +2503,7 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2505
2503
|
if (s.formId) {
|
|
2506
2504
|
a.value = !0, u.value = "";
|
|
2507
2505
|
try {
|
|
2508
|
-
const D = await
|
|
2506
|
+
const D = await ol({
|
|
2509
2507
|
id: s.formId,
|
|
2510
2508
|
processName: r.value,
|
|
2511
2509
|
page: l.value,
|
|
@@ -2519,21 +2517,21 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2519
2517
|
}
|
|
2520
2518
|
}
|
|
2521
2519
|
}
|
|
2522
|
-
|
|
2520
|
+
ue(
|
|
2523
2521
|
() => s.modelValue,
|
|
2524
2522
|
(D) => {
|
|
2525
2523
|
D && (r.value = "", l.value = 1, C());
|
|
2526
2524
|
}
|
|
2527
|
-
),
|
|
2525
|
+
), ue(r, () => {
|
|
2528
2526
|
l.value = 1, C();
|
|
2529
|
-
}),
|
|
2527
|
+
}), ue(l, () => C());
|
|
2530
2528
|
function B() {
|
|
2531
2529
|
i("update:modelValue", !1);
|
|
2532
2530
|
}
|
|
2533
2531
|
function _() {
|
|
2534
2532
|
i("confirm");
|
|
2535
2533
|
}
|
|
2536
|
-
return (D, v) => (d(), R(h(st), { locale: h(
|
|
2534
|
+
return (D, v) => (d(), R(h(st), { locale: h(wl) }, {
|
|
2537
2535
|
default: A(() => [
|
|
2538
2536
|
F(h(lt), {
|
|
2539
2537
|
"model-value": e.modelValue,
|
|
@@ -2561,15 +2559,15 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2561
2559
|
}, 8, ["disabled"])
|
|
2562
2560
|
]),
|
|
2563
2561
|
default: A(() => [
|
|
2564
|
-
t("div",
|
|
2562
|
+
t("div", $l, [
|
|
2565
2563
|
v[6] || (v[6] = t("span", { class: "fd-publish-tip-icon" }, "!", -1)),
|
|
2566
|
-
t("span",
|
|
2564
|
+
t("span", xl, [
|
|
2567
2565
|
v[4] || (v[4] = U(" 该表单正在被 ", -1)),
|
|
2568
2566
|
t("b", null, k(e.count), 1),
|
|
2569
2567
|
v[5] || (v[5] = U(" 个流程使用,发布后将影响以下流程,确定发布? ", -1))
|
|
2570
2568
|
])
|
|
2571
2569
|
]),
|
|
2572
|
-
t("div",
|
|
2570
|
+
t("div", Cl, [
|
|
2573
2571
|
F(h(it), {
|
|
2574
2572
|
modelValue: r.value,
|
|
2575
2573
|
"onUpdate:modelValue": v[0] || (v[0] = (g) => r.value = g),
|
|
@@ -2578,8 +2576,8 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2578
2576
|
class: "fd-publish-search"
|
|
2579
2577
|
}, null, 8, ["modelValue"])
|
|
2580
2578
|
]),
|
|
2581
|
-
|
|
2582
|
-
t("table",
|
|
2579
|
+
de((d(), c("div", _l, [
|
|
2580
|
+
t("table", Il, [
|
|
2583
2581
|
v[7] || (v[7] = t("colgroup", null, [
|
|
2584
2582
|
t("col", { style: { width: "24%" } }),
|
|
2585
2583
|
t("col", { style: { width: "40%" } }),
|
|
@@ -2593,12 +2591,12 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2593
2591
|
])
|
|
2594
2592
|
], -1)),
|
|
2595
2593
|
t("tbody", null, [
|
|
2596
|
-
(d(!0), c(L, null,
|
|
2594
|
+
(d(!0), c(L, null, E(y.value, (g) => (d(), c("tr", {
|
|
2597
2595
|
key: g.templateId || g.formId
|
|
2598
2596
|
}, [
|
|
2599
2597
|
t("td", {
|
|
2600
2598
|
title: g.formNameCN || g.formCode
|
|
2601
|
-
}, k(g.formNameCN || g.formCode), 9,
|
|
2599
|
+
}, k(g.formNameCN || g.formCode), 9, Sl),
|
|
2602
2600
|
t("td", null, [
|
|
2603
2601
|
g.templateUrl ? (d(), c("a", {
|
|
2604
2602
|
key: 0,
|
|
@@ -2607,15 +2605,15 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2607
2605
|
target: "_blank",
|
|
2608
2606
|
rel: "noopener noreferrer",
|
|
2609
2607
|
title: g.templateName
|
|
2610
|
-
}, k(g.templateName), 9,
|
|
2608
|
+
}, k(g.templateName), 9, Dl)) : (d(), c("span", {
|
|
2611
2609
|
key: 1,
|
|
2612
2610
|
title: g.templateName
|
|
2613
|
-
}, k(g.templateName), 9,
|
|
2611
|
+
}, k(g.templateName), 9, Tl))
|
|
2614
2612
|
]),
|
|
2615
2613
|
t("td", {
|
|
2616
2614
|
class: "fd-publish-id",
|
|
2617
2615
|
title: g.templateId
|
|
2618
|
-
}, k(g.templateId), 9,
|
|
2616
|
+
}, k(g.templateId), 9, Ll)
|
|
2619
2617
|
]))), 128))
|
|
2620
2618
|
])
|
|
2621
2619
|
]),
|
|
@@ -2624,11 +2622,11 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2624
2622
|
description: "暂无可用流程模板",
|
|
2625
2623
|
"image-size": 60
|
|
2626
2624
|
})) : T("", !0),
|
|
2627
|
-
!y.value.length && u.value ? (d(), c("div",
|
|
2625
|
+
!y.value.length && u.value ? (d(), c("div", Fl, k(u.value), 1)) : T("", !0)
|
|
2628
2626
|
])), [
|
|
2629
2627
|
[h(o), a.value]
|
|
2630
2628
|
]),
|
|
2631
|
-
t("div",
|
|
2629
|
+
t("div", Nl, [
|
|
2632
2630
|
F(h(dt), {
|
|
2633
2631
|
"current-page": l.value,
|
|
2634
2632
|
"onUpdate:currentPage": v[1] || (v[1] = (g) => l.value = g),
|
|
@@ -2647,21 +2645,21 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2647
2645
|
_: 1
|
|
2648
2646
|
}, 8, ["locale"]));
|
|
2649
2647
|
}
|
|
2650
|
-
}),
|
|
2648
|
+
}), El = /* @__PURE__ */ P(Ml, [["__scopeId", "data-v-6fdc08dc"]]), Pl = { class: "fd-toolbar" }, Ol = { class: "fd-toolbar-left flex-align-center" }, Ul = ["value"], Bl = { class: "fd-device" }, Rl = {
|
|
2651
2649
|
key: 0,
|
|
2652
2650
|
class: "is-active",
|
|
2653
2651
|
title: "移动端比例(由 URL 参数 templateType 决定)"
|
|
2654
|
-
},
|
|
2652
|
+
}, Vl = {
|
|
2655
2653
|
key: 1,
|
|
2656
2654
|
class: "is-active",
|
|
2657
2655
|
title: "电脑端比例(由 URL 参数 templateType 决定)"
|
|
2658
|
-
},
|
|
2656
|
+
}, Al = { class: "fd-toolbar-right flex-align-center" }, jl = ["disabled"], zl = ["disabled"], Jl = { class: "fd-dialog fd-dialog--preview" }, Wl = { class: "fd-dialog-head" }, Hl = { class: "fd-preview-width" }, Gl = { class: "fd-dialog-body bg" }, ql = { class: "fd-dialog" }, Yl = { class: "fd-dialog-head" }, Kl = ["value"], Ql = { class: "fd-dialog" }, Xl = { class: "fd-dialog-head" }, Zl = { class: "fd-dialog-body" }, ei = /* @__PURE__ */ N({
|
|
2659
2657
|
__name: "Toolbar",
|
|
2660
2658
|
setup(e) {
|
|
2661
|
-
const n =
|
|
2659
|
+
const n = Y(), o = O(!1), s = O(!1), i = O(!1), a = O(!1);
|
|
2662
2660
|
function u(S, f, I) {
|
|
2663
|
-
const z = [
|
|
2664
|
-
return I && z.push(
|
|
2661
|
+
const z = [ge("p", { style: "margin:0" }, f)];
|
|
2662
|
+
return I && z.push(ge("p", { style: "margin:8px 0 0" }, I)), ut.alert(ge("div", z), S, { confirmButtonText: "知道了" });
|
|
2665
2663
|
}
|
|
2666
2664
|
const r = O(!1), l = O(0);
|
|
2667
2665
|
function m() {
|
|
@@ -2673,7 +2671,7 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2673
2671
|
const S = Number(p.value);
|
|
2674
2672
|
p.value = Math.min(1200, Math.max(270, Number.isFinite(S) ? S : 1200));
|
|
2675
2673
|
}
|
|
2676
|
-
|
|
2674
|
+
ue(
|
|
2677
2675
|
() => n.device,
|
|
2678
2676
|
(S) => {
|
|
2679
2677
|
p.value = S === "mobile" ? 375 : 1200;
|
|
@@ -2699,7 +2697,7 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2699
2697
|
}
|
|
2700
2698
|
n.importSchema(f), C.value = "", a.value = !1;
|
|
2701
2699
|
}
|
|
2702
|
-
const _ =
|
|
2700
|
+
const _ = M(
|
|
2703
2701
|
() => JSON.stringify(
|
|
2704
2702
|
{ formId: n.formId, dbtable: n.dbtable, widgets: n.widgets, events: n.events },
|
|
2705
2703
|
null,
|
|
@@ -2732,7 +2730,7 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2732
2730
|
D.value = "";
|
|
2733
2731
|
}, 1500);
|
|
2734
2732
|
}
|
|
2735
|
-
const V =
|
|
2733
|
+
const V = M(() => {
|
|
2736
2734
|
const S = {};
|
|
2737
2735
|
n.fields.forEach((I) => {
|
|
2738
2736
|
S[I.name] = I.name;
|
|
@@ -2749,7 +2747,7 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2749
2747
|
}), S[I.secondtable] = [z];
|
|
2750
2748
|
}), S;
|
|
2751
2749
|
});
|
|
2752
|
-
async function
|
|
2750
|
+
async function K() {
|
|
2753
2751
|
if (!n.workFormId) {
|
|
2754
2752
|
J.warning("尚未打开表单,无法保存");
|
|
2755
2753
|
return;
|
|
@@ -2760,7 +2758,7 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2760
2758
|
}
|
|
2761
2759
|
try {
|
|
2762
2760
|
const S = await n.save();
|
|
2763
|
-
S.success ? (
|
|
2761
|
+
S.success ? (dl(n.formId, n.toSchema()), u("保存成功", S.message, `工作表单 ID:${n.workFormId}`)) : J.error(`保存失败:${S.message}`);
|
|
2764
2762
|
} catch {
|
|
2765
2763
|
J.error(n.errorMsg || "保存失败");
|
|
2766
2764
|
}
|
|
@@ -2823,19 +2821,19 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2823
2821
|
const f = S.target;
|
|
2824
2822
|
(I = Se.value) != null && I.contains(f) || (z = De.value) != null && z.contains(f) || (i.value = !1);
|
|
2825
2823
|
}
|
|
2826
|
-
return
|
|
2824
|
+
return ve(() => document.addEventListener("click", Te)), Qe(() => {
|
|
2827
2825
|
document.removeEventListener("click", Te), window.clearTimeout(v);
|
|
2828
|
-
}), (S, f) => (d(), c("div",
|
|
2829
|
-
t("div",
|
|
2826
|
+
}), (S, f) => (d(), c("div", Pl, [
|
|
2827
|
+
t("div", Ol, [
|
|
2830
2828
|
f[18] || (f[18] = t("span", { class: "fd-toolbar-title" }, "表单设计器", -1)),
|
|
2831
2829
|
t("input", {
|
|
2832
2830
|
class: "fd-toolbar-name",
|
|
2833
2831
|
value: h(n).formName,
|
|
2834
2832
|
placeholder: "表单名称(保存必填)",
|
|
2835
2833
|
onInput: f[0] || (f[0] = (I) => h(n).formName = I.target.value)
|
|
2836
|
-
}, null, 40,
|
|
2837
|
-
t("div",
|
|
2838
|
-
h(n).device === "mobile" ? (d(), c("button",
|
|
2834
|
+
}, null, 40, Ul),
|
|
2835
|
+
t("div", Bl, [
|
|
2836
|
+
h(n).device === "mobile" ? (d(), c("button", Rl, [...f[16] || (f[16] = [
|
|
2839
2837
|
t("svg", {
|
|
2840
2838
|
class: "fd-tool-btn-icon",
|
|
2841
2839
|
viewBox: "0 0 24 24",
|
|
@@ -2860,7 +2858,7 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2860
2858
|
})
|
|
2861
2859
|
], -1),
|
|
2862
2860
|
U(" 移动端 ", -1)
|
|
2863
|
-
])])) : (d(), c("button",
|
|
2861
|
+
])])) : (d(), c("button", Vl, [...f[17] || (f[17] = [
|
|
2864
2862
|
t("svg", {
|
|
2865
2863
|
class: "fd-tool-btn-icon",
|
|
2866
2864
|
viewBox: "0 0 24 24",
|
|
@@ -2894,7 +2892,7 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2894
2892
|
])]))
|
|
2895
2893
|
])
|
|
2896
2894
|
]),
|
|
2897
|
-
t("div",
|
|
2895
|
+
t("div", Al, [
|
|
2898
2896
|
t("button", {
|
|
2899
2897
|
class: "fd-tool-btn",
|
|
2900
2898
|
onClick: f[1] || (f[1] = (I) => o.value = !0)
|
|
@@ -2979,7 +2977,7 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
2979
2977
|
])]),
|
|
2980
2978
|
t("button", {
|
|
2981
2979
|
class: "fd-tool-btn",
|
|
2982
|
-
onClick:
|
|
2980
|
+
onClick: K
|
|
2983
2981
|
}, [...f[23] || (f[23] = [
|
|
2984
2982
|
t("svg", {
|
|
2985
2983
|
class: "fd-tool-btn-icon",
|
|
@@ -3062,7 +3060,7 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3062
3060
|
t("polyline", { points: "9 14 4 9 9 4" }),
|
|
3063
3061
|
t("path", { d: "M20 20v-7a4 4 0 0 0-4-4H4" })
|
|
3064
3062
|
], -1)
|
|
3065
|
-
])], 8,
|
|
3063
|
+
])], 8, jl),
|
|
3066
3064
|
t("button", {
|
|
3067
3065
|
class: "fd-tool-btn fd-tool-icon-btn",
|
|
3068
3066
|
disabled: !h(n).canRedo,
|
|
@@ -3081,7 +3079,7 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3081
3079
|
t("polyline", { points: "15 14 20 9 15 4" }),
|
|
3082
3080
|
t("path", { d: "M4 20v-7a4 4 0 0 1 4-4h12" })
|
|
3083
3081
|
], -1)
|
|
3084
|
-
])], 8,
|
|
3082
|
+
])], 8, zl),
|
|
3085
3083
|
t("button", {
|
|
3086
3084
|
ref_key: "treeBtnRef",
|
|
3087
3085
|
ref: De,
|
|
@@ -3097,10 +3095,10 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3097
3095
|
class: "fd-dialog-mask",
|
|
3098
3096
|
onClick: f[9] || (f[9] = G((I) => o.value = !1, ["self"]))
|
|
3099
3097
|
}, [
|
|
3100
|
-
t("div",
|
|
3101
|
-
t("div",
|
|
3098
|
+
t("div", Jl, [
|
|
3099
|
+
t("div", Wl, [
|
|
3102
3100
|
f[32] || (f[32] = t("span", null, "预览", -1)),
|
|
3103
|
-
t("div",
|
|
3101
|
+
t("div", Hl, [
|
|
3104
3102
|
f[30] || (f[30] = t("label", { for: "fd-preview-width-input" }, "宽度", -1)),
|
|
3105
3103
|
F(h(rt), {
|
|
3106
3104
|
id: "fd-preview-width-input",
|
|
@@ -3120,10 +3118,10 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3120
3118
|
onClick: f[8] || (f[8] = (I) => o.value = !1)
|
|
3121
3119
|
}, "关闭")
|
|
3122
3120
|
]),
|
|
3123
|
-
t("div",
|
|
3121
|
+
t("div", Gl, [
|
|
3124
3122
|
t("div", {
|
|
3125
3123
|
class: "fd-preview-stage",
|
|
3126
|
-
style:
|
|
3124
|
+
style: q({ width: p.value + "px" })
|
|
3127
3125
|
}, [
|
|
3128
3126
|
F(Ge, {
|
|
3129
3127
|
widgets: h(n).widgets,
|
|
@@ -3138,8 +3136,8 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3138
3136
|
class: "fd-dialog-mask",
|
|
3139
3137
|
onClick: f[11] || (f[11] = G((I) => s.value = !1, ["self"]))
|
|
3140
3138
|
}, [
|
|
3141
|
-
t("div",
|
|
3142
|
-
t("div",
|
|
3139
|
+
t("div", ql, [
|
|
3140
|
+
t("div", Yl, [
|
|
3143
3141
|
f[34] || (f[34] = t("span", null, "JSON Schema", -1)),
|
|
3144
3142
|
t("button", {
|
|
3145
3143
|
class: "fd-tool-btn",
|
|
@@ -3175,7 +3173,7 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3175
3173
|
class: "fd-dialog-code",
|
|
3176
3174
|
value: _.value,
|
|
3177
3175
|
readonly: ""
|
|
3178
|
-
}, null, 8,
|
|
3176
|
+
}, null, 8, Kl)
|
|
3179
3177
|
])
|
|
3180
3178
|
])) : T("", !0),
|
|
3181
3179
|
a.value ? (d(), c("div", {
|
|
@@ -3183,8 +3181,8 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3183
3181
|
class: "fd-dialog-mask",
|
|
3184
3182
|
onClick: f[14] || (f[14] = G((I) => a.value = !1, ["self"]))
|
|
3185
3183
|
}, [
|
|
3186
|
-
t("div",
|
|
3187
|
-
t("div",
|
|
3184
|
+
t("div", Ql, [
|
|
3185
|
+
t("div", Xl, [
|
|
3188
3186
|
f[35] || (f[35] = t("span", null, "导入(粘贴 JSON)", -1)),
|
|
3189
3187
|
t("button", {
|
|
3190
3188
|
class: "fd-tool-btn",
|
|
@@ -3195,8 +3193,8 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3195
3193
|
onClick: B
|
|
3196
3194
|
}, "确认")
|
|
3197
3195
|
]),
|
|
3198
|
-
t("div",
|
|
3199
|
-
|
|
3196
|
+
t("div", Zl, [
|
|
3197
|
+
de(t("textarea", {
|
|
3200
3198
|
"onUpdate:modelValue": f[13] || (f[13] = (I) => C.value = I),
|
|
3201
3199
|
class: "fd-dialog-import-text",
|
|
3202
3200
|
placeholder: "请粘贴表单 JSON(可从「查看代码」复制),确认后仅覆盖表单结构,保留业务对象"
|
|
@@ -3212,9 +3210,9 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3212
3210
|
ref: Se,
|
|
3213
3211
|
class: "fd-tree-drawer"
|
|
3214
3212
|
}, [
|
|
3215
|
-
F(
|
|
3213
|
+
F(kl)
|
|
3216
3214
|
], 512)) : T("", !0),
|
|
3217
|
-
F(
|
|
3215
|
+
F(El, {
|
|
3218
3216
|
modelValue: r.value,
|
|
3219
3217
|
"onUpdate:modelValue": f[15] || (f[15] = (I) => r.value = I),
|
|
3220
3218
|
"form-id": h(n).originFormId,
|
|
@@ -3224,10 +3222,10 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3224
3222
|
]))
|
|
3225
3223
|
]));
|
|
3226
3224
|
}
|
|
3227
|
-
}),
|
|
3225
|
+
}), ti = /* @__PURE__ */ P(ei, [["__scopeId", "data-v-da21485c"]]), ni = { class: "fd-palette" }, oi = { class: "fd-palette-group-title" }, si = ["onDragstart", "onClick"], li = { class: "fd-palette-icon" }, ii = /* @__PURE__ */ N({
|
|
3228
3226
|
__name: "WidgetPalette",
|
|
3229
3227
|
setup(e) {
|
|
3230
|
-
const n =
|
|
3228
|
+
const n = Y(), o = ft(), s = [
|
|
3231
3229
|
{
|
|
3232
3230
|
title: "基础控件",
|
|
3233
3231
|
types: ["label", "text"]
|
|
@@ -3258,14 +3256,14 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3258
3256
|
function r(l) {
|
|
3259
3257
|
n.addWidget(l);
|
|
3260
3258
|
}
|
|
3261
|
-
return (l, m) => (d(), c("div",
|
|
3259
|
+
return (l, m) => (d(), c("div", ni, [
|
|
3262
3260
|
m[0] || (m[0] = t("div", { class: "fd-palette-title" }, "控件库", -1)),
|
|
3263
|
-
(d(), c(L, null,
|
|
3261
|
+
(d(), c(L, null, E(s, (p) => t("div", {
|
|
3264
3262
|
key: p.title,
|
|
3265
3263
|
class: "fd-palette-group"
|
|
3266
3264
|
}, [
|
|
3267
|
-
t("div",
|
|
3268
|
-
(d(!0), c(L, null,
|
|
3265
|
+
t("div", oi, k(p.title), 1),
|
|
3266
|
+
(d(!0), c(L, null, E(p.types, (y) => (d(), c(L, { key: y }, [
|
|
3269
3267
|
a(y) ? (d(), c("div", {
|
|
3270
3268
|
key: 0,
|
|
3271
3269
|
class: "fd-palette-item",
|
|
@@ -3273,31 +3271,31 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3273
3271
|
onDragstart: (C) => u(C, y),
|
|
3274
3272
|
onClick: (C) => r(y)
|
|
3275
3273
|
}, [
|
|
3276
|
-
t("span",
|
|
3274
|
+
t("span", li, k(i[y]), 1),
|
|
3277
3275
|
t("span", null, k(a(y).title), 1)
|
|
3278
|
-
], 40,
|
|
3276
|
+
], 40, si)) : T("", !0)
|
|
3279
3277
|
], 64))), 128))
|
|
3280
3278
|
])), 64))
|
|
3281
3279
|
]));
|
|
3282
3280
|
}
|
|
3283
|
-
}),
|
|
3281
|
+
}), ai = /* @__PURE__ */ P(ii, [["__scopeId", "data-v-6a2bab90"]]), di = [
|
|
3284
3282
|
{ key: "onLoad", label: "加载完成", desc: "表单数据就绪后触发" },
|
|
3285
3283
|
{ key: "onMounted", label: "渲染挂载", desc: "渲染完成并挂载到 DOM 后触发" },
|
|
3286
3284
|
{ key: "onValueChange", label: "值变化", desc: "任意字段值变化时触发" },
|
|
3287
3285
|
{ key: "custom", label: "自定义方法", desc: "写入的方法将挂载至全局 window,可在其他事件处理中调用" }
|
|
3288
|
-
],
|
|
3286
|
+
], ri = { class: "fd-form-events" }, ui = { class: "fd-form-meta" }, ci = { class: "fd-events-section" }, fi = { class: "fd-event-head" }, mi = ["title"], pi = { class: "fd-event-key" }, vi = ["onClick", "title"], bi = {
|
|
3289
3287
|
key: 0,
|
|
3290
3288
|
class: "fd-event-trigger-text"
|
|
3291
|
-
},
|
|
3289
|
+
}, gi = {
|
|
3292
3290
|
key: 1,
|
|
3293
3291
|
class: "fd-event-trigger-placeholder"
|
|
3294
|
-
},
|
|
3292
|
+
}, hi = {
|
|
3295
3293
|
class: "fd-dialog",
|
|
3296
3294
|
style: { "max-width": "600px" }
|
|
3297
|
-
},
|
|
3295
|
+
}, yi = { class: "fd-dialog-head" }, ki = { class: "fd-dialog-body" }, wi = /* @__PURE__ */ N({
|
|
3298
3296
|
__name: "FormEventsPanel",
|
|
3299
3297
|
setup(e) {
|
|
3300
|
-
const n = Ze(() => import("./CodeEditor-
|
|
3298
|
+
const n = Ze(() => import("./CodeEditor-C8Hh8Y2_.js")), o = Y(), s = Ue({
|
|
3301
3299
|
open: !1,
|
|
3302
3300
|
type: "",
|
|
3303
3301
|
hookKey: "",
|
|
@@ -3314,33 +3312,33 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3314
3312
|
function u() {
|
|
3315
3313
|
s.open = !1;
|
|
3316
3314
|
}
|
|
3317
|
-
return (r, l) => (d(), c("div",
|
|
3315
|
+
return (r, l) => (d(), c("div", ri, [
|
|
3318
3316
|
l[4] || (l[4] = t("div", { class: "fd-property-title" }, "表单属性", -1)),
|
|
3319
|
-
t("div",
|
|
3317
|
+
t("div", ui, [
|
|
3320
3318
|
t("span", null, "表单:" + k(h(o).formId), 1),
|
|
3321
3319
|
t("span", null, "主表:" + k(h(o).dbtable), 1)
|
|
3322
3320
|
]),
|
|
3323
|
-
t("section",
|
|
3321
|
+
t("section", ci, [
|
|
3324
3322
|
l[2] || (l[2] = t("h4", { class: "fd-events-h" }, "全局事件 · 生命周期", -1)),
|
|
3325
3323
|
l[3] || (l[3] = t("p", { class: "fd-events-tip" }, "渲染时绑定至对应钩子函数中执行", -1)),
|
|
3326
|
-
(d(!0), c(L, null,
|
|
3324
|
+
(d(!0), c(L, null, E(h(di), (m) => (d(), c("div", {
|
|
3327
3325
|
key: m.key,
|
|
3328
3326
|
class: "fd-event-row"
|
|
3329
3327
|
}, [
|
|
3330
|
-
t("div",
|
|
3328
|
+
t("div", fi, [
|
|
3331
3329
|
t("label", {
|
|
3332
3330
|
title: m.desc
|
|
3333
|
-
}, k(m.label), 9,
|
|
3334
|
-
t("code",
|
|
3331
|
+
}, k(m.label), 9, mi),
|
|
3332
|
+
t("code", pi, k(m.key), 1)
|
|
3335
3333
|
]),
|
|
3336
3334
|
t("div", {
|
|
3337
3335
|
class: "fd-event-trigger",
|
|
3338
3336
|
onClick: (p) => i(m),
|
|
3339
3337
|
title: h(o).events.lifecycle[m.key] || "点击编写处理函数"
|
|
3340
3338
|
}, [
|
|
3341
|
-
h(o).events.lifecycle[m.key] ? (d(), c("span",
|
|
3339
|
+
h(o).events.lifecycle[m.key] ? (d(), c("span", bi, k(h(o).events.lifecycle[m.key]), 1)) : (d(), c("span", gi, "点击编写")),
|
|
3342
3340
|
l[1] || (l[1] = t("span", { class: "fd-event-trigger-arrow" }, "›", -1))
|
|
3343
|
-
], 8,
|
|
3341
|
+
], 8, vi)
|
|
3344
3342
|
]))), 128))
|
|
3345
3343
|
]),
|
|
3346
3344
|
(d(), R(we, { to: "body" }, [
|
|
@@ -3349,8 +3347,8 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3349
3347
|
class: "fd-dialog-mask",
|
|
3350
3348
|
onClick: G(u, ["self"])
|
|
3351
3349
|
}, [
|
|
3352
|
-
t("div",
|
|
3353
|
-
t("div",
|
|
3350
|
+
t("div", hi, [
|
|
3351
|
+
t("div", yi, [
|
|
3354
3352
|
t("span", null, "编写处理函数 - " + k(s.title), 1),
|
|
3355
3353
|
t("button", {
|
|
3356
3354
|
class: "fd-dialog-close",
|
|
@@ -3358,7 +3356,7 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3358
3356
|
title: "关闭"
|
|
3359
3357
|
}, "×")
|
|
3360
3358
|
]),
|
|
3361
|
-
t("div",
|
|
3359
|
+
t("div", ki, [
|
|
3362
3360
|
F(h(n), {
|
|
3363
3361
|
modelValue: s.draft,
|
|
3364
3362
|
"onUpdate:modelValue": l[0] || (l[0] = (m) => s.draft = m),
|
|
@@ -3376,23 +3374,23 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3376
3374
|
]))
|
|
3377
3375
|
]));
|
|
3378
3376
|
}
|
|
3379
|
-
}),
|
|
3377
|
+
}), $i = /* @__PURE__ */ P(wi, [["__scopeId", "data-v-7e5a3f15"]]), xi = { class: "fd-property" }, Ci = {
|
|
3380
3378
|
key: 1,
|
|
3381
3379
|
class: "fd-property-empty"
|
|
3382
|
-
},
|
|
3380
|
+
}, _i = {
|
|
3383
3381
|
key: 1,
|
|
3384
3382
|
class: "fd-property-item"
|
|
3385
|
-
},
|
|
3383
|
+
}, Ii = ["value"], Si = { class: "fd-property-foot" }, Di = { class: "fd-property-type" }, Ti = /* @__PURE__ */ N({
|
|
3386
3384
|
__name: "PropertyPanel",
|
|
3387
3385
|
setup(e) {
|
|
3388
|
-
const n =
|
|
3386
|
+
const n = Y(), o = M(() => n.selectedNode), s = M(() => o.value ? X(o.value.type) : void 0), i = M(() => {
|
|
3389
3387
|
var l;
|
|
3390
3388
|
return (l = s.value) == null ? void 0 : l.panel;
|
|
3391
3389
|
});
|
|
3392
3390
|
function a(l) {
|
|
3393
3391
|
o.value && n.updateNode(o.value.id, l);
|
|
3394
3392
|
}
|
|
3395
|
-
const u =
|
|
3393
|
+
const u = M(() => o.value != null && o.value.gridSpan != null);
|
|
3396
3394
|
function r(l) {
|
|
3397
3395
|
if (!o.value) return;
|
|
3398
3396
|
const m = Number(l.target.value), p = Math.min(24, Math.max(1, Number.isFinite(m) ? Math.round(m) : 24));
|
|
@@ -3400,16 +3398,16 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3400
3398
|
}
|
|
3401
3399
|
return (l, m) => {
|
|
3402
3400
|
var p;
|
|
3403
|
-
return d(), c("div",
|
|
3401
|
+
return d(), c("div", xi, [
|
|
3404
3402
|
m[2] || (m[2] = t("div", { class: "fd-property-title" }, "属性", -1)),
|
|
3405
|
-
h(n).selectedForm ? (d(), R(
|
|
3406
|
-
i.value ? (d(), R(
|
|
3403
|
+
h(n).selectedForm ? (d(), R($i, { key: 0 })) : o.value ? (d(), c(L, { key: 2 }, [
|
|
3404
|
+
i.value ? (d(), R(ke(i.value), {
|
|
3407
3405
|
key: 0,
|
|
3408
3406
|
node: o.value,
|
|
3409
3407
|
fields: h(n).fields,
|
|
3410
3408
|
onUpdate: a
|
|
3411
3409
|
}, null, 40, ["node", "fields"])) : T("", !0),
|
|
3412
|
-
u.value ? (d(), c("div",
|
|
3410
|
+
u.value ? (d(), c("div", _i, [
|
|
3413
3411
|
m[1] || (m[1] = t("label", null, "占比", -1)),
|
|
3414
3412
|
t("input", {
|
|
3415
3413
|
type: "number",
|
|
@@ -3417,12 +3415,12 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3417
3415
|
max: "24",
|
|
3418
3416
|
value: o.value.gridSpan,
|
|
3419
3417
|
onChange: r
|
|
3420
|
-
}, null, 40,
|
|
3418
|
+
}, null, 40, Ii)
|
|
3421
3419
|
])) : T("", !0),
|
|
3422
|
-
t("div",
|
|
3423
|
-
t("span",
|
|
3420
|
+
t("div", Si, [
|
|
3421
|
+
t("span", Di, "类型:" + k((p = s.value) == null ? void 0 : p.title), 1)
|
|
3424
3422
|
])
|
|
3425
|
-
], 64)) : (d(), c("div",
|
|
3423
|
+
], 64)) : (d(), c("div", Ci, [...m[0] || (m[0] = [
|
|
3426
3424
|
t("span", { class: "fd-property-empty-icon" }, "⚙", -1),
|
|
3427
3425
|
t("span", null, [
|
|
3428
3426
|
U("请选择左侧控件"),
|
|
@@ -3433,10 +3431,10 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3433
3431
|
]);
|
|
3434
3432
|
};
|
|
3435
3433
|
}
|
|
3436
|
-
}),
|
|
3434
|
+
}), Li = /* @__PURE__ */ P(Ti, [["__scopeId", "data-v-e89617c7"]]), Fi = {
|
|
3437
3435
|
key: 0,
|
|
3438
3436
|
class: "fd-canvas-dropzone"
|
|
3439
|
-
},
|
|
3437
|
+
}, Ni = /* @__PURE__ */ N({
|
|
3440
3438
|
__name: "CanvasNode",
|
|
3441
3439
|
props: {
|
|
3442
3440
|
node: {},
|
|
@@ -3444,7 +3442,7 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3444
3442
|
index: {}
|
|
3445
3443
|
},
|
|
3446
3444
|
setup(e) {
|
|
3447
|
-
const n = e, o =
|
|
3445
|
+
const n = e, o = Y(), s = O(null), i = M(() => {
|
|
3448
3446
|
const v = {};
|
|
3449
3447
|
return n.node.gridSpan != null && (v.gridColumn = `span ${n.node.gridSpan}`), n.node.type === "text" && (v.display = n.node.display || "inline-block"), Object.keys(v).length ? v : void 0;
|
|
3450
3448
|
}), a = () => {
|
|
@@ -3493,10 +3491,10 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3493
3491
|
C();
|
|
3494
3492
|
}
|
|
3495
3493
|
function D(v) {
|
|
3496
|
-
var V,
|
|
3494
|
+
var V, K, x;
|
|
3497
3495
|
if (!r(v)) return;
|
|
3498
3496
|
v.preventDefault(), v.stopPropagation();
|
|
3499
|
-
const g = (V = v.dataTransfer) == null ? void 0 : V.getData("application/x-fd-new"), $ = (
|
|
3497
|
+
const g = (V = v.dataTransfer) == null ? void 0 : V.getData("application/x-fd-new"), $ = (K = v.dataTransfer) == null ? void 0 : K.getData("application/x-fd-move");
|
|
3500
3498
|
if (a())
|
|
3501
3499
|
g ? o.addWidget(g, n.node.id) : $ && o.moveNode($, n.node.id, ((x = n.node.children) == null ? void 0 : x.length) ?? 0);
|
|
3502
3500
|
else {
|
|
@@ -3519,7 +3517,7 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3519
3517
|
"dragging-source": h(o).draggingId === e.node.id
|
|
3520
3518
|
}
|
|
3521
3519
|
]]),
|
|
3522
|
-
style:
|
|
3520
|
+
style: q(i.value),
|
|
3523
3521
|
draggable: "true",
|
|
3524
3522
|
onMousedown: G(l, ["stop"]),
|
|
3525
3523
|
onClick: g[4] || (g[4] = G(() => {
|
|
@@ -3592,18 +3590,18 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3592
3590
|
F(Ce, {
|
|
3593
3591
|
node: e.node,
|
|
3594
3592
|
mode: "design"
|
|
3595
|
-
},
|
|
3593
|
+
}, ce({ _: 2 }, [
|
|
3596
3594
|
a() && e.node.children ? {
|
|
3597
3595
|
name: "children",
|
|
3598
3596
|
fn: A(() => [
|
|
3599
|
-
(d(!0), c(L, null,
|
|
3597
|
+
(d(!0), c(L, null, E(e.node.children, (V, K) => (d(), R($, {
|
|
3600
3598
|
key: V.id,
|
|
3601
3599
|
node: V,
|
|
3602
3600
|
"parent-id": e.node.id,
|
|
3603
|
-
index:
|
|
3604
|
-
class: j(u(V,
|
|
3601
|
+
index: K,
|
|
3602
|
+
class: j(u(V, K))
|
|
3605
3603
|
}, null, 8, ["node", "parent-id", "index", "class"]))), 128)),
|
|
3606
|
-
!e.node.children || e.node.children.length === 0 ? (d(), c("div",
|
|
3604
|
+
!e.node.children || e.node.children.length === 0 ? (d(), c("div", Fi, "拖拽控件到此容器")) : T("", !0)
|
|
3607
3605
|
]),
|
|
3608
3606
|
key: "0"
|
|
3609
3607
|
} : void 0
|
|
@@ -3611,28 +3609,28 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3611
3609
|
], 38);
|
|
3612
3610
|
};
|
|
3613
3611
|
}
|
|
3614
|
-
}),
|
|
3612
|
+
}), Mi = /* @__PURE__ */ P(Ni, [["__scopeId", "data-v-3f3a43d3"]]), Ei = { class: "fd-designer" }, Pi = { class: "fd-designer-body" }, Oi = { class: "fd-designer-left" }, Ui = {
|
|
3615
3613
|
key: 0,
|
|
3616
3614
|
class: "fd-canvas-notice"
|
|
3617
|
-
},
|
|
3615
|
+
}, Bi = {
|
|
3618
3616
|
key: 1,
|
|
3619
3617
|
class: "fd-canvas-state"
|
|
3620
|
-
},
|
|
3618
|
+
}, Ri = {
|
|
3621
3619
|
key: 2,
|
|
3622
3620
|
class: "fd-canvas-state fd-canvas-state--error"
|
|
3623
|
-
},
|
|
3621
|
+
}, Vi = {
|
|
3624
3622
|
key: 0,
|
|
3625
3623
|
class: "fd-canvas-empty"
|
|
3626
|
-
},
|
|
3624
|
+
}, Ai = { class: "fd-designer-right" }, ji = /* @__PURE__ */ N({
|
|
3627
3625
|
__name: "Designer",
|
|
3628
3626
|
props: {
|
|
3629
3627
|
formId: {}
|
|
3630
3628
|
},
|
|
3631
3629
|
setup(e) {
|
|
3632
|
-
const n = e, o =
|
|
3633
|
-
|
|
3630
|
+
const n = e, o = Y();
|
|
3631
|
+
ve(async () => {
|
|
3634
3632
|
const i = new URLSearchParams(window.location.search), a = i.get("baseUrl");
|
|
3635
|
-
a &&
|
|
3633
|
+
a && zs(a);
|
|
3636
3634
|
const u = n.formId || i.get("id") || "", r = i.get("formVersion") || i.get("FormVersion") || "", l = i.get("openType") || i.get("OpenType") || "";
|
|
3637
3635
|
await o.openForm(u, r, l);
|
|
3638
3636
|
});
|
|
@@ -3642,11 +3640,11 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3642
3640
|
const a = (r = i.dataTransfer) == null ? void 0 : r.getData("application/x-fd-new"), u = (l = i.dataTransfer) == null ? void 0 : l.getData("application/x-fd-move");
|
|
3643
3641
|
a ? o.addWidget(a, null, o.widgets.length) : u && o.moveNode(u, null, o.widgets.length);
|
|
3644
3642
|
}
|
|
3645
|
-
return (i, a) => (d(), c("div",
|
|
3646
|
-
F(
|
|
3647
|
-
t("div",
|
|
3648
|
-
t("aside",
|
|
3649
|
-
F(
|
|
3643
|
+
return (i, a) => (d(), c("div", Ei, [
|
|
3644
|
+
F(ti),
|
|
3645
|
+
t("div", Pi, [
|
|
3646
|
+
t("aside", Oi, [
|
|
3647
|
+
F(ai)
|
|
3650
3648
|
]),
|
|
3651
3649
|
t("main", {
|
|
3652
3650
|
class: "fd-designer-center",
|
|
@@ -3654,17 +3652,17 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3654
3652
|
}, ["prevent"])),
|
|
3655
3653
|
onDrop: s
|
|
3656
3654
|
}, [
|
|
3657
|
-
h(o).noticeMsg ? (d(), c("div",
|
|
3658
|
-
h(o).loading ? (d(), c("div",
|
|
3655
|
+
h(o).noticeMsg ? (d(), c("div", Ui, k(h(o).noticeMsg), 1)) : T("", !0),
|
|
3656
|
+
h(o).loading ? (d(), c("div", Bi, "正在加载表单…")) : h(o).errorMsg ? (d(), c("div", Ri, k(h(o).errorMsg), 1)) : (d(), c("div", {
|
|
3659
3657
|
key: 3,
|
|
3660
3658
|
class: j(["fd-canvas", { "is-mobile": h(o).device === "mobile", "is-selected": h(o).selectedForm }]),
|
|
3661
3659
|
onClick: a[0] || (a[0] = (u) => h(o).selectForm())
|
|
3662
3660
|
}, [
|
|
3663
|
-
h(o).widgets.length === 0 ? (d(), c("div",
|
|
3661
|
+
h(o).widgets.length === 0 ? (d(), c("div", Vi, [...a[2] || (a[2] = [
|
|
3664
3662
|
t("span", { class: "fd-canvas-empty-icon" }, "▦", -1),
|
|
3665
3663
|
t("span", null, "从左侧拖拽控件到此处", -1)
|
|
3666
3664
|
])])) : T("", !0),
|
|
3667
|
-
(d(!0), c(L, null,
|
|
3665
|
+
(d(!0), c(L, null, E(h(o).widgets, (u, r) => (d(), R(Mi, {
|
|
3668
3666
|
key: u.id,
|
|
3669
3667
|
node: u,
|
|
3670
3668
|
"parent-id": null,
|
|
@@ -3672,18 +3670,70 @@ const xl = { class: "fd-publish-tip" }, Cl = { class: "fd-publish-tip-text" }, _
|
|
|
3672
3670
|
}, null, 8, ["node", "index"]))), 128))
|
|
3673
3671
|
], 2))
|
|
3674
3672
|
], 32),
|
|
3675
|
-
t("aside",
|
|
3676
|
-
F(
|
|
3673
|
+
t("aside", Ai, [
|
|
3674
|
+
F(Li)
|
|
3677
3675
|
])
|
|
3678
3676
|
])
|
|
3679
3677
|
]));
|
|
3680
3678
|
}
|
|
3681
|
-
}),
|
|
3682
|
-
|
|
3679
|
+
}), zi = /* @__PURE__ */ P(ji, [["__scopeId", "data-v-d6db258b"]]), Ji = { class: "fd-card-title" }, Wi = { class: "fd-card-body" }, Hi = /* @__PURE__ */ N({
|
|
3680
|
+
__name: "FormCard",
|
|
3681
|
+
props: {
|
|
3682
|
+
label: { default: "卡片标题" },
|
|
3683
|
+
icon: { default: "" },
|
|
3684
|
+
iconBgColor: { default: "" },
|
|
3685
|
+
expanded: { type: Boolean, default: !0 },
|
|
3686
|
+
width: { default: "" }
|
|
3687
|
+
},
|
|
3688
|
+
setup(e) {
|
|
3689
|
+
const o = O(e.expanded);
|
|
3690
|
+
return (s, i) => (d(), c("div", {
|
|
3691
|
+
class: "fd-card-render",
|
|
3692
|
+
style: q(e.width ? { width: e.width } : void 0)
|
|
3693
|
+
}, [
|
|
3694
|
+
t("div", {
|
|
3695
|
+
class: "fd-card-head",
|
|
3696
|
+
onClick: i[0] || (i[0] = (a) => o.value = !o.value)
|
|
3697
|
+
}, [
|
|
3698
|
+
e.icon ? (d(), c("span", {
|
|
3699
|
+
key: 0,
|
|
3700
|
+
class: "fd-card-icon",
|
|
3701
|
+
style: q({ background: e.iconBgColor || void 0 })
|
|
3702
|
+
}, [
|
|
3703
|
+
F(me, {
|
|
3704
|
+
name: e.icon,
|
|
3705
|
+
size: 18
|
|
3706
|
+
}, null, 8, ["name"])
|
|
3707
|
+
], 4)) : T("", !0),
|
|
3708
|
+
t("span", Ji, k(e.label || "卡片标题"), 1),
|
|
3709
|
+
t("span", {
|
|
3710
|
+
class: j(["fd-card-arrow", { "is-open": o.value }])
|
|
3711
|
+
}, [...i[1] || (i[1] = [
|
|
3712
|
+
t("svg", {
|
|
3713
|
+
viewBox: "0 0 24 24",
|
|
3714
|
+
fill: "none",
|
|
3715
|
+
stroke: "currentColor",
|
|
3716
|
+
"stroke-width": "2",
|
|
3717
|
+
"stroke-linecap": "round",
|
|
3718
|
+
"stroke-linejoin": "round"
|
|
3719
|
+
}, [
|
|
3720
|
+
t("polyline", { points: "6 9 12 15 18 9" })
|
|
3721
|
+
], -1)
|
|
3722
|
+
])], 2)
|
|
3723
|
+
]),
|
|
3724
|
+
de(t("div", Wi, [
|
|
3725
|
+
Z(s.$slots, "default", {}, void 0, !0)
|
|
3726
|
+
], 512), [
|
|
3727
|
+
[ye, o.value]
|
|
3728
|
+
])
|
|
3729
|
+
], 4));
|
|
3730
|
+
}
|
|
3731
|
+
}), Gi = /* @__PURE__ */ P(Hi, [["__scopeId", "data-v-3c92df6b"]]);
|
|
3732
|
+
function va(e) {
|
|
3683
3733
|
_e(), e.baseUrl && je({ baseUrl: e.baseUrl });
|
|
3684
3734
|
let n = null;
|
|
3685
3735
|
const s = et({
|
|
3686
|
-
render: () =>
|
|
3736
|
+
render: () => ge(Ge, {
|
|
3687
3737
|
widgets: e.widgets,
|
|
3688
3738
|
formMode: e.formMode,
|
|
3689
3739
|
formData: e.formData,
|
|
@@ -3702,27 +3752,29 @@ function fa(e) {
|
|
|
3702
3752
|
unmount: () => s.unmount()
|
|
3703
3753
|
};
|
|
3704
3754
|
}
|
|
3705
|
-
const
|
|
3755
|
+
const ba = {
|
|
3706
3756
|
install(e, n = {}) {
|
|
3707
3757
|
_e();
|
|
3708
3758
|
const o = {};
|
|
3709
|
-
n.baseUrl && (o.baseUrl = n.baseUrl), n.loginSite && (o.loginSite = n.loginSite), n.onUnauthorized && (o.onUnauthorized = n.onUnauthorized), Object.keys(o).length && je(o), e.component("FdDesigner",
|
|
3759
|
+
n.baseUrl && (o.baseUrl = n.baseUrl), n.loginSite && (o.loginSite = n.loginSite), n.onUnauthorized && (o.onUnauthorized = n.onUnauthorized), Object.keys(o).length && je(o), e.component("FdDesigner", zi), e.component("FdFormCard", Gi);
|
|
3710
3760
|
}
|
|
3711
3761
|
};
|
|
3712
3762
|
export {
|
|
3713
|
-
|
|
3714
|
-
|
|
3763
|
+
zi as D,
|
|
3764
|
+
Gi as F,
|
|
3765
|
+
di as L,
|
|
3715
3766
|
Ge as R,
|
|
3716
3767
|
P as _,
|
|
3717
|
-
|
|
3718
|
-
|
|
3768
|
+
me as a,
|
|
3769
|
+
ba as b,
|
|
3719
3770
|
je as c,
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3771
|
+
ie as d,
|
|
3772
|
+
va as e,
|
|
3773
|
+
Js as f,
|
|
3723
3774
|
ua as g,
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3775
|
+
ma as h,
|
|
3776
|
+
fa as i,
|
|
3777
|
+
pa as l,
|
|
3778
|
+
Ws as r,
|
|
3779
|
+
ca as s
|
|
3728
3780
|
};
|