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.
@@ -7,17 +7,17 @@ import "../../node_modules/element-plus/theme-chalk/el-footer.css.js";
7
7
  import "../../node_modules/element-plus/theme-chalk/el-header.css.js";
8
8
  import "../../node_modules/element-plus/theme-chalk/el-main.css.js";
9
9
  import "../../node_modules/element-plus/theme-chalk/el-config-provider.css.js";
10
- import { ref as p, computed as b, openBlock as f, createBlock as _, withCtx as r, createVNode as o, unref as s, resolveDynamicComponent as w, createElementBlock as D, createTextVNode as E, createCommentVNode as N } from "vue";
11
- import { useRoute as B, useRouter as O } from "vue-router";
12
- import R from "./aside/index.vue.js";
13
- import T from "./header/index.vue.js";
14
- import A from "./property/index.vue.js";
15
- import F from "../packages/table/index.vue.js";
16
- import M from "../packages/form/index.vue.js";
17
- import S from "../../node_modules/element-plus/dist/locale/zh-cn.js";
18
- import a from "../store/index.js";
19
- import { setEditConfigData as d, setSelectedItem as V, setHoverItem as J } from "../packages/utils/common.js";
20
- import y from "../api/index.js";
10
+ import { ref as s, computed as w, openBlock as a, createBlock as u, unref as l, withCtx as t, createVNode as o, resolveDynamicComponent as D, createElementBlock as E, createTextVNode as N, createCommentVNode as B } from "vue";
11
+ import d from "../../node_modules/element-plus/es/locale/lang/zh-cn.js";
12
+ import { useRoute as O, useRouter as R } from "vue-router";
13
+ import T from "./aside/index.vue.js";
14
+ import A from "./header/index.vue.js";
15
+ import F from "./property/index.vue.js";
16
+ import M from "../packages/table/index.vue.js";
17
+ import S from "../packages/form/index.vue.js";
18
+ import f from "../store/index.js";
19
+ import { setEditConfigData as y, setSelectedItem as V, setHoverItem as J } from "../packages/utils/common.js";
20
+ import v from "../api/index.js";
21
21
  import { defaultTableConfig as K } from "../packages/table/default.js";
22
22
  import { defaultFormConfig as L } from "../packages/form/default.js";
23
23
  import "./index.vue2.js";
@@ -32,103 +32,108 @@ const j = {
32
32
  }, G = {
33
33
  __name: "index",
34
34
  setup(Q) {
35
- const v = B(), g = O(), m = v.query.pkId, n = p(0), u = p(null);
36
- function k() {
37
- window.history.length > 1 ? g.back() : window.close();
35
+ const g = O(), k = R(), c = g.query.pkId, n = s(0), _ = s(null);
36
+ function h() {
37
+ window.history.length > 1 ? k.back() : window.close();
38
38
  }
39
- m ? y.login4dev().then((i) => {
40
- a.commit("set_token", i.token), a.commit("set_refreshToken", i.refreshToken), y.getById(m).then((e) => {
41
- const l = e.templateName, c = e.templateKey;
39
+ c ? v.login4dev().then((i) => {
40
+ f.commit("set_token", i.token), f.commit("set_refreshToken", i.refreshToken), v.getById(c).then((e) => {
41
+ const m = e.templateName, p = e.templateKey;
42
42
  if (e.type == "table") {
43
- const t = p({
44
- pkId: m,
45
- templateName: l,
46
- templateKey: c,
43
+ const r = s({
44
+ pkId: c,
45
+ templateName: m,
46
+ templateKey: p,
47
47
  ...K,
48
48
  ...JSON.parse(e.context)
49
49
  });
50
- d(t.value), n.value = 1;
50
+ y(r.value), n.value = 1;
51
51
  } else if (e.type == "form") {
52
- const t = p({
53
- pkId: m,
54
- templateName: l,
55
- templateKey: c,
52
+ const r = s({
53
+ pkId: c,
54
+ templateName: m,
55
+ templateKey: p,
56
56
  ...L,
57
57
  ...JSON.parse(e.context)
58
58
  });
59
- d(t.value), n.value = 1;
59
+ y(r.value), n.value = 1;
60
60
  }
61
- a.commit("set_editing_type", e.type);
61
+ f.commit("set_editing_type", e.type);
62
62
  });
63
63
  }) : n.value = -1;
64
- const h = b(() => {
65
- switch (a.getters.editingType) {
64
+ const x = w(() => {
65
+ switch (f.getters.editingType) {
66
66
  case "table":
67
- return F;
68
- case "form":
69
67
  return M;
68
+ case "form":
69
+ return S;
70
70
  }
71
71
  return null;
72
72
  });
73
73
  V(null), J(null);
74
- function x(i) {
74
+ function C(i) {
75
75
  var e;
76
- (e = u.value) == null || e.onFormDragMove(i);
76
+ (e = _.value) == null || e.onFormDragMove(i);
77
77
  }
78
78
  return (i, e) => {
79
- const l = W, c = q, t = z, C = H, I = $;
80
- return n.value == 1 ? (f(), _(t, {
81
- key: 0,
82
- style: { "flex-direction": "column", height: "100%" }
83
- }, {
84
- default: r(() => [
85
- o(s(T)),
86
- o(t, { class: "inner-container" }, {
87
- default: r(() => [
88
- o(s(R), { onOnFormDragMove: x }),
89
- o(c, { class: "root-main" }, {
90
- default: r(() => [
91
- o(l, { locale: s(S) }, {
92
- default: r(() => [
93
- (f(), _(w(h.value), {
94
- ref_key: "compRef",
95
- ref: u
96
- }, null, 512))
79
+ const m = W, p = q, r = z, I = H, b = $;
80
+ return a(), u(m, { locale: l(d) }, {
81
+ default: t(() => [
82
+ n.value == 1 ? (a(), u(r, {
83
+ key: 0,
84
+ style: { "flex-direction": "column", height: "100%" }
85
+ }, {
86
+ default: t(() => [
87
+ o(l(A)),
88
+ o(r, { class: "inner-container" }, {
89
+ default: t(() => [
90
+ o(l(T), { onOnFormDragMove: C }),
91
+ o(p, { class: "root-main" }, {
92
+ default: t(() => [
93
+ o(m, { locale: l(d) }, {
94
+ default: t(() => [
95
+ (a(), u(D(x.value), {
96
+ ref_key: "compRef",
97
+ ref: _
98
+ }, null, 512))
99
+ ]),
100
+ _: 1
101
+ }, 8, ["locale"])
97
102
  ]),
98
103
  _: 1
99
- }, 8, ["locale"])
104
+ }),
105
+ o(l(F))
100
106
  ]),
101
107
  _: 1
102
- }),
103
- o(s(A))
108
+ })
104
109
  ]),
105
110
  _: 1
106
- })
107
- ]),
108
- _: 1
109
- })) : n.value == -1 ? (f(), D("div", j, [
110
- o(I, {
111
- icon: "warning",
112
- title: "缺少模板ID",
113
- "sub-title": "请提供有效的模板ID(pkId)参数"
114
- }, {
115
- extra: r(() => [
116
- o(C, {
117
- type: "primary",
118
- onClick: k
111
+ })) : n.value == -1 ? (a(), E("div", j, [
112
+ o(b, {
113
+ icon: "warning",
114
+ title: "缺少模板ID",
115
+ "sub-title": "请提供有效的模板ID(pkId)参数"
119
116
  }, {
120
- default: r(() => [...e[0] || (e[0] = [
121
- E("返回", -1)
122
- ])]),
117
+ extra: t(() => [
118
+ o(I, {
119
+ type: "primary",
120
+ onClick: h
121
+ }, {
122
+ default: t(() => [...e[0] || (e[0] = [
123
+ N("返回", -1)
124
+ ])]),
125
+ _: 1
126
+ })
127
+ ]),
123
128
  _: 1
124
129
  })
125
- ]),
126
- _: 1
127
- })
128
- ])) : N("", !0);
130
+ ])) : B("", !0)
131
+ ]),
132
+ _: 1
133
+ }, 8, ["locale"]);
129
134
  };
130
135
  }
131
- }, be = /* @__PURE__ */ P(G, [["__scopeId", "data-v-9f473d85"]]);
136
+ }, be = /* @__PURE__ */ P(G, [["__scopeId", "data-v-f21412e4"]]);
132
137
  export {
133
138
  be as default
134
139
  };
@@ -23,7 +23,7 @@ import "../../../node_modules/element-plus/theme-chalk/el-main.css.js";
23
23
  import "../../../node_modules/element-plus/theme-chalk/el-link.css.js";
24
24
  import "../../../node_modules/element-plus/theme-chalk/el-input.css.js";
25
25
  import "../../../node_modules/element-plus/theme-chalk/el-button.css.js";
26
- import { computed as w, useModel as ke, ref as k, watch as Te, openBlock as d, createBlock as S, withCtx as n, createElementVNode as f, createVNode as l, createTextVNode as i, unref as o, createElementBlock as r, isRef as q, withKeys as Fe, createCommentVNode as y, Fragment as V, renderList as I, normalizeClass as Se, withDirectives as W, vShow as J, withModifiers as G, toDisplayString as P } from "vue";
26
+ import { computed as M, useModel as ke, ref as k, watch as Te, openBlock as d, createBlock as S, withCtx as n, createElementVNode as f, createVNode as l, createTextVNode as i, unref as o, createElementBlock as r, isRef as q, withKeys as Fe, createCommentVNode as y, Fragment as V, renderList as I, normalizeClass as Se, withDirectives as W, vShow as J, withModifiers as G, toDisplayString as z } from "vue";
27
27
  import { VueDraggable as De } from "../../../node_modules/vue-draggable-plus/dist/vue-draggable-plus.js";
28
28
  import { Plus as Ee, Close as Ue, Check as xe, Delete as j, Rank as we, Edit as Me } from "../../../node_modules/@element-plus/icons-vue/dist/index.js";
29
29
  import { getEditConfigData as Ie, cloneDeep as Q, getEditConfigDialogs as Be, setEditConfigDialogs as Ne } from "../utils/common.js";
@@ -72,13 +72,13 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
72
72
  },
73
73
  emits: ["update:modelValue"],
74
74
  setup(h) {
75
- const z = w(() => Ie()), D = ke(h, "modelValue"), g = k([]), b = k(-1);
75
+ const K = M(() => Ie()), D = ke(h, "modelValue"), g = k([]), b = k(-1);
76
76
  Te(D, (u) => {
77
77
  u && (E.value = !1, T.value = -1, g.value = Q(Be()), g.value.length > 0 && b.value === -1 && (b.value = 0));
78
78
  });
79
79
  const E = k(!1), C = k(""), T = k(-1), F = k(""), ee = () => {
80
80
  E.value = !0, C.value = "";
81
- }, K = () => {
81
+ }, R = () => {
82
82
  if (!C.value.trim()) {
83
83
  Z.warning("请输入弹层名称");
84
84
  return;
@@ -120,17 +120,17 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
120
120
  }
121
121
  }, ne = () => {
122
122
  Ne(g.value), D.value = !1;
123
- }, U = k(null), M = k(null), t = w(() => {
123
+ }, U = k(null), B = k(null), t = M(() => {
124
124
  const u = g.value[b.value];
125
- if (u.fieldMapping || (u.fieldMapping = []), u.customTableConfig ? (u.customTableConfig.dataSources = z.value.dataSources, u.customTableConfig.queryConfig.enabled = !1) : (u.customTableConfig = Q(Le), u.customTableConfig.fieldsData = [], u.customTableConfig.dataSources = z.value.dataSources), (u == null ? void 0 : u.contentSource) == "table" && !U.value) {
125
+ if (u.fieldMapping || (u.fieldMapping = []), u.customTableConfig ? (u.customTableConfig.dataSources = K.value.dataSources, u.customTableConfig.queryConfig.enabled = !1) : (u.customTableConfig = Q(Le), u.customTableConfig.fieldsData = [], u.customTableConfig.dataSources = K.value.dataSources), (u == null ? void 0 : u.contentSource) == "table") {
126
126
  const e = u == null ? void 0 : u.subTableId;
127
127
  e && Y.getById(e, !1).then((m) => {
128
128
  U.value = JSON.parse(m.context);
129
129
  });
130
- } else if ((u == null ? void 0 : u.contentSource) == "form" && !M.value) {
130
+ } else if ((u == null ? void 0 : u.contentSource) == "form") {
131
131
  const e = u == null ? void 0 : u.subFormId;
132
132
  e && Y.getById(e, !1).then((m) => {
133
- M.value = JSON.parse(m.context);
133
+ B.value = JSON.parse(m.context);
134
134
  });
135
135
  }
136
136
  return u;
@@ -139,20 +139,23 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
139
139
  U.value = u, t.value.subTableMode = null;
140
140
  }
141
141
  function ie(u) {
142
- M.value = u;
142
+ B.value = u;
143
143
  }
144
- const de = w(() => {
144
+ const de = M(() => {
145
145
  var u;
146
146
  return (u = U.value) == null ? void 0 : u.mode;
147
- }), R = w(() => {
148
- var u, e, m;
147
+ }), $ = M(() => {
148
+ var u, e, m, x;
149
149
  if (t.value.tableContent === "custom")
150
150
  return ((e = (u = t.value) == null ? void 0 : u.customTableConfig) == null ? void 0 : e.fieldsData) || [];
151
151
  if (t.value.tableContent === "select")
152
- return (m = U.value) == null ? void 0 : m.fieldsData;
153
- }), B = w(() => {
152
+ return [
153
+ ...((m = U.value) == null ? void 0 : m.fieldsData) || [],
154
+ ...((x = U.value) == null ? void 0 : x.hiddenFields) || []
155
+ ];
156
+ }), N = M(() => {
154
157
  var e;
155
- const u = (e = M.value) == null ? void 0 : e.pageFooterConfig.actions;
158
+ const u = (e = B.value) == null ? void 0 : e.pageFooterConfig.actions;
156
159
  return u ? u.filter((m) => m.btnType == "primary") : [];
157
160
  }), se = (u) => {
158
161
  var e, m;
@@ -176,7 +179,7 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
176
179
  t.value.customTableConfig.fieldsData.splice(u, 1);
177
180
  };
178
181
  return (u, e) => {
179
- const m = qe, $ = We, _ = Qe, be = Xe, L = Ye, N = Je, O = Ge, ve = je, s = Ze, p = el, x = ll, ge = ol, ce = tl, A = al, Ve = nl, H = ul, _e = il, ye = he, Ce = dl;
182
+ const m = qe, x = We, _ = Qe, be = Xe, L = Ye, O = Je, P = Ge, ve = je, s = Ze, p = el, w = ll, ge = ol, ce = tl, A = al, Ve = nl, H = ul, _e = il, ye = he, Ce = dl;
180
183
  return d(), S(Ce, {
181
184
  modelValue: D.value,
182
185
  "onUpdate:modelValue": e[28] || (e[28] = (a) => D.value = a),
@@ -209,13 +212,13 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
209
212
  ])
210
213
  ]),
211
214
  default: n(() => [
212
- l(O, { style: { border: "1px solid #ebeef5", "border-radius": "4px", height: "600px" } }, {
215
+ l(P, { style: { border: "1px solid #ebeef5", "border-radius": "4px", height: "600px" } }, {
213
216
  default: n(() => [
214
217
  l(ve, { width: "300px" }, {
215
218
  default: n(() => [
216
- l(O, null, {
219
+ l(P, null, {
217
220
  default: n(() => [
218
- l($, {
221
+ l(x, {
219
222
  height: "40px",
220
223
  style: { "background-color": "#f2f2f2", "line-height": "40px" }
221
224
  }, {
@@ -234,7 +237,7 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
234
237
  ]),
235
238
  _: 1
236
239
  }),
237
- l(N, { style: { padding: "10px" } }, {
240
+ l(O, { style: { padding: "10px" } }, {
238
241
  default: n(() => [
239
242
  o(E) ? (d(), r("div", sl, [
240
243
  f("div", ml, [
@@ -244,7 +247,7 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
244
247
  "onUpdate:modelValue": e[0] || (e[0] = (a) => q(C) ? C.value = a : null),
245
248
  placeholder: "请输入弹层名称",
246
249
  size: "default",
247
- onKeyup: Fe(K, ["enter"]),
250
+ onKeyup: Fe(R, ["enter"]),
248
251
  class: "new-item-input"
249
252
  }, null, 8, ["modelValue"]),
250
253
  f("div", pl, [
@@ -262,7 +265,7 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
262
265
  type: "primary",
263
266
  size: "small",
264
267
  icon: o(xe),
265
- onClick: K
268
+ onClick: R
266
269
  }, {
267
270
  default: n(() => [...e[31] || (e[31] = [
268
271
  i(" 确认 ", -1)
@@ -297,7 +300,7 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
297
300
  onClick: G((c) => te(v), ["stop"])
298
301
  }, {
299
302
  default: n(() => [
300
- i(P(a.name), 1)
303
+ i(z(a.name), 1)
301
304
  ]),
302
305
  _: 2
303
306
  }, 1032, ["onClick"]), [
@@ -324,23 +327,23 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
324
327
  ]),
325
328
  _: 1
326
329
  }),
327
- l(N, { style: { "border-left": "1px solid #ebeef5", padding: "0" } }, {
330
+ l(O, { style: { "border-left": "1px solid #ebeef5", padding: "0" } }, {
328
331
  default: n(() => [
329
- o(b) !== -1 ? (d(), S(O, {
332
+ o(b) !== -1 ? (d(), S(P, {
330
333
  key: 0,
331
334
  style: { height: "100%" }
332
335
  }, {
333
336
  default: n(() => [
334
- l($, {
337
+ l(x, {
335
338
  height: "40px",
336
339
  class: "dialog-header"
337
340
  }, {
338
341
  default: n(() => [
339
- f("div", null, P(o(t).name), 1)
342
+ f("div", null, z(o(t).name), 1)
340
343
  ]),
341
344
  _: 1
342
345
  }),
343
- l(N, { style: { padding: "12px 20px 0 20px" } }, {
346
+ l(O, { style: { padding: "12px 20px 0 20px" } }, {
344
347
  default: n(() => [
345
348
  l(A, null, {
346
349
  default: n(() => [
@@ -364,7 +367,7 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
364
367
  }),
365
368
  l(s, { label: "弹层尺寸" }, {
366
369
  default: n(() => [
367
- l(x, {
370
+ l(w, {
368
371
  modelValue: o(t).dialogSize,
369
372
  "onUpdate:modelValue": e[3] || (e[3] = (a) => o(t).dialogSize = a)
370
373
  }, {
@@ -432,7 +435,7 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
432
435
  }),
433
436
  l(s, { label: "弹层类型" }, {
434
437
  default: n(() => [
435
- l(x, {
438
+ l(w, {
436
439
  modelValue: o(t).contentSource,
437
440
  "onUpdate:modelValue": e[7] || (e[7] = (a) => o(t).contentSource = a)
438
441
  }, {
@@ -470,7 +473,7 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
470
473
  o(t).contentSource === "table" ? (d(), r(V, { key: 1 }, [
471
474
  l(s, { label: "列表内容" }, {
472
475
  default: n(() => [
473
- l(x, {
476
+ l(w, {
474
477
  modelValue: o(t).tableContent,
475
478
  "onUpdate:modelValue": e[8] || (e[8] = (a) => o(t).tableContent = a)
476
479
  }, {
@@ -667,7 +670,7 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
667
670
  o(t).isSubTableReadOnly ? y("", !0) : (d(), r(V, { key: 2 }, [
668
671
  l(s, { label: "选择模式" }, {
669
672
  default: n(() => [
670
- l(x, {
673
+ l(w, {
671
674
  modelValue: o(t).selectionMode,
672
675
  "onUpdate:modelValue": e[18] || (e[18] = (a) => o(t).selectionMode = a)
673
676
  }, {
@@ -705,7 +708,7 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
705
708
  "onUpdate:formulaConf": e[19] || (e[19] = (a) => o(t).displayFormat = a),
706
709
  modelValue: o(t).displayFormatText,
707
710
  "onUpdate:modelValue": e[20] || (e[20] = (a) => o(t).displayFormatText = a),
708
- fieldList: o(R)
711
+ fieldList: o($)
709
712
  }, null, 8, ["formulaConf", "modelValue", "fieldList"])
710
713
  ]),
711
714
  _: 1
@@ -717,7 +720,7 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
717
720
  "onUpdate:modelValue": e[21] || (e[21] = (a) => o(t).fieldMapping = a),
718
721
  fieldLabel: "赋值表单字段",
719
722
  valueLabel: "列表字段",
720
- valueOptions: o(R),
723
+ valueOptions: o($),
721
724
  valueSelectMode: ""
722
725
  }, null, 8, ["modelValue", "valueOptions"])
723
726
  ]),
@@ -753,7 +756,7 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
753
756
  }),
754
757
  l(s, { label: "表单模式" }, {
755
758
  default: n(() => [
756
- l(x, {
759
+ l(w, {
757
760
  modelValue: o(t).subFormMode,
758
761
  "onUpdate:modelValue": e[25] || (e[25] = (a) => o(t).subFormMode = a)
759
762
  }, {
@@ -779,14 +782,14 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
779
782
  l(s, { label: "表单底部按钮" }, {
780
783
  default: n(() => [
781
784
  f("div", Tl, [
782
- !o(B) || o(B).length === 0 ? (d(), r("div", Fl, " 暂无可用按钮 ")) : (d(), r("div", Sl, [
783
- (d(!0), r(V, null, I(o(B), (a) => (d(), S(_e, {
785
+ !o(N) || o(N).length === 0 ? (d(), r("div", Fl, " 暂无可用按钮 ")) : (d(), r("div", Sl, [
786
+ (d(!0), r(V, null, I(o(N), (a) => (d(), S(_e, {
784
787
  key: a.id,
785
788
  "model-value": se(a.id),
786
789
  onChange: (v) => me(a)
787
790
  }, {
788
791
  default: n(() => [
789
- i(P(a.label), 1)
792
+ i(z(a.label), 1)
790
793
  ]),
791
794
  _: 2
792
795
  }, 1032, ["model-value", "onChange"]))), 128))
@@ -833,7 +836,7 @@ const sl = { key: 0 }, ml = { class: "dialog-menu-item is-editing" }, rl = { cla
833
836
  }, 8, ["modelValue"]);
834
837
  };
835
838
  }
836
- }, Bo = /* @__PURE__ */ He(Ul, [["__scopeId", "data-v-269f2565"]]);
839
+ }, Bo = /* @__PURE__ */ He(Ul, [["__scopeId", "data-v-8f751b6e"]]);
837
840
  export {
838
841
  Bo as default
839
842
  };
@@ -160,5 +160,6 @@ const e = {
160
160
  }
161
161
  ];
162
162
  export {
163
- d as default
163
+ d as default,
164
+ e as defaultProperty
164
165
  };