super-page-runtime 2.2.29-tmp2 → 2.2.32

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 (167) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +5 -7
  2. package/dist/es/assets/chart-themes/theme1.js +2 -6
  3. package/dist/es/assets/chart-themes/theme2.js +2 -6
  4. package/dist/es/assets/chart-themes/theme3.js +2 -6
  5. package/dist/es/components/runtime/utils/api/api-util.js +4 -7
  6. package/dist/es/components/runtime/utils/api/page-expose-util.js +135 -443
  7. package/dist/es/components/runtime/utils/assemblys-config.js +13 -369
  8. package/dist/es/components/runtime/utils/barcode-util.js +9 -33
  9. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +122 -306
  10. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -68
  11. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +68 -152
  12. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +46 -124
  13. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +36 -99
  14. package/dist/es/components/runtime/utils/charts/chart-util.js +224 -522
  15. package/dist/es/components/runtime/utils/common-util.js +76 -156
  16. package/dist/es/components/runtime/utils/eventBus.js +3 -8
  17. package/dist/es/components/runtime/utils/events/event-util.js +362 -775
  18. package/dist/es/components/runtime/utils/events/print-label.js +72 -140
  19. package/dist/es/components/runtime/utils/events/standard-event.js +808 -2320
  20. package/dist/es/components/runtime/utils/events/validator-util.js +224 -560
  21. package/dist/es/components/runtime/utils/form/date-shortcuts.js +28 -88
  22. package/dist/es/components/runtime/utils/form/scan-util.js +61 -162
  23. package/dist/es/components/runtime/utils/global-refs.js +53 -84
  24. package/dist/es/components/runtime/utils/i18n-util.js +11 -20
  25. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +6 -0
  26. package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
  27. package/dist/es/components/runtime/utils/page-helper-util.js +280 -660
  28. package/dist/es/components/runtime/utils/page-init-util.js +141 -406
  29. package/dist/es/components/runtime/utils/page-permission-util.js +22 -531
  30. package/dist/es/components/runtime/utils/page-store.js +23 -68
  31. package/dist/es/components/runtime/utils/store-util.js +9 -13
  32. package/dist/es/components/runtime/utils/store.js +2 -2
  33. package/dist/es/components/runtime/utils/table-utils.d.ts +4 -0
  34. package/dist/es/components/runtime/utils/table-utils.js +40 -81
  35. package/dist/es/components/runtime/utils/tree-utils.js +17 -37
  36. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
  37. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +21 -83
  38. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
  39. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
  40. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
  41. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +36 -132
  42. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
  43. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
  44. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
  45. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
  46. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
  47. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +50 -198
  48. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
  49. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
  50. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
  51. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
  52. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +52 -203
  53. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
  54. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +4 -4
  55. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +46 -162
  56. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
  57. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -109
  58. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
  59. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -166
  60. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
  61. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -117
  62. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
  63. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -118
  64. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +246 -597
  65. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
  66. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
  67. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
  68. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
  69. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +29 -160
  70. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
  71. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
  72. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
  73. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
  74. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +212 -594
  75. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
  76. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
  77. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +21 -125
  78. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
  79. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
  80. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
  81. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
  82. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
  83. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
  84. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
  85. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
  86. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
  87. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
  88. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
  89. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
  90. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
  91. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
  92. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
  93. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
  94. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
  95. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
  96. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
  97. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
  98. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
  99. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +317 -810
  100. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
  101. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +262 -635
  102. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
  103. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
  104. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +40 -115
  105. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
  106. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -215
  107. package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
  108. package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
  109. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
  110. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +42 -154
  111. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +34 -98
  112. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
  113. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
  114. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +52 -200
  115. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
  116. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +68 -239
  117. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
  118. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +31 -109
  119. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
  120. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +21 -59
  121. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
  122. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +56 -188
  123. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
  124. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
  125. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
  126. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -245
  127. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
  128. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +32 -174
  129. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
  130. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
  131. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
  132. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
  133. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
  134. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +64 -194
  135. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
  136. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +88 -249
  137. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
  138. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +80 -263
  139. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
  140. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
  141. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
  142. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
  143. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
  144. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +40 -129
  145. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
  146. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
  147. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +89 -188
  148. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +2 -2
  149. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +133 -272
  150. package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
  151. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
  152. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +18 -46
  153. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
  154. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +21 -49
  155. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
  156. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +20 -58
  157. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
  158. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
  159. package/dist/es/components/runtime/views/home-chart.vue.js +41 -160
  160. package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
  161. package/dist/es/components/runtime/views/super-page-dialog.vue.js +20 -139
  162. package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
  163. package/dist/es/components/runtime/views/super-page.vue.js +226 -754
  164. package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
  165. package/dist/es/i18n/langs/cn.js +2 -55
  166. package/dist/es/i18n/langs/en.js +2 -55
  167. package/package.json +2 -2
@@ -1,130 +1,41 @@
1
- import { defineComponent, ref, onMounted, nextTick, createBlock, openBlock, unref, normalizeClass, normalizeStyle, withCtx, createElementBlock, Fragment, renderList, createElementVNode, createCommentVNode, toDisplayString } from "vue";
2
- import { ElTabs, ElTabPane } from "element-plus";
3
- import _sfc_main$1 from "../../object-render.vue.js";
4
- import { SuperIcon } from "agilebuilder-ui";
5
- import { handleAfterInitEvent, handleEvent } from "../../../../utils/events/event-util.js";
6
- import { $t } from "../../../../utils/i18n-util.js";
7
- const _sfc_main = /* @__PURE__ */ defineComponent({
8
- __name: "tabs-runtime",
9
- props: {
10
- pageContext: {},
11
- configure: {}
12
- },
13
- setup(__props) {
14
- const props = __props;
15
- const activeName = ref(null);
16
- activeName.value = props.configure.props.defaultOpen ? props.configure.props.defaultOpen : 1;
17
- const thisRef = ref(null);
18
- const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
19
- const runtimeStyle = runtimeInfo.style;
20
- const runtimeClass = runtimeInfo.class;
21
- const headerStyle = runtimeInfo.headerStyle;
22
- function tabClick(pane, ev) {
23
- const params = {
24
- pane,
25
- ev
26
- };
27
- const activeTab = pane.paneName;
28
- props.pageContext.activeTab = activeTab;
29
- props.pageContext.activeLabel = params.label;
30
- return handleEvent(activeTab, props.pageContext, props.configure, "tab-click", params);
31
- }
32
- function tabChange(paneName) {
33
- const params = {
34
- paneName
35
- };
36
- props.pageContext.activeTab = paneName;
37
- return handleEvent(paneName, props.pageContext, props.configure, "tab-change", params);
38
- }
39
- function tabRemove(paneName) {
40
- const params = {
41
- paneName
42
- };
43
- return handleEvent(paneName, props.pageContext, props.configure, "tab-remove", params);
44
- }
45
- function tabAdd() {
46
- return handleEvent(null, props.pageContext, props.configure, "tab-add");
47
- }
48
- function tabEdit(paneName, action) {
49
- const params = {
50
- paneName,
51
- action
52
- };
53
- return handleEvent(paneName, props.pageContext, props.configure, "edit", params);
54
- }
55
- onMounted(() => {
56
- nextTick(() => {
57
- let tabsDom = [];
58
- props.configure.items.forEach((item) => {
59
- if (item.code) {
60
- tabsDom.push(document.querySelector("." + item.code));
61
- }
62
- });
63
- handleAfterInitEvent(null, props.pageContext, props.configure, {
64
- componentRef: thisRef.value,
65
- tabsDom,
66
- entity: props.pageContext.entity.data,
67
- pageData: props.pageContext.entity.page
68
- });
69
- });
70
- });
71
- return (_ctx, _cache) => {
72
- return openBlock(), createBlock(unref(ElTabs), {
73
- ref_key: "thisRef",
74
- ref: thisRef,
75
- modelValue: activeName.value,
76
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeName.value = $event),
77
- type: _ctx.configure.props.cardType,
78
- "tab-position": _ctx.configure.props.tabPosition,
79
- style: normalizeStyle(unref(runtimeStyle)),
80
- class: normalizeClass(unref(runtimeClass)),
81
- onTabClick: tabClick,
82
- onTabChange: tabChange,
83
- onTabRemove: tabRemove,
84
- onTabAdd: tabAdd,
85
- onEdit: tabEdit
86
- }, {
87
- default: withCtx(() => [
88
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.configure.items, (item, index) => {
89
- return openBlock(), createBlock(unref(ElTabPane), {
90
- label: item.label,
91
- name: item.index
92
- }, {
93
- label: withCtx(() => [
94
- createElementVNode("span", {
95
- class: normalizeClass(item.code)
96
- }, [
97
- item.iconType && item.iconValue ? (openBlock(), createBlock(unref(SuperIcon), {
98
- key: 0,
99
- iconType: item.iconType,
100
- iconValue: item.iconValue,
101
- style: { "margin-right": "2px" }
102
- }, null, 8, ["iconType", "iconValue"])) : createCommentVNode("", true),
103
- createElementVNode("span", {
104
- style: normalizeStyle(unref(headerStyle))
105
- }, toDisplayString(unref($t)(item.label)), 5)
106
- ], 2)
107
- ]),
108
- default: withCtx(() => [
109
- createElementVNode("div", null, [
110
- (openBlock(true), createElementBlock(Fragment, null, renderList(item.items, (element, itemIndex) => {
111
- return openBlock(), createBlock(_sfc_main$1, {
112
- key: element.uuid,
113
- pageContext: _ctx.pageContext,
114
- configure: element
115
- }, null, 8, ["pageContext", "configure"]);
116
- }), 128))
117
- ])
118
- ]),
119
- _: 2
120
- }, 1032, ["label", "name"]);
121
- }), 256))
122
- ]),
123
- _: 1
124
- }, 8, ["modelValue", "type", "tab-position", "style", "class"]);
125
- };
1
+ import { defineComponent as e, ref as t, onMounted as n, nextTick as o, createBlock as a, openBlock as i, unref as l, normalizeClass as u, normalizeStyle as r, withCtx as c, createElementBlock as p, Fragment as s, renderList as g, createElementVNode as f, createCommentVNode as m, toDisplayString as d } from "vue";
2
+ import { ElTabs as b, ElTabPane as y } from "element-plus";
3
+ import x from "../../object-render.vue.js";
4
+ import { SuperIcon as C } from "agilebuilder-ui";
5
+ import { handleAfterInitEvent as v, handleEvent as T } from "../../../../utils/events/event-util.js";
6
+ import { $t as h } from "../../../../utils/i18n-util.js";
7
+ const V = e({ __name: "tabs-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
8
+ const V2 = e2, k = t(null);
9
+ k.value = V2.configure.props.defaultOpen ? V2.configure.props.defaultOpen : 1;
10
+ const _ = t(null), j = V2.configure.runtime ? V2.configure.runtime : {}, N = j.style, R = j.class, D = j.headerStyle;
11
+ function E(e3, t2) {
12
+ const n2 = { pane: e3, ev: t2 }, o2 = e3.paneName;
13
+ return V2.pageContext.activeTab = o2, V2.pageContext.activeLabel = n2.label, T(o2, V2.pageContext, V2.configure, "tab-click", n2);
14
+ }
15
+ function O(e3) {
16
+ const t2 = { paneName: e3 };
17
+ return V2.pageContext.activeTab = e3, T(e3, V2.pageContext, V2.configure, "tab-change", t2);
18
+ }
19
+ function S(e3) {
20
+ const t2 = { paneName: e3 };
21
+ return T(e3, V2.pageContext, V2.configure, "tab-remove", t2);
126
22
  }
127
- });
23
+ function q() {
24
+ return T(null, V2.pageContext, V2.configure, "tab-add");
25
+ }
26
+ function A(e3, t2) {
27
+ const n2 = { paneName: e3, action: t2 };
28
+ return T(e3, V2.pageContext, V2.configure, "edit", n2);
29
+ }
30
+ return n(() => {
31
+ o(() => {
32
+ let e3 = [];
33
+ V2.configure.items.forEach((t2) => {
34
+ t2.code && e3.push(document.querySelector("." + t2.code));
35
+ }), v(null, V2.pageContext, V2.configure, { componentRef: _.value, tabsDom: e3, entity: V2.pageContext.entity.data, pageData: V2.pageContext.entity.page });
36
+ });
37
+ }), (e3, t2) => (i(), a(l(b), { ref_key: "thisRef", ref: _, modelValue: k.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => k.value = e4), type: e3.configure.props.cardType, "tab-position": e3.configure.props.tabPosition, style: r(l(N)), class: u(l(R)), onTabClick: E, onTabChange: O, onTabRemove: S, onTabAdd: q, onEdit: A }, { default: c(() => [(i(true), p(s, null, g(e3.configure.items, (t3, n2) => (i(), a(l(y), { label: t3.label, name: t3.index }, { label: c(() => [f("span", { class: u(t3.code) }, [t3.iconType && t3.iconValue ? (i(), a(l(C), { key: 0, iconType: t3.iconType, iconValue: t3.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : m("", true), f("span", { style: r(l(D)) }, d(l(h)(t3.label)), 5)], 2)]), default: c(() => [f("div", null, [(i(true), p(s, null, g(t3.items, (t4, n3) => (i(), a(x, { key: t4.uuid, pageContext: e3.pageContext, configure: t4 }, null, 8, ["pageContext", "configure"]))), 128))])]), _: 2 }, 1032, ["label", "name"]))), 256))]), _: 1 }, 8, ["modelValue", "type", "tab-position", "style", "class"]));
38
+ } });
128
39
  export {
129
- _sfc_main as default
40
+ V as default
130
41
  };
@@ -1,4 +1,4 @@
1
- import _sfc_main from "./tools-runtime.vue2.js";
1
+ import o from "./tools-runtime.vue2.js";
2
2
  export {
3
- _sfc_main as default
3
+ o as default
4
4
  };
@@ -1,82 +1,34 @@
1
- import { defineComponent, ref, onMounted, nextTick, onUnmounted, createElementBlock, openBlock, createElementVNode, normalizeStyle, normalizeClass, unref, Fragment, renderList, createBlock } from "vue";
2
- import _sfc_main$1 from "../../object-render.vue.js";
1
+ import { defineComponent as e, ref as t, onMounted as o, nextTick as n, onUnmounted as i, createElementBlock as a, openBlock as r, createElementVNode as s, normalizeStyle as u, normalizeClass as l, unref as p, Fragment as g, renderList as c, createBlock as f } from "vue";
2
+ import d from "../../object-render.vue.js";
3
3
  import "../../../../utils/global-refs.js";
4
- import { handleAfterInitEvent } from "../../../../utils/events/event-util.js";
5
- const _hoisted_1 = { class: "amb-widget-tools-parent" };
6
- const _sfc_main = /* @__PURE__ */ defineComponent({
7
- __name: "tools-runtime",
8
- props: {
9
- pageContext: {},
10
- configure: {}
11
- },
12
- setup(__props) {
13
- const props = __props;
14
- const thisRef = ref(null);
15
- const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
16
- const runtimeStyle = ref(runtimeInfo.style ? runtimeInfo.style : {});
17
- const runtimeClass = runtimeInfo.class;
18
- onMounted(() => {
19
- if (thisRef.value && thisRef.value.parentNode) {
20
- const resizeObserver2 = new ResizeObserver((entries) => {
21
- caculatePositionStyle();
22
- });
23
- resizeObserver2.observe(thisRef.value.parentNode);
24
- }
25
- nextTick(() => {
26
- handleAfterInitEvent(null, props.pageContext, props.configure, {
27
- componentRef: thisRef.value,
28
- entity: props.pageContext.entity.data,
29
- pageData: props.pageContext.entity.page
30
- });
31
- });
32
- });
33
- onUnmounted(() => {
34
- });
35
- function caculatePositionStyle() {
36
- if (thisRef.value && thisRef.value.parentNode) {
37
- const thisProps = props.configure.props;
38
- const position = thisProps.position;
39
- if (position == "top1" || position == "bottom1") {
40
- const tempStyle = {};
41
- tempStyle["position"] = "fixed !important";
42
- tempStyle["z-index"] = "1";
43
- const contentObj = [thisRef.value.parentNode];
44
- if (contentObj && contentObj.length > 0) {
45
- const contentRec = contentObj[0].getBoundingClientRect();
46
- if (position == "top") {
47
- tempStyle["top"] = contentRec.top + "px";
48
- }
49
- if (position == "bottom") {
50
- tempStyle["bottom"] = "10px";
4
+ import { handleAfterInitEvent as m } from "../../../../utils/events/event-util.js";
5
+ const v = { class: "amb-widget-tools-parent" }, x = e({ __name: "tools-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
6
+ const x2 = e2, b = t(null), C = x2.configure.runtime ? x2.configure.runtime : {}, y = t(C.style ? C.style : {}), w = C.class;
7
+ return o(() => {
8
+ if (b.value && b.value.parentNode) {
9
+ new ResizeObserver((e3) => {
10
+ !function() {
11
+ if (b.value && b.value.parentNode) {
12
+ const e4 = x2.configure.props.position;
13
+ if ("top1" == e4 || "bottom1" == e4) {
14
+ const t2 = { position: "fixed !important", "z-index": "1" }, o2 = [b.value.parentNode];
15
+ if (o2 && o2.length > 0) {
16
+ const n3 = o2[0].getBoundingClientRect();
17
+ "top" == e4 && (t2.top = n3.top + "px"), "bottom" == e4 && (t2.bottom = "10px");
18
+ }
19
+ const n2 = b.value.parentNode.getBoundingClientRect();
20
+ t2.width = n2.width - 25 + "px", Object.assign(y.value, t2);
51
21
  }
52
22
  }
53
- const parentRec = thisRef.value.parentNode.getBoundingClientRect();
54
- console.log("parentRec", parentRec);
55
- tempStyle["width"] = parentRec.width - 25 + "px";
56
- Object.assign(runtimeStyle.value, tempStyle);
57
- }
58
- }
23
+ }();
24
+ }).observe(b.value.parentNode);
59
25
  }
60
- return (_ctx, _cache) => {
61
- return openBlock(), createElementBlock("div", _hoisted_1, [
62
- createElementVNode("div", {
63
- class: normalizeClass(["amb-widget-container-tool amb-widget-tools", unref(runtimeClass)]),
64
- style: normalizeStyle(runtimeStyle.value),
65
- ref_key: "thisRef",
66
- ref: thisRef
67
- }, [
68
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.configure.items, (element, itemIndex) => {
69
- return openBlock(), createBlock(_sfc_main$1, {
70
- key: element.uuid,
71
- pageContext: _ctx.pageContext,
72
- configure: element
73
- }, null, 8, ["pageContext", "configure"]);
74
- }), 128))
75
- ], 6)
76
- ]);
77
- };
78
- }
79
- });
26
+ n(() => {
27
+ m(null, x2.pageContext, x2.configure, { componentRef: b.value, entity: x2.pageContext.entity.data, pageData: x2.pageContext.entity.page });
28
+ });
29
+ }), i(() => {
30
+ }), (e3, t2) => (r(), a("div", v, [s("div", { class: l(["amb-widget-container-tool amb-widget-tools", p(w)]), style: u(y.value), ref_key: "thisRef", ref: b }, [(r(true), a(g, null, c(e3.configure.items, (t3, o2) => (r(), f(d, { key: t3.uuid, pageContext: e3.pageContext, configure: t3 }, null, 8, ["pageContext", "configure"]))), 128))], 6)]));
31
+ } });
80
32
  export {
81
- _sfc_main as default
33
+ x as default
82
34
  };
@@ -1,4 +1,4 @@
1
- import _sfc_main from "./barcode-runtime.vue2.js";
1
+ import e from "./barcode-runtime.vue2.js";
2
2
  export {
3
- _sfc_main as default
3
+ e as default
4
4
  };
@@ -1,184 +1,67 @@
1
- import { defineComponent, computed, ref, onMounted, watch, resolveComponent, createBlock, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createElementBlock, createCommentVNode, toDisplayString } from "vue";
2
- import qrcode from "qrcode";
3
- import JsBarcode from "jsbarcode";
4
- import { getFormModelFields } from "../../../../utils/page-init-util.js";
5
- import { generateCodeByRule } from "../../../../utils/barcode-util.js";
6
- import { setVariableValue, getVariableValue } from "../../../../utils/page-helper-util.js";
7
- import { handleEvent } from "../../../../utils/events/event-util.js";
8
- import http from "agilebuilder-ui/src/utils/request";
9
- import { $t } from "../../../../utils/i18n-util.js";
10
- const _hoisted_1 = ["src"];
11
- const _sfc_main = /* @__PURE__ */ defineComponent({
12
- __name: "barcode-runtime",
13
- props: {
14
- pageContext: {},
15
- configure: {}
16
- },
17
- setup(__props, { expose: __expose }) {
18
- const props = __props;
19
- const entity = props.pageContext.entity ? props.pageContext.entity : {};
20
- let dynamicFields = getFormModelFields(props.pageContext, props.configure);
21
- const dynamicModelMethod = computed({
22
- get() {
23
- return getVariableValue(entity, dynamicFields);
24
- },
25
- set(value) {
26
- setVariableValue(entity, dynamicFields, value);
27
- }
28
- });
29
- const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
30
- const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
31
- const runtimeStyle = runtimeInfo.style;
32
- const runtimeClass = runtimeInfo.class;
33
- const headerStyle = runtimeInfo.headerStyle;
34
- const qrUrl = ref("");
35
- const barcode = ref(null);
36
- const barcodeFormat = ref(designProperty.value.brCodeFormat ?? "CODE128");
37
- const watchVariableNames = ref([]);
38
- onMounted(() => {
39
- if (designProperty.value.generateRule) {
40
- if (designProperty.value.generateRuleType === "fixed") {
41
- handleFixedFormat();
42
- } else {
43
- handleSelectedRule();
44
- }
45
- }
46
- if (dynamicModelMethod.value) {
47
- createCode(dynamicModelMethod.value);
48
- }
49
- });
50
- function getValue() {
51
- return getVariableValue(entity, dynamicFields);
52
- }
53
- function setValue(value) {
54
- return setVariableValue(entity, dynamicFields, value);
55
- }
56
- function handleFixedFormat() {
57
- watchVariableNames.value = Array.from(
58
- designProperty.value.generateRule.matchAll(/\$\{(\w+)\}/g),
59
- (m) => m[1]
60
- );
61
- watchVariableNames.value.forEach((name) => {
62
- watch(
63
- () => props.pageContext.entity.data[name],
64
- (newValue, oldValue) => {
65
- if (newValue !== void 0 && newValue !== null) {
66
- generateFixedFormatCode();
67
- }
68
- }
69
- );
70
- });
71
- }
72
- function handleSelectedRule() {
73
- http.get(
74
- window["$vueApp"].config.globalProperties.baseAPI + "/dc/setting-barcode-models/by-code/" + designProperty.value.generateRule
75
- ).then((res) => {
76
- const rule = JSON.parse(res.barcodeModelItems);
77
- rule.forEach((item) => {
78
- if (item.propDbName !== "-1" && item.propDbName !== -1) {
79
- watchVariableNames.value.push(item.propDbName);
80
- watch(
81
- () => props.pageContext.entity.data[item.propDbName],
82
- (newValue, oldValue) => {
83
- if (newValue !== void 0 && newValue !== null) {
84
- const codeValue = generateCodeByRule(rule, props.pageContext.entity.data);
85
- if (codeValue) {
86
- generateCode(codeValue);
87
- }
88
- }
89
- }
90
- );
91
- }
92
- });
93
- }).catch((error) => {
94
- console.error("获取条码规则失败:", error);
95
- });
96
- }
97
- function generateFixedFormatCode() {
98
- let allVariablesPresent = true;
99
- watchVariableNames.value.forEach((name) => {
100
- if (!props.pageContext.entity.data[name]) {
101
- allVariablesPresent = false;
102
- return;
103
- }
104
- });
105
- if (allVariablesPresent) {
106
- let barCodeValue = replaceVariables(
107
- designProperty.value.generateRule,
108
- props.pageContext.entity.data
109
- );
110
- generateCode(barCodeValue);
111
- }
112
- }
113
- function generateCode(value) {
114
- createCode(value);
115
- setValue(value);
116
- handleEvent(value, props.pageContext, props.configure, "change", {
117
- entity
118
- });
119
- }
120
- function createCode(value) {
121
- if (designProperty.value.type === "QR-code") {
122
- createQrCode(value);
123
- } else {
124
- createBarCode(value);
125
- }
126
- }
127
- function createBarCode(codeValue) {
1
+ import { defineComponent as e, computed as t, ref as a, onMounted as r, watch as l, resolveComponent as o, createBlock as u, openBlock as n, normalizeStyle as i, normalizeClass as s, unref as p, withCtx as c, createElementBlock as m, createCommentVNode as f, toDisplayString as g } from "vue";
2
+ import d from "qrcode";
3
+ import v from "jsbarcode";
4
+ import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
5
+ import { generateCodeByRule as b } from "../../../../utils/barcode-util.js";
6
+ import { setVariableValue as h, getVariableValue as x } from "../../../../utils/page-helper-util.js";
7
+ import { handleEvent as C } from "../../../../utils/events/event-util.js";
8
+ import w from "agilebuilder-ui/src/utils/request";
9
+ import { $t as R } from "../../../../utils/i18n-util.js";
10
+ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: D2 }) {
11
+ const q = e2, N = q.pageContext.entity ? q.pageContext.entity : {};
12
+ let k = y(q.pageContext, q.configure);
13
+ const A = t({ get: () => x(N, k), set(e3) {
14
+ h(N, k, e3);
15
+ } }), E = q.configure.runtime ? q.configure.runtime : {}, _ = a(E.props ? E.props : {}), O = E.style, P = E.class, S = E.headerStyle, $ = a(""), I = a(null), Q = a(_.value.brCodeFormat ?? "CODE128"), V = a([]);
16
+ function F(e3) {
17
+ return h(N, k, e3);
18
+ }
19
+ function J(e3) {
20
+ L(e3), F(e3), C(e3, q.pageContext, q.configure, "change", { entity: N });
21
+ }
22
+ function L(e3) {
23
+ var t2;
24
+ "QR-code" === _.value.type ? (t2 = e3, d.toDataURL(t2, (e4, t3) => {
25
+ e4 || ($.value = t3);
26
+ })) : function(e4) {
128
27
  try {
129
- JsBarcode(barcode.value, codeValue, { format: barcodeFormat.value });
130
- } catch (error) {
131
- console.error("生成条形码时发生错误:", error);
28
+ v(I.value, e4, { format: Q.value });
29
+ } catch (e5) {
132
30
  }
133
- }
134
- function createQrCode(codeValue) {
135
- qrcode.toDataURL(codeValue, (err, url) => {
136
- if (err) {
137
- console.error(err);
138
- } else {
139
- qrUrl.value = url;
140
- }
31
+ }(e3);
32
+ }
33
+ return r(() => {
34
+ _.value.generateRule && ("fixed" === _.value.generateRuleType ? (V.value = Array.from(_.value.generateRule.matchAll(/\$\{(\w+)\}/g), (e3) => e3[1]), V.value.forEach((e3) => {
35
+ l(() => q.pageContext.entity.data[e3], (e4, t2) => {
36
+ null != e4 && function() {
37
+ let e5 = true;
38
+ V.value.forEach((t3) => {
39
+ q.pageContext.entity.data[t3] || (e5 = false);
40
+ }), e5 && J(function(e6, t3) {
41
+ const a2 = /\$\{(\w+)\}/g;
42
+ return e6.replace(a2, (e7, a3) => t3.hasOwnProperty(a3) ? t3[a3] : e7);
43
+ }(_.value.generateRule, q.pageContext.entity.data));
44
+ }();
141
45
  });
142
- }
143
- function replaceVariables(template, variables) {
144
- const regex = /\$\{(\w+)\}/g;
145
- return template.replace(regex, (match, keyword) => {
146
- return variables.hasOwnProperty(keyword) ? variables[keyword] : match;
46
+ })) : w.get(window.$vueApp.config.globalProperties.baseAPI + "/dc/setting-barcode-models/by-code/" + _.value.generateRule).then((e3) => {
47
+ const t2 = JSON.parse(e3.barcodeModelItems);
48
+ t2.forEach((e4) => {
49
+ "-1" !== e4.propDbName && -1 !== e4.propDbName && (V.value.push(e4.propDbName), l(() => q.pageContext.entity.data[e4.propDbName], (e5, a2) => {
50
+ if (null != e5) {
51
+ const e6 = b(t2, q.pageContext.entity.data);
52
+ e6 && J(e6);
53
+ }
54
+ }));
147
55
  });
148
- }
149
- __expose({
150
- getValue,
151
- setValue
152
- });
153
- return (_ctx, _cache) => {
154
- const _component_el_form_item = resolveComponent("el-form-item");
155
- return openBlock(), createBlock(_component_el_form_item, {
156
- required: designProperty.value.required ? true : false,
157
- class: normalizeClass(unref(runtimeClass)),
158
- "label-width": designProperty.value.labelWidth,
159
- style: normalizeStyle(unref(runtimeStyle))
160
- }, {
161
- label: withCtx(() => [
162
- designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
163
- key: 0,
164
- style: normalizeStyle({ ...unref(headerStyle) })
165
- }, toDisplayString(unref($t)(designProperty.value.title)), 5)) : createCommentVNode("", true)
166
- ]),
167
- default: withCtx(() => [
168
- designProperty.value.type === "QR-code" ? (openBlock(), createElementBlock("img", {
169
- key: 0,
170
- src: qrUrl.value
171
- }, null, 8, _hoisted_1)) : (openBlock(), createElementBlock("canvas", {
172
- key: 1,
173
- ref_key: "barcode",
174
- ref: barcode
175
- }, null, 512))
176
- ]),
177
- _: 1
178
- }, 8, ["required", "class", "label-width", "style"]);
179
- };
180
- }
181
- });
56
+ }).catch((e3) => {
57
+ })), A.value && L(A.value);
58
+ }), D2({ getValue: function() {
59
+ return x(N, k);
60
+ }, setValue: F }), (e3, t2) => {
61
+ const a2 = o("el-form-item");
62
+ return n(), u(a2, { required: !!_.value.required, class: s(p(P)), "label-width": _.value.labelWidth, style: i(p(O)) }, { label: c(() => [_.value.tittleShow ? (n(), m("div", { key: 0, style: i({ ...p(S) }) }, g(p(R)(_.value.title)), 5)) : f("", true)]), default: c(() => ["QR-code" === _.value.type ? (n(), m("img", { key: 0, src: $.value }, null, 8, j)) : (n(), m("canvas", { key: 1, ref_key: "barcode", ref: I }, null, 512))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
63
+ };
64
+ } });
182
65
  export {
183
- _sfc_main as default
66
+ D as default
184
67
  };