@fecp/designer 5.6.29 → 5.6.31
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/_virtual/_commonjsHelpers.mjs +25 -0
- package/es/_virtual/index.mjs +4 -4
- package/es/_virtual/index2.mjs +2 -5
- package/es/_virtual/index3.mjs +5 -3
- package/es/_virtual/index4.mjs +5 -2
- package/es/_virtual/index5.mjs +3 -2
- package/es/_virtual/index6.mjs +4 -0
- package/es/_virtual/index7.mjs +4 -0
- package/es/config-dev.js +2 -0
- package/es/designer/package.json.mjs +1 -1
- package/es/designer/src/axios/config.mjs +10 -3
- package/es/designer/src/axios/crypto.mjs +1 -5
- package/es/designer/src/packages/aiForm/AiDiffTable.vue.mjs +152 -0
- package/es/designer/src/packages/aiForm/api.mjs +21 -0
- package/es/designer/src/packages/aiForm/apply.mjs +153 -0
- package/es/designer/src/packages/aiForm/compressConfig.mjs +69 -0
- package/es/designer/src/packages/aiForm/constants.mjs +184 -0
- package/es/designer/src/packages/aiForm/diff.mjs +140 -0
- package/es/designer/src/packages/aiForm/index.vue.mjs +301 -0
- package/es/designer/src/packages/aiForm/normalizeFieldList.mjs +138 -0
- package/es/designer/src/packages/aiForm/parseAiResult.mjs +245 -0
- package/es/designer/src/packages/aiForm/prompt.mjs +130 -0
- package/es/designer/src/packages/aiForm/useAiFormDrawer.mjs +16 -0
- package/es/designer/src/packages/dataSource/dataSource.vue.mjs +45 -30
- package/es/designer/src/packages/form/headerBtn.vue.mjs +4 -1
- package/es/designer/src/packages/form/index.vue.mjs +16 -2
- package/es/designer/src/packages/utils/datasource.mjs +14 -1
- package/es/designer.css +523 -232
- package/es/node_modules/@braintree/sanitize-url/dist/index.mjs +1 -1
- package/es/node_modules/diagram-js/lib/model/index.mjs +1 -1
- package/es/node_modules/element-plus/es/utils/vue/icon.mjs +1 -1
- package/es/node_modules/highlight.js/es/index.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-LMCZKHZV.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/chunk-32BRIVSS.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICXQ74PX.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-OUVF2IWQ.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-EOCWNBFH.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-23GEKE2U.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-NO4QXBWP.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-DBY2YBRQ.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-2N3HPSRC.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-6OUMAXLB.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-G3AALYLV.mjs +1 -1
- package/es/node_modules/object-refs/index.mjs +1 -1
- package/es/packages/mobile/src/axios/config.mjs +8 -4
- package/es/packages/mobile/src/components/ai/MarkdownRenderer/MarkdownRenderer.vue.mjs +1 -1
- package/es/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.mjs +53 -13
- package/es/packages/mobile/src/components/custom/approvalBar/FlowUserSelect.vue.mjs +215 -0
- package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +19 -15
- package/es/packages/mobile/src/utils/datasource.mjs +14 -1
- package/es/packages/mobile/src/utils/formatterUtil.mjs +24 -12
- package/es/packages/vue/src/components/dialog/DialogRenderer.vue2.mjs +75 -8
- package/es/packages/vue/src/components/dialog/index.mjs +2 -1
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +10 -49
- package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +2 -12
- package/es/packages/vue/src/components/forms/roleSelect/RoleSelect.vue.mjs +9 -3
- package/es/packages/vue/src/components/forms/userSelect/UserSelect.vue.mjs +9 -3
- package/es/packages/vue/src/components/table/Table.vue.mjs +119 -11
- package/es/packages/vue/src/utils/datasource.mjs +14 -1
- package/lib/_virtual/_commonjsHelpers.js +25 -0
- package/lib/_virtual/index.js +4 -4
- package/lib/_virtual/index2.js +3 -6
- package/lib/_virtual/index3.js +6 -4
- package/lib/_virtual/index4.js +6 -3
- package/lib/_virtual/index5.js +3 -2
- package/lib/_virtual/index6.js +4 -0
- package/lib/_virtual/index7.js +4 -0
- package/lib/config-dev.js +2 -0
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/axios/config.js +10 -3
- package/lib/designer/src/axios/crypto.js +0 -4
- package/lib/designer/src/packages/aiForm/AiDiffTable.vue.js +152 -0
- package/lib/designer/src/packages/aiForm/api.js +21 -0
- package/lib/designer/src/packages/aiForm/apply.js +153 -0
- package/lib/designer/src/packages/aiForm/compressConfig.js +69 -0
- package/lib/designer/src/packages/aiForm/constants.js +184 -0
- package/lib/designer/src/packages/aiForm/diff.js +140 -0
- package/lib/designer/src/packages/aiForm/index.vue.js +301 -0
- package/lib/designer/src/packages/aiForm/normalizeFieldList.js +138 -0
- package/lib/designer/src/packages/aiForm/parseAiResult.js +245 -0
- package/lib/designer/src/packages/aiForm/prompt.js +130 -0
- package/lib/designer/src/packages/aiForm/useAiFormDrawer.js +16 -0
- package/lib/designer/src/packages/dataSource/dataSource.vue.js +44 -29
- package/lib/designer/src/packages/form/headerBtn.vue.js +4 -1
- package/lib/designer/src/packages/form/index.vue.js +15 -1
- package/lib/designer/src/packages/utils/datasource.js +14 -1
- package/lib/designer.css +523 -232
- package/lib/node_modules/@braintree/sanitize-url/dist/index.js +1 -1
- package/lib/node_modules/diagram-js/lib/model/index.js +1 -1
- package/lib/node_modules/highlight.js/es/index.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-LMCZKHZV.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/chunk-32BRIVSS.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICXQ74PX.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-OUVF2IWQ.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-EOCWNBFH.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-23GEKE2U.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-NO4QXBWP.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-DBY2YBRQ.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-2N3HPSRC.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-6OUMAXLB.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-G3AALYLV.js +1 -1
- package/lib/node_modules/object-refs/index.js +1 -1
- package/lib/packages/mobile/src/axios/config.js +8 -4
- package/lib/packages/mobile/src/components/ai/MarkdownRenderer/MarkdownRenderer.vue.js +1 -1
- package/lib/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.js +52 -12
- package/lib/packages/mobile/src/components/custom/approvalBar/FlowUserSelect.vue.js +215 -0
- package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +19 -15
- package/lib/packages/mobile/src/utils/datasource.js +14 -1
- package/lib/packages/mobile/src/utils/formatterUtil.js +24 -12
- package/lib/packages/vue/src/components/dialog/DialogRenderer.vue2.js +75 -8
- package/lib/packages/vue/src/components/dialog/index.js +2 -1
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +9 -48
- package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +1 -11
- package/lib/packages/vue/src/components/forms/roleSelect/RoleSelect.vue.js +9 -3
- package/lib/packages/vue/src/components/forms/userSelect/UserSelect.vue.js +9 -3
- package/lib/packages/vue/src/components/table/Table.vue.js +118 -10
- package/lib/packages/vue/src/utils/datasource.js +14 -1
- package/package.json +1 -1
|
@@ -14,13 +14,14 @@ import "../../../../node_modules/element-plus/theme-chalk/el-tab-pane.css.mjs";
|
|
|
14
14
|
/* empty css */
|
|
15
15
|
/* empty css */
|
|
16
16
|
/* empty css */
|
|
17
|
-
import { getCurrentInstance, ref, watch, createElementBlock, openBlock, createVNode, unref, isRef, withCtx, createElementVNode, Fragment, renderList, createBlock,
|
|
17
|
+
import { getCurrentInstance, ref, computed, watch, createElementBlock, openBlock, createVNode, unref, isRef, withCtx, createElementVNode, Fragment, renderList, createBlock, createCommentVNode, createTextVNode, toDisplayString } from "vue";
|
|
18
18
|
import { VideoPlay as video_play_default, CopyDocument as copy_document_default, Document as document_default } from "../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
19
19
|
import ParamsConfig from "../../components/ParamsConfig.vue2.mjs";
|
|
20
20
|
import "../../store/index.mjs";
|
|
21
21
|
import { JsonViewer as Q } from "../../../../node_modules/vue3-json-viewer/dist/vue3-json-viewer.mjs";
|
|
22
22
|
/* empty css */
|
|
23
23
|
import envConfig from "../../utils/env.mjs";
|
|
24
|
+
import { buildRequestUrl } from "../utils/datasource.mjs";
|
|
24
25
|
/* empty css */
|
|
25
26
|
/* empty css */
|
|
26
27
|
/* empty css */
|
|
@@ -37,23 +38,27 @@ import { ElTag } from "../../../../node_modules/element-plus/es/components/tag/i
|
|
|
37
38
|
import { ElMessage } from "../../../../node_modules/element-plus/es/components/message/index.mjs";
|
|
38
39
|
const _hoisted_1 = { class: "data-source" };
|
|
39
40
|
const _hoisted_2 = { class: "config-section" };
|
|
40
|
-
const _hoisted_3 = {
|
|
41
|
-
const _hoisted_4 = {
|
|
41
|
+
const _hoisted_3 = {
|
|
42
42
|
key: 0,
|
|
43
43
|
class: "condition-desc"
|
|
44
44
|
};
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
const _hoisted_4 = { class: "desc-content" };
|
|
46
|
+
const _hoisted_5 = {
|
|
47
|
+
key: 0,
|
|
48
|
+
class: "condition-desc"
|
|
49
|
+
};
|
|
50
|
+
const _hoisted_6 = { class: "test-section" };
|
|
51
|
+
const _hoisted_7 = { class: "section-header" };
|
|
52
|
+
const _hoisted_8 = { class: "section-title" };
|
|
53
|
+
const _hoisted_9 = {
|
|
49
54
|
key: 0,
|
|
50
55
|
class: "response-area"
|
|
51
56
|
};
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
+
const _hoisted_10 = { class: "response-title" };
|
|
58
|
+
const _hoisted_11 = { class: "response-actions" };
|
|
59
|
+
const _hoisted_12 = { class: "response-status" };
|
|
60
|
+
const _hoisted_13 = { class: "response-time" };
|
|
61
|
+
const _hoisted_14 = {
|
|
57
62
|
key: 1,
|
|
58
63
|
class: "empty-response"
|
|
59
64
|
};
|
|
@@ -70,13 +75,23 @@ const _sfc_main = {
|
|
|
70
75
|
const loading = ref(false);
|
|
71
76
|
const responseData = ref("");
|
|
72
77
|
const requestTime = ref(0);
|
|
78
|
+
function isAbsoluteUrl(url) {
|
|
79
|
+
return /^https?:\/\//i.test(url || "");
|
|
80
|
+
}
|
|
73
81
|
const serversOptions = ref([]);
|
|
74
82
|
for (const key in envConfig.servers) {
|
|
83
|
+
const value = envConfig.servers[key];
|
|
75
84
|
serversOptions.value.push({
|
|
76
|
-
|
|
77
|
-
value:
|
|
85
|
+
//外部 HTTP 服务(绝对地址)直接展示地址,便于识别
|
|
86
|
+
label: isAbsoluteUrl(value) ? `${key}(${value})` : key,
|
|
87
|
+
value
|
|
78
88
|
});
|
|
79
89
|
}
|
|
90
|
+
const isExternalServer = computed(() => {
|
|
91
|
+
var _a;
|
|
92
|
+
const serverName = ((_a = props.requestConfigData) == null ? void 0 : _a.serverName) || "";
|
|
93
|
+
return isAbsoluteUrl(envConfig.servers[serverName] || serverName);
|
|
94
|
+
});
|
|
80
95
|
watch(
|
|
81
96
|
() => props.requestConfigData,
|
|
82
97
|
() => {
|
|
@@ -106,8 +121,7 @@ const _sfc_main = {
|
|
|
106
121
|
params[param.key] = param.value;
|
|
107
122
|
}
|
|
108
123
|
});
|
|
109
|
-
const
|
|
110
|
-
const fullUrl = `${baseUrl}${requestConfig.url}`;
|
|
124
|
+
const fullUrl = buildRequestUrl(requestConfig);
|
|
111
125
|
let res;
|
|
112
126
|
if (requestConfig.method === "get") {
|
|
113
127
|
const queryString = new URLSearchParams(params).toString();
|
|
@@ -208,7 +222,8 @@ const _sfc_main = {
|
|
|
208
222
|
modelValue: __props.requestConfigData.url,
|
|
209
223
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => __props.requestConfigData.url = $event),
|
|
210
224
|
placeholder: "请输入请求URL"
|
|
211
|
-
}, null, 8, ["modelValue"])
|
|
225
|
+
}, null, 8, ["modelValue"]),
|
|
226
|
+
unref(isExternalServer) ? (openBlock(), createElementBlock("div", _hoisted_3, " 外部 HTTP 地址:将直接请求该地址,请确保目标服务允许跨域(CORS)访问。 ")) : createCommentVNode("", true)
|
|
212
227
|
]),
|
|
213
228
|
_: 1
|
|
214
229
|
}),
|
|
@@ -239,7 +254,7 @@ const _sfc_main = {
|
|
|
239
254
|
}),
|
|
240
255
|
createVNode(_component_el_form_item, { label: "内容类型" }, {
|
|
241
256
|
default: withCtx(() => [
|
|
242
|
-
createElementVNode("div",
|
|
257
|
+
createElementVNode("div", _hoisted_4, [
|
|
243
258
|
createVNode(_component_el_radio_group, {
|
|
244
259
|
modelValue: __props.requestConfigData.contentType,
|
|
245
260
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => __props.requestConfigData.contentType = $event)
|
|
@@ -272,7 +287,7 @@ const _sfc_main = {
|
|
|
272
287
|
]),
|
|
273
288
|
_: 1
|
|
274
289
|
}, 8, ["modelValue"]),
|
|
275
|
-
__props.requestConfigData.contentType == "upload" ? (openBlock(), createElementBlock("div",
|
|
290
|
+
__props.requestConfigData.contentType == "upload" ? (openBlock(), createElementBlock("div", _hoisted_5, " 单文件上传键名: file, 多文件上传键名: files。 ")) : createCommentVNode("", true)
|
|
276
291
|
])
|
|
277
292
|
]),
|
|
278
293
|
_: 1
|
|
@@ -290,9 +305,9 @@ const _sfc_main = {
|
|
|
290
305
|
_: 1
|
|
291
306
|
}, 8, ["model"])
|
|
292
307
|
]),
|
|
293
|
-
createElementVNode("div",
|
|
294
|
-
createElementVNode("div",
|
|
295
|
-
createElementVNode("span",
|
|
308
|
+
createElementVNode("div", _hoisted_6, [
|
|
309
|
+
createElementVNode("div", _hoisted_7, [
|
|
310
|
+
createElementVNode("span", _hoisted_8, [
|
|
296
311
|
createVNode(_component_el_icon, { class: "section-icon" }, {
|
|
297
312
|
default: withCtx(() => [
|
|
298
313
|
createVNode(unref(video_play_default))
|
|
@@ -314,10 +329,10 @@ const _sfc_main = {
|
|
|
314
329
|
_: 1
|
|
315
330
|
}, 8, ["icon", "loading"])
|
|
316
331
|
]),
|
|
317
|
-
unref(responseData) ? (openBlock(), createElementBlock("div",
|
|
318
|
-
createElementVNode("div",
|
|
332
|
+
unref(responseData) ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
333
|
+
createElementVNode("div", _hoisted_10, [
|
|
319
334
|
_cache[14] || (_cache[14] = createElementVNode("span", null, "响应结果", -1)),
|
|
320
|
-
createElementVNode("div",
|
|
335
|
+
createElementVNode("div", _hoisted_11, [
|
|
321
336
|
createVNode(_component_el_button, {
|
|
322
337
|
size: "small",
|
|
323
338
|
text: "",
|
|
@@ -331,7 +346,7 @@ const _sfc_main = {
|
|
|
331
346
|
}, 8, ["icon"])
|
|
332
347
|
])
|
|
333
348
|
]),
|
|
334
|
-
createElementVNode("div",
|
|
349
|
+
createElementVNode("div", _hoisted_12, [
|
|
335
350
|
createVNode(_component_el_tag, {
|
|
336
351
|
type: unref(responseData).status >= 200 && unref(responseData).status < 300 ? "success" : "danger",
|
|
337
352
|
size: "small"
|
|
@@ -341,7 +356,7 @@ const _sfc_main = {
|
|
|
341
356
|
]),
|
|
342
357
|
_: 1
|
|
343
358
|
}, 8, ["type"]),
|
|
344
|
-
createElementVNode("span",
|
|
359
|
+
createElementVNode("span", _hoisted_13, "耗时: " + toDisplayString(unref(requestTime)) + "ms", 1)
|
|
345
360
|
]),
|
|
346
361
|
createVNode(unref(Q), {
|
|
347
362
|
value: unref(responseData).data,
|
|
@@ -349,7 +364,7 @@ const _sfc_main = {
|
|
|
349
364
|
boxed: "",
|
|
350
365
|
"show-array-index": false
|
|
351
366
|
}, null, 8, ["value"])
|
|
352
|
-
])) : (openBlock(), createElementBlock("div",
|
|
367
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
353
368
|
createVNode(_component_el_icon, { class: "empty-icon" }, {
|
|
354
369
|
default: withCtx(() => [
|
|
355
370
|
createVNode(unref(document_default))
|
|
@@ -367,7 +382,7 @@ const _sfc_main = {
|
|
|
367
382
|
name: "dataHandler"
|
|
368
383
|
}, {
|
|
369
384
|
default: withCtx(() => _cache[16] || (_cache[16] = [
|
|
370
|
-
createTextVNode("
|
|
385
|
+
createTextVNode("待开发")
|
|
371
386
|
])),
|
|
372
387
|
_: 1
|
|
373
388
|
})
|
|
@@ -381,7 +396,7 @@ const _sfc_main = {
|
|
|
381
396
|
};
|
|
382
397
|
}
|
|
383
398
|
};
|
|
384
|
-
const DataSource = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
399
|
+
const DataSource = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8491c9bd"]]);
|
|
385
400
|
export {
|
|
386
401
|
DataSource as default
|
|
387
402
|
};
|
|
@@ -11,9 +11,11 @@ import { useDialogDialog } from "../dialog/useDialogDialog.mjs";
|
|
|
11
11
|
import { useDialogGlobalDialog } from "../dialogGlobal/useDialogGlobalDialog.mjs";
|
|
12
12
|
import { useProdDialog } from "../prod/useProdDialog.mjs";
|
|
13
13
|
import { useImportantDataChangeDialog } from "../importantDataChange/useImportantDataChangeDialog.mjs";
|
|
14
|
+
import { useAiFormDrawer } from "../aiForm/useAiFormDrawer.mjs";
|
|
14
15
|
import { Warning as warning_default, Connection as connection_default, Management as management_default, Link as link_default, ChatLineSquare as chat_line_square_default, Document as document_default } from "../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
15
16
|
import { getEditConfigData } from "../utils/common.mjs";
|
|
16
17
|
/* empty css */
|
|
18
|
+
/* empty css */
|
|
17
19
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
18
20
|
import { ElIcon } from "../../../../node_modules/element-plus/es/components/icon/index.mjs";
|
|
19
21
|
const _hoisted_1 = { class: "header-btns" };
|
|
@@ -53,6 +55,7 @@ const _sfc_main = {
|
|
|
53
55
|
openImportantDataChangeDialog,
|
|
54
56
|
ImportantDataChangeDialog
|
|
55
57
|
} = useImportantDataChangeDialog();
|
|
58
|
+
useAiFormDrawer();
|
|
56
59
|
computed(() => {
|
|
57
60
|
return getEditConfigData();
|
|
58
61
|
});
|
|
@@ -203,7 +206,7 @@ const _sfc_main = {
|
|
|
203
206
|
};
|
|
204
207
|
}
|
|
205
208
|
};
|
|
206
|
-
const formHeaderBtn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
209
|
+
const formHeaderBtn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-66d82ad3"]]);
|
|
207
210
|
export {
|
|
208
211
|
formHeaderBtn as default
|
|
209
212
|
};
|
|
@@ -3,7 +3,7 @@ import "../../../../node_modules/element-plus/es/index.mjs";
|
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
|
-
import { ref, watch, computed, resolveComponent, createElementBlock, openBlock, createVNode, createElementVNode, withCtx, unref, normalizeStyle, createCommentVNode, withModifiers, normalizeClass, createBlock, toDisplayString, createTextVNode
|
|
6
|
+
import { ref, watch, nextTick, computed, resolveComponent, createElementBlock, openBlock, createVNode, createElementVNode, withCtx, unref, normalizeStyle, createCommentVNode, withModifiers, normalizeClass, createBlock, toDisplayString, createTextVNode } from "vue";
|
|
7
7
|
import emitter from "../utils/eventBus.mjs";
|
|
8
8
|
import "../../../../node_modules/grid-layout-plus/es/index.mjs";
|
|
9
9
|
import { VueDraggable as lo } from "../../../../node_modules/vue-draggable-plus/dist/vue-draggable-plus.mjs";
|
|
@@ -323,6 +323,20 @@ const _sfc_main = {
|
|
|
323
323
|
emitter.on("resizeEvent", () => {
|
|
324
324
|
gridLayout.value.resizeEvent();
|
|
325
325
|
});
|
|
326
|
+
emitter.on("refreshFormFields", () => {
|
|
327
|
+
const cfg = getEditConfigData();
|
|
328
|
+
(cfg.fieldsData || []).forEach((item) => {
|
|
329
|
+
if (item == null ? void 0 : item.component) {
|
|
330
|
+
item.component = { ...defaultProperty, ...item.component };
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
editConfigData.value = cfg;
|
|
334
|
+
layoutData.value = cfg.fieldsData || [];
|
|
335
|
+
nextTick(() => {
|
|
336
|
+
var _a;
|
|
337
|
+
return (_a = gridLayout.value) == null ? void 0 : _a.resizeEvent();
|
|
338
|
+
});
|
|
339
|
+
});
|
|
326
340
|
ref(/* @__PURE__ */ new Map());
|
|
327
341
|
const isDragging = computed(() => {
|
|
328
342
|
var _a;
|
|
@@ -517,7 +531,7 @@ const _sfc_main = {
|
|
|
517
531
|
};
|
|
518
532
|
}
|
|
519
533
|
};
|
|
520
|
-
const formWorkArea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
534
|
+
const formWorkArea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c54438be"]]);
|
|
521
535
|
export {
|
|
522
536
|
formWorkArea as default
|
|
523
537
|
};
|
|
@@ -76,7 +76,7 @@ class DataSourceManager {
|
|
|
76
76
|
const currentDs = this.getCurrentDataSource();
|
|
77
77
|
if (!currentDs) return {};
|
|
78
78
|
const config = {
|
|
79
|
-
url:
|
|
79
|
+
url: buildRequestUrl(currentDs),
|
|
80
80
|
method: currentDs.method
|
|
81
81
|
};
|
|
82
82
|
if (currentDs.contentType === "formData") {
|
|
@@ -288,11 +288,24 @@ class DataSourceManager {
|
|
|
288
288
|
this.events.error = [];
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
+
function resolveServerBase(serverName) {
|
|
292
|
+
const servers = typeof window !== "undefined" && window.$servers || {};
|
|
293
|
+
return servers[serverName] ?? serverName ?? "";
|
|
294
|
+
}
|
|
295
|
+
function buildRequestUrl(dataSource) {
|
|
296
|
+
const base = resolveServerBase(dataSource == null ? void 0 : dataSource.serverName).replace(/\/+$/, "");
|
|
297
|
+
const url = (dataSource == null ? void 0 : dataSource.url) || "";
|
|
298
|
+
if (/^https?:\/\//i.test(url)) return url;
|
|
299
|
+
if (/^https?:\/\//i.test(base)) return `${base}/${url.replace(/^\/+/, "")}`;
|
|
300
|
+
if (!base) return url;
|
|
301
|
+
return `/${base}${url}`;
|
|
302
|
+
}
|
|
291
303
|
function createDataSource(options = {}) {
|
|
292
304
|
return new DataSourceManager(options);
|
|
293
305
|
}
|
|
294
306
|
export {
|
|
295
307
|
DataSourceManager,
|
|
308
|
+
buildRequestUrl,
|
|
296
309
|
createDataSource,
|
|
297
310
|
DataSourceManager as default
|
|
298
311
|
};
|