super-page-runtime 2.2.29-tmp2 → 2.2.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +5 -7
  2. package/dist/es/assets/chart-themes/theme1.js +2 -6
  3. package/dist/es/assets/chart-themes/theme2.js +2 -6
  4. package/dist/es/assets/chart-themes/theme3.js +2 -6
  5. package/dist/es/components/runtime/utils/api/api-util.js +4 -7
  6. package/dist/es/components/runtime/utils/api/page-expose-util.js +135 -443
  7. package/dist/es/components/runtime/utils/assemblys-config.js +13 -369
  8. package/dist/es/components/runtime/utils/barcode-util.js +9 -33
  9. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +122 -306
  10. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -68
  11. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +68 -152
  12. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +46 -124
  13. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +36 -99
  14. package/dist/es/components/runtime/utils/charts/chart-util.js +224 -522
  15. package/dist/es/components/runtime/utils/common-util.js +76 -156
  16. package/dist/es/components/runtime/utils/eventBus.js +3 -8
  17. package/dist/es/components/runtime/utils/events/event-util.js +362 -775
  18. package/dist/es/components/runtime/utils/events/print-label.js +72 -140
  19. package/dist/es/components/runtime/utils/events/standard-event.js +808 -2320
  20. package/dist/es/components/runtime/utils/events/validator-util.js +224 -560
  21. package/dist/es/components/runtime/utils/form/date-shortcuts.js +28 -88
  22. package/dist/es/components/runtime/utils/form/scan-util.js +61 -162
  23. package/dist/es/components/runtime/utils/global-refs.js +53 -84
  24. package/dist/es/components/runtime/utils/i18n-util.js +11 -20
  25. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +6 -0
  26. package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
  27. package/dist/es/components/runtime/utils/page-helper-util.js +280 -660
  28. package/dist/es/components/runtime/utils/page-init-util.js +141 -406
  29. package/dist/es/components/runtime/utils/page-permission-util.js +22 -531
  30. package/dist/es/components/runtime/utils/page-store.js +23 -68
  31. package/dist/es/components/runtime/utils/store-util.js +9 -13
  32. package/dist/es/components/runtime/utils/store.js +2 -2
  33. package/dist/es/components/runtime/utils/table-utils.d.ts +4 -0
  34. package/dist/es/components/runtime/utils/table-utils.js +40 -81
  35. package/dist/es/components/runtime/utils/tree-utils.js +17 -37
  36. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
  37. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +21 -83
  38. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
  39. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
  40. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
  41. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +36 -132
  42. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
  43. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
  44. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
  45. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
  46. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
  47. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +50 -198
  48. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
  49. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
  50. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
  51. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
  52. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +52 -203
  53. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
  54. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +4 -4
  55. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +46 -162
  56. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
  57. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -109
  58. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
  59. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -166
  60. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
  61. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -117
  62. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
  63. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -118
  64. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +246 -597
  65. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
  66. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
  67. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
  68. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
  69. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +29 -160
  70. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
  71. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
  72. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
  73. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
  74. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +212 -594
  75. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
  76. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
  77. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +21 -125
  78. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
  79. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
  80. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
  81. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
  82. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
  83. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
  84. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
  85. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
  86. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
  87. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
  88. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
  89. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
  90. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
  91. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
  92. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
  93. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
  94. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
  95. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
  96. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
  97. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
  98. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
  99. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +317 -810
  100. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
  101. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +262 -635
  102. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
  103. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
  104. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +40 -115
  105. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
  106. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -215
  107. package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
  108. package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
  109. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
  110. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +42 -154
  111. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +34 -98
  112. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
  113. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
  114. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +52 -200
  115. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
  116. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +68 -239
  117. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
  118. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +31 -109
  119. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
  120. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +21 -59
  121. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
  122. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +56 -188
  123. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
  124. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
  125. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
  126. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -245
  127. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
  128. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +32 -174
  129. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
  130. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
  131. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
  132. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
  133. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
  134. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +64 -194
  135. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
  136. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +88 -249
  137. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
  138. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +80 -263
  139. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
  140. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
  141. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
  142. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
  143. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
  144. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +40 -129
  145. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
  146. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
  147. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +89 -188
  148. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +2 -2
  149. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +133 -272
  150. package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
  151. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
  152. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +18 -46
  153. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
  154. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +21 -49
  155. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
  156. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +20 -58
  157. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
  158. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
  159. package/dist/es/components/runtime/views/home-chart.vue.js +41 -160
  160. package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
  161. package/dist/es/components/runtime/views/super-page-dialog.vue.js +20 -139
  162. package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
  163. package/dist/es/components/runtime/views/super-page.vue.js +226 -754
  164. package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
  165. package/dist/es/i18n/langs/cn.js +2 -55
  166. package/dist/es/i18n/langs/en.js +2 -55
  167. package/package.json +2 -2
@@ -1,830 +1,337 @@
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
- });
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, unref as u, createVNode as s } 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 y, getEventNameByType as C, getEventFuncByType as x, getHandleEvent as D } from "../../../../utils/events/event-util.js";
3
+ import { getBaseUrl as E, getListCode as O, getRealRestApiPath as k, isWorkflowPage as T, isVariableInvalidValue as R } from "../../../../utils/common-util.js";
4
+ import { getAdditionalParamMap as I, 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 B } from "../../../../utils/table-utils.js";
7
+ import F from "../../../../utils/eventBus.js";
8
+ import { getDefaultValue as H } from "../../../../utils/page-init-util.js";
9
+ import { decomposeVariable as U, getSizeConfig as M } from "../../../../utils/page-helper-util.js";
10
+ import { getRowStyleUtil as $, getCellStyleUtil as _, getHeaderCellStyleUtil as L } from "../../chart/table/chart-table-util.js";
11
+ const A = ["id"], z = e({ __name: "main-table-runtime", props: { pageContext: {}, configure: {} }, emits: ["setSafeDeleteTableCode"], setup(e2, { expose: z2, emit: W }) {
12
+ const q = e2, G = q.pageContext;
13
+ let Q = q.configure;
14
+ const J = t({});
15
+ G.isTest ? J.value = q.configure.runtime ? q.configure.runtime : {} : G.tableRuntimes && G.tableRuntimes[Q.uuid] && (Q = JSON.parse(G.tableRuntimes[Q.uuid].configure), J.value = Q.runtime ? Q.runtime : {});
16
+ const K = J.value.style, X = J.value.class, Y = G.systemCode, Z = G.backendUrl, ee = Q.props && Q.props.dataOrigin && Q.props.dataOrigin.tableName;
17
+ let te = E(G.backendUrl, G.isTest);
18
+ te || (te = window.$vueApp.config.globalProperties.baseURL);
19
+ const ne = t({}), oe = [], ie = t({});
20
+ ie.value = function() {
21
+ const e3 = G.systemCode, t2 = G.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, optionTableHeight: 0, rowKeyProp: Q.props.dataOrigin.principalLinkage, extraParam: { beanName: G.beanName, functionCode: t2 + ".listData", tableName: ee, systemCode: e3, pageCode: G.code, pageVersion: G.version }, initSearchForm: n2, lineEditOptions: { aftersaveIsCreateRow: false, autoSave: false, enter: he, esc: Ce }, indexContinuous: !(!Q.props || !Q.props.otherSettings) && Q.props.otherSettings.serialNumberContinuous, initSearch: !Q.props || false !== Q.props.dataOrigin.initializationQuery, resizeHeight: Re, pageCode: G.code, pageVersion: G.version, additionalParamMap: I(G), 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: T(G), tableClass: X, tableStyle: K, pageContext: G, configureObj: Q, backendUrl: te, cellStyleRender: ze, rowStyleRender: Ae, titleStyleRender: We };
25
+ (function(e4) {
26
+ var _a;
27
+ ((_a = Q.props.highOrder) == null ? void 0 : _a.mergeFields) && Q.props.highOrder.mergeFields.length > 0 && (e4.mergeFields = Q.props.highOrder.mergeFields.join(","));
28
+ })(i2), function(e4) {
29
+ const t3 = [];
30
+ e4.operations || (e4.operations = {});
31
+ P(G, Q, t3, we), e4.operations.operation = t3;
32
+ }(i2), function(e4) {
33
+ Q.props && Q.props.dataOrigin && Q.props.dataOrigin.sortField && (e4.initSortInfo = [], Q.props.dataOrigin.sortField.forEach((t3) => {
34
+ const n3 = { order: "desc" === t3.type ? "desc" : "asc" };
35
+ n3.prop = t3.name, e4.initSortInfo.push(n3);
36
+ }));
37
+ }(i2), Q.props.linkages && Q.props.linkages.length > 0 && (Q.props.linkages.forEach((e4) => {
38
+ const t3 = U(e4.fieldName);
39
+ t3 && t3.length > 1 && oe.push(t3[1]);
40
+ }), oe.length > 0 && function() {
41
+ let e4 = [];
42
+ q.pageContext.toolsInputComponents && q.pageContext.toolsInputComponents.length > 0 && q.pageContext.toolsInputComponents.forEach((t3) => {
43
+ if (Q.props.linkages.some((e5) => e5.fieldName === t3.prop) && t3.defaultValue) {
44
+ const n3 = U(t3.prop);
45
+ n3 && n3.length > 1 && e4.push(n3[1]);
67
46
  }
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);
79
47
  });
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);
48
+ if (0 === e4.length) Ge();
49
+ else {
50
+ const t3 = qe();
51
+ e4 = e4.filter((e5) => R(t3, e5)), 0 === e4.length ? (Te(t3), Ge()) : oe.forEach((t4) => {
52
+ o(() => q.pageContext.entity.page[t4], () => {
53
+ const t5 = qe();
54
+ 0 === e4.length ? Te(t5) : (e4 = e4.filter((e5) => R(t5, e5)), 0 === e4.length && Te(t5));
55
+ }, { immediate: true });
189
56
  });
190
57
  }
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";
58
+ }());
59
+ return function(e4) {
60
+ const t3 = Q.props ? Q.props.dataOrigin : {};
61
+ if (t3.treeTable) {
62
+ let n3;
63
+ const o2 = t3.rowKey;
64
+ if (n3 = o2 && o2.indexOf("~~") > 0 ? o2.substring(o2.indexOf("~~") + 2) : o2, e4.parentProp = n3, t3.checkStrictly && (e4.checkStrictly = t3.checkStrictly), e4.parentProp) {
65
+ const o3 = t3.lazy, i3 = t3.defaultExpandAll;
66
+ e4.lazy = null == o3 || o3, e4.defaultExpandAll = null != i3 && i3;
67
+ const a2 = { parentProp: n3, lazy: e4.lazy, defaultExpandAll: e4.defaultExpandAll };
68
+ e4.extraParam.listViewTreeSetting = JSON.stringify(a2), e4.subRowUrl = te + "/dsc/commons/list-subs";
234
69
  }
235
70
  }
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;
270
- });
271
- }
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
- });
71
+ }(i2), function(e4) {
72
+ const t3 = Q.runtime && Q.runtime.events ? Q.runtime.events : [];
73
+ c(e4, t3, G, Q);
74
+ const n3 = G.customEvents;
75
+ n3 && (e4.eventCallBack = n3);
76
+ }(i2), i2;
77
+ }();
78
+ const ae = t(), le = t(), re = function() {
79
+ let e3 = te + "/dsc/commons/list";
80
+ e3 && (e3 = k(e3, Y, Z, G.isTest));
81
+ return e3;
82
+ }(), ue = O(G.code, G.version, Q.uuid), se = G.code + "_" + ue, ce = t([]), pe = G.entity.page, de = t({ data: [] }), fe = G.superGridItems, ge = fe ? fe[Q.uuid] : null, me = t(false), ve = W;
83
+ function he({ rowIndex: e3, column: t2, row: n2, orgRow: o2 }) {
84
+ be(null, null, n2, t2, e3);
85
+ }
86
+ function be(e3, t2, n2, o2, i2) {
87
+ const a2 = ne.value.lineEditSave, l2 = Q;
88
+ a2.props.base.tableUuid = l2.uuid, ie.value.lineEditOptions.beforeSave = Se, G.editData = n2, p({ pageContext: G, configureObj: a2 }).then((l3) => {
89
+ true === l3.canExecute && (ie.value.lineEditOptions.saveRow = ye, le.value.saveRow(i2, ue).then(() => {
90
+ d(G, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
91
+ }));
92
+ }).finally(() => {
93
+ G.editData = null;
94
+ });
95
+ }
96
+ function we(e3) {
97
+ if (!e3) return;
98
+ let t2;
99
+ const n2 = C(e3.events, "click");
100
+ if (n2) {
101
+ if (ne.value[n2] = e3, "lineEditSave" === n2 ? t2 = be : "restoreEdit" === n2 ? t2 = xe : "lineEditUpdate" === n2 ? t2 = De : "lineEditDelete" === n2 && (t2 = Oe), !t2) {
102
+ t2 = x(G, e3.events, "click");
103
+ }
104
+ } else ne.value[e3.uuid] = e3, t2 = Ve;
105
+ return t2;
106
+ }
107
+ function Se({ row: e3, columns: t2, additionalParamMap: n2 }) {
108
+ const o2 = ne.value.lineEditSave, i2 = Q;
109
+ o2.props.base.tableUuid = i2.uuid;
110
+ return f(G, o2, { row: e3, columns: t2 });
111
+ }
112
+ function ye({ row: e3, columns: t2, dataTypeMap: n2, dynamicColumnInfo: o2, additionalParamMap: i2, mainDefaultValueColumns: a2 }) {
113
+ const l2 = ne.value.lineEditSave, r2 = Q;
114
+ return l2.props.base.tableUuid = r2.uuid, new Promise((t3, n3) => {
115
+ const i3 = { tableName: r2.props.dataOrigin.tableName };
116
+ V(G, l2, "/dsc/commons", false, a2, o2, e3, i3).then((e4) => {
117
+ t3(e4 ? e4.entity : {});
118
+ }).catch((e4) => {
119
+ n3(e4);
340
120
  });
121
+ });
122
+ }
123
+ function Ce({ rowIndex: e3, column: t2, row: n2, orgRow: o2 }) {
124
+ xe(null, null, n2, t2, e3);
125
+ }
126
+ function xe(e3, t2, n2, o2, i2) {
127
+ const a2 = ne.value.restoreEdit, l2 = Q;
128
+ a2.props.base.tableUuid = l2.uuid;
129
+ const r2 = f(G, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
130
+ if (!r2) return;
131
+ N(r2) ? r2.then((e4) => {
132
+ e4 && le.value.restoreRow(i2, ue);
133
+ }) : le.value.restoreRow(i2, ue);
134
+ d(G, Q, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
135
+ }
136
+ function De(e3, t2, n2, o2, i2) {
137
+ const a2 = ne.value.lineEditUpdate, l2 = Q;
138
+ a2.props.base.tableUuid = l2.uuid;
139
+ const r2 = f(G, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
140
+ r2 && (N(r2) ? r2.then((l3) => {
141
+ l3 && Ee(e3, t2, n2, o2, i2, a2);
142
+ }) : Ee(e3, t2, n2, o2, i2, a2));
143
+ }
144
+ function Ee(e3, t2, n2, o2, i2, a2) {
145
+ G.editData = n2, p({ pageContext: G, configureObj: a2 }).then((a3) => {
146
+ if (true === a3.canExecute) {
147
+ le.value.editRow(i2, ue);
148
+ d(G, Q, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
149
+ }
150
+ }).finally(() => {
151
+ G.editData = null;
152
+ });
153
+ }
154
+ function Oe(e3, t2, n2, o2, i2) {
155
+ const a2 = ne.value.lineEditDelete, l2 = Q;
156
+ a2.props.base.tableUuid = l2.uuid;
157
+ const r2 = f(G, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
158
+ r2 && (N(r2) ? r2.then((l3) => {
159
+ l3 && ke(e3, t2, n2, o2, i2, a2);
160
+ }) : ke(e3, t2, n2, o2, i2, a2));
161
+ }
162
+ function ke(e3, t2, n2, o2, i2, a2) {
163
+ if (n2.id || n2.ID) G.editData = n2, p({ pageContext: G, configureObj: a2 }).then((e4) => {
164
+ if (true === e4.canExecute) {
165
+ const e5 = [];
166
+ n2.id ? e5.push(n2.id) : e5.push(n2.ID), j.delete({ pageContext: G, configureObj: a2, ids: e5 });
167
+ }
168
+ }).finally(() => {
169
+ G.editData = null;
170
+ });
171
+ else {
172
+ xe(e3, t2, n2, o2, i2);
173
+ d(G, Q, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
341
174
  }
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);
364
- }
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);
175
+ }
176
+ function Te(e3) {
177
+ if (!G.dataTypeMaps) return;
178
+ const t2 = G.dataTypeMaps;
179
+ let n2 = [];
180
+ if (e3) for (var o2 in e3) {
181
+ const a2 = e3[o2];
182
+ if (null != a2 && "" !== a2) if (a2 instanceof Array) {
183
+ if (a2.length > 0) {
184
+ const e4 = [];
185
+ for (var i2 = 0; i2 < a2.length; i2++) {
186
+ const n3 = {};
187
+ 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);
397
188
  }
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
+ n2 = n2.concat(e4);
416
190
  }
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
- });
442
- } else {
443
- deleteRowReal(originalValue, formatValue, row, column, rowIndex, buttonConfigure);
444
- }
445
- }
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
191
  } 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
- }
477
- }
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);
532
- }
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
- }
192
+ const e4 = { leftBracket: "(" };
193
+ 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);
588
194
  }
589
195
  }
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];
709
- });
710
- return values;
196
+ le.value.toolbarRefresh(null, null, n2);
197
+ }
198
+ function Re(e3) {
199
+ const t2 = Ie();
200
+ if (t2) {
201
+ let n2 = 0;
202
+ return e3.searchHeight && (n2 = e3.searchHeight), t2 - 20 - n2;
711
203
  }
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
- }
204
+ }
205
+ function Ie() {
206
+ if (!le.value) return;
207
+ const e3 = M(q.pageContext, q.configure);
208
+ if (e3) {
209
+ if (e3.isCalcHeight) {
210
+ let e4 = le.value.$el;
211
+ if (e4 || (e4 = le.value), !e4) return;
212
+ const t2 = e4.getBoundingClientRect();
213
+ return window.innerHeight - t2.y - 90;
214
+ }
215
+ if (e3.fixHeight && le.value && (le.value.tableHeight = e3.fixHeight), e3.maxHeight) return e3.maxHeight;
759
216
  }
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
- );
217
+ }
218
+ function Ve(e3, t2, n2, o2, i2, a2) {
219
+ const l2 = { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2, button: a2, id: n2.ID ? n2.ID : n2.id }, r2 = ne.value[a2.sourceButton.uuid], u2 = Q;
220
+ r2.props.base.tableUuid = u2.uuid, D(null, G, r2, "click", l2);
221
+ }
222
+ function je(e3) {
223
+ "close_open_win" === e3.data && le.value && le.value.refresh();
224
+ }
225
+ function Ne(e3, t2) {
226
+ ce.value = e3;
227
+ g(G, Q, { selection: e3, row: t2 });
228
+ }
229
+ function Pe(e3) {
230
+ ce.value = e3;
231
+ m(G, Q, { selection: e3 });
232
+ }
233
+ function Be(e3) {
234
+ v(G, Q, { newSelection: e3 });
235
+ }
236
+ function Fe(e3, t2, n2, o2) {
237
+ h(G, Q, { row: e3, column: t2, cell: n2, event: o2 });
238
+ }
239
+ function He(e3, t2, n2, o2) {
240
+ b(G, Q, { row: e3, column: t2, cell: n2, event: o2 });
241
+ }
242
+ function Ue(e3, t2, n2) {
243
+ w(G, Q, { row: e3, column: t2, event: n2 });
244
+ }
245
+ function Me(e3, t2, n2) {
246
+ S(G, Q, { row: e3, column: t2, event: n2 });
247
+ }
248
+ function $e(e3, t2) {
249
+ y(G, Q, { column: e3, event: t2 });
250
+ }
251
+ function _e() {
252
+ ce.value = [];
253
+ }
254
+ function Le(e3) {
255
+ me.value = true;
256
+ }
257
+ function Ae(e3) {
258
+ return $(e3, [], q);
259
+ }
260
+ function ze(e3) {
261
+ return _(e3, e3.cellStyle, q);
262
+ }
263
+ function We(e3) {
264
+ const t2 = e3.titleStyle, n2 = q.configure.style.titleStyle;
265
+ return L(e3, { cellTitleStyle: t2, titleStyle: n2 }, q);
266
+ }
267
+ function qe() {
268
+ const e3 = {};
269
+ return oe.forEach((t2) => {
270
+ e3[t2] = q.pageContext.entity.page[t2];
271
+ }), e3;
272
+ }
273
+ function Ge() {
274
+ oe.forEach((e3) => {
275
+ o(() => q.pageContext.entity.page[e3], () => {
276
+ Te(qe());
769
277
  });
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
799
278
  });
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
- };
826
279
  }
827
- });
280
+ n(() => {
281
+ const e3 = Qe();
282
+ le.value && e3 && e3.distanceToBottom && (le.value.tableHeight = e3.distanceToBottom - 110), q.pageContext.pageRuntimeStyle, window.addEventListener("message", je), F.$on(se + "-close-component-page-dialog", function({ jumpInfo: e4, popEntity: t2, popPageCode: n2 }) {
283
+ le.value.closePageDialog({ entity: t2, pageCode: n2, jumpInfo: e4 });
284
+ }), F.$on(se + "_close-dialog-get-entity", () => {
285
+ F.$emit(se + "_close-super-dialog");
286
+ }), F.$on(ue + "-pickFileDone", (e4) => {
287
+ le.value.pickFileDone(e4);
288
+ }), F.$on(ue + "-scanDone", (e4) => {
289
+ le.value.scanDone(e4);
290
+ }), ie.value.formSetMaxHeight = Ie(), ie.value && ie.value.configureObj.props.base && ie.value.configureObj.props.base.isSafeDelete && ve("setSafeDeleteTableCode", ie.value.extraParam.tableName);
291
+ }), o(() => q.pageContext.searchFormData, (e3) => {
292
+ de.value.data = e3;
293
+ }), o(() => q.pageContext.entity.data, (e3) => {
294
+ Te(q.pageContext.entity.data);
295
+ }), i(() => {
296
+ window.removeEventListener("message", je), F.$off(se + "-close-component-page-dialog"), F.$off(se + "_close-dialog-get-entity"), F.$off(ue + "-pickFileDone"), F.$off(ue + "-scanDone");
297
+ });
298
+ const Qe = () => {
299
+ if (!ae.value) return null;
300
+ let e3 = ae.value.closest(".app-container");
301
+ if (!e3) return null;
302
+ const t2 = ae.value.getBoundingClientRect(), n2 = e3.getBoundingClientRect(), o2 = window.scrollY;
303
+ return { distanceToTop: t2.top + o2 - n2.top, distanceToBottom: n2.bottom - t2.top };
304
+ };
305
+ return z2({ refresh: function(e3, t2, n2, o2) {
306
+ return le.value.refresh(e3, t2, n2, o2);
307
+ }, createRow: function() {
308
+ return le.value.createRow(ue, {}, { getDefaultValueFunc: H });
309
+ }, clearSelections: _e, getSelections: function() {
310
+ return ce.value;
311
+ }, getSelectionIds: function() {
312
+ const e3 = [];
313
+ return null !== ce.value && ce.value.forEach((t2) => {
314
+ e3.push(t2.id ? t2.id : t2.ID ? t2.ID : null);
315
+ }), e3;
316
+ }, getTableConfigure: function() {
317
+ return Q;
318
+ }, isDeleteChange: function(e3) {
319
+ le.value.isDeleteChange(e3);
320
+ }, validatorSunTableListData: function() {
321
+ return le.value.validatorSunTableListData();
322
+ }, showMobileSearch: function() {
323
+ me.value && le.value.showMobileSearch();
324
+ }, getTableSelectOptions: function() {
325
+ if (le.value) return le.value.getTableSelectOptions(ue);
326
+ }, dynamicControlTableEdit: function(e3, t2, n2) {
327
+ le.value && le.value.dynamicControlTableEdit(e3, t2, n2);
328
+ }, doLayout: function(e3) {
329
+ le.value && le.value.doLayout(e3);
330
+ } }), (e3, t2) => {
331
+ const n2 = a("super-grid");
332
+ return r(), l("div", { ref_key: "tableDivRef", ref: ae, id: u(ue) + "_tableDiv" }, [s(n2, { ref_key: "gridRef", ref: le, url: u(re), options: ie.value, code: u(ue), settings: u(ge), "search-form-info": de.value, "list-toolbar-form-data": u(pe), onSelect: Ne, onSelectAll: Pe, onSelectionChange: Be, onCellClick: Fe, onCellDblclick: He, onRowClick: Ue, onRowDblclick: Me, onHeaderClick: $e, onRefresh: _e, onNewOpenGridDialog: u(B), onCanShowMobileSearch: Le }, null, 8, ["url", "options", "code", "settings", "search-form-info", "list-toolbar-form-data", "onNewOpenGridDialog"])], 8, A);
333
+ };
334
+ } });
828
335
  export {
829
- _sfc_main as default
336
+ z as default
830
337
  };