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.
- package/es/node_modules/element-plus/{dist/locale → es/locale/lang}/zh-cn.js +0 -1
- package/es/src/components/FieldSetMapping.vue.js +245 -108
- package/es/src/components/TemplateSelector.vue.js +101 -81
- package/es/src/layout/aside/HiddenFieldDialog.vue.js +313 -0
- package/es/src/{packages/form → layout/aside}/fieldRecycleBin.vue.js +72 -64
- package/es/src/layout/aside/index.vue.js +47 -50
- package/es/src/layout/index.vue.js +81 -76
- package/es/src/packages/dialog/index.vue.js +41 -38
- package/es/src/packages/form/aside/index.js +2 -1
- package/es/src/packages/form/demo.js +8064 -0
- package/es/src/packages/form/headerBtn.vue.js +120 -99
- package/es/src/packages/form/index.vue.js +187 -171
- package/es/src/packages/table/index.vue.js +191 -155
- package/es/src/packages/table/queryModule/FixedModeConfig.vue.js +76 -77
- package/es/src/packages/table/queryModule/index.vue.js +108 -91
- package/es/src/packages/utils/common.js +33 -29
- package/es/style.css +1 -1
- package/package.json +1 -1
- package/es/src/packages/form/HiddenFieldDialog.vue.js +0 -258
- /package/es/src/{packages/form → layout/aside}/HiddenFieldDialog.vue2.js +0 -0
- /package/es/src/{packages/form → layout/aside}/fieldRecycleBin.vue2.js +0 -0
|
@@ -14,20 +14,20 @@ import "../../node_modules/element-plus/theme-chalk/el-checkbox.css.js";
|
|
|
14
14
|
import "../../node_modules/element-plus/theme-chalk/el-tooltip.css.js";
|
|
15
15
|
import "../../node_modules/element-plus/theme-chalk/el-table-column.css.js";
|
|
16
16
|
import "../../node_modules/element-plus/theme-chalk/el-button.css.js";
|
|
17
|
-
import { computed as P, ref as r, openBlock as
|
|
18
|
-
import { Setting as
|
|
19
|
-
import
|
|
17
|
+
import { computed as P, ref as r, openBlock as B, createElementBlock as j, Fragment as L, createVNode as a, createSlots as D, withCtx as i, unref as w, createElementVNode as z, createTextVNode as C, withKeys as O } from "vue";
|
|
18
|
+
import { Setting as R, Edit as F, Search as J } from "../../node_modules/@element-plus/icons-vue/dist/index.js";
|
|
19
|
+
import M from "../api/index.js";
|
|
20
20
|
import "../../node_modules/element-plus/theme-chalk/el-badge.css.js";
|
|
21
21
|
import "../../node_modules/element-plus/theme-chalk/el-message.css.js";
|
|
22
22
|
import "./TemplateSelector.vue2.js";
|
|
23
|
-
import
|
|
24
|
-
import { ElMessage as
|
|
25
|
-
import { ElButton as
|
|
26
|
-
import { ElInput as
|
|
27
|
-
import { ElTableColumn as
|
|
28
|
-
import { ElPagination as
|
|
29
|
-
import { ElDialog as
|
|
30
|
-
const
|
|
23
|
+
import Q from "../../_virtual/_plugin-vue_export-helper.js";
|
|
24
|
+
import { ElMessage as $ } from "../../node_modules/element-plus/es/components/message/index.js";
|
|
25
|
+
import { ElButton as q } from "../../node_modules/element-plus/es/components/button/index.js";
|
|
26
|
+
import { ElInput as A } from "../../node_modules/element-plus/es/components/input/index.js";
|
|
27
|
+
import { ElTableColumn as G, ElTable as H } from "../../node_modules/element-plus/es/components/table/index.js";
|
|
28
|
+
import { ElPagination as W } from "../../node_modules/element-plus/es/components/pagination/index.js";
|
|
29
|
+
import { ElDialog as X } from "../../node_modules/element-plus/es/components/dialog/index.js";
|
|
30
|
+
const Y = { class: "search-bar" }, Z = { class: "dialog-footer" }, ee = {
|
|
31
31
|
__name: "TemplateSelector",
|
|
32
32
|
props: {
|
|
33
33
|
modelValue: {
|
|
@@ -53,137 +53,157 @@ const H = { class: "search-bar" }, W = { class: "dialog-footer" }, X = {
|
|
|
53
53
|
"update:templateId",
|
|
54
54
|
"confirm"
|
|
55
55
|
],
|
|
56
|
-
setup(
|
|
57
|
-
const
|
|
58
|
-
get: () =>
|
|
59
|
-
set: (t) =>
|
|
60
|
-
}),
|
|
56
|
+
setup(v, { emit: V }) {
|
|
57
|
+
const y = v, d = V, s = P({
|
|
58
|
+
get: () => y.modelValue,
|
|
59
|
+
set: (t) => d("update:modelValue", t)
|
|
60
|
+
}), u = r(!1), c = r(""), _ = r([]), S = r(0), n = r(null), l = r({
|
|
61
61
|
pageNo: 1,
|
|
62
62
|
pageSize: 10
|
|
63
63
|
});
|
|
64
|
+
function b() {
|
|
65
|
+
u.value = !0, n.value = null, f();
|
|
66
|
+
}
|
|
64
67
|
function x() {
|
|
65
|
-
|
|
68
|
+
var m;
|
|
69
|
+
const t = ((m = n.value) == null ? void 0 : m.pkId) || y.templateId, e = window.location.href, p = new URL(e);
|
|
70
|
+
p.searchParams.set("pkId", t);
|
|
71
|
+
const g = p.toString();
|
|
72
|
+
window.open(g, "_blank");
|
|
66
73
|
}
|
|
67
|
-
async function
|
|
74
|
+
async function f() {
|
|
68
75
|
try {
|
|
69
76
|
const t = {
|
|
70
77
|
pageNo: l.value.pageNo,
|
|
71
78
|
pageSize: l.value.pageSize,
|
|
72
|
-
type:
|
|
79
|
+
type: y.templateType
|
|
73
80
|
};
|
|
74
|
-
|
|
75
|
-
const e = await
|
|
76
|
-
|
|
81
|
+
c.value && (t.dynamicQuery = c.value);
|
|
82
|
+
const e = await M.findTemplateByPagePop(t);
|
|
83
|
+
_.value = e.records || e.list || [], S.value = e.total || 0;
|
|
77
84
|
} catch (t) {
|
|
78
|
-
console.error("加载表单列表失败:", t),
|
|
85
|
+
console.error("加载表单列表失败:", t), _.value = [], S.value = 0;
|
|
79
86
|
} finally {
|
|
80
87
|
}
|
|
81
88
|
}
|
|
82
|
-
function
|
|
83
|
-
l.value.pageNo = 1,
|
|
89
|
+
function h() {
|
|
90
|
+
l.value.pageNo = 1, f();
|
|
84
91
|
}
|
|
85
92
|
function N(t) {
|
|
86
93
|
n.value = t;
|
|
87
94
|
}
|
|
88
|
-
function
|
|
89
|
-
l.value.pageSize = t, l.value.pageNo = 1,
|
|
95
|
+
function k(t) {
|
|
96
|
+
l.value.pageSize = t, l.value.pageNo = 1, f();
|
|
90
97
|
}
|
|
91
98
|
function T(t) {
|
|
92
|
-
l.value.pageNo = t,
|
|
99
|
+
l.value.pageNo = t, f();
|
|
93
100
|
}
|
|
94
|
-
function
|
|
101
|
+
function I() {
|
|
95
102
|
if (!n.value) {
|
|
96
|
-
|
|
103
|
+
$.warning("请先选择表单");
|
|
97
104
|
return;
|
|
98
105
|
}
|
|
99
|
-
|
|
106
|
+
s.value = n.value.templateName, d("update:templateKey", n.value.templateKey), d("update:templateId", n.value.pkId), u.value = !1;
|
|
100
107
|
const t = JSON.parse(n.value.context);
|
|
101
|
-
|
|
108
|
+
d("confirm", t);
|
|
102
109
|
}
|
|
103
110
|
return (t, e) => {
|
|
104
|
-
const
|
|
105
|
-
return
|
|
106
|
-
a(
|
|
107
|
-
modelValue:
|
|
108
|
-
"onUpdate:modelValue": e[0] || (e[0] = (o) =>
|
|
109
|
-
placeholder:
|
|
111
|
+
const p = q, g = A, m = G, E = H, U = W, K = X;
|
|
112
|
+
return B(), j(L, null, [
|
|
113
|
+
a(g, {
|
|
114
|
+
modelValue: s.value,
|
|
115
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => s.value = o),
|
|
116
|
+
placeholder: v.templateType == "table" ? "请选择列表" : "请选择表单",
|
|
110
117
|
readonly: ""
|
|
111
|
-
}, {
|
|
112
|
-
append:
|
|
113
|
-
a(
|
|
114
|
-
icon:
|
|
115
|
-
onClick:
|
|
118
|
+
}, D({
|
|
119
|
+
append: i(() => [
|
|
120
|
+
a(p, {
|
|
121
|
+
icon: w(R),
|
|
122
|
+
onClick: b
|
|
116
123
|
}, null, 8, ["icon"])
|
|
117
124
|
]),
|
|
118
|
-
_:
|
|
119
|
-
},
|
|
125
|
+
_: 2
|
|
126
|
+
}, [
|
|
127
|
+
s.value ? {
|
|
128
|
+
name: "prepend",
|
|
129
|
+
fn: i(() => [
|
|
130
|
+
a(p, {
|
|
131
|
+
icon: w(F),
|
|
132
|
+
onClick: x
|
|
133
|
+
}, null, 8, ["icon"])
|
|
134
|
+
]),
|
|
135
|
+
key: "0"
|
|
136
|
+
} : void 0
|
|
137
|
+
]), 1032, ["modelValue", "placeholder"]),
|
|
120
138
|
a(K, {
|
|
121
|
-
modelValue:
|
|
122
|
-
"onUpdate:modelValue": e[5] || (e[5] = (o) =>
|
|
139
|
+
modelValue: u.value,
|
|
140
|
+
"onUpdate:modelValue": e[5] || (e[5] = (o) => u.value = o),
|
|
123
141
|
width: "50%",
|
|
124
|
-
title:
|
|
142
|
+
title: v.templateType == "table" ? "选择列表" : "选择表单",
|
|
125
143
|
draggable: "",
|
|
126
144
|
overflow: "",
|
|
127
145
|
"append-to-body": "",
|
|
128
146
|
class: "fec-dev-designer-dialog"
|
|
129
147
|
}, {
|
|
130
|
-
footer:
|
|
131
|
-
|
|
132
|
-
a(
|
|
133
|
-
onClick: e[4] || (e[4] = (o) =>
|
|
148
|
+
footer: i(() => [
|
|
149
|
+
z("div", Z, [
|
|
150
|
+
a(p, {
|
|
151
|
+
onClick: e[4] || (e[4] = (o) => u.value = !1),
|
|
134
152
|
size: "default"
|
|
135
153
|
}, {
|
|
136
|
-
default:
|
|
137
|
-
|
|
154
|
+
default: i(() => [...e[6] || (e[6] = [
|
|
155
|
+
C("取消", -1)
|
|
138
156
|
])]),
|
|
139
157
|
_: 1
|
|
140
158
|
}),
|
|
141
|
-
a(
|
|
159
|
+
a(p, {
|
|
142
160
|
type: "primary",
|
|
143
|
-
onClick:
|
|
161
|
+
onClick: I,
|
|
144
162
|
size: "default"
|
|
145
163
|
}, {
|
|
146
|
-
default:
|
|
147
|
-
|
|
164
|
+
default: i(() => [...e[7] || (e[7] = [
|
|
165
|
+
C("确定", -1)
|
|
148
166
|
])]),
|
|
149
167
|
_: 1
|
|
150
168
|
})
|
|
151
169
|
])
|
|
152
170
|
]),
|
|
153
|
-
default:
|
|
154
|
-
|
|
155
|
-
a(
|
|
156
|
-
modelValue:
|
|
157
|
-
"onUpdate:modelValue": e[1] || (e[1] = (o) =>
|
|
171
|
+
default: i(() => [
|
|
172
|
+
z("div", Y, [
|
|
173
|
+
a(g, {
|
|
174
|
+
modelValue: c.value,
|
|
175
|
+
"onUpdate:modelValue": e[1] || (e[1] = (o) => c.value = o),
|
|
158
176
|
placeholder: "搜索表单名称/表单标识",
|
|
159
177
|
clearable: "",
|
|
160
|
-
onClear:
|
|
161
|
-
onKeyup:
|
|
162
|
-
style: { width: "300px" }
|
|
178
|
+
onClear: h,
|
|
179
|
+
onKeyup: O(h, ["enter"]),
|
|
180
|
+
style: { width: "300px" },
|
|
181
|
+
size: "default"
|
|
163
182
|
}, {
|
|
164
|
-
append:
|
|
165
|
-
a(
|
|
166
|
-
icon:
|
|
167
|
-
onClick:
|
|
183
|
+
append: i(() => [
|
|
184
|
+
a(p, {
|
|
185
|
+
icon: w(J),
|
|
186
|
+
onClick: h
|
|
168
187
|
}, null, 8, ["icon"])
|
|
169
188
|
]),
|
|
170
189
|
_: 1
|
|
171
190
|
}, 8, ["modelValue"])
|
|
172
191
|
]),
|
|
173
|
-
a(
|
|
174
|
-
data:
|
|
192
|
+
a(E, {
|
|
193
|
+
data: _.value,
|
|
175
194
|
"highlight-current-row": "",
|
|
176
195
|
"max-height": "500",
|
|
177
196
|
onCurrentChange: N,
|
|
178
|
-
style: { width: "100%", "margin-top": "10px" }
|
|
197
|
+
style: { width: "100%", "margin-top": "10px" },
|
|
198
|
+
size: "default"
|
|
179
199
|
}, {
|
|
180
|
-
default:
|
|
181
|
-
a(
|
|
200
|
+
default: i(() => [
|
|
201
|
+
a(m, {
|
|
182
202
|
prop: "templateName",
|
|
183
203
|
label: "表单名称",
|
|
184
204
|
"min-width": "200"
|
|
185
205
|
}),
|
|
186
|
-
a(
|
|
206
|
+
a(m, {
|
|
187
207
|
prop: "templateKey",
|
|
188
208
|
label: "表单标识",
|
|
189
209
|
"min-width": "200"
|
|
@@ -191,16 +211,16 @@ const H = { class: "search-bar" }, W = { class: "dialog-footer" }, X = {
|
|
|
191
211
|
]),
|
|
192
212
|
_: 1
|
|
193
213
|
}, 8, ["data"]),
|
|
194
|
-
a(
|
|
214
|
+
a(U, {
|
|
195
215
|
size: "small",
|
|
196
216
|
"current-page": l.value.pageNo,
|
|
197
217
|
"onUpdate:currentPage": e[2] || (e[2] = (o) => l.value.pageNo = o),
|
|
198
218
|
"page-size": l.value.pageSize,
|
|
199
219
|
"onUpdate:pageSize": e[3] || (e[3] = (o) => l.value.pageSize = o),
|
|
200
220
|
"page-sizes": [10, 20, 50, 100],
|
|
201
|
-
total:
|
|
221
|
+
total: S.value,
|
|
202
222
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
203
|
-
onSizeChange:
|
|
223
|
+
onSizeChange: k,
|
|
204
224
|
onCurrentChange: T,
|
|
205
225
|
style: { "margin-top": "20px", "justify-content": "flex-end" }
|
|
206
226
|
}, null, 8, ["current-page", "page-size", "total"])
|
|
@@ -210,7 +230,7 @@ const H = { class: "search-bar" }, W = { class: "dialog-footer" }, X = {
|
|
|
210
230
|
], 64);
|
|
211
231
|
};
|
|
212
232
|
}
|
|
213
|
-
},
|
|
233
|
+
}, Ie = /* @__PURE__ */ Q(ee, [["__scopeId", "data-v-eb9c3061"]]);
|
|
214
234
|
export {
|
|
215
|
-
|
|
235
|
+
Ie as default
|
|
216
236
|
};
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import "../../../node_modules/element-plus/theme-chalk/base.css.js";
|
|
2
|
+
import "../../../node_modules/element-plus/theme-chalk/el-dialog.css.js";
|
|
3
|
+
import "../../../node_modules/element-plus/theme-chalk/el-overlay.css.js";
|
|
4
|
+
import "../../../node_modules/element-plus/theme-chalk/el-table.css.js";
|
|
5
|
+
import "../../../node_modules/element-plus/theme-chalk/el-checkbox.css.js";
|
|
6
|
+
import "../../../node_modules/element-plus/theme-chalk/el-tooltip.css.js";
|
|
7
|
+
import "../../../node_modules/element-plus/theme-chalk/el-popper.css.js";
|
|
8
|
+
import "../../../node_modules/element-plus/theme-chalk/el-scrollbar.css.js";
|
|
9
|
+
import "../../../node_modules/element-plus/theme-chalk/el-input.css.js";
|
|
10
|
+
import "../../../node_modules/element-plus/theme-chalk/el-table-column.css.js";
|
|
11
|
+
import "../../../node_modules/element-plus/theme-chalk/el-tag.css.js";
|
|
12
|
+
import "../../../node_modules/element-plus/theme-chalk/el-button.css.js";
|
|
13
|
+
import { useModel as U, ref as b, computed as $, watch as H, openBlock as I, createBlock as M, withCtx as u, createElementVNode as p, createVNode as s, createTextVNode as m, unref as y, toDisplayString as S } from "vue";
|
|
14
|
+
import { Plus as P, RefreshRight as z, Delete as x } from "../../../node_modules/@element-plus/icons-vue/dist/index.js";
|
|
15
|
+
import { ElMessage as f, ElMessageBox as w } from "element-plus";
|
|
16
|
+
import { getEditConfigData as W, getEditConfigDataFields as Y, cloneDeep as v, getEditingType as V } from "../../packages/utils/common.js";
|
|
17
|
+
import { defaultProperty as j } from "../../packages/form/aside/index.js";
|
|
18
|
+
import { defaultProperty as q } from "../../packages/table/aside/index.js";
|
|
19
|
+
import "./HiddenFieldDialog.vue2.js";
|
|
20
|
+
import A from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
21
|
+
import { ElButton as O } from "../../../node_modules/element-plus/es/components/button/index.js";
|
|
22
|
+
import { ElTableColumn as G, ElTable as J } from "../../../node_modules/element-plus/es/components/table/index.js";
|
|
23
|
+
import { ElInput as K } from "../../../node_modules/element-plus/es/components/input/index.js";
|
|
24
|
+
import { ElDialog as L } from "../../../node_modules/element-plus/es/components/dialog/index.js";
|
|
25
|
+
const Q = { class: "action-bar" }, X = { class: "left-buttons" }, Z = { class: "count-info" }, ee = { class: "field-list-container" }, le = { class: "field-name-cell" }, te = { class: "dialog-footer" }, ie = {
|
|
26
|
+
__name: "HiddenFieldDialog",
|
|
27
|
+
props: {
|
|
28
|
+
modelValue: { required: !0 },
|
|
29
|
+
modelModifiers: {}
|
|
30
|
+
},
|
|
31
|
+
emits: ["update:modelValue"],
|
|
32
|
+
setup(T) {
|
|
33
|
+
const h = U(T, "modelValue"), D = b(null), r = b([]), o = $(() => W()), a = b([]);
|
|
34
|
+
H(h, (i) => {
|
|
35
|
+
i && F();
|
|
36
|
+
});
|
|
37
|
+
const F = () => {
|
|
38
|
+
var i;
|
|
39
|
+
a.value = (((i = o.value) == null ? void 0 : i.hiddenFields) || []).map(
|
|
40
|
+
(e) => ({
|
|
41
|
+
...e
|
|
42
|
+
})
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
function C(i) {
|
|
46
|
+
r.value = i;
|
|
47
|
+
}
|
|
48
|
+
function E() {
|
|
49
|
+
const i = {
|
|
50
|
+
id: "hidden_" + Date.now(),
|
|
51
|
+
fieldType: "text",
|
|
52
|
+
type: "widgets",
|
|
53
|
+
label: "",
|
|
54
|
+
fieldName: "",
|
|
55
|
+
value: ""
|
|
56
|
+
};
|
|
57
|
+
a.value.push(i), setTimeout(() => {
|
|
58
|
+
const e = document.querySelectorAll(".el-table__body .el-input input");
|
|
59
|
+
e.length > 0 && (e[0].focus(), e[0].select());
|
|
60
|
+
}, 100);
|
|
61
|
+
}
|
|
62
|
+
function k() {
|
|
63
|
+
for (const t of a.value) {
|
|
64
|
+
if (!t.label.trim()) {
|
|
65
|
+
f.warning("标签名不能为空");
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (!t.fieldName.trim()) {
|
|
69
|
+
f.warning("字段名不能为空");
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const i = a.value.map((t) => t.fieldName), e = (Y() || []).map(
|
|
74
|
+
(t) => t.fieldName
|
|
75
|
+
), d = i.filter(
|
|
76
|
+
(t, _) => i.indexOf(t) !== _
|
|
77
|
+
);
|
|
78
|
+
if (d.length > 0) {
|
|
79
|
+
f.error(`隐藏域字段名重复: ${d.join(", ")}`);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const l = i.filter(
|
|
83
|
+
(t) => e.includes(t)
|
|
84
|
+
);
|
|
85
|
+
if (l.length > 0) {
|
|
86
|
+
f.error(`与表单字段冲突: ${l.join(", ")}`);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
o.value && (o.value.hiddenFields = v(a.value)), h.value = !1;
|
|
90
|
+
}
|
|
91
|
+
function N(i) {
|
|
92
|
+
w.confirm("确定要删除此隐藏域吗?", "提示", {
|
|
93
|
+
confirmButtonText: "确定",
|
|
94
|
+
cancelButtonText: "取消",
|
|
95
|
+
type: "warning"
|
|
96
|
+
}).then(() => {
|
|
97
|
+
const e = a.value.findIndex((d) => d.id === i.id);
|
|
98
|
+
e !== -1 && (a.value.splice(e, 1), f.success("删除成功"), o.value && (o.value.hiddenFields = v(a.value)));
|
|
99
|
+
}).catch(() => {
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function R() {
|
|
103
|
+
w.confirm(
|
|
104
|
+
`确定要删除选中的 ${r.value.length} 个隐藏域吗?`,
|
|
105
|
+
"提示",
|
|
106
|
+
{
|
|
107
|
+
confirmButtonText: "确定",
|
|
108
|
+
cancelButtonText: "取消",
|
|
109
|
+
type: "warning"
|
|
110
|
+
}
|
|
111
|
+
).then(() => {
|
|
112
|
+
r.value.forEach((i) => {
|
|
113
|
+
const e = a.value.findIndex((d) => d.id === i.id);
|
|
114
|
+
e !== -1 && a.value.splice(e, 1);
|
|
115
|
+
}), r.value = [], f.success("批量删除成功"), o.value && (o.value.hiddenFields = v(a.value));
|
|
116
|
+
}).catch(() => {
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function B() {
|
|
120
|
+
if (r.value.length !== 0) {
|
|
121
|
+
if (o.value.fieldsData || (o.value.fieldsData = []), V() == "form") {
|
|
122
|
+
let e = o.value.fieldsData.reduce(
|
|
123
|
+
(d, l) => Math.max(d, l.y + l.h),
|
|
124
|
+
0
|
|
125
|
+
);
|
|
126
|
+
r.value.forEach((d) => {
|
|
127
|
+
let l = v(d);
|
|
128
|
+
l.id = l.id + "", l.id.startsWith("hidden_") && (l.id = l.id.replace("hidden_", ""), l.fieldType = "text", l.type = "widgets", l = { ...j, ...l });
|
|
129
|
+
let t = { w: 1, h: 1 };
|
|
130
|
+
l.fieldType == "textarea" ? t = { w: 1, h: 2 } : l.fieldType == "divider" || l.fieldType == "h2" ? t = {
|
|
131
|
+
w: o.value.columns,
|
|
132
|
+
h: 1,
|
|
133
|
+
isResizable: !1
|
|
134
|
+
} : (l.fieldType == "subForm" || l.fieldType == "subTable" || l.fieldType == "approvalHistory") && (t = { w: o.value.columns, h: 2 }), t.y = e, e += t.h;
|
|
135
|
+
const _ = {
|
|
136
|
+
x: 0,
|
|
137
|
+
y: t.y,
|
|
138
|
+
w: t.w,
|
|
139
|
+
h: t.h,
|
|
140
|
+
i: l.id,
|
|
141
|
+
isResizable: t.isResizable !== !1,
|
|
142
|
+
component: l,
|
|
143
|
+
id: l.id
|
|
144
|
+
};
|
|
145
|
+
o.value.fieldsData.push(_);
|
|
146
|
+
const g = a.value.findIndex((n) => n.id == d.id);
|
|
147
|
+
g !== -1 && a.value.splice(g, 1);
|
|
148
|
+
});
|
|
149
|
+
} else
|
|
150
|
+
V() == "table" && r.value.forEach((i) => {
|
|
151
|
+
let e = v(i);
|
|
152
|
+
e.id = e.id + "", e.id.startsWith("hidden_") && (e.id = e.id.replace("hidden_", ""), e.fieldType = "text", e.type = "widgets", e = { ...q, ...e }), o.value.fieldsData.push(e);
|
|
153
|
+
const d = a.value.findIndex((l) => l.id == i.id);
|
|
154
|
+
d !== -1 && a.value.splice(d, 1);
|
|
155
|
+
});
|
|
156
|
+
o.value.hiddenFields = v(a.value), f.success(`已恢复 ${r.value.length} 个字段`), r.value = [];
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return (i, e) => {
|
|
160
|
+
const d = O, l = G, t = K, _ = J, g = L;
|
|
161
|
+
return I(), M(g, {
|
|
162
|
+
modelValue: h.value,
|
|
163
|
+
"onUpdate:modelValue": e[1] || (e[1] = (n) => h.value = n),
|
|
164
|
+
title: "隐藏域配置",
|
|
165
|
+
width: "900px",
|
|
166
|
+
draggable: "",
|
|
167
|
+
overflow: "",
|
|
168
|
+
"append-to-body": "",
|
|
169
|
+
class: "fec-dev-designer-dialog"
|
|
170
|
+
}, {
|
|
171
|
+
footer: u(() => [
|
|
172
|
+
p("div", te, [
|
|
173
|
+
s(d, {
|
|
174
|
+
onClick: e[0] || (e[0] = (n) => h.value = !1)
|
|
175
|
+
}, {
|
|
176
|
+
default: u(() => [...e[6] || (e[6] = [
|
|
177
|
+
m("取消", -1)
|
|
178
|
+
])]),
|
|
179
|
+
_: 1
|
|
180
|
+
}),
|
|
181
|
+
s(d, {
|
|
182
|
+
type: "primary",
|
|
183
|
+
onClick: k
|
|
184
|
+
}, {
|
|
185
|
+
default: u(() => [...e[7] || (e[7] = [
|
|
186
|
+
m("保存", -1)
|
|
187
|
+
])]),
|
|
188
|
+
_: 1
|
|
189
|
+
})
|
|
190
|
+
])
|
|
191
|
+
]),
|
|
192
|
+
default: u(() => [
|
|
193
|
+
p("div", Q, [
|
|
194
|
+
p("div", X, [
|
|
195
|
+
s(d, {
|
|
196
|
+
type: "primary",
|
|
197
|
+
icon: y(P),
|
|
198
|
+
onClick: E
|
|
199
|
+
}, {
|
|
200
|
+
default: u(() => [...e[2] || (e[2] = [
|
|
201
|
+
m(" 添加隐藏域 ", -1)
|
|
202
|
+
])]),
|
|
203
|
+
_: 1
|
|
204
|
+
}, 8, ["icon"]),
|
|
205
|
+
s(d, {
|
|
206
|
+
type: "primary",
|
|
207
|
+
icon: y(z),
|
|
208
|
+
disabled: r.value.length === 0,
|
|
209
|
+
onClick: B
|
|
210
|
+
}, {
|
|
211
|
+
default: u(() => [...e[3] || (e[3] = [
|
|
212
|
+
m(" 恢复 ", -1)
|
|
213
|
+
])]),
|
|
214
|
+
_: 1
|
|
215
|
+
}, 8, ["icon", "disabled"]),
|
|
216
|
+
s(d, {
|
|
217
|
+
type: "danger",
|
|
218
|
+
icon: y(x),
|
|
219
|
+
disabled: !r.value.length,
|
|
220
|
+
onClick: R
|
|
221
|
+
}, {
|
|
222
|
+
default: u(() => [...e[4] || (e[4] = [
|
|
223
|
+
m(" 批量删除 ", -1)
|
|
224
|
+
])]),
|
|
225
|
+
_: 1
|
|
226
|
+
}, 8, ["icon", "disabled"])
|
|
227
|
+
]),
|
|
228
|
+
p("div", Z, "共 " + S(a.value.length) + " 个隐藏域", 1)
|
|
229
|
+
]),
|
|
230
|
+
p("div", ee, [
|
|
231
|
+
s(_, {
|
|
232
|
+
ref_key: "tableRef",
|
|
233
|
+
ref: D,
|
|
234
|
+
data: a.value,
|
|
235
|
+
onSelectionChange: C,
|
|
236
|
+
height: "400"
|
|
237
|
+
}, {
|
|
238
|
+
default: u(() => [
|
|
239
|
+
s(l, {
|
|
240
|
+
type: "selection",
|
|
241
|
+
width: "50"
|
|
242
|
+
}),
|
|
243
|
+
s(l, {
|
|
244
|
+
label: "标签名",
|
|
245
|
+
width: "160"
|
|
246
|
+
}, {
|
|
247
|
+
default: u(({ row: n }) => [
|
|
248
|
+
s(t, {
|
|
249
|
+
modelValue: n.label,
|
|
250
|
+
"onUpdate:modelValue": (c) => n.label = c,
|
|
251
|
+
placeholder: "请输入标签名"
|
|
252
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
253
|
+
]),
|
|
254
|
+
_: 1
|
|
255
|
+
}),
|
|
256
|
+
s(l, {
|
|
257
|
+
label: "字段名",
|
|
258
|
+
width: "160"
|
|
259
|
+
}, {
|
|
260
|
+
default: u(({ row: n }) => [
|
|
261
|
+
p("div", le, [
|
|
262
|
+
s(t, {
|
|
263
|
+
modelValue: n.fieldName,
|
|
264
|
+
"onUpdate:modelValue": (c) => n.fieldName = c,
|
|
265
|
+
placeholder: "请输入字段名"
|
|
266
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
267
|
+
])
|
|
268
|
+
]),
|
|
269
|
+
_: 1
|
|
270
|
+
}),
|
|
271
|
+
s(l, { label: "初值" }, {
|
|
272
|
+
default: u(({ row: n }) => [
|
|
273
|
+
s(t, {
|
|
274
|
+
modelValue: n.value,
|
|
275
|
+
"onUpdate:modelValue": (c) => n.value = c,
|
|
276
|
+
placeholder: "请输入初值"
|
|
277
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
278
|
+
]),
|
|
279
|
+
_: 1
|
|
280
|
+
}),
|
|
281
|
+
s(l, {
|
|
282
|
+
label: "操作",
|
|
283
|
+
width: "120",
|
|
284
|
+
fixed: "right"
|
|
285
|
+
}, {
|
|
286
|
+
default: u(({ row: n }) => [
|
|
287
|
+
s(d, {
|
|
288
|
+
link: "",
|
|
289
|
+
type: "danger",
|
|
290
|
+
icon: y(x),
|
|
291
|
+
onClick: (c) => N(n)
|
|
292
|
+
}, {
|
|
293
|
+
default: u(() => [...e[5] || (e[5] = [
|
|
294
|
+
m(" 删除 ", -1)
|
|
295
|
+
])]),
|
|
296
|
+
_: 1
|
|
297
|
+
}, 8, ["icon", "onClick"])
|
|
298
|
+
]),
|
|
299
|
+
_: 1
|
|
300
|
+
})
|
|
301
|
+
]),
|
|
302
|
+
_: 1
|
|
303
|
+
}, 8, ["data"])
|
|
304
|
+
])
|
|
305
|
+
]),
|
|
306
|
+
_: 1
|
|
307
|
+
}, 8, ["modelValue"]);
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
}, Ee = /* @__PURE__ */ A(ie, [["__scopeId", "data-v-b547a1f4"]]);
|
|
311
|
+
export {
|
|
312
|
+
Ee as default
|
|
313
|
+
};
|