super-page-runtime 2.1.933 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +5 -7
  2. package/dist/es/assets/chart-themes/theme1.js +2 -6
  3. package/dist/es/assets/chart-themes/theme2.js +2 -6
  4. package/dist/es/assets/chart-themes/theme3.js +2 -6
  5. package/dist/es/components/runtime/index.d.ts +2 -1
  6. package/dist/es/components/runtime/utils/api/api-util.js +4 -7
  7. package/dist/es/components/runtime/utils/api/page-expose-util.js +137 -435
  8. package/dist/es/components/runtime/utils/assemblys-config.js +11 -367
  9. package/dist/es/components/runtime/utils/barcode-util.js +9 -33
  10. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +122 -306
  11. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -68
  12. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +68 -152
  13. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +46 -124
  14. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +36 -99
  15. package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
  16. package/dist/es/components/runtime/utils/charts/chart-util.js +226 -485
  17. package/dist/es/components/runtime/utils/common-util.js +76 -153
  18. package/dist/es/components/runtime/utils/eventBus.js +3 -9
  19. package/dist/es/components/runtime/utils/events/event-util.js +343 -727
  20. package/dist/es/components/runtime/utils/events/print-label.js +72 -140
  21. package/dist/es/components/runtime/utils/events/standard-event.d.ts +2 -2
  22. package/dist/es/components/runtime/utils/events/standard-event.js +810 -2299
  23. package/dist/es/components/runtime/utils/events/validator-util.js +222 -552
  24. package/dist/es/components/runtime/utils/form/date-shortcuts.js +28 -88
  25. package/dist/es/components/runtime/utils/form/scan-util.js +61 -162
  26. package/dist/es/components/runtime/utils/global-refs.js +53 -84
  27. package/dist/es/components/runtime/utils/i18n-util.js +11 -20
  28. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -0
  29. package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
  30. package/dist/es/components/runtime/utils/page-helper-util.js +278 -658
  31. package/dist/es/components/runtime/utils/page-init-util.d.ts +6 -1
  32. package/dist/es/components/runtime/utils/page-init-util.js +132 -370
  33. package/dist/es/components/runtime/utils/page-permission-util.js +22 -531
  34. package/dist/es/components/runtime/utils/page-store.d.ts +2 -2
  35. package/dist/es/components/runtime/utils/page-store.js +8 -12
  36. package/dist/es/components/runtime/utils/store-util.js +9 -13
  37. package/dist/es/components/runtime/utils/store.js +2 -2
  38. package/dist/es/components/runtime/utils/table-utils.js +45 -84
  39. package/dist/es/components/runtime/utils/tree-utils.js +17 -37
  40. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
  41. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +19 -75
  42. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
  43. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
  44. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
  45. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +36 -132
  46. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
  47. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
  48. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
  49. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
  50. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
  51. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +50 -198
  52. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
  53. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
  54. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
  55. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
  56. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +52 -169
  57. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
  58. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +44 -0
  59. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +4 -0
  60. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
  61. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -107
  62. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
  63. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -164
  64. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
  65. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -115
  66. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
  67. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -116
  68. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +34 -1
  69. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +253 -449
  70. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
  71. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
  72. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
  73. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
  74. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +37 -231
  75. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
  76. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
  77. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
  78. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
  79. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +197 -510
  80. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +4 -4
  81. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
  82. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
  83. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +6 -6
  84. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +21 -125
  85. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
  86. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +6 -6
  87. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
  88. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
  89. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
  90. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
  91. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
  92. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
  93. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
  94. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
  95. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
  96. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
  97. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
  98. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
  99. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
  100. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
  101. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
  102. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
  103. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
  104. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
  105. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
  106. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
  107. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +302 -803
  108. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
  109. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +249 -594
  110. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
  111. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
  112. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +40 -115
  113. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
  114. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -215
  115. package/dist/es/components/runtime/views/assemblys/error-render.vue.d.ts +4 -4
  116. package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
  117. package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
  118. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
  119. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +42 -154
  120. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +34 -98
  121. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
  122. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
  123. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +52 -200
  124. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
  125. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +66 -239
  126. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
  127. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +31 -104
  128. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
  129. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +21 -59
  130. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
  131. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +51 -173
  132. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
  133. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
  134. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
  135. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -249
  136. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
  137. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +32 -174
  138. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
  139. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
  140. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
  141. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
  142. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
  143. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +61 -189
  144. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
  145. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +87 -244
  146. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
  147. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +77 -261
  148. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
  149. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
  150. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
  151. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
  152. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
  153. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +40 -129
  154. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
  155. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
  156. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.d.ts +17 -0
  157. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +97 -0
  158. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +4 -0
  159. package/dist/es/components/runtime/views/assemblys/object-render.vue.d.ts +1 -1
  160. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +125 -254
  161. package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
  162. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
  163. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +18 -46
  164. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
  165. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +21 -49
  166. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
  167. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +20 -58
  168. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
  169. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
  170. package/dist/es/components/runtime/views/home-chart.vue.d.ts +23 -0
  171. package/dist/es/components/runtime/views/home-chart.vue.js +36 -0
  172. package/dist/es/components/runtime/views/home-chart.vue2.js +4 -0
  173. package/dist/es/components/runtime/views/super-page-dialog.vue.d.ts +3 -3
  174. package/dist/es/components/runtime/views/super-page-dialog.vue.js +20 -134
  175. package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
  176. package/dist/es/components/runtime/views/super-page.vue.d.ts +15 -6
  177. package/dist/es/components/runtime/views/super-page.vue.js +222 -708
  178. package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
  179. package/dist/es/i18n/langs/cn.js +2 -55
  180. package/dist/es/i18n/langs/en.js +2 -55
  181. package/dist/es/index.d.ts +2 -2
  182. package/dist/es/index.js +6 -4
  183. package/package.json +3 -2
@@ -1,604 +1,259 @@
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);
98
- }
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);
116
- }
117
- }
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");
148
- }
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
- }
174
- }
175
- if (configure.props.otherSettings.timeToInitializeSubTable.indexOf("noData") !== -1) {
176
- const tableData = dataModel[prop];
177
- if (!tableData || tableData.length <= 0) {
178
- flag = true;
179
- }
180
- }
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];
233
- }
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;
1
+ import { defineComponent as e, ref as t, onMounted as n, onUnmounted as o, resolveComponent as a, createElementBlock as i, openBlock as l, createBlock as u, createCommentVNode as s, unref 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);
328
49
  }
50
+ return e3;
329
51
  }
330
- return canAdd;
331
- }
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;
52
+ return false;
338
53
  }
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
- }
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]);
374
74
  }
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];
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);
420
87
  }
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;
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);
526
91
  }
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
- }
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)) return false;
104
+ const l2 = A.fieldPermissionMap, u2 = A.actionPermissionMap;
105
+ let s2 = true;
106
+ if (l2 && null !== l2) {
107
+ const e4 = l2.get("all_fields");
108
+ void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (s2 = false);
109
+ }
110
+ if (true === s2 && B && u2 && null !== u2) {
111
+ let e4 = u2.get(B);
112
+ e4 || (e4 = u2.get("all_sub_tables")), e4 && void 0 !== e4.canAdd && false === e4.canAdd && (s2 = false);
113
+ }
114
+ return s2;
115
+ }
116
+ function de(e3, t2, n2, o2, a2, i2) {
117
+ let l2 = fe();
118
+ return true === l2 && (l2 = S(N.pageContext, H.props.base.showAddBtnCondition, n2)), l2;
119
+ }
120
+ function be(e3, t2, n2, o2, a2, i2) {
121
+ const l2 = A.fieldPermissionMap, u2 = A.actionPermissionMap;
122
+ let s2 = true;
123
+ if (l2 && null !== l2) {
124
+ const e4 = l2.get("all_fields");
125
+ void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (s2 = false);
126
+ }
127
+ if (true === s2 && B && u2 && null !== u2) {
128
+ let e4 = u2.get(B);
129
+ 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) if (e4.deleteRowIndexes.length > 0) if (i2) s2 = true;
130
+ else {
131
+ const t3 = function(e5) {
132
+ return e5 && e5.id ? e5.id : e5 && e5.ID ? e5.ID : void 0;
133
+ }(n2);
134
+ s2 = void 0 !== t3 && e4.deleteRowIndexes.indexOf(t3) >= 0;
135
+ }
136
+ else s2 = false;
137
+ }
138
+ return s2;
139
+ }
140
+ function ve(e3, t2, n2, o2, a2, i2) {
141
+ let l2 = be(0, 0, n2, 0, 0, i2);
142
+ return true === l2 && (l2 = S(N.pageContext, H.props.base.showDeleteBtnCondition, n2)), l2;
143
+ }
144
+ function ge(e3, t2, n2, o2, a2) {
145
+ oe.value.createRow(L, {}, { getDefaultValueFunc: C });
146
+ }
147
+ function me(e3, t2, n2, o2, a2) {
148
+ oe.value.deleteRow(a2, L, false);
149
+ }
150
+ function he(e3) {
151
+ w(K, X, e3);
152
+ }
153
+ function Se(e3) {
154
+ A.subTablePageInfo || (A.subTablePageInfo = {}), A.subTablePageInfo[B] = { pageSize: e3 };
155
+ }
156
+ function we(e3) {
157
+ const t2 = e3.key, n2 = e3.value;
158
+ A.selectOptions || (A.selectOptions = {}), A.selectOptions[t2] = n2;
159
+ }
160
+ function xe(e3) {
161
+ const t2 = A.code + "_";
162
+ y.$emit(t2 + "prohibit-edit", e3);
163
+ }
164
+ function Te(e3) {
165
+ const t2 = A.entity.data;
166
+ if (e3) for (const n2 in e3) t2[n2] = e3[n2];
167
+ }
168
+ function De(e3, t2) {
169
+ if (void 0 !== t2) {
170
+ V.value = e3;
171
+ p(A, H, { selection: e3, row: t2 });
556
172
  }
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
173
  }
601
- });
174
+ function Ce(e3) {
175
+ V.value = e3;
176
+ f(A, H, { selection: e3 });
177
+ }
178
+ function ye(e3) {
179
+ d(A, H, { newSelection: e3 });
180
+ }
181
+ function Pe(e3, t2, n2, o2) {
182
+ b(A, H, { row: e3, column: t2, cell: n2, event: o2 });
183
+ }
184
+ function Re(e3, t2, n2, o2) {
185
+ v(A, H, { row: e3, column: t2, cell: n2, event: o2 });
186
+ }
187
+ function Ie(e3, t2, n2) {
188
+ g(A, H, { row: e3, column: t2, event: n2 });
189
+ }
190
+ function _e(e3, t2, n2) {
191
+ m(A, H, { row: e3, column: t2, event: n2 });
192
+ }
193
+ function Oe(e3, t2) {
194
+ h(A, H, { column: e3, event: t2 });
195
+ }
196
+ function ke(e3) {
197
+ A.entity.data = e3;
198
+ }
199
+ function Me() {
200
+ return x(K, X);
201
+ }
202
+ function Fe(e3) {
203
+ return w(K, X, e3);
204
+ }
205
+ return n(() => {
206
+ const e3 = H.uuid, t2 = A.subTableWatchProps;
207
+ y.$on("_refreshSubTable_" + e3, (n2) => {
208
+ const o2 = n2.propName;
209
+ if (t2 && t2[e3] && t2[e3].length > 0) {
210
+ t2[e3].indexOf(o2) >= 0 && ae();
211
+ }
212
+ }), y.$on("_refreshSubTableHandle_" + e3, (e4) => {
213
+ ae();
214
+ }), y.$on("_refreshChildData_" + e3, (e4) => {
215
+ !function(e5) {
216
+ Fe(e5), setTimeout(() => {
217
+ oe.value && (oe.value.refreshChildData(L, e5, H.props && H.props.base && true === H.props.base.subPaging), te.value.extraParam.entityMap = A.entity.data);
218
+ }, 10);
219
+ }(e4);
220
+ }), y.$on(L + "-pickFileDone", (e4) => {
221
+ oe.value.pickFileDone(e4);
222
+ }), y.$on(L + "-scanDone", (e4) => {
223
+ oe.value.scanDone(e4);
224
+ }), te.value && te.value.configureObj.props.base && te.value.configureObj.props.base.isSafeDelete && ne("setSafeDeleteTableCode", te.value.extraParam.tableName);
225
+ }), o(() => {
226
+ const e3 = H.uuid;
227
+ y.$off("_refreshSubTable_" + e3), y.$off("_refreshSubTableHandle_" + e3), y.$off("_refreshChildData_" + e3), y.$off(L + "-pickFileDone"), y.$off(L + "-scanDone");
228
+ }), function() {
229
+ const e3 = le();
230
+ e3 ? re(e3) : (ie(e3), te.value.isPageInfo = false, te.value.subTableData = Me(), ce());
231
+ }(), $2({ createRow: function() {
232
+ return oe.value.createRow(L);
233
+ }, getSelections: function() {
234
+ return V.value;
235
+ }, getSelectionIds: function() {
236
+ const e3 = [];
237
+ return V.value && V.value.forEach((t2) => {
238
+ e3.push(t2.id ? t2.id : t2.ID ? t2.ID : null);
239
+ }), e3;
240
+ }, clearSelections: function() {
241
+ V.value = [];
242
+ }, getTableConfigure: function() {
243
+ return H;
244
+ }, validatorSunTableListData: function() {
245
+ return oe.value.validatorSunTableListData();
246
+ }, getValue: Me, setValue: Fe, getTableSelectOptions: function() {
247
+ if (oe.value) return oe.value.getTableSelectOptions(L);
248
+ }, dynamicControlTableEdit: function(e3, t2, n2) {
249
+ oe.value && oe.value.dynamicControlTableEdit(e3, t2, n2);
250
+ }, doLayout: function(e3) {
251
+ oe.value && oe.value.doLayout(e3);
252
+ } }), (e3, t2) => {
253
+ const n2 = a("super-grid");
254
+ return l(), i("div", null, [Z.value ? (l(), u(n2, { key: 0, ref_key: "gridRef", ref: oe, url: r(Y) + "/dsc/commons/sub-table", options: te.value, code: r(L), settings: r(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: r(P), onChangeFormData: ke }, null, 8, ["url", "options", "code", "settings", "onNewOpenGridDialog"])) : s("", true)]);
255
+ };
256
+ } });
602
257
  export {
603
- _sfc_main as default
258
+ $ as default
604
259
  };