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,1625 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const commonUtil = require("../common-util.js");
4
- const request = require("../../../../node_modules/.pnpm/agilebuilder-ui@1.0.13_vue@3.4.21/node_modules/agilebuilder-ui/src/utils/request.js");
5
- const util = require("../../../../node_modules/.pnpm/agilebuilder-ui@1.0.13_vue@3.4.21/node_modules/agilebuilder-ui/src/utils/util.js");
6
- const vueRouter = require("../../../../node_modules/.pnpm/vue-router@4.3.0_vue@3.4.21/node_modules/vue-router/dist/vue-router.js");
7
- const auth = require("../../../../node_modules/.pnpm/agilebuilder-ui@1.0.13_vue@3.4.21/node_modules/agilebuilder-ui/src/utils/auth.js");
8
- const globalRefs = require("../global-refs.js");
9
- const eventBus = require("../eventBus.js");
10
- const axios = require("../../../../node_modules/.pnpm/axios@1.6.8_debug@4.3.4/node_modules/axios/lib/axios.js");
11
- const eventUtil = require("./event-util.js");
12
- const storeUtil = require("../store-util.js");
13
- const index = require("../../../../node_modules/.pnpm/element-plus@2.6.2_vue@3.4.21/node_modules/element-plus/es/components/message/index.js");
14
- const index$1 = require("../../../../node_modules/.pnpm/element-plus@2.6.2_vue@3.4.21/node_modules/element-plus/es/components/message-box/index.js");
15
- const standardEvents = {
16
- // 表单标准事件保存save
17
- save: function(params) {
18
- console.log("表单标准事件保存save--params=", params);
19
- return saveFunc(params, false);
20
- },
21
- // 列表标准事件保存saveList
22
- saveList: function(params) {
23
- console.log("列表标准事件保存saveList--params=", params);
24
- return saveFunc(params, true);
25
- },
26
- // 表单标准事件导出报告exportForm
27
- exportForm: function(params) {
28
- console.log("表单标准事件导出报告exportForm--params=", params);
29
- const pageContext = params.pageContext;
30
- const pagCode = pageContext.code;
31
- const eventPageInfo = pagCode + "_";
32
- eventBus.$emit(eventPageInfo + "export-form-report", params);
33
- },
34
- // 表单标准事件导出报告exportPDF
35
- exportPDF: function(params) {
36
- console.log("表单标准事件导出报告exportPDF--params=", params);
37
- const pageContext = params.pageContext;
38
- pageContext.code;
39
- },
40
- // 表单标准事件提交submit
41
- submit: function(params) {
42
- console.log("表单标准事件提交submit--params=", params);
43
- return submitForm(params, false, "submit", "/dsc/commons/submits");
44
- },
45
- // 列表标准事件提交submitList
46
- submitList: function(params) {
47
- console.log("列表标准事件提交submitList--params=", params);
48
- return submitForm(params, true, "submit", "/dsc/commons/batch-submits");
49
- },
50
- // 表单标准事件同意agree
51
- agree: function(params) {
52
- console.log("表单标准事件同意agree--params=", params);
53
- return submitForm(params, false, "agree", "/dsc/commons/approves");
54
- },
55
- // 列表标准事件同意agreeList
56
- agreeList: function(params) {
57
- console.log("列表标准事件同意agreeList--params=", params);
58
- return submitForm(params, true, "agree", "/dsc/commons/batch-approves");
59
- },
60
- // 表单标准事件不同意disagree
61
- disagree: function(params) {
62
- console.log("表单标准事件不同意disagree--params=", params);
63
- return submitForm(params, false, "disagree", "/dsc/commons/refuses");
64
- },
65
- // 列表标准事件不同意disagreeList
66
- disagreeList: function(params) {
67
- console.log("列表标准事件不同意disagreeList--params=", params);
68
- return submitForm(params, true, "disagree", "/dsc/commons/batch-refuses");
69
- },
70
- // TODO: 待页面跳转功能完善后再实现
71
- back: function(params) {
72
- console.log("表单标准事件返回back--params=", params);
73
- },
74
- // 列表标准事件删除delete
75
- delete: function(params) {
76
- console.log("列表标准事件删除delete--params=", params);
77
- return deleteFunc(params);
78
- },
79
- // 列表标准事件下载导入模板downloadTemplate
80
- downloadTemplate: function(params) {
81
- console.log("列表标准事件下载导入模板downloadTemplate--params=", params);
82
- downloadTemplateFunc(params);
83
- },
84
- // 列表标准事件 导入import
85
- import: function(params) {
86
- console.log("列表标准事件 导入import--params=", params);
87
- const pageContext = params.pageContext;
88
- const pagCode = pageContext.code;
89
- const eventPageInfo = pagCode + "_";
90
- eventBus.$emit(eventPageInfo + "import-file", params);
91
- },
92
- // 列表标准事件 导出export
93
- export: function(params) {
94
- console.log("列表标准事件 导出export--params=", params);
95
- return exportFunc(params);
96
- },
97
- // 列表标准事件 查询search
98
- search: function(params) {
99
- console.log("列表标准事件 查询search--params=", params);
100
- const pageContext = params.pageContext;
101
- const tableUuid = params.tableUuid;
102
- const gridRef = globalRefs.getComponentRef(pageContext, tableUuid);
103
- gridRef.refresh();
104
- },
105
- // 流程表单标准事件 暂存workflowSave
106
- workflowSave: function(params) {
107
- console.log("流程表单标准事件 暂存workflowSave--params=", params);
108
- return workflowSaveFunc(params);
109
- },
110
- // 流程表单标准事件 提交流程submitProcess
111
- submitProcess: function(params) {
112
- console.log("流程表单标准事件 提交流程submitProcess--params=", params);
113
- return submitProcessFunc(params);
114
- },
115
- // 流程表单标准事件 提交任务submitTask
116
- submitTask: function(params) {
117
- console.log("流程表单标准事件 提交任务submitTask--params=", params);
118
- return completeTaskFunc(params, "SUBMIT");
119
- },
120
- // 流程表单标准事件 同意approve
121
- approve: function(params) {
122
- console.log("流程表单标准事件 同意approve--params=", params);
123
- return completeTaskFunc(params, "APPROVE");
124
- },
125
- // 流程表单标准事件 不同意refuse
126
- refuse: function(params) {
127
- console.log("流程表单标准事件 不同意refuse--params=", params);
128
- return completeTaskFunc(params, "REFUSE");
129
- },
130
- // 流程表单标准事件 已阅readed
131
- readed: function(params) {
132
- console.log("流程表单标准事件 已阅readed--params=", params);
133
- return completeTaskFunc(params, "READED");
134
- },
135
- // 流程表单标准事件 赞成agreemen
136
- agreement: function(params) {
137
- console.log("流程表单标准事件 赞成agreement--params=", params);
138
- return completeTaskFunc(params, "AGREEMENT");
139
- },
140
- // 流程表单标准事件 反对oppose
141
- oppose: function(params) {
142
- console.log("流程表单标准事件 反对oppose--params=", params);
143
- return completeTaskFunc(params, "OPPOSE");
144
- },
145
- // 流程表单标准事件 弃权kiken
146
- kiken: function(params) {
147
- console.log("流程表单标准事件 弃权kiken--params=", params);
148
- return completeTaskFunc(params, "KIKEN");
149
- },
150
- // 流程表单标准事件 指派assign
151
- assign: function(params) {
152
- console.log("流程表单标准事件 指派assign--params=", params);
153
- return assignTask(params);
154
- },
155
- // 流程表单标准事件 抄送copyTask
156
- copyTask: function(params) {
157
- console.log("流程表单标准事件 抄送copyTask--params=", params);
158
- return createCopyTask(params);
159
- },
160
- // 流程表单标准事件 加签addSigner
161
- addSigner: function(params) {
162
- console.log("流程表单标准事件 加签addSigner--params=", params);
163
- return addSignerFunc(params);
164
- },
165
- // 流程表单标准事件 领取drawTask
166
- drawTask: function(params) {
167
- console.log("流程表单标准事件 领取drawTask--params=", params);
168
- return drawTaskFunc(params);
169
- },
170
- // 放弃领取abandonReceive
171
- abandonReceive: function(params) {
172
- console.log("流程表单标准事件 放弃领取abandonReceive--params=", params);
173
- return abandonReceiveFunc(params);
174
- },
175
- // 流程表单标准事件 驳回returnToPreviousTask
176
- returnToPreviousTask: function(params) {
177
- console.log("流程表单标准事件 驳回returnToPreviousTask--params=", params);
178
- return returnToPreviousTaskFunc(params);
179
- },
180
- // 流程表单标准事件 强制结束endInstance
181
- endInstance: function(params) {
182
- console.log("流程表单标准事件 强制结束endInstance--params=", params);
183
- return endInstanceFunc(params);
184
- },
185
- // 流程表单标准事件 退回returnTaskTo
186
- returnTaskTo: function(params) {
187
- console.log("流程表单标准事件 退回returnTaskTo--params=", params);
188
- return returnTaskToFunc(params);
189
- },
190
- // 流程表单标准事件 减签removeSigner
191
- removeSigner: function(params) {
192
- console.log("流程表单标准事件 减签removeSigner--params=", params);
193
- return removeSignerfunc(params);
194
- },
195
- // 流程表单标准事件 取回retrieveTask
196
- retrieveTask: function(params) {
197
- console.log("流程表单标准事件 取回retrieveTask--params=", params);
198
- return retrieveTaskFunc(params);
199
- },
200
- viewDetail: function(params) {
201
- },
202
- lineEditCreate: function(params) {
203
- console.log("列表行编辑 新建lineEditCreate--params=", params);
204
- return lineEditCreateFunc(params);
205
- }
206
- };
207
- function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
208
- const templateUUID = templateFile.templateUUID;
209
- const fileName = templateFile.templateShowPath;
210
- const system = pageContext.system;
211
- const logSetting = configureObj.props.logSetting;
212
- const additionalParamMap = pageContext.entity.request;
213
- const isWorkflowForm = pageContext.workflowCode ? true : false;
214
- const beanName = pageContext.beanName;
215
- const button = configureObj.props.base;
216
- const tableName = configureObj.tableName;
217
- const viewModels = pageContext.entity.data;
218
- const isPermission = button.isPermission === void 0 || button.isPermission === "true" || button.isPermission;
219
- const param = {
220
- entity: viewModels,
221
- fileName: templateUUID,
222
- // uuid
223
- showName: fileName,
224
- // 下载的文件名称
225
- beanName,
226
- isWorkflowForm,
227
- // 是否是流程表单
228
- functionCode: button.functionCode,
229
- tableName,
230
- isPermission: isPermission + "",
231
- systemCode: system.code,
232
- tableNames: pageContext.tableNames
233
- };
234
- if (logSetting) {
235
- param["logSettingText"] = logSetting;
236
- }
237
- if (additionalParamMap) {
238
- param["additionalParamMap"] = additionalParamMap;
239
- }
240
- let exportResult;
241
- if (isPdf) {
242
- exportResult = exportFormPdf(fileName, system, param);
243
- } else {
244
- exportResult = exportFormReportSuccess(fileName, system, param);
245
- }
246
- if (exportResult) {
247
- exportResult.then(() => {
248
- eventUtil.doAfterClickEvent(pageContext, configureObj);
249
- });
250
- }
251
- }
252
- function exportFormReportSuccess(fileName, system, param) {
253
- return new Promise((resolve, reject) => {
254
- const baseUrl = commonUtil.getBaseUrl(system);
255
- const path = baseUrl + "/dsc/commons/export-reports";
256
- axios.defaults.headers.common.Authorization = auth.getToken();
257
- const request2 = axios.post(path, param, {
258
- headers: {
259
- "content-type": "application/x-www-form-urlencoded"
260
- },
261
- responseType: "blob"
262
- });
263
- request2.then((response) => {
264
- const blob = new Blob([response.data]);
265
- let fileNameTwo = "报告.xlsx";
266
- if (fileName) {
267
- fileNameTwo = fileName;
268
- }
269
- const elink = document.createElement("a");
270
- elink.download = fileNameTwo;
271
- elink.style.display = "none";
272
- elink.target = "_blank";
273
- elink.href = URL.createObjectURL(blob);
274
- document.body.appendChild(elink);
275
- elink.click();
276
- URL.revokeObjectURL(elink.href);
277
- document.body.removeChild(elink);
278
- resolve(true);
279
- }).catch((error) => {
280
- reject(error);
281
- });
282
- });
283
- }
284
- function exportFormPdf(fileName, system, param) {
285
- return new Promise((resolve, reject) => {
286
- const baseUrl = commonUtil.getBaseUrl(system);
287
- const path = baseUrl + "/dsc/commons/export-pdf";
288
- axios.defaults.headers.common.Authorization = auth.getToken();
289
- const request2 = axios.post(path, param, {
290
- headers: {
291
- "content-type": "application/x-www-form-urlencoded"
292
- },
293
- responseType: "blob"
294
- });
295
- request2.then((response) => {
296
- const blob = new Blob([response.data]);
297
- const elink = document.createElement("a");
298
- elink.download = fileName.substring(0, fileName.lastIndexOf(".")) + ".pdf";
299
- elink.style.display = "none";
300
- elink.target = "_blank";
301
- elink.href = URL.createObjectURL(blob);
302
- document.body.appendChild(elink);
303
- elink.click();
304
- URL.revokeObjectURL(elink.href);
305
- document.body.removeChild(elink);
306
- resolve(true);
307
- }).catch((error) => {
308
- reject(error);
309
- });
310
- });
311
- }
312
- function saveFunc(params, isListButton) {
313
- return new Promise((resolve, reject) => {
314
- const pageContext = params.pageContext;
315
- const configureObj = params.configureObj;
316
- const mainDefaultValueColumns = params.mainDefaultValueColumns;
317
- const dynamicColumnInfo = params.dynamicColumnInfo;
318
- const successOperation = configureObj.props.base.successOperation;
319
- let isUnControlVersion = false;
320
- if (successOperation && successOperation === "noOperation") {
321
- isUnControlVersion = true;
322
- }
323
- const request2 = getSaveFormRequest(
324
- pageContext,
325
- configureObj,
326
- "/dsc/commons",
327
- isUnControlVersion,
328
- mainDefaultValueColumns,
329
- dynamicColumnInfo
330
- );
331
- if (request2) {
332
- request2.then((data) => {
333
- dealAfterOperate(
334
- pageContext,
335
- configureObj,
336
- data,
337
- "superPageRuntimeMessage.successfulSave",
338
- isListButton
339
- );
340
- resolve(data);
341
- }).catch((error) => {
342
- reject(error);
343
- });
344
- } else {
345
- reject("保存时request不存在");
346
- }
347
- });
348
- }
349
- function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, ids) {
350
- const isWorkflow = pageContext.workflowCode ? true : false;
351
- const system = pageContext.system;
352
- const isPermission = configureObj.props.base.isPermission === void 0 || configureObj.props.base.isPermission === "true" || configureObj.props.base.isPermission;
353
- const param = {
354
- entity: pageContext.entity.data,
355
- pageModel: pageContext.entity.page,
356
- tableName: pageContext.tableName,
357
- formNoRuleCode: pageContext.formNoRuleCode,
358
- isWorkflowEntity: isWorkflow,
359
- functionCode: configureObj.props.base.functionCode,
360
- isPermission: isPermission + "",
361
- tableNames: pageContext.tableNames
362
- };
363
- if (ids) {
364
- param["ids"] = ids;
365
- }
366
- if (pageContext.judgeHeavyList) {
367
- if (commonUtil.isArrayFn(pageContext.judgeHeavyList)) {
368
- param["judgeHeavyList"] = JSON.stringify(pageContext.judgeHeavyList);
369
- } else {
370
- param["judgeHeavyList"] = pageContext.judgeHeavyList;
371
- }
372
- }
373
- const conversionCodes = configureObj.props.base.conversionCodes;
374
- if (conversionCodes) {
375
- if (commonUtil.isArrayFn(conversionCodes)) {
376
- param["dataConversionRule"] = conversionCodes.join(",");
377
- } else if (typeof conversionCodes === "string") {
378
- param["dataConversionRule"] = conversionCodes;
379
- }
380
- }
381
- const autoSetValueData = configureObj.props.base.setValueList;
382
- if (autoSetValueData) {
383
- if (commonUtil.isArrayFn(autoSetValueData)) {
384
- param["autoSetValueData"] = autoSetValueData.join(",");
385
- } else if (typeof autoSetValueData === "string") {
386
- param["autoSetValueData"] = autoSetValueData;
387
- }
388
- }
389
- const logSetting = configureObj.props.logSetting;
390
- if (logSetting) {
391
- param["logSettingText"] = logSetting;
392
- }
393
- if (!param["systemCode"]) {
394
- param["systemCode"] = system.code;
395
- }
396
- const beanName = configureObj.props.base.beanName;
397
- if (beanName) {
398
- param["beanName"] = beanName;
399
- }
400
- if (dynamicColumnInfo) {
401
- param["dynamicColumnInfo"] = dynamicColumnInfo;
402
- }
403
- if (mainDefaultValueColumns) {
404
- param["mainDefaultValueColumns"] = mainDefaultValueColumns;
405
- }
406
- const additionalParamMap = pageContext.entity.request;
407
- if (additionalParamMap) {
408
- param["additionalParamMap"] = additionalParamMap;
409
- }
410
- if (isUnControlVersion !== void 0) {
411
- param["unControlVersion"] = isUnControlVersion;
412
- }
413
- return param;
414
- }
415
- function getSaveFormRequest(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo) {
416
- const system = pageContext.system;
417
- const param = getCommonFormRequestParam(
418
- pageContext,
419
- configureObj,
420
- isUnControlVersion,
421
- mainDefaultValueColumns,
422
- dynamicColumnInfo,
423
- null
424
- );
425
- return getSaveFormRequestByParam(system, param, url, pageContext.entity.data);
426
- }
427
- function getSaveFormRequestByParam(system, param, url, formData) {
428
- const baseUrl = commonUtil.getBaseUrl(system);
429
- let path = baseUrl + url;
430
- path = commonUtil.getRealRestApiPath(path, system);
431
- let request$1;
432
- if (formData && (formData.id || formData.ID)) {
433
- request$1 = request.put(path, param);
434
- } else {
435
- request$1 = request.post(path, param);
436
- }
437
- return request$1;
438
- }
439
- function dealAfterOperate(pageContext, configureObj, data, successTip, isListButton) {
440
- if (isListButton === void 0) {
441
- isListButton = configureObj.props.base.tableUuid ? true : false;
442
- }
443
- if (isListButton) {
444
- dealAfterWithList(pageContext, configureObj, data, successTip);
445
- } else {
446
- dealAfterWithForm(pageContext, configureObj, data, successTip);
447
- }
448
- }
449
- function dealAfterWithForm(pageContext, configureObj, data, successTip) {
450
- if (data) {
451
- const commonEntity = data;
452
- let dataModel;
453
- if (commonEntity.entity) {
454
- dataModel = commonEntity.entity;
455
- }
456
- if (commonEntity.formNo) {
457
- pageContext.initFormNo = commonEntity.formNo;
458
- }
459
- afterSuccessOperateInForm(pageContext, configureObj, dataModel);
460
- }
461
- if (successTip) {
462
- index.ElMessage({
463
- message: util.getI18n().t(successTip),
464
- type: "success",
465
- showClose: true
466
- });
467
- }
468
- }
469
- function afterSuccessOperateInForm(pageContext, configureObj, dataModel) {
470
- let successOperation = configureObj.props.base.successOperation;
471
- const isNeedValueMapping = configureObj.props.base.isNeedValueMapping;
472
- console.log(
473
- "afterSuccessOperateInForm---successOperation=-",
474
- successOperation,
475
- dataModel,
476
- isNeedValueMapping
477
- );
478
- pageContext.workflowCode ? true : false;
479
- if (!successOperation || successOperation === "" || successOperation === null) {
480
- successOperation = "refresh";
481
- }
482
- if (successOperation === "noOperation") {
483
- if (dataModel) {
484
- pageContext.entity.data = dataModel;
485
- }
486
- } else if (successOperation === "refresh") {
487
- if (dataModel && (dataModel.id || dataModel.ID)) {
488
- const dataIdSessio = dataModel.ID == null ? dataModel.id : dataModel.ID;
489
- const route = vueRouter.useRoute();
490
- if (route.query._t_) {
491
- auth.setSessionCache(route.query._t_ + "_id", dataIdSessio);
492
- }
493
- }
494
- } else if (successOperation === "closeWindow" || successOperation === "closeWindowAndRefresh") {
495
- console.log("afterSuccessOperateInForm--successOperation=--", successOperation);
496
- }
497
- }
498
- function dealAfterWithList(pageContext, configureObj, row, successTip) {
499
- let successOperation = configureObj.props.base.successOperation;
500
- configureObj.props.base.isNeedValueMapping;
501
- const tableUuid = configureObj.props.base.tableUuid;
502
- if (!successOperation) {
503
- successOperation = "refresh";
504
- }
505
- console.log("dealAfterWithList--");
506
- if (successOperation === "refresh") {
507
- if (tableUuid) {
508
- const gridRef = globalRefs.getComponentRef(pageContext, tableUuid);
509
- gridRef.refresh();
510
- } else {
511
- console.error("tableUuid is empty");
512
- }
513
- }
514
- if (successTip) {
515
- index.ElMessage({
516
- message: util.getI18n().t(successTip),
517
- type: "success",
518
- showClose: true
519
- });
520
- }
521
- }
522
- function submitForm(params, isListButton, eventName, url) {
523
- return new Promise((resolve, reject) => {
524
- const pageContext = params.pageContext;
525
- const configureObj = params.configureObj;
526
- const mainDefaultValueColumns = params.mainDefaultValueColumns;
527
- const dynamicColumnInfo = params.dynamicColumnInfo;
528
- const ids = params.ids;
529
- const successOperation = configureObj.props.base.successOperation;
530
- let isUnControlVersion = false;
531
- if (successOperation && successOperation === "noOperation") {
532
- isUnControlVersion = true;
533
- }
534
- const request2 = getSubmitFormRequest(
535
- pageContext,
536
- configureObj,
537
- url,
538
- isUnControlVersion,
539
- mainDefaultValueColumns,
540
- dynamicColumnInfo,
541
- eventName,
542
- ids
543
- );
544
- if (request2) {
545
- request2.then((data) => {
546
- dealAfterOperate(
547
- pageContext,
548
- configureObj,
549
- data,
550
- "superPageRuntimeMessage.successfulSave",
551
- isListButton
552
- );
553
- resolve(data);
554
- }).catch((error) => {
555
- reject(error);
556
- });
557
- } else {
558
- reject("request不存在");
559
- }
560
- });
561
- }
562
- function getSubmitFormRequest(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, eventName, ids) {
563
- return new Promise((resolve, reject) => {
564
- const buttonName = configureObj.props.base.title;
565
- const operationI18nTip = "superPageRuntimeMessage.whetherToConfirm" + commonUtil.upperFirstCase(eventName);
566
- index$1.ElMessageBox.confirm(
567
- util.getI18n().t(operationI18nTip, { name: buttonName }),
568
- util.getI18n().t("superPageRuntimeMessage.tips"),
569
- {
570
- confirmButtonText: util.getI18n().t("superPageRuntimeMessage.sure"),
571
- cancelButtonText: util.getI18n().t("superPageRuntimeMessage.cancel"),
572
- type: "warning"
573
- }
574
- ).then(() => {
575
- const system = pageContext.system;
576
- const param = getCommonFormRequestParam(
577
- pageContext,
578
- configureObj,
579
- isUnControlVersion,
580
- mainDefaultValueColumns,
581
- dynamicColumnInfo,
582
- ids
583
- );
584
- getSaveFormRequestByParam(system, param, url, pageContext.entity.data).then((result) => {
585
- resolve(result);
586
- }).catch((error) => {
587
- reject(error);
588
- });
589
- }).catch(() => {
590
- reject("点击了取消按钮");
591
- });
592
- });
593
- }
594
- function deleteFunc(params) {
595
- return new Promise((resolve, reject) => {
596
- const ids = params.ids;
597
- if (!ids || ids.length === 0) {
598
- index.ElMessage({
599
- showClose: true,
600
- type: "warning",
601
- message: util.getI18n().t("superPageRuntimeMessage.pleaseSelectRecord")
602
- });
603
- return;
604
- }
605
- index$1.ElMessageBox.confirm(
606
- util.getI18n().t("superPageRuntimeMessage.whetherToConfirmDeletion"),
607
- util.getI18n().t("superPageRuntimeMessage.tips"),
608
- {
609
- confirmButtonText: util.getI18n().t("superPageRuntimeMessage.sure"),
610
- cancelButtonText: util.getI18n().t("superPageRuntimeMessage.cancel"),
611
- type: "warning"
612
- }
613
- ).then(() => {
614
- const pageContext = params.pageContext;
615
- const configureObj = params.configureObj;
616
- const system = pageContext.entity.system;
617
- const tableName = pageContext.tableName;
618
- const configureBase = configureObj.props.base;
619
- const baseUrl = commonUtil.getBaseUrl(system);
620
- let path = baseUrl + "/dsc/commons/" + tableName;
621
- path = commonUtil.getRealRestApiPath(path, system);
622
- const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
623
- const isWorkflow = pageContext.workflowCode ? true : false;
624
- const param = {
625
- ids,
626
- functionCode: configureBase.functionCode,
627
- isPermission: isPermission + "",
628
- systemCode: system.code,
629
- isWorkflowEntity: isWorkflow,
630
- tableNames: pageContext.tableNames
631
- };
632
- if (configureBase.beanName) {
633
- param["beanName"] = configureBase.beanName;
634
- }
635
- const deleteLogicSetting = configureObj.props.deleteLogicSetting;
636
- if (deleteLogicSetting) {
637
- if (typeof deleteLogicSetting === "object") {
638
- param["deleteLogicSetting"] = JSON.stringify(deleteLogicSetting);
639
- } else if (typeof deleteLogicSetting === "string") {
640
- param["deleteLogicSetting"] = deleteLogicSetting;
641
- }
642
- }
643
- const logSetting = configureObj.props.logSetting;
644
- if (logSetting) {
645
- param["logSettingText"] = logSetting;
646
- }
647
- const isSafeDelete = configureObj.props.base.isSafeDelete;
648
- if (isSafeDelete) {
649
- param["isSafeDelete"] = isSafeDelete;
650
- }
651
- request.delete(path, {
652
- data: param
653
- }).then((data) => {
654
- const gridRef = globalRefs.getComponentRef(pageContext, params.tableUuid);
655
- if (gridRef) {
656
- gridRef.isDeleteChange(true);
657
- gridRef.clearSelections();
658
- }
659
- dealAfterOperate(
660
- pageContext,
661
- configureObj,
662
- data,
663
- "superPageRuntimeMessage.successfulDelete",
664
- true
665
- );
666
- resolve(true);
667
- }).catch((e) => {
668
- reject(e);
669
- });
670
- }).catch(() => {
671
- reject();
672
- });
673
- });
674
- }
675
- function downloadTemplateFunc(params) {
676
- const pageContext = params.pageContext;
677
- const configureObj = params.configureObj;
678
- const configureBase = configureObj.props.base;
679
- const templateFilesResult = commonUtil.packageTemplateFiles(configureBase.templateFiles);
680
- let templateUUID;
681
- let templateShowPath;
682
- if (templateFilesResult && templateFilesResult.length > 0) {
683
- templateUUID = templateFilesResult[0].templateUUID;
684
- templateShowPath = templateFilesResult[0].templateShowPath;
685
- }
686
- const system = pageContext.system;
687
- const showName = templateShowPath;
688
- let param = "?1=1";
689
- if (templateUUID && showName && templateUUID !== "undefined" && showName !== "undefined" && templateUUID !== "null" && showName !== "null") {
690
- param += "&fileName=" + encodeURI(templateUUID) + "&showName=" + encodeURI(showName);
691
- } else if (showName) {
692
- param += "&showName=" + encodeURI(showName);
693
- }
694
- const logSetting = configureObj.props.logSetting;
695
- if (logSetting && logSetting !== "") {
696
- param += "&logSettingText=" + logSetting;
697
- }
698
- if (system && system.code) {
699
- param += "&systemCode=" + system.code;
700
- }
701
- const listCode = params.listCode;
702
- if (listCode) {
703
- param += "&listCode=" + listCode;
704
- }
705
- if (pageContext.beanName) {
706
- param += "&beanName=" + pageContext.beanName;
707
- }
708
- if (configureBase.functionCode) {
709
- param += "&functionCode=" + configureBase.functionCode;
710
- }
711
- if (pageContext.tableName) {
712
- param += "&tableName=" + pageContext.tableName;
713
- }
714
- if (configureBase) {
715
- const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
716
- param += "&isPermission=" + isPermission;
717
- }
718
- const baseUrl = commonUtil.getBaseUrl(system);
719
- window.open(baseUrl + "/dsc/commons/download-files" + param);
720
- }
721
- function doImportFinally(params, fileObj) {
722
- const pageContext = params.pageContext;
723
- const buttonConfigureObj = params.configureObj;
724
- const tableConfigure = params.tableConfigure;
725
- const tableName = pageContext.tableName;
726
- const buttonConfigureBase = buttonConfigureObj.props.base;
727
- const param = new FormData();
728
- param.append("multipartFile", fileObj);
729
- if (tableName) {
730
- param.append("tableName", tableName);
731
- }
732
- if (pageContext.importBeanName) {
733
- param.append("importBeanName", pageContext.importBeanName);
734
- }
735
- if (pageContext.beanName) {
736
- param.append("beanName", pageContext.beanName);
737
- }
738
- const listViewImportDuplicate = tableConfigure.props.listViewImportDuplicate;
739
- if (listViewImportDuplicate) {
740
- param.append("importDuplicateRule", listViewImportDuplicate);
741
- }
742
- const judgeHeavyList = pageContext.judgeHeavyList;
743
- if (judgeHeavyList) {
744
- param.append("judgeHeavyList", JSON.stringify(judgeHeavyList));
745
- }
746
- const formNoRuleCode = pageContext.formNoRuleCode;
747
- if (formNoRuleCode) {
748
- param.append("formNoRuleCode", formNoRuleCode);
749
- }
750
- const listCode = params.listCode;
751
- if (listCode) {
752
- param.append("listCode", listCode);
753
- }
754
- let isAsync = false;
755
- if (buttonConfigureBase["isAsync"] !== void 0 && buttonConfigureBase["isAsync"] !== null) {
756
- isAsync = buttonConfigureBase.isAsync;
757
- } else {
758
- isAsync = false;
759
- }
760
- param.append("isAsync", isAsync + "");
761
- param.append("pageCode", pageContext.code);
762
- const isWorkflowEntity = pageContext.workflowCode ? true : false;
763
- if (isWorkflowEntity !== null && isWorkflowEntity !== void 0) {
764
- param.append("isWorkflowEntity", isWorkflowEntity + "");
765
- }
766
- if (buttonConfigureBase.functionCode) {
767
- param.append("functionCode", buttonConfigureBase.functionCode);
768
- }
769
- const additionalParamMap = pageContext.entity.request;
770
- if (additionalParamMap) {
771
- param.append("additionalParamMapStr", JSON.stringify(additionalParamMap));
772
- }
773
- const isPermission = buttonConfigureBase.isPermission === void 0 || buttonConfigureBase.isPermission === "true" || buttonConfigureBase.isPermission;
774
- param.append("isPermission", isPermission + "");
775
- const system = pageContext.entity.system;
776
- const baseUrl = commonUtil.getBaseUrl(system);
777
- let path = baseUrl + "/dsc/commons/import-data";
778
- path = commonUtil.getRealRestApiPath(path, system);
779
- request.post(path, param).then((data) => {
780
- if (isAsync) {
781
- index.ElMessage({
782
- showClose: true,
783
- type: "success",
784
- message: util.getI18n().t("superPageRuntimeMessage.asyncImport")
785
- });
786
- } else {
787
- let isSuccess = false;
788
- if (data) {
789
- isSuccess = false;
790
- index.ElMessage({
791
- dangerouslyUseHTMLString: true,
792
- showClose: true,
793
- type: "warning",
794
- message: data
795
- });
796
- } else {
797
- index.ElMessage({
798
- showClose: true,
799
- type: "success",
800
- message: util.getI18n().t("superPageRuntimeMessage.successfulImport")
801
- });
802
- isSuccess = true;
803
- }
804
- dealAfterOperate(pageContext, buttonConfigureObj, data, null, true);
805
- pageContext.result = isSuccess;
806
- eventUtil.doAfterClickEvent(pageContext, buttonConfigureObj);
807
- }
808
- }).catch((error) => {
809
- console.log("error==", error);
810
- });
811
- }
812
- function judgeDataNumber(buttonConfigureObj, ids) {
813
- const buttonConfigureBase = buttonConfigureObj.props.base;
814
- if (buttonConfigureBase.conditionsForExecution && buttonConfigureBase.conditionsForExecution !== "") {
815
- if (buttonConfigureBase.conditionsForExecution === "one") {
816
- if (!ids || ids.length !== 1) {
817
- index.ElMessage({
818
- showClose: true,
819
- type: "warning",
820
- message: util.getI18n().t("superPageRuntimeMessage.thePreconditionOfTheButtonTo", {
821
- message: util.getI18n().t("superPageRuntimeMessage.onlyOneRecordCanBeselected")
822
- })
823
- });
824
- return false;
825
- }
826
- } else if (buttonConfigureBase.conditionsForExecution === "more") {
827
- if (!ids || ids.length <= 0) {
828
- index.ElMessage({
829
- showClose: true,
830
- type: "warning",
831
- message: util.getI18n().t("superPageRuntimeMessage.thePreconditionOfTheButtonTo", {
832
- message: util.getI18n().t("superPageRuntimeMessage.selectAtLeastOneRecord")
833
- })
834
- });
835
- return false;
836
- }
837
- }
838
- }
839
- return true;
840
- }
841
- function exportFunc(params) {
842
- return new Promise((resolve, reject) => {
843
- const pageContext = params.pageContext;
844
- const configureBase = params.configureObj.props.base;
845
- const listCode = params.listCode;
846
- const selections = params.selections;
847
- const dataParam = {};
848
- if (selections && selections.length > 0) {
849
- dataParam["data"] = selections;
850
- }
851
- let pageName = pageContext.label;
852
- if (!pageName) {
853
- pageName = pageContext.code;
854
- }
855
- let isAsync = false;
856
- if (configureBase["isAsync"] !== void 0 && configureBase["isAsync"] !== null) {
857
- isAsync = configureBase.isAsync;
858
- } else {
859
- isAsync = false;
860
- }
861
- const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
862
- const exportFileName = pageName;
863
- window["$vueApp"].config.globalProperties.$exportDataNew(
864
- dataParam,
865
- exportFileName,
866
- listCode,
867
- configureBase.functionCode,
868
- null,
869
- null,
870
- isAsync,
871
- pageContext.code,
872
- isPermission
873
- );
874
- });
875
- }
876
- function getWorkflowSaveParams(params) {
877
- const pageContext = params.pageContext;
878
- const configureObj = params.configureObj;
879
- const dataModel = pageContext.entity.data;
880
- const system = pageContext.entity.system;
881
- const permissionPrefix = system.code + "." + pageContext.code;
882
- let functionCode = configureObj.props.base.functionCode;
883
- if (!functionCode) {
884
- functionCode = permissionPrefix + ".xxx";
885
- }
886
- if (!dataModel.id && !dataModel.ID) {
887
- dataModel["pageCode"] = pageContext.code;
888
- dataModel["pageVersion"] = pageContext.version;
889
- }
890
- const param = {
891
- entity: dataModel,
892
- pageMoel: pageContext.entity.page,
893
- formNoRuleCode: pageContext.formNoRuleCode,
894
- tableName: pageContext.tableName,
895
- emailTemplateCode: pageContext.emailTemplateCode,
896
- definitionId: pageContext.definitionId,
897
- functionCode,
898
- systemCode: system.code,
899
- tableNames: pageContext.tableNames
900
- };
901
- if (pageContext.completeTaskParam) {
902
- param["completeTaskParam"] = {
903
- taskId: pageContext.completeTaskParam.taskId,
904
- opinion: pageContext.completeTaskParam.opinion
905
- };
906
- }
907
- if (pageContext.judgeHeavyList) {
908
- if (commonUtil.isArrayFn(pageContext.judgeHeavyList)) {
909
- param["judgeHeavyList"] = JSON.stringify(pageContext.judgeHeavyList);
910
- } else {
911
- param["judgeHeavyList"] = pageContext.judgeHeavyList;
912
- }
913
- }
914
- const conversionCodes = configureObj.props.base.conversionCodes;
915
- if (conversionCodes) {
916
- if (commonUtil.isArrayFn(conversionCodes)) {
917
- param["dataConversionRule"] = conversionCodes.join(",");
918
- } else if (typeof conversionCodes === "string") {
919
- param["dataConversionRule"] = conversionCodes;
920
- }
921
- }
922
- const autoSetValueData = configureObj.props.base.setValueList;
923
- if (autoSetValueData) {
924
- if (commonUtil.isArrayFn(autoSetValueData)) {
925
- param["autoSetValueData"] = autoSetValueData.join(",");
926
- } else if (typeof autoSetValueData === "string") {
927
- param["autoSetValueData"] = autoSetValueData;
928
- }
929
- }
930
- if (pageContext.beanName) {
931
- param["beanName"] = pageContext.beanName;
932
- }
933
- const logSetting = configureObj.props.logSetting;
934
- if (logSetting) {
935
- param["logSettingText"] = logSetting;
936
- }
937
- if (!param.systemCode) {
938
- param.systemCode = system.code;
939
- }
940
- const additionalParamMap = pageContext.entity.request;
941
- if (additionalParamMap) {
942
- param["additionalParamMap"] = additionalParamMap;
943
- if (additionalParamMap.ids && additionalParamMap.ids.length > 0) {
944
- param["ids"] = additionalParamMap.ids;
945
- }
946
- }
947
- const successOperation = configureObj.props.base.successOperation;
948
- if (successOperation && successOperation === "noOperation") {
949
- param["unControlVersion"] = true;
950
- }
951
- param["isWorkflowEntity"] = true;
952
- return param;
953
- }
954
- function workflowSaveFunc(params) {
955
- return new Promise((resolve, reject) => {
956
- const pageContext = params.pageContext;
957
- const dataModel = pageContext.entity.data;
958
- const system = pageContext.entity.system;
959
- let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons";
960
- path = commonUtil.getRealRestApiPath(path, system);
961
- if (!path) {
962
- index.ElMessage({
963
- showClose: true,
964
- type: "warning",
965
- message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
966
- });
967
- return;
968
- }
969
- const param = getWorkflowSaveParams(params);
970
- let request$1;
971
- if (dataModel.id || dataModel.ID) {
972
- request$1 = request.put(path, param);
973
- } else {
974
- request$1 = request.post(path, param);
975
- }
976
- request$1.then((commonEntity) => {
977
- let result = true;
978
- if (commonEntity) {
979
- result = dealCompleteTaskParam(commonEntity, false, pageContext, params, null);
980
- }
981
- if (result === true) {
982
- index.ElMessage({
983
- showClose: true,
984
- type: "success",
985
- message: util.getI18n().t("superPageRuntimeMessage.successfulSave")
986
- });
987
- }
988
- resolve(true);
989
- }).catch((error) => {
990
- reject(error);
991
- });
992
- });
993
- }
994
- function dealCompleteTaskParam(commonEntity, isInit, pageContext, params, operationResult) {
995
- const pageCode = pageContext.code;
996
- const pageVersion = pageContext.version;
997
- const formParam = commonEntity;
998
- let taskId;
999
- if (formParam) {
1000
- if (isInit && formParam.entity) {
1001
- pageContext.entity.data = formParam.entity;
1002
- pageContext.initFormNo = commonEntity.formNo;
1003
- pageContext.emailTemplateCode = commonEntity.emailTemplateCode;
1004
- }
1005
- const completeTaskResult = formParam.completeTaskResult;
1006
- if (completeTaskResult) {
1007
- const completeTaskTipType = completeTaskResult.completeTaskTipType;
1008
- if (completeTaskTipType && completeTaskTipType === "MESSAGE") {
1009
- const message = completeTaskResult.content;
1010
- index.ElMessage({
1011
- showClose: true,
1012
- type: "warning",
1013
- message
1014
- });
1015
- return false;
1016
- }
1017
- }
1018
- if (formParam.completeTaskParam) {
1019
- const completeTaskParam = formParam.completeTaskParam;
1020
- taskId = completeTaskParam.taskId;
1021
- if (params) {
1022
- params.taskId = taskId;
1023
- }
1024
- storeUtil.setStoreInfo(pageCode, pageVersion, "_completeTaskParam", completeTaskParam);
1025
- pageContext.fieldPermissions = completeTaskParam.fieldPermissions;
1026
- pageContext.actionPermissions = completeTaskParam.actionPermissions;
1027
- pageContext.workflowButtonComponent = completeTaskParam.buttonComponent;
1028
- pageContext.completeTaskParam = completeTaskParam;
1029
- }
1030
- storeUtil.setStoreInfo(pageCode, pageVersion, "_currentActivityName", formParam.taskName);
1031
- }
1032
- if (params) {
1033
- params.operationResult = operationResult;
1034
- }
1035
- if (!isInit) {
1036
- dealAfterOperate(pageContext, params.configureObj, commonEntity, null, false);
1037
- }
1038
- return true;
1039
- }
1040
- function submitProcessFunc(params) {
1041
- return new Promise((resolve, reject) => {
1042
- const pageContext = params.pageContext;
1043
- const system = pageContext.entity.system;
1044
- let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/submit";
1045
- path = commonUtil.getRealRestApiPath(path, system);
1046
- if (!path) {
1047
- index.ElMessage({
1048
- showClose: true,
1049
- type: "warning",
1050
- message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1051
- });
1052
- return;
1053
- }
1054
- const param = getWorkflowSaveParams(params);
1055
- const request$1 = request.post(path, param);
1056
- if (request$1) {
1057
- request$1.then((commonEntity) => {
1058
- let result = true;
1059
- if (commonEntity) {
1060
- result = dealCompleteTaskParam(commonEntity, false, pageContext, params, null);
1061
- }
1062
- if (result === true) {
1063
- index.ElMessage({
1064
- showClose: true,
1065
- type: "success",
1066
- message: util.getI18n().t("superPageRuntimeMessage.successfulSubmit")
1067
- });
1068
- }
1069
- resolve(true);
1070
- }).catch((error) => {
1071
- reject(error);
1072
- });
1073
- }
1074
- });
1075
- }
1076
- function completeTaskFunc(params, operationResult) {
1077
- return new Promise((resolve, reject) => {
1078
- const pageContext = params.pageContext;
1079
- const system = pageContext.entity.system;
1080
- let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/complete-tasks";
1081
- path = commonUtil.getRealRestApiPath(path, system);
1082
- if (!path) {
1083
- index.ElMessage({
1084
- showClose: true,
1085
- type: "warning",
1086
- message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1087
- });
1088
- return;
1089
- }
1090
- const param = getWorkflowSaveParams(params);
1091
- param["completeTaskParam"] = {
1092
- operationResult,
1093
- taskId: pageContext.completeTaskParam ? pageContext.completeTaskParam.taskId : null,
1094
- opinion: pageContext.completeTaskParam ? pageContext.completeTaskParam.opinion : null
1095
- };
1096
- const request$1 = request.post(path, param);
1097
- request$1.then((commonEntity) => {
1098
- let result = true;
1099
- if (commonEntity) {
1100
- result = dealCompleteTaskParam(commonEntity, false, pageContext, params, operationResult);
1101
- }
1102
- if (result === true) {
1103
- index.ElMessage({
1104
- showClose: true,
1105
- type: "success",
1106
- message: util.getI18n().t("superPageRuntimeMessage.successfulCompleteTask")
1107
- });
1108
- }
1109
- resolve(true);
1110
- }).catch((error) => {
1111
- reject(error);
1112
- });
1113
- });
1114
- }
1115
- function assignTask(params) {
1116
- const pageContext = params.pageContext;
1117
- const pagCode = pageContext.code;
1118
- const eventPageInfo = pagCode + "_";
1119
- eventBus.$emit(eventPageInfo + "assign-task", params);
1120
- }
1121
- function doAssign(params, selectNodeInfo) {
1122
- if (selectNodeInfo) {
1123
- const pageContext = params.pageContext;
1124
- const configureObj = params.configureObj;
1125
- const system = pageContext.entity.system;
1126
- const path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/assigns";
1127
- const assigneeId = selectNodeInfo.id ? selectNodeInfo.id : selectNodeInfo.ID ? selectNodeInfo.ID : null;
1128
- const requestParam = getWorkflowSaveParams(params);
1129
- requestParam["assigneeId"] = assigneeId;
1130
- transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulAssign").then(
1131
- (result) => {
1132
- eventUtil.doAfterClickEvent(pageContext, configureObj);
1133
- }
1134
- );
1135
- }
1136
- }
1137
- function getTransactTaskParam(params) {
1138
- const pageContext = params.pageContext;
1139
- const dataModel = pageContext.entity.data;
1140
- const pageModel = pageContext.entity.page;
1141
- const system = pageContext.entity.system;
1142
- const permissionPrefix = system.code + "." + pageContext.code;
1143
- const additionalParamMap = pageContext.entity.request;
1144
- const dataId = dataModel.ID !== void 0 && dataModel.ID !== null ? dataModel.ID : dataModel.id;
1145
- ({
1146
- beanName: pageContext.beanName,
1147
- id: dataId,
1148
- entity: dataModel,
1149
- pageModel,
1150
- additionalParamMap,
1151
- tableName: pageContext.tableName,
1152
- functionCode: permissionPrefix + ".xxx",
1153
- isWorkflowEntity: true,
1154
- tableNames: pageContext.tableNames
1155
- });
1156
- ({
1157
- taskId: pageContext.completeTaskParam.taskId,
1158
- systemCode: system.code
1159
- });
1160
- }
1161
- function addSignerFunc(params) {
1162
- const pageContext = params.pageContext;
1163
- const pagCode = pageContext.code;
1164
- const eventPageInfo = pagCode + "_";
1165
- eventBus.$emit(eventPageInfo + "add-signer", params);
1166
- }
1167
- function doAddSigner(params, selectNodeInfo) {
1168
- if (selectNodeInfo) {
1169
- const pageContext = params.pageContext;
1170
- const buttonConfigureObj = params.configureObj;
1171
- const system = pageContext.entity.system;
1172
- let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/add-signers";
1173
- path = commonUtil.getRealRestApiPath(path, system);
1174
- if (!path) {
1175
- index.ElMessage({
1176
- showClose: true,
1177
- type: "warning",
1178
- message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1179
- });
1180
- return;
1181
- }
1182
- const requestParams = getTransactTaskParam(params);
1183
- requestParams["completeTaskParam"].transactors = selectNodeInfo.loginNames.join(",").split(",");
1184
- const request$1 = request.post(path, requestParams);
1185
- if (request$1) {
1186
- request$1.then((commonEntity) => {
1187
- index.ElMessage({
1188
- showClose: true,
1189
- type: "success",
1190
- message: util.getI18n().t("superPageRuntimeMessage.successfulOperation")
1191
- });
1192
- if (commonEntity.entity) {
1193
- dealAfterOperate(pageContext, buttonConfigureObj, commonEntity, null, false);
1194
- }
1195
- eventUtil.doAfterClickEvent(pageContext, buttonConfigureObj);
1196
- });
1197
- }
1198
- }
1199
- }
1200
- function createCopyTask(params) {
1201
- const pageContext = params.pageContext;
1202
- const pagCode = pageContext.code;
1203
- const eventPageInfo = pagCode + "_";
1204
- eventBus.$emit(eventPageInfo + "copy-task", params);
1205
- }
1206
- function doCreateCopyTask(params, selectNodeInfo) {
1207
- if (selectNodeInfo) {
1208
- const pageContext = params.pageContext;
1209
- const buttonConfigureObj = params.configureObj;
1210
- const system = pageContext.entity.system;
1211
- let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/add-signers";
1212
- path = commonUtil.getRealRestApiPath(path, system);
1213
- if (!path) {
1214
- index.ElMessage({
1215
- showClose: true,
1216
- type: "warning",
1217
- message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1218
- });
1219
- return;
1220
- }
1221
- const requestParams = getTransactTaskParam(params);
1222
- requestParams["completeTaskParam"].transactors = selectNodeInfo.userIds.join(",").split(",");
1223
- const request$1 = request.post(path, requestParams);
1224
- if (request$1) {
1225
- request$1.then((commonEntity) => {
1226
- index.ElMessage({
1227
- showClose: true,
1228
- type: "success",
1229
- message: util.getI18n().t("superPageRuntimeMessage.successfulOperation")
1230
- });
1231
- eventUtil.doAfterClickEvent(pageContext, buttonConfigureObj);
1232
- });
1233
- }
1234
- }
1235
- }
1236
- function transactTask(params, requestParam, path, successMessageTip) {
1237
- return new Promise((resolve, reject) => {
1238
- const pageContext = params.pageContext;
1239
- const system = pageContext.entity.system;
1240
- path = commonUtil.getRealRestApiPath(path, system);
1241
- if (!path) {
1242
- index.ElMessage({
1243
- showClose: true,
1244
- type: "warning",
1245
- message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1246
- });
1247
- return;
1248
- }
1249
- const request$1 = request.post(path, requestParam);
1250
- if (request$1) {
1251
- request$1.then((commonEntity) => {
1252
- let result = true;
1253
- if (commonEntity) {
1254
- result = dealCompleteTaskParam(commonEntity, false, pageContext, params, null);
1255
- }
1256
- if (result === true) {
1257
- index.ElMessage({
1258
- showClose: true,
1259
- type: "success",
1260
- message: util.getI18n().t(successMessageTip)
1261
- });
1262
- }
1263
- resolve(true);
1264
- }).catch((error) => {
1265
- reject(error);
1266
- });
1267
- }
1268
- });
1269
- }
1270
- function drawTaskFunc(params) {
1271
- const pageContext = params.pageContext;
1272
- const system = pageContext.entity.system;
1273
- const path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/draw-tasks";
1274
- const requestParam = getWorkflowSaveParams(params);
1275
- return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulDrawTask");
1276
- }
1277
- function abandonReceiveFunc(params) {
1278
- const pageContext = params.pageContext;
1279
- const system = pageContext.entity.system;
1280
- const path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/abandon-receives";
1281
- const requestParam = getWorkflowSaveParams(params);
1282
- return transactTask(
1283
- params,
1284
- requestParam,
1285
- path,
1286
- "superPageRuntimeMessage.successfulAbandonReceive"
1287
- );
1288
- }
1289
- function returnToPreviousTaskFunc(params) {
1290
- const pageContext = params.pageContext;
1291
- const system = pageContext.entity.system;
1292
- const path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/return-to-previous-tasks";
1293
- const requestParam = getWorkflowSaveParams(params);
1294
- return transactTask(
1295
- params,
1296
- requestParam,
1297
- path,
1298
- "superPageRuntimeMessage.successfulReturnToPreviousTask"
1299
- );
1300
- }
1301
- function endInstanceFunc(params) {
1302
- const pageContext = params.pageContext;
1303
- const system = pageContext.entity.system;
1304
- const path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/end-instance";
1305
- const requestParam = getWorkflowSaveParams(params);
1306
- return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulEndInstance");
1307
- }
1308
- function returnTaskToFunc(params) {
1309
- const pageContext = params.pageContext;
1310
- const pagCode = pageContext.code;
1311
- const eventPageInfo = pagCode + "_";
1312
- eventBus.$emit(eventPageInfo + "choose-return-node", params);
1313
- }
1314
- function getTaskInformitions(params) {
1315
- const pageContext = params.pageContext;
1316
- const system = pageContext.entity.system;
1317
- const completeTaskParam = pageContext.completeTaskParam;
1318
- let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/returnable-task/" + completeTaskParam.taskId;
1319
- path = commonUtil.getRealRestApiPath(path, system);
1320
- if (!path) {
1321
- index.ElMessage({
1322
- showClose: true,
1323
- type: "warning",
1324
- message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1325
- });
1326
- return;
1327
- }
1328
- const permissionPrefix = system.code + "." + pageContext.code;
1329
- const additionalParamMap = pageContext.entity.request;
1330
- const requestParams = {
1331
- beanName: pageContext.beanName,
1332
- additionalParamMap,
1333
- tableName: pageContext.tableName,
1334
- functionCode: permissionPrefix + ".xxx"
1335
- };
1336
- return request.post(path, requestParams);
1337
- }
1338
- function doReturnTaskTo(params, selectTaskNode) {
1339
- const pageContext = params.pageContext;
1340
- const configureObj = params.configureObj;
1341
- const system = pageContext.entity.system;
1342
- const path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/returnTaskTo";
1343
- const requestParam = getWorkflowSaveParams(params);
1344
- if (selectTaskNode.nodeName) {
1345
- requestParam["returnToNodeName"] = selectTaskNode.nodeName;
1346
- }
1347
- if (selectTaskNode.nodeId) {
1348
- requestParam["returnToNodeId"] = selectTaskNode.nodeId;
1349
- }
1350
- transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulReturnTaskTo").then(
1351
- (result) => {
1352
- eventUtil.doAfterClickEvent(pageContext, configureObj);
1353
- }
1354
- );
1355
- }
1356
- function removeSignerfunc(params) {
1357
- const pageContext = params.pageContext;
1358
- const pagCode = pageContext.code;
1359
- const eventPageInfo = pagCode + "_";
1360
- eventBus.$emit(eventPageInfo + "remove-signer", params);
1361
- }
1362
- function getRemoveSigner(params) {
1363
- const pageContext = params.pageContext;
1364
- const system = pageContext.entity.system;
1365
- let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/get-remove-signers";
1366
- const requestParam = getWorkflowSaveParams(params);
1367
- path = commonUtil.getRealRestApiPath(path, system);
1368
- if (!path) {
1369
- index.ElMessage({
1370
- showClose: true,
1371
- type: "warning",
1372
- message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1373
- });
1374
- return;
1375
- }
1376
- return request.post(path, requestParam);
1377
- }
1378
- function doRemoveSigners(params, selectRemoveTasks) {
1379
- if (selectRemoveTasks) {
1380
- const pageContext = params.pageContext;
1381
- const configureObj = params.configureObj;
1382
- const system = pageContext.entity.system;
1383
- let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/remove-signers";
1384
- path = commonUtil.getRealRestApiPath(path, system);
1385
- if (!path) {
1386
- this.$message({
1387
- showClose: true,
1388
- type: "warning",
1389
- message: this.$t("superPageRuntimeMessage.requestPathEmpty")
1390
- });
1391
- return;
1392
- }
1393
- const taskIds = selectRemoveTasks.map((task) => task.id ? task.id : task.ID ? task.ID : null);
1394
- const requestParam = getWorkflowSaveParams(params);
1395
- requestParam["ids"] = taskIds;
1396
- const request$1 = request.post(path, requestParam);
1397
- if (request$1) {
1398
- request$1.then((commonEntity) => {
1399
- dealAfterOperate(
1400
- pageContext,
1401
- configureObj,
1402
- commonEntity,
1403
- "superPageRuntimeMessage.successfulOperation",
1404
- false
1405
- );
1406
- eventUtil.doAfterClickEvent(pageContext, configureObj);
1407
- });
1408
- }
1409
- }
1410
- }
1411
- function retrieveTaskFunc(params) {
1412
- const pageContext = params.pageContext;
1413
- const system = pageContext.entity.system;
1414
- const path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/retrieves";
1415
- const requestParam = getWorkflowSaveParams(params);
1416
- return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulRetrieve");
1417
- }
1418
- function lineEditCreateFunc(params) {
1419
- const pageContext = params.pageContext;
1420
- const tableUuid = params["tableUuid"];
1421
- const gridRef = globalRefs.getComponentRef(pageContext, tableUuid);
1422
- if (gridRef) {
1423
- gridRef.createRow(params);
1424
- }
1425
- }
1426
- function isVisibleWorkflowButton(standardEventName, buttonInfo, completeTaskParam) {
1427
- let isVisible = false;
1428
- if (standardEventName && buttonInfo) {
1429
- if (standardEventName === "workflowSave") {
1430
- isVisible = isVisibleWorkflowSave(buttonInfo);
1431
- } else if (standardEventName === "submitProcess") {
1432
- isVisible = isVisibleSubmitProcess(buttonInfo);
1433
- } else if (standardEventName === "submitTask") {
1434
- isVisible = isVisibleSubmitTask(buttonInfo);
1435
- } else if (standardEventName === "drawTask") {
1436
- isVisible = isVisibleDrawTask(buttonInfo);
1437
- } else if (standardEventName === "abandonReceive") {
1438
- isVisible = isVisibleAbandonReceive(buttonInfo);
1439
- } else if (standardEventName === "approve" || standardEventName === "refuse") {
1440
- isVisible = isVisibleApproveOrRefuse(buttonInfo);
1441
- } else if (standardEventName === "readed") {
1442
- isVisible = isVisibleReaded(buttonInfo);
1443
- } else if (standardEventName === "assign") {
1444
- isVisible = isVisibleAssignTask(buttonInfo);
1445
- } else if (standardEventName === "copyTask") {
1446
- isVisible = isVisibleCopyTask(buttonInfo);
1447
- } else if (standardEventName === "addSigner") {
1448
- isVisible = isVisibleAddSigner(buttonInfo);
1449
- } else if (standardEventName === "removeSigner") {
1450
- isVisible = isVisibleRemoveSigner(buttonInfo);
1451
- } else if (standardEventName === "retrieveTask") {
1452
- isVisible = isVisibleRetrieveTask(buttonInfo);
1453
- } else if (standardEventName === "agreement" || standardEventName === "oppose") {
1454
- isVisible = isVisibleAgreementOrOppose(buttonInfo);
1455
- } else if (standardEventName === "kiken") {
1456
- isVisible = isVisibleKiken(buttonInfo);
1457
- } else if (isShowOtherWorkflowBtn(buttonInfo, completeTaskParam)) {
1458
- if (standardEventName === "returnToPreviousTask") {
1459
- isVisible = isVisibleReturnToPreviousTask(buttonInfo);
1460
- } else {
1461
- isVisible = true;
1462
- }
1463
- }
1464
- }
1465
- return isVisible;
1466
- }
1467
- function isVisibleWorkflowSave(buttonInfo) {
1468
- if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["processState"] === null || buttonInfo["processState"] === "UNSUBMIT" && buttonInfo["active"] === "WAIT_TRANSACT") {
1469
- if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["showButtonSave"] === true) {
1470
- return true;
1471
- }
1472
- }
1473
- if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
1474
- if (buttonInfo["processingMode"] !== "TYPE_READ" && buttonInfo["showButtonSave"] && (buttonInfo["active"] === "WAIT_TRANSACT" || buttonInfo["active"] === "WAIT_DESIGNATE_TRANSACTOR" || buttonInfo["active"] === "WAIT_CHOICE_TACHE" || buttonInfo["active"] === "DRAW_WAIT")) {
1475
- return true;
1476
- }
1477
- }
1478
- return false;
1479
- }
1480
- function isVisibleSubmitProcess(buttonInfo) {
1481
- if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["processState"] === null || buttonInfo["processState"] === "UNSUBMIT" && buttonInfo["active"] === "WAIT_TRANSACT") {
1482
- if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["showButtonSave"] === true) {
1483
- return true;
1484
- }
1485
- }
1486
- return false;
1487
- }
1488
- function isVisibleSubmitTask(buttonInfo) {
1489
- if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
1490
- if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] === "EDIT") {
1491
- return true;
1492
- }
1493
- }
1494
- return false;
1495
- }
1496
- function isVisibleDrawTask(buttonInfo) {
1497
- if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
1498
- if (buttonInfo["active"] && (buttonInfo["active"] === "DRAW_WAIT" || buttonInfo["active"] === "DEPT_DRAW_WAIT") && buttonInfo["showButtonDraw"]) {
1499
- return true;
1500
- }
1501
- }
1502
- return false;
1503
- }
1504
- function isVisibleAbandonReceive(buttonInfo) {
1505
- if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
1506
- if ((buttonInfo["drawTask"] && buttonInfo["active"] === "WAIT_TRANSACT" || buttonInfo["canAbandonDeptTask"] && buttonInfo["active"] === "WAIT_TRANSACT") && buttonInfo["showButtonAbandon"]) {
1507
- return true;
1508
- }
1509
- }
1510
- return false;
1511
- }
1512
- function isVisibleApproveOrRefuse(buttonInfo) {
1513
- if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
1514
- if (buttonInfo["active"] === "WAIT_TRANSACT" && (buttonInfo["processingMode"] === "APPROVE" || buttonInfo["processingMode"] === "COUNTERSIGN")) {
1515
- return true;
1516
- }
1517
- }
1518
- return false;
1519
- }
1520
- function isVisibleAddSigner(buttonInfo) {
1521
- if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
1522
- if (buttonInfo["active"] === "WAIT_TRANSACT" && (buttonInfo["processingMode"] === "APPROVE" || buttonInfo["processingMode"] === "COUNTERSIGN") && buttonInfo["processingMode"] === "COUNTERSIGN" && buttonInfo["showButtonAddCounter"]) {
1523
- return true;
1524
- }
1525
- }
1526
- return false;
1527
- }
1528
- function isVisibleRemoveSigner(buttonInfo) {
1529
- if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
1530
- if (buttonInfo["active"] === "WAIT_TRANSACT" && (buttonInfo["processingMode"] === "APPROVE" || buttonInfo["processingMode"] === "COUNTERSIGN") && buttonInfo["processingMode"] === "COUNTERSIGN" && buttonInfo["showButtonDelCounter"]) {
1531
- return true;
1532
- }
1533
- }
1534
- return false;
1535
- }
1536
- function isVisibleAgreementOrOppose(buttonInfo) {
1537
- if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
1538
- if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] === "VOTE") {
1539
- return true;
1540
- }
1541
- }
1542
- return false;
1543
- }
1544
- function isVisibleKiken(buttonInfo) {
1545
- if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
1546
- if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] === "VOTE" && buttonInfo["showButtonKiken"]) {
1547
- return true;
1548
- }
1549
- }
1550
- return false;
1551
- }
1552
- function isVisibleCopyTask(buttonInfo) {
1553
- if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
1554
- if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] !== "TYPE_READ" && buttonInfo["showButtonCopy"]) {
1555
- return true;
1556
- }
1557
- }
1558
- return false;
1559
- }
1560
- function isVisibleAssignTask(buttonInfo) {
1561
- if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
1562
- if (buttonInfo["processingMode"] !== "TYPE_READ" && (buttonInfo["active"] === "WAIT_TRANSACT" || buttonInfo["active"] === "DRAW_WAIT")) {
1563
- return true;
1564
- }
1565
- }
1566
- return false;
1567
- }
1568
- function isVisibleRetrieveTask(buttonInfo) {
1569
- if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
1570
- if (showRetrieve(buttonInfo)) {
1571
- return true;
1572
- }
1573
- }
1574
- return false;
1575
- }
1576
- function showRetrieve(buttonInfo) {
1577
- if (buttonInfo["active"] !== "COMPLETED") {
1578
- return false;
1579
- }
1580
- if (buttonInfo["processingMode"] === "TYPE_READ") {
1581
- return false;
1582
- }
1583
- if (!buttonInfo["showButtonGetBack"]) {
1584
- return false;
1585
- }
1586
- return true;
1587
- }
1588
- function isVisibleReaded(buttonInfo) {
1589
- if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] === "TYPE_READ") {
1590
- return true;
1591
- }
1592
- return false;
1593
- }
1594
- function isVisibleReturnToPreviousTask(buttonInfo) {
1595
- if (buttonInfo["rebuttable"]) {
1596
- return true;
1597
- }
1598
- return false;
1599
- }
1600
- function isShowOtherWorkflowBtn(buttonInfo, completeTaskParam) {
1601
- return buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT" && buttonInfo["processingMode"] !== "TYPE_READ" && !isTaskComplete(completeTaskParam);
1602
- }
1603
- function isTaskComplete(completeTaskParam) {
1604
- const taskParam = completeTaskParam;
1605
- let taskComplete = true;
1606
- if (taskParam) {
1607
- taskComplete = taskParam.taskComplete;
1608
- }
1609
- return taskComplete;
1610
- }
1611
- exports.dealAfterOperate = dealAfterOperate;
1612
- exports.dealCompleteTaskParam = dealCompleteTaskParam;
1613
- exports.doAddSigner = doAddSigner;
1614
- exports.doAssign = doAssign;
1615
- exports.doCreateCopyTask = doCreateCopyTask;
1616
- exports.doImportFinally = doImportFinally;
1617
- exports.doRemoveSigners = doRemoveSigners;
1618
- exports.doReturnTaskTo = doReturnTaskTo;
1619
- exports.exportFormReport = exportFormReport;
1620
- exports.getRemoveSigner = getRemoveSigner;
1621
- exports.getSaveFormRequest = getSaveFormRequest;
1622
- exports.getTaskInformitions = getTaskInformitions;
1623
- exports.isVisibleWorkflowButton = isVisibleWorkflowButton;
1624
- exports.judgeDataNumber = judgeDataNumber;
1625
- exports.standardEvents = standardEvents;