super-page-runtime 2.2.26 → 2.2.29-tmp2

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 (165) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +7 -5
  2. package/dist/es/assets/chart-themes/theme1.js +6 -2
  3. package/dist/es/assets/chart-themes/theme2.js +6 -2
  4. package/dist/es/assets/chart-themes/theme3.js +6 -2
  5. package/dist/es/components/runtime/utils/api/api-util.js +7 -4
  6. package/dist/es/components/runtime/utils/api/page-expose-util.js +443 -135
  7. package/dist/es/components/runtime/utils/assemblys-config.js +369 -13
  8. package/dist/es/components/runtime/utils/barcode-util.js +33 -9
  9. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +306 -122
  10. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +68 -29
  11. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +152 -68
  12. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +124 -46
  13. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +99 -36
  14. package/dist/es/components/runtime/utils/charts/chart-util.js +522 -224
  15. package/dist/es/components/runtime/utils/common-util.js +156 -76
  16. package/dist/es/components/runtime/utils/eventBus.js +8 -3
  17. package/dist/es/components/runtime/utils/events/event-util.js +775 -362
  18. package/dist/es/components/runtime/utils/events/print-label.js +140 -72
  19. package/dist/es/components/runtime/utils/events/standard-event.js +2320 -808
  20. package/dist/es/components/runtime/utils/events/validator-util.js +560 -224
  21. package/dist/es/components/runtime/utils/form/date-shortcuts.js +88 -28
  22. package/dist/es/components/runtime/utils/form/scan-util.js +162 -61
  23. package/dist/es/components/runtime/utils/global-refs.js +84 -53
  24. package/dist/es/components/runtime/utils/i18n-util.js +20 -11
  25. package/dist/es/components/runtime/utils/interfaces/page-design-types.js +7 -2
  26. package/dist/es/components/runtime/utils/page-helper-util.js +660 -279
  27. package/dist/es/components/runtime/utils/page-init-util.js +406 -141
  28. package/dist/es/components/runtime/utils/page-permission-util.js +531 -22
  29. package/dist/es/components/runtime/utils/page-store.js +68 -23
  30. package/dist/es/components/runtime/utils/store-util.js +13 -9
  31. package/dist/es/components/runtime/utils/store.js +2 -2
  32. package/dist/es/components/runtime/utils/table-utils.js +81 -40
  33. package/dist/es/components/runtime/utils/tree-utils.js +37 -17
  34. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
  35. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +83 -21
  36. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
  37. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +46 -14
  38. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
  39. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +132 -36
  40. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
  41. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +18 -4
  42. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
  43. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +107 -17
  44. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
  45. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +198 -50
  46. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +42 -12
  47. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
  48. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +60 -7
  49. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
  50. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +203 -52
  51. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
  52. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +4 -4
  53. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +162 -46
  54. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
  55. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +109 -32
  56. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
  57. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +166 -43
  58. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
  59. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +117 -32
  60. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
  61. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +118 -32
  62. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +597 -246
  63. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +42 -4
  64. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
  65. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +62 -8
  66. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
  67. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +160 -29
  68. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
  69. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +62 -13
  70. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
  71. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
  72. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +594 -212
  73. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +139 -29
  74. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
  75. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +125 -21
  76. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
  77. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +102 -16
  78. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
  79. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
  80. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +81 -18
  81. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
  82. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +82 -17
  83. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
  84. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +86 -14
  85. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
  86. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +79 -21
  87. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
  88. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +61 -16
  89. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
  90. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +37 -10
  91. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
  92. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +127 -38
  93. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
  94. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +76 -28
  95. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
  96. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +178 -61
  97. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +810 -302
  98. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
  99. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +635 -262
  100. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
  101. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
  102. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +115 -40
  103. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
  104. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +215 -56
  105. package/dist/es/components/runtime/views/assemblys/error-render.vue.js +21 -3
  106. package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
  107. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
  108. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +154 -42
  109. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +98 -34
  110. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
  111. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
  112. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +200 -52
  113. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
  114. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +239 -68
  115. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
  116. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +109 -31
  117. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
  118. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +59 -21
  119. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
  120. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +188 -56
  121. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
  122. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +103 -22
  123. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
  124. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +245 -57
  125. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
  126. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +174 -32
  127. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
  128. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +107 -28
  129. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
  130. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +50 -13
  131. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
  132. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +194 -64
  133. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
  134. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +249 -88
  135. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
  136. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +263 -80
  137. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
  138. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +57 -13
  139. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
  140. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +155 -30
  141. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
  142. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +129 -40
  143. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
  144. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +107 -22
  145. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +188 -89
  146. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +2 -2
  147. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +272 -133
  148. package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
  149. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
  150. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +46 -18
  151. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
  152. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +49 -21
  153. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
  154. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +58 -20
  155. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
  156. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +53 -16
  157. package/dist/es/components/runtime/views/home-chart.vue.js +160 -40
  158. package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
  159. package/dist/es/components/runtime/views/super-page-dialog.vue.js +139 -20
  160. package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
  161. package/dist/es/components/runtime/views/super-page.vue.js +754 -226
  162. package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
  163. package/dist/es/i18n/langs/cn.js +55 -2
  164. package/dist/es/i18n/langs/en.js +55 -2
  165. package/package.json +2 -2
@@ -1,31 +1,110 @@
1
- import { defineComponent as e, ref as t, computed as l, onMounted as n, nextTick as a, resolveComponent as i, createBlock as u, openBlock as o, normalizeStyle as r, normalizeClass as s, unref as p, withCtx as f, createVNode as c, createTextVNode as d, toDisplayString as m, createElementBlock as g, createCommentVNode as v } from "vue";
2
- import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
3
- import { getVariableValue as b } from "../../../../utils/page-helper-util.js";
4
- import { handleAfterInitEvent as k, handleEvent as x } from "../../../../utils/events/event-util.js";
5
- import { $t as C } from "../../../../utils/i18n-util.js";
6
- const _ = e({ __name: "link-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
7
- const _2 = e2, h = y(_2.pageContext, _2.configure), R = _2.configure.runtime ? _2.configure.runtime : {}, j = R.style, w = R.class, I = R.headerStyle, S = t(R.props ? R.props : {});
8
- let $ = S.value.formatting;
9
- const D = _2.pageContext.entity ? _2.pageContext.entity : {}, V = l(() => {
10
- let e3 = b(D, h);
11
- return e3 = null == e3 || null == e3 ? "" : e3, $ && (e3 = $.replace(/\${value}/g, e3)), e3;
12
- });
13
- let W = S.value.tooltip, q = null;
14
- W && (q = l(() => {
15
- let e3 = b(D, h);
16
- return e3 = null == e3 || null == e3 ? "" : e3, W.replace(/\${value}/g, e3);
17
- }));
18
- const z = t(null), A = t(null), B = t(null);
19
- return n(() => {
20
- a(() => {
21
- const e3 = V.value;
22
- k(e3, _2.pageContext, _2.configure, { formItemRef: z.value, componentRef: A.value, titleRef: B.value, value: e3, entity: _2.pageContext.entity.data, pageData: _2.pageContext.entity.page });
1
+ import { defineComponent, ref, computed, onMounted, nextTick, resolveComponent, createBlock, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createVNode, createTextVNode, toDisplayString, createElementBlock, createCommentVNode } from "vue";
2
+ import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
+ import { getVariableValue } from "../../../../utils/page-helper-util.js";
4
+ import { handleAfterInitEvent, handleEvent } from "../../../../utils/events/event-util.js";
5
+ import { $t } from "../../../../utils/i18n-util.js";
6
+ const _sfc_main = /* @__PURE__ */ defineComponent({
7
+ __name: "link-runtime",
8
+ props: {
9
+ pageContext: {},
10
+ configure: {}
11
+ },
12
+ setup(__props) {
13
+ const props = __props;
14
+ const modelFields = getFormModelFields(props.pageContext, props.configure);
15
+ const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
16
+ const runtimeStyle = runtimeInfo.style;
17
+ const runtimeClass = runtimeInfo.class;
18
+ const headerStyle = runtimeInfo.headerStyle;
19
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
20
+ console.log("designProperty", designProperty.value);
21
+ let formatting = designProperty.value.formatting;
22
+ const entity = props.pageContext.entity ? props.pageContext.entity : {};
23
+ const dynamicValue = computed(() => {
24
+ let resultValue = getVariableValue(entity, modelFields);
25
+ resultValue = resultValue == void 0 || resultValue == null ? "" : resultValue;
26
+ if (formatting) {
27
+ resultValue = formatting.replace(/\${value}/g, resultValue);
28
+ }
29
+ return resultValue;
23
30
  });
24
- }), (e3, t2) => {
25
- const l2 = i("el-link"), n2 = i("el-tooltip"), a2 = i("el-form-item");
26
- return o(), u(a2, { ref_key: "formItemRef", ref: z, class: s(p(w)), "label-width": S.value.labelWidth, style: r(p(j)) }, { label: f(() => [S.value.tittleShow ? (o(), g("div", { key: 0, ref_key: "titleRef", ref: B, style: r({ ...p(I) }) }, m(p(C)(S.value.title)), 5)) : v("", true)]), default: f(() => [c(n2, { disabled: !p(q), content: p(q) }, { default: f(() => [c(l2, { ref_key: "componentRef", ref: A, disabled: "disabled" === S.value.state, type: S.value.type, underline: S.value.underline, onClick: t2[0] || (t2[0] = (t3) => p(x)(t3, e3.pageContext, e3.configure, "click", { skipValidate: true })) }, { default: f(() => [d(m(V.value), 1)]), _: 1 }, 8, ["disabled", "type", "underline"])]), _: 1 }, 8, ["disabled", "content"])]), _: 1 }, 8, ["class", "label-width", "style"]);
27
- };
28
- } });
31
+ let tooltipVariable = designProperty.value.tooltip;
32
+ let tooltipValue = null;
33
+ if (tooltipVariable) {
34
+ tooltipValue = computed(() => {
35
+ let resultValue = getVariableValue(entity, modelFields);
36
+ resultValue = resultValue == void 0 || resultValue == null ? "" : resultValue;
37
+ return tooltipVariable.replace(/\${value}/g, resultValue);
38
+ });
39
+ }
40
+ const formItemRef = ref(null);
41
+ const componentRef = ref(null);
42
+ const titleRef = ref(null);
43
+ onMounted(() => {
44
+ nextTick(() => {
45
+ const value = dynamicValue.value;
46
+ handleAfterInitEvent(
47
+ value,
48
+ props.pageContext,
49
+ props.configure,
50
+ {
51
+ formItemRef: formItemRef.value,
52
+ componentRef: componentRef.value,
53
+ titleRef: titleRef.value,
54
+ value,
55
+ entity: props.pageContext.entity.data,
56
+ pageData: props.pageContext.entity.page
57
+ }
58
+ );
59
+ });
60
+ });
61
+ return (_ctx, _cache) => {
62
+ const _component_el_link = resolveComponent("el-link");
63
+ const _component_el_tooltip = resolveComponent("el-tooltip");
64
+ const _component_el_form_item = resolveComponent("el-form-item");
65
+ return openBlock(), createBlock(_component_el_form_item, {
66
+ ref_key: "formItemRef",
67
+ ref: formItemRef,
68
+ class: normalizeClass(unref(runtimeClass)),
69
+ "label-width": designProperty.value.labelWidth,
70
+ style: normalizeStyle(unref(runtimeStyle))
71
+ }, {
72
+ label: withCtx(() => [
73
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
74
+ key: 0,
75
+ ref_key: "titleRef",
76
+ ref: titleRef,
77
+ style: normalizeStyle({ ...unref(headerStyle) })
78
+ }, toDisplayString(unref($t)(designProperty.value.title)), 5)) : createCommentVNode("", true)
79
+ ]),
80
+ default: withCtx(() => [
81
+ createVNode(_component_el_tooltip, {
82
+ disabled: !unref(tooltipValue),
83
+ content: unref(tooltipValue)
84
+ }, {
85
+ default: withCtx(() => [
86
+ createVNode(_component_el_link, {
87
+ ref_key: "componentRef",
88
+ ref: componentRef,
89
+ disabled: designProperty.value.state === "disabled",
90
+ type: designProperty.value.type,
91
+ underline: designProperty.value.underline,
92
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click", { skipValidate: true }))
93
+ }, {
94
+ default: withCtx(() => [
95
+ createTextVNode(toDisplayString(dynamicValue.value), 1)
96
+ ]),
97
+ _: 1
98
+ }, 8, ["disabled", "type", "underline"])
99
+ ]),
100
+ _: 1
101
+ }, 8, ["disabled", "content"])
102
+ ]),
103
+ _: 1
104
+ }, 8, ["class", "label-width", "style"]);
105
+ };
106
+ }
107
+ });
29
108
  export {
30
- _ as default
109
+ _sfc_main as default
31
110
  };
@@ -1,7 +1,7 @@
1
- import e from "./placeholder-runtime.vue2.js";
1
+ import _sfc_main from "./placeholder-runtime.vue2.js";
2
2
  /* empty css */
3
- import r from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const o = r(e, [["__scopeId", "data-v-96fc65d8"]]);
3
+ import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const placeholderRuntime = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-96fc65d8"]]);
5
5
  export {
6
- o as default
6
+ placeholderRuntime as default
7
7
  };
@@ -1,16 +1,53 @@
1
- import { defineComponent as e, ref as t, onMounted as n, nextTick as o, resolveComponent as r, createBlock as l, openBlock as a, normalizeStyle as u, normalizeClass as f, unref as s, withCtx as i, createElementVNode as m } from "vue";
2
- import { handleAfterInitEvent as p } from "../../../../utils/events/event-util.js";
3
- const c = e({ __name: "placeholder-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
4
- const c2 = e2, g = c2.configure.runtime ? c2.configure.runtime : {}, y = g.style, d = g.class, v = t(null), x = t(null);
5
- return n(() => {
6
- o(() => {
7
- p(null, c2.pageContext, c2.configure, { formItemRef: v.value, componentRef: x.value, entity: c2.pageContext.entity.data, pageData: c2.pageContext.entity.page });
1
+ import { defineComponent, ref, onMounted, nextTick, resolveComponent, createBlock, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createElementVNode } from "vue";
2
+ import { handleAfterInitEvent } from "../../../../utils/events/event-util.js";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "placeholder-runtime",
5
+ props: {
6
+ pageContext: {},
7
+ configure: {}
8
+ },
9
+ setup(__props) {
10
+ const props = __props;
11
+ const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
12
+ const runtimeStyle = runtimeInfo.style;
13
+ const runtimeClass = runtimeInfo.class;
14
+ const formItemRef = ref(null);
15
+ const componentRef = ref(null);
16
+ onMounted(() => {
17
+ nextTick(() => {
18
+ handleAfterInitEvent(
19
+ null,
20
+ props.pageContext,
21
+ props.configure,
22
+ {
23
+ formItemRef: formItemRef.value,
24
+ componentRef: componentRef.value,
25
+ entity: props.pageContext.entity.data,
26
+ pageData: props.pageContext.entity.page
27
+ }
28
+ );
29
+ });
8
30
  });
9
- }), (e3, t2) => {
10
- const n2 = r("el-form-item");
11
- return a(), l(n2, { ref_key: "formItemRef", ref: v, class: f(s(d)), style: u(s(y)) }, { default: i(() => [m("div", { ref_key: "componentRef", ref: x, style: { width: "100%", height: "100%" } }, " ", 512)]), _: 1 }, 8, ["class", "style"]);
12
- };
13
- } });
31
+ return (_ctx, _cache) => {
32
+ const _component_el_form_item = resolveComponent("el-form-item");
33
+ return openBlock(), createBlock(_component_el_form_item, {
34
+ ref_key: "formItemRef",
35
+ ref: formItemRef,
36
+ class: normalizeClass(unref(runtimeClass)),
37
+ style: normalizeStyle(unref(runtimeStyle))
38
+ }, {
39
+ default: withCtx(() => [
40
+ createElementVNode("div", {
41
+ ref_key: "componentRef",
42
+ ref: componentRef,
43
+ style: { "width": "100%", "height": "100%" }
44
+ }, " ", 512)
45
+ ]),
46
+ _: 1
47
+ }, 8, ["class", "style"]);
48
+ };
49
+ }
50
+ });
14
51
  export {
15
- c as default
52
+ _sfc_main as default
16
53
  };
@@ -1,4 +1,4 @@
1
- import r from "./radio-runtime.vue2.js";
1
+ import _sfc_main from "./radio-runtime.vue2.js";
2
2
  export {
3
- r as default
3
+ _sfc_main as default
4
4
  };
@@ -1,70 +1,200 @@
1
- import { defineComponent as e, computed as t, ref as o, watch as l, onUnmounted as n, onMounted as a, nextTick as u, resolveComponent as i, createBlock as r, openBlock as s, normalizeStyle as p, normalizeClass as f, unref as c, withCtx as g, createVNode as d, createElementBlock as v, Fragment as m, renderList as h, createTextVNode as y, toDisplayString as b, createCommentVNode as C } from "vue";
2
- import { setVariableValue as x, getVariableValue as k, getOptionDatasFromPage as _, autoSetAfterSelect as R, queryOptionDatasources as S } from "../../../../utils/page-helper-util.js";
3
- import { getFormModelFields as T } from "../../../../utils/page-init-util.js";
4
- import { handleFormEvent as j, handleAfterInitEvent as I } from "../../../../utils/events/event-util.js";
5
- import { $t as V } from "../../../../utils/i18n-util.js";
6
- const q = e({ __name: "radio-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
7
- const w = e2, z = w.pageContext.entity ? w.pageContext.entity : {};
8
- let O = T(w.pageContext, w.configure);
9
- const D = t({ get() {
10
- let e3 = k(z, O);
11
- return null != e3 && (e3 += ""), e3;
12
- }, set(e3) {
13
- x(z, O, e3);
14
- } }), M = w.configure.runtime ? w.configure.runtime : {}, P = M.style, W = M.class, E = M.headerStyle, F = M.titleExceedStyle, U = o(M.props ? M.props : {}), $ = o(U.value.options ? U.value.options : []), A = _(w.pageContext, w.configure);
15
- A.length > 0 && ($.value = A);
16
- const B = w.configure.props && w.configure.props.dataOrigin ? w.configure.props.dataOrigin : {}, G = B.optionValueSetType;
17
- let H = [];
18
- if (("dynamicData" == G || "dataTable" == G || "service" == G) && B.autoSets) for (let e3 of B.autoSets) e3.source && H.push(e3);
19
- w.configure && w.configure.props && w.configure.props.base && w.configure.props.base.optionProp && H.push({ source: "label", target: w.configure.props.base.optionProp }), U.value.changeMethod = function(e3) {
20
- if (H.length > 0) {
21
- let t2 = null;
22
- $.value && null != e3 && null != e3 && (t2 = $.value.filter((t3) => e3 === t3.value)), R(w.configure, w.pageContext, H, t2);
1
+ import { defineComponent, computed, ref, watch, onUnmounted, onMounted, nextTick, resolveComponent, createBlock, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
+ import { setVariableValue, getVariableValue, getOptionDatasFromPage, autoSetAfterSelect, queryOptionDatasources } from "../../../../utils/page-helper-util.js";
3
+ import { getFormModelFields } from "../../../../utils/page-init-util.js";
4
+ import { handleFormEvent, handleAfterInitEvent } from "../../../../utils/events/event-util.js";
5
+ import { $t } from "../../../../utils/i18n-util.js";
6
+ const _sfc_main = /* @__PURE__ */ defineComponent({
7
+ __name: "radio-runtime",
8
+ props: {
9
+ pageContext: {},
10
+ configure: {}
11
+ },
12
+ setup(__props, { expose: __expose }) {
13
+ const props = __props;
14
+ const entity = props.pageContext.entity ? props.pageContext.entity : {};
15
+ let dynamicFields = getFormModelFields(props.pageContext, props.configure);
16
+ const dynamicModelMethod = computed({
17
+ get() {
18
+ let val = getVariableValue(entity, dynamicFields);
19
+ if (val !== void 0 && val !== null) {
20
+ val = val + "";
21
+ }
22
+ return val;
23
+ },
24
+ set(value) {
25
+ setVariableValue(entity, dynamicFields, value);
26
+ }
27
+ });
28
+ const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
29
+ const runtimeStyle = runtimeInfo.style;
30
+ const runtimeClass = runtimeInfo.class;
31
+ const headerStyle = runtimeInfo.headerStyle;
32
+ const titleExceedStyle = runtimeInfo.titleExceedStyle;
33
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
34
+ const listOptions = ref(designProperty.value.options ? designProperty.value.options : []);
35
+ const cacheOptions = getOptionDatasFromPage(props.pageContext, props.configure);
36
+ if (cacheOptions.length > 0) {
37
+ listOptions.value = cacheOptions;
38
+ }
39
+ const dataOrigin = props.configure.props && props.configure.props.dataOrigin ? props.configure.props.dataOrigin : {};
40
+ const valueType = dataOrigin.optionValueSetType;
41
+ let autoSets = [];
42
+ if (valueType == "dynamicData" || valueType == "dataTable" || valueType == "service") {
43
+ if (dataOrigin.autoSets) {
44
+ for (let obj of dataOrigin.autoSets) {
45
+ if (obj.source) {
46
+ autoSets.push(obj);
47
+ }
48
+ }
49
+ }
50
+ }
51
+ if (props.configure && props.configure.props && props.configure.props.base && props.configure.props.base.optionProp) {
52
+ autoSets.push({
53
+ source: "label",
54
+ target: props.configure.props.base.optionProp
55
+ });
23
56
  }
24
- j(e3, w.pageContext, w.configure, "change");
25
- };
26
- const J = U.value.monitorFields, K = [];
27
- if (J) {
28
- const e3 = [];
29
- for (let t2 of J) if (t2.startsWith("${")) {
30
- t2 = t2.substring(2, t2.length - 1);
31
- const o2 = t2.split(".");
32
- "page" !== o2[0] && "task" !== o2[0] && "data" !== o2[0] || (K.push(o2), e3.includes(o2[0]) || e3.push(o2[0]));
57
+ designProperty.value.changeMethod = optionChange;
58
+ const monitorFields = designProperty.value.monitorFields;
59
+ const monitorFieldInfos = [];
60
+ if (monitorFields) {
61
+ const preFields = [];
62
+ for (let propName of monitorFields) {
63
+ if (propName.startsWith("${")) {
64
+ propName = propName.substring(2, propName.length - 1);
65
+ const fields = propName.split(".");
66
+ if (fields[0] === "page" || fields[0] === "task" || fields[0] === "data") {
67
+ monitorFieldInfos.push(fields);
68
+ if (!preFields.includes(fields[0])) {
69
+ preFields.push(fields[0]);
70
+ }
71
+ }
72
+ }
73
+ }
74
+ for (let preField of preFields) {
75
+ watch(entity[preField], () => {
76
+ monitorFieldChange();
77
+ });
78
+ }
33
79
  }
34
- for (let t2 of e3) l(z[t2], () => {
35
- Y();
80
+ function getMonitorFieldValues() {
81
+ let values = "";
82
+ for (let fieldInfo of monitorFieldInfos) {
83
+ values += "_" + getVariableValue(entity, fieldInfo);
84
+ }
85
+ return values;
86
+ }
87
+ let initMonitorValue = getMonitorFieldValues();
88
+ let monitorTimeout = false;
89
+ const optionconfigInfo = designProperty.value.optionconfigInfo ? designProperty.value.optionconfigInfo : {};
90
+ function monitorFieldChange() {
91
+ if (monitorTimeout) {
92
+ clearTimeout(monitorTimeout);
93
+ }
94
+ monitorTimeout = setTimeout(function() {
95
+ const newValue = getMonitorFieldValues();
96
+ if (newValue == initMonitorValue) {
97
+ return;
98
+ }
99
+ initMonitorValue = newValue;
100
+ queryOptionDatasources(props.pageContext, optionconfigInfo, void 0).then((error) => {
101
+ console.log("查询失败!", error);
102
+ });
103
+ }, 200);
104
+ }
105
+ onUnmounted(() => {
106
+ if (monitorTimeout) {
107
+ clearTimeout(monitorTimeout);
108
+ }
36
109
  });
37
- }
38
- function L() {
39
- let e3 = "";
40
- for (let t2 of K) e3 += "_" + k(z, t2);
41
- return e3;
42
- }
43
- let N = L(), Q = false;
44
- const X = U.value.optionconfigInfo ? U.value.optionconfigInfo : {};
45
- function Y() {
46
- Q && clearTimeout(Q), Q = setTimeout(function() {
47
- const e3 = L();
48
- e3 != N && (N = e3, S(w.pageContext, X, void 0).then((e4) => {
49
- }));
50
- }, 200);
51
- }
52
- n(() => {
53
- Q && clearTimeout(Q);
54
- });
55
- const Z = o(null), ee = o(null), te = o(null);
56
- return a(() => {
57
- u(() => {
58
- const e3 = D.value;
59
- I(e3, w.pageContext, w.configure, { formItemRef: Z.value, componentRef: ee.value, titleRef: te.value, value: e3, entity: w.pageContext.entity.data, pageData: w.pageContext.entity.page });
110
+ function optionChange(value) {
111
+ if (autoSets.length > 0) {
112
+ let selItems = null;
113
+ if (listOptions.value && value != void 0 && value != null) {
114
+ selItems = listOptions.value.filter((item) => {
115
+ return value === item.value;
116
+ });
117
+ }
118
+ autoSetAfterSelect(props.configure, props.pageContext, autoSets, selItems);
119
+ }
120
+ handleFormEvent(value, props.pageContext, props.configure, "change");
121
+ }
122
+ function updateOptions(newOptions) {
123
+ listOptions.value = newOptions ? newOptions : [];
124
+ }
125
+ const formItemRef = ref(null);
126
+ const componentRef = ref(null);
127
+ const titleRef = ref(null);
128
+ onMounted(() => {
129
+ nextTick(() => {
130
+ const value = dynamicModelMethod.value;
131
+ handleAfterInitEvent(value, props.pageContext, props.configure, {
132
+ formItemRef: formItemRef.value,
133
+ componentRef: componentRef.value,
134
+ titleRef: titleRef.value,
135
+ value,
136
+ entity: props.pageContext.entity.data,
137
+ pageData: props.pageContext.entity.page
138
+ });
139
+ });
140
+ });
141
+ __expose({
142
+ updateOptions
60
143
  });
61
- }), q2({ updateOptions: function(e3) {
62
- $.value = e3 || [];
63
- } }), (e3, t2) => {
64
- const o2 = i("el-radio"), l2 = i("el-radio-group"), n2 = i("el-form-item");
65
- return s(), r(n2, { ref_key: "formItemRef", ref: Z, required: U.value.required, class: f(c(W)), "label-width": U.value.labelWidth, style: p(c(P)) }, { label: g(() => [U.value.tittleShow ? (s(), v("div", { key: 0, ref_key: "titleRef", ref: te, style: p({ ...c(E), ...c(F) }) }, b(c(V)(U.value.title)), 5)) : C("", true)]), default: g(() => [d(l2, { ref_key: "componentRef", ref: ee, disabled: "disabled" === U.value.state, size: U.value.size, onChange: U.value.changeMethod, modelValue: D.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => D.value = e4) }, { default: g(() => [(s(true), v(m, null, h($.value, (t3) => (s(), r(o2, { key: t3.value, label: t3.value, onClick: (o3) => c(j)(t3.value, e3.pageContext, e3.configure, "click", { values: D.value }) }, { default: g(() => [y(b(t3.label), 1)]), _: 2 }, 1032, ["label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
66
- };
67
- } });
144
+ return (_ctx, _cache) => {
145
+ const _component_el_radio = resolveComponent("el-radio");
146
+ const _component_el_radio_group = resolveComponent("el-radio-group");
147
+ const _component_el_form_item = resolveComponent("el-form-item");
148
+ return openBlock(), createBlock(_component_el_form_item, {
149
+ ref_key: "formItemRef",
150
+ ref: formItemRef,
151
+ required: designProperty.value.required,
152
+ class: normalizeClass(unref(runtimeClass)),
153
+ "label-width": designProperty.value.labelWidth,
154
+ style: normalizeStyle(unref(runtimeStyle))
155
+ }, {
156
+ label: withCtx(() => [
157
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
158
+ key: 0,
159
+ ref_key: "titleRef",
160
+ ref: titleRef,
161
+ style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
162
+ }, toDisplayString(unref($t)(designProperty.value.title)), 5)) : createCommentVNode("", true)
163
+ ]),
164
+ default: withCtx(() => [
165
+ createVNode(_component_el_radio_group, {
166
+ ref_key: "componentRef",
167
+ ref: componentRef,
168
+ disabled: designProperty.value.state === "disabled",
169
+ size: designProperty.value.size,
170
+ onChange: designProperty.value.changeMethod,
171
+ modelValue: dynamicModelMethod.value,
172
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event)
173
+ }, {
174
+ default: withCtx(() => [
175
+ (openBlock(true), createElementBlock(Fragment, null, renderList(listOptions.value, (item) => {
176
+ return openBlock(), createBlock(_component_el_radio, {
177
+ key: item.value,
178
+ label: item.value,
179
+ onClick: ($event) => unref(handleFormEvent)(item.value, _ctx.pageContext, _ctx.configure, "click", {
180
+ values: dynamicModelMethod.value
181
+ })
182
+ }, {
183
+ default: withCtx(() => [
184
+ createTextVNode(toDisplayString(item.label), 1)
185
+ ]),
186
+ _: 2
187
+ }, 1032, ["label", "onClick"]);
188
+ }), 128))
189
+ ]),
190
+ _: 1
191
+ }, 8, ["disabled", "size", "onChange", "modelValue"])
192
+ ]),
193
+ _: 1
194
+ }, 8, ["required", "class", "label-width", "style"]);
195
+ };
196
+ }
197
+ });
68
198
  export {
69
- q as default
199
+ _sfc_main as default
70
200
  };
@@ -1,4 +1,4 @@
1
- import t from "./richtext-runtime.vue2.js";
1
+ import _sfc_main from "./richtext-runtime.vue2.js";
2
2
  export {
3
- t as default
3
+ _sfc_main as default
4
4
  };