@fecp/designer 5.2.12 → 5.2.14
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 +161 -119
- package/es/packages/designer/package.json.mjs +1 -1
- package/es/packages/designer/src/api/index.mjs +3 -0
- package/es/packages/designer/src/components/FieldSetMapping.vue2.mjs +2 -1
- package/es/packages/designer/src/components/ValueSelector.vue2.mjs +2 -2
- package/es/packages/designer/src/layout/header/index.vue.mjs +14 -3
- package/es/packages/designer/src/packages/dataSource/dataSource.vue.mjs +3 -3
- package/es/packages/designer/src/packages/eventFlow/dialog/action/config.mjs +1 -1
- package/es/packages/designer/src/packages/form/headerBtn.vue.mjs +40 -21
- package/es/packages/designer/src/packages/prod/index.vue.mjs +516 -0
- package/es/packages/designer/src/packages/prod/useProdDialog.mjs +16 -0
- package/es/packages/designer/src/packages/table/headerBtn.vue.mjs +3 -3
- package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +15 -4
- package/es/packages/vue/src/components/forms/h2/H2.vue.mjs +9 -2
- package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +64 -2
- package/es/packages/vue/src/components/table/DynamicQuery.vue.mjs +6 -2
- package/es/packages/vue/src/components/table/Table.vue.mjs +9 -8
- package/lib/designer.css +161 -119
- package/lib/packages/designer/package.json.js +1 -1
- package/lib/packages/designer/src/api/index.js +3 -0
- package/lib/packages/designer/src/components/FieldSetMapping.vue2.js +2 -1
- package/lib/packages/designer/src/components/ValueSelector.vue2.js +2 -2
- package/lib/packages/designer/src/layout/header/index.vue.js +14 -3
- package/lib/packages/designer/src/packages/dataSource/dataSource.vue.js +3 -3
- package/lib/packages/designer/src/packages/eventFlow/dialog/action/config.js +1 -1
- package/lib/packages/designer/src/packages/form/headerBtn.vue.js +39 -20
- package/lib/packages/designer/src/packages/prod/index.vue.js +516 -0
- package/lib/packages/designer/src/packages/prod/useProdDialog.js +16 -0
- package/lib/packages/designer/src/packages/table/headerBtn.vue.js +3 -3
- package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +15 -4
- package/lib/packages/vue/src/components/forms/h2/H2.vue.js +9 -2
- package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +64 -2
- package/lib/packages/vue/src/components/table/DynamicQuery.vue.js +6 -2
- package/lib/packages/vue/src/components/table/Table.vue.js +9 -8
- package/package.json +1 -1
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
;/* empty css */
|
|
4
|
+
;/* empty css */
|
|
5
|
+
;/* empty css */
|
|
6
|
+
;/* empty css */
|
|
7
|
+
;/* empty css */
|
|
8
|
+
;/* empty css */
|
|
9
|
+
;/* empty css */
|
|
10
|
+
;/* empty css */
|
|
11
|
+
;/* empty css */
|
|
12
|
+
;/* empty css */
|
|
13
|
+
;/* empty css */
|
|
14
|
+
;/* empty css */
|
|
15
|
+
const vue = require("vue");
|
|
16
|
+
const index$6 = require("../../../../../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.js");
|
|
17
|
+
const common = require("../utils/common.js");
|
|
18
|
+
const ValueSelector = require("../../components/ValueSelector.vue2.js");
|
|
19
|
+
const index = require("../../api/index.js");
|
|
20
|
+
;/* empty css */
|
|
21
|
+
const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
22
|
+
const index$1 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/message/index.js");
|
|
23
|
+
const index$2 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/dialog/index.js");
|
|
24
|
+
const index$3 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/form/index.js");
|
|
25
|
+
const index$4 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/select/index.js");
|
|
26
|
+
const index$5 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/button/index.js");
|
|
27
|
+
const _hoisted_1 = { class: "config-list" };
|
|
28
|
+
const _hoisted_2 = { class: "config-row" };
|
|
29
|
+
const _hoisted_3 = { class: "config-list" };
|
|
30
|
+
const _hoisted_4 = { class: "config-row" };
|
|
31
|
+
const _hoisted_5 = { class: "config-list" };
|
|
32
|
+
const _hoisted_6 = { class: "config-row" };
|
|
33
|
+
const _hoisted_7 = { class: "dialog-footer" };
|
|
34
|
+
const _sfc_main = {
|
|
35
|
+
__name: "index",
|
|
36
|
+
props: {
|
|
37
|
+
"modelValue": { required: true },
|
|
38
|
+
"modelModifiers": {}
|
|
39
|
+
},
|
|
40
|
+
emits: ["update:modelValue"],
|
|
41
|
+
setup(__props, { expose: __expose }) {
|
|
42
|
+
var _a;
|
|
43
|
+
const dialogVisible = vue.useModel(__props, "modelValue");
|
|
44
|
+
const prodConfig = vue.ref(((_a = common.getEditConfigData()) == null ? void 0 : _a.prodConfig) || {});
|
|
45
|
+
vue.watch(
|
|
46
|
+
() => dialogVisible.value,
|
|
47
|
+
(newVisible) => {
|
|
48
|
+
var _a2;
|
|
49
|
+
if (newVisible) {
|
|
50
|
+
const savedConfig = ((_a2 = common.getEditConfigData()) == null ? void 0 : _a2.prodConfig) || {};
|
|
51
|
+
if (savedConfig.optionConfigs) {
|
|
52
|
+
optionConfigs.value = savedConfig.optionConfigs.map((item) => ({
|
|
53
|
+
...item,
|
|
54
|
+
id: generateId()
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
if (savedConfig.defaultValueConfigs) {
|
|
58
|
+
defaultValueConfigs.value = savedConfig.defaultValueConfigs.map(
|
|
59
|
+
(item) => ({
|
|
60
|
+
...item,
|
|
61
|
+
id: generateId()
|
|
62
|
+
})
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
if (savedConfig.validationConfigs) {
|
|
66
|
+
validationConfigs.value = savedConfig.validationConfigs.map((item) => ({
|
|
67
|
+
...item,
|
|
68
|
+
id: generateId()
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
fetchProductConfig();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
const fieldsDataAll = vue.computed(() => {
|
|
76
|
+
var _a2;
|
|
77
|
+
return [
|
|
78
|
+
...common.getEditConfigDataFields(),
|
|
79
|
+
...((_a2 = common.getEditConfigData()) == null ? void 0 : _a2.hiddenFields) || []
|
|
80
|
+
];
|
|
81
|
+
});
|
|
82
|
+
const parsedConfig = vue.ref([]);
|
|
83
|
+
const optionConfigs = vue.ref([]);
|
|
84
|
+
const defaultValueConfigs = vue.ref([]);
|
|
85
|
+
const validationConfigs = vue.ref([]);
|
|
86
|
+
function generateId() {
|
|
87
|
+
return Date.now() + Math.random().toString(36).substr(2, 9);
|
|
88
|
+
}
|
|
89
|
+
function addOptionConfig() {
|
|
90
|
+
optionConfigs.value.push({
|
|
91
|
+
id: generateId(),
|
|
92
|
+
pageField: "",
|
|
93
|
+
productConfigField: ""
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function removeOptionConfig(index2) {
|
|
97
|
+
optionConfigs.value.splice(index2, 1);
|
|
98
|
+
}
|
|
99
|
+
function addDefaultValueConfig() {
|
|
100
|
+
defaultValueConfigs.value.push({
|
|
101
|
+
id: generateId(),
|
|
102
|
+
pageField: "",
|
|
103
|
+
productConfigField: ""
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function removeDefaultValueConfig(index2) {
|
|
107
|
+
defaultValueConfigs.value.splice(index2, 1);
|
|
108
|
+
}
|
|
109
|
+
function addValidationConfig() {
|
|
110
|
+
validationConfigs.value.push({
|
|
111
|
+
id: generateId(),
|
|
112
|
+
pageField: "",
|
|
113
|
+
minProductField: "",
|
|
114
|
+
maxProductField: ""
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function removeValidationConfig(index2) {
|
|
118
|
+
validationConfigs.value.splice(index2, 1);
|
|
119
|
+
}
|
|
120
|
+
const handleClose = (done) => {
|
|
121
|
+
handleCancel();
|
|
122
|
+
done();
|
|
123
|
+
};
|
|
124
|
+
const handleCancel = () => {
|
|
125
|
+
optionConfigs.value = [
|
|
126
|
+
{
|
|
127
|
+
id: generateId(),
|
|
128
|
+
pageField: "",
|
|
129
|
+
productConfigField: ""
|
|
130
|
+
}
|
|
131
|
+
];
|
|
132
|
+
defaultValueConfigs.value = [
|
|
133
|
+
{
|
|
134
|
+
id: generateId(),
|
|
135
|
+
pageField: "",
|
|
136
|
+
productConfigField: ""
|
|
137
|
+
}
|
|
138
|
+
];
|
|
139
|
+
validationConfigs.value = [
|
|
140
|
+
{
|
|
141
|
+
id: generateId(),
|
|
142
|
+
pageField: "",
|
|
143
|
+
minProductField: "",
|
|
144
|
+
maxProductField: ""
|
|
145
|
+
}
|
|
146
|
+
];
|
|
147
|
+
parsedConfig.value = [];
|
|
148
|
+
dialogVisible.value = false;
|
|
149
|
+
};
|
|
150
|
+
const handleConfirm = () => {
|
|
151
|
+
const editConfig = common.getEditConfigData();
|
|
152
|
+
console.log("🚀 ~ handleConfirm ~ finalConfig.value:", finalConfig.value);
|
|
153
|
+
const updatedConfig = {
|
|
154
|
+
...editConfig,
|
|
155
|
+
prodConfig: finalConfig.value
|
|
156
|
+
};
|
|
157
|
+
common.setEditConfigData(updatedConfig);
|
|
158
|
+
handleCancel();
|
|
159
|
+
};
|
|
160
|
+
const fetchProductConfig = async () => {
|
|
161
|
+
try {
|
|
162
|
+
const response = await index.default.getProductConfig();
|
|
163
|
+
parsedConfig.value = response.map((item) => ({
|
|
164
|
+
fieldName: item.fieldName || "",
|
|
165
|
+
fieldDesc: item.label || item.fieldName || "",
|
|
166
|
+
// 保留原始数据中的其他字段
|
|
167
|
+
...item
|
|
168
|
+
}));
|
|
169
|
+
if (parsedConfig.value.length === 0) {
|
|
170
|
+
index$1.ElMessage.warning("未获取到产品配置数据");
|
|
171
|
+
}
|
|
172
|
+
} catch (error) {
|
|
173
|
+
index$1.ElMessage.error("获取产品配置失败");
|
|
174
|
+
console.error("获取产品配置失败:", error);
|
|
175
|
+
parsedConfig.value = [];
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
const finalConfig = vue.computed(() => {
|
|
179
|
+
const result = {
|
|
180
|
+
prodId: prodConfig.value.prodId,
|
|
181
|
+
optionConfigs: optionConfigs.value,
|
|
182
|
+
defaultValueConfigs: defaultValueConfigs.value,
|
|
183
|
+
validationConfigs: validationConfigs.value
|
|
184
|
+
};
|
|
185
|
+
return result;
|
|
186
|
+
});
|
|
187
|
+
__expose({});
|
|
188
|
+
return (_ctx, _cache) => {
|
|
189
|
+
const _component_el_form_item = index$3.ElFormItem;
|
|
190
|
+
const _component_el_option = index$4.ElOption;
|
|
191
|
+
const _component_el_select = index$4.ElSelect;
|
|
192
|
+
const _component_el_button = index$5.ElButton;
|
|
193
|
+
const _component_el_form = index$3.ElForm;
|
|
194
|
+
const _component_el_dialog = index$2.ElDialog;
|
|
195
|
+
return vue.openBlock(), vue.createBlock(_component_el_dialog, {
|
|
196
|
+
modelValue: dialogVisible.value,
|
|
197
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dialogVisible.value = $event),
|
|
198
|
+
title: "产品配置",
|
|
199
|
+
width: "600px",
|
|
200
|
+
"close-on-click-modal": false,
|
|
201
|
+
"before-close": handleClose,
|
|
202
|
+
draggable: "",
|
|
203
|
+
overflow: "",
|
|
204
|
+
"append-to-body": "",
|
|
205
|
+
class: "fec-dev-designer-dialog"
|
|
206
|
+
}, {
|
|
207
|
+
footer: vue.withCtx(() => [
|
|
208
|
+
vue.createElementVNode("span", _hoisted_7, [
|
|
209
|
+
vue.createVNode(_component_el_button, { onClick: handleCancel }, {
|
|
210
|
+
default: vue.withCtx(() => _cache[12] || (_cache[12] = [
|
|
211
|
+
vue.createTextVNode("取消")
|
|
212
|
+
])),
|
|
213
|
+
_: 1
|
|
214
|
+
}),
|
|
215
|
+
vue.createVNode(_component_el_button, {
|
|
216
|
+
type: "primary",
|
|
217
|
+
onClick: handleConfirm
|
|
218
|
+
}, {
|
|
219
|
+
default: vue.withCtx(() => _cache[13] || (_cache[13] = [
|
|
220
|
+
vue.createTextVNode(" 确定 ")
|
|
221
|
+
])),
|
|
222
|
+
_: 1
|
|
223
|
+
})
|
|
224
|
+
])
|
|
225
|
+
]),
|
|
226
|
+
default: vue.withCtx(() => [
|
|
227
|
+
vue.createVNode(_component_el_form, {
|
|
228
|
+
"label-position": "top",
|
|
229
|
+
"label-width": "auto",
|
|
230
|
+
model: prodConfig.value
|
|
231
|
+
}, {
|
|
232
|
+
default: vue.withCtx(() => [
|
|
233
|
+
vue.createVNode(_component_el_form_item, null, {
|
|
234
|
+
label: vue.withCtx(() => _cache[2] || (_cache[2] = [
|
|
235
|
+
vue.createElementVNode("span", { class: "prod-config-label" }, "产品ID字段", -1)
|
|
236
|
+
])),
|
|
237
|
+
default: vue.withCtx(() => [
|
|
238
|
+
vue.createVNode(ValueSelector.default, {
|
|
239
|
+
modelValue: prodConfig.value.prodId,
|
|
240
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => prodConfig.value.prodId = $event),
|
|
241
|
+
readOnly: "",
|
|
242
|
+
size: "default"
|
|
243
|
+
}, null, 8, ["modelValue"])
|
|
244
|
+
]),
|
|
245
|
+
_: 1
|
|
246
|
+
}),
|
|
247
|
+
vue.createVNode(_component_el_form_item, null, {
|
|
248
|
+
label: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
249
|
+
vue.createElementVNode("span", { class: "prod-config-label" }, "可选项配置", -1)
|
|
250
|
+
])),
|
|
251
|
+
default: vue.withCtx(() => [
|
|
252
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
253
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(optionConfigs.value, (item, index2) => {
|
|
254
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
255
|
+
key: item.id,
|
|
256
|
+
class: "config-item"
|
|
257
|
+
}, [
|
|
258
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
259
|
+
vue.createVNode(_component_el_select, {
|
|
260
|
+
modelValue: item.pageField,
|
|
261
|
+
"onUpdate:modelValue": ($event) => item.pageField = $event,
|
|
262
|
+
placeholder: "选择页面字段",
|
|
263
|
+
filterable: "",
|
|
264
|
+
clearable: "",
|
|
265
|
+
style: { "width": "200px", "margin-right": "10px" }
|
|
266
|
+
}, {
|
|
267
|
+
default: vue.withCtx(() => [
|
|
268
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(fieldsDataAll.value, (field) => {
|
|
269
|
+
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
270
|
+
key: field.id,
|
|
271
|
+
label: field.label,
|
|
272
|
+
value: field.id
|
|
273
|
+
}, null, 8, ["label", "value"]);
|
|
274
|
+
}), 128))
|
|
275
|
+
]),
|
|
276
|
+
_: 2
|
|
277
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"]),
|
|
278
|
+
vue.createVNode(_component_el_select, {
|
|
279
|
+
modelValue: item.productConfigField,
|
|
280
|
+
"onUpdate:modelValue": ($event) => item.productConfigField = $event,
|
|
281
|
+
placeholder: "选择产品配置项",
|
|
282
|
+
filterable: "",
|
|
283
|
+
clearable: "",
|
|
284
|
+
style: { "width": "250px", "margin-right": "10px" }
|
|
285
|
+
}, {
|
|
286
|
+
default: vue.withCtx(() => [
|
|
287
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(parsedConfig.value, (config) => {
|
|
288
|
+
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
289
|
+
key: config.fieldName,
|
|
290
|
+
label: config.fieldDesc,
|
|
291
|
+
value: config.fieldName
|
|
292
|
+
}, null, 8, ["label", "value"]);
|
|
293
|
+
}), 128))
|
|
294
|
+
]),
|
|
295
|
+
_: 2
|
|
296
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"]),
|
|
297
|
+
vue.createVNode(_component_el_button, {
|
|
298
|
+
type: "danger",
|
|
299
|
+
size: "small",
|
|
300
|
+
link: "",
|
|
301
|
+
onClick: ($event) => removeOptionConfig(index2)
|
|
302
|
+
}, {
|
|
303
|
+
default: vue.withCtx(() => _cache[4] || (_cache[4] = [
|
|
304
|
+
vue.createTextVNode(" 删除 ")
|
|
305
|
+
])),
|
|
306
|
+
_: 2
|
|
307
|
+
}, 1032, ["onClick"])
|
|
308
|
+
])
|
|
309
|
+
]);
|
|
310
|
+
}), 128)),
|
|
311
|
+
vue.createVNode(_component_el_button, {
|
|
312
|
+
type: "primary",
|
|
313
|
+
size: "small",
|
|
314
|
+
icon: vue.unref(index$6.Plus),
|
|
315
|
+
link: "",
|
|
316
|
+
onClick: addOptionConfig
|
|
317
|
+
}, {
|
|
318
|
+
default: vue.withCtx(() => _cache[5] || (_cache[5] = [
|
|
319
|
+
vue.createTextVNode(" 新增 ")
|
|
320
|
+
])),
|
|
321
|
+
_: 1
|
|
322
|
+
}, 8, ["icon"])
|
|
323
|
+
])
|
|
324
|
+
]),
|
|
325
|
+
_: 1
|
|
326
|
+
}),
|
|
327
|
+
vue.createVNode(_component_el_form_item, null, {
|
|
328
|
+
label: vue.withCtx(() => _cache[6] || (_cache[6] = [
|
|
329
|
+
vue.createElementVNode("span", { class: "prod-config-label" }, "默认值配置", -1)
|
|
330
|
+
])),
|
|
331
|
+
default: vue.withCtx(() => [
|
|
332
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
333
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(defaultValueConfigs.value, (item, index2) => {
|
|
334
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
335
|
+
key: item.id,
|
|
336
|
+
class: "config-item"
|
|
337
|
+
}, [
|
|
338
|
+
vue.createElementVNode("div", _hoisted_4, [
|
|
339
|
+
vue.createVNode(_component_el_select, {
|
|
340
|
+
modelValue: item.pageField,
|
|
341
|
+
"onUpdate:modelValue": ($event) => item.pageField = $event,
|
|
342
|
+
placeholder: "选择页面字段",
|
|
343
|
+
filterable: "",
|
|
344
|
+
clearable: "",
|
|
345
|
+
style: { "width": "200px", "margin-right": "10px" }
|
|
346
|
+
}, {
|
|
347
|
+
default: vue.withCtx(() => [
|
|
348
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(fieldsDataAll.value, (field) => {
|
|
349
|
+
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
350
|
+
key: field.id,
|
|
351
|
+
label: field.label,
|
|
352
|
+
value: field.id
|
|
353
|
+
}, null, 8, ["label", "value"]);
|
|
354
|
+
}), 128))
|
|
355
|
+
]),
|
|
356
|
+
_: 2
|
|
357
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"]),
|
|
358
|
+
vue.createVNode(_component_el_select, {
|
|
359
|
+
modelValue: item.productConfigField,
|
|
360
|
+
"onUpdate:modelValue": ($event) => item.productConfigField = $event,
|
|
361
|
+
placeholder: "选择产品配置项",
|
|
362
|
+
filterable: "",
|
|
363
|
+
clearable: "",
|
|
364
|
+
style: { "width": "250px", "margin-right": "10px" }
|
|
365
|
+
}, {
|
|
366
|
+
default: vue.withCtx(() => [
|
|
367
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(parsedConfig.value, (config) => {
|
|
368
|
+
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
369
|
+
key: config.fieldName,
|
|
370
|
+
label: config.fieldDesc,
|
|
371
|
+
value: config.fieldName
|
|
372
|
+
}, null, 8, ["label", "value"]);
|
|
373
|
+
}), 128))
|
|
374
|
+
]),
|
|
375
|
+
_: 2
|
|
376
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"]),
|
|
377
|
+
vue.createVNode(_component_el_button, {
|
|
378
|
+
type: "danger",
|
|
379
|
+
size: "small",
|
|
380
|
+
link: "",
|
|
381
|
+
onClick: ($event) => removeDefaultValueConfig(index2)
|
|
382
|
+
}, {
|
|
383
|
+
default: vue.withCtx(() => _cache[7] || (_cache[7] = [
|
|
384
|
+
vue.createTextVNode(" 删除 ")
|
|
385
|
+
])),
|
|
386
|
+
_: 2
|
|
387
|
+
}, 1032, ["onClick"])
|
|
388
|
+
])
|
|
389
|
+
]);
|
|
390
|
+
}), 128)),
|
|
391
|
+
vue.createVNode(_component_el_button, {
|
|
392
|
+
type: "primary",
|
|
393
|
+
size: "small",
|
|
394
|
+
icon: vue.unref(index$6.Plus),
|
|
395
|
+
link: "",
|
|
396
|
+
onClick: addDefaultValueConfig
|
|
397
|
+
}, {
|
|
398
|
+
default: vue.withCtx(() => _cache[8] || (_cache[8] = [
|
|
399
|
+
vue.createTextVNode(" 新增 ")
|
|
400
|
+
])),
|
|
401
|
+
_: 1
|
|
402
|
+
}, 8, ["icon"])
|
|
403
|
+
])
|
|
404
|
+
]),
|
|
405
|
+
_: 1
|
|
406
|
+
}),
|
|
407
|
+
vue.createVNode(_component_el_form_item, null, {
|
|
408
|
+
label: vue.withCtx(() => _cache[9] || (_cache[9] = [
|
|
409
|
+
vue.createElementVNode("span", { class: "prod-config-label" }, "校验配置", -1)
|
|
410
|
+
])),
|
|
411
|
+
default: vue.withCtx(() => [
|
|
412
|
+
vue.createElementVNode("div", _hoisted_5, [
|
|
413
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(validationConfigs.value, (item, index2) => {
|
|
414
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
415
|
+
key: item.id,
|
|
416
|
+
class: "config-item"
|
|
417
|
+
}, [
|
|
418
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
419
|
+
vue.createVNode(_component_el_select, {
|
|
420
|
+
modelValue: item.pageField,
|
|
421
|
+
"onUpdate:modelValue": ($event) => item.pageField = $event,
|
|
422
|
+
placeholder: "选择页面字段",
|
|
423
|
+
filterable: "",
|
|
424
|
+
clearable: "",
|
|
425
|
+
style: { "width": "200px", "margin-right": "10px" }
|
|
426
|
+
}, {
|
|
427
|
+
default: vue.withCtx(() => [
|
|
428
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(fieldsDataAll.value, (field) => {
|
|
429
|
+
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
430
|
+
key: field.id,
|
|
431
|
+
label: field.label,
|
|
432
|
+
value: field.id
|
|
433
|
+
}, null, 8, ["label", "value"]);
|
|
434
|
+
}), 128))
|
|
435
|
+
]),
|
|
436
|
+
_: 2
|
|
437
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"]),
|
|
438
|
+
vue.createVNode(_component_el_select, {
|
|
439
|
+
modelValue: item.minProductField,
|
|
440
|
+
"onUpdate:modelValue": ($event) => item.minProductField = $event,
|
|
441
|
+
placeholder: "最小值配置项",
|
|
442
|
+
filterable: "",
|
|
443
|
+
clearable: "",
|
|
444
|
+
style: { "width": "200px", "margin-right": "10px" }
|
|
445
|
+
}, {
|
|
446
|
+
default: vue.withCtx(() => [
|
|
447
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(parsedConfig.value, (config) => {
|
|
448
|
+
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
449
|
+
key: config.fieldName,
|
|
450
|
+
label: config.fieldDesc,
|
|
451
|
+
value: config.fieldName
|
|
452
|
+
}, null, 8, ["label", "value"]);
|
|
453
|
+
}), 128))
|
|
454
|
+
]),
|
|
455
|
+
_: 2
|
|
456
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"]),
|
|
457
|
+
vue.createVNode(_component_el_select, {
|
|
458
|
+
modelValue: item.maxProductField,
|
|
459
|
+
"onUpdate:modelValue": ($event) => item.maxProductField = $event,
|
|
460
|
+
placeholder: "最大值配置项",
|
|
461
|
+
filterable: "",
|
|
462
|
+
clearable: "",
|
|
463
|
+
style: { "width": "200px", "margin-right": "10px" }
|
|
464
|
+
}, {
|
|
465
|
+
default: vue.withCtx(() => [
|
|
466
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(parsedConfig.value, (config) => {
|
|
467
|
+
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
468
|
+
key: config.fieldName,
|
|
469
|
+
label: config.fieldDesc,
|
|
470
|
+
value: config.fieldName
|
|
471
|
+
}, null, 8, ["label", "value"]);
|
|
472
|
+
}), 128))
|
|
473
|
+
]),
|
|
474
|
+
_: 2
|
|
475
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"]),
|
|
476
|
+
vue.createVNode(_component_el_button, {
|
|
477
|
+
type: "danger",
|
|
478
|
+
size: "small",
|
|
479
|
+
link: "",
|
|
480
|
+
onClick: ($event) => removeValidationConfig(index2)
|
|
481
|
+
}, {
|
|
482
|
+
default: vue.withCtx(() => _cache[10] || (_cache[10] = [
|
|
483
|
+
vue.createTextVNode(" 删除 ")
|
|
484
|
+
])),
|
|
485
|
+
_: 2
|
|
486
|
+
}, 1032, ["onClick"])
|
|
487
|
+
])
|
|
488
|
+
]);
|
|
489
|
+
}), 128)),
|
|
490
|
+
vue.createVNode(_component_el_button, {
|
|
491
|
+
type: "primary",
|
|
492
|
+
size: "small",
|
|
493
|
+
icon: vue.unref(index$6.Plus),
|
|
494
|
+
link: "",
|
|
495
|
+
onClick: addValidationConfig
|
|
496
|
+
}, {
|
|
497
|
+
default: vue.withCtx(() => _cache[11] || (_cache[11] = [
|
|
498
|
+
vue.createTextVNode(" 新增 ")
|
|
499
|
+
])),
|
|
500
|
+
_: 1
|
|
501
|
+
}, 8, ["icon"])
|
|
502
|
+
])
|
|
503
|
+
]),
|
|
504
|
+
_: 1
|
|
505
|
+
})
|
|
506
|
+
]),
|
|
507
|
+
_: 1
|
|
508
|
+
}, 8, ["model"])
|
|
509
|
+
]),
|
|
510
|
+
_: 1
|
|
511
|
+
}, 8, ["modelValue"]);
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
};
|
|
515
|
+
const ProdDialog = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-a85b9b72"]]);
|
|
516
|
+
exports.default = ProdDialog;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const index = require("./index.vue.js");
|
|
4
|
+
const vue = require("vue");
|
|
5
|
+
function useProdDialog() {
|
|
6
|
+
const prodDialogVisible = vue.ref(false);
|
|
7
|
+
const openProdDialog = () => {
|
|
8
|
+
prodDialogVisible.value = true;
|
|
9
|
+
};
|
|
10
|
+
return {
|
|
11
|
+
prodDialogVisible,
|
|
12
|
+
openProdDialog,
|
|
13
|
+
ProdDialog: index.default
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
exports.useProdDialog = useProdDialog;
|
|
@@ -149,7 +149,7 @@ const _sfc_main = {
|
|
|
149
149
|
]),
|
|
150
150
|
_: 1
|
|
151
151
|
}),
|
|
152
|
-
_cache[12] || (_cache[12] = vue.createElementVNode("span", null, "
|
|
152
|
+
_cache[12] || (_cache[12] = vue.createElementVNode("span", null, "页面事件", -1))
|
|
153
153
|
]),
|
|
154
154
|
vue.createVNode(pageEvent.default, {
|
|
155
155
|
modelValue: vue.unref(pageEventDialogVisible),
|
|
@@ -197,7 +197,7 @@ const _sfc_main = {
|
|
|
197
197
|
]),
|
|
198
198
|
_: 1
|
|
199
199
|
}),
|
|
200
|
-
_cache[15] || (_cache[15] = vue.createElementVNode("span", null, "
|
|
200
|
+
_cache[15] || (_cache[15] = vue.createElementVNode("span", null, "页面弹层", -1))
|
|
201
201
|
]),
|
|
202
202
|
vue.createVNode(vue.unref(DialogDialog), {
|
|
203
203
|
modelValue: vue.unref(dialogDialogVisible),
|
|
@@ -223,5 +223,5 @@ const _sfc_main = {
|
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
|
-
const tableHeaderBtn = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
226
|
+
const tableHeaderBtn = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-3a617517"]]);
|
|
227
227
|
exports.default = tableHeaderBtn;
|
|
@@ -8,13 +8,13 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
8
8
|
;/* empty css */
|
|
9
9
|
;/* empty css */
|
|
10
10
|
const vue = require("vue");
|
|
11
|
-
;/* empty css */
|
|
12
|
-
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
13
11
|
;/* empty css */
|
|
14
12
|
;/* empty css */
|
|
15
13
|
;/* empty css */
|
|
16
14
|
;/* empty css */
|
|
17
15
|
;/* empty css */
|
|
16
|
+
;/* empty css */
|
|
17
|
+
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
18
18
|
const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/swipe-cell/index.js");
|
|
19
19
|
const functionCall = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/dialog/function-call.js");
|
|
20
20
|
require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/dialog/index.js");
|
|
@@ -502,8 +502,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
502
502
|
const fieldType = field.fieldType;
|
|
503
503
|
const value = result[fieldName];
|
|
504
504
|
if (fieldName && (fieldType === "checkbox" || fieldType === "multipleSelection" || fieldType === "cascader" || fieldType === "area" || fieldType === "industry")) {
|
|
505
|
+
let splitStr = "|";
|
|
506
|
+
if (fieldType === "cascader" || fieldType === "area" || fieldType === "industry") {
|
|
507
|
+
splitStr = ",";
|
|
508
|
+
}
|
|
505
509
|
if (Array.isArray(value)) {
|
|
506
|
-
result[fieldName] = value.join(
|
|
510
|
+
result[fieldName] = value.join(splitStr);
|
|
507
511
|
}
|
|
508
512
|
} else if (fieldName && fieldType === "date" && value) {
|
|
509
513
|
const dateValueType = field.dateValueType;
|
|
@@ -542,10 +546,17 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
542
546
|
const processField = (field) => {
|
|
543
547
|
const fieldName = field.fieldName;
|
|
544
548
|
const fieldType = field.fieldType;
|
|
549
|
+
if (!processedData.hasOwnProperty(fieldName)) {
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
545
552
|
const value = processedData[fieldName];
|
|
546
553
|
if (fieldName && (fieldType === "checkbox" || fieldType === "multipleSelection" || fieldType === "cascader" || fieldType === "area" || fieldType === "industry")) {
|
|
547
|
-
|
|
548
|
-
|
|
554
|
+
let splitStr = "|";
|
|
555
|
+
if (fieldType === "cascader" || fieldType === "area" || fieldType === "industry") {
|
|
556
|
+
splitStr = ",";
|
|
557
|
+
}
|
|
558
|
+
if (typeof value === "string" && value.includes(splitStr)) {
|
|
559
|
+
processedData[fieldName] = value.split(splitStr);
|
|
549
560
|
} else if (typeof value === "string" && value !== "") {
|
|
550
561
|
processedData[fieldName] = [value];
|
|
551
562
|
} else if (value === "" || value === null || value === void 0) {
|
|
@@ -684,5 +695,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
684
695
|
};
|
|
685
696
|
}
|
|
686
697
|
});
|
|
687
|
-
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
698
|
+
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-1ff2ad83"]]);
|
|
688
699
|
exports.default = _Form;
|
|
@@ -8,6 +8,8 @@ const _hoisted_2 = { class: "fec-label" };
|
|
|
8
8
|
const _hoisted_3 = { class: "fec-label-title" };
|
|
9
9
|
const _hoisted_4 = { class: "fec-label-sub-title" };
|
|
10
10
|
const _hoisted_5 = { class: "fec-buttons" };
|
|
11
|
+
const _hoisted_6 = { class: "left" };
|
|
12
|
+
const _hoisted_7 = { class: "right" };
|
|
11
13
|
const _sfc_main = {
|
|
12
14
|
__name: "H2",
|
|
13
15
|
props: {
|
|
@@ -25,11 +27,16 @@ const _sfc_main = {
|
|
|
25
27
|
vue.createElementVNode("div", _hoisted_4, vue.toDisplayString(__props.config.subLabel), 1)
|
|
26
28
|
]),
|
|
27
29
|
vue.createElementVNode("div", _hoisted_5, [
|
|
28
|
-
vue.
|
|
30
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
31
|
+
vue.renderSlot(_ctx.$slots, "left", {}, void 0, true)
|
|
32
|
+
]),
|
|
33
|
+
vue.createElementVNode("div", _hoisted_7, [
|
|
34
|
+
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
35
|
+
])
|
|
29
36
|
])
|
|
30
37
|
]);
|
|
31
38
|
};
|
|
32
39
|
}
|
|
33
40
|
};
|
|
34
|
-
const _H2 = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
41
|
+
const _H2 = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-b5645d10"]]);
|
|
35
42
|
exports.default = _H2;
|