super-page-runtime 2.2.29-tmp1 → 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 -69
  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 -38
  14. package/dist/es/components/runtime/utils/charts/chart-util.js +522 -226
  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 -73
  19. package/dist/es/components/runtime/utils/events/standard-event.js +2320 -820
  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 -62
  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 -280
  27. package/dist/es/components/runtime/utils/page-init-util.js +405 -144
  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 -54
  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 -11
  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 -54
  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 -33
  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 -44
  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 -33
  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 -33
  62. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +599 -253
  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 -213
  73. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +139 -33
  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 -63
  97. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +810 -305
  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 -265
  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 -43
  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 -70
  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 +246 -59
  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 -34
  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 -29
  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 -65
  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 -89
  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 -41
  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 -21
  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 +756 -230
  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,325 +1,830 @@
1
- import { defineComponent as e, ref as t, onMounted as n, watch as o, onUnmounted as i, resolveComponent as a, createElementBlock as l, openBlock as r, createVNode as s, unref as u } from "vue";
2
- import { setTableEvents as c, canExecuteButton as p, doAfterClickEvent as d, doBeforeClickEvent as f, gridSelectRecord as g, gridSelectAllRecords as m, gridSelectionChange as v, cellClick as h, cellDblClick as b, rowClick as w, rowDblClick as S, headerClick as C, getEventNameByType as y, getEventFuncByType as x, getHandleEvent as D } from "../../../../utils/events/event-util.js";
3
- import { getBaseUrl as E, getListCode as k, getRealRestApiPath as O, isWorkflowPage as I, isVariableInvalidValue as T } from "../../../../utils/common-util.js";
4
- import { getAdditionalParamMap as R, getSaveFormRequestWithRow as V, standardEvents as j } from "../../../../utils/events/standard-event.js";
5
- import { isPromise as N } from "agilebuilder-ui/src/utils/common-util";
6
- import { getOperationButtons as P, popupToPage as U } from "../../../../utils/table-utils.js";
7
- import M from "../../../../utils/eventBus.js";
8
- import { getDefaultValue as B } from "../../../../utils/page-init-util.js";
9
- import { decomposeVariable as F, getSizeConfig as $ } from "../../../../utils/page-helper-util.js";
10
- import { getRowStyleUtil as L, getCellStyleUtil as _, getHeaderCellStyleUtil as A } from "../../chart/table/chart-table-util.js";
11
- const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure: {} }, emits: ["setSafeDeleteTableCode"], setup(e2, { expose: H2, emit: z }) {
12
- const G = e2, W = G.pageContext;
13
- let q = G.configure;
14
- const Q = t({});
15
- W.isTest ? Q.value = G.configure.runtime ? G.configure.runtime : {} : W.tableRuntimes && W.tableRuntimes[q.uuid] && (q = JSON.parse(W.tableRuntimes[q.uuid].configure), Q.value = q.runtime ? q.runtime : {});
16
- const J = Q.value.style, K = Q.value.class, X = W.systemCode, Y = W.backendUrl, Z = q.props && q.props.dataOrigin && q.props.dataOrigin.tableName;
17
- let ee = E(W.backendUrl, W.isTest);
18
- ee || (ee = window.$vueApp.config.globalProperties.baseURL);
19
- const te = t({}), ne = [], oe = t({});
20
- oe.value = function() {
21
- const e3 = W.systemCode, t2 = W.code;
22
- let n2 = q.props && q.props.dataOrigin && "[]" !== q.props.dataOrigin.sqlFilterCondition ? q.props.dataOrigin.sqlFilterCondition : null;
23
- null == n2 && (n2 = []);
24
- const i2 = { isSql: true, rowKeyProp: q.props.dataOrigin.principalLinkage, extraParam: { beanName: W.beanName, functionCode: t2 + ".listData", tableName: Z, systemCode: e3, pageCode: W.code, pageVersion: W.version }, initSearchForm: n2, lineEditOptions: { aftersaveIsCreateRow: false, autoSave: false, enter: me, esc: Se }, indexContinuous: !(!q.props || !q.props.otherSettings) && q.props.otherSettings.serialNumberContinuous, initSearch: !q.props || false !== q.props.dataOrigin.initializationQuery, resizeHeight: Oe, pageCode: W.code, pageVersion: W.version, additionalParamMap: R(W), showOverflowTooltip: !(!q.props || !q.props.otherSettings || void 0 !== q.props.otherSettings.isBreakLine && false !== q.props.otherSettings.isBreakLine), isEnableEnterEvent: q.props && q.props.otherSettings && q.props.otherSettings.isEnableEnterEvent, isWithDataPermission: !!(q.props && q.props.otherSettings && q.props.otherSettings.isWithDataPermission) && q.props.otherSettings.isWithDataPermission, pageDevMode: false, isWorkflowEntity: I(W), tableClass: K, tableStyle: J, pageContext: W, configureObj: q, backendUrl: ee, cellStyleRender: Ae, rowStyleRender: _e, titleStyleRender: He };
25
- (function(e4) {
26
- const t3 = [];
27
- e4.operations || (e4.operations = {});
28
- P(W, q, t3, he), e4.operations.operation = t3;
29
- })(i2), function(e4) {
30
- q.props && q.props.dataOrigin && q.props.dataOrigin.sortField && (e4.initSortInfo = [], q.props.dataOrigin.sortField.forEach((t3) => {
31
- const n3 = { order: "desc" === t3.type ? "desc" : "asc" };
32
- n3.prop = t3.name, e4.initSortInfo.push(n3);
33
- }));
34
- }(i2), q.props.linkages && q.props.linkages.length > 0 && (q.props.linkages.forEach((e4) => {
35
- const t3 = F(e4.fieldName);
36
- t3 && t3.length > 1 && ne.push(t3[1]);
37
- }), ne.length > 0 && function() {
38
- let e4 = [];
39
- G.pageContext.toolsInputComponents && G.pageContext.toolsInputComponents.length > 0 && G.pageContext.toolsInputComponents.forEach((t3) => {
40
- if (q.props.linkages.some((e5) => e5.fieldName === t3.prop) && t3.defaultValue) {
41
- const n3 = F(t3.prop);
42
- n3 && n3.length > 1 && e4.push(n3[1]);
1
+ import { defineComponent, ref, onMounted, watch, onUnmounted, resolveComponent, createElementBlock, openBlock, createVNode, unref } from "vue";
2
+ import { setTableEvents, canExecuteButton, doAfterClickEvent, doBeforeClickEvent, gridSelectRecord, gridSelectAllRecords, gridSelectionChange, cellClick, cellDblClick, rowClick, rowDblClick, headerClick, getEventNameByType, getEventFuncByType, getHandleEvent } from "../../../../utils/events/event-util.js";
3
+ import { getBaseUrl, getListCode, getRealRestApiPath, isWorkflowPage, isVariableInvalidValue } from "../../../../utils/common-util.js";
4
+ import { getAdditionalParamMap, getSaveFormRequestWithRow, standardEvents } from "../../../../utils/events/standard-event.js";
5
+ import { isPromise } from "agilebuilder-ui/src/utils/common-util";
6
+ import { getOperationButtons, popupToPage } from "../../../../utils/table-utils.js";
7
+ import bus from "../../../../utils/eventBus.js";
8
+ import { getDefaultValue } from "../../../../utils/page-init-util.js";
9
+ import { decomposeVariable, getSizeConfig } from "../../../../utils/page-helper-util.js";
10
+ import { getRowStyleUtil, getCellStyleUtil, getHeaderCellStyleUtil } from "../../chart/table/chart-table-util.js";
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ __name: "main-table-runtime",
13
+ props: {
14
+ pageContext: {},
15
+ configure: {}
16
+ },
17
+ emits: ["setSafeDeleteTableCode"],
18
+ setup(__props, { expose: __expose, emit: __emit }) {
19
+ const props = __props;
20
+ const pageContext = props.pageContext;
21
+ let configure = props.configure;
22
+ const runtimeInfo = ref({});
23
+ if (pageContext.isTest) {
24
+ runtimeInfo.value = props.configure.runtime ? props.configure.runtime : {};
25
+ } else {
26
+ if (pageContext.tableRuntimes && pageContext.tableRuntimes[configure.uuid]) {
27
+ configure = JSON.parse(pageContext.tableRuntimes[configure.uuid].configure);
28
+ runtimeInfo.value = configure.runtime ? configure.runtime : {};
29
+ }
30
+ }
31
+ const runtimeStyle = runtimeInfo.value.style;
32
+ const runtimeClass = runtimeInfo.value.class;
33
+ const systemCode = pageContext.systemCode;
34
+ const backendUrl = pageContext.backendUrl;
35
+ const tableName = configure.props && configure.props.dataOrigin && configure.props.dataOrigin.tableName;
36
+ let baseURL = getBaseUrl(pageContext.backendUrl, pageContext.isTest);
37
+ if (!baseURL) {
38
+ baseURL = window["$vueApp"].config.globalProperties.baseURL;
39
+ }
40
+ const operationButtonObj = ref({});
41
+ const linkageVariable = [];
42
+ const listOptions = ref({});
43
+ listOptions.value = getOptions();
44
+ const gridRef = ref();
45
+ const urlToListData = getUrlToListData();
46
+ const listCode = getListCode(pageContext.code, pageContext.version, configure.uuid);
47
+ const myPageCode = pageContext.code;
48
+ const eventPageInfo = myPageCode + "_" + listCode;
49
+ const selections = ref([]);
50
+ const listToolbarFormData = pageContext.entity.page;
51
+ const searchFormInfo = ref({ data: [] });
52
+ const superGridItems = pageContext.superGridItems;
53
+ const superGridSetting = superGridItems ? superGridItems[configure.uuid] : null;
54
+ console.log("superGridSetting1111===", superGridItems, superGridSetting);
55
+ const isCanShowMobileSearch = ref(false);
56
+ const $emit = __emit;
57
+ onMounted(() => {
58
+ window.addEventListener("message", recieveMessage);
59
+ bus.$on(
60
+ eventPageInfo + "-close-component-page-dialog",
61
+ function({ jumpInfo, popEntity, popPageCode }) {
62
+ gridRef.value.closePageDialog({
63
+ entity: popEntity,
64
+ pageCode: popPageCode,
65
+ jumpInfo
66
+ });
43
67
  }
68
+ );
69
+ bus.$on(eventPageInfo + "_close-dialog-get-entity", () => {
70
+ bus.$emit(eventPageInfo + "_close-super-dialog");
71
+ });
72
+ bus.$on(listCode + "-pickFileDone", (data) => {
73
+ console.log("superPage5555---listCode---pickFileDone--listCode=", listCode, "data=", data);
74
+ gridRef.value.pickFileDone(data);
75
+ });
76
+ bus.$on(listCode + "-scanDone", (data) => {
77
+ console.log("superPage5555---listCode---scanDone--listCode=", listCode, "data=", data);
78
+ gridRef.value.scanDone(data);
44
79
  });
45
- if (0 === e4.length) Ge();
46
- else {
47
- const t3 = ze();
48
- e4 = e4.filter((e5) => T(t3, e5)), 0 === e4.length ? (ke(t3), Ge()) : ne.forEach((t4) => {
49
- o(() => G.pageContext.entity.page[t4], () => {
50
- const t5 = ze();
51
- 0 === e4.length ? ke(t5) : (e4 = e4.filter((e5) => T(t5, e5)), 0 === e4.length && ke(t5));
52
- }, { immediate: true });
80
+ listOptions.value["formSetMaxHeight"] = getComponentHeight();
81
+ if (listOptions.value && listOptions.value.configureObj.props.base && listOptions.value.configureObj.props.base.isSafeDelete) {
82
+ $emit("setSafeDeleteTableCode", listOptions.value.extraParam.tableName);
83
+ }
84
+ });
85
+ watch(
86
+ () => props.pageContext.searchFormData,
87
+ (searchFormData) => {
88
+ searchFormInfo.value.data = searchFormData;
89
+ }
90
+ );
91
+ watch(
92
+ () => props.pageContext.entity.data,
93
+ (searchFormData) => {
94
+ searchGridData(props.pageContext.entity.data);
95
+ }
96
+ );
97
+ onUnmounted(() => {
98
+ window.removeEventListener("message", recieveMessage);
99
+ bus.$off(eventPageInfo + "-close-component-page-dialog");
100
+ bus.$off(eventPageInfo + "_close-dialog-get-entity");
101
+ bus.$off(listCode + "-pickFileDone");
102
+ bus.$off(listCode + "-scanDone");
103
+ });
104
+ function getUrlToListData() {
105
+ let urlToListData2 = baseURL + "/dsc/commons/list";
106
+ if (urlToListData2) {
107
+ urlToListData2 = getRealRestApiPath(urlToListData2, systemCode, backendUrl, pageContext.isTest);
108
+ }
109
+ return urlToListData2;
110
+ }
111
+ function getOptions() {
112
+ const systemCode2 = pageContext.systemCode;
113
+ const permissionPrefix = pageContext.code;
114
+ let initSearchForm = configure.props && configure.props.dataOrigin && configure.props.dataOrigin.sqlFilterCondition !== "[]" ? configure.props.dataOrigin.sqlFilterCondition : null;
115
+ if (typeof initSearchForm === "undefined" || initSearchForm === null) {
116
+ initSearchForm = [];
117
+ }
118
+ const rowKeyProp = configure.props.dataOrigin.principalLinkage;
119
+ const options = {
120
+ isSql: true,
121
+ rowKeyProp,
122
+ extraParam: {
123
+ beanName: pageContext.beanName,
124
+ functionCode: permissionPrefix + ".listData",
125
+ tableName,
126
+ systemCode: systemCode2,
127
+ // 系统编码传给列表数据后台请求
128
+ pageCode: pageContext.code,
129
+ pageVersion: pageContext.version
130
+ },
131
+ initSearchForm,
132
+ lineEditOptions: {
133
+ aftersaveIsCreateRow: false,
134
+ autoSave: false,
135
+ enter: enterSave,
136
+ esc: escRestorRow
137
+ },
138
+ indexContinuous: configure.props && configure.props.otherSettings ? configure.props.otherSettings.serialNumberContinuous : false,
139
+ initSearch: configure.props && configure.props.dataOrigin.initializationQuery === false ? false : true,
140
+ // 初始化时是否查询,默认是查询
141
+ resizeHeight: resizeListHeight,
142
+ pageCode: pageContext.code,
143
+ pageVersion: pageContext.version,
144
+ // pageHeight: pageHeight, // 页面的高度 //TODO: pageHeight如何获得,页面高度,计算列表高度应该会用
145
+ additionalParamMap: getAdditionalParamMap(pageContext),
146
+ // 将路由参数传给列表组件
147
+ showOverflowTooltip: !!(configure.props && configure.props.otherSettings && (configure.props.otherSettings.isBreakLine === void 0 || configure.props.otherSettings.isBreakLine === false)),
148
+ // 单元格内容是否换行显示
149
+ isEnableEnterEvent: configure.props && configure.props.otherSettings && configure.props.otherSettings.isEnableEnterEvent,
150
+ // 是否启用回车事件
151
+ isWithDataPermission: configure.props && configure.props.otherSettings && configure.props.otherSettings.isWithDataPermission ? configure.props.otherSettings.isWithDataPermission : false,
152
+ pageDevMode: false,
153
+ isWorkflowEntity: isWorkflowPage(pageContext),
154
+ tableClass: runtimeClass,
155
+ tableStyle: runtimeStyle,
156
+ pageContext,
157
+ configureObj: configure,
158
+ backendUrl: baseURL,
159
+ cellStyleRender: getCellStyle,
160
+ rowStyleRender: getRowStyle,
161
+ titleStyleRender: getTitleStyle
162
+ };
163
+ setOperationButtons(options);
164
+ setSortInfo(options);
165
+ if (configure.props.linkages && configure.props.linkages.length > 0) {
166
+ configure.props.linkages.forEach((linkage) => {
167
+ const variablePath = decomposeVariable(linkage.fieldName);
168
+ if (variablePath && variablePath.length > 1) {
169
+ linkageVariable.push(variablePath[1]);
170
+ }
171
+ });
172
+ if (linkageVariable.length > 0) {
173
+ addLinkageWatch();
174
+ }
175
+ }
176
+ setTreeSetting(options);
177
+ setGridEvents(options);
178
+ return options;
179
+ }
180
+ function setSortInfo(options) {
181
+ if (configure.props && configure.props.dataOrigin && configure.props.dataOrigin.sortField) {
182
+ options.initSortInfo = [];
183
+ configure.props.dataOrigin.sortField.forEach((item) => {
184
+ const sortInfo = {
185
+ order: item.type === "desc" ? "desc" : "asc"
186
+ };
187
+ sortInfo["prop"] = item.name;
188
+ options.initSortInfo.push(sortInfo);
53
189
  });
54
190
  }
55
- }());
56
- return function(e4) {
57
- const t3 = q.props ? q.props.dataOrigin : {};
58
- if (t3.treeTable) {
59
- let n3;
60
- const o2 = t3.rowKey;
61
- if (n3 = o2 && o2.indexOf("~~") > 0 ? o2.substring(o2.indexOf("~~") + 2) : o2, e4.parentProp = n3, t3.checkStrictly && (e4.checkStrictly = t3.checkStrictly), e4.parentProp) {
62
- const o3 = t3.lazy, i3 = t3.defaultExpandAll;
63
- e4.lazy = null == o3 || o3, e4.defaultExpandAll = null != i3 && i3;
64
- const a2 = { parentProp: n3, lazy: e4.lazy, defaultExpandAll: e4.defaultExpandAll };
65
- e4.extraParam.listViewTreeSetting = JSON.stringify(a2), e4.subRowUrl = ee + "/dsc/commons/list-subs";
191
+ }
192
+ function setOperationButtons(options) {
193
+ const operationButtons = [];
194
+ if (!options.operations) {
195
+ options.operations = {};
196
+ }
197
+ getOperationButtons(pageContext, configure, operationButtons, getOperationButtonClickEvent);
198
+ options.operations.operation = operationButtons;
199
+ }
200
+ function setTreeSetting(options) {
201
+ const dataOrigin = configure.props ? configure.props.dataOrigin : {};
202
+ if (dataOrigin.treeTable) {
203
+ let parentPropDbName;
204
+ const parentPropInfo = dataOrigin.rowKey;
205
+ if (parentPropInfo && parentPropInfo.indexOf("~~") > 0) {
206
+ parentPropDbName = parentPropInfo.substring(parentPropInfo.indexOf("~~") + 2);
207
+ } else {
208
+ parentPropDbName = parentPropInfo;
209
+ }
210
+ options.parentProp = parentPropDbName;
211
+ if (dataOrigin.checkStrictly) {
212
+ options.checkStrictly = dataOrigin.checkStrictly;
213
+ }
214
+ if (options.parentProp) {
215
+ const isLazy = dataOrigin.lazy;
216
+ const defaultExpandAll = dataOrigin.defaultExpandAll;
217
+ if (isLazy === void 0 || isLazy === null) {
218
+ options.lazy = true;
219
+ } else {
220
+ options.lazy = isLazy;
221
+ }
222
+ if (defaultExpandAll === void 0 || defaultExpandAll === null) {
223
+ options.defaultExpandAll = false;
224
+ } else {
225
+ options.defaultExpandAll = defaultExpandAll;
226
+ }
227
+ const listViewTreeTableSetting = {
228
+ parentProp: parentPropDbName,
229
+ lazy: options.lazy,
230
+ defaultExpandAll: options.defaultExpandAll
231
+ };
232
+ options.extraParam.listViewTreeSetting = JSON.stringify(listViewTreeTableSetting);
233
+ options.subRowUrl = baseURL + "/dsc/commons/list-subs";
66
234
  }
67
235
  }
68
- }(i2), function(e4) {
69
- const t3 = q.runtime && q.runtime.events ? q.runtime.events : [];
70
- c(e4, t3, W, q);
71
- const n3 = W.customEvents;
72
- n3 && (e4.eventCallBack = n3);
73
- }(i2), i2;
74
- }();
75
- const ie = t(), ae = function() {
76
- let e3 = ee + "/dsc/commons/list";
77
- e3 && (e3 = O(e3, X, Y, W.isTest));
78
- return e3;
79
- }(), le = k(W.code, W.version, q.uuid), re = W.code + "_" + le, se = t([]), ue = W.entity.page, ce = t({ data: [] }), pe = W.superGridItems, de = pe ? pe[q.uuid] : null;
80
- console.log("superGridSetting1111===", pe, de);
81
- const fe = t(false), ge = z;
82
- function me({ rowIndex: e3, column: t2, row: n2, orgRow: o2 }) {
83
- ve(null, null, n2, t2, e3);
84
- }
85
- function ve(e3, t2, n2, o2, i2) {
86
- const a2 = te.value.lineEditSave, l2 = q;
87
- a2.props.base.tableUuid = l2.uuid, oe.value.lineEditOptions.beforeSave = be, W.editData = n2, p({ pageContext: W, configureObj: a2 }).then((l3) => {
88
- true === l3.canExecute && (oe.value.lineEditOptions.saveRow = we, ie.value.saveRow(i2, le).then(() => {
89
- d(W, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
90
- }));
91
- }).finally(() => {
92
- W.editData = null;
93
- });
94
- }
95
- function he(e3) {
96
- if (!e3) return;
97
- let t2;
98
- const n2 = y(e3.events, "click");
99
- if (n2) {
100
- if (te.value[n2] = e3, "lineEditSave" === n2 ? t2 = ve : "restoreEdit" === n2 ? t2 = Ce : "lineEditUpdate" === n2 ? t2 = ye : "lineEditDelete" === n2 && (t2 = De), !t2) {
101
- t2 = x(W, e3.events, "click");
102
- }
103
- } else te.value[e3.uuid] = e3, t2 = Te;
104
- return t2;
105
- }
106
- function be({ row: e3, columns: t2, additionalParamMap: n2 }) {
107
- const o2 = te.value.lineEditSave, i2 = q;
108
- o2.props.base.tableUuid = i2.uuid;
109
- return f(W, o2, { row: e3, columns: t2 });
110
- }
111
- function we({ row: e3, columns: t2, dataTypeMap: n2, dynamicColumnInfo: o2, additionalParamMap: i2, mainDefaultValueColumns: a2 }) {
112
- const l2 = te.value.lineEditSave, r2 = q;
113
- return l2.props.base.tableUuid = r2.uuid, new Promise((t3, n3) => {
114
- const i3 = { tableName: r2.props.dataOrigin.tableName };
115
- V(W, l2, "/dsc/commons", false, a2, o2, e3, i3).then((e4) => {
116
- t3(e4 ? e4.entity : {});
117
- }).catch((e4) => {
118
- n3(e4);
236
+ }
237
+ function setGridEvents(options) {
238
+ const tableEvents = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
239
+ setTableEvents(options, tableEvents, pageContext, configure);
240
+ const customEvents = pageContext.customEvents;
241
+ if (customEvents) {
242
+ options.eventCallBack = customEvents;
243
+ }
244
+ }
245
+ function enterSave({ rowIndex, column, row, orgRow }) {
246
+ saveRow(null, null, row, column, rowIndex);
247
+ }
248
+ function saveRow(originalValue, formatValue, row, column, rowIndex) {
249
+ const buttonConfigure = operationButtonObj.value["lineEditSave"];
250
+ const tableConfigure = configure;
251
+ buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
252
+ listOptions.value["lineEditOptions"]["beforeSave"] = beforeSaveRow;
253
+ pageContext.editData = row;
254
+ canExecuteButton({ pageContext, configureObj: buttonConfigure }).then((result) => {
255
+ if (result["canExecute"] === true) {
256
+ listOptions.value["lineEditOptions"]["saveRow"] = saveLineEditRow;
257
+ gridRef.value.saveRow(rowIndex, listCode).then(() => {
258
+ const otherParams = {
259
+ originalValue,
260
+ formatValue,
261
+ row,
262
+ column,
263
+ rowIndex
264
+ };
265
+ doAfterClickEvent(pageContext, buttonConfigure, otherParams);
266
+ });
267
+ }
268
+ }).finally(() => {
269
+ pageContext.editData = null;
119
270
  });
120
- });
121
- }
122
- function Se({ rowIndex: e3, column: t2, row: n2, orgRow: o2 }) {
123
- Ce(null, null, n2, t2, e3);
124
- }
125
- function Ce(e3, t2, n2, o2, i2) {
126
- const a2 = te.value.restoreEdit, l2 = q;
127
- a2.props.base.tableUuid = l2.uuid;
128
- const r2 = f(W, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
129
- if (!r2) return;
130
- N(r2) ? r2.then((e4) => {
131
- e4 && ie.value.restoreRow(i2, le);
132
- }) : ie.value.restoreRow(i2, le);
133
- d(W, q, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
134
- }
135
- function ye(e3, t2, n2, o2, i2) {
136
- const a2 = te.value.lineEditUpdate, l2 = q;
137
- a2.props.base.tableUuid = l2.uuid;
138
- const r2 = f(W, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
139
- r2 && (N(r2) ? r2.then((l3) => {
140
- l3 && xe(e3, t2, n2, o2, i2, a2);
141
- }) : xe(e3, t2, n2, o2, i2, a2));
142
- }
143
- function xe(e3, t2, n2, o2, i2, a2) {
144
- W.editData = n2, p({ pageContext: W, configureObj: a2 }).then((a3) => {
145
- if (true === a3.canExecute) {
146
- ie.value.editRow(i2, le);
147
- d(W, q, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
148
- }
149
- }).finally(() => {
150
- W.editData = null;
151
- });
152
- }
153
- function De(e3, t2, n2, o2, i2) {
154
- const a2 = te.value.lineEditDelete, l2 = q;
155
- a2.props.base.tableUuid = l2.uuid;
156
- const r2 = f(W, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
157
- r2 && (N(r2) ? r2.then((l3) => {
158
- l3 && Ee(e3, t2, n2, o2, i2, a2);
159
- }) : Ee(e3, t2, n2, o2, i2, a2));
160
- }
161
- function Ee(e3, t2, n2, o2, i2, a2) {
162
- if (n2.id || n2.ID) W.editData = n2, p({ pageContext: W, configureObj: a2 }).then((e4) => {
163
- if (true === e4.canExecute) {
164
- const e5 = [];
165
- n2.id ? e5.push(n2.id) : e5.push(n2.ID), j.delete({ pageContext: W, configureObj: a2, ids: e5 });
166
- }
167
- }).finally(() => {
168
- W.editData = null;
169
- });
170
- else {
171
- Ce(e3, t2, n2, o2, i2);
172
- d(W, q, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
173
271
  }
174
- }
175
- function ke(e3) {
176
- if (!W.dataTypeMaps) return void console.log("!pageContext['dataTypeMaps'] || !pageContext['dataTypeMaps'][tableName]");
177
- const t2 = W.dataTypeMaps;
178
- let n2 = [];
179
- if (e3) for (var o2 in e3) {
180
- const a2 = e3[o2];
181
- if (null != a2 && "" !== a2) if (a2 instanceof Array) {
182
- if (a2.length > 0) {
183
- const e4 = [];
184
- for (var i2 = 0; i2 < a2.length; i2++) {
185
- const n3 = {};
186
- n3.leftBracket = 0 === i2 ? "((" : "(", n3.propName = o2, n3.propDbName = o2, n3.dataType = t2[o2] ? t2[o2] : "TEXT", n3.operator = "EQ", n3.propValue = a2[i2], i2 === a2.length - 1 ? (n3.rightBracket = "))", n3.joinSign = "and") : (n3.rightBracket = ")", n3.joinSign = "or"), e4.push(n3);
272
+ function getOperationButtonClickEvent(buttonConfigure) {
273
+ if (!buttonConfigure) {
274
+ return;
275
+ }
276
+ let onClick;
277
+ const eventName = getEventNameByType(buttonConfigure.events, "click");
278
+ if (eventName) {
279
+ operationButtonObj.value[eventName] = buttonConfigure;
280
+ if (eventName === "lineEditSave") {
281
+ onClick = saveRow;
282
+ } else if (eventName === "restoreEdit") {
283
+ onClick = restoreRow;
284
+ } else if (eventName === "lineEditUpdate") {
285
+ onClick = editRow;
286
+ } else if (eventName === "lineEditDelete") {
287
+ onClick = deleteRow;
288
+ }
289
+ if (!onClick) {
290
+ const eventFunc = getEventFuncByType(pageContext, buttonConfigure.events, "click");
291
+ onClick = eventFunc;
292
+ }
293
+ } else {
294
+ operationButtonObj.value[buttonConfigure.uuid] = buttonConfigure;
295
+ onClick = customButtonClick;
296
+ }
297
+ return onClick;
298
+ }
299
+ function beforeSaveRow({ row, columns, additionalParamMap }) {
300
+ const buttonConfigure = operationButtonObj.value["lineEditSave"];
301
+ const tableConfigure = configure;
302
+ buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
303
+ const otherParams = {
304
+ row,
305
+ columns
306
+ };
307
+ return doBeforeClickEvent(pageContext, buttonConfigure, otherParams);
308
+ }
309
+ function saveLineEditRow({
310
+ row,
311
+ columns,
312
+ dataTypeMap,
313
+ dynamicColumnInfo,
314
+ additionalParamMap,
315
+ mainDefaultValueColumns
316
+ }) {
317
+ const buttonConfigure = operationButtonObj.value["lineEditSave"];
318
+ const tableConfigure = configure;
319
+ buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
320
+ return new Promise((resolve, reject) => {
321
+ const otherParams = { tableName: tableConfigure.props.dataOrigin.tableName };
322
+ getSaveFormRequestWithRow(
323
+ pageContext,
324
+ buttonConfigure,
325
+ "/dsc/commons",
326
+ false,
327
+ mainDefaultValueColumns,
328
+ dynamicColumnInfo,
329
+ row,
330
+ otherParams
331
+ ).then((commonEntity) => {
332
+ if (commonEntity) {
333
+ resolve(commonEntity.entity);
334
+ } else {
335
+ resolve({});
336
+ }
337
+ }).catch((error) => {
338
+ reject(error);
339
+ });
340
+ });
341
+ }
342
+ function escRestorRow({ rowIndex, column, row, orgRow }) {
343
+ restoreRow(null, null, row, column, rowIndex);
344
+ }
345
+ function restoreRow(originalValue, formatValue, row, column, rowIndex) {
346
+ const buttonConfigure = operationButtonObj.value["restoreEdit"];
347
+ const tableConfigure = configure;
348
+ buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
349
+ const otherParams = {
350
+ originalValue,
351
+ formatValue,
352
+ row,
353
+ column,
354
+ rowIndex
355
+ };
356
+ const beforeClickResult = doBeforeClickEvent(pageContext, buttonConfigure, otherParams);
357
+ if (!beforeClickResult) {
358
+ return;
359
+ }
360
+ if (isPromise(beforeClickResult)) {
361
+ beforeClickResult.then((result) => {
362
+ if (result) {
363
+ gridRef.value.restoreRow(rowIndex, listCode);
187
364
  }
188
- n2 = n2.concat(e4);
365
+ });
366
+ } else {
367
+ gridRef.value.restoreRow(rowIndex, listCode);
368
+ }
369
+ const afterOtherParams = {
370
+ originalValue,
371
+ formatValue,
372
+ row,
373
+ column,
374
+ rowIndex
375
+ };
376
+ doAfterClickEvent(pageContext, configure, afterOtherParams);
377
+ }
378
+ function editRow(originalValue, formatValue, row, column, rowIndex) {
379
+ const buttonConfigure = operationButtonObj.value["lineEditUpdate"];
380
+ const tableConfigure = configure;
381
+ buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
382
+ const otherParams = {
383
+ originalValue,
384
+ formatValue,
385
+ row,
386
+ column,
387
+ rowIndex
388
+ };
389
+ const beforeClickResult = doBeforeClickEvent(pageContext, buttonConfigure, otherParams);
390
+ if (!beforeClickResult) {
391
+ return;
392
+ }
393
+ if (isPromise(beforeClickResult)) {
394
+ beforeClickResult.then((result) => {
395
+ if (result) {
396
+ editRowReal(originalValue, formatValue, row, column, rowIndex, buttonConfigure);
397
+ }
398
+ });
399
+ } else {
400
+ editRowReal(originalValue, formatValue, row, column, rowIndex, buttonConfigure);
401
+ }
402
+ }
403
+ function editRowReal(originalValue, formatValue, row, column, rowIndex, buttonConfigure) {
404
+ pageContext.editData = row;
405
+ canExecuteButton({ pageContext, configureObj: buttonConfigure }).then((result) => {
406
+ if (result["canExecute"] === true) {
407
+ gridRef.value.editRow(rowIndex, listCode);
408
+ const afterOtherParams = {
409
+ originalValue,
410
+ formatValue,
411
+ row,
412
+ column,
413
+ rowIndex
414
+ };
415
+ doAfterClickEvent(pageContext, configure, afterOtherParams);
189
416
  }
417
+ }).finally(() => {
418
+ pageContext.editData = null;
419
+ });
420
+ }
421
+ function deleteRow(originalValue, formatValue, row, column, rowIndex) {
422
+ const buttonConfigure = operationButtonObj.value["lineEditDelete"];
423
+ const tableConfigure = configure;
424
+ buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
425
+ const otherParams = {
426
+ originalValue,
427
+ formatValue,
428
+ row,
429
+ column,
430
+ rowIndex
431
+ };
432
+ const beforeClickResult = doBeforeClickEvent(pageContext, buttonConfigure, otherParams);
433
+ if (!beforeClickResult) {
434
+ return;
435
+ }
436
+ if (isPromise(beforeClickResult)) {
437
+ beforeClickResult.then((result) => {
438
+ if (result) {
439
+ deleteRowReal(originalValue, formatValue, row, column, rowIndex, buttonConfigure);
440
+ }
441
+ });
190
442
  } else {
191
- const e4 = { leftBracket: "(" };
192
- e4.propName = o2, e4.propDbName = o2, e4.dataType = t2[o2] ? t2[o2] : "TEXT", e4.operator = "EQ", e4.propValue = a2, e4.rightBracket = ")", e4.joinSign = "and", n2.push(e4);
443
+ deleteRowReal(originalValue, formatValue, row, column, rowIndex, buttonConfigure);
193
444
  }
194
445
  }
195
- console.log("toolbarRefresh"), ie.value.toolbarRefresh(null, null, n2);
196
- }
197
- function Oe(e3) {
198
- const t2 = Ie();
199
- if (t2) {
200
- let n2 = 0;
201
- return e3.searchHeight && (n2 = e3.searchHeight), t2 - 20 - n2;
446
+ function deleteRowReal(originalValue, formatValue, row, column, rowIndex, buttonConfigure) {
447
+ if (row.id || row.ID) {
448
+ pageContext.editData = row;
449
+ canExecuteButton({ pageContext, configureObj: buttonConfigure }).then((result) => {
450
+ if (result["canExecute"] === true) {
451
+ const ids = [];
452
+ if (row.id) {
453
+ ids.push(row.id);
454
+ } else {
455
+ ids.push(row.ID);
456
+ }
457
+ standardEvents.delete({
458
+ pageContext,
459
+ configureObj: buttonConfigure,
460
+ ids
461
+ });
462
+ }
463
+ }).finally(() => {
464
+ pageContext.editData = null;
465
+ });
466
+ } else {
467
+ restoreRow(originalValue, formatValue, row, column, rowIndex);
468
+ const afterOtherParams = {
469
+ originalValue,
470
+ formatValue,
471
+ row,
472
+ column,
473
+ rowIndex
474
+ };
475
+ doAfterClickEvent(pageContext, configure, afterOtherParams);
476
+ }
202
477
  }
203
- }
204
- function Ie() {
205
- if (!ie.value) return;
206
- console.log("objectRender---configure.name=", G.configure.name, "props.configure=", G.configure, "runtimeStyle.value=", J);
207
- const e3 = $(G.pageContext, G.configure);
208
- if (e3 && e3.isCalcHeight) {
209
- let e4 = ie.value.$el;
210
- if (e4 || (e4 = ie.value), !e4) return;
211
- const t2 = e4.getBoundingClientRect();
212
- return window.innerHeight - t2.y - 90;
478
+ function searchGridData(data) {
479
+ if (!pageContext["dataTypeMaps"]) {
480
+ console.log("!pageContext['dataTypeMaps'] || !pageContext['dataTypeMaps'][tableName]");
481
+ return;
482
+ }
483
+ const dataTypeObj = pageContext["dataTypeMaps"];
484
+ let toolbarFieldParam = [];
485
+ if (data) {
486
+ for (var key in data) {
487
+ const value = data[key];
488
+ if (value !== null && value !== void 0 && value !== "") {
489
+ if (value instanceof Array) {
490
+ if (value.length > 0) {
491
+ const multipleFieldParam = [];
492
+ for (var i = 0; i < value.length; i++) {
493
+ const fieldParam = {};
494
+ if (i === 0) {
495
+ fieldParam["leftBracket"] = "((";
496
+ } else {
497
+ fieldParam["leftBracket"] = "(";
498
+ }
499
+ fieldParam["propName"] = key;
500
+ fieldParam["propDbName"] = key;
501
+ fieldParam["dataType"] = dataTypeObj[key] ? dataTypeObj[key] : "TEXT";
502
+ fieldParam["operator"] = "EQ";
503
+ fieldParam["propValue"] = value[i];
504
+ if (i === value.length - 1) {
505
+ fieldParam["rightBracket"] = "))";
506
+ fieldParam["joinSign"] = "and";
507
+ } else {
508
+ fieldParam["rightBracket"] = ")";
509
+ fieldParam["joinSign"] = "or";
510
+ }
511
+ multipleFieldParam.push(fieldParam);
512
+ }
513
+ toolbarFieldParam = toolbarFieldParam.concat(multipleFieldParam);
514
+ }
515
+ } else {
516
+ const fieldParam = {};
517
+ fieldParam["leftBracket"] = "(";
518
+ fieldParam["propName"] = key;
519
+ fieldParam["propDbName"] = key;
520
+ fieldParam["dataType"] = dataTypeObj[key] ? dataTypeObj[key] : "TEXT";
521
+ fieldParam["operator"] = "EQ";
522
+ fieldParam["propValue"] = value;
523
+ fieldParam["rightBracket"] = ")";
524
+ fieldParam["joinSign"] = "and";
525
+ toolbarFieldParam.push(fieldParam);
526
+ }
527
+ }
528
+ }
529
+ }
530
+ console.log("toolbarRefresh");
531
+ gridRef.value.toolbarRefresh(null, null, toolbarFieldParam);
213
532
  }
214
- }
215
- function Te(e3, t2, n2, o2, i2, a2) {
216
- const l2 = { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2, button: a2, id: n2.ID ? n2.ID : n2.id }, r2 = te.value[a2.sourceButton.uuid], s2 = q;
217
- r2.props.base.tableUuid = s2.uuid, D(null, W, r2, "click", l2);
218
- }
219
- function Re(e3) {
220
- "close_open_win" === e3.data && ie.value && ie.value.refresh();
221
- }
222
- function Ve(e3, t2) {
223
- se.value = e3;
224
- g(W, q, { selection: e3, row: t2 });
225
- }
226
- function je(e3) {
227
- se.value = e3;
228
- m(W, q, { selection: e3 });
229
- }
230
- function Ne(e3) {
231
- v(W, q, { newSelection: e3 });
232
- }
233
- function Pe(e3, t2, n2, o2) {
234
- h(W, q, { row: e3, column: t2, cell: n2, event: o2 });
235
- }
236
- function Ue(e3, t2, n2, o2) {
237
- b(W, q, { row: e3, column: t2, cell: n2, event: o2 });
238
- }
239
- function Me(e3, t2, n2) {
240
- w(W, q, { row: e3, column: t2, event: n2 });
241
- }
242
- function Be(e3, t2, n2) {
243
- S(W, q, { row: e3, column: t2, event: n2 });
244
- }
245
- function Fe(e3, t2) {
246
- C(W, q, { column: e3, event: t2 });
247
- }
248
- function $e() {
249
- se.value = [];
250
- }
251
- function Le(e3) {
252
- fe.value = true;
253
- }
254
- function _e(e3) {
255
- return L(e3, [], G);
256
- }
257
- function Ae(e3) {
258
- return _(e3, e3.cellStyle, G);
259
- }
260
- function He(e3) {
261
- const t2 = e3.titleStyle, n2 = G.configure.style.titleStyle;
262
- return A(e3, { cellTitleStyle: t2, titleStyle: n2 }, G);
263
- }
264
- function ze() {
265
- const e3 = {};
266
- return ne.forEach((t2) => {
267
- e3[t2] = G.pageContext.entity.page[t2];
268
- }), e3;
269
- }
270
- function Ge() {
271
- ne.forEach((e3) => {
272
- o(() => G.pageContext.entity.page[e3], () => {
273
- ke(ze());
533
+ function resizeListHeight(params) {
534
+ const contentHeight = getComponentHeight();
535
+ if (contentHeight) {
536
+ let searchHeight = 0;
537
+ if (params.searchHeight) {
538
+ searchHeight = params.searchHeight;
539
+ }
540
+ return contentHeight - 20 - searchHeight;
541
+ }
542
+ }
543
+ function getComponentHeight() {
544
+ if (!gridRef.value) {
545
+ return;
546
+ }
547
+ console.log(
548
+ "objectRender---configure.name=",
549
+ props.configure.name,
550
+ "props.configure=",
551
+ props.configure,
552
+ "runtimeStyle.value=",
553
+ runtimeStyle
554
+ );
555
+ const sizeConfig = getSizeConfig(props.pageContext, props.configure);
556
+ if (sizeConfig && sizeConfig["isCalcHeight"]) {
557
+ let thisRefDom = gridRef.value.$el;
558
+ if (!thisRefDom) {
559
+ thisRefDom = gridRef.value;
560
+ }
561
+ if (!thisRefDom) {
562
+ return;
563
+ }
564
+ const rect = thisRefDom.getBoundingClientRect();
565
+ return window.innerHeight - rect.y - 90;
566
+ }
567
+ }
568
+ function customButtonClick(originalValue, formatValue, row, column, rowIndex, button) {
569
+ const otherParams = {
570
+ originalValue,
571
+ formatValue,
572
+ row,
573
+ column,
574
+ rowIndex,
575
+ button,
576
+ id: row.ID ? row.ID : row.id
577
+ };
578
+ const buttonConfigure = operationButtonObj.value[button.sourceButton.uuid];
579
+ const tableConfigure = configure;
580
+ buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
581
+ getHandleEvent(null, pageContext, buttonConfigure, "click", otherParams);
582
+ }
583
+ function recieveMessage(event) {
584
+ if (event.data === "close_open_win") {
585
+ if (gridRef.value) {
586
+ gridRef.value.refresh();
587
+ }
588
+ }
589
+ }
590
+ function select(selection, row) {
591
+ selections.value = selection;
592
+ const params = {
593
+ selection,
594
+ row
595
+ };
596
+ gridSelectRecord(pageContext, configure, params);
597
+ }
598
+ function selectAll(selection) {
599
+ selections.value = selection;
600
+ const params = {
601
+ selection
602
+ };
603
+ gridSelectAllRecords(pageContext, configure, params);
604
+ }
605
+ function selectionChange(newSelection) {
606
+ const params = {
607
+ newSelection
608
+ };
609
+ gridSelectionChange(pageContext, configure, params);
610
+ }
611
+ function cellClickEvent(row, column, cell, event) {
612
+ const params = {
613
+ row,
614
+ column,
615
+ cell,
616
+ event
617
+ };
618
+ cellClick(pageContext, configure, params);
619
+ }
620
+ function cellDblClickEvent(row, column, cell, event) {
621
+ const params = {
622
+ row,
623
+ column,
624
+ cell,
625
+ event
626
+ };
627
+ cellDblClick(pageContext, configure, params);
628
+ }
629
+ function rowClickEvent(row, column, event) {
630
+ const params = {
631
+ row,
632
+ column,
633
+ event
634
+ };
635
+ rowClick(pageContext, configure, params);
636
+ }
637
+ function rowDblClickEvent(row, column, event) {
638
+ const params = {
639
+ row,
640
+ column,
641
+ event
642
+ };
643
+ rowDblClick(pageContext, configure, params);
644
+ }
645
+ function headerClickEvent(column, event) {
646
+ const params = {
647
+ column,
648
+ event
649
+ };
650
+ headerClick(pageContext, configure, params);
651
+ }
652
+ function validatorSunTableListData() {
653
+ return gridRef.value.validatorSunTableListData();
654
+ }
655
+ function clearSelections() {
656
+ selections.value = [];
657
+ }
658
+ function refresh(parentRowIds, isLineEdit, toolbarFieldParam, isDeleteSubTableData) {
659
+ return gridRef.value.refresh(parentRowIds, isLineEdit, toolbarFieldParam, isDeleteSubTableData);
660
+ }
661
+ function createRow() {
662
+ return gridRef.value.createRow(listCode, {}, { getDefaultValueFunc: getDefaultValue });
663
+ }
664
+ function getSelections() {
665
+ return selections.value;
666
+ }
667
+ function getSelectionIds() {
668
+ const dataIds = [];
669
+ if (selections.value !== null) {
670
+ selections.value.forEach((item) => {
671
+ dataIds.push(item.id ? item.id : item.ID ? item.ID : null);
672
+ });
673
+ }
674
+ return dataIds;
675
+ }
676
+ function getTableConfigure() {
677
+ return configure;
678
+ }
679
+ function isDeleteChange(value) {
680
+ gridRef.value.isDeleteChange(value);
681
+ }
682
+ function showMobileSearch() {
683
+ if (isCanShowMobileSearch.value) {
684
+ gridRef.value.showMobileSearch();
685
+ }
686
+ }
687
+ function canShowMobileSearchFunc(listCode2) {
688
+ isCanShowMobileSearch.value = true;
689
+ }
690
+ function getRowStyle(data) {
691
+ return getRowStyleUtil(data, [], props);
692
+ }
693
+ function getCellStyle(data) {
694
+ return getCellStyleUtil(data, data.cellStyle, props);
695
+ }
696
+ function getTitleStyle(data) {
697
+ const cellTitleStyle = data.titleStyle;
698
+ const rowTitleStyle = props.configure.style.titleStyle;
699
+ return getHeaderCellStyleUtil(
700
+ data,
701
+ { cellTitleStyle, titleStyle: rowTitleStyle },
702
+ props
703
+ );
704
+ }
705
+ function getLinkageVariableValues() {
706
+ const values = {};
707
+ linkageVariable.forEach((variable) => {
708
+ values[variable] = props.pageContext.entity.page[variable];
274
709
  });
710
+ return values;
711
+ }
712
+ function addLinkageWatch() {
713
+ let waitComponentRenderProps = [];
714
+ if (props.pageContext.toolsInputComponents && props.pageContext.toolsInputComponents.length > 0) {
715
+ props.pageContext.toolsInputComponents.forEach((componentItem) => {
716
+ const isLinkComponent = configure.props.linkages.some(
717
+ (linkage) => linkage.fieldName === componentItem.prop
718
+ );
719
+ if (isLinkComponent && componentItem.defaultValue) {
720
+ const variablePath = decomposeVariable(componentItem.prop);
721
+ if (variablePath && variablePath.length > 1) {
722
+ waitComponentRenderProps.push(variablePath[1]);
723
+ }
724
+ }
725
+ });
726
+ }
727
+ if (waitComponentRenderProps.length === 0) {
728
+ linkageVariableWatch();
729
+ } else {
730
+ const values = getLinkageVariableValues();
731
+ waitComponentRenderProps = waitComponentRenderProps.filter((unsetVariable) => {
732
+ return isVariableInvalidValue(values, unsetVariable);
733
+ });
734
+ if (waitComponentRenderProps.length === 0) {
735
+ searchGridData(values);
736
+ linkageVariableWatch();
737
+ } else {
738
+ linkageVariable.forEach((variable) => {
739
+ watch(
740
+ () => props.pageContext.entity.page[variable],
741
+ () => {
742
+ const values2 = getLinkageVariableValues();
743
+ if (waitComponentRenderProps.length === 0) {
744
+ searchGridData(values2);
745
+ } else {
746
+ waitComponentRenderProps = waitComponentRenderProps.filter((unsetVariable) => {
747
+ return isVariableInvalidValue(values2, unsetVariable);
748
+ });
749
+ if (waitComponentRenderProps.length === 0) {
750
+ searchGridData(values2);
751
+ }
752
+ }
753
+ },
754
+ { immediate: true }
755
+ );
756
+ });
757
+ }
758
+ }
759
+ }
760
+ function linkageVariableWatch() {
761
+ linkageVariable.forEach((variable) => {
762
+ watch(
763
+ () => props.pageContext.entity.page[variable],
764
+ () => {
765
+ const values = getLinkageVariableValues();
766
+ searchGridData(values);
767
+ }
768
+ );
769
+ });
770
+ }
771
+ function getTableSelectOptions() {
772
+ if (gridRef.value) {
773
+ return gridRef.value.getTableSelectOptions(listCode);
774
+ }
775
+ }
776
+ function dynamicControlTableEdit(pageContext2, customRules, listCode2) {
777
+ if (gridRef.value) {
778
+ gridRef.value.dynamicControlTableEdit(pageContext2, customRules, listCode2);
779
+ }
780
+ }
781
+ function doLayout(hiddenColumns) {
782
+ if (gridRef.value) {
783
+ gridRef.value.doLayout(hiddenColumns);
784
+ }
785
+ }
786
+ __expose({
787
+ refresh,
788
+ createRow,
789
+ clearSelections,
790
+ getSelections,
791
+ getSelectionIds,
792
+ getTableConfigure,
793
+ isDeleteChange,
794
+ validatorSunTableListData,
795
+ showMobileSearch,
796
+ getTableSelectOptions,
797
+ dynamicControlTableEdit,
798
+ doLayout
275
799
  });
800
+ return (_ctx, _cache) => {
801
+ const _component_super_grid = resolveComponent("super-grid");
802
+ return openBlock(), createElementBlock("div", null, [
803
+ createVNode(_component_super_grid, {
804
+ ref_key: "gridRef",
805
+ ref: gridRef,
806
+ url: unref(urlToListData),
807
+ options: listOptions.value,
808
+ code: unref(listCode),
809
+ settings: unref(superGridSetting),
810
+ "search-form-info": searchFormInfo.value,
811
+ "list-toolbar-form-data": unref(listToolbarFormData),
812
+ onSelect: select,
813
+ onSelectAll: selectAll,
814
+ onSelectionChange: selectionChange,
815
+ onCellClick: cellClickEvent,
816
+ onCellDblclick: cellDblClickEvent,
817
+ onRowClick: rowClickEvent,
818
+ onRowDblclick: rowDblClickEvent,
819
+ onHeaderClick: headerClickEvent,
820
+ onRefresh: clearSelections,
821
+ onNewOpenGridDialog: unref(popupToPage),
822
+ onCanShowMobileSearch: canShowMobileSearchFunc
823
+ }, null, 8, ["url", "options", "code", "settings", "search-form-info", "list-toolbar-form-data", "onNewOpenGridDialog"])
824
+ ]);
825
+ };
276
826
  }
277
- return n(() => {
278
- window.addEventListener("message", Re), M.$on(re + "-close-component-page-dialog", function({ jumpInfo: e3, popEntity: t2, popPageCode: n2 }) {
279
- ie.value.closePageDialog({ entity: t2, pageCode: n2, jumpInfo: e3 });
280
- }), M.$on(re + "_close-dialog-get-entity", () => {
281
- M.$emit(re + "_close-super-dialog");
282
- }), M.$on(le + "-pickFileDone", (e3) => {
283
- console.log("superPage5555---listCode---pickFileDone--listCode=", le, "data=", e3), ie.value.pickFileDone(e3);
284
- }), M.$on(le + "-scanDone", (e3) => {
285
- console.log("superPage5555---listCode---scanDone--listCode=", le, "data=", e3), ie.value.scanDone(e3);
286
- }), oe.value.formSetMaxHeight = Ie(), oe.value && oe.value.configureObj.props.base && oe.value.configureObj.props.base.isSafeDelete && ge("setSafeDeleteTableCode", oe.value.extraParam.tableName);
287
- }), o(() => G.pageContext.searchFormData, (e3) => {
288
- ce.value.data = e3;
289
- }), o(() => G.pageContext.entity.data, (e3) => {
290
- ke(G.pageContext.entity.data);
291
- }), i(() => {
292
- window.removeEventListener("message", Re), M.$off(re + "-close-component-page-dialog"), M.$off(re + "_close-dialog-get-entity"), M.$off(le + "-pickFileDone"), M.$off(le + "-scanDone");
293
- }), H2({ refresh: function(e3, t2, n2, o2) {
294
- return ie.value.refresh(e3, t2, n2, o2);
295
- }, createRow: function() {
296
- return ie.value.createRow(le, {}, { getDefaultValueFunc: B });
297
- }, clearSelections: $e, getSelections: function() {
298
- return se.value;
299
- }, getSelectionIds: function() {
300
- const e3 = [];
301
- return null !== se.value && se.value.forEach((t2) => {
302
- e3.push(t2.id ? t2.id : t2.ID ? t2.ID : null);
303
- }), e3;
304
- }, getTableConfigure: function() {
305
- return q;
306
- }, isDeleteChange: function(e3) {
307
- ie.value.isDeleteChange(e3);
308
- }, validatorSunTableListData: function() {
309
- return ie.value.validatorSunTableListData();
310
- }, showMobileSearch: function() {
311
- fe.value && ie.value.showMobileSearch();
312
- }, getTableSelectOptions: function() {
313
- if (ie.value) return ie.value.getTableSelectOptions(le);
314
- }, dynamicControlTableEdit: function(e3, t2, n2) {
315
- ie.value && ie.value.dynamicControlTableEdit(e3, t2, n2);
316
- }, doLayout: function(e3) {
317
- ie.value && ie.value.doLayout(e3);
318
- } }), (e3, t2) => {
319
- const n2 = a("super-grid");
320
- return r(), l("div", null, [s(n2, { ref_key: "gridRef", ref: ie, url: u(ae), options: oe.value, code: u(le), settings: u(de), "search-form-info": ce.value, "list-toolbar-form-data": u(ue), onSelect: Ve, onSelectAll: je, onSelectionChange: Ne, onCellClick: Pe, onCellDblclick: Ue, onRowClick: Me, onRowDblclick: Be, onHeaderClick: Fe, onRefresh: $e, onNewOpenGridDialog: u(U), onCanShowMobileSearch: Le }, null, 8, ["url", "options", "code", "settings", "search-form-info", "list-toolbar-form-data", "onNewOpenGridDialog"])]);
321
- };
322
- } });
827
+ });
323
828
  export {
324
- H as default
829
+ _sfc_main as default
325
830
  };