@fecp/designer 5.5.2 → 5.5.4

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.
@@ -0,0 +1,1035 @@
1
+ import "../../../../node_modules/element-plus/es/index.mjs";
2
+ /* empty css */
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ /* empty css */
8
+ /* empty css */
9
+ /* empty css */
10
+ /* empty css */
11
+ /* empty css */
12
+ /* empty css */
13
+ /* empty css */
14
+ /* empty css */
15
+ /* empty css */
16
+ /* empty css */
17
+ /* empty css */
18
+ /* empty css */
19
+ /* empty css */
20
+ /* empty css */
21
+ /* empty css */
22
+ /* empty css */
23
+ /* empty css */
24
+ /* empty css */
25
+ /* empty css */
26
+ /* empty css */
27
+ import { computed, useModel, ref, watch, createBlock, openBlock, unref, withCtx, createVNode, createElementBlock, createCommentVNode, createElementVNode, toDisplayString, createTextVNode, withKeys, isRef, Fragment, renderList, normalizeClass, withDirectives, vShow, withModifiers } from "vue";
28
+ import { VueDraggable as lo } from "../../../../node_modules/vue-draggable-plus/dist/vue-draggable-plus.mjs";
29
+ import { Loading as loading_default, Plus as plus_default, Close as close_default, Check as check_default, Delete as delete_default, Rank as rank_default, Edit as edit_default } from "../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
30
+ import { getEditConfigData, cloneDeep } from "../utils/common.mjs";
31
+ import TemplateSelector from "../../components/TemplateSelector.vue2.mjs";
32
+ import api from "../../api/index.mjs";
33
+ import ParamsConfig from "../../components/ParamsConfig.vue2.mjs";
34
+ import _sfc_main$1 from "../../components/DataSourceSelect.vue.mjs";
35
+ /* empty css */
36
+ /* empty css */
37
+ import "../../../../node_modules/element-plus/theme-chalk/el-dropdown-menu.css.mjs";
38
+ import "../../../../node_modules/element-plus/theme-chalk/el-dropdown-item.css.mjs";
39
+ /* empty css */
40
+ import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
41
+ import "../../../../node_modules/element-plus/theme-chalk/el-tooltip.css.mjs";
42
+ /* empty css */
43
+ /* empty css */
44
+ /* empty css */
45
+ /* empty css */
46
+ /* empty css */
47
+ /* empty css */
48
+ /* empty css */
49
+ /* empty css */
50
+ /* empty css */
51
+ /* empty css */
52
+ import "../../../../node_modules/element-plus/theme-chalk/el-sub-menu.css.mjs";
53
+ import "../../../../node_modules/element-plus/theme-chalk/el-menu-item.css.mjs";
54
+ /* empty css */
55
+ /* empty css */
56
+ /* empty css */
57
+ /* empty css */
58
+ /* empty css */
59
+ /* empty css */
60
+ /* empty css */
61
+ import "../../../../node_modules/vue-codemirror/dist/vue-codemirror.esm.mjs";
62
+ import "../formulaEditor/core/functionCore.mjs";
63
+ /* empty css */
64
+ /* empty css */
65
+ /* empty css */
66
+ /* empty css */
67
+ import { defaultProperty } from "../table/aside/index.mjs";
68
+ import { defaultTableConfig } from "../table/default.mjs";
69
+ import widgets from "../table/property/widgets.vue.mjs";
70
+ /* empty css */
71
+ /* empty css */
72
+ /* empty css */
73
+ /* empty css */
74
+ /* empty css */
75
+ /* empty css */
76
+ /* empty css */
77
+ /* empty css */
78
+ /* empty css */
79
+ /* empty css */
80
+ /* empty css */
81
+ /* empty css */
82
+ /* empty css */
83
+ /* empty css */
84
+ import "../../../../node_modules/element-plus/theme-chalk/el-tab-pane.css.mjs";
85
+ /* empty css */
86
+ /* empty css */
87
+ /* empty css */
88
+ /* empty css */
89
+ /* empty css */
90
+ /* empty css */
91
+ /* empty css */
92
+ /* empty css */
93
+ /* empty css */
94
+ import "../../../../node_modules/element-plus/theme-chalk/el-date-picker.css.mjs";
95
+ import "../../axios/config.mjs";
96
+ /* empty css */
97
+ /* empty css */
98
+ /* empty css */
99
+ /* empty css */
100
+ /* empty css */
101
+ /* empty css */
102
+ /* empty css */
103
+ /* empty css */
104
+ /* empty css */
105
+ import { ElMessage } from "../../../../node_modules/element-plus/es/components/message/index.mjs";
106
+ import { ElDialog } from "../../../../node_modules/element-plus/es/components/dialog/index.mjs";
107
+ import { ElContainer, ElAside, ElHeader, ElMain } from "../../../../node_modules/element-plus/es/components/container/index.mjs";
108
+ import { ElIcon } from "../../../../node_modules/element-plus/es/components/icon/index.mjs";
109
+ import { ElButton } from "../../../../node_modules/element-plus/es/components/button/index.mjs";
110
+ import { ElInput } from "../../../../node_modules/element-plus/es/components/input/index.mjs";
111
+ import { ElLink } from "../../../../node_modules/element-plus/es/components/link/index.mjs";
112
+ import { ElScrollbar } from "../../../../node_modules/element-plus/es/components/scrollbar/index.mjs";
113
+ import { ElForm, ElFormItem } from "../../../../node_modules/element-plus/es/components/form/index.mjs";
114
+ import { ElRadioGroup, ElRadioButton } from "../../../../node_modules/element-plus/es/components/radio/index.mjs";
115
+ import { ElSelect, ElOption } from "../../../../node_modules/element-plus/es/components/select/index.mjs";
116
+ import { ElPopover } from "../../../../node_modules/element-plus/es/components/popover/index.mjs";
117
+ import { ElSwitch } from "../../../../node_modules/element-plus/es/components/switch/index.mjs";
118
+ import { ElCheckbox } from "../../../../node_modules/element-plus/es/components/checkbox/index.mjs";
119
+ const _hoisted_1 = {
120
+ key: 0,
121
+ class: "loading-overlay"
122
+ };
123
+ const _hoisted_2 = { class: "loading-text" };
124
+ const _hoisted_3 = { key: 0 };
125
+ const _hoisted_4 = { class: "dialog-menu-item is-editing" };
126
+ const _hoisted_5 = { class: "new-item-content" };
127
+ const _hoisted_6 = { class: "edit-actions" };
128
+ const _hoisted_7 = ["onClick"];
129
+ const _hoisted_8 = { class: "dialog-content" };
130
+ const _hoisted_9 = { class: "dialog-name-wrapper" };
131
+ const _hoisted_10 = { style: { "display": "flex", "gap": "16px", "width": "100%" } };
132
+ const _hoisted_11 = { class: "col-panel" };
133
+ const _hoisted_12 = { class: "col-header" };
134
+ const _hoisted_13 = { class: "col-rules-list" };
135
+ const _hoisted_14 = { class: "drag-handle" };
136
+ const _hoisted_15 = { class: "custom-col-btns" };
137
+ const _hoisted_16 = { class: "col-property" };
138
+ const _hoisted_17 = { class: "footer-buttons-container" };
139
+ const _hoisted_18 = {
140
+ key: 0,
141
+ class: "empty-tip"
142
+ };
143
+ const _hoisted_19 = {
144
+ key: 1,
145
+ class: "footer-buttons"
146
+ };
147
+ const _hoisted_20 = {
148
+ key: 1,
149
+ class: "empty-selection"
150
+ };
151
+ const _hoisted_21 = { class: "dialog-footer" };
152
+ const _sfc_main = {
153
+ __name: "index",
154
+ props: {
155
+ "modelValue": { required: true },
156
+ "modelModifiers": {}
157
+ },
158
+ emits: ["update:modelValue"],
159
+ setup(__props) {
160
+ const editConfigData = computed(() => {
161
+ return getEditConfigData();
162
+ });
163
+ const dialogVisible = useModel(__props, "modelValue");
164
+ const loading = ref(false);
165
+ const saving = ref(false);
166
+ const selectedDialogs = ref([]);
167
+ const activeDialogIndex = ref(-1);
168
+ watch(dialogVisible, async (val) => {
169
+ if (val) {
170
+ isEditingNew.value = false;
171
+ editingDialogIndex.value = -1;
172
+ loading.value = true;
173
+ try {
174
+ const response = await api.getAllTemplateDialog();
175
+ selectedDialogs.value = [];
176
+ for (let dialog of response) {
177
+ selectedDialogs.value.push({
178
+ id: dialog.id,
179
+ name: dialog.name,
180
+ ...JSON.parse(dialog.config)
181
+ });
182
+ }
183
+ if (selectedDialogs.value.length > 0 && activeDialogIndex.value === -1) {
184
+ activeDialogIndex.value = 0;
185
+ }
186
+ } catch (error) {
187
+ console.error("🚀 ~ 获取弹层数据失败:", error);
188
+ ElMessage.error("获取弹层数据失败");
189
+ selectedDialogs.value = [];
190
+ } finally {
191
+ loading.value = false;
192
+ }
193
+ }
194
+ });
195
+ const isEditingNew = ref(false);
196
+ const newDialogName = ref("");
197
+ const editingDialogIndex = ref(-1);
198
+ const editingDialogName = ref("");
199
+ const startAddDialog = () => {
200
+ isEditingNew.value = true;
201
+ newDialogName.value = "";
202
+ };
203
+ const confirmAddDialog = async () => {
204
+ if (!newDialogName.value.trim()) {
205
+ ElMessage.warning("请输入弹层名称");
206
+ return;
207
+ }
208
+ const newDialog = {
209
+ id: "dialog_" + Date.now(),
210
+ name: newDialogName.value,
211
+ dialogTitle: "弹层标题",
212
+ // 默认弹层标题
213
+ dialogSize: "standard",
214
+ dialogParams: [],
215
+ customWidth: "",
216
+ // 自定义宽度
217
+ customMaxHeight: "",
218
+ // 自定义最大高度
219
+ contentSource: "table",
220
+ tableContent: "select",
221
+ selectionMode: "single",
222
+ isSubTablePagination: true,
223
+ isSubTableReadOnly: false,
224
+ componentPath: "",
225
+ fieldMapping: [],
226
+ subFormMode: "edit",
227
+ subFormFooterButtons: [],
228
+ // 表单底部按钮
229
+ componentParams: []
230
+ };
231
+ selectedDialogs.value.push(newDialog);
232
+ isEditingNew.value = false;
233
+ newDialogName.value = "";
234
+ activeDialogIndex.value = selectedDialogs.value.length - 1;
235
+ };
236
+ const cancelAddDialog = () => {
237
+ isEditingNew.value = false;
238
+ newDialogName.value = "";
239
+ };
240
+ const handleRemoveDialog = async (index) => {
241
+ const dialogToRemove = selectedDialogs.value[index];
242
+ try {
243
+ await api.deleteTemplateDialog(dialogToRemove.id);
244
+ } catch (error) {
245
+ console.error("🚀 ~ 删除弹层失败:", error);
246
+ ElMessage.error("删除弹层失败");
247
+ return;
248
+ }
249
+ selectedDialogs.value.splice(index, 1);
250
+ if (activeDialogIndex.value === index) {
251
+ activeDialogIndex.value = -1;
252
+ } else if (activeDialogIndex.value > index) {
253
+ activeDialogIndex.value--;
254
+ }
255
+ ElMessage.success("弹层删除成功");
256
+ };
257
+ const startEditDialog = (index) => {
258
+ editingDialogIndex.value = index;
259
+ editingDialogName.value = selectedDialogs.value[index].name;
260
+ };
261
+ const onEditOutside = () => {
262
+ if (editingDialogIndex.value !== -1) {
263
+ if (!editingDialogName.value.trim()) {
264
+ ElMessage.warning("请输入弹层名称");
265
+ return;
266
+ }
267
+ selectedDialogs.value[editingDialogIndex.value].name = editingDialogName.value;
268
+ editingDialogIndex.value = -1;
269
+ editingDialogName.value = "";
270
+ }
271
+ };
272
+ const onConfirm = async () => {
273
+ saving.value = true;
274
+ try {
275
+ const dialogArr = selectedDialogs.value.map((dialog) => {
276
+ const data = cloneDeep(dialog);
277
+ const id = data.id;
278
+ const name = data.name;
279
+ delete data.id;
280
+ delete data.name;
281
+ return {
282
+ id,
283
+ name,
284
+ config: JSON.stringify(data)
285
+ };
286
+ });
287
+ const response = await api.saveTemplateDialog(dialogArr);
288
+ ElMessage.success("弹层配置保存成功");
289
+ dialogVisible.value = false;
290
+ } catch (error) {
291
+ console.error("🚀 ~ 保存弹层数据失败:", error);
292
+ ElMessage.error("保存弹层数据失败");
293
+ } finally {
294
+ saving.value = false;
295
+ }
296
+ };
297
+ const tableOptions = ref(null);
298
+ const formOptions = ref(null);
299
+ const currentDialog = computed(() => {
300
+ const data = selectedDialogs.value[activeDialogIndex.value];
301
+ if (!data.fieldMapping) {
302
+ data.fieldMapping = [];
303
+ }
304
+ if (!data.customTableConfig) {
305
+ data.customTableConfig = cloneDeep(defaultTableConfig);
306
+ data.customTableConfig.fieldsData = [];
307
+ data.customTableConfig.dataSources = editConfigData.value.dataSources;
308
+ } else {
309
+ data.customTableConfig.dataSources = editConfigData.value.dataSources;
310
+ data.customTableConfig.queryConfig.enabled = false;
311
+ }
312
+ if ((data == null ? void 0 : data.contentSource) == "table") {
313
+ const pkId = data == null ? void 0 : data.subTableId;
314
+ if (pkId) {
315
+ api.getById(pkId, false).then((data2) => {
316
+ tableOptions.value = JSON.parse(data2.context);
317
+ });
318
+ }
319
+ } else if ((data == null ? void 0 : data.contentSource) == "form") {
320
+ const pkId = data == null ? void 0 : data.subFormId;
321
+ if (pkId) {
322
+ api.getById(pkId, false).then((data2) => {
323
+ formOptions.value = JSON.parse(data2.context);
324
+ });
325
+ }
326
+ }
327
+ return data;
328
+ });
329
+ function tableSelectorConfirm(data) {
330
+ tableOptions.value = data;
331
+ currentDialog.value.subTableMode = null;
332
+ }
333
+ function formSelectorConfirm(data) {
334
+ formOptions.value = data;
335
+ }
336
+ const tableMode = computed(() => {
337
+ var _a;
338
+ return (_a = tableOptions.value) == null ? void 0 : _a.mode;
339
+ });
340
+ computed(() => {
341
+ var _a, _b, _c, _d;
342
+ if (currentDialog.value.tableContent === "custom") {
343
+ return ((_b = (_a = currentDialog.value) == null ? void 0 : _a.customTableConfig) == null ? void 0 : _b.fieldsData) || [];
344
+ } else if (currentDialog.value.tableContent === "select") {
345
+ return [
346
+ ...((_c = tableOptions.value) == null ? void 0 : _c.fieldsData) || [],
347
+ ...((_d = tableOptions.value) == null ? void 0 : _d.hiddenFields) || []
348
+ ];
349
+ }
350
+ });
351
+ const formFooterBtn = computed(() => {
352
+ var _a;
353
+ const btnList = (_a = formOptions.value) == null ? void 0 : _a.pageFooterConfig.actions;
354
+ if (btnList) {
355
+ return btnList.filter((item) => item.btnType == "primary");
356
+ }
357
+ return [];
358
+ });
359
+ const isButtonSelected = (btnId) => {
360
+ var _a, _b;
361
+ return (_b = (_a = currentDialog.value) == null ? void 0 : _a.subFormFooterButtons) == null ? void 0 : _b.includes(btnId);
362
+ };
363
+ const toggleButton = (btn) => {
364
+ if (!currentDialog.value.subFormFooterButtons) {
365
+ currentDialog.value.subFormFooterButtons = [];
366
+ }
367
+ const index = currentDialog.value.subFormFooterButtons.indexOf(btn.id);
368
+ if (index > -1) {
369
+ currentDialog.value.subFormFooterButtons.splice(index, 1);
370
+ } else {
371
+ currentDialog.value.subFormFooterButtons.push(btn.id);
372
+ }
373
+ };
374
+ const addTableCol = () => {
375
+ currentDialog.value.customTableConfig.fieldsData.push({
376
+ fieldType: "text",
377
+ label: "",
378
+ ...defaultProperty,
379
+ fieldName: ""
380
+ });
381
+ };
382
+ const removeCol = (index) => {
383
+ currentDialog.value.customTableConfig.fieldsData.splice(index, 1);
384
+ };
385
+ return (_ctx, _cache) => {
386
+ const _component_el_icon = ElIcon;
387
+ const _component_el_button = ElButton;
388
+ const _component_el_header = ElHeader;
389
+ const _component_el_input = ElInput;
390
+ const _component_el_link = ElLink;
391
+ const _component_el_main = ElMain;
392
+ const _component_el_container = ElContainer;
393
+ const _component_el_aside = ElAside;
394
+ const _component_el_form_item = ElFormItem;
395
+ const _component_el_radio_button = ElRadioButton;
396
+ const _component_el_radio_group = ElRadioGroup;
397
+ const _component_el_option = ElOption;
398
+ const _component_el_select = ElSelect;
399
+ const _component_el_scrollbar = ElScrollbar;
400
+ const _component_el_popover = ElPopover;
401
+ const _component_el_switch = ElSwitch;
402
+ const _component_el_checkbox = ElCheckbox;
403
+ const _component_el_form = ElForm;
404
+ const _component_el_dialog = ElDialog;
405
+ return openBlock(), createBlock(_component_el_dialog, {
406
+ modelValue: dialogVisible.value,
407
+ "onUpdate:modelValue": _cache[26] || (_cache[26] = ($event) => dialogVisible.value = $event),
408
+ width: "50%",
409
+ title: "全局弹层配置",
410
+ draggable: "",
411
+ overflow: "",
412
+ "append-to-body": "",
413
+ class: "fec-dev-designer-dialog",
414
+ "close-on-click-modal": !unref(saving),
415
+ "close-on-press-escape": !unref(saving),
416
+ "show-close": !unref(saving)
417
+ }, {
418
+ footer: withCtx(() => [
419
+ createElementVNode("div", _hoisted_21, [
420
+ createVNode(_component_el_button, {
421
+ onClick: _cache[25] || (_cache[25] = ($event) => dialogVisible.value = false),
422
+ disabled: unref(saving)
423
+ }, {
424
+ default: withCtx(() => _cache[43] || (_cache[43] = [
425
+ createTextVNode("取消")
426
+ ])),
427
+ _: 1
428
+ }, 8, ["disabled"]),
429
+ createVNode(_component_el_button, {
430
+ type: "primary",
431
+ onClick: onConfirm,
432
+ loading: unref(saving),
433
+ disabled: unref(loading) || unref(saving)
434
+ }, {
435
+ default: withCtx(() => _cache[44] || (_cache[44] = [
436
+ createTextVNode(" 确定 ")
437
+ ])),
438
+ _: 1
439
+ }, 8, ["loading", "disabled"])
440
+ ])
441
+ ]),
442
+ default: withCtx(() => [
443
+ createVNode(_component_el_container, { style: { "border": "1px solid #ebeef5", "border-radius": "4px", "height": "600px", "position": "relative" } }, {
444
+ default: withCtx(() => [
445
+ unref(loading) || unref(saving) ? (openBlock(), createElementBlock("div", _hoisted_1, [
446
+ createVNode(_component_el_icon, { class: "loading-icon" }, {
447
+ default: withCtx(() => [
448
+ createVNode(unref(loading_default))
449
+ ]),
450
+ _: 1
451
+ }),
452
+ createElementVNode("div", _hoisted_2, toDisplayString(unref(loading) ? "加载中..." : "保存中..."), 1)
453
+ ])) : createCommentVNode("", true),
454
+ createVNode(_component_el_aside, { width: "300px" }, {
455
+ default: withCtx(() => [
456
+ createVNode(_component_el_container, null, {
457
+ default: withCtx(() => [
458
+ createVNode(_component_el_header, {
459
+ height: "40px",
460
+ style: { "background-color": "#f2f2f2", "line-height": "40px" }
461
+ }, {
462
+ default: withCtx(() => [
463
+ createVNode(_component_el_button, {
464
+ type: "primary",
465
+ link: "",
466
+ icon: unref(plus_default),
467
+ onClick: startAddDialog
468
+ }, {
469
+ default: withCtx(() => _cache[27] || (_cache[27] = [
470
+ createTextVNode(" 新增弹层 ")
471
+ ])),
472
+ _: 1
473
+ }, 8, ["icon"])
474
+ ]),
475
+ _: 1
476
+ }),
477
+ createVNode(_component_el_main, { style: { "padding": "10px" } }, {
478
+ default: withCtx(() => [
479
+ unref(isEditingNew) ? (openBlock(), createElementBlock("div", _hoisted_3, [
480
+ createElementVNode("div", _hoisted_4, [
481
+ createElementVNode("div", _hoisted_5, [
482
+ createVNode(_component_el_input, {
483
+ modelValue: unref(newDialogName),
484
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(newDialogName) ? newDialogName.value = $event : null),
485
+ placeholder: "请输入弹层名称",
486
+ size: "default",
487
+ onKeyup: withKeys(confirmAddDialog, ["enter"]),
488
+ class: "new-item-input"
489
+ }, null, 8, ["modelValue"]),
490
+ createElementVNode("div", _hoisted_6, [
491
+ createVNode(_component_el_button, {
492
+ size: "small",
493
+ icon: unref(close_default),
494
+ onClick: cancelAddDialog
495
+ }, {
496
+ default: withCtx(() => _cache[28] || (_cache[28] = [
497
+ createTextVNode(" 取消 ")
498
+ ])),
499
+ _: 1
500
+ }, 8, ["icon"]),
501
+ createVNode(_component_el_button, {
502
+ type: "primary",
503
+ size: "small",
504
+ icon: unref(check_default),
505
+ onClick: confirmAddDialog
506
+ }, {
507
+ default: withCtx(() => _cache[29] || (_cache[29] = [
508
+ createTextVNode(" 确认 ")
509
+ ])),
510
+ _: 1
511
+ }, 8, ["icon"])
512
+ ])
513
+ ])
514
+ ])
515
+ ])) : createCommentVNode("", true),
516
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(selectedDialogs), (dialog, index) => {
517
+ return openBlock(), createElementBlock("div", {
518
+ key: index,
519
+ class: normalizeClass([
520
+ "dialog-menu-item",
521
+ { "is-active": unref(activeDialogIndex) === index }
522
+ ]),
523
+ onClick: ($event) => activeDialogIndex.value = index
524
+ }, [
525
+ createElementVNode("div", _hoisted_8, [
526
+ createElementVNode("div", _hoisted_9, [
527
+ withDirectives(createVNode(_component_el_input, {
528
+ onBlur: ($event) => onEditOutside(),
529
+ maxlength: "30",
530
+ modelValue: unref(editingDialogName),
531
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(editingDialogName) ? editingDialogName.value = $event : null),
532
+ size: "small"
533
+ }, null, 8, ["onBlur", "modelValue"]), [
534
+ [vShow, unref(editingDialogIndex) === index]
535
+ ]),
536
+ withDirectives(createVNode(_component_el_link, {
537
+ icon: "Edit",
538
+ onClick: withModifiers(($event) => startEditDialog(index), ["stop"])
539
+ }, {
540
+ default: withCtx(() => [
541
+ createTextVNode(toDisplayString(dialog.name), 1)
542
+ ]),
543
+ _: 2
544
+ }, 1032, ["onClick"]), [
545
+ [vShow, unref(editingDialogIndex) !== index]
546
+ ])
547
+ ]),
548
+ createVNode(_component_el_icon, {
549
+ class: "delete-icon",
550
+ onClick: withModifiers(($event) => handleRemoveDialog(index), ["stop"])
551
+ }, {
552
+ default: withCtx(() => [
553
+ createVNode(unref(delete_default))
554
+ ]),
555
+ _: 2
556
+ }, 1032, ["onClick"])
557
+ ])
558
+ ], 10, _hoisted_7);
559
+ }), 128))
560
+ ]),
561
+ _: 1
562
+ })
563
+ ]),
564
+ _: 1
565
+ })
566
+ ]),
567
+ _: 1
568
+ }),
569
+ createVNode(_component_el_main, { style: { "border-left": "1px solid #ebeef5", "padding": "0" } }, {
570
+ default: withCtx(() => [
571
+ unref(activeDialogIndex) !== -1 ? (openBlock(), createBlock(_component_el_container, {
572
+ key: 0,
573
+ style: { "height": "100%" }
574
+ }, {
575
+ default: withCtx(() => [
576
+ createVNode(_component_el_header, {
577
+ height: "40px",
578
+ class: "dialog-header"
579
+ }, {
580
+ default: withCtx(() => [
581
+ createElementVNode("div", null, toDisplayString(unref(currentDialog).name), 1)
582
+ ]),
583
+ _: 1
584
+ }),
585
+ createVNode(_component_el_main, { style: { "padding": "12px 20px 0 20px" } }, {
586
+ default: withCtx(() => [
587
+ createVNode(_component_el_scrollbar, null, {
588
+ default: withCtx(() => [
589
+ createVNode(_component_el_form, {
590
+ model: unref(currentDialog),
591
+ "label-width": "120px",
592
+ style: { "padding-right": "20px" },
593
+ size: "small"
594
+ }, {
595
+ default: withCtx(() => [
596
+ createVNode(_component_el_form_item, { label: "弹层标题" }, {
597
+ default: withCtx(() => [
598
+ createVNode(_component_el_input, {
599
+ modelValue: unref(currentDialog).dialogTitle,
600
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(currentDialog).dialogTitle = $event),
601
+ placeholder: "请输入弹层标题",
602
+ clearable: ""
603
+ }, null, 8, ["modelValue"])
604
+ ]),
605
+ _: 1
606
+ }),
607
+ createVNode(_component_el_form_item, { label: "弹层尺寸" }, {
608
+ default: withCtx(() => [
609
+ createVNode(_component_el_radio_group, {
610
+ modelValue: unref(currentDialog).dialogSize,
611
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(currentDialog).dialogSize = $event)
612
+ }, {
613
+ default: withCtx(() => [
614
+ createVNode(_component_el_radio_button, { value: "standard" }, {
615
+ default: withCtx(() => _cache[30] || (_cache[30] = [
616
+ createTextVNode("标准")
617
+ ])),
618
+ _: 1
619
+ }),
620
+ createVNode(_component_el_radio_button, { value: "large" }, {
621
+ default: withCtx(() => _cache[31] || (_cache[31] = [
622
+ createTextVNode("更大")
623
+ ])),
624
+ _: 1
625
+ }),
626
+ createVNode(_component_el_radio_button, { value: "small" }, {
627
+ default: withCtx(() => _cache[32] || (_cache[32] = [
628
+ createTextVNode("更小")
629
+ ])),
630
+ _: 1
631
+ }),
632
+ createVNode(_component_el_radio_button, { value: "custom" }, {
633
+ default: withCtx(() => _cache[33] || (_cache[33] = [
634
+ createTextVNode("自定义")
635
+ ])),
636
+ _: 1
637
+ })
638
+ ]),
639
+ _: 1
640
+ }, 8, ["modelValue"])
641
+ ]),
642
+ _: 1
643
+ }),
644
+ unref(currentDialog).dialogSize === "custom" ? (openBlock(), createBlock(_component_el_form_item, {
645
+ key: 0,
646
+ label: "自定义尺寸"
647
+ }, {
648
+ default: withCtx(() => [
649
+ createElementVNode("div", _hoisted_10, [
650
+ createVNode(_component_el_input, {
651
+ modelValue: unref(currentDialog).customWidth,
652
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(currentDialog).customWidth = $event),
653
+ placeholder: "宽度,如:800px、60%",
654
+ style: { "flex": "1" }
655
+ }, null, 8, ["modelValue"]),
656
+ createVNode(_component_el_input, {
657
+ modelValue: unref(currentDialog).customMaxHeight,
658
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(currentDialog).customMaxHeight = $event),
659
+ placeholder: "最大高度,如:600px、80vh",
660
+ style: { "flex": "1" }
661
+ }, null, 8, ["modelValue"])
662
+ ])
663
+ ]),
664
+ _: 1
665
+ })) : createCommentVNode("", true),
666
+ createVNode(_component_el_form_item, { label: "弹层参数" }, {
667
+ default: withCtx(() => [
668
+ createVNode(ParamsConfig, {
669
+ modelValue: unref(currentDialog).dialogParams,
670
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(currentDialog).dialogParams = $event)
671
+ }, null, 8, ["modelValue"])
672
+ ]),
673
+ _: 1
674
+ }),
675
+ createVNode(_component_el_form_item, { label: "弹层类型" }, {
676
+ default: withCtx(() => [
677
+ createVNode(_component_el_radio_group, {
678
+ modelValue: unref(currentDialog).contentSource,
679
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(currentDialog).contentSource = $event)
680
+ }, {
681
+ default: withCtx(() => [
682
+ createVNode(_component_el_radio_button, { value: "table" }, {
683
+ default: withCtx(() => _cache[34] || (_cache[34] = [
684
+ createTextVNode("列表")
685
+ ])),
686
+ _: 1
687
+ }),
688
+ createVNode(_component_el_radio_button, { value: "form" }, {
689
+ default: withCtx(() => _cache[35] || (_cache[35] = [
690
+ createTextVNode("表单")
691
+ ])),
692
+ _: 1
693
+ }),
694
+ createVNode(_component_el_radio_button, { value: "tree" }, {
695
+ default: withCtx(() => _cache[36] || (_cache[36] = [
696
+ createTextVNode("树形")
697
+ ])),
698
+ _: 1
699
+ }),
700
+ createVNode(_component_el_radio_button, { value: "component" }, {
701
+ default: withCtx(() => _cache[37] || (_cache[37] = [
702
+ createTextVNode("组件")
703
+ ])),
704
+ _: 1
705
+ })
706
+ ]),
707
+ _: 1
708
+ }, 8, ["modelValue"])
709
+ ]),
710
+ _: 1
711
+ }),
712
+ unref(currentDialog).contentSource === "table" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
713
+ createVNode(_component_el_form_item, { label: "列表内容" }, {
714
+ default: withCtx(() => [
715
+ createVNode(_component_el_radio_group, {
716
+ modelValue: unref(currentDialog).tableContent,
717
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => unref(currentDialog).tableContent = $event)
718
+ }, {
719
+ default: withCtx(() => [
720
+ createVNode(_component_el_radio_button, { value: "select" }, {
721
+ default: withCtx(() => _cache[38] || (_cache[38] = [
722
+ createTextVNode("选择列表")
723
+ ])),
724
+ _: 1
725
+ }),
726
+ createVNode(_component_el_radio_button, { value: "custom" }, {
727
+ default: withCtx(() => _cache[39] || (_cache[39] = [
728
+ createTextVNode("自定义")
729
+ ])),
730
+ _: 1
731
+ })
732
+ ]),
733
+ _: 1
734
+ }, 8, ["modelValue"])
735
+ ]),
736
+ _: 1
737
+ }),
738
+ unref(currentDialog).tableContent === "select" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
739
+ createVNode(_component_el_form_item, { label: "选择列表" }, {
740
+ default: withCtx(() => [
741
+ createVNode(TemplateSelector, {
742
+ modelValue: unref(currentDialog).subTableName,
743
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => unref(currentDialog).subTableName = $event),
744
+ templateKey: unref(currentDialog).subTableKey,
745
+ "onUpdate:templateKey": _cache[10] || (_cache[10] = ($event) => unref(currentDialog).subTableKey = $event),
746
+ templateId: unref(currentDialog).subTableId,
747
+ "onUpdate:templateId": _cache[11] || (_cache[11] = ($event) => unref(currentDialog).subTableId = $event),
748
+ templateType: "table",
749
+ onConfirm: tableSelectorConfirm
750
+ }, null, 8, ["modelValue", "templateKey", "templateId"])
751
+ ]),
752
+ _: 1
753
+ }),
754
+ createVNode(_component_el_form_item, { label: "列表模式" }, {
755
+ default: withCtx(() => [
756
+ createVNode(_component_el_select, {
757
+ modelValue: unref(currentDialog).subTableMode,
758
+ "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => unref(currentDialog).subTableMode = $event),
759
+ clearable: ""
760
+ }, {
761
+ default: withCtx(() => [
762
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(tableMode), (mode) => {
763
+ return openBlock(), createBlock(_component_el_option, {
764
+ key: mode.key,
765
+ label: mode.name,
766
+ value: mode.key
767
+ }, null, 8, ["label", "value"]);
768
+ }), 128))
769
+ ]),
770
+ _: 1
771
+ }, 8, ["modelValue"])
772
+ ]),
773
+ _: 1
774
+ })
775
+ ], 64)) : createCommentVNode("", true),
776
+ unref(currentDialog).tableContent === "custom" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
777
+ createVNode(_component_el_form_item, { label: "列配置" }, {
778
+ default: withCtx(() => [
779
+ createElementVNode("div", _hoisted_11, [
780
+ createElementVNode("div", _hoisted_12, [
781
+ createVNode(_component_el_button, {
782
+ type: "primary",
783
+ size: "small",
784
+ onClick: addTableCol,
785
+ icon: "Plus",
786
+ link: ""
787
+ }, {
788
+ default: withCtx(() => _cache[40] || (_cache[40] = [
789
+ createTextVNode(" 添加列配置 ")
790
+ ])),
791
+ _: 1
792
+ })
793
+ ]),
794
+ createElementVNode("div", _hoisted_13, [
795
+ createVNode(unref(lo), {
796
+ modelValue: unref(currentDialog).customTableConfig.fieldsData,
797
+ "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => unref(currentDialog).customTableConfig.fieldsData = $event),
798
+ animation: 150,
799
+ handle: ".drag-handle"
800
+ }, {
801
+ default: withCtx(() => [
802
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(currentDialog).customTableConfig.fieldsData, (col, index) => {
803
+ return openBlock(), createElementBlock("div", {
804
+ key: index,
805
+ class: "col-rule-item"
806
+ }, [
807
+ createElementVNode("div", _hoisted_14, [
808
+ createVNode(_component_el_icon, null, {
809
+ default: withCtx(() => [
810
+ createVNode(unref(rank_default))
811
+ ]),
812
+ _: 1
813
+ })
814
+ ]),
815
+ createVNode(_component_el_input, {
816
+ modelValue: col.label,
817
+ "onUpdate:modelValue": ($event) => col.label = $event,
818
+ size: "small",
819
+ placeholder: "列标题"
820
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
821
+ createVNode(_component_el_input, {
822
+ modelValue: col.fieldName,
823
+ "onUpdate:modelValue": ($event) => col.fieldName = $event,
824
+ size: "small",
825
+ placeholder: "字段名"
826
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
827
+ createElementVNode("div", _hoisted_15, [
828
+ createVNode(_component_el_popover, {
829
+ placement: "right",
830
+ width: 200,
831
+ trigger: "click"
832
+ }, {
833
+ reference: withCtx(() => [
834
+ createVNode(_component_el_button, {
835
+ icon: unref(edit_default),
836
+ link: "",
837
+ type: "primary",
838
+ class: "edit-btn"
839
+ }, null, 8, ["icon"])
840
+ ]),
841
+ default: withCtx(() => [
842
+ createElementVNode("div", _hoisted_16, [
843
+ createVNode(_component_el_scrollbar, { "wrap-class": "col-property-scrollbar" }, {
844
+ default: withCtx(() => [
845
+ createVNode(widgets, {
846
+ column: col,
847
+ isComp: ""
848
+ }, null, 8, ["column"])
849
+ ]),
850
+ _: 2
851
+ }, 1024)
852
+ ])
853
+ ]),
854
+ _: 2
855
+ }, 1024),
856
+ createVNode(_component_el_button, {
857
+ icon: unref(delete_default),
858
+ link: "",
859
+ type: "danger",
860
+ class: "delete-btn",
861
+ onClick: ($event) => removeCol(index)
862
+ }, null, 8, ["icon", "onClick"])
863
+ ])
864
+ ]);
865
+ }), 128))
866
+ ]),
867
+ _: 1
868
+ }, 8, ["modelValue"])
869
+ ])
870
+ ])
871
+ ]),
872
+ _: 1
873
+ }),
874
+ createVNode(_component_el_form_item, { label: "主键字段" }, {
875
+ default: withCtx(() => [
876
+ createVNode(_component_el_input, {
877
+ modelValue: unref(currentDialog).customTableConfig.pkFieldName,
878
+ "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => unref(currentDialog).customTableConfig.pkFieldName = $event),
879
+ placeholder: "请输入主键字段",
880
+ clearable: ""
881
+ }, null, 8, ["modelValue"])
882
+ ]),
883
+ _: 1
884
+ }),
885
+ createVNode(_component_el_form_item, { label: "数据源" }, {
886
+ default: withCtx(() => [
887
+ createVNode(_sfc_main$1, {
888
+ modelValue: unref(currentDialog).customTableConfig.dataSourceId,
889
+ "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => unref(currentDialog).customTableConfig.dataSourceId = $event)
890
+ }, null, 8, ["modelValue"])
891
+ ]),
892
+ _: 1
893
+ })
894
+ ], 64)) : createCommentVNode("", true),
895
+ createVNode(_component_el_form_item, { label: "是否翻页" }, {
896
+ default: withCtx(() => [
897
+ createVNode(_component_el_switch, {
898
+ modelValue: unref(currentDialog).isSubTablePagination,
899
+ "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => unref(currentDialog).isSubTablePagination = $event)
900
+ }, null, 8, ["modelValue"])
901
+ ]),
902
+ _: 1
903
+ }),
904
+ createVNode(_component_el_form_item, { label: "是否只读" }, {
905
+ default: withCtx(() => [
906
+ createVNode(_component_el_switch, {
907
+ modelValue: unref(currentDialog).isSubTableReadOnly,
908
+ "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => unref(currentDialog).isSubTableReadOnly = $event)
909
+ }, null, 8, ["modelValue"])
910
+ ]),
911
+ _: 1
912
+ })
913
+ ], 64)) : createCommentVNode("", true),
914
+ unref(currentDialog).contentSource === "form" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
915
+ createVNode(_component_el_form_item, { label: "选择表单" }, {
916
+ default: withCtx(() => [
917
+ createVNode(TemplateSelector, {
918
+ modelValue: unref(currentDialog).subFormName,
919
+ "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => unref(currentDialog).subFormName = $event),
920
+ templateKey: unref(currentDialog).subFormKey,
921
+ "onUpdate:templateKey": _cache[19] || (_cache[19] = ($event) => unref(currentDialog).subFormKey = $event),
922
+ templateId: unref(currentDialog).subFormId,
923
+ "onUpdate:templateId": _cache[20] || (_cache[20] = ($event) => unref(currentDialog).subFormId = $event),
924
+ templateType: "form",
925
+ onConfirm: formSelectorConfirm
926
+ }, null, 8, ["modelValue", "templateKey", "templateId"])
927
+ ]),
928
+ _: 1
929
+ }),
930
+ createVNode(_component_el_form_item, { label: "表单模式" }, {
931
+ default: withCtx(() => [
932
+ createVNode(_component_el_radio_group, {
933
+ modelValue: unref(currentDialog).subFormMode,
934
+ "onUpdate:modelValue": _cache[21] || (_cache[21] = ($event) => unref(currentDialog).subFormMode = $event)
935
+ }, {
936
+ default: withCtx(() => [
937
+ createVNode(_component_el_radio_button, { value: "edit" }, {
938
+ default: withCtx(() => _cache[41] || (_cache[41] = [
939
+ createTextVNode("编辑")
940
+ ])),
941
+ _: 1
942
+ }),
943
+ createVNode(_component_el_radio_button, { value: "query" }, {
944
+ default: withCtx(() => _cache[42] || (_cache[42] = [
945
+ createTextVNode("查看")
946
+ ])),
947
+ _: 1
948
+ })
949
+ ]),
950
+ _: 1
951
+ }, 8, ["modelValue"])
952
+ ]),
953
+ _: 1
954
+ }),
955
+ createVNode(_component_el_form_item, { label: "表单底部按钮" }, {
956
+ default: withCtx(() => [
957
+ createElementVNode("div", _hoisted_17, [
958
+ !unref(formFooterBtn) || unref(formFooterBtn).length === 0 ? (openBlock(), createElementBlock("div", _hoisted_18, " 暂无可用按钮 ")) : (openBlock(), createElementBlock("div", _hoisted_19, [
959
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(formFooterBtn), (btn) => {
960
+ return openBlock(), createBlock(_component_el_checkbox, {
961
+ key: btn.id,
962
+ "model-value": isButtonSelected(btn.id),
963
+ onChange: ($event) => toggleButton(btn)
964
+ }, {
965
+ default: withCtx(() => [
966
+ createTextVNode(toDisplayString(btn.label), 1)
967
+ ]),
968
+ _: 2
969
+ }, 1032, ["model-value", "onChange"]);
970
+ }), 128))
971
+ ]))
972
+ ])
973
+ ]),
974
+ _: 1
975
+ })
976
+ ], 64)) : createCommentVNode("", true),
977
+ unref(currentDialog).contentSource === "component" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
978
+ createVNode(_component_el_form_item, { label: "组件路由地址" }, {
979
+ default: withCtx(() => [
980
+ createVNode(_component_el_input, {
981
+ modelValue: unref(currentDialog).componentPath,
982
+ "onUpdate:modelValue": _cache[22] || (_cache[22] = ($event) => unref(currentDialog).componentPath = $event),
983
+ placeholder: "请输入组件路径",
984
+ clearable: ""
985
+ }, null, 8, ["modelValue"])
986
+ ]),
987
+ _: 1
988
+ }),
989
+ createVNode(_component_el_form_item, { label: "组件参数" }, {
990
+ default: withCtx(() => [
991
+ createVNode(ParamsConfig, {
992
+ modelValue: unref(currentDialog).componentParams,
993
+ "onUpdate:modelValue": _cache[23] || (_cache[23] = ($event) => unref(currentDialog).componentParams = $event)
994
+ }, null, 8, ["modelValue"])
995
+ ]),
996
+ _: 1
997
+ }),
998
+ createVNode(_component_el_form_item, { label: "组件是否是弹层" }, {
999
+ default: withCtx(() => [
1000
+ createVNode(_component_el_switch, {
1001
+ modelValue: unref(currentDialog).componentIsDialog,
1002
+ "onUpdate:modelValue": _cache[24] || (_cache[24] = ($event) => unref(currentDialog).componentIsDialog = $event)
1003
+ }, null, 8, ["modelValue"])
1004
+ ]),
1005
+ _: 1
1006
+ })
1007
+ ], 64)) : createCommentVNode("", true)
1008
+ ]),
1009
+ _: 1
1010
+ }, 8, ["model"])
1011
+ ]),
1012
+ _: 1
1013
+ })
1014
+ ]),
1015
+ _: 1
1016
+ })
1017
+ ]),
1018
+ _: 1
1019
+ })) : (openBlock(), createElementBlock("div", _hoisted_20, "请从左侧选择一个弹层"))
1020
+ ]),
1021
+ _: 1
1022
+ })
1023
+ ]),
1024
+ _: 1
1025
+ })
1026
+ ]),
1027
+ _: 1
1028
+ }, 8, ["modelValue", "close-on-click-modal", "close-on-press-escape", "show-close"]);
1029
+ };
1030
+ }
1031
+ };
1032
+ const DialogGlobalDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-60556147"]]);
1033
+ export {
1034
+ DialogGlobalDialog as default
1035
+ };