@fecp/designer 5.3.11 → 5.3.13
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 +267 -267
- 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/designer/src/packages/table/property/customBtn.vue.mjs +10 -0
- package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +11 -2
- package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +4 -3
- package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +41 -9
- package/es/packages/vue/src/components/forms/text/Text.vue.mjs +2 -2
- package/es/packages/vue/src/components/table/CustomButtons.vue.mjs +29 -3
- package/es/packages/vue/src/components/table/DynamicQuery.vue.mjs +21 -2
- package/es/packages/vue/src/components/table/Table.vue.mjs +13 -7
- 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 +267 -267
- 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/designer/src/packages/table/property/customBtn.vue.js +10 -0
- package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +11 -2
- package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +4 -3
- package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +41 -9
- package/lib/packages/vue/src/components/forms/text/Text.vue.js +2 -2
- package/lib/packages/vue/src/components/table/CustomButtons.vue.js +29 -3
- package/lib/packages/vue/src/components/table/DynamicQuery.vue.js +21 -2
- package/lib/packages/vue/src/components/table/Table.vue.js +13 -7
- 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";
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import { computed, ref, createBlock, openBlock, unref, isRef, withCtx, createVNode, createCommentVNode } from "vue";
|
|
14
14
|
import EventConfigButton from "../../../components/EventConfigButton.vue.mjs";
|
|
15
15
|
import { getCurrentItem } from "../../utils/common.mjs";
|
|
16
|
+
import ConditionConfigButton from "../../../components/ConditionConfigButton.vue2.mjs";
|
|
16
17
|
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
18
|
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
19
|
import { ElSelect, ElOption } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/select/index.mjs";
|
|
@@ -105,6 +106,15 @@ const _sfc_main = {
|
|
|
105
106
|
]),
|
|
106
107
|
_: 1
|
|
107
108
|
}),
|
|
109
|
+
createVNode(_component_el_form_item, { label: "显示条件" }, {
|
|
110
|
+
default: withCtx(() => [
|
|
111
|
+
createVNode(ConditionConfigButton, {
|
|
112
|
+
condition: unref(currentItem).showCondition,
|
|
113
|
+
onConfirm: (data) => unref(currentItem).showCondition = data
|
|
114
|
+
}, null, 8, ["condition", "onConfirm"])
|
|
115
|
+
]),
|
|
116
|
+
_: 1
|
|
117
|
+
}),
|
|
108
118
|
createVNode(_component_el_form_item, { label: "风格" }, {
|
|
109
119
|
default: withCtx(() => [
|
|
110
120
|
createVNode(_component_el_select, {
|
|
@@ -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,15 @@ 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
|
+
const value = parseSingleParamValue(field.value, defaultData, [
|
|
209
|
+
...fieldsData.value,
|
|
210
|
+
...hiddenFields.value
|
|
211
|
+
]);
|
|
212
|
+
defaultData[field.fieldName] = value !== void 0 ? value : null;
|
|
213
|
+
} else {
|
|
214
|
+
defaultData[field.fieldName] = field.value !== void 0 ? field.value : null;
|
|
215
|
+
}
|
|
207
216
|
}
|
|
208
217
|
});
|
|
209
218
|
}
|
|
@@ -971,7 +980,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
971
980
|
};
|
|
972
981
|
}
|
|
973
982
|
});
|
|
974
|
-
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
983
|
+
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-884f35d8"]]);
|
|
975
984
|
export {
|
|
976
985
|
_Form as default
|
|
977
986
|
};
|
|
@@ -127,8 +127,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
127
127
|
ref_key: "innerComponentRef",
|
|
128
128
|
ref: innerComponentRef,
|
|
129
129
|
config: __props.config,
|
|
130
|
-
localConfig: __props.localConfig
|
|
131
|
-
|
|
130
|
+
localConfig: __props.localConfig,
|
|
131
|
+
formMode: __props.formMode
|
|
132
|
+
}, null, 8, ["config", "localConfig", "formMode"])) : __props.config.fieldType == "approvalHistory" ? (openBlock(), createBlock(unref(ApprovalHistory), {
|
|
132
133
|
key: 4,
|
|
133
134
|
ref_key: "innerComponentRef",
|
|
134
135
|
ref: innerComponentRef,
|
|
@@ -187,7 +188,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
187
188
|
};
|
|
188
189
|
}
|
|
189
190
|
});
|
|
190
|
-
const _FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
191
|
+
const _FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bac36800"]]);
|
|
191
192
|
export {
|
|
192
193
|
_FormItem as default
|
|
193
194
|
};
|
|
@@ -5,6 +5,7 @@ import _Table from "../../table/Table.vue.mjs";
|
|
|
5
5
|
import { SubTitle } from "../subTitle/index.mjs";
|
|
6
6
|
import { H2 } from "../h2/index.mjs";
|
|
7
7
|
import { parseRouteParams } from "../../../utils/parseRouteParams.mjs";
|
|
8
|
+
import { checkFilterMatch } from "../../../utils/parseFilterConfig.mjs";
|
|
8
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";
|
|
9
10
|
const _hoisted_1 = {
|
|
10
11
|
key: 0,
|
|
@@ -22,6 +23,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
22
23
|
localConfig: {
|
|
23
24
|
type: Object,
|
|
24
25
|
required: true
|
|
26
|
+
},
|
|
27
|
+
formMode: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: ""
|
|
25
30
|
}
|
|
26
31
|
// subFormId: {
|
|
27
32
|
// type: String,
|
|
@@ -74,8 +79,34 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
74
79
|
return {};
|
|
75
80
|
});
|
|
76
81
|
const subTableOption = ref({});
|
|
77
|
-
const
|
|
78
|
-
|
|
82
|
+
const subTableFieldsData = computed(() => {
|
|
83
|
+
var _a, _b;
|
|
84
|
+
return [
|
|
85
|
+
...((_a = subTableOption.value) == null ? void 0 : _a.fieldsData) || [],
|
|
86
|
+
...((_b = subTableOption.value) == null ? void 0 : _b.hiddenFields) || []
|
|
87
|
+
];
|
|
88
|
+
});
|
|
89
|
+
const leftButtons = computed(() => {
|
|
90
|
+
var _a, _b;
|
|
91
|
+
return (((_b = (_a = subTableOption.value) == null ? void 0 : _a.customBtns) == null ? void 0 : _b.left) || []).filter((item) => {
|
|
92
|
+
if (!item.showCondition) return true;
|
|
93
|
+
return checkFilterMatch(
|
|
94
|
+
item.showCondition,
|
|
95
|
+
initHiddenData.value,
|
|
96
|
+
subTableFieldsData.value
|
|
97
|
+
);
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
const rightButtons = computed(() => {
|
|
101
|
+
var _a, _b;
|
|
102
|
+
return (((_b = (_a = subTableOption.value) == null ? void 0 : _a.customBtns) == null ? void 0 : _b.right) || []).filter((item) => {
|
|
103
|
+
if (!item.showCondition) return true;
|
|
104
|
+
return checkFilterMatch(
|
|
105
|
+
item.showCondition,
|
|
106
|
+
initHiddenData.value,
|
|
107
|
+
subTableFieldsData.value
|
|
108
|
+
);
|
|
109
|
+
});
|
|
79
110
|
});
|
|
80
111
|
function subTableLoaded(subOption) {
|
|
81
112
|
subTableOption.value = subOption;
|
|
@@ -114,7 +145,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
114
145
|
config: __props.config
|
|
115
146
|
}, createSlots({
|
|
116
147
|
default: withCtx(() => [
|
|
117
|
-
(openBlock(true), createElementBlock(Fragment,
|
|
148
|
+
__props.formMode != "query" ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(rightButtons), (btn) => {
|
|
118
149
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
119
150
|
btn.btnType == "custom" ? (openBlock(), createBlock(_component_el_button, {
|
|
120
151
|
key: btn.id,
|
|
@@ -128,14 +159,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
128
159
|
_: 2
|
|
129
160
|
}, 1032, ["onClick"])) : createCommentVNode("", true)
|
|
130
161
|
], 64);
|
|
131
|
-
}), 256))
|
|
162
|
+
}), 256)) : createCommentVNode("", true)
|
|
132
163
|
]),
|
|
133
164
|
_: 2
|
|
134
165
|
}, [
|
|
135
|
-
unref(
|
|
166
|
+
unref(leftButtons) ? {
|
|
136
167
|
name: "left",
|
|
137
168
|
fn: withCtx(() => [
|
|
138
|
-
(openBlock(true), createElementBlock(Fragment,
|
|
169
|
+
__props.formMode != "query" ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(leftButtons), (btn) => {
|
|
139
170
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
140
171
|
btn.btnType == "custom" ? (openBlock(), createBlock(_component_el_button, {
|
|
141
172
|
key: btn.id,
|
|
@@ -149,7 +180,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
149
180
|
_: 2
|
|
150
181
|
}, 1032, ["onClick"])) : createCommentVNode("", true)
|
|
151
182
|
], 64);
|
|
152
|
-
}), 256))
|
|
183
|
+
}), 256)) : createCommentVNode("", true)
|
|
153
184
|
]),
|
|
154
185
|
key: "0"
|
|
155
186
|
} : void 0
|
|
@@ -165,13 +196,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
165
196
|
isSubTable: "",
|
|
166
197
|
onLoaded: subTableLoaded,
|
|
167
198
|
mode: __props.config.subTableMode,
|
|
199
|
+
titleMode: __props.config.titleMode,
|
|
168
200
|
hasPagination: __props.config.isSubTablePagination,
|
|
169
201
|
height: __props.config.subTableHeight,
|
|
170
202
|
tableData: unref(subTableData),
|
|
171
203
|
initHiddenData: unref(initHiddenData),
|
|
172
204
|
canLoadBySearchData: __props.config.reloadOnParamsChange,
|
|
173
|
-
readonly: __props.config.isSubTableReadOnly
|
|
174
|
-
}, null, 8, ["templateKey", "mode", "hasPagination", "height", "tableData", "initHiddenData", "canLoadBySearchData", "readonly"])
|
|
205
|
+
readonly: __props.config.isSubTableReadOnly || __props.formMode == "query"
|
|
206
|
+
}, null, 8, ["templateKey", "mode", "titleMode", "hasPagination", "height", "tableData", "initHiddenData", "canLoadBySearchData", "readonly"])
|
|
175
207
|
], 64);
|
|
176
208
|
};
|
|
177
209
|
}
|
|
@@ -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
|
};
|