fec-dev-designer 5.1.2 → 5.1.3

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.
@@ -1,4 +1,3 @@
1
- /*! Element Plus v2.13.1 */
2
1
  var u = {
3
2
  name: "zh-cn",
4
3
  el: {
@@ -7,18 +7,26 @@ import "../../node_modules/element-plus/theme-chalk/el-scrollbar.css.js";
7
7
  import "../../node_modules/element-plus/theme-chalk/el-popper.css.js";
8
8
  import "../../node_modules/element-plus/theme-chalk/el-select.css.js";
9
9
  import "../../node_modules/element-plus/theme-chalk/el-button.css.js";
10
- import { computed as g, watch as I, openBlock as o, createElementBlock as p, unref as d, createBlock as u, withCtx as r, createTextVNode as S, createElementVNode as n, toDisplayString as w, Fragment as f, renderList as m, createVNode as h, createCommentVNode as L } from "vue";
11
- import { Plus as x, Delete as U } from "../../node_modules/@element-plus/icons-vue/dist/index.js";
12
- import { getEditConfigDataFields as B, getEditConfigData as O } from "../packages/utils/common.js";
10
+ import "../../node_modules/element-plus/theme-chalk/el-button-group.css.js";
11
+ import "../../node_modules/element-plus/theme-chalk/el-dropdown.css.js";
12
+ import "../../node_modules/element-plus/theme-chalk/el-dropdown-menu.css.js";
13
+ import "../../node_modules/element-plus/theme-chalk/el-dropdown-item.css.js";
14
+ import "../../node_modules/element-plus/theme-chalk/el-checkbox.css.js";
15
+ import { computed as C, ref as L, openBlock as a, createElementBlock as f, unref as p, createBlock as r, withCtx as o, createVNode as s, createElementVNode as t, createTextVNode as k, Fragment as v, renderList as _, isRef as O, createCommentVNode as V, toDisplayString as U } from "vue";
16
+ import { Plus as B, Delete as T } from "../../node_modules/@element-plus/icons-vue/dist/index.js";
17
+ import { getEditConfigDataFields as j, getEditConfigData as q } from "../packages/utils/common.js";
13
18
  import "./FieldSetMapping.vue2.js";
14
- import D from "../../_virtual/_plugin-vue_export-helper.js";
15
- import { ElButton as $ } from "../../node_modules/element-plus/es/components/button/index.js";
16
- import { ElOption as A, ElSelect as G, ElOptionGroup as P } from "../../node_modules/element-plus/es/components/select/index.js";
17
- import { ElInput as T } from "../../node_modules/element-plus/es/components/input/index.js";
18
- const j = { class: "field-mapping-container" }, q = {
19
+ import H from "../../_virtual/_plugin-vue_export-helper.js";
20
+ import { ElButton as J } from "../../node_modules/element-plus/es/components/button/index.js";
21
+ import { ElCheckbox as K } from "../../node_modules/element-plus/es/components/checkbox/index.js";
22
+ import { ElDropdownItem as Q, ElDropdownMenu as W, ElDropdown as X } from "../../node_modules/element-plus/es/components/dropdown/index.js";
23
+ import { ElScrollbar as Y } from "../../node_modules/element-plus/es/components/scrollbar/index.js";
24
+ import { ElOption as Z, ElSelect as ee, ElOptionGroup as le } from "../../node_modules/element-plus/es/components/select/index.js";
25
+ import { ElInput as ae } from "../../node_modules/element-plus/es/components/input/index.js";
26
+ const oe = { class: "field-mapping-container" }, de = { class: "dropdown-header" }, te = { class: "dropdown-content" }, ne = {
19
27
  key: 1,
20
28
  class: "mapping-table"
21
- }, H = { class: "mapping-header" }, J = { class: "mapping-cell value-header" }, K = { class: "mapping-cell field-header" }, Q = { class: "mapping-body" }, R = { class: "mapping-cell value-cell" }, W = { class: "mapping-cell field-cell" }, X = { class: "mapping-cell action-cell" }, Y = { class: "mapping-footer" }, Z = {
29
+ }, ie = { class: "mapping-header" }, se = { class: "mapping-cell value-header" }, ue = { class: "mapping-cell field-header" }, re = { class: "mapping-body" }, pe = { class: "mapping-cell value-cell" }, ce = { class: "mapping-cell field-cell" }, fe = { class: "mapping-cell action-cell" }, me = { class: "mapping-footer" }, ve = { class: "dropdown-header" }, _e = { class: "dropdown-content" }, be = {
22
30
  __name: "FieldSetMapping",
23
31
  props: {
24
32
  modelValue: {
@@ -35,7 +43,7 @@ const j = { class: "field-mapping-container" }, q = {
35
43
  type: String,
36
44
  default: "映射字段"
37
45
  },
38
- // 映射字段支持的选择项列表(可选)
46
+ // 映射字段支持的选择项列表
39
47
  valueOptions: {
40
48
  type: Array,
41
49
  default: () => []
@@ -47,165 +55,294 @@ const j = { class: "field-mapping-container" }, q = {
47
55
  }
48
56
  },
49
57
  emits: ["update:modelValue"],
50
- setup(i, { emit: C }) {
51
- const v = i, c = g({
52
- get: () => v.modelValue,
53
- set: (t) => F("update:modelValue", t)
54
- }), F = C, y = g(() => (B() || []).map((e) => ({
58
+ setup(u, { emit: R }) {
59
+ const $ = u, y = C({
60
+ get: () => $.modelValue,
61
+ set: (i) => A("update:modelValue", i)
62
+ }), A = R, c = L([]), w = C(() => (j() || []).map((e) => ({
55
63
  id: e == null ? void 0 : e.id,
56
64
  fieldId: e == null ? void 0 : e.id,
57
- label: e == null ? void 0 : e.label
58
- }))), b = g(() => {
59
- const t = O();
60
- return ((t == null ? void 0 : t.hiddenFields) || []).map((l) => ({
65
+ label: e == null ? void 0 : e.label,
66
+ fieldName: e == null ? void 0 : e.fieldName
67
+ }))), E = C(() => {
68
+ const i = q();
69
+ return ((i == null ? void 0 : i.hiddenFields) || []).map((l) => ({
61
70
  id: l == null ? void 0 : l.id,
62
71
  fieldId: l == null ? void 0 : l.id,
63
- label: l == null ? void 0 : l.label
72
+ label: l == null ? void 0 : l.label,
73
+ fieldName: l == null ? void 0 : l.fieldName
64
74
  }));
65
75
  });
66
- I(() => v.valueOptions, (t) => {
67
- if (!v.valueSelectMode)
76
+ function F(i) {
77
+ i && (c.value = []);
78
+ }
79
+ const N = L();
80
+ function M() {
81
+ var e;
82
+ if (c.value.length === 0)
68
83
  return;
69
- const e = new Set(t.map((l) => l.fieldName));
84
+ const i = [...w.value, ...E.value];
70
85
  c.value.forEach((l) => {
71
- l.value && !e.has(l.value) && (l.value = "");
72
- });
73
- }, { deep: !0 });
74
- function V() {
75
- c.value.push({
76
- id: Date.now(),
77
- field: "",
78
- value: ""
79
- });
86
+ const b = {
87
+ id: Date.now() + Math.random(),
88
+ field: "",
89
+ // 默认值为空
90
+ value: l
91
+ // 自动赋值为勾选的字段
92
+ }, m = i.find(
93
+ (h) => h.fieldName === l
94
+ );
95
+ m && (b.field = m.fieldId), y.value.push(b);
96
+ }), c.value = [], (e = N.value) == null || e.handleClose();
80
97
  }
81
- function M(t) {
82
- c.value.splice(t, 1);
98
+ function G(i) {
99
+ y.value.splice(i, 1);
83
100
  }
84
- return (t, e) => {
85
- const l = $, _ = A, k = G, N = T, E = P;
86
- return o(), p("div", j, [
87
- d(c).length === 0 ? (o(), u(l, {
101
+ return (i, e) => {
102
+ const l = J, b = K, m = Q, h = Y, S = W, z = X, x = Z, D = ee, P = ae, I = le;
103
+ return a(), f("div", oe, [
104
+ p(y).length === 0 ? (a(), r(z, {
88
105
  key: 0,
89
- type: "primary",
90
- size: "small",
91
- icon: d(x),
92
- link: "",
93
- onClick: V
106
+ trigger: "click",
107
+ placement: "bottom",
108
+ "hide-on-click": !1,
109
+ onVisibleChange: F,
110
+ ref_key: "dropdownRef",
111
+ ref: N
94
112
  }, {
95
- default: r(() => [...e[0] || (e[0] = [
96
- S(" 新增字段映射 ", -1)
97
- ])]),
113
+ dropdown: o(() => [
114
+ s(S, { class: "field-mapping-dropdown" }, {
115
+ default: o(() => [
116
+ t("div", de, [
117
+ e[4] || (e[4] = t("span", { class: "header-title" }, "选择字段", -1)),
118
+ s(l, {
119
+ type: "primary",
120
+ size: "small",
121
+ onClick: M
122
+ }, {
123
+ default: o(() => [...e[3] || (e[3] = [
124
+ k("确定", -1)
125
+ ])]),
126
+ _: 1
127
+ })
128
+ ]),
129
+ t("div", te, [
130
+ s(h, { "max-height": 300 }, {
131
+ default: o(() => [
132
+ (a(!0), f(v, null, _(u.valueOptions, (n) => (a(), r(m, {
133
+ key: n.fieldName
134
+ }, {
135
+ default: o(() => [
136
+ s(b, {
137
+ modelValue: p(c),
138
+ "onUpdate:modelValue": e[0] || (e[0] = (g) => O(c) ? c.value = g : null),
139
+ value: n.fieldName,
140
+ label: n.label
141
+ }, null, 8, ["modelValue", "value", "label"])
142
+ ]),
143
+ _: 2
144
+ }, 1024))), 128)),
145
+ u.valueOptions.length === 0 ? (a(), r(m, {
146
+ key: 0,
147
+ disabled: ""
148
+ }, {
149
+ default: o(() => [...e[5] || (e[5] = [
150
+ t("span", { class: "empty-text" }, "暂无可用字段", -1)
151
+ ])]),
152
+ _: 1
153
+ })) : V("", !0)
154
+ ]),
155
+ _: 1
156
+ })
157
+ ])
158
+ ]),
159
+ _: 1
160
+ })
161
+ ]),
162
+ default: o(() => [
163
+ s(l, {
164
+ type: "primary",
165
+ size: "small",
166
+ icon: p(B),
167
+ link: ""
168
+ }, {
169
+ default: o(() => [...e[2] || (e[2] = [
170
+ k(" 新增字段映射 ", -1)
171
+ ])]),
172
+ _: 1
173
+ }, 8, ["icon"])
174
+ ]),
98
175
  _: 1
99
- }, 8, ["icon"])) : (o(), p("div", q, [
100
- n("div", H, [
101
- n("div", J, w(i.valueLabel), 1),
102
- n("div", K, w(i.fieldLabel), 1),
103
- e[1] || (e[1] = n("div", {
176
+ }, 512)) : (a(), f("div", ne, [
177
+ t("div", ie, [
178
+ t("div", se, U(u.valueLabel), 1),
179
+ t("div", ue, U(u.fieldLabel), 1),
180
+ e[6] || (e[6] = t("div", {
104
181
  class: "mapping-cell action-header",
105
182
  style: { width: "50px" }
106
183
  }, null, -1))
107
184
  ]),
108
- n("div", Q, [
109
- (o(!0), p(f, null, m(d(c), (s, z) => (o(), p("div", {
110
- key: s.id,
185
+ t("div", re, [
186
+ (a(!0), f(v, null, _(p(y), (n, g) => (a(), f("div", {
187
+ key: n.id,
111
188
  class: "mapping-row"
112
189
  }, [
113
- n("div", R, [
114
- i.valueSelectMode ? (o(), u(k, {
190
+ t("div", pe, [
191
+ u.valueSelectMode ? (a(), r(D, {
115
192
  key: 0,
116
- modelValue: s.value,
117
- "onUpdate:modelValue": (a) => s.value = a,
118
- placeholder: `选择${i.valueLabel}`,
193
+ modelValue: n.value,
194
+ "onUpdate:modelValue": (d) => n.value = d,
195
+ placeholder: `选择${u.valueLabel}`,
119
196
  size: "small",
120
197
  style: { width: "100%" },
121
- filterable: "",
122
- "allow-create": ""
198
+ filterable: ""
123
199
  }, {
124
- default: r(() => [
125
- (o(!0), p(f, null, m(i.valueOptions, (a) => (o(), u(_, {
126
- key: a.fieldName,
127
- label: a.label,
128
- value: a.fieldName
200
+ default: o(() => [
201
+ (a(!0), f(v, null, _(u.valueOptions, (d) => (a(), r(x, {
202
+ key: d.fieldName,
203
+ label: d.label,
204
+ value: d.fieldName
129
205
  }, null, 8, ["label", "value"]))), 128))
130
206
  ]),
131
207
  _: 1
132
- }, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (o(), u(N, {
208
+ }, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (a(), r(P, {
133
209
  key: 1,
134
- modelValue: s.value,
135
- "onUpdate:modelValue": (a) => s.value = a,
136
- placeholder: `输入${i.valueLabel}`,
210
+ modelValue: n.value,
211
+ "onUpdate:modelValue": (d) => n.value = d,
212
+ placeholder: `输入${u.valueLabel}`,
137
213
  size: "small"
138
214
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]))
139
215
  ]),
140
- n("div", W, [
141
- h(k, {
142
- modelValue: s.field,
143
- "onUpdate:modelValue": (a) => s.field = a,
144
- placeholder: `选择${i.fieldLabel}`,
216
+ t("div", ce, [
217
+ s(D, {
218
+ modelValue: n.field,
219
+ "onUpdate:modelValue": (d) => n.field = d,
220
+ placeholder: `选择${u.fieldLabel}`,
145
221
  size: "small",
146
- style: { width: "100%" }
222
+ style: { width: "100%" },
223
+ filterable: ""
147
224
  }, {
148
- default: r(() => [
149
- d(y).length > 0 ? (o(), u(E, {
225
+ default: o(() => [
226
+ p(w).length > 0 ? (a(), r(I, {
150
227
  key: 0,
151
228
  label: "表单字段"
152
229
  }, {
153
- default: r(() => [
154
- (o(!0), p(f, null, m(d(y), (a) => (o(), u(_, {
155
- key: a.fieldId,
156
- label: a.label,
157
- value: a.fieldId
230
+ default: o(() => [
231
+ (a(!0), f(v, null, _(p(w), (d) => (a(), r(x, {
232
+ key: d.fieldId,
233
+ label: d.label,
234
+ value: d.fieldId
158
235
  }, null, 8, ["label", "value"]))), 128))
159
236
  ]),
160
237
  _: 1
161
- })) : L("", !0),
162
- d(b).length > 0 ? (o(), u(E, {
238
+ })) : V("", !0),
239
+ p(E).length > 0 ? (a(), r(I, {
163
240
  key: 1,
164
241
  label: "隐藏域"
165
242
  }, {
166
- default: r(() => [
167
- (o(!0), p(f, null, m(d(b), (a) => (o(), u(_, {
168
- key: a.id,
169
- label: a.label,
170
- value: a.id
243
+ default: o(() => [
244
+ (a(!0), f(v, null, _(p(E), (d) => (a(), r(x, {
245
+ key: d.id,
246
+ label: d.label,
247
+ value: d.id
171
248
  }, null, 8, ["label", "value"]))), 128))
172
249
  ]),
173
250
  _: 1
174
- })) : L("", !0)
251
+ })) : V("", !0)
175
252
  ]),
176
253
  _: 1
177
254
  }, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
178
255
  ]),
179
- n("div", X, [
180
- h(l, {
256
+ t("div", fe, [
257
+ s(l, {
181
258
  type: "danger",
182
259
  size: "small",
183
- icon: d(U),
260
+ icon: p(T),
184
261
  text: "",
185
- onClick: (a) => M(z)
262
+ onClick: (d) => G(g)
186
263
  }, null, 8, ["icon", "onClick"])
187
264
  ])
188
265
  ]))), 128))
189
266
  ]),
190
- n("div", Y, [
191
- h(l, {
192
- type: "primary",
193
- size: "small",
194
- icon: d(x),
195
- link: "",
196
- onClick: V
267
+ t("div", me, [
268
+ s(z, {
269
+ trigger: "click",
270
+ placement: "bottom",
271
+ "hide-on-click": !1,
272
+ onVisibleChange: F,
273
+ ref_key: "dropdownRef",
274
+ ref: N
197
275
  }, {
198
- default: r(() => [...e[2] || (e[2] = [
199
- S(" 新增字段映射 ", -1)
200
- ])]),
276
+ dropdown: o(() => [
277
+ s(S, { class: "field-mapping-dropdown" }, {
278
+ default: o(() => [
279
+ t("div", ve, [
280
+ e[9] || (e[9] = t("span", { class: "header-title" }, "选择字段", -1)),
281
+ s(l, {
282
+ type: "primary",
283
+ size: "small",
284
+ onClick: M
285
+ }, {
286
+ default: o(() => [...e[8] || (e[8] = [
287
+ k("确定", -1)
288
+ ])]),
289
+ _: 1
290
+ })
291
+ ]),
292
+ t("div", _e, [
293
+ s(h, { "max-height": 300 }, {
294
+ default: o(() => [
295
+ (a(!0), f(v, null, _(u.valueOptions, (n) => (a(), r(m, {
296
+ key: n.fieldName
297
+ }, {
298
+ default: o(() => [
299
+ s(b, {
300
+ modelValue: p(c),
301
+ "onUpdate:modelValue": e[1] || (e[1] = (g) => O(c) ? c.value = g : null),
302
+ value: n.fieldName,
303
+ label: n.label
304
+ }, null, 8, ["modelValue", "value", "label"])
305
+ ]),
306
+ _: 2
307
+ }, 1024))), 128)),
308
+ u.valueOptions.length === 0 ? (a(), r(m, {
309
+ key: 0,
310
+ disabled: ""
311
+ }, {
312
+ default: o(() => [...e[10] || (e[10] = [
313
+ t("span", { class: "empty-text" }, "暂无可用字段", -1)
314
+ ])]),
315
+ _: 1
316
+ })) : V("", !0)
317
+ ]),
318
+ _: 1
319
+ })
320
+ ])
321
+ ]),
322
+ _: 1
323
+ })
324
+ ]),
325
+ default: o(() => [
326
+ s(l, {
327
+ type: "primary",
328
+ size: "small",
329
+ icon: p(B),
330
+ link: ""
331
+ }, {
332
+ default: o(() => [...e[7] || (e[7] = [
333
+ k(" 新增字段映射 ", -1)
334
+ ])]),
335
+ _: 1
336
+ }, 8, ["icon"])
337
+ ]),
201
338
  _: 1
202
- }, 8, ["icon"])
339
+ }, 512)
203
340
  ])
204
341
  ]))
205
342
  ]);
206
343
  };
207
344
  }
208
- }, ge = /* @__PURE__ */ D(Z, [["__scopeId", "data-v-210d7584"]]);
345
+ }, Te = /* @__PURE__ */ H(be, [["__scopeId", "data-v-9ab65e52"]]);
209
346
  export {
210
- ge as default
347
+ Te as default
211
348
  };