form-design-v3 1.0.4 → 1.0.6
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/dist-lib/{CodeEditor-2Kgn5c8-.js → CodeEditor-LYxKHZlN.js} +1 -1
- package/dist-lib/form-design-v3.css +1 -1
- package/dist-lib/form-design-v3.es.js +1 -1
- package/dist-lib/form-design-v3.umd.cjs +2 -4
- package/dist-lib/{index-BWDrviks.js → index-CQD0PeFm.js} +1177 -1065
- package/dist-lib/package.json +12 -0
- package/package.json +1 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { defineStore as
|
|
3
|
-
import { ElSelect as
|
|
1
|
+
import { defineComponent as E, openBlock as d, createElementBlock as c, normalizeClass as R, unref as h, createElementVNode as t, toDisplayString as k, normalizeStyle as K, Fragment as F, createTextVNode as U, computed as M, ref as O, onMounted as ce, onUnmounted as Ee, createVNode as L, withCtx as j, renderList as N, createBlock as V, resolveDynamicComponent as he, createCommentVNode as T, withModifiers as q, withDirectives as fe, renderSlot as te, vShow as ye, reactive as Pe, Teleport as ke, nextTick as Oe, resolveComponent as Ue, mergeProps as ve, createSlots as re, normalizeProps as He, guardReactiveProps as qe, provide as Ge, watch as de, createStaticVNode as we, onBeforeUnmount as Ye, vModelText as Ke, h as pe, defineAsyncComponent as Qe, createApp as Xe } from "vue";
|
|
2
|
+
import { defineStore as Ze } from "pinia";
|
|
3
|
+
import { ElSelect as ue, ElOption as ee, ElTree as et, ElLoading as tt, ElConfigProvider as nt, ElDialog as ot, ElInput as st, ElEmpty as lt, ElPagination as at, ElButton as Fe, ElInputNumber as it, ElMessage as z, ElMessageBox as dt } from "element-plus";
|
|
4
4
|
import "element-plus/es/components/select/style/css";
|
|
5
|
-
import { icons as
|
|
5
|
+
import { icons as rt } from "lucide-vue-next";
|
|
6
6
|
import "element-plus/es/components/input-number/style/css";
|
|
7
|
+
import "element-plus/es/components/message/style/css";
|
|
8
|
+
import "element-plus/es/components/message-box/style/css";
|
|
7
9
|
import "element-plus/es/components/tree/style/css";
|
|
8
10
|
import "element-plus/es/components/dialog/style/css";
|
|
9
11
|
import "element-plus/es/components/input/style/css";
|
|
@@ -12,50 +14,50 @@ import "element-plus/es/components/button/style/css";
|
|
|
12
14
|
import "element-plus/es/components/empty/style/css";
|
|
13
15
|
import "element-plus/es/components/loading/style/css";
|
|
14
16
|
import "element-plus/es/components/config-provider/style/css";
|
|
15
|
-
const
|
|
16
|
-
function
|
|
17
|
-
|
|
17
|
+
const $e = /* @__PURE__ */ new Map();
|
|
18
|
+
function le(e) {
|
|
19
|
+
$e.set(e.type, e);
|
|
18
20
|
}
|
|
19
|
-
function
|
|
20
|
-
return
|
|
21
|
+
function X(e) {
|
|
22
|
+
return $e.get(e);
|
|
21
23
|
}
|
|
22
|
-
function
|
|
23
|
-
return Array.from(
|
|
24
|
+
function ut() {
|
|
25
|
+
return Array.from($e.values());
|
|
24
26
|
}
|
|
25
|
-
function
|
|
26
|
-
const n =
|
|
27
|
+
function ct(e) {
|
|
28
|
+
const n = X(e);
|
|
27
29
|
if (!n) throw new Error(`未注册的控件类型: ${e}`);
|
|
28
30
|
return { ...n.createDefaultProps(), id: `${e}_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 7)}` };
|
|
29
31
|
}
|
|
30
|
-
const
|
|
32
|
+
const ft = { class: "fd-label-name" }, mt = /* @__PURE__ */ E({
|
|
31
33
|
__name: "LabelDesign",
|
|
32
34
|
props: {
|
|
33
35
|
node: {}
|
|
34
36
|
},
|
|
35
37
|
setup(e) {
|
|
36
|
-
const n =
|
|
38
|
+
const n = G();
|
|
37
39
|
return (o, s) => (d(), c("div", {
|
|
38
40
|
class: R(["fd-label-design", { "is-mobile": h(n).device === "mobile" }])
|
|
39
41
|
}, [
|
|
40
|
-
t("span",
|
|
42
|
+
t("span", ft, k(e.node.label || "标题"), 1),
|
|
41
43
|
t("span", {
|
|
42
44
|
class: R(["fd-label-value", { "fd-label-value--link": !!e.node.bindLink }]),
|
|
43
|
-
style:
|
|
45
|
+
style: K(!e.node.bindLink && e.node.color ? { color: e.node.color } : void 0)
|
|
44
46
|
}, [
|
|
45
|
-
e.node.bindLink ? (d(), c(
|
|
46
|
-
U(
|
|
47
|
-
], 64)) : (d(), c(
|
|
48
|
-
U(
|
|
47
|
+
e.node.bindLink ? (d(), c(F, { key: 0 }, [
|
|
48
|
+
U(k(e.node.bindField || e.node.bindLink), 1)
|
|
49
|
+
], 64)) : (d(), c(F, { key: 1 }, [
|
|
50
|
+
U(k(e.node.bindField || "未绑定字段"), 1)
|
|
49
51
|
], 64))
|
|
50
52
|
], 6)
|
|
51
53
|
], 2));
|
|
52
54
|
}
|
|
53
|
-
}),
|
|
55
|
+
}), P = (e, n) => {
|
|
54
56
|
const o = e.__vccOpts || e;
|
|
55
57
|
for (const [s, a] of n)
|
|
56
58
|
o[s] = a;
|
|
57
59
|
return o;
|
|
58
|
-
},
|
|
60
|
+
}, pt = /* @__PURE__ */ P(mt, [["__scopeId", "data-v-d8f57508"]]), vt = { class: "fd-label-name" }, bt = ["data-key"], gt = ["href"], ht = /* @__PURE__ */ E({
|
|
59
61
|
__name: "LabelRender",
|
|
60
62
|
props: {
|
|
61
63
|
node: {},
|
|
@@ -64,28 +66,28 @@ const ot = { class: "fd-label-name" }, st = /* @__PURE__ */ L({
|
|
|
64
66
|
},
|
|
65
67
|
setup(e) {
|
|
66
68
|
const n = e, o = M(() => !!n.node.bindLink), s = M(() => {
|
|
67
|
-
var
|
|
68
|
-
const
|
|
69
|
-
return
|
|
70
|
-
}), a = M(() => n.value !== void 0 && n.value !== null && n.value !== "" ? String(n.value) : s.value ? s.value : ""), i =
|
|
69
|
+
var p;
|
|
70
|
+
const m = n.node.bindLink ? (p = n.formData) == null ? void 0 : p[n.node.bindLink] : void 0;
|
|
71
|
+
return m == null ? "" : String(m);
|
|
72
|
+
}), a = M(() => n.value !== void 0 && n.value !== null && n.value !== "" ? String(n.value) : s.value ? s.value : ""), i = G(), u = O(!1);
|
|
71
73
|
let r = null;
|
|
72
|
-
|
|
73
|
-
r = window.matchMedia("(max-width: 768px)"), u.value = r.matches, r.addEventListener("change", (
|
|
74
|
-
u.value =
|
|
74
|
+
ce(() => {
|
|
75
|
+
r = window.matchMedia("(max-width: 768px)"), u.value = r.matches, r.addEventListener("change", (m) => {
|
|
76
|
+
u.value = m.matches;
|
|
75
77
|
});
|
|
76
|
-
}),
|
|
78
|
+
}), Ee(() => {
|
|
77
79
|
r && r.removeEventListener("change", () => {
|
|
78
80
|
});
|
|
79
81
|
});
|
|
80
82
|
const l = M(() => i.device === "mobile" || u.value);
|
|
81
|
-
return (
|
|
83
|
+
return (m, p) => (d(), c("div", {
|
|
82
84
|
class: R(["fd-label-render", { "is-mobile": l.value }])
|
|
83
85
|
}, [
|
|
84
|
-
t("span",
|
|
86
|
+
t("span", vt, k(e.node.label || "标题"), 1),
|
|
85
87
|
t("span", {
|
|
86
88
|
class: R(["fd-label-value", { "fd-label-value--link": o.value }]),
|
|
87
89
|
"data-key": e.node.bindField,
|
|
88
|
-
style:
|
|
90
|
+
style: K(!o.value && e.node.color ? { color: e.node.color } : void 0)
|
|
89
91
|
}, [
|
|
90
92
|
s.value ? (d(), c("a", {
|
|
91
93
|
key: 0,
|
|
@@ -93,13 +95,13 @@ const ot = { class: "fd-label-name" }, st = /* @__PURE__ */ L({
|
|
|
93
95
|
href: s.value,
|
|
94
96
|
target: "_blank",
|
|
95
97
|
rel: "noopener noreferrer"
|
|
96
|
-
},
|
|
97
|
-
U(
|
|
98
|
+
}, k(a.value), 9, gt)) : (d(), c(F, { key: 1 }, [
|
|
99
|
+
U(k(a.value), 1)
|
|
98
100
|
], 64))
|
|
99
|
-
], 14,
|
|
101
|
+
], 14, bt)
|
|
100
102
|
], 2));
|
|
101
103
|
}
|
|
102
|
-
}),
|
|
104
|
+
}), yt = /* @__PURE__ */ P(ht, [["__scopeId", "data-v-d521c01f"]]), kt = { class: "fd-panel" }, wt = { class: "fd-panel-item" }, $t = ["value"], xt = { class: "fd-panel-item" }, Ct = { class: "fd-panel-item" }, _t = { class: "fd-panel-item" }, It = { class: "fd-color-row" }, Dt = ["value"], St = ["value"], Tt = "#344054", Ft = /* @__PURE__ */ E({
|
|
103
105
|
__name: "LabelPanel",
|
|
104
106
|
props: {
|
|
105
107
|
node: {},
|
|
@@ -108,27 +110,32 @@ const ot = { class: "fd-label-name" }, st = /* @__PURE__ */ L({
|
|
|
108
110
|
emits: ["update"],
|
|
109
111
|
setup(e, { emit: n }) {
|
|
110
112
|
const o = e, s = n;
|
|
111
|
-
function a(
|
|
112
|
-
return
|
|
113
|
+
function a(l) {
|
|
114
|
+
return l && /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(l) ? l : Tt;
|
|
113
115
|
}
|
|
114
|
-
function i(
|
|
115
|
-
s("update", { color:
|
|
116
|
+
function i(l) {
|
|
117
|
+
s("update", { color: l.target.value });
|
|
116
118
|
}
|
|
117
|
-
const u = (
|
|
118
|
-
const
|
|
119
|
-
|
|
119
|
+
const u = (l) => {
|
|
120
|
+
const m = l ?? "", p = o.fields.find((C) => C.name === m), y = {
|
|
121
|
+
bindField: m,
|
|
122
|
+
bindLink: (p == null ? void 0 : p.dataType) === "link" ? m : ""
|
|
123
|
+
};
|
|
124
|
+
p != null && p.label && (y.label = p.label), s("update", y);
|
|
125
|
+
}, r = (l) => {
|
|
126
|
+
s("update", { bindLink: l ?? "" });
|
|
120
127
|
};
|
|
121
|
-
return (
|
|
122
|
-
t("div",
|
|
123
|
-
|
|
128
|
+
return (l, m) => (d(), c("div", kt, [
|
|
129
|
+
t("div", wt, [
|
|
130
|
+
m[2] || (m[2] = t("label", null, "标题", -1)),
|
|
124
131
|
t("input", {
|
|
125
132
|
value: e.node.label,
|
|
126
|
-
onInput:
|
|
127
|
-
}, null, 40,
|
|
133
|
+
onInput: m[0] || (m[0] = (p) => s("update", { label: p.target.value }))
|
|
134
|
+
}, null, 40, $t)
|
|
128
135
|
]),
|
|
129
|
-
t("div",
|
|
130
|
-
|
|
131
|
-
|
|
136
|
+
t("div", xt, [
|
|
137
|
+
m[3] || (m[3] = t("label", null, "绑定字段", -1)),
|
|
138
|
+
L(h(ue), {
|
|
132
139
|
"model-value": e.node.bindField,
|
|
133
140
|
filterable: "",
|
|
134
141
|
clearable: "",
|
|
@@ -136,51 +143,68 @@ const ot = { class: "fd-label-name" }, st = /* @__PURE__ */ L({
|
|
|
136
143
|
style: { width: "100%" },
|
|
137
144
|
"onUpdate:modelValue": u
|
|
138
145
|
}, {
|
|
139
|
-
default:
|
|
140
|
-
|
|
146
|
+
default: j(() => [
|
|
147
|
+
L(h(ee), {
|
|
141
148
|
label: "不绑定",
|
|
142
149
|
value: ""
|
|
143
150
|
}),
|
|
144
|
-
(d(!0), c(
|
|
145
|
-
key:
|
|
146
|
-
label: `${
|
|
147
|
-
value:
|
|
151
|
+
(d(!0), c(F, null, N(e.fields, (p) => (d(), V(h(ee), {
|
|
152
|
+
key: p.name,
|
|
153
|
+
label: `${p.label}(${p.name})`,
|
|
154
|
+
value: p.name
|
|
148
155
|
}, null, 8, ["label", "value"]))), 128))
|
|
149
156
|
]),
|
|
150
157
|
_: 1
|
|
151
158
|
}, 8, ["model-value"])
|
|
152
159
|
]),
|
|
153
|
-
t("div",
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
value: e.node.bindLink
|
|
157
|
-
|
|
158
|
-
|
|
160
|
+
t("div", Ct, [
|
|
161
|
+
m[4] || (m[4] = t("label", null, "链接", -1)),
|
|
162
|
+
L(h(ue), {
|
|
163
|
+
"model-value": e.node.bindLink,
|
|
164
|
+
filterable: "",
|
|
165
|
+
clearable: "",
|
|
166
|
+
placeholder: "选择链接字段(留空=不绑定)",
|
|
167
|
+
style: { width: "100%" },
|
|
168
|
+
"onUpdate:modelValue": r
|
|
169
|
+
}, {
|
|
170
|
+
default: j(() => [
|
|
171
|
+
L(h(ee), {
|
|
172
|
+
label: "不绑定",
|
|
173
|
+
value: ""
|
|
174
|
+
}),
|
|
175
|
+
(d(!0), c(F, null, N(e.fields, (p) => (d(), V(h(ee), {
|
|
176
|
+
key: p.name,
|
|
177
|
+
label: `${p.label}(${p.name})`,
|
|
178
|
+
value: p.name
|
|
179
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
180
|
+
]),
|
|
181
|
+
_: 1
|
|
182
|
+
}, 8, ["model-value"])
|
|
159
183
|
]),
|
|
160
|
-
t("div",
|
|
161
|
-
|
|
162
|
-
t("div",
|
|
184
|
+
t("div", _t, [
|
|
185
|
+
m[5] || (m[5] = t("label", null, "字体颜色", -1)),
|
|
186
|
+
t("div", It, [
|
|
163
187
|
t("input", {
|
|
164
188
|
type: "color",
|
|
165
189
|
value: a(e.node.color),
|
|
166
190
|
onInput: i
|
|
167
|
-
}, null, 40,
|
|
191
|
+
}, null, 40, Dt),
|
|
168
192
|
t("input", {
|
|
169
193
|
type: "text",
|
|
170
194
|
value: e.node.color,
|
|
171
|
-
onInput:
|
|
195
|
+
onInput: m[1] || (m[1] = (p) => s("update", { color: p.target.value })),
|
|
172
196
|
placeholder: "默认 #344054"
|
|
173
|
-
}, null, 40,
|
|
197
|
+
}, null, 40, St)
|
|
174
198
|
])
|
|
175
199
|
])
|
|
176
200
|
]));
|
|
177
201
|
}
|
|
178
|
-
}),
|
|
202
|
+
}), Lt = /* @__PURE__ */ P(Ft, [["__scopeId", "data-v-9219c401"]]), Mt = {
|
|
179
203
|
type: "label",
|
|
180
204
|
title: "Label 文本",
|
|
181
|
-
design:
|
|
182
|
-
render:
|
|
183
|
-
panel:
|
|
205
|
+
design: pt,
|
|
206
|
+
render: yt,
|
|
207
|
+
panel: Lt,
|
|
184
208
|
isContainer: !1,
|
|
185
209
|
createDefaultProps: () => ({
|
|
186
210
|
id: "",
|
|
@@ -191,7 +215,7 @@ const ot = { class: "fd-label-name" }, st = /* @__PURE__ */ L({
|
|
|
191
215
|
color: "#344054"
|
|
192
216
|
}),
|
|
193
217
|
serialize: (e) => e
|
|
194
|
-
},
|
|
218
|
+
}, be = /* @__PURE__ */ E({
|
|
195
219
|
__name: "LucideIcon",
|
|
196
220
|
props: {
|
|
197
221
|
name: {},
|
|
@@ -199,40 +223,40 @@ const ot = { class: "fd-label-name" }, st = /* @__PURE__ */ L({
|
|
|
199
223
|
strokeWidth: { default: 2 }
|
|
200
224
|
},
|
|
201
225
|
setup(e) {
|
|
202
|
-
const n = e, o = M(() => n.name &&
|
|
203
|
-
return (s, a) => o.value ? (d(), V(
|
|
226
|
+
const n = e, o = M(() => n.name && rt[n.name] || null);
|
|
227
|
+
return (s, a) => o.value ? (d(), V(he(o.value), {
|
|
204
228
|
key: 0,
|
|
205
229
|
size: e.size,
|
|
206
230
|
"stroke-width": e.strokeWidth
|
|
207
|
-
}, null, 8, ["size", "stroke-width"])) :
|
|
231
|
+
}, null, 8, ["size", "stroke-width"])) : T("", !0);
|
|
208
232
|
}
|
|
209
|
-
}),
|
|
233
|
+
}), Nt = { class: "fd-card-design" }, Et = { class: "fd-card-head" }, Pt = { class: "fd-card-title" }, Ot = ["title"], Ut = { class: "fd-card-body" }, Bt = /* @__PURE__ */ E({
|
|
210
234
|
__name: "CardDesign",
|
|
211
235
|
props: {
|
|
212
236
|
node: {}
|
|
213
237
|
},
|
|
214
238
|
setup(e) {
|
|
215
|
-
const n = e, o =
|
|
239
|
+
const n = e, o = G();
|
|
216
240
|
function s() {
|
|
217
241
|
o.setExpanded(n.node.id, !n.node.expanded);
|
|
218
242
|
}
|
|
219
|
-
return (a, i) => (d(), c("div",
|
|
220
|
-
t("div",
|
|
243
|
+
return (a, i) => (d(), c("div", Nt, [
|
|
244
|
+
t("div", Et, [
|
|
221
245
|
e.node.icon ? (d(), c("span", {
|
|
222
246
|
key: 0,
|
|
223
247
|
class: "fd-card-icon",
|
|
224
|
-
style:
|
|
248
|
+
style: K({ background: e.node.iconBgColor || void 0 })
|
|
225
249
|
}, [
|
|
226
|
-
|
|
250
|
+
L(be, {
|
|
227
251
|
name: e.node.icon,
|
|
228
252
|
size: 18
|
|
229
253
|
}, null, 8, ["name"])
|
|
230
|
-
], 4)) :
|
|
231
|
-
t("span",
|
|
254
|
+
], 4)) : T("", !0),
|
|
255
|
+
t("span", Pt, k(e.node.label || "卡片标题"), 1),
|
|
232
256
|
t("span", {
|
|
233
257
|
class: R(["fd-card-arrow", { "is-open": e.node.expanded }]),
|
|
234
258
|
title: e.node.expanded ? "收起" : "展开",
|
|
235
|
-
onClick:
|
|
259
|
+
onClick: q(s, ["stop"])
|
|
236
260
|
}, [...i[0] || (i[0] = [
|
|
237
261
|
t("svg", {
|
|
238
262
|
viewBox: "0 0 24 24",
|
|
@@ -244,27 +268,27 @@ const ot = { class: "fd-label-name" }, st = /* @__PURE__ */ L({
|
|
|
244
268
|
}, [
|
|
245
269
|
t("polyline", { points: "6 9 12 15 18 9" })
|
|
246
270
|
], -1)
|
|
247
|
-
])], 10,
|
|
271
|
+
])], 10, Ot)
|
|
248
272
|
]),
|
|
249
|
-
|
|
250
|
-
|
|
273
|
+
fe(t("div", Ut, [
|
|
274
|
+
te(a.$slots, "children", {}, () => [
|
|
251
275
|
i[1] || (i[1] = t("div", { class: "fd-card-empty" }, "拖拽子控件到此处", -1))
|
|
252
276
|
], !0)
|
|
253
277
|
], 512), [
|
|
254
|
-
[
|
|
278
|
+
[ye, e.node.expanded]
|
|
255
279
|
])
|
|
256
280
|
]));
|
|
257
281
|
}
|
|
258
|
-
}),
|
|
259
|
-
function
|
|
282
|
+
}), Vt = /* @__PURE__ */ P(Bt, [["__scopeId", "data-v-6a46ee95"]]);
|
|
283
|
+
function Be(e, n) {
|
|
260
284
|
if (!e || e === "none") return !1;
|
|
261
285
|
const o = Number(n);
|
|
262
286
|
return e === "start" ? o === 10 : e === "not-start" ? o !== 10 : e === "not-approval" ? o !== 20 : !1;
|
|
263
287
|
}
|
|
264
|
-
const
|
|
288
|
+
const At = {
|
|
265
289
|
key: 0,
|
|
266
290
|
class: "fd-card-render"
|
|
267
|
-
},
|
|
291
|
+
}, jt = { class: "fd-card-title" }, Rt = { class: "fd-card-body" }, Jt = /* @__PURE__ */ E({
|
|
268
292
|
__name: "CardRender",
|
|
269
293
|
props: {
|
|
270
294
|
node: {},
|
|
@@ -274,7 +298,7 @@ const Mt = {
|
|
|
274
298
|
const o = O(e.node.expanded);
|
|
275
299
|
return (s, a) => {
|
|
276
300
|
var i;
|
|
277
|
-
return h(
|
|
301
|
+
return h(Be)(e.node.hiddenMode, (i = e.formData) == null ? void 0 : i.status) ? T("", !0) : (d(), c("div", At, [
|
|
278
302
|
t("div", {
|
|
279
303
|
class: "fd-card-head",
|
|
280
304
|
onClick: a[0] || (a[0] = (u) => o.value = !o.value)
|
|
@@ -282,14 +306,14 @@ const Mt = {
|
|
|
282
306
|
e.node.icon ? (d(), c("span", {
|
|
283
307
|
key: 0,
|
|
284
308
|
class: "fd-card-icon",
|
|
285
|
-
style:
|
|
309
|
+
style: K({ background: e.node.iconBgColor || void 0 })
|
|
286
310
|
}, [
|
|
287
|
-
|
|
311
|
+
L(be, {
|
|
288
312
|
name: e.node.icon,
|
|
289
313
|
size: 18
|
|
290
314
|
}, null, 8, ["name"])
|
|
291
|
-
], 4)) :
|
|
292
|
-
t("span",
|
|
315
|
+
], 4)) : T("", !0),
|
|
316
|
+
t("span", jt, k(e.node.label || "卡片标题"), 1),
|
|
293
317
|
t("span", {
|
|
294
318
|
class: R(["fd-card-arrow", { "is-open": o.value }])
|
|
295
319
|
}, [...a[1] || (a[1] = [
|
|
@@ -305,15 +329,15 @@ const Mt = {
|
|
|
305
329
|
], -1)
|
|
306
330
|
])], 2)
|
|
307
331
|
]),
|
|
308
|
-
|
|
309
|
-
|
|
332
|
+
fe(t("div", Rt, [
|
|
333
|
+
te(s.$slots, "children", {}, void 0, !0)
|
|
310
334
|
], 512), [
|
|
311
|
-
[
|
|
335
|
+
[ye, o.value]
|
|
312
336
|
])
|
|
313
337
|
]));
|
|
314
338
|
};
|
|
315
339
|
}
|
|
316
|
-
}),
|
|
340
|
+
}), zt = /* @__PURE__ */ P(Jt, [["__scopeId", "data-v-bc2f6273"]]), Wt = ["disabled", "aria-checked"], Ht = /* @__PURE__ */ E({
|
|
317
341
|
__name: "FdSwitch",
|
|
318
342
|
props: {
|
|
319
343
|
modelValue: { type: Boolean },
|
|
@@ -331,9 +355,9 @@ const Mt = {
|
|
|
331
355
|
onClick: a[0] || (a[0] = (i) => o("update:modelValue", !e.modelValue))
|
|
332
356
|
}, [...a[1] || (a[1] = [
|
|
333
357
|
t("span", { class: "fd-switch-dot" }, null, -1)
|
|
334
|
-
])], 10,
|
|
358
|
+
])], 10, Wt));
|
|
335
359
|
}
|
|
336
|
-
}),
|
|
360
|
+
}), ie = /* @__PURE__ */ P(Ht, [["__scopeId", "data-v-eac909bd"]]), qt = [
|
|
337
361
|
// 卡片 / 布局通用
|
|
338
362
|
"LayoutGrid",
|
|
339
363
|
"PanelTop",
|
|
@@ -384,10 +408,10 @@ const Mt = {
|
|
|
384
408
|
"BookOpen",
|
|
385
409
|
"Coins",
|
|
386
410
|
"Wallet"
|
|
387
|
-
],
|
|
411
|
+
], Gt = { class: "fd-panel" }, Yt = { class: "fd-panel-item" }, Kt = ["value"], Qt = { class: "fd-panel-item" }, Xt = { class: "fd-icon-picker" }, Zt = {
|
|
388
412
|
key: 1,
|
|
389
413
|
class: "fd-icon-placeholder"
|
|
390
|
-
},
|
|
414
|
+
}, en = { class: "fd-icon-grid" }, tn = ["title", "onClick"], nn = { class: "fd-panel-item" }, on = ["value"], sn = { class: "fd-panel-item fd-panel-item--row" }, ln = { class: "fd-panel-item" }, an = ["value"], dn = /* @__PURE__ */ E({
|
|
391
415
|
__name: "CardPanel",
|
|
392
416
|
props: {
|
|
393
417
|
node: {},
|
|
@@ -399,28 +423,28 @@ const Mt = {
|
|
|
399
423
|
function a(i) {
|
|
400
424
|
o("update", { icon: i }), s.value = !1;
|
|
401
425
|
}
|
|
402
|
-
return (i, u) => (d(), c("div",
|
|
403
|
-
t("div",
|
|
404
|
-
u[
|
|
426
|
+
return (i, u) => (d(), c("div", Gt, [
|
|
427
|
+
t("div", Yt, [
|
|
428
|
+
u[7] || (u[7] = t("label", null, "标题", -1)),
|
|
405
429
|
t("input", {
|
|
406
430
|
value: e.node.label,
|
|
407
431
|
onInput: u[0] || (u[0] = (r) => o("update", { label: r.target.value }))
|
|
408
|
-
}, null, 40,
|
|
432
|
+
}, null, 40, Kt)
|
|
409
433
|
]),
|
|
410
|
-
t("div",
|
|
411
|
-
u[
|
|
412
|
-
t("div",
|
|
434
|
+
t("div", Qt, [
|
|
435
|
+
u[10] || (u[10] = t("label", null, "图标", -1)),
|
|
436
|
+
t("div", Xt, [
|
|
413
437
|
t("button", {
|
|
414
438
|
type: "button",
|
|
415
439
|
class: "fd-icon-trigger",
|
|
416
440
|
onClick: u[1] || (u[1] = (r) => s.value = !s.value)
|
|
417
441
|
}, [
|
|
418
|
-
e.node.icon ? (d(), V(
|
|
442
|
+
e.node.icon ? (d(), V(be, {
|
|
419
443
|
key: 0,
|
|
420
444
|
name: e.node.icon,
|
|
421
445
|
size: 16
|
|
422
|
-
}, null, 8, ["name"])) : (d(), c("span",
|
|
423
|
-
u[
|
|
446
|
+
}, null, 8, ["name"])) : (d(), c("span", Zt, "无图标")),
|
|
447
|
+
u[8] || (u[8] = t("svg", {
|
|
424
448
|
class: "fd-icon-caret",
|
|
425
449
|
viewBox: "0 0 24 24",
|
|
426
450
|
fill: "none",
|
|
@@ -435,75 +459,63 @@ const Mt = {
|
|
|
435
459
|
s.value ? (d(), c("div", {
|
|
436
460
|
key: 0,
|
|
437
461
|
class: "fd-icon-popover",
|
|
438
|
-
onClick: u[3] || (u[3] =
|
|
462
|
+
onClick: u[3] || (u[3] = q(() => {
|
|
439
463
|
}, ["stop"]))
|
|
440
464
|
}, [
|
|
441
|
-
t("div",
|
|
465
|
+
t("div", en, [
|
|
442
466
|
t("button", {
|
|
443
467
|
type: "button",
|
|
444
468
|
class: R(["fd-icon-option", { active: !e.node.icon }]),
|
|
445
469
|
title: "无图标",
|
|
446
470
|
onClick: u[2] || (u[2] = (r) => a(""))
|
|
447
|
-
}, [...u[
|
|
471
|
+
}, [...u[9] || (u[9] = [
|
|
448
472
|
t("span", { class: "fd-icon-none" }, "无", -1)
|
|
449
473
|
])], 2),
|
|
450
|
-
(d(!0), c(
|
|
474
|
+
(d(!0), c(F, null, N(h(qt), (r) => (d(), c("button", {
|
|
451
475
|
key: r,
|
|
452
476
|
type: "button",
|
|
453
477
|
class: R(["fd-icon-option", { active: e.node.icon === r }]),
|
|
454
478
|
title: r,
|
|
455
479
|
onClick: (l) => a(r)
|
|
456
480
|
}, [
|
|
457
|
-
|
|
481
|
+
L(be, {
|
|
458
482
|
name: r,
|
|
459
483
|
size: 18
|
|
460
484
|
}, null, 8, ["name"])
|
|
461
|
-
], 10,
|
|
485
|
+
], 10, tn))), 128))
|
|
462
486
|
])
|
|
463
|
-
])) :
|
|
487
|
+
])) : T("", !0)
|
|
464
488
|
])
|
|
465
489
|
]),
|
|
466
|
-
t("div",
|
|
467
|
-
u[
|
|
490
|
+
t("div", nn, [
|
|
491
|
+
u[11] || (u[11] = t("label", null, "图标底色", -1)),
|
|
468
492
|
t("input", {
|
|
469
493
|
value: e.node.iconBgColor,
|
|
470
494
|
onInput: u[4] || (u[4] = (r) => o("update", { iconBgColor: r.target.value }))
|
|
471
|
-
}, null, 40,
|
|
495
|
+
}, null, 40, on)
|
|
472
496
|
]),
|
|
473
|
-
t("div",
|
|
474
|
-
u[
|
|
475
|
-
|
|
497
|
+
t("div", sn, [
|
|
498
|
+
u[12] || (u[12] = t("label", null, "初始展开", -1)),
|
|
499
|
+
L(ie, {
|
|
476
500
|
"model-value": e.node.expanded,
|
|
477
501
|
"onUpdate:modelValue": u[5] || (u[5] = (r) => o("update", { expanded: r }))
|
|
478
502
|
}, null, 8, ["model-value"])
|
|
479
503
|
]),
|
|
480
|
-
t("div",
|
|
481
|
-
u[
|
|
504
|
+
t("div", ln, [
|
|
505
|
+
u[13] || (u[13] = t("label", null, "宽度", -1)),
|
|
482
506
|
t("input", {
|
|
483
507
|
value: e.node.width,
|
|
484
508
|
onInput: u[6] || (u[6] = (r) => o("update", { width: r.target.value }))
|
|
485
|
-
}, null, 40,
|
|
486
|
-
]),
|
|
487
|
-
t("div", Zt, [
|
|
488
|
-
u[16] || (u[16] = t("label", null, "是否隐藏", -1)),
|
|
489
|
-
t("select", {
|
|
490
|
-
value: e.node.hiddenMode || "none",
|
|
491
|
-
onChange: u[7] || (u[7] = (r) => o("update", { hiddenMode: r.target.value }))
|
|
492
|
-
}, [...u[15] || (u[15] = [
|
|
493
|
-
t("option", { value: "none" }, "不隐藏", -1),
|
|
494
|
-
t("option", { value: "start" }, "发起时隐藏", -1),
|
|
495
|
-
t("option", { value: "not-start" }, "非发起时隐藏", -1),
|
|
496
|
-
t("option", { value: "not-approval" }, "非审批时隐藏", -1)
|
|
497
|
-
])], 40, en)
|
|
509
|
+
}, null, 40, an)
|
|
498
510
|
])
|
|
499
511
|
]));
|
|
500
512
|
}
|
|
501
|
-
}),
|
|
513
|
+
}), rn = /* @__PURE__ */ P(dn, [["__scopeId", "data-v-d3ccdc07"]]), un = {
|
|
502
514
|
type: "card",
|
|
503
515
|
title: "卡片容器",
|
|
504
|
-
design:
|
|
505
|
-
render:
|
|
506
|
-
panel:
|
|
516
|
+
design: Vt,
|
|
517
|
+
render: zt,
|
|
518
|
+
panel: rn,
|
|
507
519
|
isContainer: !0,
|
|
508
520
|
createDefaultProps: () => ({
|
|
509
521
|
id: "",
|
|
@@ -518,21 +530,24 @@ const Mt = {
|
|
|
518
530
|
children: []
|
|
519
531
|
}),
|
|
520
532
|
serialize: (e) => e
|
|
521
|
-
},
|
|
533
|
+
}, cn = { class: "fd-slot-design" }, fn = { class: "fd-slot-hint" }, mn = /* @__PURE__ */ E({
|
|
522
534
|
__name: "SlotDesign",
|
|
523
535
|
props: {
|
|
524
536
|
node: {}
|
|
525
537
|
},
|
|
526
538
|
setup(e) {
|
|
527
|
-
return (n, o) => (d(), c("div",
|
|
539
|
+
return (n, o) => (d(), c("div", cn, [
|
|
528
540
|
o[0] || (o[0] = t("span", { class: "fd-slot-tag" }, "插槽", -1)),
|
|
529
|
-
t("span",
|
|
541
|
+
fe(t("span", { class: "fd-slot-name" }, k(e.node.label || "未命名插槽"), 513), [
|
|
542
|
+
[ye, !["", "插", "插槽"].includes(e.node.label)]
|
|
543
|
+
]),
|
|
544
|
+
t("span", fn, "宿主注入:" + k(e.node.slotName), 1)
|
|
530
545
|
]));
|
|
531
546
|
}
|
|
532
|
-
}),
|
|
547
|
+
}), pn = /* @__PURE__ */ P(mn, [["__scopeId", "data-v-b1a912fb"]]), vn = {
|
|
533
548
|
key: 0,
|
|
534
549
|
class: "fd-slot-render"
|
|
535
|
-
},
|
|
550
|
+
}, bn = { class: "fd-slot-missing" }, gn = /* @__PURE__ */ E({
|
|
536
551
|
__name: "SlotRender",
|
|
537
552
|
props: {
|
|
538
553
|
node: {},
|
|
@@ -543,19 +558,51 @@ const Mt = {
|
|
|
543
558
|
setup(e) {
|
|
544
559
|
return (n, o) => {
|
|
545
560
|
var s;
|
|
546
|
-
return h(
|
|
547
|
-
|
|
561
|
+
return h(Be)(e.node.hiddenMode, (s = e.formData) == null ? void 0 : s.status) ? T("", !0) : (d(), c("div", vn, [
|
|
562
|
+
te(n.$slots, e.node.slotName, {
|
|
548
563
|
node: e.node,
|
|
549
564
|
formData: e.formData,
|
|
550
565
|
mode: e.mode,
|
|
551
566
|
formId: e.formId
|
|
552
567
|
}, () => [
|
|
553
|
-
t("div",
|
|
568
|
+
t("div", bn, "未注入插槽:" + k(e.node.slotName), 1)
|
|
554
569
|
], !0)
|
|
555
570
|
]));
|
|
556
571
|
};
|
|
557
572
|
}
|
|
558
|
-
}),
|
|
573
|
+
}), hn = /* @__PURE__ */ P(gn, [["__scopeId", "data-v-10795159"]]), yn = [
|
|
574
|
+
"header",
|
|
575
|
+
"base-info",
|
|
576
|
+
"shop-tuning",
|
|
577
|
+
"contract-links",
|
|
578
|
+
"contract-list",
|
|
579
|
+
"handover-records",
|
|
580
|
+
"attachments",
|
|
581
|
+
"ai-risk",
|
|
582
|
+
"initiator-opinion",
|
|
583
|
+
"approval-flow",
|
|
584
|
+
"return-records",
|
|
585
|
+
"approval-records",
|
|
586
|
+
"approval-opinion",
|
|
587
|
+
"related-flows",
|
|
588
|
+
"footer"
|
|
589
|
+
], me = {
|
|
590
|
+
header: "页面头部",
|
|
591
|
+
"base-info": "基础信息",
|
|
592
|
+
"shop-tuning": "招调信息",
|
|
593
|
+
"contract-links": "查看图纸/缴款计划",
|
|
594
|
+
"contract-list": "合同列表",
|
|
595
|
+
"handover-records": "交办记录",
|
|
596
|
+
attachments: "附件信息",
|
|
597
|
+
"ai-risk": "AI风险识别",
|
|
598
|
+
"initiator-opinion": "发起人意见",
|
|
599
|
+
"approval-flow": "审批流程",
|
|
600
|
+
"return-records": "退回记录",
|
|
601
|
+
"approval-records": "审批记录",
|
|
602
|
+
"approval-opinion": "审批意见",
|
|
603
|
+
"related-flows": "相关流程",
|
|
604
|
+
footer: "页面底部"
|
|
605
|
+
}, kn = { class: "fd-panel" }, wn = { class: "fd-panel-item" }, $n = ["value"], xn = { class: "fd-panel-item" }, Le = "插槽", Cn = /* @__PURE__ */ E({
|
|
559
606
|
__name: "SlotPanel",
|
|
560
607
|
props: {
|
|
561
608
|
node: {},
|
|
@@ -563,47 +610,37 @@ const Mt = {
|
|
|
563
610
|
},
|
|
564
611
|
emits: ["update"],
|
|
565
612
|
setup(e, { emit: n }) {
|
|
566
|
-
const o =
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
"contract-list",
|
|
572
|
-
"handover-records",
|
|
573
|
-
"attachments",
|
|
574
|
-
"ai-risk",
|
|
575
|
-
"initiator-opinion",
|
|
576
|
-
"approval-flow",
|
|
577
|
-
"return-records",
|
|
578
|
-
"approval-records",
|
|
579
|
-
"approval-opinion",
|
|
580
|
-
"footer"
|
|
581
|
-
], i = O([]);
|
|
582
|
-
function u(f, v) {
|
|
583
|
-
f.forEach((k) => {
|
|
584
|
-
var P;
|
|
585
|
-
k.type === "slot" && k.slotName && v.add(k.slotName), (P = k.children) != null && P.length && u(k.children, v);
|
|
613
|
+
const o = e, s = n, a = G(), i = O([]);
|
|
614
|
+
function u(p, y) {
|
|
615
|
+
p.forEach((C) => {
|
|
616
|
+
var B;
|
|
617
|
+
C.type === "slot" && C.slotName && y.add(C.slotName), (B = C.children) != null && B.length && u(C.children, y);
|
|
586
618
|
});
|
|
587
619
|
}
|
|
588
620
|
const r = M(() => {
|
|
589
|
-
const
|
|
590
|
-
return u(
|
|
591
|
-
})
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
621
|
+
const p = new Set(yn);
|
|
622
|
+
return u(a.widgets, p), i.value.forEach((y) => y && p.add(y)), [...p];
|
|
623
|
+
}), l = M(
|
|
624
|
+
() => o.node.label || me[o.node.slotName || ""] || Le
|
|
625
|
+
);
|
|
626
|
+
function m(p) {
|
|
627
|
+
const y = p ?? "";
|
|
628
|
+
y && !r.value.includes(y) && i.value.push(y), s("update", {
|
|
629
|
+
slotName: y,
|
|
630
|
+
label: me[y] || Le
|
|
631
|
+
});
|
|
595
632
|
}
|
|
596
|
-
return (
|
|
597
|
-
t("div",
|
|
598
|
-
|
|
633
|
+
return (p, y) => (d(), c("div", kn, [
|
|
634
|
+
t("div", wn, [
|
|
635
|
+
y[1] || (y[1] = t("label", null, "标题", -1)),
|
|
599
636
|
t("input", {
|
|
600
|
-
value:
|
|
601
|
-
onInput:
|
|
602
|
-
}, null, 40,
|
|
637
|
+
value: l.value,
|
|
638
|
+
onInput: y[0] || (y[0] = (C) => s("update", { label: C.target.value }))
|
|
639
|
+
}, null, 40, $n)
|
|
603
640
|
]),
|
|
604
|
-
t("div",
|
|
605
|
-
|
|
606
|
-
|
|
641
|
+
t("div", xn, [
|
|
642
|
+
y[2] || (y[2] = t("label", null, "插槽名", -1)),
|
|
643
|
+
L(h(ue), {
|
|
607
644
|
"model-value": e.node.slotName,
|
|
608
645
|
filterable: "",
|
|
609
646
|
"allow-create": "",
|
|
@@ -611,38 +648,31 @@ const Mt = {
|
|
|
611
648
|
"default-first-option": "",
|
|
612
649
|
placeholder: "选择已有插槽名,或输入新名称创建",
|
|
613
650
|
style: { width: "100%" },
|
|
614
|
-
"onUpdate:modelValue":
|
|
651
|
+
"onUpdate:modelValue": m
|
|
615
652
|
}, {
|
|
616
|
-
default:
|
|
617
|
-
(d(!0), c(
|
|
618
|
-
key:
|
|
619
|
-
label:
|
|
620
|
-
value:
|
|
621
|
-
},
|
|
653
|
+
default: j(() => [
|
|
654
|
+
(d(!0), c(F, null, N(r.value, (C) => (d(), V(h(ee), {
|
|
655
|
+
key: C,
|
|
656
|
+
label: C,
|
|
657
|
+
value: C
|
|
658
|
+
}, {
|
|
659
|
+
default: j(() => [
|
|
660
|
+
U(k(h(me)[C] ? `${h(me)[C]}(${C})` : C), 1)
|
|
661
|
+
]),
|
|
662
|
+
_: 2
|
|
663
|
+
}, 1032, ["label", "value"]))), 128))
|
|
622
664
|
]),
|
|
623
665
|
_: 1
|
|
624
666
|
}, 8, ["model-value"])
|
|
625
|
-
]),
|
|
626
|
-
t("div", gn, [
|
|
627
|
-
v[5] || (v[5] = t("label", null, "是否隐藏", -1)),
|
|
628
|
-
t("select", {
|
|
629
|
-
value: e.node.hiddenMode || "none",
|
|
630
|
-
onChange: v[1] || (v[1] = (k) => o("update", { hiddenMode: k.target.value }))
|
|
631
|
-
}, [...v[4] || (v[4] = [
|
|
632
|
-
t("option", { value: "none" }, "不隐藏", -1),
|
|
633
|
-
t("option", { value: "start" }, "发起时隐藏", -1),
|
|
634
|
-
t("option", { value: "not-start" }, "非发起时隐藏", -1),
|
|
635
|
-
t("option", { value: "not-approval" }, "非审批时隐藏", -1)
|
|
636
|
-
])], 40, hn)
|
|
637
667
|
])
|
|
638
668
|
]));
|
|
639
669
|
}
|
|
640
|
-
}),
|
|
670
|
+
}), _n = /* @__PURE__ */ P(Cn, [["__scopeId", "data-v-56e42d3f"]]), In = {
|
|
641
671
|
type: "slot",
|
|
642
672
|
title: "插槽",
|
|
643
|
-
design:
|
|
644
|
-
render:
|
|
645
|
-
panel:
|
|
673
|
+
design: pn,
|
|
674
|
+
render: hn,
|
|
675
|
+
panel: _n,
|
|
646
676
|
isContainer: !1,
|
|
647
677
|
createDefaultProps: () => ({
|
|
648
678
|
id: "",
|
|
@@ -654,91 +684,91 @@ const Mt = {
|
|
|
654
684
|
hiddenMode: "none"
|
|
655
685
|
}),
|
|
656
686
|
serialize: (e) => e
|
|
657
|
-
},
|
|
687
|
+
}, Dn = { class: "fd-st-design" }, Sn = {
|
|
658
688
|
key: 0,
|
|
659
689
|
class: "fd-st-table-wrap"
|
|
660
|
-
},
|
|
690
|
+
}, Tn = { class: "fd-st-table" }, Fn = {
|
|
661
691
|
key: 0,
|
|
662
692
|
class: "fd-st-seq"
|
|
663
|
-
},
|
|
693
|
+
}, Ln = {
|
|
664
694
|
key: 0,
|
|
665
695
|
class: "fd-st-seq"
|
|
666
|
-
},
|
|
696
|
+
}, Mn = {
|
|
667
697
|
key: 1,
|
|
668
698
|
class: "fd-st-cards"
|
|
669
|
-
},
|
|
699
|
+
}, Nn = { class: "fd-st-card" }, En = { class: "fd-st-card-label" }, Pn = {
|
|
670
700
|
key: 0,
|
|
671
701
|
class: "fd-st-cards-empty"
|
|
672
|
-
},
|
|
702
|
+
}, On = /* @__PURE__ */ E({
|
|
673
703
|
__name: "SubtableDesign",
|
|
674
704
|
props: {
|
|
675
705
|
node: {}
|
|
676
706
|
},
|
|
677
707
|
setup(e) {
|
|
678
708
|
const n = e, o = M(() => n.node.tablestyle !== "cards");
|
|
679
|
-
return (s, a) => (d(), c("div",
|
|
680
|
-
o.value ? (d(), c("div",
|
|
681
|
-
t("table",
|
|
709
|
+
return (s, a) => (d(), c("div", Dn, [
|
|
710
|
+
o.value ? (d(), c("div", Sn, [
|
|
711
|
+
t("table", Tn, [
|
|
682
712
|
t("thead", null, [
|
|
683
713
|
t("tr", null, [
|
|
684
|
-
e.node.secondtableindex === "1" ? (d(), c("th",
|
|
685
|
-
(d(!0), c(
|
|
714
|
+
e.node.secondtableindex === "1" ? (d(), c("th", Fn, "序号")) : T("", !0),
|
|
715
|
+
(d(!0), c(F, null, N(e.node.colnums.filter((i) => i.isshow === 1), (i) => (d(), c("th", {
|
|
686
716
|
key: i.name,
|
|
687
|
-
style:
|
|
688
|
-
},
|
|
717
|
+
style: K({ width: i.showwidth || void 0 })
|
|
718
|
+
}, k(i.showname || i.major || i.name), 5))), 128))
|
|
689
719
|
])
|
|
690
720
|
]),
|
|
691
721
|
t("tbody", null, [
|
|
692
722
|
t("tr", null, [
|
|
693
|
-
e.node.secondtableindex === "1" ? (d(), c("td",
|
|
694
|
-
(d(!0), c(
|
|
723
|
+
e.node.secondtableindex === "1" ? (d(), c("td", Ln, "1")) : T("", !0),
|
|
724
|
+
(d(!0), c(F, null, N(e.node.colnums.filter((i) => i.isshow === 1), (i) => (d(), c("td", {
|
|
695
725
|
key: i.name,
|
|
696
726
|
class: R(["fd-st-cell", { "fd-st-cell--link": !!i.bindLink }])
|
|
697
|
-
},
|
|
727
|
+
}, k(i.name), 3))), 128))
|
|
698
728
|
])
|
|
699
729
|
])
|
|
700
730
|
])
|
|
701
|
-
])) : (d(), c("div",
|
|
702
|
-
t("div",
|
|
703
|
-
(d(!0), c(
|
|
731
|
+
])) : (d(), c("div", Mn, [
|
|
732
|
+
t("div", Nn, [
|
|
733
|
+
(d(!0), c(F, null, N(e.node.colnums.filter((i) => i.isshow === 1), (i) => (d(), c("div", {
|
|
704
734
|
key: i.name,
|
|
705
735
|
class: "fd-st-card-row"
|
|
706
736
|
}, [
|
|
707
|
-
t("span",
|
|
737
|
+
t("span", En, k(i.showname || i.major), 1),
|
|
708
738
|
t("span", {
|
|
709
739
|
class: R(["fd-st-card-value", { "fd-st-card-value--link": !!i.bindLink }])
|
|
710
|
-
},
|
|
740
|
+
}, k(i.name), 3)
|
|
711
741
|
]))), 128))
|
|
712
742
|
]),
|
|
713
|
-
e.node.colnums.filter((i) => i.isshow === 1).length === 0 ? (d(), c("div",
|
|
743
|
+
e.node.colnums.filter((i) => i.isshow === 1).length === 0 ? (d(), c("div", Pn, " 暂无列配置 ")) : T("", !0)
|
|
714
744
|
]))
|
|
715
745
|
]));
|
|
716
746
|
}
|
|
717
|
-
}),
|
|
747
|
+
}), Un = /* @__PURE__ */ P(On, [["__scopeId", "data-v-aba8caec"]]), Bn = ["subtable-key"], Vn = {
|
|
718
748
|
key: 0,
|
|
719
749
|
class: "fd-st-table-wrap"
|
|
720
|
-
},
|
|
750
|
+
}, An = { class: "fd-st-table" }, jn = {
|
|
721
751
|
key: 0,
|
|
722
752
|
class: "fd-st-seq"
|
|
723
|
-
},
|
|
753
|
+
}, Rn = ["subtable-val"], Jn = {
|
|
724
754
|
key: 1,
|
|
725
755
|
class: "fd-st-op"
|
|
726
|
-
},
|
|
756
|
+
}, zn = {
|
|
727
757
|
key: 0,
|
|
728
758
|
class: "fd-st-seq"
|
|
729
|
-
},
|
|
759
|
+
}, Wn = ["rowspan", "subtable-val"], Hn = ["href"], qn = {
|
|
730
760
|
key: 1,
|
|
731
761
|
class: "fd-st-op"
|
|
732
|
-
},
|
|
762
|
+
}, Gn = ["onClick"], Yn = { key: 0 }, Kn = ["colspan"], Qn = {
|
|
733
763
|
key: 1,
|
|
734
764
|
class: "fd-st-cards"
|
|
735
|
-
},
|
|
765
|
+
}, Xn = { class: "fd-st-card-label" }, Zn = ["subtable-val"], eo = ["href"], to = {
|
|
736
766
|
key: 0,
|
|
737
767
|
class: "fd-st-card-actions"
|
|
738
|
-
},
|
|
768
|
+
}, no = ["onClick"], oo = {
|
|
739
769
|
key: 0,
|
|
740
770
|
class: "fd-st-cards-empty"
|
|
741
|
-
},
|
|
771
|
+
}, so = /* @__PURE__ */ E({
|
|
742
772
|
__name: "SubtableRender",
|
|
743
773
|
props: {
|
|
744
774
|
node: {},
|
|
@@ -746,145 +776,145 @@ const Mt = {
|
|
|
746
776
|
},
|
|
747
777
|
setup(e) {
|
|
748
778
|
const n = e, o = M(() => n.node.colnums.filter((_) => _.isshow === 1)), s = M(() => n.node.isreadonly === "1"), a = M(() => {
|
|
749
|
-
var
|
|
750
|
-
const _ = (
|
|
779
|
+
var S;
|
|
780
|
+
const _ = (S = n.formData) == null ? void 0 : S[n.node.secondtable];
|
|
751
781
|
return Array.isArray(_) ? _ : [];
|
|
752
782
|
}), i = M(() => !(n.node.nodatahidetable === "1" && a.value.length === 0)), u = M(() => n.node.tablestyle !== "cards");
|
|
753
783
|
function r() {
|
|
754
784
|
if (s.value) return;
|
|
755
785
|
const _ = {};
|
|
756
|
-
o.value.forEach((
|
|
786
|
+
o.value.forEach((S) => _[S.name] = ""), n.formData && Array.isArray(n.formData[n.node.secondtable]) && n.formData[n.node.secondtable].push(_);
|
|
757
787
|
}
|
|
758
788
|
function l(_) {
|
|
759
789
|
s.value || n.formData && Array.isArray(n.formData[n.node.secondtable]) && n.formData[n.node.secondtable].splice(_, 1);
|
|
760
790
|
}
|
|
761
|
-
function
|
|
762
|
-
const
|
|
763
|
-
return
|
|
791
|
+
function m(_, S) {
|
|
792
|
+
const v = _[S];
|
|
793
|
+
return v == null ? "" : String(v);
|
|
764
794
|
}
|
|
765
|
-
function
|
|
766
|
-
return _.bindLink ?
|
|
795
|
+
function p(_, S) {
|
|
796
|
+
return _.bindLink ? m(S, _.bindLink) : "";
|
|
767
797
|
}
|
|
768
|
-
const
|
|
769
|
-
const _ = a.value,
|
|
798
|
+
const y = M(() => {
|
|
799
|
+
const _ = a.value, S = [], v = [];
|
|
770
800
|
return o.value.forEach((g, $) => {
|
|
771
|
-
|
|
772
|
-
const
|
|
773
|
-
let
|
|
801
|
+
S[$] = [], v[$] = [];
|
|
802
|
+
const A = g.issamecolmerge === 1;
|
|
803
|
+
let Y = 0;
|
|
774
804
|
for (let x = 0; x < _.length; x++) {
|
|
775
|
-
const
|
|
776
|
-
|
|
805
|
+
const b = m(_[x], g.name);
|
|
806
|
+
A && x > 0 && b === m(_[x - 1], g.name) ? (v[$][x] = !0, S[$][Y] += 1) : (v[$][x] = !1, S[$][x] = 1, Y = x);
|
|
777
807
|
}
|
|
778
|
-
}), { spans:
|
|
808
|
+
}), { spans: S, skipped: v };
|
|
779
809
|
});
|
|
780
|
-
function
|
|
781
|
-
var
|
|
782
|
-
return ((
|
|
810
|
+
function C(_, S) {
|
|
811
|
+
var v;
|
|
812
|
+
return ((v = y.value.skipped[_]) == null ? void 0 : v[S]) === !0;
|
|
783
813
|
}
|
|
784
|
-
function
|
|
814
|
+
function B(_, S) {
|
|
785
815
|
var g;
|
|
786
|
-
const
|
|
787
|
-
return
|
|
816
|
+
const v = (g = y.value.spans[_]) == null ? void 0 : g[S];
|
|
817
|
+
return v && v > 1 ? v : void 0;
|
|
788
818
|
}
|
|
789
|
-
return (_,
|
|
819
|
+
return (_, S) => i.value ? (d(), c("div", {
|
|
790
820
|
key: 0,
|
|
791
821
|
class: "fd-st-render",
|
|
792
822
|
"subtable-key": e.node.secondtable
|
|
793
823
|
}, [
|
|
794
|
-
u.value ? (d(), c("div",
|
|
795
|
-
t("table",
|
|
824
|
+
u.value ? (d(), c("div", Vn, [
|
|
825
|
+
t("table", An, [
|
|
796
826
|
t("thead", null, [
|
|
797
827
|
t("tr", null, [
|
|
798
|
-
e.node.secondtableindex === "1" ? (d(), c("th",
|
|
799
|
-
(d(!0), c(
|
|
800
|
-
key:
|
|
801
|
-
"subtable-val":
|
|
802
|
-
style:
|
|
803
|
-
},
|
|
804
|
-
s.value ?
|
|
828
|
+
e.node.secondtableindex === "1" ? (d(), c("th", jn, "序号")) : T("", !0),
|
|
829
|
+
(d(!0), c(F, null, N(o.value, (v) => (d(), c("th", {
|
|
830
|
+
key: v.name,
|
|
831
|
+
"subtable-val": v.name,
|
|
832
|
+
style: K({ width: v.showwidth || void 0, textAlign: v.align || "left" })
|
|
833
|
+
}, k(v.showname || v.major || v.name), 13, Rn))), 128)),
|
|
834
|
+
s.value ? T("", !0) : (d(), c("th", Jn, "操作"))
|
|
805
835
|
])
|
|
806
836
|
]),
|
|
807
837
|
t("tbody", null, [
|
|
808
|
-
(d(!0), c(
|
|
809
|
-
e.node.secondtableindex === "1" ? (d(), c("td",
|
|
810
|
-
(d(!0), c(
|
|
838
|
+
(d(!0), c(F, null, N(a.value, (v, g) => (d(), c("tr", { key: g }, [
|
|
839
|
+
e.node.secondtableindex === "1" ? (d(), c("td", zn, k(g + 1), 1)) : T("", !0),
|
|
840
|
+
(d(!0), c(F, null, N(o.value, ($, A) => (d(), c(F, {
|
|
811
841
|
key: $.name
|
|
812
842
|
}, [
|
|
813
|
-
|
|
843
|
+
C(A, g) ? T("", !0) : (d(), c("td", {
|
|
814
844
|
key: 0,
|
|
815
|
-
rowspan:
|
|
845
|
+
rowspan: B(A, g),
|
|
816
846
|
"subtable-val": $.name,
|
|
817
|
-
style:
|
|
847
|
+
style: K({ textAlign: $.align || "left", color: $.prospect || void 0, background: $.background || void 0 })
|
|
818
848
|
}, [
|
|
819
|
-
|
|
849
|
+
p($, v) ? (d(), c("a", {
|
|
820
850
|
key: 0,
|
|
821
851
|
class: "fd-st-link",
|
|
822
|
-
href:
|
|
852
|
+
href: p($, v),
|
|
823
853
|
target: "_blank",
|
|
824
854
|
rel: "noopener noreferrer"
|
|
825
|
-
},
|
|
826
|
-
U(
|
|
855
|
+
}, k(m(v, $.name)), 9, Hn)) : (d(), c(F, { key: 1 }, [
|
|
856
|
+
U(k(m(v, $.name)), 1)
|
|
827
857
|
], 64))
|
|
828
|
-
], 12,
|
|
858
|
+
], 12, Wn))
|
|
829
859
|
], 64))), 128)),
|
|
830
|
-
s.value ?
|
|
860
|
+
s.value ? T("", !0) : (d(), c("td", qn, [
|
|
831
861
|
t("button", {
|
|
832
862
|
class: "fd-btn fd-btn--danger",
|
|
833
863
|
onClick: ($) => l(g)
|
|
834
|
-
}, "删除", 8,
|
|
864
|
+
}, "删除", 8, Gn)
|
|
835
865
|
]))
|
|
836
866
|
]))), 128)),
|
|
837
|
-
a.value.length === 0 ? (d(), c("tr",
|
|
867
|
+
a.value.length === 0 ? (d(), c("tr", Yn, [
|
|
838
868
|
t("td", {
|
|
839
869
|
colspan: o.value.length + (e.node.secondtableindex === "1" ? 1 : 0) + (s.value ? 0 : 1),
|
|
840
870
|
class: "fd-st-empty"
|
|
841
|
-
},
|
|
842
|
-
])) :
|
|
871
|
+
}, k(e.node.nodatatitle === "1" ? "暂无数据" : ""), 9, Kn)
|
|
872
|
+
])) : T("", !0)
|
|
843
873
|
])
|
|
844
874
|
])
|
|
845
|
-
])) : (d(), c("div",
|
|
846
|
-
(d(!0), c(
|
|
875
|
+
])) : (d(), c("div", Qn, [
|
|
876
|
+
(d(!0), c(F, null, N(a.value, (v, g) => (d(), c("div", {
|
|
847
877
|
key: g,
|
|
848
878
|
class: "fd-st-card"
|
|
849
879
|
}, [
|
|
850
|
-
(d(!0), c(
|
|
880
|
+
(d(!0), c(F, null, N(o.value, ($) => (d(), c("div", {
|
|
851
881
|
key: $.name,
|
|
852
882
|
class: "fd-st-card-row"
|
|
853
883
|
}, [
|
|
854
|
-
t("span",
|
|
884
|
+
t("span", Xn, k($.showname || $.major || $.name), 1),
|
|
855
885
|
t("span", {
|
|
856
886
|
class: "fd-st-card-value",
|
|
857
887
|
"subtable-val": $.name
|
|
858
888
|
}, [
|
|
859
|
-
|
|
889
|
+
p($, v) ? (d(), c("a", {
|
|
860
890
|
key: 0,
|
|
861
891
|
class: "fd-st-link",
|
|
862
|
-
href:
|
|
892
|
+
href: p($, v),
|
|
863
893
|
target: "_blank",
|
|
864
894
|
rel: "noopener noreferrer"
|
|
865
|
-
},
|
|
866
|
-
U(
|
|
895
|
+
}, k(m(v, $.name)), 9, eo)) : (d(), c(F, { key: 1 }, [
|
|
896
|
+
U(k(m(v, $.name)), 1)
|
|
867
897
|
], 64))
|
|
868
|
-
], 8,
|
|
898
|
+
], 8, Zn)
|
|
869
899
|
]))), 128)),
|
|
870
|
-
s.value ?
|
|
900
|
+
s.value ? T("", !0) : (d(), c("div", to, [
|
|
871
901
|
t("button", {
|
|
872
902
|
class: "fd-btn fd-btn--danger fd-btn--sm",
|
|
873
903
|
onClick: ($) => l(g)
|
|
874
|
-
}, "删除", 8,
|
|
904
|
+
}, "删除", 8, no)
|
|
875
905
|
]))
|
|
876
906
|
]))), 128)),
|
|
877
|
-
a.value.length === 0 ? (d(), c("div",
|
|
907
|
+
a.value.length === 0 ? (d(), c("div", oo, k(e.node.nodatatitle === "1" ? "暂无数据" : ""), 1)) : T("", !0)
|
|
878
908
|
])),
|
|
879
|
-
s.value ?
|
|
909
|
+
s.value ? T("", !0) : (d(), c("button", {
|
|
880
910
|
key: 2,
|
|
881
911
|
class: "fd-btn fd-btn--primary fd-st-add",
|
|
882
912
|
onClick: r
|
|
883
913
|
}, "新增一行"))
|
|
884
|
-
], 8,
|
|
914
|
+
], 8, Bn)) : T("", !0);
|
|
885
915
|
}
|
|
886
|
-
}),
|
|
887
|
-
function
|
|
916
|
+
}), lo = /* @__PURE__ */ P(so, [["__scopeId", "data-v-684725d9"]]);
|
|
917
|
+
function ao(e) {
|
|
888
918
|
return e.fields.map((n, o) => {
|
|
889
919
|
const s = n.dataType === "file", a = n.dataType === "link";
|
|
890
920
|
return {
|
|
@@ -908,13 +938,13 @@ function to(e) {
|
|
|
908
938
|
};
|
|
909
939
|
});
|
|
910
940
|
}
|
|
911
|
-
const
|
|
941
|
+
const io = { class: "fd-panel" }, ro = { class: "fd-panel-item" }, uo = { class: "fd-panel-item fd-panel-item--row" }, co = { class: "fd-panel-item fd-panel-item--row" }, fo = { class: "fd-panel-item" }, mo = { class: "fd-panel-item" }, po = { class: "fd-cols-head" }, vo = {
|
|
912
942
|
key: 0,
|
|
913
943
|
class: "fd-cols-empty"
|
|
914
|
-
},
|
|
944
|
+
}, bo = { class: "fd-col-card-top" }, go = { class: "fd-col-order" }, ho = { class: "fd-col-meta" }, yo = { class: "fd-col-title" }, ko = { class: "fd-col-name-sub" }, wo = { class: "fd-col-tag" }, $o = { class: "fd-col-card-bottom" }, xo = { class: "fd-col-switch" }, Co = { class: "fd-col-actions" }, _o = ["onClick"], Io = ["onClick"], Do = {
|
|
915
945
|
class: "fd-dialog",
|
|
916
946
|
style: { "max-width": "560px" }
|
|
917
|
-
},
|
|
947
|
+
}, So = { class: "fd-dialog-head" }, To = { class: "fd-dialog-body" }, Fo = { class: "fd-form-section" }, Lo = { class: "fd-form-grid" }, Mo = { class: "fd-form-item" }, No = ["value"], Eo = ["value"], Po = { class: "fd-form-item" }, Oo = ["value"], Uo = { class: "fd-form-item" }, Bo = ["value"], Vo = { class: "fd-form-item" }, Ao = ["value"], jo = { class: "fd-form-section" }, Ro = { class: "fd-form-grid" }, Jo = { class: "fd-form-item" }, zo = ["value"], Wo = { class: "fd-form-item" }, Ho = ["value"], qo = { class: "fd-form-item" }, Go = { class: "fd-color-row" }, Yo = ["value"], Ko = ["value"], Qo = { class: "fd-form-item" }, Xo = { class: "fd-color-row" }, Zo = ["value"], es = ["value"], ts = { class: "fd-form-section" }, ns = { class: "fd-form-grid" }, os = { class: "fd-form-item" }, ss = { class: "fd-form-item" }, ls = ["value"], as = /* @__PURE__ */ E({
|
|
918
948
|
__name: "SubtablePanel",
|
|
919
949
|
props: {
|
|
920
950
|
node: {},
|
|
@@ -922,37 +952,37 @@ const no = { class: "fd-panel" }, oo = { class: "fd-panel-item" }, so = { class:
|
|
|
922
952
|
},
|
|
923
953
|
emits: ["update"],
|
|
924
954
|
setup(e, { emit: n }) {
|
|
925
|
-
const o = e, s = n, a =
|
|
926
|
-
function u(x,
|
|
927
|
-
s("update", { [x]:
|
|
955
|
+
const o = e, s = n, a = G(), i = M(() => a.subTables);
|
|
956
|
+
function u(x, b) {
|
|
957
|
+
s("update", { [x]: b });
|
|
928
958
|
}
|
|
929
959
|
function r(x) {
|
|
930
|
-
const
|
|
931
|
-
w && (
|
|
960
|
+
const b = x ?? "", w = a.subTables.find((se) => se.name === b), W = { secondtable: b };
|
|
961
|
+
w && (W.displaytitle = w.label, W.colnums = ao(w)), s("update", W);
|
|
932
962
|
}
|
|
933
|
-
const l =
|
|
963
|
+
const l = Pe({
|
|
934
964
|
open: !1,
|
|
935
965
|
index: -1,
|
|
936
966
|
draft: null
|
|
937
967
|
});
|
|
938
|
-
function
|
|
968
|
+
function m(x) {
|
|
939
969
|
return JSON.parse(JSON.stringify(x));
|
|
940
970
|
}
|
|
941
|
-
function
|
|
942
|
-
l.index = x, l.draft =
|
|
971
|
+
function p(x) {
|
|
972
|
+
l.index = x, l.draft = m(o.node.colnums[x]), l.open = !0;
|
|
943
973
|
}
|
|
944
|
-
function
|
|
974
|
+
function y() {
|
|
945
975
|
l.open = !1, l.draft = null, l.index = -1;
|
|
946
976
|
}
|
|
947
|
-
function
|
|
977
|
+
function C() {
|
|
948
978
|
if (l.draft && l.index >= 0) {
|
|
949
979
|
const x = [...o.node.colnums];
|
|
950
980
|
x[l.index] = l.draft, s("update", { colnums: x });
|
|
951
981
|
}
|
|
952
|
-
|
|
982
|
+
y();
|
|
953
983
|
}
|
|
954
|
-
function
|
|
955
|
-
x.isshow =
|
|
984
|
+
function B(x, b) {
|
|
985
|
+
x.isshow = b ? 1 : 0, s("update", { colnums: [...o.node.colnums] });
|
|
956
986
|
}
|
|
957
987
|
async function _() {
|
|
958
988
|
const x = {
|
|
@@ -973,41 +1003,41 @@ const no = { class: "fd-panel" }, oo = { class: "fd-panel-item" }, so = { class:
|
|
|
973
1003
|
editmode: { editmode: "text", title: "文本" },
|
|
974
1004
|
events: []
|
|
975
1005
|
};
|
|
976
|
-
s("update", { colnums: [...o.node.colnums, x] }), await
|
|
1006
|
+
s("update", { colnums: [...o.node.colnums, x] }), await Oe(), p(o.node.colnums.length - 1);
|
|
977
1007
|
}
|
|
978
|
-
function
|
|
979
|
-
const
|
|
980
|
-
|
|
1008
|
+
function S(x) {
|
|
1009
|
+
const b = o.node.colnums.slice();
|
|
1010
|
+
b.splice(x, 1), s("update", { colnums: b });
|
|
981
1011
|
}
|
|
982
|
-
function
|
|
1012
|
+
function v(x) {
|
|
983
1013
|
return /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(x) ? x : "#ffffff";
|
|
984
1014
|
}
|
|
985
|
-
function g(x,
|
|
986
|
-
l.draft && (l.draft[x] =
|
|
1015
|
+
function g(x, b) {
|
|
1016
|
+
l.draft && (l.draft[x] = b.target.value);
|
|
987
1017
|
}
|
|
988
1018
|
const $ = M(() => {
|
|
989
1019
|
var x;
|
|
990
|
-
return ((x = a.subTables.find((
|
|
1020
|
+
return ((x = a.subTables.find((b) => b.name === o.node.secondtable)) == null ? void 0 : x.fields) ?? [];
|
|
991
1021
|
});
|
|
992
|
-
function
|
|
1022
|
+
function A(x) {
|
|
993
1023
|
if (!l.draft) return;
|
|
994
|
-
const
|
|
995
|
-
l.draft.name =
|
|
996
|
-
const w = $.value.find((
|
|
1024
|
+
const b = x.target.value;
|
|
1025
|
+
l.draft.name = b;
|
|
1026
|
+
const w = $.value.find((W) => W.name === b);
|
|
997
1027
|
if (w) {
|
|
998
1028
|
l.draft.showname = w.label;
|
|
999
|
-
const
|
|
1000
|
-
l.draft.editmode.editmode =
|
|
1029
|
+
const W = w.dataType === "file";
|
|
1030
|
+
l.draft.editmode.editmode = W ? "files" : "text", l.draft.editmode.title = W ? "文件" : "文本", l.draft.bindLink = w.dataType === "link" ? b : "";
|
|
1001
1031
|
}
|
|
1002
1032
|
}
|
|
1003
|
-
function
|
|
1033
|
+
function Y(x) {
|
|
1004
1034
|
u("tablestyle", x || "table");
|
|
1005
1035
|
}
|
|
1006
|
-
return (x,
|
|
1007
|
-
t("div",
|
|
1008
|
-
t("div",
|
|
1009
|
-
|
|
1010
|
-
|
|
1036
|
+
return (x, b) => (d(), c(F, null, [
|
|
1037
|
+
t("div", io, [
|
|
1038
|
+
t("div", ro, [
|
|
1039
|
+
b[13] || (b[13] = t("label", null, "选择子表", -1)),
|
|
1040
|
+
L(h(ue), {
|
|
1011
1041
|
"model-value": e.node.secondtable,
|
|
1012
1042
|
filterable: "",
|
|
1013
1043
|
clearable: "",
|
|
@@ -1015,8 +1045,8 @@ const no = { class: "fd-panel" }, oo = { class: "fd-panel-item" }, so = { class:
|
|
|
1015
1045
|
style: { width: "100%" },
|
|
1016
1046
|
"onUpdate:modelValue": r
|
|
1017
1047
|
}, {
|
|
1018
|
-
default:
|
|
1019
|
-
(d(!0), c(
|
|
1048
|
+
default: j(() => [
|
|
1049
|
+
(d(!0), c(F, null, N(i.value, (w) => (d(), V(h(ee), {
|
|
1020
1050
|
key: w.name,
|
|
1021
1051
|
label: `${w.label}(${w.name})`,
|
|
1022
1052
|
value: w.name
|
|
@@ -1025,33 +1055,33 @@ const no = { class: "fd-panel" }, oo = { class: "fd-panel-item" }, so = { class:
|
|
|
1025
1055
|
_: 1
|
|
1026
1056
|
}, 8, ["model-value"])
|
|
1027
1057
|
]),
|
|
1028
|
-
t("div",
|
|
1029
|
-
|
|
1030
|
-
|
|
1058
|
+
t("div", uo, [
|
|
1059
|
+
b[14] || (b[14] = t("label", null, "只读", -1)),
|
|
1060
|
+
L(ie, {
|
|
1031
1061
|
"model-value": e.node.isreadonly === "1",
|
|
1032
|
-
"onUpdate:modelValue":
|
|
1062
|
+
"onUpdate:modelValue": b[0] || (b[0] = (w) => u("isreadonly", w ? "1" : "0"))
|
|
1033
1063
|
}, null, 8, ["model-value"])
|
|
1034
1064
|
]),
|
|
1035
|
-
t("div",
|
|
1036
|
-
|
|
1037
|
-
|
|
1065
|
+
t("div", co, [
|
|
1066
|
+
b[15] || (b[15] = t("label", null, "序号列", -1)),
|
|
1067
|
+
L(ie, {
|
|
1038
1068
|
"model-value": e.node.secondtableindex === "1",
|
|
1039
|
-
"onUpdate:modelValue":
|
|
1069
|
+
"onUpdate:modelValue": b[1] || (b[1] = (w) => u("secondtableindex", w ? "1" : "0"))
|
|
1040
1070
|
}, null, 8, ["model-value"])
|
|
1041
1071
|
]),
|
|
1042
|
-
t("div",
|
|
1043
|
-
|
|
1044
|
-
|
|
1072
|
+
t("div", fo, [
|
|
1073
|
+
b[16] || (b[16] = t("label", null, "表格样式", -1)),
|
|
1074
|
+
L(h(ue), {
|
|
1045
1075
|
"model-value": e.node.tablestyle || "table",
|
|
1046
1076
|
style: { width: "100%" },
|
|
1047
|
-
"onUpdate:modelValue":
|
|
1077
|
+
"onUpdate:modelValue": Y
|
|
1048
1078
|
}, {
|
|
1049
|
-
default:
|
|
1050
|
-
|
|
1079
|
+
default: j(() => [
|
|
1080
|
+
L(h(ee), {
|
|
1051
1081
|
label: "表格",
|
|
1052
1082
|
value: "table"
|
|
1053
1083
|
}),
|
|
1054
|
-
|
|
1084
|
+
L(h(ee), {
|
|
1055
1085
|
label: "卡片列表",
|
|
1056
1086
|
value: "cards"
|
|
1057
1087
|
})
|
|
@@ -1059,179 +1089,179 @@ const no = { class: "fd-panel" }, oo = { class: "fd-panel-item" }, so = { class:
|
|
|
1059
1089
|
_: 1
|
|
1060
1090
|
}, 8, ["model-value"])
|
|
1061
1091
|
]),
|
|
1062
|
-
t("div",
|
|
1063
|
-
t("div",
|
|
1064
|
-
t("span", null, "列配置(" +
|
|
1092
|
+
t("div", mo, [
|
|
1093
|
+
t("div", po, [
|
|
1094
|
+
t("span", null, "列配置(" + k(e.node.colnums.length) + ")", 1),
|
|
1065
1095
|
t("button", {
|
|
1066
1096
|
class: "fd-btn fd-btn--primary fd-btn--sm",
|
|
1067
1097
|
onClick: _
|
|
1068
1098
|
}, "+ 新增列")
|
|
1069
1099
|
]),
|
|
1070
|
-
e.node.colnums.length === 0 ? (d(), c("div",
|
|
1071
|
-
(d(!0), c(
|
|
1100
|
+
e.node.colnums.length === 0 ? (d(), c("div", vo, " 暂无列,点击「新增列」添加 ")) : T("", !0),
|
|
1101
|
+
(d(!0), c(F, null, N(e.node.colnums, (w, W) => (d(), c("div", {
|
|
1072
1102
|
key: w.name,
|
|
1073
1103
|
class: "fd-col-card"
|
|
1074
1104
|
}, [
|
|
1075
|
-
t("div",
|
|
1076
|
-
t("span",
|
|
1077
|
-
t("div",
|
|
1078
|
-
t("span",
|
|
1079
|
-
t("span",
|
|
1105
|
+
t("div", bo, [
|
|
1106
|
+
t("span", go, k(W + 1), 1),
|
|
1107
|
+
t("div", ho, [
|
|
1108
|
+
t("span", yo, k(w.showname || "未命名列"), 1),
|
|
1109
|
+
t("span", ko, k(w.name), 1)
|
|
1080
1110
|
]),
|
|
1081
|
-
t("span",
|
|
1111
|
+
t("span", wo, k(w.bindLink ? "链接" : "文本"), 1)
|
|
1082
1112
|
]),
|
|
1083
|
-
t("div",
|
|
1084
|
-
t("label",
|
|
1085
|
-
|
|
1086
|
-
|
|
1113
|
+
t("div", $o, [
|
|
1114
|
+
t("label", xo, [
|
|
1115
|
+
b[17] || (b[17] = t("span", null, "显示", -1)),
|
|
1116
|
+
L(ie, {
|
|
1087
1117
|
"model-value": w.isshow === 1,
|
|
1088
|
-
"onUpdate:modelValue": (
|
|
1118
|
+
"onUpdate:modelValue": (se) => B(w, se)
|
|
1089
1119
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
1090
1120
|
]),
|
|
1091
|
-
t("div",
|
|
1121
|
+
t("div", Co, [
|
|
1092
1122
|
t("button", {
|
|
1093
1123
|
class: "fd-btn fd-btn--ghost fd-btn--sm",
|
|
1094
|
-
onClick: (
|
|
1095
|
-
}, "设置", 8,
|
|
1124
|
+
onClick: (se) => p(W)
|
|
1125
|
+
}, "设置", 8, _o),
|
|
1096
1126
|
t("button", {
|
|
1097
1127
|
class: "fd-btn fd-btn--danger fd-btn--sm",
|
|
1098
|
-
onClick: (
|
|
1099
|
-
}, "删除", 8,
|
|
1128
|
+
onClick: (se) => S(W)
|
|
1129
|
+
}, "删除", 8, Io)
|
|
1100
1130
|
])
|
|
1101
1131
|
])
|
|
1102
1132
|
]))), 128))
|
|
1103
1133
|
])
|
|
1104
1134
|
]),
|
|
1105
|
-
(d(), V(
|
|
1135
|
+
(d(), V(ke, { to: "body" }, [
|
|
1106
1136
|
l.open && l.draft ? (d(), c("div", {
|
|
1107
1137
|
key: 0,
|
|
1108
1138
|
class: "fd-dialog-mask",
|
|
1109
|
-
onClick:
|
|
1139
|
+
onClick: q(y, ["self"])
|
|
1110
1140
|
}, [
|
|
1111
|
-
t("div",
|
|
1112
|
-
t("div",
|
|
1113
|
-
t("span", null, "列设置 · " +
|
|
1141
|
+
t("div", Do, [
|
|
1142
|
+
t("div", So, [
|
|
1143
|
+
t("span", null, "列设置 · " + k(l.draft.showname || l.draft.name || "新列"), 1),
|
|
1114
1144
|
t("button", {
|
|
1115
1145
|
class: "fd-dialog-close",
|
|
1116
|
-
onClick:
|
|
1146
|
+
onClick: y,
|
|
1117
1147
|
title: "关闭"
|
|
1118
1148
|
}, "×")
|
|
1119
1149
|
]),
|
|
1120
|
-
t("div",
|
|
1121
|
-
t("section",
|
|
1122
|
-
|
|
1123
|
-
t("div",
|
|
1124
|
-
t("div",
|
|
1125
|
-
|
|
1150
|
+
t("div", To, [
|
|
1151
|
+
t("section", Fo, [
|
|
1152
|
+
b[23] || (b[23] = t("h5", { class: "fd-form-section-h" }, "基本信息", -1)),
|
|
1153
|
+
t("div", Lo, [
|
|
1154
|
+
t("div", Mo, [
|
|
1155
|
+
b[19] || (b[19] = t("label", null, "列字段", -1)),
|
|
1126
1156
|
t("select", {
|
|
1127
1157
|
value: l.draft.name,
|
|
1128
|
-
onChange:
|
|
1158
|
+
onChange: b[2] || (b[2] = (w) => A(w))
|
|
1129
1159
|
}, [
|
|
1130
|
-
|
|
1131
|
-
(d(!0), c(
|
|
1160
|
+
b[18] || (b[18] = t("option", { value: "" }, "请选择字段", -1)),
|
|
1161
|
+
(d(!0), c(F, null, N($.value, (w) => (d(), c("option", {
|
|
1132
1162
|
key: w.name,
|
|
1133
1163
|
value: w.name
|
|
1134
|
-
},
|
|
1135
|
-
], 40,
|
|
1164
|
+
}, k(w.label) + "(" + k(w.name) + ")", 9, Eo))), 128))
|
|
1165
|
+
], 40, No)
|
|
1136
1166
|
]),
|
|
1137
|
-
t("div",
|
|
1138
|
-
|
|
1167
|
+
t("div", Po, [
|
|
1168
|
+
b[20] || (b[20] = t("label", null, "显示标题", -1)),
|
|
1139
1169
|
t("input", {
|
|
1140
1170
|
value: l.draft.showname,
|
|
1141
|
-
onInput:
|
|
1171
|
+
onInput: b[3] || (b[3] = (w) => l.draft.showname = w.target.value),
|
|
1142
1172
|
placeholder: "如 姓名"
|
|
1143
|
-
}, null, 40,
|
|
1173
|
+
}, null, 40, Oo)
|
|
1144
1174
|
]),
|
|
1145
|
-
t("div",
|
|
1146
|
-
|
|
1175
|
+
t("div", Uo, [
|
|
1176
|
+
b[21] || (b[21] = t("label", null, "主表头分组", -1)),
|
|
1147
1177
|
t("input", {
|
|
1148
1178
|
value: l.draft.major,
|
|
1149
|
-
onInput:
|
|
1179
|
+
onInput: b[4] || (b[4] = (w) => l.draft.major = w.target.value),
|
|
1150
1180
|
placeholder: "可合并表头分组名"
|
|
1151
|
-
}, null, 40,
|
|
1181
|
+
}, null, 40, Bo)
|
|
1152
1182
|
]),
|
|
1153
|
-
t("div",
|
|
1154
|
-
|
|
1183
|
+
t("div", Vo, [
|
|
1184
|
+
b[22] || (b[22] = t("label", null, "列序号", -1)),
|
|
1155
1185
|
t("input", {
|
|
1156
1186
|
type: "number",
|
|
1157
1187
|
min: "1",
|
|
1158
1188
|
value: l.draft.index,
|
|
1159
|
-
onInput:
|
|
1160
|
-
}, null, 40,
|
|
1189
|
+
onInput: b[5] || (b[5] = (w) => l.draft.index = Number(w.target.value))
|
|
1190
|
+
}, null, 40, Ao)
|
|
1161
1191
|
])
|
|
1162
1192
|
])
|
|
1163
1193
|
]),
|
|
1164
|
-
t("section",
|
|
1165
|
-
|
|
1166
|
-
t("div",
|
|
1167
|
-
t("div",
|
|
1168
|
-
|
|
1194
|
+
t("section", jo, [
|
|
1195
|
+
b[29] || (b[29] = t("h5", { class: "fd-form-section-h" }, "显示与样式", -1)),
|
|
1196
|
+
t("div", Ro, [
|
|
1197
|
+
t("div", Jo, [
|
|
1198
|
+
b[24] || (b[24] = t("label", null, "列宽", -1)),
|
|
1169
1199
|
t("input", {
|
|
1170
1200
|
value: l.draft.showwidth,
|
|
1171
|
-
onInput:
|
|
1201
|
+
onInput: b[6] || (b[6] = (w) => l.draft.showwidth = w.target.value),
|
|
1172
1202
|
placeholder: "如 120px 或 20%"
|
|
1173
|
-
}, null, 40,
|
|
1203
|
+
}, null, 40, zo)
|
|
1174
1204
|
]),
|
|
1175
|
-
t("div",
|
|
1176
|
-
|
|
1205
|
+
t("div", Wo, [
|
|
1206
|
+
b[26] || (b[26] = t("label", null, "对齐方式", -1)),
|
|
1177
1207
|
t("select", {
|
|
1178
1208
|
value: l.draft.align,
|
|
1179
|
-
onChange:
|
|
1180
|
-
}, [...
|
|
1209
|
+
onChange: b[7] || (b[7] = (w) => l.draft.align = w.target.value)
|
|
1210
|
+
}, [...b[25] || (b[25] = [
|
|
1181
1211
|
t("option", { value: "" }, "默认(左)", -1),
|
|
1182
1212
|
t("option", { value: "left" }, "左对齐", -1),
|
|
1183
1213
|
t("option", { value: "center" }, "居中", -1),
|
|
1184
1214
|
t("option", { value: "right" }, "右对齐", -1)
|
|
1185
|
-
])], 40,
|
|
1215
|
+
])], 40, Ho)
|
|
1186
1216
|
]),
|
|
1187
|
-
t("div",
|
|
1188
|
-
|
|
1189
|
-
t("div",
|
|
1217
|
+
t("div", qo, [
|
|
1218
|
+
b[27] || (b[27] = t("label", null, "背景色", -1)),
|
|
1219
|
+
t("div", Go, [
|
|
1190
1220
|
t("input", {
|
|
1191
1221
|
type: "color",
|
|
1192
|
-
value:
|
|
1193
|
-
onInput:
|
|
1194
|
-
}, null, 40,
|
|
1222
|
+
value: v(l.draft.background),
|
|
1223
|
+
onInput: b[8] || (b[8] = (w) => g("background", w))
|
|
1224
|
+
}, null, 40, Yo),
|
|
1195
1225
|
t("input", {
|
|
1196
1226
|
value: l.draft.background,
|
|
1197
|
-
onInput:
|
|
1227
|
+
onInput: b[9] || (b[9] = (w) => l.draft.background = w.target.value),
|
|
1198
1228
|
placeholder: "如 #f5f7fa 或空"
|
|
1199
|
-
}, null, 40,
|
|
1229
|
+
}, null, 40, Ko)
|
|
1200
1230
|
])
|
|
1201
1231
|
]),
|
|
1202
|
-
t("div",
|
|
1203
|
-
|
|
1204
|
-
t("div",
|
|
1232
|
+
t("div", Qo, [
|
|
1233
|
+
b[28] || (b[28] = t("label", null, "字体色", -1)),
|
|
1234
|
+
t("div", Xo, [
|
|
1205
1235
|
t("input", {
|
|
1206
1236
|
type: "color",
|
|
1207
|
-
value:
|
|
1208
|
-
onInput:
|
|
1209
|
-
}, null, 40,
|
|
1237
|
+
value: v(l.draft.prospect),
|
|
1238
|
+
onInput: b[10] || (b[10] = (w) => g("prospect", w))
|
|
1239
|
+
}, null, 40, Zo),
|
|
1210
1240
|
t("input", {
|
|
1211
1241
|
value: l.draft.prospect,
|
|
1212
|
-
onInput:
|
|
1242
|
+
onInput: b[11] || (b[11] = (w) => l.draft.prospect = w.target.value),
|
|
1213
1243
|
placeholder: "如 #f5523a 或空"
|
|
1214
|
-
}, null, 40,
|
|
1244
|
+
}, null, 40, es)
|
|
1215
1245
|
])
|
|
1216
1246
|
])
|
|
1217
1247
|
])
|
|
1218
1248
|
]),
|
|
1219
|
-
t("section",
|
|
1220
|
-
|
|
1221
|
-
t("div",
|
|
1222
|
-
t("div",
|
|
1223
|
-
|
|
1224
|
-
|
|
1249
|
+
t("section", ts, [
|
|
1250
|
+
b[32] || (b[32] = t("h5", { class: "fd-form-section-h" }, "编辑模式", -1)),
|
|
1251
|
+
t("div", ns, [
|
|
1252
|
+
t("div", os, [
|
|
1253
|
+
b[30] || (b[30] = t("label", null, "同内容合并", -1)),
|
|
1254
|
+
L(ie, {
|
|
1225
1255
|
"model-value": l.draft.issamecolmerge === 1,
|
|
1226
|
-
"onUpdate:modelValue":
|
|
1256
|
+
"onUpdate:modelValue": b[12] || (b[12] = (w) => l.draft.issamecolmerge = w ? 1 : 0)
|
|
1227
1257
|
}, null, 8, ["model-value"])
|
|
1228
1258
|
]),
|
|
1229
|
-
t("div",
|
|
1230
|
-
|
|
1259
|
+
t("div", ss, [
|
|
1260
|
+
b[31] || (b[31] = t("label", null, "链接", -1)),
|
|
1231
1261
|
t("input", {
|
|
1232
1262
|
value: l.draft.bindLink ? `${l.draft.bindLink}(链接字段自动绑定)` : "非链接字段",
|
|
1233
1263
|
readonly: ""
|
|
1234
|
-
}, null, 8,
|
|
1264
|
+
}, null, 8, ls)
|
|
1235
1265
|
])
|
|
1236
1266
|
])
|
|
1237
1267
|
])
|
|
@@ -1239,20 +1269,20 @@ const no = { class: "fd-panel" }, oo = { class: "fd-panel-item" }, so = { class:
|
|
|
1239
1269
|
t("div", { class: "fd-dialog-foot" }, [
|
|
1240
1270
|
t("button", {
|
|
1241
1271
|
class: "fd-btn fd-btn--ghost",
|
|
1242
|
-
onClick:
|
|
1272
|
+
onClick: y
|
|
1243
1273
|
}, "取消"),
|
|
1244
1274
|
t("button", {
|
|
1245
1275
|
class: "fd-btn fd-btn--primary",
|
|
1246
|
-
onClick:
|
|
1276
|
+
onClick: C
|
|
1247
1277
|
}, "确定")
|
|
1248
1278
|
])
|
|
1249
1279
|
])
|
|
1250
|
-
])) :
|
|
1280
|
+
])) : T("", !0)
|
|
1251
1281
|
]))
|
|
1252
1282
|
], 64));
|
|
1253
1283
|
}
|
|
1254
|
-
}),
|
|
1255
|
-
function
|
|
1284
|
+
}), is = /* @__PURE__ */ P(as, [["__scopeId", "data-v-e1fd519d"]]);
|
|
1285
|
+
function ds() {
|
|
1256
1286
|
return [
|
|
1257
1287
|
{
|
|
1258
1288
|
name: "field1",
|
|
@@ -1292,12 +1322,12 @@ function os() {
|
|
|
1292
1322
|
}
|
|
1293
1323
|
];
|
|
1294
1324
|
}
|
|
1295
|
-
const
|
|
1325
|
+
const rs = {
|
|
1296
1326
|
type: "subtable",
|
|
1297
1327
|
title: "子表",
|
|
1298
|
-
design:
|
|
1299
|
-
render:
|
|
1300
|
-
panel:
|
|
1328
|
+
design: Un,
|
|
1329
|
+
render: lo,
|
|
1330
|
+
panel: is,
|
|
1301
1331
|
isContainer: !1,
|
|
1302
1332
|
createDefaultProps: () => ({
|
|
1303
1333
|
id: "",
|
|
@@ -1323,24 +1353,24 @@ const ss = {
|
|
|
1323
1353
|
tableheight: 0,
|
|
1324
1354
|
iscompletehide: "0",
|
|
1325
1355
|
iscompletehidecode: "",
|
|
1326
|
-
colnums:
|
|
1356
|
+
colnums: ds(),
|
|
1327
1357
|
events: []
|
|
1328
1358
|
}),
|
|
1329
1359
|
serialize: (e) => e
|
|
1330
|
-
},
|
|
1360
|
+
}, us = /* @__PURE__ */ E({
|
|
1331
1361
|
__name: "GridDesign",
|
|
1332
1362
|
props: {
|
|
1333
1363
|
node: {}
|
|
1334
1364
|
},
|
|
1335
1365
|
setup(e) {
|
|
1336
|
-
const n =
|
|
1366
|
+
const n = G();
|
|
1337
1367
|
return (o, s) => (d(), c("div", {
|
|
1338
1368
|
class: R(["fd-grid-design", { "is-mobile": h(n).device === "mobile" }])
|
|
1339
1369
|
}, [
|
|
1340
|
-
|
|
1370
|
+
te(o.$slots, "children", {}, void 0, !0)
|
|
1341
1371
|
], 2));
|
|
1342
1372
|
}
|
|
1343
|
-
}),
|
|
1373
|
+
}), cs = /* @__PURE__ */ P(us, [["__scopeId", "data-v-b4d1e09d"]]), xe = /* @__PURE__ */ E({
|
|
1344
1374
|
__name: "WidgetHost",
|
|
1345
1375
|
props: {
|
|
1346
1376
|
node: {},
|
|
@@ -1350,65 +1380,65 @@ const ss = {
|
|
|
1350
1380
|
formId: {}
|
|
1351
1381
|
},
|
|
1352
1382
|
setup(e) {
|
|
1353
|
-
const n = e, o = M(() =>
|
|
1383
|
+
const n = e, o = M(() => X(n.node.type)), s = M(() => o.value ? n.mode === "design" ? o.value.design : o.value.render : null), a = (i) => i && n.formData ? n.formData[i] : void 0;
|
|
1354
1384
|
return (i, u) => {
|
|
1355
1385
|
var l;
|
|
1356
|
-
const r =
|
|
1357
|
-
return s.value ? (d(), V(
|
|
1386
|
+
const r = Ue("WidgetHost", !0);
|
|
1387
|
+
return s.value ? (d(), V(he(s.value), ve({
|
|
1358
1388
|
key: 0,
|
|
1359
1389
|
node: e.node,
|
|
1360
1390
|
value: a(e.node.bindField),
|
|
1361
1391
|
"form-data": e.formData
|
|
1362
|
-
}, e.mode === "render" ? { formMode: e.formMode, formId: e.formId } : null),
|
|
1363
|
-
N(i.$slots, (
|
|
1364
|
-
name:
|
|
1365
|
-
fn:
|
|
1366
|
-
|
|
1392
|
+
}, e.mode === "render" ? { formMode: e.formMode, formId: e.formId } : null), re({ _: 2 }, [
|
|
1393
|
+
N(i.$slots, (m, p) => ({
|
|
1394
|
+
name: p,
|
|
1395
|
+
fn: j((y) => [
|
|
1396
|
+
te(i.$slots, p, He(qe(y || {})))
|
|
1367
1397
|
])
|
|
1368
1398
|
})),
|
|
1369
1399
|
(l = o.value) != null && l.isContainer && !i.$slots.children ? {
|
|
1370
1400
|
name: "children",
|
|
1371
|
-
fn:
|
|
1372
|
-
(d(!0), c(
|
|
1373
|
-
key:
|
|
1374
|
-
node:
|
|
1401
|
+
fn: j(() => [
|
|
1402
|
+
(d(!0), c(F, null, N(e.node.children, (m) => (d(), V(r, {
|
|
1403
|
+
key: m.id,
|
|
1404
|
+
node: m,
|
|
1375
1405
|
mode: e.mode,
|
|
1376
1406
|
"form-mode": e.formMode,
|
|
1377
1407
|
"form-data": e.formData,
|
|
1378
1408
|
"form-id": e.formId
|
|
1379
|
-
},
|
|
1380
|
-
N(i.$slots, (
|
|
1381
|
-
name:
|
|
1382
|
-
fn:
|
|
1383
|
-
|
|
1409
|
+
}, re({ _: 2 }, [
|
|
1410
|
+
N(i.$slots, (p, y) => ({
|
|
1411
|
+
name: y,
|
|
1412
|
+
fn: j((C) => [
|
|
1413
|
+
te(i.$slots, y, ve({ ref_for: !0 }, C || {}))
|
|
1384
1414
|
])
|
|
1385
1415
|
}))
|
|
1386
1416
|
]), 1032, ["node", "mode", "form-mode", "form-data", "form-id"]))), 128))
|
|
1387
1417
|
]),
|
|
1388
1418
|
key: "0"
|
|
1389
1419
|
} : void 0
|
|
1390
|
-
]), 1040, ["node", "value", "form-data"])) :
|
|
1420
|
+
]), 1040, ["node", "value", "form-data"])) : T("", !0);
|
|
1391
1421
|
};
|
|
1392
1422
|
}
|
|
1393
|
-
}),
|
|
1394
|
-
function
|
|
1423
|
+
}), fs = 24;
|
|
1424
|
+
function Ve(e, n, o, s, a = !1) {
|
|
1395
1425
|
if (e.type !== "label" || !o.length) return "";
|
|
1396
|
-
const i = a ? 1 :
|
|
1397
|
-
let l = 0,
|
|
1398
|
-
for (const
|
|
1399
|
-
const
|
|
1400
|
-
l +
|
|
1426
|
+
const i = a ? 1 : fs, u = (S) => Math.min(Math.max(S.gridSpan || s || i, 1), i), r = [];
|
|
1427
|
+
let l = 0, m = 0;
|
|
1428
|
+
for (const S of o) {
|
|
1429
|
+
const v = u(S);
|
|
1430
|
+
l + v > i && (l = 0, m++);
|
|
1401
1431
|
const g = l === 0;
|
|
1402
|
-
l +=
|
|
1432
|
+
l += v;
|
|
1403
1433
|
const $ = l >= i;
|
|
1404
|
-
r.push({ row:
|
|
1434
|
+
r.push({ row: m, rowFirst: g, rowLast: $ }), l >= i && (l = 0, m++);
|
|
1405
1435
|
}
|
|
1406
|
-
const
|
|
1407
|
-
if (!
|
|
1408
|
-
const
|
|
1409
|
-
return
|
|
1436
|
+
const p = r[n];
|
|
1437
|
+
if (!p) return "";
|
|
1438
|
+
const y = r[r.length - 1].row, C = p.row === 0, B = p.row === y, _ = [];
|
|
1439
|
+
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(" ");
|
|
1410
1440
|
}
|
|
1411
|
-
const
|
|
1441
|
+
const ms = /* @__PURE__ */ E({
|
|
1412
1442
|
__name: "GridRender",
|
|
1413
1443
|
props: {
|
|
1414
1444
|
node: {},
|
|
@@ -1417,13 +1447,13 @@ const ds = /* @__PURE__ */ L({
|
|
|
1417
1447
|
formId: {}
|
|
1418
1448
|
},
|
|
1419
1449
|
setup(e) {
|
|
1420
|
-
const n =
|
|
1450
|
+
const n = G(), o = O(!1);
|
|
1421
1451
|
let s = null;
|
|
1422
|
-
|
|
1452
|
+
ce(() => {
|
|
1423
1453
|
s = window.matchMedia("(max-width: 768px)"), o.value = s.matches, s.addEventListener("change", (i) => {
|
|
1424
1454
|
o.value = i.matches;
|
|
1425
1455
|
});
|
|
1426
|
-
}),
|
|
1456
|
+
}), Ee(() => {
|
|
1427
1457
|
s && s.removeEventListener("change", () => {
|
|
1428
1458
|
});
|
|
1429
1459
|
});
|
|
@@ -1431,29 +1461,29 @@ const ds = /* @__PURE__ */ L({
|
|
|
1431
1461
|
return (i, u) => (d(), c("div", {
|
|
1432
1462
|
class: R(["fd-grid-render", { "is-mobile": a.value }])
|
|
1433
1463
|
}, [
|
|
1434
|
-
(d(!0), c(
|
|
1464
|
+
(d(!0), c(F, null, N(e.node.children, (r, l) => (d(), c("div", {
|
|
1435
1465
|
key: r.id,
|
|
1436
|
-
class: R(["fd-grid-cell", h(
|
|
1437
|
-
style:
|
|
1466
|
+
class: R(["fd-grid-cell", h(Ve)(r, l, e.node.children || [], e.node.layout || 24, a.value)]),
|
|
1467
|
+
style: K({ gridColumn: `span ${r.gridSpan || e.node.layout}` })
|
|
1438
1468
|
}, [
|
|
1439
|
-
|
|
1469
|
+
L(xe, {
|
|
1440
1470
|
node: r,
|
|
1441
1471
|
mode: "render",
|
|
1442
1472
|
"form-mode": e.formMode,
|
|
1443
1473
|
"form-data": e.formData,
|
|
1444
1474
|
"form-id": e.formId
|
|
1445
|
-
},
|
|
1446
|
-
N(i.$slots, (
|
|
1447
|
-
name:
|
|
1448
|
-
fn:
|
|
1449
|
-
|
|
1475
|
+
}, re({ _: 2 }, [
|
|
1476
|
+
N(i.$slots, (m, p) => ({
|
|
1477
|
+
name: p,
|
|
1478
|
+
fn: j((y) => [
|
|
1479
|
+
te(i.$slots, p, ve({ ref_for: !0 }, y || {}), void 0, !0)
|
|
1450
1480
|
])
|
|
1451
1481
|
}))
|
|
1452
1482
|
]), 1032, ["node", "form-mode", "form-data", "form-id"])
|
|
1453
1483
|
], 6))), 128))
|
|
1454
1484
|
], 2));
|
|
1455
1485
|
}
|
|
1456
|
-
}),
|
|
1486
|
+
}), ps = /* @__PURE__ */ P(ms, [["__scopeId", "data-v-417035f9"]]), vs = { class: "fd-panel" }, bs = { class: "fd-panel-item" }, gs = ["value"], hs = ["value"], ys = { class: "fd-panel-item" }, ks = /* @__PURE__ */ E({
|
|
1457
1487
|
__name: "GridPanel",
|
|
1458
1488
|
props: {
|
|
1459
1489
|
node: {},
|
|
@@ -1471,34 +1501,34 @@ const ds = /* @__PURE__ */ L({
|
|
|
1471
1501
|
const u = o.node.layout || 24, r = (o.node.children ?? []).map((l) => ({ ...l, gridSpan: u }));
|
|
1472
1502
|
s("update", { children: r });
|
|
1473
1503
|
}
|
|
1474
|
-
return (u, r) => (d(), c("div",
|
|
1475
|
-
t("div",
|
|
1504
|
+
return (u, r) => (d(), c("div", vs, [
|
|
1505
|
+
t("div", bs, [
|
|
1476
1506
|
r[1] || (r[1] = t("label", null, "布局", -1)),
|
|
1477
1507
|
t("select", {
|
|
1478
1508
|
value: e.node.layout,
|
|
1479
1509
|
onChange: r[0] || (r[0] = (l) => s("update", { layout: Number(l.target.value) }))
|
|
1480
1510
|
}, [
|
|
1481
|
-
(d(), c(
|
|
1511
|
+
(d(), c(F, null, N(a, (l) => t("option", {
|
|
1482
1512
|
key: l.value,
|
|
1483
1513
|
value: l.value
|
|
1484
|
-
},
|
|
1485
|
-
], 40,
|
|
1514
|
+
}, k(l.label), 9, hs)), 64))
|
|
1515
|
+
], 40, gs)
|
|
1486
1516
|
]),
|
|
1487
|
-
t("div",
|
|
1517
|
+
t("div", ys, [
|
|
1488
1518
|
r[2] || (r[2] = t("label", null, "一键布局", -1)),
|
|
1489
1519
|
t("button", {
|
|
1490
1520
|
class: "fd-btn fd-btn--primary fd-btn--sm fd-grid-apply",
|
|
1491
1521
|
onClick: i
|
|
1492
|
-
}, " 应用到全部子组件(每项占比 " +
|
|
1522
|
+
}, " 应用到全部子组件(每项占比 " + k(e.node.layout || 24) + "/24) ", 1)
|
|
1493
1523
|
])
|
|
1494
1524
|
]));
|
|
1495
1525
|
}
|
|
1496
|
-
}),
|
|
1526
|
+
}), ws = /* @__PURE__ */ P(ks, [["__scopeId", "data-v-a333d2ea"]]), $s = {
|
|
1497
1527
|
type: "grid",
|
|
1498
1528
|
title: "栅栏格",
|
|
1499
|
-
design:
|
|
1500
|
-
render:
|
|
1501
|
-
panel:
|
|
1529
|
+
design: cs,
|
|
1530
|
+
render: ps,
|
|
1531
|
+
panel: ws,
|
|
1502
1532
|
isContainer: !0,
|
|
1503
1533
|
createDefaultProps: () => ({
|
|
1504
1534
|
id: "",
|
|
@@ -1510,7 +1540,7 @@ const ds = /* @__PURE__ */ L({
|
|
|
1510
1540
|
children: []
|
|
1511
1541
|
}),
|
|
1512
1542
|
serialize: (e) => e
|
|
1513
|
-
},
|
|
1543
|
+
}, xs = /* @__PURE__ */ E({
|
|
1514
1544
|
__name: "TextDesign",
|
|
1515
1545
|
props: {
|
|
1516
1546
|
node: {}
|
|
@@ -1518,10 +1548,10 @@ const ds = /* @__PURE__ */ L({
|
|
|
1518
1548
|
setup(e) {
|
|
1519
1549
|
return (n, o) => (d(), c("div", {
|
|
1520
1550
|
class: "fd-text-design",
|
|
1521
|
-
style:
|
|
1522
|
-
},
|
|
1551
|
+
style: K({ display: e.node.display })
|
|
1552
|
+
}, k(e.node.text || "文本内容"), 5));
|
|
1523
1553
|
}
|
|
1524
|
-
}),
|
|
1554
|
+
}), Cs = /* @__PURE__ */ P(xs, [["__scopeId", "data-v-ba382e6c"]]), _s = /* @__PURE__ */ E({
|
|
1525
1555
|
__name: "TextRender",
|
|
1526
1556
|
props: {
|
|
1527
1557
|
node: {},
|
|
@@ -1535,10 +1565,10 @@ const ds = /* @__PURE__ */ L({
|
|
|
1535
1565
|
});
|
|
1536
1566
|
return (s, a) => (d(), c("div", {
|
|
1537
1567
|
class: "fd-text-render",
|
|
1538
|
-
style:
|
|
1539
|
-
},
|
|
1568
|
+
style: K({ display: e.node.display })
|
|
1569
|
+
}, k(o.value), 5));
|
|
1540
1570
|
}
|
|
1541
|
-
}),
|
|
1571
|
+
}), Is = /* @__PURE__ */ P(_s, [["__scopeId", "data-v-3ed7b0f0"]]), Ds = { class: "fd-panel" }, Ss = { class: "fd-panel-item" }, Ts = ["value"], Fs = { class: "fd-panel-item" }, Ls = ["value"], Ms = ["value"], Ns = { class: "fd-panel-item" }, Es = ["value"], Ps = /* @__PURE__ */ E({
|
|
1542
1572
|
__name: "TextPanel",
|
|
1543
1573
|
props: {
|
|
1544
1574
|
node: {},
|
|
@@ -1547,29 +1577,29 @@ const ds = /* @__PURE__ */ L({
|
|
|
1547
1577
|
emits: ["update"],
|
|
1548
1578
|
setup(e, { emit: n }) {
|
|
1549
1579
|
const o = n;
|
|
1550
|
-
return (s, a) => (d(), c("div",
|
|
1551
|
-
t("div",
|
|
1580
|
+
return (s, a) => (d(), c("div", Ds, [
|
|
1581
|
+
t("div", Ss, [
|
|
1552
1582
|
a[3] || (a[3] = t("label", null, "文本", -1)),
|
|
1553
1583
|
t("textarea", {
|
|
1554
1584
|
rows: "4",
|
|
1555
1585
|
value: e.node.text,
|
|
1556
1586
|
onInput: a[0] || (a[0] = (i) => o("update", { text: i.target.value }))
|
|
1557
|
-
}, null, 40,
|
|
1587
|
+
}, null, 40, Ts)
|
|
1558
1588
|
]),
|
|
1559
|
-
t("div",
|
|
1589
|
+
t("div", Fs, [
|
|
1560
1590
|
a[5] || (a[5] = t("label", null, "绑定字段", -1)),
|
|
1561
1591
|
t("select", {
|
|
1562
1592
|
value: e.node.bindField,
|
|
1563
1593
|
onChange: a[1] || (a[1] = (i) => o("update", { bindField: i.target.value }))
|
|
1564
1594
|
}, [
|
|
1565
1595
|
a[4] || (a[4] = t("option", { value: "" }, "不绑定", -1)),
|
|
1566
|
-
(d(!0), c(
|
|
1596
|
+
(d(!0), c(F, null, N(e.fields, (i) => (d(), c("option", {
|
|
1567
1597
|
key: i.name,
|
|
1568
1598
|
value: i.name
|
|
1569
|
-
},
|
|
1570
|
-
], 40,
|
|
1599
|
+
}, k(i.label) + "(" + k(i.name) + ")", 9, Ms))), 128))
|
|
1600
|
+
], 40, Ls)
|
|
1571
1601
|
]),
|
|
1572
|
-
t("div",
|
|
1602
|
+
t("div", Ns, [
|
|
1573
1603
|
a[7] || (a[7] = t("label", null, "对齐方式", -1)),
|
|
1574
1604
|
t("select", {
|
|
1575
1605
|
value: e.node.display,
|
|
@@ -1577,16 +1607,16 @@ const ds = /* @__PURE__ */ L({
|
|
|
1577
1607
|
}, [...a[6] || (a[6] = [
|
|
1578
1608
|
t("option", { value: "inline-block" }, "对齐", -1),
|
|
1579
1609
|
t("option", { value: "block" }, "换行", -1)
|
|
1580
|
-
])], 40,
|
|
1610
|
+
])], 40, Es)
|
|
1581
1611
|
])
|
|
1582
1612
|
]));
|
|
1583
1613
|
}
|
|
1584
|
-
}),
|
|
1614
|
+
}), Os = /* @__PURE__ */ P(Ps, [["__scopeId", "data-v-3201879c"]]), Us = {
|
|
1585
1615
|
type: "text",
|
|
1586
1616
|
title: "文本",
|
|
1587
|
-
design:
|
|
1588
|
-
render:
|
|
1589
|
-
panel:
|
|
1617
|
+
design: Cs,
|
|
1618
|
+
render: Is,
|
|
1619
|
+
panel: Os,
|
|
1590
1620
|
isContainer: !1,
|
|
1591
1621
|
createDefaultProps: () => ({
|
|
1592
1622
|
id: "",
|
|
@@ -1598,44 +1628,44 @@ const ds = /* @__PURE__ */ L({
|
|
|
1598
1628
|
}),
|
|
1599
1629
|
serialize: (e) => e
|
|
1600
1630
|
};
|
|
1601
|
-
let
|
|
1602
|
-
function
|
|
1603
|
-
|
|
1631
|
+
let Me = !1;
|
|
1632
|
+
function Ce() {
|
|
1633
|
+
Me || (Me = !0, le(Mt), le(un), le(In), le(rs), le($s), le(Us));
|
|
1604
1634
|
}
|
|
1605
|
-
|
|
1606
|
-
const
|
|
1607
|
-
let
|
|
1608
|
-
const
|
|
1609
|
-
function
|
|
1610
|
-
|
|
1635
|
+
Ce();
|
|
1636
|
+
const Bs = { baseUrl: "/bpmapi-uat" };
|
|
1637
|
+
let _e = {}, ge = {}, Vs = {};
|
|
1638
|
+
const As = "api/formdesigner/v1";
|
|
1639
|
+
function Ae(e) {
|
|
1640
|
+
ge = { ...ge, ...e };
|
|
1611
1641
|
}
|
|
1612
|
-
function
|
|
1613
|
-
|
|
1642
|
+
function js(e) {
|
|
1643
|
+
_e.baseUrl = e;
|
|
1614
1644
|
}
|
|
1615
|
-
function
|
|
1616
|
-
|
|
1645
|
+
function ti(e) {
|
|
1646
|
+
_e.baseUrl = e ? e.startsWith("/") ? e : `/${e}` : "";
|
|
1617
1647
|
}
|
|
1618
|
-
function
|
|
1648
|
+
function ni(e) {
|
|
1619
1649
|
}
|
|
1620
|
-
function
|
|
1650
|
+
function Rs() {
|
|
1621
1651
|
return {
|
|
1622
|
-
baseUrl:
|
|
1652
|
+
baseUrl: Vs.baseUrl ?? _e.baseUrl ?? ge.baseUrl ?? Bs.baseUrl
|
|
1623
1653
|
};
|
|
1624
1654
|
}
|
|
1625
|
-
function
|
|
1626
|
-
const { baseUrl: o } =
|
|
1655
|
+
function ne(e, n) {
|
|
1656
|
+
const { baseUrl: o } = Rs(), s = new URLSearchParams();
|
|
1627
1657
|
Object.entries(n ?? {}).forEach(([i, u]) => {
|
|
1628
1658
|
u != null && u !== "" && s.append(i, u);
|
|
1629
1659
|
});
|
|
1630
1660
|
const a = s.toString();
|
|
1631
|
-
return `${o}/${
|
|
1661
|
+
return `${o}/${As}/${e}${a ? `?${a}` : ""}`;
|
|
1632
1662
|
}
|
|
1633
|
-
class
|
|
1663
|
+
class je extends Error {
|
|
1634
1664
|
constructor(n, o) {
|
|
1635
1665
|
super(o), this.status = n, this.name = "ApiError";
|
|
1636
1666
|
}
|
|
1637
1667
|
}
|
|
1638
|
-
function
|
|
1668
|
+
function Js(e) {
|
|
1639
1669
|
if (!e) return "";
|
|
1640
1670
|
try {
|
|
1641
1671
|
const n = JSON.parse(e), o = n.error ?? n.message ?? n.title ?? n.detail;
|
|
@@ -1644,13 +1674,13 @@ function Bs(e) {
|
|
|
1644
1674
|
}
|
|
1645
1675
|
return e;
|
|
1646
1676
|
}
|
|
1647
|
-
async function
|
|
1677
|
+
async function oe(e, n) {
|
|
1648
1678
|
const o = await fetch(e, {
|
|
1649
1679
|
...n,
|
|
1650
1680
|
headers: { "Content-Type": "application/json", ...(n == null ? void 0 : n.headers) ?? {} }
|
|
1651
1681
|
}), s = await o.text();
|
|
1652
1682
|
if (!o.ok)
|
|
1653
|
-
throw new
|
|
1683
|
+
throw new je(o.status, Js(s) || `请求失败(${o.status})`);
|
|
1654
1684
|
if ((o.headers.get("content-type") ?? "").includes("text/plain")) return s;
|
|
1655
1685
|
if (!s) return null;
|
|
1656
1686
|
try {
|
|
@@ -1659,7 +1689,7 @@ async function Z(e, n) {
|
|
|
1659
1689
|
return s;
|
|
1660
1690
|
}
|
|
1661
1691
|
}
|
|
1662
|
-
function
|
|
1692
|
+
function zs(e) {
|
|
1663
1693
|
if (e == null) return null;
|
|
1664
1694
|
if (typeof e != "string") return e;
|
|
1665
1695
|
try {
|
|
@@ -1668,36 +1698,36 @@ function Vs(e) {
|
|
|
1668
1698
|
return null;
|
|
1669
1699
|
}
|
|
1670
1700
|
}
|
|
1671
|
-
function
|
|
1701
|
+
function Re(e) {
|
|
1672
1702
|
return e == null ? { success: !1, message: "无响应" } : typeof e == "string" ? { success: e.includes("成功"), message: e } : e;
|
|
1673
1703
|
}
|
|
1674
|
-
async function
|
|
1675
|
-
return
|
|
1704
|
+
async function Ws(e, n) {
|
|
1705
|
+
return oe(ne("opendesigner"), {
|
|
1676
1706
|
method: "POST",
|
|
1677
1707
|
body: JSON.stringify(e)
|
|
1678
1708
|
});
|
|
1679
1709
|
}
|
|
1680
|
-
async function
|
|
1681
|
-
return
|
|
1710
|
+
async function Hs(e, n) {
|
|
1711
|
+
return oe(ne("formconfig", { id: e }));
|
|
1682
1712
|
}
|
|
1683
|
-
async function
|
|
1684
|
-
return
|
|
1713
|
+
async function qs(e, n, o) {
|
|
1714
|
+
return oe(ne("fieldbinding/allfields", { dbtable: e, formid: n }));
|
|
1685
1715
|
}
|
|
1686
|
-
async function
|
|
1687
|
-
return
|
|
1716
|
+
async function Gs(e, n) {
|
|
1717
|
+
return Re(await oe(ne("save"), { method: "POST", body: JSON.stringify(e) }));
|
|
1688
1718
|
}
|
|
1689
|
-
async function
|
|
1690
|
-
return
|
|
1719
|
+
async function Ys(e, n) {
|
|
1720
|
+
return Re(await oe(ne("publish"), { method: "POST", body: JSON.stringify(e) }));
|
|
1691
1721
|
}
|
|
1692
|
-
async function
|
|
1693
|
-
return
|
|
1722
|
+
async function Ks(e, n) {
|
|
1723
|
+
return oe(ne("saveas"), { method: "POST", body: JSON.stringify(e) });
|
|
1694
1724
|
}
|
|
1695
|
-
async function
|
|
1696
|
-
return
|
|
1725
|
+
async function Qs(e, n) {
|
|
1726
|
+
return oe(ne("effectcount", { formId: e }));
|
|
1697
1727
|
}
|
|
1698
|
-
async function
|
|
1699
|
-
return
|
|
1700
|
-
|
|
1728
|
+
async function Xs(e, n) {
|
|
1729
|
+
return oe(
|
|
1730
|
+
ne("effectprocesses", {
|
|
1701
1731
|
id: e.id,
|
|
1702
1732
|
processName: e.processName,
|
|
1703
1733
|
page: String(e.page ?? 1),
|
|
@@ -1705,41 +1735,41 @@ async function qs(e, n) {
|
|
|
1705
1735
|
})
|
|
1706
1736
|
);
|
|
1707
1737
|
}
|
|
1708
|
-
function
|
|
1738
|
+
function Zs(e) {
|
|
1709
1739
|
return { name: e.name, label: e.label, dataType: e.dataType };
|
|
1710
1740
|
}
|
|
1711
|
-
function
|
|
1741
|
+
function el(e) {
|
|
1712
1742
|
return { name: e.name, label: e.label, dataType: e.dataType || "string" };
|
|
1713
1743
|
}
|
|
1714
|
-
function
|
|
1715
|
-
return (e ?? []).filter((o) => o.name && o.name !== n).map((o) => ({ name: o.name, label: o.name, fields: (o.fields ?? []).map(
|
|
1744
|
+
function tl(e, n) {
|
|
1745
|
+
return (e ?? []).filter((o) => o.name && o.name !== n).map((o) => ({ name: o.name, label: o.name, fields: (o.fields ?? []).map(el) }));
|
|
1716
1746
|
}
|
|
1717
|
-
function
|
|
1718
|
-
return
|
|
1747
|
+
function nl(e) {
|
|
1748
|
+
return zs(e);
|
|
1719
1749
|
}
|
|
1720
|
-
function
|
|
1721
|
-
return e instanceof
|
|
1750
|
+
function ae(e) {
|
|
1751
|
+
return e instanceof je || e instanceof Error ? e.message : String(e);
|
|
1722
1752
|
}
|
|
1723
|
-
const
|
|
1724
|
-
function
|
|
1753
|
+
const Z = (e) => JSON.parse(JSON.stringify(e));
|
|
1754
|
+
function Q(e, n) {
|
|
1725
1755
|
for (const o of e) {
|
|
1726
1756
|
if (o.id === n) return o;
|
|
1727
1757
|
if (o.children) {
|
|
1728
|
-
const s =
|
|
1758
|
+
const s = Q(o.children, n);
|
|
1729
1759
|
if (s) return s;
|
|
1730
1760
|
}
|
|
1731
1761
|
}
|
|
1732
1762
|
return null;
|
|
1733
1763
|
}
|
|
1734
|
-
function
|
|
1764
|
+
function Je(e, n) {
|
|
1735
1765
|
const o = e.findIndex((s) => s.id === n);
|
|
1736
1766
|
if (o >= 0)
|
|
1737
1767
|
return e.splice(o, 1), !0;
|
|
1738
1768
|
for (const s of e)
|
|
1739
|
-
if (s.children &&
|
|
1769
|
+
if (s.children && Je(s.children, n)) return !0;
|
|
1740
1770
|
return !1;
|
|
1741
1771
|
}
|
|
1742
|
-
const
|
|
1772
|
+
const G = Ze("designer", {
|
|
1743
1773
|
state: () => ({
|
|
1744
1774
|
workFormId: "",
|
|
1745
1775
|
originFormId: "",
|
|
@@ -1766,7 +1796,7 @@ const W = We("designer", {
|
|
|
1766
1796
|
noticeMsg: ""
|
|
1767
1797
|
}),
|
|
1768
1798
|
getters: {
|
|
1769
|
-
selectedNode: (e) => e.selectedId ?
|
|
1799
|
+
selectedNode: (e) => e.selectedId ? Q(e.widgets, e.selectedId) : null,
|
|
1770
1800
|
canUndo: (e) => e.past.length > 0,
|
|
1771
1801
|
canRedo: (e) => e.future.length > 0,
|
|
1772
1802
|
/** 供控件「事件」下拉选择使用的自定义事件列表 */
|
|
@@ -1777,15 +1807,15 @@ const W = We("designer", {
|
|
|
1777
1807
|
actions: {
|
|
1778
1808
|
/** 提交一次变更快照(用于撤销重做) */
|
|
1779
1809
|
commit() {
|
|
1780
|
-
this.past.push(
|
|
1810
|
+
this.past.push(Z(this.widgets)), this.past.length > 50 && this.past.shift(), this.future = [];
|
|
1781
1811
|
},
|
|
1782
1812
|
undo() {
|
|
1783
1813
|
const e = this.past.pop();
|
|
1784
|
-
e && (this.future.push(
|
|
1814
|
+
e && (this.future.push(Z(this.widgets)), this.widgets = e, this.selectedId && !Q(this.widgets, this.selectedId) && (this.selectedId = null));
|
|
1785
1815
|
},
|
|
1786
1816
|
redo() {
|
|
1787
1817
|
const e = this.future.pop();
|
|
1788
|
-
e && (this.past.push(
|
|
1818
|
+
e && (this.past.push(Z(this.widgets)), this.widgets = e);
|
|
1789
1819
|
},
|
|
1790
1820
|
select(e) {
|
|
1791
1821
|
this.selectedId = e, this.selectedForm = !1;
|
|
@@ -1815,10 +1845,10 @@ const W = We("designer", {
|
|
|
1815
1845
|
/** 新增控件:parentId 指定容器,index 指定插入位置(不传则末尾) */
|
|
1816
1846
|
addWidget(e, n, o) {
|
|
1817
1847
|
var i;
|
|
1818
|
-
const s =
|
|
1848
|
+
const s = ct(e);
|
|
1819
1849
|
this.commit();
|
|
1820
|
-
const a = n ?
|
|
1821
|
-
a && ((i =
|
|
1850
|
+
const a = n ? Q(this.widgets, n) : null;
|
|
1851
|
+
a && ((i = X(a.type)) != null && i.isContainer) ? (a.children = a.children || [], a.type === "grid" && s.gridSpan == null && (s.gridSpan = a.layout || 24), o == null || o > a.children.length ? a.children.push(s) : a.children.splice(Math.max(0, o), 0, s)) : o == null || o > this.widgets.length ? this.widgets.push(s) : this.widgets.splice(Math.max(0, o), 0, s), this.selectedId = s.id;
|
|
1822
1852
|
},
|
|
1823
1853
|
/** 判断 maybeChild 是否为 node 的后代(防止把容器拖进自己) */
|
|
1824
1854
|
isDescendant(e, n) {
|
|
@@ -1829,43 +1859,43 @@ const W = We("designer", {
|
|
|
1829
1859
|
},
|
|
1830
1860
|
/** 移动已有控件到指定容器 / 根,插入位置 index */
|
|
1831
1861
|
moveNode(e, n, o) {
|
|
1832
|
-
var
|
|
1862
|
+
var p;
|
|
1833
1863
|
if (e === n) return;
|
|
1834
|
-
const s =
|
|
1864
|
+
const s = Q(this.widgets, e);
|
|
1835
1865
|
if (!s || n && this.isDescendant(s, n)) return;
|
|
1836
|
-
const a = n ?
|
|
1837
|
-
const
|
|
1838
|
-
if (
|
|
1839
|
-
for (const
|
|
1840
|
-
if (
|
|
1841
|
-
const _ = i(
|
|
1866
|
+
const a = n ? Q(this.widgets, n) : null, i = (y) => {
|
|
1867
|
+
const C = y.findIndex((B) => B.id === e);
|
|
1868
|
+
if (C >= 0) return { list: y, index: C };
|
|
1869
|
+
for (const B of y)
|
|
1870
|
+
if (B.children) {
|
|
1871
|
+
const _ = i(B.children);
|
|
1842
1872
|
if (_) return _;
|
|
1843
1873
|
}
|
|
1844
1874
|
return null;
|
|
1845
1875
|
}, u = i(this.widgets);
|
|
1846
1876
|
if (!u) return;
|
|
1847
1877
|
let r;
|
|
1848
|
-
a && ((
|
|
1878
|
+
a && ((p = X(a.type)) != null && p.isContainer) ? (a.children = a.children || [], r = a.children) : r = this.widgets, this.commit();
|
|
1849
1879
|
let l = o;
|
|
1850
1880
|
r === u.list && u.index < o && (l = o - 1);
|
|
1851
|
-
const [
|
|
1852
|
-
if (l = Math.max(0, Math.min(l, r.length)), r.splice(l, 0,
|
|
1853
|
-
const
|
|
1854
|
-
(u.list !== r ||
|
|
1881
|
+
const [m] = u.list.splice(u.index, 1);
|
|
1882
|
+
if (l = Math.max(0, Math.min(l, r.length)), r.splice(l, 0, m), a && a.type === "grid") {
|
|
1883
|
+
const y = a.layout || 24;
|
|
1884
|
+
(u.list !== r || m.gridSpan == null) && (m.gridSpan = y);
|
|
1855
1885
|
} else
|
|
1856
|
-
delete
|
|
1857
|
-
this.selectedId =
|
|
1886
|
+
delete m.gridSpan;
|
|
1887
|
+
this.selectedId = m.id;
|
|
1858
1888
|
},
|
|
1859
1889
|
removeWidget(e) {
|
|
1860
|
-
this.commit(),
|
|
1890
|
+
this.commit(), Je(this.widgets, e), this.selectedId === e && (this.selectedId = null);
|
|
1861
1891
|
},
|
|
1862
1892
|
moveSibling(e, n) {
|
|
1863
1893
|
const o = (r) => {
|
|
1864
|
-
if (r.findIndex((
|
|
1865
|
-
for (const
|
|
1866
|
-
if (
|
|
1867
|
-
const
|
|
1868
|
-
if (
|
|
1894
|
+
if (r.findIndex((m) => m.id === e) >= 0) return r;
|
|
1895
|
+
for (const m of r)
|
|
1896
|
+
if (m.children) {
|
|
1897
|
+
const p = o(m.children);
|
|
1898
|
+
if (p) return p;
|
|
1869
1899
|
}
|
|
1870
1900
|
return null;
|
|
1871
1901
|
}, s = o(this.widgets);
|
|
@@ -1877,7 +1907,7 @@ const W = We("designer", {
|
|
|
1877
1907
|
s.splice(i, 0, u);
|
|
1878
1908
|
},
|
|
1879
1909
|
updateNode(e, n) {
|
|
1880
|
-
const o =
|
|
1910
|
+
const o = Q(this.widgets, e);
|
|
1881
1911
|
o && (Object.assign(o, n), this.commit());
|
|
1882
1912
|
},
|
|
1883
1913
|
setDragging(e) {
|
|
@@ -1885,7 +1915,7 @@ const W = We("designer", {
|
|
|
1885
1915
|
},
|
|
1886
1916
|
/** 展开/收起容器(设计器视图操作,不写入撤销历史) */
|
|
1887
1917
|
setExpanded(e, n) {
|
|
1888
|
-
const o =
|
|
1918
|
+
const o = Q(this.widgets, e);
|
|
1889
1919
|
o && "expanded" in o && (o.expanded = n);
|
|
1890
1920
|
},
|
|
1891
1921
|
/** 将 draggingId 控件移动到 targetId(容器)或根 */
|
|
@@ -1912,14 +1942,24 @@ const W = We("designer", {
|
|
|
1912
1942
|
return;
|
|
1913
1943
|
}
|
|
1914
1944
|
if (e) {
|
|
1915
|
-
const i =
|
|
1916
|
-
i && ((a =
|
|
1945
|
+
const i = Q(this.widgets, e);
|
|
1946
|
+
i && ((a = X(i.type)) != null && a.isContainer) ? (i.children = i.children || [], i.children.push(s)) : this.widgets.push(s);
|
|
1917
1947
|
} else
|
|
1918
1948
|
this.widgets.push(s);
|
|
1919
1949
|
this.draggingId = null, this.selectedId = s.id;
|
|
1920
1950
|
},
|
|
1921
1951
|
loadSchema(e) {
|
|
1922
|
-
this.formId = e.formId, this.dbtable = e.dbtable, this.fields = e.fields, this.widgets =
|
|
1952
|
+
this.formId = e.formId, this.dbtable = e.dbtable, this.fields = e.fields, this.widgets = Z(e.widgets), this.events = e.events ? Z(e.events) : { lifecycle: {}, custom: [] }, this.selectedId = null, this.selectedForm = !1, this.past = [], this.future = [];
|
|
1953
|
+
},
|
|
1954
|
+
/**
|
|
1955
|
+
* 导入(「导入」按钮):仅用导入 JSON 的表单结构(控件树 + 事件)覆盖当前设计,
|
|
1956
|
+
* 不清空业务对象——保留 dbtable(主表业务对象编码)、fields(由 allfields 按 dbtable 下发)、
|
|
1957
|
+
* 以及 formId / workFormId / attribute / subTables 等打开流程上下文。
|
|
1958
|
+
* 与 loadSchema 的区别:loadSchema 用于打开表单时整体装载(含 formId/dbtable/fields);
|
|
1959
|
+
* importSchema 只换表单 JSON,不动业务对象与字段。
|
|
1960
|
+
*/
|
|
1961
|
+
importSchema(e) {
|
|
1962
|
+
this.widgets = Z(e.widgets ?? []), this.events = e.events ? Z(e.events) : this.events, this.selectedId = null, this.selectedForm = !1, this.past = [], this.future = [];
|
|
1923
1963
|
},
|
|
1924
1964
|
toSchema() {
|
|
1925
1965
|
return {
|
|
@@ -1927,7 +1967,7 @@ const W = We("designer", {
|
|
|
1927
1967
|
dbtable: this.dbtable,
|
|
1928
1968
|
fields: this.fields,
|
|
1929
1969
|
widgets: this.widgets,
|
|
1930
|
-
events:
|
|
1970
|
+
events: Z(this.events)
|
|
1931
1971
|
};
|
|
1932
1972
|
},
|
|
1933
1973
|
/**
|
|
@@ -1965,15 +2005,15 @@ const W = We("designer", {
|
|
|
1965
2005
|
return;
|
|
1966
2006
|
}
|
|
1967
2007
|
this.originFormId = e;
|
|
1968
|
-
const s = await
|
|
2008
|
+
const s = await Ws({ openType: o, id: e, formVersion: n });
|
|
1969
2009
|
this.workFormId = s.newFormID, this.formId = s.newFormID;
|
|
1970
|
-
const a = await
|
|
2010
|
+
const a = await Hs(s.newFormID);
|
|
1971
2011
|
this.attribute = a.attribute ?? {}, this.formName = this.attribute.name ?? "", this.device = a.templateType === "App" ? "mobile" : "pc";
|
|
1972
|
-
const i = this.attribute.dbtable || "", u = await
|
|
2012
|
+
const i = this.attribute.dbtable || "", u = await qs(i, s.newFormID);
|
|
1973
2013
|
this.dbtable = i || u.dbtable;
|
|
1974
|
-
const r = this.enrichFields((u.fields ?? []).map(
|
|
1975
|
-
this.setFields(r), this.setSubTables(
|
|
1976
|
-
const l =
|
|
2014
|
+
const r = this.enrichFields((u.fields ?? []).map(Zs));
|
|
2015
|
+
this.setFields(r), this.setSubTables(tl(u.subtables, this.dbtable));
|
|
2016
|
+
const l = nl(a.json);
|
|
1977
2017
|
l && Array.isArray(l.widgets) ? this.loadSchema({
|
|
1978
2018
|
...l,
|
|
1979
2019
|
formId: s.newFormID,
|
|
@@ -1991,7 +2031,7 @@ const W = We("designer", {
|
|
|
1991
2031
|
events: { lifecycle: {}, custom: [] }
|
|
1992
2032
|
}));
|
|
1993
2033
|
} catch (s) {
|
|
1994
|
-
this.errorMsg = `加载失败:${
|
|
2034
|
+
this.errorMsg = `加载失败:${ae(s)}`;
|
|
1995
2035
|
} finally {
|
|
1996
2036
|
this.loading = !1;
|
|
1997
2037
|
}
|
|
@@ -2012,7 +2052,7 @@ const W = We("designer", {
|
|
|
2012
2052
|
async save() {
|
|
2013
2053
|
this.errorMsg = "";
|
|
2014
2054
|
try {
|
|
2015
|
-
return await
|
|
2055
|
+
return await Gs({
|
|
2016
2056
|
id: this.workFormId,
|
|
2017
2057
|
name: this.formName,
|
|
2018
2058
|
att: this.attJson,
|
|
@@ -2023,7 +2063,7 @@ const W = We("designer", {
|
|
|
2023
2063
|
dataObject: this.attribute.isentity === "0" ? JSON.stringify({ table: "" }) : void 0
|
|
2024
2064
|
});
|
|
2025
2065
|
} catch (e) {
|
|
2026
|
-
throw this.errorMsg = `保存失败:${
|
|
2066
|
+
throw this.errorMsg = `保存失败:${ae(e)}`, e;
|
|
2027
2067
|
}
|
|
2028
2068
|
},
|
|
2029
2069
|
/**
|
|
@@ -2033,16 +2073,16 @@ const W = We("designer", {
|
|
|
2033
2073
|
async saveAs(e, n, o = "start") {
|
|
2034
2074
|
this.errorMsg = "";
|
|
2035
2075
|
try {
|
|
2036
|
-
return await
|
|
2076
|
+
return await Ks({ id: this.workFormId, name: e, code: n, saveSelect: o });
|
|
2037
2077
|
} catch (s) {
|
|
2038
|
-
throw this.errorMsg = `另存为失败:${
|
|
2078
|
+
throw this.errorMsg = `另存为失败:${ae(s)}`, s;
|
|
2039
2079
|
}
|
|
2040
2080
|
},
|
|
2041
2081
|
/** 发布:以工作表单 ID 发布(Status=4 → 回写版本行置 Status=1 + 一口收直写业务库) */
|
|
2042
2082
|
async publish(e = "") {
|
|
2043
2083
|
this.errorMsg = "";
|
|
2044
2084
|
try {
|
|
2045
|
-
return await
|
|
2085
|
+
return await Ys({
|
|
2046
2086
|
id: this.workFormId,
|
|
2047
2087
|
name: this.formName,
|
|
2048
2088
|
att: this.attJson,
|
|
@@ -2050,7 +2090,7 @@ const W = We("designer", {
|
|
|
2050
2090
|
text: e
|
|
2051
2091
|
});
|
|
2052
2092
|
} catch (n) {
|
|
2053
|
-
throw this.errorMsg = `发布失败:${
|
|
2093
|
+
throw this.errorMsg = `发布失败:${ae(n)}`, n;
|
|
2054
2094
|
}
|
|
2055
2095
|
},
|
|
2056
2096
|
/**
|
|
@@ -2061,19 +2101,19 @@ const W = We("designer", {
|
|
|
2061
2101
|
async checkPublish() {
|
|
2062
2102
|
this.errorMsg = "";
|
|
2063
2103
|
try {
|
|
2064
|
-
const e = await
|
|
2104
|
+
const e = await Qs(this.originFormId);
|
|
2065
2105
|
return { needConfirm: e.result || e.count > 0, count: e.count };
|
|
2066
2106
|
} catch (e) {
|
|
2067
|
-
throw this.errorMsg = `发布检查失败:${
|
|
2107
|
+
throw this.errorMsg = `发布检查失败:${ae(e)}`, e;
|
|
2068
2108
|
}
|
|
2069
2109
|
}
|
|
2070
2110
|
}
|
|
2071
|
-
}),
|
|
2072
|
-
function
|
|
2073
|
-
localStorage.setItem(
|
|
2111
|
+
}), ze = "fd:form:";
|
|
2112
|
+
function ol(e, n) {
|
|
2113
|
+
localStorage.setItem(ze + e, JSON.stringify(n));
|
|
2074
2114
|
}
|
|
2075
|
-
function
|
|
2076
|
-
const n = localStorage.getItem(
|
|
2115
|
+
function oi(e) {
|
|
2116
|
+
const n = localStorage.getItem(ze + e);
|
|
2077
2117
|
if (!n) return null;
|
|
2078
2118
|
try {
|
|
2079
2119
|
return JSON.parse(n);
|
|
@@ -2081,8 +2121,8 @@ function Ka(e) {
|
|
|
2081
2121
|
return null;
|
|
2082
2122
|
}
|
|
2083
2123
|
}
|
|
2084
|
-
const
|
|
2085
|
-
function
|
|
2124
|
+
const sl = "fdFireEvent";
|
|
2125
|
+
function Ne(e, n = {}) {
|
|
2086
2126
|
if (!(!e || !e.trim()))
|
|
2087
2127
|
try {
|
|
2088
2128
|
return new Function("ctx", `"use strict";
|
|
@@ -2092,7 +2132,7 @@ ${e}`)(n);
|
|
|
2092
2132
|
return;
|
|
2093
2133
|
}
|
|
2094
2134
|
}
|
|
2095
|
-
function
|
|
2135
|
+
function ll(e) {
|
|
2096
2136
|
if (!(!e || !e.trim() || typeof document > "u"))
|
|
2097
2137
|
try {
|
|
2098
2138
|
const n = document.createElement("script");
|
|
@@ -2101,7 +2141,7 @@ function el(e) {
|
|
|
2101
2141
|
console.error("[form-designer] 自定义方法挂载失败:", n);
|
|
2102
2142
|
}
|
|
2103
2143
|
}
|
|
2104
|
-
const
|
|
2144
|
+
const al = { class: "fd-renderer" }, il = /* @__PURE__ */ E({
|
|
2105
2145
|
__name: "Renderer",
|
|
2106
2146
|
props: {
|
|
2107
2147
|
widgets: {},
|
|
@@ -2114,82 +2154,82 @@ const tl = { class: "fd-renderer" }, nl = /* @__PURE__ */ L({
|
|
|
2114
2154
|
const o = e, s = M(
|
|
2115
2155
|
() => o.widgets.filter((u) => {
|
|
2116
2156
|
var l;
|
|
2117
|
-
const r = (l =
|
|
2157
|
+
const r = (l = X(u.type)) == null ? void 0 : l.visibleModes;
|
|
2118
2158
|
return !r || r.length === 0 ? !0 : o.formMode ? r.includes(o.formMode) : !0;
|
|
2119
2159
|
})
|
|
2120
2160
|
);
|
|
2121
2161
|
function a(u) {
|
|
2122
2162
|
var l;
|
|
2123
2163
|
const r = (l = o.events) == null ? void 0 : l.lifecycle[u];
|
|
2124
|
-
|
|
2164
|
+
Ne(r, { formData: o.formData, event: u });
|
|
2125
2165
|
}
|
|
2126
2166
|
function i(u, r) {
|
|
2127
|
-
var
|
|
2128
|
-
const l = (
|
|
2129
|
-
l &&
|
|
2167
|
+
var m;
|
|
2168
|
+
const l = (m = o.events) == null ? void 0 : m.custom.find((p) => p.name === u);
|
|
2169
|
+
l && Ne(l.handler, { formData: o.formData, event: u, payload: r });
|
|
2130
2170
|
}
|
|
2131
|
-
return
|
|
2171
|
+
return Ge(sl, i), ce(() => {
|
|
2132
2172
|
var u;
|
|
2133
|
-
a("onLoad"), a("onMounted"),
|
|
2134
|
-
}),
|
|
2173
|
+
a("onLoad"), a("onMounted"), ll((u = o.events) == null ? void 0 : u.lifecycle.custom);
|
|
2174
|
+
}), de(
|
|
2135
2175
|
() => o.formData,
|
|
2136
2176
|
() => a("onValueChange"),
|
|
2137
2177
|
{ deep: !0 }
|
|
2138
|
-
), n({ fireEvent: i, runLifecycle: a }), (u, r) => (d(), c("div",
|
|
2139
|
-
(d(!0), c(
|
|
2178
|
+
), n({ fireEvent: i, runLifecycle: a }), (u, r) => (d(), c("div", al, [
|
|
2179
|
+
(d(!0), c(F, null, N(s.value, (l) => (d(), V(xe, {
|
|
2140
2180
|
key: l.id,
|
|
2141
2181
|
node: l,
|
|
2142
2182
|
mode: "render",
|
|
2143
2183
|
"form-mode": e.formMode,
|
|
2144
2184
|
"form-data": e.formData,
|
|
2145
2185
|
"form-id": e.formId
|
|
2146
|
-
},
|
|
2147
|
-
N(u.$slots, (
|
|
2148
|
-
name:
|
|
2149
|
-
fn:
|
|
2150
|
-
|
|
2186
|
+
}, re({ _: 2 }, [
|
|
2187
|
+
N(u.$slots, (m, p) => ({
|
|
2188
|
+
name: p,
|
|
2189
|
+
fn: j((y) => [
|
|
2190
|
+
te(u.$slots, p, ve({ ref_for: !0 }, y || {}), void 0, !0)
|
|
2151
2191
|
])
|
|
2152
2192
|
}))
|
|
2153
2193
|
]), 1032, ["node", "form-mode", "form-data", "form-id"]))), 128))
|
|
2154
2194
|
]));
|
|
2155
2195
|
}
|
|
2156
|
-
}),
|
|
2196
|
+
}), We = /* @__PURE__ */ P(il, [["__scopeId", "data-v-82088c12"]]), dl = { class: "fd-tree" }, rl = { class: "fd-tree-head" }, ul = {
|
|
2157
2197
|
key: 0,
|
|
2158
2198
|
class: "fd-tree-count"
|
|
2159
|
-
},
|
|
2199
|
+
}, cl = {
|
|
2160
2200
|
key: 0,
|
|
2161
2201
|
class: "fd-tree-empty"
|
|
2162
|
-
},
|
|
2202
|
+
}, fl = { class: "fd-tree-name" }, ml = ["title"], pl = /* @__PURE__ */ E({
|
|
2163
2203
|
__name: "ComponentTree",
|
|
2164
2204
|
setup(e) {
|
|
2165
|
-
const n =
|
|
2205
|
+
const n = G();
|
|
2166
2206
|
function o(u) {
|
|
2167
|
-
var
|
|
2168
|
-
const r =
|
|
2207
|
+
var p;
|
|
2208
|
+
const r = X(u.type), l = u.label, m = (r == null ? void 0 : r.title) ?? u.type;
|
|
2169
2209
|
return {
|
|
2170
2210
|
id: u.id,
|
|
2171
|
-
label: l ? `${
|
|
2172
|
-
name:
|
|
2211
|
+
label: l ? `${m} · ${l}` : m,
|
|
2212
|
+
name: m,
|
|
2173
2213
|
sub: l ?? "",
|
|
2174
|
-
children: (
|
|
2214
|
+
children: (p = u.children) == null ? void 0 : p.map(o)
|
|
2175
2215
|
};
|
|
2176
2216
|
}
|
|
2177
2217
|
const s = M(() => n.widgets.map(o)), a = M(() => {
|
|
2178
|
-
const u = (r) => r.reduce((l,
|
|
2218
|
+
const u = (r) => r.reduce((l, m) => l + 1 + u(m.children ?? []), 0);
|
|
2179
2219
|
return u(n.widgets);
|
|
2180
2220
|
});
|
|
2181
2221
|
function i(u) {
|
|
2182
|
-
n.select(u.id),
|
|
2222
|
+
n.select(u.id), Oe(() => {
|
|
2183
2223
|
var r;
|
|
2184
2224
|
(r = document.querySelector(".fd-canvas-node.is-selected")) == null || r.scrollIntoView({ block: "nearest" });
|
|
2185
2225
|
});
|
|
2186
2226
|
}
|
|
2187
|
-
return (u, r) => (d(), c("div",
|
|
2188
|
-
t("div",
|
|
2189
|
-
r[0] || (r[0] =
|
|
2190
|
-
a.value ? (d(), c("span",
|
|
2227
|
+
return (u, r) => (d(), c("div", dl, [
|
|
2228
|
+
t("div", rl, [
|
|
2229
|
+
r[0] || (r[0] = we('<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)),
|
|
2230
|
+
a.value ? (d(), c("span", ul, k(a.value), 1)) : T("", !0)
|
|
2191
2231
|
]),
|
|
2192
|
-
a.value ? (d(), V(h(
|
|
2232
|
+
a.value ? (d(), V(h(et), {
|
|
2193
2233
|
key: 1,
|
|
2194
2234
|
class: "fd-tree-el",
|
|
2195
2235
|
data: s.value,
|
|
@@ -2201,16 +2241,16 @@ const tl = { class: "fd-renderer" }, nl = /* @__PURE__ */ L({
|
|
|
2201
2241
|
"expand-on-click-node": !1,
|
|
2202
2242
|
onNodeClick: i
|
|
2203
2243
|
}, {
|
|
2204
|
-
default:
|
|
2205
|
-
t("span",
|
|
2244
|
+
default: j(({ data: l }) => [
|
|
2245
|
+
t("span", fl, k(l.name), 1),
|
|
2206
2246
|
l.sub ? (d(), c("span", {
|
|
2207
2247
|
key: 0,
|
|
2208
2248
|
class: "fd-tree-sub",
|
|
2209
2249
|
title: l.sub
|
|
2210
|
-
},
|
|
2250
|
+
}, k(l.sub), 9, ml)) : T("", !0)
|
|
2211
2251
|
]),
|
|
2212
2252
|
_: 1
|
|
2213
|
-
}, 8, ["data", "current-node-key"])) : (d(), c("div",
|
|
2253
|
+
}, 8, ["data", "current-node-key"])) : (d(), c("div", cl, [...r[1] || (r[1] = [
|
|
2214
2254
|
t("svg", {
|
|
2215
2255
|
viewBox: "0 0 24 24",
|
|
2216
2256
|
fill: "none",
|
|
@@ -2232,8 +2272,8 @@ const tl = { class: "fd-renderer" }, nl = /* @__PURE__ */ L({
|
|
|
2232
2272
|
])]))
|
|
2233
2273
|
]));
|
|
2234
2274
|
}
|
|
2235
|
-
}),
|
|
2236
|
-
var
|
|
2275
|
+
}), vl = /* @__PURE__ */ P(pl, [["__scopeId", "data-v-e38c14ec"]]);
|
|
2276
|
+
var bl = {
|
|
2237
2277
|
name: "zh-cn",
|
|
2238
2278
|
el: {
|
|
2239
2279
|
breadcrumb: { label: "面包屑" },
|
|
@@ -2415,10 +2455,10 @@ var cl = {
|
|
|
2415
2455
|
}
|
|
2416
2456
|
}
|
|
2417
2457
|
};
|
|
2418
|
-
const
|
|
2458
|
+
const gl = { class: "fd-publish-tip" }, hl = { class: "fd-publish-tip-text" }, yl = { class: "fd-publish-toolbar" }, kl = { class: "fd-publish-table-wrap" }, wl = { class: "fd-publish-table" }, $l = ["title"], xl = ["href", "title"], Cl = ["title"], _l = ["title"], Il = {
|
|
2419
2459
|
key: 1,
|
|
2420
2460
|
class: "fd-publish-error"
|
|
2421
|
-
},
|
|
2461
|
+
}, Dl = { class: "fd-publish-pager" }, Sl = /* @__PURE__ */ E({
|
|
2422
2462
|
__name: "PublishConfirmDialog",
|
|
2423
2463
|
props: {
|
|
2424
2464
|
modelValue: { type: Boolean },
|
|
@@ -2427,92 +2467,92 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
2427
2467
|
},
|
|
2428
2468
|
emits: ["update:modelValue", "confirm"],
|
|
2429
2469
|
setup(e, { emit: n }) {
|
|
2430
|
-
const o =
|
|
2431
|
-
async function
|
|
2470
|
+
const o = tt.directive, s = e, a = n, i = O(!1), u = O(""), r = O(""), l = O(1), m = O(10), p = O(0), y = O([]);
|
|
2471
|
+
async function C() {
|
|
2432
2472
|
if (s.formId) {
|
|
2433
2473
|
i.value = !0, u.value = "";
|
|
2434
2474
|
try {
|
|
2435
|
-
const
|
|
2475
|
+
const S = await Xs({
|
|
2436
2476
|
id: s.formId,
|
|
2437
2477
|
processName: r.value,
|
|
2438
2478
|
page: l.value,
|
|
2439
|
-
pageSize:
|
|
2479
|
+
pageSize: m.value
|
|
2440
2480
|
});
|
|
2441
|
-
|
|
2442
|
-
} catch (
|
|
2443
|
-
|
|
2481
|
+
y.value = S.items ?? [], p.value = S.total ?? 0;
|
|
2482
|
+
} catch (S) {
|
|
2483
|
+
y.value = [], p.value = 0, u.value = ae(S);
|
|
2444
2484
|
} finally {
|
|
2445
2485
|
i.value = !1;
|
|
2446
2486
|
}
|
|
2447
2487
|
}
|
|
2448
2488
|
}
|
|
2449
|
-
|
|
2489
|
+
de(
|
|
2450
2490
|
() => s.modelValue,
|
|
2451
|
-
(
|
|
2452
|
-
|
|
2491
|
+
(S) => {
|
|
2492
|
+
S && (r.value = "", l.value = 1, C());
|
|
2453
2493
|
}
|
|
2454
|
-
),
|
|
2455
|
-
l.value = 1,
|
|
2456
|
-
}),
|
|
2457
|
-
function
|
|
2494
|
+
), de(r, () => {
|
|
2495
|
+
l.value = 1, C();
|
|
2496
|
+
}), de(l, () => C());
|
|
2497
|
+
function B() {
|
|
2458
2498
|
a("update:modelValue", !1);
|
|
2459
2499
|
}
|
|
2460
2500
|
function _() {
|
|
2461
2501
|
a("confirm");
|
|
2462
2502
|
}
|
|
2463
|
-
return (
|
|
2464
|
-
default:
|
|
2465
|
-
|
|
2503
|
+
return (S, v) => (d(), V(h(nt), { locale: h(bl) }, {
|
|
2504
|
+
default: j(() => [
|
|
2505
|
+
L(h(ot), {
|
|
2466
2506
|
"model-value": e.modelValue,
|
|
2467
2507
|
title: "发布确认",
|
|
2468
2508
|
width: "70rem",
|
|
2469
2509
|
"close-on-click-modal": !1,
|
|
2470
|
-
"onUpdate:modelValue":
|
|
2510
|
+
"onUpdate:modelValue": v[3] || (v[3] = (g) => a("update:modelValue", g))
|
|
2471
2511
|
}, {
|
|
2472
|
-
footer:
|
|
2473
|
-
|
|
2474
|
-
default:
|
|
2512
|
+
footer: j(() => [
|
|
2513
|
+
L(h(Fe), { onClick: B }, {
|
|
2514
|
+
default: j(() => [...v[9] || (v[9] = [
|
|
2475
2515
|
U("取消", -1)
|
|
2476
2516
|
])]),
|
|
2477
2517
|
_: 1
|
|
2478
2518
|
}),
|
|
2479
|
-
|
|
2519
|
+
L(h(Fe), {
|
|
2480
2520
|
type: "primary",
|
|
2481
2521
|
disabled: i.value,
|
|
2482
2522
|
onClick: _
|
|
2483
2523
|
}, {
|
|
2484
|
-
default:
|
|
2524
|
+
default: j(() => [...v[10] || (v[10] = [
|
|
2485
2525
|
U("确认发布", -1)
|
|
2486
2526
|
])]),
|
|
2487
2527
|
_: 1
|
|
2488
2528
|
}, 8, ["disabled"])
|
|
2489
2529
|
]),
|
|
2490
|
-
default:
|
|
2491
|
-
t("div",
|
|
2492
|
-
|
|
2493
|
-
t("span",
|
|
2494
|
-
|
|
2495
|
-
t("b", null,
|
|
2496
|
-
|
|
2530
|
+
default: j(() => [
|
|
2531
|
+
t("div", gl, [
|
|
2532
|
+
v[6] || (v[6] = t("span", { class: "fd-publish-tip-icon" }, "!", -1)),
|
|
2533
|
+
t("span", hl, [
|
|
2534
|
+
v[4] || (v[4] = U(" 该表单正在被 ", -1)),
|
|
2535
|
+
t("b", null, k(e.count), 1),
|
|
2536
|
+
v[5] || (v[5] = U(" 个流程使用,发布后将影响以下流程,确定发布? ", -1))
|
|
2497
2537
|
])
|
|
2498
2538
|
]),
|
|
2499
|
-
t("div",
|
|
2500
|
-
|
|
2539
|
+
t("div", yl, [
|
|
2540
|
+
L(h(st), {
|
|
2501
2541
|
modelValue: r.value,
|
|
2502
|
-
"onUpdate:modelValue":
|
|
2542
|
+
"onUpdate:modelValue": v[0] || (v[0] = (g) => r.value = g),
|
|
2503
2543
|
placeholder: "输入流程名搜索",
|
|
2504
2544
|
clearable: "",
|
|
2505
2545
|
class: "fd-publish-search"
|
|
2506
2546
|
}, null, 8, ["modelValue"])
|
|
2507
2547
|
]),
|
|
2508
|
-
|
|
2509
|
-
t("table",
|
|
2510
|
-
|
|
2548
|
+
fe((d(), c("div", kl, [
|
|
2549
|
+
t("table", wl, [
|
|
2550
|
+
v[7] || (v[7] = t("colgroup", null, [
|
|
2511
2551
|
t("col", { style: { width: "24%" } }),
|
|
2512
2552
|
t("col", { style: { width: "40%" } }),
|
|
2513
2553
|
t("col", { style: { width: "36%" } })
|
|
2514
2554
|
], -1)),
|
|
2515
|
-
|
|
2555
|
+
v[8] || (v[8] = t("thead", null, [
|
|
2516
2556
|
t("tr", null, [
|
|
2517
2557
|
t("th", null, "表单名称"),
|
|
2518
2558
|
t("th", null, "流程模板"),
|
|
@@ -2520,12 +2560,12 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
2520
2560
|
])
|
|
2521
2561
|
], -1)),
|
|
2522
2562
|
t("tbody", null, [
|
|
2523
|
-
(d(!0), c(
|
|
2563
|
+
(d(!0), c(F, null, N(y.value, (g) => (d(), c("tr", {
|
|
2524
2564
|
key: g.templateId || g.formId
|
|
2525
2565
|
}, [
|
|
2526
2566
|
t("td", {
|
|
2527
2567
|
title: g.formNameCN || g.formCode
|
|
2528
|
-
},
|
|
2568
|
+
}, k(g.formNameCN || g.formCode), 9, $l),
|
|
2529
2569
|
t("td", null, [
|
|
2530
2570
|
g.templateUrl ? (d(), c("a", {
|
|
2531
2571
|
key: 0,
|
|
@@ -2534,34 +2574,34 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
2534
2574
|
target: "_blank",
|
|
2535
2575
|
rel: "noopener noreferrer",
|
|
2536
2576
|
title: g.templateName
|
|
2537
|
-
},
|
|
2577
|
+
}, k(g.templateName), 9, xl)) : (d(), c("span", {
|
|
2538
2578
|
key: 1,
|
|
2539
2579
|
title: g.templateName
|
|
2540
|
-
},
|
|
2580
|
+
}, k(g.templateName), 9, Cl))
|
|
2541
2581
|
]),
|
|
2542
2582
|
t("td", {
|
|
2543
2583
|
class: "fd-publish-id",
|
|
2544
2584
|
title: g.templateId
|
|
2545
|
-
},
|
|
2585
|
+
}, k(g.templateId), 9, _l)
|
|
2546
2586
|
]))), 128))
|
|
2547
2587
|
])
|
|
2548
2588
|
]),
|
|
2549
|
-
!
|
|
2589
|
+
!y.value.length && !u.value && !i.value ? (d(), V(h(lt), {
|
|
2550
2590
|
key: 0,
|
|
2551
2591
|
description: "暂无可用流程模板",
|
|
2552
2592
|
"image-size": 60
|
|
2553
|
-
})) :
|
|
2554
|
-
!
|
|
2593
|
+
})) : T("", !0),
|
|
2594
|
+
!y.value.length && u.value ? (d(), c("div", Il, k(u.value), 1)) : T("", !0)
|
|
2555
2595
|
])), [
|
|
2556
2596
|
[h(o), i.value]
|
|
2557
2597
|
]),
|
|
2558
|
-
t("div",
|
|
2559
|
-
|
|
2598
|
+
t("div", Dl, [
|
|
2599
|
+
L(h(at), {
|
|
2560
2600
|
"current-page": l.value,
|
|
2561
|
-
"onUpdate:currentPage":
|
|
2562
|
-
"page-size":
|
|
2563
|
-
"onUpdate:pageSize":
|
|
2564
|
-
total:
|
|
2601
|
+
"onUpdate:currentPage": v[1] || (v[1] = (g) => l.value = g),
|
|
2602
|
+
"page-size": m.value,
|
|
2603
|
+
"onUpdate:pageSize": v[2] || (v[2] = (g) => m.value = g),
|
|
2604
|
+
total: p.value,
|
|
2565
2605
|
"page-sizes": [10, 20, 50],
|
|
2566
2606
|
layout: "total, sizes, prev, pager, next",
|
|
2567
2607
|
background: ""
|
|
@@ -2574,152 +2614,195 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
2574
2614
|
_: 1
|
|
2575
2615
|
}, 8, ["locale"]));
|
|
2576
2616
|
}
|
|
2577
|
-
}),
|
|
2617
|
+
}), Tl = /* @__PURE__ */ P(Sl, [["__scopeId", "data-v-6fdc08dc"]]), Fl = { class: "fd-toolbar" }, Ll = { class: "fd-toolbar-left flex-align-center" }, Ml = ["value"], Nl = { class: "fd-device" }, El = {
|
|
2578
2618
|
key: 0,
|
|
2579
2619
|
class: "is-active",
|
|
2580
2620
|
title: "移动端比例(由 URL 参数 templateType 决定)"
|
|
2581
|
-
},
|
|
2621
|
+
}, Pl = {
|
|
2582
2622
|
key: 1,
|
|
2583
2623
|
class: "is-active",
|
|
2584
2624
|
title: "电脑端比例(由 URL 参数 templateType 决定)"
|
|
2585
|
-
},
|
|
2625
|
+
}, Ol = { class: "fd-toolbar-right flex-align-center" }, Ul = ["disabled"], Bl = ["disabled"], Vl = { class: "fd-dialog fd-dialog--preview" }, Al = { class: "fd-dialog-head" }, jl = { class: "fd-preview-width" }, Rl = { class: "fd-dialog-body bg" }, Jl = { class: "fd-dialog" }, zl = { class: "fd-dialog-head" }, Wl = ["value"], Hl = { class: "fd-dialog" }, ql = { class: "fd-dialog-head" }, Gl = { class: "fd-dialog-body" }, Yl = /* @__PURE__ */ E({
|
|
2586
2626
|
__name: "Toolbar",
|
|
2587
2627
|
setup(e) {
|
|
2588
|
-
const n =
|
|
2589
|
-
function
|
|
2590
|
-
const
|
|
2591
|
-
return
|
|
2592
|
-
}
|
|
2593
|
-
const
|
|
2594
|
-
function
|
|
2595
|
-
const
|
|
2596
|
-
|
|
2597
|
-
}
|
|
2598
|
-
|
|
2628
|
+
const n = G(), o = O(!1), s = O(!1), a = O(!1), i = O(!1);
|
|
2629
|
+
function u(D, f, I) {
|
|
2630
|
+
const J = [pe("p", { style: "margin:0" }, f)];
|
|
2631
|
+
return I && J.push(pe("p", { style: "margin:8px 0 0" }, I)), dt.alert(pe("div", J), D, { confirmButtonText: "知道了" });
|
|
2632
|
+
}
|
|
2633
|
+
const r = O(!1), l = O(0);
|
|
2634
|
+
function m() {
|
|
2635
|
+
const D = new URLSearchParams(window.location.search).get("templateType") || "";
|
|
2636
|
+
return D === "mobile" || D === "2";
|
|
2637
|
+
}
|
|
2638
|
+
const p = O(m() ? 375 : 1200);
|
|
2639
|
+
function y() {
|
|
2640
|
+
const D = Number(p.value);
|
|
2641
|
+
p.value = Math.min(1200, Math.max(270, Number.isFinite(D) ? D : 1200));
|
|
2642
|
+
}
|
|
2643
|
+
de(
|
|
2599
2644
|
() => n.device,
|
|
2600
|
-
(
|
|
2601
|
-
|
|
2645
|
+
(D) => {
|
|
2646
|
+
p.value = D === "mobile" ? 375 : 1200;
|
|
2602
2647
|
}
|
|
2603
2648
|
);
|
|
2604
|
-
const
|
|
2605
|
-
function
|
|
2606
|
-
const
|
|
2607
|
-
if (!
|
|
2608
|
-
|
|
2649
|
+
const C = O("");
|
|
2650
|
+
function B() {
|
|
2651
|
+
const D = C.value.trim();
|
|
2652
|
+
if (!D) {
|
|
2653
|
+
z.warning("请先粘贴表单 JSON");
|
|
2609
2654
|
return;
|
|
2610
2655
|
}
|
|
2656
|
+
let f;
|
|
2611
2657
|
try {
|
|
2612
|
-
|
|
2658
|
+
f = JSON.parse(D);
|
|
2613
2659
|
} catch {
|
|
2614
|
-
|
|
2660
|
+
z.error("JSON 解析失败");
|
|
2661
|
+
return;
|
|
2662
|
+
}
|
|
2663
|
+
if (!f || !Array.isArray(f.widgets)) {
|
|
2664
|
+
z.error("JSON 格式不正确:缺少 widgets 数组");
|
|
2615
2665
|
return;
|
|
2616
2666
|
}
|
|
2617
|
-
|
|
2667
|
+
n.importSchema(f), C.value = "", i.value = !1;
|
|
2668
|
+
}
|
|
2669
|
+
const _ = M(
|
|
2670
|
+
() => JSON.stringify(
|
|
2671
|
+
{ formId: n.formId, dbtable: n.dbtable, widgets: n.widgets, events: n.events },
|
|
2672
|
+
null,
|
|
2673
|
+
2
|
|
2674
|
+
)
|
|
2675
|
+
), S = O("");
|
|
2676
|
+
let v;
|
|
2677
|
+
function g(D) {
|
|
2678
|
+
const f = document.createElement("textarea");
|
|
2679
|
+
f.value = D, f.style.position = "fixed", f.style.top = "-9999px", f.style.opacity = "0", document.body.appendChild(f), f.select();
|
|
2680
|
+
let I = !1;
|
|
2681
|
+
try {
|
|
2682
|
+
I = document.execCommand("copy");
|
|
2683
|
+
} catch {
|
|
2684
|
+
I = !1;
|
|
2685
|
+
} finally {
|
|
2686
|
+
document.body.removeChild(f);
|
|
2687
|
+
}
|
|
2688
|
+
return I;
|
|
2618
2689
|
}
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2690
|
+
async function $() {
|
|
2691
|
+
var f;
|
|
2692
|
+
let D = !1;
|
|
2693
|
+
try {
|
|
2694
|
+
(f = navigator.clipboard) != null && f.writeText ? (await navigator.clipboard.writeText(_.value), D = !0) : D = g(_.value);
|
|
2695
|
+
} catch {
|
|
2696
|
+
D = g(_.value);
|
|
2697
|
+
}
|
|
2698
|
+
S.value = D ? "已复制" : "复制失败", window.clearTimeout(v), v = window.setTimeout(() => {
|
|
2699
|
+
S.value = "";
|
|
2700
|
+
}, 1500);
|
|
2701
|
+
}
|
|
2702
|
+
const A = M(() => {
|
|
2703
|
+
const D = {};
|
|
2704
|
+
n.fields.forEach((I) => {
|
|
2705
|
+
D[I.name] = I.name;
|
|
2623
2706
|
});
|
|
2624
|
-
const
|
|
2625
|
-
var
|
|
2626
|
-
|
|
2627
|
-
}),
|
|
2628
|
-
return
|
|
2629
|
-
if (
|
|
2630
|
-
const
|
|
2631
|
-
(
|
|
2632
|
-
H
|
|
2633
|
-
}),
|
|
2634
|
-
}),
|
|
2707
|
+
const f = (I, J) => (I.forEach((H) => {
|
|
2708
|
+
var Te;
|
|
2709
|
+
H.type === "subtable" && J.push(H), (Te = H.children) != null && Te.length && f(H.children, J);
|
|
2710
|
+
}), J);
|
|
2711
|
+
return f(n.widgets, []).forEach((I) => {
|
|
2712
|
+
if (I.type !== "subtable" || !I.secondtable) return;
|
|
2713
|
+
const J = {};
|
|
2714
|
+
(I.colnums ?? []).forEach((H) => {
|
|
2715
|
+
J[H.name] = H.name, H.bindLink && (J[H.bindLink] = H.bindLink);
|
|
2716
|
+
}), D[I.secondtable] = [J];
|
|
2717
|
+
}), D;
|
|
2635
2718
|
});
|
|
2636
|
-
async function
|
|
2719
|
+
async function Y() {
|
|
2637
2720
|
if (!n.workFormId) {
|
|
2638
|
-
|
|
2721
|
+
z.warning("尚未打开表单,无法保存");
|
|
2639
2722
|
return;
|
|
2640
2723
|
}
|
|
2641
2724
|
if (!n.formName.trim()) {
|
|
2642
|
-
|
|
2725
|
+
z.warning("请先填写表单名称(保存必填)");
|
|
2643
2726
|
return;
|
|
2644
2727
|
}
|
|
2645
2728
|
try {
|
|
2646
|
-
const
|
|
2647
|
-
|
|
2648
|
-
工作表单 ID:${n.workFormId}`)) : window.alert(`保存失败:${C.message}`);
|
|
2729
|
+
const D = await n.save();
|
|
2730
|
+
D.success ? (ol(n.formId, n.toSchema()), u("保存成功", D.message, `工作表单 ID:${n.workFormId}`)) : z.error(`保存失败:${D.message}`);
|
|
2649
2731
|
} catch {
|
|
2650
|
-
|
|
2732
|
+
z.error(n.errorMsg || "保存失败");
|
|
2651
2733
|
}
|
|
2652
2734
|
}
|
|
2653
|
-
async function
|
|
2654
|
-
var
|
|
2735
|
+
async function x() {
|
|
2736
|
+
var I, J;
|
|
2655
2737
|
if (!n.workFormId) {
|
|
2656
|
-
|
|
2738
|
+
z.warning("尚未打开表单,无法另存为");
|
|
2657
2739
|
return;
|
|
2658
2740
|
}
|
|
2659
|
-
const
|
|
2660
|
-
if (!
|
|
2661
|
-
const
|
|
2662
|
-
if (
|
|
2741
|
+
const D = (I = window.prompt("新表单名称", `${n.formName || "表单"} 副本`)) == null ? void 0 : I.trim();
|
|
2742
|
+
if (!D) return;
|
|
2743
|
+
const f = (J = window.prompt("新表单编码(如 SG_ZL_YYQHTSP,_M 结尾为移动端模板)", "")) == null ? void 0 : J.trim();
|
|
2744
|
+
if (f)
|
|
2663
2745
|
try {
|
|
2664
|
-
const
|
|
2665
|
-
|
|
2666
|
-
新表单 ID:${z.newFormID}`) : window.alert(`另存为失败:${z.message}`);
|
|
2746
|
+
const H = await n.saveAs(D, f);
|
|
2747
|
+
H.success ? u("另存为成功", H.message, `新表单 ID:${H.newFormID}`) : z.error(`另存为失败:${H.message}`);
|
|
2667
2748
|
} catch {
|
|
2668
|
-
|
|
2749
|
+
z.error(n.errorMsg || "另存为失败");
|
|
2669
2750
|
}
|
|
2670
2751
|
}
|
|
2671
|
-
function
|
|
2752
|
+
function b() {
|
|
2672
2753
|
location.reload();
|
|
2673
2754
|
}
|
|
2674
|
-
async function
|
|
2755
|
+
async function w() {
|
|
2675
2756
|
if (!n.workFormId) {
|
|
2676
|
-
|
|
2757
|
+
z.warning("尚未打开表单,无法发布");
|
|
2677
2758
|
return;
|
|
2678
2759
|
}
|
|
2679
2760
|
if (!n.formName.trim()) {
|
|
2680
|
-
|
|
2761
|
+
z.warning("请先填写表单名称(发布必填)");
|
|
2681
2762
|
return;
|
|
2682
2763
|
}
|
|
2683
2764
|
try {
|
|
2684
|
-
const { needConfirm:
|
|
2685
|
-
if (
|
|
2686
|
-
|
|
2765
|
+
const { needConfirm: D, count: f } = await n.checkPublish();
|
|
2766
|
+
if (D) {
|
|
2767
|
+
l.value = f, r.value = !0;
|
|
2687
2768
|
return;
|
|
2688
2769
|
}
|
|
2689
|
-
await
|
|
2770
|
+
await W();
|
|
2690
2771
|
} catch {
|
|
2691
|
-
|
|
2772
|
+
z.error(n.errorMsg || "发布检查失败");
|
|
2692
2773
|
}
|
|
2693
2774
|
}
|
|
2694
|
-
async function
|
|
2775
|
+
async function W() {
|
|
2695
2776
|
try {
|
|
2696
|
-
const
|
|
2697
|
-
|
|
2777
|
+
const D = await n.publish();
|
|
2778
|
+
D.success ? z.success(D.message) : z.error(`发布失败:${D.message}`);
|
|
2698
2779
|
} catch {
|
|
2699
|
-
|
|
2780
|
+
z.error(n.errorMsg || "发布失败");
|
|
2700
2781
|
}
|
|
2701
2782
|
}
|
|
2702
|
-
async function
|
|
2703
|
-
|
|
2783
|
+
async function se() {
|
|
2784
|
+
r.value = !1, await W();
|
|
2704
2785
|
}
|
|
2705
|
-
const
|
|
2706
|
-
function
|
|
2707
|
-
var
|
|
2786
|
+
const Ie = O(null), De = O(null);
|
|
2787
|
+
function Se(D) {
|
|
2788
|
+
var I, J;
|
|
2708
2789
|
if (!a.value) return;
|
|
2709
|
-
const
|
|
2710
|
-
(
|
|
2790
|
+
const f = D.target;
|
|
2791
|
+
(I = Ie.value) != null && I.contains(f) || (J = De.value) != null && J.contains(f) || (a.value = !1);
|
|
2711
2792
|
}
|
|
2712
|
-
return
|
|
2713
|
-
|
|
2714
|
-
|
|
2793
|
+
return ce(() => document.addEventListener("click", Se)), Ye(() => {
|
|
2794
|
+
document.removeEventListener("click", Se), window.clearTimeout(v);
|
|
2795
|
+
}), (D, f) => (d(), c("div", Fl, [
|
|
2796
|
+
t("div", Ll, [
|
|
2797
|
+
f[18] || (f[18] = t("span", { class: "fd-toolbar-title" }, "表单设计器", -1)),
|
|
2715
2798
|
t("input", {
|
|
2716
2799
|
class: "fd-toolbar-name",
|
|
2717
2800
|
value: h(n).formName,
|
|
2718
2801
|
placeholder: "表单名称(保存必填)",
|
|
2719
|
-
onInput:
|
|
2720
|
-
}, null, 40,
|
|
2721
|
-
t("div",
|
|
2722
|
-
h(n).device === "mobile" ? (d(), c("button",
|
|
2802
|
+
onInput: f[0] || (f[0] = (I) => h(n).formName = I.target.value)
|
|
2803
|
+
}, null, 40, Ml),
|
|
2804
|
+
t("div", Nl, [
|
|
2805
|
+
h(n).device === "mobile" ? (d(), c("button", El, [...f[16] || (f[16] = [
|
|
2723
2806
|
t("svg", {
|
|
2724
2807
|
class: "fd-tool-btn-icon",
|
|
2725
2808
|
viewBox: "0 0 24 24",
|
|
@@ -2744,7 +2827,7 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
2744
2827
|
})
|
|
2745
2828
|
], -1),
|
|
2746
2829
|
U(" 移动端 ", -1)
|
|
2747
|
-
])])) : (d(), c("button",
|
|
2830
|
+
])])) : (d(), c("button", Pl, [...f[17] || (f[17] = [
|
|
2748
2831
|
t("svg", {
|
|
2749
2832
|
class: "fd-tool-btn-icon",
|
|
2750
2833
|
viewBox: "0 0 24 24",
|
|
@@ -2778,11 +2861,11 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
2778
2861
|
])]))
|
|
2779
2862
|
])
|
|
2780
2863
|
]),
|
|
2781
|
-
t("div",
|
|
2864
|
+
t("div", Ol, [
|
|
2782
2865
|
t("button", {
|
|
2783
2866
|
class: "fd-tool-btn",
|
|
2784
|
-
onClick:
|
|
2785
|
-
}, [...
|
|
2867
|
+
onClick: f[1] || (f[1] = (I) => o.value = !0)
|
|
2868
|
+
}, [...f[19] || (f[19] = [
|
|
2786
2869
|
t("svg", {
|
|
2787
2870
|
class: "fd-tool-btn-icon",
|
|
2788
2871
|
viewBox: "0 0 24 24",
|
|
@@ -2803,8 +2886,8 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
2803
2886
|
])]),
|
|
2804
2887
|
t("button", {
|
|
2805
2888
|
class: "fd-tool-btn",
|
|
2806
|
-
onClick:
|
|
2807
|
-
}, [...
|
|
2889
|
+
onClick: f[2] || (f[2] = (I) => s.value = !0)
|
|
2890
|
+
}, [...f[20] || (f[20] = [
|
|
2808
2891
|
t("svg", {
|
|
2809
2892
|
class: "fd-tool-btn-icon",
|
|
2810
2893
|
viewBox: "0 0 24 24",
|
|
@@ -2821,8 +2904,8 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
2821
2904
|
])]),
|
|
2822
2905
|
t("button", {
|
|
2823
2906
|
class: "fd-tool-btn",
|
|
2824
|
-
onClick:
|
|
2825
|
-
}, [...
|
|
2907
|
+
onClick: f[3] || (f[3] = (I) => i.value = !0)
|
|
2908
|
+
}, [...f[21] || (f[21] = [
|
|
2826
2909
|
t("svg", {
|
|
2827
2910
|
class: "fd-tool-btn-icon",
|
|
2828
2911
|
viewBox: "0 0 24 24",
|
|
@@ -2845,8 +2928,8 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
2845
2928
|
])]),
|
|
2846
2929
|
t("button", {
|
|
2847
2930
|
class: "fd-tool-btn",
|
|
2848
|
-
onClick:
|
|
2849
|
-
}, [...
|
|
2931
|
+
onClick: b
|
|
2932
|
+
}, [...f[22] || (f[22] = [
|
|
2850
2933
|
t("svg", {
|
|
2851
2934
|
class: "fd-tool-btn-icon",
|
|
2852
2935
|
viewBox: "0 0 24 24",
|
|
@@ -2863,8 +2946,8 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
2863
2946
|
])]),
|
|
2864
2947
|
t("button", {
|
|
2865
2948
|
class: "fd-tool-btn",
|
|
2866
|
-
onClick:
|
|
2867
|
-
}, [...
|
|
2949
|
+
onClick: Y
|
|
2950
|
+
}, [...f[23] || (f[23] = [
|
|
2868
2951
|
t("svg", {
|
|
2869
2952
|
class: "fd-tool-btn-icon",
|
|
2870
2953
|
viewBox: "0 0 24 24",
|
|
@@ -2882,8 +2965,8 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
2882
2965
|
])]),
|
|
2883
2966
|
t("button", {
|
|
2884
2967
|
class: "fd-tool-btn",
|
|
2885
|
-
onClick:
|
|
2886
|
-
}, [...
|
|
2968
|
+
onClick: x
|
|
2969
|
+
}, [...f[24] || (f[24] = [
|
|
2887
2970
|
t("svg", {
|
|
2888
2971
|
class: "fd-tool-btn-icon",
|
|
2889
2972
|
viewBox: "0 0 24 24",
|
|
@@ -2906,8 +2989,8 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
2906
2989
|
])]),
|
|
2907
2990
|
t("button", {
|
|
2908
2991
|
class: "fd-tool-btn fd-tool-btn--primary",
|
|
2909
|
-
onClick:
|
|
2910
|
-
}, [...
|
|
2992
|
+
onClick: w
|
|
2993
|
+
}, [...f[25] || (f[25] = [
|
|
2911
2994
|
t("svg", {
|
|
2912
2995
|
class: "fd-tool-btn-icon",
|
|
2913
2996
|
viewBox: "0 0 24 24",
|
|
@@ -2927,13 +3010,13 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
2927
3010
|
], -1),
|
|
2928
3011
|
U(" 发布 ", -1)
|
|
2929
3012
|
])]),
|
|
2930
|
-
|
|
3013
|
+
f[29] || (f[29] = t("span", { class: "fd-toolbar-divider" }, null, -1)),
|
|
2931
3014
|
t("button", {
|
|
2932
3015
|
class: "fd-tool-btn fd-tool-icon-btn",
|
|
2933
3016
|
disabled: !h(n).canUndo,
|
|
2934
3017
|
title: "撤销",
|
|
2935
|
-
onClick:
|
|
2936
|
-
}, [...
|
|
3018
|
+
onClick: f[4] || (f[4] = (I) => h(n).undo())
|
|
3019
|
+
}, [...f[26] || (f[26] = [
|
|
2937
3020
|
t("svg", {
|
|
2938
3021
|
class: "fd-tool-icon",
|
|
2939
3022
|
viewBox: "0 0 24 24",
|
|
@@ -2946,13 +3029,13 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
2946
3029
|
t("polyline", { points: "9 14 4 9 9 4" }),
|
|
2947
3030
|
t("path", { d: "M20 20v-7a4 4 0 0 0-4-4H4" })
|
|
2948
3031
|
], -1)
|
|
2949
|
-
])], 8,
|
|
3032
|
+
])], 8, Ul),
|
|
2950
3033
|
t("button", {
|
|
2951
3034
|
class: "fd-tool-btn fd-tool-icon-btn",
|
|
2952
3035
|
disabled: !h(n).canRedo,
|
|
2953
3036
|
title: "重做",
|
|
2954
|
-
onClick:
|
|
2955
|
-
}, [...
|
|
3037
|
+
onClick: f[5] || (f[5] = (I) => h(n).redo())
|
|
3038
|
+
}, [...f[27] || (f[27] = [
|
|
2956
3039
|
t("svg", {
|
|
2957
3040
|
class: "fd-tool-icon",
|
|
2958
3041
|
viewBox: "0 0 24 24",
|
|
@@ -2965,124 +3048,153 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
2965
3048
|
t("polyline", { points: "15 14 20 9 15 4" }),
|
|
2966
3049
|
t("path", { d: "M4 20v-7a4 4 0 0 1 4-4h12" })
|
|
2967
3050
|
], -1)
|
|
2968
|
-
])], 8,
|
|
3051
|
+
])], 8, Bl),
|
|
2969
3052
|
t("button", {
|
|
2970
3053
|
ref_key: "treeBtnRef",
|
|
2971
|
-
ref:
|
|
3054
|
+
ref: De,
|
|
2972
3055
|
class: "fd-tool-btn",
|
|
2973
|
-
onClick:
|
|
2974
|
-
}, [...
|
|
2975
|
-
|
|
3056
|
+
onClick: f[6] || (f[6] = (I) => a.value = !a.value)
|
|
3057
|
+
}, [...f[28] || (f[28] = [
|
|
3058
|
+
we('<svg class="fd-tool-btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" data-v-da21485c><line x1="8" y1="6" x2="21" y2="6" data-v-da21485c></line><line x1="8" y1="12" x2="21" y2="12" data-v-da21485c></line><line x1="8" y1="18" x2="21" y2="18" data-v-da21485c></line><line x1="3" y1="6" x2="3.01" y2="6" data-v-da21485c></line><line x1="3" y1="12" x2="3.01" y2="12" data-v-da21485c></line><line x1="3" y1="18" x2="3.01" y2="18" data-v-da21485c></line></svg> 组件树 ', 2)
|
|
2976
3059
|
])], 512)
|
|
2977
3060
|
]),
|
|
2978
|
-
(d(), V(
|
|
3061
|
+
(d(), V(ke, { to: "body" }, [
|
|
2979
3062
|
o.value ? (d(), c("div", {
|
|
2980
3063
|
key: 0,
|
|
2981
3064
|
class: "fd-dialog-mask",
|
|
2982
|
-
onClick:
|
|
3065
|
+
onClick: f[9] || (f[9] = q((I) => o.value = !1, ["self"]))
|
|
2983
3066
|
}, [
|
|
2984
|
-
t("div",
|
|
2985
|
-
t("div",
|
|
2986
|
-
|
|
2987
|
-
t("div",
|
|
2988
|
-
|
|
2989
|
-
|
|
3067
|
+
t("div", Vl, [
|
|
3068
|
+
t("div", Al, [
|
|
3069
|
+
f[32] || (f[32] = t("span", null, "预览", -1)),
|
|
3070
|
+
t("div", jl, [
|
|
3071
|
+
f[30] || (f[30] = t("label", { for: "fd-preview-width-input" }, "宽度", -1)),
|
|
3072
|
+
L(h(it), {
|
|
2990
3073
|
id: "fd-preview-width-input",
|
|
2991
|
-
modelValue:
|
|
2992
|
-
"onUpdate:modelValue":
|
|
3074
|
+
modelValue: p.value,
|
|
3075
|
+
"onUpdate:modelValue": f[7] || (f[7] = (I) => p.value = I),
|
|
2993
3076
|
min: 270,
|
|
2994
3077
|
max: 1200,
|
|
2995
3078
|
step: 10,
|
|
2996
3079
|
size: "small",
|
|
2997
3080
|
"controls-position": "right",
|
|
2998
|
-
onChange:
|
|
3081
|
+
onChange: y
|
|
2999
3082
|
}, null, 8, ["modelValue"]),
|
|
3000
|
-
|
|
3083
|
+
f[31] || (f[31] = t("span", { class: "fd-preview-width-unit" }, "px", -1))
|
|
3001
3084
|
]),
|
|
3002
3085
|
t("button", {
|
|
3003
3086
|
class: "fd-tool-btn",
|
|
3004
|
-
onClick:
|
|
3087
|
+
onClick: f[8] || (f[8] = (I) => o.value = !1)
|
|
3005
3088
|
}, "关闭")
|
|
3006
3089
|
]),
|
|
3007
|
-
t("div",
|
|
3090
|
+
t("div", Rl, [
|
|
3008
3091
|
t("div", {
|
|
3009
3092
|
class: "fd-preview-stage",
|
|
3010
|
-
style:
|
|
3093
|
+
style: K({ width: p.value + "px" })
|
|
3011
3094
|
}, [
|
|
3012
|
-
|
|
3095
|
+
L(We, {
|
|
3013
3096
|
widgets: h(n).widgets,
|
|
3014
|
-
"form-data":
|
|
3097
|
+
"form-data": A.value
|
|
3015
3098
|
}, null, 8, ["widgets", "form-data"])
|
|
3016
3099
|
], 4)
|
|
3017
3100
|
])
|
|
3018
3101
|
])
|
|
3019
|
-
])) :
|
|
3102
|
+
])) : T("", !0),
|
|
3020
3103
|
s.value ? (d(), c("div", {
|
|
3021
3104
|
key: 1,
|
|
3022
3105
|
class: "fd-dialog-mask",
|
|
3023
|
-
onClick:
|
|
3106
|
+
onClick: f[11] || (f[11] = q((I) => s.value = !1, ["self"]))
|
|
3024
3107
|
}, [
|
|
3025
|
-
t("div",
|
|
3026
|
-
t("div",
|
|
3027
|
-
|
|
3108
|
+
t("div", Jl, [
|
|
3109
|
+
t("div", zl, [
|
|
3110
|
+
f[34] || (f[34] = t("span", null, "JSON Schema", -1)),
|
|
3111
|
+
t("button", {
|
|
3112
|
+
class: "fd-tool-btn",
|
|
3113
|
+
onClick: $
|
|
3114
|
+
}, [
|
|
3115
|
+
f[33] || (f[33] = t("svg", {
|
|
3116
|
+
class: "fd-tool-btn-icon",
|
|
3117
|
+
viewBox: "0 0 24 24",
|
|
3118
|
+
fill: "none",
|
|
3119
|
+
stroke: "currentColor",
|
|
3120
|
+
"stroke-width": "1.8",
|
|
3121
|
+
"stroke-linecap": "round",
|
|
3122
|
+
"stroke-linejoin": "round"
|
|
3123
|
+
}, [
|
|
3124
|
+
t("rect", {
|
|
3125
|
+
x: "9",
|
|
3126
|
+
y: "9",
|
|
3127
|
+
width: "13",
|
|
3128
|
+
height: "13",
|
|
3129
|
+
rx: "2",
|
|
3130
|
+
ry: "2"
|
|
3131
|
+
}),
|
|
3132
|
+
t("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
3133
|
+
], -1)),
|
|
3134
|
+
U(" " + k(S.value || "复制JSON"), 1)
|
|
3135
|
+
]),
|
|
3028
3136
|
t("button", {
|
|
3029
3137
|
class: "fd-tool-btn",
|
|
3030
|
-
onClick:
|
|
3138
|
+
onClick: f[10] || (f[10] = (I) => s.value = !1)
|
|
3031
3139
|
}, "关闭")
|
|
3032
3140
|
]),
|
|
3033
|
-
t("
|
|
3141
|
+
t("textarea", {
|
|
3142
|
+
class: "fd-dialog-code",
|
|
3143
|
+
value: _.value,
|
|
3144
|
+
readonly: ""
|
|
3145
|
+
}, null, 8, Wl)
|
|
3034
3146
|
])
|
|
3035
|
-
])) :
|
|
3147
|
+
])) : T("", !0),
|
|
3036
3148
|
i.value ? (d(), c("div", {
|
|
3037
3149
|
key: 2,
|
|
3038
3150
|
class: "fd-dialog-mask",
|
|
3039
|
-
onClick:
|
|
3151
|
+
onClick: f[14] || (f[14] = q((I) => i.value = !1, ["self"]))
|
|
3040
3152
|
}, [
|
|
3041
|
-
t("div",
|
|
3042
|
-
t("div",
|
|
3043
|
-
|
|
3153
|
+
t("div", Hl, [
|
|
3154
|
+
t("div", ql, [
|
|
3155
|
+
f[35] || (f[35] = t("span", null, "导入(粘贴 JSON)", -1)),
|
|
3044
3156
|
t("button", {
|
|
3045
3157
|
class: "fd-tool-btn",
|
|
3046
|
-
onClick:
|
|
3158
|
+
onClick: f[12] || (f[12] = (I) => i.value = !1)
|
|
3047
3159
|
}, "取消"),
|
|
3048
3160
|
t("button", {
|
|
3049
3161
|
class: "fd-tool-btn fd-tool-btn--primary",
|
|
3050
|
-
onClick:
|
|
3162
|
+
onClick: B
|
|
3051
3163
|
}, "确认")
|
|
3052
3164
|
]),
|
|
3053
|
-
t("div",
|
|
3054
|
-
|
|
3055
|
-
"onUpdate:modelValue":
|
|
3165
|
+
t("div", Gl, [
|
|
3166
|
+
fe(t("textarea", {
|
|
3167
|
+
"onUpdate:modelValue": f[13] || (f[13] = (I) => C.value = I),
|
|
3056
3168
|
class: "fd-dialog-import-text",
|
|
3057
|
-
placeholder: "请粘贴表单 JSON
|
|
3169
|
+
placeholder: "请粘贴表单 JSON(可从「查看代码」复制),确认后仅覆盖表单结构,保留业务对象"
|
|
3058
3170
|
}, null, 512), [
|
|
3059
|
-
[
|
|
3171
|
+
[Ke, C.value]
|
|
3060
3172
|
])
|
|
3061
3173
|
])
|
|
3062
3174
|
])
|
|
3063
|
-
])) :
|
|
3175
|
+
])) : T("", !0),
|
|
3064
3176
|
a.value ? (d(), c("div", {
|
|
3065
3177
|
key: 3,
|
|
3066
3178
|
ref_key: "treeDrawerRef",
|
|
3067
|
-
ref:
|
|
3179
|
+
ref: Ie,
|
|
3068
3180
|
class: "fd-tree-drawer"
|
|
3069
3181
|
}, [
|
|
3070
|
-
|
|
3071
|
-
], 512)) :
|
|
3072
|
-
|
|
3073
|
-
modelValue:
|
|
3074
|
-
"onUpdate:modelValue":
|
|
3182
|
+
L(vl)
|
|
3183
|
+
], 512)) : T("", !0),
|
|
3184
|
+
L(Tl, {
|
|
3185
|
+
modelValue: r.value,
|
|
3186
|
+
"onUpdate:modelValue": f[15] || (f[15] = (I) => r.value = I),
|
|
3075
3187
|
"form-id": h(n).originFormId,
|
|
3076
|
-
count:
|
|
3077
|
-
onConfirm:
|
|
3188
|
+
count: l.value,
|
|
3189
|
+
onConfirm: se
|
|
3078
3190
|
}, null, 8, ["modelValue", "form-id", "count"])
|
|
3079
3191
|
]))
|
|
3080
3192
|
]));
|
|
3081
3193
|
}
|
|
3082
|
-
}),
|
|
3194
|
+
}), Kl = /* @__PURE__ */ P(Yl, [["__scopeId", "data-v-da21485c"]]), Ql = { class: "fd-palette" }, Xl = { class: "fd-palette-group-title" }, Zl = ["onDragstart", "onClick"], ea = { class: "fd-palette-icon" }, ta = /* @__PURE__ */ E({
|
|
3083
3195
|
__name: "WidgetPalette",
|
|
3084
3196
|
setup(e) {
|
|
3085
|
-
const n =
|
|
3197
|
+
const n = G(), o = ut(), s = [
|
|
3086
3198
|
{
|
|
3087
3199
|
title: "基础控件",
|
|
3088
3200
|
types: ["label", "text"]
|
|
@@ -3104,55 +3216,55 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
3104
3216
|
subtable: "☰"
|
|
3105
3217
|
};
|
|
3106
3218
|
function i(l) {
|
|
3107
|
-
return o.find((
|
|
3219
|
+
return o.find((m) => m.type === l);
|
|
3108
3220
|
}
|
|
3109
|
-
function u(l,
|
|
3110
|
-
var
|
|
3111
|
-
(
|
|
3221
|
+
function u(l, m) {
|
|
3222
|
+
var p;
|
|
3223
|
+
(p = l.dataTransfer) == null || p.setData("application/x-fd-new", m), l.dataTransfer && (l.dataTransfer.effectAllowed = "copy");
|
|
3112
3224
|
}
|
|
3113
3225
|
function r(l) {
|
|
3114
3226
|
n.addWidget(l);
|
|
3115
3227
|
}
|
|
3116
|
-
return (l,
|
|
3117
|
-
|
|
3118
|
-
(d(), c(
|
|
3119
|
-
key:
|
|
3228
|
+
return (l, m) => (d(), c("div", Ql, [
|
|
3229
|
+
m[0] || (m[0] = t("div", { class: "fd-palette-title" }, "控件库", -1)),
|
|
3230
|
+
(d(), c(F, null, N(s, (p) => t("div", {
|
|
3231
|
+
key: p.title,
|
|
3120
3232
|
class: "fd-palette-group"
|
|
3121
3233
|
}, [
|
|
3122
|
-
t("div",
|
|
3123
|
-
(d(!0), c(
|
|
3124
|
-
i(
|
|
3234
|
+
t("div", Xl, k(p.title), 1),
|
|
3235
|
+
(d(!0), c(F, null, N(p.types, (y) => (d(), c(F, { key: y }, [
|
|
3236
|
+
i(y) ? (d(), c("div", {
|
|
3125
3237
|
key: 0,
|
|
3126
3238
|
class: "fd-palette-item",
|
|
3127
3239
|
draggable: "true",
|
|
3128
|
-
onDragstart: (
|
|
3129
|
-
onClick: (
|
|
3240
|
+
onDragstart: (C) => u(C, y),
|
|
3241
|
+
onClick: (C) => r(y)
|
|
3130
3242
|
}, [
|
|
3131
|
-
t("span",
|
|
3132
|
-
t("span", null,
|
|
3133
|
-
], 40,
|
|
3243
|
+
t("span", ea, k(a[y]), 1),
|
|
3244
|
+
t("span", null, k(i(y).title), 1)
|
|
3245
|
+
], 40, Zl)) : T("", !0)
|
|
3134
3246
|
], 64))), 128))
|
|
3135
3247
|
])), 64))
|
|
3136
3248
|
]));
|
|
3137
3249
|
}
|
|
3138
|
-
}),
|
|
3250
|
+
}), na = /* @__PURE__ */ P(ta, [["__scopeId", "data-v-6a2bab90"]]), oa = [
|
|
3139
3251
|
{ key: "onLoad", label: "加载完成", desc: "表单数据就绪后触发" },
|
|
3140
3252
|
{ key: "onMounted", label: "渲染挂载", desc: "渲染完成并挂载到 DOM 后触发" },
|
|
3141
3253
|
{ key: "onValueChange", label: "值变化", desc: "任意字段值变化时触发" },
|
|
3142
3254
|
{ key: "custom", label: "自定义方法", desc: "写入的方法将挂载至全局 window,可在其他事件处理中调用" }
|
|
3143
|
-
],
|
|
3255
|
+
], sa = { class: "fd-form-events" }, la = { class: "fd-form-meta" }, aa = { class: "fd-events-section" }, ia = { class: "fd-event-head" }, da = ["title"], ra = { class: "fd-event-key" }, ua = ["onClick", "title"], ca = {
|
|
3144
3256
|
key: 0,
|
|
3145
3257
|
class: "fd-event-trigger-text"
|
|
3146
|
-
},
|
|
3258
|
+
}, fa = {
|
|
3147
3259
|
key: 1,
|
|
3148
3260
|
class: "fd-event-trigger-placeholder"
|
|
3149
|
-
},
|
|
3261
|
+
}, ma = {
|
|
3150
3262
|
class: "fd-dialog",
|
|
3151
3263
|
style: { "max-width": "600px" }
|
|
3152
|
-
},
|
|
3264
|
+
}, pa = { class: "fd-dialog-head" }, va = { class: "fd-dialog-body" }, ba = /* @__PURE__ */ E({
|
|
3153
3265
|
__name: "FormEventsPanel",
|
|
3154
3266
|
setup(e) {
|
|
3155
|
-
const n =
|
|
3267
|
+
const n = Qe(() => import("./CodeEditor-LYxKHZlN.js")), o = G(), s = Pe({
|
|
3156
3268
|
open: !1,
|
|
3157
3269
|
type: "",
|
|
3158
3270
|
hookKey: "",
|
|
@@ -3169,54 +3281,54 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
3169
3281
|
function u() {
|
|
3170
3282
|
s.open = !1;
|
|
3171
3283
|
}
|
|
3172
|
-
return (r, l) => (d(), c("div",
|
|
3284
|
+
return (r, l) => (d(), c("div", sa, [
|
|
3173
3285
|
l[4] || (l[4] = t("div", { class: "fd-property-title" }, "表单属性", -1)),
|
|
3174
|
-
t("div",
|
|
3175
|
-
t("span", null, "表单:" +
|
|
3176
|
-
t("span", null, "主表:" +
|
|
3286
|
+
t("div", la, [
|
|
3287
|
+
t("span", null, "表单:" + k(h(o).formId), 1),
|
|
3288
|
+
t("span", null, "主表:" + k(h(o).dbtable), 1)
|
|
3177
3289
|
]),
|
|
3178
|
-
t("section",
|
|
3290
|
+
t("section", aa, [
|
|
3179
3291
|
l[2] || (l[2] = t("h4", { class: "fd-events-h" }, "全局事件 · 生命周期", -1)),
|
|
3180
3292
|
l[3] || (l[3] = t("p", { class: "fd-events-tip" }, "渲染时绑定至对应钩子函数中执行", -1)),
|
|
3181
|
-
(d(!0), c(
|
|
3182
|
-
key:
|
|
3293
|
+
(d(!0), c(F, null, N(h(oa), (m) => (d(), c("div", {
|
|
3294
|
+
key: m.key,
|
|
3183
3295
|
class: "fd-event-row"
|
|
3184
3296
|
}, [
|
|
3185
|
-
t("div",
|
|
3297
|
+
t("div", ia, [
|
|
3186
3298
|
t("label", {
|
|
3187
|
-
title:
|
|
3188
|
-
},
|
|
3189
|
-
t("code",
|
|
3299
|
+
title: m.desc
|
|
3300
|
+
}, k(m.label), 9, da),
|
|
3301
|
+
t("code", ra, k(m.key), 1)
|
|
3190
3302
|
]),
|
|
3191
3303
|
t("div", {
|
|
3192
3304
|
class: "fd-event-trigger",
|
|
3193
|
-
onClick: (
|
|
3194
|
-
title: h(o).events.lifecycle[
|
|
3305
|
+
onClick: (p) => a(m),
|
|
3306
|
+
title: h(o).events.lifecycle[m.key] || "点击编写处理函数"
|
|
3195
3307
|
}, [
|
|
3196
|
-
h(o).events.lifecycle[
|
|
3308
|
+
h(o).events.lifecycle[m.key] ? (d(), c("span", ca, k(h(o).events.lifecycle[m.key]), 1)) : (d(), c("span", fa, "点击编写")),
|
|
3197
3309
|
l[1] || (l[1] = t("span", { class: "fd-event-trigger-arrow" }, "›", -1))
|
|
3198
|
-
], 8,
|
|
3310
|
+
], 8, ua)
|
|
3199
3311
|
]))), 128))
|
|
3200
3312
|
]),
|
|
3201
|
-
(d(), V(
|
|
3313
|
+
(d(), V(ke, { to: "body" }, [
|
|
3202
3314
|
s.open ? (d(), c("div", {
|
|
3203
3315
|
key: 0,
|
|
3204
3316
|
class: "fd-dialog-mask",
|
|
3205
|
-
onClick:
|
|
3317
|
+
onClick: q(u, ["self"])
|
|
3206
3318
|
}, [
|
|
3207
|
-
t("div",
|
|
3208
|
-
t("div",
|
|
3209
|
-
t("span", null, "编写处理函数 - " +
|
|
3319
|
+
t("div", ma, [
|
|
3320
|
+
t("div", pa, [
|
|
3321
|
+
t("span", null, "编写处理函数 - " + k(s.title), 1),
|
|
3210
3322
|
t("button", {
|
|
3211
3323
|
class: "fd-dialog-close",
|
|
3212
3324
|
onClick: u,
|
|
3213
3325
|
title: "关闭"
|
|
3214
3326
|
}, "×")
|
|
3215
3327
|
]),
|
|
3216
|
-
t("div",
|
|
3217
|
-
|
|
3328
|
+
t("div", va, [
|
|
3329
|
+
L(h(n), {
|
|
3218
3330
|
modelValue: s.draft,
|
|
3219
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
3331
|
+
"onUpdate:modelValue": l[0] || (l[0] = (m) => s.draft = m),
|
|
3220
3332
|
language: "javascript"
|
|
3221
3333
|
}, null, 8, ["modelValue"])
|
|
3222
3334
|
]),
|
|
@@ -3227,20 +3339,20 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
3227
3339
|
}, "确定")
|
|
3228
3340
|
])
|
|
3229
3341
|
])
|
|
3230
|
-
])) :
|
|
3342
|
+
])) : T("", !0)
|
|
3231
3343
|
]))
|
|
3232
3344
|
]));
|
|
3233
3345
|
}
|
|
3234
|
-
}),
|
|
3346
|
+
}), ga = /* @__PURE__ */ P(ba, [["__scopeId", "data-v-7e5a3f15"]]), ha = { class: "fd-property" }, ya = {
|
|
3235
3347
|
key: 1,
|
|
3236
3348
|
class: "fd-property-empty"
|
|
3237
|
-
},
|
|
3349
|
+
}, ka = {
|
|
3238
3350
|
key: 1,
|
|
3239
3351
|
class: "fd-property-item"
|
|
3240
|
-
},
|
|
3352
|
+
}, wa = ["value"], $a = { class: "fd-property-foot" }, xa = { class: "fd-property-type" }, Ca = /* @__PURE__ */ E({
|
|
3241
3353
|
__name: "PropertyPanel",
|
|
3242
3354
|
setup(e) {
|
|
3243
|
-
const n =
|
|
3355
|
+
const n = G(), o = M(() => n.selectedNode), s = M(() => o.value ? X(o.value.type) : void 0), a = M(() => {
|
|
3244
3356
|
var l;
|
|
3245
3357
|
return (l = s.value) == null ? void 0 : l.panel;
|
|
3246
3358
|
});
|
|
@@ -3250,34 +3362,34 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
3250
3362
|
const u = M(() => o.value != null && o.value.gridSpan != null);
|
|
3251
3363
|
function r(l) {
|
|
3252
3364
|
if (!o.value) return;
|
|
3253
|
-
const
|
|
3254
|
-
n.updateNode(o.value.id, { gridSpan:
|
|
3255
|
-
}
|
|
3256
|
-
return (l,
|
|
3257
|
-
var
|
|
3258
|
-
return d(), c("div",
|
|
3259
|
-
|
|
3260
|
-
h(n).selectedForm ? (d(), V(
|
|
3261
|
-
a.value ? (d(), V(
|
|
3365
|
+
const m = Number(l.target.value), p = Math.min(24, Math.max(1, Number.isFinite(m) ? Math.round(m) : 24));
|
|
3366
|
+
n.updateNode(o.value.id, { gridSpan: p });
|
|
3367
|
+
}
|
|
3368
|
+
return (l, m) => {
|
|
3369
|
+
var p;
|
|
3370
|
+
return d(), c("div", ha, [
|
|
3371
|
+
m[2] || (m[2] = t("div", { class: "fd-property-title" }, "属性", -1)),
|
|
3372
|
+
h(n).selectedForm ? (d(), V(ga, { key: 0 })) : o.value ? (d(), c(F, { key: 2 }, [
|
|
3373
|
+
a.value ? (d(), V(he(a.value), {
|
|
3262
3374
|
key: 0,
|
|
3263
3375
|
node: o.value,
|
|
3264
3376
|
fields: h(n).fields,
|
|
3265
3377
|
onUpdate: i
|
|
3266
|
-
}, null, 40, ["node", "fields"])) :
|
|
3267
|
-
u.value ? (d(), c("div",
|
|
3268
|
-
|
|
3378
|
+
}, null, 40, ["node", "fields"])) : T("", !0),
|
|
3379
|
+
u.value ? (d(), c("div", ka, [
|
|
3380
|
+
m[1] || (m[1] = t("label", null, "占比", -1)),
|
|
3269
3381
|
t("input", {
|
|
3270
3382
|
type: "number",
|
|
3271
3383
|
min: "1",
|
|
3272
3384
|
max: "24",
|
|
3273
3385
|
value: o.value.gridSpan,
|
|
3274
3386
|
onChange: r
|
|
3275
|
-
}, null, 40,
|
|
3276
|
-
])) :
|
|
3277
|
-
t("div",
|
|
3278
|
-
t("span",
|
|
3387
|
+
}, null, 40, wa)
|
|
3388
|
+
])) : T("", !0),
|
|
3389
|
+
t("div", $a, [
|
|
3390
|
+
t("span", xa, "类型:" + k((p = s.value) == null ? void 0 : p.title), 1)
|
|
3279
3391
|
])
|
|
3280
|
-
], 64)) : (d(), c("div",
|
|
3392
|
+
], 64)) : (d(), c("div", ya, [...m[0] || (m[0] = [
|
|
3281
3393
|
t("span", { class: "fd-property-empty-icon" }, "⚙", -1),
|
|
3282
3394
|
t("span", null, [
|
|
3283
3395
|
U("请选择左侧控件"),
|
|
@@ -3288,10 +3400,10 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
3288
3400
|
]);
|
|
3289
3401
|
};
|
|
3290
3402
|
}
|
|
3291
|
-
}),
|
|
3403
|
+
}), _a = /* @__PURE__ */ P(Ca, [["__scopeId", "data-v-e89617c7"]]), Ia = {
|
|
3292
3404
|
key: 0,
|
|
3293
3405
|
class: "fd-canvas-dropzone"
|
|
3294
|
-
},
|
|
3406
|
+
}, Da = /* @__PURE__ */ E({
|
|
3295
3407
|
__name: "CanvasNode",
|
|
3296
3408
|
props: {
|
|
3297
3409
|
node: {},
|
|
@@ -3299,69 +3411,69 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
3299
3411
|
index: {}
|
|
3300
3412
|
},
|
|
3301
3413
|
setup(e) {
|
|
3302
|
-
const n = e, o =
|
|
3303
|
-
const
|
|
3304
|
-
return n.node.gridSpan != null && (
|
|
3414
|
+
const n = e, o = G(), s = O(null), a = M(() => {
|
|
3415
|
+
const v = {};
|
|
3416
|
+
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;
|
|
3305
3417
|
}), i = () => {
|
|
3306
|
-
var
|
|
3307
|
-
return (
|
|
3418
|
+
var v;
|
|
3419
|
+
return (v = X(n.node.type)) == null ? void 0 : v.isContainer;
|
|
3308
3420
|
};
|
|
3309
|
-
function u(
|
|
3421
|
+
function u(v, g) {
|
|
3310
3422
|
if (n.node.type !== "grid") return "";
|
|
3311
3423
|
const $ = n.node.layout || 24;
|
|
3312
|
-
return
|
|
3424
|
+
return Ve(v, g, n.node.children || [], $, o.device === "mobile");
|
|
3313
3425
|
}
|
|
3314
|
-
function r(
|
|
3315
|
-
const g =
|
|
3426
|
+
function r(v) {
|
|
3427
|
+
const g = v.dataTransfer;
|
|
3316
3428
|
return !!g && (g.types.includes("application/x-fd-new") || g.types.includes("application/x-fd-move"));
|
|
3317
3429
|
}
|
|
3318
3430
|
function l() {
|
|
3319
3431
|
o.select(n.node.id);
|
|
3320
3432
|
}
|
|
3321
|
-
function
|
|
3433
|
+
function m(v) {
|
|
3322
3434
|
var g;
|
|
3323
|
-
|
|
3435
|
+
v.stopPropagation(), o.setDragging(n.node.id), (g = v.dataTransfer) == null || g.setData("application/x-fd-move", n.node.id), v.dataTransfer && (v.dataTransfer.effectAllowed = "move");
|
|
3324
3436
|
}
|
|
3325
|
-
function
|
|
3437
|
+
function p() {
|
|
3326
3438
|
o.dragOverId = null, o.dropContainerId = null, o.dragBefore = !1, o.setDragging(null);
|
|
3327
3439
|
}
|
|
3328
|
-
function
|
|
3329
|
-
|
|
3440
|
+
function y(v) {
|
|
3441
|
+
v.stopPropagation(), p();
|
|
3330
3442
|
}
|
|
3331
|
-
function
|
|
3443
|
+
function C() {
|
|
3332
3444
|
o.dragOverId === n.node.id && (o.dragOverId = null), o.dropContainerId === n.node.id && (o.dropContainerId = null);
|
|
3333
3445
|
}
|
|
3334
|
-
function
|
|
3335
|
-
if (r(
|
|
3336
|
-
if (
|
|
3446
|
+
function B(v) {
|
|
3447
|
+
if (r(v))
|
|
3448
|
+
if (v.preventDefault(), v.stopPropagation(), i())
|
|
3337
3449
|
o.dragOverId = null, o.dragBefore = !1, o.dropContainerId = n.node.id;
|
|
3338
3450
|
else {
|
|
3339
3451
|
o.dropContainerId = null, o.dragOverId = n.node.id;
|
|
3340
3452
|
const g = s.value;
|
|
3341
3453
|
if (g) {
|
|
3342
3454
|
const $ = g.getBoundingClientRect();
|
|
3343
|
-
o.dragBefore =
|
|
3455
|
+
o.dragBefore = v.clientY - $.top < $.height / 2;
|
|
3344
3456
|
}
|
|
3345
3457
|
}
|
|
3346
3458
|
}
|
|
3347
3459
|
function _() {
|
|
3348
|
-
|
|
3460
|
+
C();
|
|
3349
3461
|
}
|
|
3350
|
-
function
|
|
3351
|
-
var
|
|
3352
|
-
if (!r(
|
|
3353
|
-
|
|
3354
|
-
const g = (
|
|
3462
|
+
function S(v) {
|
|
3463
|
+
var A, Y, x;
|
|
3464
|
+
if (!r(v)) return;
|
|
3465
|
+
v.preventDefault(), v.stopPropagation();
|
|
3466
|
+
const g = (A = v.dataTransfer) == null ? void 0 : A.getData("application/x-fd-new"), $ = (Y = v.dataTransfer) == null ? void 0 : Y.getData("application/x-fd-move");
|
|
3355
3467
|
if (i())
|
|
3356
3468
|
g ? o.addWidget(g, n.node.id) : $ && o.moveNode($, n.node.id, ((x = n.node.children) == null ? void 0 : x.length) ?? 0);
|
|
3357
3469
|
else {
|
|
3358
|
-
const
|
|
3359
|
-
g ? o.addWidget(g, n.parentId,
|
|
3470
|
+
const b = o.dragBefore ? n.index : n.index + 1;
|
|
3471
|
+
g ? o.addWidget(g, n.parentId, b) : $ && o.moveNode($, n.parentId, b);
|
|
3360
3472
|
}
|
|
3361
3473
|
o.dragOverId = null, o.dragBefore = !1, o.dropContainerId = null;
|
|
3362
3474
|
}
|
|
3363
|
-
return (
|
|
3364
|
-
const $ =
|
|
3475
|
+
return (v, g) => {
|
|
3476
|
+
const $ = Ue("CanvasNode", !0);
|
|
3365
3477
|
return d(), c("div", {
|
|
3366
3478
|
ref_key: "rootEl",
|
|
3367
3479
|
ref: s,
|
|
@@ -3374,26 +3486,26 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
3374
3486
|
"dragging-source": h(o).draggingId === e.node.id
|
|
3375
3487
|
}
|
|
3376
3488
|
]]),
|
|
3377
|
-
style:
|
|
3489
|
+
style: K(a.value),
|
|
3378
3490
|
draggable: "true",
|
|
3379
|
-
onMousedown:
|
|
3380
|
-
onClick: g[4] || (g[4] =
|
|
3491
|
+
onMousedown: q(l, ["stop"]),
|
|
3492
|
+
onClick: g[4] || (g[4] = q(() => {
|
|
3381
3493
|
}, ["stop"])),
|
|
3382
|
-
onDragstart:
|
|
3383
|
-
onDragend:
|
|
3384
|
-
onDragover:
|
|
3494
|
+
onDragstart: m,
|
|
3495
|
+
onDragend: y,
|
|
3496
|
+
onDragover: B,
|
|
3385
3497
|
onDragleave: _,
|
|
3386
|
-
onDrop:
|
|
3498
|
+
onDrop: S
|
|
3387
3499
|
}, [
|
|
3388
3500
|
t("div", {
|
|
3389
3501
|
class: "fd-canvas-node-actions",
|
|
3390
|
-
onMousedown: g[3] || (g[3] =
|
|
3502
|
+
onMousedown: g[3] || (g[3] = q(() => {
|
|
3391
3503
|
}, ["stop"]))
|
|
3392
3504
|
}, [
|
|
3393
3505
|
t("span", {
|
|
3394
3506
|
class: "fd-node-action",
|
|
3395
3507
|
title: "上移",
|
|
3396
|
-
onClick: g[0] || (g[0] =
|
|
3508
|
+
onClick: g[0] || (g[0] = q((A) => h(o).moveSibling(e.node.id, -1), ["stop"]))
|
|
3397
3509
|
}, [...g[5] || (g[5] = [
|
|
3398
3510
|
t("svg", {
|
|
3399
3511
|
class: "fd-node-icon",
|
|
@@ -3416,7 +3528,7 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
3416
3528
|
t("span", {
|
|
3417
3529
|
class: "fd-node-action",
|
|
3418
3530
|
title: "下移",
|
|
3419
|
-
onClick: g[1] || (g[1] =
|
|
3531
|
+
onClick: g[1] || (g[1] = q((A) => h(o).moveSibling(e.node.id, 1), ["stop"]))
|
|
3420
3532
|
}, [...g[6] || (g[6] = [
|
|
3421
3533
|
t("svg", {
|
|
3422
3534
|
class: "fd-node-icon",
|
|
@@ -3439,26 +3551,26 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
3439
3551
|
t("span", {
|
|
3440
3552
|
class: "fd-node-action delete",
|
|
3441
3553
|
title: "删除",
|
|
3442
|
-
onClick: g[2] || (g[2] =
|
|
3554
|
+
onClick: g[2] || (g[2] = q((A) => h(o).removeWidget(e.node.id), ["stop"]))
|
|
3443
3555
|
}, [...g[7] || (g[7] = [
|
|
3444
|
-
|
|
3556
|
+
we('<svg class="fd-node-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" data-v-3f3a43d3><path d="M4 7h16" data-v-3f3a43d3></path><path d="M9 7V5.5a1.5 1.5 0 0 1 1.5-1.5h3A1.5 1.5 0 0 1 15 5.5V7" data-v-3f3a43d3></path><path d="M6.5 7l1 12.5h9l1-12.5" data-v-3f3a43d3></path><line x1="10" y1="11" x2="10" y2="16.5" data-v-3f3a43d3></line><line x1="14" y1="11" x2="14" y2="16.5" data-v-3f3a43d3></line></svg>', 1)
|
|
3445
3557
|
])])
|
|
3446
3558
|
], 32),
|
|
3447
|
-
|
|
3559
|
+
L(xe, {
|
|
3448
3560
|
node: e.node,
|
|
3449
3561
|
mode: "design"
|
|
3450
|
-
},
|
|
3562
|
+
}, re({ _: 2 }, [
|
|
3451
3563
|
i() && e.node.children ? {
|
|
3452
3564
|
name: "children",
|
|
3453
|
-
fn:
|
|
3454
|
-
(d(!0), c(
|
|
3455
|
-
key:
|
|
3456
|
-
node:
|
|
3565
|
+
fn: j(() => [
|
|
3566
|
+
(d(!0), c(F, null, N(e.node.children, (A, Y) => (d(), V($, {
|
|
3567
|
+
key: A.id,
|
|
3568
|
+
node: A,
|
|
3457
3569
|
"parent-id": e.node.id,
|
|
3458
|
-
index:
|
|
3459
|
-
class: R(u(
|
|
3570
|
+
index: Y,
|
|
3571
|
+
class: R(u(A, Y))
|
|
3460
3572
|
}, null, 8, ["node", "parent-id", "index", "class"]))), 128)),
|
|
3461
|
-
!e.node.children || e.node.children.length === 0 ? (d(), c("div",
|
|
3573
|
+
!e.node.children || e.node.children.length === 0 ? (d(), c("div", Ia, "拖拽控件到此容器")) : T("", !0)
|
|
3462
3574
|
]),
|
|
3463
3575
|
key: "0"
|
|
3464
3576
|
} : void 0
|
|
@@ -3466,28 +3578,28 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
3466
3578
|
], 38);
|
|
3467
3579
|
};
|
|
3468
3580
|
}
|
|
3469
|
-
}),
|
|
3581
|
+
}), Sa = /* @__PURE__ */ P(Da, [["__scopeId", "data-v-3f3a43d3"]]), Ta = { class: "fd-designer" }, Fa = { class: "fd-designer-body" }, La = { class: "fd-designer-left" }, Ma = {
|
|
3470
3582
|
key: 0,
|
|
3471
3583
|
class: "fd-canvas-notice"
|
|
3472
|
-
},
|
|
3584
|
+
}, Na = {
|
|
3473
3585
|
key: 1,
|
|
3474
3586
|
class: "fd-canvas-state"
|
|
3475
|
-
},
|
|
3587
|
+
}, Ea = {
|
|
3476
3588
|
key: 2,
|
|
3477
3589
|
class: "fd-canvas-state fd-canvas-state--error"
|
|
3478
|
-
},
|
|
3590
|
+
}, Pa = {
|
|
3479
3591
|
key: 0,
|
|
3480
3592
|
class: "fd-canvas-empty"
|
|
3481
|
-
},
|
|
3593
|
+
}, Oa = { class: "fd-designer-right" }, Ua = /* @__PURE__ */ E({
|
|
3482
3594
|
__name: "Designer",
|
|
3483
3595
|
props: {
|
|
3484
3596
|
formId: {}
|
|
3485
3597
|
},
|
|
3486
3598
|
setup(e) {
|
|
3487
|
-
const n = e, o =
|
|
3488
|
-
|
|
3599
|
+
const n = e, o = G();
|
|
3600
|
+
ce(async () => {
|
|
3489
3601
|
const a = new URLSearchParams(window.location.search), i = a.get("baseUrl");
|
|
3490
|
-
i &&
|
|
3602
|
+
i && js(i);
|
|
3491
3603
|
const u = n.formId || a.get("id") || "", r = a.get("formVersion") || a.get("FormVersion") || "", l = a.get("openType") || a.get("OpenType") || "";
|
|
3492
3604
|
await o.openForm(u, r, l);
|
|
3493
3605
|
});
|
|
@@ -3497,29 +3609,29 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
3497
3609
|
const i = (r = a.dataTransfer) == null ? void 0 : r.getData("application/x-fd-new"), u = (l = a.dataTransfer) == null ? void 0 : l.getData("application/x-fd-move");
|
|
3498
3610
|
i ? o.addWidget(i, null, o.widgets.length) : u && o.moveNode(u, null, o.widgets.length);
|
|
3499
3611
|
}
|
|
3500
|
-
return (a, i) => (d(), c("div",
|
|
3501
|
-
|
|
3502
|
-
t("div",
|
|
3503
|
-
t("aside",
|
|
3504
|
-
|
|
3612
|
+
return (a, i) => (d(), c("div", Ta, [
|
|
3613
|
+
L(Kl),
|
|
3614
|
+
t("div", Fa, [
|
|
3615
|
+
t("aside", La, [
|
|
3616
|
+
L(na)
|
|
3505
3617
|
]),
|
|
3506
3618
|
t("main", {
|
|
3507
3619
|
class: "fd-designer-center",
|
|
3508
|
-
onDragover: i[1] || (i[1] =
|
|
3620
|
+
onDragover: i[1] || (i[1] = q(() => {
|
|
3509
3621
|
}, ["prevent"])),
|
|
3510
3622
|
onDrop: s
|
|
3511
3623
|
}, [
|
|
3512
|
-
h(o).noticeMsg ? (d(), c("div",
|
|
3513
|
-
h(o).loading ? (d(), c("div",
|
|
3624
|
+
h(o).noticeMsg ? (d(), c("div", Ma, k(h(o).noticeMsg), 1)) : T("", !0),
|
|
3625
|
+
h(o).loading ? (d(), c("div", Na, "正在加载表单…")) : h(o).errorMsg ? (d(), c("div", Ea, k(h(o).errorMsg), 1)) : (d(), c("div", {
|
|
3514
3626
|
key: 3,
|
|
3515
3627
|
class: R(["fd-canvas", { "is-mobile": h(o).device === "mobile", "is-selected": h(o).selectedForm }]),
|
|
3516
3628
|
onClick: i[0] || (i[0] = (u) => h(o).selectForm())
|
|
3517
3629
|
}, [
|
|
3518
|
-
h(o).widgets.length === 0 ? (d(), c("div",
|
|
3630
|
+
h(o).widgets.length === 0 ? (d(), c("div", Pa, [...i[2] || (i[2] = [
|
|
3519
3631
|
t("span", { class: "fd-canvas-empty-icon" }, "▦", -1),
|
|
3520
3632
|
t("span", null, "从左侧拖拽控件到此处", -1)
|
|
3521
|
-
])])) :
|
|
3522
|
-
(d(!0), c(
|
|
3633
|
+
])])) : T("", !0),
|
|
3634
|
+
(d(!0), c(F, null, N(h(o).widgets, (u, r) => (d(), V(Sa, {
|
|
3523
3635
|
key: u.id,
|
|
3524
3636
|
node: u,
|
|
3525
3637
|
"parent-id": null,
|
|
@@ -3527,18 +3639,18 @@ const fl = { class: "fd-publish-tip" }, ml = { class: "fd-publish-tip-text" }, p
|
|
|
3527
3639
|
}, null, 8, ["node", "index"]))), 128))
|
|
3528
3640
|
], 2))
|
|
3529
3641
|
], 32),
|
|
3530
|
-
t("aside",
|
|
3531
|
-
|
|
3642
|
+
t("aside", Oa, [
|
|
3643
|
+
L(_a)
|
|
3532
3644
|
])
|
|
3533
3645
|
])
|
|
3534
3646
|
]));
|
|
3535
3647
|
}
|
|
3536
|
-
}),
|
|
3537
|
-
function
|
|
3538
|
-
|
|
3648
|
+
}), Ba = /* @__PURE__ */ P(Ua, [["__scopeId", "data-v-86f01272"]]);
|
|
3649
|
+
function si(e) {
|
|
3650
|
+
Ce(), e.baseUrl && Ae({ baseUrl: e.baseUrl });
|
|
3539
3651
|
let n = null;
|
|
3540
|
-
const s =
|
|
3541
|
-
render: () =>
|
|
3652
|
+
const s = Xe({
|
|
3653
|
+
render: () => pe(We, {
|
|
3542
3654
|
widgets: e.widgets,
|
|
3543
3655
|
formMode: e.formMode,
|
|
3544
3656
|
formData: e.formData,
|
|
@@ -3557,21 +3669,21 @@ function Qa(e) {
|
|
|
3557
3669
|
unmount: () => s.unmount()
|
|
3558
3670
|
};
|
|
3559
3671
|
}
|
|
3560
|
-
const
|
|
3672
|
+
const li = {
|
|
3561
3673
|
install(e, n = {}) {
|
|
3562
|
-
|
|
3674
|
+
Ce(), n.baseUrl && Ae({ baseUrl: n.baseUrl }), e.component("FdDesigner", Ba);
|
|
3563
3675
|
}
|
|
3564
3676
|
};
|
|
3565
3677
|
export {
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3678
|
+
Ba as D,
|
|
3679
|
+
oa as L,
|
|
3680
|
+
We as R,
|
|
3681
|
+
P as _,
|
|
3682
|
+
li as a,
|
|
3683
|
+
si as b,
|
|
3684
|
+
Ae as c,
|
|
3685
|
+
ti as d,
|
|
3686
|
+
oi as l,
|
|
3687
|
+
le as r,
|
|
3688
|
+
ni as s
|
|
3577
3689
|
};
|