@fecp/designer 5.3.13 → 5.3.14
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/designer.css +122 -44
- package/es/packages/designer/package.json.mjs +1 -1
- package/es/packages/designer/src/api/index.mjs +3 -3
- package/es/packages/designer/src/components/OnlyFLowConfigButton.vue2.mjs +8 -3
- package/es/packages/designer/src/packages/form/property/index.vue.mjs +6 -6
- package/es/packages/designer/src/packages/form/property/subTable.vue.mjs +211 -57
- package/es/packages/designer/src/packages/form/property/widgets.vue.mjs +21 -4
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +2 -1
- package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +19 -22
- package/es/packages/vue/src/components/table/Table.vue.mjs +15 -6
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +26 -16
- package/lib/designer.css +122 -44
- package/lib/packages/designer/package.json.js +1 -1
- package/lib/packages/designer/src/api/index.js +3 -3
- package/lib/packages/designer/src/components/OnlyFLowConfigButton.vue2.js +8 -3
- package/lib/packages/designer/src/packages/form/property/subTable.vue.js +210 -56
- package/lib/packages/designer/src/packages/form/property/widgets.vue.js +44 -27
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +2 -1
- package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +19 -22
- package/lib/packages/vue/src/components/table/Table.vue.js +15 -6
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +25 -15
- package/package.json +1 -1
|
@@ -2,25 +2,33 @@
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
/* empty css */
|
|
10
|
+
import "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/theme-chalk/el-dropdown-menu.css.mjs";
|
|
11
|
+
import "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/theme-chalk/el-dropdown-item.css.mjs";
|
|
5
12
|
/* empty css */
|
|
6
13
|
/* empty css */
|
|
7
14
|
/* empty css */
|
|
8
15
|
/* empty css */
|
|
9
16
|
/* empty css */
|
|
10
|
-
/* empty css */
|
|
11
|
-
/* empty css */
|
|
12
17
|
/* empty css */
|
|
13
18
|
/* empty css */
|
|
14
19
|
/* empty css */
|
|
15
20
|
/* empty css */
|
|
16
21
|
/* empty css */
|
|
17
22
|
/* empty css */
|
|
18
|
-
import { computed, ref, createBlock, openBlock,
|
|
23
|
+
import { computed, ref, watch, createBlock, openBlock, withCtx, createVNode, createElementBlock, createCommentVNode, createTextVNode, Fragment, renderList, createElementVNode, toDisplayString } from "vue";
|
|
19
24
|
import { getCurrentItem, getEditConfigData } from "../../utils/common.mjs";
|
|
20
25
|
import TemplateSelector from "../../../components/TemplateSelector.vue.mjs";
|
|
21
26
|
import emitter from "../../utils/eventBus.mjs";
|
|
22
27
|
import ParamsConfig from "../../../components/ParamsConfig.vue2.mjs";
|
|
23
28
|
import api from "../../../api/index.mjs";
|
|
29
|
+
import OnlyFLowConfigButton from "../../../components/OnlyFLowConfigButton.vue2.mjs";
|
|
30
|
+
/* empty css */
|
|
31
|
+
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
24
32
|
import { ElCollapse, ElCollapseItem } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/collapse/index.mjs";
|
|
25
33
|
import { ElForm, ElFormItem } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/form/index.mjs";
|
|
26
34
|
import { ElInput } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/input/index.mjs";
|
|
@@ -28,41 +36,96 @@ import { ElRadioGroup, ElRadioButton } from "../../../../../../node_modules/.pnp
|
|
|
28
36
|
import { ElSwitch } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/switch/index.mjs";
|
|
29
37
|
import { ElSelect, ElOption } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/select/index.mjs";
|
|
30
38
|
import { ElInputNumber } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/input-number/index.mjs";
|
|
39
|
+
import { ElButton } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/button/index.mjs";
|
|
40
|
+
import { ElDropdown, ElDropdownMenu, ElDropdownItem } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/dropdown/index.mjs";
|
|
41
|
+
const _hoisted_1 = { class: "buttons-config-container" };
|
|
42
|
+
const _hoisted_2 = {
|
|
43
|
+
key: 0,
|
|
44
|
+
class: "buttons-table"
|
|
45
|
+
};
|
|
46
|
+
const _hoisted_3 = { class: "buttons-body" };
|
|
47
|
+
const _hoisted_4 = { class: "buttons-cell name-cell" };
|
|
48
|
+
const _hoisted_5 = { class: "buttons-cell action-cell" };
|
|
49
|
+
const _hoisted_6 = { class: "buttons-footer" };
|
|
50
|
+
const _hoisted_7 = { class: "button-dropdown-content" };
|
|
51
|
+
const _hoisted_8 = { class: "button-name" };
|
|
52
|
+
const _hoisted_9 = { class: "button-type" };
|
|
31
53
|
const _sfc_main = {
|
|
32
54
|
__name: "subTable",
|
|
33
55
|
setup(__props) {
|
|
34
|
-
var _a;
|
|
35
56
|
const currentItem = computed(() => {
|
|
36
|
-
|
|
57
|
+
const item = getCurrentItem();
|
|
58
|
+
if (!item.btnRollback) {
|
|
59
|
+
item.btnRollback = [];
|
|
60
|
+
}
|
|
61
|
+
return item;
|
|
37
62
|
});
|
|
38
63
|
const activeName = ref(["common"]);
|
|
39
64
|
const subTableOptions = ref(null);
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
subTableOptions.value
|
|
44
|
-
|
|
45
|
-
|
|
65
|
+
const subTableBtns = computed(() => {
|
|
66
|
+
var _a, _b, _c;
|
|
67
|
+
const customBtns = ((_b = subTableOptions.value) == null ? void 0 : _b.customBtns.left.concat(
|
|
68
|
+
(_a = subTableOptions.value) == null ? void 0 : _a.customBtns.right
|
|
69
|
+
)) || [];
|
|
70
|
+
return customBtns.concat(((_c = subTableOptions.value) == null ? void 0 : _c.optBtns) || []);
|
|
71
|
+
});
|
|
72
|
+
watch(
|
|
73
|
+
() => {
|
|
74
|
+
var _a;
|
|
75
|
+
return (_a = currentItem.value) == null ? void 0 : _a.subTableId;
|
|
76
|
+
},
|
|
77
|
+
(pkId) => {
|
|
78
|
+
if (pkId) {
|
|
79
|
+
api.getById(pkId).then((data) => {
|
|
80
|
+
subTableOptions.value = JSON.parse(data.context);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
immediate: true
|
|
86
|
+
}
|
|
87
|
+
);
|
|
46
88
|
function templateSelectorConfirm(data) {
|
|
47
89
|
subTableOptions.value = data;
|
|
48
|
-
currentItem.subTableMode = null;
|
|
90
|
+
currentItem.value.subTableMode = null;
|
|
49
91
|
}
|
|
50
92
|
const tableMode = computed(() => {
|
|
51
|
-
var
|
|
52
|
-
return (
|
|
93
|
+
var _a;
|
|
94
|
+
return ((_a = subTableOptions.value) == null ? void 0 : _a.mode) || [];
|
|
53
95
|
});
|
|
54
96
|
function handleTitleModeChange(value) {
|
|
55
97
|
const item = currentItem.value;
|
|
56
98
|
const fieldsData = getEditConfigData().fieldsData;
|
|
57
99
|
const fieldInData = fieldsData == null ? void 0 : fieldsData.find((f) => {
|
|
58
|
-
var
|
|
59
|
-
return ((
|
|
100
|
+
var _a;
|
|
101
|
+
return ((_a = f.component) == null ? void 0 : _a.id) === item.id;
|
|
60
102
|
});
|
|
61
103
|
if (fieldInData) {
|
|
62
104
|
fieldInData.h = value === "none" ? 2 : 3;
|
|
63
105
|
emitter.emit("resizeEvent");
|
|
64
106
|
}
|
|
65
107
|
}
|
|
108
|
+
function handleButtonSelect(buttonConfig) {
|
|
109
|
+
addButton(buttonConfig);
|
|
110
|
+
}
|
|
111
|
+
function addButton(buttonConfig) {
|
|
112
|
+
if (!currentItem.value.btnRollback) {
|
|
113
|
+
currentItem.value.btnRollback = [];
|
|
114
|
+
}
|
|
115
|
+
currentItem.value.btnRollback.push({
|
|
116
|
+
id: buttonConfig.id,
|
|
117
|
+
label: buttonConfig.label,
|
|
118
|
+
type: buttonConfig.type
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function removeButton(index) {
|
|
122
|
+
if (currentItem.value.btnRollback && index >= 0 && index < currentItem.value.btnRollback.length) {
|
|
123
|
+
currentItem.value.btnRollback.splice(index, 1);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function handleOnlyFlowConfirm(button, data) {
|
|
127
|
+
button.callbackEventConfig = data;
|
|
128
|
+
}
|
|
66
129
|
return (_ctx, _cache) => {
|
|
67
130
|
const _component_el_input = ElInput;
|
|
68
131
|
const _component_el_form_item = ElFormItem;
|
|
@@ -72,13 +135,17 @@ const _sfc_main = {
|
|
|
72
135
|
const _component_el_option = ElOption;
|
|
73
136
|
const _component_el_select = ElSelect;
|
|
74
137
|
const _component_el_input_number = ElInputNumber;
|
|
138
|
+
const _component_el_button = ElButton;
|
|
139
|
+
const _component_el_dropdown_item = ElDropdownItem;
|
|
140
|
+
const _component_el_dropdown_menu = ElDropdownMenu;
|
|
141
|
+
const _component_el_dropdown = ElDropdown;
|
|
75
142
|
const _component_el_form = ElForm;
|
|
76
143
|
const _component_el_collapse_item = ElCollapseItem;
|
|
77
144
|
const _component_el_collapse = ElCollapse;
|
|
78
145
|
return openBlock(), createBlock(_component_el_collapse, {
|
|
79
146
|
class: "setting",
|
|
80
|
-
modelValue:
|
|
81
|
-
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) =>
|
|
147
|
+
modelValue: activeName.value,
|
|
148
|
+
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => activeName.value = $event)
|
|
82
149
|
}, {
|
|
83
150
|
default: withCtx(() => [
|
|
84
151
|
createVNode(_component_el_collapse_item, {
|
|
@@ -89,8 +156,8 @@ const _sfc_main = {
|
|
|
89
156
|
(openBlock(), createBlock(_component_el_form, {
|
|
90
157
|
"label-position": "top",
|
|
91
158
|
"label-width": "auto",
|
|
92
|
-
model:
|
|
93
|
-
key:
|
|
159
|
+
model: currentItem.value,
|
|
160
|
+
key: currentItem.value.id
|
|
94
161
|
}, {
|
|
95
162
|
default: withCtx(() => [
|
|
96
163
|
createVNode(_component_el_form_item, {
|
|
@@ -99,8 +166,8 @@ const _sfc_main = {
|
|
|
99
166
|
}, {
|
|
100
167
|
default: withCtx(() => [
|
|
101
168
|
createVNode(_component_el_input, {
|
|
102
|
-
modelValue:
|
|
103
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
169
|
+
modelValue: currentItem.value.label,
|
|
170
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currentItem.value.label = $event)
|
|
104
171
|
}, null, 8, ["modelValue"])
|
|
105
172
|
]),
|
|
106
173
|
_: 1
|
|
@@ -108,8 +175,8 @@ const _sfc_main = {
|
|
|
108
175
|
createVNode(_component_el_form_item, { label: "标题模式" }, {
|
|
109
176
|
default: withCtx(() => [
|
|
110
177
|
createVNode(_component_el_radio_group, {
|
|
111
|
-
modelValue:
|
|
112
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) =>
|
|
178
|
+
modelValue: currentItem.value.titleMode,
|
|
179
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => currentItem.value.titleMode = $event),
|
|
113
180
|
size: "small",
|
|
114
181
|
onChange: handleTitleModeChange
|
|
115
182
|
}, {
|
|
@@ -138,15 +205,15 @@ const _sfc_main = {
|
|
|
138
205
|
]),
|
|
139
206
|
_: 1
|
|
140
207
|
}),
|
|
141
|
-
|
|
142
|
-
|
|
208
|
+
currentItem.value.titleMode != "none" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
209
|
+
currentItem.value.titleMode == "label" ? (openBlock(), createBlock(_component_el_form_item, {
|
|
143
210
|
key: 0,
|
|
144
211
|
label: "副标题"
|
|
145
212
|
}, {
|
|
146
213
|
default: withCtx(() => [
|
|
147
214
|
createVNode(_component_el_input, {
|
|
148
|
-
modelValue:
|
|
149
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) =>
|
|
215
|
+
modelValue: currentItem.value.subLabel,
|
|
216
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => currentItem.value.subLabel = $event),
|
|
150
217
|
rows: 2,
|
|
151
218
|
type: "textarea",
|
|
152
219
|
resize: "none"
|
|
@@ -158,8 +225,8 @@ const _sfc_main = {
|
|
|
158
225
|
createVNode(_component_el_form_item, { label: "数据来源" }, {
|
|
159
226
|
default: withCtx(() => [
|
|
160
227
|
createVNode(_component_el_radio_group, {
|
|
161
|
-
modelValue:
|
|
162
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) =>
|
|
228
|
+
modelValue: currentItem.value.dataSourceFrom,
|
|
229
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => currentItem.value.dataSourceFrom = $event),
|
|
163
230
|
size: "small"
|
|
164
231
|
}, {
|
|
165
232
|
default: withCtx(() => [
|
|
@@ -181,25 +248,25 @@ const _sfc_main = {
|
|
|
181
248
|
]),
|
|
182
249
|
_: 1
|
|
183
250
|
}),
|
|
184
|
-
|
|
251
|
+
currentItem.value.dataSourceFrom == "main" ? (openBlock(), createBlock(_component_el_form_item, {
|
|
185
252
|
key: 1,
|
|
186
253
|
label: "字段名称"
|
|
187
254
|
}, {
|
|
188
255
|
default: withCtx(() => [
|
|
189
256
|
createVNode(_component_el_input, {
|
|
190
|
-
modelValue:
|
|
191
|
-
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) =>
|
|
257
|
+
modelValue: currentItem.value.fieldName,
|
|
258
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => currentItem.value.fieldName = $event),
|
|
192
259
|
placeholder: "主页面数据中存储子列表数据的字段名"
|
|
193
260
|
}, null, 8, ["modelValue"])
|
|
194
261
|
]),
|
|
195
262
|
_: 1
|
|
196
263
|
})) : createCommentVNode("", true),
|
|
197
|
-
|
|
264
|
+
currentItem.value.dataSourceFrom == "self" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
198
265
|
createVNode(_component_el_form_item, { label: "列表参数" }, {
|
|
199
266
|
default: withCtx(() => [
|
|
200
267
|
createVNode(ParamsConfig, {
|
|
201
|
-
modelValue:
|
|
202
|
-
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) =>
|
|
268
|
+
modelValue: currentItem.value.subTableParams,
|
|
269
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => currentItem.value.subTableParams = $event)
|
|
203
270
|
}, null, 8, ["modelValue"])
|
|
204
271
|
]),
|
|
205
272
|
_: 1
|
|
@@ -207,8 +274,8 @@ const _sfc_main = {
|
|
|
207
274
|
createVNode(_component_el_form_item, { label: "参数更新重新加载列表" }, {
|
|
208
275
|
default: withCtx(() => [
|
|
209
276
|
createVNode(_component_el_switch, {
|
|
210
|
-
modelValue:
|
|
211
|
-
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) =>
|
|
277
|
+
modelValue: currentItem.value.reloadOnParamsChange,
|
|
278
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => currentItem.value.reloadOnParamsChange = $event)
|
|
212
279
|
}, null, 8, ["modelValue"])
|
|
213
280
|
]),
|
|
214
281
|
_: 1
|
|
@@ -217,8 +284,8 @@ const _sfc_main = {
|
|
|
217
284
|
createVNode(_component_el_form_item, { label: "权限标识" }, {
|
|
218
285
|
default: withCtx(() => [
|
|
219
286
|
createVNode(_component_el_input, {
|
|
220
|
-
modelValue:
|
|
221
|
-
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) =>
|
|
287
|
+
modelValue: currentItem.value.permission,
|
|
288
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => currentItem.value.permission = $event)
|
|
222
289
|
}, null, 8, ["modelValue"])
|
|
223
290
|
]),
|
|
224
291
|
_: 1
|
|
@@ -226,28 +293,28 @@ const _sfc_main = {
|
|
|
226
293
|
createVNode(_component_el_form_item, { label: "选择子列表" }, {
|
|
227
294
|
default: withCtx(() => [
|
|
228
295
|
createVNode(TemplateSelector, {
|
|
229
|
-
modelValue:
|
|
230
|
-
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) =>
|
|
231
|
-
templateKey:
|
|
232
|
-
"onUpdate:templateKey": _cache[9] || (_cache[9] = ($event) =>
|
|
233
|
-
templateId:
|
|
234
|
-
"onUpdate:templateId": _cache[10] || (_cache[10] = ($event) =>
|
|
296
|
+
modelValue: currentItem.value.subTableName,
|
|
297
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => currentItem.value.subTableName = $event),
|
|
298
|
+
templateKey: currentItem.value.subTableKey,
|
|
299
|
+
"onUpdate:templateKey": _cache[9] || (_cache[9] = ($event) => currentItem.value.subTableKey = $event),
|
|
300
|
+
templateId: currentItem.value.subTableId,
|
|
301
|
+
"onUpdate:templateId": _cache[10] || (_cache[10] = ($event) => currentItem.value.subTableId = $event),
|
|
235
302
|
templateType: "table",
|
|
236
303
|
onConfirm: templateSelectorConfirm
|
|
237
304
|
}, null, 8, ["modelValue", "templateKey", "templateId"])
|
|
238
305
|
]),
|
|
239
306
|
_: 1
|
|
240
307
|
}),
|
|
241
|
-
|
|
308
|
+
currentItem.value.subTableId ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
242
309
|
createVNode(_component_el_form_item, { label: "列表模式" }, {
|
|
243
310
|
default: withCtx(() => [
|
|
244
311
|
createVNode(_component_el_select, {
|
|
245
|
-
modelValue:
|
|
246
|
-
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) =>
|
|
312
|
+
modelValue: currentItem.value.subTableMode,
|
|
313
|
+
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => currentItem.value.subTableMode = $event),
|
|
247
314
|
clearable: ""
|
|
248
315
|
}, {
|
|
249
316
|
default: withCtx(() => [
|
|
250
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
317
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(tableMode.value, (mode) => {
|
|
251
318
|
return openBlock(), createBlock(_component_el_option, {
|
|
252
319
|
key: mode.key,
|
|
253
320
|
label: mode.name,
|
|
@@ -263,8 +330,8 @@ const _sfc_main = {
|
|
|
263
330
|
createVNode(_component_el_form_item, { label: "高度" }, {
|
|
264
331
|
default: withCtx(() => [
|
|
265
332
|
createVNode(_component_el_input_number, {
|
|
266
|
-
modelValue:
|
|
267
|
-
"onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) =>
|
|
333
|
+
modelValue: currentItem.value.subTableHeight,
|
|
334
|
+
"onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => currentItem.value.subTableHeight = $event),
|
|
268
335
|
min: 300,
|
|
269
336
|
"controls-position": "right",
|
|
270
337
|
controls: false,
|
|
@@ -281,8 +348,8 @@ const _sfc_main = {
|
|
|
281
348
|
createVNode(_component_el_form_item, { label: "是否翻页" }, {
|
|
282
349
|
default: withCtx(() => [
|
|
283
350
|
createVNode(_component_el_switch, {
|
|
284
|
-
modelValue:
|
|
285
|
-
"onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) =>
|
|
351
|
+
modelValue: currentItem.value.isSubTablePagination,
|
|
352
|
+
"onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => currentItem.value.isSubTablePagination = $event)
|
|
286
353
|
}, null, 8, ["modelValue"])
|
|
287
354
|
]),
|
|
288
355
|
_: 1
|
|
@@ -290,11 +357,97 @@ const _sfc_main = {
|
|
|
290
357
|
createVNode(_component_el_form_item, { label: "是否只读" }, {
|
|
291
358
|
default: withCtx(() => [
|
|
292
359
|
createVNode(_component_el_switch, {
|
|
293
|
-
modelValue:
|
|
294
|
-
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) =>
|
|
360
|
+
modelValue: currentItem.value.isSubTableReadOnly,
|
|
361
|
+
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => currentItem.value.isSubTableReadOnly = $event)
|
|
295
362
|
}, null, 8, ["modelValue"])
|
|
296
363
|
]),
|
|
297
364
|
_: 1
|
|
365
|
+
}),
|
|
366
|
+
createVNode(_component_el_form_item, { label: "列表按钮回调事件" }, {
|
|
367
|
+
default: withCtx(() => [
|
|
368
|
+
createElementVNode("div", _hoisted_1, [
|
|
369
|
+
currentItem.value.btnRollback && currentItem.value.btnRollback.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
370
|
+
_cache[22] || (_cache[22] = createElementVNode("div", { class: "buttons-header" }, [
|
|
371
|
+
createElementVNode("div", { class: "buttons-cell name-header" }, "按钮"),
|
|
372
|
+
createElementVNode("div", { class: "buttons-cell action-header" }, "回调事件")
|
|
373
|
+
], -1)),
|
|
374
|
+
createElementVNode("div", _hoisted_3, [
|
|
375
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(currentItem.value.btnRollback, (button, index) => {
|
|
376
|
+
return openBlock(), createElementBlock("div", {
|
|
377
|
+
key: button.id,
|
|
378
|
+
class: "buttons-row"
|
|
379
|
+
}, [
|
|
380
|
+
createElementVNode("div", _hoisted_4, [
|
|
381
|
+
createElementVNode("span", null, toDisplayString(button.label), 1)
|
|
382
|
+
]),
|
|
383
|
+
createElementVNode("div", _hoisted_5, [
|
|
384
|
+
createVNode(OnlyFLowConfigButton, {
|
|
385
|
+
size: "small",
|
|
386
|
+
config: button.callbackEventConfig,
|
|
387
|
+
onConfirm: (data) => {
|
|
388
|
+
handleOnlyFlowConfirm(button, data);
|
|
389
|
+
}
|
|
390
|
+
}, null, 8, ["config", "onConfirm"]),
|
|
391
|
+
createVNode(_component_el_button, {
|
|
392
|
+
type: "danger",
|
|
393
|
+
size: "small",
|
|
394
|
+
onClick: ($event) => removeButton(index),
|
|
395
|
+
icon: "Delete",
|
|
396
|
+
text: "",
|
|
397
|
+
style: { "padding": "0", "background": "transparent" }
|
|
398
|
+
}, null, 8, ["onClick"])
|
|
399
|
+
])
|
|
400
|
+
]);
|
|
401
|
+
}), 128))
|
|
402
|
+
])
|
|
403
|
+
])) : createCommentVNode("", true),
|
|
404
|
+
createElementVNode("div", _hoisted_6, [
|
|
405
|
+
createVNode(_component_el_dropdown, {
|
|
406
|
+
onCommand: handleButtonSelect,
|
|
407
|
+
trigger: "click",
|
|
408
|
+
size: "small"
|
|
409
|
+
}, {
|
|
410
|
+
dropdown: withCtx(() => [
|
|
411
|
+
createVNode(_component_el_dropdown_menu, null, {
|
|
412
|
+
default: withCtx(() => [
|
|
413
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(subTableBtns.value, (button) => {
|
|
414
|
+
return openBlock(), createBlock(_component_el_dropdown_item, {
|
|
415
|
+
key: button.id,
|
|
416
|
+
command: button,
|
|
417
|
+
class: "button-dropdown-item"
|
|
418
|
+
}, {
|
|
419
|
+
default: withCtx(() => [
|
|
420
|
+
createElementVNode("div", _hoisted_7, [
|
|
421
|
+
createElementVNode("span", _hoisted_8, toDisplayString(button.label), 1),
|
|
422
|
+
createElementVNode("span", _hoisted_9, toDisplayString(button.type === "optBtn" ? "行级" : "自定义"), 1)
|
|
423
|
+
])
|
|
424
|
+
]),
|
|
425
|
+
_: 2
|
|
426
|
+
}, 1032, ["command"]);
|
|
427
|
+
}), 128))
|
|
428
|
+
]),
|
|
429
|
+
_: 1
|
|
430
|
+
})
|
|
431
|
+
]),
|
|
432
|
+
default: withCtx(() => [
|
|
433
|
+
createVNode(_component_el_button, {
|
|
434
|
+
type: "primary",
|
|
435
|
+
size: "small",
|
|
436
|
+
icon: "Plus",
|
|
437
|
+
link: ""
|
|
438
|
+
}, {
|
|
439
|
+
default: withCtx(() => _cache[23] || (_cache[23] = [
|
|
440
|
+
createTextVNode(" 新增按钮 ")
|
|
441
|
+
])),
|
|
442
|
+
_: 1
|
|
443
|
+
})
|
|
444
|
+
]),
|
|
445
|
+
_: 1
|
|
446
|
+
})
|
|
447
|
+
])
|
|
448
|
+
])
|
|
449
|
+
]),
|
|
450
|
+
_: 1
|
|
298
451
|
})
|
|
299
452
|
], 64)) : createCommentVNode("", true)
|
|
300
453
|
]),
|
|
@@ -309,6 +462,7 @@ const _sfc_main = {
|
|
|
309
462
|
};
|
|
310
463
|
}
|
|
311
464
|
};
|
|
465
|
+
const subTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8ebdd5a8"]]);
|
|
312
466
|
export {
|
|
313
|
-
|
|
467
|
+
subTable as default
|
|
314
468
|
};
|
|
@@ -212,9 +212,13 @@ const _sfc_main = {
|
|
|
212
212
|
watch(
|
|
213
213
|
() => currentItem.value.dialogSource,
|
|
214
214
|
async (newSource, oldSource) => {
|
|
215
|
+
var _a, _b;
|
|
215
216
|
if (newSource === "global" && oldSource !== "global") {
|
|
216
217
|
await loadGlobalDialogs();
|
|
217
218
|
}
|
|
219
|
+
if ((_a = currentItem.value) == null ? void 0 : _a.suffixDialogId) {
|
|
220
|
+
handleDialogChange((_b = currentItem.value) == null ? void 0 : _b.suffixDialogId);
|
|
221
|
+
}
|
|
218
222
|
},
|
|
219
223
|
{ immediate: true }
|
|
220
224
|
);
|
|
@@ -256,6 +260,20 @@ const _sfc_main = {
|
|
|
256
260
|
const isSysSelect = computed(() => {
|
|
257
261
|
return currentItem.value.fieldType == "userSelect" || currentItem.value.fieldType == "roleSelect" || currentItem.value.fieldType == "orgSelect";
|
|
258
262
|
});
|
|
263
|
+
watch(
|
|
264
|
+
() => {
|
|
265
|
+
var _a;
|
|
266
|
+
return (_a = currentItem.value) == null ? void 0 : _a.suffixDialogId;
|
|
267
|
+
},
|
|
268
|
+
(dialogId) => {
|
|
269
|
+
if (dialogId) {
|
|
270
|
+
handleDialogChange(dialogId);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
// {
|
|
274
|
+
// immediate: true,
|
|
275
|
+
// }
|
|
276
|
+
);
|
|
259
277
|
return (_ctx, _cache) => {
|
|
260
278
|
const _component_el_option = ElOption;
|
|
261
279
|
const _component_el_select = ElSelect;
|
|
@@ -558,7 +576,6 @@ const _sfc_main = {
|
|
|
558
576
|
filterable: "",
|
|
559
577
|
loading: unref(dialogLoading),
|
|
560
578
|
clearable: "",
|
|
561
|
-
onChange: handleDialogChange,
|
|
562
579
|
style: { "width": "100%" }
|
|
563
580
|
}, {
|
|
564
581
|
default: withCtx(() => [
|
|
@@ -606,7 +623,7 @@ const _sfc_main = {
|
|
|
606
623
|
]),
|
|
607
624
|
unref(currentItem).selectionMode != "none" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
608
625
|
createElementVNode("div", _hoisted_6, [
|
|
609
|
-
_cache[70] || (_cache[70] = createElementVNode("span", { class: "field-label" }, "
|
|
626
|
+
_cache[70] || (_cache[70] = createElementVNode("span", { class: "field-label" }, "反显格式", -1)),
|
|
610
627
|
createVNode(unref(_sfc_main$1), {
|
|
611
628
|
title: "反显格式配置",
|
|
612
629
|
formulaConf: unref(currentItem).displayFormat,
|
|
@@ -633,7 +650,7 @@ const _sfc_main = {
|
|
|
633
650
|
])
|
|
634
651
|
], 64)) : createCommentVNode("", true),
|
|
635
652
|
createElementVNode("div", _hoisted_8, [
|
|
636
|
-
_cache[72] || (_cache[72] = createElementVNode("span", { class: "field-label" }, "
|
|
653
|
+
_cache[72] || (_cache[72] = createElementVNode("span", { class: "field-label" }, "回调事件", -1)),
|
|
637
654
|
createVNode(OnlyFLowConfigButton, {
|
|
638
655
|
config: unref(currentItem).callbackEventConfig,
|
|
639
656
|
onConfirm: handleOnlyFlowConfirm
|
|
@@ -1116,7 +1133,7 @@ const _sfc_main = {
|
|
|
1116
1133
|
};
|
|
1117
1134
|
}
|
|
1118
1135
|
};
|
|
1119
|
-
const widgets = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1136
|
+
const widgets = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-705ff290"]]);
|
|
1120
1137
|
export {
|
|
1121
1138
|
widgets as default
|
|
1122
1139
|
};
|
|
@@ -889,6 +889,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
889
889
|
provide("gridLayoutFieldsData", gridLayoutFieldsData);
|
|
890
890
|
provide("setFormItemHeight", setFormItemHeight);
|
|
891
891
|
provide("formCtx", ctx);
|
|
892
|
+
provide("handleEvent", handleEvent);
|
|
892
893
|
__expose({
|
|
893
894
|
validate,
|
|
894
895
|
resetFields,
|
|
@@ -980,7 +981,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
980
981
|
};
|
|
981
982
|
}
|
|
982
983
|
});
|
|
983
|
-
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
984
|
+
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-01bfaf4f"]]);
|
|
984
985
|
export {
|
|
985
986
|
_Form as default
|
|
986
987
|
};
|
|
@@ -28,26 +28,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
28
28
|
type: String,
|
|
29
29
|
default: ""
|
|
30
30
|
}
|
|
31
|
-
// subFormId: {
|
|
32
|
-
// type: String,
|
|
33
|
-
// required: true,
|
|
34
|
-
// },
|
|
35
|
-
// subFormKey: {
|
|
36
|
-
// type: String,
|
|
37
|
-
// default: "",
|
|
38
|
-
// },
|
|
39
|
-
// subFormName: {
|
|
40
|
-
// type: String,
|
|
41
|
-
// default: "",
|
|
42
|
-
// },
|
|
43
|
-
// dataSourceFrom: {
|
|
44
|
-
// type: String,
|
|
45
|
-
// default: "",
|
|
46
|
-
// },
|
|
47
|
-
// triggerSubFormPageEvent: {
|
|
48
|
-
// type: Boolean,
|
|
49
|
-
// default: false,
|
|
50
|
-
// },
|
|
51
31
|
},
|
|
52
32
|
setup(__props, { expose: __expose }) {
|
|
53
33
|
const props = __props;
|
|
@@ -55,6 +35,22 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
55
35
|
inject("rowHeight");
|
|
56
36
|
inject("gridLayout");
|
|
57
37
|
const setFormItemHeight = inject("setFormItemHeight");
|
|
38
|
+
const handleEvent = inject("handleEvent");
|
|
39
|
+
const btnRollbackEvent = computed(() => {
|
|
40
|
+
const btnRollback = props.config.btnRollback || [];
|
|
41
|
+
const data = {};
|
|
42
|
+
for (const item of btnRollback) {
|
|
43
|
+
const handleFunc = () => {
|
|
44
|
+
handleEvent.value(
|
|
45
|
+
formData.value,
|
|
46
|
+
{},
|
|
47
|
+
{ eventFlow: item.callbackEventConfig }
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
data[item.id] = handleFunc;
|
|
51
|
+
}
|
|
52
|
+
return data;
|
|
53
|
+
});
|
|
58
54
|
const subTableData = computed(() => {
|
|
59
55
|
if (props.config.dataSourceFrom == "main") {
|
|
60
56
|
return formData.value[props.config.fieldName];
|
|
@@ -202,8 +198,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
202
198
|
tableData: unref(subTableData),
|
|
203
199
|
initHiddenData: unref(initHiddenData),
|
|
204
200
|
canLoadBySearchData: __props.config.reloadOnParamsChange,
|
|
205
|
-
readonly: __props.config.isSubTableReadOnly || __props.formMode == "query"
|
|
206
|
-
|
|
201
|
+
readonly: __props.config.isSubTableReadOnly || __props.formMode == "query",
|
|
202
|
+
btnRollbackEvent: unref(btnRollbackEvent)
|
|
203
|
+
}, null, 8, ["templateKey", "mode", "titleMode", "hasPagination", "height", "tableData", "initHiddenData", "canLoadBySearchData", "readonly", "btnRollbackEvent"])
|
|
207
204
|
], 64);
|
|
208
205
|
};
|
|
209
206
|
}
|