@fecp/designer 5.4.18 → 5.4.20

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.
Files changed (67) hide show
  1. package/es/designer/package.json.mjs +1 -1
  2. package/es/designer/src/components/DialogSelect.vue.mjs +122 -0
  3. package/es/designer/src/components/DocumentParam.vue.mjs +1 -1
  4. package/es/designer/src/components/ParamsConfig.vue2.mjs +1 -1
  5. package/es/designer/src/layout/aside/HiddenFieldDialog.vue.mjs +1 -1
  6. package/es/designer/src/packages/advancedFilter/ValueInput.vue2.mjs +1 -1
  7. package/es/designer/src/packages/dataLinkage/index.vue.mjs +1 -1
  8. package/es/designer/src/packages/dialog/index.vue.mjs +58 -41
  9. package/es/designer/src/packages/dialogGlobal/index.vue.mjs +62 -43
  10. package/es/designer/src/packages/event/pageEvent.vue.mjs +18 -3
  11. package/es/designer/src/packages/eventFlow/dialog/action/Dialog.vue.mjs +9 -29
  12. package/es/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.mjs +17 -5
  13. package/es/designer/src/packages/eventFlow/dialog/action/config.mjs +1 -0
  14. package/es/designer/src/packages/form/aside/index.mjs +1 -0
  15. package/es/designer/src/packages/form/property/approvalHistory.vue.mjs +1 -1
  16. package/es/designer/src/packages/form/property/contract.vue.mjs +1 -1
  17. package/es/designer/src/packages/form/property/subForm.vue.mjs +13 -15
  18. package/es/designer/src/packages/form/property/widgets.vue.mjs +27 -25
  19. package/es/designer/src/packages/prod/index.vue.mjs +1 -1
  20. package/es/designer/src/packages/table/headerBtn.vue.mjs +3 -3
  21. package/es/designer.css +1008 -1005
  22. package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
  23. package/es/packages/vue/src/components/dialog/DialogRenderer.vue2.mjs +45 -24
  24. package/es/packages/vue/src/components/forms/form/Form.vue.mjs +10 -0
  25. package/es/packages/vue/src/components/forms/subForm/SubForm.vue.mjs +25 -2
  26. package/es/packages/vue/src/components/forms/text/Text.vue.mjs +11 -1
  27. package/es/packages/vue/src/components/riskSch/RiskSchRenderer.vue.mjs +87 -0
  28. package/es/packages/vue/src/components/riskSch/index.mjs +71 -0
  29. package/es/packages/vue/src/components/table/Table.vue.mjs +10 -0
  30. package/es/packages/vue/src/components/table/TableColumn.vue.mjs +11 -1
  31. package/es/packages/vue/src/composables/usePageEvents.mjs +11 -1
  32. package/es/packages/vue/src/utils/datasource.mjs +1 -1
  33. package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +44 -7
  34. package/lib/designer/package.json.js +1 -1
  35. package/lib/designer/src/components/DialogSelect.vue.js +122 -0
  36. package/lib/designer/src/components/DocumentParam.vue.js +1 -1
  37. package/lib/designer/src/components/ParamsConfig.vue2.js +1 -1
  38. package/lib/designer/src/layout/aside/HiddenFieldDialog.vue.js +1 -1
  39. package/lib/designer/src/packages/advancedFilter/ValueInput.vue2.js +1 -1
  40. package/lib/designer/src/packages/dataLinkage/index.vue.js +1 -1
  41. package/lib/designer/src/packages/dialog/index.vue.js +58 -41
  42. package/lib/designer/src/packages/dialogGlobal/index.vue.js +62 -43
  43. package/lib/designer/src/packages/event/pageEvent.vue.js +26 -11
  44. package/lib/designer/src/packages/eventFlow/dialog/action/Dialog.vue.js +11 -31
  45. package/lib/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.js +17 -5
  46. package/lib/designer/src/packages/eventFlow/dialog/action/config.js +1 -0
  47. package/lib/designer/src/packages/form/aside/index.js +1 -0
  48. package/lib/designer/src/packages/form/property/approvalHistory.vue.js +1 -1
  49. package/lib/designer/src/packages/form/property/contract.vue.js +1 -1
  50. package/lib/designer/src/packages/form/property/subForm.vue.js +13 -15
  51. package/lib/designer/src/packages/form/property/widgets.vue.js +22 -20
  52. package/lib/designer/src/packages/prod/index.vue.js +1 -1
  53. package/lib/designer/src/packages/table/headerBtn.vue.js +3 -3
  54. package/lib/designer.css +1008 -1005
  55. package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
  56. package/lib/packages/vue/src/components/dialog/DialogRenderer.vue2.js +44 -23
  57. package/lib/packages/vue/src/components/forms/form/Form.vue.js +10 -0
  58. package/lib/packages/vue/src/components/forms/subForm/SubForm.vue.js +25 -2
  59. package/lib/packages/vue/src/components/forms/text/Text.vue.js +11 -1
  60. package/lib/packages/vue/src/components/riskSch/RiskSchRenderer.vue.js +87 -0
  61. package/lib/packages/vue/src/components/riskSch/index.js +71 -0
  62. package/lib/packages/vue/src/components/table/Table.vue.js +10 -0
  63. package/lib/packages/vue/src/components/table/TableColumn.vue.js +11 -1
  64. package/lib/packages/vue/src/composables/usePageEvents.js +11 -1
  65. package/lib/packages/vue/src/utils/datasource.js +1 -1
  66. package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +57 -20
  67. package/package.json +1 -1
@@ -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";
11
9
  /* empty css */
12
10
  /* empty css */
13
11
  /* empty css */
14
12
  /* empty css */
15
13
  /* empty css */
14
+ /* empty css */
15
+ import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
16
16
  import { SwipeCell } from "../../../../../../node_modules/vant/es/swipe-cell/index.mjs";
17
17
  import { showConfirmDialog } from "../../../../../../node_modules/vant/es/dialog/function-call.mjs";
18
18
  import "../../../../../../node_modules/vant/es/dialog/index.mjs";
@@ -3,17 +3,27 @@ import "../../../../../node_modules/element-plus/es/index.mjs";
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
6
- import { ref, computed, watch, createBlock, openBlock, withCtx, createElementVNode, normalizeStyle, normalizeClass, createElementBlock, Fragment, createCommentVNode, unref, resolveDynamicComponent, toDisplayString, createVNode, createTextVNode, renderList, defineAsyncComponent } from "vue";
6
+ import { ref, computed, watch, createBlock, openBlock, resolveDynamicComponent, mergeProps, withCtx, createElementVNode, normalizeStyle, normalizeClass, createElementBlock, Fragment, createCommentVNode, unref, normalizeProps, toDisplayString, createVNode, createTextVNode, renderList } from "vue";
7
7
  import { Table } from "../table/index.mjs";
8
8
  import { Form } from "../forms/form/index.mjs";
9
9
  import { parseRouteParams } from "../../utils/parseRouteParams.mjs";
10
10
  import { calculate } from "../../utils/formulajs/calculate.mjs";
11
11
  import { useEventFlow, executeEventFlow } from "../../utils/eventFlow/eventFlowHandler.mjs";
12
- /* empty css */
13
12
  /* empty css */
13
+ /* empty css */
14
14
  /* empty css */
15
15
  /* empty css */
16
16
  import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
17
+ /* empty css */
18
+ /* empty css */
19
+ /* empty css */
20
+ /* empty css */
21
+ /* empty css */
22
+ /* empty css */
23
+ /* empty css */
24
+ /* empty css */
25
+ /* empty css */
26
+ /* empty css */
17
27
  /* empty css */
18
28
  /* empty css */
19
29
  import { ElDialog } from "../../../../../node_modules/element-plus/es/components/dialog/index.mjs";
@@ -115,6 +125,9 @@ const _sfc_main = {
115
125
  },
116
126
  (val) => {
117
127
  dialogVisible.value = val;
128
+ if (val) {
129
+ loadComponentByPath(currentDialogConfig.value.componentPath);
130
+ }
118
131
  },
119
132
  {
120
133
  immediate: true
@@ -123,19 +136,27 @@ const _sfc_main = {
123
136
  watch(dialogVisible, (val) => {
124
137
  emit("update:modelValue", val);
125
138
  });
126
- const loadComponent = (path) => {
127
- if (!path) return null;
128
- try {
129
- const component = defineAsyncComponent(
130
- () => import(
131
- /* @vite-ignore */
132
- path
133
- )
134
- );
135
- return component;
136
- } catch (error) {
137
- console.error("组件加载失败:", error);
138
- return null;
139
+ const componentParams = computed(() => {
140
+ var _a;
141
+ const params = parseRouteParams(
142
+ ((_a = currentDialogConfig.value) == null ? void 0 : _a.componentParams) || [],
143
+ props.formData,
144
+ props.fieldsList
145
+ );
146
+ return params;
147
+ });
148
+ const currentComponent = ref(null);
149
+ const loadComponentByPath = (path) => {
150
+ const route = ctx.$router.getRoutes().find((item) => item.path === path);
151
+ if (!route) return;
152
+ const comp = route.components.default;
153
+ if (!comp) return;
154
+ if (typeof comp === "function") {
155
+ comp().then((module) => {
156
+ currentComponent.value = module.default;
157
+ });
158
+ } else {
159
+ currentComponent.value = comp;
139
160
  }
140
161
  };
141
162
  const handleSubmit = (data) => {
@@ -306,7 +327,12 @@ const _sfc_main = {
306
327
  return (_ctx, _cache) => {
307
328
  const _component_el_button = ElButton;
308
329
  const _component_el_dialog = ElDialog;
309
- return openBlock(), createBlock(_component_el_dialog, {
330
+ return __props.dialogConfig.componentIsDialog ? (openBlock(), createBlock(resolveDynamicComponent(currentComponent.value), mergeProps({ key: 0 }, componentParams.value, {
331
+ formData: __props.formData,
332
+ onClose: handleClose,
333
+ onSubmit: handleSubmit
334
+ }), null, 16, ["formData"])) : (openBlock(), createBlock(_component_el_dialog, {
335
+ key: 1,
310
336
  modelValue: dialogVisible.value,
311
337
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dialogVisible.value = $event),
312
338
  width: dialogWidth.value,
@@ -401,22 +427,17 @@ const _sfc_main = {
401
427
  ref_key: "dialogFormRef",
402
428
  ref: dialogFormRef
403
429
  }, null, 8, ["templateKey", "modelValue", "initFormMode"])) : ((_d = __props.dialogConfig) == null ? void 0 : _d.contentSource) === "component" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
404
- loadComponent(__props.dialogConfig.componentPath) ? (openBlock(), createBlock(resolveDynamicComponent(loadComponent(__props.dialogConfig.componentPath)), {
405
- key: 0,
406
- "dialog-params": __props.dialogConfig.dialogParams,
407
- onClose: handleClose,
408
- onSubmit: handleSubmit
409
- }, null, 40, ["dialog-params"])) : (openBlock(), createElementBlock("div", _hoisted_2, " 组件加载失败,请检查组件路径: " + toDisplayString((_e = __props.dialogConfig) == null ? void 0 : _e.componentPath), 1))
430
+ currentComponent.value ? (openBlock(), createBlock(resolveDynamicComponent(currentComponent.value), normalizeProps(mergeProps({ key: 0 }, componentParams.value)), null, 16)) : (openBlock(), createElementBlock("div", _hoisted_2, " 组件加载失败,请检查组件路径: " + toDisplayString((_e = __props.dialogConfig) == null ? void 0 : _e.componentPath), 1))
410
431
  ], 64)) : (openBlock(), createElementBlock("div", _hoisted_3, "请配置弹层内容"))
411
432
  ], 6)
412
433
  ];
413
434
  }),
414
435
  _: 1
415
- }, 8, ["modelValue", "width"]);
436
+ }, 8, ["modelValue", "width"]));
416
437
  };
417
438
  }
418
439
  };
419
- const DialogRenderer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8b571a63"]]);
440
+ const DialogRenderer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6b46adf3"]]);
420
441
  export {
421
442
  DialogRenderer as default
422
443
  };
@@ -26,6 +26,16 @@ import { useEventFlow } from "../../../utils/eventFlow/eventFlowHandler.mjs";
26
26
  /* empty css */
27
27
  /* empty css */
28
28
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
29
+ /* empty css */
30
+ /* empty css */
31
+ /* empty css */
32
+ /* empty css */
33
+ /* empty css */
34
+ /* empty css */
35
+ /* empty css */
36
+ /* empty css */
37
+ /* empty css */
38
+ /* empty css */
29
39
  import api from "../../../api/index.mjs";
30
40
  /* empty css */
31
41
  /* empty css */
@@ -3,6 +3,7 @@ import { Form } from "../form/index.mjs";
3
3
  import { SubTitle } from "../subTitle/index.mjs";
4
4
  import { H2 } from "../h2/index.mjs";
5
5
  import { cloneDeep } from "../../../utils/common.mjs";
6
+ import { parseRouteParams } from "../../../utils/parseRouteParams.mjs";
6
7
  const _hoisted_1 = {
7
8
  key: 0,
8
9
  style: { "height": "60px", "position": "relative" }
@@ -53,11 +54,33 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
53
54
  const setFormItemHeight = inject("setFormItemHeight");
54
55
  const subFormData = computed({
55
56
  get: () => {
57
+ if (props.config.dataSourceFrom == "self") {
58
+ return cloneDeep(subFormParams.value);
59
+ }
56
60
  return cloneDeep(formData.value);
57
61
  },
58
62
  set: (val) => {
59
- formData.value = { ...formData.value, ...val };
63
+ if (props.config.dataSourceFrom != "self") {
64
+ formData.value = { ...formData.value, ...val };
65
+ }
66
+ }
67
+ });
68
+ const fieldList = computed(() => {
69
+ return [
70
+ ...props.localConfig.fieldsData.map((item) => item.component),
71
+ ...props.localConfig.hiddenFields
72
+ ];
73
+ });
74
+ const subFormParams = computed(() => {
75
+ if (props.config.dataSourceFrom == "self") {
76
+ const params = parseRouteParams(
77
+ props.config.subFormParams,
78
+ formData.value,
79
+ fieldList.value
80
+ );
81
+ return params;
60
82
  }
83
+ return {};
61
84
  });
62
85
  const templateKey = computed(() => {
63
86
  if (props.config.formSource == "dynamic") {
@@ -126,7 +149,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
126
149
  templateKey: unref(templateKey),
127
150
  isSubForm: "",
128
151
  onLayoutUpdated: subFormLoaded,
129
- canPageEvent: __props.config.triggerSubFormPageEvent,
152
+ canPageEvent: __props.config.dataSourceFrom == "self",
130
153
  initFormMode: __props.formMode,
131
154
  modelValue: unref(subFormData),
132
155
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(subFormData) ? subFormData.value = $event : null)
@@ -3,10 +3,20 @@ import "../../../../../../node_modules/element-plus/es/index.mjs";
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  import { computed, getCurrentInstance, inject, createElementBlock, openBlock, createVNode, createCommentVNode, mergeProps, toHandlers, createSlots, withCtx, createElementVNode, toDisplayString, createBlock, createTextVNode, unref } from "vue";
6
- /* empty css */
7
6
  /* empty css */
7
+ /* empty css */
8
8
  /* empty css */
9
9
  import { openDialog } from "../../dialog/index.mjs";
10
+ /* empty css */
11
+ /* empty css */
12
+ /* empty css */
13
+ /* empty css */
14
+ /* empty css */
15
+ /* empty css */
16
+ /* empty css */
17
+ /* empty css */
18
+ /* empty css */
19
+ /* empty css */
10
20
  import api from "../../../api/index.mjs";
11
21
  /* empty css */
12
22
  /* empty css */
@@ -0,0 +1,87 @@
1
+ import { ref, watch, onMounted, createBlock, openBlock, resolveDynamicComponent, unref, isRef } from "vue";
2
+ const path = "/bus/module/comm/risk/components/RiskInterceptResult";
3
+ const _sfc_main = /* @__PURE__ */ Object.assign({
4
+ inheritAttrs: false
5
+ }, {
6
+ __name: "RiskSchRenderer",
7
+ props: {
8
+ // 是否显示
9
+ modelValue: {
10
+ type: Boolean,
11
+ default: false
12
+ },
13
+ ctx: {
14
+ type: Object,
15
+ default: {}
16
+ },
17
+ schNo: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ busNo: {
22
+ type: String,
23
+ default: ""
24
+ },
25
+ paramList: {
26
+ type: Object,
27
+ default: {}
28
+ }
29
+ },
30
+ emits: ["update:modelValue", "confirm", "cancel"],
31
+ setup(__props, { emit: __emit }) {
32
+ const props = __props;
33
+ const emit = __emit;
34
+ const dialogVisible = ref(false);
35
+ watch(
36
+ () => {
37
+ return props.modelValue;
38
+ },
39
+ (val) => {
40
+ dialogVisible.value = val;
41
+ },
42
+ {
43
+ immediate: true
44
+ }
45
+ );
46
+ watch(dialogVisible, (val) => {
47
+ emit("update:modelValue", val);
48
+ });
49
+ function confirm(data) {
50
+ emit("confirm", data);
51
+ }
52
+ function cancel(data) {
53
+ emit("cancel", data);
54
+ }
55
+ const currentComponent = ref(null);
56
+ const loadComponentByPath = (path2) => {
57
+ const route = props.ctx.$router.getRoutes().find((item) => item.path === path2);
58
+ if (!route) return;
59
+ const comp = route.components.default;
60
+ if (!comp) return;
61
+ if (typeof comp === "function") {
62
+ comp().then((module) => {
63
+ currentComponent.value = module.default;
64
+ });
65
+ } else {
66
+ currentComponent.value = comp;
67
+ }
68
+ };
69
+ onMounted(() => {
70
+ loadComponentByPath(path);
71
+ });
72
+ return (_ctx, _cache) => {
73
+ return openBlock(), createBlock(resolveDynamicComponent(unref(currentComponent)), {
74
+ modelValue: unref(dialogVisible),
75
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(dialogVisible) ? dialogVisible.value = $event : null),
76
+ schNo: __props.schNo,
77
+ busNo: __props.busNo,
78
+ paramList: __props.paramList,
79
+ onConfirm: confirm,
80
+ onCancel: cancel
81
+ }, null, 40, ["modelValue", "schNo", "busNo", "paramList"]);
82
+ };
83
+ }
84
+ });
85
+ export {
86
+ _sfc_main as default
87
+ };
@@ -0,0 +1,71 @@
1
+ import { createVNode, render } from "vue";
2
+ import _sfc_main from "./RiskSchRenderer.vue.mjs";
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
+ import { closeDialog } from "../../../../../node_modules/vant/es/dialog/function-call.mjs";
14
+ import "../../../../../node_modules/vant/es/dialog/index.mjs";
15
+ let currentDialogInstance = null;
16
+ let isCleaningUp = false;
17
+ const cleanupDialog = () => {
18
+ if (isCleaningUp) return;
19
+ isCleaningUp = true;
20
+ setTimeout(() => {
21
+ var _a;
22
+ try {
23
+ if ((_a = currentDialogInstance == null ? void 0 : currentDialogInstance.container) == null ? void 0 : _a.parentNode) {
24
+ currentDialogInstance.container.parentNode.removeChild(
25
+ currentDialogInstance.container
26
+ );
27
+ }
28
+ if (currentDialogInstance == null ? void 0 : currentDialogInstance.vnode) {
29
+ render(null, currentDialogInstance.container);
30
+ }
31
+ currentDialogInstance = null;
32
+ } catch (error) {
33
+ console.error("Dialog cleanup error:", error);
34
+ } finally {
35
+ isCleaningUp = false;
36
+ }
37
+ }, 300);
38
+ };
39
+ function openRiskSch(option, instance, ctx) {
40
+ return new Promise((resolve, reject) => {
41
+ if (currentDialogInstance) {
42
+ closeDialog();
43
+ }
44
+ const container = document.createElement("div");
45
+ document.body.appendChild(container);
46
+ const vnode = createVNode(_sfc_main, {
47
+ modelValue: true,
48
+ ...option,
49
+ ctx,
50
+ "onUpdate:modelValue": (val) => {
51
+ if (!val) {
52
+ cleanupDialog();
53
+ }
54
+ },
55
+ onConfirm: (data) => {
56
+ cleanupDialog();
57
+ resolve(data);
58
+ },
59
+ onCancel: () => {
60
+ cleanupDialog();
61
+ reject(new Error("用户取消"));
62
+ }
63
+ });
64
+ vnode.appContext = instance.appContext;
65
+ render(vnode, container);
66
+ currentDialogInstance = { vnode, container };
67
+ });
68
+ }
69
+ export {
70
+ openRiskSch
71
+ };
@@ -28,6 +28,16 @@ import { useEventFlow } from "../../utils/eventFlow/eventFlowHandler.mjs";
28
28
  /* empty css */
29
29
  /* empty css */
30
30
  import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
31
+ /* empty css */
32
+ /* empty css */
33
+ /* empty css */
34
+ /* empty css */
35
+ /* empty css */
36
+ /* empty css */
37
+ /* empty css */
38
+ /* empty css */
39
+ /* empty css */
40
+ /* empty css */
31
41
  /* empty css */
32
42
  /* empty css */
33
43
  import getJsonAsyncUtil from "../../utils/getJsonAsyncUtil.mjs";
@@ -7,8 +7,8 @@ import "../../../../../node_modules/vxe-table/es/components.mjs";
7
7
  import { CopyDocument as copy_document_default } from "../../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
8
8
  import { checkFilterMatch } from "../../utils/parseFilterConfig.mjs";
9
9
  import { removeEmptyValues } from "../../utils/common.mjs";
10
- /* empty css */
11
10
  /* empty css */
11
+ /* empty css */
12
12
  /* empty css */
13
13
  /* empty css */
14
14
  /* empty css */
@@ -18,6 +18,16 @@ import "../../utils/formulajs/functionCore.mjs";
18
18
  import { useEventFlow } from "../../utils/eventFlow/eventFlowHandler.mjs";
19
19
  /* empty css */
20
20
  import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
21
+ /* empty css */
22
+ /* empty css */
23
+ /* empty css */
24
+ /* empty css */
25
+ /* empty css */
26
+ /* empty css */
27
+ /* empty css */
28
+ /* empty css */
29
+ /* empty css */
30
+ /* empty css */
21
31
  /* empty css */
22
32
  /* empty css */
23
33
  import { Decimal } from "../../../../../node_modules/decimal.js/decimal.mjs";
@@ -1,7 +1,7 @@
1
1
  import { onUnmounted, onBeforeUnmount, onMounted } from "vue";
2
2
  /* empty css */
3
- /* empty css */
4
3
  /* empty css */
4
+ /* empty css */
5
5
  /* empty css */
6
6
  /* empty css */
7
7
  /* empty css */
@@ -11,6 +11,16 @@ import "../components/forms/form/index.mjs";
11
11
  import "../utils/formulajs/functionCore.mjs";
12
12
  import { useEventFlow } from "../utils/eventFlow/eventFlowHandler.mjs";
13
13
  /* empty css */
14
+ /* empty css */
15
+ /* empty css */
16
+ /* empty css */
17
+ /* empty css */
18
+ /* empty css */
19
+ /* empty css */
20
+ /* empty css */
21
+ /* empty css */
22
+ /* empty css */
23
+ /* empty css */
14
24
  /* empty css */
15
25
  /* empty css */
16
26
  function usePageEvents(getOptions) {
@@ -2,8 +2,8 @@ import { reactive } from "vue";
2
2
  import { parseRouteParams } from "./parseRouteParams.mjs";
3
3
  import "../../../../node_modules/element-plus/es/index.mjs";
4
4
  /* empty css */
5
- /* empty css */
6
5
  /* empty css */
6
+ /* empty css */
7
7
  /* empty css */
8
8
  import { ElLoading } from "../../../../node_modules/element-plus/es/components/loading/index.mjs";
9
9
  import { ElMessage } from "../../../../node_modules/element-plus/es/components/message/index.mjs";
@@ -3,6 +3,7 @@ import { parseRouteParams, parseSingleParamValue } from "../parseRouteParams.mjs
3
3
  import { removeEmptyValues } from "../common.mjs";
4
4
  import "../../../../../node_modules/element-plus/es/index.mjs";
5
5
  import { openDialog } from "../../components/dialog/index.mjs";
6
+ import { openRiskSch } from "../../components/riskSch/index.mjs";
6
7
  import api from "../../api/index.mjs";
7
8
  /* empty css */
8
9
  /* empty css */
@@ -630,6 +631,7 @@ async function handleDialog(node, data, fields, context) {
630
631
  }
631
632
  }
632
633
  async function handleRiskSchDialog(node, data, fields, context) {
634
+ var _a, _b, _c;
633
635
  const basic = node.basic || {};
634
636
  if (!(basic == null ? void 0 : basic.schNo)) {
635
637
  console.error("风险拦截校验: 缺少 schNo 配置");
@@ -639,16 +641,51 @@ async function handleRiskSchDialog(node, data, fields, context) {
639
641
  console.error("风险拦截校验: 缺少 busNo 配置");
640
642
  return;
641
643
  }
644
+ if (basic == null ? void 0 : basic.formValidate) {
645
+ const formComponent = (_a = context.components) == null ? void 0 : _a.form;
646
+ const validateMethod = (_c = (_b = formComponent == null ? void 0 : formComponent.$) == null ? void 0 : _b.exposed) == null ? void 0 : _c.validate;
647
+ try {
648
+ if (typeof validateMethod === "function") {
649
+ await validateMethod();
650
+ } else {
651
+ console.error("未找到表单组件的 validate 方法");
652
+ return {
653
+ success: false,
654
+ message: "表单组件未正确配置或 validate 方法未暴露",
655
+ shouldShowError: true
656
+ };
657
+ }
658
+ } catch (error) {
659
+ return {
660
+ success: false,
661
+ message: "表单验证失败!",
662
+ shouldShowError: false
663
+ };
664
+ }
665
+ }
642
666
  const schNo = basic.schNo;
643
- console.log("🚀 ~ handleRiskSchDialog ~ schNo:", schNo);
644
667
  const paramList = parseRouteParams(basic == null ? void 0 : basic.params, data, fields);
645
- console.log("🚀 ~ handleRiskSchDialog ~ paramList:", paramList);
646
668
  const busNo = parseSingleParamValue(basic.busNo, data, fields);
647
- console.log("🚀 ~ handleRiskSchDialog ~ busNo:", busNo);
648
- return {
649
- success: true,
650
- message: "风险拦截校验通过"
651
- };
669
+ try {
670
+ await openRiskSch(
671
+ { schNo, busNo, paramList },
672
+ context.instance,
673
+ context.ctx
674
+ );
675
+ return {
676
+ success: true,
677
+ message: "用户已确认",
678
+ shouldShowError: false
679
+ };
680
+ } catch (error) {
681
+ return {
682
+ success: false,
683
+ message: "用户已取消",
684
+ confirmed: false,
685
+ shouldShowError: false
686
+ // 用户取消不提示错误
687
+ };
688
+ }
652
689
  }
653
690
  async function handleUpload(node, data, fields, context) {
654
691
  const basic = node.basic || {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const version = "5.4.18";
3
+ const version = "5.4.20";
4
4
  const packageJson = {
5
5
  version
6
6
  };