@fecp/designer 5.3.11 → 5.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/designer.css +214 -214
- package/es/packages/designer/package.json.mjs +1 -1
- package/es/packages/designer/src/components/ParamsConfig.vue2.mjs +1 -1
- package/es/packages/designer/src/components/ValueSelector.vue.mjs +190 -0
- package/es/packages/designer/src/layout/aside/HiddenFieldDialog.vue.mjs +4 -3
- package/es/packages/designer/src/packages/advancedFilter/ValueInput.vue2.mjs +1 -1
- package/es/packages/designer/src/packages/dataLinkage/index.vue.mjs +1 -1
- package/es/packages/designer/src/packages/dialogGlobal/index.vue.mjs +1 -1
- package/es/packages/designer/src/packages/form/components/ComponentPreviewWrapper.vue.mjs +2 -2
- package/es/packages/designer/src/packages/form/index.vue.mjs +2 -13
- package/es/packages/designer/src/packages/form/property/approvalHistory.vue.mjs +1 -1
- package/es/packages/designer/src/packages/form/property/subForm.vue.mjs +1 -1
- package/es/packages/designer/src/packages/prod/index.vue.mjs +1 -1
- package/es/packages/designer/src/packages/table/headerBtn.vue.mjs +1 -1
- package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +12 -2
- package/es/packages/vue/src/components/forms/text/Text.vue.mjs +2 -2
- package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +0 -1
- package/es/packages/vue/src/utils/parseRouteParams.mjs +1 -1
- package/lib/designer.css +214 -214
- package/lib/packages/designer/package.json.js +1 -1
- package/lib/packages/designer/src/components/ParamsConfig.vue2.js +1 -1
- package/lib/packages/designer/src/components/ValueSelector.vue.js +190 -0
- package/lib/packages/designer/src/layout/aside/HiddenFieldDialog.vue.js +4 -3
- package/lib/packages/designer/src/packages/advancedFilter/ValueInput.vue2.js +1 -1
- package/lib/packages/designer/src/packages/dataLinkage/index.vue.js +1 -1
- package/lib/packages/designer/src/packages/dialogGlobal/index.vue.js +1 -1
- package/lib/packages/designer/src/packages/form/components/ComponentPreviewWrapper.vue.js +2 -2
- package/lib/packages/designer/src/packages/form/index.vue.js +1 -12
- package/lib/packages/designer/src/packages/form/property/approvalHistory.vue.js +1 -1
- package/lib/packages/designer/src/packages/form/property/subForm.vue.js +1 -1
- package/lib/packages/designer/src/packages/prod/index.vue.js +1 -1
- package/lib/packages/designer/src/packages/table/headerBtn.vue.js +1 -1
- package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +12 -2
- package/lib/packages/vue/src/components/forms/text/Text.vue.js +2 -2
- package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +0 -1
- package/lib/packages/vue/src/utils/parseRouteParams.js +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* empty css */
|
|
4
4
|
import { computed, createElementBlock, openBlock, createBlock, unref, withCtx, createTextVNode, createElementVNode, Fragment, renderList, createVNode } from "vue";
|
|
5
5
|
import { Plus as plus_default, Delete as delete_default } from "../../../../node_modules/.pnpm/@element-plus_icons-vue@2.3.2_vue@3.5.13_typescript@5.7.3_/node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
6
|
-
import ValueSelector from "./ValueSelector.
|
|
6
|
+
import ValueSelector from "./ValueSelector.vue.mjs";
|
|
7
7
|
/* empty css */
|
|
8
8
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
9
9
|
import { ElButton } from "../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/button/index.mjs";
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { computed, createBlock, openBlock, resolveDynamicComponent, withCtx, createVNode } from "vue";
|
|
2
|
+
import ValueSelectorPopover from "./ValueSelectorPopover.vue2.mjs";
|
|
3
|
+
import { getEditConfigData, getEditConfigDataFields } from "../packages/utils/common.mjs";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
6
|
+
import { ElInputTag } from "../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/input-tag/index.mjs";
|
|
7
|
+
import { ElInput } from "../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/input/index.mjs";
|
|
8
|
+
const _sfc_main = {
|
|
9
|
+
__name: "ValueSelector",
|
|
10
|
+
props: {
|
|
11
|
+
// modelValue 的格式:
|
|
12
|
+
// 单选:{ type: 'field', value: '字段ID' }
|
|
13
|
+
// 多选:[{ type: 'field', value: '字段ID1' }, { type: 'field', value: '字段ID2' }]
|
|
14
|
+
modelValue: {
|
|
15
|
+
default: () => null
|
|
16
|
+
},
|
|
17
|
+
placeholder: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "请输入或选择值"
|
|
20
|
+
},
|
|
21
|
+
readOnly: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
multiple: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
},
|
|
33
|
+
size: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "small"
|
|
36
|
+
}
|
|
37
|
+
// // 可选的字段列表(从父组件传入)
|
|
38
|
+
// availableFields: {
|
|
39
|
+
// type: Array,
|
|
40
|
+
// default: () => [],
|
|
41
|
+
// validator: (value) => Array.isArray(value),
|
|
42
|
+
// },
|
|
43
|
+
},
|
|
44
|
+
emits: ["update:modelValue"],
|
|
45
|
+
setup(__props, { emit: __emit }) {
|
|
46
|
+
const props = __props;
|
|
47
|
+
const emit = __emit;
|
|
48
|
+
const inputComponent = computed(() => {
|
|
49
|
+
return props.multiple ? ElInputTag : ElInput;
|
|
50
|
+
});
|
|
51
|
+
const hiddenFieldsData = computed(() => {
|
|
52
|
+
const editConfigData = getEditConfigData();
|
|
53
|
+
return (editConfigData == null ? void 0 : editConfigData.hiddenFields) || [];
|
|
54
|
+
});
|
|
55
|
+
const availableFields = computed(() => {
|
|
56
|
+
const fields = getEditConfigDataFields() || [];
|
|
57
|
+
return fields.map((item) => ({
|
|
58
|
+
id: item.id,
|
|
59
|
+
label: item.label,
|
|
60
|
+
fieldName: item.fieldName,
|
|
61
|
+
fieldType: item.fieldType
|
|
62
|
+
}));
|
|
63
|
+
});
|
|
64
|
+
const displayText = computed(() => {
|
|
65
|
+
if (!props.modelValue) return "";
|
|
66
|
+
if (!props.multiple && typeof props.modelValue === "object" && !Array.isArray(props.modelValue)) {
|
|
67
|
+
const val = props.modelValue;
|
|
68
|
+
if (val.label) return val.label;
|
|
69
|
+
const field = availableFields.value.find((f) => f.id === val.value);
|
|
70
|
+
return (field == null ? void 0 : field.label) || (field == null ? void 0 : field.fieldName) || val.value;
|
|
71
|
+
} else if (!props.multiple && typeof props.modelValue === "string") {
|
|
72
|
+
return props.modelValue;
|
|
73
|
+
}
|
|
74
|
+
return "";
|
|
75
|
+
});
|
|
76
|
+
const tags = computed({
|
|
77
|
+
get() {
|
|
78
|
+
if (!props.multiple || !Array.isArray(props.modelValue)) {
|
|
79
|
+
return [];
|
|
80
|
+
}
|
|
81
|
+
return props.modelValue.map((item) => {
|
|
82
|
+
if (item.label) return item.label;
|
|
83
|
+
const field = availableFields.value.find((f) => f.id === item.value);
|
|
84
|
+
return (field == null ? void 0 : field.label) || (field == null ? void 0 : field.fieldName) || item.value;
|
|
85
|
+
}).filter(Boolean);
|
|
86
|
+
},
|
|
87
|
+
set(val) {
|
|
88
|
+
if (Array.isArray(props.modelValue)) {
|
|
89
|
+
const newModelValue = props.modelValue.filter((item) => {
|
|
90
|
+
const itemLabel = item.label || (() => {
|
|
91
|
+
const field = [
|
|
92
|
+
...availableFields.value,
|
|
93
|
+
...hiddenFieldsData.value
|
|
94
|
+
].find((f) => f.id === item.value);
|
|
95
|
+
return (field == null ? void 0 : field.label) || (field == null ? void 0 : field.fieldName) || item.value;
|
|
96
|
+
})();
|
|
97
|
+
return val.includes(itemLabel);
|
|
98
|
+
});
|
|
99
|
+
emit("update:modelValue", newModelValue);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
const unifiedInputValue = computed({
|
|
104
|
+
get() {
|
|
105
|
+
return props.multiple ? tags.value : displayText.value;
|
|
106
|
+
},
|
|
107
|
+
set(val) {
|
|
108
|
+
if (props.multiple && Array.isArray(val)) {
|
|
109
|
+
tags.value = val;
|
|
110
|
+
} else if (!props.multiple && typeof val === "string") {
|
|
111
|
+
emit("update:modelValue", val);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
const handleConfirm = (selected) => {
|
|
116
|
+
let result = null;
|
|
117
|
+
if (selected.type === "field") {
|
|
118
|
+
const field = [...availableFields.value, ...hiddenFieldsData.value].find(
|
|
119
|
+
(f) => f.id === selected.value
|
|
120
|
+
);
|
|
121
|
+
result = {
|
|
122
|
+
label: `\${${(field == null ? void 0 : field.label) || (field == null ? void 0 : field.fieldName) || selected.value}}`,
|
|
123
|
+
type: "field",
|
|
124
|
+
value: selected.value
|
|
125
|
+
};
|
|
126
|
+
} else if (selected.type === "userInfo") {
|
|
127
|
+
result = {
|
|
128
|
+
label: `\${用户信息: ${getUserInfoLabel(selected.value)}}`,
|
|
129
|
+
type: "userInfo",
|
|
130
|
+
value: selected.value
|
|
131
|
+
};
|
|
132
|
+
} else if (selected.type === "urlParam") {
|
|
133
|
+
result = {
|
|
134
|
+
label: `\${路由参数: ${selected.value}}`,
|
|
135
|
+
type: "urlParam",
|
|
136
|
+
value: selected.value
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
if (!result) return;
|
|
140
|
+
if (props.multiple) {
|
|
141
|
+
const currentValue = Array.isArray(props.modelValue) ? props.modelValue : [];
|
|
142
|
+
const exists = currentValue.some((item) => item.value === result.value);
|
|
143
|
+
if (!exists) {
|
|
144
|
+
emit("update:modelValue", [...currentValue, result]);
|
|
145
|
+
}
|
|
146
|
+
} else {
|
|
147
|
+
emit("update:modelValue", result);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const getUserInfoLabel = (key) => {
|
|
151
|
+
const labels = {
|
|
152
|
+
userCode: "用户编号",
|
|
153
|
+
userName: "用户名称",
|
|
154
|
+
roleCode: "角色编号",
|
|
155
|
+
roleName: "角色名称",
|
|
156
|
+
orgCode: "机构编号",
|
|
157
|
+
orgName: "机构名称"
|
|
158
|
+
};
|
|
159
|
+
return labels[key] || key;
|
|
160
|
+
};
|
|
161
|
+
return (_ctx, _cache) => {
|
|
162
|
+
return openBlock(), createBlock(resolveDynamicComponent(inputComponent.value), {
|
|
163
|
+
modelValue: unifiedInputValue.value,
|
|
164
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unifiedInputValue.value = $event),
|
|
165
|
+
placeholder: __props.placeholder,
|
|
166
|
+
disabled: __props.disabled,
|
|
167
|
+
readonly: __props.readOnly,
|
|
168
|
+
trigger: __props.multiple ? "Space" : void 0,
|
|
169
|
+
"collapse-tags": "",
|
|
170
|
+
"collapse-tags-tooltip": "",
|
|
171
|
+
"max-collapse-tags": 1,
|
|
172
|
+
class: "value-selector-input",
|
|
173
|
+
size: __props.size
|
|
174
|
+
}, {
|
|
175
|
+
suffix: withCtx(() => [
|
|
176
|
+
createVNode(ValueSelectorPopover, {
|
|
177
|
+
"available-fields": availableFields.value,
|
|
178
|
+
disabled: __props.disabled,
|
|
179
|
+
onConfirm: handleConfirm
|
|
180
|
+
}, null, 8, ["available-fields", "disabled"])
|
|
181
|
+
]),
|
|
182
|
+
_: 1
|
|
183
|
+
}, 8, ["modelValue", "placeholder", "disabled", "readonly", "trigger", "size"]);
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
const ValueSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e5b87efa"]]);
|
|
188
|
+
export {
|
|
189
|
+
ValueSelector as default
|
|
190
|
+
};
|
|
@@ -15,6 +15,7 @@ import { Plus as plus_default, RefreshRight as refresh_right_default, Delete as
|
|
|
15
15
|
import { getEditConfigData, getEditingType, cloneDeep, getEditConfigDataFields } from "../../packages/utils/common.mjs";
|
|
16
16
|
import { defaultProperty } from "../../packages/form/aside/index.mjs";
|
|
17
17
|
import { defaultProperty as defaultProperty$1 } from "../../packages/table/aside/index.mjs";
|
|
18
|
+
import ValueSelector from "../../components/ValueSelector.vue.mjs";
|
|
18
19
|
/* empty css */
|
|
19
20
|
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
20
21
|
import { ElDialog } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/dialog/index.mjs";
|
|
@@ -334,10 +335,10 @@ const _sfc_main = {
|
|
|
334
335
|
}),
|
|
335
336
|
createVNode(_component_el_table_column, { label: "初值" }, {
|
|
336
337
|
default: withCtx(({ row }) => [
|
|
337
|
-
createVNode(
|
|
338
|
+
createVNode(ValueSelector, {
|
|
338
339
|
modelValue: row.value,
|
|
339
340
|
"onUpdate:modelValue": ($event) => row.value = $event,
|
|
340
|
-
|
|
341
|
+
size: "default"
|
|
341
342
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
342
343
|
]),
|
|
343
344
|
_: 1
|
|
@@ -372,7 +373,7 @@ const _sfc_main = {
|
|
|
372
373
|
};
|
|
373
374
|
}
|
|
374
375
|
};
|
|
375
|
-
const HiddenFieldDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
376
|
+
const HiddenFieldDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c3d621bb"]]);
|
|
376
377
|
export {
|
|
377
378
|
HiddenFieldDialog as default
|
|
378
379
|
};
|
|
@@ -13,7 +13,7 @@ import "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescr
|
|
|
13
13
|
/* empty css */
|
|
14
14
|
import { computed, watch, ref, createElementBlock, unref, openBlock, createBlock, isRef, createVNode, createElementVNode, withCtx, Fragment, renderList } from "vue";
|
|
15
15
|
import { useVModel } from "../../../../../node_modules/.pnpm/@vueuse_core@14.2.1_vue@3.5.13_typescript@5.7.3_/node_modules/@vueuse/core/dist/index.mjs";
|
|
16
|
-
import ValueSelector from "../../components/ValueSelector.
|
|
16
|
+
import ValueSelector from "../../components/ValueSelector.vue.mjs";
|
|
17
17
|
import api from "../../api/index.mjs";
|
|
18
18
|
import { getEditConfigDataSources } from "../utils/common.mjs";
|
|
19
19
|
import { createDataSource } from "../utils/datasource.mjs";
|
|
@@ -29,7 +29,7 @@ import "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescr
|
|
|
29
29
|
/* empty css */
|
|
30
30
|
/* empty css */
|
|
31
31
|
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
32
|
-
/* empty css
|
|
32
|
+
/* empty css */
|
|
33
33
|
import "../../axios/config.mjs";
|
|
34
34
|
import "../../../../../_virtual/FileSaver.min.mjs";
|
|
35
35
|
import "../../../../../_virtual/index.mjs";
|
|
@@ -77,7 +77,7 @@ import "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescr
|
|
|
77
77
|
import "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/theme-chalk/el-tab-pane.css.mjs";
|
|
78
78
|
/* empty css */
|
|
79
79
|
/* empty css */
|
|
80
|
-
/* empty css
|
|
80
|
+
/* empty css */
|
|
81
81
|
import "../../axios/config.mjs";
|
|
82
82
|
/* empty css */
|
|
83
83
|
/* empty css */
|
|
@@ -165,7 +165,7 @@ const _sfc_main = {
|
|
|
165
165
|
]),
|
|
166
166
|
key: "1"
|
|
167
167
|
} : void 0,
|
|
168
|
-
!__props.componentData.
|
|
168
|
+
!__props.componentData.disabled && __props.componentData.suffixButton && __props.componentData.suffixButton != "none" ? {
|
|
169
169
|
name: "append",
|
|
170
170
|
fn: withCtx(() => [
|
|
171
171
|
createVNode(_component_el_button, { class: "suffixButton" }, {
|
|
@@ -298,7 +298,7 @@ const _sfc_main = {
|
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
300
|
};
|
|
301
|
-
const ComponentPreviewWrapper = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
301
|
+
const ComponentPreviewWrapper = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-09ce9664"]]);
|
|
302
302
|
export {
|
|
303
303
|
ComponentPreviewWrapper as default
|
|
304
304
|
};
|
|
@@ -15,7 +15,7 @@ import H2Wrapper from "./components/H2Wrapper.vue.mjs";
|
|
|
15
15
|
import SubForm from "./components/SubForm.vue.mjs";
|
|
16
16
|
import ApprovalHistory from "./components/ApprovalHistory.vue.mjs";
|
|
17
17
|
import SubTable from "./components/SubTable.vue.mjs";
|
|
18
|
-
import { StarFilled as star_filled_default, Star as star_default, Lock as lock_default, Unlock as unlock_default, Delete as delete_default
|
|
18
|
+
import { StarFilled as star_filled_default, Star as star_default, Lock as lock_default, Unlock as unlock_default, Delete as delete_default } from "../../../../../node_modules/.pnpm/@element-plus_icons-vue@2.3.2_vue@3.5.13_typescript@5.7.3_/node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
19
19
|
import { getEditConfigData, setSelectedItem, setHoverItem, getCurrentClass, isSelectedItem } from "../utils/common.mjs";
|
|
20
20
|
import { throttle as eo } from "../../../../../node_modules/.pnpm/@vexip-ui_utils@2.16.4/node_modules/@vexip-ui/utils/dist/index.mjs";
|
|
21
21
|
/* empty css */
|
|
@@ -48,10 +48,6 @@ const _hoisted_11 = {
|
|
|
48
48
|
key: 1,
|
|
49
49
|
class: "status-tag disabled-tag"
|
|
50
50
|
};
|
|
51
|
-
const _hoisted_12 = {
|
|
52
|
-
key: 2,
|
|
53
|
-
class: "status-tag readonly-tag"
|
|
54
|
-
};
|
|
55
51
|
const dropId = "drop";
|
|
56
52
|
const _sfc_main = {
|
|
57
53
|
__name: "index",
|
|
@@ -434,13 +430,6 @@ const _sfc_main = {
|
|
|
434
430
|
]),
|
|
435
431
|
_: 1
|
|
436
432
|
})
|
|
437
|
-
])) : item.component.readOnly ? (openBlock(), createElementBlock("div", _hoisted_12, [
|
|
438
|
-
createVNode(_component_el_icon, null, {
|
|
439
|
-
default: withCtx(() => [
|
|
440
|
-
createVNode(unref(view_default))
|
|
441
|
-
]),
|
|
442
|
-
_: 1
|
|
443
|
-
})
|
|
444
433
|
])) : createCommentVNode("", true)
|
|
445
434
|
]),
|
|
446
435
|
createElementVNode("div", {
|
|
@@ -499,7 +488,7 @@ const _sfc_main = {
|
|
|
499
488
|
};
|
|
500
489
|
}
|
|
501
490
|
};
|
|
502
|
-
const formWorkArea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
491
|
+
const formWorkArea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f7bfeb0a"]]);
|
|
503
492
|
export {
|
|
504
493
|
formWorkArea as default
|
|
505
494
|
};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { computed, ref, watch, createBlock, openBlock, unref, isRef, withCtx, createVNode, createElementBlock, createCommentVNode, createTextVNode, Fragment } from "vue";
|
|
11
11
|
import { getCurrentItem, getEditConfigData } from "../../utils/common.mjs";
|
|
12
12
|
import emitter from "../../utils/eventBus.mjs";
|
|
13
|
-
import ValueSelector from "../../../components/ValueSelector.
|
|
13
|
+
import ValueSelector from "../../../components/ValueSelector.vue.mjs";
|
|
14
14
|
import { ElCollapse, ElCollapseItem } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/collapse/index.mjs";
|
|
15
15
|
import { ElForm, ElFormItem } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/form/index.mjs";
|
|
16
16
|
import { ElInput } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/input/index.mjs";
|
|
@@ -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.vue.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 { ElCollapse, ElCollapseItem } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/collapse/index.mjs";
|
|
17
17
|
import { ElForm, ElFormItem } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/form/index.mjs";
|
|
18
18
|
import { ElInput } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/input/index.mjs";
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import { useModel, ref, watch, computed, createBlock, openBlock, withCtx, createVNode, createElementVNode, createElementBlock, Fragment, renderList, createTextVNode, unref } from "vue";
|
|
14
14
|
import { Plus as plus_default } from "../../../../../node_modules/.pnpm/@element-plus_icons-vue@2.3.2_vue@3.5.13_typescript@5.7.3_/node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
15
15
|
import { getEditConfigData, getEditConfigDataFields, setEditConfigData } from "../utils/common.mjs";
|
|
16
|
-
import ValueSelector from "../../components/ValueSelector.
|
|
16
|
+
import ValueSelector from "../../components/ValueSelector.vue.mjs";
|
|
17
17
|
import api from "../../api/index.mjs";
|
|
18
18
|
/* empty css */
|
|
19
19
|
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
8
|
import { createBlock, openBlock, withCtx, createVNode, renderSlot } from "vue";
|
|
9
|
+
/* empty css */
|
|
10
|
+
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
9
11
|
/* empty css */
|
|
10
12
|
/* empty css */
|
|
11
13
|
/* empty css */
|
|
12
14
|
/* empty css */
|
|
13
15
|
/* empty css */
|
|
14
|
-
/* empty css */
|
|
15
|
-
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
16
16
|
import { SwipeCell } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/swipe-cell/index.mjs";
|
|
17
17
|
import { showConfirmDialog } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/dialog/function-call.mjs";
|
|
18
18
|
import "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/dialog/index.mjs";
|
|
@@ -12,6 +12,7 @@ import getJsonAsyncUtil from "../../../utils/getJsonAsyncUtil.mjs";
|
|
|
12
12
|
import _FormItem from "../formItem/FormItem.vue.mjs";
|
|
13
13
|
import { createDataSource } from "../../../utils/datasource.mjs";
|
|
14
14
|
import { generateFieldRules } from "./validation.mjs";
|
|
15
|
+
import { parseSingleParamValue } from "../../../utils/parseRouteParams.mjs";
|
|
15
16
|
import { cloneDeep } from "../../../utils/common.mjs";
|
|
16
17
|
/* empty css */
|
|
17
18
|
/* empty css */
|
|
@@ -203,7 +204,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
203
204
|
if (hiddenFields.value && hiddenFields.value.length > 0) {
|
|
204
205
|
hiddenFields.value.forEach((field) => {
|
|
205
206
|
if (field.fieldName) {
|
|
206
|
-
|
|
207
|
+
if (typeof field.value == "object") {
|
|
208
|
+
debugger;
|
|
209
|
+
const value = parseSingleParamValue(field.value, defaultData, [
|
|
210
|
+
...fieldsData.value,
|
|
211
|
+
...hiddenFields.value
|
|
212
|
+
]);
|
|
213
|
+
defaultData[field.fieldName] = value !== void 0 ? value : null;
|
|
214
|
+
} else {
|
|
215
|
+
defaultData[field.fieldName] = field.value !== void 0 ? field.value : null;
|
|
216
|
+
}
|
|
207
217
|
}
|
|
208
218
|
});
|
|
209
219
|
}
|
|
@@ -971,7 +981,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
971
981
|
};
|
|
972
982
|
}
|
|
973
983
|
});
|
|
974
|
-
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
984
|
+
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e047372a"]]);
|
|
975
985
|
export {
|
|
976
986
|
_Form as default
|
|
977
987
|
};
|
|
@@ -199,7 +199,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
199
199
|
}, toHandlers(__props.config.eventHandlers), {
|
|
200
200
|
placeholder: __props.placeholder,
|
|
201
201
|
disabled: __props.disabled,
|
|
202
|
-
readonly: __props.suffixButton == "dialog" ? true :
|
|
202
|
+
readonly: __props.suffixButton == "dialog" ? true : false,
|
|
203
203
|
maxlength: __props.maxLength,
|
|
204
204
|
"show-word-limit": __props.showWordCount,
|
|
205
205
|
onChange: handleChange,
|
|
@@ -249,7 +249,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
251
|
});
|
|
252
|
-
const _Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
252
|
+
const _Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b0a06421"]]);
|
|
253
253
|
export {
|
|
254
254
|
_Text as default
|
|
255
255
|
};
|
|
@@ -537,7 +537,6 @@ async function handleDialog(node, data, fields, context) {
|
|
|
537
537
|
const dialogList = context.localConfig.dialogs || [];
|
|
538
538
|
dialog = dialogList.find((item) => item.id == (basic == null ? void 0 : basic.dialogId));
|
|
539
539
|
dialog.subFormMode = basic.subFormMode;
|
|
540
|
-
dialog.selectionMode = basic.selectionMode;
|
|
541
540
|
}
|
|
542
541
|
if (!dialog) {
|
|
543
542
|
console.error("ui-dialog: 未找到匹配的弹层配置," + (basic == null ? void 0 : basic.dialogId));
|
|
@@ -8,7 +8,7 @@ function parseSingleParamValue(value, data, fields) {
|
|
|
8
8
|
}
|
|
9
9
|
const type = value.type;
|
|
10
10
|
if (type === "field") {
|
|
11
|
-
const field = fields.find((f) => f.id
|
|
11
|
+
const field = fields.find((f) => f.id == value.value);
|
|
12
12
|
if (field) {
|
|
13
13
|
return data[field.fieldName];
|
|
14
14
|
}
|