@fecp/designer 5.5.39 → 5.5.43
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/package.json.mjs +1 -1
- package/es/designer/src/components/DocumentParam.vue.mjs +1 -1
- package/es/designer/src/components/ParamsConfig.vue2.mjs +1 -1
- package/es/designer/src/layout/aside/HiddenFieldDialog.vue.mjs +1 -1
- package/es/designer/src/packages/advancedFilter/ValueInput.vue2.mjs +1 -1
- package/es/designer/src/packages/dataLinkage/index.vue.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/index.vue.mjs +1 -1
- package/es/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.mjs +1 -1
- package/es/designer/src/packages/form/property/approvalHistory.vue.mjs +1 -1
- package/es/designer/src/packages/form/property/contract.vue.mjs +1 -1
- package/es/designer/src/packages/form/property/subForm.vue.mjs +1 -1
- package/es/designer/src/packages/prod/index.vue.mjs +1 -1
- package/es/designer/src/packages/table/headerBtn.vue.mjs +1 -1
- package/es/designer.css +48 -16
- package/es/packages/vue/src/components/details/footer/Footer.vue.mjs +16 -5
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +24 -14
- package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +1 -1
- package/es/packages/vue/src/components/forms/subForm/SubForm.vue.mjs +1 -0
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/components/DocumentParam.vue.js +1 -1
- package/lib/designer/src/components/ParamsConfig.vue2.js +1 -1
- package/lib/designer/src/layout/aside/HiddenFieldDialog.vue.js +1 -1
- package/lib/designer/src/packages/advancedFilter/ValueInput.vue2.js +1 -1
- package/lib/designer/src/packages/dataLinkage/index.vue.js +1 -1
- package/lib/designer/src/packages/dialog/index.vue2.js +326 -326
- package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/index.vue2.js +297 -297
- package/lib/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.js +1 -1
- package/lib/designer/src/packages/form/property/approvalHistory.vue.js +1 -1
- package/lib/designer/src/packages/form/property/contract.vue.js +1 -1
- package/lib/designer/src/packages/form/property/subForm.vue.js +1 -1
- package/lib/designer/src/packages/prod/index.vue.js +1 -1
- package/lib/designer/src/packages/table/headerBtn.vue.js +1 -1
- package/lib/designer.css +48 -16
- package/lib/packages/vue/src/components/details/footer/Footer.vue.js +15 -4
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +24 -14
- package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +1 -1
- package/lib/packages/vue/src/components/forms/subForm/SubForm.vue.js +1 -0
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import "../../../node_modules/element-plus/es/index.mjs";
|
|
|
9
9
|
/* empty css */
|
|
10
10
|
import { getCurrentInstance, computed, ref, createElementBlock, openBlock, createBlock, unref, withCtx, createTextVNode, createElementVNode, Fragment, renderList, createVNode } from "vue";
|
|
11
11
|
import { Plus as plus_default, Delete as delete_default } from "../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
12
|
-
import ValueSelector from "./ValueSelector.
|
|
12
|
+
import ValueSelector from "./ValueSelector.vue.mjs";
|
|
13
13
|
import api from "../api/index.mjs";
|
|
14
14
|
/* empty css */
|
|
15
15
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
@@ -4,7 +4,7 @@ import "../../../node_modules/element-plus/es/index.mjs";
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { computed, createElementBlock, openBlock, createBlock, unref, withCtx, createTextVNode, createElementVNode, Fragment, renderList, createVNode } from "vue";
|
|
6
6
|
import { Plus as plus_default, Delete as delete_default } from "../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
7
|
-
import ValueSelector from "./ValueSelector.
|
|
7
|
+
import ValueSelector from "./ValueSelector.vue.mjs";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
10
10
|
import { ElButton } from "../../../node_modules/element-plus/es/components/button/index.mjs";
|
|
@@ -16,7 +16,7 @@ import { Plus as plus_default, RefreshRight as refresh_right_default, Delete as
|
|
|
16
16
|
import { getEditConfigData, getEditingType, cloneDeep, getEditConfigDataFields } from "../../packages/utils/common.mjs";
|
|
17
17
|
import { defaultProperty } from "../../packages/form/aside/index.mjs";
|
|
18
18
|
import { defaultProperty as defaultProperty$1 } from "../../packages/table/aside/index.mjs";
|
|
19
|
-
import ValueSelector from "../../components/ValueSelector.
|
|
19
|
+
import ValueSelector from "../../components/ValueSelector.vue.mjs";
|
|
20
20
|
/* empty css */
|
|
21
21
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
22
22
|
import { ElDialog } from "../../../../node_modules/element-plus/es/components/dialog/index.mjs";
|
|
@@ -14,7 +14,7 @@ import "../../../../node_modules/element-plus/theme-chalk/el-tooltip.css.mjs";
|
|
|
14
14
|
import "../../../../node_modules/element-plus/theme-chalk/el-date-picker.css.mjs";
|
|
15
15
|
import { getCurrentInstance, computed, watch, ref, createElementBlock, unref, openBlock, createBlock, isRef, createVNode, createElementVNode, withCtx, Fragment, renderList } from "vue";
|
|
16
16
|
import { useVModel } from "../../../../node_modules/@vueuse/core/dist/index.mjs";
|
|
17
|
-
import ValueSelector from "../../components/ValueSelector.
|
|
17
|
+
import ValueSelector from "../../components/ValueSelector.vue.mjs";
|
|
18
18
|
import api from "../../api/index.mjs";
|
|
19
19
|
import { getEditConfigDataSources } from "../utils/common.mjs";
|
|
20
20
|
import { createDataSource } from "../utils/datasource.mjs";
|
|
@@ -30,7 +30,7 @@ import "../../../../node_modules/element-plus/theme-chalk/el-date-picker.css.mjs
|
|
|
30
30
|
/* empty css */
|
|
31
31
|
/* empty css */
|
|
32
32
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
33
|
-
/* empty css
|
|
33
|
+
/* empty css */
|
|
34
34
|
/* empty css */
|
|
35
35
|
/* empty css */
|
|
36
36
|
/* empty css */
|
|
@@ -84,7 +84,7 @@ import widgets from "../table/property/widgets.vue.mjs";
|
|
|
84
84
|
import "../../../../node_modules/element-plus/theme-chalk/el-tab-pane.css.mjs";
|
|
85
85
|
/* empty css */
|
|
86
86
|
/* empty css */
|
|
87
|
-
/* empty css
|
|
87
|
+
/* empty css */
|
|
88
88
|
/* empty css */
|
|
89
89
|
/* empty css */
|
|
90
90
|
/* empty css */
|
|
@@ -4,7 +4,7 @@ import "../../../../../../node_modules/element-plus/es/index.mjs";
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { createElementBlock, openBlock, Fragment, createVNode, withCtx } from "vue";
|
|
6
6
|
import RiskSchemeSelector from "../../../../components/RiskSchemeSelector.vue2.mjs";
|
|
7
|
-
import ValueSelector from "../../../../components/ValueSelector.
|
|
7
|
+
import ValueSelector from "../../../../components/ValueSelector.vue.mjs";
|
|
8
8
|
import ParamsConfig from "../../../../components/ParamsConfig.vue2.mjs";
|
|
9
9
|
import { ElFormItem } from "../../../../../../node_modules/element-plus/es/components/form/index.mjs";
|
|
10
10
|
import { ElSwitch } from "../../../../../../node_modules/element-plus/es/components/switch/index.mjs";
|
|
@@ -11,7 +11,7 @@ import "../../../../../node_modules/element-plus/es/index.mjs";
|
|
|
11
11
|
import { computed, ref, watch, createBlock, openBlock, unref, isRef, withCtx, createVNode, createElementBlock, createCommentVNode, createTextVNode, Fragment } from "vue";
|
|
12
12
|
import { getCurrentItem, getEditConfigData } from "../../utils/common.mjs";
|
|
13
13
|
import emitter from "../../utils/eventBus.mjs";
|
|
14
|
-
import ValueSelector from "../../../components/ValueSelector.
|
|
14
|
+
import ValueSelector from "../../../components/ValueSelector.vue.mjs";
|
|
15
15
|
import { ElCollapse, ElCollapseItem } from "../../../../../node_modules/element-plus/es/components/collapse/index.mjs";
|
|
16
16
|
import { ElForm, ElFormItem } from "../../../../../node_modules/element-plus/es/components/form/index.mjs";
|
|
17
17
|
import { ElInput } from "../../../../../node_modules/element-plus/es/components/input/index.mjs";
|
|
@@ -17,7 +17,7 @@ import "../../../../../node_modules/element-plus/es/index.mjs";
|
|
|
17
17
|
import { getCurrentInstance, computed, ref, createBlock, openBlock, withCtx, createVNode, createTextVNode, createElementBlock, Fragment, renderList } from "vue";
|
|
18
18
|
import { getCurrentItem } from "../../utils/common.mjs";
|
|
19
19
|
import "../../utils/eventBus.mjs";
|
|
20
|
-
import ValueSelector from "../../../components/ValueSelector.
|
|
20
|
+
import ValueSelector from "../../../components/ValueSelector.vue.mjs";
|
|
21
21
|
import api from "../../../api/index.mjs";
|
|
22
22
|
import ParamsConfig from "../../../components/ParamsConfig.vue2.mjs";
|
|
23
23
|
/* empty css */
|
|
@@ -12,7 +12,7 @@ import { computed, ref, createBlock, openBlock, unref, isRef, withCtx, createVNo
|
|
|
12
12
|
import { getCurrentItem, getEditConfigData } from "../../utils/common.mjs";
|
|
13
13
|
import TemplateSelector from "../../../components/TemplateSelector.vue2.mjs";
|
|
14
14
|
import emitter from "../../utils/eventBus.mjs";
|
|
15
|
-
import ValueSelector from "../../../components/ValueSelector.
|
|
15
|
+
import ValueSelector from "../../../components/ValueSelector.vue.mjs";
|
|
16
16
|
import ParamsConfig from "../../../components/ParamsConfig.vue2.mjs";
|
|
17
17
|
import { ElCollapse, ElCollapseItem } from "../../../../../node_modules/element-plus/es/components/collapse/index.mjs";
|
|
18
18
|
import { ElForm, ElFormItem } from "../../../../../node_modules/element-plus/es/components/form/index.mjs";
|
|
@@ -14,7 +14,7 @@ import "../../../../node_modules/element-plus/es/index.mjs";
|
|
|
14
14
|
import { getCurrentInstance, useModel, ref, watch, computed, createBlock, openBlock, withCtx, createVNode, createElementVNode, createElementBlock, Fragment, renderList, createTextVNode, unref } from "vue";
|
|
15
15
|
import { Plus as plus_default } from "../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
16
16
|
import { getEditConfigData, getEditConfigDataFields, setEditConfigData } from "../utils/common.mjs";
|
|
17
|
-
import ValueSelector from "../../components/ValueSelector.
|
|
17
|
+
import ValueSelector from "../../components/ValueSelector.vue.mjs";
|
|
18
18
|
import api from "../../api/index.mjs";
|
|
19
19
|
/* empty css */
|
|
20
20
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
package/es/designer.css
CHANGED
|
@@ -5852,23 +5852,20 @@ body,
|
|
|
5852
5852
|
outline: none;
|
|
5853
5853
|
box-shadow: 0 1px 0 0 #c0c4cc inset, 0 -1px 0 0 #c0c4cc inset, -1px 0 0 0 #c0c4cc inset;
|
|
5854
5854
|
}
|
|
5855
|
-
.info-icon[data-v-
|
|
5855
|
+
.info-icon[data-v-44a32b0c] {
|
|
5856
5856
|
margin-left: 4px;
|
|
5857
5857
|
color: #f5b041;
|
|
5858
5858
|
cursor: help;
|
|
5859
5859
|
font-size: 14px;
|
|
5860
5860
|
pointer-events: all;
|
|
5861
5861
|
}
|
|
5862
|
-
.credit-icon[data-v-
|
|
5862
|
+
.credit-icon[data-v-44a32b0c] {
|
|
5863
5863
|
color: #2e8bff;
|
|
5864
5864
|
margin-right: 2px;
|
|
5865
5865
|
}
|
|
5866
|
-
.regulation-icon[data-v-
|
|
5866
|
+
.regulation-icon[data-v-44a32b0c] {
|
|
5867
5867
|
color: #f56c6c;
|
|
5868
5868
|
margin-right: 2px;
|
|
5869
|
-
}
|
|
5870
|
-
[data-v-2860c795] .el-form-item__label {
|
|
5871
|
-
padding: 0 8px 0 0;
|
|
5872
5869
|
}
|
|
5873
5870
|
.el-page-header.is-contentful .el-page-header__main{border-top:1px solid var(--el-border-color-light);margin-top:16px}.el-page-header__header{justify-content:space-between;align-items:center;line-height:24px;display:flex}.el-page-header__left{align-items:center;margin-right:40px;display:flex;position:relative}.el-page-header__back{cursor:pointer;align-items:center;display:flex}.el-page-header__left .el-divider--vertical{margin:0 16px}.el-page-header__icon{align-items:center;margin-right:10px;font-size:16px;display:flex}.el-page-header__icon .el-icon{font-size:inherit}.el-page-header__title{font-size:14px;font-weight:500}.el-page-header__content{color:var(--el-text-color-primary);font-size:18px}.el-page-header__breadcrumb{margin-bottom:16px}.fec-header[data-v-a55fc4ab] {
|
|
5874
5871
|
padding: 0 20px;
|
|
@@ -5919,7 +5916,7 @@ body,
|
|
|
5919
5916
|
display: flex;
|
|
5920
5917
|
align-items: flex-end;
|
|
5921
5918
|
}
|
|
5922
|
-
.form-details-footer[data-v-
|
|
5919
|
+
.form-details-footer[data-v-69e1a97b] {
|
|
5923
5920
|
background-color: #fff;
|
|
5924
5921
|
height: 50px;
|
|
5925
5922
|
display: flex;
|
|
@@ -5930,29 +5927,30 @@ body,
|
|
|
5930
5927
|
padding: 0;
|
|
5931
5928
|
z-index: 1;
|
|
5932
5929
|
}
|
|
5933
|
-
.form-details-footer > .el-button[data-v-
|
|
5930
|
+
.form-details-footer > .el-button[data-v-69e1a97b] {
|
|
5934
5931
|
width: 80px;
|
|
5935
5932
|
font-size: var(--el-font-size-extra-small);
|
|
5936
5933
|
}
|
|
5937
|
-
|
|
5934
|
+
|
|
5935
|
+
.fec-form[data-v-95d9b970] {
|
|
5938
5936
|
height: 100%;
|
|
5939
5937
|
}
|
|
5940
|
-
[data-v-
|
|
5938
|
+
[data-v-95d9b970] .vgl-layout {
|
|
5941
5939
|
position: relative;
|
|
5942
5940
|
}
|
|
5943
|
-
[data-v-
|
|
5941
|
+
[data-v-95d9b970] .vgl-item {
|
|
5944
5942
|
transition: none;
|
|
5945
5943
|
}
|
|
5946
|
-
[data-v-
|
|
5944
|
+
[data-v-95d9b970] .vgl-item > .el-form-item {
|
|
5947
5945
|
width: 100%;
|
|
5948
5946
|
padding: 6px 8px 0 8px;
|
|
5949
5947
|
height: calc(100% - 15px);
|
|
5950
5948
|
display: flex;
|
|
5951
5949
|
}
|
|
5952
|
-
[data-v-
|
|
5950
|
+
[data-v-95d9b970] .vgl-item > .el-form-item.el-form-item--label-top {
|
|
5953
5951
|
flex-direction: column;
|
|
5954
5952
|
}
|
|
5955
|
-
[data-v-
|
|
5953
|
+
[data-v-95d9b970] .vgl-item > .el-form-item .el-form-item__label {
|
|
5956
5954
|
line-height: 20px;
|
|
5957
5955
|
display: flex;
|
|
5958
5956
|
align-items: center;
|
|
@@ -5960,14 +5958,48 @@ body,
|
|
|
5960
5958
|
pointer-events: none;
|
|
5961
5959
|
flex-wrap: wrap;
|
|
5962
5960
|
white-space: normal;
|
|
5961
|
+
padding: 0 8px 0 0;
|
|
5962
|
+
width: 100% !important;
|
|
5963
|
+
max-width: 160px;
|
|
5964
|
+
min-width: 80px;
|
|
5965
|
+
flex-shrink: 0;
|
|
5963
5966
|
}
|
|
5964
|
-
[data-v-
|
|
5967
|
+
[data-v-95d9b970] .vgl-item > .el-form-item {
|
|
5965
5968
|
/* .el-form-item__error {
|
|
5966
5969
|
padding-top: 10px;
|
|
5967
5970
|
} */
|
|
5968
5971
|
}
|
|
5969
|
-
[data-v-
|
|
5972
|
+
[data-v-95d9b970] .vgl-item > .el-container {
|
|
5970
5973
|
height: auto !important;
|
|
5974
|
+
}
|
|
5975
|
+
@media (min-width: 1440px) {
|
|
5976
|
+
[data-v-95d9b970] .vgl-item .el-form-item__label {
|
|
5977
|
+
max-width: 160px !important;
|
|
5978
|
+
}
|
|
5979
|
+
}
|
|
5980
|
+
/* 标准 PC(1200px ~ 1439px)*/
|
|
5981
|
+
@media (min-width: 1200px) and (max-width: 1439px) {
|
|
5982
|
+
[data-v-95d9b970] .vgl-item .el-form-item__label {
|
|
5983
|
+
max-width: 135px !important;
|
|
5984
|
+
}
|
|
5985
|
+
}
|
|
5986
|
+
/* 2. 标准 PC 992px ~ 1199px */
|
|
5987
|
+
@media (min-width: 992px) and (max-width: 1199px) {
|
|
5988
|
+
[data-v-95d9b970] .vgl-item .el-form-item__label {
|
|
5989
|
+
max-width: 120px !important;
|
|
5990
|
+
}
|
|
5991
|
+
}
|
|
5992
|
+
/* 3. 小屏 PC / 窄窗口 <992px(最小到768px)*/
|
|
5993
|
+
@media (max-width: 991px) and (min-width: 768px) {
|
|
5994
|
+
[data-v-95d9b970] .vgl-item .el-form-item__label {
|
|
5995
|
+
max-width: 100px !important;
|
|
5996
|
+
}
|
|
5997
|
+
}
|
|
5998
|
+
/* 超小屏 <768px */
|
|
5999
|
+
@media (max-width: 767px) {
|
|
6000
|
+
[data-v-95d9b970] .vgl-item .el-form-item__label {
|
|
6001
|
+
max-width: 80px !important;
|
|
6002
|
+
}
|
|
5971
6003
|
}.table-pagination[data-v-142fdd35] {
|
|
5972
6004
|
display: flex;
|
|
5973
6005
|
justify-content: flex-end;
|
|
@@ -2,7 +2,7 @@ import "../../../../../../node_modules/element-plus/es/index.mjs";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { resolveDirective, createBlock, createCommentVNode, openBlock, withCtx, createElementBlock, Fragment, renderList, withDirectives, createTextVNode, toDisplayString } from "vue";
|
|
5
|
+
import { ref, onMounted, resolveDirective, createBlock, createCommentVNode, unref, openBlock, withCtx, createElementBlock, Fragment, renderList, withDirectives, createTextVNode, toDisplayString } from "vue";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
8
8
|
import { ElFooter } from "../../../../../../node_modules/element-plus/es/components/container/index.mjs";
|
|
@@ -24,18 +24,29 @@ const _sfc_main = {
|
|
|
24
24
|
},
|
|
25
25
|
emits: ["cancel", "submit", "custom-button-click"],
|
|
26
26
|
setup(__props, { emit: __emit }) {
|
|
27
|
+
const props = __props;
|
|
27
28
|
const emit = __emit;
|
|
29
|
+
const formDetailsFooterRef = ref();
|
|
28
30
|
const handleButtonClick = (button) => {
|
|
29
31
|
emit("custom-button-click", button);
|
|
30
32
|
};
|
|
33
|
+
const showFooter = ref(true);
|
|
34
|
+
onMounted(() => {
|
|
35
|
+
const layoutDom = formDetailsFooterRef.value.$el.closest(".fec-layout-row");
|
|
36
|
+
if (layoutDom && props.formMode == "query") {
|
|
37
|
+
showFooter.value = false;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
31
40
|
return (_ctx, _cache) => {
|
|
32
41
|
var _a;
|
|
33
42
|
const _component_el_button = ElButton;
|
|
34
43
|
const _component_el_footer = ElFooter;
|
|
35
44
|
const _directive_fec_auth = resolveDirective("fec-auth");
|
|
36
|
-
return __props.pageFooterConfig.enabled && ((_a = __props.pageFooterConfig.actions) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_component_el_footer, {
|
|
45
|
+
return __props.pageFooterConfig.enabled && ((_a = __props.pageFooterConfig.actions) == null ? void 0 : _a.length) && unref(showFooter) ? (openBlock(), createBlock(_component_el_footer, {
|
|
37
46
|
key: 0,
|
|
38
|
-
class: "form-details-footer"
|
|
47
|
+
class: "form-details-footer",
|
|
48
|
+
ref_key: "formDetailsFooterRef",
|
|
49
|
+
ref: formDetailsFooterRef
|
|
39
50
|
}, {
|
|
40
51
|
default: withCtx(() => [
|
|
41
52
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.pageFooterConfig.actions, (button) => {
|
|
@@ -58,11 +69,11 @@ const _sfc_main = {
|
|
|
58
69
|
}), 128))
|
|
59
70
|
]),
|
|
60
71
|
_: 1
|
|
61
|
-
})) : createCommentVNode("", true);
|
|
72
|
+
}, 512)) : createCommentVNode("", true);
|
|
62
73
|
};
|
|
63
74
|
}
|
|
64
75
|
};
|
|
65
|
-
const component = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
76
|
+
const component = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-69e1a97b"]]);
|
|
66
77
|
export {
|
|
67
78
|
component as default
|
|
68
79
|
};
|
|
@@ -117,6 +117,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
117
117
|
const productData = ref({});
|
|
118
118
|
const fieldsData = ref([]);
|
|
119
119
|
const hiddenFields = ref([]);
|
|
120
|
+
const prevFormData = ref({});
|
|
121
|
+
let linkaged = false;
|
|
120
122
|
const rowHeight = ref(1);
|
|
121
123
|
const pageEvents = props.canPageEvent ? usePageEvents(() => ({
|
|
122
124
|
pageEventConfig: localConfig.value.pageEventConfig,
|
|
@@ -138,7 +140,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
138
140
|
() => props.templateKey,
|
|
139
141
|
(key) => {
|
|
140
142
|
if (key) {
|
|
141
|
-
loadConfig();
|
|
143
|
+
loadConfig("dynamic");
|
|
142
144
|
}
|
|
143
145
|
}
|
|
144
146
|
);
|
|
@@ -146,14 +148,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
146
148
|
() => props.modelValue,
|
|
147
149
|
(newVal, oldVal) => {
|
|
148
150
|
if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
|
|
149
|
-
loadFormData(
|
|
151
|
+
loadFormData("change");
|
|
150
152
|
}
|
|
151
153
|
}
|
|
152
154
|
);
|
|
153
|
-
const loadConfig = async () => {
|
|
155
|
+
const loadConfig = async (state) => {
|
|
154
156
|
if (!props.templateKey && (!props.initOption || Object.keys(props.initOption).length == 0)) {
|
|
155
157
|
return;
|
|
156
158
|
}
|
|
159
|
+
prevFormData.value = {};
|
|
160
|
+
linkaged = false;
|
|
157
161
|
configLoading.value = true;
|
|
158
162
|
try {
|
|
159
163
|
let option = await getJsonAsyncUtil(
|
|
@@ -176,7 +180,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
176
180
|
return item.component;
|
|
177
181
|
});
|
|
178
182
|
hiddenFields.value = option.hiddenFields || [];
|
|
179
|
-
loadFormData();
|
|
183
|
+
loadFormData(state);
|
|
180
184
|
loadEventFlow();
|
|
181
185
|
if (pageEvents && localConfig.value.pageEventConfig) {
|
|
182
186
|
const onCreatedEvent = localConfig.value.pageEventConfig.find(
|
|
@@ -207,7 +211,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
207
211
|
function layoutUpdated(layoutData) {
|
|
208
212
|
emit("layoutUpdated", layoutData);
|
|
209
213
|
}
|
|
210
|
-
const loadFormData = (
|
|
214
|
+
const loadFormData = (state) => {
|
|
211
215
|
var _a;
|
|
212
216
|
const defaultData = {};
|
|
213
217
|
const rules = {};
|
|
@@ -220,7 +224,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
220
224
|
}
|
|
221
225
|
defaultData[component.fieldName] = defaultValue;
|
|
222
226
|
}
|
|
223
|
-
if (
|
|
227
|
+
if (state != "change") {
|
|
224
228
|
if (component.fieldName) {
|
|
225
229
|
const fieldRules = generateFieldRules(component, formData, [
|
|
226
230
|
...fieldsData.value,
|
|
@@ -241,15 +245,22 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
241
245
|
...fieldsData.value,
|
|
242
246
|
...hiddenFields.value
|
|
243
247
|
]);
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
248
|
+
if (value) {
|
|
249
|
+
defaultData[field.fieldName] = value;
|
|
250
|
+
}
|
|
251
|
+
} else if (field.value) {
|
|
252
|
+
defaultData[field.fieldName] = field.value;
|
|
247
253
|
}
|
|
248
254
|
}
|
|
249
255
|
});
|
|
250
256
|
}
|
|
251
|
-
|
|
252
|
-
|
|
257
|
+
if (state == "dynamic") {
|
|
258
|
+
debugger;
|
|
259
|
+
formData.value = { ...setFormData(props.modelValue, true), ...defaultData };
|
|
260
|
+
} else {
|
|
261
|
+
formData.value = { ...defaultData, ...setFormData(props.modelValue, true) };
|
|
262
|
+
}
|
|
263
|
+
if (state != "change") {
|
|
253
264
|
formRules.value = rules;
|
|
254
265
|
}
|
|
255
266
|
};
|
|
@@ -763,7 +774,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
763
774
|
onBeforeUnmount(() => {
|
|
764
775
|
formItemRefs.value.clear();
|
|
765
776
|
});
|
|
766
|
-
const prevFormData = ref({});
|
|
767
777
|
const findChangedFields = (newData, oldData) => {
|
|
768
778
|
const changedFields = [];
|
|
769
779
|
const allKeys = /* @__PURE__ */ new Set([
|
|
@@ -949,7 +959,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
949
959
|
gridLayoutFieldsData.value = updatedLayoutData.filter((item) => !item.hidden);
|
|
950
960
|
(_a = gridLayout == null ? void 0 : gridLayout.value) == null ? void 0 : _a.resizeEvent();
|
|
951
961
|
};
|
|
952
|
-
let linkaged = false;
|
|
953
962
|
function initLinkage() {
|
|
954
963
|
const changedFields = findChangedFields(formData.value, prevFormData.value);
|
|
955
964
|
console.log("🚀 ~ initLinkage ~ changedFields:", changedFields);
|
|
@@ -1003,6 +1012,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
1003
1012
|
provide("setFormItemHeight", setFormItemHeight);
|
|
1004
1013
|
provide("formCtx", ctx);
|
|
1005
1014
|
provide("handleEvent", handleEvent);
|
|
1015
|
+
provide("getFormData", getFormData);
|
|
1006
1016
|
__expose({
|
|
1007
1017
|
validate,
|
|
1008
1018
|
resetFields,
|
|
@@ -1103,7 +1113,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
1103
1113
|
};
|
|
1104
1114
|
}
|
|
1105
1115
|
});
|
|
1106
|
-
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1116
|
+
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-95d9b970"]]);
|
|
1107
1117
|
export {
|
|
1108
1118
|
_Form as default
|
|
1109
1119
|
};
|
|
@@ -205,7 +205,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
});
|
|
208
|
-
const _FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
208
|
+
const _FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-44a32b0c"]]);
|
|
209
209
|
export {
|
|
210
210
|
_FormItem as default
|
|
211
211
|
};
|
|
@@ -48,6 +48,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
48
48
|
setup(__props, { expose: __expose }) {
|
|
49
49
|
const props = __props;
|
|
50
50
|
const formData = inject("formData");
|
|
51
|
+
inject("getFormData");
|
|
51
52
|
inject("rowHeight");
|
|
52
53
|
inject("gridLayout");
|
|
53
54
|
const setFormItemHeight = inject("setFormItemHeight");
|
|
@@ -11,7 +11,7 @@ require("../../../node_modules/element-plus/es/index.js");
|
|
|
11
11
|
;/* empty css */
|
|
12
12
|
const Vue = require("vue");
|
|
13
13
|
const index$2 = require("../../../node_modules/@element-plus/icons-vue/dist/index.js");
|
|
14
|
-
const ValueSelector = require("./ValueSelector.
|
|
14
|
+
const ValueSelector = require("./ValueSelector.vue.js");
|
|
15
15
|
const index = require("../api/index.js");
|
|
16
16
|
;/* empty css */
|
|
17
17
|
const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
|
|
@@ -6,7 +6,7 @@ require("../../../node_modules/element-plus/es/index.js");
|
|
|
6
6
|
;/* empty css */
|
|
7
7
|
const Vue = require("vue");
|
|
8
8
|
const index$1 = require("../../../node_modules/@element-plus/icons-vue/dist/index.js");
|
|
9
|
-
const ValueSelector = require("./ValueSelector.
|
|
9
|
+
const ValueSelector = require("./ValueSelector.vue.js");
|
|
10
10
|
;/* empty css */
|
|
11
11
|
const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
|
|
12
12
|
const index = require("../../../node_modules/element-plus/es/components/button/index.js");
|
|
@@ -18,7 +18,7 @@ const index$2 = require("../../../../node_modules/@element-plus/icons-vue/dist/i
|
|
|
18
18
|
const common = require("../../packages/utils/common.js");
|
|
19
19
|
const index$5 = require("../../packages/form/aside/index.js");
|
|
20
20
|
const index$6 = require("../../packages/table/aside/index.js");
|
|
21
|
-
const ValueSelector = require("../../components/ValueSelector.
|
|
21
|
+
const ValueSelector = require("../../components/ValueSelector.vue.js");
|
|
22
22
|
;/* empty css */
|
|
23
23
|
const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.js");
|
|
24
24
|
const index = require("../../../../node_modules/element-plus/es/components/dialog/index.js");
|
|
@@ -16,7 +16,7 @@ require("../../../../node_modules/element-plus/theme-chalk/el-tooltip.css.js");
|
|
|
16
16
|
require("../../../../node_modules/element-plus/theme-chalk/el-date-picker.css.js");
|
|
17
17
|
const Vue = require("vue");
|
|
18
18
|
const index = require("../../../../node_modules/@vueuse/core/dist/index.js");
|
|
19
|
-
const ValueSelector = require("../../components/ValueSelector.
|
|
19
|
+
const ValueSelector = require("../../components/ValueSelector.vue.js");
|
|
20
20
|
const index$1 = require("../../api/index.js");
|
|
21
21
|
const common = require("../utils/common.js");
|
|
22
22
|
const datasource = require("../utils/datasource.js");
|
|
@@ -32,7 +32,7 @@ require("../../../../node_modules/element-plus/theme-chalk/el-date-picker.css.js
|
|
|
32
32
|
;/* empty css */
|
|
33
33
|
;/* empty css */
|
|
34
34
|
const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.js");
|
|
35
|
-
;/* empty css
|
|
35
|
+
;/* empty css */
|
|
36
36
|
;/* empty css */
|
|
37
37
|
;/* empty css */
|
|
38
38
|
;/* empty css */
|