super-page-runtime 2.1.933 → 2.2.1

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