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,453 +0,0 @@
1
- "use strict";
2
- const Vue = require("vue");
3
- const eventUtil = require("../../../../utils/events/event-util.js");
4
- const pageHelperUtil = require("../../../../utils/page-helper-util.js");
5
- const pageInitUtil = require("../../../../utils/page-init-util.js");
6
- const eventBus = require("../../../../utils/eventBus.js");
7
- const tableUtils = require("../../../../utils/table-utils.js");
8
- const commonUtil = require("../../../../utils/common-util.js");
9
- const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
10
- __name: "sub-table-runtime",
11
- props: {
12
- pageContext: {},
13
- configure: {}
14
- },
15
- setup(__props, { expose: __expose }) {
16
- const props = __props;
17
- const pageContext = props.pageContext;
18
- const configure = props.configure;
19
- const dataModel = pageContext.entity.data;
20
- const prop = configure.props && configure.props.base ? configure.props.base.prop : null;
21
- const additionalParamMap = pageContext.entity.request;
22
- configure.events;
23
- Vue.ref({});
24
- const selections = Vue.ref([]);
25
- const superGridItems = pageContext.superGridItems;
26
- const superGridSetting = superGridItems ? superGridItems[configure.uuid] : null;
27
- console.log("superGridSetting===", superGridItems, superGridSetting);
28
- const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
29
- const runtimeStyle = runtimeInfo.style;
30
- const runtimeClass = runtimeInfo.class;
31
- const entity = props.pageContext.entity ? props.pageContext.entity : {};
32
- let dynamicFields = pageInitUtil.getFormModelFields(props.pageContext, props.configure);
33
- const listViewShowFlag = Vue.ref(false);
34
- const baseURL = window["$vueApp"].config.globalProperties.baseURL;
35
- const listViewOptions = Vue.ref({
36
- subTableData: null,
37
- extraParam: {},
38
- operations: {},
39
- hiddenColumns: [],
40
- pageCode: pageContext.code,
41
- pageVersion: pageContext.version,
42
- pageContext,
43
- configureObj: configure,
44
- showPageArea: false,
45
- showOverflowTooltip: !!(configure.props && configure.props.otherSettings && (configure.props.otherSettings.isBreakLine === void 0 || configure.props.otherSettings.isBreakLine === false))
46
- // 单元格内容是否换行显示
47
- });
48
- if (runtimeStyle) {
49
- listViewOptions.value["tableStyle"] = runtimeStyle;
50
- }
51
- if (runtimeClass) {
52
- listViewOptions.value["tableClass"] = runtimeClass;
53
- }
54
- if (configure.props && configure.props.base && configure.props.base.subPaging === void 0 || configure.props.base.subPaging === null || configure.props.base.subPaging === false) {
55
- listViewOptions.value.showPageArea = false;
56
- } else {
57
- listViewOptions.value.showPageArea = true;
58
- }
59
- const gridRef = Vue.ref(null);
60
- const listCode = commonUtil.getListCode(pageContext.code, pageContext.version, configure.uuid);
61
- function currencyListViewSetting(canRrefreshSubtableData) {
62
- if (canRrefreshSubtableData === void 0) {
63
- canRrefreshSubtableData = judgeInitializationSubTable();
64
- }
65
- listViewOptions.value["isFormSubTable"] = true;
66
- listViewOptions.value["canRrefreshSubtableData"] = canRrefreshSubtableData;
67
- listViewOptions.value["getFormData"] = getParentFormData;
68
- listViewOptions.value["getGridData"] = getGridData;
69
- if (!(configure.props && configure.props.base && configure.props.base.showOperation)) {
70
- let hiddenColumns = listViewOptions.value.hiddenColumns;
71
- if (!hiddenColumns) {
72
- hiddenColumns = ["operation"];
73
- } else {
74
- hiddenColumns.push("operation");
75
- }
76
- listViewOptions.value["hiddenColumns"] = hiddenColumns;
77
- }
78
- listViewOptions.value["showOperationButton"] = configure.props && configure.props.base ? configure.props.base.showOperation : false;
79
- listViewOptions.value["isPdfEditor"] = false;
80
- listViewOptions.value["tableRecordMaxNum"] = configure.props && configure.props.otherSettings ? configure.props.otherSettings.tableRecordMaxNum : null;
81
- if (configure.props && configure.props.size && configure.props.size.fixHeight) {
82
- listViewOptions.value["formSetHeight"] = configure.props.size.fixHeight;
83
- }
84
- if (configure.props && configure.props.size && configure.props.size.maxHeight) {
85
- listViewOptions.value["formSetMaxHeight"] = configure.props.size.maxHeight;
86
- }
87
- }
88
- function judgeInitializationSubTable() {
89
- if (!configure.props || !configure.props.otherSettings) {
90
- return;
91
- }
92
- if (configure.props.otherSettings.subtableSetting && configure.props.otherSettings.timeToInitializeSubTable && configure.props.otherSettings.subtableSetting.timeToInitializeSubTable.length > 0) {
93
- let flag = false;
94
- if (configure.props.otherSettings.subtableSetting.timeToInitializeSubTable.indexOf("create") !== -1) {
95
- if (dataModel.id || dataModel.ID) {
96
- flag = false;
97
- } else {
98
- flag = true;
99
- }
100
- }
101
- if (configure.props.otherSettings.subtableSetting.timeToInitializeSubTable.indexOf("noData") !== -1) {
102
- const tableData = dataModel[prop];
103
- if (!tableData || tableData.length <= 0) {
104
- flag = true;
105
- }
106
- }
107
- return flag;
108
- } else {
109
- return false;
110
- }
111
- }
112
- function getParentFormData() {
113
- return pageContext.entity.data;
114
- }
115
- function getGridData() {
116
- return pageHelperUtil.getVariableValue(entity, dynamicFields);
117
- }
118
- function changeInitializationSubTable(canRrefreshSubtableData) {
119
- currencyListViewSetting(canRrefreshSubtableData);
120
- listViewOptions.value["isPageInfo"] = false;
121
- listViewOptions.value["subTableData"] = null;
122
- listViewOptions.value.extraParam["subTableListViewCode"] = listCode;
123
- listViewOptions.value.extraParam["subtableSetting"] = configure.props || !configure.props.otherSettings ? JSON.stringify(configure.props.otherSettings.subtableSetting) : null;
124
- listViewOptions.value.extraParam["additionalParamMap"] = additionalParamMap;
125
- listViewOptions.value.extraParam["entityMap"] = pageContext.entity.data;
126
- setGridDataEventOptions();
127
- listViewShowFlag.value = false;
128
- setTimeout(() => {
129
- listViewShowFlag.value = true;
130
- setGridToStore();
131
- }, 10);
132
- }
133
- changeInitializationSubTable();
134
- function setGridDataEventOptions() {
135
- setSubTableValidateInfo();
136
- const tableEvents2 = configure.events;
137
- eventUtil.setTableEvents(listViewOptions.value, tableEvents2, pageContext, configure);
138
- const customEvents = pageContext.customEvents;
139
- if (customEvents) {
140
- listViewOptions.value["eventCallBack"] = customEvents;
141
- }
142
- listViewShowFlag.value = true;
143
- setGridToStore();
144
- }
145
- function setSubTableValidateInfo() {
146
- const fieldPermissionMap = pageContext.fieldPermissionMap;
147
- const actionPermissionMap = pageContext.actionPermissionMap;
148
- if (fieldPermissionMap && fieldPermissionMap != null) {
149
- let validateRules = fieldPermissionMap.get(prop);
150
- if (!validateRules) {
151
- const allValidateRules = fieldPermissionMap.get("all_fields");
152
- if (allValidateRules) {
153
- validateRules = [allValidateRules];
154
- }
155
- }
156
- if (validateRules) {
157
- listViewOptions.value["validateRules"] = validateRules;
158
- } else {
159
- listViewOptions.value["validateRules"] = null;
160
- }
161
- }
162
- if (actionPermissionMap && actionPermissionMap != null) {
163
- let actionPermission = actionPermissionMap.get(prop);
164
- if (!actionPermission) {
165
- actionPermission = actionPermissionMap.get("all_sub_tables");
166
- }
167
- listViewOptions.value["actionPermission"] = actionPermission;
168
- }
169
- const subTableOperations = getOperations();
170
- listViewOptions.value["operations"]["operation"] = subTableOperations;
171
- listViewOptions.value["subTableCanAdd"] = isShowAdd();
172
- }
173
- function setGridToStore() {
174
- if (!pageContext.tableUuids) {
175
- pageContext.tableUuids = [];
176
- }
177
- pageContext.tableUuids.push(configure.uuid);
178
- }
179
- function getOperations() {
180
- let operations = [];
181
- if (isShowAdd()) {
182
- const addButton = {
183
- props: {
184
- elementType: "el-button",
185
- icon: "Plus",
186
- type: "primary",
187
- circle: true,
188
- size: "mini",
189
- permission: "true"
190
- },
191
- onClick: addSubTableData
192
- };
193
- operations.push(addButton);
194
- }
195
- if (isShowDelete(null, null, null, null, null, true)) {
196
- const removeButton = {
197
- props: {
198
- elementType: "el-button",
199
- icon: "Minus",
200
- type: "danger",
201
- circle: true,
202
- size: "mini",
203
- permission: "true"
204
- },
205
- onClick: removeSubTableData,
206
- isShow: isShowDelete
207
- };
208
- operations.push(removeButton);
209
- }
210
- return operations;
211
- }
212
- function getEntityId(row) {
213
- if (row && row.id) {
214
- return row.id;
215
- } else if (row && row.ID) {
216
- return row.ID;
217
- }
218
- }
219
- function isShowAdd() {
220
- const fieldPermissionMap = pageContext.fieldPermissionMap;
221
- const actionPermissionMap = pageContext.actionPermissionMap;
222
- let canAdd = true;
223
- if (fieldPermissionMap && fieldPermissionMap !== null) {
224
- const allFieldPermission = fieldPermissionMap.get("all_fields");
225
- if (typeof allFieldPermission !== "undefined" && allFieldPermission.canEdit === false && (allFieldPermission.rowIndexes === void 0 || allFieldPermission.rowIndexes === null || allFieldPermission.rowIndexes.length === 0)) {
226
- canAdd = false;
227
- }
228
- }
229
- if (canAdd === true && prop && actionPermissionMap && actionPermissionMap !== null) {
230
- let oneTableActionPermission = actionPermissionMap.get(prop);
231
- if (!oneTableActionPermission) {
232
- oneTableActionPermission = actionPermissionMap.get("all_sub_tables");
233
- }
234
- if (oneTableActionPermission && oneTableActionPermission.canAdd !== void 0 && oneTableActionPermission.canAdd === false) {
235
- canAdd = false;
236
- }
237
- }
238
- return canAdd;
239
- }
240
- function isShowDelete(originalValue, formatValue, row, column, rowIndex, isFormJudge) {
241
- const fieldPermissionMap = pageContext.fieldPermissionMap;
242
- const actionPermissionMap = pageContext.actionPermissionMap;
243
- let canDelete = true;
244
- if (fieldPermissionMap && fieldPermissionMap !== null) {
245
- const allFieldPermission = fieldPermissionMap.get("all_fields");
246
- if (typeof allFieldPermission !== "undefined" && allFieldPermission.canEdit === false && (allFieldPermission.rowIndexes === void 0 || allFieldPermission.rowIndexes === null || allFieldPermission.rowIndexes.length === 0)) {
247
- canDelete = false;
248
- }
249
- }
250
- if (canDelete === true && prop && actionPermissionMap && actionPermissionMap !== null) {
251
- let oneTableActionPermission = actionPermissionMap.get(prop);
252
- if (!oneTableActionPermission) {
253
- oneTableActionPermission = actionPermissionMap.get("all_sub_tables");
254
- }
255
- if (oneTableActionPermission && oneTableActionPermission.canDelete !== void 0 && oneTableActionPermission.canDelete === false) {
256
- canDelete = false;
257
- }
258
- if (oneTableActionPermission && oneTableActionPermission.canDelete !== void 0 && oneTableActionPermission.canDelete === true) {
259
- if (oneTableActionPermission.deleteRowIndexes) {
260
- if (oneTableActionPermission.deleteRowIndexes.length > 0) {
261
- if (isFormJudge) {
262
- canDelete = true;
263
- } else {
264
- const rowId = getEntityId(row);
265
- if (rowId !== void 0 && oneTableActionPermission.deleteRowIndexes.indexOf(rowId) >= 0) {
266
- canDelete = true;
267
- } else {
268
- canDelete = false;
269
- }
270
- }
271
- } else {
272
- canDelete = false;
273
- }
274
- }
275
- }
276
- }
277
- return canDelete;
278
- }
279
- function addSubTableData(originalValue, formatValue, row, column, rowIndex) {
280
- gridRef.value.createRow(listCode);
281
- }
282
- function removeSubTableData(originalValue, formatValue, row, column, rowIndex) {
283
- gridRef.value.deleteRow(rowIndex, listCode, false);
284
- }
285
- function changeGridData(gridData) {
286
- pageHelperUtil.setVariableValue(entity, dynamicFields, gridData);
287
- }
288
- function changeRowsPerpage(pageSize) {
289
- console.log("表单组件--Item--changeRowsPerpage==pageSize=", pageSize);
290
- if (!pageContext.subTablePageInfo) {
291
- pageContext.subTablePageInfo = {};
292
- }
293
- pageContext.subTablePageInfo[prop] = { pageSize };
294
- }
295
- function setSelectOptions(valueSetOptions) {
296
- const propName = valueSetOptions.key;
297
- const options = valueSetOptions.value;
298
- if (!pageContext.selectOptions) {
299
- pageContext.selectOptions = {};
300
- }
301
- pageContext.selectOptions[propName] = options;
302
- }
303
- function fnProhibitToEdit(data) {
304
- const myPageCode = pageContext.code;
305
- const eventPageInfo = myPageCode + "_";
306
- eventBus.$emit(eventPageInfo + "prohibit-edit", data);
307
- }
308
- function refresMainTableFields(entity2) {
309
- const dataModel2 = pageContext.entity.data;
310
- if (entity2) {
311
- for (const key in entity2) {
312
- dataModel2[key] = entity2[key];
313
- }
314
- }
315
- }
316
- function select(selection, row) {
317
- selections.value = selection;
318
- const params = {
319
- selection,
320
- row
321
- };
322
- eventUtil.gridSelectRecord(pageContext, configure, params);
323
- }
324
- function selectAll(selection) {
325
- selections.value = selection;
326
- const params = {
327
- selection
328
- };
329
- eventUtil.gridSelectAllRecords(pageContext, configure, params);
330
- }
331
- function selectionChange(newSelection) {
332
- const params = {
333
- newSelection
334
- };
335
- eventUtil.gridSelectionChange(pageContext, configure, params);
336
- }
337
- function cellClickEvent(row, column, cell, event) {
338
- const params = {
339
- row,
340
- column,
341
- cell,
342
- event
343
- };
344
- eventUtil.cellClick(pageContext, configure, params);
345
- }
346
- function cellDblClickEvent(row, column, cell, event) {
347
- const params = {
348
- row,
349
- column,
350
- cell,
351
- event
352
- };
353
- eventUtil.cellDblClick(pageContext, configure, params);
354
- }
355
- function rowClickEvent(row, column, event) {
356
- const params = {
357
- row,
358
- column,
359
- event
360
- };
361
- eventUtil.rowClick(pageContext, configure, params);
362
- }
363
- function rowDblClickEvent(row, column, event) {
364
- const params = {
365
- row,
366
- column,
367
- event
368
- };
369
- eventUtil.rowDblClick(pageContext, configure, params);
370
- }
371
- function headerClickEvent(column, event) {
372
- const params = {
373
- column,
374
- event
375
- };
376
- eventUtil.headerClick(pageContext, configure, params);
377
- }
378
- function changeFormData(formData) {
379
- pageContext.entity.data = formData;
380
- }
381
- function validatorSunTableListData() {
382
- return gridRef.value.validatorSunTableListData();
383
- }
384
- function createRow() {
385
- return gridRef.value.createRow(listCode);
386
- }
387
- function getSelections() {
388
- return selections.value;
389
- }
390
- function getSelectionIds() {
391
- const dataIds = [];
392
- if (selections.value !== null) {
393
- selections.value.forEach((item) => {
394
- dataIds.push(item.id ? item.id : item.ID ? item.ID : null);
395
- });
396
- }
397
- return dataIds;
398
- }
399
- function clearSelections() {
400
- selections.value = [];
401
- }
402
- function getTableConfigure() {
403
- return configure;
404
- }
405
- function getValue() {
406
- return pageHelperUtil.getVariableValue(entity, dynamicFields);
407
- }
408
- function setValue(value) {
409
- return pageHelperUtil.setVariableValue(entity, dynamicFields, value);
410
- }
411
- __expose({
412
- createRow,
413
- getSelections,
414
- getSelectionIds,
415
- clearSelections,
416
- getTableConfigure,
417
- validatorSunTableListData,
418
- getValue,
419
- setValue
420
- });
421
- return (_ctx, _cache) => {
422
- const _component_super_grid = Vue.resolveComponent("super-grid");
423
- return Vue.openBlock(), Vue.createElementBlock("div", null, [
424
- listViewShowFlag.value ? (Vue.openBlock(), Vue.createBlock(_component_super_grid, {
425
- key: 0,
426
- ref_key: "gridRef",
427
- ref: gridRef,
428
- url: Vue.unref(baseURL) + "/common/super-forms/sub-table",
429
- options: listViewOptions.value,
430
- code: Vue.unref(superGridSetting) ? null : Vue.unref(listCode),
431
- settings: Vue.unref(superGridSetting),
432
- onSelect: select,
433
- onSelectAll: selectAll,
434
- onSelectionChange: selectionChange,
435
- onCellClick: cellClickEvent,
436
- onCellDblclick: cellDblClickEvent,
437
- onRowClick: rowClickEvent,
438
- onRowDblclick: rowDblClickEvent,
439
- onHeaderClick: headerClickEvent,
440
- onFnProhibitToEdit: fnProhibitToEdit,
441
- onChangeGridData: changeGridData,
442
- onReloadGrid: changeInitializationSubTable,
443
- onRefresMainTableFields: refresMainTableFields,
444
- onSetSelectOptions: setSelectOptions,
445
- onChangeRowsPerPage: changeRowsPerpage,
446
- onNewOpenGridDialog: Vue.unref(tableUtils.popupToPage),
447
- onChangeFormData: changeFormData
448
- }, null, 8, ["url", "options", "code", "settings", "onNewOpenGridDialog"])) : Vue.createCommentVNode("", true)
449
- ]);
450
- };
451
- }
452
- });
453
- module.exports = _sfc_main;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- const subTableRuntime_vue_vue_type_script_setup_true_lang = require("./sub-table-runtime.vue.js");
3
- module.exports = subTableRuntime_vue_vue_type_script_setup_true_lang;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- const tableRuntime_vue_vue_type_script_setup_true_lang = require("./table-runtime.vue2.js");
3
- module.exports = tableRuntime_vue_vue_type_script_setup_true_lang;
@@ -1,88 +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
- require("../../../../../../node_modules/.pnpm/agilebuilder-ui@1.0.13_vue@3.4.21/node_modules/agilebuilder-ui/src/utils/request.js");
5
- require("../../../../../../node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/dayjs.min.js");
6
- require("../../../../../../node_modules/.pnpm/agilebuilder-ui@1.0.13_vue@3.4.21/node_modules/agilebuilder-ui/src/i18n/i18n.js");
7
- require("../../../../../../node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.js");
8
- require("../../../../utils/global-refs.js");
9
- const subTableRuntime_vue_vue_type_script_setup_true_lang = require("./sub-table-runtime.vue.js");
10
- const mainTableRuntime_vue_vue_type_script_setup_true_lang = require("./main-table-runtime.vue.js");
11
- const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
12
- __name: "table-runtime",
13
- props: {
14
- pageContext: {},
15
- configure: {}
16
- },
17
- setup(__props, { expose: __expose }) {
18
- const props = __props;
19
- const pageType = props.pageContext.pageType;
20
- const tableConfigure = Vue.ref(null);
21
- const tableUuid = props.configure.uuid;
22
- const superGridItems = props.pageContext.superGridItems;
23
- const superGridSetting = superGridItems ? superGridItems[tableUuid] : null;
24
- tableConfigure.value = superGridSetting.configure ? JSON.parse(superGridSetting.configure) : null;
25
- const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
26
- runtimeInfo.style;
27
- runtimeInfo.class;
28
- const gridRef = Vue.ref(null);
29
- function validatorSunTableListData() {
30
- if (pageType && pageType === "form") {
31
- return gridRef.value.validatorSunTableListData();
32
- }
33
- }
34
- function clearSelections() {
35
- return gridRef.value.clearSelections();
36
- }
37
- function refresh() {
38
- if (pageType && pageType === "list") {
39
- return gridRef.value.refresh();
40
- }
41
- }
42
- function createRow() {
43
- return gridRef.value.createRow();
44
- }
45
- function getSelections() {
46
- return gridRef.value.getSelections();
47
- }
48
- function getSelectionIds() {
49
- return gridRef.value.getSelectionIds();
50
- }
51
- function getTableConfigure() {
52
- return gridRef.value.getTableConfigure();
53
- }
54
- function isDeleteChange(value) {
55
- if (pageType && pageType === "list") {
56
- gridRef.value.isDeleteChange(value);
57
- }
58
- }
59
- __expose({
60
- refresh,
61
- createRow,
62
- clearSelections,
63
- getSelections,
64
- getSelectionIds,
65
- getTableConfigure,
66
- isDeleteChange,
67
- validatorSunTableListData
68
- });
69
- return (_ctx, _cache) => {
70
- return Vue.openBlock(), Vue.createElementBlock("div", null, [
71
- Vue.unref(pageType) && Vue.unref(pageType) === "form" ? (Vue.openBlock(), Vue.createBlock(subTableRuntime_vue_vue_type_script_setup_true_lang, {
72
- key: 0,
73
- ref_key: "gridRef",
74
- ref: gridRef,
75
- pageContext: _ctx.pageContext,
76
- configure: _ctx.configure
77
- }, null, 8, ["pageContext", "configure"])) : (Vue.openBlock(), Vue.createBlock(mainTableRuntime_vue_vue_type_script_setup_true_lang, {
78
- key: 1,
79
- ref_key: "gridRef",
80
- ref: gridRef,
81
- pageContext: _ctx.pageContext,
82
- configure: tableConfigure.value
83
- }, null, 8, ["pageContext", "configure"]))
84
- ]);
85
- };
86
- }
87
- });
88
- module.exports = _sfc_main;
@@ -1,22 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{
2
- configure: {
3
- type: ObjectConstructor;
4
- default: {
5
- name: string;
6
- };
7
- };
8
- selectWidget: ObjectConstructor;
9
- indexObj: ObjectConstructor;
10
- }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
11
- configure: {
12
- type: ObjectConstructor;
13
- default: {
14
- name: string;
15
- };
16
- };
17
- selectWidget: ObjectConstructor;
18
- indexObj: ObjectConstructor;
19
- }>>, {
20
- configure: Record<string, any>;
21
- }, {}>;
22
- export default _default;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- const Vue = require("vue");
3
- const _hoisted_1 = { style: { "text-align": "center", "color": "red" } };
4
- const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
5
- __name: "error-render",
6
- props: {
7
- configure: {
8
- type: Object,
9
- default: {
10
- name: "未知"
11
- }
12
- },
13
- selectWidget: Object,
14
- indexObj: Object
15
- },
16
- setup(__props) {
17
- return (_ctx, _cache) => {
18
- return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, " 不能识别的组件类型【" + Vue.toDisplayString(__props.configure.name) + "】 ", 1);
19
- };
20
- }
21
- });
22
- module.exports = _sfc_main;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- const errorRender_vue_vue_type_script_setup_true_lang = require("./error-render.vue.js");
3
- module.exports = errorRender_vue_vue_type_script_setup_true_lang;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- const checkboxRuntime_vue_vue_type_script_setup_true_lang = require("./checkbox-runtime.vue2.js");
3
- module.exports = checkboxRuntime_vue_vue_type_script_setup_true_lang;