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,604 +1,267 @@
1
- import { defineComponent, ref, onMounted, onUnmounted, resolveComponent, openBlock, createElementBlock, createBlock, unref, createCommentVNode } from "vue";
2
- import { setTableEvents, gridSelectRecord, gridSelectAllRecords, gridSelectionChange, cellClick, cellDblClick, rowClick, rowDblClick, headerClick } from "../../../../utils/events/event-util.js";
3
- import { caculateShowCondition, setVariableValue, getVariableValue, getSizeConfig } from "../../../../utils/page-helper-util.js";
4
- import { getModelFields, getDefaultValue } from "../../../../utils/page-init-util.js";
5
- import eventBus from "../../../../utils/eventBus.js";
6
- import { popupToPage, getOperationButtons } from "../../../../utils/table-utils.js";
7
- import { getListCode, getBaseUrl } from "../../../../utils/common-util.js";
8
- import { getAdditionalParamMap } from "../../../../utils/events/standard-event.js";
9
- import { getRowStyleUtil, getCellStyleUtil, getHeaderCellStyleUtil } from "../../chart/table/chart-table-util.js";
10
- const _sfc_main = /* @__PURE__ */ defineComponent({
11
- __name: "sub-table-runtime",
12
- props: {
13
- pageContext: {},
14
- configure: {}
15
- },
16
- emits: ["setSafeDeleteTableCode"],
17
- setup(__props, { expose: __expose, emit: __emit }) {
18
- const props = __props;
19
- const pageContext = props.pageContext;
20
- const configure = props.configure;
21
- const listCode = getListCode(pageContext.code, pageContext.version, configure.uuid);
22
- const dataModel = pageContext.entity.data;
23
- const prop = configure.code ? configure.code : listCode;
24
- const additionalParamMap = getAdditionalParamMap(pageContext);
25
- const tableEvents = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
26
- const selections = ref([]);
27
- const superGridItems = pageContext.superGridItems;
28
- const superGridSetting = superGridItems ? superGridItems[configure.uuid] : null;
29
- console.log("superGridSetting===", superGridItems, superGridSetting);
30
- const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
31
- const runtimeStyle = runtimeInfo.style;
32
- const runtimeClass = runtimeInfo.class;
33
- const entity = props.pageContext.entity ? props.pageContext.entity : {};
34
- let dynamicFields = getModelFields(props.configure, prop);
35
- let baseURL = getBaseUrl(pageContext.backendUrl, pageContext.isTest);
36
- if (!baseURL) {
37
- baseURL = window["$vueApp"].config.globalProperties.baseURL;
38
- }
39
- const listViewShowFlag = ref(false);
40
- let componentKey = ref(0);
41
- const listViewOptions = ref({
42
- isSql: true,
43
- subTableData: null,
44
- extraParam: {},
45
- operations: {},
46
- hiddenColumns: [],
47
- pageCode: pageContext.code,
48
- pageVersion: pageContext.version,
49
- pageContext,
50
- configureObj: configure,
51
- showPageArea: false,
52
- showRowForm: false,
53
- showOverflowTooltip: !!(configure.props && configure.props.otherSettings && (configure.props.otherSettings.isBreakLine === void 0 || configure.props.otherSettings.isBreakLine === false)),
54
- // 单元格内容是否换行显示
55
- backendUrl: baseURL,
56
- cellStyleRender: getCellStyle,
57
- rowStyleRender: getRowStyle,
58
- titleStyleRender: getTitleStyle
59
- });
60
- const $emit = __emit;
61
- if (runtimeStyle) {
62
- listViewOptions.value["tableStyle"] = runtimeStyle;
63
- }
64
- if (runtimeClass) {
65
- listViewOptions.value["tableClass"] = runtimeClass;
66
- }
67
- if (configure.props && configure.props.base && configure.props.base.subPaging === true) {
68
- listViewOptions.value.showPageArea = true;
69
- } else {
70
- listViewOptions.value.showPageArea = false;
71
- }
72
- if (configure.props.base.showRowForm) {
73
- listViewOptions.value.showRowForm = configure.props.base.showRowForm;
74
- }
75
- const gridRef = ref(null);
76
- onMounted(() => {
77
- const tableUuid = configure.uuid;
78
- const subTableWatchProps = pageContext.subTableWatchProps;
79
- eventBus.$on("_refreshSubTable_" + tableUuid, (params) => {
80
- console.log("-_refreshSubTable--tableUuid=", tableUuid, "params=", params);
81
- const propName = params.propName;
82
- if (subTableWatchProps && subTableWatchProps[tableUuid] && subTableWatchProps[tableUuid].length > 0) {
83
- const mainFormProps = subTableWatchProps[tableUuid];
84
- if (mainFormProps.indexOf(propName) >= 0) {
85
- reloadSubTableData();
86
- }
87
- }
88
- });
89
- eventBus.$on("_refreshSubTableHandle_" + tableUuid, (params) => {
90
- console.log("-_refreshSubTableHandle_--tableUuid=", tableUuid, "params=", params);
91
- reloadSubTableData();
92
- });
93
- eventBus.$on(
94
- "_refreshChildData_" + tableUuid,
95
- (gridData) => {
96
- console.log("-_refreshChildData_--tableUuid=", tableUuid);
97
- refreshChildTableData(gridData);
1
+ import { defineComponent as e, ref as t, onMounted as n, onUnmounted as o, resolveComponent as a, openBlock as i, createElementBlock as l, createBlock as u, unref as s, createCommentVNode as r } from "vue";
2
+ import { setTableEvents as c, gridSelectRecord as p, gridSelectAllRecords as f, gridSelectionChange as d, cellClick as b, cellDblClick as v, rowClick as g, rowDblClick as m, headerClick as h } from "../../../../utils/events/event-util.js";
3
+ import { caculateShowCondition as S, setVariableValue as w, getVariableValue as x, getSizeConfig as T } from "../../../../utils/page-helper-util.js";
4
+ import { getModelFields as D, getDefaultValue as C } from "../../../../utils/page-init-util.js";
5
+ import y from "../../../../utils/eventBus.js";
6
+ import { popupToPage as P, getOperationButtons as R } from "../../../../utils/table-utils.js";
7
+ import { getListCode as I, getBaseUrl as _ } from "../../../../utils/common-util.js";
8
+ import { getAdditionalParamMap as O } from "../../../../utils/events/standard-event.js";
9
+ import { getRowStyleUtil as k, getCellStyleUtil as M, getHeaderCellStyleUtil as F } from "../../chart/table/chart-table-util.js";
10
+ const $ = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure: {} }, emits: ["setSafeDeleteTableCode"], setup(e2, { expose: $2, emit: j }) {
11
+ const N = e2, A = N.pageContext;
12
+ let H = N.configure;
13
+ const E = N.configure.runtime ? N.configure.runtime : {};
14
+ A.isTest ? E.value = N.configure.runtime ? N.configure.runtime : {} : A.tableRuntimes && A.tableRuntimes[H.uuid] && (H = JSON.parse(A.tableRuntimes[H.uuid].configure), E.value = H.runtime ? H.runtime : {});
15
+ const L = I(A.code, A.version, H.uuid), z = A.entity.data, B = H.code ? H.code : L, U = O(A), G = E && E.events ? E.events : [], V = t([]), J = A.superGridItems, q = J ? J[H.uuid] : null, Q = E.style, W = E.class, K = N.pageContext.entity ? N.pageContext.entity : {};
16
+ let X = D(N.configure, B), Y = _(A.backendUrl, A.isTest);
17
+ Y || (Y = window.$vueApp.config.globalProperties.baseURL);
18
+ const Z = t(false);
19
+ let ee = t(0);
20
+ const te = t({ isSql: true, subTableData: null, extraParam: {}, operations: {}, hiddenColumns: [], pageCode: A.code, pageVersion: A.version, pageContext: A, configureObj: H, showPageArea: false, showRowForm: false, showOverflowTooltip: !(!H.props || !H.props.otherSettings || void 0 !== H.props.otherSettings.isBreakLine && false !== H.props.otherSettings.isBreakLine), backendUrl: Y, cellStyleRender: function(e3) {
21
+ return M(e3, e3.cellStyle, N);
22
+ }, rowStyleRender: function(e3) {
23
+ return k(e3, null, N);
24
+ }, titleStyleRender: function(e3) {
25
+ const t2 = e3.titleStyle, n2 = N.configure.style.titleStyle;
26
+ return F(e3, { cellTitleStyle: t2, titleStyle: n2 }, N);
27
+ } }), ne = j;
28
+ Q && (te.value.tableStyle = Q), W && (te.value.tableClass = W), H.props && H.props.base && true === H.props.base.subPaging ? te.value.showPageArea = true : te.value.showPageArea = false, H.props.base.showRowForm && (te.value.showRowForm = H.props.base.showRowForm);
29
+ const oe = t(null);
30
+ function ae() {
31
+ oe.value && (te.value.subTableData = null, oe.value.reloadSubTableData(L));
32
+ }
33
+ function ie(e3) {
34
+ if (void 0 === e3 && (e3 = le()), te.value.isPageInfo = false, te.value.isFormSubTable = true, te.value.canRrefreshSubtableData = e3, te.value.getFormData = ue, te.value.getGridData = se, te.value.extraParam.subTableListViewCode = L, te.value.extraParam.beanName = A.beanName, te.value.extraParam.subtableSetting = H.props && H.props.otherSettings ? JSON.stringify(H.props.otherSettings) : null, te.value.extraParam.additionalParamMap = U, te.value.extraParam.entityMap = A.entity.data, te.value.extraParam.contextMap = A.entity.context, te.value.extraParam.taskMap = A.entity.task, !(H.props && H.props.base && H.props.base.showOperation)) {
35
+ let e4 = te.value.hiddenColumns;
36
+ e4 ? e4.push("operation") : e4 = ["operation"], te.value.hiddenColumns = e4;
37
+ }
38
+ te.value.showOperationButton = !(!H.props || !H.props.base) && H.props.base.showOperation, te.value.isPdfEditor = false, te.value.tableRecordMaxNum = H.props && H.props.otherSettings ? H.props.otherSettings.tableRecordMaxNum : null;
39
+ let t2 = T(A, H);
40
+ t2 && t2.fixHeight && (te.value.formSetHeight = t2.fixHeight), t2 && t2.maxHeight && (te.value.formSetMaxHeight = t2.maxHeight);
41
+ }
42
+ function le() {
43
+ if (H.props && H.props.otherSettings) {
44
+ if (H.props.otherSettings.sourceQueryTableData && H.props.otherSettings.timeToInitializeSubTable && H.props.otherSettings.timeToInitializeSubTable.length > 0) {
45
+ let e3 = false;
46
+ if (-1 !== H.props.otherSettings.timeToInitializeSubTable.indexOf("create") && (e3 = !z.id && !z.ID), -1 !== H.props.otherSettings.timeToInitializeSubTable.indexOf("noData")) {
47
+ const t2 = z[B];
48
+ (!t2 || t2.length <= 0) && (e3 = true);
98
49
  }
99
- );
100
- eventBus.$on(listCode + "-pickFileDone", (data) => {
101
- console.log("superPage5555---listCode---pickFileDone--listCode=", listCode, "data=", data);
102
- gridRef.value.pickFileDone(data);
103
- });
104
- eventBus.$on(listCode + "-scanDone", (data) => {
105
- console.log("superPage5555---listCode---scanDone--listCode=", listCode, "data=", data);
106
- gridRef.value.scanDone(data);
107
- });
108
- if (listViewOptions.value && listViewOptions.value.configureObj.props.base && listViewOptions.value.configureObj.props.base.isSafeDelete) {
109
- $emit("setSafeDeleteTableCode", listViewOptions.value.extraParam.tableName);
110
- }
111
- });
112
- function reloadSubTableData() {
113
- if (gridRef.value) {
114
- listViewOptions.value["subTableData"] = null;
115
- gridRef.value.reloadSubTableData(listCode);
50
+ return e3;
116
51
  }
52
+ return false;
117
53
  }
118
- onUnmounted(() => {
119
- const tableUuid = configure.uuid;
120
- eventBus.$off("_refreshSubTable_" + tableUuid);
121
- eventBus.$off("_refreshSubTableHandle_" + tableUuid);
122
- eventBus.$off("_refreshChildData_" + tableUuid);
123
- eventBus.$off(listCode + "-pickFileDone");
124
- eventBus.$off(listCode + "-scanDone");
125
- });
126
- function currencyListViewSetting(canRrefreshSubtableData) {
127
- if (canRrefreshSubtableData === void 0) {
128
- canRrefreshSubtableData = judgeInitializationSubTable();
129
- }
130
- listViewOptions.value["isPageInfo"] = false;
131
- listViewOptions.value["isFormSubTable"] = true;
132
- listViewOptions.value["canRrefreshSubtableData"] = canRrefreshSubtableData;
133
- listViewOptions.value["getFormData"] = getParentFormData;
134
- listViewOptions.value["getGridData"] = getGridData;
135
- listViewOptions.value.extraParam["subTableListViewCode"] = listCode;
136
- listViewOptions.value.extraParam["beanName"] = pageContext.beanName;
137
- listViewOptions.value.extraParam["subtableSetting"] = configure.props && configure.props.otherSettings ? JSON.stringify(configure.props.otherSettings) : null;
138
- listViewOptions.value.extraParam["additionalParamMap"] = additionalParamMap;
139
- listViewOptions.value.extraParam["entityMap"] = pageContext.entity.data;
140
- listViewOptions.value.extraParam["contextMap"] = pageContext.entity.context;
141
- listViewOptions.value.extraParam["taskMap"] = pageContext.entity.task;
142
- if (!(configure.props && configure.props.base && configure.props.base.showOperation)) {
143
- let hiddenColumns = listViewOptions.value.hiddenColumns;
144
- if (!hiddenColumns) {
145
- hiddenColumns = ["operation"];
146
- } else {
147
- hiddenColumns.push("operation");
54
+ }
55
+ function ue() {
56
+ return A.entity.data;
57
+ }
58
+ function se() {
59
+ return x(K, X);
60
+ }
61
+ function re(e3) {
62
+ ie(e3), te.value.subTableData = null, ce(), Z.value = false, setTimeout(() => {
63
+ Z.value = true, ee.value = ee.value + 1, pe();
64
+ }, 10);
65
+ }
66
+ function ce() {
67
+ !function() {
68
+ const e4 = A.fieldPermissionMap, t2 = A.actionPermissionMap;
69
+ if (e4 && null != e4) {
70
+ let t3 = e4.get(B);
71
+ if (!t3) {
72
+ const n3 = e4.get("all_fields");
73
+ n3 && (t3 = [n3]);
148
74
  }
149
- listViewOptions.value["hiddenColumns"] = hiddenColumns;
150
- }
151
- listViewOptions.value["showOperationButton"] = configure.props && configure.props.base ? configure.props.base.showOperation : false;
152
- listViewOptions.value["isPdfEditor"] = false;
153
- listViewOptions.value["tableRecordMaxNum"] = configure.props && configure.props.otherSettings ? configure.props.otherSettings.tableRecordMaxNum : null;
154
- let sizeConfig = getSizeConfig(pageContext, configure);
155
- if (sizeConfig && sizeConfig.fixHeight) {
156
- listViewOptions.value["formSetHeight"] = sizeConfig.fixHeight;
157
- }
158
- if (sizeConfig && sizeConfig.maxHeight) {
159
- listViewOptions.value["formSetMaxHeight"] = sizeConfig.maxHeight;
160
- }
161
- }
162
- function judgeInitializationSubTable() {
163
- if (!configure.props || !configure.props.otherSettings) {
164
- return;
165
- }
166
- if (configure.props.otherSettings.sourceQueryTableData && configure.props.otherSettings.timeToInitializeSubTable && configure.props.otherSettings.timeToInitializeSubTable.length > 0) {
167
- let flag = false;
168
- if (configure.props.otherSettings.timeToInitializeSubTable.indexOf("create") !== -1) {
169
- if (dataModel.id || dataModel.ID) {
170
- flag = false;
171
- } else {
172
- flag = true;
173
- }
75
+ te.value.validateRules = t3 || null;
76
+ }
77
+ if (t2 && null != t2) {
78
+ let e5 = t2.get(B);
79
+ e5 || (e5 = t2.get("all_sub_tables")), te.value.actionPermission = e5;
80
+ }
81
+ te.value.operations || (te.value.operations = {});
82
+ const n2 = function() {
83
+ let e5 = [], t3 = S(N.pageContext, H.props.base.showOperationCondition);
84
+ if (t3 && fe()) {
85
+ const t4 = { props: { elementType: "el-button", icon: "Plus", type: "primary", circle: true, size: "mini", permission: "true" }, onClick: ge, isShow: de };
86
+ e5.push(t4);
174
87
  }
175
- if (configure.props.otherSettings.timeToInitializeSubTable.indexOf("noData") !== -1) {
176
- const tableData = dataModel[prop];
177
- if (!tableData || tableData.length <= 0) {
178
- flag = true;
179
- }
88
+ if (t3 && be(null, null, null, null, null, true)) {
89
+ const t4 = { props: { elementType: "el-button", icon: "Minus", type: "danger", circle: true, size: "mini", permission: "true" }, onClick: me, isShow: ve };
90
+ e5.push(t4);
180
91
  }
181
- return flag;
182
- } else {
183
- return false;
184
- }
185
- }
186
- function getParentFormData() {
187
- return pageContext.entity.data;
188
- }
189
- function getGridData() {
190
- return getVariableValue(entity, dynamicFields);
191
- }
192
- function initializationSubTable() {
193
- const canRrefreshSubtableData = judgeInitializationSubTable();
194
- if (canRrefreshSubtableData) {
195
- changeInitializationSubTable(canRrefreshSubtableData);
196
- } else {
197
- currencyListViewSetting(canRrefreshSubtableData);
198
- listViewOptions.value["isPageInfo"] = false;
199
- listViewOptions.value["subTableData"] = getValue();
200
- setGridDataEventOptions();
201
- }
202
- }
203
- function changeInitializationSubTable(canRrefreshSubtableData) {
204
- currencyListViewSetting(canRrefreshSubtableData);
205
- listViewOptions.value["subTableData"] = null;
206
- setGridDataEventOptions();
207
- listViewShowFlag.value = false;
208
- setTimeout(() => {
209
- listViewShowFlag.value = true;
210
- componentKey.value = componentKey.value + 1;
211
- setGridToStore();
212
- }, 10);
213
- }
214
- function setGridDataEventOptions() {
215
- setSubTableValidateInfo();
216
- setTableEvents(listViewOptions.value, tableEvents, pageContext, configure);
217
- const customEvents = pageContext.customEvents;
218
- if (customEvents) {
219
- listViewOptions.value["eventCallBack"] = customEvents;
220
- }
221
- listViewShowFlag.value = true;
222
- setGridToStore();
223
- }
224
- function setSubTableValidateInfo() {
225
- const fieldPermissionMap = pageContext.fieldPermissionMap;
226
- const actionPermissionMap = pageContext.actionPermissionMap;
227
- if (fieldPermissionMap && fieldPermissionMap != null) {
228
- let validateRules = fieldPermissionMap.get(prop);
229
- if (!validateRules) {
230
- const allValidateRules = fieldPermissionMap.get("all_fields");
231
- if (allValidateRules) {
232
- validateRules = [allValidateRules];
92
+ return R(A, H, e5), e5;
93
+ }();
94
+ te.value.operations.operation = n2, te.value.subTableCanAdd = fe();
95
+ }(), c(te.value, G, A, H);
96
+ const e3 = A.customEvents;
97
+ e3 && (te.value.eventCallBack = e3), Z.value = true, pe();
98
+ }
99
+ function pe() {
100
+ A.tableUuids || (A.tableUuids = []), A.tableUuids.indexOf(H.uuid) < 0 && A.tableUuids.push(H.uuid);
101
+ }
102
+ function fe(e3, t2, n2, o2, a2, i2) {
103
+ if (!S(N.pageContext, H.props.base.showOperationCondition))
104
+ return false;
105
+ const l2 = A.fieldPermissionMap, u2 = A.actionPermissionMap;
106
+ let s2 = true;
107
+ if (l2 && null !== l2) {
108
+ const e4 = l2.get("all_fields");
109
+ void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (s2 = false);
110
+ }
111
+ if (true === s2 && B && u2 && null !== u2) {
112
+ let e4 = u2.get(B);
113
+ e4 || (e4 = u2.get("all_sub_tables")), e4 && void 0 !== e4.canAdd && false === e4.canAdd && (s2 = false);
114
+ }
115
+ return s2;
116
+ }
117
+ function de(e3, t2, n2, o2, a2, i2) {
118
+ let l2 = fe();
119
+ return true === l2 && (l2 = S(N.pageContext, H.props.base.showAddBtnCondition, n2)), l2;
120
+ }
121
+ function be(e3, t2, n2, o2, a2, i2) {
122
+ const l2 = A.fieldPermissionMap, u2 = A.actionPermissionMap;
123
+ let s2 = true;
124
+ if (l2 && null !== l2) {
125
+ const e4 = l2.get("all_fields");
126
+ void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (s2 = false);
127
+ }
128
+ if (true === s2 && B && u2 && null !== u2) {
129
+ let e4 = u2.get(B);
130
+ if (e4 || (e4 = u2.get("all_sub_tables")), e4 && void 0 !== e4.canDelete && false === e4.canDelete && (s2 = false), e4 && void 0 !== e4.canDelete && true === e4.canDelete && e4.deleteRowIndexes)
131
+ if (e4.deleteRowIndexes.length > 0)
132
+ if (i2)
133
+ s2 = true;
134
+ else {
135
+ const t3 = function(e5) {
136
+ return e5 && e5.id ? e5.id : e5 && e5.ID ? e5.ID : void 0;
137
+ }(n2);
138
+ s2 = void 0 !== t3 && e4.deleteRowIndexes.indexOf(t3) >= 0;
233
139
  }
234
- }
235
- if (validateRules) {
236
- listViewOptions.value["validateRules"] = validateRules;
237
- } else {
238
- listViewOptions.value["validateRules"] = null;
239
- }
240
- }
241
- if (actionPermissionMap && actionPermissionMap != null) {
242
- let actionPermission = actionPermissionMap.get(prop);
243
- if (!actionPermission) {
244
- actionPermission = actionPermissionMap.get("all_sub_tables");
245
- }
246
- listViewOptions.value["actionPermission"] = actionPermission;
247
- }
248
- if (!listViewOptions.value["operations"]) {
249
- listViewOptions.value["operations"] = {};
250
- }
251
- const subTableOperations = getOperations();
252
- listViewOptions.value["operations"]["operation"] = subTableOperations;
253
- listViewOptions.value["subTableCanAdd"] = isShowAddWf();
254
- }
255
- function setGridToStore() {
256
- if (!pageContext.tableUuids) {
257
- pageContext.tableUuids = [];
258
- }
259
- if (pageContext.tableUuids.indexOf(configure.uuid) < 0) {
260
- pageContext.tableUuids.push(configure.uuid);
261
- }
262
- }
263
- function getOperations() {
264
- let operations = [];
265
- let isShowOperation = caculateShowCondition(props.pageContext, configure.props.base.showOperationCondition);
266
- if (isShowOperation && isShowAddWf()) {
267
- const addButton = {
268
- props: {
269
- elementType: "el-button",
270
- icon: "Plus",
271
- type: "primary",
272
- circle: true,
273
- size: "mini",
274
- permission: "true"
275
- },
276
- onClick: addSubTableData,
277
- isShow: isShowAdd
278
- };
279
- operations.push(addButton);
280
- }
281
- if (isShowOperation && isShowDeleteWf(null, null, null, null, null, true)) {
282
- const removeButton = {
283
- props: {
284
- elementType: "el-button",
285
- icon: "Minus",
286
- type: "danger",
287
- circle: true,
288
- size: "mini",
289
- permission: "true"
290
- },
291
- onClick: removeSubTableData,
292
- isShow: isShowDelete
293
- };
294
- operations.push(removeButton);
295
- }
296
- getOperationButtons(pageContext, configure, operations);
297
- return operations;
298
- }
299
- initializationSubTable();
300
- function getEntityId(row) {
301
- if (row && row.id) {
302
- return row.id;
303
- } else if (row && row.ID) {
304
- return row.ID;
305
- }
306
- }
307
- function isShowAddWf(originalValue, formatValue, row, column, rowIndex, isFormJudge) {
308
- const isShowOperation = caculateShowCondition(props.pageContext, configure.props.base.showOperationCondition);
309
- if (!isShowOperation) {
310
- return false;
311
- }
312
- const fieldPermissionMap = pageContext.fieldPermissionMap;
313
- const actionPermissionMap = pageContext.actionPermissionMap;
314
- let canAdd = true;
315
- if (fieldPermissionMap && fieldPermissionMap !== null) {
316
- const allFieldPermission = fieldPermissionMap.get("all_fields");
317
- if (typeof allFieldPermission !== "undefined" && allFieldPermission.canEdit === false && (allFieldPermission.rowIndexes === void 0 || allFieldPermission.rowIndexes === null || allFieldPermission.rowIndexes.length === 0)) {
318
- canAdd = false;
319
- }
320
- }
321
- if (canAdd === true && prop && actionPermissionMap && actionPermissionMap !== null) {
322
- let oneTableActionPermission = actionPermissionMap.get(prop);
323
- if (!oneTableActionPermission) {
324
- oneTableActionPermission = actionPermissionMap.get("all_sub_tables");
325
- }
326
- if (oneTableActionPermission && oneTableActionPermission.canAdd !== void 0 && oneTableActionPermission.canAdd === false) {
327
- canAdd = false;
328
- }
329
- }
330
- return canAdd;
140
+ else
141
+ s2 = false;
331
142
  }
332
- function isShowAdd(originalValue, formatValue, row, column, rowIndex, isFormJudge) {
333
- let canAdd = isShowAddWf();
334
- if (canAdd === true) {
335
- canAdd = caculateShowCondition(props.pageContext, configure.props.base.showAddBtnCondition, row);
336
- }
337
- return canAdd;
338
- }
339
- function isShowDeleteWf(originalValue, formatValue, row, column, rowIndex, isFormJudge) {
340
- const fieldPermissionMap = pageContext.fieldPermissionMap;
341
- const actionPermissionMap = pageContext.actionPermissionMap;
342
- let canDelete = true;
343
- if (fieldPermissionMap && fieldPermissionMap !== null) {
344
- const allFieldPermission = fieldPermissionMap.get("all_fields");
345
- if (typeof allFieldPermission !== "undefined" && allFieldPermission.canEdit === false && (allFieldPermission.rowIndexes === void 0 || allFieldPermission.rowIndexes === null || allFieldPermission.rowIndexes.length === 0)) {
346
- canDelete = false;
347
- }
348
- }
349
- if (canDelete === true && prop && actionPermissionMap && actionPermissionMap !== null) {
350
- let oneTableActionPermission = actionPermissionMap.get(prop);
351
- if (!oneTableActionPermission) {
352
- oneTableActionPermission = actionPermissionMap.get("all_sub_tables");
353
- }
354
- if (oneTableActionPermission && oneTableActionPermission.canDelete !== void 0 && oneTableActionPermission.canDelete === false) {
355
- canDelete = false;
356
- }
357
- if (oneTableActionPermission && oneTableActionPermission.canDelete !== void 0 && oneTableActionPermission.canDelete === true) {
358
- if (oneTableActionPermission.deleteRowIndexes) {
359
- if (oneTableActionPermission.deleteRowIndexes.length > 0) {
360
- if (isFormJudge) {
361
- canDelete = true;
362
- } else {
363
- const rowId = getEntityId(row);
364
- if (rowId !== void 0 && oneTableActionPermission.deleteRowIndexes.indexOf(rowId) >= 0) {
365
- canDelete = true;
366
- } else {
367
- canDelete = false;
368
- }
369
- }
370
- } else {
371
- canDelete = false;
372
- }
373
- }
374
- }
375
- }
376
- return canDelete;
377
- }
378
- function isShowDelete(originalValue, formatValue, row, column, rowIndex, isFormJudge) {
379
- let canDelete = isShowDeleteWf(originalValue, formatValue, row, column, rowIndex, isFormJudge);
380
- if (canDelete === true) {
381
- canDelete = caculateShowCondition(props.pageContext, configure.props.base.showDeleteBtnCondition, row);
382
- }
383
- return canDelete;
384
- }
385
- function addSubTableData(originalValue, formatValue, row, column, rowIndex) {
386
- gridRef.value.createRow(listCode, {}, { getDefaultValueFunc: getDefaultValue });
387
- }
388
- function removeSubTableData(originalValue, formatValue, row, column, rowIndex) {
389
- gridRef.value.deleteRow(rowIndex, listCode, false);
390
- }
391
- function changeGridData(gridData) {
392
- setVariableValue(entity, dynamicFields, gridData);
393
- console.log("changeGridData----gridData=", gridData, "entity=", entity);
394
- }
395
- function changeRowsPerpage(pageSize) {
396
- console.log("表单组件--Item--changeRowsPerpage==pageSize=", pageSize);
397
- if (!pageContext.subTablePageInfo) {
398
- pageContext.subTablePageInfo = {};
399
- }
400
- pageContext.subTablePageInfo[prop] = { pageSize };
401
- }
402
- function setSelectOptions(valueSetOptions) {
403
- const propName = valueSetOptions.key;
404
- const options = valueSetOptions.value;
405
- if (!pageContext.selectOptions) {
406
- pageContext.selectOptions = {};
407
- }
408
- pageContext.selectOptions[propName] = options;
409
- }
410
- function fnProhibitToEdit(data) {
411
- const myPageCode = pageContext.code;
412
- const eventPageInfo = myPageCode + "_";
413
- eventBus.$emit(eventPageInfo + "prohibit-edit", data);
414
- }
415
- function refresMainTableFields(entity2) {
416
- const dataModel2 = pageContext.entity.data;
417
- if (entity2) {
418
- for (const key in entity2) {
419
- dataModel2[key] = entity2[key];
420
- }
421
- }
422
- }
423
- function select(selection, row) {
424
- if (row !== void 0) {
425
- selections.value = selection;
426
- const params = {
427
- selection,
428
- row
429
- };
430
- gridSelectRecord(pageContext, configure, params);
431
- }
432
- }
433
- function selectAll(selection) {
434
- selections.value = selection;
435
- const params = {
436
- selection
437
- };
438
- gridSelectAllRecords(pageContext, configure, params);
439
- }
440
- function selectionChange(newSelection) {
441
- const params = {
442
- newSelection
443
- };
444
- gridSelectionChange(pageContext, configure, params);
445
- }
446
- function cellClickEvent(row, column, cell, event) {
447
- const params = {
448
- row,
449
- column,
450
- cell,
451
- event
452
- };
453
- cellClick(pageContext, configure, params);
454
- }
455
- function cellDblClickEvent(row, column, cell, event) {
456
- const params = {
457
- row,
458
- column,
459
- cell,
460
- event
461
- };
462
- cellDblClick(pageContext, configure, params);
463
- }
464
- function rowClickEvent(row, column, event) {
465
- const params = {
466
- row,
467
- column,
468
- event
469
- };
470
- rowClick(pageContext, configure, params);
471
- }
472
- function rowDblClickEvent(row, column, event) {
473
- const params = {
474
- row,
475
- column,
476
- event
477
- };
478
- rowDblClick(pageContext, configure, params);
479
- }
480
- function headerClickEvent(column, event) {
481
- const params = {
482
- column,
483
- event
484
- };
485
- headerClick(pageContext, configure, params);
486
- }
487
- function changeFormData(formData) {
488
- pageContext.entity.data = formData;
489
- }
490
- function validatorSunTableListData() {
491
- return gridRef.value.validatorSunTableListData();
492
- }
493
- function createRow() {
494
- return gridRef.value.createRow(listCode);
495
- }
496
- function getSelections() {
497
- return selections.value;
498
- }
499
- function getSelectionIds() {
500
- const dataIds = [];
501
- if (selections.value) {
502
- selections.value.forEach((item) => {
503
- dataIds.push(item.id ? item.id : item.ID ? item.ID : null);
504
- });
505
- }
506
- return dataIds;
507
- }
508
- function clearSelections() {
509
- selections.value = [];
510
- }
511
- function getTableConfigure() {
512
- return configure;
513
- }
514
- function getValue() {
515
- return getVariableValue(entity, dynamicFields);
516
- }
517
- function setValue(value) {
518
- return setVariableValue(entity, dynamicFields, value);
519
- }
520
- function refreshChildTableData(gridData) {
521
- setValue(gridData);
522
- setTimeout(() => {
523
- if (gridRef.value) {
524
- gridRef.value.refreshChildData(listCode, gridData, configure.props && configure.props.base && configure.props.base.subPaging === true);
525
- listViewOptions.value.extraParam["entityMap"] = pageContext.entity.data;
526
- }
527
- }, 10);
528
- }
529
- function getRowStyle(data) {
530
- const style = getRowStyleUtil(data, null, props);
531
- console.log("getRowStyle----style=", style);
532
- return style;
533
- }
534
- function getCellStyle(data) {
535
- return getCellStyleUtil(data, data.cellStyle, props);
536
- }
537
- function getTitleStyle(data) {
538
- const cellTitleStyle = data.titleStyle;
539
- const rowTitleStyle = props.configure.style.titleStyle;
540
- return getHeaderCellStyleUtil(data, { cellTitleStyle, titleStyle: rowTitleStyle }, props);
541
- }
542
- function getTableSelectOptions() {
543
- if (gridRef.value) {
544
- return gridRef.value.getTableSelectOptions(listCode);
545
- }
546
- }
547
- function dynamicControlTableEdit(pageContext2, customRules, listCode2) {
548
- if (gridRef.value) {
549
- gridRef.value.dynamicControlTableEdit(pageContext2, customRules, listCode2);
550
- }
551
- }
552
- function doLayout(hiddenColumns) {
553
- if (gridRef.value) {
554
- gridRef.value.doLayout(hiddenColumns);
555
- }
143
+ return s2;
144
+ }
145
+ function ve(e3, t2, n2, o2, a2, i2) {
146
+ let l2 = be(0, 0, n2, 0, 0, i2);
147
+ return true === l2 && (l2 = S(N.pageContext, H.props.base.showDeleteBtnCondition, n2)), l2;
148
+ }
149
+ function ge(e3, t2, n2, o2, a2) {
150
+ oe.value.createRow(L, {}, { getDefaultValueFunc: C });
151
+ }
152
+ function me(e3, t2, n2, o2, a2) {
153
+ oe.value.deleteRow(a2, L, false);
154
+ }
155
+ function he(e3) {
156
+ w(K, X, e3);
157
+ }
158
+ function Se(e3) {
159
+ A.subTablePageInfo || (A.subTablePageInfo = {}), A.subTablePageInfo[B] = { pageSize: e3 };
160
+ }
161
+ function we(e3) {
162
+ const t2 = e3.key, n2 = e3.value;
163
+ A.selectOptions || (A.selectOptions = {}), A.selectOptions[t2] = n2;
164
+ }
165
+ function xe(e3) {
166
+ const t2 = A.code + "_";
167
+ y.$emit(t2 + "prohibit-edit", e3);
168
+ }
169
+ function Te(e3) {
170
+ const t2 = A.entity.data;
171
+ if (e3)
172
+ for (const n2 in e3)
173
+ t2[n2] = e3[n2];
174
+ }
175
+ function De(e3, t2) {
176
+ if (void 0 !== t2) {
177
+ V.value = e3;
178
+ p(A, H, { selection: e3, row: t2 });
556
179
  }
557
- __expose({
558
- createRow,
559
- getSelections,
560
- getSelectionIds,
561
- clearSelections,
562
- getTableConfigure,
563
- validatorSunTableListData,
564
- getValue,
565
- setValue,
566
- getTableSelectOptions,
567
- dynamicControlTableEdit,
568
- doLayout
569
- });
570
- return (_ctx, _cache) => {
571
- const _component_super_grid = resolveComponent("super-grid");
572
- return openBlock(), createElementBlock("div", null, [
573
- listViewShowFlag.value ? (openBlock(), createBlock(_component_super_grid, {
574
- key: 0,
575
- ref_key: "gridRef",
576
- ref: gridRef,
577
- url: unref(baseURL) + "/dsc/commons/sub-table",
578
- options: listViewOptions.value,
579
- code: unref(listCode),
580
- settings: unref(superGridSetting),
581
- onSelect: select,
582
- onSelectAll: selectAll,
583
- onSelectionChange: selectionChange,
584
- onCellClick: cellClickEvent,
585
- onCellDblclick: cellDblClickEvent,
586
- onRowClick: rowClickEvent,
587
- onRowDblclick: rowDblClickEvent,
588
- onHeaderClick: headerClickEvent,
589
- onFnProhibitToEdit: fnProhibitToEdit,
590
- onChangeGridData: changeGridData,
591
- onReloadGrid: changeInitializationSubTable,
592
- onRefresMainTableFields: refresMainTableFields,
593
- onSetSelectOptions: setSelectOptions,
594
- onChangeRowsPerPage: changeRowsPerpage,
595
- onNewOpenGridDialog: unref(popupToPage),
596
- onChangeFormData: changeFormData
597
- }, null, 8, ["url", "options", "code", "settings", "onNewOpenGridDialog"])) : createCommentVNode("", true)
598
- ]);
599
- };
600
180
  }
601
- });
181
+ function Ce(e3) {
182
+ V.value = e3;
183
+ f(A, H, { selection: e3 });
184
+ }
185
+ function ye(e3) {
186
+ d(A, H, { newSelection: e3 });
187
+ }
188
+ function Pe(e3, t2, n2, o2) {
189
+ b(A, H, { row: e3, column: t2, cell: n2, event: o2 });
190
+ }
191
+ function Re(e3, t2, n2, o2) {
192
+ v(A, H, { row: e3, column: t2, cell: n2, event: o2 });
193
+ }
194
+ function Ie(e3, t2, n2) {
195
+ g(A, H, { row: e3, column: t2, event: n2 });
196
+ }
197
+ function _e(e3, t2, n2) {
198
+ m(A, H, { row: e3, column: t2, event: n2 });
199
+ }
200
+ function Oe(e3, t2) {
201
+ h(A, H, { column: e3, event: t2 });
202
+ }
203
+ function ke(e3) {
204
+ A.entity.data = e3;
205
+ }
206
+ function Me() {
207
+ return x(K, X);
208
+ }
209
+ function Fe(e3) {
210
+ return w(K, X, e3);
211
+ }
212
+ return n(() => {
213
+ const e3 = H.uuid, t2 = A.subTableWatchProps;
214
+ y.$on("_refreshSubTable_" + e3, (n2) => {
215
+ const o2 = n2.propName;
216
+ if (t2 && t2[e3] && t2[e3].length > 0) {
217
+ t2[e3].indexOf(o2) >= 0 && ae();
218
+ }
219
+ }), y.$on("_refreshSubTableHandle_" + e3, (e4) => {
220
+ ae();
221
+ }), y.$on("_refreshChildData_" + e3, (e4) => {
222
+ !function(e5) {
223
+ Fe(e5), setTimeout(() => {
224
+ oe.value && (oe.value.refreshChildData(L, e5, H.props && H.props.base && true === H.props.base.subPaging), te.value.extraParam.entityMap = A.entity.data);
225
+ }, 10);
226
+ }(e4);
227
+ }), y.$on(L + "-pickFileDone", (e4) => {
228
+ oe.value.pickFileDone(e4);
229
+ }), y.$on(L + "-scanDone", (e4) => {
230
+ oe.value.scanDone(e4);
231
+ }), te.value && te.value.configureObj.props.base && te.value.configureObj.props.base.isSafeDelete && ne("setSafeDeleteTableCode", te.value.extraParam.tableName);
232
+ }), o(() => {
233
+ const e3 = H.uuid;
234
+ y.$off("_refreshSubTable_" + e3), y.$off("_refreshSubTableHandle_" + e3), y.$off("_refreshChildData_" + e3), y.$off(L + "-pickFileDone"), y.$off(L + "-scanDone");
235
+ }), function() {
236
+ const e3 = le();
237
+ e3 ? re(e3) : (ie(e3), te.value.isPageInfo = false, te.value.subTableData = Me(), ce());
238
+ }(), $2({ createRow: function() {
239
+ return oe.value.createRow(L);
240
+ }, getSelections: function() {
241
+ return V.value;
242
+ }, getSelectionIds: function() {
243
+ const e3 = [];
244
+ return V.value && V.value.forEach((t2) => {
245
+ e3.push(t2.id ? t2.id : t2.ID ? t2.ID : null);
246
+ }), e3;
247
+ }, clearSelections: function() {
248
+ V.value = [];
249
+ }, getTableConfigure: function() {
250
+ return H;
251
+ }, validatorSunTableListData: function() {
252
+ return oe.value.validatorSunTableListData();
253
+ }, getValue: Me, setValue: Fe, getTableSelectOptions: function() {
254
+ if (oe.value)
255
+ return oe.value.getTableSelectOptions(L);
256
+ }, dynamicControlTableEdit: function(e3, t2, n2) {
257
+ oe.value && oe.value.dynamicControlTableEdit(e3, t2, n2);
258
+ }, doLayout: function(e3) {
259
+ oe.value && oe.value.doLayout(e3);
260
+ } }), (e3, t2) => {
261
+ const n2 = a("super-grid");
262
+ return i(), l("div", null, [Z.value ? (i(), u(n2, { key: 0, ref_key: "gridRef", ref: oe, url: s(Y) + "/dsc/commons/sub-table", options: te.value, code: s(L), settings: s(q), onSelect: De, onSelectAll: Ce, onSelectionChange: ye, onCellClick: Pe, onCellDblclick: Re, onRowClick: Ie, onRowDblclick: _e, onHeaderClick: Oe, onFnProhibitToEdit: xe, onChangeGridData: he, onReloadGrid: re, onRefresMainTableFields: Te, onSetSelectOptions: we, onChangeRowsPerPage: Se, onNewOpenGridDialog: s(P), onChangeFormData: ke }, null, 8, ["url", "options", "code", "settings", "onNewOpenGridDialog"])) : r("", true)]);
263
+ };
264
+ } });
602
265
  export {
603
- _sfc_main as default
266
+ $ as default
604
267
  };