super-page-runtime 2.1.933 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +6 -7
  2. package/dist/es/assets/chart-themes/theme1.js +2 -6
  3. package/dist/es/assets/chart-themes/theme2.js +2 -6
  4. package/dist/es/assets/chart-themes/theme3.js +2 -6
  5. package/dist/es/components/runtime/utils/api/api-util.js +4 -7
  6. package/dist/es/components/runtime/utils/api/page-expose-util.js +137 -433
  7. package/dist/es/components/runtime/utils/assemblys-config.js +12 -366
  8. package/dist/es/components/runtime/utils/barcode-util.js +10 -33
  9. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +138 -300
  10. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -66
  11. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +71 -147
  12. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +52 -122
  13. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +40 -98
  14. package/dist/es/components/runtime/utils/charts/chart-util.js +237 -478
  15. package/dist/es/components/runtime/utils/common-util.js +82 -152
  16. package/dist/es/components/runtime/utils/eventBus.js +3 -9
  17. package/dist/es/components/runtime/utils/events/event-util.js +361 -727
  18. package/dist/es/components/runtime/utils/events/print-label.js +73 -140
  19. package/dist/es/components/runtime/utils/events/standard-event.d.ts +2 -2
  20. package/dist/es/components/runtime/utils/events/standard-event.js +846 -2285
  21. package/dist/es/components/runtime/utils/events/validator-util.js +237 -536
  22. package/dist/es/components/runtime/utils/form/date-shortcuts.js +29 -88
  23. package/dist/es/components/runtime/utils/form/scan-util.js +60 -154
  24. package/dist/es/components/runtime/utils/global-refs.js +45 -69
  25. package/dist/es/components/runtime/utils/i18n-util.js +12 -20
  26. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -0
  27. package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
  28. package/dist/es/components/runtime/utils/page-helper-util.js +296 -630
  29. package/dist/es/components/runtime/utils/page-init-util.d.ts +6 -1
  30. package/dist/es/components/runtime/utils/page-init-util.js +137 -368
  31. package/dist/es/components/runtime/utils/page-permission-util.js +24 -531
  32. package/dist/es/components/runtime/utils/page-store.js +8 -12
  33. package/dist/es/components/runtime/utils/store-util.js +9 -13
  34. package/dist/es/components/runtime/utils/store.js +2 -2
  35. package/dist/es/components/runtime/utils/table-utils.js +49 -84
  36. package/dist/es/components/runtime/utils/tree-utils.js +18 -36
  37. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
  38. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +19 -75
  39. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
  40. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
  41. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
  42. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +37 -132
  43. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
  44. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
  45. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
  46. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
  47. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
  48. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +54 -198
  49. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
  50. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
  51. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
  52. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
  53. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +48 -169
  54. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
  55. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
  56. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -107
  57. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
  58. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -164
  59. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
  60. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -115
  61. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
  62. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -116
  63. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +1 -0
  64. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +242 -439
  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 +37 -231
  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 +191 -511
  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 +23 -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 +310 -800
  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 +255 -592
  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 +43 -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 +44 -154
  111. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +36 -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 +54 -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 +69 -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 -104
  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 +22 -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 +52 -173
  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 +58 -249
  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 +34 -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 +5 -5
  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/placeholder/placeholder-runtime.vue3.js +1 -0
  134. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
  135. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +66 -189
  136. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
  137. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +91 -243
  138. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
  139. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +82 -261
  140. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
  141. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
  142. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
  143. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
  144. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
  145. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +41 -129
  146. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
  147. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
  148. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +133 -252
  149. package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
  150. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
  151. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +19 -46
  152. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
  153. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +22 -49
  154. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
  155. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +21 -58
  156. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
  157. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
  158. package/dist/es/components/runtime/views/super-page-dialog.vue.js +20 -134
  159. package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
  160. package/dist/es/components/runtime/views/super-page.vue.d.ts +9 -0
  161. package/dist/es/components/runtime/views/super-page.vue.js +235 -708
  162. package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
  163. package/dist/es/i18n/langs/cn.js +2 -55
  164. package/dist/es/i18n/langs/en.js +2 -55
  165. package/package.json +74 -73
@@ -1,823 +1,333 @@
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, openBlock as l, createElementBlock as r, createVNode as u, unref as s } from "vue";
2
+ import { setTableEvents as c, canExecuteButton as p, doAfterClickEvent as f, doBeforeClickEvent as d, getEventNameByType as g, getEventFuncByType as m, getHandleEvent as v, gridSelectRecord as h, gridSelectAllRecords as b, gridSelectionChange as w, cellClick as S, cellDblClick as C, rowClick as y, rowDblClick as x, headerClick 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
- }
168
- });
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);
45
+ if (0 === e4.length)
46
+ We();
47
+ else {
48
+ const t3 = ze();
49
+ e4 = e4.filter((e5) => T(t3, e5)), 0 === e4.length ? (Oe(t3), We()) : ne.forEach((t4) => {
50
+ o(() => W.pageContext.entity.page[t4], () => {
51
+ const t5 = ze();
52
+ 0 === e4.length ? Oe(t5) : (e4 = e4.filter((e5) => T(t5, e5)), 0 === e4.length && Oe(t5));
53
+ }, { immediate: true });
186
54
  });
187
55
  }
188
- }
189
- function setOperationButtons(options) {
190
- const operationButtons = [];
191
- if (!options.operations) {
192
- options.operations = {};
193
- }
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";
228
- }
229
- }
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;
56
+ }());
57
+ return function(e4) {
58
+ const t3 = G.props ? G.props.dataOrigin : {};
59
+ if (t3.treeTable) {
60
+ let n3;
61
+ const o2 = t3.rowKey;
62
+ if (n3 = o2 && o2.indexOf("~~") > 0 ? o2.substring(o2.indexOf("~~") + 2) : o2, e4.parentProp = n3, e4.parentProp) {
63
+ const o3 = t3.lazy, i3 = t3.defaultExpandAll;
64
+ e4.lazy = null == o3 || o3, e4.defaultExpandAll = null != i3 && i3;
65
+ const a2 = { parentProp: n3, lazy: e4.lazy, defaultExpandAll: e4.defaultExpandAll };
66
+ e4.extraParam.listViewTreeSetting = JSON.stringify(a2), e4.subRowUrl = ee + "/dsc/commons/list-subs";
282
67
  }
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
68
  }
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
- });
69
+ }(i2), function(e4) {
70
+ const t3 = G.runtime && G.runtime.events ? G.runtime.events : [];
71
+ c(e4, t3, q, G);
72
+ const n3 = q.customEvents;
73
+ n3 && (e4.eventCallBack = n3);
74
+ }(i2), i2;
75
+ }();
76
+ const ie = t(), ae = function() {
77
+ let e3 = ee + "/dsc/commons/list";
78
+ e3 && (e3 = k(e3, K, Y, q.isTest));
79
+ return e3;
80
+ }(), 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;
81
+ function me({ rowIndex: e3, column: t2, row: n2, orgRow: o2 }) {
82
+ ve(null, null, n2, t2, e3);
83
+ }
84
+ function ve(e3, t2, n2, o2, i2) {
85
+ const a2 = te.value.lineEditSave, l2 = G;
86
+ a2.props.base.tableUuid = l2.uuid, oe.value.lineEditOptions.beforeSave = be, q.editData = n2, p({ pageContext: q, configureObj: a2 }).then((l3) => {
87
+ true === l3.canExecute && (oe.value.lineEditOptions.saveRow = we, ie.value.saveRow(i2, le).then(() => {
88
+ f(q, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
89
+ }));
90
+ }).finally(() => {
91
+ q.editData = null;
92
+ });
93
+ }
94
+ function he(e3) {
95
+ if (!e3)
96
+ return;
97
+ let t2;
98
+ const n2 = g(e3.events, "click");
99
+ if (n2) {
100
+ if (te.value[n2] = e3, "lineEditSave" === n2 ? t2 = ve : "restoreEdit" === n2 ? t2 = Ce : "lineEditUpdate" === n2 ? t2 = ye : "lineEditDelete" === n2 && (t2 = Ee), !t2) {
101
+ t2 = m(q, e3.events, "click");
102
+ }
103
+ } else
104
+ te.value[e3.uuid] = e3, t2 = Te;
105
+ return t2;
106
+ }
107
+ function be({ row: e3, columns: t2, additionalParamMap: n2 }) {
108
+ const o2 = te.value.lineEditSave, i2 = G;
109
+ o2.props.base.tableUuid = i2.uuid;
110
+ return d(q, o2, { row: e3, columns: t2 });
111
+ }
112
+ function we({ row: e3, columns: t2, dataTypeMap: n2, dynamicColumnInfo: o2, additionalParamMap: i2, mainDefaultValueColumns: a2 }) {
113
+ const l2 = te.value.lineEditSave, r2 = G;
114
+ return l2.props.base.tableUuid = r2.uuid, new Promise((t3, n3) => {
115
+ const i3 = { tableName: r2.props.dataOrigin.tableName };
116
+ V(q, l2, "/dsc/commons", false, a2, o2, e3, i3).then((e4) => {
117
+ t3(e4 ? e4.entity : {});
118
+ }).catch((e4) => {
119
+ n3(e4);
334
120
  });
335
- }
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);
391
- }
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);
121
+ });
122
+ }
123
+ function Se({ rowIndex: e3, column: t2, row: n2, orgRow: o2 }) {
124
+ Ce(null, null, n2, t2, e3);
125
+ }
126
+ function Ce(e3, t2, n2, o2, i2) {
127
+ const a2 = te.value.restoreEdit, l2 = G;
128
+ a2.props.base.tableUuid = l2.uuid;
129
+ const r2 = d(q, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
130
+ if (!r2)
131
+ return;
132
+ N(r2) ? r2.then((e4) => {
133
+ e4 && ie.value.restoreRow(i2, le);
134
+ }) : ie.value.restoreRow(i2, le);
135
+ f(q, G, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
136
+ }
137
+ function ye(e3, t2, n2, o2, i2) {
138
+ const a2 = te.value.lineEditUpdate, l2 = G;
139
+ a2.props.base.tableUuid = l2.uuid;
140
+ const r2 = d(q, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
141
+ r2 && (N(r2) ? r2.then((l3) => {
142
+ l3 && xe(e3, t2, n2, o2, i2, a2);
143
+ }) : xe(e3, t2, n2, o2, i2, a2));
144
+ }
145
+ function xe(e3, t2, n2, o2, i2, a2) {
146
+ q.editData = n2, p({ pageContext: q, configureObj: a2 }).then((a3) => {
147
+ if (true === a3.canExecute) {
148
+ ie.value.editRow(i2, le);
149
+ f(q, G, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
150
+ }
151
+ }).finally(() => {
152
+ q.editData = null;
153
+ });
154
+ }
155
+ function Ee(e3, t2, n2, o2, i2) {
156
+ const a2 = te.value.lineEditDelete, l2 = G;
157
+ a2.props.base.tableUuid = l2.uuid;
158
+ const r2 = d(q, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
159
+ r2 && (N(r2) ? r2.then((l3) => {
160
+ l3 && De(e3, t2, n2, o2, i2, a2);
161
+ }) : De(e3, t2, n2, o2, i2, a2));
162
+ }
163
+ function De(e3, t2, n2, o2, i2, a2) {
164
+ if (n2.id || n2.ID)
165
+ q.editData = n2, p({ pageContext: q, configureObj: a2 }).then((e4) => {
166
+ if (true === e4.canExecute) {
167
+ const e5 = [];
168
+ n2.id ? e5.push(n2.id) : e5.push(n2.ID), j.delete({ pageContext: q, configureObj: a2, ids: e5 });
410
169
  }
411
170
  }).finally(() => {
412
- pageContext.editData = null;
171
+ q.editData = null;
413
172
  });
173
+ else {
174
+ Ce(e3, t2, n2, o2, i2);
175
+ f(q, G, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
414
176
  }
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
- } else {
437
- deleteRowReal(originalValue, formatValue, row, column, rowIndex, buttonConfigure);
438
- }
439
- }
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);
177
+ }
178
+ function Oe(e3) {
179
+ if (!q.dataTypeMaps)
180
+ return;
181
+ const t2 = q.dataTypeMaps;
182
+ let n2 = [];
183
+ if (e3)
184
+ for (var o2 in e3) {
185
+ const a2 = e3[o2];
186
+ if (null != a2 && "" !== a2)
187
+ if (a2 instanceof Array) {
188
+ if (a2.length > 0) {
189
+ const e4 = [];
190
+ for (var i2 = 0; i2 < a2.length; i2++) {
191
+ const n3 = {};
192
+ 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);
508
193
  }
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);
194
+ n2 = n2.concat(e4);
520
195
  }
196
+ } else {
197
+ const e4 = { leftBracket: "(" };
198
+ 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);
521
199
  }
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
200
  }
201
+ ie.value.toolbarRefresh(null, null, n2);
202
+ }
203
+ function ke(e3) {
204
+ const t2 = Ie();
205
+ if (t2) {
206
+ let n2 = 0;
207
+ return e3.searchHeight && (n2 = e3.searchHeight), t2 - 20 - n2;
536
208
  }
537
- function getComponentHeight() {
538
- if (!gridRef.value) {
209
+ }
210
+ function Ie() {
211
+ if (!ie.value)
212
+ return;
213
+ const e3 = F(W.pageContext, W.configure);
214
+ if (e3 && e3.isCalcHeight) {
215
+ let e4 = ie.value.$el;
216
+ if (e4 || (e4 = ie.value), !e4)
539
217
  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
- }
218
+ const t2 = e4.getBoundingClientRect();
219
+ return window.innerHeight - t2.y - 90;
679
220
  }
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;
704
- }
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
- }
752
- }
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
- );
221
+ }
222
+ function Te(e3, t2, n2, o2, i2, a2) {
223
+ const l2 = { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2, button: a2 }, r2 = te.value[a2.sourceButton.uuid], u2 = G;
224
+ r2.props.base.tableUuid = u2.uuid, v(null, q, r2, "click", l2);
225
+ }
226
+ function Re(e3) {
227
+ "close_open_win" === e3.data && ie.value && ie.value.refresh();
228
+ }
229
+ function Ve(e3, t2) {
230
+ ue.value = e3;
231
+ h(q, G, { selection: e3, row: t2 });
232
+ }
233
+ function je(e3) {
234
+ ue.value = e3;
235
+ b(q, G, { selection: e3 });
236
+ }
237
+ function Ne(e3) {
238
+ w(q, G, { newSelection: e3 });
239
+ }
240
+ function Pe(e3, t2, n2, o2) {
241
+ S(q, G, { row: e3, column: t2, cell: n2, event: o2 });
242
+ }
243
+ function Ue(e3, t2, n2, o2) {
244
+ C(q, G, { row: e3, column: t2, cell: n2, event: o2 });
245
+ }
246
+ function Be(e3, t2, n2) {
247
+ y(q, G, { row: e3, column: t2, event: n2 });
248
+ }
249
+ function Me(e3, t2, n2) {
250
+ x(q, G, { row: e3, column: t2, event: n2 });
251
+ }
252
+ function $e(e3, t2) {
253
+ E(q, G, { column: e3, event: t2 });
254
+ }
255
+ function Fe() {
256
+ ue.value = [];
257
+ }
258
+ function _e(e3) {
259
+ de.value = true;
260
+ }
261
+ function Le(e3) {
262
+ return _(e3, [], W);
263
+ }
264
+ function Ae(e3) {
265
+ return L(e3, e3.cellStyle, W);
266
+ }
267
+ function He(e3) {
268
+ const t2 = e3.titleStyle, n2 = W.configure.style.titleStyle;
269
+ return A(e3, { cellTitleStyle: t2, titleStyle: n2 }, W);
270
+ }
271
+ function ze() {
272
+ const e3 = {};
273
+ return ne.forEach((t2) => {
274
+ e3[t2] = W.pageContext.entity.page[t2];
275
+ }), e3;
276
+ }
277
+ function We() {
278
+ ne.forEach((e3) => {
279
+ o(() => W.pageContext.entity.page[e3], () => {
280
+ Oe(ze());
762
281
  });
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
282
  });
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
283
  }
820
- });
284
+ return n(() => {
285
+ window.addEventListener("message", Re), B.$on(re + "-close-component-page-dialog", function({ jumpInfo: e3, popEntity: t2, popPageCode: n2 }) {
286
+ ie.value.closePageDialog({ entity: t2, pageCode: n2, jumpInfo: e3 });
287
+ }), B.$on(re + "_close-dialog-get-entity", () => {
288
+ B.$emit(re + "_close-super-dialog");
289
+ }), B.$on(le + "-pickFileDone", (e3) => {
290
+ ie.value.pickFileDone(e3);
291
+ }), B.$on(le + "-scanDone", (e3) => {
292
+ ie.value.scanDone(e3);
293
+ }), oe.value.formSetMaxHeight = Ie(), oe.value && oe.value.configureObj.props.base && oe.value.configureObj.props.base.isSafeDelete && ge("setSafeDeleteTableCode", oe.value.extraParam.tableName);
294
+ }), o(() => W.pageContext.searchFormData, (e3) => {
295
+ ce.value.data = e3;
296
+ }), o(() => W.pageContext.entity.data, (e3) => {
297
+ Oe(W.pageContext.entity.data);
298
+ }), i(() => {
299
+ B.$off(re + "-close-component-page-dialog"), B.$off(re + "_close-dialog-get-entity"), B.$off(le + "-pickFileDone"), B.$off(le + "-scanDone");
300
+ }), H2({ refresh: function() {
301
+ return ie.value.refresh();
302
+ }, createRow: function() {
303
+ return ie.value.createRow(le, {}, { getDefaultValueFunc: M });
304
+ }, clearSelections: Fe, getSelections: function() {
305
+ return ue.value;
306
+ }, getSelectionIds: function() {
307
+ const e3 = [];
308
+ return null !== ue.value && ue.value.forEach((t2) => {
309
+ e3.push(t2.id ? t2.id : t2.ID ? t2.ID : null);
310
+ }), e3;
311
+ }, getTableConfigure: function() {
312
+ return G;
313
+ }, isDeleteChange: function(e3) {
314
+ ie.value.isDeleteChange(e3);
315
+ }, validatorSunTableListData: function() {
316
+ return ie.value.validatorSunTableListData();
317
+ }, showMobileSearch: function() {
318
+ de.value && ie.value.showMobileSearch();
319
+ }, getTableSelectOptions: function() {
320
+ if (ie.value)
321
+ return ie.value.getTableSelectOptions(le);
322
+ }, dynamicControlTableEdit: function(e3, t2, n2) {
323
+ ie.value && ie.value.dynamicControlTableEdit(e3, t2, n2);
324
+ }, doLayout: function(e3) {
325
+ ie.value && ie.value.doLayout(e3);
326
+ } }), (e3, t2) => {
327
+ const n2 = a("super-grid");
328
+ return l(), r("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"])]);
329
+ };
330
+ } });
821
331
  export {
822
- _sfc_main as default
332
+ H as default
823
333
  };