super-page-runtime 2.1.933 → 2.2.0

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 (160) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +6 -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 +137 -433
  7. package/dist/es/components/runtime/utils/assemblys-config.js +12 -366
  8. package/dist/es/components/runtime/utils/barcode-util.js +10 -33
  9. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +138 -300
  10. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -66
  11. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +71 -147
  12. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +52 -122
  13. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +40 -98
  14. package/dist/es/components/runtime/utils/charts/chart-util.js +237 -478
  15. package/dist/es/components/runtime/utils/common-util.js +82 -152
  16. package/dist/es/components/runtime/utils/eventBus.js +3 -9
  17. package/dist/es/components/runtime/utils/events/event-util.js +361 -727
  18. package/dist/es/components/runtime/utils/events/print-label.js +73 -140
  19. package/dist/es/components/runtime/utils/events/standard-event.js +838 -2285
  20. package/dist/es/components/runtime/utils/events/validator-util.js +237 -536
  21. package/dist/es/components/runtime/utils/form/date-shortcuts.js +29 -88
  22. package/dist/es/components/runtime/utils/form/scan-util.js +60 -154
  23. package/dist/es/components/runtime/utils/global-refs.js +45 -69
  24. package/dist/es/components/runtime/utils/i18n-util.js +12 -20
  25. package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
  26. package/dist/es/components/runtime/utils/page-helper-util.js +298 -628
  27. package/dist/es/components/runtime/utils/page-init-util.js +134 -368
  28. package/dist/es/components/runtime/utils/page-permission-util.js +24 -531
  29. package/dist/es/components/runtime/utils/page-store.js +8 -12
  30. package/dist/es/components/runtime/utils/store-util.js +9 -13
  31. package/dist/es/components/runtime/utils/store.js +2 -2
  32. package/dist/es/components/runtime/utils/table-utils.js +49 -84
  33. package/dist/es/components/runtime/utils/tree-utils.js +18 -36
  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 +19 -75
  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 +14 -46
  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 +37 -132
  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 +4 -18
  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 +17 -107
  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 +54 -198
  46. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
  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 +7 -60
  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 +48 -169
  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/gauge/gauge-runtime.vue.js +2 -2
  53. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -107
  54. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
  55. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -164
  56. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
  57. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -115
  58. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
  59. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -116
  60. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +208 -439
  61. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
  62. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
  63. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
  64. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
  65. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +63 -226
  66. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
  67. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
  68. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
  69. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
  70. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +168 -512
  71. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
  72. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
  73. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +23 -125
  74. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
  75. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
  76. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
  77. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
  78. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
  79. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
  80. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
  81. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
  82. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
  83. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
  84. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
  85. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
  86. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
  87. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
  88. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
  89. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
  90. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
  91. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
  92. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
  93. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
  94. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
  95. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +311 -800
  96. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
  97. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +251 -592
  98. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
  99. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
  100. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +43 -115
  101. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
  102. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -215
  103. package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
  104. package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
  105. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
  106. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +44 -154
  107. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +36 -98
  108. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
  109. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
  110. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +54 -200
  111. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
  112. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +69 -239
  113. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
  114. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +28 -98
  115. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
  116. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +22 -59
  117. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
  118. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +52 -173
  119. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
  120. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
  121. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
  122. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +58 -249
  123. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
  124. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +34 -174
  125. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
  126. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
  127. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +5 -5
  128. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
  129. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +1 -0
  130. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
  131. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +66 -189
  132. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
  133. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +91 -243
  134. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
  135. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +82 -261
  136. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
  137. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
  138. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
  139. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
  140. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
  141. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +41 -129
  142. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
  143. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
  144. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +133 -252
  145. package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
  146. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
  147. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +19 -46
  148. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
  149. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +22 -49
  150. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
  151. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +21 -58
  152. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
  153. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
  154. package/dist/es/components/runtime/views/super-page-dialog.vue.js +18 -134
  155. package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
  156. package/dist/es/components/runtime/views/super-page.vue.js +233 -708
  157. package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
  158. package/dist/es/i18n/langs/cn.js +2 -55
  159. package/dist/es/i18n/langs/en.js +2 -55
  160. package/package.json +74 -73
@@ -1,130 +1,41 @@
1
- import { defineComponent, ref, onMounted, nextTick, openBlock, createBlock, unref, normalizeStyle, normalizeClass, 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, openBlock as a, createBlock as i, unref as l, normalizeStyle as u, normalizeClass 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) => (a(), i(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: u(l(N)), class: r(l(R)), onTabClick: E, onTabChange: O, onTabRemove: S, onTabAdd: q, onEdit: A }, { default: c(() => [(a(true), p(s, null, g(e3.configure.items, (t3, n2) => (a(), i(l(y), { label: t3.label, name: t3.index }, { label: c(() => [f("span", { class: r(t3.code) }, [t3.iconType && t3.iconValue ? (a(), i(l(C), { key: 0, iconType: t3.iconType, iconValue: t3.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : m("", true), f("span", { style: u(l(D)) }, d(l(h)(t3.label)), 5)], 2)]), default: c(() => [f("div", null, [(a(true), p(s, null, g(t3.items, (t4, n3) => (a(), i(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, openBlock, createElementBlock, createElementVNode, normalizeClass, unref, normalizeStyle, 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, openBlock as a, createElementBlock as r, createElementVNode as s, normalizeClass as u, unref as l, normalizeStyle 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) => (a(), r("div", v, [s("div", { class: u(["amb-widget-container-tool amb-widget-tools", l(w)]), style: p(y.value), ref_key: "thisRef", ref: b }, [(a(true), r(g, null, c(e3.configure.items, (t3, o2) => (a(), 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, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode } 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 { getVariableValue, setVariableValue } 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, openBlock as u, createBlock as n, normalizeClass as i, unref as s, normalizeStyle as p, withCtx as c, createElementBlock as m, toDisplayString as f, createCommentVNode 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 { getVariableValue as h, setVariableValue 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: () => h(N, k), set(e3) {
14
+ x(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 x(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 h(N, k);
60
+ }, setValue: F }), (e3, t2) => {
61
+ const a2 = o("el-form-item");
62
+ return u(), n(a2, { required: !!_.value.required, class: i(s(P)), "label-width": _.value.labelWidth, style: p(s(O)) }, { label: c(() => [_.value.tittleShow ? (u(), m("div", { key: 0, style: p({ ...s(S) }) }, f(s(R)(_.value.title)), 5)) : g("", true)]), default: c(() => ["QR-code" === _.value.type ? (u(), m("img", { key: 0, src: $.value }, null, 8, j)) : (u(), 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
  };