super-page-runtime 2.1.933 → 2.2.0

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 (160) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +6 -7
  2. package/dist/es/assets/chart-themes/theme1.js +2 -6
  3. package/dist/es/assets/chart-themes/theme2.js +2 -6
  4. package/dist/es/assets/chart-themes/theme3.js +2 -6
  5. package/dist/es/components/runtime/utils/api/api-util.js +4 -7
  6. package/dist/es/components/runtime/utils/api/page-expose-util.js +137 -433
  7. package/dist/es/components/runtime/utils/assemblys-config.js +12 -366
  8. package/dist/es/components/runtime/utils/barcode-util.js +10 -33
  9. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +138 -300
  10. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -66
  11. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +71 -147
  12. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +52 -122
  13. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +40 -98
  14. package/dist/es/components/runtime/utils/charts/chart-util.js +237 -478
  15. package/dist/es/components/runtime/utils/common-util.js +82 -152
  16. package/dist/es/components/runtime/utils/eventBus.js +3 -9
  17. package/dist/es/components/runtime/utils/events/event-util.js +361 -727
  18. package/dist/es/components/runtime/utils/events/print-label.js +73 -140
  19. package/dist/es/components/runtime/utils/events/standard-event.js +838 -2285
  20. package/dist/es/components/runtime/utils/events/validator-util.js +237 -536
  21. package/dist/es/components/runtime/utils/form/date-shortcuts.js +29 -88
  22. package/dist/es/components/runtime/utils/form/scan-util.js +60 -154
  23. package/dist/es/components/runtime/utils/global-refs.js +45 -69
  24. package/dist/es/components/runtime/utils/i18n-util.js +12 -20
  25. package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
  26. package/dist/es/components/runtime/utils/page-helper-util.js +298 -628
  27. package/dist/es/components/runtime/utils/page-init-util.js +134 -368
  28. package/dist/es/components/runtime/utils/page-permission-util.js +24 -531
  29. package/dist/es/components/runtime/utils/page-store.js +8 -12
  30. package/dist/es/components/runtime/utils/store-util.js +9 -13
  31. package/dist/es/components/runtime/utils/store.js +2 -2
  32. package/dist/es/components/runtime/utils/table-utils.js +49 -84
  33. package/dist/es/components/runtime/utils/tree-utils.js +18 -36
  34. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
  35. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +19 -75
  36. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
  37. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
  38. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
  39. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +37 -132
  40. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
  41. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
  42. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
  43. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
  44. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
  45. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +54 -198
  46. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
  47. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
  48. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
  49. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
  50. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +48 -169
  51. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
  52. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
  53. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -107
  54. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
  55. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -164
  56. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
  57. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -115
  58. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
  59. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -116
  60. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +208 -439
  61. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
  62. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
  63. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
  64. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
  65. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +63 -226
  66. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
  67. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
  68. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
  69. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
  70. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +168 -512
  71. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
  72. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
  73. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +23 -125
  74. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
  75. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
  76. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
  77. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
  78. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
  79. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
  80. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
  81. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
  82. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
  83. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
  84. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
  85. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
  86. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
  87. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
  88. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
  89. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
  90. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
  91. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
  92. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
  93. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
  94. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
  95. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +311 -800
  96. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
  97. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +251 -592
  98. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
  99. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
  100. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +43 -115
  101. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
  102. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -215
  103. package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
  104. package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
  105. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
  106. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +44 -154
  107. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +36 -98
  108. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
  109. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
  110. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +54 -200
  111. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
  112. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +69 -239
  113. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
  114. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +28 -98
  115. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
  116. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +22 -59
  117. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
  118. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +52 -173
  119. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
  120. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
  121. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
  122. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +58 -249
  123. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
  124. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +34 -174
  125. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
  126. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
  127. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +5 -5
  128. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
  129. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +1 -0
  130. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
  131. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +66 -189
  132. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
  133. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +91 -243
  134. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
  135. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +82 -261
  136. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
  137. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
  138. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
  139. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
  140. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
  141. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +41 -129
  142. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
  143. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
  144. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +133 -252
  145. package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
  146. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
  147. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +19 -46
  148. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
  149. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +22 -49
  150. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
  151. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +21 -58
  152. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
  153. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
  154. package/dist/es/components/runtime/views/super-page-dialog.vue.js +18 -134
  155. package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
  156. package/dist/es/components/runtime/views/super-page.vue.js +233 -708
  157. package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
  158. package/dist/es/i18n/langs/cn.js +2 -55
  159. package/dist/es/i18n/langs/en.js +2 -55
  160. package/package.json +74 -73
@@ -1,10 +1,9 @@
1
- const _export_sfc = (sfc, props) => {
2
- const target = sfc.__vccOpts || sfc;
3
- for (const [key, val] of props) {
4
- target[key] = val;
5
- }
6
- return target;
1
+ const t = (t2, o) => {
2
+ const c = t2.__vccOpts || t2;
3
+ for (const [t3, s] of o)
4
+ c[t3] = s;
5
+ return c;
7
6
  };
8
7
  export {
9
- _export_sfc as default
8
+ t as default
10
9
  };
@@ -1,8 +1,4 @@
1
- const theme1 = {
2
- // 全局样式变量
3
- color: ["red", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"]
4
- // 其他样式设置...
5
- };
1
+ const c = { color: ["red", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] };
6
2
  export {
7
- theme1 as default
3
+ c as default
8
4
  };
@@ -1,8 +1,4 @@
1
- const theme2 = {
2
- // 全局样式变量
3
- color: ["yellow", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"]
4
- // 其他样式设置...
5
- };
1
+ const c = { color: ["yellow", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] };
6
2
  export {
7
- theme2 as default
3
+ c as default
8
4
  };
@@ -1,8 +1,4 @@
1
- const theme3 = {
2
- // 全局样式变量
3
- color: ["green", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"]
4
- // 其他样式设置...
5
- };
1
+ const c = { color: ["green", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] };
6
2
  export {
7
- theme3 as default
3
+ c as default
8
4
  };
@@ -1,7 +1,4 @@
1
- import { ElMessage, ElMessageBox } from "element-plus";
2
- import { functions } from "./page-expose-util.js";
3
- import { standardEvents } from "../events/standard-event.js";
4
- functions.standardEvents = standardEvents;
5
- window["$PageUtil"] = functions;
6
- window["$message"] = ElMessage;
7
- window["$messageBox"] = ElMessageBox;
1
+ import { ElMessage as e, ElMessageBox as s } from "element-plus";
2
+ import { functions as o } from "./page-expose-util.js";
3
+ import { standardEvents as t } from "../events/standard-event.js";
4
+ o.standardEvents = t, window.$PageUtil = o, window.$message = e, window.$messageBox = s;
@@ -1,451 +1,155 @@
1
- import { setValueForVariableName, getOptionDatasSourceMap, getComponentOptionDatasFromPage, getVariableValue, setVariableValue } from "../page-helper-util.js";
2
- import { getComponentRefByCode, getComponentRef } from "../global-refs.js";
3
- import eventBus from "../eventBus.js";
4
- import http from "agilebuilder-ui/src/utils/request";
5
- import { getAdditionalParamMap, refreshPage, getFormData } from "../events/standard-event.js";
6
- import { updateFormItemEditState, disabledAllFields, dynamicControlTableEdit } from "../events/validator-util.js";
7
- import { getBaseUrl, deepCopy } from "../common-util.js";
8
- import { isMobileBrowser } from "agilebuilder-ui/src/utils/common-util";
9
- import { getFormModelFields, getModelFields } from "../page-init-util.js";
10
- const functions = {
11
- /**
12
- * 展示页面中的某个组件元素
13
- * @param pageDesign 页面设计对象
14
- * @param codes 展示组件所绑定的变量或者是绑定的code值, 绑定变量时传递变量名, 如果绑定的变量为${data.xxx}则传递xxx
15
- */
16
- showElement: function(pageContext, codes, isInit) {
17
- if (isInit) {
18
- packageInitInfo(pageContext, "showElement", codes);
19
- } else {
20
- codes.forEach((code) => {
21
- const ref = getComponentRefByCode(pageContext, code);
22
- if (ref) {
23
- ref.show();
24
- } else {
25
- console.error(`未找到code为${code}的组件`);
26
- }
27
- });
28
- }
29
- },
30
- /**
31
- * 隐藏页面中的某个组件元素
32
- * @param pageDesign 页面设计对象
33
- * @param codes 展示组件所绑定的变量或者是绑定的code值, 绑定变量时传递变量名, 如果绑定的变量为${data.xxx}则传递xxx
34
- */
35
- hideElement: function(pageContext, codes, isInit) {
36
- if (isInit) {
37
- packageInitInfo(pageContext, "hideElement", codes);
38
- } else {
39
- codes.forEach((code) => {
40
- const ref = getComponentRefByCode(pageContext, code);
41
- if (ref) {
42
- ref.hide();
43
- } else {
44
- console.error(`未找到code为${code}的组件`);
45
- }
46
- });
47
- }
48
- },
49
- /**
50
- * 设置组件元素可用状态
51
- * @param pageContext
52
- * @param codes ['name', 'age']
53
- */
54
- enableElement: function(pageContext, codes, isInit) {
55
- if (isInit) {
56
- packageInitInfo(pageContext, "enableElement", codes);
57
- } else {
58
- codes.forEach((code) => {
59
- const ref = getComponentRefByCode(pageContext, code);
60
- if (ref) {
61
- const configure = ref.getConfigure();
62
- if (configure && configure.runtime.props) {
63
- configure.runtime.props.state = "enabled";
64
- }
65
- } else {
66
- console.error(`未找到code为${code}的组件`);
67
- }
68
- });
69
- }
70
- },
71
- /**
72
- * 禁用页面中的某个组件元素
73
- * @param pageContext
74
- * @param codes ['name', 'age']
75
- */
76
- disableElement: function(pageContext, codes, isInit) {
77
- if (isInit) {
78
- packageInitInfo(pageContext, "disableElement", codes);
79
- } else {
80
- codes.forEach((code) => {
81
- const ref = getComponentRefByCode(pageContext, code);
82
- if (ref) {
83
- const configure = ref.getConfigure();
84
- if (configure && configure.runtime.props) {
85
- configure.runtime.props.state = "disabled";
1
+ import { setValueForVariableName as e, getOptionDatasSourceMap as t, getComponentOptionDatasFromPage as n, getVariableValue as i, setVariableValue as o } from "../page-helper-util.js";
2
+ import { getComponentRefByCode as a, getComponentRef as r } from "../global-refs.js";
3
+ import s from "../eventBus.js";
4
+ import l from "agilebuilder-ui/src/utils/request";
5
+ import { getAdditionalParamMap as c, refreshPage as u, getFormData as f } from "../events/standard-event.js";
6
+ import { updateFormItemEditState as m, disabledAllFields as p, dynamicControlTableEdit as d } from "../events/validator-util.js";
7
+ import { getBaseUrl as g, deepCopy as y } from "../common-util.js";
8
+ import { isMobileBrowser as b } from "agilebuilder-ui/src/utils/common-util";
9
+ import { getFormModelFields as h, getModelFields as E } from "../page-init-util.js";
10
+ const P = { showElement: function(e2, t2, n2) {
11
+ n2 ? V(e2, "showElement", t2) : t2.forEach((t3) => {
12
+ const n3 = a(e2, t3);
13
+ n3 && n3.show();
14
+ });
15
+ }, hideElement: function(e2, t2, n2) {
16
+ n2 ? V(e2, "hideElement", t2) : t2.forEach((t3) => {
17
+ const n3 = a(e2, t3);
18
+ n3 && n3.hide();
19
+ });
20
+ }, enableElement: function(e2, t2, n2) {
21
+ n2 ? V(e2, "enableElement", t2) : t2.forEach((t3) => {
22
+ const n3 = a(e2, t3);
23
+ if (n3) {
24
+ const e3 = n3.getConfigure();
25
+ e3 && e3.runtime.props && (e3.runtime.props.state = "enabled");
26
+ }
27
+ });
28
+ }, disableElement: function(e2, t2, n2) {
29
+ n2 ? V(e2, "disableElement", t2) : t2.forEach((t3) => {
30
+ const n3 = a(e2, t3);
31
+ if (n3) {
32
+ const e3 = n3.getConfigure();
33
+ e3 && e3.runtime.props && (e3.runtime.props.state = "disabled");
34
+ }
35
+ });
36
+ }, setEntityDataValue: function(t2, n2) {
37
+ Object.keys(n2).forEach((i2) => {
38
+ e(t2.entity, i2.startsWith("${") ? i2 : "${data." + i2 + "}", n2[i2]);
39
+ });
40
+ }, setEntityPageValue: function(t2, n2) {
41
+ Object.keys(n2).forEach((i2) => {
42
+ e(t2.entity, i2.startsWith("${") ? i2 : "${page." + i2 + "}", n2[i2]);
43
+ });
44
+ }, setEntityValueByType: function(t2, n2, i2) {
45
+ Object.keys(i2).forEach((o2) => {
46
+ e(t2.entity, o2.startsWith("${") ? o2 : "${" + n2 + "." + o2 + "}", i2[o2]);
47
+ });
48
+ }, dynamicControlFormEdit: function(e2, t2, n2) {
49
+ n2 ? V(e2, "dynamicControlFormEdit", t2) : m(e2, t2);
50
+ }, disabledAllFields(e2) {
51
+ p(e2);
52
+ }, dynamicControlTableEdit(e2, t2, n2) {
53
+ d(e2, t2, n2);
54
+ }, executeServiceFlow: function(e2, t2, n2) {
55
+ const i2 = e2.code;
56
+ n2 || (n2 = { entity: e2.entity.data, serviceVariables: {}, requestParams: c(e2), taskParamMap: e2.entity.task, dynamicDimensionValue: [], dynamicSortValue: "" }), n2.entity || (n2.entity = e2.entity.data), n2.requestParams || (n2.requestParams = c(e2)), n2.taskParamMap || (n2.taskParamMap = e2.entity.task);
57
+ const o2 = e2.backendUrl, a2 = g(o2, e2.isTest);
58
+ return l.post(`${a2}/dsc/service-flow/execute/${i2}/${t2}`, n2);
59
+ }, openPage: function(e2, t2) {
60
+ s.$emit(e2.code + "_open-dialog", { pageContext: e2, eventParams: t2.eventParams, configureObj: { props: { linkPage: t2 } } });
61
+ }, refreshPage: function(e2, t2) {
62
+ u(e2, t2);
63
+ }, refreshSubTableHandle: function(e2, t2) {
64
+ let n2;
65
+ const i2 = a(e2, t2);
66
+ if (i2) {
67
+ const e3 = i2.getConfigure();
68
+ e3 && e3.uuid && e3.name && "table" === e3.name && (n2 = e3.uuid);
69
+ }
70
+ n2 && s.$emit("_refreshSubTableHandle_" + n2);
71
+ }, refreshChildData(e2, t2, n2) {
72
+ let i2;
73
+ const o2 = a(e2, t2);
74
+ if (o2) {
75
+ const e3 = o2.getConfigure();
76
+ e3 && e3.uuid && e3.name && "table" === e3.name && (i2 = e3.uuid);
77
+ }
78
+ i2 && setTimeout(() => {
79
+ s.$emit("_refreshChildData_" + i2, n2);
80
+ }, 10);
81
+ }, getServerConfigValue: (e2) => window.$vueApp.config.globalProperties[e2], getBackendUrl: (e2) => g(e2.backendUrl, false), getPlateBackendUrl: () => window.$vueApp.config.globalProperties.baseAPI, getEntity: (e2) => e2.entity.data, getEntityValue: (e2, t2) => e2.entity.data ? e2.entity.data[t2] : null, getPageData: (e2) => e2.entity.page, getPageDataValue: (e2, t2) => e2.entity.page ? e2.entity.page[t2] : null, getAdditionalParams: (e2) => c(e2), getAdditionalParamValue(e2, t2) {
82
+ const n2 = c(e2);
83
+ return n2 ? n2[t2] : null;
84
+ }, isMobile: () => b(), getComponentRefByProp: (e2, t2) => a(e2, t2), getComponentRefByCode: (e2, t2) => r(e2, t2), getFormViewData(e2) {
85
+ var _a, _b, _c, _d, _e, _f, _g, _h;
86
+ const a2 = e2.entity ? e2.entity : {}, s2 = y(a2), l2 = t(e2);
87
+ for (const t2 in l2) {
88
+ const a3 = n(e2, t2), l3 = r(e2, t2);
89
+ if (l3) {
90
+ const t3 = l3.getConfigure();
91
+ if (t3 && ((_b = (_a = t3.props) == null ? void 0 : _a.dataOrigin) == null ? void 0 : _b.optionValueSetType) && ("static" === ((_d = (_c = t3.props) == null ? void 0 : _c.dataOrigin) == null ? void 0 : _d.optionValueSetType) || "optionGroup" === ((_f = (_e = t3.props) == null ? void 0 : _e.dataOrigin) == null ? void 0 : _f.optionValueSetType)))
92
+ if (t3.name && ("select" === t3.name && ((_h = (_g = t3.props) == null ? void 0 : _g.base) == null ? void 0 : _h.multiple) || "checkbox" === t3.name)) {
93
+ const n2 = h(e2, t3), r2 = i(s2, n2);
94
+ if (r2) {
95
+ const e3 = C(r2.split(","), a3);
96
+ o(s2, n2, e3);
86
97
  }
87
98
  } else {
88
- console.error(`未找到code为${code}的组件`);
99
+ const n2 = h(e2, t3), r2 = C(i(s2, n2), a3);
100
+ o(s2, n2, r2);
89
101
  }
90
- });
91
- }
92
- },
93
- /**
94
- * 设置值
95
- * @param pageDesign 页面设计对象
96
- * @param keyValue {"name":"xxx",age:1,addr:"bj"} 展示组件所绑定的变量或者是绑定的code值, 绑定变量时传递变量名, 如果绑定的变量为${data.xxx}则传递xxx
97
- */
98
- setEntityDataValue: function(pageContext, keyValue) {
99
- Object.keys(keyValue).forEach((key) => {
100
- setValueForVariableName(
101
- pageContext.entity,
102
- key.startsWith("${") ? key : "${data." + key + "}",
103
- keyValue[key]
104
- );
105
- });
106
- },
107
- /**
108
- * 设置值
109
- * @param pageDesign 页面设计对象
110
- * @param keyValue {"name":"xxx",age:1,addr:"bj"} 展示组件所绑定的变量或者是绑定的code值, 绑定变量时传递变量名, 如果绑定的变量为${data.xxx}则传递xxx
111
- */
112
- setEntityPageValue: function(pageContext, keyValue) {
113
- Object.keys(keyValue).forEach((key) => {
114
- setValueForVariableName(
115
- pageContext.entity,
116
- key.startsWith("${") ? key : "${page." + key + "}",
117
- keyValue[key]
118
- );
119
- });
120
- },
121
- setEntityValueByType: function(pageContext, type, keyValue) {
122
- Object.keys(keyValue).forEach((key) => {
123
- setValueForVariableName(
124
- pageContext.entity,
125
- key.startsWith("${") ? key : "${" + type + "." + key + "}",
126
- keyValue[key]
127
- );
128
- });
129
- },
130
- /**
131
- * 表单编辑权限动态控制
132
- * @param pageContext
133
- * @param keyValue [
134
- {
135
- name: '_all_fields', // _all_fields 表示所有字段
136
- show: true,
137
- readonly: true,
138
- disabled: true,
139
- required: true,
140
- rules: [
141
- {
142
- required: true,
143
- trigger: 'blur'
144
- },
145
- {
146
- type: 'email',
147
- trigger: ['blur', 'change']
148
- }
149
- ]
150
- },
151
- {
152
- name: 'xxxx',
153
- show: true,
154
- readonly: true,
155
- disabled: true,
156
- required: true,
157
- rules: [
158
- {
159
- required: true,
160
- message: 'Please input email address',
161
- trigger: 'blur'
162
- },
163
- {
164
- type: 'email',
165
- message: 'Please input correct email address',
166
- trigger: ['blur', 'change']
167
- }
168
- ]
169
- }
170
- ]
171
- */
172
- dynamicControlFormEdit: function(pageContext, rules, isInit) {
173
- if (isInit) {
174
- packageInitInfo(pageContext, "dynamicControlFormEdit", rules);
175
- } else {
176
- updateFormItemEditState(pageContext, rules);
177
- }
178
- },
179
- /**
180
- * 禁用所有字段
181
- * @param pageContext 页面上下文
182
- */
183
- disabledAllFields(pageContext) {
184
- disabledAllFields(pageContext);
185
- },
186
- /**
187
- * 控制表格编辑权限
188
- * @param pageContext 页面上下文
189
- * @param rules
190
- * @param tableCode 列表的“自定义编码”配置
191
- */
192
- dynamicControlTableEdit(pageContext, rules, tableCode) {
193
- dynamicControlTableEdit(pageContext, rules, tableCode);
194
- },
195
- /**
196
- * 调用服务流,
197
- * @param pageContext
198
- * @param flowCode
199
- * @returns
200
- */
201
- executeServiceFlow: function(pageContext, flowCode, params) {
202
- const pageCode = pageContext.code;
203
- if (!params) {
204
- params = {
205
- entity: pageContext.entity.data,
206
- serviceVariables: {},
207
- requestParams: getAdditionalParamMap(pageContext),
208
- taskParamMap: pageContext.entity.task,
209
- dynamicDimensionValue: [],
210
- dynamicSortValue: ""
211
- };
212
102
  }
213
- if (!params.entity) {
214
- params.entity = pageContext.entity.data;
215
- }
216
- if (!params.requestParams) {
217
- params.requestParams = getAdditionalParamMap(pageContext);
218
- }
219
- if (!params.taskParamMap) {
220
- params.taskParamMap = pageContext.entity.task;
221
- }
222
- const backendUrl = pageContext.backendUrl;
223
- const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
224
- return http.post(`${baseUrl}/dsc/service-flow/execute/${pageCode}/${flowCode}`, params);
225
- },
226
- openPage: function(pageContext, openParam) {
227
- eventBus.$emit(pageContext.code + "_open-dialog", {
228
- pageContext,
229
- eventParams: openParam.eventParams,
230
- configureObj: { props: { linkPage: openParam } }
231
- });
232
- },
233
- /**
234
- * 刷新页面
235
- * @param pageContext
236
- */
237
- refreshPage: function(pageContext, id) {
238
- refreshPage(pageContext, id);
239
- },
240
- /**
241
- * 刷新表单中子表内容
242
- * @param {*} pageContext 页面配置信息
243
- * @param {*} tableCode 表格组件中“自定义编码”的值
244
- */
245
- refreshSubTableHandle: function(pageContext, tableCode) {
246
- let tableUuid;
247
- const ref = getComponentRefByCode(pageContext, tableCode);
248
- if (ref) {
249
- const configure = ref.getConfigure();
250
- if (configure && configure.uuid && configure.name && configure.name === "table") {
251
- tableUuid = configure.uuid;
252
- }
253
- }
254
- if (tableUuid) {
255
- eventBus.$emit("_refreshSubTableHandle_" + tableUuid);
256
- } else {
257
- console.error("tableUUid is undefined");
258
- }
259
- },
260
- // 对外开放的api方法更新子表集合
261
- refreshChildData(pageContext, tableCode, data) {
262
- let tableUuid;
263
- const ref = getComponentRefByCode(pageContext, tableCode);
264
- if (ref) {
265
- const configure = ref.getConfigure();
266
- if (configure && configure.uuid && configure.name && configure.name === "table") {
267
- tableUuid = configure.uuid;
268
- }
269
- }
270
- if (tableUuid) {
271
- setTimeout(() => {
272
- eventBus.$emit("_refreshChildData_" + tableUuid, data);
273
- }, 10);
274
- } else {
275
- console.error("tableUUid is undefined");
276
- }
277
- },
278
- // 根据key获得serverConfig中配置的信息
279
- getServerConfigValue(key) {
280
- return window["$vueApp"].config.globalProperties[key];
281
- },
282
- // 获得当前系统的后端访问路径
283
- getBackendUrl(pageContext) {
284
- return getBaseUrl(pageContext.backendUrl, false);
285
- },
286
- // 获得平台后端访问路径
287
- getPlateBackendUrl() {
288
- return window["$vueApp"].config.globalProperties.baseAPI;
289
- },
290
- // 获得实体
291
- getEntity(pageContext) {
292
- return pageContext.entity.data;
293
- },
294
- // 获得实体属性值
295
- getEntityValue(pageContext, key) {
296
- return pageContext.entity.data ? pageContext.entity.data[key] : null;
297
- },
298
- // 获得页面变量
299
- getPageData(pageContext) {
300
- return pageContext.entity.page;
301
- },
302
- // 获得页面变量属性值
303
- getPageDataValue(pageContext, key) {
304
- return pageContext.entity.page ? pageContext.entity.page[key] : null;
305
- },
306
- // 获得附加参数对象
307
- getAdditionalParams(pageContext) {
308
- return getAdditionalParamMap(pageContext);
309
- },
310
- // 获得某附加参数值
311
- getAdditionalParamValue(pageContext, key) {
312
- const param = getAdditionalParamMap(pageContext);
313
- return param ? param[key] : null;
314
- },
315
- // 是否是移动端
316
- isMobile() {
317
- return isMobileBrowser();
318
- },
319
- // 根据获取组件引用对象
320
- getComponentRefByProp(pageContext, prop) {
321
- return getComponentRefByCode(pageContext, prop);
322
- },
323
- // 根据组件唯一编码获取组件引用对象
324
- getComponentRefByCode(pageContext, code) {
325
- return getComponentRef(pageContext, code);
326
- },
327
- // 获得表单数据查看信息,例如:下拉框选项名等
328
- getFormViewData(pageContext) {
329
- var _a, _b, _c, _d, _e, _f, _g, _h;
330
- const entity = pageContext.entity ? pageContext.entity : {};
331
- const viewEntity = deepCopy(entity);
332
- const optionSourceMap = getOptionDatasSourceMap(pageContext);
333
- for (const uuid in optionSourceMap) {
334
- const cacheOptions = getComponentOptionDatasFromPage(pageContext, uuid);
335
- const componentRef = getComponentRef(pageContext, uuid);
336
- if (componentRef) {
337
- const componentConfigure = componentRef.getConfigure();
338
- if (componentConfigure) {
339
- if (((_b = (_a = componentConfigure.props) == null ? void 0 : _a.dataOrigin) == null ? void 0 : _b.optionValueSetType) && (((_d = (_c = componentConfigure.props) == null ? void 0 : _c.dataOrigin) == null ? void 0 : _d.optionValueSetType) === "static" || ((_f = (_e = componentConfigure.props) == null ? void 0 : _e.dataOrigin) == null ? void 0 : _f.optionValueSetType) === "optionGroup")) {
340
- if (componentConfigure.name && (componentConfigure.name === "select" && ((_h = (_g = componentConfigure.props) == null ? void 0 : _g.base) == null ? void 0 : _h.multiple) || componentConfigure.name === "checkbox")) {
341
- const dynamicFields = getFormModelFields(pageContext, componentConfigure);
342
- const propValue = getVariableValue(viewEntity, dynamicFields);
343
- if (propValue) {
344
- const propValues = propValue.split(",");
345
- const label = getSelectShowLable(propValues, cacheOptions);
346
- setVariableValue(viewEntity, dynamicFields, label);
347
- }
348
- } else {
349
- const dynamicFields = getFormModelFields(pageContext, componentConfigure);
350
- const propValue = getVariableValue(viewEntity, dynamicFields);
351
- const label = getSelectShowLable(propValue, cacheOptions);
352
- setVariableValue(viewEntity, dynamicFields, label);
353
- }
354
- }
355
- }
356
- }
357
- }
358
- const listCodesMap = pageContext.listCodesMap;
359
- for (const listCode in listCodesMap) {
360
- let tableUuid;
361
- if (listCode.indexOf("__") > 0) {
362
- tableUuid = listCode.substring(listCode.lastIndexOf("__") + "__".length);
363
- }
364
- if (tableUuid) {
365
- const componentRef = getComponentRef(pageContext, tableUuid);
366
- if (componentRef) {
367
- const componentConfigure = componentRef.getConfigure();
368
- const prop = componentConfigure.code ? componentConfigure.code : listCode;
369
- const dynamicFields = getModelFields(componentConfigure, prop);
370
- const gridData = getVariableValue(viewEntity, dynamicFields);
371
- const subTableOptions = componentRef.getTableSelectOptions(listCode);
372
- packageSubTableShowLable(subTableOptions, gridData);
373
- }
103
+ }
104
+ const c2 = e2.listCodesMap;
105
+ for (const t2 in c2) {
106
+ let n2;
107
+ if (t2.indexOf("__") > 0 && (n2 = t2.substring(t2.lastIndexOf("__") + 2)), n2) {
108
+ const o2 = r(e2, n2);
109
+ if (o2) {
110
+ const e3 = o2.getConfigure(), n3 = e3.code ? e3.code : t2, a3 = E(e3, n3), r2 = i(s2, a3);
111
+ k(o2.getTableSelectOptions(t2), r2);
374
112
  }
375
113
  }
376
- return viewEntity.data;
377
- },
378
- /**
379
- * 重新走gets请求获得表单数据
380
- * @param pageContext
381
- * @param id
382
- * @returns commonEntity数据
383
- */
384
- getFormData(pageContext, id) {
385
- return getFormData(pageContext, id);
386
114
  }
387
- };
388
- function packageSubTableShowLable(subTableOptions, subData) {
389
- if (subTableOptions && subData) {
390
- subData.forEach((rowData) => {
391
- const props = Object.keys(subTableOptions);
392
- props.forEach((prop) => {
393
- const propValue = rowData[prop];
394
- const values = subTableOptions[prop];
395
- const propSelectOptions = values.options;
396
- const column = values.column;
397
- let propLabel;
398
- if (column && column.componentType && (column.componentType === "multiselect" || column.componentType === "checkbox")) {
399
- if (propValue) {
400
- const propValues = propValue.split(",");
401
- propLabel = getSelectShowLable(propValues, propSelectOptions);
402
- }
403
- } else {
404
- propLabel = getSelectShowLable(propValue, propSelectOptions);
115
+ return s2.data;
116
+ }, getFormData: (e2, t2) => f(e2, t2) };
117
+ function k(e2, t2) {
118
+ e2 && t2 && t2.forEach((t3) => {
119
+ Object.keys(e2).forEach((n2) => {
120
+ const i2 = t3[n2], o2 = e2[n2], a2 = o2.options, r2 = o2.column;
121
+ let s2;
122
+ if (r2 && r2.componentType && ("multiselect" === r2.componentType || "checkbox" === r2.componentType)) {
123
+ if (i2) {
124
+ s2 = C(i2.split(","), a2);
405
125
  }
406
- rowData[prop] = propLabel;
407
- });
126
+ } else
127
+ s2 = C(i2, a2);
128
+ t3[n2] = s2;
408
129
  });
409
- }
130
+ });
410
131
  }
411
- function getSelectShowLable(propValue, propSelectOptions) {
412
- let showLabel;
413
- if (propValue !== void 0 && propValue !== null && propSelectOptions) {
414
- if (Array.isArray(propValue)) {
415
- showLabel = "";
416
- propValue.forEach((val) => {
417
- showLabel = showLabel + getSingleSelectShowLable(propValue, propSelectOptions) + ",";
418
- });
419
- if (showLabel.indexOf(",") > 0) {
420
- showLabel = showLabel.substring(0, showLabel.lastIndexOf(","));
421
- }
422
- } else {
423
- showLabel = propValue;
424
- showLabel = getSingleSelectShowLable(propValue, propSelectOptions);
425
- }
426
- }
427
- return showLabel;
132
+ function C(e2, t2) {
133
+ let n2;
134
+ return null != e2 && t2 && (Array.isArray(e2) ? (n2 = "", e2.forEach((i2) => {
135
+ n2 = n2 + v(e2, t2) + ",";
136
+ }), n2.indexOf(",") > 0 && (n2 = n2.substring(0, n2.lastIndexOf(",")))) : (n2 = e2, n2 = v(e2, t2))), n2;
428
137
  }
429
- function getSingleSelectShowLable(propValue, propSelectOptions) {
430
- let showLabel = propValue;
431
- if (propValue !== void 0 && propValue !== null && propSelectOptions) {
432
- for (let i = 0; i < propSelectOptions.length; i++) {
433
- const optValue = propSelectOptions[i].value;
434
- const optLabel = propSelectOptions[i].label ? propSelectOptions[i].label : propSelectOptions[i].name;
435
- if (propValue + "" === optValue + "" && optLabel !== void 0 && optLabel !== null) {
436
- showLabel = optLabel;
138
+ function v(e2, t2) {
139
+ let n2 = e2;
140
+ if (null != e2 && t2)
141
+ for (let i2 = 0; i2 < t2.length; i2++) {
142
+ const o2 = t2[i2].value, a2 = t2[i2].label ? t2[i2].label : t2[i2].name;
143
+ if (e2 + "" == o2 + "" && null != a2) {
144
+ n2 = a2;
437
145
  break;
438
146
  }
439
147
  }
440
- }
441
- return showLabel;
148
+ return n2;
442
149
  }
443
- function packageInitInfo(pageContext, type, settings) {
444
- if (!pageContext.initInfo) {
445
- pageContext.initInfo = {};
446
- }
447
- pageContext.initInfo[type] = settings;
150
+ function V(e2, t2, n2) {
151
+ e2.initInfo || (e2.initInfo = {}), e2.initInfo[t2] = n2;
448
152
  }
449
153
  export {
450
- functions
154
+ P as functions
451
155
  };