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,4 +1,4 @@
1
- import e from "./sub-table-runtime.vue.js";
1
+ import _sfc_main from "./sub-table-runtime.vue.js";
2
2
  export {
3
- e as default
3
+ _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import e from "./table-runtime.vue2.js";
1
+ import _sfc_main from "./table-runtime.vue2.js";
2
2
  export {
3
- e as default
3
+ _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as e, ref as t, createElementBlock as u, openBlock as n, createBlock as i, unref as l } from "vue";
1
+ import { defineComponent, ref, createElementBlock, openBlock, createBlock, unref } from "vue";
2
2
  import "agilebuilder-ui";
3
3
  import "agilebuilder-ui/src/utils/request";
4
4
  import "dayjs";
@@ -6,45 +6,120 @@ import "agilebuilder-ui/src/utils/calculator/calculator-util";
6
6
  import "../../../../utils/global-refs.js";
7
7
  import "agilebuilder-ui/src/utils/common-util";
8
8
  import "agilebuilder-ui/src/utils/util";
9
- import o from "./sub-table-runtime.vue.js";
10
- import r from "./main-table-runtime.vue.js";
11
- const a = e({ __name: "table-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: a2 }) {
12
- const c = e2, s = c.pageContext.pageType, f = t(null), g = c.configure.uuid, p = c.pageContext.superGridItems, d = p ? p[g] : null;
13
- f.value = d ? d.configure ? JSON.parse(d.configure) : null : c.configure;
14
- const m = c.configure.runtime ? c.configure.runtime : {};
15
- m.style, m.class;
16
- const v = t(null);
17
- function b(e3) {
18
- c.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES ? c.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES.push(e3) : c.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES = [e3];
9
+ import _sfc_main$1 from "./sub-table-runtime.vue.js";
10
+ import _sfc_main$2 from "./main-table-runtime.vue.js";
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ __name: "table-runtime",
13
+ props: {
14
+ pageContext: {},
15
+ configure: {}
16
+ },
17
+ setup(__props, { expose: __expose }) {
18
+ const props = __props;
19
+ const pageType = props.pageContext.pageType;
20
+ const tableConfigure = ref(null);
21
+ const tableUuid = props.configure.uuid;
22
+ const superGridItems = props.pageContext.superGridItems;
23
+ const superGridSetting = superGridItems ? superGridItems[tableUuid] : null;
24
+ tableConfigure.value = superGridSetting ? superGridSetting.configure ? JSON.parse(superGridSetting.configure) : null : props.configure;
25
+ const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
26
+ runtimeInfo.style;
27
+ runtimeInfo.class;
28
+ const gridRef = ref(null);
29
+ function validatorSunTableListData() {
30
+ if (pageType && pageType === "form") {
31
+ return gridRef.value.validatorSunTableListData();
32
+ }
33
+ }
34
+ function setSafeDeleteTableCode(code) {
35
+ if (props.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES) {
36
+ props.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES.push(code);
37
+ } else {
38
+ props.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES = [code];
39
+ }
40
+ }
41
+ function clearSelections() {
42
+ return gridRef.value.clearSelections();
43
+ }
44
+ function refresh(parentRowIds, isLineEdit, toolbarFieldParam, isDeleteSubTableData) {
45
+ if (pageType && pageType === "list") {
46
+ return gridRef.value.refresh(parentRowIds, isLineEdit, toolbarFieldParam, isDeleteSubTableData);
47
+ }
48
+ }
49
+ function createRow() {
50
+ return gridRef.value.createRow();
51
+ }
52
+ function getSelections() {
53
+ return gridRef.value.getSelections();
54
+ }
55
+ function getSelectionIds() {
56
+ return gridRef.value.getSelectionIds();
57
+ }
58
+ function getTableConfigure() {
59
+ return gridRef.value.getTableConfigure();
60
+ }
61
+ function isDeleteChange(value) {
62
+ if (pageType && pageType === "list") {
63
+ gridRef.value.isDeleteChange(value);
64
+ }
65
+ }
66
+ function showMobileSearch() {
67
+ gridRef.value.showMobileSearch();
68
+ }
69
+ function getTableSelectOptions() {
70
+ if (gridRef.value) {
71
+ return gridRef.value.getTableSelectOptions();
72
+ }
73
+ }
74
+ function dynamicControlTableEdit(pageContext, customRules, listCode) {
75
+ if (gridRef.value) {
76
+ gridRef.value.dynamicControlTableEdit(pageContext, customRules, listCode);
77
+ }
78
+ }
79
+ function getTableUuid() {
80
+ return props.configure.uuid;
81
+ }
82
+ function doLayout(hiddenColumns) {
83
+ if (gridRef.value) {
84
+ gridRef.value.doLayout(hiddenColumns);
85
+ }
86
+ }
87
+ __expose({
88
+ refresh,
89
+ createRow,
90
+ clearSelections,
91
+ getSelections,
92
+ getSelectionIds,
93
+ getTableConfigure,
94
+ isDeleteChange,
95
+ validatorSunTableListData,
96
+ showMobileSearch,
97
+ getTableSelectOptions,
98
+ dynamicControlTableEdit,
99
+ getTableUuid,
100
+ doLayout
101
+ });
102
+ return (_ctx, _cache) => {
103
+ return openBlock(), createElementBlock("div", null, [
104
+ unref(pageType) && unref(pageType) === "form" ? (openBlock(), createBlock(_sfc_main$1, {
105
+ key: 0,
106
+ ref_key: "gridRef",
107
+ ref: gridRef,
108
+ pageContext: _ctx.pageContext,
109
+ configure: tableConfigure.value,
110
+ onSetSafeDeleteTableCode: setSafeDeleteTableCode
111
+ }, null, 8, ["pageContext", "configure"])) : (openBlock(), createBlock(_sfc_main$2, {
112
+ key: 1,
113
+ ref_key: "gridRef",
114
+ ref: gridRef,
115
+ pageContext: _ctx.pageContext,
116
+ configure: tableConfigure.value,
117
+ onSetSafeDeleteTableCode: setSafeDeleteTableCode
118
+ }, null, 8, ["pageContext", "configure"]))
119
+ ]);
120
+ };
19
121
  }
20
- return a2({ refresh: function(e3, t2, u2, n2) {
21
- if (s && "list" === s) return v.value.refresh(e3, t2, u2, n2);
22
- }, createRow: function() {
23
- return v.value.createRow();
24
- }, clearSelections: function() {
25
- return v.value.clearSelections();
26
- }, getSelections: function() {
27
- return v.value.getSelections();
28
- }, getSelectionIds: function() {
29
- return v.value.getSelectionIds();
30
- }, getTableConfigure: function() {
31
- return v.value.getTableConfigure();
32
- }, isDeleteChange: function(e3) {
33
- s && "list" === s && v.value.isDeleteChange(e3);
34
- }, validatorSunTableListData: function() {
35
- if (s && "form" === s) return v.value.validatorSunTableListData();
36
- }, showMobileSearch: function() {
37
- v.value.showMobileSearch();
38
- }, getTableSelectOptions: function() {
39
- if (v.value) return v.value.getTableSelectOptions();
40
- }, dynamicControlTableEdit: function(e3, t2, u2) {
41
- v.value && v.value.dynamicControlTableEdit(e3, t2, u2);
42
- }, getTableUuid: function() {
43
- return c.configure.uuid;
44
- }, doLayout: function(e3) {
45
- v.value && v.value.doLayout(e3);
46
- } }), (e3, t2) => (n(), u("div", null, [l(s) && "form" === l(s) ? (n(), i(o, { key: 0, ref_key: "gridRef", ref: v, pageContext: e3.pageContext, configure: f.value, onSetSafeDeleteTableCode: b }, null, 8, ["pageContext", "configure"])) : (n(), i(r, { key: 1, ref_key: "gridRef", ref: v, pageContext: e3.pageContext, configure: f.value, onSetSafeDeleteTableCode: b }, null, 8, ["pageContext", "configure"]))]));
47
- } });
122
+ });
48
123
  export {
49
- a as default
124
+ _sfc_main as default
50
125
  };
@@ -1,4 +1,4 @@
1
- import e from "./tree-runtime.vue2.js";
1
+ import _sfc_main from "./tree-runtime.vue2.js";
2
2
  export {
3
- e as default
3
+ _sfc_main as default
4
4
  };
@@ -1,62 +1,221 @@
1
- import { defineComponent as e, computed as a, ref as n, onMounted as l, nextTick as t, watch as o, resolveComponent as u, createElementBlock as i, openBlock as d, normalizeClass as c, unref as r, createBlock as p, createCommentVNode as s, normalizeStyle as v, withCtx as f, createElementVNode as g, createVNode as y, toDisplayString as h } from "vue";
2
- import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
3
- import { setVariableValue as m, getVariableValue as C } from "../../../../utils/page-helper-util.js";
4
- import { getMenuTreeData as k } from "../../../../utils/tree-utils.js";
5
- import { handleAfterInitEvent as V, handleFormEvent as T } from "../../../../utils/events/event-util.js";
6
- const b = ["title"], N = e({ __name: "tree-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: N2 }) {
7
- var _a, _b;
8
- const I = e2, S = I.pageContext.entity ? I.pageContext.entity : {};
9
- let _ = x(I.pageContext, I.configure);
10
- const j = a({ get: () => C(S, _), set(e3) {
11
- m(S, _, e3);
12
- } }), w = n(!!((_b = (_a = I.configure.props) == null ? void 0 : _a.base) == null ? void 0 : _b.lazy)), z = I.configure.runtime ? I.configure.runtime : {}, M = z.style, W = z.class;
13
- z.headerStyle;
14
- const A = n(null), D = n(z.props ? z.props : {}), E = n({ id: "nodeId", label: "name", children: "children", isLeaf: "leaf", disabled: "disabled", nodeType: "nodeType", iconType: "iconType", iconValue: "iconValue" }), F = n(false), K = n(null), L = n(null), O = n(""), R = n(false);
15
- l(() => {
16
- t(() => {
17
- const e3 = j.value;
18
- V(e3, I.pageContext, I.configure, { componentRef: A.value, value: e3, entity: I.pageContext.entity.data, pageData: I.pageContext.entity.page });
1
+ import { defineComponent, computed, ref, onMounted, nextTick, watch, resolveComponent, createElementBlock, openBlock, normalizeClass, unref, createBlock, createCommentVNode, normalizeStyle, withCtx, createElementVNode, createVNode, toDisplayString } from "vue";
2
+ import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
+ import { setVariableValue, getVariableValue } from "../../../../utils/page-helper-util.js";
4
+ import { getMenuTreeData } from "../../../../utils/tree-utils.js";
5
+ import { handleAfterInitEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
6
+ const _hoisted_1 = ["title"];
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ __name: "tree-runtime",
9
+ props: {
10
+ pageContext: {},
11
+ configure: {}
12
+ },
13
+ setup(__props, { expose: __expose }) {
14
+ var _a, _b;
15
+ const props = __props;
16
+ const entity = props.pageContext.entity ? props.pageContext.entity : {};
17
+ let dynamicFields = getFormModelFields(props.pageContext, props.configure);
18
+ const dynamicModelMethod = computed({
19
+ get() {
20
+ return getVariableValue(entity, dynamicFields);
21
+ },
22
+ set(value) {
23
+ setVariableValue(entity, dynamicFields, value);
24
+ }
19
25
  });
20
- }), w.value ? F.value = true : k(I.pageContext, I.configure).then((e3) => {
21
- K.value = e3, F.value = true;
22
- }), o(O, (e3) => {
23
- R.value = true, A.value.filter(e3);
24
- });
25
- const U = (e3, a2) => !e3 || a2.name.includes(e3);
26
- function q(e3, a2, n2) {
27
- L.value = a2, T(null, I.pageContext, I.configure, "node-click", { data: e3, node: a2, nodeTree: n2 });
28
- }
29
- function B(e3, a2) {
30
- let n2 = "0";
31
- n2 = 0 === e3.level ? "0" : e3.data.nodeId, function(e4, a3, n3) {
32
- const l2 = { parentNodeId: e4, data: a3.data, searchValue: O, isSearch: R.value };
33
- k(I.pageContext, I.configure, e4, a3, l2).then((l3) => {
34
- if (R.value = false, n3(l3), "0" === e4) {
35
- !function(e5, a4) {
36
- const n4 = { parentNodeId: e5, data: a4.data, searchValue: O, isSearch: R.value };
37
- k(I.pageContext, I.configure, e5, a4, n4).then((a5) => {
38
- R.value = false, A.value.updateKeyChildren(e5, a5), A.value.store.nodesMap[e5] && (A.value.store.nodesMap[e5].expanded = true);
39
- });
40
- }(l3[0].nodeId, a3);
26
+ const isLazy = ref(((_b = (_a = props.configure.props) == null ? void 0 : _a.base) == null ? void 0 : _b.lazy) ? true : false);
27
+ const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
28
+ const runtimeStyle = runtimeInfo.style;
29
+ const runtimeClass = runtimeInfo.class;
30
+ runtimeInfo.headerStyle;
31
+ const menuTree = ref(null);
32
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
33
+ const defaultProps = ref(
34
+ {
35
+ id: "nodeId",
36
+ label: "name",
37
+ children: "children",
38
+ isLeaf: "leaf",
39
+ disabled: "disabled",
40
+ nodeType: "nodeType",
41
+ iconType: "iconType",
42
+ iconValue: "iconValue"
43
+ }
44
+ );
45
+ const isShowTree = ref(false);
46
+ const menuData = ref(null);
47
+ const selectNode = ref(null);
48
+ const filterText = ref("");
49
+ const isSearch = ref(false);
50
+ onMounted(() => {
51
+ nextTick(() => {
52
+ const value = dynamicModelMethod.value;
53
+ handleAfterInitEvent(value, props.pageContext, props.configure, {
54
+ componentRef: menuTree.value,
55
+ value,
56
+ entity: props.pageContext.entity.data,
57
+ pageData: props.pageContext.entity.page
58
+ });
59
+ });
60
+ });
61
+ if (!isLazy.value) {
62
+ getMenuTreeData(props.pageContext, props.configure).then((treeNodes) => {
63
+ menuData.value = treeNodes;
64
+ isShowTree.value = true;
65
+ });
66
+ } else {
67
+ isShowTree.value = true;
68
+ }
69
+ watch(filterText, (val) => {
70
+ isSearch.value = true;
71
+ menuTree.value.filter(val);
72
+ });
73
+ const filterNode = (value, data) => {
74
+ if (!value) return true;
75
+ return data.name.includes(value);
76
+ };
77
+ function handleNodeClick(data, node, nodeTree) {
78
+ selectNode.value = node;
79
+ handleFormEvent(null, props.pageContext, props.configure, "node-click", {
80
+ data,
81
+ node,
82
+ nodeTree
83
+ });
84
+ }
85
+ function loadNode(node, resolve) {
86
+ const parentId = 0;
87
+ let parentNodeId = "0";
88
+ if (node.level === 0) {
89
+ parentNodeId = parentId + "";
90
+ } else {
91
+ parentNodeId = node.data.nodeId;
92
+ }
93
+ initLoadNode(parentNodeId, node, resolve);
94
+ }
95
+ function initLoadNode(parentNodeId, node, resolve) {
96
+ const param = {
97
+ parentNodeId,
98
+ data: node.data,
99
+ // 节点详细信息,json字符串
100
+ searchValue: filterText,
101
+ // 查询条件
102
+ isSearch: isSearch.value
103
+ // 是否是查询
104
+ };
105
+ getMenuTreeData(props.pageContext, props.configure, parentNodeId, node, param).then(
106
+ (treeNodes) => {
107
+ isSearch.value = false;
108
+ resolve(treeNodes);
109
+ if (parentNodeId === "0") {
110
+ const rootNodeId = treeNodes[0].nodeId;
111
+ loadRootNode(rootNodeId, node);
112
+ }
113
+ }
114
+ );
115
+ }
116
+ function loadRootNode(rootNodeId, node) {
117
+ const param = {
118
+ parentNodeId: rootNodeId,
119
+ data: node.data,
120
+ // 节点详细信息,json字符串
121
+ searchValue: filterText,
122
+ // 查询条件
123
+ isSearch: isSearch.value
124
+ // 是否是查询
125
+ };
126
+ getMenuTreeData(props.pageContext, props.configure, rootNodeId, node, param).then((children) => {
127
+ isSearch.value = false;
128
+ menuTree.value.updateKeyChildren(rootNodeId, children);
129
+ if (menuTree.value.store.nodesMap[rootNodeId]) {
130
+ menuTree.value.store.nodesMap[rootNodeId].expanded = true;
41
131
  }
42
132
  });
43
- }(n2, e3, a2);
44
- }
45
- return N2({ getSelectNode: function() {
46
- return L.value;
47
- }, expandNode: function(e3) {
48
- e3.loaded = false, e3.expand();
49
- }, loadTreeNodes: function() {
50
- k(I.pageContext, I.configure).then((e3) => {
51
- R.value = false, K.value = e3;
133
+ }
134
+ function getSelectNode() {
135
+ return selectNode.value;
136
+ }
137
+ function expandNode(node) {
138
+ node.loaded = false;
139
+ node.expand();
140
+ }
141
+ function loadTreeNodes() {
142
+ getMenuTreeData(props.pageContext, props.configure).then((treeNodes) => {
143
+ isSearch.value = false;
144
+ menuData.value = treeNodes;
145
+ });
146
+ }
147
+ function getNode(node) {
148
+ menuTree.value.getNode(node);
149
+ }
150
+ __expose({
151
+ getSelectNode,
152
+ expandNode,
153
+ loadTreeNodes,
154
+ getNode
52
155
  });
53
- }, getNode: function(e3) {
54
- A.value.getNode(e3);
55
- } }), (e3, a2) => {
56
- const n2 = u("el-input"), l2 = u("SuperIcon"), t2 = u("Folder"), o2 = u("el-icon"), x2 = u("el-tree");
57
- return d(), i("div", { class: c(r(W)) }, [D.value.filter ? (d(), p(n2, { key: 0, modelValue: O.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => O.value = e4), style: { width: "240px" }, placeholder: "请输入查询条件" }, null, 8, ["modelValue"])) : s("", true), F.value ? (d(), p(x2, { key: 1, ref_key: "menuTree", ref: A, style: v(r(M)), load: B, data: K.value, props: E.value, "default-expand-all": D.value.defaultExpandAll, "expand-on-click-node": D.value.expandOnClickNode, indent: D.value.retractWidth ? D.value.retractWidth : 18, accordion: D.value.accordion, "show-checkbox": !!D.value.showCheckbox, "highlight-current": "", lazy: w.value, "node-key": "nodeId", "filter-node-method": U, onNodeClick: q }, { default: f(({ node: e4, data: a3 }) => [g("span", { title: e4.label, class: "ellipsis" }, [a3.iconValue ? (d(), p(l2, { key: 0, iconType: a3.iconType, iconValue: a3.iconValue }, null, 8, ["iconType", "iconValue"])) : D.value.iconValue ? (d(), p(l2, { key: 1, iconType: D.value.iconType, iconValue: D.value.iconValue }, null, 8, ["iconType", "iconValue"])) : (d(), p(o2, { key: 2 }, { default: f(() => [y(t2)]), _: 1 })), g("span", null, h(e4.label), 1)], 8, b)]), _: 1 }, 8, ["style", "data", "props", "default-expand-all", "expand-on-click-node", "indent", "accordion", "show-checkbox", "lazy"])) : s("", true)], 2);
58
- };
59
- } });
156
+ return (_ctx, _cache) => {
157
+ const _component_el_input = resolveComponent("el-input");
158
+ const _component_SuperIcon = resolveComponent("SuperIcon");
159
+ const _component_Folder = resolveComponent("Folder");
160
+ const _component_el_icon = resolveComponent("el-icon");
161
+ const _component_el_tree = resolveComponent("el-tree");
162
+ return openBlock(), createElementBlock("div", {
163
+ class: normalizeClass(unref(runtimeClass))
164
+ }, [
165
+ designProperty.value.filter ? (openBlock(), createBlock(_component_el_input, {
166
+ key: 0,
167
+ modelValue: filterText.value,
168
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filterText.value = $event),
169
+ style: { "width": "240px" },
170
+ placeholder: "请输入查询条件"
171
+ }, null, 8, ["modelValue"])) : createCommentVNode("", true),
172
+ isShowTree.value ? (openBlock(), createBlock(_component_el_tree, {
173
+ key: 1,
174
+ ref_key: "menuTree",
175
+ ref: menuTree,
176
+ style: normalizeStyle(unref(runtimeStyle)),
177
+ load: loadNode,
178
+ data: menuData.value,
179
+ props: defaultProps.value,
180
+ "default-expand-all": designProperty.value.defaultExpandAll,
181
+ "expand-on-click-node": designProperty.value.expandOnClickNode,
182
+ indent: designProperty.value.retractWidth ? designProperty.value.retractWidth : 18,
183
+ accordion: designProperty.value.accordion,
184
+ "show-checkbox": designProperty.value.showCheckbox ? true : false,
185
+ "highlight-current": "",
186
+ lazy: isLazy.value,
187
+ "node-key": "nodeId",
188
+ "filter-node-method": filterNode,
189
+ onNodeClick: handleNodeClick
190
+ }, {
191
+ default: withCtx(({ node, data }) => [
192
+ createElementVNode("span", {
193
+ title: node.label,
194
+ class: "ellipsis"
195
+ }, [
196
+ data.iconValue ? (openBlock(), createBlock(_component_SuperIcon, {
197
+ key: 0,
198
+ iconType: data.iconType,
199
+ iconValue: data.iconValue
200
+ }, null, 8, ["iconType", "iconValue"])) : designProperty.value.iconValue ? (openBlock(), createBlock(_component_SuperIcon, {
201
+ key: 1,
202
+ iconType: designProperty.value.iconType,
203
+ iconValue: designProperty.value.iconValue
204
+ }, null, 8, ["iconType", "iconValue"])) : (openBlock(), createBlock(_component_el_icon, { key: 2 }, {
205
+ default: withCtx(() => [
206
+ createVNode(_component_Folder)
207
+ ]),
208
+ _: 1
209
+ })),
210
+ createElementVNode("span", null, toDisplayString(node.label), 1)
211
+ ], 8, _hoisted_1)
212
+ ]),
213
+ _: 1
214
+ }, 8, ["style", "data", "props", "default-expand-all", "expand-on-click-node", "indent", "accordion", "show-checkbox", "lazy"])) : createCommentVNode("", true)
215
+ ], 2);
216
+ };
217
+ }
218
+ });
60
219
  export {
61
- N as default
220
+ _sfc_main as default
62
221
  };
@@ -1,5 +1,23 @@
1
- import { defineComponent as e, createElementBlock as t, openBlock as r, toDisplayString as n } from "vue";
2
- const o = { style: { "text-align": "center", color: "red" } }, c = e({ __name: "error-render", props: { configure: { type: Object, default: { name: "未知" } }, selectWidget: Object, indexObj: Object }, setup: (e2) => (c2, a) => (r(), t("div", o, " 不能识别的组件类型【" + n(e2.configure.name) + "】 ", 1)) });
1
+ import { defineComponent, createElementBlock, openBlock, toDisplayString } from "vue";
2
+ const _hoisted_1 = { style: { "text-align": "center", "color": "red" } };
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "error-render",
5
+ props: {
6
+ configure: {
7
+ type: Object,
8
+ default: {
9
+ name: "未知"
10
+ }
11
+ },
12
+ selectWidget: Object,
13
+ indexObj: Object
14
+ },
15
+ setup(__props) {
16
+ return (_ctx, _cache) => {
17
+ return openBlock(), createElementBlock("div", _hoisted_1, " 不能识别的组件类型【" + toDisplayString(__props.configure.name) + "】 ", 1);
18
+ };
19
+ }
20
+ });
3
21
  export {
4
- c as default
22
+ _sfc_main as default
5
23
  };
@@ -1,4 +1,4 @@
1
- import r from "./error-render.vue.js";
1
+ import _sfc_main from "./error-render.vue.js";
2
2
  export {
3
- r as default
3
+ _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import e from "./checkbox-runtime.vue2.js";
1
+ import _sfc_main from "./checkbox-runtime.vue2.js";
2
2
  export {
3
- e as default
3
+ _sfc_main as default
4
4
  };