@kp-ui/lowcode 2.14.0-beta → 2.14.0-beta.10
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/install.js +26 -25
- package/package.json +2 -2
- package/src/components/FormRender/useFormRender.js +18 -0
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js +18 -18
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js +18 -20
- package/src/components/form-designer/form-widget/container-widget/index.js +6 -6
- package/src/components/form-designer/form-widget/container-widget/vf-box-item.vue.js +9 -9
- package/src/components/form-designer/form-widget/container-widget/vf-dialog-widget.vue.js +20 -19
- package/src/components/form-designer/form-widget/field-widget/cascader-widget.vue.js +32 -39
- package/src/components/form-designer/form-widget/field-widget/date-range-widget.vue.js +24 -31
- package/src/components/form-designer/form-widget/field-widget/date-widget.vue.js +26 -33
- package/src/components/form-designer/form-widget/field-widget/diy-compontent-widget.vue.js +1 -1
- package/src/components/form-designer/form-widget/field-widget/fieldMixin.js +4 -1
- package/src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue.js +84 -152
- package/src/components/form-designer/form-widget/field-widget/input-widget.vue.js +31 -38
- package/src/components/form-designer/form-widget/field-widget/number-widget.vue.js +23 -30
- package/src/components/form-designer/form-widget/field-widget/select-widget.vue.js +56 -63
- package/src/components/form-designer/form-widget/field-widget/switch-widget.vue.js +1 -1
- package/src/components/form-designer/form-widget/field-widget/textarea-widget.vue.js +23 -32
- package/src/components/form-designer/form-widget/field-widget/treeSelect-widget.vue.js +26 -33
- package/src/components/form-designer/index.vue.js +55 -54
- package/src/components/form-designer/setting-panel/form-crud-setting.vue.js +62 -23
- package/src/components/form-designer/setting-panel/form-setting.vue.js +2 -2
- package/src/components/form-designer/setting-panel/form-setting.vue2.js +81 -94
- package/src/components/form-designer/setting-panel/index.vue.js +4 -386
- package/src/components/form-designer/setting-panel/index.vue2.js +273 -0
- package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue2.js +5 -4
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/customRowEvent/data-table-customRow-editor.vue.js +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-colorRow-editor.vue2.js +8 -7
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue.js +26 -24
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-pagination-editor.vue.js +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-selections-editor.vue2.js +24 -24
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-showButtonsColumn-editor.vue.js +9 -8
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +3 -3
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +13 -12
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/bodyStyle-editor.vue2.js +7 -6
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/line-height-editor.vue2.js +7 -6
- package/src/components/form-designer/setting-panel/property-editor/customRender-editor.vue.js +2 -40
- package/src/components/form-designer/setting-panel/property-editor/customRender-editor.vue2.js +41 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onClickIcon-editor.vue.js +2 -47
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onClickIcon-editor.vue2.js +44 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onCreated-editor.vue.js +2 -47
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onCreated-editor.vue2.js +43 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onOkButtonClick-editor.vue.js +2 -46
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onOkButtonClick-editor.vue2.js +43 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onValidate-editor.vue.js +2 -47
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onValidate-editor.vue2.js +44 -0
- package/src/components/form-designer/setting-panel/property-editor/field-dropdown/dropdown-menuList-editor.vue.js +2 -66
- package/src/components/form-designer/setting-panel/property-editor/field-dropdown/dropdown-menuList-editor.vue2.js +42 -0
- package/src/components/form-designer/setting-panel/property-editor/field-html-text/htmlContent-editor.vue.js +5 -4
- package/src/components/form-designer/setting-panel/property-editor/hidden-editor.vue.js +6 -5
- package/src/components/form-designer/setting-panel/property-editor/index.js +146 -153
- package/src/components/form-designer/setting-panel/property-editor/labelIconClass-editor.vue.js +8 -7
- package/src/components/form-designer/setting-panel/property-editor/optionItems-editor.vue.js +38 -35
- package/src/components/form-designer/setting-panel/propertyRegister.js +3 -18
- package/src/components/form-designer/widget-panel/advanced/cascader.js +0 -1
- package/src/components/form-designer/widget-panel/advanced/data-table.js +1 -1
- package/src/components/form-designer/widget-panel/advanced/file-upload.js +0 -1
- package/src/components/form-designer/widget-panel/advanced/rich-editor.js +4 -5
- package/src/components/form-designer/widget-panel/advanced/tree-select.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/checkbox.js +2 -3
- package/src/components/form-designer/widget-panel/basicFields/color.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/date.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/dateRange.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/input.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/number.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/radio.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/rate.js +5 -6
- package/src/components/form-designer/widget-panel/basicFields/select.js +2 -3
- package/src/components/form-designer/widget-panel/basicFields/slider.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/switch.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/textarea.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/time.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/timeRange.js +0 -1
- package/src/components/form-designer/widget-panel/business/department-select.js +0 -1
- package/src/components/form-designer/widget-panel/business/material-select.js +0 -1
- package/src/components/form-designer/widget-panel/business/operation-select.js +2 -3
- package/src/components/form-designer/widget-panel/business/post-select.js +0 -1
- package/src/components/form-designer/widget-panel/business/project-group-select.js +2 -3
- package/src/components/form-designer/widget-panel/business/project-select.js +2 -3
- package/src/components/form-designer/widget-panel/business/user-select.js +0 -1
- package/src/components/form-render/RenderWigetList.vue.js +61 -0
- package/src/components/form-render/RenderWigetList.vue2.js +4 -0
- package/src/components/form-render/SubmitButtonRender.vue.js +33 -29
- package/src/components/form-render/container-item/container-item-wrapper.vue.js +2 -23
- package/src/components/form-render/container-item/container-item-wrapper.vue2.js +20 -0
- package/src/components/form-render/container-item/data-table-item.vue.js +135 -0
- package/src/components/form-render/container-item/grid-col-item.vue.js +149 -0
- package/src/components/form-render/container-item/grid-item.vue.js +92 -0
- package/src/components/form-render/container-item/grid-sub-form-item.vue.js +319 -0
- package/src/components/form-render/container-item/index.js +24 -0
- package/src/components/form-render/container-item/sub-form-item.vue.js +398 -0
- package/src/components/form-render/container-item/tab-item.vue.js +160 -0
- package/src/components/form-render/container-item/table-cell-item.vue.js +95 -0
- package/src/components/form-render/container-item/table-item.vue.js +96 -0
- package/src/components/form-render/container-item/vf-collapse-item.vue.js +252 -0
- package/src/components/form-render/container-item/vf-dialog-item.vue.js +12 -0
- package/src/components/form-render/container-item/vf-drawer-item.vue.js +12 -0
- package/src/components/form-render/dynamic-dialog.vue.js +66 -81
- package/src/components/form-render/index.vue.js +96 -114
- package/src/components/http-editor/index.vue.js +10 -10
- package/src/components/public/ActionButtonListRender.vue.js +19 -24
- package/src/hooks/useLowcode.js +40 -39
- package/src/lang/en-US.js +4 -4
- package/src/lang/zh-CN.js +3 -4
- package/src/mixins/useDataTableMixin.js +18 -23
- package/src/utils/useEmitter.js +57 -0
- package/src/utils/util.js +50 -49
- package/stats.html +1 -1
- package/styles/style.css +1 -1
- package/src/components/form-designer/setting-panel/property-editor/displayStyle-editor.vue.js +0 -46
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onVformAdd-editor.vue.js +0 -49
- package/src/components/form-designer/setting-panel/property-editor/labelTooltip-editor.vue.js +0 -31
- package/src/components/form-designer/setting-panel/property-editor/multipleSelect-editor.vue.js +0 -30
- package/src/components/form-designer/setting-panel/property-editor/uploadTip-editor.vue.js +0 -31
- package/src/components/form-designer/setting-panel/property-editor/uploadURL-editor.vue.js +0 -44
- package/src/components/form-designer/setting-panel/property-editor/withCredentials-editor.vue.js +0 -30
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import p from "../../../utils/emitter.js";
|
|
2
|
+
import x from "../../../utils/i18n.js";
|
|
3
|
+
import I from "../refMixin.js";
|
|
4
|
+
import C from "./container-item-wrapper.vue2.js";
|
|
5
|
+
import y from "./table-cell-item.vue.js";
|
|
6
|
+
import h from "./containerItemMixin.js";
|
|
7
|
+
import { resolveComponent as s, createBlock as c, openBlock as t, withCtx as u, withDirectives as F, createElementBlock as r, createElementVNode as f, normalizeClass as k, Fragment as n, renderList as i, createCommentVNode as R, createSlots as v, renderSlot as L, mergeProps as N, vShow as S } from "vue";
|
|
8
|
+
/* empty css */
|
|
9
|
+
import j from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
10
|
+
const B = {
|
|
11
|
+
name: "table-item",
|
|
12
|
+
componentName: "ContainerItem",
|
|
13
|
+
mixins: [p, x, I, h],
|
|
14
|
+
components: {
|
|
15
|
+
ContainerItemWrapper: C,
|
|
16
|
+
TableCellItem: y
|
|
17
|
+
},
|
|
18
|
+
props: {
|
|
19
|
+
widget: Object,
|
|
20
|
+
subFormRowIndex: {
|
|
21
|
+
/* 子表单组件行索引,从0开始计数 */
|
|
22
|
+
type: Number,
|
|
23
|
+
default: -1
|
|
24
|
+
},
|
|
25
|
+
subFormColIndex: {
|
|
26
|
+
/* 子表单组件列索引,从0开始计数 */
|
|
27
|
+
type: Number,
|
|
28
|
+
default: -1
|
|
29
|
+
},
|
|
30
|
+
subFormRowId: {
|
|
31
|
+
/* 子表单组件行Id,唯一id且不可变 */
|
|
32
|
+
type: String,
|
|
33
|
+
default: ""
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
inject: ["refList", "sfRefList", "globalModel"],
|
|
37
|
+
created() {
|
|
38
|
+
this.initRefList();
|
|
39
|
+
},
|
|
40
|
+
mounted() {
|
|
41
|
+
},
|
|
42
|
+
beforeUnmount() {
|
|
43
|
+
this.unregisterFromRefList();
|
|
44
|
+
},
|
|
45
|
+
methods: {}
|
|
46
|
+
};
|
|
47
|
+
function M(o, E, e, O, V, z) {
|
|
48
|
+
const w = s("table-cell-item"), b = s("container-item-wrapper");
|
|
49
|
+
return t(), c(b, { widget: e.widget }, {
|
|
50
|
+
default: u(() => [
|
|
51
|
+
F((t(), r("div", {
|
|
52
|
+
key: e.widget.id,
|
|
53
|
+
class: "table-container"
|
|
54
|
+
}, [
|
|
55
|
+
f("table", {
|
|
56
|
+
ref: e.widget.id,
|
|
57
|
+
class: k(["table-layout", [o.customClass]])
|
|
58
|
+
}, [
|
|
59
|
+
f("tbody", null, [
|
|
60
|
+
(t(!0), r(n, null, i(e.widget.rows, (m, _) => (t(), r("tr", {
|
|
61
|
+
key: m.id
|
|
62
|
+
}, [
|
|
63
|
+
(t(!0), r(n, null, i(m.cols, (d, l) => (t(), r(n, null, [
|
|
64
|
+
d.merged ? R("", !0) : (t(), c(w, {
|
|
65
|
+
widget: d,
|
|
66
|
+
key: l,
|
|
67
|
+
"parent-list": e.widget.cols,
|
|
68
|
+
"row-index": _,
|
|
69
|
+
"col-index": l,
|
|
70
|
+
"parent-widget": e.widget,
|
|
71
|
+
"sub-form-row-id": e.subFormRowId,
|
|
72
|
+
"sub-form-row-index": e.subFormRowIndex,
|
|
73
|
+
"sub-form-col-index": e.subFormColIndex
|
|
74
|
+
}, v({ _: 2 }, [
|
|
75
|
+
i(Object.keys(o.$slots), (a) => ({
|
|
76
|
+
name: a,
|
|
77
|
+
fn: u((g) => [
|
|
78
|
+
L(o.$slots, a, N({ ref_for: !0 }, g), void 0, !0)
|
|
79
|
+
])
|
|
80
|
+
}))
|
|
81
|
+
]), 1032, ["widget", "parent-list", "row-index", "col-index", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index"]))
|
|
82
|
+
], 64))), 256))
|
|
83
|
+
]))), 128))
|
|
84
|
+
])
|
|
85
|
+
], 2)
|
|
86
|
+
])), [
|
|
87
|
+
[S, !e.widget.options.hidden]
|
|
88
|
+
])
|
|
89
|
+
]),
|
|
90
|
+
_: 3
|
|
91
|
+
}, 8, ["widget"]);
|
|
92
|
+
}
|
|
93
|
+
const K = /* @__PURE__ */ j(B, [["render", M], ["__scopeId", "data-v-48955c34"]]);
|
|
94
|
+
export {
|
|
95
|
+
K as default
|
|
96
|
+
};
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import L from "./container-item-wrapper.vue2.js";
|
|
2
|
+
import I from "../../../utils/emitter.js";
|
|
3
|
+
import { defineAsyncComponent as j, resolveComponent as f, withDirectives as F, createBlock as s, openBlock as o, withCtx as d, createElementVNode as C, createVNode as c, createElementBlock as m, createCommentVNode as _, normalizeClass as S, Fragment as u, renderList as l, resolveDynamicComponent as g, createSlots as p, renderSlot as w, mergeProps as h, Transition as D, normalizeStyle as N, vShow as O } from "vue";
|
|
4
|
+
import M from "../../../utils/i18n.js";
|
|
5
|
+
import T from "../../form-designer/form-widget/field-widget/index.js";
|
|
6
|
+
import B from "../refMixin.js";
|
|
7
|
+
import V from "./containerItemMixin.js";
|
|
8
|
+
import { TpfCollapseTitle as z } from "tmgc2-share";
|
|
9
|
+
import J from "../../svg-icon/index.vue.js";
|
|
10
|
+
/* empty css */
|
|
11
|
+
/* empty css */
|
|
12
|
+
/* empty css */
|
|
13
|
+
import A from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
14
|
+
const E = {
|
|
15
|
+
name: "VfCollapseItem",
|
|
16
|
+
componentName: "ContainerItem",
|
|
17
|
+
// 必须固定为ContainerItem,用于接收父级组件的broadcast事件
|
|
18
|
+
mixins: [I, M, B, V],
|
|
19
|
+
components: {
|
|
20
|
+
ContainerItemWrapper: L,
|
|
21
|
+
TpfCollapseTitle: z,
|
|
22
|
+
SvgIcon: J,
|
|
23
|
+
...T,
|
|
24
|
+
VFormRender: j(() => import("../index.vue.js"))
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
widget: Object,
|
|
28
|
+
parentWidget: Object,
|
|
29
|
+
parentList: Array,
|
|
30
|
+
indexOfParentList: Number,
|
|
31
|
+
model: {
|
|
32
|
+
type: Object,
|
|
33
|
+
default: () => ({})
|
|
34
|
+
},
|
|
35
|
+
subFormRowIndex: {
|
|
36
|
+
/* 子表单组件行索引,从0开始计数 */
|
|
37
|
+
type: Number,
|
|
38
|
+
default: -1
|
|
39
|
+
},
|
|
40
|
+
subFormColIndex: {
|
|
41
|
+
/* 子表单组件列索引,从0开始计数 */
|
|
42
|
+
type: Number,
|
|
43
|
+
default: -1
|
|
44
|
+
},
|
|
45
|
+
subFormRowId: {
|
|
46
|
+
/* 子表单组件行Id,唯一id且不可变 */
|
|
47
|
+
type: String,
|
|
48
|
+
default: ""
|
|
49
|
+
},
|
|
50
|
+
formJson: {
|
|
51
|
+
type: Object
|
|
52
|
+
},
|
|
53
|
+
formData: {
|
|
54
|
+
type: Object,
|
|
55
|
+
default: () => ({})
|
|
56
|
+
},
|
|
57
|
+
optionData: {
|
|
58
|
+
//prop传入的选项数据
|
|
59
|
+
type: Object,
|
|
60
|
+
default: () => ({})
|
|
61
|
+
},
|
|
62
|
+
globalDsv: {
|
|
63
|
+
// 全局数据源变量
|
|
64
|
+
type: Object,
|
|
65
|
+
default: () => ({})
|
|
66
|
+
},
|
|
67
|
+
parentFormRef: {
|
|
68
|
+
type: Object,
|
|
69
|
+
default: null
|
|
70
|
+
},
|
|
71
|
+
extraData: {
|
|
72
|
+
type: Object,
|
|
73
|
+
default: () => ({})
|
|
74
|
+
},
|
|
75
|
+
wrapperId: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: null
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
inject: ["refList", "sfRefList", "globalModel", "getFormConfig", "getGlobalDsv"],
|
|
81
|
+
data() {
|
|
82
|
+
return {};
|
|
83
|
+
},
|
|
84
|
+
computed: {
|
|
85
|
+
rightSlotCss() {
|
|
86
|
+
return this.widget.options.rightSlotCss || "";
|
|
87
|
+
},
|
|
88
|
+
formConfig() {
|
|
89
|
+
return this.getFormConfig();
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
created() {
|
|
93
|
+
this.initRefList(), this.handleOnCreated();
|
|
94
|
+
},
|
|
95
|
+
mounted() {
|
|
96
|
+
this.loadFormCode(this.widget.options.formCode), this.$nextTick(() => {
|
|
97
|
+
this.handleOnMounted();
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
beforeUnmount() {
|
|
101
|
+
this.unregisterFromRefList();
|
|
102
|
+
},
|
|
103
|
+
methods: {
|
|
104
|
+
toggleCollapse() {
|
|
105
|
+
this.widget.options.isCollapse = !this.widget.options.isCollapse;
|
|
106
|
+
},
|
|
107
|
+
async loadFormCode(t) {
|
|
108
|
+
if (t) {
|
|
109
|
+
const y = await this.$http.get("/api/tmgc2-query/dataQuery/detail/FormDefinitionManagement", {
|
|
110
|
+
params: { code: t }
|
|
111
|
+
}).then((e) => e.data.object.frontendDefinition || "{}");
|
|
112
|
+
this.$refs.dFormRef.setFormJson(JSON.parse(y));
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
handleOnCreated() {
|
|
116
|
+
this.widget.options.onCreated && new Function(this.widget.options.onCreated).call(this);
|
|
117
|
+
},
|
|
118
|
+
handleOnMounted() {
|
|
119
|
+
this.widget.options.onMounted && new Function(this.widget.options.onMounted).call(this);
|
|
120
|
+
},
|
|
121
|
+
getFormRef() {
|
|
122
|
+
return this.$refs.dFormRef;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}, P = { class: "tpf-collapse" }, q = { class: "tpf-collapse-header" };
|
|
126
|
+
function G(t, y, e, Q, U, b) {
|
|
127
|
+
const R = f("TpfCollapseTitle"), v = f("SvgIcon"), k = f("a-space"), x = f("container-item-wrapper");
|
|
128
|
+
return F((o(), s(x, { widget: e.widget }, {
|
|
129
|
+
default: d(() => [
|
|
130
|
+
C("div", P, [
|
|
131
|
+
C("div", q, [
|
|
132
|
+
c(k, { size: 5 }, {
|
|
133
|
+
default: d(() => [
|
|
134
|
+
c(R, {
|
|
135
|
+
title: e.widget.options.title
|
|
136
|
+
}, null, 8, ["title"]),
|
|
137
|
+
c(v, {
|
|
138
|
+
"icon-class": e.widget.options.isCollapse ? e.widget.options.collapseIcon : e.widget.options.unCollapseIcon,
|
|
139
|
+
size: "24px",
|
|
140
|
+
shadow: "",
|
|
141
|
+
cursor: "",
|
|
142
|
+
onClick: b.toggleCollapse
|
|
143
|
+
}, null, 8, ["icon-class", "onClick"])
|
|
144
|
+
]),
|
|
145
|
+
_: 1
|
|
146
|
+
}),
|
|
147
|
+
e.widget.options.isCollapse ? _("", !0) : (o(), m("div", {
|
|
148
|
+
key: 0,
|
|
149
|
+
class: S(["header-right", b.rightSlotCss])
|
|
150
|
+
}, [
|
|
151
|
+
e.widget.headerRightSlotList && e.widget.headerRightSlotList.length > 0 ? (o(!0), m(u, { key: 0 }, l(e.widget.headerRightSlotList, (n, a) => (o(), m(u, null, [
|
|
152
|
+
n.category === "container" ? (o(), s(g(t.getComponentByContainer(n)), {
|
|
153
|
+
widget: n,
|
|
154
|
+
key: a,
|
|
155
|
+
"parent-list": e.widget.headerRightSlotList,
|
|
156
|
+
"index-of-parent-list": a,
|
|
157
|
+
"parent-widget": e.widget,
|
|
158
|
+
"sub-form-row-id": e.subFormRowId,
|
|
159
|
+
"sub-form-row-index": e.subFormRowIndex,
|
|
160
|
+
"sub-form-col-index": e.subFormColIndex,
|
|
161
|
+
data: e.model[e.widget.options.name]
|
|
162
|
+
}, p({ _: 2 }, [
|
|
163
|
+
l(Object.keys(t.$slots), (i) => ({
|
|
164
|
+
name: i,
|
|
165
|
+
fn: d((r) => [
|
|
166
|
+
w(t.$slots, i, h({ ref_for: !0 }, r), void 0, !0)
|
|
167
|
+
])
|
|
168
|
+
}))
|
|
169
|
+
]), 1032, ["widget", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index", "data"])) : (o(), s(g(n.type + "-widget"), {
|
|
170
|
+
field: n,
|
|
171
|
+
designer: null,
|
|
172
|
+
key: a,
|
|
173
|
+
"parent-list": e.widget.headerRightSlotList,
|
|
174
|
+
"index-of-parent-list": a,
|
|
175
|
+
"parent-widget": e.widget
|
|
176
|
+
}, p({ _: 2 }, [
|
|
177
|
+
l(Object.keys(t.$slots), (i) => ({
|
|
178
|
+
name: i,
|
|
179
|
+
fn: d((r) => [
|
|
180
|
+
w(t.$slots, i, h({ ref_for: !0 }, r), void 0, !0)
|
|
181
|
+
])
|
|
182
|
+
}))
|
|
183
|
+
]), 1032, ["field", "parent-list", "index-of-parent-list", "parent-widget"]))
|
|
184
|
+
], 64))), 256)) : _("", !0)
|
|
185
|
+
], 2))
|
|
186
|
+
]),
|
|
187
|
+
c(D, {
|
|
188
|
+
mode: "out-in",
|
|
189
|
+
appear: "",
|
|
190
|
+
"enter-active-class": "animate__animated animate__fadeIn animate__faster",
|
|
191
|
+
"leave-active-class": "animate__animated animate__fadeOut animate__faster"
|
|
192
|
+
}, {
|
|
193
|
+
default: d(() => [
|
|
194
|
+
F(C("div", {
|
|
195
|
+
class: S(["tpf-collapse-content"]),
|
|
196
|
+
style: N({
|
|
197
|
+
height: e.widget.options.height || "unset",
|
|
198
|
+
...JSON.parse(e.widget.options.bodyStyle || "{}")
|
|
199
|
+
})
|
|
200
|
+
}, [
|
|
201
|
+
e.widget.defaultSlotsList && e.widget.defaultSlotsList.length > 0 ? (o(!0), m(u, { key: 0 }, l(e.widget.defaultSlotsList, (n, a) => (o(), m(u, null, [
|
|
202
|
+
n.category === "container" ? (o(), s(g(t.getComponentByContainer(n)), {
|
|
203
|
+
widget: n,
|
|
204
|
+
key: a,
|
|
205
|
+
"parent-list": e.widget.defaultSlotsList,
|
|
206
|
+
"index-of-parent-list": a,
|
|
207
|
+
"parent-widget": e.widget,
|
|
208
|
+
"sub-form-row-id": e.subFormRowId,
|
|
209
|
+
"sub-form-row-index": e.subFormRowIndex,
|
|
210
|
+
"sub-form-col-index": e.subFormColIndex,
|
|
211
|
+
data: e.model[n.options.name],
|
|
212
|
+
model: e.model
|
|
213
|
+
}, p({ _: 2 }, [
|
|
214
|
+
l(Object.keys(t.$slots), (i) => ({
|
|
215
|
+
name: i,
|
|
216
|
+
fn: d((r) => [
|
|
217
|
+
w(t.$slots, i, h({ ref_for: !0 }, r), void 0, !0)
|
|
218
|
+
])
|
|
219
|
+
}))
|
|
220
|
+
]), 1032, ["widget", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index", "data", "model"])) : (o(), s(g(n.type + "-widget"), {
|
|
221
|
+
field: n,
|
|
222
|
+
designer: null,
|
|
223
|
+
key: a,
|
|
224
|
+
"parent-list": e.widget.defaultSlotsList,
|
|
225
|
+
"index-of-parent-list": a,
|
|
226
|
+
"parent-widget": e.widget
|
|
227
|
+
}, p({ _: 2 }, [
|
|
228
|
+
l(Object.keys(t.$slots), (i) => ({
|
|
229
|
+
name: i,
|
|
230
|
+
fn: d((r) => [
|
|
231
|
+
w(t.$slots, i, h({ ref_for: !0 }, r), void 0, !0)
|
|
232
|
+
])
|
|
233
|
+
}))
|
|
234
|
+
]), 1032, ["field", "parent-list", "index-of-parent-list", "parent-widget"]))
|
|
235
|
+
], 64))), 256)) : _("", !0)
|
|
236
|
+
], 4), [
|
|
237
|
+
[O, !e.widget.options.isCollapse]
|
|
238
|
+
])
|
|
239
|
+
]),
|
|
240
|
+
_: 3
|
|
241
|
+
})
|
|
242
|
+
])
|
|
243
|
+
]),
|
|
244
|
+
_: 3
|
|
245
|
+
}, 8, ["widget"])), [
|
|
246
|
+
[O, !e.widget.options.hidden]
|
|
247
|
+
]);
|
|
248
|
+
}
|
|
249
|
+
const re = /* @__PURE__ */ A(E, [["render", G], ["__scopeId", "data-v-dd25bb5f"]]);
|
|
250
|
+
export {
|
|
251
|
+
re as default
|
|
252
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createCommentVNode as e } from "vue";
|
|
2
|
+
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const o = {
|
|
4
|
+
name: "vf-dialog-item"
|
|
5
|
+
};
|
|
6
|
+
function r(n, a, c, m, f, s) {
|
|
7
|
+
return e("", !0);
|
|
8
|
+
}
|
|
9
|
+
const _ = /* @__PURE__ */ t(o, [["render", r]]);
|
|
10
|
+
export {
|
|
11
|
+
_ as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createCommentVNode as e } from "vue";
|
|
2
|
+
import r from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const t = {
|
|
4
|
+
name: "vf-drawer-item"
|
|
5
|
+
};
|
|
6
|
+
function o(n, a, c, m, f, s) {
|
|
7
|
+
return e("", !0);
|
|
8
|
+
}
|
|
9
|
+
const d = /* @__PURE__ */ r(t, [["render", o]]);
|
|
10
|
+
export {
|
|
11
|
+
d as default
|
|
12
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as E, defineAsyncComponent as M, computed as c, ref as v, getCurrentInstance as S, onBeforeUnmount as L, resolveDirective as V, createBlock as H, openBlock as b, unref as f, mergeProps as I, withCtx as C, withDirectives as J, createElementBlock as P, createVNode as y, nextTick as U } from "vue";
|
|
2
|
+
import { TpfModal as W } from "tmgc2-share";
|
|
3
|
+
import A from "./SubmitButtonRender.vue.js";
|
|
4
|
+
import { useLowcode as N } from "../../hooks/useLowcode.js";
|
|
5
|
+
const $ = { class: "dialog-content" }, te = /* @__PURE__ */ E({
|
|
5
6
|
name: "dynamic-dialog",
|
|
6
7
|
__name: "dynamic-dialog",
|
|
7
8
|
props: {
|
|
@@ -43,114 +44,98 @@ const $ = { class: "dialog-content" }, ee = /* @__PURE__ */ T({
|
|
|
43
44
|
default: null
|
|
44
45
|
}
|
|
45
46
|
},
|
|
46
|
-
setup(n, { expose:
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
setup(n, { expose: F }) {
|
|
48
|
+
const R = M(() => import("./index.vue.js")), e = n, x = c(() => e.options.height || "500px"), u = v(!1), a = v(!1), i = S(), { vfdRef: l, formConfig: q, getComponentJson: D, goBack: z } = N({
|
|
49
|
+
formCode: e.options.formCode,
|
|
50
|
+
...e.vfCtx
|
|
51
|
+
}), h = c(() => ({
|
|
52
|
+
...e.parentFormRef,
|
|
53
|
+
parentDom: i,
|
|
54
|
+
getParentFormRef: g
|
|
55
|
+
})), O = c(() => e.options.cancelButtonHidden && e.options.okButtonHidden ? { footer: null } : {});
|
|
52
56
|
L(() => {
|
|
53
|
-
var
|
|
54
|
-
console.log(
|
|
57
|
+
var t, o;
|
|
58
|
+
console.log(e.parentFormRef), (o = (t = e.parentFormRef) == null ? void 0 : t.setChildFormRef) == null || o.call(t, null);
|
|
55
59
|
});
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
try {
|
|
61
|
-
const s = await q.get("/api/tmgc2-query/dataQuery/detail/FormDefinitionManagement", {
|
|
62
|
-
params: { code: o.options.formCode }
|
|
63
|
-
}).then((M) => M.data.object.frontendDefinition || "{}"), r = JSON.parse(s);
|
|
64
|
-
console.log("formJson: ", r), (t = (e = a.value) == null ? void 0 : e.setFormJson) == null || t.call(e, r);
|
|
65
|
-
} catch {
|
|
66
|
-
}
|
|
67
|
-
i.value = !1;
|
|
68
|
-
}
|
|
69
|
-
}, O = (e) => {
|
|
70
|
-
console.log("setLoading", e), i.value = e;
|
|
71
|
-
}, w = (e) => {
|
|
72
|
-
a.value.setFormJson(e);
|
|
73
|
-
}, k = (e) => {
|
|
74
|
-
o.options.title = e;
|
|
75
|
-
}, j = () => {
|
|
76
|
-
l.value = !0;
|
|
60
|
+
const w = (t) => {
|
|
61
|
+
console.log("setLoading", t), u.value = t;
|
|
62
|
+
}, k = (t) => {
|
|
63
|
+
e.options.title = t;
|
|
77
64
|
}, B = () => {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
65
|
+
a.value = !0;
|
|
66
|
+
}, j = async () => {
|
|
67
|
+
a.value = !0, U(async () => {
|
|
68
|
+
var t, o;
|
|
69
|
+
e.options.readMode && ((t = l.value) == null || t.setReadMode(!0)), await D([], e.options.formCode), (o = l.value) == null || o.setDialogOrDrawerRef(i), e.parentFormRef && e.parentFormRef.setChildFormRef(l.value), m();
|
|
81
70
|
});
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
},
|
|
89
|
-
return
|
|
90
|
-
|
|
91
|
-
setLoading: O,
|
|
92
|
-
setFormJson: w,
|
|
71
|
+
}, T = () => {
|
|
72
|
+
e.options.onDialogBeforeClose && new Function("done", e.options.onDialogBeforeClose).call(i) === !1 || (a.value = !1);
|
|
73
|
+
}, r = () => e.options.onDialogBeforeClose ? new Function(e.options.onDialogBeforeClose).call(i) : !0, p = () => {
|
|
74
|
+
r() && (a.value = !1);
|
|
75
|
+
}, m = () => {
|
|
76
|
+
e.options.onDialogOpened && new Function(e.options.onDialogOpened).call(i);
|
|
77
|
+
}, g = () => e.parentFormRef;
|
|
78
|
+
return F({
|
|
79
|
+
setLoading: w,
|
|
93
80
|
setTitle: k,
|
|
94
|
-
beforeOpen:
|
|
95
|
-
show:
|
|
96
|
-
close:
|
|
97
|
-
handleBeforeClose:
|
|
81
|
+
beforeOpen: B,
|
|
82
|
+
show: j,
|
|
83
|
+
close: T,
|
|
84
|
+
handleBeforeClose: r,
|
|
98
85
|
handleCloseEvent: p,
|
|
99
|
-
handleOpenedEvent:
|
|
100
|
-
getParentFormRef:
|
|
101
|
-
getFormRef: () => (console.log("getFormRef"),
|
|
102
|
-
getWidgetRef: (
|
|
86
|
+
handleOpenedEvent: m,
|
|
87
|
+
getParentFormRef: g,
|
|
88
|
+
getFormRef: () => (console.log("getFormRef"), l.value),
|
|
89
|
+
getWidgetRef: (t, o = !1) => {
|
|
90
|
+
var s;
|
|
91
|
+
return (s = l.value) == null ? void 0 : s.getWidgetRef(t, o);
|
|
92
|
+
},
|
|
103
93
|
updateTable: () => {
|
|
104
|
-
var
|
|
105
|
-
(s = (
|
|
94
|
+
var t, o, s;
|
|
95
|
+
(s = (o = (t = e.vfCtx) == null ? void 0 : t.parent) == null ? void 0 : o.exposed) != null && s.updateTable && e.vfCtx.parent.exposed.updateTable();
|
|
106
96
|
},
|
|
107
|
-
getExtraData: () =>
|
|
108
|
-
}), (
|
|
97
|
+
getExtraData: () => e.extraData
|
|
98
|
+
}), (t, o) => {
|
|
109
99
|
const s = V("loading");
|
|
110
|
-
return
|
|
100
|
+
return b(), H(f(W), I({
|
|
111
101
|
class: "tpf-model design-model",
|
|
112
102
|
destroyOnClose: !0,
|
|
113
103
|
title: n.options.title,
|
|
114
104
|
bodyStyle: {
|
|
115
|
-
height:
|
|
105
|
+
height: x.value,
|
|
116
106
|
overflow: "auto",
|
|
117
107
|
...JSON.parse(n.options.bodyStyle || "{}")
|
|
118
108
|
},
|
|
119
109
|
centered: !0,
|
|
120
|
-
visible:
|
|
121
|
-
"onUpdate:visible":
|
|
110
|
+
visible: a.value,
|
|
111
|
+
"onUpdate:visible": o[1] || (o[1] = (d) => a.value = d),
|
|
122
112
|
width: n.options.width,
|
|
123
113
|
mask: n.options.showModal,
|
|
124
114
|
maskClosable: n.options.closeOnClickModal,
|
|
125
115
|
keyboard: n.options.closeOnPressEscape,
|
|
126
116
|
onCancel: p
|
|
127
|
-
},
|
|
117
|
+
}, O.value), {
|
|
128
118
|
footerRight: C(() => [
|
|
129
|
-
|
|
130
|
-
"dialog-visible":
|
|
131
|
-
"onUpdate:dialogVisible":
|
|
132
|
-
handleBeforeClose:
|
|
119
|
+
y(A, {
|
|
120
|
+
"dialog-visible": a.value,
|
|
121
|
+
"onUpdate:dialogVisible": o[0] || (o[0] = (d) => a.value = d),
|
|
122
|
+
handleBeforeClose: r,
|
|
133
123
|
options: n.options,
|
|
134
|
-
ctx: f(
|
|
124
|
+
ctx: f(l)
|
|
135
125
|
}, null, 8, ["dialog-visible", "options", "ctx"])
|
|
136
126
|
]),
|
|
137
127
|
default: C(() => [
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
ref: a,
|
|
143
|
-
"form-json": n.formJson,
|
|
144
|
-
"form-data": n.formData,
|
|
128
|
+
J((b(), P("div", $, [
|
|
129
|
+
y(f(R), {
|
|
130
|
+
ref_key: "vfdRef",
|
|
131
|
+
ref: l,
|
|
145
132
|
vfCtx: n.vfCtx,
|
|
146
|
-
"option-data": n.optionData,
|
|
147
|
-
"global-dsv": n.globalDsv,
|
|
148
133
|
"parent-form": h.value,
|
|
149
134
|
"disabled-mode": n.options.disabledMode,
|
|
150
135
|
"dynamic-creation": !0
|
|
151
|
-
}, null, 8, ["
|
|
136
|
+
}, null, 8, ["vfCtx", "parent-form", "disabled-mode"])
|
|
152
137
|
])), [
|
|
153
|
-
[s,
|
|
138
|
+
[s, u.value]
|
|
154
139
|
])
|
|
155
140
|
]),
|
|
156
141
|
_: 1
|
|
@@ -159,5 +144,5 @@ const $ = { class: "dialog-content" }, ee = /* @__PURE__ */ T({
|
|
|
159
144
|
}
|
|
160
145
|
});
|
|
161
146
|
export {
|
|
162
|
-
|
|
147
|
+
te as default
|
|
163
148
|
};
|