super-page-runtime 2.0.19 → 2.0.25

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 (195) hide show
  1. package/dist/es/components/runtime/utils/api/api-util.js +18 -16
  2. package/dist/es/components/runtime/utils/api/page-expose-util.d.ts +1 -0
  3. package/dist/es/components/runtime/utils/api/page-expose-util.js +206 -0
  4. package/dist/es/components/runtime/utils/assemblys-config.js +16 -7
  5. package/dist/es/components/runtime/utils/common-util.d.ts +2 -2
  6. package/dist/es/components/runtime/utils/common-util.js +8 -12
  7. package/dist/es/components/runtime/utils/events/event-util.d.ts +14 -0
  8. package/dist/es/components/runtime/utils/events/event-util.js +101 -32
  9. package/dist/es/components/runtime/utils/events/standard-event.d.ts +2 -0
  10. package/dist/es/components/runtime/utils/events/standard-event.js +189 -133
  11. package/dist/es/components/runtime/utils/events/validator-util.js +4 -3
  12. package/dist/es/components/runtime/utils/form/scan-util.js +191 -0
  13. package/dist/es/components/runtime/utils/global-refs.js +12 -0
  14. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -0
  15. package/dist/es/components/runtime/utils/page-helper-util.js +20 -4
  16. package/dist/es/components/runtime/utils/page-init-util.js +9 -15
  17. package/dist/es/components/runtime/utils/table-utils.js +4 -5
  18. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +17 -17
  19. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +17 -17
  20. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +1 -1
  21. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +1 -1
  22. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +5 -5
  23. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +4 -0
  24. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +207 -0
  25. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +99 -68
  26. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +3 -2
  27. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +11 -11
  28. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +28 -28
  29. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +12 -12
  30. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +7 -5
  31. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +14 -14
  32. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +15 -15
  33. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +24 -1
  34. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +40 -37
  35. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +10 -10
  36. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +13 -13
  37. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +96 -26
  38. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +8 -8
  39. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +13 -13
  40. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +10 -10
  41. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +14 -14
  42. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +5 -2
  43. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +5 -7
  44. package/dist/es/components/runtime/views/super-page.vue.js +18 -7
  45. package/package.json +3 -2
  46. package/dist/lib/_virtual/AttributeMap.js +0 -4
  47. package/dist/lib/_virtual/Delta.js +0 -4
  48. package/dist/lib/_virtual/Op.js +0 -4
  49. package/dist/lib/_virtual/OpIterator.js +0 -4
  50. package/dist/lib/_virtual/__vite-browser-external.js +0 -3
  51. package/dist/lib/_virtual/_commonjsHelpers.js +0 -8
  52. package/dist/lib/_virtual/_plugin-vue_export-helper.js +0 -9
  53. package/dist/lib/_virtual/dayjs.min.js +0 -4
  54. package/dist/lib/_virtual/index.js +0 -4
  55. package/dist/lib/_virtual/index2.js +0 -4
  56. package/dist/lib/_virtual/index3.js +0 -4
  57. package/dist/lib/assets/chart-themes/theme1.d.ts +0 -4
  58. package/dist/lib/assets/chart-themes/theme1.js +0 -7
  59. package/dist/lib/assets/chart-themes/theme2.d.ts +0 -4
  60. package/dist/lib/assets/chart-themes/theme2.js +0 -7
  61. package/dist/lib/assets/chart-themes/theme3.d.ts +0 -4
  62. package/dist/lib/assets/chart-themes/theme3.js +0 -7
  63. package/dist/lib/components/runtime/index.d.ts +0 -4
  64. package/dist/lib/components/runtime/utils/api/api-util.d.ts +0 -11
  65. package/dist/lib/components/runtime/utils/api/api-util.js +0 -128
  66. package/dist/lib/components/runtime/utils/assemblys-config.js +0 -258
  67. package/dist/lib/components/runtime/utils/charts/chart-util.d.ts +0 -11
  68. package/dist/lib/components/runtime/utils/charts/chart-util.js +0 -28
  69. package/dist/lib/components/runtime/utils/common-util.d.ts +0 -16
  70. package/dist/lib/components/runtime/utils/common-util.js +0 -94
  71. package/dist/lib/components/runtime/utils/eventBus.d.ts +0 -7
  72. package/dist/lib/components/runtime/utils/eventBus.js +0 -10
  73. package/dist/lib/components/runtime/utils/events/event-util.d.ts +0 -48
  74. package/dist/lib/components/runtime/utils/events/event-util.js +0 -526
  75. package/dist/lib/components/runtime/utils/events/standard-event.d.ts +0 -61
  76. package/dist/lib/components/runtime/utils/events/standard-event.js +0 -1625
  77. package/dist/lib/components/runtime/utils/events/validator-util.d.ts +0 -4
  78. package/dist/lib/components/runtime/utils/events/validator-util.js +0 -389
  79. package/dist/lib/components/runtime/utils/global-refs.d.ts +0 -59
  80. package/dist/lib/components/runtime/utils/global-refs.js +0 -65
  81. package/dist/lib/components/runtime/utils/interfaces/page-design-types.d.ts +0 -223
  82. package/dist/lib/components/runtime/utils/interfaces/page-design-types.js +0 -9
  83. package/dist/lib/components/runtime/utils/page-helper-util.d.ts +0 -106
  84. package/dist/lib/components/runtime/utils/page-helper-util.js +0 -622
  85. package/dist/lib/components/runtime/utils/page-init-util.d.ts +0 -38
  86. package/dist/lib/components/runtime/utils/page-init-util.js +0 -200
  87. package/dist/lib/components/runtime/utils/page-permission-util.d.ts +0 -26
  88. package/dist/lib/components/runtime/utils/page-permission-util.js +0 -525
  89. package/dist/lib/components/runtime/utils/store-util.d.ts +0 -15
  90. package/dist/lib/components/runtime/utils/store-util.js +0 -17
  91. package/dist/lib/components/runtime/utils/store.d.ts +0 -2
  92. package/dist/lib/components/runtime/utils/store.js +0 -3
  93. package/dist/lib/components/runtime/utils/table-utils.js +0 -24
  94. package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue.js +0 -3
  95. package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +0 -54
  96. package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +0 -3
  97. package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +0 -35
  98. package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +0 -3
  99. package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +0 -110
  100. package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +0 -3
  101. package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +0 -432
  102. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +0 -43
  103. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +0 -3
  104. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +0 -61
  105. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +0 -3
  106. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +0 -126
  107. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +0 -3
  108. package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +0 -3
  109. package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +0 -52
  110. package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +0 -3
  111. package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +0 -54
  112. package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +0 -3
  113. package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +0 -54
  114. package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +0 -3
  115. package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +0 -56
  116. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +0 -24
  117. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +0 -147
  118. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +0 -3
  119. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +0 -35
  120. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +0 -127
  121. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +0 -3
  122. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +0 -26
  123. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +0 -104
  124. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +0 -3
  125. package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue.js +0 -3
  126. package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +0 -72
  127. package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +0 -3
  128. package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +0 -74
  129. package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue.js +0 -3
  130. package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +0 -79
  131. package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +0 -3
  132. package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +0 -43
  133. package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue.js +0 -3
  134. package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +0 -44
  135. package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +0 -3
  136. package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +0 -30
  137. package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +0 -3
  138. package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +0 -69
  139. package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +0 -3
  140. package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +0 -75
  141. package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +0 -642
  142. package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +0 -3
  143. package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +0 -453
  144. package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +0 -3
  145. package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue.js +0 -3
  146. package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +0 -88
  147. package/dist/lib/components/runtime/views/assemblys/error-render.vue.d.ts +0 -22
  148. package/dist/lib/components/runtime/views/assemblys/error-render.vue.js +0 -22
  149. package/dist/lib/components/runtime/views/assemblys/error-render.vue2.js +0 -3
  150. package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +0 -3
  151. package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +0 -156
  152. package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +0 -3
  153. package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +0 -82
  154. package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +0 -3
  155. package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +0 -64
  156. package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +0 -3
  157. package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +0 -40
  158. package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +0 -3
  159. package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +0 -74
  160. package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +0 -3
  161. package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +0 -63
  162. package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +0 -3
  163. package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +0 -127
  164. package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue.js +0 -3
  165. package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +0 -127
  166. package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue.js +0 -3
  167. package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -77
  168. package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +0 -3
  169. package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +0 -29
  170. package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +0 -3
  171. package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +0 -157
  172. package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +0 -3
  173. package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +0 -164
  174. package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue.js +0 -3
  175. package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +0 -201
  176. package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +0 -3
  177. package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +0 -63
  178. package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +0 -3
  179. package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +0 -63
  180. package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +0 -3
  181. package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +0 -65
  182. package/dist/lib/components/runtime/views/assemblys/object-render.vue.d.ts +0 -17
  183. package/dist/lib/components/runtime/views/assemblys/object-render.vue.js +0 -142
  184. package/dist/lib/components/runtime/views/assemblys/object-render.vue2.js +0 -3
  185. package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +0 -3
  186. package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +0 -61
  187. package/dist/lib/components/runtime/views/super-page-dialog.vue.d.ts +0 -36
  188. package/dist/lib/components/runtime/views/super-page-dialog.vue.js +0 -73
  189. package/dist/lib/components/runtime/views/super-page-dialog.vue2.js +0 -3
  190. package/dist/lib/components/runtime/views/super-page.vue.d.ts +0 -91
  191. package/dist/lib/components/runtime/views/super-page.vue.js +0 -496
  192. package/dist/lib/components/runtime/views/super-page.vue2.js +0 -3
  193. package/dist/lib/favicon.ico +0 -0
  194. package/dist/lib/index.d.ts +0 -8
  195. package/dist/lib/index.js +0 -15
@@ -1,642 +0,0 @@
1
- "use strict";
2
- const Vue = require("vue");
3
- require("../../../../../../node_modules/.pnpm/agilebuilder-ui@1.0.13_vue@3.4.21/node_modules/agilebuilder-ui/lib/super-ui.js");
4
- const eventUtil = require("../../../../utils/events/event-util.js");
5
- const commonUtil = require("../../../../utils/common-util.js");
6
- const standardEvent = require("../../../../utils/events/standard-event.js");
7
- const commonUtil$1 = require("../../../../../../node_modules/.pnpm/agilebuilder-ui@1.0.13_vue@3.4.21/node_modules/agilebuilder-ui/src/utils/common-util.js");
8
- const tableUtils = require("../../../../utils/table-utils.js");
9
- const eventBus = require("../../../../utils/eventBus.js");
10
- const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
11
- __name: "main-table-runtime",
12
- props: {
13
- pageContext: {},
14
- configure: {}
15
- },
16
- setup(__props, { expose: __expose }) {
17
- const props = __props;
18
- const pageContext = props.pageContext;
19
- const configure = props.configure;
20
- const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
21
- const runtimeStyle = runtimeInfo.style;
22
- const runtimeClass = runtimeInfo.class;
23
- const system = pageContext.entity.system;
24
- const tableName = pageContext.tableName;
25
- const baseURL = window["$vueApp"].config.globalProperties.baseURL;
26
- const operationButtonObj = Vue.ref(null);
27
- const eventName = Vue.ref(null);
28
- const listOptions = Vue.ref({});
29
- listOptions.value = getOptions();
30
- const gridRef = Vue.ref(null);
31
- const urlToListData = getUrlToListData(system);
32
- const listCode = commonUtil.getListCode(pageContext.code, pageContext.version, configure.uuid);
33
- const myPageCode = pageContext.code;
34
- const eventPageInfo = myPageCode + "_" + listCode;
35
- const selections = Vue.ref([]);
36
- const listToolbarFormData = pageContext.entity.page;
37
- const searchFormInfo = Vue.ref({ data: [] });
38
- const superGridItems = pageContext.superGridItems;
39
- const superGridSetting = superGridItems ? superGridItems[configure.uuid] : null;
40
- console.log("superGridSetting1111===", superGridItems, superGridSetting);
41
- Vue.onMounted(() => {
42
- window.addEventListener("message", recieveMessage);
43
- eventBus.$on(
44
- eventPageInfo + "-close-component-page-dialog",
45
- function({ jumpInfo, popEntity, popPageCode }) {
46
- gridRef.value.closePageDialog({
47
- entity: popEntity,
48
- pageCode: popPageCode,
49
- jumpInfo
50
- });
51
- }
52
- );
53
- eventBus.$on(eventPageInfo + "_close-dialog-get-entity", () => {
54
- eventBus.$emit(eventPageInfo + "_close-super-dialog");
55
- });
56
- });
57
- Vue.watch(
58
- () => props.pageContext.searchFormData,
59
- (searchFormData) => {
60
- searchFormInfo.value.data = searchFormData;
61
- }
62
- );
63
- Vue.watch(
64
- () => props.pageContext.entity.data,
65
- (searchFormData) => {
66
- searchGridData(props.pageContext.entity.data);
67
- }
68
- );
69
- Vue.watch(
70
- () => props.pageContext.entity.page,
71
- (searchFormData) => {
72
- searchGridData(props.pageContext.entity.page);
73
- }
74
- );
75
- Vue.onUnmounted(() => {
76
- eventBus.$off(eventPageInfo + "-close-component-page-dialog");
77
- eventBus.$off(eventPageInfo + "_close-dialog-get-entity");
78
- });
79
- function getUrlToListData(system2) {
80
- let urlToListData2;
81
- if (!pageContext.isTest) {
82
- urlToListData2 = baseURL + "/dsc/commons/list";
83
- if (urlToListData2) {
84
- urlToListData2 = commonUtil.getRealRestApiPath(urlToListData2, system2);
85
- }
86
- }
87
- return urlToListData2;
88
- }
89
- function getOptions() {
90
- const system2 = pageContext.entity.system;
91
- const permissionPrefix = system2.code + "." + pageContext.code;
92
- let initSearchForm = configure.props && configure.props.dataOrigin ? configure.props.dataOrigin.sqlFilterCondition : null;
93
- if (typeof initSearchForm === "undefined" || initSearchForm === null) {
94
- initSearchForm = [];
95
- }
96
- const options = {
97
- isSql: true,
98
- extraParam: {
99
- beanName: pageContext.beanName,
100
- functionCode: permissionPrefix + ".list",
101
- tableName,
102
- systemCode: system2.code
103
- // 系统编码传给列表数据后台请求
104
- },
105
- initSearchForm,
106
- lineEditOptions: {
107
- aftersaveIsCreateRow: false,
108
- autoSave: false,
109
- enter: enterSave,
110
- esc: escRestorRow
111
- },
112
- indexContinuous: configure.props && configure.props.otherSettings ? configure.props.otherSettings.serialNumberContinuous : false,
113
- initSearch: configure.props && configure.props.base.initializationQuery ? configure.props.base.initializationQuery : true,
114
- // 初始化时是否查询,默认是查询
115
- resizeHeight: resizeListHeight,
116
- pageCode: pageContext.code,
117
- pageVersion: pageContext.version,
118
- // pageHeight: pageHeight, // 页面的高度 //TODO: pageHeight如何获得,页面高度,计算列表高度应该会用
119
- additionalParamMap: pageContext.entity.request,
120
- // 将路由参数传给列表组件
121
- showOverflowTooltip: !!(configure.props && configure.props.otherSettings && (configure.props.otherSettings.isBreakLine === void 0 || configure.props.otherSettings.isBreakLine === false)),
122
- // 单元格内容是否换行显示
123
- isEnableEnterEvent: configure.props && configure.props.otherSettings && configure.props.otherSettings.isEnableEnterEvent,
124
- // 是否启用回车事件
125
- // 当前系统,表示是当前的自定义系统信息
126
- system: system2,
127
- isWithDataPermission: configure.props && configure.props.otherSettings && configure.props.otherSettings.isWithDataPermission ? configure.props.otherSettings.isWithDataPermission : false,
128
- pageDevMode: false,
129
- isWorkflowEntity: pageContext.workflowCode ? true : false,
130
- tableClass: runtimeClass,
131
- tableStyle: runtimeStyle,
132
- pageContext,
133
- configureObj: configure
134
- };
135
- setSortInfo(options);
136
- myGetDataTypeMap(options);
137
- setTreeSetting(options);
138
- setGridEvents(options);
139
- return options;
140
- }
141
- function setSortInfo(options) {
142
- if (configure.props && configure.props.dataOrigin && configure.props.dataOrigin.sortFields) {
143
- options.initSortInfo = [];
144
- this.colSetting.options.sortFields.forEach((item) => {
145
- const sortInfo = {
146
- order: item.sortOrder
147
- };
148
- sortInfo["prop"] = item.propDbName;
149
- options.initSortInfo.push(sortInfo);
150
- });
151
- }
152
- }
153
- function myGetDataTypeMap(options) {
154
- if (!system || !tableName) {
155
- return;
156
- }
157
- tableUtils.getDataTypeMap(system, tableName).then((result) => {
158
- pageContext["dataTypeMaps"][tableName] = result["dataTypeMap"];
159
- setOperationButtons(options);
160
- });
161
- }
162
- function setOperationButtons(options) {
163
- const showOperation = configure.props && configure.props.base ? configure.props.base.showOperation : false;
164
- const operationButtons = configure.btnList;
165
- if (showOperation && operationButtons) {
166
- const operationButtons2 = [];
167
- operationButtons2.forEach((buttonConfigure) => {
168
- const myButtonSet = {};
169
- const myButtonProps = Object.assign({}, buttonConfigure.props.base);
170
- myButtonProps.elementType = "el-button";
171
- if (buttonConfigure.isPermission === void 0 || buttonConfigure.isPermission + "" === "true") {
172
- if (buttonConfigure.functionCode) {
173
- myButtonProps.permission = buttonConfigure.functionCode;
174
- }
175
- }
176
- myButtonSet["props"] = myButtonProps;
177
- myButtonSet["onClick"] = getOperationButtonClickEvent(buttonConfigure);
178
- operationButtons2.push(myButtonSet);
179
- });
180
- if (!options.operations) {
181
- options.operations = {};
182
- }
183
- options.operations.operation = operationButtons2;
184
- }
185
- }
186
- function setTreeSetting(options) {
187
- const dataOrigin = configure.props ? configure.props.dataOrigin : {};
188
- if (dataOrigin.treeTable) {
189
- let parentPropDbName;
190
- const parentPropInfo = dataOrigin.rowKey;
191
- if (parentPropInfo && parentPropInfo.indexOf("~~") > 0) {
192
- parentPropDbName = parentPropInfo.substring(parentPropInfo.indexOf("~~") + 2);
193
- } else {
194
- parentPropDbName = parentPropInfo;
195
- }
196
- options.parentProp = parentPropDbName;
197
- if (options.parentProp) {
198
- const isLazy = dataOrigin.lazy;
199
- const defaultExpandAll = dataOrigin.defaultExpandAll;
200
- if (isLazy === void 0 || isLazy === null) {
201
- options.lazy = true;
202
- } else {
203
- options.lazy = isLazy;
204
- }
205
- if (defaultExpandAll === void 0 || defaultExpandAll === null) {
206
- options.defaultExpandAll = false;
207
- } else {
208
- options.defaultExpandAll = defaultExpandAll;
209
- }
210
- const listViewTreeTableSetting = {
211
- parentProp: parentPropDbName,
212
- lazy: options.lazy,
213
- defaultExpandAll: options.defaultExpandAll
214
- };
215
- options.extraParam.listViewTreeSetting = JSON.stringify(listViewTreeTableSetting);
216
- options.subRowUrl = baseURL + "/dsc/commons/list-subs";
217
- }
218
- }
219
- }
220
- function setGridEvents(options) {
221
- const tableEvents = configure.events;
222
- eventUtil.setTableEvents(options, tableEvents, pageContext, configure);
223
- const customEvents = pageContext.customEvents;
224
- if (customEvents) {
225
- options.eventCallBack = customEvents;
226
- const rowStyleEvent = eventUtil.getEventFuncByType(pageContext, tableEvents, "rowStyle");
227
- if (rowStyleEvent) {
228
- options.rowStyleRender = rowStyleEvent;
229
- }
230
- }
231
- }
232
- function enterSave(rowIndex, column, row, orgRow) {
233
- saveRow(null, null, row, column, rowIndex);
234
- }
235
- function saveRow(originalValue, formatValue, row, column, rowIndex) {
236
- const buttonConfigure = operationButtonObj.value[eventName.value];
237
- listOptions.value["lineEditOptions"]["beforeSave"] = beforeSaveRow;
238
- pageContext.editData = row;
239
- eventUtil.canExecuteButton({ pageContext, configureObj: buttonConfigure }).then((result) => {
240
- if (result["canExecute"] === true) {
241
- listOptions.value["lineEditOptions"]["saveRow"] = saveLineEditRow;
242
- gridRef.value.saveRow(rowIndex, listCode).then(() => {
243
- const otherParams = {
244
- originalValue,
245
- formatValue,
246
- row,
247
- column,
248
- rowIndex
249
- };
250
- eventUtil.doAfterClickEvent(pageContext, buttonConfigure, otherParams);
251
- });
252
- }
253
- }).finally(() => {
254
- pageContext.editData = null;
255
- });
256
- }
257
- function getOperationButtonClickEvent(buttonConfigure) {
258
- let onClick;
259
- eventName.value = buttonConfigure.eventName;
260
- operationButtonObj.value[eventName.value] = buttonConfigure;
261
- if (eventName.value === "lineEditSave") {
262
- onClick = saveRow;
263
- } else if (eventName.value === "restoreEdit") {
264
- onClick = restoreRow;
265
- } else if (eventName.value === "lineEditUpdate") {
266
- onClick = editRow;
267
- } else if (eventName.value === "lineEditDelete") {
268
- onClick = deleteRow;
269
- } else {
270
- onClick = customButtonClick;
271
- }
272
- if (!onClick) {
273
- onClick = function() {
274
- };
275
- }
276
- return onClick;
277
- }
278
- function beforeSaveRow(row, columns, dataTypeMap, dynamicColumnInfo, additionalParamMap, mainDefaultValueColumns) {
279
- const buttonConfigure = operationButtonObj.value[eventName.value];
280
- const otherParams = {
281
- dynamicColumnInfo,
282
- mainDefaultValueColumns,
283
- dataTypeMap,
284
- row,
285
- columns
286
- };
287
- return eventUtil.doBeforeClickEvent(pageContext, buttonConfigure, otherParams);
288
- }
289
- function saveLineEditRow(row, columns, dataTypeMap, dynamicColumnInfo, additionalParamMap, mainDefaultValueColumns) {
290
- const buttonConfigure = operationButtonObj.value[eventName.value];
291
- return new Promise((resolve, reject) => {
292
- standardEvent.getSaveFormRequest(
293
- pageContext,
294
- buttonConfigure,
295
- "/dsc/commons",
296
- false,
297
- mainDefaultValueColumns,
298
- dynamicColumnInfo
299
- ).then((commonEntity) => {
300
- if (commonEntity) {
301
- resolve(commonEntity.entity);
302
- } else {
303
- resolve({});
304
- }
305
- }).catch((error) => {
306
- reject(error);
307
- });
308
- });
309
- }
310
- function escRestorRow(rowIndex, column, row, orgRow) {
311
- restoreRow(null, null, row, column, rowIndex);
312
- }
313
- function restoreRow(originalValue, formatValue, row, column, rowIndex) {
314
- const buttonConfigure = operationButtonObj.value[eventName.value];
315
- const otherParams = {
316
- originalValue,
317
- formatValue,
318
- row,
319
- column,
320
- rowIndex
321
- };
322
- const beforeClickResult = eventUtil.doBeforeClickEvent(pageContext, buttonConfigure, otherParams);
323
- if (!beforeClickResult) {
324
- return;
325
- }
326
- if (commonUtil$1.isPromise(beforeClickResult)) {
327
- beforeClickResult.then((result) => {
328
- if (result) {
329
- gridRef.value.restoreRow(rowIndex, listCode);
330
- }
331
- });
332
- } else {
333
- gridRef.value.restoreRow(rowIndex, listCode);
334
- }
335
- const afterOtherParams = {
336
- originalValue,
337
- formatValue,
338
- row,
339
- column,
340
- rowIndex
341
- };
342
- eventUtil.doAfterClickEvent(pageContext, configure, afterOtherParams);
343
- }
344
- function editRow(originalValue, formatValue, row, column, rowIndex) {
345
- const buttonConfigure = operationButtonObj.value[eventName.value];
346
- const otherParams = {
347
- originalValue,
348
- formatValue,
349
- row,
350
- column,
351
- rowIndex
352
- };
353
- const beforeClickResult = eventUtil.doBeforeClickEvent(pageContext, buttonConfigure, otherParams);
354
- if (!beforeClickResult) {
355
- return;
356
- }
357
- if (commonUtil$1.isPromise(beforeClickResult)) {
358
- beforeClickResult.then((result) => {
359
- if (result) {
360
- editRowReal(originalValue, formatValue, row, column, rowIndex, buttonConfigure);
361
- }
362
- });
363
- } else {
364
- editRowReal(originalValue, formatValue, row, column, rowIndex, buttonConfigure);
365
- }
366
- }
367
- function editRowReal(originalValue, formatValue, row, column, rowIndex, buttonConfigure) {
368
- pageContext.editData = row;
369
- eventUtil.canExecuteButton({ pageContext, configureObj: buttonConfigure }).then((result) => {
370
- if (result["canExecute"] === true) {
371
- gridRef.value.editRow(rowIndex, listCode);
372
- const afterOtherParams = {
373
- originalValue,
374
- formatValue,
375
- row,
376
- column,
377
- rowIndex
378
- };
379
- eventUtil.doAfterClickEvent(pageContext, configure, afterOtherParams);
380
- }
381
- }).finally(() => {
382
- pageContext.editData = null;
383
- });
384
- }
385
- function deleteRow(originalValue, formatValue, row, column, rowIndex) {
386
- const buttonConfigure = operationButtonObj.value[eventName.value];
387
- const otherParams = {
388
- originalValue,
389
- formatValue,
390
- row,
391
- column,
392
- rowIndex
393
- };
394
- const beforeClickResult = eventUtil.doBeforeClickEvent(pageContext, buttonConfigure, otherParams);
395
- if (!beforeClickResult) {
396
- return;
397
- }
398
- if (commonUtil$1.isPromise(beforeClickResult)) {
399
- beforeClickResult.then((result) => {
400
- if (result) {
401
- deleteRowReal(originalValue, formatValue, row, column, rowIndex, buttonConfigure);
402
- }
403
- });
404
- } else {
405
- deleteRowReal(originalValue, formatValue, row, column, rowIndex, buttonConfigure);
406
- }
407
- }
408
- function deleteRowReal(originalValue, formatValue, row, column, rowIndex, buttonConfigure) {
409
- if (row.id || row.ID) {
410
- pageContext.editData = row;
411
- eventUtil.canExecuteButton({ pageContext, configureObj: buttonConfigure }).then((result) => {
412
- if (result["canExecute"] === true) {
413
- const ids = [];
414
- if (row.id) {
415
- ids.push(row.id);
416
- } else {
417
- ids.push(row.ID);
418
- }
419
- standardEvent.standardEvents.delete({
420
- pageContext,
421
- configureObj: buttonConfigure,
422
- ids,
423
- tableUuid: listCode
424
- });
425
- }
426
- }).finally(() => {
427
- pageContext.editData = null;
428
- });
429
- } else {
430
- restoreRow(originalValue, formatValue, row, column, rowIndex);
431
- const afterOtherParams = {
432
- originalValue,
433
- formatValue,
434
- row,
435
- column,
436
- rowIndex
437
- };
438
- eventUtil.doAfterClickEvent(pageContext, configure, afterOtherParams);
439
- }
440
- }
441
- function searchGridData(data) {
442
- if (!pageContext["dataTypeMaps"] || !pageContext["dataTypeMaps"][tableName]) {
443
- return;
444
- }
445
- const dataTypeObj = pageContext["dataTypeMaps"][tableName];
446
- let toolbarFieldParam = [];
447
- if (data) {
448
- for (var key in data) {
449
- const value = data[key];
450
- if (value !== null && value !== void 0 && value !== "") {
451
- if (value instanceof Array) {
452
- if (value.length > 0) {
453
- const multipleFieldParam = [];
454
- for (var i = 0; i < value.length; i++) {
455
- const fieldParam = {};
456
- if (i === 0) {
457
- fieldParam["leftBracket"] = "((";
458
- } else {
459
- fieldParam["leftBracket"] = "(";
460
- }
461
- fieldParam["propName"] = key;
462
- fieldParam["propDbName"] = key;
463
- fieldParam["dataType"] = dataTypeObj[key] ? dataTypeObj[key] : "TEXT";
464
- fieldParam["operator"] = "EQ";
465
- fieldParam["propValue"] = value[i];
466
- if (i === value.length - 1) {
467
- fieldParam["rightBracket"] = "))";
468
- fieldParam["joinSign"] = "and";
469
- } else {
470
- fieldParam["rightBracket"] = ")";
471
- fieldParam["joinSign"] = "or";
472
- }
473
- multipleFieldParam.push(fieldParam);
474
- }
475
- toolbarFieldParam = toolbarFieldParam.concat(multipleFieldParam);
476
- }
477
- } else {
478
- const fieldParam = {};
479
- fieldParam["leftBracket"] = "(";
480
- fieldParam["propName"] = key;
481
- fieldParam["propDbName"] = key;
482
- fieldParam["dataType"] = dataTypeObj[key] ? dataTypeObj[key] : "TEXT";
483
- fieldParam["operator"] = "EQ";
484
- fieldParam["propValue"] = value;
485
- fieldParam["rightBracket"] = ")";
486
- fieldParam["joinSign"] = "and";
487
- toolbarFieldParam.push(fieldParam);
488
- }
489
- }
490
- }
491
- }
492
- gridRef.value.toolbarRefresh(null, null, toolbarFieldParam);
493
- }
494
- function resizeListHeight(params) {
495
- }
496
- function customButtonClick(originalValue, formatValue, row, column, rowIndex, button) {
497
- const otherParams = {
498
- originalValue,
499
- formatValue,
500
- row,
501
- column,
502
- rowIndex,
503
- button
504
- };
505
- const buttonConfigure = operationButtonObj.value[eventName.value];
506
- eventUtil.getHandleEvent(null, pageContext, buttonConfigure, "click", otherParams);
507
- }
508
- function recieveMessage(event) {
509
- if (event.data === "close_open_win") {
510
- gridRef.value.refresh();
511
- }
512
- }
513
- function select(selection, row) {
514
- selections.value = selection;
515
- const params = {
516
- selection,
517
- row
518
- };
519
- eventUtil.gridSelectRecord(pageContext, configure, params);
520
- }
521
- function selectAll(selection) {
522
- selections.value = selection;
523
- const params = {
524
- selection
525
- };
526
- eventUtil.gridSelectAllRecords(pageContext, configure, params);
527
- }
528
- function selectionChange(newSelection) {
529
- const params = {
530
- newSelection
531
- };
532
- eventUtil.gridSelectionChange(pageContext, configure, params);
533
- }
534
- function cellClickEvent(row, column, cell, event) {
535
- const params = {
536
- row,
537
- column,
538
- cell,
539
- event
540
- };
541
- eventUtil.cellClick(pageContext, configure, params);
542
- }
543
- function cellDblClickEvent(row, column, cell, event) {
544
- const params = {
545
- row,
546
- column,
547
- cell,
548
- event
549
- };
550
- eventUtil.cellDblClick(pageContext, configure, params);
551
- }
552
- function rowClickEvent(row, column, event) {
553
- const params = {
554
- row,
555
- column,
556
- event
557
- };
558
- eventUtil.rowClick(pageContext, configure, params);
559
- }
560
- function rowDblClickEvent(row, column, event) {
561
- const params = {
562
- row,
563
- column,
564
- event
565
- };
566
- eventUtil.rowDblClick(pageContext, configure, params);
567
- }
568
- function headerClickEvent(column, event) {
569
- const params = {
570
- column,
571
- event
572
- };
573
- eventUtil.headerClick(pageContext, configure, params);
574
- }
575
- function validatorSunTableListData() {
576
- return gridRef.value.validatorSunTableListData();
577
- }
578
- function clearSelections() {
579
- selections.value = [];
580
- }
581
- function refresh() {
582
- return gridRef.value.refresh();
583
- }
584
- function createRow() {
585
- return gridRef.value.createRow(listCode);
586
- }
587
- function getSelections() {
588
- return selections.value;
589
- }
590
- function getSelectionIds() {
591
- const dataIds = [];
592
- if (selections.value !== null) {
593
- selections.value.forEach((item) => {
594
- dataIds.push(item.id ? item.id : item.ID ? item.ID : null);
595
- });
596
- }
597
- return dataIds;
598
- }
599
- function getTableConfigure() {
600
- return configure;
601
- }
602
- function isDeleteChange(value) {
603
- gridRef.value.isDeleteChange(value);
604
- }
605
- __expose({
606
- refresh,
607
- createRow,
608
- clearSelections,
609
- getSelections,
610
- getSelectionIds,
611
- getTableConfigure,
612
- isDeleteChange,
613
- validatorSunTableListData
614
- });
615
- return (_ctx, _cache) => {
616
- const _component_super_grid = Vue.resolveComponent("super-grid");
617
- return Vue.openBlock(), Vue.createElementBlock("div", null, [
618
- Vue.createVNode(_component_super_grid, {
619
- ref_key: "gridRef",
620
- ref: gridRef,
621
- url: Vue.unref(urlToListData),
622
- options: listOptions.value,
623
- code: Vue.unref(superGridSetting) ? null : Vue.unref(listCode),
624
- settings: Vue.unref(superGridSetting),
625
- "search-form-info": searchFormInfo.value,
626
- "list-toolbar-form-data": Vue.unref(listToolbarFormData),
627
- onSelect: select,
628
- onSelectAll: selectAll,
629
- onSelectionChange: selectionChange,
630
- onCellClick: cellClickEvent,
631
- onCellDblclick: cellDblClickEvent,
632
- onRowClick: rowClickEvent,
633
- onRowDblclick: rowDblClickEvent,
634
- onHeaderClick: headerClickEvent,
635
- onRefresh: clearSelections,
636
- onNewOpenGridDialog: Vue.unref(tableUtils.popupToPage)
637
- }, null, 8, ["url", "options", "code", "settings", "search-form-info", "list-toolbar-form-data", "onNewOpenGridDialog"])
638
- ]);
639
- };
640
- }
641
- });
642
- module.exports = _sfc_main;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- const mainTableRuntime_vue_vue_type_script_setup_true_lang = require("./main-table-runtime.vue.js");
3
- module.exports = mainTableRuntime_vue_vue_type_script_setup_true_lang;