@kp-ui/lowcode 2.14.0-beta.12 → 2.14.0-beta.13
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/package.json +1 -1
- package/src/components/form-designer/designer.js +78 -75
- package/src/components/form-designer/form-widget/container-widget/index.js +6 -6
- package/src/components/form-designer/form-widget/container-widget/vf-dialog-widget.vue.js +25 -25
- package/src/components/form-designer/form-widget/index.vue.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +2 -2
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +167 -161
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/formCode-editor.vue.js +23 -19
- package/src/components/form-designer/widget-panel/PanelItemDrag.vue.js +50 -0
- package/src/components/form-designer/widget-panel/PanelItemDrag.vue2.js +4 -0
- package/src/components/form-designer/widget-panel/index.vue.js +4 -338
- package/src/components/form-designer/widget-panel/index.vue2.js +82 -0
- package/src/components/form-designer/widget-panel/widgetsConfig.js +19 -18
- package/stats.html +1 -1
- package/styles/style.css +1 -1
- package/src/components/form-designer/widget-panel/templatesConfig.js +0 -53
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as X, ref as z, computed as Y, resolveComponent as _, createElementBlock as N, openBlock as c, Fragment as Z, createVNode as m, unref as u, withCtx as r, createTextVNode as v, toDisplayString as C, createElementVNode as B, createBlock as p, createCommentVNode as g, normalizeClass as ee, nextTick as te } from "vue";
|
|
2
|
+
import { useI18n as le } from "../../../../../utils/i18n.js";
|
|
3
|
+
import ne from "../../../../code-editor/code-modal-editor.vue.js";
|
|
4
4
|
import { cloneDeep as E } from "lodash-es";
|
|
5
|
-
import { TpfModal as
|
|
6
|
-
import { message as
|
|
7
|
-
const
|
|
5
|
+
import { TpfModal as ie } from "tmgc2-share";
|
|
6
|
+
import { message as M } from "ant-design-vue";
|
|
7
|
+
const ae = {
|
|
8
8
|
class: "table-wrap"
|
|
9
|
-
},
|
|
9
|
+
}, de = {
|
|
10
10
|
key: 2,
|
|
11
11
|
style: {
|
|
12
12
|
"text-align": "center"
|
|
13
13
|
}
|
|
14
|
-
},
|
|
14
|
+
}, se = {
|
|
15
15
|
class: "add-btn"
|
|
16
|
-
},
|
|
16
|
+
}, fe = /* @__PURE__ */ X({
|
|
17
17
|
name: "tableColumns-editor",
|
|
18
18
|
inheritAttrs: !1,
|
|
19
19
|
__name: "data-table-tableColumns-editor",
|
|
@@ -22,12 +22,12 @@ const le = {
|
|
|
22
22
|
selectedWidget: {},
|
|
23
23
|
optionModel: {}
|
|
24
24
|
},
|
|
25
|
-
setup(
|
|
26
|
-
expose:
|
|
25
|
+
setup($, {
|
|
26
|
+
expose: V
|
|
27
27
|
}) {
|
|
28
28
|
const {
|
|
29
|
-
i18nt:
|
|
30
|
-
} =
|
|
29
|
+
i18nt: t
|
|
30
|
+
} = le(), I = $, A = z(null), w = z(!1), s = z([]), R = z(null), T = z(!0), O = [{
|
|
31
31
|
value: "left",
|
|
32
32
|
label: "left"
|
|
33
33
|
}, {
|
|
@@ -36,194 +36,200 @@ const le = {
|
|
|
36
36
|
}, {
|
|
37
37
|
value: "right",
|
|
38
38
|
label: "right"
|
|
39
|
-
}],
|
|
39
|
+
}], L = Y(() => [{
|
|
40
40
|
title: "序号",
|
|
41
41
|
dataIndex: "index",
|
|
42
|
-
width:
|
|
42
|
+
width: 150,
|
|
43
43
|
fixed: "left",
|
|
44
44
|
rowDrag: !0,
|
|
45
45
|
resizable: !0,
|
|
46
|
-
// customRender: ({ index }: { index: number }) => index + 1
|
|
47
46
|
customRender: ({
|
|
48
|
-
record:
|
|
49
|
-
index:
|
|
47
|
+
record: i,
|
|
48
|
+
index: l
|
|
50
49
|
}) => {
|
|
51
|
-
const e = (
|
|
52
|
-
for (let k = 0; k <
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
50
|
+
const e = (f, h, b = []) => {
|
|
51
|
+
for (let k = 0; k < h.length; k++) {
|
|
52
|
+
const y = h[k];
|
|
53
|
+
if (y.columnId === f.columnId)
|
|
55
54
|
return [...b, k + 1].join(".");
|
|
56
|
-
if (
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
55
|
+
if (y.children) {
|
|
56
|
+
const U = e(f, y.children, [...b, k + 1]);
|
|
57
|
+
if (U) return U;
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
return "";
|
|
62
61
|
};
|
|
63
|
-
return e(
|
|
62
|
+
return e(i, s.value);
|
|
64
63
|
}
|
|
65
64
|
}, {
|
|
66
|
-
title:
|
|
65
|
+
title: t("designer.setting.columnName"),
|
|
67
66
|
dataIndex: "dataIndex",
|
|
68
67
|
resizable: !0,
|
|
69
68
|
width: 150
|
|
70
69
|
}, {
|
|
71
|
-
title:
|
|
70
|
+
title: t("designer.setting.columnLabel"),
|
|
72
71
|
dataIndex: "title",
|
|
73
72
|
align: "center",
|
|
74
73
|
resizable: !0,
|
|
75
74
|
width: 100
|
|
76
75
|
}, {
|
|
77
|
-
title:
|
|
76
|
+
title: t("designer.setting.columnWidth"),
|
|
78
77
|
dataIndex: "width",
|
|
79
78
|
resizable: !0,
|
|
80
79
|
width: 120
|
|
81
80
|
}, {
|
|
82
|
-
title:
|
|
81
|
+
title: t("designer.setting.visibleColumn"),
|
|
83
82
|
dataIndex: "show",
|
|
84
83
|
resizable: !0,
|
|
85
84
|
width: 90
|
|
86
85
|
}, {
|
|
87
|
-
title:
|
|
86
|
+
title: t("designer.setting.sortableColumn"),
|
|
88
87
|
dataIndex: "sorter",
|
|
89
88
|
resizable: !0,
|
|
90
89
|
width: 90
|
|
91
90
|
}, {
|
|
92
|
-
title:
|
|
91
|
+
title: t("designer.setting.resizableColumn"),
|
|
93
92
|
dataIndex: "resizable",
|
|
94
93
|
resizable: !0,
|
|
95
94
|
width: 120
|
|
96
95
|
}, {
|
|
97
|
-
title:
|
|
96
|
+
title: t("designer.setting.ellipsisColumn"),
|
|
98
97
|
dataIndex: "ellipsis",
|
|
99
98
|
resizable: !0,
|
|
100
99
|
width: 150
|
|
101
100
|
}, {
|
|
102
|
-
title:
|
|
101
|
+
title: t("designer.setting.fixedColumn"),
|
|
103
102
|
dataIndex: "fixed",
|
|
104
103
|
resizable: !0,
|
|
105
104
|
width: 100
|
|
106
105
|
}, {
|
|
107
|
-
title:
|
|
106
|
+
title: t("designer.setting.alignTypeOfColumn"),
|
|
108
107
|
dataIndex: "align",
|
|
109
108
|
resizable: !0,
|
|
110
109
|
width: 100
|
|
111
110
|
}, {
|
|
112
|
-
title:
|
|
111
|
+
title: t("designer.setting.customRender"),
|
|
113
112
|
dataIndex: "customRender",
|
|
114
113
|
width: 120,
|
|
115
114
|
resizable: !0,
|
|
116
115
|
fixed: "right"
|
|
117
116
|
}, {
|
|
118
|
-
title:
|
|
117
|
+
title: t("designer.setting.actionColumn"),
|
|
119
118
|
dataIndex: "action",
|
|
120
119
|
width: 160,
|
|
121
120
|
fixed: "right"
|
|
122
|
-
}]),
|
|
121
|
+
}]), F = (i, l) => {
|
|
123
122
|
var e;
|
|
124
|
-
R.value =
|
|
125
|
-
},
|
|
126
|
-
R.value !== null && (
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
123
|
+
R.value = i, (e = A.value) == null || e.open(l.customRender || "");
|
|
124
|
+
}, H = (i) => {
|
|
125
|
+
R.value !== null && (s.value[R.value].customRender = i);
|
|
126
|
+
}, P = {
|
|
127
|
+
isAutoWidth: !1,
|
|
128
|
+
columnId: "",
|
|
129
|
+
show: !0,
|
|
130
|
+
width: 150,
|
|
131
|
+
sorter: !1,
|
|
132
|
+
customRender: "",
|
|
133
|
+
fixed: "",
|
|
134
|
+
align: "left",
|
|
135
|
+
title: "标题名",
|
|
136
|
+
dataIndex: "",
|
|
137
|
+
resizable: !0,
|
|
138
|
+
showSorterTooltip: !1,
|
|
139
|
+
children: []
|
|
140
|
+
}, j = () => {
|
|
141
|
+
const i = {
|
|
142
|
+
...P,
|
|
143
|
+
columnId: (/* @__PURE__ */ new Date()).getTime()
|
|
141
144
|
};
|
|
142
|
-
|
|
143
|
-
}, d = (
|
|
144
|
-
let
|
|
145
|
-
for (let e = 0; e <
|
|
146
|
-
const
|
|
147
|
-
if (Array.isArray(
|
|
148
|
-
|
|
145
|
+
s.value.push(i), I.designer.emitHistoryChange();
|
|
146
|
+
}, d = (i) => {
|
|
147
|
+
let l = s.value;
|
|
148
|
+
for (let e = 0; e < i.length; e++) {
|
|
149
|
+
const f = i[e];
|
|
150
|
+
if (Array.isArray(l))
|
|
151
|
+
l = l[f];
|
|
149
152
|
else
|
|
150
|
-
return
|
|
151
|
-
e !==
|
|
153
|
+
return l;
|
|
154
|
+
e !== i.length - 1 && (l = l.children || []);
|
|
152
155
|
}
|
|
153
|
-
return
|
|
154
|
-
},
|
|
155
|
-
for (let
|
|
156
|
-
const
|
|
157
|
-
if (
|
|
158
|
-
|
|
156
|
+
return l;
|
|
157
|
+
}, D = (i, l, e) => {
|
|
158
|
+
for (let f = 0; f < i.length; f++) {
|
|
159
|
+
const h = i[f];
|
|
160
|
+
if (h.columnId === l.columnId) {
|
|
161
|
+
h.children || (h.children = []), h.children.push(e);
|
|
159
162
|
return;
|
|
160
163
|
}
|
|
161
|
-
|
|
164
|
+
h.children && D(h.children, l, e);
|
|
162
165
|
}
|
|
163
|
-
}, S = (
|
|
164
|
-
if (e.columnId ===
|
|
166
|
+
}, S = (i, l) => i.filter((e) => {
|
|
167
|
+
if (e.columnId === l)
|
|
165
168
|
return !1;
|
|
166
169
|
if (e.children && Array.isArray(e.children) && e.children.length > 0) {
|
|
167
|
-
const
|
|
168
|
-
e.children =
|
|
170
|
+
const f = S(e.children, l);
|
|
171
|
+
e.children = f;
|
|
169
172
|
}
|
|
170
173
|
return !0;
|
|
171
|
-
}),
|
|
172
|
-
if (
|
|
173
|
-
return
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
}), q = (i, l) => {
|
|
175
|
+
if (s.value.length === 1 && !s.value[0].children)
|
|
176
|
+
return M.warning(t("designer.setting.onlyOneColumnCannotBeDeleted")), !1;
|
|
177
|
+
if (s.value.length === 1 && s.value[0].children.length === 0)
|
|
178
|
+
return M.warning(t("designer.setting.onlyOneColumnCannotBeDeleted")), !1;
|
|
179
|
+
s.value = S(s.value, i.columnId);
|
|
180
|
+
}, G = async (i, l) => {
|
|
176
181
|
const e = {
|
|
177
|
-
...
|
|
178
|
-
children:
|
|
182
|
+
...s.value[l],
|
|
183
|
+
children: void 0,
|
|
179
184
|
columnId: (/* @__PURE__ */ new Date()).getTime()
|
|
180
185
|
};
|
|
181
|
-
T(
|
|
182
|
-
},
|
|
183
|
-
I.optionModel.tableColumns = E(
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
+
T.value = !1, D(s.value, i, e), await te(), T.value = !0;
|
|
187
|
+
}, J = () => {
|
|
188
|
+
I.optionModel.tableColumns = E(s.value), w.value = !1;
|
|
189
|
+
}, W = () => {
|
|
190
|
+
w.value = !0, s.value = E(I.optionModel.tableColumns);
|
|
186
191
|
};
|
|
187
|
-
return
|
|
188
|
-
openSetting:
|
|
189
|
-
}), (
|
|
190
|
-
const e = _("a-button"),
|
|
191
|
-
return
|
|
192
|
-
label:
|
|
192
|
+
return V({
|
|
193
|
+
openSetting: W
|
|
194
|
+
}), (i, l) => {
|
|
195
|
+
const e = _("a-button"), f = _("a-form-item"), h = _("a-input"), b = _("a-switch"), k = _("a-select-option"), y = _("a-select"), U = _("a-space"), K = _("s-table");
|
|
196
|
+
return c(), N(Z, null, [m(f, {
|
|
197
|
+
label: u(t)("designer.setting.tableColEdit")
|
|
193
198
|
}, {
|
|
194
|
-
default: r(() => [
|
|
199
|
+
default: r(() => [m(e, {
|
|
195
200
|
type: "primary",
|
|
196
201
|
shape: "round",
|
|
197
|
-
onClick:
|
|
202
|
+
onClick: W
|
|
198
203
|
}, {
|
|
199
|
-
default: r(() => [v(C(
|
|
204
|
+
default: r(() => [v(C(u(t)("designer.setting.editAction")), 1)]),
|
|
200
205
|
_: 1
|
|
201
206
|
})]),
|
|
202
207
|
_: 1
|
|
203
|
-
}, 8, ["label"]),
|
|
204
|
-
title:
|
|
205
|
-
visible:
|
|
206
|
-
"onUpdate:visible":
|
|
208
|
+
}, 8, ["label"]), m(u(ie), {
|
|
209
|
+
title: u(t)("designer.setting.tableColEdit"),
|
|
210
|
+
visible: w.value,
|
|
211
|
+
"onUpdate:visible": l[2] || (l[2] = (o) => w.value = o),
|
|
207
212
|
width: "1200px"
|
|
208
213
|
}, {
|
|
209
|
-
footerRight: r(() => [
|
|
214
|
+
footerRight: r(() => [m(e, {
|
|
210
215
|
size: "default",
|
|
211
|
-
onClick:
|
|
216
|
+
onClick: l[1] || (l[1] = (o) => w.value = !1)
|
|
212
217
|
}, {
|
|
213
|
-
default: r(() => [v(C(
|
|
218
|
+
default: r(() => [v(C(u(t)("designer.hint.cancel")), 1)]),
|
|
214
219
|
_: 1
|
|
215
|
-
}),
|
|
220
|
+
}), m(e, {
|
|
216
221
|
size: "default",
|
|
217
222
|
type: "primary",
|
|
218
|
-
onClick:
|
|
223
|
+
onClick: J
|
|
219
224
|
}, {
|
|
220
|
-
default: r(() => [v(C(
|
|
225
|
+
default: r(() => [v(C(u(t)("designer.hint.confirm")), 1)]),
|
|
221
226
|
_: 1
|
|
222
227
|
})]),
|
|
223
|
-
default: r(() => [
|
|
228
|
+
default: r(() => [B("div", ae, [T.value ? (c(), p(K, {
|
|
229
|
+
key: 0,
|
|
224
230
|
class: "tpf-surely-table",
|
|
225
231
|
"aria-hidden": "false",
|
|
226
|
-
dataSource:
|
|
232
|
+
dataSource: s.value,
|
|
227
233
|
style: {
|
|
228
234
|
width: "100%"
|
|
229
235
|
},
|
|
@@ -240,130 +246,130 @@ const le = {
|
|
|
240
246
|
},
|
|
241
247
|
pagination: !1,
|
|
242
248
|
resizable: "",
|
|
243
|
-
"row-key": (
|
|
244
|
-
columns:
|
|
249
|
+
"row-key": (o) => o.columnId,
|
|
250
|
+
columns: L.value
|
|
245
251
|
}, {
|
|
246
252
|
bodyCell: r(({
|
|
247
|
-
column:
|
|
253
|
+
column: o,
|
|
248
254
|
record: x,
|
|
249
|
-
index:
|
|
255
|
+
index: Q,
|
|
250
256
|
recordIndexs: a
|
|
251
|
-
}) => [
|
|
257
|
+
}) => [o.dataIndex === "dataIndex" ? (c(), p(h, {
|
|
252
258
|
key: 0,
|
|
253
259
|
value: d(a).dataIndex,
|
|
254
|
-
"onUpdate:value": (
|
|
255
|
-
}, null, 8, ["value", "onUpdate:value"])) :
|
|
260
|
+
"onUpdate:value": (n) => d(a).dataIndex = n
|
|
261
|
+
}, null, 8, ["value", "onUpdate:value"])) : g("", !0), o.dataIndex === "title" ? (c(), p(h, {
|
|
256
262
|
key: 1,
|
|
257
263
|
value: d(a).title,
|
|
258
|
-
"onUpdate:value": (
|
|
259
|
-
}, null, 8, ["value", "onUpdate:value"])) :
|
|
260
|
-
"checked-children":
|
|
261
|
-
checked:
|
|
262
|
-
"onUpdate:checked": (
|
|
263
|
-
}, null, 8, ["checked-children", "checked", "onUpdate:checked"]), x.isAutoWidth ?
|
|
264
|
+
"onUpdate:value": (n) => d(a).title = n
|
|
265
|
+
}, null, 8, ["value", "onUpdate:value"])) : g("", !0), o.dataIndex === "width" ? (c(), N("div", de, [m(b, {
|
|
266
|
+
"checked-children": u(t)("designer.setting.autoWidth"),
|
|
267
|
+
checked: s.value[a[0]].isAutoWidth,
|
|
268
|
+
"onUpdate:checked": (n) => s.value[a[0]].isAutoWidth = n
|
|
269
|
+
}, null, 8, ["checked-children", "checked", "onUpdate:checked"]), x.isAutoWidth ? g("", !0) : (c(), p(h, {
|
|
264
270
|
key: 0,
|
|
265
271
|
value: d(a).width,
|
|
266
|
-
"onUpdate:value": (
|
|
267
|
-
}, null, 8, ["value", "onUpdate:value"]))])) :
|
|
272
|
+
"onUpdate:value": (n) => d(a).width = n
|
|
273
|
+
}, null, 8, ["value", "onUpdate:value"]))])) : g("", !0), o.dataIndex === "show" ? (c(), p(b, {
|
|
268
274
|
key: 3,
|
|
269
275
|
checked: d(a).show,
|
|
270
|
-
"onUpdate:checked": (
|
|
271
|
-
}, null, 8, ["checked", "onUpdate:checked"])) :
|
|
276
|
+
"onUpdate:checked": (n) => d(a).show = n
|
|
277
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : g("", !0), o.dataIndex === "sorter" ? (c(), p(b, {
|
|
272
278
|
key: 4,
|
|
273
279
|
checked: d(a).sorter,
|
|
274
|
-
"onUpdate:checked": (
|
|
275
|
-
}, null, 8, ["checked", "onUpdate:checked"])) :
|
|
280
|
+
"onUpdate:checked": (n) => d(a).sorter = n
|
|
281
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : g("", !0), o.dataIndex === "resizable" ? (c(), p(b, {
|
|
276
282
|
key: 5,
|
|
277
283
|
checked: d(a).resizable,
|
|
278
|
-
"onUpdate:checked": (
|
|
279
|
-
}, null, 8, ["checked", "onUpdate:checked"])) :
|
|
284
|
+
"onUpdate:checked": (n) => d(a).resizable = n
|
|
285
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : g("", !0), o.dataIndex === "ellipsis" ? (c(), p(b, {
|
|
280
286
|
key: 6,
|
|
281
287
|
checked: d(a).ellipsis,
|
|
282
|
-
"onUpdate:checked": (
|
|
283
|
-
}, null, 8, ["checked", "onUpdate:checked"])) :
|
|
288
|
+
"onUpdate:checked": (n) => d(a).ellipsis = n
|
|
289
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : g("", !0), o.dataIndex === "fixed" ? (c(), p(y, {
|
|
284
290
|
key: 7,
|
|
285
291
|
value: d(a).fixed,
|
|
286
|
-
"onUpdate:value": (
|
|
292
|
+
"onUpdate:value": (n) => d(a).fixed = n,
|
|
287
293
|
allowClear: "",
|
|
288
294
|
style: {
|
|
289
295
|
width: "100%"
|
|
290
296
|
}
|
|
291
297
|
}, {
|
|
292
|
-
default: r(() => [
|
|
298
|
+
default: r(() => [m(k, {
|
|
293
299
|
value: "left"
|
|
294
300
|
}, {
|
|
295
|
-
default: r(() => [v(C(
|
|
301
|
+
default: r(() => [v(C(u(t)("designer.setting.fixedLeft")), 1)]),
|
|
296
302
|
_: 1
|
|
297
|
-
}),
|
|
303
|
+
}), m(k, {
|
|
298
304
|
value: "right"
|
|
299
305
|
}, {
|
|
300
|
-
default: r(() => [v(C(
|
|
306
|
+
default: r(() => [v(C(u(t)("designer.setting.fixedRight")), 1)]),
|
|
301
307
|
_: 1
|
|
302
308
|
})]),
|
|
303
309
|
_: 2
|
|
304
|
-
}, 1032, ["value", "onUpdate:value"])) :
|
|
310
|
+
}, 1032, ["value", "onUpdate:value"])) : g("", !0), o.dataIndex === "align" ? (c(), p(y, {
|
|
305
311
|
key: 8,
|
|
306
312
|
style: {
|
|
307
313
|
width: "100%"
|
|
308
314
|
},
|
|
309
315
|
value: d(a).align,
|
|
310
|
-
"onUpdate:value": (
|
|
311
|
-
options:
|
|
312
|
-
}, null, 8, ["value", "onUpdate:value"])) :
|
|
316
|
+
"onUpdate:value": (n) => d(a).align = n,
|
|
317
|
+
options: O
|
|
318
|
+
}, null, 8, ["value", "onUpdate:value"])) : g("", !0), o.dataIndex === "customRender" ? (c(), p(e, {
|
|
313
319
|
key: 9,
|
|
314
|
-
onClick: (
|
|
315
|
-
class:
|
|
320
|
+
onClick: (n) => F(a[0], x),
|
|
321
|
+
class: ee([{
|
|
316
322
|
"button-text-highlight": !!x.customRender
|
|
317
323
|
}]),
|
|
318
324
|
size: "small",
|
|
319
325
|
shape: "round"
|
|
320
326
|
}, {
|
|
321
|
-
default: r(() => [v(C(
|
|
327
|
+
default: r(() => [v(C(u(t)("designer.setting.edit")), 1)]),
|
|
322
328
|
_: 2
|
|
323
|
-
}, 1032, ["onClick", "class"])) :
|
|
329
|
+
}, 1032, ["onClick", "class"])) : g("", !0), o.dataIndex === "action" ? (c(), p(U, {
|
|
324
330
|
key: 10
|
|
325
331
|
}, {
|
|
326
|
-
default: r(() => [
|
|
327
|
-
title:
|
|
332
|
+
default: r(() => [m(e, {
|
|
333
|
+
title: u(t)("designer.setting.addSubsets"),
|
|
328
334
|
size: "small",
|
|
329
|
-
onClick: (
|
|
335
|
+
onClick: (n) => G(x, Q),
|
|
330
336
|
type: "text"
|
|
331
337
|
}, {
|
|
332
|
-
default: r(() =>
|
|
338
|
+
default: r(() => l[3] || (l[3] = [v(" 增加子集 ")])),
|
|
333
339
|
_: 2,
|
|
334
340
|
__: [3]
|
|
335
|
-
}, 1032, ["title", "onClick"]),
|
|
336
|
-
title:
|
|
341
|
+
}, 1032, ["title", "onClick"]), m(e, {
|
|
342
|
+
title: u(t)("designer.setting.deleteTableColumn"),
|
|
337
343
|
size: "small",
|
|
338
|
-
onClick: (
|
|
344
|
+
onClick: (n) => q(x),
|
|
339
345
|
type: "text"
|
|
340
346
|
}, {
|
|
341
|
-
default: r(() => [v(C(
|
|
347
|
+
default: r(() => [v(C(u(t)("designer.setting.delete")), 1)]),
|
|
342
348
|
_: 2
|
|
343
349
|
}, 1032, ["title", "onClick"])]),
|
|
344
350
|
_: 2
|
|
345
|
-
}, 1024)) :
|
|
351
|
+
}, 1024)) : g("", !0)]),
|
|
346
352
|
_: 1
|
|
347
|
-
}, 8, ["dataSource", "row-key", "columns"]),
|
|
348
|
-
title:
|
|
353
|
+
}, 8, ["dataSource", "row-key", "columns"])) : g("", !0), B("div", se, [m(e, {
|
|
354
|
+
title: u(t)("designer.setting.addTableColumn"),
|
|
349
355
|
type: "primary",
|
|
350
356
|
size: "medium",
|
|
351
|
-
onClick:
|
|
357
|
+
onClick: l[0] || (l[0] = (o) => j())
|
|
352
358
|
}, {
|
|
353
|
-
default: r(() => [v(C(
|
|
359
|
+
default: r(() => [v(C(u(t)("designer.setting.addTableColumn")), 1)]),
|
|
354
360
|
_: 1
|
|
355
361
|
}, 8, ["title"])])])]),
|
|
356
362
|
_: 1
|
|
357
|
-
}, 8, ["title", "visible"]),
|
|
358
|
-
onSave:
|
|
363
|
+
}, 8, ["title", "visible"]), m(ne, {
|
|
364
|
+
onSave: H,
|
|
359
365
|
ref_key: "CodeModalEditorRef",
|
|
360
366
|
ref: A,
|
|
361
|
-
title:
|
|
367
|
+
title: u(t)("designer.setting.renderFunction"),
|
|
362
368
|
"fn-params": "scope"
|
|
363
369
|
}, null, 8, ["title"])], 64);
|
|
364
370
|
};
|
|
365
371
|
}
|
|
366
372
|
});
|
|
367
373
|
export {
|
|
368
|
-
|
|
374
|
+
fe as default
|
|
369
375
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as n, createBlock as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import m from "../../../../../utils/i18n.js";
|
|
2
|
+
import { resolveComponent as n, createBlock as l, openBlock as p, withCtx as f, createVNode as c } from "vue";
|
|
3
|
+
import C from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const h = {
|
|
5
5
|
name: "formCode-editor",
|
|
6
|
-
mixins: [
|
|
6
|
+
mixins: [m],
|
|
7
7
|
props: {
|
|
8
8
|
designer: Object,
|
|
9
9
|
selectedWidget: Object,
|
|
@@ -18,8 +18,11 @@ const u = {
|
|
|
18
18
|
this.getOps();
|
|
19
19
|
},
|
|
20
20
|
methods: {
|
|
21
|
+
handleChangeFormCode(o) {
|
|
22
|
+
this.optionModel.formCode = o, this.optionModel.formId = this.ops.find((e) => e.formCode === o).formId;
|
|
23
|
+
},
|
|
21
24
|
async getOps() {
|
|
22
|
-
const
|
|
25
|
+
const o = {
|
|
23
26
|
pageCode: "FormDefinitionManagement",
|
|
24
27
|
conditions: [],
|
|
25
28
|
requiredFields: ["formCode", "terminalTypeName", "entityCode"],
|
|
@@ -27,28 +30,29 @@ const u = {
|
|
|
27
30
|
pageSize: null,
|
|
28
31
|
sorts: []
|
|
29
32
|
};
|
|
30
|
-
this.ops = await this.$http.post("/api/tmgc2-query/dataQuery/execute",
|
|
33
|
+
this.ops = await this.$http.post("/api/tmgc2-query/dataQuery/execute", o).then((e) => e.data.object.list || []).then((e) => e.map((t) => ({ formCode: t.formCode })));
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
36
|
};
|
|
34
|
-
function
|
|
35
|
-
const
|
|
36
|
-
return
|
|
37
|
-
label:
|
|
37
|
+
function u(o, e, t, g, r, a) {
|
|
38
|
+
const d = n("a-select"), i = n("a-form-item");
|
|
39
|
+
return p(), l(i, {
|
|
40
|
+
label: o.i18nt("designer.setting.formCode")
|
|
38
41
|
}, {
|
|
39
|
-
default:
|
|
40
|
-
c(
|
|
41
|
-
value:
|
|
42
|
-
"onUpdate:value": e[0] || (e[0] = (s) =>
|
|
42
|
+
default: f(() => [
|
|
43
|
+
c(d, {
|
|
44
|
+
value: t.optionModel.formCode,
|
|
45
|
+
"onUpdate:value": e[0] || (e[0] = (s) => t.optionModel.formCode = s),
|
|
43
46
|
allowClear: "",
|
|
44
47
|
options: r.ops,
|
|
45
|
-
fieldNames: { label: "formCode", value: "formCode" }
|
|
46
|
-
|
|
48
|
+
fieldNames: { label: "formCode", value: "formCode" },
|
|
49
|
+
onChange: a.handleChangeFormCode
|
|
50
|
+
}, null, 8, ["value", "options", "onChange"])
|
|
47
51
|
]),
|
|
48
52
|
_: 1
|
|
49
53
|
}, 8, ["label"]);
|
|
50
54
|
}
|
|
51
|
-
const
|
|
55
|
+
const v = /* @__PURE__ */ C(h, [["render", u]]);
|
|
52
56
|
export {
|
|
53
|
-
|
|
57
|
+
v as default
|
|
54
58
|
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { defineComponent as d, createBlock as g, openBlock as m, unref as o, withCtx as p, createElementVNode as i, createVNode as u, createTextVNode as f, toDisplayString as h } from "vue";
|
|
2
|
+
import { SvgIcon as k } from "tmgc2-share";
|
|
3
|
+
import { useI18n as C } from "../../../utils/i18n.js";
|
|
4
|
+
import _ from "../../../lib/vuedraggable/src/vuedraggable.js";
|
|
5
|
+
const y = ["title", "onDblclick"], x = /* @__PURE__ */ d({
|
|
6
|
+
name: "PanelItemDrag",
|
|
7
|
+
__name: "PanelItemDrag",
|
|
8
|
+
props: {
|
|
9
|
+
designer: {},
|
|
10
|
+
items: {}
|
|
11
|
+
},
|
|
12
|
+
setup(s) {
|
|
13
|
+
const { i18n2t: l } = C(), n = s, r = (e) => n.designer.copyNewContainerWidget(e), a = (e) => n.designer.checkWidgetMove(e), c = (e) => {
|
|
14
|
+
n.designer.addWidget(e);
|
|
15
|
+
};
|
|
16
|
+
return (e, v) => (m(), g(o(_), {
|
|
17
|
+
tag: "ul",
|
|
18
|
+
list: e.items,
|
|
19
|
+
"item-key": "key",
|
|
20
|
+
group: { name: "dragGroup", pull: "clone", put: !1 },
|
|
21
|
+
clone: r,
|
|
22
|
+
"ghost-class": "ghost",
|
|
23
|
+
sort: !1,
|
|
24
|
+
move: a
|
|
25
|
+
}, {
|
|
26
|
+
item: p(({ element: t }) => [
|
|
27
|
+
i("li", {
|
|
28
|
+
class: "container-widget-item",
|
|
29
|
+
title: t.displayName,
|
|
30
|
+
onDblclick: (b) => c(t)
|
|
31
|
+
}, [
|
|
32
|
+
i("span", null, [
|
|
33
|
+
u(o(k), {
|
|
34
|
+
"icon-class": "icon-" + t.icon,
|
|
35
|
+
class: "color-svg-icon"
|
|
36
|
+
}, null, 8, ["icon-class"]),
|
|
37
|
+
f(" " + h(o(l)(
|
|
38
|
+
`designer.widgetLabel.${t.type}`,
|
|
39
|
+
`extension.widgetLabel.${t.type}`
|
|
40
|
+
)), 1)
|
|
41
|
+
])
|
|
42
|
+
], 40, y)
|
|
43
|
+
]),
|
|
44
|
+
_: 1
|
|
45
|
+
}, 8, ["list"]));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
export {
|
|
49
|
+
x as default
|
|
50
|
+
};
|